mos6502/core/src/periph/rom_chip.rs
Trevor Merritt e5c2319803 removes sccache
updates display of ben eater pc
doesnt blow up when creating a rom chip anymore
doesnt blow up when creating a pc anymore
2025-06-28 12:37:01 -04:00

17 lines
383 B
Rust

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<Self>;
}
pub trait RamChip: RomChip {
fn write(&mut self, offset: &u16, value: &u8);
}