Vdc

Struct Vdc 

Source
pub struct Vdc {
    pub regs: VdcRegisters,
    pub vram: Vec<u16>,
    pub sat: Vec<u16>,
    pub status: u8,
    pub now: i64,
    pub seq: Sequencer,
    pub dma: DmaEngine,
    pub serve: bool,
    pub serve_wanted: bool,
    /* private fields */
}

Fields§

§regs: VdcRegisters§vram: Vec<u16>§sat: Vec<u16>§status: u8§now: i64

master-clock time of the sequencer event being handled

§seq: Sequencer§dma: DmaEngine§serve: bool

The board’s wait (issue 0004; the reference’s serve): set by the board on its VDCs. Unset (a VDC on its own, with no sync to deliver), a wait runs the chip’s own events (wait_alone). Wiring, not state: not in a save state, and a loaded state keeps it.

§serve_wanted: bool

An access stopped at its wait for the board to serve this chip (see the module’s notes).

Implementations§

Source§

impl Vdc

Source

pub fn new( power_on: Option<&mut PythonRandom>, vblank_dots: Option<i64>, vertical_at_line_start: bool, dma_resumes: bool, ) -> Vdc

The reference’s defaults: vblank_dots = Some(-8), vertical_at_line_start = false, dma_resumes = true.

Source

pub fn take_hold(&mut self) -> i64

The master clocks the accesses since the last call asked the CPU to wait (the reference’s hold callable, summed).

Source

pub fn irq1(&self) -> bool

The /IRQ pin: held until the status port is read.

Source

pub fn bsy(&self) -> bool

Source

pub fn next_event(&self) -> Option<i64>

Source

pub fn catch_up(&mut self, mclk: i64)

Source

pub fn hsync(&mut self, mclk: i64, divider: i64)

Source

pub fn vsync(&mut self)

Source

pub fn read(&mut self, offset: u32, mclk: i64) -> u8

Source

pub fn write(&mut self, offset: u32, value: u8, mclk: i64)

Source

pub fn slot_time(&self, mclk: i64) -> i64

Earliest time at or after mclk that the CPU owns a VRAM slot (U1, provisional).

Source

pub fn vphase(&self) -> VPhase

Source

pub fn pixel_row(&self, dots: usize) -> Vec<u16>

The 9-bit VDC output for the line that just ran (drawn by render_line).

Trait Implementations§

Source§

impl Clone for Vdc

Source§

fn clone(&self) -> Vdc

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 Vdc

Source§

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

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

impl<'de> Deserialize<'de> for Vdc

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Vdc

Source§

fn eq(&self, other: &Vdc) -> 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 Serialize for Vdc

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Vdc

Source§

impl StructuralPartialEq for Vdc

Auto Trait Implementations§

§

impl Freeze for Vdc

§

impl RefUnwindSafe for Vdc

§

impl Send for Vdc

§

impl Sync for Vdc

§

impl Unpin for Vdc

§

impl UnwindSafe for Vdc

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,