summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mooglyguy <therealmogminer@gmail.com>2018-11-20 19:00:08 +0100
committer mooglyguy <therealmogminer@gmail.com>2018-11-20 19:00:23 +0100
commit7f0d69fa30702014d2edf9375238978c5ea4d1f3 (patch)
tree02805cd85ab5cc5b39d94566a50817083e7e1a2e
parent03372028f54a07886d45df3d577467ecb1521f2a (diff)
hpc3.cpp: Fix recent regression with Indy, nw
-rw-r--r--src/mame/machine/hpc3.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mame/machine/hpc3.cpp b/src/mame/machine/hpc3.cpp
index 7b3e910843c..860a28b54a9 100644
--- a/src/mame/machine/hpc3.cpp
+++ b/src/mame/machine/hpc3.cpp
@@ -288,13 +288,16 @@ WRITE32_MEMBER(hpc3_device::hd_enet_w)
template<uint32_t index>
READ32_MEMBER(hpc3_device::hd_r)
{
+ if (index && !m_wd33c93_2)
+ return 0;
+
switch (offset)
{
case 0x0000/4:
case 0x4000/4:
if (ACCESSING_BITS_0_7)
{
- const uint8_t ret = index && m_wd33c93_2 ? m_wd33c93_2->read(space, 0) : m_wd33c93->read(space, 0);
+ const uint8_t ret = index ? m_wd33c93_2->read(space, 0) : m_wd33c93->read(space, 0);
LOGMASKED(LOG_SCSI, "%s: SCSI%d Read 0: %02x\n", machine().describe_context(), index, ret);
return ret;
}
@@ -303,7 +306,7 @@ READ32_MEMBER(hpc3_device::hd_r)
case 0x4004/4:
if (ACCESSING_BITS_0_7)
{
- const uint8_t ret = index && m_wd33c93_2 ? m_wd33c93_2->read(space, 1) : m_wd33c93->read(space, 1);
+ const uint8_t ret = index ? m_wd33c93_2->read(space, 1) : m_wd33c93->read(space, 1);
LOGMASKED(LOG_SCSI, "%s: SCSI%d Read 1: %02x\n", machine().describe_context(), index, ret);
return ret;
}
@@ -319,20 +322,23 @@ READ32_MEMBER(hpc3_device::hd_r)
template<uint32_t index>
WRITE32_MEMBER(hpc3_device::hd_w)
{
+ if (index && !m_wd33c93_2)
+ return;
+
switch (offset)
{
case 0x0000:
if (ACCESSING_BITS_0_7)
{
LOGMASKED(LOG_SCSI, "%s: SCSI%d Write 0 = %02x\n", machine().describe_context(), index, (uint8_t)data);
- index && m_wd33c93_2 ? m_wd33c93_2->write(space, 0, data & 0xff) : m_wd33c93->write(space, 0, data & 0xff);
+ index ? m_wd33c93_2->write(space, 0, data & 0xff) : m_wd33c93->write(space, 0, data & 0xff);
}
break;
case 0x0001:
if (ACCESSING_BITS_0_7)
{
LOGMASKED(LOG_SCSI, "%s: SCSI%d Write 1 = %02x\n", machine().describe_context(), index, (uint8_t)data);
- index && m_wd33c93_2 ? m_wd33c93_2->write(space, 1, data & 0xff) : m_wd33c93->write(space, 1, data & 0xff);
+ index ? m_wd33c93_2->write(space, 1, data & 0xff) : m_wd33c93->write(space, 1, data & 0xff);
}
break;
default: