Struct Rom

Source
pub struct Rom { /* private fields */ }

Implementations§

Source§

impl Rom

Source

pub fn new(data: Vec<u8>) -> Self

Source

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.

Source

pub fn load_without_mapping(&self, address: u32) -> u8

Source

pub fn store(&mut self, address: u32, value: u8)

In general writing with ROM address space updates control registers in Mapper.

Source

pub fn valid(&self) -> bool

Source

pub fn has_chr_rom(&self) -> bool

Source

pub fn mirroring_type(&self) -> Mirrorings

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.