summaryrefslogtreecommitdiff
path: root/blastem.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2015-05-20 23:34:12 -0700
committerMichael Pavone <pavone@retrodev.com>2015-05-20 23:34:12 -0700
commitc16bdc99580a5867127efb1fad51c79f7c0804a7 (patch)
treeb2c20890e10ba70f590bf786df445e1fc504f9ce /blastem.c
parent73ffeecaebbc313eb5713d779622b6e91cc72675 (diff)
Better handling of savestate and debug break events with "uncooperative" games/demos
Diffstat (limited to 'blastem.c')
-rw-r--r--blastem.c4
1 files changed, 4 insertions, 0 deletions
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;