mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
ymfm_opn: apparently there is no internal flag when latch was written
This commit is contained in:
parent
a56c5f8afa
commit
802bce33eb
9
3rdparty/ymfm/src/ymfm_opn.cpp
vendored
9
3rdparty/ymfm/src/ymfm_opn.cpp
vendored
@ -155,14 +155,13 @@ bool opn_registers_base<IsOpnA>::write(uint16_t index, uint8_t data, uint32_t &c
|
||||
|
||||
// writes to the upper half just latch (only low 6 bits matter)
|
||||
if (bitfield(index, 2))
|
||||
m_regdata[latchindex] = data | 0x80;
|
||||
m_regdata[latchindex] = data & 0x3f;
|
||||
|
||||
// writes to the lower half only commit if the latch is there
|
||||
else if (bitfield(m_regdata[latchindex], 7))
|
||||
// writes to the lower half also apply said latch
|
||||
else
|
||||
{
|
||||
m_regdata[index] = data;
|
||||
m_regdata[index | 4] = m_regdata[latchindex] & 0x3f;
|
||||
m_regdata[latchindex] = 0;
|
||||
m_regdata[index | 4] = m_regdata[latchindex];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user