pub struct SystemCard {
pub super_system_card: bool,
pub region_us: bool,
pub ram: Option<Vec<u8>>,
/* private fields */
}Fields§
§super_system_card: bool§region_us: bool§ram: Option<Vec<u8>>the Super System Card’s RAM (None on a System Card v1/v2)
Implementations§
Source§impl SystemCard
impl SystemCard
Sourcepub fn new(
data: &[u8],
super_system_card: Option<bool>,
region_us: bool,
) -> Result<SystemCard, String>
pub fn new( data: &[u8], super_system_card: Option<bool>, region_us: bool, ) -> Result<SystemCard, String>
super_system_card: None decides by the image’s size (256 KiB is a Super System Card).
Sourcepub fn data(&self) -> &[u8] ⓘ
pub fn data(&self) -> &[u8] ⓘ
The BIOS image (the copier header stripped, padded to whole banks).
Sourcepub fn register_read(&self, offset: u8) -> u8
pub fn register_read(&self, offset: u8) -> u8
$18C0 + offset, called by the CD unit (it owns the page).
Trait Implementations§
Source§impl Card for SystemCard
impl Card for SystemCard
Source§fn 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]
Source§fn 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<'_>)
Source§fn 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).
Source§impl DeviceState for SystemCard
impl DeviceState for SystemCard
Source§fn load_state(&mut self, data: &[u8]) -> Result<(), String>
fn load_state(&mut self, data: &[u8]) -> Result<(), String>
Put the device in a saved state. A device without state accepts only an empty one.
Source§fn state_identity(&self) -> String
fn state_identity(&self) -> String
What the device is and which media it holds (a card’s ROM by its SHA-1, a disc by its
table of contents): a state is refused by a system whose device answers otherwise.
Auto Trait Implementations§
impl Freeze for SystemCard
impl RefUnwindSafe for SystemCard
impl Send for SystemCard
impl Sync for SystemCard
impl Unpin for SystemCard
impl UnwindSafe for SystemCard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more