Card

Trait Card 

Source
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§

Source

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]

Source

fn claims(&self) -> Vec<(usize, usize)>

Inclusive (first_page, last_page) ranges over the 8192 pages of 256 bytes.

Source

fn reset(&mut self, kind: ResetKind, pins: &mut BoardPins<'_>)

Source

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).

Implementors§