The two processors of the DS do not see the same memory. The ARM9 and the ARM7 share the main RAM and, in part, the shared WRAM; each has its own I/O registers and its own other memories. The explorer labels the starts of these ranges and the registers below in the disassembly of each program. Facts on this page are from GBATEK (“DS Memory Maps” and “DS I/O Maps”).
ARM9
| Range | Name | What is there |
|---|---|---|
0x00000000–0x00007FFF | Instruction TCM | 32 KiB, fixed; mirrorable to $01000000 |
0x02000000–0x023FFFFF | Main RAM | 4 MiB, shared with the ARM7 |
0x027C0000–0x027C3FFF | Data TCM | 16 KiB, movable; the default base is $027C0000 |
0x03000000–0x03007FFF | Shared WRAM | 0, 16 or 32 KiB, allocated to the ARM9 by WRAMCNT |
0x04000000–0x04FFFFFF | ARM9 I/O ports | Display, DMA, timers, keypad, IPC, gamecard, interrupts, maths, power, 3D |
0x05000000–0x050007FF | Standard palettes | 2 KiB: engine A and B, background and object |
0x06000000–0x0607FFFF | VRAM, engine A background | up to 512 KiB |
0x06200000–0x0621FFFF | VRAM, engine B background | up to 128 KiB |
0x06400000–0x0643FFFF | VRAM, engine A objects | up to 256 KiB |
0x06600000–0x0661FFFF | VRAM, engine B objects | up to 128 KiB |
0x06800000–0x068A3FFF | VRAM, LCDC-allocated | up to 656 KiB |
0x07000000–0x070007FF | OAM | 2 KiB: engines A and B |
0x08000000–0x09FFFFFF | GBA slot ROM | up to 32 MiB |
0x0A000000–0x0A00FFFF | GBA slot RAM | up to 64 KiB |
0xFFFF0000–0xFFFF7FFF | ARM9 BIOS | 32 KiB, about 3 KiB used |
ARM7
| Range | Name | What is there |
|---|---|---|
0x00000000–0x00003FFF | ARM7 BIOS | 16 KiB |
0x02000000–0x023FFFFF | Main RAM | 4 MiB, shared with the ARM9 |
0x03000000–0x03007FFF | Shared WRAM | 0, 16 or 32 KiB, allocated to the ARM7 by WRAMCNT |
0x03800000–0x0380FFFF | ARM7 WRAM | 64 KiB; shared WRAM is also mirrored at $037F8000 on both CPUs |
0x04000000–0x04FFFFFF | ARM7 I/O ports | Timers, DMA, keypad, IPC, gamecard, SPI, sound, interrupts |
0x04800000–0x04807FFF | Wireless, wait state 0 | 32 KiB; 8 KiB RAM at $04804000 |
0x04808000–0x0480FFFF | Wireless, wait state 1 | I/O at $04808000 |
0x06000000–0x0603FFFF | VRAM allocated as work RAM | up to 256 KiB |
0x08000000–0x09FFFFFF | GBA slot ROM | up to 32 MiB |
0x0A000000–0x0A00FFFF | GBA slot RAM | up to 64 KiB |
The address ranges are those the viewer draws; GBATEK gives the start and the size of each.
Main I/O registers
The viewer names many more registers than these (every register of both lists of GBATEK’s I/O maps that it prints, and the engine A and B background, DMA, timer and keypad registers, which have the names and layout of the Game Boy Advance’s registers). These are the ones a DS program uses to start up and to talk between the two processors.
| Address | Name | Processor | Meaning |
|---|---|---|---|
0x04000000 | DISPCNT | ARM9 | LCD control, engine A |
0x04000004 | DISPSTAT | both | General LCD status |
0x04000006 | VCOUNT | both | Vertical counter |
0x04000130 | KEYINPUT | both | Key status (0 = pressed) |
0x04000180 | IPCSYNC | both | IPC synchronize |
0x04000184 | IPCFIFOCNT | both | IPC FIFO control |
0x04000188 | IPCFIFOSEND | both | IPC send FIFO (write) |
0x040001A0 | AUXSPICNT | both | Gamecard ROM and SPI control |
0x040001A2 | AUXSPIDATA | both | Gamecard SPI data |
0x040001A4 | ROMCTRL | both | Gamecard bus timing and control |
0x040001A8 | CARD_COMMAND | both | Gamecard 8-byte command out |
0x040001C0 | SPICNT | ARM7 | SPI bus control (firmware, touchscreen, power management) |
0x040001C2 | SPIDATA | ARM7 | SPI bus data |
0x04000204 | EXMEMCNT | ARM9 | External memory control |
0x04000204 | EXMEMSTAT | ARM7 | External memory status |
0x04000208 | IME | both | Interrupt master enable |
0x04000210 | IE | both | Interrupt enable |
0x04000214 | IF | both | Interrupt request flags |
0x04000240 | VRAMCNT_A | ARM9 | VRAM bank A control |
0x04000247 | WRAMCNT | ARM9 | WRAM bank control |
0x04000280 | DIVCNT | ARM9 | Division control |
0x040002B0 | SQRTCNT | ARM9 | Square root control |
0x04000300 | POSTFLG | both | Post boot flag |
0x04000301 | HALTCNT | ARM7 | Power-down control |
0x04000304 | POWCNT1 | ARM9 | Graphics power control |
0x04000304 | POWCNT2 | ARM7 | Sound and Wi-Fi power control |
0x04000500 | SOUNDCNT | ARM7 | Sound control |
0x04001000 | DISPCNT_B | ARM9 | LCD control, engine B |
0x04100000 | IPCFIFORECV | both | IPC receive FIFO (read) |
0x04100010 | CARD_DATA | both | Gamecard 4-byte data in |
The sizes are in the viewer’s table. The register names ending in “_B” are the engine B copies: that suffix is the viewer’s own, GBATEK lists
engine B’s registers at 0x04001000 and up without one.