You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(accuracysnes): A5.18 — BRK is 8 cycles native, 7 in emulation (#315)
The extra native cycle is the PBR push: a native frame is PBR/PCH/PCL/P
and an emulation frame is the same without PBR, so the difference is one
stack WRITE (8 clocks), not an internal cycle.
Nothing returns, and that is what isolates BRK. The obvious chain is BRK
into a handler that RTIs back -- but RTI also differs by one stack access
between the modes (A5.19), so the pair would come back at two accesses
per iteration and this row would report its sibling's result added to its
own. Instead V_BRK_VEC points at the instruction AFTER the BRK, which the
runtime's `jmp (V_BRK_VEC)` trampoline reaches directly: there is no
handler body, so no handler body can differ between the modes. The frames
are abandoned and S is restored after each span.
Both BRK vectors already share that one trampoline -- runtime.s documents
the sharing as deliberate, since emulation conflates $FFFE between IRQ
and BRK -- so the trampoline's cost is the same code in both spans.
The repeat count was MEASURED, not estimated, and the first draft got
that wrong. Four iterations on an estimate of ~35 dots each wrapped the H
counter: native read $FFF7, a wrapped negative, against emulation's 323 --
a native span SHORTER than the emulation one, the arithmetic opposite of
the assertion. An iteration is really ~99 dots. Three measure 297 native
against 291 emulation, difference exactly 6, both clear of the 341 wrap.
Injecting "never push PBR" into op_brk fires the row's assertion, with
A6.05 ("native pushes 4 bytes") failing alongside as corroboration.
Coverage 354 -> 355 of 443 (301 on-cart + 54 scenes), battery 342 tests
at 100% on-cart, three references agree.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
| BestEffort coprocessors, real-title validated | ✅ **10 / 11**| DSP-2, DSP-4, ST010, S-DD1, CX4, OBC1 boot a real commercial title to real gameplay content. **DSP-3 (SD Gundam GX) + ST011 (2-dan Morita Shougi)** are liveness/determinism-validated — detection + `host_accesses > 0` + bit-identical framebuffer (`dsp3_st011_oncart`). **ST018 (Nidan Morita Shogi 2) + S-RTC (Daikaijuu Monogatari II)** are detection + boot + determinism-validated against their real carts (`srtc_st018_oncart`), but their coprocessor's core function is **usage-gated** (the ST018 shogi AI runs only on the computer's move; the S-RTC clock is read at specific moments), so it is not exercised in a headless boot |
243
243
| BestEffort coprocessors, no booting dump | ⚠️ **1 / 11**| SPC7110 — **two** local Tengai Makyou Zero dumps both fail to boot to content: the 7 MiB one is a fan-translation ROM hack needing a patch-only memory region no cartridge has (`docs/audit/spc7110-boot-crash-2026-07-08.md`); a 5 MiB dump (sha256 `8620203d…`) freezes at a near-blank screen with zero coprocessor activity, and does not match the documented-good original (`69d06a3f…`). The correct original-cartridge dump remains the ROM-sourcing gap (`docs/rom-test-corpus.md`) |
244
-
| AccuracySNES (first-party battery) | ✅ **354 / 443 assertions covered, 100% on-cart pass** | A 341-test self-scoring battery spanning Groups A-G. **354 of 443** dossier assertions covered: **300 on-cart** + **54 via rendered scenes** (`docs/adr/0013`), kept as separate columns on purpose (`docs/accuracysnes-coverage.md`, regenerated with the ROM so it cannot drift). Every scored row is inject-verified for non-vacuity and cross-validated headlessly against **Mesen2, snes9x and ares** — three independent references as of `v1.29.0`, with MesenCE additionally serving as the per-dot compositor's blueprint and exact-frame oracle. Provenance gate green. Ships an AccuracyCoin-style on-cart UI as of `v1.21.0` (paged menu + automatic skyline results + per-test B-skip + a Select WRAM debug viewer). Remaining ~89 assertions are compositor-gated hi-res, second-image G-rows, treacherous CPU/dot-model timing, or provably uncoverable — though "uncoverable" has twice proved too strong (`E5.06` and `B2.02`/`B2.03` all landed after being parked) (`docs/accuracysnes-coverability-audit-2026-07-23.md`) |
244
+
| AccuracySNES (first-party battery) | ✅ **355 / 443 assertions covered, 100% on-cart pass** | A 342-test self-scoring battery spanning Groups A-G. **355 of 443** dossier assertions covered: **301 on-cart** + **54 via rendered scenes** (`docs/adr/0013`), kept as separate columns on purpose (`docs/accuracysnes-coverage.md`, regenerated with the ROM so it cannot drift). Every scored row is inject-verified for non-vacuity and cross-validated headlessly against **Mesen2, snes9x and ares** — three independent references as of `v1.29.0`, with MesenCE additionally serving as the per-dot compositor's blueprint and exact-frame oracle. Provenance gate green. Ships an AccuracyCoin-style on-cart UI as of `v1.21.0` (paged menu + automatic skyline results + per-test B-skip + a Select WRAM debug viewer). Remaining ~88 assertions are compositor-gated hi-res, second-image G-rows, treacherous CPU/dot-model timing, or provably uncoverable — though "uncoverable" has twice proved too strong (`E5.06` and `B2.02`/`B2.03` all landed after being parked) (`docs/accuracysnes-coverability-audit-2026-07-23.md`) |
245
245
| Determinism contract | ✅ **proven**| bit-identical framebuffer/audio across runs; save-state round-trip proven across all three board tiers (no-coprocessor, Curated, BestEffort) |
246
246
247
247
**Named residuals, tracked not hidden:** the 65816 `e1.e` divergence (`docs/adr/0002`);
**300 of 443** enumerated assertion rows covered by an on-cart test, plus **54** covered only by a rendered scene (`docs/adr/0013`) — **354 of 443** in total.
55
+
**301 of 443** enumerated assertion rows covered by an on-cart test, plus **54** covered only by a rendered scene (`docs/adr/0013`) — **355 of 443** in total.
56
56
57
57
The two columns are kept apart on purpose. An on-cart result means the same thing on any emulator and on real hardware; a rendered scene needs a host holding the golden. Adding them into one figure would quietly change what the number claims.
Copy file name to clipboardExpand all lines: docs/accuracysnes-plan.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ AccuracySNES closed ticket **T-04**. The follow-on tickets minted here are **T-0
13
13
14
14
|||
15
15
|---|---|
16
-
| Tests |**341** (scoring + golden vectors + region SKIP per image) — *tests, not assertions; see the note below the table*|
17
-
| Assertion coverage |**354 of 443** dossier assertions — **300 on-cart** + **54 rendered scenes**, kept as separate columns (`docs/accuracysnes-coverage.md`) |
16
+
| Tests |**342** (scoring + golden vectors + region SKIP per image) — *tests, not assertions; see the note below the table*|
17
+
| Assertion coverage |**355 of 443** dossier assertions — **301 on-cart** + **54 rendered scenes**, kept as separate columns (`docs/accuracysnes-coverage.md`) |
18
18
| Rendered scenes |**54** declared, all blessed and matching on both scene hosts (`docs/adr/0013`); **54** dossier rows have a scene as their only cover |
19
19
| Pass rate |**100.00%** on-cart, floor enforced at 1.00 by `tests/accuracysnes.rs`|
20
20
| Cross-validated |**Three references** as of `v1.29.0`. Mesen2 agrees on every test but `F1.03`, which clocks both ports out of one latch and so needs the port-2 input its Lua runner cannot drive; snes9x has 14 recorded divergences and **ares** 3, each with a citation in `scripts/accuracysnes/crossval.sh`. A headless **MesenCE** is separately the per-dot compositor's blueprint + exact-frame oracle. All images. |
| 1 |`$02`| BRK did not push one extra byte in native mode (8 cycles vs 7): the native frame is PBR, PCH, PCL, P and the emulation frame is the same without PBR, so a core pushing the same three bytes in both reads zero here |
0 commit comments