summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nigel Barnes <Pernod70@users.noreply.github.com>2022-05-20 22:25:23 +0100
committer Nigel Barnes <Pernod70@users.noreply.github.com>2022-05-20 22:45:06 +0100
commitf3328f225573849f83bbe1383ee5cec19048a723 (patch)
tree9196d2a718268d1030803a0bab020996c6d76836
parent988a9b974a5f391009393ed2db18cf7585a5659b (diff)
bus/mtx/cfx: Do nothing when both READ/WRITE are asserted.
-rw-r--r--src/devices/bus/mtx/cfx.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/devices/bus/mtx/cfx.cpp b/src/devices/bus/mtx/cfx.cpp
index 0692abb3686..1c5231595ca 100644
--- a/src/devices/bus/mtx/cfx.cpp
+++ b/src/devices/bus/mtx/cfx.cpp
@@ -126,17 +126,27 @@ void mtx_cfx_device::portc_w(uint8_t data)
switch (BIT(data, 3, 2))
{
case 0x01: // CS0
- if (BIT(data, 5)) // WRITE
+ switch (BIT(data, 5, 2))
+ {
+ case 0x01: // WRITE
m_ide->cs0_w(data & 0x07, m_ide_data);
- if (BIT(data, 6)) // READ
+ break;
+ case 0x02: // READ
m_ide_data = m_ide->cs0_r(data & 0x07);
+ break;
+ }
break;
case 0x02: // CS1
- if (BIT(data, 5)) // WRITE
+ switch (BIT(data, 5, 2))
+ {
+ case 0x01: // WRITE
m_ide->cs1_w(data & 0x07, m_ide_data);
- if (BIT(data, 6)) // READ
+ break;
+ case 0x02: // READ
m_ide_data = m_ide->cs1_r(data & 0x07);
+ break;
+ }
break;
}
}