summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-08-21 14:30:15 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-08-21 14:32:04 -0400
commit257a236f6e550519a501e1745674aba9ae6bb03d (patch)
tree947bd4066533cd49458004e36f98ea98a1276722
parent6bf57e9b143ee92f6a87cbf8ae8813add840feb6 (diff)
i8255: Refactor to make clear the exact sequences of actions acka_r and ackb_r correspond to (nw)
-rw-r--r--src/devices/machine/i8255.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/devices/machine/i8255.cpp b/src/devices/machine/i8255.cpp
index 3feae0a736e..15f646efd57 100644
--- a/src/devices/machine/i8255.cpp
+++ b/src/devices/machine/i8255.cpp
@@ -835,11 +835,14 @@ uint8_t i8255_device::read_pa()
READ8_MEMBER( i8255_device::acka_r )
{
if (!machine().side_effects_disabled())
- {
pc6_w(0);
+
+ uint8_t data = read_pa();
+
+ if (!machine().side_effects_disabled())
pc6_w(1);
- }
- return read_pa();
+
+ return data;
}
@@ -873,11 +876,14 @@ uint8_t i8255_device::read_pb()
READ8_MEMBER( i8255_device::ackb_r )
{
if (!machine().side_effects_disabled())
- {
pc2_w(0);
+
+ uint8_t data = read_pb();
+
+ if (!machine().side_effects_disabled())
pc2_w(1);
- }
- return read_pb();
+
+ return data;
}