Macro spectrusty_core::ula_io_contention
source · macro_rules! ula_io_contention {
($mc:expr, $port:expr, $hc:ident, $contention:path) => { ... };
}
Expand description
This macro is used to implement the ULA I/O contention scheme, for z80emu::Clock::add_io method of VFrameTsCounter. It’s being exported for the purpose of performing FUSE tests.
- $mc should be a type implementing MemoryContention trait.
- $port is a port address.
- $hc is an identifier of a mutable variable containing the
hc
property of aVideoTs
timestamp. - $contention should be a path to the VideoFrame::contention function.
The macro returns a horizontal timestamp pointing after the whole I/O cycle is over.
The hc
variable is modified to contain a horizontal timestamp indicating when the data R/W operation
takes place.