theMK2k / MetropolisLauncher

A data-heavy Emulation & Gaming front-end for Windows
http://metropolis-launcher.net
Other
40 stars 3 forks source link

Req. Mass roms adding #24

Open bleuge opened 6 years ago

bleuge commented 6 years ago

It could be nice to auto-add roms to platforms. Instead of going platform by platform adding roms, just add your roms folder (with or without subfolders inside). Knowing if a rom/file/zip... is Sega Genesis or N64 is easy using dats. What do you think about this idea? Regards.

theMK2k commented 6 years ago

Thanks for your feature request, it's actually not the first time I thought about this, but there are some caveats:

  1. What do we do with unknown roms?

Do we just skip them? Do we let the user decide which platform they belong to (for each and every single unknown rom)?

  1. How do we handle unknown filename tags?

The tag parser can fill up with lots of filename tags easily from a single platform alone. Doing a mass import could increase that number by an order of magnitude. Do we just want to ignore unknown tags here?

  1. How do we handle non-Rom media?

Roms have a CRC-based matching to platform and meta data. Non-Rom media like CD-Images currently don't have that matching because this would introduce very poor performance. For non-Rom media there is currently a matching based on custom identifiers in place. The custom identifiers are not equally alike over all platforms, so it is necessary to choose the platform beforehand.

More examples of non-Rom media are:

bleuge commented 6 years ago

Very good questions...

(I am going to dump my brain here, sorry)

I know this is idea is easy to say but difficult to solve, sorry...

The idea is simple. You install Metropolis, the first button is add content, you put your roms folders and it start scanning, identifying, etc... While the first games appears in the DB you can start gaming while the launcher keeps working.

Well, unknown roms, are guilty until proven not xD. Suposse i have a file "game.bin". By extension it could be anything, so nothing to do here (i have the crazy idea of trying a rom probing system analyzing stuff in the files, binary frencuencies, valid opcodes, etc... but it's too crazy and probably not worth the huge effort). Checking headers could help, but well... Not worth the effort probably. But with a huge dat file for every platform, i think, today, it could be very very rare to have something not recognized.

Unknown tags. Well, i already have tons of files with not recognized tags (as date for different beta releases), etc... And i've been thinking about this for some time for other projects of mine.

Let's say we have a very well tested (as you already did) standard tags system. What to do with new ones, let the user choose one by one? Not a solution (at least for myself). What about a general table with all unknown tags. You just dump all tags and values there, and let the user search for them if he likes?

In the search process this field could be checked if user wants to search for it. Not elegant, but we don't loose information from input files.

Well dos games currently can be identified using TDC dats. Mame also, and also exists scummvm dats.

My (probably dumb) idea is:

From input folder: check a file, if is a compressed file, get the crcs from inside. If it's a folder with no compressed files inside (or other some kind of heuristics) treat the folder as a game ,getting the CRCS. Build a huge DAT, from tosec,nointro,mame,tdc,scummvm, etc, etc... Merge them (some dude has done a lot of work about this in EP). If compressed file name (or folder name) hits on the name in the HugeDat, we got a hit. If not, then is not recognized in the dat system and you could try your (great) DB of names.

I firmly believe hashes is the way to go. Even with these games (i am talking for example about A2600 prototypes I have and MEtropolis didn't recognice), using hashes will be id'ed.

I know your launcher works in other way. But, well, it could be crazily useful.

CDs, isos, epbps, mame chds, etc, etc... Must be thought about...

Also this idea has a huge drawback, if you use CRC32s for ids (not a good idea), it could be fast because you retrieve them from compressed files header. If using an standard hash (sha1), files must be hashed.

If I add my currently rom folder probably it could be days before finnishing...

Yes... not a nice idea. But maybe you could derive something useful of my mumblings....