Mercurial > repos > blastem
comparison segacd.c @ 2136:01fcbcba5cf8
Fix regresion on mcd-verificator CDC flags test
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 19 Mar 2022 00:14:07 -0700 |
parents | 95b3752925e0 |
children | 3ef9456b76cf |
comparison
equal
deleted
inserted
replaced
2135:95b3752925e0 | 2136:01fcbcba5cf8 |
---|---|
549 if (context->status & M68K_STATUS_TRACE || context->trace_pending) { | 549 if (context->status & M68K_STATUS_TRACE || context->trace_pending) { |
550 context->target_cycle = context->current_cycle; | 550 context->target_cycle = context->current_cycle; |
551 return; | 551 return; |
552 } | 552 } |
553 context->target_cycle = context->sync_cycle < context->int_cycle ? context->sync_cycle : context->int_cycle; | 553 context->target_cycle = context->sync_cycle < context->int_cycle ? context->sync_cycle : context->int_cycle; |
554 if (context->target_cycle == cdc_cycle && context->int_num == 5) { | 554 if (context->int_cycle == cdc_cycle && context->int_num == 5) { |
555 uint32_t before = context->target_cycle - 2 * cd->cdc.clock_step; | 555 uint32_t before = context->target_cycle - 2 * cd->cdc.clock_step; |
556 if (before > context->current_cycle) { | 556 if (before < context->target_cycle) { |
557 context->target_cycle = context->sync_cycle = before; | |
558 } else { | |
559 before = context->target_cycle - cd->cdc.clock_step; | |
560 if (before > context->current_cycle) { | 557 if (before > context->current_cycle) { |
561 context->target_cycle = context->sync_cycle = before; | 558 context->target_cycle = context->sync_cycle = before; |
559 } else { | |
560 before = context->target_cycle - cd->cdc.clock_step; | |
561 if (before > context->current_cycle) { | |
562 context->target_cycle = context->sync_cycle = before; | |
563 } | |
562 } | 564 } |
563 } | 565 } |
564 } | 566 } |
565 } | 567 } |
566 | 568 |