# m68000-python 0.1.0 The first release: a readable, pure-Python MC68000 instruction core in the shape of z80-python, verified up a ladder of oracles ordered by tier, with a claim boundary for what no available evidence settles. ## What it is - The whole 68000 instruction set: all 45,815 defined first words, the two-word prefetch queue and the bus sequence of every instruction, the clock total of every step and the clock at which each access ends (`step_clocks`), the exception model with its two frame shapes, the interrupt lifecycle with the acknowledge cycle and the E-clock wait, trace, STOP and RESET. - The embedding contract of the family: four bus callables over a 24-bit space, `step()` returning clocks, the host deciding everything else (`acknowledge`, `tas_write`, `address_error`, `reset_devices` and `function_codes` as optional keywords; `BusError` to assert BERR). - Tooling in z80-python's shape: `CPUState`, a disassembler in MAME's spelling, `DebugSession` with breakpoints, watchpoints and bus-access tracking, versioned JSON Lines traces with first-divergence comparison, `CommandDebugger` and `python -m m68000_python`. ## What it claims, and how strongly Every behaviour carries a status in [docs/claims.md](../claims.md): - **Verified** (hardware-captured): `ABCD`, `SBCD` and `NBCD`, every input and every flag, against flamewing's Genesis-captured tables. - **Strong** (a hardware-corrected emulator run inside its checked scope, plus another lineage): instruction results and defined flags for every defined first word; the undefined flags of DIV and CHK; the decoder; group 1 and 2 exception entry; an address error's clocks and most of its frame; `LINK A7`; `ADDQ.W #,An` at 8 clocks. - **Provisional** (MAME's lineage, or the manual): exact clock totals, the order of bus cycles, `step_clocks`, trace, interrupts and STOP, the halt on a fault during the reset sequence, and the reset exception's 40 clocks (the manual and a die-derived gate-level model). - **Contested** (credible sources disagree; the core follows the gate): six address-error behaviours, listed with the gate cases they touch. - **Undecidable here**: three 2-clock questions and the double bus fault. - **Outside the contract**: the contents of a bus-error frame, timing inside an instruction, the 68010 and later, the 68008's timing. The evidence: the SingleStepTests/m68000 gate, 317,500 cases with every bus access compared and no case excluded; WinUAE's CPU-tester core and Musashi built from pinned sources and run over the gate; the MAME 0.285 lockstep on 52.8 million instructions of Altered Beast on two boards; the 680x0 corpus as a classified detector; a coverage map over every defined word and 176 seeded mutants, 174 killed and the two survivors equivalent. The record with every pin, command and timing is [docs/validation.md](../validation.md). ## Readability and sources Every handler's docstring starts with its Motorola name and ends with the manual page or table its rule comes from; every handler that encodes a rule the manuals do not give names the corpus file, the WinUAE run or the hardware tables that pin it. `tests/test_readability.py` enforces all of it. `docs/start-here.md` maps each section of the primer to the module that implements it. ## Compatibility Nothing was released before 0.1.0. Two changes relative to the development tree the family's boards built against are listed under **Breaking** in [CHANGELOG.md](../../CHANGELOG.md): console numbers are decimal or prefixed hexadecimal, and `reset_devices` is a constructor keyword. Pre-1.0 minor releases may break the public surface when the changelog says so ([docs/api-stability.md](../api-stability.md)). ## Verified after release Published 2026-10-09. The wheel and sdist are identical bytes on PyPI and the [GitHub release](https://github.com/alewman/m68000-python/releases/tag/v0.1.0): | File | SHA-256 | | --- | --- | | `m68000_python-0.1.0-py3-none-any.whl` | `1fd4628cdbbeed85d3f3c36f77fbc63b5b425575d297dab99624cc18a0367432` | | `m68000_python-0.1.0.tar.gz` | `f7760884c99fd850230fdd0fccb3a393e4c10feb6287b1b065e5c03d3e37f10c` | A fresh-venv `pip install m68000-python==0.1.0` followed by `scripts/smoke_installed_package.py` passes on both CPython 3.14.4 and PyPy 7.3.23 (3.11.15).