-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change scanner behavior for known file extensions #534
Comments
I like the idea. But we need to add the arcade roms use case in this diagram first. Iirc, for the arcade roms we check the crc of the full zip itself instead of iterating over the zip contents. |
Way better, thanks. We also need to care about use cases where the 1:1 mapping between extension and DAT doesn't work: For example,
|
I think we could map a extension to multiple dats, like: var datsByExtension = map[string][]string{
".gba": {"Nintendo - Game Boy Advance"},
".bin": {"Sega - Genesis", "Atari 5200", ...},
} Otherwise if we don't know all consoles that an extension can be mapped to, we could change the "Ignore" part to match by MD5? Edit: actually some roms have CRC and size. What about using these two infos when available? Edit 2: actually all roms that have CRC have size |
For unzipped games from known extensions we can match by file size + CRC and for zipped games (excluding arcade) by uncompressed file size + CRC |
Investigating even further I noticed a bigger problem that is simpler to solve. By ignoring CRCs = 0 and also matching the file size, I think most of the problems are solved... |
So wrapping up, I think the real problems are:
I don't think we need to map rom extension to dat anymore. In my testings with 8K roms I didn't have that problem, and the cases of "collisions" I noticed weren't real collisions, but instead the same title repeated and some games with unknown CRC. We can keep the algorithm simple by looking inside all dats like we already do, but with some small changes to be like:
|
Related to #453 |
Closing this. I will continue in #453 |
Currently the scanner doesn't use the file extension to match contents against a single .dat, but instead it searches inside all .dat files based on the CRC for most extensions.
For ".cue", ".pbp", ".m3u", the scanner scans based on the exact rom name.
This is what I thought:
The text was updated successfully, but these errors were encountered: