From a82ab6d6ba33131a65a31c0c6a6ac5f8dc477516 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Sun, 8 Oct 2023 23:49:40 +0200 Subject: [PATCH] add `CartridgeImpl::tick` (used by gb camera mbc) --- yarge-core/src/bus.rs | 1 + yarge-core/src/bus/cartridge.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/yarge-core/src/bus.rs b/yarge-core/src/bus.rs index 9de042c..1a5d10a 100644 --- a/yarge-core/src/bus.rs +++ b/yarge-core/src/bus.rs @@ -237,5 +237,6 @@ impl MemBus { self.apu.tick(self.timers.get_div_raw()); self.input.tick(&mut self.iif); self.serial.tick(&mut self.iif); + self.cart.tick(); } } diff --git a/yarge-core/src/bus/cartridge.rs b/yarge-core/src/bus/cartridge.rs index 8db009b..c750fe9 100644 --- a/yarge-core/src/bus/cartridge.rs +++ b/yarge-core/src/bus/cartridge.rs @@ -25,6 +25,8 @@ pub trait CartridgeImpl { fn has_save_data(&self) -> bool { false } fn save_data(&self) -> Option> { None } fn load_data(&mut self, data: Vec) {} + + fn tick(&mut self) {} } #[non_exhaustive]