summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2021-04-02 15:04:39 -0700
committer Aaron Giles <aaron@aarongiles.com>2021-04-02 15:04:39 -0700
commitee1e4f9683a4953cb9d88f9256017fcbc38e3144 (patch)
tree8096ef66ed2c8c909725945f3b5d884dbfeb6f92
parent52f0acb25ca8a88a8170d0c9399c682d9469fac4 (diff)
More friendly behavior when OPLL writes are performed out of range.
-rw-r--r--src/devices/sound/ymfm.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/devices/sound/ymfm.cpp b/src/devices/sound/ymfm.cpp
index 4fa7480683d..1e7427d260f 100644
--- a/src/devices/sound/ymfm.cpp
+++ b/src/devices/sound/ymfm.cpp
@@ -1874,7 +1874,13 @@ void ymopll_registers::operator_map(operator_mapping &dest) const
bool ymopll_registers::write(u16 index, u8 data, u32 &channel, u32 &opmask)
{
- assert(index < REGISTERS);
+ // unclear the address is masked down to 6 bits or if writes above
+ // the register top are ignored; assuming the latter for now
+ if (index >= REGISTERS)
+ {
+ LOG("ymopll write above register area; ignoring: %02X=%02X\n", index, data);
+ return false;
+ }
// write the new data
m_regdata[index] = data;