DS: Lengthen CPU timeslices if the ARM7 is halted

This commit is contained in:
Vicki Pfau 2021-07-02 03:29:45 -07:00
parent e4d9ade08e
commit fdaccc16f1
1 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,10 @@ static void _slice(struct mTiming* timing, void* context, uint32_t cyclesLate) {
} else {
ds->activeCpu = ds->ds9.cpu;
ds->cycleDrift -= cycles << 1;
int32_t nextEvent = mTimingNextEvent(&ds->ds7.timing) << 1;
if (!ds->ds7.cpu->halted || nextEvent < SLICE_CYCLES) {
nextEvent = SLICE_CYCLES;
}
cycles = ds->cycleDrift + SLICE_CYCLES;
timing = &ds->ds9.timing;
}