Nintendo header: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
m (boo)
(Updated header description with Bootgod's translation of original japanese doc)
Line 3: Line 3:
The info in them is frequently incomplete and/or inaccurate. When info on a particular filed is not present, a byte $00 or $ff is used for padding
The info in them is frequently incomplete and/or inaccurate. When info on a particular filed is not present, a byte $00 or $ff is used for padding


* '''$ffe0-$ffef''' : Name of the game, in ASCII, zero terminated (sometimes the name is abbreviated or replaced by Nintendo's code).
* '''$ffe0-$ffef''' : Name of the game, in ASCII, zero terminated (sometimes the name is abbreviated or replaced by Nintendo's code). ASCII codes 20h-5Ah allowed. Supposed to be right-justified.
* '''$fff0-$fff1''' : PRG checksum (either the last 16k bank, or the whole PRG-ROM). Clamped sum of all bytes, excluding the two checksum bytes.
* '''$fff0-$fff1''' : PRG checksum (either the last 16k bank, or the whole PRG-ROM). Clamped sum of all bytes, excluding the two checksum bytes.
* '''$fff2-$fff3''' : CHR checksum.
* '''$fff2-$fff3''' : CHR checksum. 0x00 if RAM
* '''$fff4''' : High nybble = prg size (0=64kb, 2=32kb, 3=128kb, 4=256kb 5=512kb).
* '''$fff4''' : Data sizes. Values: 0 = 8KB,1 = 16KB,2 = 32KB,3 = 128KB,4 = 256KB,5 = 512KB (No provisions for 64KB, 0 is usually used)
* '''$fff4''' Low nybble = chr size (0 or 8 = 8kb of RAM, 1=16kb, 2=32kb 3=128kb, 4=256kb).
**D7-D4: PRG size
* '''$fff5''' : Mirroring. ($04 = mapper controlled, $02 = hardwired to vertical, $81 or $82 = hardwired to horizontal.
**D3: 0 = CHR ROM, 1 = CHR RAM
**D2-D0: CHR size
* '''$fff5''' : Board Type.
**D7: 0 = H Scroll, 1 = V Scroll (invert to interpret as mirroring)
**D6-D0:  0 = NROM, 1 = CNROM, 2 = UNROM, 3 = GNROM, 4 = MMC (any)
* '''$fff6''' : Version ($01 by default, incrementing on revisions)
* '''$fff6''' : Version ($01 by default, incrementing on revisions)
* '''$fff7''' : Unknown.
* '''$fff7''' : Valid Title Length - 1. 0 if no title entered.
* '''$fff8''' : Maker's code, the same used for the FDS, GB, GBC and SNES headers. $01 = Nintendo, $08 = Capcom, etc.
* '''$fff8''' : Maker's code, the same used for the FDS, GB, GBC and SNES headers : 1 = Nintendo, 2-254 = everyone else. 255 must be reserved.
* '''$fff9''' : Unknown.
* '''$fff9''' : Header Validation Byte. 8-bit checksum of FFF2-FFF9h should = 0

Revision as of 12:22, 4 November 2013

About 33% of licensed Nintendo NES games have an header present at their last bank, at addresses $ffe0-$fff9, right before the interrupt vectors.

The info in them is frequently incomplete and/or inaccurate. When info on a particular filed is not present, a byte $00 or $ff is used for padding

  • $ffe0-$ffef : Name of the game, in ASCII, zero terminated (sometimes the name is abbreviated or replaced by Nintendo's code). ASCII codes 20h-5Ah allowed. Supposed to be right-justified.
  • $fff0-$fff1 : PRG checksum (either the last 16k bank, or the whole PRG-ROM). Clamped sum of all bytes, excluding the two checksum bytes.
  • $fff2-$fff3 : CHR checksum. 0x00 if RAM
  • $fff4 : Data sizes. Values: 0 = 8KB,1 = 16KB,2 = 32KB,3 = 128KB,4 = 256KB,5 = 512KB (No provisions for 64KB, 0 is usually used)
    • D7-D4: PRG size
    • D3: 0 = CHR ROM, 1 = CHR RAM
    • D2-D0: CHR size
  • $fff5 : Board Type.
    • D7: 0 = H Scroll, 1 = V Scroll (invert to interpret as mirroring)
    • D6-D0: 0 = NROM, 1 = CNROM, 2 = UNROM, 3 = GNROM, 4 = MMC (any)
  • $fff6 : Version ($01 by default, incrementing on revisions)
  • $fff7 : Valid Title Length - 1. 0 if no title entered.
  • $fff8 : Maker's code, the same used for the FDS, GB, GBC and SNES headers : 1 = Nintendo, 2-254 = everyone else. 255 must be reserved.
  • $fff9 : Header Validation Byte. 8-bit checksum of FFF2-FFF9h should = 0