# CPU cores and the chip rule ## The 68000 models: `../m68000-python` (pin) Every model from the X68000 to the Compact XVI runs a plain MC68000 (10 MHz; 16 MHz on the XVI and Compact, switchable to 10). m68000-python is public, v0.1.0, with a SingleStepTests gate and referees (its README; read at `55d3d60`). What the board needs, checked against its README and `docs/interrupt-lifecycle.md`: | Need | Status in m68000-python | Action | | --- | --- | --- | | Vectored interrupt acknowledge: the MFP, SCC, DMAC and I/O controller each put a vector on the bus | exists: the `acknowledge` callable returns a vector number, `AUTOVECTOR` or `SPURIOUS` | none | | NMI (level 7, the interrupt switch) autovectored | exists | none | | Bus errors from the host on unpopulated RAM and absent boards, part of normal boot (U4) | exists: raise `BusError` from a bus callable; the group 0 frame; an open edge in the frame against WinUAE in some states (its claims.md) | watch: the X68000 is the first family board where BERR is routine; any IPL or Human68k difference in a bus-error frame goes upstream with a repro | | Function codes (the area set register and supervisor-only regions) | exists: `function_codes=True` | none | | Wait states (VRAM, I/O, the 16 MHz models' memory) | the core models none; "the host adds its own stall clocks" | the board's bus adds them (U6) | | **DMA cycle stealing by the HD63450** | no bus arbitration (BR/BG/BGACK) in the core; `step()` runs whole instructions and `step_clocks` says at which clock of the step an access happens | provisional: arbitrate at instruction boundaries (as megadrive-python treats its VDP DMA), tagged HYPOTHESIS; raise upstream a request for a stall at a bus-cycle boundary if a test shows the difference (open decision 3) | | A clock that changes at run time (XVI's 10/16 MHz switch) | the core counts clocks; the board converts | none | | RESET instruction's reset line to devices | the RESET instruction exists; device resets are the host's | the board wires it | Speed (its validation.md): 1.39 M instructions a second on its PyPy base loop. m68000-rust and m68000-rust-fast exist (the -fast at 112-191 M instructions a second on its bench: its README and build record). ## The X68030 row: no core The X68030 runs a 68EC030 at 25 MHz (MAME names an "MC68030 @ 25.00 MHz"). The family has no 68020/68030 core: m68000-python's claims exclude "the 68010 and later", and amiga-python's Phase 0 already named a future `m68020-python` for AGA rows (its decision 8). A 68030 core is the 68020's instruction set plus the on-chip caches (256-byte instruction and data caches), the burst bus, and an MMU the EC part omits; FPU instructions go to an optional 68881/68882 coprocessor (the X68030 has an FPU socket: HYPOTHESIS). Motorola's MC68030 user's manual (MC68030UM) is freely downloadable from NXP (XEiJ's reference list gives the URL); it is not pinned here because nothing in this Phase 0 uses it. Recommendation (open decision 2): defer the X68030 row; when it comes, one Phase 0 for an `m68020-python` family core (68020, 68EC020 and 68030/68EC030 as variants, the FPU as a coprocessor socket) shared by the Amiga's AGA rows and the X68030, with the 68030's caches modelled at transaction level. ## The chip rule, chip by chip | Chip | Users in or near the family | Proposal | | --- | --- | --- | | MC68000 | many (Mega Drive, System 16, Amiga, Neo Geo, CPS-1/2, ...) | the existing core, `m68000-python` | | MC68EC030 (+68881/2) | X68030; Amiga 3000/4000 rows (planned) | new core `m68020-python`, deferred (decision 2) | | YM2151 | CPS-1, System 16, many arcade boards (ym2151-python users.md) | the existing core-to-be, `ym2151-python` (Phase 0) | | uPD72065 | the uPD765 family: sms-python (SF-7000), zxspectrum-python (+3), msx-python (turbo R), cpc-python | extract `upd765-python` with the 72065 as a variant (decision 4; fdc.md) | | HD63450 DMAC | X68000 only in the family | board | | MC68901 MFP | X68000 only today (an Atari ST row would be the second user) | board, pin-shaped; extract if an Atari ST board starts (decision 5) | | Z8530 SCC | X68000 only today (a Macintosh row would be the second user; none planned) | board | | MSM6258 | X68000 only in the family | board; the ADPCM step shared in spirit with msm6295-python and pcenginecd-python's MSM5205, no shared core (decision 6) | | RP5C15 RTC | X68000 (msx-python's RP5C01 is a sibling part) | board | | 8255 PPI | many boards, each in-board | board | | MB89352 SPC | X68000 SUPER and later | board | | CRTC, VSOP/VICON, CYNTHIA, VIPS, CATHY | X68000 only | board | | keyboard and mouse MCUs | not dumped | functional, at the serial lines |