pub trait Backplane {
    fn data_bus(&self) -> u8;
    fn address_bus(&self) -> u16;
    fn read_mode(&self) -> bool;
    fn set_read_mode(&mut self, new_mode: bool);
    fn set_data_bus(&mut self, new_value: u8);
    fn set_address_bus(&mut self, new_value: u16);

    /// Tick
    ///
    /// Master tick method to handle ticking all subsystems.
    fn tick(&mut self);

    /// tick_rom
    ///
    /// Tick a ROM chip
    ///
    /// returns (data_for_databus)
    fn tick_ram(&mut self, address: u16, data: u8, cs: bool, oe: bool, we: bool) -> u8;

    /// tick_rom
    ///
    /// Tick a ROM chip
    ///
    /// returns (data_for_databus)
    fn tick_rom(&mut self, address: u16, cs: bool, oe: bool) -> u8;

    /// tick_via
    ///
    /// Tick a VIA chip
    ///
    /// returns (data, irqa, irqb)
    fn tick_via(&mut self, address: u16, data: u8, cs0: bool, cs1: bool, rw: bool, rs0: bool, rs1: bool) -> (u8, bool, bool);
}

