Skip to content

v1.3.0 — routine unit tests + 6502 debugging playbook

Latest

Choose a tag to compare

@nschneir nschneir released this 21 Jul 19:39
· 24 commits to main since this release

Routine-level unit testing and a debugging playbook — the two additions a post-project retrospective ranked worth building.

Added

  • pet call ROUTINE — the unit-test primitive: emulates a JSR in isolation (fake return address on the stack, optional --a/--x/--y on entry) and stops at the routine's own RTS, leaving registers and memory holding its results. Poke inputs, call one routine, assert outputs — nothing else runs in between. Also a YAML call: step (call: { routine: addscore, a: 5 }) and MCP pet_call. The Ms. Muncher suite now unit-tests addscore (BCD adds, hiscore chase, the 10,000-point bonus life) and cell_glyph's door special case this way.
  • 6502-debugging skill — a symptom-indexed playbook of the procedures that cracked the dogfood's hard bugs: prove-the-binary-first (stale-load rule zero), store-watchpoint corruption hunts, register-clobber audits by isolation, deterministic reproduction with poke + frame-stepping, branch-away deadlock avoidance, exact-glyph assertions, and warp inspection discipline.

Full changelog: https://github.com/nschneir/PET-Project/blob/main/CHANGELOG.md