pub struct ScsiBus {Show 27 fields
pub disc: Option<Rc<Disc>>,
pub cdda: CddaPlayer,
pub switches: ScsiSwitches,
pub now: i64,
pub log: Vec<(i64, String)>,
pub record_log: bool,
pub irq_changes: Vec<(u8, bool)>,
pub bsy: bool,
pub sel: bool,
pub cd: bool,
pub io: bool,
pub msg: bool,
pub req: bool,
pub ack: bool,
pub atn: bool,
pub rst: bool,
pub phase: Phase,
pub data_port: u8,
pub read_port: u8,
pub message_done: bool,
pub sector: i64,
pub sectors_left: i64,
pub last_lba: i64,
pub cmd: Vec<u8>,
pub out: VecDeque<u8>,
pub sense_key: u8,
pub sense_asc: u8,
/* private fields */
}Expand description
Signals, phase, timers and the command set. irq_changes collects (mask, level) when the
REQ-held-in-a-phase conditions change (mask 0x40 data in, 0x20 status/message).
Fields§
§disc: Option<Rc<Disc>>§cdda: CddaPlayer§switches: ScsiSwitches§now: i64§log: Vec<(i64, String)>(mclk, text) of commands, for the tests and runs
record_log: bool§irq_changes: Vec<(u8, bool)>§bsy: bool§sel: bool§cd: bool§io: bool§msg: bool§req: bool§ack: bool§atn: bool§rst: bool§phase: Phase§data_port: u8what the CPU wrote
read_port: u8what the drive presents
message_done: bool§sector: i64next LBA to deliver
sectors_left: i64§last_lba: i64where the head is (for seek times)
cmd: Vec<u8>§out: VecDeque<u8>§sense_key: u8§sense_asc: u8Implementations§
Source§impl ScsiBus
impl ScsiBus
pub fn new(disc: Option<Rc<Disc>>, cdda: CddaPlayer) -> ScsiBus
pub fn reset(&mut self)
Sourcepub fn status_bits(&self) -> u8
pub fn status_bits(&self) -> u8
$1800 read: I/O D3, C/D D4, MSG D5, REQ D6, BSY D7 [emu: all].
pub fn current_lba(&self) -> i64
pub fn next_event(&self) -> Option<i64>
Sourcepub fn status_message(&mut self, status: u8, message: u8, length: usize)
pub fn status_message(&mut self, status: u8, message: u8, length: usize)
Enter the status phase with status; length message bytes follow.
pub fn good_status(&mut self)
Sourcepub fn select(&mut self)
pub fn select(&mut self)
A write to $1800: SEL pulses. From any phase but data in this starts a command.
pub fn write_data(&mut self, value: u8)
pub fn read_data(&self) -> u8
pub fn set_ack(&mut self, level: bool)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ScsiBus
impl<'de> Deserialize<'de> for ScsiBus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ScsiBus
impl !RefUnwindSafe for ScsiBus
impl !Send for ScsiBus
impl !Sync for ScsiBus
impl Unpin for ScsiBus
impl !UnwindSafe for ScsiBus
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