summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-08-18 20:11:06 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-08-18 20:11:06 -0400
commit94ce374f5a29c3c3820030680d601053c8661ce3 (patch)
treee4f65f2bff6c54d2707bf83b4e37459c6e9ac399 /src/devices
parentd840374aaa6bf32e2038ff473da8ea13d05d5437 (diff)
i8255: Add handlers for strobed Port A/B reads in Modes 1 & 2; allow some side effects to be disabled (nw)
vdm79322: Z80/8031 communications enabled (nw)
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/machine/i8255.cpp60
-rw-r--r--src/devices/machine/i8255.h2
2 files changed, 50 insertions, 12 deletions
diff --git a/src/devices/machine/i8255.cpp b/src/devices/machine/i8255.cpp
index 4d1bee6e2a6..3feae0a736e 100644
--- a/src/devices/machine/i8255.cpp
+++ b/src/devices/machine/i8255.cpp
@@ -314,14 +314,17 @@ uint8_t i8255_device::read_mode1(int port)
// read data from input latch
data = m_input[port];
- // clear input buffer full flag
- set_ibf(port, 0);
+ if (!machine().side_effects_disabled())
+ {
+ // clear input buffer full flag
+ set_ibf(port, 0);
- // clear interrupt
- set_intr(port, 0);
+ // clear interrupt
+ set_intr(port, 0);
- // clear input latch
- m_input[port] = 0;
+ // clear input latch
+ m_input[port] = 0;
+ }
}
return data;
@@ -333,14 +336,17 @@ uint8_t i8255_device::read_mode2()
// read data from input latch
uint8_t const data = m_input[PORT_A];
- // clear input buffer full flag
- set_ibf(PORT_A, 0);
+ if (!machine().side_effects_disabled())
+ {
+ // clear input buffer full flag
+ set_ibf(PORT_A, 0);
- // clear interrupt
- set_intr(PORT_A, 0);
+ // clear interrupt
+ set_intr(PORT_A, 0);
- // clear input latch
- m_input[PORT_A] = 0;
+ // clear input latch
+ m_input[PORT_A] = 0;
+ }
return data;
}
@@ -822,6 +828,21 @@ uint8_t i8255_device::read_pa()
}
+//-------------------------------------------------
+// acka_r - port A read with PC6 strobe
+//-------------------------------------------------
+
+READ8_MEMBER( i8255_device::acka_r )
+{
+ if (!machine().side_effects_disabled())
+ {
+ pc6_w(0);
+ pc6_w(1);
+ }
+ return read_pa();
+}
+
+
READ8_MEMBER( i8255_device::pb_r )
{
return read_pb();
@@ -845,6 +866,21 @@ uint8_t i8255_device::read_pb()
}
+//-------------------------------------------------
+// ackb_r - port B read with PC2 strobe
+//-------------------------------------------------
+
+READ8_MEMBER( i8255_device::ackb_r )
+{
+ if (!machine().side_effects_disabled())
+ {
+ pc2_w(0);
+ pc2_w(1);
+ }
+ return read_pb();
+}
+
+
WRITE_LINE_MEMBER( i8255_device::pc2_w )
{
if (group_mode(GROUP_B) == 1)
diff --git a/src/devices/machine/i8255.h b/src/devices/machine/i8255.h
index 3db43e06bb4..0426ea09ae6 100644
--- a/src/devices/machine/i8255.h
+++ b/src/devices/machine/i8255.h
@@ -98,9 +98,11 @@ public:
DECLARE_READ8_MEMBER( pa_r );
uint8_t read_pa();
+ DECLARE_READ8_MEMBER( acka_r );
DECLARE_READ8_MEMBER( pb_r );
uint8_t read_pb();
+ DECLARE_READ8_MEMBER( ackb_r );
DECLARE_WRITE_LINE_MEMBER( pc2_w );
DECLARE_WRITE_LINE_MEMBER( pc4_w );