Gaming
 

NES mapper

From ROM Hack City

(Redirected from NES mappers)

Most NES games have a special chip inside them called an MMC, or a mapper. This allows games to use more ROM space and may also provide extra functionality.

You may or may not have to deal with the mapper when ROM hacking. Some of the very oldest NES games, like Donkey Kong, do not use a mapper, for instance. Pretty much any game newer than Super Mario Bros. will. (Super Mario Bros. doesn't use a mapper, but the version with Duck Hunt does.) More specifically, any game larger than 40 kilobytes, such as Super Mario Bros. 2 or The Legend of Zelda, will use one. But if you are simply changing text or graphics, you probably will not have to bother with it.

The specific function of a mapper is to perform bank switching, which is to swap out one ROM bank and swap in another ROM bank to the same address space. A ROM bank might be either 8 kilobytes or 16 kilobytes. Suppose you can swap banks into the memory space $8000..$9FFF (a block of 8 kilobytes). You can think of this region from $8000..$9FFF as a "window" into a ROM bank. So, for instance, if you swap in bank 1, then $8000 will be the first byte of bank 1; if you swap in bank F, then $8000 will be the first byte of bank F.

The name "mapper" comes from emulation terminology and is short for "memory mapper", because the mapper "maps" from pure memory space into ROM space. For example, when a ROM bank that starts at $10000 is loaded into NES memory at $C000, then we might say that $C000 in memory is "mapped" to $10000 in ROM.