Skip to content

debugger: compare and display CPU addresses through the model's bus mask#112

Merged
LinuxJedi merged 1 commit into
LinuxJedi:mainfrom
codewiz:fix/debugger-addr-mask
Jul 4, 2026
Merged

debugger: compare and display CPU addresses through the model's bus mask#112
LinuxJedi merged 1 commit into
LinuxJedi:mainfrom
codewiz:fix/debugger-addr-mask

Conversation

@codewiz

@codewiz codewiz commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

UI_ADDR_MASK hardcoded A0-A23 across the interactive debugger, so on 020+ machines a breakpoint or watch set at a Zorro III address aliased its 24-bit shadow in chip RAM (both compare sides were masked, so $40001000 and $00001000 were the same breakpoint), and every surface that prints CPU addresses (double-fault OSD, watch/writer reports, stack traces, the memory panel base) truncated 32-bit addresses.

InteractiveBreaks now takes the owning machine's address-bus mask at construction (InteractiveBreaks::new, from address_mask_for_model), the GDB stub and window/console surfaces normalize through machine.ui_addr_mask(), and chip-DMA surfaces (copper breakpoints, blitter pointers) deliberately stay 24-bit. The FIND command still searches the 24-bit space as documented.

Regression test: a Z3 breakpoint under a 32-bit mask no longer matches its chip-RAM alias; the existing 24-bit toggle/mask test is unchanged.

Follow-up to #91's debugger fix; independent of #111.

🤖 Generated with Claude Code

UI_ADDR_MASK hardcoded A0-A23, so on 020+ machines breakpoints and
watches at Zorro III addresses aliased chip RAM and displays truncated
32-bit addresses. Chip-DMA surfaces (copper, blitter) stay 24-bit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codewiz codewiz force-pushed the fix/debugger-addr-mask branch from efd7ab7 to 77f48a7 Compare July 4, 2026 17:00

@LinuxJedi LinuxJedi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely forgot I needed to fix this. I hit it and then got distracted. Many thanks!

@LinuxJedi LinuxJedi merged commit 808ecf0 into LinuxJedi:main Jul 4, 2026
8 checks passed
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.

2 participants