3 ms·
SNES ROMs have a checksum right in the header, but there were still bad dumps circulating for years. Presumably they escaped before the header was properly reve
by TillE 3y ago
SNES ROMs have a checksum right in the header, but there were still bad dumps circulating for years. Presumably they escaped before the header was properly reverse engineered.
I'm not exactly sure why that checksum exists, the console doesn't check it, and in manufacturing you could just read and compare. But it's certainly convenient for verifying a good dump.
- mattl 3y agoMaybe for the Nintendo Power kiosks? https://en.wikipedia.org/wiki/Nintendo_Power_(cartridge) https://en.wikipedia.org/wiki/Nintendo_Power_(cartridge)
- 0xcde4c3db 3y agoMost systems/formats/protocols were not robust against data corruption ca. 1990, so it might have been to detect corruption of the master copy in transit to the factory (whether that be via floppy, tape, EPROM, modem, etc.).
- nubinetwork 3y agoIt's pretty hard to calculate that checksum if you're writing homebrew, since the checksum is written to the rom file, which changes the checksum again...
- bdhcuidbebe 3y agoThat’s not how you do it, see https://snes.nesdev.org/wiki/ROM_header#Computing_the_Checksum https://snes.nesdev.org/wiki/ROM_header#Computing_the_Checks... specifically > Because the ROM header will be part of the computed checksum, before computing the checksum we should first fill the header's checksum and complement values with $0000 and $FFFF. Any value plus its complement will produce the same result, so this ensures the resulting checksum matches the ROM even after the computed checksum is replaced in the header.
- hakfoo 3y agoCould it be attacked as "the checksum is the value necessary to get the sum of the remaining bytes to (modulo) 00? I know that's how the option ROM checksums on PC BIOSes work.
- fennecbutt 3y agoSame w/ game boy cartridge header. Fwiw I think they were used for automated cartridge testing, since they all used varying memory bank controllers, so the hardware checking the ROM needs to know which MBC it's talking to.