VideoPage

Struct VideoPage 

Source
pub struct VideoPage {
    pub vpc: Vpc,
    pub compat: bool,
    pub st_steers_in_compat: bool,
}
Expand description

The video chip area, $FF:0000-03FF (four 256-byte pages): what the VPC decodes.

Native mode [hw: sgxtech, “HuC6280 memory map”], a 32-byte block repeated through the 1 KiB:

    $00-$03 VDC 1   $04-$07 VDC 1 (mirror)   $08-$0F VPC   $10-$13 VDC 2
    $14-$17 VDC 2 (mirror)   $18-$1F unused, reads $FF

PC Engine compatibility mode (the switch on the back): VDC 1 alone, mirrored every 4 bytes, as on a PC Engine, for games that use those mirrors. Whether the CPU’s current write is an ST0/ST1/ST2 is pins.opcode (the VPC sees the instruction, not the address).

This is the board’s PixelPath: the mix is vpc’s.

Fields§

§vpc: Vpc§compat: bool

The back-panel switch: true is the PC Engine position.

§st_steers_in_compat: bool

U-SGX4: whether ST0-ST2 still follow $0E bit 0 with the switch in compatibility mode. $0E cannot be written in that mode (it is a VDC 1 mirror), so the bit is only ever left over from native mode; nothing documents it. Default: no steering in compatibility mode.

Implementations§

Source§

impl VideoPage

Source

pub fn new(vpc: Vpc, compat: bool) -> VideoPage

Trait Implementations§

Source§

impl Clone for VideoPage

Source§

fn clone(&self) -> VideoPage

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 VideoPage

Source§

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

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

impl DeviceState for VideoPage

Source§

fn save_state(&self) -> Vec<u8> ⓘ

Everything of the device that changes as the console runs.
Source§

fn load_state(&mut self, data: &[u8]) -> Result<(), String>

Put the device in a saved state. A device without state accepts only an empty one.
Source§

fn state_identity(&self) -> String

What the device is and which media it holds (a card’s ROM by its SHA-1, a disc by its table of contents): a state is refused by a system whose device answers otherwise.
Source§

impl PartialEq for VideoPage

Source§

fn eq(&self, other: &VideoPage) -> 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.
Source§

impl PixelPath for VideoPage

Source§

fn claims(&self) -> Vec<(usize, usize)>

The VPC decodes the whole 1 KiB video chip area: four pages of the hardware page.

Source§

fn reset(&mut self, kind: ResetKind, _pins: &mut BoardPins<'_>)

The reference’s SuperGrafx.reset, after the board’s own: a power-on resets the VPC.

Source§

fn mix(&mut self, timing: &VideoTiming, rows: Vec<Vec<u16>>) -> Vec<u16>

Source§

fn read(&mut self, address: u32, mclk: i64, pins: &mut BoardPins<'_>) -> u8

Source§

fn write( &mut self, address: u32, value: u8, mclk: i64, pins: &mut BoardPins<'_>, )

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Source§

impl Eq for VideoPage

Source§

impl StructuralPartialEq for VideoPage

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.