Skip to main content

MapperDebugInfo

Struct MapperDebugInfo 

pub struct MapperDebugInfo {
Show 16 fields pub mapper_id: u16, pub name: String, pub mirroring: &'static str, pub prg_banks: Vec<(String, String)>, pub chr_banks: Vec<(String, String)>, pub irq_state: Vec<(String, String)>, pub extra: Vec<(String, String)>, pub submapper: u8, pub tier: &'static str, pub prg_rom_size: usize, pub chr_rom_size: usize, pub prg_ram_size: usize, pub chr_ram_size: usize, pub has_battery: bool, pub irq_kind: &'static str, pub expansion_audio: Option<&'static str>,
}
Expand description

Read-only debug snapshot of mapper-internal state for the UI.

Mappers override [Mapper::debug_info] to surface their banking registers and any IRQ-counter state. Fields are pre-formatted strings so the UI doesn’t have to know the protocol of each mapper.

Fields§

§mapper_id: u16

Mapper id (e.g. 4 for MMC3).

§name: String

Human-readable mapper name (e.g. "MMC3 (Sharp)").

§mirroring: &'static str

Current mirroring layout name ("Horizontal", "Vertical", "SingleScreen", "FourScreen").

§prg_banks: Vec<(String, String)>

PRG bank registers — one (label, value) entry per register the mapper exposes. Values are hex-formatted by the mapper.

§chr_banks: Vec<(String, String)>

CHR bank registers — same shape as prg_banks.

§irq_state: Vec<(String, String)>

IRQ counter state — (label, value) pairs, e.g. [("counter", "0x12"), ("reload", "0x80"), ("enabled", "true")].

§extra: Vec<(String, String)>

Free-form extra status (envelope shape, sub-mapper flags, …).

§submapper: u8

NES 2.0 submapper id (0 for iNES 1.0).

§tier: &'static str

Accuracy-evidence tier name ("Core" / "Curated" / "BestEffort"), empty if the id isn’t classified.

§prg_rom_size: usize

PRG-ROM size in bytes.

§chr_rom_size: usize

CHR-ROM size in bytes (0 when the board uses CHR-RAM).

§prg_ram_size: usize

Requested PRG-RAM size in bytes.

§chr_ram_size: usize

Requested CHR-RAM size in bytes (0 when the board ships CHR-ROM).

§has_battery: bool

True when PRG-RAM is battery-backed (save RAM / NVRAM present).

§irq_kind: &'static str

The IRQ mechanism, when the board has one (e.g. "PPU A12 (MMC3)", "PPU scanline (MMC5)", "CPU cycle (VRC/FME-7/N163)"). Empty if the board has no IRQ source.

§expansion_audio: Option<&'static str>

On-cart expansion-audio chip name, if any (e.g. "VRC6").

Trait Implementations§

§

impl Clone for MapperDebugInfo

§

fn clone(&self) -> MapperDebugInfo

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
§

impl Debug for MapperDebugInfo

§

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

Formats the value using the given formatter. Read more
§

impl Default for MapperDebugInfo

§

fn default() -> MapperDebugInfo

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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, 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> Same for T

Source§

type Output = T

Should always be Self
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.