diff genesis.c @ 1998:0740d90812ee

Enter debugger when a VDP data port read would cause a CPU lockup
author Mike Pavone <pavone@retrodev.com>
date Sun, 28 Jun 2020 22:53:52 -0700
parents 71732f2f6f42
children b05295c2ad04
line wrap: on
line diff
--- a/genesis.c	Sun Jun 28 21:31:09 2020 -0700
+++ b/genesis.c	Sun Jun 28 22:53:52 2020 -0700
@@ -266,7 +266,7 @@
 	}
 
 	context->target_cycle = context->int_cycle < context->sync_cycle ? context->int_cycle : context->sync_cycle;
-	if (context->should_return) {
+	if (context->should_return || gen->header.enter_debugger) {
 		context->target_cycle = context->current_cycle;
 	} else if (context->target_cycle < context->current_cycle) {
 		//Changes to SR can result in an interrupt cycle that's in the past