summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/rs232/loopback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/rs232/loopback.cpp')
-rw-r--r--src/devices/bus/rs232/loopback.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/devices/bus/rs232/loopback.cpp b/src/devices/bus/rs232/loopback.cpp
index b91b7281346..de1f07f3cd7 100644
--- a/src/devices/bus/rs232/loopback.cpp
+++ b/src/devices/bus/rs232/loopback.cpp
@@ -42,3 +42,55 @@ WRITE_LINE_MEMBER( rs232_loopback_device::input_dtr )
output_dcd(state);
}
}
+
+DEFINE_DEVICE_TYPE(DEC_RS232_LOOPBACK, dec_rs232_loopback_device, "dec_rs232_loopback", "RS232 Loopback (DEC 12-15336-00)")
+
+dec_rs232_loopback_device::dec_rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, DEC_RS232_LOOPBACK, tag, owner, clock)
+ , device_rs232_port_interface(mconfig, *this)
+{
+}
+
+void dec_rs232_loopback_device::device_start()
+{
+}
+
+WRITE_LINE_MEMBER( dec_rs232_loopback_device::input_txd )
+{
+ // Pin 2 (Transmitted Data) connected to Pin 3 (Received Data) and Pin 15 (Transmission Clock)
+ if (started())
+ {
+ output_rxd(state);
+ output_txc(state);
+ }
+}
+
+WRITE_LINE_MEMBER( dec_rs232_loopback_device::input_rts )
+{
+ // Pin 4 (Request to Send) connected to Pin 5 (Clear to Send) and Pin 8 (Carrier Detect)
+ if (started())
+ {
+ output_cts(state);
+ output_dcd(state);
+ }
+}
+
+WRITE_LINE_MEMBER( dec_rs232_loopback_device::input_dtr )
+{
+ // Pin 20 (Data Terminal Ready) connected to Pin 6 (Data Set Ready) and 22 (Ring Indicator)
+ if (started())
+ {
+ output_dsr(state);
+ output_ri(state);
+ }
+}
+
+WRITE_LINE_MEMBER( dec_rs232_loopback_device::input_spds )
+{
+ // Pin 19 (Speed Select) connected to Pin 12 (Speed Indicator) and 17 (Receive Clock)
+ if (started())
+ {
+ output_si(state);
+ output_rxc(state);
+ }
+}