# HG changeset patch # User Michael Pavone # Date 1432190052 25200 # Node ID 20be7d01e312b6df30536d6f8158683c0feed76c # Parent 15d9359fd771ceeaeb4587a7d7d39348c4a3b38e Better handling of savestate and debug break events with "uncooperative" games/demos diff -r 15d9359fd771 -r 20be7d01e312 blastem.c --- a/blastem.c Wed May 20 22:27:51 2015 -0700 +++ b/blastem.c Wed May 20 23:34:12 2015 -0700 @@ -251,6 +251,9 @@ 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 @@ 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;