comparison genesis.c @ 1303:208803173ebc

Implemented M68K trace mode. Some edge cases/SR update paths still need work
author Michael Pavone <pavone@retrodev.com>
date Tue, 28 Mar 2017 00:13:35 -0700
parents f17fe0d00626
children 5b90d7669eee
comparison
equal deleted inserted replaced
1302:d2cb97ab3cff 1303:208803173ebc
80 } 80 }
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
86 if (context->status & M68K_STATUS_TRACE) {
87 context->target_cycle = context->current_cycle;
88 return;
89 }
85 90
86 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;
87 if (context->should_return) { 92 if (context->should_return) {
88 context->target_cycle = context->current_cycle; 93 context->target_cycle = context->current_cycle;
89 } else if (context->target_cycle < context->current_cycle) { 94 } else if (context->target_cycle < context->current_cycle) {