summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/a2bus/a2pic.cpp
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2016-01-31 17:59:41 -0500
committer arbee <rb6502@users.noreply.github.com>2016-01-31 17:59:41 -0500
commitb3e74085fe793b886020f0f6c61902d20feea967 (patch)
treef1f4ef31c3218eb58c38ef40ae06a5c77fb99389 /src/devices/bus/a2bus/a2pic.cpp
parentb1eaf6375878fed72eab97560906cbce081a1b8b (diff)
apple2: fix parallel card ACK handling, Print Shop almost works with the lx810l now. [R. Belmont]
Diffstat (limited to 'src/devices/bus/a2bus/a2pic.cpp')
-rw-r--r--src/devices/bus/a2bus/a2pic.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp
index f47f964f192..c16ee6f2140 100644
--- a/src/devices/bus/a2bus/a2pic.cpp
+++ b/src/devices/bus/a2bus/a2pic.cpp
@@ -49,11 +49,11 @@ static INPUT_PORTS_START( pic )
PORT_DIPSETTING( 0x06, "13 microseconds" )
PORT_DIPSETTING( 0x07, "15 microseconds" )
- PORT_DIPNAME( 0x08, 0x00, "Strobe polarity (SW4)" )
+ PORT_DIPNAME( 0x08, 0x08, "Strobe polarity (SW4)" )
PORT_DIPSETTING( 0x00, "Positive" )
PORT_DIPSETTING( 0x08, "Negative" )
- PORT_DIPNAME( 0x10, 0x00, "Acknowledge polarity (SW5)" )
+ PORT_DIPNAME( 0x10, 0x10, "Acknowledge polarity (SW5)" )
PORT_DIPSETTING( 0x00, "Positive" )
PORT_DIPSETTING( 0x10, "Negative" )
@@ -181,13 +181,27 @@ UINT8 a2bus_pic_device::read_cnxx(address_space &space, UINT8 offset)
UINT8 a2bus_pic_device::read_c0nx(address_space &space, UINT8 offset)
{
+ UINT8 rv = 0;
+
switch (offset)
{
case 3:
return m_ctx_data_in->read();
case 4:
- return m_ack;
+ rv = m_ack;
+
+ // clear flip-flop
+ if (m_dsw1->read() & 0x10) // negative polarity
+ {
+ m_ack |= 0x80;
+ }
+ else
+ {
+ m_ack &= ~0x80;
+ }
+
+ return rv;
case 6: // does reading this really work?
m_irqenable = true;