From b88dc02ba056c2b5891b1bb062a2ad44df5df544 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 14 May 2015 00:04:22 -0700 Subject: Sync machine state before entering debugger --- blastem.h | 1 + debug.c | 1 + 2 files changed, 2 insertions(+) diff --git a/blastem.h b/blastem.h index 680fc73..23c62dd 100644 --- a/blastem.h +++ b/blastem.h @@ -52,6 +52,7 @@ extern uint16_t ram[RAM_WORDS]; 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 --git a/debug.c b/debug.c index fa0e26e..11ec9ad 100644 --- a/debug.c +++ b/debug.c @@ -471,6 +471,7 @@ m68k_context * debugger(m68k_context * context, uint32_t address) 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) { -- cgit v1.2.3