"Mapper" is iNES's term for a set of NES cartridge boards that behave in a similar fashion. The NES's 6502-compatible 2A03 CPU has only 16 address lines and 8 data lines, and addresses $0000-$4017 are mapped to NES internal hardware. The NES PPU has 14 address lines and 8 data lines to the cart edge. Mapper hardware is present in most cartridges to provide more address lines under software control so as to allow more than 32 KB of ROM to be accessed. Similar concepts are present in the sideways ROM mods for BBC microcomputers.

How a mapper works

I'll use UNROM as the example. Other mappers are more complex but operate on similar principles.
2A03 address bus     A15432 1098 7654 3210
                       |||| |||| |||| ||||
 ,---------------------'||| |||| |||| ||||
 | D3-D0-.      ,-------'|| |||| |||| ||||
 |       |    . |        || |||| |||| ||||
 | ,-----+--. |`+.       || |||| |||| ||||
 | |Register+-+0  `.     || |||| |||| ||||
 | `--------' |    |___  || |||| |||| ||||
 |       |    |    | ||| || |||| |||| ||||
 | R/W --'  7-+1  ,' ||| || |||| |||| ||||
 |            | ,'   ||| || |||| |||| ||||
 |            |'     ||| || |||| |||| ||||
 |                   ||| || |||| |||| ||||
,+-------------------+++-++-++++-++++-++++-.
|EN                A1654 32 1098 7654 3210 |
|         128 kilo by 8 bit ROM       D7-D0+-- to 2A03 data bus
|                                          |
`------------------------------------------'
Writes to the program area $8000-$FFFF will load a new value into the register and subsequently to the most significant bits of the ROM's address bus, mapping a 16 KB bank into $8000-$BFFF. The multiplex with 7 is actually implemented as an OR gate and serves to make sure that the game engine is always available in $C000-$FFFF and that reset and interrupt vectors are always available in $FFFA-$FFFF.

iNES mapper metanode

Mapper 0 refers to a 16 KB or 32 KB program ROM and an 8 KB graphics ROM connected directly to the cartridge edge. This scheme is used on NROM games.
  1. MMC1 (Dr. Mario, Legend of Zelda, Metroid)
  2. UNROM (Contra, Castlevania, Ikari)
  3. CNROM (Gradius, Solar Wars, Panesian titles)
  4. MMC3 (Super Mario Brothers 3, Mega Man 3, Crystalis)
  5. (MMC5) (Castlevania 3, Uncharted Waters, some Koei titles)
  6. (FFE F4K) (Front Far East copier; similar to Konami VRCs)
  7. AOROM (Rare titles such as Battletoads)
  8. (FFE F3K) (more Front Far East copier games)
  9. MMC2 (Punch-Out!! with and without Mike Tyson)
  10. MMC4 (enhanced MMC2 in Family War and Fire Emblem)
  11. (Color Dreams mapper) (Crystal Mines/Exodus (the boulderdash clone not the ultima game), Pesterminator, King of Kings, Menace Beach/Sunday Funday)
  12. 12 is unknown.
  13. 13 is unknown.
  14. 14 is unknown.
  15. (100-in-1 Contra Function 16)
  16. (Bandai mapper) (Gundam Wing, Dragonball Z)
  17. (FFE F8K) (more Front Far East games)
  18. (Jaleco SS8806) (Japanese Jaleco titles such as Baseball 3)
  19. (Namcot 106) (Japanese Namcot titles such as Splatterhouse and Family Stadium '90)
  20. 20 is unknown.
  21. (Konami VRC4) (Wai Wai World 2, Gradius 2)
  22. (Konami VRC2 type A) (Twinbee 3)
  23. (Konami VRC2 type B) (Japanese Contra, Getsufuu Maden)
  24. (Konami VRC6) (Japanese Castlevania 3)
  25. ???
  26. ???
  27. ???
  28. ???
  29. ???
  30. ???
  31. ???
  32. (Irem G-101) (ImageFight 2)
  33. (Taito TC0190) (Japanese Taito titles such as Pon Poko Pon)
  34. (Nina-1) boards (Deadly Towers, Impossible Mission II)
  35. nothing
  36. nothing
  37. nothing
  38. (Tengen RAMBO-1) (similar to MMC3; used on Klax and Shinobi)
  39. (Irem H-3001) (Japanese Irem titles such as Daiku no Gensan 2)
  40. (GNROM) (Gumshoe, Dragon Power, original Dragonball)
  41. (Sunsoft Mapper 4) (Afterburner II)
  42. (Sunsoft FME-7) (Batman: Return of the Joker, several Japanese titles)
  43. Codemasters mapper (nearly identical to UNROM)
  44. Irem 74HC161/32 (similar to FFE F3K)
  45. (HK-SF3) (pirate Street Fighter III)

Most popular cartridges in the US use MMC1, UNROM, or MMC3; emulating these accurately will run most games.

Source: Firebug's mapper document version 0.80

(return to) NES programming metanode