The headers are the first 16 bytes in any and all nes roms found on the internet and are actually not on any nes carts you would buy in the store. These were put here so emulators and hackers would have more information on the ROM they are looking at.
Below explains what each byte of the header tells us about the ROM.
Bytes | Description | Visual |
Byte 0 - Byte 3 | These bytes are constant throughout all ROMs. This help signifies that this is an NES ROM. | 4E 45 53 1A |
Byte 4 | This byte tells us how many sets of 16k PRGs there are in the ROM. | XX |
Byte 5 | This byte tells us how many sets of 8k CHRs there are in the ROM. | XX |
Byte 6 | This is known as the 1st control byte. This byte tells many different things about the ROM and to get them, you have to look at its bits.
The Upper 4 bits (the bits to the far left), contain the lower 4 bits to the mapper number of this game (The other 4 bits for the mapper are in the 2nd control byte). | MMMMVTSM |
Byte 7 | This is known as the 2nd control byte. This byte tells us the Lower bits for the mapper. Bit 0 designates a ROM as being VS Unisystem. Bit 1 designates it as PlayChoice-10. The rest of the bits should be set 0. | MMMM00PU |
Byte 8 - Byte 9 | These bytes are just set to 0. | 00 00 |
Byte 11 - Byte 15 | These bytes are just set to 0. | 00 00 00 00 00 |