From d319a3aec942261f952491add218393fb231feea Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 31 Jan 2025 13:19:23 +0100 Subject: [PATCH] Revert "ymfm_opn: writes to 0xa7/0xaf also go to latch" This reverts commit 659471456ae6d140ef9f86a15a0494ea0021fe51. --- 3rdparty/ymfm/src/ymfm_opn.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3rdparty/ymfm/src/ymfm_opn.cpp b/3rdparty/ymfm/src/ymfm_opn.cpp index 3b677433644d7..60469e1c0d75c 100644 --- a/3rdparty/ymfm/src/ymfm_opn.cpp +++ b/3rdparty/ymfm/src/ymfm_opn.cpp @@ -146,11 +146,14 @@ bool opn_registers_base::write(uint16_t index, uint8_t data, uint32_t &c // borrow unused registers 0xb8-bf/0x1b8-bf as temporary holding locations if ((index & 0xf0) == 0xa0) { + if (bitfield(index, 0, 2) == 3) + return false; + uint32_t latchindex = 0xb8 | bitfield(index, 3); if (IsOpnA) latchindex |= index & 0x100; - // writes to the upper half go to shared 6-bit latch + // writes to the upper half just latch (only low 6 bits matter) if (bitfield(index, 2)) m_regdata[latchindex] = data & 0x3f;