pub struct Rom { /* private fields */ }Implementations§
Source§impl Rom
impl Rom
pub fn new(data: Vec<u8>) -> Self
Sourcepub fn load(&self, address: u32) -> u8
pub fn load(&self, address: u32) -> u8
CPU memory address: 0x0000 - 0x1FFF: Character ROM access 0x8000 - 0xFFFF: Program ROM access
To access wide range ROM data with limited CPU memory address space Mapper maps CPU memory address to ROM’s. In general writing control registers in Mapper via .store() switches bank.
pub fn load_without_mapping(&self, address: u32) -> u8
Sourcepub fn store(&mut self, address: u32, value: u8)
pub fn store(&mut self, address: u32, value: u8)
In general writing with ROM address space updates control registers in Mapper.
pub fn valid(&self) -> bool
pub fn has_chr_rom(&self) -> bool
pub fn mirroring_type(&self) -> Mirrorings
pub fn irq_interrupted(&mut self) -> bool
Auto Trait Implementations§
impl Freeze for Rom
impl !RefUnwindSafe for Rom
impl !Send for Rom
impl !Sync for Rom
impl Unpin for Rom
impl !UnwindSafe for Rom
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more