diff --git a/src/mos6502.c b/src/mos6502.c index 3a05b41..1c0c9e7 100644 --- a/src/mos6502.c +++ b/src/mos6502.c @@ -14,6 +14,7 @@ #include "log.h" #include "mos6502.h" #include "mos6502.dis.h" +#include "vm_debug.h" // All of our address modes, instructions, etc. are defined here. #include "mos6502.enums.h" @@ -363,6 +364,10 @@ mos6502_execute(mos6502 *cpu) mos6502_address_resolver resolver; mos6502_instruction_handler handler; + if (vm_debug_broke(cpu->PC)) { + return; + } + opcode = mos6502_get(cpu, cpu->PC); // The disassembler knows how many bytes each operand requires