summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-09-16 09:44:51 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-09-16 09:48:59 -0400
commit8be6a48629b5688adbe9d8162a324ff44b5a2669 (patch)
tree3696c9ace74df94b2adbdb2f11f1eeed48775c29
parent77fd560d0fc1a1214fa9b173206cc0520427344d (diff)
z80dart: Miscellaneous bug fixes
- Default RXD to 1 to eliminate spurious break condition - Correct CTS level in RR0 after "Reset External/Status Interrupt" command - Allow immediate inactivation of RTS output when nothing is being transmitted
-rw-r--r--src/devices/machine/z80dart.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/devices/machine/z80dart.cpp b/src/devices/machine/z80dart.cpp
index 9cd968b4620..e692d658fc0 100644
--- a/src/devices/machine/z80dart.cpp
+++ b/src/devices/machine/z80dart.cpp
@@ -467,7 +467,7 @@ z80dart_channel::z80dart_channel(const machine_config &mconfig, const char *tag,
, m_rx_first(0)
, m_rx_break(0)
, m_rx_rr0_latch(0)
- , m_rxd(0)
+ , m_rxd(1)
, m_ri(0)
, m_cts(0)
, m_dcd(0)
@@ -802,7 +802,7 @@ void z80dart_channel::control_write(uint8_t data)
if (!m_dcd) m_rr[0] |= RR0_DCD;
if (m_ri) m_rr[0] |= RR0_RI;
- if (m_cts) m_rr[0] |= RR0_CTS;
+ if (!m_cts) m_rr[0] |= RR0_CTS;
m_rx_rr0_latch = 0;
@@ -932,6 +932,8 @@ void z80dart_channel::control_write(uint8_t data)
else
{
// when the RTS bit is reset, the _RTS output goes high after the transmitter empties
+ if (m_rr[1] & RR1_ALL_SENT)
+ set_rts(1);
m_rts = 0;
}