summaryrefslogtreecommitdiffstats
path: root/src/devices/bus/vic20/vic1011.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/vic20/vic1011.cpp')
-rw-r--r--src/devices/bus/vic20/vic1011.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/devices/bus/vic20/vic1011.cpp b/src/devices/bus/vic20/vic1011.cpp
index cb136d4a0a4..893536a5b09 100644
--- a/src/devices/bus/vic20/vic1011.cpp
+++ b/src/devices/bus/vic20/vic1011.cpp
@@ -12,14 +12,6 @@
//**************************************************************************
-// MACROS/CONSTANTS
-//**************************************************************************
-
-#define RS232_TAG "rs232"
-
-
-
-//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
@@ -30,13 +22,14 @@ DEFINE_DEVICE_TYPE(VIC1011, vic1011_device, "vic1011", "VIC-1011 RS-232C")
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(vic1011_device::device_add_mconfig)
- MCFG_DEVICE_ADD(RS232_TAG, RS232_PORT, default_rs232_devices, nullptr)
- MCFG_RS232_RXD_HANDLER(WRITELINE(DEVICE_SELF, vic1011_device, output_rxd))
- MCFG_RS232_DCD_HANDLER(WRITELINE(DEVICE_SELF, vic1011_device, output_h)) MCFG_DEVCB_XOR(1)
- MCFG_RS232_CTS_HANDLER(WRITELINE(DEVICE_SELF, vic1011_device, output_k)) MCFG_DEVCB_XOR(1)
- MCFG_RS232_DSR_HANDLER(WRITELINE(DEVICE_SELF, vic1011_device, output_l)) MCFG_DEVCB_XOR(1)
-MACHINE_CONFIG_END
+void vic1011_device::device_add_mconfig(machine_config &config)
+{
+ RS232_PORT(config, m_rs232, default_rs232_devices, nullptr);
+ m_rs232->rxd_handler().set(FUNC(vic1011_device::output_rxd));
+ m_rs232->dcd_handler().set(FUNC(vic1011_device::output_h)).invert();
+ m_rs232->cts_handler().set(FUNC(vic1011_device::output_k)).invert();
+ m_rs232->dsr_handler().set(FUNC(vic1011_device::output_l)).invert();
+}
//**************************************************************************
@@ -50,7 +43,7 @@ MACHINE_CONFIG_END
vic1011_device::vic1011_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, VIC1011, tag, owner, clock)
, device_pet_user_port_interface(mconfig, *this)
- , m_rs232(*this, RS232_TAG)
+ , m_rs232(*this, "rs232")
{
}