pub struct AdpcmSwitches {
pub base_hz: f64,
pub read_clocks: i64,
pub write_clocks: i64,
pub saturate: bool,
pub output_scale: i32,
pub end_on_write_at_zero: bool,
}Expand description
Switches: behaviours only tier 5 gives, or undecidable between sources (the reference’s
docs/m8-record.md; its Adpcm class attributes, with its defaults).
Fields§
§base_hz: f64Playback rate base: f = base_hz / (16 - n). [hw: pcetech 8; mfr: BIOS manual AD_PLAY “fKHz=32/(16-n)”] 32 kHz; Mednafen uses 32087.5 (a crystal-derived guess, tier 5).
read_clocks: i64Master clocks until $180C bit 7 clears after a $180A read. [hw: pcetech 8: “about
24 cycles in high-speed mode”] 24 CPU cycles x 3. Mednafen: 57 clocks; Mesen2: a RAM slot
model (30 cycles minimum, 32 safe); 0 = immediate.
write_clocks: i64The same for a $180A write (bit 2). [emu: Mesen2: 22 cycles minimum, 24 safe; Mednafen
33 clocks] pcetech: the BIOS polls bit 2 after each write, no time given.
saturate: boolThe 12-bit signal saturates at -2048..2047 (MAME’s MSM5205 model) or wraps (Mesen2, Geargrafx).
output_scale: i3216-bit output per signal unit. 16 would be full scale; Mesen2 and Geargrafx use 10 (headroom for the PSG and CD-DA). Tier 5.
end_on_write_at_zero: boolA write to RAM while the length is zero raises the end flag [emu: Mesen2, Geargrafx]; the BIOS clears it with the length latch afterwards. Mednafen has no such rule.
Trait Implementations§
Source§impl Clone for AdpcmSwitches
impl Clone for AdpcmSwitches
Source§fn clone(&self) -> AdpcmSwitches
fn clone(&self) -> AdpcmSwitches
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more