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: i64master-clock time of the sequencer event being handled
seq: Sequencer§dma: DmaEngine§serve: boolThe 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: boolAn access stopped at its wait for the board to serve this chip (see the module’s notes).
Implementations§
Source§impl Vdc
impl Vdc
Sourcepub fn new(
power_on: Option<&mut PythonRandom>,
vblank_dots: Option<i64>,
vertical_at_line_start: bool,
dma_resumes: bool,
) -> Vdc
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.
Sourcepub fn take_hold(&mut self) -> i64
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).
pub fn bsy(&self) -> bool
Sourcepub fn next_event(&self) -> Option<i64>
pub fn next_event(&self) -> Option<i64>
The fork: the earliest of the three by hand (the base board folds an array of options through an iterator, which the compiler does not flatten).
pub fn catch_up(&mut self, mclk: i64)
pub fn hsync(&mut self, mclk: i64, divider: i64)
pub fn vsync(&mut self)
pub fn read(&mut self, offset: u32, mclk: i64) -> u8
pub fn write(&mut self, offset: u32, value: u8, mclk: i64)
Sourcepub fn slot_time(&self, mclk: i64) -> i64
pub fn slot_time(&self, mclk: i64) -> i64
Earliest time at or after mclk that the CPU owns a VRAM slot (U1, provisional).