# The memory map (68000 models, 24-bit address space) The layout is common knowledge (HYPOTHESIS until a usable X68000 reference confirms it: U1). Each I/O block marked **seen** was written or read by the IPL ROM in the 60-frame MAME trace ([mame-oracle.md](mame-oracle.md), OBSERVED), which confirms the block's address, not its meaning. | Address | Size | Contents | Seen in trace | | --- | --- | --- | --- | | 000000-BFFFFF | up to 12 MB | main RAM (1 MB on the first models, 2 MB on EXPERT/PRO and later; expansion to 12 MB). At reset the IPL ROM appears at 000000 for the vector fetch | the first instruction runs at FF0012 | | C00000-DFFFFF | 2 MB | graphics VRAM (video.md) | | | E00000-E7FFFF | 512 KB | text VRAM, four 128 KB planes | | | E80000-E81FFF | | CRTC registers R00-R24 (E80000-E8002F), operation port E80480 | seen (31 writes) | | E82000-E83FFF | | palettes (graphics E82000-E821FF, text and sprite E82200-E823FF) and the video controller's R0-R2 (E82400, E82500, E82600) | seen (276 writes) | | E84000-E85FFF | | HD63450 DMAC, four channels of 0x40 bytes and the general control register (dmac.md) | seen (31 writes) | | E86000-E87FFF | | area set register (supervisor-only RAM boundary) | seen (1 write) | | E88000-E89FFF | | MC68901 MFP, registers on odd bytes E88001-E8802F | seen (70 writes, 10,444 reads) | | E8A000-E8BFFF | | RP5C15 RTC, odd bytes | seen (10 writes) | | E8C000-E8DFFF | | printer port | seen (1 write; MAME logs E8C002 as unmapped) | | E8E000-E8FFFF | | system port: contrast, display control, keyboard control, SRAM write enable (E8E00D) | seen (116 writes, 59 reads) | | E90000-E91FFF | | YM2151: address E90001, data E90003 | not in 60 frames | | E92000-E93FFF | | MSM6258: command and status E92001, data E92003 | not in 60 frames | | E94000-E95FFF | | uPD72065: status E94001, data E94003; drive control E94005, drive select and motor E94007 | seen (59 writes, 21 reads) | | E96000-E97FFF | | SASI (first models); the internal SCSI's MB89352 on SUPER and later | no access in 60 frames; MAME's SASI log fills later (8 s run) | | E98000-E99FFF | | Z8530 SCC: channel B command E98001, data E98003; channel A command E98005, data E98007 | seen (182 writes) | | E9A000-E9BFFF | | 8255 PPI: port A E9A001, B E9A003, C E9A005, control E9A007 | seen (2 writes) | | E9C000-E9DFFF | | I/O controller: interrupt status and enables for the FDC, the drives, the hard disk and the printer (E9C001), the vector base (E9C003) | seen (2 writes, 1 read) | | EA0000-EAFFFF | | expansion I/O: the CZ-6BS1 SCSI board, MIDI and others | | | EB0000-EB07FF | | sprite registers: 128 sprites x 8 bytes (CYNTHIA) | | | EB0800-EB0811 | | BG scroll and control, sprite timing registers | seen (5 writes) | | EB8000-EBFFFF | | PCG patterns and the two BG name tables | | | EC0000-ECFFFF | | user I/O (expansion boards) | | | ED0000-ED3FFF | 16 KB | battery-backed SRAM (boot settings, memory switch) | | | F00000-FBFFFF | 768 KB | CGROM (fonts) | | | FC0000-FDFFFF | | SCSI ROM (SUPER, XVI, X68030: 8 KB images at FC0000 in MAME's sets) | | | FE0000-FFFFFF | 128 KB | IPL ROM | | ## Interrupt map Vector bases are OBSERVED as the values the IPL writes: the MFP's vector register gets 0x40 (E88017 = 40), the SCC's WR2 gets 0x50, the I/O controller's base gets 0x60 (E9C003 = 60), DMAC channel 2 gets 0x68/0x69 and channel 3 gets 0x6A/0x6B (NIV/EIV). Levels are HYPOTHESIS except where marked: | Level | Source | Vectors | | --- | --- | --- | | 7 | NMI (the interrupt switch) | autovector 31 | | 6 | MFP (OBSERVED: the IPL's handler at FF133E runs at mask 6, 41 times in 60 frames) | 0x40-0x4F | | 5 | SCC | 0x50-0x5F | | 4 | expansion | device | | 3 | DMAC | 0x64-0x6B (channel 0-1 values assumed from the pattern) | | 2 | expansion | device | | 1 | I/O controller (FDC, FDD, hard disk, printer) | 0x60-0x63 | All but NMI are vectored acknowledges: the board answers the core's acknowledge with a vector number (m68000-python supports this: `docs/interrupt-lifecycle.md`). ## Bus errors Reads and writes to unpopulated RAM or absent expansion boards are reported to raise BERR, and the IPL and Human68k are reported to size memory and find boards that way (HYPOTHESIS: U4). m68000-python models BERR from the host (`BusError`), with a known open edge in the frame's contents against WinUAE in some states (its claims.md); the X68000 is the first family board where bus errors are part of normal boot, so this is the first corner to watch. ## Memory kinds (for the JIT proposal's declarations) | Region | Kind | Written by | | --- | --- | --- | | IPL ROM, CGROM, SCSI ROM | ROM | nobody | | main RAM | RAM, code lives here | the 68000, the DMAC (FDC, hard disk, user channel; ADPCM channel reads it) | | graphics and text VRAM | RAM, no code | the 68000, the DMAC, the CRTC's raster copy and fast clear | | sprite, BG, PCG areas | registers / RAM | the 68000, the DMAC | | SRAM | RAM (battery), code possible (SRAM programs) | the 68000 when E8E00D unlocks it |