Introduction
A .nes file is a copy of a Nintendo Entertainment System or Famicom game
cartridge, for playing in an emulator. It stores the cartridge’s program ROM and graphics
ROM behind a 16-byte header that tells the emulator how the cartridge was wired, above
all which mapper chip it used to switch banks of ROM in and out.
The header comes in two versions. Both start with the same four bytes and keep the first eight bytes compatible, so an older emulator can still load most files written in the newer version.
Variations
| Format | Variation | About | Open |
|---|---|---|---|
.NES | iNES ROM image | NES cartridge images for emulators: a 16-byte header and the ROMs. | Open |
.NES | NES 2.0 ROM image | The extended NES header: exact mapper, memory sizes and console timing. | Open |
iNES
The original header, named after the iNES emulator that introduced it in the 1990s. It gives the ROM sizes, the mirroring, a battery flag and an 8-bit mapper number, and leaves most of bytes 8 to 15 unused.
Bits 2 and 3 of byte 7 are 00. Bytes 12 to 15 should be zero. Some old
dumping tools wrote text from byte 7 onwards, which corrupts the upper half of the
mapper number, so emulators that find text there ignore byte 7. Every byte and bit
is on the iNES header page.
NES 2.0
An extension of the same header that describes a cartridge exactly: a 12-bit mapper number with a submapper, larger ROM sizes, the sizes of work RAM and battery-backed RAM, the console’s timing (NTSC, PAL or Dendy) and the expected controller.
Bits 2 and 3 of byte 7 are 10 in binary. The
NES 2.0 header page gives every field
and code; the expansion devices and
submappers pages list those
registers in full.
Not described
The header pages, the iNES and NES 2.0 mapper lists and the submappers are written. What remains:
Known, not yet covered
- Reference: the register layout of each mapper (which addresses switch which banks, mirroring, IRQ counters, expansion sound). All 533 mapper numbers that have a NESdev Wiki page were re-read from the wiki’s raw text on 2026-11-19 and their rows corrected (254 pages for 0 to 255, 279 for 256 and up; 55 of them are redirects whose target page was read as well). The register layouts of 254 mappers (every iNES number from 0 to 255 that has a wiki page, in the list on the iNES mappers page) are written, including the whole MMC5 (its own section); of these, stubs whose wiki page has no register detail (or only says that the number duplicates another mapper) are 20, 39, 51, 53, 54, 98, 102, 109, 110, 124, 127, 129, 130, 131, 160, 161, 169, 170, 175, 179, 181, 186, 204, 214, 216, 217, 220, 222, 223, 224, 238, 244, 248 and 251. All 279 NES 2.0 numbers above 255 that have a wiki page (256 to 682) are summarised in the NES 2.0 mappers page (stubs among them, labelled on their rows: 258, 259, 272, 273, 275 to 280, 284 and many above 304; 264, 301, 363, 390, 422, 536, 537 and 552 are redirects); several pages describe a board in words without register addresses, and the row then says so. The VTxx (OneBus) register set of mapper 256 is written out from the wiki’s VT02+ pages. Each row in the lists links the wiki page that holds the layout.
- Reference, console: the hardware chapters
CPU memory map, controllers and DMA,
PPU registers,
APU registers,
expansion audio (including the
Sunsoft 5B registers) and timing and regions
are written from the NESdev Wiki, together with the thirteen chapters of round 3:
PPU rendering sequence,
sprite evaluation,
scrolling internals,
palette colours,
nametable mirroring,
controllers and ports,
APU sweep, envelope and mixer,
CPU interrupts,
VRC7 patch set,
Famicom Disk System,
cartridge connectors,
CIC lockout and
bus conflicts and open bus, and
three pages and sections of round 4:
FDS BIOS,
PAL video and
PPU power-up state and errata, with
the Family BASIC Keyboard and data recorder, Famicom Network Controller, SNES mouse,
Konami Hyper Shot, Oeka Kids tablet, Miracle Piano, Turbo File and Barcode Battler
on the controllers page, the FDS cable,
expansion terminal and RP2C33 pinouts on the
Famicom Disk System page and the CIC chip pinout
on the CIC page. Round 5 added the
Famicom Network System page (the whole
146 KB wiki page: memory map, registers, CPU2, command protocol, status codes, pinouts),
the remaining input and I/O devices on the controllers page (SNES and Virtual Boy
controllers, Partytap, Doremikko Keyboard, Exciting Boxing, Jissen Mahjong controller,
Pachinko controller, Bandai Hyper Shot, the Arkanoid II prototype controller, four more
mice, the infrared joypads, 3D System, R.O.B., Battle Box, TV-NET devices, FAM-NET
keyboard, Family Computer Network Adapter, NTT Data Keypad, the Namco and Sunsoft
interfaces and the port test controller), the PPU glitches (on the PPU power-up page)
and the Programming the FDS guide (on the FDS page). Still not described: Power Glove,
U-Force, the RacerMate Bicycle and the Top Rider Bike, which are linked from the wiki’s
Input devices page but have no page there (the raw requests returned “not found” on
2026-11-19); the 10NES chip’s internal program, for which the wiki has no page (a search
of the wiki for “10NES” finds only its Glossary; the CIC pages that exist are written);
the full instruction listing of the R.O.B. firmware page (round 6 wrote what it says
about the parts, ports, RAM, start-up and command patterns, and the pin tables of the
infrared chips, and the twelve ROM tables of Network System command
$10), and the two example messages of the Network System page (listed in that page’s own list of what is left). - Viewer: the explorer opens
.nesfiles (iNES, NES 2.0 and archaic iNES): every header byte decoded, the trainer, the PRG ROM in banks, the CHR ROM as tiles, the three vectors, and the PRG disassembled with the 2A03 (undocumented opcodes marked). It is partial. Rounds 5 and 6 gave every one of the 533 mapper numbers that has a wiki page (all 254 iNES numbers and the 279 NES 2.0 numbers 256 to 682 with a page) the full set: a mirroring sentence, a bus-conflict sentence, a battery and WRAM sentence, an IRQ sentence, a PRG layout or the reason none is drawn, and CHR windows with the register that chooses each bank or the reason none is drawn. A sentence that begins “not described by the wiki” means the whole wiki page has nothing on that item (round 6 re-read each raw page in full for 331 to 682); a stub page says so. The PRG banking is drawn for 213 mappers in their usual mode (320 more say why it is not drawn: their wiki pages describe several modes or window sizes the viewer’s one-window model cannot show, or give no rule), the register table is held for 430 (round 8 added 48, round 9 another 75, round 10 another 191, round 12 another 30 and round 13 the two boards 143 and 165, each written from the whole raw wiki page: the Sachen 8259 boards 135, 138, 139 and 141, the GTROM board of mapper 111, the memory-only rows of 0, 55, 195, 198, 199, 252 and 253, 340, 401, 406, 410, 517, 523, 553 and 600, and the redirect pages 128, 155, 166, 182, 264, 301, 390, 536 and 537, which carry the table of the page they point to; 3, 185 and the other tables written before were re-read and extended); the other 103 numbers have none: the wiki page gives no register address (a stub, a duplicate or erroneous assignment, a one-game note, or a page that only says the board resembles an MMC3), apart from 99, whose only register ($4016) lies below the $4020 limit of the table (its viewer entry says it; round 13 re-read all 103 raw pages and found no other register on them); the numbers are listed by scripts/nes/list-tableless-mappers.mjs; for them the register-layout row is the only place the registers are listed; where a page draws two fields on the same bit the table says “as drawn” and does not choose), a CHR banking view (window sizes) exists for 328, of which 225 also say which register bits select the bank of each window (205 give the reason for none), and a one-sentence IRQ description exists for 533. Every mapper also gets a “Mapper behaviour” section: a link to its register-layout row, the header’s mirroring and battery bits and the sentences above. The viewer describes a mapper and never runs it, because a ROM file holds no register state. Not done: applying register values, running the IRQs, drawing the banking of most of the boards whose PRG or CHR banking has several modes (round 12 added one set of rows per extra mode, in “CHR banking” and “PRG banking modes”, for mappers 1, 4, 5, 6, 8, 17, 21 to 26, 35, 49, 90, 115, 155, 163, 164, 176, 209, 211, 256 and 323; the others give the reason instead), the audio registers of the expansion chips beyond the “Expansion audio” row that links to the chapter (rows for 5, 19, 20, 24, 26, 69 and 85), the unreliable and unsaved cases listed above, and the contents of the PlayChoice and other extra ROMs; no check against real hardware was made. - Reference: the nine gaps found by the independent mapper-data sample (re-check N6a) were all corrected in round 12 from the full raw pages (357 and 291 and 225 now say what their pages say, VRC6 has its whole register table with the three CHR modes and the sound registers, 544 and 195 name the CHR-RAM values, 208 describes submapper 1, 49 its 32 KiB mode and blocks, 34 the default by CHR size and 85 bit 6 of $E000); what was listed as missing was: (1) NES 2.0 mapper 357: the PRG note lists $6000 among the fixed banks, but the page says the $6000-$7FFF bank is switchable (to #2 or #0); (2) NES 2.0 mapper 291: the IRQ sentence says “scanline IRQs as the MMC3”, which the page does not say; (3) iNES mapper 225: the register row calls address bit 14 “bit 6” of the bank numbers, the page says bit 7; (4) mapper 24: the CHR windows are drawn for banking style 0 only, and the sound registers ($900x, $A00x, $B000-$B002) have no row in the register table; (5) mapper 544: the CHR-RAM bank selection values ($80, $82, $88, $8A, $C0, $C2, $C8, $CA) are not in the register table; (6) mapper 208: submapper 1 (PRG bank from MMC3 register 6 shifted right by 2) is not named or described; (7) mapper 49: the 32 KiB PRG mode (the power-up state) and the 128 KiB blocks are not described in the PRG and CHR rows; (8) mapper 34: the default choice between NINA-001 and BNROM by CHR-ROM size is not stated; (9) mapper 85: bit 6 of $E000 (silence expansion sound) is not in the register row.
Unknown
- Reference: the mapper numbers that have no NESdev Wiki page (239 and 247 in the iNES range, and most numbers above 463): nothing public says what they are.