summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/rs232/null_modem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/bus/rs232/null_modem.c')
-rw-r--r--src/emu/bus/rs232/null_modem.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/emu/bus/rs232/null_modem.c b/src/emu/bus/rs232/null_modem.c
new file mode 100644
index 00000000000..e477faf5906
--- /dev/null
+++ b/src/emu/bus/rs232/null_modem.c
@@ -0,0 +1,27 @@
+#include "null_modem.h"
+
+const device_type NULL_MODEM = &device_creator<null_modem_device>;
+
+null_modem_device::null_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : device_t(mconfig, NULL_MODEM, "Null Modem", tag, owner, clock, "null_modem", __FILE__),
+ device_rs232_port_interface(mconfig, *this),
+ m_bitbanger(*this, "bitbanger")
+{
+}
+
+static bitbanger_config null_modem_image_config =
+{
+ DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, null_modem_device, read),
+ BITBANGER_MODEM,
+ BITBANGER_9600,
+ BITBANGER_0PERCENT
+};
+
+static MACHINE_CONFIG_FRAGMENT(null_modem_config)
+ MCFG_BITBANGER_ADD("bitbanger", null_modem_image_config);
+MACHINE_CONFIG_END
+
+machine_config_constructor null_modem_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME(null_modem_config);
+}