# HG changeset patch # User Michael Pavone # Date 1431587062 25200 # Node ID 8aa9aacefe1295b0938d084f24eb1119458493bd # Parent 0a6dea8c8083604f087d5d9bb51d2797f61cee58 Sync machine state before entering debugger diff -r 0a6dea8c8083 -r 8aa9aacefe12 blastem.h --- a/blastem.h Wed May 13 23:55:02 2015 -0700 +++ b/blastem.h Thu May 14 00:04:22 2015 -0700 @@ -52,6 +52,7 @@ extern uint8_t z80_ram[Z80_RAM_BYTES]; uint16_t read_dma_value(uint32_t address); +m68k_context * sync_components(m68k_context *context, uint32_t address); m68k_context * debugger(m68k_context * context, uint32_t address); void set_speed_percent(genesis_context * context, uint32_t percent); diff -r 0a6dea8c8083 -r 8aa9aacefe12 debug.c --- a/debug.c Wed May 13 23:55:02 2015 -0700 +++ b/debug.c Thu May 14 00:04:22 2015 -0700 @@ -471,6 +471,7 @@ static uint32_t branch_t; static uint32_t branch_f; m68kinst inst; + sync_components(context, 0); //probably not necessary, but let's play it safe address &= 0xFFFFFF; if (address == branch_t) {