Complete memory layout reference for SNES development.
The 65816 CPU has a 24-bit address bus, allowing access to 16 MB of memory. The address format is $BB:AAAA where BB is the bank (0-255) and AAAA is the offset within that bank (0-65535).
128 KB of general-purpose RAM.
| Range | Size | Common Use |
|---|---|---|
| $7E:0000-$7E:00FF | 256 B | Direct Page (fast access) |
| $7E:0100-$7E:1FFF | 7.75 KB | Variables, BSS, and the stack |
| $7E:2000-$7E:FFFF | 56 KB | General use |
| $7F:0000-$7F:FFFF | 64 KB | General use / buffers |
In OpenSNES the stack starts at $1FFF and grows down, under the C globals of the $0000-$1FFF band; FAR objects live above $2000 (docs/tutorials/far_ram.md).
The PPU's three memories are not in the CPU's address space: they are reached through ports ($2116-$2119 for VRAM, $2102-$2104 for OAM, $2121-$2122 for CGRAM). Their sizes, layout and formats are in The PPU; OAM byte by byte is in SNES OAM (Object Attribute Memory).
The registers mapped at $2100-$21FF, $4200-$44FF and $4300-$437F are indexed, then detailed, in SNES Hardware Register Reference.
The linker places both; the build stops if the plain band overflows. See Far RAM.
The SA-1 adds a second 65816 CPU and extra RAM to the cartridge.
I-RAM ($3000-$37FF) is the primary communication channel between the SNES main CPU and the SA-1. Both processors can read and write it, gated by the SIWP ($2229) and CIWP ($222A) write-protection registers.
BW-RAM is battery-backed SRAM mapped in banks $40-$4F, with an 8 KB window visible at $6000-$7FFF for convenient access from bank $00 code.
The Super FX (GSU) has its own register space and uses cartridge SRAM as a shared framebuffer.
GSU registers ($3000-$303F) control the Super FX processor. The SNES CPU writes parameters and starts the GSU by writing to R15 ($301E-$301F).
Code cache ($3100-$32FF) holds the currently cached GSU instructions. The SNES CPU can also write opcodes there, in 16-byte lines, to load code into the cache itself (fullsnes, "Writing to Code-Cache (by SNES CPU)").
Cartridge SRAM ($70-$71) serves as the GSU framebuffer. The Super FX PLOT instruction writes pixels here, and the SNES reads it back for display. Bus ownership is controlled by the SCMR register ($303A) — the SNES and GSU cannot access SRAM simultaneously.