Skip to content

Commit

Permalink
add CartridgeImpl::tick (used by gb camera mbc)
Browse files Browse the repository at this point in the history
  • Loading branch information
griffi-gh committed Oct 8, 2023
1 parent 5fe80f1 commit a82ab6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions yarge-core/src/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
2 changes: 2 additions & 0 deletions yarge-core/src/bus/cartridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ pub trait CartridgeImpl {
fn has_save_data(&self) -> bool { false }
fn save_data(&self) -> Option<Vec<u8>> { None }
fn load_data(&mut self, data: Vec<u8>) {}

fn tick(&mut self) {}
}

#[non_exhaustive]
Expand Down

0 comments on commit a82ab6d

Please sign in to comment.