A memory mapper is cartridge hardware or logic that controls which portions of cartridge memory the NES can access. It extends the console beyond its immediately available ROM space by swapping memory banks in and out of the addressable range. section 16.2.1
The NES can access only 64K of memory at once. A mapper selects different PRG ROM and CHR ROM sections when the program writes values to designated memory locations, allowing larger games and graphics sets. section 16.2.1
Depending on its design, a mapper can provide:
- More space for program code and tile or sprite patterns. section 16.2.1
- Additional sound capabilities and storage for saved progress through battery or EEPROM memory. section 16.5
- Extra name-table RAM, extended attributes, or scanline interrupts for advanced graphics effects. section 16.2.4
Default mapper and read-only data
With the default mapper, two 16K ROM sections form one 32K accessible code area. Fixed values such as a palette and welcome text can be placed in the RODATA segment with .byte directives, while other mappers require additional sections to be swapped in and out. section 5.8
Figure 16.2 Example of expanded NES cartridge memory layout
Inspect the expanded cartridge layout to compare the standard NES memory arrangement with mapper-controlled additional sections. section 16.2.1
