# Memory maps Two maps: the **later boards** (Stargate onward) and **Defender's** ([defender.md](defender.md)). Evidence tags as in [start-here.md](start-here.md). "OBSERVED" here means the address was seen used by the game's own code in a MAME 0.285 run ([mame-oracle.md](mame-oracle.md)), which shows where the program reaches, not how the decoders work. ## Main CPU, later boards | Range | Read | Write | Evidence | | --- | --- | --- | --- | | 0000-8FFF | RAM, or ROM banks 0-8 when the bank bit is set | **always RAM** (screen memory 0000-97FF) | SR-MAP ("Writes always go to RAM"); SR-HW | | 9000-BFFF | RAM | RAM | SR-MAP, SR-HW | | C000-C00F | (no read: OBSERVED reads return MAME's unmapped FF) | colour RAM, 16 x 8 bits | SR-LINES (two 7489s); OBSERVED: Robotron reads C004, C00A, C010 (U9) | | C804-C807 | widget PIA (interface board) | widget PIA | SR-HW; OBSERVED | | C80C-C80F | ROM-board PIA: port A coin door, port B sound command and LEDs | same | SR-HW; OBSERVED | | C900 | (none) | bit 0 ROM/RAM select for reads of 0000-8FFF; bit 1 screen flip (cocktail); bit 3 Sinistar's blitter clip of the top of the screen | SR-HW; OBSERVED: Robotron writes 0 and 1 | | CA00-CA07 | (write-only: reads do not start a blit and do not return the registers) | Special Chips: CA00 control (starts the blit), CA01 solid colour, CA02-03 source, CA04-05 destination, CA06 width, CA07 height | SR-BT, SR-BLIT (MEASURED: "They are write-only") | | CB00 | vertical count buffer: VA8-VA13 on D2-D7 (D0-D1 read as ...: U5) | | DEF-T "Vertical count buffer" (Defender's wording); SR-WETS; OBSERVED: CB00 reads return 0x40 on line 64, 0x80 on 128, 0xFC on line 255 | | CBFF | | watchdog: write 0x39 | SR-HW; OBSERVED: 221,921 writes of 0x39 in 16 s of Robotron | | CC00-CFFF | CMOS RAM, 1K x 4 bits (Bubbles 8 bits); CC00-CCFF write-protected when the coin door is shut | same | SR-MAP, SR-HW | | D000-FFFF | ROM (Sinistar: RAM at D000-DFFF) | (Sinistar's RAM) | SR-HW, SR-DIFF | Open-bus and partial decoding (mirrors) are not documented in what was read; the drawing sets' decoders (ROB-DS, JST-DS) are the place to settle them (U6). The two decoder PROMs on the later CPU board (`decoder_rom_4.3g`, `decoder_rom_6.3c` in every later romset; Stargate has `decoder_rom_5.3c`) map the CPU's addresses onto the three video RAM banks ("pseudo address" bits PA8-PA13: DEF-T "Video RAM control circuit"): the board should **run them as data from the romset**, not as a hand-written table. ## Main CPU, Defender From DEF-T (the Theory of Operation is Defender's own) and the 2026-11-26 run: | Range | Use | Evidence | | --- | --- | --- | | 0000-BFFF | RAM, always (screen 0000-97FF) | SR-MAP; DEF-T | | C000-CFFF, page 0 | I/O: colour RAM C000-C00F (E5), watchdog C3FF (38h or 39h), CMOS C400-C7FF (256 x 4; C600-C7FF protected with the coin door shut), vertical count buffer (E7), both PIAs at CC00-CC07 | DEF-T "Page 0 decoder", "CMOS RAM", "Watchdog"; OBSERVED: watchdog 38h written to **C3FC** (2,356 times in 8 s), PIA accesses at CC00-CC07, vertical-count reads at C800 | | C000-CFFF, pages 1-9 | ROM pages (ICs 6-12) | DEF-T "ROM board memory scheme" | | D000 (write) | the page latch: data bits D0-D3 select one of pages 0-9 (BCD to decimal) | DEF-T "Section/page select decoder"; OBSERVED: values 0, 1, 2, 3, 7 | | D000-FFFF (read) | ROM | DEF-T | ## Sound board (all first-generation games) | Range | Use | Evidence | | --- | --- | --- | | 0000-007F | the MC6802's internal RAM (the 6808 has none; the board adds RAM) | m6800-python start-here; SIN-DS p. 17 | | 0400-0403 | the 6821 PIA (CS1 from A10): port A to the MC1408 DAC, port B and CB1 the command from the main board, IRQA and IRQB wired together to the CPU's IRQ | SR-HW ("a PIA (at $0400)"); SIN-DS p. 17 (IC10 6821: IRQA and IRQB joined; CS1 to A10) | | F000-FFFF | the 2 or 4 KB sound ROM | SR-HW ("one 2K or 4K ROM (addressed at $F000)") | | below F000 | the speech module's ROM extender (4 x 2 or 4 KB, Sinistar's four `3004_speech_ic4..7` ROMs): addresses HYPOTHESIS (B000-EFFF), to be read from SIN-DS's speech module sheet | SR-HW; census | | NMI | the diagnostic switch SW1 | SIN-DS p. 17 | The speech module's ROMs and its CVSD control lines are in [sound-speech.md](sound-speech.md).