Skip to main content

PpuRevision

Enum PpuRevision 

pub enum PpuRevision {
    Rp2c02H,
    Rp2c02G,
}
Expand description

v2.1.7 P5 — selectable 2C02 die revision, gating revision-dependent quirks.

Additive and default-off: the Default (Self::Rp2c02H) preserves RustyNES’s established behavior byte-for-byte, so AccuracyCoin, the commercial oracle, and the visual / audio regression suites are unaffected at the default. Only the opt-in Self::Rp2c02G selection changes any emulated behavior (see below).

Real RP2C02 dies shipped across several letter revisions. The one behavioral difference RustyNES currently models per-revision is the OAMADDR ($2003) write-during-rendering OAM corruption glitch: writing $2003 while rendering is enabled on a visible / pre-render scanline copies one 8-byte OAM “row” from row 0 over the row the write’s high bits target, on the next rendered dot (the same CorruptOAM mechanism the rendering-disable model uses; see Ppu::process_oam_corruption). A handful of titles — notably Huge Insect — trip it. It is not enabled on the default revision.

Honesty note (see docs/accuracy-ledger.md): the exact mapping of the $2003 corruption onto specific 2C02 letter revisions is not firmly established in the public literature, and the precise per-title byte output of the glitch is not independently oracle-verified in this cut. RustyNES therefore offers the model as an opt-in approximation keyed to a single “earlier revision” selection (Self::Rp2c02G) rather than claiming exact silicon-revision fidelity. This is config, not save-state: like [PpuRegion] it is re-applied on load and is not part of the snapshot.

Variants§

§

Rp2c02H

Default. Later RP2C02 die (the “H”-class revision RustyNES has always modeled). The OAMADDR ($2003) write-during-rendering OAM corruption is not modeled, so the deterministic output is byte-identical to a build without this feature.

§

Rp2c02G

Earlier RP2C02 die (“rev E+” in the nesdev notes). Additionally models the OAMADDR ($2003) write-during-rendering OAM row-corruption glitch that Huge Insect and a few other titles trip. Opt-in; changes emulated behavior only for software that writes $2003 mid-render.

Implementations§

§

impl PpuRevision

pub const fn models_oamaddr_corruption(self) -> bool

Whether this revision models the OAMADDR ($2003) write-during-rendering OAM corruption glitch. Only Self::Rp2c02G does; the default returns false, keeping the default build byte-identical.

Trait Implementations§

§

impl Clone for PpuRevision

§

fn clone(&self) -> PpuRevision

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 PpuRevision

§

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

Formats the value using the given formatter. Read more
§

impl Default for PpuRevision

§

fn default() -> PpuRevision

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

impl Hash for PpuRevision

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl PartialEq for PpuRevision

§

fn eq(&self, other: &PpuRevision) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for PpuRevision

§

impl Eq for PpuRevision

§

impl StructuralPartialEq for PpuRevision

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.