summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/ymfm/src/ymfm_opn.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/ymfm/src/ymfm_opn.cpp')
-rw-r--r--3rdparty/ymfm/src/ymfm_opn.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/3rdparty/ymfm/src/ymfm_opn.cpp b/3rdparty/ymfm/src/ymfm_opn.cpp
index 3b677433644..60469e1c0d7 100644
--- a/3rdparty/ymfm/src/ymfm_opn.cpp
+++ b/3rdparty/ymfm/src/ymfm_opn.cpp
@@ -146,11 +146,14 @@ bool opn_registers_base<IsOpnA>::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;