# Memory map All from STS "Memory Map" (DOC, tier 3) unless marked. The bus is **27 bits**: addresses 08000000h-FFFFFFFFh have their top five bits masked and mirror 00000000h-07FFFFFFh. The I/O instructions (IN/OUT) reach the same map as loads and stores (STS "Specifications"). | Range | What | Notes | | --- | --- | --- | | 00000000-00FFFFFF | VIP | 256 KiB of VIP memory and registers, mirrored every 512 KiB (00080000+); [vip.md](vip.md) | | 01000000-01FFFFFF | VSU | byte writes only; reads undefined; [vsu.md](vsu.md) | | 02000000-02FFFFFF | miscellaneous hardware | link (CCR, CCSR, CDTR, CDRR), pad (SDLR, SDHR, SCR), timer (TLR, THR, TCR), wait controller (WCR) at 02000000-02000028; mirrored every 64 bytes from 02000040; [system.md](system.md) | | 03000000-03FFFFFF | unmapped | writes ignored, **reads return zero** | | 04000000-04FFFFFF | game pak expansion | no commercial use | | 05000000-05FFFFFF | WRAM | 64 KiB, mirrored (bits 16-23 masked) | | 06000000-06FFFFFF | game pak RAM | battery SRAM on seven carts (MLIST); mirrored by its size | | 07000000-07FFFFFF | game pak ROM | mirrored by its size; the header at FFFFFDE0h and the vectors at FFFFFE00h-FFFFFFFFh are the end of the ROM | - **WRAM** is pseudo-static RAM: software must wait 200 µs and make 8 dummy reads before use, "or else its behavior is undefined" (STS "WRAM"). The board models WRAM as plain RAM (a model choice; what undefined access does is unknown: U1). - **The miscellaneous registers** "are intended to be accessed" with byte accesses (STS, text cut at the register table); what wider accesses do is U2. - **Bus widths and waits:** the CPU's bus is 16 bits (STS). The wait controller adds 1 or 2 waits to game pak ROM and expansion accesses (WCR, STS "Wait Controller"). Waits for WRAM, the VIP, the VSU, game pak RAM and the registers are **not documented** (U3); the VIP adds its own waits while it draws (U4). These are the board's `cycles` return in the bus contract. ## Interrupts (STS "Exception Handlers", ARCH ch. 6) | Level | Code | Source | | --- | --- | --- | | 0 | FE00 | game pad (key input) | | 1 | FE10 | timer zero | | 2 | FE20 | game pak (unused commercially) | | 3 | FE30 | link port | | 4 | FE40 | VIP (every VIP cause; INTPND says which) | The vectors are in the ROM (the last 512 bytes), so the board needs no interrupt controller: each source drives its level onto the NVC's INTV pins. How simultaneous sources are prioritised by the hardware (highest level wins?) is U5; ARCH says the CPU takes the level presented.