Database hashes and serials

Hi, I’m having a problem with some games not being recognized by automatic scanner and I’d like to investigate further how the RA database hashes are calculated specifically for optical media systems like Sega CD:

E.g. the sha1 sum listed here doesn’t correspond to sha1 sum listed by chdman info nor to extracted BIN file checksums. And yet the file was recognized and added to playlist that means some other information was used likely a serial.

So in summary I’m looking for the following pieces of information to help me in troubleshooting:

  1. How rdb hashes are calculated for optical media and whether it’s relevant
  2. How to extract a serial from CHD/BIN file
  3. Which systems use serial for identification in automatic scan

Ok I think I found answers for first two questions. Checksums RA uses are sourced from Redump and are calculated from the first data track. A serial in a BIN file can be simply displayed with a file command.

The reason why some of my games are not recognized is because entries without serial in Redump like Snatcher (USA) are being filtered out from rdb database. Is this intentional?

Welcome @rengosh

Scanning is in constant development, it is possible that some are missing. On roms it works fine, on disks sometimes it is better to do a manual scan.

Normally CRC is checked, it is much faster, I have no idea how they are used or what the other hashes are for.

If you have a Redump, Tosec, etc. image. The hashes are identical to the database. If it’s not the same, the image is altered or corrupted. You can check this on the Redump page.

Do you have the game in ‘*.chd’ format? Console chd’s are not checked, they are a compressed file and there is no official database.

Does your game have only one BIN? It is possible that it has been modified with chdman.

I don’t think it can be verified by serial.

Hi Alex thanks for your answer.

Any checksum requires reading entire file from disk so for some systems (mostly recent ones with optical media) scanner matches against db by serial which can be quickly extracted from file header. But sometimes the serial is missing from Redump like for above stated game.

CHD files are supported by scanner! It’s great way to save storage space btw you should try it out.

Yes, and the verification is based on the CRC, from Sega CD, to MAME, I don’t know of any that verifies another hash. A single disk may not matter, but when you have to scan 16 thousand roms, the difference between CRC and SHA1 is noticeable.

Yes I know, I have everything in chd, but it doesn’t do hash checking.

chd is a compressed file, when you look at shred you will find CUE+BIN, the detail with this format is that if the Redump disk is CUE+multiple BIN, when you convert it to chd, it changes to ‘CUE+single BIN’ and the hashes are no longer useful.

Actually, the best thing to do is to check that the Snatcher image is identical to the Redump data in the link I shared above.

This is the script that builds the rdbs. Inspecting it should help you understand what you are asking:

Per this script, Sega CD rdb is built to match serial, which would explain the issue with Snatcher being missing.

1 Like