Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Emulation mode uses its own vector table (`A6.02`).** `COP` goes through `$FFF4`, sixteen bytes
from the native `$FFE4`, and a core that keeps one set of vectors — or picks the table from
something other than the E flag — lands in the wrong handler. Nothing about that is visible in
ordinary code, since a game's `COP` handler is usually the same routine either way.

**The cart could not see it either.** Both vectors pointed at the same trampoline, so a core taking
the native table in emulation mode ran the same handler and passed. The runtime now gives the
emulation `COP` vector its own trampoline and its own RAM pointer, which is what makes the two
distinguishable at all. Both handlers are installed and live, so taking the wrong table is a wrong
answer rather than a hang, and the failure code says which vector was used.

`BRK` deliberately does not get the same treatment: in emulation, `$FFFE` is shared between `IRQ`
and `BRK`, so a pointer behind it could not mean "the BRK handler" unambiguously, and splitting it
would invent a distinction the machine does not have.

- **`(dp,X)`'s pointer fetch wraps inside bank `$00`, and `N`/`Z` are valid in decimal (`A2.09`,
`A7.04`).** The pointer fetch is a separate piece of code in most cores and is the one place the
`d,X` no-bank-crossing rule is easy to forget, because it happens before the mode looks like an
Expand Down
4 changes: 2 additions & 2 deletions docs/accuracysnes-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Every sub-group of Part V is enumerated, so this is a **complete** statement of
| `A3` | 10 | 8 | 0 | A3.06, A3.08 |
| `A4` | 10 | 5 | 0 | A4.03, A4.04, A4.05, A4.09, A4.10 |
| `A5` | 15 | 9 | 0 | A5.09, A5.10, A5.16, A5.18, A5.19, A5.20 |
| `A6` | 15 | 8 | 0 | A6.02, A6.09, A6.10, A6.11, A6.12, A6.13, A6.15 |
| `A6` | 15 | 9 | 0 | A6.09, A6.10, A6.11, A6.12, A6.13, A6.15 |
| `A7` | 5 | 5 | 0 | — |
| `A8` | 6 | 2 | 0 | A8.01, A8.04, A8.05, A8.06 |
| `A9` | 3 | 3 | 0 | — |
Expand Down Expand Up @@ -52,7 +52,7 @@ Every sub-group of Part V is enumerated, so this is a **complete** statement of
| `F1` | 22 | 1 | 0 | F1.01, F1.03, F1.04, F1.05, F1.06, F1.07, F1.08, F1.09, F1.10, F1.11, F1.12, F1.13, F1.14, F1.15, F1.16, F1.17, F1.18, F1.19, F1.20, F1.21, F1.22 |
| `G1` | 18 | 8 | 0 | G1.01, G1.03, G1.05, G1.06, G1.07, G1.13, G1.15, G1.16, G1.17, G1.18 |

**189 of 443** enumerated assertion rows covered by an on-cart test, plus **50** covered only by a rendered scene (`docs/adr/0013`) — **239 of 443** in total.
**190 of 443** enumerated assertion rows covered by an on-cart test, plus **50** covered only by a rendered scene (`docs/adr/0013`) — **240 of 443** in total.

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.

Expand Down
8 changes: 7 additions & 1 deletion docs/accuracysnes-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AccuracySNES closed ticket **T-04**. The follow-on tickets minted here are **T-0

| | |
|---|---|
| Tests | **233** (221 scoring + 11 golden vectors + 1 region SKIP per image) |
| Tests | **234** (222 scoring + 11 golden vectors + 1 region SKIP per image) — *tests, not assertions; see the note below the table* |
| Rendered scenes | **50**, all cross-validated (`docs/adr/0013`) |
| Pass rate | **100.00%**, floor enforced at 1.00 by `tests/accuracysnes.rs` |
| Cross-validated | RustySNES and Mesen2 agree on every test; snes9x agrees on every test but five, all recorded reference bugs with citations in `scripts/accuracysnes/crossval.sh`. Both images. |
Expand All @@ -23,6 +23,12 @@ AccuracySNES closed ticket **T-04**. The follow-on tickets minted here are **T-0
These counts are maintained by hand and will drift. **`docs/accuracysnes-coverage.md` is the
authority**: it is regenerated with the ROM, so it cannot.

**The test count and the assertion count are different numbers and neither bounds the other.** One
test routinely carries several assertions with distinct failure codes, and several tests routinely
share one enumerated assertion (`E6.02` is four tests for one row). Reading the coverage figure off
the test count, or the reverse, has now been done once by a human and once by a review bot in the
same fortnight, so it is written here as well as in §2.

Phase A shipped Group A. Phase B has so far shipped the register-observable half of Group C — the
OAM/VRAM/CGRAM port mechanics, the H/V counters, the two open-bus latches, the version nibbles, the
Mode 7 multiply, the sprite over-flags, the VRAM access window, and the overscan vblank boundary —
Expand Down
8 changes: 8 additions & 0 deletions tests/roms/AccuracySNES/ERROR_CODES.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,14 @@ Provenance: **Documented** (WDC 65C816 datasheet; 6502.org 65c816opcodes decimal
| 3 | `$06` | SED: $79 + $79 did not give $58, so the BCD addition itself is wrong |
| 4 | `$08` | N was set after a decimal $79 + $79 = $58, so the flags describe the binary sum $F2 |

### A6.10 — Emulation COP vector

Provenance: **Documented** (WDC 65C816 datasheet, vector table; SNESdev Wiki vectors). Kind: scored.

| Code | Byte | Meaning |
|---|---|---|
| 1 | `$02` | COP in emulation mode did not vector through $FFF4 — the $B0 marker means it took the native table's $FFE4 instead, and $00 means it reached neither handler |

## Group C

### C1.01 — OAM word write/read
Expand Down
Loading
Loading