mirror of
https://github.com/holub/mame
synced 2025-06-03 11:26:56 +03:00
ymfm_opn: OPNA does not have 4 latches
This commit is contained in:
parent
d319a3aec9
commit
078322da16
4
3rdparty/ymfm/src/ymfm_opn.cpp
vendored
4
3rdparty/ymfm/src/ymfm_opn.cpp
vendored
@ -143,15 +143,13 @@ bool opn_registers_base<IsOpnA>::write(uint16_t index, uint8_t data, uint32_t &c
|
||||
assert(index < REGISTERS);
|
||||
|
||||
// writes in the 0xa0-af/0x1a0-af region are handled as latched pairs
|
||||
// borrow unused registers 0xb8-bf/0x1b8-bf as temporary holding locations
|
||||
// borrow unused registers 0xb8-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 just latch (only low 6 bits matter)
|
||||
if (bitfield(index, 2))
|
||||
|
Loading…
Reference in New Issue
Block a user