pub struct PsgSwitches {Show 13 fields
pub write_wave_while_playing: bool,
pub dda_latch_needs_on: bool,
pub r6_overrides_sample_while_on: bool,
pub keyon_mode: KeyOnMode,
pub lfo_requires_ch2_on: bool,
pub lfo_zero_multiplier: i64,
pub lfo_mask12: bool,
pub lf_trg_halts_always: bool,
pub scale_table_quirk: bool,
pub silent_units: usize,
pub render_audio: bool,
pub noise_zero_period: i64,
pub noise_free_running: bool,
}Expand description
The points on which the manual and pcetech are silent or the two readable emulators differ
(docs/m4-record.md, C13-C23). Each default below follows the manual or pcetech where they
speak, else the larger share of the sources; variant flips them to one emulator’s way.
Fields§
§write_wave_while_playing: boolC13: data written to R6 while a channel is ON and not DDA. pcetech: ignored, the index does not move. MAME and Mednafen store it in the waveform. True follows the two emulators.
dda_latch_needs_on: boolC16: R6 in DDA mode loads the DAC latch: the manual says whenever DDA is set (also with the channel off); Mednafen only with the channel on, and it also lets an R6 write while playing override the sample until the next address step (“tested on a SuperGrafx”).
r6_overrides_sample_while_on: bool§keyon_mode: KeyOnModeC22: neither reading is in the manual.
lfo_requires_ch2_on: boolC18: the LFO acts only when channel 2 is on (manual); MAME modulates whatever channel 2 is.
lfo_zero_multiplier: i64C19: the LFO frequency register 0: 256 (Mednafen) or 1 (MAME’s zero-length counter).
lfo_mask12: boolU6: the modulated frequency wraps in 12 bits (Mednafen) or not (MAME).
lf_trg_halts_always: boolC23: LF TRG (R9 bit 7) halts channel 2 whatever LF CTL holds (Mednafen); MAME only with LF CTL non-zero.
scale_table_quirk: boolC15: R1/R5’s table: the manual says 3 dB a step; both emulators share a table in which the
step from 7 to 8 is 1.5 dB and from 8 to 9 4.5 dB (index 8 costs 15 units, not 14). The
sixteen values in scale are that table, as in MAME’s c6280.cpp (BSD-3-Clause, Charles
MacDonald; see the reference’s NOTICE.md).
silent_units: usizeC14: attenuation at which a channel goes silent, in 1.5 dB units. The manual: 45 dB (30). Both emulators keep a 31st step (46.5 dB) that is still audible.
render_audio: boolFalse skips the host-rate output.
noise_zero_period: i64C17: noise frequency NF’ = 0 (“undefined” in the manual). MAME clocks the shift register every step; Mednafen every 32. 32 here.
noise_free_running: boolC20: the noise shift register runs whether or not noise is selected (Mednafen); MAME runs it only while a channel is playing noise.
Implementations§
Source§impl PsgSwitches
impl PsgSwitches
Sourcepub fn variant(name: &str) -> Option<PsgSwitches>
pub fn variant(name: &str) -> Option<PsgSwitches>
Each readable emulator’s way on the disputed points (the reference’s VARIANTS):
"manual" (the defaults), "mame", "mednafen".
Trait Implementations§
Source§impl Clone for PsgSwitches
impl Clone for PsgSwitches
Source§fn clone(&self) -> PsgSwitches
fn clone(&self) -> PsgSwitches
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more