Skip to content

test(cpu): wire AllSuiteA compact 6502 smoke ROM#420

Merged
nkane merged 1 commit into
mainfrom
feat/398-allsuitea
Jun 5, 2026
Merged

test(cpu): wire AllSuiteA compact 6502 smoke ROM#420
nkane merged 1 commit into
mainfrom
feat/398-allsuitea

Conversation

@nkane
Copy link
Copy Markdown
Owner

@nkane nkane commented Jun 5, 2026

First of the v1.5.0 CPU-coverage issues (#398, epic #402).

What

Adds Frank Kingswood's AllSuiteA (~1.5 KB) as a fast opcode/addressing smoke ROM alongside the Klaus functional suite.

  • cpu/allsuite_test.go, build-tag klaus, reuses httpDownload / verifySHA256 / sha256SumOf from klaus_test.go.
  • SHA-pinned (4801c945…) from the pmonta/FPGA-netlist-tools mirror; downloaded-on-demand + cached under the user cache dir (not vendored). CHIPPY_ALLSUITE_BIN overrides.
  • Loads + enters at $4000, runs against VariantNMOS.

How it detects pass/fail

Both pass and fail paths end in theend: JMP * (self-loop at $45C0), so the PC self-loop alone is ambiguous — the run loop detects the self-loop then reads the result byte: $0210 == $FF is pass, anything else is the failing test number (reported in the failure message). Verified against AllSuiteA.asm.

Result

Passes locally in 613 instructions (<1 ms). CI's cpu-rom job now runs -run 'TestKlaus|TestAllSuiteA' (renamed "klaus + allsuite cpu tests").

Docs

README test section (adds AllSuiteA + the CHIPPY_ALLSUITE_BIN override, fixes the stale ./internal/cpu/... path) and docs/context.md merged-PR note.

Closes #398

Add Frank Kingswood's ~1.5 KB AllSuiteA.bin as a fast opcode/addressing
gate complementing the Klaus functional suite (issue #398, v1.5.0 CPU
coverage):

- cpu/allsuite_test.go under the `klaus` build tag, reusing the Klaus
  download/cache/sha helpers. SHA-pinned from the pmonta/FPGA-netlist-tools
  mirror; downloaded on demand + cached (GPL-era ROM, not vendored).
  CHIPPY_ALLSUITE_BIN overrides.
- Loads + enters at $4000, runs against VariantNMOS. Both pass and fail
  end in `JMP *` at $45C0, so the loop detects the self-loop then reads the
  result byte: $0210 == $FF is pass, anything else is the failing test
  number. Converges in 613 instructions.
- CI klaus job widened to `-run 'TestKlaus|TestAllSuiteA'` and renamed.
- README + docs/context.md updated.

Closes #398
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

TUI smoke renders

Rendered from c78ee0b by the smoke CI job. Replaced on every push to this PR.

chippy-source-scroll (#227)

chippy-source-scroll

chippy-syms (#226)

chippy-syms

chippy-bp-and-run (#225)

chippy-bp-and-run

chippy-console (#232)

chippy-console

@nkane nkane merged commit 366c05e into main Jun 5, 2026
12 checks passed
@nkane nkane deleted the feat/398-allsuitea branch June 5, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1.5.0: AllSuiteA.bin compact CPU smoke ROM

1 participant