Identify a game from its file
Every identified copy in Title Screen carries an identity: the SHA-1 and size of the game in a canonical form, which is the form the dump lists (No-Intro, Redump, MAME) already hash. File names, folders and containers never matter: a .nes file, the same file inside a .zip, a disc as an .iso, a .chd or an .rvz all give the same identity.
Try it with a cartridge ROM. Your file is read here, in your browser, and never leaves it: only its checksum is sent to the lookup. Unpack a .zip or .7z first; discs need the full rules below.
No file chosen.
The rules, in short
- Cartridges and digital files: the ROM as the hardware sees it. A dumping tool's header is removed (iNES and FDS 16 bytes, Lynx 64, Atari 7800 128, a 512-byte copier header on SNES, PC Engine and Master System files), Nintendo 64 ROMs are put in big-endian order, and Super Magic Drive files are de-interleaved. Everything else is hashed as it is.
- CD-based discs (PlayStation, Saturn, Sega CD, PC Engine CD, ...): one file per track, 2352 bytes per sector, as Redump has them. A CHD is unpacked to its tracks first. A disc of several tracks is identified by set1: the SHA-1 of its tracks' SHA-1s in order.
- DVD-based discs (PlayStation 2, PSP, GameCube, Wii, Xbox, ...): the whole 2048-byte image, as an
.iso, or decoded from RVZ, WIA, GCZ, CSO, ZSO or a CHD. - The disc fingerprint, fp1, reads 64 sectors of a disc's data from any container and answers in milliseconds. It finds candidates, and it also identifies copies the full rules cannot, such as a CD game kept as a 2048-byte
.iso.
The full rules, exact enough to implement in any language: the canonical form and the disc fingerprint. Look a hash up with the API.