Appendix C. Memory and IO map

The NES architecture is based on the 8-bit 6502 CPU, which can access 64K of memory at any one time. The 6502 processor does not have specific instructions to access external ports but instead uses dedicated memory locations to read and write to external devices. This appendix will show the memory map in more detail and list all the memory-mapped ports built into the original hardware.

C.1 Memory map

The NES’s 64K memory space is split into multiple sections. The lower 4K of memory contains all of the dedicated sections for the CPU, and the next section, the PPU memory-mapped registers. The upper 48K of space is split up into areas that are provided by the game cartridge (see figure C.1).

Figure C.1 NES/Famicom ...

Get Classic Game Programming on the NES now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.