# Status **Lineage:** lynx-python → **lynx-rust** · fixes start in lynx-python and flow down by merges · [family charter](https://github.com/alewman/emulator-lineage/blob/main/docs/charter.md) Every rung, its command, its count, the commit and date it was measured. Reference: lynx-python `75b9be7` (w65c02-python `9ca4a2f`; was `bc5f35e` until 2026-11-19); CPU: w65c02-rust `99c3e19` (a transcription of w65c02-python `e49aceb`, which differs from `9ca4a2f` in comments only: docs/handoff-brief.md). All counts below are **execution fidelity** (this board against lynx-python), not hardware accuracy; the reference's hardware results are its docs/status.md. **Reference repinned 2026-11-22** to lynx-python `af8b8ba`: `75b9be7`'s board (the commits since change documents only) with its core repinned from `9ca4a2f` to w65c02-python `af0ad6b` (the same code: `src/` differs in comments, docstrings and SPDX lines; `9ca4a2f`'s own pin of 6502-python left every branch in that repository's history rewrite of 2026-11-21). The rows below were measured on `75b9be7`. | Rung | Command | Result | Measured | | --- | --- | --- | --- | | fmt, clippy (rustup stable 1.99.1, `-D warnings`, `--features frontend`) | `scripts/ladder.sh` | clean | `a59a27d`, 2026-11-14 | | Tests (the reference's behaviour tests transcribed, plus save state and floor division) | `cargo test --release` | 33 pass | `a59a27d`, 2026-11-14 | | Lockstep | `scripts/lockstep.py --reference-cache external/refcache` | **89 of 89 cases identical** (82,100 slices, 1,368 s of board time) | `a59a27d`, 2026-11-14 | | Save at half | the same with `--save-at-half` | **89 of 89 identical** | `a59a27d`, 2026-11-14 | | Seeded faults | `scripts/seeded_faults.py` | **41 of 41 caught**: 37 by the gate (30 transcribed from the reference's m1-m7 fault scripts, 11 Rust-specific of which 7 by the gate), 4 by `cargo test` only (below) | `a59a27d` + the tests of the next commit, 2026-11-14 | | Hardware suites run directly on this board | `lynx-hwtests --quiet all` | Lynx II 95/122, Lynx I 95/122, suite for suite the reference's counts (sprites 0/5/0/2/8 with CRCs 40/40, uart 4/6) | `a59a27d`, 2026-11-14 | | Window, headless | `lynx-play CART --judge` (SDL dummy drivers) | Klax and Ms. Pac-Man 600/600 window frames identical to the board's turned picture, pace = measured period, queued sound = samples; Klax `--flip --presses 7` the same; host faults 5/5 caught. **No human has looked at it** | `a59a27d`, 2026-11-14 | | Library sweep (licensed LYX, LNX, BLL; 147 files; 2,700 slices, A/A/B/A) | `scripts/sweep.py`; `scripts/lockstep.py --cases scripts/sweep-cases.tsv` | 146 load (the boot ROM file refused), 144 show a picture, 139 of 146 carts reach a title or further by eye (92 play); fail: 3 runs end on a Mikey `$FDC0-$FDFF` read, 2 blank (Mines 2 block size), 3 BLL at "INSERT GAME"; **both boards agree on 146 of 146** (143 identical, 3 identical up to where both stop). [docs/sweep-2026-11-19.md](sweep-2026-11-19.md) | `4cf04b4`, 2026-11-19 | | Reference `75b9be7` carried down (the sweep's four issues: Mikey `$FDC0-$FDFF` reads 0 / writes ignored; a header block size that breaks the size rule loses to it; BLL files boot behind the BLL kit's cart loader, `src/cart/bll.rs`; Puzzler 2000 not a board fault) | `scripts/ladder.sh` (JOBS=12; the reference cache regenerated, the old one moved to `external/refcache.bc5f35e`) | fmt, clippy clean; `cargo test` 39 pass (3 new: every Mikey/Suzy address readable, the size rule over a header, the BLL cart image and its boot through the real ROM); **lockstep 89 of 89 identical; save at half 89 of 89** | `2581d93`, 2026-11-19 | | Sweep failures rerun | `scripts/sweep.py --only 'Toki\|Bill\|Geoduel\|Mines 2\|T-Tris\|Puzzler' --out external/sweep-fixes`; `scripts/lockstep.py --cases` (those 14 rows of `sweep-cases.tsv`) | 14 files, none ends; by eye Toki, Bill & Ted's, Mines 2 (LYX, LNX, BLL), T-Tris (all sets) play or are past their titles, Geoduel past its title, Puzzler at its logo screen as before; **lockstep 14 of 14 identical over 2,700 slices** (docs/sweep-2026-11-19.md, "After the fixes") | `2581d93`, 2026-11-19 | | Speed | `lynx CART --frames 600` (release, best of 3, CPU time) | **14x to 23x real time** (California Games 14.0x, S.T.U.N. Runner 17.6x, Batman Returns 22.2x, Blue Lightning 23.2x); the reference: California Games 1.45x on PyPy (its status) | `a59a27d`, 2026-11-14 | Gate blind spots found by the faults (each now caught by a test in `tests/`): no case turns on DISPCTL's flip (`flip-nibbles`); none forces a timer borrow by a CTLB write (`borrows-not-drained-on-write`); no save falls inside a UART echo's 600-tick flight (`state-drops-uart-echo`); EEPROM file persistence is outside a single run's trace (`no-persist`, as in the reference, whose M7 judge uses two runs). A flip case (a game's own flip option, scripted) would close the first. ## The case table (`scripts/cases.tsv`) Every case boots through the real boot ROM (the boot path), read in place from `$MAME_ROMPATH/lynx.zip`. A slice is 266,667 ticks (1/60 s). Each line compares the CPU registers, board time, INTSET and the IRQ line, MAPCTL, display frames, frame period and line index, sprite busy, engine running, SDONE, the cart shift register and counter, and CRC-32s of every CPU bus cycle (tick, direction, address, value), of the frame buffer and of all RAM; `--audio` adds the samples, an EEPROM the chip's image and counts, `--picture` the RGB picture turned for the cart's rotation. | Group | Cases | Slices each | What | | --- | --- | --- | --- | | `hw/` | 37 | 600 | the 18 lynx-tests suites (cpu, page-mode, memio, timers, timers2, math, sdoneack, sprites1-5, audio, audio2 with sound, uart, uart2, uart3, refresh-rate), Lynx II and Lynx I; sprites2 with the paths timeline | | `smoke/` | 29 | 1,200 | the reference's smoke list (scripts/smoke.py), with sound | | `input/` | 6 | 1,200-2,000 | Dirty Larry, Lemmings, Rampart, Warbirds past their titles (A, A, B, A); every key and pause on California Games (with sound) and Ms. Pac-Man | | `lynx1/` | 6 | 900 | games on the Lynx I row, with sound | | `paths/` | 4 | 900 | `LYNX_SUZY_TIMELINE=paths` (the reference's named switch) | | `rotation/` | 3 | 300-600 | Klax (right), Centipede (left), Shanghai (none), the turned picture | | `eeprom/` | 4 | 900-1,500 | Nutmeg, Growing Ties, Circuit Dude (scripted: start and solve level 1), Nutmeg on Lynx I; the chip by override 93C46:16, as the reference's M7 | ## Rust-forced differences (each stated in its module header) - The timer bank's `on_borrow` callback into Mikey is a queue drained in order as soon as the bank's call returns (mikey/timers.rs, mikey/mod.rs). - The sprite engine's generator (`_walk`, `yield from _sprite`) is an explicit state machine stopping at exactly the generator's `yield`s; `_decode` a lazy iterator (suzy/engine.rs). - Back-references become arguments: the display's to Mikey, the UART's `pending`, Mikey's and Suzy's to the cart port and RAM, the math unit's to Suzy's register file, the engine's to the board (`EngineBus`). - The console splits into `Hw` (the bus, everything but the CPU) and `Lynx` (the CPU, which owns the bus); the CPU's `sync`/`fetch` arrive as the callback's `Signals`. - Python's floor division and modulo: `div_euclid` / `rem_euclid`. - Save states (src/state.rs) are this repository's own; the reference has none. - The PNG's compressed bytes are flate2's (pixels identical); lynx-play uses SDL2. ## Open - Nothing in the reference looked wrong during the transcription (nothing to report upstream). - The no-boot-ROM start, AUDIN banking, bank 1, the M5 timing work: owed by the reference, and come down by merge when it moves. - No human has looked at `lynx-play`. ## Setting up the reference git clone https://github.com/alewman/lynx-python external/lynx-python git -C external/lynx-python checkout af8b8ba pypy3.11 -m venv external/venv && external/venv/bin/pip install --upgrade pip external/venv/bin/pip install -e external/lynx-python