From c16bdc99580a5867127efb1fad51c79f7c0804a7 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 20 May 2015 23:34:12 -0700 Subject: Better handling of savestate and debug break events with "uncooperative" games/demos --- blastem.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'blastem.c') diff --git a/blastem.c b/blastem.c index 60a5fa6..148b6c4 100644 --- a/blastem.c +++ b/blastem.c @@ -251,6 +251,9 @@ m68k_context * sync_components(m68k_context * context, uint32_t address) vdp_int_ack(v_context, context->int_ack); context->int_ack = 0; } + if (!address && (break_on_sync || save_state)) { + context->sync_cycle = context->current_cycle + 1; + } adjust_int_cycle(context, v_context); if (address) { if (break_on_sync) { @@ -265,6 +268,7 @@ m68k_context * sync_components(m68k_context * context, uint32_t address) sync_z80(z_context, z_context->current_cycle + MCLKS_PER_Z80); } save_gst(gen, "savestate.gst", address); + puts("Saved state to savestate.gst"); } } return context; -- cgit v1.2.3