; Full VICE debug session for c64os.prg ; Launch with examples/vice-debug-c64os.bat, then in the monitor run: ; playback "examples/vice-monitor-c64os-debug.txt" radix H device c: sidefx off ; Give useful labels to the known startup locations. add_label $0801 .basic_stub add_label $0810 .start ; Break when BASIC transfers control to the machine code entry. break exec .start ; Watch memory banking changes and dump the CPU port state when they happen. watch store $0001 command 2 "m $0000 $0002" ; Watch IRQ vector changes in case startup or later code patches them. watch store $0314 $0315 ; Show the BASIC stub, startup code, and current CPU port state. d .basic_stub $0840 m $0000 $0002 r ; Helpful follow-up commands once the first breakpoint triggers: ; step ; step into the next instruction ; next ; step over KERNAL calls ; return ; run until the current subroutine exits ; bt ; show JSR call chain ; io $d000 ; inspect VIC-II registers ; io $dc00 ; inspect CIA #1 registers ; keybuf "help\x0d" ; inject a HELP command into the shell stop