correct vram dma timing in double speed

This commit is contained in:
Alex Janka 2023-04-22 19:10:34 +10:00
parent ec6a7d02b2
commit a5c45b48b9
2 changed files with 6 additions and 2 deletions

View file

@ -522,7 +522,7 @@ where
C: PocketCamera + Send + 'static,
{
pub fn increment_timers(&mut self, machine_cycles: usize) {
let steps = (machine_cycles as usize) * 4;
let steps = machine_cycles * 4;
self.cycle_count += steps;
self.memory.oam_dma_tick(steps);

View file

@ -121,6 +121,10 @@ where
self.set(dest + i, self.get(source + i));
}
}
returning
if self.is_double_speed() {
returning * 2
} else {
returning
}
}
}