From 942a8e96b17fc08cfda4ca7bd42ed89005378675 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 18 Sep 2025 02:12:14 +0600 Subject: [PATCH 1/2] Restore earlier OPL4 identification method (part 1) --- src/sound/ymfm/ymfm_pcm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/ymfm/ymfm_pcm.cpp b/src/sound/ymfm/ymfm_pcm.cpp index 34417490c..a2e17144e 100644 --- a/src/sound/ymfm/ymfm_pcm.cpp +++ b/src/sound/ymfm/ymfm_pcm.cpp @@ -46,6 +46,7 @@ namespace ymfm void pcm_registers::reset() { std::fill_n(&m_regdata[0], REGISTERS, 0); + m_regdata[0x02] = 0x20; m_regdata[0xf8] = 0x1b; } From da6e55146365982e034779740e618e0ead1088db Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 18 Sep 2025 02:17:20 +0600 Subject: [PATCH 2/2] Restore earlier OPL4 identification method (part 2) --- src/sound/ymfm/ymfm_opl.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/sound/ymfm/ymfm_opl.cpp b/src/sound/ymfm/ymfm_opl.cpp index 8e8025fd9..b70102b65 100644 --- a/src/sound/ymfm/ymfm_opl.cpp +++ b/src/sound/ymfm/ymfm_opl.cpp @@ -1717,14 +1717,8 @@ uint8_t ymf278b::read_data_pcm() { // read from PCM if (bitfield(m_address, 9) != 0) - { - uint8_t result = m_pcm.read(m_address & 0xff); - if ((m_address & 0xff) == 0x02) - result |= 0x20; - - return result; - } - return 0; + return m_pcm.read(m_address & 0xff); + return 0; }