use crate::gb::ppu::Ppu;
pub trait GbBus {
fn read(&mut self, addr: u16) -> u8;
fn write(&mut self, addr: u16, val: u8);
fn tick(&mut self, _m_cycles: u8) {}
fn begin_instruction(&mut self) {}
fn notify_idu_glitch(&mut self, _addr: u16) {}
fn notify_idu_with_prior_read(&mut self, _addr: u16) {}
fn notify_oam_read(&mut self, _addr: u16) {}
fn notify_oam_write(&mut self, _addr: u16) {}
fn ppu(&self) -> &Ppu {
panic!("ppu() not available on this bus implementation")
}
fn ppu_mut(&mut self) -> &mut Ppu {
panic!("ppu_mut() not available on this bus implementation")
}
fn read_for_debugger(&self, _addr: u16) -> u8 {
panic!("read_for_debugger() not available on this bus implementation")
}
}
pub struct StubBus;
impl GbBus for StubBus {
fn read(&mut self, _addr: u16) -> u8 {
0xFF
}
fn write(&mut self, _addr: u16, _val: u8) {}
}