PcEngineCd

Struct PcEngineCd 

Source
pub struct PcEngineCd {
    pub system_card: Vec<u8>,
    pub disc: Option<Disc>,
    pub super_system_card: Option<bool>,
    pub region_us: bool,
    pub bram: Option<Vec<u8>>,
    pub arcade_card: bool,
    pub switches: CdSwitches,
    pub board: BoardOptions,
}
Expand description

A CD-ROM² system. system_card is the BIOS image (bring your own).

Fields§

§system_card: Vec<u8>§disc: Option<Disc>§super_system_card: Option<bool>

None: a 256 KiB image is a Super System Card (U37)

§region_us: bool§bram: Option<Vec<u8>>

the backup RAM’s content (None: formatted and empty, U36)

§arcade_card: bool§switches: CdSwitches§board: BoardOptions

The base board’s options (machine row, pad, switches); card and port are replaced.

Implementations§

Source§

impl PcEngineCd

Source

pub fn new(system_card: &[u8], disc: Option<Disc>) -> PcEngineCd

Source

pub fn make_unit( disc: Option<Disc>, bram: Option<&[u8]>, arcade_card: bool, switches: &CdSwitches, ) -> Result<CdUnit, String>

The unit as this description builds it (the tests drive it without a board).

Source

pub fn build_board(self) -> Result<Board, String>

The board with the System Card in the slot and the unit on the port.

Source

pub fn build(self) -> Result<System, String>

The real HuC6280 core on this board.

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