use crate::mos6502cpu::SIZE_32KB; pub trait RomChip { /// Read /// /// Reads a single byte from the specified address fn read(&self, offset: &u16) -> u8; /// Program /// /// Replaces all data in the ROM chip fn program(new_data: Box<[u8; SIZE_32KB]>) -> Box; } pub trait RamChip: RomChip { fn write(&mut self, offset: &u16, value: &u8); }