Debug a homebrew Master System ROM that crashes on title screen
Когда использовать: Your WLA-DX build runs fine in your head but Gearsystem freezes on the title screen.
Предварительные требования
- Gearsystem built with MCP enabled — Clone drhelius/Gearsystem and build per MCP_README.md
- The ROM and its .sym symbol file — Output of your assembler (WLA-DX, asm6 etc.)
Поток
-
Launch headless and set a breakpoint at the crash pointLaunch Gearsystem MCP with my ROM. Set a CPU breakpoint at the label
init_vdpand run.✓ Скопировано→ Execution halts at the breakpoint -
Inspect CPU and VRAM stateShow me the Z80 registers and the first 32 bytes of VRAM. Anything look wrong for this point in init?✓ Скопировано→ Register dump + observations about expected vs actual
-
Step through and watch a specific memory regionAdd a memory-access breakpoint on $C000 and step until something writes there.✓ Скопировано→ Stops at the offending instruction
Итог: A root cause (e.g. VDP register written before VRAM is safe) with the exact instruction address.
Подводные камни
- Symbols not loaded — addresses are opaque — Make sure .sym matches the exact ROM build; rebuild to align if needed
- Timing bug only repros on real hardware, not emulator — Emulator has limits; for bus timing edge cases, test on a real SMS