summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2025-02-01 00:13:31 +0100
committer hap <happppp@users.noreply.github.com>2025-02-01 00:13:42 +0100
commit077ac12495bc8fe31614e950c90d4ad41a102217 (patch)
tree3ee15cd98d778dc172c851d0365f1d886f1dbae6 /3rdparty
parent61c150428847ed2ad9a847d6dcab46c25e5dd020 (diff)
ymfm_opl: actually emulate opl2 waveform enable bit
Diffstat (limited to '3rdparty')
-rw-r--r--3rdparty/ymfm/src/ymfm_opl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/3rdparty/ymfm/src/ymfm_opl.h b/3rdparty/ymfm/src/ymfm_opl.h
index 843e5b274d2..a6c6bc2ca71 100644
--- a/3rdparty/ymfm/src/ymfm_opl.h
+++ b/3rdparty/ymfm/src/ymfm_opl.h
@@ -52,7 +52,7 @@ namespace ymfm
//
// System-wide registers:
// 01 xxxxxxxx Test register
-// --x----- Enable OPL compatibility mode [OPL2 only] (1 = enable)
+// --x----- Enable OPL compatibility mode [OPL2 only] (0 = enable)
// 02 xxxxxxxx Timer A value (4 * OPN)
// 03 xxxxxxxx Timer B value
// 04 x------- RST
@@ -243,7 +243,7 @@ public:
uint32_t op_decay_rate(uint32_t opoffs) const { return byte(0x60, 0, 4, opoffs); }
uint32_t op_sustain_level(uint32_t opoffs) const { return byte(0x80, 4, 4, opoffs); }
uint32_t op_release_rate(uint32_t opoffs) const { return byte(0x80, 0, 4, opoffs); }
- uint32_t op_waveform(uint32_t opoffs) const { return IsOpl2Plus ? byte(0xe0, 0, newflag() ? 3 : 2, opoffs) : 0; }
+ uint32_t op_waveform(uint32_t opoffs) const { return (IsOpl2Plus && waveform_enable()) ? byte(0xe0, 0, newflag() ? 3 : 2, opoffs) : 0; }
protected:
// return a bitfield extracted from a byte