summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-06-09 22:37:18 +0200
committer hap <happppp@users.noreply.github.com>2021-06-09 22:37:18 +0200
commit0656b4ab4d0fc7ee55c9bbea8b92c54f291c7473 (patch)
tree9eb79d4da17719421c8c9a2aa719487ea3027da1
parent2dd082e07c5b828b7ac14f250f55d05f0d0a4bc3 (diff)
c140: c219 has less voice regs, don't call c140_r
-rw-r--r--src/devices/sound/c140.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp
index 683f2a7ebda..b04a35a0f31 100644
--- a/src/devices/sound/c140.cpp
+++ b/src/devices/sound/c140.cpp
@@ -478,8 +478,10 @@ inline u8 c140_device::keyon_status_read(u16 offset)
u8 c140_device::c140_r(offs_t offset)
{
offset &= 0x1ff;
+
if ((offset & 0xf) == 0x5 && offset < 0x180)
return keyon_status_read(offset);
+
return m_REG[offset];
}
@@ -556,7 +558,10 @@ u8 c219_device::c219_r(offs_t offset)
// assume same as c140
// TODO: what happens here on reading unmapped voice regs?
- return c140_r(offset);
+ if ((offset & 0xf) == 0x5 && offset < 0x100)
+ return keyon_status_read(offset);
+
+ return m_REG[offset];
}