diff options
author | 2021-05-24 12:30:06 +0700 | |
---|---|---|
committer | 2021-05-24 12:30:06 +0700 | |
commit | 8a2de2875a20098170850ba0fa63e7bd01e228a7 (patch) | |
tree | 1ef6c996858c0b93002a6079e13a6eb30f6c97d1 | |
parent | 646938cf96664743498806f5c3678b206f20e8e9 (diff) |
z80scc: implement local loopback
-rw-r--r-- | src/devices/machine/z80scc.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp index 4978ff66d32..1a1dc0a3eda 100644 --- a/src/devices/machine/z80scc.cpp +++ b/src/devices/machine/z80scc.cpp @@ -1243,6 +1243,9 @@ void z80scc_channel::tra_callback() LOGTX("%s: transmit data bit %d m_wr5:%02x\n", FUNCNAME, db, m_wr5); // transmit data out_txd_cb(db); + + if (m_wr14 & WR14_LOCAL_LOOPBACK) + write_rx(db); } else { @@ -2298,6 +2301,10 @@ void z80scc_channel::do_sccreg_wr14(uint8_t data) m_brg_counter = 0; #endif } + + if (!(m_wr14 & WR14_LOCAL_LOOPBACK) && (data & WR14_LOCAL_LOOPBACK)) + receive_register_reset(); + // TODO: Add info on the other bits of this register m_wr14 = data; update_serial(); |