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