Skip to content

Adding auto mapper to a game

sanni edited this page May 29, 2024 · 4 revisions

The automatic mapper configuration works by calculating two CRC32 checksums over 512 byte of data each found in the PRG ROM of the NES cartridge.
The first at offset 0x8000 and the second at 0xE000 as seen by the Cart Reader with no mapper selected. The Cart Reader calculates checksums of two areas because by default some games have the first bank and some games have the last bank mapped while the other is just random data. The OSCR then compares these checksums to the second number in the nes.txt database:

nes.txt

game.nes
91547086,4A776974,4E45555A020101080000000001000001

(So in this case 4A776974)

In the log you see the two calculated checksums(from 0x8000 and 0xE000) the Cart Reader searches for in nes.txt.

[+] NES/Famicom

Searching database
for 584E57A6 or 18843011...

CRC not found in database
Using manual selection

To add auto config to a game you first do several dump attempts and to see if at least one of the checksum always stays the same and then you just replace the second checksum in nes.txt with that checksum.

Once you have edited the nes.txt and tested it to confirm it works you can do a pull request or post your edited nes.txt in the Discussions section so that it can be updated for everyone.

Clone this wiki locally