Skip to content

Commit

Permalink
Revert "ymfm_opn: writes to 0xa7/0xaf also go to latch"
Browse files Browse the repository at this point in the history
This reverts commit 6594714.
  • Loading branch information
happppp committed Jan 31, 2025
1 parent 6594714 commit d319a3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 3rdparty/ymfm/src/ymfm_opn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d319a3a

Please sign in to comment.