# Status Every rung, its command, its count, and the commit and date it was measured at. Reference: pokey-python at **`6ed1ffa`** (checked by `scripts/env.sh`: the checkout's `src/`, `tests/`, `scripts/` and `validation/` must be the pin's; the local checkout is at `34a541c`, which changes documents only). Reference interpreter: its `.venv-pypy` (PyPy 3.11.15, 7.3.23). Toolchain: rustup stable (cargo 1.99.1); the distribution's cargo (1.93.1) is older than CI's. All rungs below measured on **`0cd8fb5`**, 2026-11-14. "Identical" is fidelity to pokey-python (axis C), not hardware confidence: the reference's own status says what it knows of the chip. | Rung | Scope | Command | Result | | --- | --- | --- | --- | | gate | fmt, clippy `-D warnings` (with `serde`), `cargo test`, rungs 1-3 | `scripts/ladder.sh` | passed (about a minute) | | 1 | the reference's `tests/test_*.py`, transcribed; AcidSAP on 6502-rust (`sixfiveohtwo` 71747eb, transcribed from the 6502-python commit the reference's `acid` extra pins) | `scripts/rung1.sh` | **95 Rust tests pass**, covering 124 of the reference's 125 pytest cases (registers 11, timers 16, output 14, irq 7, pots 10, keyboard 9, serial 7, acidsap 21); AcidSAP 9 of 10 on both IRQ delays, `twotone` failing as the reference's strict xfail expects. Not transcribed: the PyPy 80-attribute guard | | 2 | seeded lockstep: 64 random streams of 20,000 cycles (writes, reads of all 32 addresses, writes through mirrors, pot masks, the PotRC helper, key maps, SID, BCLK, seeded power-ons, save/load, `record=True`, both variants) and 4 directed scripts; per tick: levels, `mix()` bits, /IRQ, K0-K5, dump, SOD, OCLK, BCLK, pot_level call count; every read; every wiring call; full state | `scripts/rung2.sh` | **68 of 68 traces identical**: 1,463,679 ticks, 8,294 reads, 25,739 full-state lines, 10,836 wiring calls | | 3a | the conformance kit: `validation/conformance.txt` reproduced from the reference's own case stimuli (committed in `tests/conformance/`, checked against the reference at the pin) | `scripts/rung3.sh` (`cargo test --test conformance`) | **11 of 11 cases identical** | | 3b | the reference's validation stream generators (its `scripts/streams.py`, rungs 2, 2-init, 2-AUDCTL, 3, 3-STIMER, 4, 6, 10 streams each, its seeds), on both cores, no closed box | `scripts/rung3.sh` | **70 of 70 traces identical**: 3,269,041 ticks, 2,213,720 reads | | 4 | seeded faults: the reference's 64 and 14 Rust-specific | `scripts/rung4.sh` (or `FAULTS=1 scripts/ladder.sh`) | **78 of 78 caught** (rung 1 catches 66, rung 2 76, rung 3 56); about 30 minutes at 3 jobs | | speed | `run()` of the reference's running chip (`scripts/speed.py`, transcribed as `examples/speed.rs`), best of 7 x 20 M cycles by elapsed time | `scripts/speed.sh` | **89.4 M cycles/s, 49.95x NTSC real time** (1.79 MHz); the PyPy reference on the same machine: 9.27 M cycles/s, 5.18x (its own script, best of 5 by CPU time). About 9.6x the reference | Not run here, by design: the closed-box VHDL rungs (the reference's business; this repository never reads or runs the VHDL). ## Faults: what each rung sees Two of the reference's faults pass the lockstep and are caught by rung 1 only: "SKRES misses kb overrun" and "Break repeats while held" (the random streams rarely hold a key across an SKRES, or Break across two scans, with SKSTAT read). The Rust-specific faults (seeding, getrandbits, draw order, the pot_level call pattern, take_outputs, the on_dump clock, the RC overcharge limit, the register masks) are caught only by rung 2, which is why the lockstep traces every wiring call and full state. Blind spot recorded, not a miss: none. ## Rust-forced differences (each in its module header) - Wiring callbacks are boxed closures; `pot_level` and `on_dump` receive a `Look` (the chip's `clock`, `dump_active` at the call) because a closure cannot borrow the chip, and the reference's `PotRC` reads those two. `PotRC` is shared as `Rc>` (`PotRC::wire`). - `read` takes `&mut self` (it may call the board's `pot_level`). - `power_on(seed)` takes `Option`; `src/pyrandom.rs` is Python's MT19937 and integer seeding, so a seed gives the same state on both cores (negative seeds not offered). - `snapshot()`/`restore()` use a `State` struct, generated from the chip's own field list. - Fixed-width types (`u8`, `u32`, `u64`, `w_reg: i32` with -1 for none), tuples for `levels()`, `Option` for `bclk_out()`, methods for Python's properties; private methods drop the leading underscore. - `C012294` and `LINEAR` are `LazyLock` statics (Python computes them with `math.exp` at import); `fitted()`/`linear()` give owned rows. ## Reference findings Nothing in the reference looked wrong against itself: every transcribed test, the kit and every stream agreed on the first run. (Its docs list its own closed-box differences D1-D14; those are its business.) ## Left - Rung 8 of the reference (music, real programs) waits on board register logs; when the reference adds it, add the same streams to rung 3. - The A/B speed method of the -fast tier (`scripts/ab.sh`, layouts) is for pokey-rust-fast. - No remote, no tag: local repository only. When Aubrey wants one, the CI file is ready (the lockstep rungs need the private reference and stay local).