Memory Mapping
This page describes the SNES virtual memory space.
Buses
A bus is a shared pathway that circuits inside and outside a computer use to exchange data. The SNES has one 8-bit-wide data bus and two address buses. The address buses are called address bus A and address bus B.
- Data bus
8 bits wide, used to exchange data. If you read while no value has been written onto the data bus, the value last written to the bus is returned instead. This is called open bus.
| Line | Cartridge | Expansion |
|---|---|---|
| D0 | 19 | 11 |
| D1 | 20 | 12 |
| D2 | 21 | 13 |
| D3 | 22 | 14 |
| D4 | 50 | 15 |
| D5 | 51 | 16 |
| D6 | 52 | 17 |
| D7 | 53 | 18 |
- Address bus A
24 bits wide, used together with the read/write lines (/RD and /WR) and two auxiliary lines. This bus is connected to both the cartridge and WRAM.
| Line | Cartridge | Line | Cartridge |
|---|---|---|---|
| A0 | 17 | A14 | 39 |
| A1 | 16 | A15 | 40 |
| A2 | 15 | A16 | 41 |
| A3 | 14 | A17 | 42 |
| A4 | 13 | A18 | 43 |
| A5 | 12 | A19 | 44 |
| A6 | 11 | A20 | 45 |
| A7 | 10 | A21 | 46 |
| A8 | 9 | A22 | 47 |
| A9 | 8 | A23 | 48 |
| A10 | 7 | /RD | 23 |
| A11 | 6 | /WR | 54 |
| A12 | 37 | /CART | 49 |
| A13 | 38 | /WRAM | 32 |
- Address bus B
8 bits wide, used together with the read/write lines (/PARD and /PAWR).
This bus is connected not only to the cartridge and the expansion port, but also to WRAM, PPU1, PPU2 and the APU. Communication with the PPU and APU goes through this bus.
| Line | Cartridge | Expansion |
|---|---|---|
| PA0 | 28 | 1 |
| PA1 | 59 | 2 |
| PA2 | 29 | 3 |
| PA3 | 60 | 4 |
| PA4 | 30 | 5 |
| PA5 | 61 | 6 |
| PA6 | 3 | 7 |
| PA7 | 34 | 8 |
| /PARD | 4 | 10 |
| /PAWR | 35 | 9 |
Memory map
Different kinds of cartridges, such as LoROM and HiROM, are mapped onto address bus A. The cartridge responds only while the /CART signal is active; it can respond to signals on both address bus A and B, but one of them is ignored. Likewise, when a device is connected to the expansion port, it responds to unmapped registers on address bus B.
WRAM is mapped onto address bus A while the /WRAM signal is active, and is also mapped onto address bus B through registers $2180 - $2183.
The APU is mapped at $40 - $7F on address bus B ($2140 - $217F from the CPU), and PPU1 and PPU2 are mapped at $00 - $3F on address bus B ($2100 - $213F from the CPU).
Putting all of this together gives the following memory map. The “Speed” column in this table indicates the memory access speed for that region.
The master clock frequency is 21.47727MHz on NTSC and 21.28137MHz on PAL, and an internal CPU operation cycle always takes 6 master cycles.
A Fast memory access takes 6 master cycles (3.58MHz/ 3.55MHz), a Slow memory access 8 master cycles (2.68MHz/ 2.66MHz), and an XSlow memory access 12 master cycles (1.79MHz/ 1.77MHz).
| Bank | Address | Speed | Mapping |
|---|---|---|---|
| $00 - $3F | $0000 - $1FFF | Slow | Address bus A + /WRAM (mirror bank: $7E) |
| $2000 - $20FF | Fast | Address bus A | |
| $2100 - $21FF | Fast | Address bus B | |
| $2200 - $3FFF | Fast | Address bus A | |
| $4000 - $41FF | XSlow | Internal CPU registers[*1] | |
| $4200 - $43FF | Fast | Internal CPU registers[*1] | |
| $4400 - $5FFF | Fast | Address bus A | |
| $6000 - $7FFF | Slow | Address bus A | |
| $8000 - $FFFF | Slow | Address bus A + /CART | |
| $40 - $7D | $0000 - $FFFF | Slow | Address bus A + /CART |
| $7E - $7F | $0000 - $FFFF | Slow | Address bus A + /WRAM |
| $80 - $BF | $0000 - $1FFF | Slow | Address bus A + /WRAM (mirror bank: $7E) |
| $2000 - $20FF | Fast | Address bus A | |
| $2100 - $21FF | Fast | Address bus B | |
| $2200 - $3FFF | Fast | Address bus A | |
| $4000 - $41FF | XSlow | Internal CPU registers[*1] | |
| $4200 - $43FF | Fast | Internal CPU registers[*1] | |
| $4400 - $5FFF | Fast | Address bus A | |
| $6000 - $7FFF | Slow | Address bus A | |
| $8000 - $FFFF | Slow/ Fast[*2] | Address bus A + /CART | |
| $C0 - $FF | $0000 - $FFFF | Slow/ Fast[*2] | Address bus A + /CART |
Notes
[1] The addresses for the internal CPU registers lie outside address bus A, and the CPU ignores the data bus.
[2] Fast when bit 0 of CPU register $420D is set, Slow when it is clear.
LoROM memory map
In the LoROM model, the bus pins A15 and A23 are not connected to the ROM, and bus pins A16-A22 are connected to ROM pins A15-A21.
The A15 pin, which is not connected to the ROM, is usually combined with the /CART and /WR pins: when A15 is High the ROM is selected, and when A15 is Low the SRAM is selected.
Therefore, in the LoROM model, ROM is in principle not mapped into the lower half of each bus bank. In exchange, a large SRAM can be fitted.
As the maximum of 22 address pins implies, the ROM capacity is at most 4MB.
The standard LoROM memory mapping is as follows.
| Bank | Address | Mapping | Mirror bank |
|---|---|---|---|
| $00 - $3F | $0000 - $1FFF | Low RAM | $7E |
| $2000 - $2FFF | I/O ports (PPU1, APU) | $80 - $BF | |
| $3000 - $3FFF | I/O ports (SFX, DSP, etc.) | $80 - $BF | |
| $4000 - $41FF | I/O ports (PAD) | $80 - $BF | |
| $4200 - $5FFF | I/O ports (PPU2, DMA, etc.) | $80 - $BF | |
| $6000 - $7FFF | (reserved) | $80 - $BF | |
| $8000 - $FFFF | Mode 20 ROM | $80 - $BF | |
| $40 - $6F | $0000 - $7FFF | Mode 20 ROM Unassigned with the MAD-1 chip | $C0 - $EF |
| $8000 - $FFFF | Mode 20 ROM | $C0 - $EF | |
| $70 - $7D | $0000 - $7FFF | Mode 20 SRAM (448KB) | $F0 - $FD |
| $8000 - $FFFF | Mode 20 ROM | $F0 - $FD | |
| $7E | $0000 - $FFFF | Expanded RAM | $00 - $3F |
| $7F | $0000 - $FFFF | Expanded RAM | |
| $80 - $BF | $0000 - $FFFF | Mirror of banks $00 - $3F | $00 - $3F |
| $C0 - $EF | $0000 - $FFFF | Mirror of banks $40 - $6F | $40 - $6F |
| $F0 - $FD | $0000 - $FFFF | Mirror of banks $70 - $7D | $70 - $7D |
| $FE - $FF | $0000 - $7FFF | Mode 20 SRAM (64KB) | |
| $8000 - $FFFF | Mode 20 ROM |
HiROM memory map
In the HiROM model, bus pins A0 through A21 are connected to the ROM in the same order, so 64KB banks can be accessed linearly.
The A22 and A23 pins are not connected to the ROM.
As the maximum of 22 address pins implies, the ROM capacity is at most 4MB.
The standard HiROM memory mapping is as follows.
| Bank | Address | Mapping | Mirror bank |
|---|---|---|---|
| $00 - $2F | $0000 - $1FFF | Low RAM | $7E |
| $2000 - $20FF | Unassigned | $80 - $AF | |
| $2100 - $21FF | I/O ports (PPU1, APU) | $80 - $AF | |
| $2200 - $2FFF | Unassigned | $80 - $AF | |
| $3000 - $3FFF | I/O ports (SFX, DSP, etc.) | $80 - $AF | |
| $4000 - $40FF | I/O ports (PAD) | $80 - $AF | |
| $4100 - $41FF | Unassigned | $80 - $AF | |
| $4200 - $44FF | I/O ports (PPU2, DMA, etc.) | $80 - $AF | |
| $4500 - $5FFF | Unassigned | $80 - $AF | |
| $6000 - $7FFF | (reserved) | $80 - $AF | |
| $8000 - $FFFF | Mode 21 ROM (from $C0 - $EF) | $80 - $AF | |
| $30 - $3F | $0000 - $1FFF | Low RAM | $7E |
| $2000 - $20FF | Unassigned | $B0 - $BF | |
| $2100 - $21FF | I/O ports (PPU1, APU) | $B0 - $BF | |
| $2200 - $2FFF | Unassigned | $B0 - $BF | |
| $3000 - $3FFF | I/O ports (SFX, DSP, etc.) | $B0 - $BF | |
| $4000 - $40FF | I/O ports (PAD) | $B0 - $BF | |
| $4100 - $41FF | Unassigned | $B0 - $BF | |
| $4200 - $44FF | I/O ports (PPU2, DMA, etc.) | $B0 - $BF | |
| $4500 - $5FFF | Unassigned | $B0 - $BF | |
| $6000 - $7FFF | Mode 21 SRAM (128KB) | $B0 - $BF | |
| $8000 - $FFFF | Mode 21 ROM (from $F0 - $FF) | $B0 - $BF | |
| $40 - $7D | $0000 - $FFFF | Mode 21 ROM | $C0 - $FD |
| $7E | $0000 - $1FFF | Low RAM | $00 - $3F |
| $2000 - $7FFF | High RAM | ||
| $8000 - $FFFF | Expanded RAM | ||
| $7F | $0000 - $FFFF | Expanded RAM | |
| $80 - $BF | $0000 - $FFFF | Mirror of banks $00 - $3F | $00 - $3F |
| $C0 - $FF | $0000 - $FFFF | Mode 21 ROM |
ExHiROM memory map
The ExHiROM model can carry an additional ROM chip of up to 4MB on top of a 4MB ROM chip.
Bus pin A22 is still not connected to the ROM, but pin A23 is used to select which of the two ROM chips on the cartridge board is active.
When A23 is High, ROM1 is selected, and when it is Low, ROM2 is selected. ROM1 can be FastROM, but ROM2 is limited to SlowROM.
However, because of the memory map, the cartridge header is placed in ROM2, and the lower 32KB of each of the last two banks of ROM2 (physical addresses $7E:0000 - 7FFF and $7F:0000 - 7FFF) cannot be accessed.
The upper 32KB of each of the last two banks of ROM2 (physical addresses $7E:8000 - FFFF and $7F:8000 - FFFF) are mapped to bus banks $3E and $3F.
The standard ExHiROM memory mapping is as follows.
| Bank | Address | Mapping | Mirror bank |
|---|---|---|---|
| $00 - $2F | $0000 - $1FFF | Low RAM | $7E |
| $2000 - $20FF | Unassigned | $80 - $AF | |
| $2100 - $21FF | I/O ports (PPU1, APU) | $80 - $AF | |
| $2200 - $2FFF | Unassigned | $80 - $AF | |
| $3000 - $3FFF | I/O ports (SFX, DSP, etc.) | $80 - $AF | |
| $4000 - $40FF | I/O ports (PAD) | $80 - $AF | |
| $4100 - $41FF | Unassigned | $80 - $AF | |
| $4200 - $44FF | I/O ports (PPU2, DMA, etc.) | $80 - $AF | |
| $4500 - $5FFF | Unassigned | $80 - $AF | |
| $6000 - $7FFF | (reserved) | $80 - $AF | |
| $8000 - $FFFF | Mode 25 ROM2 | $40 - $6F | |
| $30 - $3F | $0000 - $1FFF | Low RAM | $7E |
| $2000 - $20FF | Unassigned | $B0 - $BF | |
| $2100 - $21FF | I/O ports (PPU1, APU) | $B0 - $BF | |
| $2200 - $2FFF | Unassigned | $B0 - $BF | |
| $3000 - $3FFF | I/O ports (SFX, DSP, etc.) | $B0 - $BF | |
| $4000 - $40FF | I/O ports (PAD) | $B0 - $BF | |
| $4100 - $41FF | Unassigned | $B0 - $BF | |
| $4200 - $44FF | I/O ports (PPU2, DMA, etc.) | $B0 - $BF | |
| $4500 - $5FFF | Unassigned | $B0 - $BF | |
| $6000 - $7FFF | Mode 25 SRAM (128KB) | $B0 - $BF | |
| $8000 - $FFFF | Mode 25 ROM2 | $70 - $7D | |
| $40 - $7D | $0000 - $FFFF | Mode 25 ROM2 | |
| $7E | $0000 - $1FFF | Low RAM | $00 - $3F |
| $2000 - $7FFF | High RAM | ||
| $8000 - $FFFF | Expanded RAM | ||
| $7F | $0000 - $FFFF | Expanded RAM | |
| $80 - $BF | $0000 - $7FFF | Mirror of banks $00 - $3F | $00 - $3F |
| $8000 - $FFFF | Mode 25 ROM1 | $C0 - $FF | |
| $C0 - $FF | $0000 - $FFFF | Mode 25 ROM1 |
ExLoROM memory map
The ExLoROM model is a non-standard mapping. Like ExHiROM, it can carry an additional ROM chip of up to 4MB on top of a 4MB ROM chip.
Bus pin A15 is still not connected to the ROM, but pin A23 is used to select which of the two ROM chips on the cartridge board is active.
When A23 is High, ROM1 is selected, and when it is Low, ROM2 is selected. ROM1 can be FastROM, but ROM2 is limited to SlowROM.
However, because of the memory map, the cartridge header is placed in ROM2, and the last bank of ROM2 (physical addresses $7F:0000 - FFFF) cannot be accessed.
The standard ExLoROM memory mapping is as follows.
| Bank | Address | Mapping | Mirror bank |
|---|---|---|---|
| $00 - $3F | $0000 - $1FFF | Low RAM | $7E |
| $2000 - $2FFF | I/O ports (PPU1, APU) | $80 - $BF | |
| $3000 - $3FFF | I/O ports (SFX, DSP, etc.) | $80 - $BF | |
| $4000 - $41FF | I/O ports (PAD) | $80 - $BF | |
| $4200 - $5FFF | I/O ports (PPU2, DMA, etc.) | $80 - $BF | |
| $6000 - $7FFF | (reserved) | $80 - $BF | |
| $8000 - $FFFF | Mode 26 ROM2 | ||
| $40 - $6F | $0000 - $7FFF | Mode 26 ROM2? | |
| $8000 - $FFFF | Mode 26 ROM2 | ||
| $70 - $7D | $0000 - $7FFF | Mode 26 SRAM (448KB) | $F0 - $FD |
| $8000 - $FFFF | Mode 26 ROM2 | ||
| $7E | $0000 - $FFFF | Expanded RAM | $00 - $3F |
| $7F | $0000 - $FFFF | Expanded RAM | |
| $80 - $BF | $0000 - $7FFF | Mirror of banks $00 - $3F | $00 - $3F |
| $8000 - $FFFF | Mode 26 ROM1 | ||
| $C0 - $EF | $0000 - $FFFF | Mode 26 ROM1? | |
| $8000 - $FFFF | Mode 26 ROM1 | ||
| $F0 - $FF | $0000 - $7FFF | Mode 26 SRAM (512KB) | |
| $F0 - $FF | $8000 - $FFFF | Mode 26 ROM1 |