summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2019-01-29 18:03:29 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2019-01-29 18:03:29 +0100
commitca1b0f3d41f6dc0853c724d19d18a661c750449b (patch)
treec9ffc5280b49c3db42d44e60a795c1df1f6d9e4a
parent08bb5cacb09cccff9cb4093326912370ba6739b3 (diff)
output_latch: removed MCFG macros (nw)
-rw-r--r--src/devices/bus/a2bus/a2pic.cpp8
-rw-r--r--src/devices/bus/a2bus/agat7ports.cpp12
-rw-r--r--src/devices/bus/acorn/system/vib.cpp8
-rw-r--r--src/devices/bus/adamnet/spi.cpp8
-rw-r--r--src/devices/bus/c64/geocable.cpp9
-rw-r--r--src/devices/bus/centronics/ctronics.h80
-rw-r--r--src/devices/bus/cgenie/parallel/printer.cpp19
-rw-r--r--src/devices/bus/comx35/printer.cpp23
-rw-r--r--src/devices/bus/dmv/k210.cpp9
-rw-r--r--src/devices/bus/pofo/hpc101.cpp37
-rw-r--r--src/devices/bus/scsi/scsi.h88
-rw-r--r--src/devices/bus/svi3x8/slot/sv802.cpp12
-rw-r--r--src/devices/bus/vtech/ioexp/printer.cpp13
-rw-r--r--src/devices/machine/output_latch.h25
-rw-r--r--src/devices/machine/pc_lpt.cpp8
-rw-r--r--src/mame/audio/asteroid.cpp16
-rw-r--r--src/mame/drivers/amiga.cpp14
-rw-r--r--src/mame/drivers/amstrad.cpp8
-rw-r--r--src/mame/drivers/applix.cpp9
-rw-r--r--src/mame/drivers/apricotf.cpp7
-rw-r--r--src/mame/drivers/apricotp.cpp3
-rw-r--r--src/mame/drivers/asteroid.cpp16
-rw-r--r--src/mame/drivers/atom.cpp30
-rw-r--r--src/mame/drivers/aussiebyte.cpp3
-rw-r--r--src/mame/drivers/bitgraph.cpp20
-rw-r--r--src/mame/drivers/bullet.cpp43
-rw-r--r--src/mame/drivers/bw12.cpp15
-rw-r--r--src/mame/drivers/bw2.cpp7
-rw-r--r--src/mame/drivers/cat.cpp4
-rw-r--r--src/mame/drivers/einstein.cpp15
-rw-r--r--src/mame/drivers/elwro800.cpp3
-rw-r--r--src/mame/drivers/excali64.cpp8
-rw-r--r--src/mame/drivers/fc100.cpp13
-rw-r--r--src/mame/drivers/fm7.cpp69
-rw-r--r--src/mame/drivers/force68k.cpp14
-rw-r--r--src/mame/drivers/fp1100.cpp8
-rw-r--r--src/mame/drivers/jtc.cpp4
-rw-r--r--src/mame/drivers/jupace.cpp6
-rw-r--r--src/mame/drivers/kaypro.cpp14
-rw-r--r--src/mame/drivers/kdt6.cpp3
-rw-r--r--src/mame/drivers/m5.cpp7
-rw-r--r--src/mame/drivers/mbee.cpp14
-rw-r--r--src/mame/drivers/mc1000.cpp7
-rw-r--r--src/mame/drivers/mc1502.cpp15
-rw-r--r--src/mame/drivers/msx.cpp39
-rw-r--r--src/mame/drivers/mtx.cpp15
-rw-r--r--src/mame/drivers/myb3k.cpp15
-rw-r--r--src/mame/drivers/mz700.cpp5
-rw-r--r--src/mame/drivers/nc.cpp15
-rw-r--r--src/mame/drivers/octopus.cpp6
-rw-r--r--src/mame/drivers/pc1512.cpp32
-rw-r--r--src/mame/drivers/pc8001.cpp14
-rw-r--r--src/mame/drivers/pc8801.cpp2
-rw-r--r--src/mame/drivers/pencil2.cpp9
-rw-r--r--src/mame/drivers/phc25.cpp7
-rw-r--r--src/mame/drivers/prof180x.cpp8
-rw-r--r--src/mame/drivers/proteus.cpp7
-rw-r--r--src/mame/drivers/px4.cpp9
-rw-r--r--src/mame/drivers/sage2.cpp17
-rw-r--r--src/mame/drivers/sg1000.cpp5
-rw-r--r--src/mame/drivers/slicer.cpp23
-rw-r--r--src/mame/drivers/sorcerer.cpp7
-rw-r--r--src/mame/drivers/spc1000.cpp11
-rw-r--r--src/mame/drivers/spc1500.cpp11
-rw-r--r--src/mame/drivers/thomson.cpp7
-rw-r--r--src/mame/drivers/tiki100.cpp4
-rw-r--r--src/mame/drivers/trs80.cpp15
-rw-r--r--src/mame/drivers/trs80m2.cpp28
-rw-r--r--src/mame/drivers/trs80m3.cpp15
-rw-r--r--src/mame/drivers/tutor.cpp20
-rw-r--r--src/mame/drivers/tvc.cpp7
-rw-r--r--src/mame/drivers/unixpc.cpp11
-rw-r--r--src/mame/drivers/v1050.cpp26
-rw-r--r--src/mame/drivers/wangpc.cpp6
-rw-r--r--src/mame/drivers/xerox820.cpp7
-rw-r--r--src/mame/drivers/xor100.cpp11
-rw-r--r--src/mame/drivers/zorba.cpp4
-rw-r--r--src/mame/machine/thomson.cpp15
78 files changed, 558 insertions, 629 deletions
diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp
index 218d3ac6892..21c749eb50c 100644
--- a/src/devices/bus/a2bus/a2pic.cpp
+++ b/src/devices/bus/a2bus/a2pic.cpp
@@ -71,14 +71,16 @@ ioport_constructor a2bus_pic_device::device_input_ports() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(a2bus_pic_device::device_add_mconfig)
+void a2bus_pic_device::device_add_mconfig(machine_config &config)
+{
CENTRONICS(config, m_ctx, centronics_devices, "printer");
m_ctx->set_data_input_buffer(m_ctx_data_in);
m_ctx->ack_handler().set(FUNC(a2bus_pic_device::ack_w));
INPUT_BUFFER(config, m_ctx_data_in);
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("ctx_data_out", PIC_CENTRONICS_TAG)
-MACHINE_CONFIG_END
+ OUTPUT_LATCH(config, m_ctx_data_out);
+ m_ctx->set_output_latch(*m_ctx_data_out);
+}
//-------------------------------------------------
// rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/agat7ports.cpp b/src/devices/bus/a2bus/agat7ports.cpp
index d7c12ad81d9..5c24d8fac8f 100644
--- a/src/devices/bus/a2bus/agat7ports.cpp
+++ b/src/devices/bus/a2bus/agat7ports.cpp
@@ -51,18 +51,20 @@ INPUT_PORTS_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(a2bus_agat7_ports_device::device_add_mconfig)
+void a2bus_agat7_ports_device::device_add_mconfig(machine_config &config)
+{
I8255(config, m_d9);
m_d9->out_pa_callback().set("cent_data_out", FUNC(output_latch_device::bus_w));
m_d9->out_pb_callback().set(FUNC(a2bus_agat7_ports_device::write_portb));
m_d9->in_pc_callback().set(FUNC(a2bus_agat7_ports_device::read_portc));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, a2bus_agat7_ports_device, write_centronics_busy))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(a2bus_agat7_ports_device::write_centronics_busy));
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
I8251(config, m_d10, 0);
-MACHINE_CONFIG_END
+}
//-------------------------------------------------
// input_ports - device-specific input ports
diff --git a/src/devices/bus/acorn/system/vib.cpp b/src/devices/bus/acorn/system/vib.cpp
index 69a5d2189a4..9b75332e331 100644
--- a/src/devices/bus/acorn/system/vib.cpp
+++ b/src/devices/bus/acorn/system/vib.cpp
@@ -26,7 +26,8 @@ DEFINE_DEVICE_TYPE(ACORN_VIB, acorn_vib_device, "acorn_vib", "Acorn Versatile In
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(acorn_vib_device::device_add_mconfig)
+void acorn_vib_device::device_add_mconfig(machine_config &config)
+{
INPUT_MERGER_ANY_HIGH(config, m_irqs).output_handler().set(FUNC(acorn_vib_device::irq_w));
VIA6522(config, m_via6522, XTAL(1'000'000));
@@ -37,7 +38,8 @@ MACHINE_CONFIG_START(acorn_vib_device::device_add_mconfig)
CENTRONICS(config, m_centronics, centronics_devices, "printer");
m_centronics->ack_handler().set(m_via6522, FUNC(via6522_device::write_ca1));
m_centronics->busy_handler().set(m_via6522, FUNC(via6522_device::write_pa7));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
I8255(config, m_ppi8255, 0);
@@ -53,7 +55,7 @@ MACHINE_CONFIG_START(acorn_vib_device::device_add_mconfig)
CLOCK(config, m_acia_clock, 1.8432_MHz_XTAL);
m_acia_clock->signal_handler().set(FUNC(acorn_vib_device::write_acia_clock));
-MACHINE_CONFIG_END
+}
//**************************************************************************
// LIVE DEVICE
diff --git a/src/devices/bus/adamnet/spi.cpp b/src/devices/bus/adamnet/spi.cpp
index 612bb11c547..6ad84bbed7c 100644
--- a/src/devices/bus/adamnet/spi.cpp
+++ b/src/devices/bus/adamnet/spi.cpp
@@ -64,7 +64,8 @@ void adam_spi_device::adam_spi_mem(address_map &map)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(adam_spi_device::device_add_mconfig)
+void adam_spi_device::device_add_mconfig(machine_config &config)
+{
M6801(config, m_maincpu, XTAL(4'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &adam_spi_device::adam_spi_mem);
m_maincpu->in_p2_cb().set(FUNC(adam_spi_device::p2_r));
@@ -78,8 +79,9 @@ MACHINE_CONFIG_START(adam_spi_device::device_add_mconfig)
centronics_device &centronics(CENTRONICS(config, "centronics", centronics_devices, "printer"));
centronics.set_data_input_buffer("cent_data_in");
INPUT_BUFFER(config, "cent_data_in");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
-MACHINE_CONFIG_END
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ centronics.set_output_latch(cent_data_out);
+}
diff --git a/src/devices/bus/c64/geocable.cpp b/src/devices/bus/c64/geocable.cpp
index e740ec0da69..e07734f987f 100644
--- a/src/devices/bus/c64/geocable.cpp
+++ b/src/devices/bus/c64/geocable.cpp
@@ -30,10 +30,11 @@ DEFINE_DEVICE_TYPE(C64_GEOCABLE, c64_geocable_device, "c64_geocable", "C64 geoCa
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(c64_geocable_device::device_add_mconfig)
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, c64_geocable_device, output_b))
-MACHINE_CONFIG_END
+void c64_geocable_device::device_add_mconfig(machine_config &config)
+{
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(c64_geocable_device::output_b));
+}
diff --git a/src/devices/bus/centronics/ctronics.h b/src/devices/bus/centronics/ctronics.h
index c05d59a94c1..7189c465e98 100644
--- a/src/devices/bus/centronics/ctronics.h
+++ b/src/devices/bus/centronics/ctronics.h
@@ -14,68 +14,6 @@
#include "machine/output_latch.h"
-#define MCFG_CENTRONICS_STROBE_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_strobe_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_DATA0_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_data0_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_DATA1_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_data1_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_DATA2_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_data2_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_DATA3_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_data3_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_DATA4_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_data4_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_DATA5_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_data5_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_DATA6_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_data6_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_DATA7_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_data7_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_ACK_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_ack_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_BUSY_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_busy_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_PERROR_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_perror_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_SELECT_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_select_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_AUTOFD_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_autofd_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_FAULT_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_fault_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_INIT_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_init_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_SELECT_IN_HANDLER(_devcb) \
- downcast<centronics_device &>(*device).set_select_in_handler(DEVCB_##_devcb);
-
-#define MCFG_CENTRONICS_OUTPUT_LATCH_ADD(_tag, _centronics_tag) \
- MCFG_DEVICE_ADD(_tag, OUTPUT_LATCH, 0) \
- MCFG_OUTPUT_LATCH_BIT0_HANDLER(WRITELINE(_centronics_tag, centronics_device, write_data0)) \
- MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE(_centronics_tag, centronics_device, write_data1)) \
- MCFG_OUTPUT_LATCH_BIT2_HANDLER(WRITELINE(_centronics_tag, centronics_device, write_data2)) \
- MCFG_OUTPUT_LATCH_BIT3_HANDLER(WRITELINE(_centronics_tag, centronics_device, write_data3)) \
- MCFG_OUTPUT_LATCH_BIT4_HANDLER(WRITELINE(_centronics_tag, centronics_device, write_data4)) \
- MCFG_OUTPUT_LATCH_BIT5_HANDLER(WRITELINE(_centronics_tag, centronics_device, write_data5)) \
- MCFG_OUTPUT_LATCH_BIT6_HANDLER(WRITELINE(_centronics_tag, centronics_device, write_data6)) \
- MCFG_OUTPUT_LATCH_BIT7_HANDLER(WRITELINE(_centronics_tag, centronics_device, write_data7))
-
DECLARE_DEVICE_TYPE(CENTRONICS, centronics_device)
class device_centronics_peripheral_interface;
@@ -97,24 +35,6 @@ public:
}
centronics_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_strobe_handler(Object &&cb) { return m_strobe_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data0_handler(Object &&cb) { return m_data0_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data1_handler(Object &&cb) { return m_data1_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data2_handler(Object &&cb) { return m_data2_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data3_handler(Object &&cb) { return m_data3_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data4_handler(Object &&cb) { return m_data4_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data5_handler(Object &&cb) { return m_data5_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data6_handler(Object &&cb) { return m_data6_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data7_handler(Object &&cb) { return m_data7_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_ack_handler(Object &&cb) { return m_ack_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_busy_handler(Object &&cb) { return m_busy_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_perror_handler(Object &&cb) { return m_perror_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_select_handler(Object &&cb) { return m_select_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_autofd_handler(Object &&cb) { return m_autofd_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_fault_handler(Object &&cb) { return m_fault_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_init_handler(Object &&cb) { return m_init_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_select_in_handler(Object &&cb) { return m_select_in_handler.set_callback(std::forward<Object>(cb)); }
-
auto strobe_handler() { return m_strobe_handler.bind(); }
auto ack_handler() { return m_ack_handler.bind(); }
diff --git a/src/devices/bus/cgenie/parallel/printer.cpp b/src/devices/bus/cgenie/parallel/printer.cpp
index bce52a61c97..9a3e9df5dc4 100644
--- a/src/devices/bus/cgenie/parallel/printer.cpp
+++ b/src/devices/bus/cgenie/parallel/printer.cpp
@@ -27,14 +27,17 @@ DEFINE_DEVICE_TYPE(CGENIE_PRINTER, cgenie_printer_device, "cgenie_printer", "Pri
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(cgenie_printer_device::device_add_mconfig)
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, cgenie_printer_device, busy_w))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, cgenie_printer_device, perror_w))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, cgenie_printer_device, select_w))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, cgenie_printer_device, fault_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("latch", "centronics")
-MACHINE_CONFIG_END
+void cgenie_printer_device::device_add_mconfig(machine_config &config)
+{
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(cgenie_printer_device::busy_w));
+ m_centronics->perror_handler().set(FUNC(cgenie_printer_device::perror_w));
+ m_centronics->select_handler().set(FUNC(cgenie_printer_device::select_w));
+ m_centronics->fault_handler().set(FUNC(cgenie_printer_device::fault_w));
+
+ OUTPUT_LATCH(config, m_latch);
+ m_centronics->set_output_latch(*m_latch);
+}
//**************************************************************************
diff --git a/src/devices/bus/comx35/printer.cpp b/src/devices/bus/comx35/printer.cpp
index 24a50e7ed53..957b2a8a020 100644
--- a/src/devices/bus/comx35/printer.cpp
+++ b/src/devices/bus/comx35/printer.cpp
@@ -55,16 +55,19 @@ const tiny_rom_entry *comx_prn_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(comx_prn_device::device_add_mconfig)
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit0))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit1))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit2))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit3))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
-
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
-MACHINE_CONFIG_END
+void comx_prn_device::device_add_mconfig(machine_config &config)
+{
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit0));
+ m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit1));
+ m_centronics->perror_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit2));
+ m_centronics->select_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit3));
+
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
+
+ INPUT_BUFFER(config, m_cent_status_in);
+}
diff --git a/src/devices/bus/dmv/k210.cpp b/src/devices/bus/dmv/k210.cpp
index df16006f19b..1c3955bdf04 100644
--- a/src/devices/bus/dmv/k210.cpp
+++ b/src/devices/bus/dmv/k210.cpp
@@ -73,7 +73,8 @@ void dmv_k210_device::device_timer(emu_timer &timer, device_timer_id tid, int pa
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(dmv_k210_device::device_add_mconfig)
+void dmv_k210_device::device_add_mconfig(machine_config &config)
+{
I8255(config, m_ppi, 0);
m_ppi->in_pa_callback().set(FUNC(dmv_k210_device::porta_r));
m_ppi->in_pb_callback().set(FUNC(dmv_k210_device::portb_r));
@@ -93,8 +94,10 @@ MACHINE_CONFIG_START(dmv_k210_device::device_add_mconfig)
m_centronics->init_handler().set(FUNC(dmv_k210_device::cent_init_w));
INPUT_BUFFER(config, m_cent_data_in);
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
-MACHINE_CONFIG_END
+
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
+}
void dmv_k210_device::io_read(address_space &space, int ifsel, offs_t offset, uint8_t &data)
{
diff --git a/src/devices/bus/pofo/hpc101.cpp b/src/devices/bus/pofo/hpc101.cpp
index 93268e95bb6..f9127afa47e 100644
--- a/src/devices/bus/pofo/hpc101.cpp
+++ b/src/devices/bus/pofo/hpc101.cpp
@@ -33,28 +33,31 @@ DEFINE_DEVICE_TYPE(POFO_HPC101, pofo_hpc101_device, "pofo_hpc101", "Atari Portfo
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(pofo_hpc101_device::device_add_mconfig)
+void pofo_hpc101_device::device_add_mconfig(machine_config &config)
+{
I8255A(config, m_ppi);
m_ppi->out_pa_callback().set("cent_data_out", FUNC(output_latch_device::bus_w));
m_ppi->out_pb_callback().set("cent_ctrl_out", FUNC(output_latch_device::bus_w));
m_ppi->in_pc_callback().set("cent_status_in", FUNC(input_buffer_device::bus_r));
- MCFG_DEVICE_ADD(CENTRONICS_TAG, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit5))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit4))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit3))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit1))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit0))
-
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
-
- MCFG_DEVICE_ADD("cent_ctrl_out", OUTPUT_LATCH, 0)
- MCFG_OUTPUT_LATCH_BIT0_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_strobe))
- MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_autofd))
- MCFG_OUTPUT_LATCH_BIT2_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_init))
- MCFG_OUTPUT_LATCH_BIT3_HANDLER(WRITELINE(CENTRONICS_TAG, centronics_device, write_select_in))
-MACHINE_CONFIG_END
+ centronics_device &centronics(CENTRONICS(config, CENTRONICS_TAG, centronics_devices, "printer"));
+ centronics.ack_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit5));
+ centronics.busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit4));
+ centronics.fault_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit3));
+ centronics.select_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit1));
+ centronics.perror_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit0));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ centronics.set_output_latch(cent_data_out);
+
+ INPUT_BUFFER(config, "cent_status_in");
+
+ output_latch_device &cent_ctrl_out(OUTPUT_LATCH(config, "cent_ctrl_out"));
+ cent_ctrl_out.bit_handler<0>().set(CENTRONICS_TAG, FUNC(centronics_device::write_strobe));
+ cent_ctrl_out.bit_handler<1>().set(CENTRONICS_TAG, FUNC(centronics_device::write_autofd));
+ cent_ctrl_out.bit_handler<2>().set(CENTRONICS_TAG, FUNC(centronics_device::write_init));
+ cent_ctrl_out.bit_handler<3>().set(CENTRONICS_TAG, FUNC(centronics_device::write_select_in));
+}
//**************************************************************************
diff --git a/src/devices/bus/scsi/scsi.h b/src/devices/bus/scsi/scsi.h
index e5995f970ab..66ddae370d6 100644
--- a/src/devices/bus/scsi/scsi.h
+++ b/src/devices/bus/scsi/scsi.h
@@ -17,77 +17,6 @@
#define SCSI_PORT_DEVICE6 "6"
#define SCSI_PORT_DEVICE7 "7"
-#define MCFG_SCSI_BSY_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_bsy_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_SEL_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_sel_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_CD_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_cd_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_IO_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_io_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_MSG_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_msg_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_REQ_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_req_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_ACK_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_ack_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_ATN_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_atn_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_RST_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_rst_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA0_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_data0_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA1_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_data1_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA2_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_data2_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA3_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_data3_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA4_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_data4_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA5_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_data5_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA6_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_data6_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_DATA7_HANDLER(_devcb) \
- downcast<scsi_port_device &>(*device).set_data7_handler(DEVCB_##_devcb);
-
-#define MCFG_SCSI_OUTPUT_LATCH_ADD(_tag, scsi_port_tag) \
- MCFG_DEVICE_ADD(_tag, OUTPUT_LATCH, 0) \
- MCFG_OUTPUT_LATCH_BIT0_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data0)) \
- MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data1)) \
- MCFG_OUTPUT_LATCH_BIT2_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data2)) \
- MCFG_OUTPUT_LATCH_BIT3_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data3)) \
- MCFG_OUTPUT_LATCH_BIT4_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data4)) \
- MCFG_OUTPUT_LATCH_BIT5_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data5)) \
- MCFG_OUTPUT_LATCH_BIT6_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data6)) \
- MCFG_OUTPUT_LATCH_BIT7_HANDLER(WRITELINE(scsi_port_tag, scsi_port_device, write_data7))
-
-#define MCFG_SCSI_DATA_INPUT_BUFFER(_tag) \
- MCFG_SCSI_DATA0_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit0)) \
- MCFG_SCSI_DATA1_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit1)) \
- MCFG_SCSI_DATA2_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit2)) \
- MCFG_SCSI_DATA3_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit3)) \
- MCFG_SCSI_DATA4_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit4)) \
- MCFG_SCSI_DATA5_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit5)) \
- MCFG_SCSI_DATA6_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit6)) \
- MCFG_SCSI_DATA7_HANDLER(WRITELINE(_tag, input_buffer_device, write_bit7))
class scsi_port_slot_device;
class scsi_port_interface;
@@ -100,23 +29,6 @@ public:
// construction/destruction
scsi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- template <class Object> devcb_base &set_bsy_handler(Object &&cb) { return m_bsy_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_sel_handler(Object &&cb) { return m_sel_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_cd_handler(Object &&cb) { return m_cd_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_io_handler(Object &&cb) { return m_io_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_msg_handler(Object &&cb) { return m_msg_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_req_handler(Object &&cb) { return m_req_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_ack_handler(Object &&cb) { return m_ack_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_atn_handler(Object &&cb) { return m_atn_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_rst_handler(Object &&cb) { return m_rst_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data0_handler(Object &&cb) { return m_data0_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data1_handler(Object &&cb) { return m_data1_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data2_handler(Object &&cb) { return m_data2_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data3_handler(Object &&cb) { return m_data3_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data4_handler(Object &&cb) { return m_data4_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data5_handler(Object &&cb) { return m_data5_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data6_handler(Object &&cb) { return m_data6_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_data7_handler(Object &&cb) { return m_data7_handler.set_callback(std::forward<Object>(cb)); }
auto bsy_handler() { return m_bsy_handler.bind(); }
auto sel_handler() { return m_sel_handler.bind(); }
auto cd_handler() { return m_cd_handler.bind(); }
diff --git a/src/devices/bus/svi3x8/slot/sv802.cpp b/src/devices/bus/svi3x8/slot/sv802.cpp
index 2cc905d472c..38c23fe416c 100644
--- a/src/devices/bus/svi3x8/slot/sv802.cpp
+++ b/src/devices/bus/svi3x8/slot/sv802.cpp
@@ -20,12 +20,14 @@ DEFINE_DEVICE_TYPE(SV802, sv802_device, "sv802", "SV-802 Centronics Printer Inte
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(sv802_device::device_add_mconfig)
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, sv802_device, busy_w))
+void sv802_device::device_add_mconfig(machine_config &config)
+{
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(sv802_device::busy_w));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
-MACHINE_CONFIG_END
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
+}
//**************************************************************************
diff --git a/src/devices/bus/vtech/ioexp/printer.cpp b/src/devices/bus/vtech/ioexp/printer.cpp
index 66967668703..b927f41d3c4 100644
--- a/src/devices/bus/vtech/ioexp/printer.cpp
+++ b/src/devices/bus/vtech/ioexp/printer.cpp
@@ -23,11 +23,14 @@ DEFINE_DEVICE_TYPE(VTECH_PRINTER_INTERFACE, vtech_printer_interface_device, "vte
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(vtech_printer_interface_device::device_add_mconfig)
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, vtech_printer_interface_device, busy_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("latch", "centronics")
-MACHINE_CONFIG_END
+void vtech_printer_interface_device::device_add_mconfig(machine_config &config)
+{
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(vtech_printer_interface_device::busy_w));
+
+ OUTPUT_LATCH(config, m_latch);
+ m_centronics->set_output_latch(*m_latch);
+}
//**************************************************************************
diff --git a/src/devices/machine/output_latch.h b/src/devices/machine/output_latch.h
index c915b4c7207..2498be7f63f 100644
--- a/src/devices/machine/output_latch.h
+++ b/src/devices/machine/output_latch.h
@@ -6,36 +6,11 @@
#pragma once
-#define MCFG_OUTPUT_LATCH_BIT0_HANDLER(_devcb) \
- downcast<output_latch_device &>(*device).set_bit_handler<0>(DEVCB_##_devcb);
-
-#define MCFG_OUTPUT_LATCH_BIT1_HANDLER(_devcb) \
- downcast<output_latch_device &>(*device).set_bit_handler<1>(DEVCB_##_devcb);
-
-#define MCFG_OUTPUT_LATCH_BIT2_HANDLER(_devcb) \
- downcast<output_latch_device &>(*device).set_bit_handler<2>(DEVCB_##_devcb);
-
-#define MCFG_OUTPUT_LATCH_BIT3_HANDLER(_devcb) \
- downcast<output_latch_device &>(*device).set_bit_handler<3>(DEVCB_##_devcb);
-
-#define MCFG_OUTPUT_LATCH_BIT4_HANDLER(_devcb) \
- downcast<output_latch_device &>(*device).set_bit_handler<4>(DEVCB_##_devcb);
-
-#define MCFG_OUTPUT_LATCH_BIT5_HANDLER(_devcb) \
- downcast<output_latch_device &>(*device).set_bit_handler<5>(DEVCB_##_devcb);
-
-#define MCFG_OUTPUT_LATCH_BIT6_HANDLER(_devcb) \
- downcast<output_latch_device &>(*device).set_bit_handler<6>(DEVCB_##_devcb);
-
-#define MCFG_OUTPUT_LATCH_BIT7_HANDLER(_devcb) \
- downcast<output_latch_device &>(*device).set_bit_handler<7>(DEVCB_##_devcb);
-
class output_latch_device : public device_t
{
public:
output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
- template <unsigned Bit, class Object> devcb_base &set_bit_handler(Object &&cb) { return m_bit_handlers[Bit].set_callback(std::forward<Object>(cb)); }
template <unsigned Bit> auto bit_handler() { return m_bit_handlers[Bit].bind(); }
void write(uint8_t data);
diff --git a/src/devices/machine/pc_lpt.cpp b/src/devices/machine/pc_lpt.cpp
index b0f97871e87..0d43fbc6eeb 100644
--- a/src/devices/machine/pc_lpt.cpp
+++ b/src/devices/machine/pc_lpt.cpp
@@ -46,7 +46,8 @@ void pc_lpt_device::device_reset()
m_cent_ctrl_out->write(m_control);
}
-MACHINE_CONFIG_START(pc_lpt_device::device_add_mconfig)
+void pc_lpt_device::device_add_mconfig(machine_config &config)
+{
centronics_device &centronics(CENTRONICS(config, "centronics", centronics_devices, "printer"));
centronics.set_data_input_buffer(m_cent_data_in);
centronics.fault_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit3));
@@ -64,7 +65,8 @@ MACHINE_CONFIG_START(pc_lpt_device::device_add_mconfig)
INPUT_BUFFER(config, m_cent_ctrl_in);
INPUT_BUFFER(config, m_cent_status_in);
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ centronics.set_output_latch(*m_cent_data_out);
OUTPUT_LATCH(config, m_cent_ctrl_out);
m_cent_ctrl_out->bit_handler<0>().set("centronics", FUNC(centronics_device::write_strobe));
@@ -72,7 +74,7 @@ MACHINE_CONFIG_START(pc_lpt_device::device_add_mconfig)
m_cent_ctrl_out->bit_handler<2>().set("centronics", FUNC(centronics_device::write_init));
m_cent_ctrl_out->bit_handler<3>().set("centronics", FUNC(centronics_device::write_select_in));
m_cent_ctrl_out->bit_handler<4>().set(FUNC(pc_lpt_device::write_irq_enabled));
-MACHINE_CONFIG_END
+}
READ8_MEMBER( pc_lpt_device::data_r )
diff --git a/src/mame/audio/asteroid.cpp b/src/mame/audio/asteroid.cpp
index bfc5bb773f7..cbae5ac9efb 100644
--- a/src/mame/audio/asteroid.cpp
+++ b/src/mame/audio/asteroid.cpp
@@ -315,11 +315,11 @@ WRITE8_MEMBER(asteroid_state::asteroid_noise_reset_w)
}
-MACHINE_CONFIG_START(asteroid_state::asteroid_sound)
+void asteroid_state::asteroid_sound(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, asteroid_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.4)
+ DISCRETE(config, m_discrete, asteroid_discrete).add_route(ALL_OUTPUTS, "mono", 1.4);
ls259_device &audiolatch(LS259(config, "audiolatch")); // M10
audiolatch.q_out_cb<0>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_SAUCER_SND_EN>));
@@ -328,15 +328,15 @@ MACHINE_CONFIG_START(asteroid_state::asteroid_sound)
audiolatch.q_out_cb<3>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_THRUST_EN>));
audiolatch.q_out_cb<4>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_SHIP_FIRE_EN>));
audiolatch.q_out_cb<5>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_LIFE_EN>));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(asteroid_state::astdelux_sound)
+void asteroid_state::astdelux_sound(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, astdelux_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ DISCRETE(config, m_discrete, astdelux_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
ls259_device &audiolatch(LS259(config, "audiolatch")); // M10
audiolatch.q_out_cb<3>().set("discrete", FUNC(discrete_device::write_line<ASTEROID_THRUST_EN>));
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp
index 5de6b6124fd..8fa3b4ca2f6 100644
--- a/src/mame/drivers/amiga.cpp
+++ b/src/mame/drivers/amiga.cpp
@@ -1611,12 +1611,14 @@ MACHINE_CONFIG_START(amiga_state::amiga_base)
rs232.cts_handler().set(FUNC(amiga_state::rs232_cts_w));
// centronics
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, amiga_state, centronics_ack_w))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, amiga_state, centronics_busy_w))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, amiga_state, centronics_perror_w))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, amiga_state, centronics_select_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(amiga_state::centronics_ack_w));
+ m_centronics->busy_handler().set(FUNC(amiga_state::centronics_busy_w));
+ m_centronics->perror_handler().set(FUNC(amiga_state::centronics_perror_w));
+ m_centronics->select_handler().set(FUNC(amiga_state::centronics_select_w));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
// software
MCFG_SOFTWARE_LIST_ADD("wb_list", "amiga_workbench")
diff --git a/src/mame/drivers/amstrad.cpp b/src/mame/drivers/amstrad.cpp
index c7f8533862c..366ddb89d96 100644
--- a/src/mame/drivers/amstrad.cpp
+++ b/src/mame/drivers/amstrad.cpp
@@ -950,8 +950,8 @@ MACHINE_CONFIG_START(amstrad_state::amstrad_base)
m_ay->add_route(ALL_OUTPUTS, "mono", 0.25);
/* printer */
- MCFG_DEVICE_ADD("centronics", CENTRONICS, amstrad_centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, amstrad_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, amstrad_centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(amstrad_state::write_centronics_busy));
/* snapshot */
MCFG_SNAPSHOT_ADD("snapshot", amstrad_state, amstrad, "sna", 0)
@@ -1071,8 +1071,8 @@ MACHINE_CONFIG_START(amstrad_state::cpcplus)
m_ay->add_route(ALL_OUTPUTS, "mono", 0.25);
/* printer */
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, amstrad_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(amstrad_state::write_centronics_busy));
/* snapshot */
MCFG_SNAPSHOT_ADD("snapshot", amstrad_state, amstrad, "sna", 0)
diff --git a/src/mame/drivers/applix.cpp b/src/mame/drivers/applix.cpp
index 9266a44c958..ebd59d5562c 100644
--- a/src/mame/drivers/applix.cpp
+++ b/src/mame/drivers/applix.cpp
@@ -904,11 +904,12 @@ MACHINE_CONFIG_START(applix_state::applix)
m_via->writepb_handler().set(FUNC(applix_state::applix_pb_w));
m_via->irq_handler().set_inputline("maincpu", M68K_IRQ_2);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("via6522", via6522_device, write_ca1))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("via6522", via6522_device, write_pa0))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(m_via, FUNC(via6522_device::write_ca1));
+ m_centronics->busy_handler().set(m_via, FUNC(via6522_device::write_pa0));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
CASSETTE(config, m_cass);
m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
diff --git a/src/mame/drivers/apricotf.cpp b/src/mame/drivers/apricotf.cpp
index de5d1c74696..a9d0cd30ad0 100644
--- a/src/mame/drivers/apricotf.cpp
+++ b/src/mame/drivers/apricotf.cpp
@@ -376,10 +376,11 @@ MACHINE_CONFIG_START(f1_state::act_f1)
m_ctc->zc_callback<1>().set(FUNC(f1_state::ctc_z1_w));
m_ctc->zc_callback<2>().set(FUNC(f1_state::ctc_z2_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(m_sio, z80sio_device, ctsa_w))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(m_sio, FUNC(z80sio_device::ctsa_w));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
// floppy
WD2797(config, m_fdc, 4_MHz_XTAL / 2 /* ? */);
diff --git a/src/mame/drivers/apricotp.cpp b/src/mame/drivers/apricotp.cpp
index 1b8575942ed..b1282b46279 100644
--- a/src/mame/drivers/apricotp.cpp
+++ b/src/mame/drivers/apricotp.cpp
@@ -642,7 +642,8 @@ MACHINE_CONFIG_START(fp_state::fp)
m_centronics->fault_handler().set(FUNC(fp_state::write_centronics_fault));
m_centronics->perror_handler().set(FUNC(fp_state::write_centronics_perror));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("256K").set_extra_options("512K,1M");
diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp
index e3d97ac9747..6fb6fe5fb9a 100644
--- a/src/mame/drivers/asteroid.cpp
+++ b/src/mame/drivers/asteroid.cpp
@@ -808,7 +808,7 @@ void asteroid_state::astdelux(machine_config &config)
audiolatch.q_out_cb<5>().set(FUNC(asteroid_state::coin_counter_left_w)); // LEFT COIN
audiolatch.q_out_cb<6>().set(FUNC(asteroid_state::coin_counter_center_w)); // CENTER COIN
audiolatch.q_out_cb<7>().set(FUNC(asteroid_state::coin_counter_right_w)); // RIGHT COIN
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(asteroid_state::llander)
@@ -824,13 +824,13 @@ MACHINE_CONFIG_START(asteroid_state::llander)
MCFG_SCREEN_VISIBLE_AREA(522, 1566, 270, 1070)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_MODIFY("outlatch") // LS174 at N11
- MCFG_OUTPUT_LATCH_BIT0_HANDLER(OUTPUT("lamp4")) // LAMP5 (COMMAND MISSION)
- MCFG_OUTPUT_LATCH_BIT1_HANDLER(OUTPUT("lamp3")) // LAMP4 (PRIME MISSION)
- MCFG_OUTPUT_LATCH_BIT2_HANDLER(OUTPUT("lamp2")) // LAMP3 (CADET MISSION)
- MCFG_OUTPUT_LATCH_BIT3_HANDLER(OUTPUT("lamp1")) // LAMP2 (TRAINING MISSION)
- MCFG_OUTPUT_LATCH_BIT4_HANDLER(OUTPUT("lamp0")) // START/SELECT LEDs
- MCFG_OUTPUT_LATCH_BIT5_HANDLER(NOOP)
+ output_latch_device &outlatch(*subdevice<output_latch_device>("outlatch")); // LS174 at N11
+ outlatch.bit_handler<0>().set_output("lamp4"); // LAMP5 (COMMAND MISSION)
+ outlatch.bit_handler<1>().set_output("lamp3"); // LAMP4 (PRIME MISSION)
+ outlatch.bit_handler<2>().set_output("lamp2"); // LAMP3 (CADET MISSION)
+ outlatch.bit_handler<3>().set_output("lamp1"); // LAMP2 (TRAINING MISSION)
+ outlatch.bit_handler<4>().set_output("lamp0"); // START/SELECT LEDs
+ outlatch.bit_handler<5>().set_nop();
/* sound hardware */
llander_sound(config);
diff --git a/src/mame/drivers/atom.cpp b/src/mame/drivers/atom.cpp
index 71d145d3bda..d8c6350407e 100644
--- a/src/mame/drivers/atom.cpp
+++ b/src/mame/drivers/atom.cpp
@@ -745,11 +745,12 @@ MACHINE_CONFIG_START(atom_state::atom)
FLOPPY_CONNECTOR(config, I8271_TAG ":0", atom_floppies, "525sssd", atom_state::floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, I8271_TAG ":1", atom_floppies, "525sssd", atom_state::floppy_formats).enable_sound(true);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(R6522_TAG, via6522_device, write_ca1))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(R6522_TAG, via6522_device, write_pa7))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(R6522_TAG, FUNC(via6522_device::write_ca1));
+ m_centronics->busy_handler().set(R6522_TAG, FUNC(via6522_device::write_pa7));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
CASSETTE(config, m_cassette);
m_cassette->set_formats(atom_cassette_formats);
@@ -814,10 +815,11 @@ MACHINE_CONFIG_END
MACHINE_DRIVER( atombb )
-------------------------------------------------*/
-MACHINE_CONFIG_START(atom_state::atombb)
+void atom_state::atombb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(SY6502_TAG, M6502, X2/4)
- MCFG_DEVICE_PROGRAM_MAP(atombb_mem)
+ M6502(config, m_maincpu, X2/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &atom_state::atombb_mem);
/* video hardware */
SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
@@ -828,8 +830,7 @@ MACHINE_CONFIG_START(atom_state::atombb)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
/* devices */
TIMER(config, "hz2400").configure_periodic(FUNC(atom_state::cassette_output_tick), attotime::from_hz(4806));
@@ -845,11 +846,12 @@ MACHINE_CONFIG_START(atom_state::atombb)
ppi.in_pc_callback().set(FUNC(atom_state::ppi_pc_r));
ppi.out_pc_callback().set(FUNC(atom_state::ppi_pc_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(R6522_TAG, via6522_device, write_ca1))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(R6522_TAG, via6522_device, write_pa7))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(R6522_TAG, FUNC(via6522_device::write_ca1));
+ m_centronics->busy_handler().set(R6522_TAG, FUNC(via6522_device::write_pa7));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
CASSETTE(config, m_cassette);
m_cassette->set_formats(atom_cassette_formats);
@@ -858,7 +860,7 @@ MACHINE_CONFIG_START(atom_state::atombb)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("8K,12K");
-MACHINE_CONFIG_END
+}
/*-------------------------------------------------
MACHINE_DRIVER( prophet2 )
diff --git a/src/mame/drivers/aussiebyte.cpp b/src/mame/drivers/aussiebyte.cpp
index ab7d1c7b76e..2b8f7250d26 100644
--- a/src/mame/drivers/aussiebyte.cpp
+++ b/src/mame/drivers/aussiebyte.cpp
@@ -522,7 +522,8 @@ MACHINE_CONFIG_START(aussiebyte_state::aussiebyte)
m_centronics->set_data_input_buffer("cent_data_in");
m_centronics->busy_handler().set(FUNC(aussiebyte_state::write_centronics_busy));
INPUT_BUFFER(config, "cent_data_in");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
Z80CTC(config, m_ctc, 16_MHz_XTAL / 4);
m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
diff --git a/src/mame/drivers/bitgraph.cpp b/src/mame/drivers/bitgraph.cpp
index be66a7c5163..8c482752831 100644
--- a/src/mame/drivers/bitgraph.cpp
+++ b/src/mame/drivers/bitgraph.cpp
@@ -559,7 +559,8 @@ MACHINE_CONFIG_START(bitgraph_state::bg_motherboard)
MACHINE_CONFIG_END
#ifdef UNUSED_FUNCTION
-MACHINE_CONFIG_START(bitgraph_state::bg_ppu)
+void bitgraph_state::bg_ppu(machine_config &config)
+{
i8035_device &ppu(I8035(config, PPU_TAG, XTAL(6'900'000)));
ppu.set_addrmap(AS_IO, &bitgraph_state::ppu_io);
// ppu.t0_in_cb().set(FUNC(bitgraph_state::ppu_t0_r));
@@ -569,16 +570,17 @@ MACHINE_CONFIG_START(bitgraph_state::bg_ppu)
i8243.read_handler().set_nop();
i8243.write_handler().set(FUNC(bitgraph_state::ppu_i8243_w));
- MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit6))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit7))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit4))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit5))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit6));
+ m_centronics->busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit7));
+ m_centronics->fault_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit4));
+ m_centronics->perror_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit5));
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ INPUT_BUFFER(config, "cent_status_in");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
-MACHINE_CONFIG_END
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
+}
#endif
void bitgraph_state::bitgrpha(machine_config &config)
diff --git a/src/mame/drivers/bullet.cpp b/src/mame/drivers/bullet.cpp
index b1f0c89ad24..8d8db491761 100644
--- a/src/mame/drivers/bullet.cpp
+++ b/src/mame/drivers/bullet.cpp
@@ -1158,13 +1158,14 @@ MACHINE_CONFIG_START(bullet_state::bullet)
FLOPPY_CONNECTOR(config, MB8877_TAG":6", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, MB8877_TAG":7", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, bullet_state, write_centronics_busy))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, bullet_state, write_centronics_perror))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, bullet_state, write_centronics_select))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, bullet_state, write_centronics_fault))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(bullet_state::write_centronics_busy));
+ m_centronics->perror_handler().set(FUNC(bullet_state::write_centronics_perror));
+ m_centronics->select_handler().set(FUNC(bullet_state::write_centronics_select));
+ m_centronics->fault_handler().set(FUNC(bullet_state::write_centronics_fault));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
rs232_port_device &rs232a(RS232_PORT(config, RS232_A_TAG, default_rs232_devices, "terminal"));
rs232a.rxd_handler().set(m_dart, FUNC(z80dart_device::rxa_w));
@@ -1241,10 +1242,11 @@ MACHINE_CONFIG_START(bulletf_state::bulletf)
FLOPPY_CONNECTOR(config, MB8877_TAG":8", bullet_35_floppies, nullptr, floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, MB8877_TAG":9", bullet_35_floppies, nullptr, floppy_image_device::default_floppy_formats);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, bullet_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(bullet_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
rs232_port_device &rs232a(RS232_PORT(config, RS232_A_TAG, default_rs232_devices, "terminal"));
rs232a.rxd_handler().set(m_dart, FUNC(z80dart_device::rxa_w));
@@ -1253,17 +1255,18 @@ MACHINE_CONFIG_START(bulletf_state::bulletf)
rs232_port_device &rs232b(RS232_PORT(config, RS232_B_TAG, default_rs232_devices, nullptr));
rs232b.rxd_handler().set(m_dart, FUNC(z80dart_device::rxb_w));
- MCFG_DEVICE_ADD(SCSIBUS_TAG, SCSI_PORT, 0)
- MCFG_SCSI_BSY_HANDLER(WRITELINE("scsi_ctrl_in", input_buffer_device, write_bit3))
- MCFG_SCSI_MSG_HANDLER(WRITELINE("scsi_ctrl_in", input_buffer_device, write_bit4))
- MCFG_SCSI_CD_HANDLER(WRITELINE("scsi_ctrl_in", input_buffer_device, write_bit5))
- MCFG_SCSI_REQ_HANDLER(WRITELINE(*this, bulletf_state, req_w))
- MCFG_SCSI_IO_HANDLER(WRITELINE("scsi_ctrl_in", input_buffer_device, write_bit7))
- MCFG_SCSI_DATA_INPUT_BUFFER("scsi_data_in")
-
- MCFG_SCSI_OUTPUT_LATCH_ADD("scsi_data_out", SCSIBUS_TAG)
- MCFG_DEVICE_ADD("scsi_ctrl_in", INPUT_BUFFER, 0)
- MCFG_DEVICE_ADD("scsi_data_in", INPUT_BUFFER, 0)
+ SCSI_PORT(config, m_scsibus, 0);
+ m_scsibus->bsy_handler().set(m_scsi_ctrl_in, FUNC(input_buffer_device::write_bit3));
+ m_scsibus->msg_handler().set(m_scsi_ctrl_in, FUNC(input_buffer_device::write_bit4));
+ m_scsibus->cd_handler().set(m_scsi_ctrl_in, FUNC(input_buffer_device::write_bit5));
+ m_scsibus->req_handler().set(FUNC(bulletf_state::req_w));
+ m_scsibus->io_handler().set(m_scsi_ctrl_in, FUNC(input_buffer_device::write_bit7));
+ m_scsibus->set_data_input_buffer(m_scsi_data_in);
+
+ OUTPUT_LATCH(config, m_scsi_data_out);
+ m_scsibus->set_output_latch(*m_scsi_data_out);
+ INPUT_BUFFER(config, m_scsi_data_in);
+ INPUT_BUFFER(config, m_scsi_ctrl_in);
MCFG_SCSIDEV_ADD(SCSIBUS_TAG ":" SCSI_PORT_DEVICE1, "harddisk", SCSIHD, SCSI_ID_0)
diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp
index ef2ccf1466f..865d2a47b6e 100644
--- a/src/mame/drivers/bw12.cpp
+++ b/src/mame/drivers/bw12.cpp
@@ -632,13 +632,14 @@ MACHINE_CONFIG_START(bw12_state::common)
rs232b.cts_handler().set(m_sio, FUNC(z80dart_device::ctsb_w));
/* printer */
- MCFG_DEVICE_ADD(CENTRONICS_TAG, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(PIA6821_TAG, pia6821_device, ca1_w))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, bw12_state, write_centronics_busy))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, bw12_state, write_centronics_fault))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, bw12_state, write_centronics_perror))
-
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(m_pia, FUNC(pia6821_device::ca1_w));
+ m_centronics->busy_handler().set(FUNC(bw12_state::write_centronics_busy));
+ m_centronics->fault_handler().set(FUNC(bw12_state::write_centronics_fault));
+ m_centronics->perror_handler().set(FUNC(bw12_state::write_centronics_perror));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(bw12_state::bw12)
diff --git a/src/mame/drivers/bw2.cpp b/src/mame/drivers/bw2.cpp
index fbc294eace6..5521ec767f8 100644
--- a/src/mame/drivers/bw2.cpp
+++ b/src/mame/drivers/bw2.cpp
@@ -577,10 +577,11 @@ MACHINE_CONFIG_START(bw2_state::bw2)
MCFG_DEVICE_ADDRESS_MAP(0, lcdc_map)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, bw2_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(bw2_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(latch);
I8251(config, m_uart, 0);
m_uart->txd_handler().set(RS232_TAG, FUNC(rs232_port_device::write_txd));
diff --git a/src/mame/drivers/cat.cpp b/src/mame/drivers/cat.cpp
index c026a31c58d..95bb7baffc5 100644
--- a/src/mame/drivers/cat.cpp
+++ b/src/mame/drivers/cat.cpp
@@ -1083,7 +1083,9 @@ MACHINE_CONFIG_START(cat_state::cat)
CENTRONICS(config, m_ctx, centronics_devices, "printer");
m_ctx->ack_handler().set(FUNC(cat_state::prn_ack_ff));
m_ctx->busy_handler().set(m_duart, FUNC(mc68681_device::ip4_w)).invert();
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("ctx_data_out", "ctx")
+
+ OUTPUT_LATCH(config, m_ctx_data_out);
+ m_ctx->set_output_latch(*m_ctx_data_out);
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 1.00);
diff --git a/src/mame/drivers/einstein.cpp b/src/mame/drivers/einstein.cpp
index 894db5c483f..2ed96fa6f01 100644
--- a/src/mame/drivers/einstein.cpp
+++ b/src/mame/drivers/einstein.cpp
@@ -633,13 +633,14 @@ MACHINE_CONFIG_START(einstein_state::einstein)
adc.ch4_callback().set_ioport("analogue_2_y");
/* printer */
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(IC_I063, z80pio_device, strobe_a))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, einstein_state, write_centronics_busy))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, einstein_state, write_centronics_perror))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, einstein_state, write_centronics_fault))
-
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(IC_I063, FUNC(z80pio_device::strobe_a));
+ m_centronics->busy_handler().set(FUNC(einstein_state::write_centronics_busy));
+ m_centronics->perror_handler().set(FUNC(einstein_state::write_centronics_perror));
+ m_centronics->fault_handler().set(FUNC(einstein_state::write_centronics_fault));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
TIMER(config, m_strobe_timer).configure_generic(FUNC(einstein_state::strobe_callback));
diff --git a/src/mame/drivers/elwro800.cpp b/src/mame/drivers/elwro800.cpp
index 5be7806e0a1..6489ee56d82 100644
--- a/src/mame/drivers/elwro800.cpp
+++ b/src/mame/drivers/elwro800.cpp
@@ -593,7 +593,8 @@ MACHINE_CONFIG_START(elwro800_state::elwro800)
m_centronics->ack_handler().set(FUNC(elwro800_state::write_centronics_ack));
INPUT_BUFFER(config, "cent_data_in");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
I8251(config, m_i8251, 14_MHz_XTAL / 4);
diff --git a/src/mame/drivers/excali64.cpp b/src/mame/drivers/excali64.cpp
index a6069ded843..f2b5448daa3 100644
--- a/src/mame/drivers/excali64.cpp
+++ b/src/mame/drivers/excali64.cpp
@@ -623,9 +623,11 @@ MACHINE_CONFIG_START(excali64_state::excali64)
m_u12->set_clear_pin_value(1); /* Clear pin - pulled high */
m_u12->out_cb().set(FUNC(excali64_state::motor_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, excali64_state, cent_busy_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(excali64_state::cent_busy_w));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/drivers/fc100.cpp b/src/mame/drivers/fc100.cpp
index 5fac171cdf4..aef22de4eff 100644
--- a/src/mame/drivers/fc100.cpp
+++ b/src/mame/drivers/fc100.cpp
@@ -560,11 +560,14 @@ MACHINE_CONFIG_START(fc100_state::fc100)
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fc100_cart")
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit4))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit5))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit4));
+ m_centronics->busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit5));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
+
+ INPUT_BUFFER(config, "cent_status_in");
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/drivers/fm7.cpp b/src/mame/drivers/fm7.cpp
index 8f7d35af344..44387ccf388 100644
--- a/src/mame/drivers/fm7.cpp
+++ b/src/mame/drivers/fm7.cpp
@@ -2075,14 +2075,15 @@ MACHINE_CONFIG_START(fm7_state::fm7)
MCFG_SOFTWARE_LIST_ADD("flop_list","fm7_disk")
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_SLOT_OPTION_ADD( "dsjoy", DEMPA_SHINBUNSHA_JOYSTICK )
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, fm7_state, write_centronics_busy))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, fm7_state, write_centronics_fault))
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, fm7_state, write_centronics_ack))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, fm7_state, write_centronics_perror))
-
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->option_add("dsjoy", DEMPA_SHINBUNSHA_JOYSTICK);
+ m_centronics->busy_handler().set(FUNC(fm7_state::write_centronics_busy));
+ m_centronics->fault_handler().set(FUNC(fm7_state::write_centronics_fault));
+ m_centronics->ack_handler().set(FUNC(fm7_state::write_centronics_ack));
+ m_centronics->perror_handler().set(FUNC(fm7_state::write_centronics_perror));
+
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(fm7_state::fm8)
@@ -2122,13 +2123,14 @@ MACHINE_CONFIG_START(fm7_state::fm8)
FLOPPY_CONNECTOR(config, m_floppy0, fm7_floppies, "qd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, m_floppy1, fm7_floppies, "qd", floppy_image_device::default_floppy_formats);
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, fm7_state, write_centronics_busy))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, fm7_state, write_centronics_fault))
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, fm7_state, write_centronics_ack))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, fm7_state, write_centronics_perror))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(fm7_state::write_centronics_busy));
+ m_centronics->fault_handler().set(FUNC(fm7_state::write_centronics_fault));
+ m_centronics->ack_handler().set(FUNC(fm7_state::write_centronics_ack));
+ m_centronics->perror_handler().set(FUNC(fm7_state::write_centronics_perror));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(fm7_state::fm77av)
@@ -2184,13 +2186,14 @@ MACHINE_CONFIG_START(fm7_state::fm77av)
MCFG_SOFTWARE_LIST_ADD("av_flop_list", "fm77av")
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("flop_list", "fm7_disk")
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, fm7_state, write_centronics_busy))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, fm7_state, write_centronics_fault))
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, fm7_state, write_centronics_ack))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, fm7_state, write_centronics_perror))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(fm7_state::write_centronics_busy));
+ m_centronics->fault_handler().set(FUNC(fm7_state::write_centronics_fault));
+ m_centronics->ack_handler().set(FUNC(fm7_state::write_centronics_ack));
+ m_centronics->perror_handler().set(FUNC(fm7_state::write_centronics_perror));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(fm7_state::fm11)
@@ -2239,13 +2242,14 @@ MACHINE_CONFIG_START(fm7_state::fm11)
FLOPPY_CONNECTOR(config, m_floppy0, fm7_floppies, "qd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, m_floppy1, fm7_floppies, "qd", floppy_image_device::default_floppy_formats);
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, fm7_state, write_centronics_busy))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, fm7_state, write_centronics_fault))
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, fm7_state, write_centronics_ack))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, fm7_state, write_centronics_perror))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(fm7_state::write_centronics_busy));
+ m_centronics->fault_handler().set(FUNC(fm7_state::write_centronics_fault));
+ m_centronics->ack_handler().set(FUNC(fm7_state::write_centronics_ack));
+ m_centronics->perror_handler().set(FUNC(fm7_state::write_centronics_perror));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(fm7_state::fm16beta)
@@ -2285,13 +2289,14 @@ MACHINE_CONFIG_START(fm7_state::fm16beta)
FLOPPY_CONNECTOR(config, m_floppy0, fm7_floppies, "qd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, m_floppy1, fm7_floppies, "qd", floppy_image_device::default_floppy_formats);
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, fm7_state, write_centronics_busy))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, fm7_state, write_centronics_fault))
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, fm7_state, write_centronics_ack))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, fm7_state, write_centronics_perror))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(fm7_state::write_centronics_busy));
+ m_centronics->fault_handler().set(FUNC(fm7_state::write_centronics_fault));
+ m_centronics->ack_handler().set(FUNC(fm7_state::write_centronics_ack));
+ m_centronics->perror_handler().set(FUNC(fm7_state::write_centronics_perror));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
MACHINE_CONFIG_END
/* ROM definition */
diff --git a/src/mame/drivers/force68k.cpp b/src/mame/drivers/force68k.cpp
index cb7a66ad7d7..a447752fc12 100644
--- a/src/mame/drivers/force68k.cpp
+++ b/src/mame/drivers/force68k.cpp
@@ -595,12 +595,14 @@ MACHINE_CONFIG_START(force68k_state::fccpu1)
m_pit->h2_out_callback().set(m_centronics, FUNC(centronics_device::write_strobe));
// Centronics
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE (*this, force68k_state, centronics_ack_w))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE (*this, force68k_state, centronics_busy_w))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE (*this, force68k_state, centronics_perror_w))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE (*this, force68k_state, centronics_select_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(force68k_state::centronics_ack_w));
+ m_centronics->busy_handler().set(FUNC(force68k_state::centronics_busy_w));
+ m_centronics->perror_handler().set(FUNC(force68k_state::centronics_perror_w));
+ m_centronics->select_handler().set(FUNC(force68k_state::centronics_select_w));
+
+ output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(latch);
// EPROM sockets
fccpu1_eprom_sockets(config);
diff --git a/src/mame/drivers/fp1100.cpp b/src/mame/drivers/fp1100.cpp
index c16a7d07605..4533f45a588 100644
--- a/src/mame/drivers/fp1100.cpp
+++ b/src/mame/drivers/fp1100.cpp
@@ -677,9 +677,11 @@ MACHINE_CONFIG_START(fp1100_state::fp1100)
m_crtc->set_update_row_callback(FUNC(fp1100_state::crtc_update_row), this);
/* Printer */
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, fp1100_state, centronics_busy_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(fp1100_state::centronics_busy_w));
+
+ output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(latch);
/* Cassette */
CASSETTE(config, m_cass);
diff --git a/src/mame/drivers/jtc.cpp b/src/mame/drivers/jtc.cpp
index 8cac8b5e446..e621fd2bdf2 100644
--- a/src/mame/drivers/jtc.cpp
+++ b/src/mame/drivers/jtc.cpp
@@ -827,8 +827,8 @@ MACHINE_CONFIG_START(jtc_state::basic)
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
/* printer */
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, jtc_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(jtc_state::write_centronics_busy));
/* quickload */
MCFG_QUICKLOAD_ADD("quickload", jtc_state, jtc, "jtc,bin", 2)
diff --git a/src/mame/drivers/jupace.cpp b/src/mame/drivers/jupace.cpp
index ec5bf8b9766..fdfdb10486a 100644
--- a/src/mame/drivers/jupace.cpp
+++ b/src/mame/drivers/jupace.cpp
@@ -802,8 +802,10 @@ MACHINE_CONFIG_START(ace_state::ace)
m_z80pio->out_pa_callback().set(FUNC(ace_state::pio_pa_w));
m_z80pio->out_pb_callback().set("cent_data_out", FUNC(output_latch_device::bus_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
// internal ram
RAM(config, RAM_TAG).set_default_size("1K").set_extra_options("16K,32K,48K");
diff --git a/src/mame/drivers/kaypro.cpp b/src/mame/drivers/kaypro.cpp
index 9f827622439..82c5e7edd95 100644
--- a/src/mame/drivers/kaypro.cpp
+++ b/src/mame/drivers/kaypro.cpp
@@ -230,10 +230,11 @@ MACHINE_CONFIG_START(kaypro_state::kayproii)
kbd.rxd_cb().set("sio", FUNC(z80sio_device::rxb_w));
kbd.rxd_cb().append("sio", FUNC(z80sio_device::syncb_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, kaypro_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(kaypro_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(latch);
rs232_port_device &serial(RS232_PORT(config, "serial", default_rs232_devices, nullptr));
serial.rxd_handler().set("sio", FUNC(z80sio_device::rxa_w));
@@ -322,10 +323,11 @@ MACHINE_CONFIG_START(kaypro_state::kaypro484)
CLOCK(config, "kbdtxrxc", 4800).signal_handler().set("sio_1", FUNC(z80sio_device::rxtxcb_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, kaypro_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(kaypro_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(latch);
rs232_port_device &modem(RS232_PORT(config, "modem", default_rs232_devices, nullptr));
modem.rxd_handler().set("sio_1", FUNC(z80sio_device::rxa_w));
diff --git a/src/mame/drivers/kdt6.cpp b/src/mame/drivers/kdt6.cpp
index eca8764ca91..a76c875f6bc 100644
--- a/src/mame/drivers/kdt6.cpp
+++ b/src/mame/drivers/kdt6.cpp
@@ -705,7 +705,8 @@ MACHINE_CONFIG_START(kdt6_state::psi98)
m_centronics->select_handler().set("pio", FUNC(z80pio_device::pa5_w));
INPUT_BUFFER(config, "cent_data_in");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(latch);
UPD1990A(config, m_rtc);
diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp
index 4e6ad24a2c9..47ffe6a5944 100644
--- a/src/mame/drivers/m5.cpp
+++ b/src/mame/drivers/m5.cpp
@@ -1426,10 +1426,11 @@ MACHINE_CONFIG_START(m5_state::m5)
// CK0 = EXINT, CK1 = GND, CK2 = TCK, CK3 = VDP INT
// ZC2 = EXCLK
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, m5_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(m5_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
CASSETTE(config, m_cassette);
m_cassette->set_formats(sordm5_cassette_formats);
diff --git a/src/mame/drivers/mbee.cpp b/src/mame/drivers/mbee.cpp
index b1795df2440..aa4c4e6c69e 100644
--- a/src/mame/drivers/mbee.cpp
+++ b/src/mame/drivers/mbee.cpp
@@ -689,10 +689,11 @@ MACHINE_CONFIG_START(mbee_state::mbee)
MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com,bee", 3)
MCFG_QUICKLOAD_ADD("quickload2", mbee_state, mbee_z80bin, "bin", 3)
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("z80pio", z80pio_device, strobe_a))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(m_pio, FUNC(z80pio_device::strobe_a));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
CASSETTE(config, m_cassette);
m_cassette->set_formats(mbee_cassette_formats);
@@ -746,10 +747,11 @@ MACHINE_CONFIG_START(mbee_state::mbeeic)
MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com,bee", 2)
MCFG_QUICKLOAD_ADD("quickload2", mbee_state, mbee_z80bin, "bin", 2)
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(m_pio, z80pio_device, strobe_a))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(m_pio, FUNC(z80pio_device::strobe_a));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
CASSETTE(config, m_cassette);
m_cassette->set_formats(mbee_cassette_formats);
diff --git a/src/mame/drivers/mc1000.cpp b/src/mame/drivers/mc1000.cpp
index a4702a42645..1558215b1fb 100644
--- a/src/mame/drivers/mc1000.cpp
+++ b/src/mame/drivers/mc1000.cpp
@@ -584,10 +584,11 @@ MACHINE_CONFIG_START(mc1000_state::mc1000)
MCFG_SOFTWARE_LIST_ADD("cass_list", "mc1000_cass")
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, mc1000_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(mc1000_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(latch);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("48K");
diff --git a/src/mame/drivers/mc1502.cpp b/src/mame/drivers/mc1502.cpp
index 1d2faeab7ef..e98fa486f77 100644
--- a/src/mame/drivers/mc1502.cpp
+++ b/src/mame/drivers/mc1502.cpp
@@ -293,15 +293,16 @@ MACHINE_CONFIG_START(mc1502_state::mc1502)
WAVE(config, "wave", m_cassette); // FIXME: really no output routes for the cassette sound?
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.80);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit6))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit7))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit4))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit5))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit6));
+ m_centronics->busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit7));
+ m_centronics->fault_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit4));
+ m_centronics->perror_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit5));
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ INPUT_BUFFER(config, "cent_status_in");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
diff --git a/src/mame/drivers/msx.cpp b/src/mame/drivers/msx.cpp
index 3b6a89ba09d..df3dbb07c44 100644
--- a/src/mame/drivers/msx.cpp
+++ b/src/mame/drivers/msx.cpp
@@ -1377,14 +1377,15 @@ MACHINE_CONFIG_START(msx_state::msx)
m_ay8910->add_route(ALL_OUTPUTS, "speaker", 0.3);
/* printer */
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit1))
+ centronics_device &centronics(CENTRONICS(config, "centronics", centronics_devices, "printer"));
+ centronics.busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit1));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ centronics.set_output_latch(cent_data_out);
+ INPUT_BUFFER(config, "cent_status_in");
- MCFG_DEVICE_ADD("cent_ctrl_out", OUTPUT_LATCH, 0)
- MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE("centronics", centronics_device, write_strobe))
+ output_latch_device &cent_ctrl_out(OUTPUT_LATCH(config, "cent_ctrl_out"));
+ cent_ctrl_out.bit_handler<1>().set(centronics, FUNC(centronics_device::write_strobe));
/* cassette */
CASSETTE(config, m_cassette);
@@ -1447,14 +1448,15 @@ MACHINE_CONFIG_START(msx2_state::msx2)
m_ay8910->add_route(ALL_OUTPUTS, "speaker", 0.3);
/* printer */
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit1))
+ centronics_device &centronics(CENTRONICS(config, "centronics", centronics_devices, "printer"));
+ centronics.busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit1));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ centronics.set_output_latch(cent_data_out);
+ INPUT_BUFFER(config, "cent_status_in");
- MCFG_DEVICE_ADD("cent_ctrl_out", OUTPUT_LATCH, 0)
- MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE("centronics", centronics_device, write_strobe))
+ output_latch_device &cent_ctrl_out(OUTPUT_LATCH(config, "cent_ctrl_out"));
+ cent_ctrl_out.bit_handler<1>().set(centronics, FUNC(centronics_device::write_strobe));
/* cassette */
CASSETTE(config, m_cassette);
@@ -1508,14 +1510,15 @@ MACHINE_CONFIG_START(msx2_state::msx2p)
m_ay8910->add_route(ALL_OUTPUTS, "speaker", 0.3);
/* printer */
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit1))
+ centronics_device &centronics(CENTRONICS(config, "centronics", centronics_devices, "printer"));
+ centronics.busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit1));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ centronics.set_output_latch(cent_data_out);
+ INPUT_BUFFER(config, "cent_status_in");
- MCFG_DEVICE_ADD("cent_ctrl_out", OUTPUT_LATCH, 0)
- MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE("centronics", centronics_device, write_strobe))
+ output_latch_device &cent_ctrl_out(OUTPUT_LATCH(config, "cent_ctrl_out"));
+ cent_ctrl_out.bit_handler<1>().set(centronics, FUNC(centronics_device::write_strobe));
/* cassette */
CASSETTE(config, m_cassette);
diff --git a/src/mame/drivers/mtx.cpp b/src/mame/drivers/mtx.cpp
index 04852d39bf7..986709563f2 100644
--- a/src/mame/drivers/mtx.cpp
+++ b/src/mame/drivers/mtx.cpp
@@ -314,13 +314,14 @@ MACHINE_CONFIG_START(mtx_state::mtx512)
TIMER(config, "z80ctc_timer").configure_periodic(FUNC(mtx_state::ctc_tick), attotime::from_hz(XTAL(4'000'000)/13));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, mtx_state, write_centronics_busy))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, mtx_state, write_centronics_fault))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, mtx_state, write_centronics_perror))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, mtx_state, write_centronics_select))
-
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(mtx_state::write_centronics_busy));
+ m_centronics->fault_handler().set(FUNC(mtx_state::write_centronics_fault));
+ m_centronics->perror_handler().set(FUNC(mtx_state::write_centronics_perror));
+ m_centronics->select_handler().set(FUNC(mtx_state::write_centronics_select));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
MCFG_SNAPSHOT_ADD("snapshot", mtx_state, mtx, "mtx", 1)
CASSETTE(config, m_cassette);
diff --git a/src/mame/drivers/myb3k.cpp b/src/mame/drivers/myb3k.cpp
index e4194c3280f..a555f364266 100644
--- a/src/mame/drivers/myb3k.cpp
+++ b/src/mame/drivers/myb3k.cpp
@@ -1005,12 +1005,15 @@ MACHINE_CONFIG_START(myb3k_state::myb3k)
MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "isa", stepone_isa_cards, nullptr, false)
/* Centronics */
- MCFG_DEVICE_ADD (m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER (WRITELINE (*this, myb3k_state, centronics_ack_w))
- MCFG_CENTRONICS_BUSY_HANDLER (WRITELINE (*this, myb3k_state, centronics_busy_w))
- MCFG_CENTRONICS_PERROR_HANDLER (WRITELINE (*this, myb3k_state, centronics_perror_w))
- MCFG_CENTRONICS_SELECT_HANDLER (WRITELINE (*this, myb3k_state, centronics_select_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD ("cent_data_out", "centronics")
+
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(myb3k_state::centronics_ack_w));
+ m_centronics->busy_handler().set(FUNC(myb3k_state::centronics_busy_w));
+ m_centronics->perror_handler().set(FUNC(myb3k_state::centronics_perror_w));
+ m_centronics->select_handler().set(FUNC(myb3k_state::centronics_select_w));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
/* Sound */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/mz700.cpp b/src/mame/drivers/mz700.cpp
index 98479a728e7..94ec41c7902 100644
--- a/src/mame/drivers/mz700.cpp
+++ b/src/mame/drivers/mz700.cpp
@@ -461,9 +461,10 @@ MACHINE_CONFIG_START(mz_state::mz800)
pio.out_pa_callback().set(FUNC(mz_state::mz800_z80pio_port_a_w));
pio.out_pb_callback().set("cent_data_out", FUNC(output_latch_device::bus_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/nc.cpp b/src/mame/drivers/nc.cpp
index 2aa4d8a78c0..f7d43c250f2 100644
--- a/src/mame/drivers/nc.cpp
+++ b/src/mame/drivers/nc.cpp
@@ -1398,10 +1398,11 @@ MACHINE_CONFIG_START(nc_state::nc_base)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
/* printer */
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, nc_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(nc_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
/* uart */
I8251(config, m_uart, 0);
@@ -1435,8 +1436,7 @@ MACHINE_CONFIG_START(nc100_state::nc100)
MCFG_SCREEN_UPDATE_DRIVER(nc100_state, screen_update_nc100)
/* printer */
- MCFG_DEVICE_MODIFY("centronics")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, nc100_state, write_nc100_centronics_ack))
+ m_centronics->ack_handler().set(FUNC(nc100_state::write_nc100_centronics_ack));
/* uart */
m_uart->rxrdy_handler().set(FUNC(nc100_state::nc100_rxrdy_callback));
@@ -1475,8 +1475,7 @@ MACHINE_CONFIG_START(nc200_state::nc200)
palette.set_init(FUNC(nc200_state::nc_colours));
/* printer */
- MCFG_DEVICE_MODIFY("centronics")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, nc200_state, write_nc200_centronics_ack))
+ m_centronics->ack_handler().set(FUNC(nc200_state::write_nc200_centronics_ack));
/* uart */
m_uart->rxrdy_handler().set(FUNC(nc200_state::nc200_rxrdy_callback));
@@ -1487,7 +1486,7 @@ MACHINE_CONFIG_START(nc200_state::nc200)
FLOPPY_CONNECTOR(config, "upd765:0", ibmpc_floppies, "525dd", ibmpc_floppy_formats);
FLOPPY_CONNECTOR(config, "upd765:1", ibmpc_floppies, "525dd", ibmpc_floppy_formats);
- MCFG_DEVICE_ADD("mc", MC146818, 4.194304_MHz_XTAL)
+ MC146818(config, "mc", 4.194304_MHz_XTAL);
/* internal ram */
m_ram->set_default_size("128K");
diff --git a/src/mame/drivers/octopus.cpp b/src/mame/drivers/octopus.cpp
index 6ce63fc37e8..d4810acea5d 100644
--- a/src/mame/drivers/octopus.cpp
+++ b/src/mame/drivers/octopus.cpp
@@ -1008,9 +1008,9 @@ MACHINE_CONFIG_START(octopus_state::octopus)
serial_b.cts_handler().set(m_serial, FUNC(z80sio_device::ctsb_w)).invert();
//serial_b.ri_handler().set(m_serial, FUNC(z80sio_device::rib_w)).invert();
- MCFG_DEVICE_ADD(m_parallel, CENTRONICS, octopus_centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, octopus_state, parallel_busy_w))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, octopus_state, parallel_slctout_w))
+ CENTRONICS(config, m_parallel, octopus_centronics_devices, "printer");
+ m_parallel->busy_handler().set(FUNC(octopus_state::parallel_busy_w));
+ m_parallel->select_handler().set(FUNC(octopus_state::parallel_slctout_w));
// TODO: Winchester HD controller (Xebec/SASI compatible? uses TTL logic)
/* video hardware */
diff --git a/src/mame/drivers/pc1512.cpp b/src/mame/drivers/pc1512.cpp
index d3d9f19d9e2..ed4e026bfa6 100644
--- a/src/mame/drivers/pc1512.cpp
+++ b/src/mame/drivers/pc1512.cpp
@@ -1222,13 +1222,15 @@ MACHINE_CONFIG_START(pc1512_state::pc1512)
m_uart->out_rts_callback().set(RS232_TAG, FUNC(rs232_port_device::write_rts));
m_uart->out_int_callback().set(m_pic, FUNC(pic8259_device::ir4_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, pc1512_state, write_centronics_ack))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, pc1512_state, write_centronics_busy))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, pc1512_state, write_centronics_perror))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, pc1512_state, write_centronics_select))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, pc1512_state, write_centronics_fault))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(pc1512_state::write_centronics_ack));
+ m_centronics->busy_handler().set(FUNC(pc1512_state::write_centronics_busy));
+ m_centronics->perror_handler().set(FUNC(pc1512_state::write_centronics_perror));
+ m_centronics->select_handler().set(FUNC(pc1512_state::write_centronics_select));
+ m_centronics->fault_handler().set(FUNC(pc1512_state::write_centronics_fault));
+
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
rs232_port_device &rs232(RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr));
rs232.rxd_handler().set(m_uart, FUNC(ins8250_uart_device::rx_w));
@@ -1354,13 +1356,15 @@ MACHINE_CONFIG_START(pc1640_state::pc1640)
m_uart->out_rts_callback().set(RS232_TAG, FUNC(rs232_port_device::write_rts));
m_uart->out_int_callback().set(m_pic, FUNC(pic8259_device::ir4_w));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, pc1512_base_state, write_centronics_ack))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, pc1512_base_state, write_centronics_busy))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, pc1512_base_state, write_centronics_perror))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, pc1512_base_state, write_centronics_select))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, pc1512_base_state, write_centronics_fault))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(pc1512_state::write_centronics_ack));
+ m_centronics->busy_handler().set(FUNC(pc1512_state::write_centronics_busy));
+ m_centronics->perror_handler().set(FUNC(pc1512_state::write_centronics_perror));
+ m_centronics->select_handler().set(FUNC(pc1512_state::write_centronics_select));
+ m_centronics->fault_handler().set(FUNC(pc1512_state::write_centronics_fault));
+
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
rs232_port_device &rs232(RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr));
rs232.rxd_handler().set(m_uart, FUNC(ins8250_uart_device::rx_w));
diff --git a/src/mame/drivers/pc8001.cpp b/src/mame/drivers/pc8001.cpp
index 92d31b9ca22..a56ef6c7d7b 100644
--- a/src/mame/drivers/pc8001.cpp
+++ b/src/mame/drivers/pc8001.cpp
@@ -515,11 +515,12 @@ MACHINE_CONFIG_START(pc8001_state::pc8001)
m_crtc->drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq2_w));
m_crtc->set_screen(SCREEN_TAG);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, pc8001_state, write_centronics_ack))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, pc8001_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(pc8001_state::write_centronics_ack));
+ m_centronics->busy_handler().set(FUNC(pc8001_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
@@ -563,9 +564,10 @@ MACHINE_CONFIG_START(pc8001mk2_state::pc8001mk2)
m_crtc->drq_wr_callback().set(m_dma, FUNC(i8257_device::dreq2_w));
m_crtc->set_screen(SCREEN_TAG);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
diff --git a/src/mame/drivers/pc8801.cpp b/src/mame/drivers/pc8801.cpp
index b76a7fc3ed4..342484b1ede 100644
--- a/src/mame/drivers/pc8801.cpp
+++ b/src/mame/drivers/pc8801.cpp
@@ -2375,7 +2375,7 @@ MACHINE_CONFIG_START(pc8801_state::pc8801)
I8214(config, I8214_TAG, MASTER_CLOCK);
#endif
UPD1990A(config, m_rtc);
- //MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
+ //CENTRONICS(config, "centronics", centronics_devices, "printer");
CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
diff --git a/src/mame/drivers/pencil2.cpp b/src/mame/drivers/pencil2.cpp
index 30cd5a36af5..7426375692e 100644
--- a/src/mame/drivers/pencil2.cpp
+++ b/src/mame/drivers/pencil2.cpp
@@ -337,11 +337,12 @@ MACHINE_CONFIG_START(pencil2_state::pencil2)
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pencil2_cart")
/* printer */
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, pencil2_state, write_centronics_ack))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, pencil2_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(pencil2_state::write_centronics_ack));
+ m_centronics->busy_handler().set(FUNC(pencil2_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list", "pencil2")
diff --git a/src/mame/drivers/phc25.cpp b/src/mame/drivers/phc25.cpp
index 957a4eaac89..9c03da9da78 100644
--- a/src/mame/drivers/phc25.cpp
+++ b/src/mame/drivers/phc25.cpp
@@ -328,10 +328,11 @@ MACHINE_CONFIG_START(phc25_state::phc25)
m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED);
m_cassette->set_interface("phc25_cass");
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, phc25_state, write_centronics_busy))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(phc25_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("16K");
diff --git a/src/mame/drivers/prof180x.cpp b/src/mame/drivers/prof180x.cpp
index 8f420520b2f..59d8f225caa 100644
--- a/src/mame/drivers/prof180x.cpp
+++ b/src/mame/drivers/prof180x.cpp
@@ -259,10 +259,12 @@ MACHINE_CONFIG_START(prof180x_state::prof180x)
FLOPPY_CONNECTOR(config, FDC9268_TAG ":2", prof180x_floppies, "35dd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, FDC9268_TAG ":3", prof180x_floppies, "35dd", floppy_image_device::default_floppy_formats);
- //MCFG_RTC8583_ADD(MK3835_TAG, rtc_intf)
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
+ //RTC8583(config, MK3835_TAG, rtc_intf);
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+
+ output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(latch);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("128K").set_extra_options("256K,512K");
diff --git a/src/mame/drivers/proteus.cpp b/src/mame/drivers/proteus.cpp
index 0000c44fa63..8886d7e58d3 100644
--- a/src/mame/drivers/proteus.cpp
+++ b/src/mame/drivers/proteus.cpp
@@ -364,9 +364,10 @@ MACHINE_CONFIG_START(proteus_state::proteus)
m_pia->irqa_handler().set("irqs", FUNC(input_merger_device::in_w<2>));
m_pia->irqb_handler().set("irqs", FUNC(input_merger_device::in_w<3>));
- MCFG_DEVICE_ADD("parallel", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE("pia", pia6821_device, ca1_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "parallel")
+ centronics_device &parallel(CENTRONICS(config, "parallel", centronics_devices, "printer"));
+ parallel.ack_handler().set(m_pia, FUNC(pia6821_device::ca1_w));
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ parallel.set_output_latch(cent_data_out);
/* terminal port */
ACIA6850(config, m_acia[0], 0);
diff --git a/src/mame/drivers/px4.cpp b/src/mame/drivers/px4.cpp
index e0d3625f2c4..d6d3f1827ee 100644
--- a/src/mame/drivers/px4.cpp
+++ b/src/mame/drivers/px4.cpp
@@ -1515,11 +1515,12 @@ MACHINE_CONFIG_START(px4_state::px4)
NVRAM(config, "nvram", nvram_device::DEFAULT_NONE);
// centronics printer
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, px4_state, centronics_busy_w))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, px4_state, centronics_perror_w))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(px4_state::centronics_busy_w));
+ m_centronics->perror_handler().set(FUNC(px4_state::centronics_perror_w));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &latch(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(latch);
// external cassette
CASSETTE(config, m_ext_cas);
diff --git a/src/mame/drivers/sage2.cpp b/src/mame/drivers/sage2.cpp
index f72fba6b9a2..a90813d2336 100644
--- a/src/mame/drivers/sage2.cpp
+++ b/src/mame/drivers/sage2.cpp
@@ -470,14 +470,15 @@ MACHINE_CONFIG_START(sage2_state::sage2)
UPD765A(config, m_fdc, 8'000'000, false, false);
m_fdc->intrq_wr_callback().set(FUNC(sage2_state::fdc_irq));
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, sage2_state, write_centronics_ack))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, sage2_state, write_centronics_busy))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, sage2_state, write_centronics_perror))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, sage2_state, write_centronics_select))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, sage2_state, write_centronics_fault))
-
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(sage2_state::write_centronics_ack));
+ m_centronics->busy_handler().set(FUNC(sage2_state::write_centronics_busy));
+ m_centronics->perror_handler().set(FUNC(sage2_state::write_centronics_perror));
+ m_centronics->select_handler().set(FUNC(sage2_state::write_centronics_select));
+ m_centronics->fault_handler().set(FUNC(sage2_state::write_centronics_fault));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
FLOPPY_CONNECTOR(config, UPD765_TAG ":0", sage2_floppies, "525qd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, UPD765_TAG ":1", sage2_floppies, "525qd", floppy_image_device::default_floppy_formats);
diff --git a/src/mame/drivers/sg1000.cpp b/src/mame/drivers/sg1000.cpp
index 2e7742abec0..e9c7e66c310 100644
--- a/src/mame/drivers/sg1000.cpp
+++ b/src/mame/drivers/sg1000.cpp
@@ -654,9 +654,10 @@ MACHINE_CONFIG_START(sf7000_state::sf7000)
UPD765A(config, m_fdc, 8'000'000, false, false);
FLOPPY_CONNECTOR(config, UPD765_TAG ":0", sf7000_floppies, "3ssdd", sf7000_state::floppy_formats);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
/* sf7000 (sc3000) has all sk1100 features built-in, so add it as a fixed slot */
MCFG_SG1000_EXPANSION_ADD(EXPSLOT_TAG, sg1000_expansion_devices, "sk1100", true)
diff --git a/src/mame/drivers/slicer.cpp b/src/mame/drivers/slicer.cpp
index e39bfa05b0d..1a6c9c0c14a 100644
--- a/src/mame/drivers/slicer.cpp
+++ b/src/mame/drivers/slicer.cpp
@@ -132,17 +132,18 @@ MACHINE_CONFIG_START(slicer_state::slicer)
drivelatch.q_out_cb<6>().set(FUNC(slicer_state::drive_size_w));
drivelatch.q_out_cb<7>().set("fdc", FUNC(fd1797_device::dden_w));
- MCFG_DEVICE_ADD("sasi", SCSI_PORT, 0)
- MCFG_SCSI_DATA_INPUT_BUFFER("sasi_data_in")
- MCFG_SCSI_BSY_HANDLER(WRITELINE("sasi_ctrl_in", input_buffer_device, write_bit3))
- MCFG_SCSI_MSG_HANDLER(WRITELINE("sasi_ctrl_in", input_buffer_device, write_bit4))
- MCFG_SCSI_CD_HANDLER(WRITELINE("sasi_ctrl_in", input_buffer_device, write_bit5))
- MCFG_SCSI_REQ_HANDLER(WRITELINE("sasi_ctrl_in", input_buffer_device, write_bit6))
- MCFG_SCSI_IO_HANDLER(WRITELINE("sasi_ctrl_in", input_buffer_device, write_bit7))
-
- MCFG_SCSI_OUTPUT_LATCH_ADD("sasi_data_out", "sasi")
- MCFG_DEVICE_ADD("sasi_data_in", INPUT_BUFFER, 0)
- MCFG_DEVICE_ADD("sasi_ctrl_in", INPUT_BUFFER, 0)
+ SCSI_PORT(config, m_sasi, 0);
+ m_sasi->set_data_input_buffer("sasi_data_in");
+ m_sasi->bsy_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit3));
+ m_sasi->msg_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit4));
+ m_sasi->cd_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit5));
+ m_sasi->req_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit6));
+ m_sasi->io_handler().set("sasi_ctrl_in", FUNC(input_buffer_device::write_bit7));
+
+ output_latch_device &sasi_data_out(OUTPUT_LATCH(config, "sasi_data_out"));
+ m_sasi->set_output_latch(sasi_data_out);
+ INPUT_BUFFER(config, "sasi_data_in");
+ INPUT_BUFFER(config, "sasi_ctrl_in");
MACHINE_CONFIG_END
ROM_START( slicer )
diff --git a/src/mame/drivers/sorcerer.cpp b/src/mame/drivers/sorcerer.cpp
index 7a504f99206..f2633fa5c6b 100644
--- a/src/mame/drivers/sorcerer.cpp
+++ b/src/mame/drivers/sorcerer.cpp
@@ -437,13 +437,12 @@ MACHINE_CONFIG_START(sorcerer_state::sorcerer)
RS232_PORT(config, "rs232", default_rs232_devices, "null_modem").set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal));
/* printer */
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "covox")
-
/* The use of the parallel port as a general purpose port is not emulated.
Currently the only use is to read the printer status in the Centronics CENDRV bios routine. */
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit7))
+ CENTRONICS(config, m_centronics, centronics_devices, "covox");
+ m_centronics->busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit7));
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ INPUT_BUFFER(config, "cent_status_in");
/* quickload */
MCFG_SNAPSHOT_ADD("snapshot", sorcerer_state, sorcerer, "snp", 2)
diff --git a/src/mame/drivers/spc1000.cpp b/src/mame/drivers/spc1000.cpp
index 83e9a2c6398..77d1a1ead65 100644
--- a/src/mame/drivers/spc1000.cpp
+++ b/src/mame/drivers/spc1000.cpp
@@ -494,10 +494,13 @@ MACHINE_CONFIG_START(spc1000_state::spc1000)
MCFG_DEVICE_ADD("ext1", SPC1000_EXP_SLOT, 0)
MCFG_DEVICE_SLOT_INTERFACE(spc1000_exp, nullptr, false)
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, spc1000_state, centronics_busy_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(spc1000_state::centronics_busy_w));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
+
+ INPUT_BUFFER(config, "cent_status_in");
CASSETTE(config, m_cass);
m_cass->set_formats(spc1000_cassette_formats);
diff --git a/src/mame/drivers/spc1500.cpp b/src/mame/drivers/spc1500.cpp
index b4fba68fe6d..966a668898f 100644
--- a/src/mame/drivers/spc1500.cpp
+++ b/src/mame/drivers/spc1500.cpp
@@ -921,10 +921,13 @@ MACHINE_CONFIG_START(spc1500_state::spc1500)
m_sound->add_route(ALL_OUTPUTS, "mono", 1.00);
WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, spc1500_state, centronics_busy_w))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(spc1500_state::centronics_busy_w));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
+
+ INPUT_BUFFER(config, "cent_status_in");
CASSETTE(config, m_cass);
m_cass->set_formats(spc1000_cassette_formats);
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index dab9dd60eb3..37233954452 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -2229,7 +2229,8 @@ MACHINE_CONFIG_START(thomson_state::mo6)
CENTRONICS(config, m_centronics, centronics_devices, "printer");
m_centronics->busy_handler().set(FUNC(thomson_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
config.device_remove("cartslot");
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mo_cart")
@@ -2494,7 +2495,9 @@ MACHINE_CONFIG_START(thomson_state::mo5nr)
m_centronics->busy_handler().set(FUNC(thomson_state::write_centronics_busy));
INPUT_BUFFER(config, "cent_data_in");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
config.device_remove("cartslot");
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mo_cart")
diff --git a/src/mame/drivers/tiki100.cpp b/src/mame/drivers/tiki100.cpp
index fafdfac884b..f1a5cae3454 100644
--- a/src/mame/drivers/tiki100.cpp
+++ b/src/mame/drivers/tiki100.cpp
@@ -765,7 +765,9 @@ MACHINE_CONFIG_START(tiki100_state::tiki100)
m_centronics->perror_handler().set(FUNC(tiki100_state::write_centronics_perror));
INPUT_BUFFER(config, "cent_data_in");
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED);
diff --git a/src/mame/drivers/trs80.cpp b/src/mame/drivers/trs80.cpp
index 4b8647c322d..054a6e1754f 100644
--- a/src/mame/drivers/trs80.cpp
+++ b/src/mame/drivers/trs80.cpp
@@ -544,15 +544,16 @@ MACHINE_CONFIG_START(trs80_state::model1) // model I, level II
FLOPPY_CONNECTOR(config, "fdc:2", trs80_floppies, "", trs80_state::floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, "fdc:3", trs80_floppies, "", trs80_state::floppy_formats).enable_sound(true);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit7))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit6))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit5))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit4))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit7));
+ m_centronics->perror_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit6));
+ m_centronics->select_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit5));
+ m_centronics->fault_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit4));
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ INPUT_BUFFER(config, m_cent_status_in);
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
COM8116(config, m_brg, 5.0688_MHz_XTAL); // BR1941L
m_brg->fr_handler().set(m_uart, FUNC(ay31015_device::write_rcp));
diff --git a/src/mame/drivers/trs80m2.cpp b/src/mame/drivers/trs80m2.cpp
index eefc10cbcee..99ee6602d8f 100644
--- a/src/mame/drivers/trs80m2.cpp
+++ b/src/mame/drivers/trs80m2.cpp
@@ -767,12 +767,14 @@ MACHINE_CONFIG_START(trs80m2_state::trs80m2)
z80sio0_device& sio(Z80SIO0(config, Z80SIO_TAG, 8_MHz_XTAL / 2));
sio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(m_pio, z80pio_device, strobe_b))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, trs80m2_state, write_centronics_busy))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, trs80m2_state, write_centronics_fault))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, trs80m2_state, write_centronics_perror))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(m_pio, FUNC(z80pio_device::strobe_b));
+ m_centronics->busy_handler().set(FUNC(trs80m2_state::write_centronics_busy));
+ m_centronics->fault_handler().set(FUNC(trs80m2_state::write_centronics_fault));
+ m_centronics->perror_handler().set(FUNC(trs80m2_state::write_centronics_perror));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
TRS80M2_KEYBOARD(config, m_kb, 0);
m_kb->clock_wr_callback().set(FUNC(trs80m2_state::kb_clock_w));
@@ -859,12 +861,14 @@ MACHINE_CONFIG_START(trs80m16_state::trs80m16)
AM9519(config, m_uic, 0);
m_uic->out_int_callback().set_inputline(M68000_TAG, M68K_IRQ_5);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(m_pio, z80pio_device, strobe_b))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, trs80m2_state, write_centronics_busy))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE(*this, trs80m2_state, write_centronics_fault))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, trs80m2_state, write_centronics_perror))
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(m_pio, FUNC(z80pio_device::strobe_b));
+ m_centronics->busy_handler().set(FUNC(trs80m2_state::write_centronics_busy));
+ m_centronics->fault_handler().set(FUNC(trs80m2_state::write_centronics_fault));
+ m_centronics->perror_handler().set(FUNC(trs80m2_state::write_centronics_perror));
+
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
TRS80M2_KEYBOARD(config, m_kb, 0);
m_kb->clock_wr_callback().set(FUNC(trs80m2_state::kb_clock_w));
diff --git a/src/mame/drivers/trs80m3.cpp b/src/mame/drivers/trs80m3.cpp
index efc14bdd866..bf4dd1eff79 100644
--- a/src/mame/drivers/trs80m3.cpp
+++ b/src/mame/drivers/trs80m3.cpp
@@ -369,15 +369,16 @@ MACHINE_CONFIG_START(trs80m3_state::model3)
FLOPPY_CONNECTOR(config, "fdc:0", trs80_floppies, "sssd", trs80m3_state::floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, "fdc:1", trs80_floppies, "sssd", trs80m3_state::floppy_formats).enable_sound(true);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit7))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit6))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit5))
- MCFG_CENTRONICS_FAULT_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit4))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit7));
+ m_centronics->perror_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit6));
+ m_centronics->select_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit5));
+ m_centronics->fault_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit4));
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ INPUT_BUFFER(config, m_cent_status_in);
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
COM8116(config, m_brg, 20.2752_MHz_XTAL / 4); // BR1943 (or BR1941L)
m_brg->fr_handler().set(m_uart, FUNC(ay31015_device::write_rcp));
diff --git a/src/mame/drivers/tutor.cpp b/src/mame/drivers/tutor.cpp
index ab718403dbf..bb7d1e5c27f 100644
--- a/src/mame/drivers/tutor.cpp
+++ b/src/mame/drivers/tutor.cpp
@@ -743,7 +743,8 @@ static INPUT_PORTS_START(pyuutajr)
PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED)
INPUT_PORTS_END
-MACHINE_CONFIG_START(tutor_state::tutor)
+void tutor_state::tutor(machine_config &config)
+{
// basic machine hardware
// TMS9995 CPU @ 10.7 MHz
// No lines connected yet
@@ -763,7 +764,8 @@ MACHINE_CONFIG_START(tutor_state::tutor)
CENTRONICS(config, m_centronics, centronics_devices, "printer").busy_handler().set(FUNC(tutor_state::write_centronics_busy));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
// Cassette
SPEAKER(config, "cass_out").front_center();
@@ -775,15 +777,15 @@ MACHINE_CONFIG_START(tutor_state::tutor)
// software lists
SOFTWARE_LIST(config, "cart_list").set_type("tutor", SOFTWARE_LIST_ORIGINAL_SYSTEM);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tutor_state::pyuutajr)
+void tutor_state::pyuutajr(machine_config &config)
+{
tutor(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(pyuutajr_mem)
- //MCFG_DEVICE_REMOVE("centronics")
- //MCFG_DEVICE_REMOVE("cassette")
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &tutor_state::pyuutajr_mem);
+ //config.device_remove("centronics");
+ //config.device_remove("cassette");
+}
/*
ROM loading
diff --git a/src/mame/drivers/tvc.cpp b/src/mame/drivers/tvc.cpp
index 7bfb9bf8a0e..e13dd320d5a 100644
--- a/src/mame/drivers/tvc.cpp
+++ b/src/mame/drivers/tvc.cpp
@@ -798,10 +798,11 @@ MACHINE_CONFIG_START(tvc_state::tvc)
m_sound->sndint_wr_callback().set(FUNC(tvc_state::int_ff_set));
m_sound->add_route(ALL_OUTPUTS, "mono", 0.75);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(*this, tvc_state, centronics_ack))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(FUNC(tvc_state::centronics_ack));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
/* cartridge */
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "tvc_cart")
diff --git a/src/mame/drivers/unixpc.cpp b/src/mame/drivers/unixpc.cpp
index d34ef57f3f9..e22813e500d 100644
--- a/src/mame/drivers/unixpc.cpp
+++ b/src/mame/drivers/unixpc.cpp
@@ -391,21 +391,22 @@ MACHINE_CONFIG_START(unixpc_state::unixpc)
mpsc.out_dtra_callback().set("rs232", FUNC(rs232_port_device::write_dtr));
mpsc.out_rtsa_callback().set("rs232", FUNC(rs232_port_device::write_rts));
- MCFG_DEVICE_ADD("kbc", ACIA6850, 0)
+ ACIA6850(config, "kbc", 0);
// TODO: HDC
- //MCFG_DEVICE_ADD("hdc", WD1010, 40_MHz_XTAL / 8)
+ //WD1010(config, "hdc", 40_MHz_XTAL / 8);
// TODO: RTC
- //MCFG_DEVICE_ADD("rtc", TC8250, 32.768_kHz_XTAL)
+ //TC8250(config, "rtc", 32.768_kHz_XTAL);
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr));
rs232.rxd_handler().set("mpsc", FUNC(upd7201_new_device::rxa_w));
rs232.dsr_handler().set("mpsc", FUNC(upd7201_new_device::dcda_w));
rs232.cts_handler().set("mpsc", FUNC(upd7201_new_device::ctsa_w));
- MCFG_DEVICE_ADD("printer", CENTRONICS, centronics_devices, nullptr)
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("printlatch", "printer")
+ centronics_device &printer(CENTRONICS(config, "printer", centronics_devices, nullptr));
+ output_latch_device &printlatch(OUTPUT_LATCH(config, "printlatch"));
+ printer.set_output_latch(printlatch);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/v1050.cpp b/src/mame/drivers/v1050.cpp
index 775c9bd404c..74eb9229eb2 100644
--- a/src/mame/drivers/v1050.cpp
+++ b/src/mame/drivers/v1050.cpp
@@ -1108,17 +1108,18 @@ MACHINE_CONFIG_START(v1050_state::v1050)
// SASI bus
SCSI_PORT(config, m_sasibus, 0);
- m_sasibus->set_data_input_buffer("scsi_data_in");
- m_sasibus->req_handler().set("scsi_ctrl_in", FUNC(input_buffer_device::write_bit0)).exor(1);
- m_sasibus->bsy_handler().set("scsi_ctrl_in", FUNC(input_buffer_device::write_bit1));
- m_sasibus->msg_handler().set("scsi_ctrl_in", FUNC(input_buffer_device::write_bit2));
- m_sasibus->cd_handler().set("scsi_ctrl_in", FUNC(input_buffer_device::write_bit3));
+ m_sasibus->set_data_input_buffer(m_sasi_data_in);
+ m_sasibus->req_handler().set(m_sasi_ctrl_in, FUNC(input_buffer_device::write_bit0)).exor(1);
+ m_sasibus->bsy_handler().set(m_sasi_ctrl_in, FUNC(input_buffer_device::write_bit1));
+ m_sasibus->msg_handler().set(m_sasi_ctrl_in, FUNC(input_buffer_device::write_bit2));
+ m_sasibus->cd_handler().set(m_sasi_ctrl_in, FUNC(input_buffer_device::write_bit3));
m_sasibus->io_handler().set(FUNC(v1050_state::write_sasi_io)).exor(1); // bit4
MCFG_SCSIDEV_ADD(SASIBUS_TAG ":" SCSI_PORT_DEVICE1, "harddisk", S1410, SCSI_ID_0)
- MCFG_SCSI_OUTPUT_LATCH_ADD("scsi_data_out", SASIBUS_TAG)
- MCFG_DEVICE_ADD("scsi_data_in", INPUT_BUFFER, 0)
- MCFG_DEVICE_ADD("scsi_ctrl_in", INPUT_BUFFER, 0)
+ OUTPUT_LATCH(config, m_sasi_data_out);
+ m_sasibus->set_output_latch(*m_sasi_data_out);
+ INPUT_BUFFER(config, m_sasi_data_in);
+ INPUT_BUFFER(config, m_sasi_ctrl_in);
TIMER(config, m_timer_ack).configure_generic(FUNC(v1050_state::sasi_ack_tick));
TIMER(config, m_timer_rst).configure_generic(FUNC(v1050_state::sasi_rst_tick));
@@ -1128,11 +1129,12 @@ MACHINE_CONFIG_START(v1050_state::v1050)
MCFG_SOFTWARE_LIST_ADD("hdd_list", "v1050_hdd")
// printer
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, v1050_state, write_centronics_busy))
- MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(*this, v1050_state, write_centronics_perror))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->busy_handler().set(FUNC(v1050_state::write_centronics_busy));
+ m_centronics->perror_handler().set(FUNC(v1050_state::write_centronics_perror));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
// internal ram
RAM(config, RAM_TAG).set_default_size("128K");
diff --git a/src/mame/drivers/wangpc.cpp b/src/mame/drivers/wangpc.cpp
index 7f094231506..3b104f1a75e 100644
--- a/src/mame/drivers/wangpc.cpp
+++ b/src/mame/drivers/wangpc.cpp
@@ -1333,7 +1333,7 @@ MACHINE_CONFIG_START(wangpc_state::wangpc)
FLOPPY_CONNECTOR(config, UPD765_TAG ":0", wangpc_floppies, "525dd", wangpc_state::floppy_formats);
FLOPPY_CONNECTOR(config, UPD765_TAG ":1", wangpc_floppies, "525dd", wangpc_state::floppy_formats);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer");
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
m_centronics->set_data_input_buffer(m_cent_data_in);
m_centronics->ack_handler().set(FUNC(wangpc_state::write_centronics_ack));
m_centronics->busy_handler().set(FUNC(wangpc_state::write_centronics_busy));
@@ -1341,7 +1341,9 @@ MACHINE_CONFIG_START(wangpc_state::wangpc)
m_centronics->perror_handler().set(FUNC(wangpc_state::write_centronics_perror));
INPUT_BUFFER(config, m_cent_data_in);
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
+
+ OUTPUT_LATCH(config, m_cent_data_out);
+ m_centronics->set_output_latch(*m_cent_data_out);
rs232_port_device &rs232(RS232_PORT(config, RS232_TAG, default_rs232_devices, nullptr));
rs232.rxd_handler().set(m_epci, FUNC(mc2661_device::rx_w));
diff --git a/src/mame/drivers/xerox820.cpp b/src/mame/drivers/xerox820.cpp
index cdffbfaf35e..f197dce2e2f 100644
--- a/src/mame/drivers/xerox820.cpp
+++ b/src/mame/drivers/xerox820.cpp
@@ -761,9 +761,10 @@ MACHINE_CONFIG_START(xerox820ii_state::xerox820ii)
MCFG_SCSIDEV_ADD(SASIBUS_TAG ":" SCSI_PORT_DEVICE1, "harddisk", SA1403D, SCSI_ID_0)
- MCFG_SCSI_OUTPUT_LATCH_ADD("sasi_data_out", SASIBUS_TAG)
- MCFG_DEVICE_ADD("sasi_data_in", INPUT_BUFFER, 0)
- MCFG_DEVICE_ADD("sasi_ctrl_in", INPUT_BUFFER, 0)
+ output_latch_device &sasi_data_out(OUTPUT_LATCH(config, "sasi_data_out"));
+ m_sasibus->set_output_latch(sasi_data_out);
+ INPUT_BUFFER(config, "sasi_data_in");
+ INPUT_BUFFER(config, "sasi_ctrl_in");
/* internal ram */
RAM(config, m_ram).set_default_size("64K");
diff --git a/src/mame/drivers/xor100.cpp b/src/mame/drivers/xor100.cpp
index dd7c3ac2157..f8c54041ebb 100644
--- a/src/mame/drivers/xor100.cpp
+++ b/src/mame/drivers/xor100.cpp
@@ -526,12 +526,13 @@ MACHINE_CONFIG_START(xor100_state::xor100)
FLOPPY_CONNECTOR(config, WD1795_TAG":2", xor100_floppies, nullptr, floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, WD1795_TAG":3", xor100_floppies, nullptr, floppy_image_device::default_floppy_formats);
- MCFG_DEVICE_ADD(m_centronics, CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(I8255A_TAG, i8255_device, pc4_w))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, xor100_state, write_centronics_busy))
- MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(*this, xor100_state, write_centronics_select))
+ CENTRONICS(config, m_centronics, centronics_devices, "printer");
+ m_centronics->ack_handler().set(I8255A_TAG, FUNC(i8255_device::pc4_w));
+ m_centronics->busy_handler().set(FUNC(xor100_state::write_centronics_busy));
+ m_centronics->select_handler().set(FUNC(xor100_state::write_centronics_select));
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ m_centronics->set_output_latch(cent_data_out);
// S-100
MCFG_DEVICE_ADD(S100_TAG, S100_BUS, 8_MHz_XTAL / 4)
diff --git a/src/mame/drivers/zorba.cpp b/src/mame/drivers/zorba.cpp
index a06d509b3de..23da8b27d5c 100644
--- a/src/mame/drivers/zorba.cpp
+++ b/src/mame/drivers/zorba.cpp
@@ -238,13 +238,15 @@ MACHINE_CONFIG_START(zorba_state::zorba)
rs232.dsr_handler().set(m_uart0, FUNC(i8251_device::write_dsr));
// J3 Parallel printer
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("parprndata", "parprn")
centronics_device &parprn(CENTRONICS(config, "parprn", centronics_devices, "printer"));
parprn.busy_handler().set(m_uart1, FUNC(i8251_device::write_cts));
parprn.busy_handler().append(m_uart1, FUNC(i8251_device::write_dsr)); // TODO: shared with serial CTS
parprn.fault_handler().set(FUNC(zorba_state::printer_fault_w));
parprn.select_handler().set(FUNC(zorba_state::printer_select_w));
+ output_latch_device &parprndata(OUTPUT_LATCH(config, "parprndata"));
+ parprn.set_output_latch(parprndata);
+
// J3 Serial printer
rs232_port_device &serprn(RS232_PORT(config, "serprn", default_rs232_devices, nullptr));
serprn.rxd_handler().set(m_uart1, FUNC(i8251_device::write_rxd)); // TODO: this line has a LED attached
diff --git a/src/mame/machine/thomson.cpp b/src/mame/machine/thomson.cpp
index cc078154ee1..59de13fff29 100644
--- a/src/mame/machine/thomson.cpp
+++ b/src/mame/machine/thomson.cpp
@@ -520,7 +520,8 @@ to7_io_line_device::to7_io_line_device(const machine_config &mconfig, const char
{
}
-MACHINE_CONFIG_START(to7_io_line_device::device_add_mconfig)
+void to7_io_line_device::device_add_mconfig(machine_config &config)
+{
/// THIS PIO is part of CC 90-232 expansion
PIA6821(config, m_pia_io, 0);
m_pia_io->readpa_handler().set(FUNC(to7_io_line_device::porta_in));
@@ -535,13 +536,13 @@ MACHINE_CONFIG_START(to7_io_line_device::device_add_mconfig)
m_rs232->cts_handler().set(FUNC(to7_io_line_device::write_cts));
m_rs232->dsr_handler().set(FUNC(to7_io_line_device::write_dsr));
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "printer")
- MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(THOM_PIA_IO, pia6821_device, cb1_w))
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(*this, to7_io_line_device, write_centronics_busy))
-
- MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
+ centronics_device &centronics(CENTRONICS(config, "centronics", centronics_devices, "printer"));
+ centronics.ack_handler().set(m_pia_io, FUNC(pia6821_device::cb1_w));
+ centronics.busy_handler().set(FUNC(to7_io_line_device::write_centronics_busy));
-MACHINE_CONFIG_END
+ output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
+ centronics.set_output_latch(cent_data_out);
+}
void to7_io_line_device::device_start()