pub struct FakePort {
pub fill: u8,
pub present: bool,
pub reads: Vec<(u32, i64)>,
pub writes: Vec<(u32, u8, i64)>,
pub resets: Vec<ResetKind>,
pub caught_up: Vec<i64>,
pub alarm_due: Option<i64>,
/* private fields */
}Expand description
An expansion-port device: grounds nothing, but its presence pulls the I/O port’s D7 low and it can hold IRQ2.
Fields§
§fill: u8§present: bool§reads: Vec<(u32, i64)>§writes: Vec<(u32, u8, i64)>§resets: Vec<ResetKind>§caught_up: Vec<i64>§alarm_due: Option<i64>The reference’s Alarm subclass: IRQ2 is raised once catch_up reaches this time.
Implementations§
Trait Implementations§
Source§impl DeviceState for FakePort
impl DeviceState for FakePort
Source§fn load_state(&mut self, data: &[u8]) -> Result<(), String>
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
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 PageHandler for FakePort
impl PageHandler for FakePort
Source§impl PortDevice for FakePort
impl PortDevice for FakePort
Source§fn present(&self) -> bool
fn present(&self) -> bool
K7: a device on the port pulls the I/O port’s D7 low (“CD unit attached”, C6 polarity).
fn claims(&self) -> Vec<(usize, usize)>
Source§fn catch_up(&mut self, mclk: i64, pins: &mut BoardPins<'_>)
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).fn reset(&mut self, kind: ResetKind, _pins: &mut BoardPins<'_>)
fn as_any_mut(&mut self) -> &mut dyn Any
Source§fn audio_sources(&mut self) -> Vec<&mut dyn AudioSource>
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.
Auto Trait Implementations§
impl Freeze for FakePort
impl RefUnwindSafe for FakePort
impl Send for FakePort
impl Sync for FakePort
impl Unpin for FakePort
impl UnwindSafe for FakePort
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more