Add Z80 debugger UI: disassembler, CPU debugger, breakpoints#12
Closed
gunterhager wants to merge 27 commits intofloooh:mainfrom
Closed
Add Z80 debugger UI: disassembler, CPU debugger, breakpoints#12gunterhager wants to merge 27 commits intofloooh:mainfrom
gunterhager wants to merge 27 commits intofloooh:mainfrom
Conversation
In Zig 0.14+, addIncludePath was moved from Build.Step.Compile to Build.Module. Update the sokol/cimgui dependency hashes to latest. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- src/chips/z80dasm.zig: stateless Z80 disassembler (port of z80dasm.h);
callback-based memory access, handles all prefixes (CB/DD/ED/FD)
- src/ui/ui_dasm.zig: standalone scrollable disassembler window with
navigation back-stack and jump-target buttons for CALL/JP/JR/RST/DJNZ
- src/ui/ui_dbg.zig: comptime-parameterized CPU debugger (bus+cpu types);
step-into/over, breakpoints, execution history, F5/F6/F7/F9 hotkeys
- Integrated into KC85: per-tick execWithDebug() loop, Debug menu wired up
All UI is reusable for other emulators (Namco, Bombjack) via runtime
read_cb and comptime Type(.{.bus=..., .cpu=...}) instantiation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Sorry, I created this in the wrong repository. I wanted to target my fork. |
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.
Summary
src/chips/z80dasm.zig— stateless Z80 disassembler ported fromz80dasm.h; callback-based memory access, handles all prefix bytes (CB/DD/ED/FD), all documented and undocumented instructionssrc/ui/ui_dasm.zig— standalone scrollable disassembler window (512 lines viaImGuiListClipper), navigation back-stack, jump-target arrow buttons for CALL/JP/JR/RST/DJNZsrc/ui/ui_dbg.zig— comptime-parameterized CPU debugger (Type(.{.bus=..., .cpu=...})); step-into/step-over, up to 32 address breakpoints, 256-entry execution history ring buffer, F5/F6/F7/F9 hotkeysexecWithDebug()for per-tick stepping/breakpoint detection, Debug menu wired up,memReadcallbackReusability
Both
ui_dasm(plain struct) andui_dbg(comptime-parameterized) use runtimeread_cbfunction pointers for memory access — no system-specific coupling. Other emulators (Namco, Bombjack) can integrate with:Test plan
zig build run-kc852— emulator starts without crash*indicator appears)🤖 Generated with Claude Code