Trait spectrusty::bus::ay::AyPortDecode
source · pub trait AyPortDecode: Debug {
const PORT_MASK: u16;
const PORT_SELECT: u16;
const PORT_DATA_READ: u16;
const PORT_DATA_WRITE: u16;
fn is_select(port: u16) -> bool { ... }
fn is_data_read(port: u16) -> bool { ... }
fn is_data_write(port: u16) -> bool { ... }
fn write_ay_io<T, R, A, B>(
ay_io: &mut Ay3_891xIo<T, R, A, B>,
port: u16,
data: u8,
timestamp: T
) -> bool
where
A: AyIoPort<Timestamp = T>,
B: AyIoPort<Timestamp = T>,
R: AyRegRecorder<Timestamp = T>,
{ ... }
}
Expand description
A helper trait for matching I/O port addresses for AY-3-8910.
Required Associated Constants§
sourceconst PORT_SELECT: u16
const PORT_SELECT: u16
A mask of address bus bit values - for the register selection function.
sourceconst PORT_DATA_READ: u16
const PORT_DATA_READ: u16
A mask of address bus bit values - for the reading from the selected register function.
sourceconst PORT_DATA_WRITE: u16
const PORT_DATA_WRITE: u16
A mask of address bus bit values - for the writing to the selected register function.
Provided Methods§
sourcefn is_select(port: u16) -> bool
fn is_select(port: u16) -> bool
Return true
if the port matches the register selection function.
sourcefn is_data_read(port: u16) -> bool
fn is_data_read(port: u16) -> bool
Return true
if the port matches the register reading function.
sourcefn is_data_write(port: u16) -> bool
fn is_data_write(port: u16) -> bool
Return true
if the port matches the register writing function.
sourcefn write_ay_io<T, R, A, B>(
ay_io: &mut Ay3_891xIo<T, R, A, B>,
port: u16,
data: u8,
timestamp: T
) -> boolwhere
A: AyIoPort<Timestamp = T>,
B: AyIoPort<Timestamp = T>,
R: AyRegRecorder<Timestamp = T>,
fn write_ay_io<T, R, A, B>(
ay_io: &mut Ay3_891xIo<T, R, A, B>,
port: u16,
data: u8,
timestamp: T
) -> boolwhere
A: AyIoPort<Timestamp = T>,
B: AyIoPort<Timestamp = T>,
R: AyRegRecorder<Timestamp = T>,
A helper for writing data to one of the functions decoded from port
address.