This commit is contained in:
@@ -23,6 +23,7 @@ pub struct NativeBus {
|
||||
odd_frame: bool,
|
||||
in_vblank: bool,
|
||||
frame_complete: bool,
|
||||
cpu_cycles_since_poll: u32,
|
||||
mmc3_a12_prev_high: bool,
|
||||
mmc3_a12_low_dots: u16,
|
||||
mmc3_last_irq_scanline: u32,
|
||||
@@ -47,6 +48,7 @@ impl NativeBus {
|
||||
odd_frame: false,
|
||||
in_vblank: false,
|
||||
frame_complete: false,
|
||||
cpu_cycles_since_poll: 0,
|
||||
mmc3_a12_prev_high: false,
|
||||
mmc3_a12_low_dots: 8,
|
||||
mmc3_last_irq_scanline: u32::MAX,
|
||||
@@ -84,6 +86,12 @@ impl NativeBus {
|
||||
pub fn clock_cpu(&mut self, cycles: u8) {
|
||||
self.clock_cpu_cycles(cycles as u32);
|
||||
}
|
||||
|
||||
pub fn take_cpu_cycles_since_poll(&mut self) -> u32 {
|
||||
let cycles = self.cpu_cycles_since_poll;
|
||||
self.cpu_cycles_since_poll = 0;
|
||||
cycles
|
||||
}
|
||||
}
|
||||
|
||||
// CpuBus trait implementation (memory map + side effects).
|
||||
|
||||
Reference in New Issue
Block a user