comparison segacd.c @ 2674:07cc0f7109f0

Fix an issue in which CD timer interrupts could get missed, at least with the new interpreter
author Michael Pavone <pavone@retrodev.com>
date Sun, 09 Mar 2025 22:53:04 -0700
parents c6bc66b16392
children
comparison
equal deleted inserted replaced
2673:2c8f541af3c5 2674:07cc0f7109f0
566 } 566 }
567 567
568 static uint32_t next_timer_int(segacd_context *cd) 568 static uint32_t next_timer_int(segacd_context *cd)
569 { 569 {
570 if (cd->timer_pending) { 570 if (cd->timer_pending) {
571 return cd->stopwatch_cycle; 571 return cd->m68k->cycles;
572 } 572 }
573 if (cd->timer_value) { 573 if (cd->timer_value) {
574 return cd->stopwatch_cycle + TIMER_TICK_CLKS * cd->timer_value; 574 return cd->stopwatch_cycle + TIMER_TICK_CLKS * cd->timer_value;
575 } 575 }
576 if (cd->gate_array[GA_TIMER]) { 576 if (cd->gate_array[GA_TIMER]) {