From 3b7f2683cf2466ee28719ab9afbc34bd844aaa8c Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 4 Jul 2025 14:39:09 +0600 Subject: [PATCH] Backport https://github.com/aaronsgiles/ymfm/pull/66 --- src/sound/ymfm/ymfm_opl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/ymfm/ymfm_opl.h b/src/sound/ymfm/ymfm_opl.h index 843e5b274..71b098e97 100644 --- a/src/sound/ymfm/ymfm_opl.h +++ b/src/sound/ymfm/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 waveform_enable() ? byte(0xe0, 0, newflag() ? 3 : 2, opoffs) : 0; } protected: // return a bitfield extracted from a byte