comparison 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
comparison
equal deleted inserted replaced
1997:e08c489d5602 1998:0740d90812ee
264 context->target_cycle = context->current_cycle; 264 context->target_cycle = context->current_cycle;
265 return; 265 return;
266 } 266 }
267 267
268 context->target_cycle = context->int_cycle < context->sync_cycle ? context->int_cycle : context->sync_cycle; 268 context->target_cycle = context->int_cycle < context->sync_cycle ? context->int_cycle : context->sync_cycle;
269 if (context->should_return) { 269 if (context->should_return || gen->header.enter_debugger) {
270 context->target_cycle = context->current_cycle; 270 context->target_cycle = context->current_cycle;
271 } else if (context->target_cycle < context->current_cycle) { 271 } else if (context->target_cycle < context->current_cycle) {
272 //Changes to SR can result in an interrupt cycle that's in the past 272 //Changes to SR can result in an interrupt cycle that's in the past
273 //This can cause issues with the implementation of STOP though 273 //This can cause issues with the implementation of STOP though
274 context->target_cycle = context->current_cycle; 274 context->target_cycle = context->current_cycle;