Expand description
On-device SIO0 transport for a physical memory card (feature hw).
Talks the raw card protocol byte by byte: assert the port, clock 0x81 to
address the card, then a Read (0x52) or Write (0x57) command frame. The
serial link is psx-io’s shared Transport, the one psx-pad polls
controllers with: the same select, the same ACK-paced byte exchange that
watches the live /ACK level, the same release. A card’s own timing is a
longer /ACK budget, because its write commit stalls between bytes while
flash settles.
A HardwareCard holds the controller port while it exists: either the
ControllerPort token itself (HardwareCard::on_port with the token,
and release gives it back) or a &mut borrow of
one the program keeps for polling pads between saves.
Timing is exposed as a runtime knob (HardwareCard::on_port_with_timing)
because real silicon varies: the emulator ACKs instantly, an official card
needs the setup delay, and a write commit may need a longer ACK wait than a
pad byte.
HardwareCard::last_trace exposes bounded transport diagnostics. In
particular, an /ACK timeout is never silently treated as a successful
exchange: the rest of that transaction is aborted and the first failing byte
remains visible to an on-console diagnostic.
Structs§
- Hardware
Card - A physical memory card reached over SIO0.
- Timing
- Tunable transfer timing (bounded MMIO spin counts). Defaults mirror the pad.
- Transport
Trace - Compact evidence from the latest raw read/write transaction.
Enums§
- Transport
Fault - The first low-level failure observed in the latest frame transaction.
Type Aliases§
- Slot
- Which controller/card port to use.