ScsiSwitches

Struct ScsiSwitches 

Source
pub struct ScsiSwitches {
Show 13 fields pub sel_to_command_phase: i64, pub next_command_byte_req: i64, pub test_unit_ready: i64, pub toc_answer: i64, pub subq_answer: i64, pub done_status: i64, pub abort_to_command: i64, pub ack_clear: i64, pub sector_clocks: i64, pub reread_penalty_ms: i64, pub seek_scale: f64, pub toc_answer_bytes: [usize; 3], pub unknown_command_check_condition: bool,
}
Expand description

Timing (master clocks), provisional; tier in the comment. The reference’s ScsiBus class attributes, with its defaults.

[emu: Mesen2, “approximations … haven’t been validated beyond what validator.pce checks”] Mesen2 counts these in units of 3 master clocks (one fast CPU cycle); converted here.

Fields§

§sel_to_command_phase: i64

tier 5: SEL to the drive entering the command phase

§next_command_byte_req: i64

tier 5: REQ for the next command byte

§test_unit_ready: i64

tier 5, deliberately ~100x shorter than the real spin-up

§toc_answer: i64

tier 5

§subq_answer: i64

tier 5

§done_status: i64

tier 5: last data byte taken to the good status

§abort_to_command: i64

tier 5: SEL during data in (“verificator.pce”)

§ack_clear: i64

tier 5: an auto-ack pulse (“hardware measurements show ~1 us”)

§sector_clocks: i64

[hw: Red Book] single speed: 75 sectors a second; one sector’s bytes are delivered this often (tier 2 for the rate, the delivery phase is U8).

§reread_penalty_ms: i64

[emu: Mesen2 comment, Sherlock Holmes] software that misses a sector waits for a re-read; tier 5

§seek_scale: f64

The seek model is seek.rs (Shadoff’s measurements, tier 3 for the shape).

§toc_answer_bytes: [usize; 3]

Bytes in the READ TOC answers for kinds 0 (first/last track), 1 (lead-out), 2 (a track). Mednafen sends 2, 3, 4 (“returned data lengths on real PCE are not confirmed”, its own comment); Mesen2 sends 4, 4, 4 (C15). Tier 5 both; the BIOS must read the same number.

§unknown_command_check_condition: bool

An opcode the drive does not know (C22): Good status with no data [emu: Mesen2, Geargrafx], or CHECK CONDITION with ILLEGAL REQUEST / INVALID COMMAND for REQUEST SENSE to report [emu: Mednafen scsicd.cpp; the SCSI-2 rule for an unsupported opcode, which this drive is not known to follow]. True selects the second. Either way the answer comes at the first byte (Mednafen first waits for its opcode group’s CDB length).

Trait Implementations§

Source§

impl Clone for ScsiSwitches

Source§

fn clone(&self) -> ScsiSwitches

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScsiSwitches

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ScsiSwitches

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ScsiSwitches

Source§

fn eq(&self, other: &ScsiSwitches) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ScsiSwitches

Source§

impl StructuralPartialEq for ScsiSwitches

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.