Skip to main content

ExtendedConsoleType

Enum ExtendedConsoleType 

Source
#[non_exhaustive]
pub enum ExtendedConsoleType {
Show 14 variants Regular, VsSystem, Playchoice10, DecimalModeFamiclone, Epsm, Vt01, Vt02, Vt03, Vt09, Vt32, Vt369, Um6578, FamicomNetworkSystem, Reserved(u8),
}
Expand description

Extended console type: NES 2.0 header byte 13, low nibble, when the console type (byte 7 bits 0-1) is 3.

Values per the Nesdev wiki’s “NES 2.0” page, §“Extended Console Type”. $0-$2 duplicate what byte 7 can already say and exist so a console-type variable can fold both fields together; they are kept distinct here so a header that uses them round-trips. $D-$F are reserved and kept in ExtendedConsoleType::Reserved.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Regular

$0: regular NES / Famicom / Dendy.

§

VsSystem

$1: Nintendo Vs. System.

§

Playchoice10

$2: PlayChoice-10.

§

DecimalModeFamiclone

$3: regular Famiclone with a CPU that supports decimal mode.

§

Epsm

$4: regular NES / Famicom with an EPSM module or plug-through cartridge.

§

Vt01

$5: V.R. Technology VT01 with red/cyan STN palette.

§

Vt02

$6: V.R. Technology VT02.

§

Vt03

$7: V.R. Technology VT03.

§

Vt09

$8: V.R. Technology VT09.

§

Vt32

$9: V.R. Technology VT32.

§

Vt369

$A: V.R. Technology VT369.

§

Um6578

$B: UMC UM6578.

§

FamicomNetworkSystem

$C: Famicom Network System.

§

Reserved(u8)

$D-$F: reserved. The value is the nibble itself (13..=15).

Implementations§

Source§

impl ExtendedConsoleType

Source

pub const fn from_nibble(nibble: u8) -> Self

Decode the byte-13 low nibble (nibble is masked to four bits).

Source

pub const fn to_nibble(self) -> u8

The byte-13 low nibble this type encodes to (0..=15).

Trait Implementations§

Source§

impl Clone for ExtendedConsoleType

Source§

fn clone(&self) -> ExtendedConsoleType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for ExtendedConsoleType

Source§

impl Debug for ExtendedConsoleType

Source§

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

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

impl Eq for ExtendedConsoleType

Source§

impl Hash for ExtendedConsoleType

Source§

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

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
Source§

impl PartialEq for ExtendedConsoleType

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ExtendedConsoleType

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> 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.