PortDevice

Trait PortDevice 

Source
pub trait PortDevice: PageHandler + DeviceState {
    // Required methods
    fn present(&self) -> bool;
    fn claims(&self) -> Vec<(usize, usize)>;
    fn catch_up(&mut self, mclk: i64, pins: &mut BoardPins<'_>);
    fn reset(&mut self, kind: ResetKind, pins: &mut BoardPins<'_>);
    fn as_any_mut(&mut self) -> &mut dyn Any;

    // Provided method
    fn audio_sources(&mut self) -> Vec<&mut dyn AudioSource> { ... }
}
Expand description

The EXT BUS device: A0-A20, D0-D7, /RD, /WR, IRQ2, audio in, K7 (I/O port bit 7).

The video-bus pins (VD0-8, HSYNC, VSYNC, DCK, VCESEL) are not a socket until a device that uses them is found (U13).

Required Methods§

Source

fn present(&self) -> bool

K7: a device on the port pulls the I/O port’s D7 low (“CD unit attached”, C6 polarity).

Source

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

Source

fn catch_up(&mut self, mclk: i64, pins: &mut BoardPins<'_>)

Socket 5: the device keeps its own rational ratio and remainder and runs up to mclk when asked; the board asks at every advance (the reference’s issue 0002).

Source

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

Source

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

Provided Methods§

Source

fn audio_sources(&mut self) -> Vec<&mut dyn AudioSource>

Socket 9: the device’s own mixer inputs (CD-DA, ADPCM), in a fixed order; mixed after the PSG.

Implementors§