Skip to content

Commit d319a3a

Browse files
committed
Revert "ymfm_opn: writes to 0xa7/0xaf also go to latch"
This reverts commit 6594714.
1 parent 6594714 commit d319a3a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

3rdparty/ymfm/src/ymfm_opn.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,14 @@ bool opn_registers_base<IsOpnA>::write(uint16_t index, uint8_t data, uint32_t &c
146146
// borrow unused registers 0xb8-bf/0x1b8-bf as temporary holding locations
147147
if ((index & 0xf0) == 0xa0)
148148
{
149+
if (bitfield(index, 0, 2) == 3)
150+
return false;
151+
149152
uint32_t latchindex = 0xb8 | bitfield(index, 3);
150153
if (IsOpnA)
151154
latchindex |= index & 0x100;
152155

153-
// writes to the upper half go to shared 6-bit latch
156+
// writes to the upper half just latch (only low 6 bits matter)
154157
if (bitfield(index, 2))
155158
m_regdata[latchindex] = data & 0x3f;
156159

0 commit comments

Comments
 (0)