changeset 721:20be7d01e312

Better handling of savestate and debug break events with "uncooperative" games/demos
author Michael Pavone <pavone@retrodev.com>
date Wed, 20 May 2015 23:34:12 -0700
parents 15d9359fd771
children 8f5339961903
files blastem.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;