# Memory maps OBSERVED: MAME 0.285's maps as its Lua API reports them on a running machine (`scripts/mame_trace.py --map`, sets pow, streetsm, ikari3, searchar, prehisle). A MAME map is a detector: it has no timing and no wait states, and its handler names are MAME's. The decode of record is SCH-A7007 sheet 2's PAL20L10 (F13) and the two 74138s (H10, F10), whose PAL equations are in the romsets as dumps (data); reading them is milestone M0. ## 68000, map P (pow, streetsm) | Range | MAME | | --- | --- | | $000000-$03FFFF | program ROM | | $040000-$043FFF | work RAM (16 KB; two 6264 on sheet 2) | | $080000-$080001 | a read and a write handler (inputs; the sound command) | | $0C0000-$0C0001 | input port read; a write handler at $0C0001 | | $0E0000, $0E8000 | reads that do nothing in MAME (`nop`) | | $0F0000, $0F0008 | input ports (DIP switches) | | $100000-$100FFF | text (FIX) RAM, `fg_videoram` | | $200000-$207FFF | sprite RAM, `spriteram` | | $400000-$400FFF | palette RAM (MAME's `alpha68k_palette`) | | $FFFFF3-$FFFFFF (odd) | interrupt-acknowledge vectors (MAME's autovector space) | ## 68000, map I (ikari3, searchar) As map P with the text and sprite RAMs swapped (sprite RAM $100000-$107FFF, text RAM $200000-$200FFF), extra ROM at $300000-$33FFFF, and more read ports: $080001, $080003, $080005, $0C8000, $0D0000, $0F8000 (the rotary and the second joystick, by placement: HYPOTHESIS until M0's decode). ## 68000, Prehistoric Isle ROM $000000-$03FFFF, RAM $070000-$073FFF, text RAM $090000-$0907FF, sprite RAM $0A0000-$0A07FF, foreground RAM $0B0000-$0B3FFF, palette RAM $0D0000-$0D07FF, inputs at $0E0010-$0E0045, control writes at $0F0000-$0F0070 (scroll registers, the sound command, flip: HYPOTHESIS by placement). The background tile map is a ROM (MAME region `bgtilemap`). ## Sound Z80 (all sets) Program: ROM $0000-$EFFF, RAM $F000-$F7FF, the command latch at $F800 (read; write on snk68, `nop` write on prehisle). I/O: $00 (YM3812), $20, $40, $80 (uPD7759 control and data, by placement). SCH-A7007 sheet 12: a 27512 ROM (C16), a 6116 RAM (C15), two 374 latches (B14, B15), decode by 74139s (B/F14) and a 74138 (E11).