summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2021-04-02 21:06:59 -0700
committer Aaron Giles <aaron@aarongiles.com>2021-04-02 21:06:59 -0700
commit46d17663b3f0400d83bd8e0436f7e636a57da4cf (patch)
tree6be9f2fb8f401e6937cfdbcb5dba4cf1825d72d6
parentee1e4f9683a4953cb9d88f9256017fcbc38e3144 (diff)
ymfm: Fix OPL3 output channels and waveform mask in compatibility mode.
-rw-r--r--src/devices/sound/ymfm.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/sound/ymfm.h b/src/devices/sound/ymfm.h
index b452e15b944..9f3c6d86fbf 100644
--- a/src/devices/sound/ymfm.h
+++ b/src/devices/sound/ymfm.h
@@ -819,11 +819,11 @@ public:
u32 ch_block_freq(u32 choffs) const { return word(0xb0, 0, 5, 0xa0, 0, 8, choffs); }
u32 ch_feedback(u32 choffs) const { return byte(0xc0, 1, 3, choffs); }
u32 ch_algorithm(u32 choffs) const { return byte(0xc0, 0, 1, choffs) | (IsOpl3Plus ? (8 | (byte(0xc3, 0, 1, choffs) << 1)) : 0); }
- u32 ch_output_any(u32 choffs) const { return IsOpl3Plus ? byte(0xc0 + choffs, 4, 4) : 1; }
- u32 ch_output_0(u32 choffs) const { return IsOpl3Plus ? byte(0xc0 + choffs, 4, 1) : 1; }
- u32 ch_output_1(u32 choffs) const { return IsOpl3Plus ? byte(0xc0 + choffs, 5, 1) : 0; }
- u32 ch_output_2(u32 choffs) const { return IsOpl3Plus ? byte(0xc0 + choffs, 6, 1) : 0; }
- u32 ch_output_3(u32 choffs) const { return IsOpl3Plus ? byte(0xc0 + choffs, 7, 1) : 0; }
+ u32 ch_output_any(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 4, 4) : 1; }
+ u32 ch_output_0(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 4, 1) : 1; }
+ u32 ch_output_1(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 5, 1) : (IsOpl3Plus ? 1 : 0); }
+ u32 ch_output_2(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 6, 1) : 0; }
+ u32 ch_output_3(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 7, 1) : 0; }
// per-operator registers
u32 op_lfo_am_enable(u32 opoffs) const { return byte(0x20, 7, 1, opoffs); }
@@ -837,7 +837,7 @@ public:
u32 op_decay_rate(u32 opoffs) const { return byte(0x60, 0, 4, opoffs); }
u32 op_sustain_level(u32 opoffs) const { return byte(0x80, 4, 4, opoffs); }
u32 op_release_rate(u32 opoffs) const { return byte(0x80, 0, 4, opoffs); }
- u32 op_waveform(u32 opoffs) const { return IsOpl2Plus ? byte(0xe0, 0, IsOpl3Plus ? 3 : 2, opoffs) : 0; }
+ u32 op_waveform(u32 opoffs) const { return IsOpl2Plus ? byte(0xe0, 0, newflag() ? 3 : 2, opoffs) : 0; }
protected:
// return a bitfield extracted from a byte