Debugger disassembly + breakpoints: pure SM83 disasm with live-CPU length oracle, click-to-toggle bps (#53, third artifact) - #60
Merged
Conversation
… CPU (#53) src/disasm.eigs: pure reader-callback disassembler (octal-field decode, computed CB page). Length-consistency gate: 172K+ straight-line instructions executed by the debug engine, PC advance == disasm len, 0 mismatches; planted wrong-length fault caught; golden master pins mnemonics (named as such). East panel: window from PC, click-to-toggle breakpoints (DBG_BP seam), bp-armed RUN steps through the debug engine and pauses reason=breakpoint. UI oracle: second atlas at font_scale 2, DBG_DIS decode legs, real-mouse bp round-trip (arm at PC, trap, decode, clear) — it caught a clipped final char at east_w=260 (now 280). Also worked transparently on WRAM-executed Blargg code (bp at C003). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third artifact of #53: the disassembly panel and breakpoints.
src/disasm.eigs: pure SM83 disassembler over a byte-reader callback (the hex_view contract) — algorithmic octal-field decode, computed CB page, headless-safe.run_debug_equivalence.sh, CI on any pin): for every straight-line instruction the debug engine executes, PC must advance by exactlydisasm_one'slen— 172,451 live instructions on cpu_instrs, zero mismatches; a planted wrong-length fault is caught. Mnemonic text has no external oracle on this box, sotests/disasm_golden.txtis labeled what it is: a golden master (regression pin, not proof).item_listwindow forward from PC (>PC marker,*bp marker); click a line to toggle a bp (DBG_BPseam),--bp ADDRCLI presets. With bps armed, RUN runs the frame through the debug stepper and pauses with reasonbreakpoint; with none armed RUN stays on the hot loop.DBG_DISseam,--plant-dis-faultcaught, and a full real-mouse breakpoint round-trip: arm at the paused PC → Run → traps at exactly that PC (reason asserted) → panels decode byte-identical at the bp → second click clears. The bp landed on WRAM-executed Blargg code (C003) — the bus-reader disassembler handled RAM code transparently.CALL NZ,$078Dline lost its final character to the 260px panel clip — east region widened to 280.Remaining on #53: tile/VRAM/OAM viewers. Part of #53 — does not close it.
🤖 Generated with Claude Code