Mercurial > repos > blastem
comparison genesis.c @ 1304:5b90d7669eee
Fix exit trace mode edge case. Call do_sync if trace mode bit is changed in eori sr
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 28 Mar 2017 09:39:54 -0700 |
parents | 208803173ebc |
children | 1b3fe6e03e7b |
comparison
equal
deleted
inserted
replaced
1303:208803173ebc | 1304:5b90d7669eee |
---|---|
81 /*if (context->int_cycle != old_int_cycle) { | 81 /*if (context->int_cycle != old_int_cycle) { |
82 printf("int cycle changed to: %d, level: %d @ %d(%d), frame: %d, vcounter: %d, hslot: %d, mask: %d, hint_counter: %d\n", context->int_cycle, context->int_num, v_context->cycles, context->current_cycle, v_context->frame, v_context->vcounter, v_context->hslot, context->status & 0x7, v_context->hint_counter); | 82 printf("int cycle changed to: %d, level: %d @ %d(%d), frame: %d, vcounter: %d, hslot: %d, mask: %d, hint_counter: %d\n", context->int_cycle, context->int_num, v_context->cycles, context->current_cycle, v_context->frame, v_context->vcounter, v_context->hslot, context->status & 0x7, v_context->hint_counter); |
83 old_int_cycle = context->int_cycle; | 83 old_int_cycle = context->int_cycle; |
84 }*/ | 84 }*/ |
85 | 85 |
86 if (context->status & M68K_STATUS_TRACE) { | 86 if (context->status & M68K_STATUS_TRACE || context->trace_pending) { |
87 context->target_cycle = context->current_cycle; | 87 context->target_cycle = context->current_cycle; |
88 return; | 88 return; |
89 } | 89 } |
90 | 90 |
91 context->target_cycle = context->int_cycle < context->sync_cycle ? context->int_cycle : context->sync_cycle; | 91 context->target_cycle = context->int_cycle < context->sync_cycle ? context->int_cycle : context->sync_cycle; |