# Memory maps, as MAME 0.285 builds them Every entry here is **OBSERVED**: printed by `scripts/mame_maps.lua` from the running MAME binary (`python -I scripts/mame_trace.py winrun --maps`, and `starblad`), not read from its source. It says where MAME decodes something, not what the board's address decoders do; no schematic or Namco document is in hand. Raw dumps: `reference/mame/-maps/maps.txt` (git-ignored; regenerate with the command above). ## The 68000 side, shared with System 2 Both boards' master and slave 68000s keep System 2's layout ([namcos2-python memory-map.md](../../namcos2-python/docs/memory-map.md)): program ROM from $000000, work RAM at $100000, the C148 interrupt controller's registers at $1C0000-$1FFFFF (the same 8 KiB windows: $1C4000-$1DFFFF read/write, $1E0000 read-only, $1E2000/$1E4000 write-only), data ROM at $800000, the shared RAM at $900000 (also the C139 serial chip's RAM, `:sci data`), the dual-port RAM window at $A00000, the C139 registers at $B00000 and $B80000. The CPU-space vector handlers at $FFFFF3-$FFFFFF answer interrupt acknowledges (MAME supplies the vectors: the C148). So System 21 really is System 2 plus a polygon side. ## Winning Run (`winrun`) | CPU | Range | What MAME maps there | | --- | --- | --- | | main 68000 | $250000-$25FFFF | RAM shared with the DSP as `winrun_polydata` (the display list the DSP reads) | | main | $260000-$26FFFF | RAM | | main | $280000, $380000, $3C0000, $400000, $440000 | DSP control and handshake registers (delegates) | | main and slave | $600000-$60FFFF | `gpu_comram`: RAM shared with the third 68000 | | gpu 68000 | $000000-$07FFFF | its own program ROM (`gpu` region) | | gpu | $200000-$20FFFF | `gpu_comram` | | gpu | $400000-$41FFFF | palette and extended palette | | gpu | $600000-$6FFFFF | `gdata` ROM | | gpu | $C00000-$CFFFFF, $D00000, $E0000D | frame-buffer and video registers (delegates) | | TMS320C25 | program $0000-$0FFF | RAM (`winrun_dspbios`): the DSP program is **uploaded**, not in a mask ROM | | TMS320C25 | data $0000-$0005 | the C25's memory-mapped registers (DRR, DXR, TIM, PRD, IMR, GREG at 0-5: DOC C2X Table 3-3) | | TMS320C25 | data $0060-$007F, $0200-$02FF, $0300-$03FF | on-chip RAM blocks B2, B0, B1 (DOC: C2X, 544 words) | | TMS320C25 | data $2000-$200F, $4000-$4FFF, $8000-$FFFF | board registers, poly-data window, `point16` vertex ROM (read only) | | TMS320C25 | I/O ports 8-12 | handshake ports with the 68000 side | | C65 (HD63705Z0) | $0000-$01BF RAM and ports, $01C0-$1FFF internal ROM, $8000-$FFFF external ROM | as System 2 | ## The C67 boards (`starblad`, and the other six) | CPU | Range | What MAME maps there | | --- | --- | --- | | main 68000 | $000000-$0FFFFF | program ROM (1 MiB on Starblade) | | main | $200000-$20FFFF | DSP communication RAM (delegate) | | main | $400000, $440000-$47FFFF, $480000-$4807FF | DSP control, point-RAM window (HYPOTHESIS from names and sizes only) | | main | $700000-$720007 | C355 sprite RAM and registers | | main | $740000-$75FFFF | palette and extended palette | | main | $760000 | video control | | main | $C00000-$CFFFFF (mirror $100000) | `edata` ROM (Air Combat and Cyber Sled have it) | | C67 master | program $8000-$BFFF | RAM (`master_dsp_ram`): uploaded code beside the 4K-word mask ROM at $0000-$0FFF | | C67 master | data $2000-$200F, $8000-$FFFF; I/O 0-4, 8-12, 15 | board registers, `point24` window, handshake ports | | C67 slaves | data $0000-$0005, B0/B1/B2; I/O 0, 2, 3, 15 | registers and ports only: the slaves run from their mask ROM and talk to the master through ports | The master/slave split matches the TMS320C25's multiprocessing features (global memory, the HOLD function, the BIO pin and XF flag handshake: DOC C2X 3.10, 3.7.3, 5-1), but which of them the board uses is **not known** (U5).