Struct Exrom

Source
pub struct Exrom {
Show 17 fields pub regs: Regs, pub mirroring: Mirroring, pub ppu_status: PpuStatus, pub irq_state: IrqState, pub ex_ram: Vec<u8>, pub chr_banks: Banks, pub prg_ram_banks: Banks, pub prg_rom_banks: Banks, pub tile_cache: u16, pub last_chr_write: ChrBank, pub region: NesRegion, pub pulse1: Pulse, pub pulse2: Pulse, pub dmc: Dmc, pub dmc_mode: u8, pub cpu_cycle: usize, pub pulse_timer: f32,
}
Expand description

ExROM/MMC5 (Mapper 5).

Fields§

§regs: Regs§mirroring: Mirroring§ppu_status: PpuStatus§irq_state: IrqState§ex_ram: Vec<u8>§chr_banks: Banks§prg_ram_banks: Banks§prg_rom_banks: Banks§tile_cache: u16§last_chr_write: ChrBank§region: NesRegion§pulse1: Pulse§pulse2: Pulse§dmc: Dmc§dmc_mode: u8§cpu_cycle: usize§pulse_timer: f32

Implementations§

Source§

impl Exrom

Source

pub fn load(cart: &mut Cart) -> Result<Mapper, Error>

Source

pub fn update_prg_banks(&mut self)

Source

pub fn set_prg_bank_range(&mut self, start: usize, end: usize, bank: usize)

Source

pub fn rom_select(&self, addr: u16) -> bool

Source

pub fn update_chr_banks(&mut self, chr_bank: ChrBank)

Source

pub fn read_ex_ram(&self, addr: u16) -> u8

Source

pub fn write_ex_ram(&mut self, addr: u16, val: u8)

Source

pub const fn inc_fetch_count(&mut self)

Source

pub const fn fetch_count(&self) -> u32

Source

pub const fn sprite8x16(&self) -> bool

Source

pub fn spr_fetch(&self) -> bool

Source

pub const fn nametable_select(&self, addr: u16) -> Nametable

Trait Implementations§

Source§

impl Clock for Exrom

Source§

fn clock(&mut self) -> u64

Clock component a single time, returning the number of cycles clocked.
Source§

impl Clone for Exrom

Source§

fn clone(&self) -> Exrom

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Exrom

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Exrom

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Exrom> for Mapper

Source§

fn from(v: Exrom) -> Mapper

Converts to this type from the input type.
Source§

impl MapRead for Exrom

Source§

fn map_read(&mut self, addr: u16) -> MappedRead

Source§

fn map_peek(&self, addr: u16) -> MappedRead

Source§

impl MapWrite for Exrom

Source§

fn map_write(&mut self, addr: u16, val: u8) -> MappedWrite

Source§

impl Mirrored for Exrom

Source§

fn mirroring(&self) -> Mirroring

Source§

fn set_mirroring(&mut self, mirroring: Mirroring)

Source§

impl OnBusRead for Exrom

Source§

fn on_bus_read(&mut self, _addr: u16, _kind: BusKind)

Source§

impl OnBusWrite for Exrom

Source§

fn on_bus_write(&mut self, addr: u16, val: u8, kind: BusKind)

Source§

impl Regional for Exrom

Source§

fn region(&self) -> NesRegion

Return the current region.
Source§

fn set_region(&mut self, region: NesRegion)

Set the region.
Source§

impl Reset for Exrom

Source§

fn reset(&mut self, _kind: ResetKind)

Reset the component given the ResetKind.
Source§

impl Sample for Exrom

Source§

fn output(&self) -> f32

Output a single audio sample.
Source§

impl Serialize for Exrom

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Sram for Exrom

Source§

fn save(&self, _path: impl AsRef<Path>) -> Result<()>

Save RAM to a given path.
Source§

fn load(&mut self, _path: impl AsRef<Path>) -> Result<()>

Load save RAM from a given path.
Source§

impl TryInto<Exrom> for Mapper

Source§

type Error = &'static str

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

fn try_into(self) -> Result<Exrom, <Self as TryInto<Exrom>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl Freeze for Exrom

§

impl RefUnwindSafe for Exrom

§

impl Send for Exrom

§

impl Sync for Exrom

§

impl Unpin for Exrom

§

impl UnwindSafe for Exrom

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,