summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/z80sio.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-08-25 18:47:36 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-08-25 18:47:36 -0400
commit641ad4e4342e3a3a95594fc28c0d263331511f19 (patch)
tree7b11368d27d4dadcd4600639541c4ac52b14d8cd /src/devices/machine/z80sio.cpp
parentaea16dafbb011ee5bdabf854f54daba2a8650c0f (diff)
z80sio: Ignore "Send Abort" command when not in SDLC mode (unbreaks jade)
Diffstat (limited to 'src/devices/machine/z80sio.cpp')
-rw-r--r--src/devices/machine/z80sio.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/devices/machine/z80sio.cpp b/src/devices/machine/z80sio.cpp
index c190fb700a6..82997875f46 100644
--- a/src/devices/machine/z80sio.cpp
+++ b/src/devices/machine/z80sio.cpp
@@ -1447,15 +1447,22 @@ void z80sio_channel::do_sioreg_wr0(uint8_t data)
LOGCMD("%s Ch:%c : Null command\n", FUNCNAME, 'A' + m_index);
break;
case WR0_SEND_ABORT:
- LOGCMD("%s Ch:%c : Send abort command\n", FUNCNAME, 'A' + m_index);
// TODO: what actually happens if you try this in a mode other than SDLC?
- // FIXME: how does this interact with interrupts?
- // For now assume it behaves like automatically sending CRC and generates a transmit interrupt when a new frame can be sent.
- tx_setup(0xff, 8, 0, true, true);
- m_rr0 |= RR0_TX_BUFFER_EMPTY;
- m_rr1 &= ~RR1_ALL_SENT;
- if ((m_wr1 & WR1_WRDY_ENABLE) && !(m_wr1 & WR1_WRDY_ON_RX_TX))
- set_ready(false);
+ if ((m_wr4 & (WR4_STOP_BITS_MASK | WR4_SYNC_MODE_MASK)) != (WR4_STOP_BITS_SYNC | WR4_SYNC_MODE_SDLC))
+ {
+ LOGCMD("%s Ch:%c : Send abort command (not in SDLC mode, ignored)\n", FUNCNAME, 'A' + m_index);
+ }
+ else
+ {
+ LOGCMD("%s Ch:%c : Send abort command\n", FUNCNAME, 'A' + m_index);
+ // FIXME: how does this interact with interrupts?
+ // For now assume it behaves like automatically sending CRC and generates a transmit interrupt when a new frame can be sent.
+ tx_setup(0xff, 8, 0, true, true);
+ m_rr0 |= RR0_TX_BUFFER_EMPTY;
+ m_rr1 &= ~RR1_ALL_SENT;
+ if ((m_wr1 & WR1_WRDY_ENABLE) && !(m_wr1 & WR1_WRDY_ON_RX_TX))
+ set_ready(false);
+ }
break;
case WR0_RESET_EXT_STATUS:
reset_ext_status();