pub trait Card: PageHandler + DeviceState {
// Required methods
fn grounds_cd(&self) -> bool;
fn claims(&self) -> Vec<(usize, usize)>;
fn reset(&mut self, kind: ResetKind, pins: &mut BoardPins<'_>);
fn as_any_mut(&mut self) -> &mut dyn Any;
}Expand description
A HuCard: standard ROM, SF2, Populous, Tennokoe, a System Card, …
A card is not confined to the ROM window (a Super System Card claims banks $68-$7F as RAM and the $18C1-$18C6 id registers), and a claim replaces the page’s handler.
Required Methods§
Sourcefn grounds_cd(&self) -> bool
fn grounds_cd(&self) -> bool
The /CD line: a card grounds it so a CD unit can tell one is inserted. [doc: wiki HuCard pinout]
Sourcefn claims(&self) -> Vec<(usize, usize)>
fn claims(&self) -> Vec<(usize, usize)>
Inclusive (first_page, last_page) ranges over the 8192 pages of 256 bytes.
fn reset(&mut self, kind: ResetKind, pins: &mut BoardPins<'_>)
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
For an add-on that knows which card it built (the CD unit and its System Card).