summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2018-08-29 18:37:42 +0200
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2018-08-29 18:37:42 +0200
commit5d0aef3b01784fc567b2deb2457abd322d8c0a56 (patch) (github)
tree444b81785430d7ce34b23ea33ab1ad28c5a25111
parentd54a1a377b298d149242bb8e3ee69b1568239b2b (diff)
downloadmame-5d0aef3b01784fc567b2deb2457abd322d8c0a56.tar.bz2
mame-5d0aef3b01784fc567b2deb2457abd322d8c0a56.zip
z80dart.cpp, z80dma.cpp: started removing MCFG macros (nw)
-rw-r--r--src/devices/bus/wangpc/mcc.cpp9
-rw-r--r--src/devices/machine/z80dart.cpp9
-rw-r--r--src/mame/drivers/abc1600.cpp66
-rw-r--r--src/mame/drivers/abc80x.cpp32
-rw-r--r--src/mame/drivers/altos486.cpp58
-rw-r--r--src/mame/drivers/altos5.cpp20
-rw-r--r--src/mame/drivers/ampro.cpp18
-rw-r--r--src/mame/drivers/bw12.cpp16
-rw-r--r--src/mame/drivers/dkong.cpp8
-rw-r--r--src/mame/drivers/huebler.cpp8
-rw-r--r--src/mame/drivers/mario.cpp8
-rw-r--r--src/mame/drivers/mcr.cpp8
-rw-r--r--src/mame/drivers/mikromik.cpp16
-rw-r--r--src/mame/drivers/mtx.cpp4
-rw-r--r--src/mame/drivers/pwrview.cpp2
-rw-r--r--src/mame/drivers/qvt103.cpp4
-rw-r--r--src/mame/drivers/qx10.cpp16
-rw-r--r--src/mame/drivers/rc702.cpp4
-rw-r--r--src/mame/drivers/super6.cpp30
-rw-r--r--src/mame/drivers/super80.cpp14
-rw-r--r--src/mame/drivers/superslave.cpp42
-rw-r--r--src/mame/drivers/symbolics.cpp2
-rw-r--r--src/mame/drivers/tdv2324.cpp2
-rw-r--r--src/mame/drivers/tranz330.cpp10
-rw-r--r--src/mame/drivers/x1.cpp20
25 files changed, 213 insertions, 213 deletions
diff --git a/src/devices/bus/wangpc/mcc.cpp b/src/devices/bus/wangpc/mcc.cpp
index 4babd0c14cf..d5c8bf4b941 100644
--- a/src/devices/bus/wangpc/mcc.cpp
+++ b/src/devices/bus/wangpc/mcc.cpp
@@ -55,10 +55,11 @@ DEFINE_DEVICE_TYPE(WANGPC_MCC, wangpc_mcc_device, "wangpc_mcc", "Wang PC-PM043 M
// MACHINE_CONFIG_START( wangpc_mcc )
//-------------------------------------------------
-MACHINE_CONFIG_START(wangpc_mcc_device::device_add_mconfig)
- MCFG_DEVICE_ADD(Z80SIO2_TAG, Z80SIO2, 4000000)
- MCFG_DEVICE_ADD(Z80DART_TAG, Z80DART, 4000000)
-MACHINE_CONFIG_END
+void wangpc_mcc_device::device_add_mconfig(machine_config &config)
+{
+ Z80SIO2(config, m_sio, 4000000);
+ Z80DART(config, m_dart, 4000000);
+}
diff --git a/src/devices/machine/z80dart.cpp b/src/devices/machine/z80dart.cpp
index 24b66d6d7e3..9cd968b4620 100644
--- a/src/devices/machine/z80dart.cpp
+++ b/src/devices/machine/z80dart.cpp
@@ -59,10 +59,11 @@ DEFINE_DEVICE_TYPE(UPD7201, upd7201_device, "upd7201", "NEC uPD
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(z80dart_device::device_add_mconfig)
- MCFG_DEVICE_ADD(CHANA_TAG, Z80DART_CHANNEL, 0)
- MCFG_DEVICE_ADD(CHANB_TAG, Z80DART_CHANNEL, 0)
-MACHINE_CONFIG_END
+void z80dart_device::device_add_mconfig(machine_config &config)
+{
+ Z80DART_CHANNEL(config, m_chanA, 0);
+ Z80DART_CHANNEL(config, m_chanB, 0);
+}
//**************************************************************************
diff --git a/src/mame/drivers/abc1600.cpp b/src/mame/drivers/abc1600.cpp
index 98ae48a9969..714dab7b320 100644
--- a/src/mame/drivers/abc1600.cpp
+++ b/src/mame/drivers/abc1600.cpp
@@ -888,35 +888,35 @@ MACHINE_CONFIG_START(abc1600_state::abc1600)
// devices
MCFG_ABC1600_MAC_ADD(MC68008P8_TAG, mac_mem)
- MCFG_DEVICE_ADD(Z8410AB1_0_TAG, Z80DMA, 64_MHz_XTAL / 16)
- MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(*this, abc1600_state, dbrq_w))
- MCFG_Z80DMA_OUT_BAO_CB(WRITELINE(Z8410AB1_1_TAG, z80dma_device, bai_w))
- MCFG_Z80DMA_IN_MREQ_CB(READ8(ABC1600_MAC_TAG, abc1600_mac_device, dma0_mreq_r))
- MCFG_Z80DMA_OUT_MREQ_CB(WRITE8(ABC1600_MAC_TAG, abc1600_mac_device, dma0_mreq_w))
- MCFG_Z80DMA_IN_IORQ_CB(READ8(ABC1600_MAC_TAG, abc1600_mac_device, dma0_iorq_r))
- MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(ABC1600_MAC_TAG, abc1600_mac_device, dma0_iorq_w))
-
- MCFG_DEVICE_ADD(Z8410AB1_1_TAG, Z80DMA, 64_MHz_XTAL / 16)
- MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(*this, abc1600_state, dbrq_w))
- MCFG_Z80DMA_OUT_BAO_CB(WRITELINE(Z8410AB1_2_TAG, z80dma_device, bai_w))
- MCFG_Z80DMA_IN_MREQ_CB(READ8(ABC1600_MAC_TAG, abc1600_mac_device, dma1_mreq_r))
- MCFG_Z80DMA_OUT_MREQ_CB(WRITE8(ABC1600_MAC_TAG, abc1600_mac_device, dma1_mreq_w))
- MCFG_Z80DMA_IN_IORQ_CB(READ8(ABC1600_MAC_TAG, abc1600_mac_device, dma1_iorq_r))
- MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(ABC1600_MAC_TAG, abc1600_mac_device, dma1_iorq_w))
-
- MCFG_DEVICE_ADD(Z8410AB1_2_TAG, Z80DMA, 64_MHz_XTAL / 16)
- MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(*this, abc1600_state, dbrq_w))
- MCFG_Z80DMA_IN_MREQ_CB(READ8(ABC1600_MAC_TAG, abc1600_mac_device, dma2_mreq_r))
- MCFG_Z80DMA_OUT_MREQ_CB(WRITE8(ABC1600_MAC_TAG, abc1600_mac_device, dma2_mreq_w))
- MCFG_Z80DMA_IN_IORQ_CB(READ8(ABC1600_MAC_TAG, abc1600_mac_device, dma2_iorq_r))
- MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(ABC1600_MAC_TAG, abc1600_mac_device, dma2_iorq_w))
-
- MCFG_DEVICE_ADD(Z8470AB1_TAG, Z80DART, 64_MHz_XTAL / 16)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE(ABC_KEYBOARD_PORT_TAG, abc_keyboard_port_device, txd_w))
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE(MC68008P8_TAG, M68K_IRQ_5)) // shared with SCC
+ Z80DMA(config, m_dma0, 64_MHz_XTAL / 16);
+ m_dma0->out_busreq_callback().set(FUNC(abc1600_state::dbrq_w));
+ m_dma0->out_bao_callback().set(m_dma1, FUNC(z80dma_device::bai_w));
+ m_dma0->in_mreq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma0_mreq_r));
+ m_dma0->out_mreq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma0_mreq_w));
+ m_dma0->in_iorq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma0_iorq_r));
+ m_dma0->out_iorq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma0_iorq_w));
+
+ Z80DMA(config, m_dma1, 64_MHz_XTAL / 16);
+ m_dma1->out_busreq_callback().set(FUNC(abc1600_state::dbrq_w));
+ m_dma1->out_bao_callback().set(m_dma2, FUNC(z80dma_device::bai_w));
+ m_dma1->in_mreq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma1_mreq_r));
+ m_dma1->out_mreq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma1_mreq_w));
+ m_dma1->in_iorq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma1_iorq_r));
+ m_dma1->out_iorq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma1_iorq_w));
+
+ Z80DMA(config, m_dma2, 64_MHz_XTAL / 16);
+ m_dma2->out_busreq_callback().set(FUNC(abc1600_state::dbrq_w));
+ m_dma2->in_mreq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma2_mreq_r));
+ m_dma2->out_mreq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma2_mreq_w));
+ m_dma2->in_iorq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma2_iorq_r));
+ m_dma2->out_iorq_callback().set(ABC1600_MAC_TAG, FUNC(abc1600_mac_device::dma2_iorq_w));
+
+ Z80DART(config, m_dart, 64_MHz_XTAL / 16);
+ m_dart->out_txda_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_txd));
+ m_dart->out_dtra_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_dtr));
+ m_dart->out_rtsa_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_rts));
+ m_dart->out_txdb_callback().set(ABC_KEYBOARD_PORT_TAG, FUNC(abc_keyboard_port_device::txd_w));
+ m_dart->out_int_callback().set_inputline(m_maincpu, M68K_IRQ_5); // shared with SCC
SCC8530(config, m_scc, 64_MHz_XTAL / 16);
m_scc->intrq_callback().set_inputline(MC68008P8_TAG, M68K_IRQ_5);
@@ -944,12 +944,12 @@ MACHINE_CONFIG_START(abc1600_state::abc1600)
MCFG_DEVICE_ADD(RS232_A_TAG, RS232_PORT, default_rs232_devices, nullptr)
MCFG_DEVICE_ADD(RS232_B_TAG, RS232_PORT, default_rs232_devices, nullptr)
- MCFG_RS232_RXD_HANDLER(WRITELINE(Z8470AB1_TAG, z80dart_device, rxa_w))
+ MCFG_RS232_RXD_HANDLER(WRITELINE(m_dart, z80dart_device, rxa_w))
MCFG_ABC_KEYBOARD_PORT_ADD(ABC_KEYBOARD_PORT_TAG, "abc99")
- MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(WRITELINE(Z8470AB1_TAG, z80dart_device, rxb_w))
- MCFG_ABC_KEYBOARD_OUT_TRXC_HANDLER(WRITELINE(Z8470AB1_TAG, z80dart_device, rxtxcb_w))
- MCFG_ABC_KEYBOARD_OUT_KEYDOWN_HANDLER(WRITELINE(Z8470AB1_TAG, z80dart_device, dcdb_w))
+ MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(WRITELINE(m_dart, z80dart_device, rxb_w))
+ MCFG_ABC_KEYBOARD_OUT_TRXC_HANDLER(WRITELINE(m_dart, z80dart_device, rxtxcb_w))
+ MCFG_ABC_KEYBOARD_OUT_KEYDOWN_HANDLER(WRITELINE(m_dart, z80dart_device, dcdb_w))
MCFG_ABCBUS_SLOT_ADD("bus0i", abc1600bus_cards, nullptr)
MCFG_ABCBUS_SLOT_IRQ_CALLBACK(WRITELINE(m_cio, z8536_device, pa7_w))
diff --git a/src/mame/drivers/abc80x.cpp b/src/mame/drivers/abc80x.cpp
index b85ce69593e..85ef5656302 100644
--- a/src/mame/drivers/abc80x.cpp
+++ b/src/mame/drivers/abc80x.cpp
@@ -1076,21 +1076,21 @@ MACHINE_CONFIG_START(abc800_state::common)
m_sio->out_rtsb_callback().set(FUNC(abc800_state::sio_rtsb_w));
m_sio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD(Z80DART_TAG, Z80DART, ABC800_X01/2/2)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE(ABC_KEYBOARD_PORT_TAG, abc_keyboard_port_device, txd_w))
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
+ Z80DART(config, m_dart, ABC800_X01/2/2);
+ m_dart->out_txda_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd));
+ m_dart->out_dtra_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr));
+ m_dart->out_rtsa_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_rts));
+ m_dart->out_txdb_callback().set(ABC_KEYBOARD_PORT_TAG, FUNC(abc_keyboard_port_device::txd_w));
+ m_dart->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
MCFG_CASSETTE_ADD(CASSETTE_TAG)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
MCFG_TIMER_DRIVER_ADD_PERIODIC(TIMER_CASSETTE_TAG, abc800_state, cassette_input_tick, attotime::from_hz(44100))
MCFG_DEVICE_ADD(RS232_A_TAG, RS232_PORT, default_rs232_devices, nullptr)
- MCFG_RS232_RXD_HANDLER(WRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
- MCFG_RS232_DCD_HANDLER(WRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
- MCFG_RS232_CTS_HANDLER(WRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
+ MCFG_RS232_RXD_HANDLER(WRITELINE(m_dart, z80dart_device, rxa_w))
+ MCFG_RS232_DCD_HANDLER(WRITELINE(m_dart, z80dart_device, dcda_w))
+ MCFG_RS232_CTS_HANDLER(WRITELINE(m_dart, z80dart_device, ctsa_w))
MCFG_DEVICE_ADD(RS232_B_TAG, RS232_PORT, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(m_sio, z80sio_device, rxa_w))
@@ -1098,9 +1098,9 @@ MACHINE_CONFIG_START(abc800_state::common)
MCFG_RS232_CTS_HANDLER(WRITELINE(m_sio, z80sio_device, ctsa_w))
MCFG_ABC_KEYBOARD_PORT_ADD(ABC_KEYBOARD_PORT_TAG, nullptr)
- MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(WRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
- MCFG_ABC_KEYBOARD_OUT_TRXC_HANDLER(WRITELINE(Z80DART_TAG, z80dart_device, rxtxcb_w))
- MCFG_ABC_KEYBOARD_OUT_KEYDOWN_HANDLER(WRITELINE(Z80DART_TAG, z80dart_device, dcdb_w))
+ MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(WRITELINE(m_dart, z80dart_device, rxb_w))
+ MCFG_ABC_KEYBOARD_OUT_TRXC_HANDLER(WRITELINE(m_dart, z80dart_device, rxtxcb_w))
+ MCFG_ABC_KEYBOARD_OUT_KEYDOWN_HANDLER(WRITELINE(m_dart, z80dart_device, dcdb_w))
MCFG_ABCBUS_SLOT_ADD(ABCBUS_TAG, abcbus_cards, nullptr)
@@ -1190,9 +1190,8 @@ MACHINE_CONFIG_START(abc802_state::abc802)
abc802_video(config);
// peripheral hardware
- MCFG_DEVICE_MODIFY(Z80DART_TAG)
- MCFG_Z80DART_OUT_DTRB_CB(WRITELINE(*this, abc802_state, lrs_w))
- MCFG_Z80DART_OUT_RTSB_CB(WRITELINE(*this, abc802_state, mux80_40_w))
+ m_dart->out_dtrb_callback().set(FUNC(abc802_state::lrs_w));
+ m_dart->out_rtsb_callback().set(FUNC(abc802_state::mux80_40_w));
MCFG_DEVICE_MODIFY(ABC_KEYBOARD_PORT_TAG)
MCFG_SLOT_DEFAULT_OPTION("abc55")
@@ -1223,8 +1222,7 @@ MACHINE_CONFIG_START(abc806_state::abc806)
// peripheral hardware
E0516(config, E0516_TAG, ABC806_X02);
- MCFG_DEVICE_MODIFY(Z80DART_TAG)
- MCFG_Z80DART_OUT_DTRB_CB(WRITELINE(*this, abc806_state, keydtr_w))
+ m_dart->out_dtrb_callback().set(FUNC(abc806_state::keydtr_w));
MCFG_DEVICE_MODIFY(ABC_KEYBOARD_PORT_TAG)
MCFG_SLOT_DEFAULT_OPTION("abc77")
diff --git a/src/mame/drivers/altos486.cpp b/src/mame/drivers/altos486.cpp
index afa25857d3e..19267323754 100644
--- a/src/mame/drivers/altos486.cpp
+++ b/src/mame/drivers/altos486.cpp
@@ -152,35 +152,35 @@ MACHINE_CONFIG_START(altos486_state::altos486)
MCFG_FLOPPY_DRIVE_ADD("fdc:0", altos486_floppies, "525qd", altos486_state::floppy_formats)
MCFG_SLOT_FIXED(true)
- MCFG_DEVICE_ADD("sio0", Z80SIO0, 4000000)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE("rs232a", rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE("rs232a", rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE("rs232a", rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE("rs232b", rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRB_CB(WRITELINE("rs232b", rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSB_CB(WRITELINE("rs232b", rs232_port_device, write_rts))
- //MCFG_Z80DART_OUT_INT_CB(WRITELINE(*this, altos486_state, sio_interrupt))
-
- MCFG_DEVICE_ADD("sio1", Z80SIO0, 4000000)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE("rs232c", rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE("rs232c", rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE("rs232c", rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE("rs232d", rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRB_CB(WRITELINE("rs232d", rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSB_CB(WRITELINE("rs232d", rs232_port_device, write_rts))
- //MCFG_Z80DART_OUT_INT_CB(WRITELINE(*this, altos486_state, sio_interrupt))
-
- MCFG_DEVICE_ADD("sio2", Z80SIO0, 4000000)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE("rs232_lp", rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE("rs232_lp", rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE("rs232_lp", rs232_port_device, write_rts))
- //MCFG_Z80DART_OUT_INT_CB(WRITELINE(*this, altos486_state, sio_interrupt))
-
- MCFG_DEVICE_ADD("i8274", I8274, XTAL(16'000'000)/4)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE("rs422_wn", rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE("rs422_wn", rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE("rs422_wn", rs232_port_device, write_rts))
- //MCFG_Z80DART_OUT_INT_CB(WRITELINE(*this, altos486_state, sio_interrupt))
+ z80sio0_device& sio0(Z80SIO0(config, "sio0", 4000000));
+ sio0.out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd));
+ sio0.out_dtra_callback().set("rs232a", FUNC(rs232_port_device::write_dtr));
+ sio0.out_rtsa_callback().set("rs232a", FUNC(rs232_port_device::write_rts));
+ sio0.out_txdb_callback().set("rs232b", FUNC(rs232_port_device::write_txd));
+ sio0.out_dtrb_callback().set("rs232b", FUNC(rs232_port_device::write_dtr));
+ sio0.out_rtsb_callback().set("rs232b", FUNC(rs232_port_device::write_rts));
+ //sio0.out_int_callback().set(FUNC(altos486_state::sio_interrupt));
+
+ z80sio0_device& sio1(Z80SIO0(config, "sio1", 4000000));
+ sio1.out_txda_callback().set("rs232c", FUNC(rs232_port_device::write_txd));
+ sio1.out_dtra_callback().set("rs232c", FUNC(rs232_port_device::write_dtr));
+ sio1.out_rtsa_callback().set("rs232c", FUNC(rs232_port_device::write_rts));
+ sio1.out_txdb_callback().set("rs232d", FUNC(rs232_port_device::write_txd));
+ sio1.out_dtrb_callback().set("rs232d", FUNC(rs232_port_device::write_dtr));
+ sio1.out_rtsb_callback().set("rs232d", FUNC(rs232_port_device::write_rts));
+ //sio1.out_int_callback().set(FUNC(altos486_state::sio_interrupt));
+
+ z80sio0_device& sio2(Z80SIO0(config, "sio2", 4000000));
+ sio2.out_txda_callback().set("rs232_lp", FUNC(rs232_port_device::write_txd));
+ sio2.out_dtra_callback().set("rs232_lp", FUNC(rs232_port_device::write_dtr));
+ sio2.out_rtsa_callback().set("rs232_lp", FUNC(rs232_port_device::write_rts));
+ //sio2.out_int_callback().set(FUNC(altos486_state::sio_interrupt));
+
+ i8274_device& i8274(I8274(config, "i8274", XTAL(16'000'000)/4));
+ i8274.out_txda_callback().set("rs422_wn", FUNC(rs232_port_device::write_txd));
+ i8274.out_dtra_callback().set("rs422_wn", FUNC(rs232_port_device::write_dtr));
+ i8274.out_rtsa_callback().set("rs422_wn", FUNC(rs232_port_device::write_rts));
+ //i8274.out_int_callback().set(FUNC(altos486_state::sio_interrupt));
MCFG_DEVICE_ADD("rs232a", RS232_PORT, default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER(WRITELINE("sio0", z80dart_device, rxa_w))
diff --git a/src/mame/drivers/altos5.cpp b/src/mame/drivers/altos5.cpp
index 1ff3e82bd9b..d1168a4d730 100644
--- a/src/mame/drivers/altos5.cpp
+++ b/src/mame/drivers/altos5.cpp
@@ -421,14 +421,14 @@ MACHINE_CONFIG_START(altos5_state::altos5)
ctc_clock.signal_handler().append("ctc", FUNC(z80ctc_device::trg2));
/* devices */
- MCFG_DEVICE_ADD("dma", Z80DMA, 8_MHz_XTAL / 2)
- MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(*this, altos5_state, busreq_w))
- MCFG_Z80DMA_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
+ Z80DMA(config, m_dma, 8_MHz_XTAL / 2);
+ m_dma->out_busreq_callback().set(FUNC(altos5_state::busreq_w));
+ m_dma->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
// BAO, not used
- MCFG_Z80DMA_IN_MREQ_CB(READ8(*this, altos5_state, memory_read_byte))
- MCFG_Z80DMA_OUT_MREQ_CB(WRITE8(*this, altos5_state, memory_write_byte))
- MCFG_Z80DMA_IN_IORQ_CB(READ8(*this, altos5_state, io_read_byte))
- MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(*this, altos5_state, io_write_byte))
+ m_dma->in_mreq_callback().set(FUNC(altos5_state::memory_read_byte));
+ m_dma->out_mreq_callback().set(FUNC(altos5_state::memory_write_byte));
+ m_dma->in_iorq_callback().set(FUNC(altos5_state::io_read_byte));
+ m_dma->out_iorq_callback().set(FUNC(altos5_state::io_write_byte));
Z80PIO(config, m_pio0, 8_MHz_XTAL / 2);
m_pio0->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
@@ -440,10 +440,10 @@ MACHINE_CONFIG_START(altos5_state::altos5)
z80pio_device& pio1(Z80PIO(config, "pio1", 8_MHz_XTAL / 2));
pio1.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD("dart", Z80DART, 8_MHz_XTAL / 2)
+ z80dart_device& dart(Z80DART(config, "dart", 8_MHz_XTAL / 2));
// Channel A - console #3
// Channel B - printer
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
+ dart.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
z80sio_device& sio(Z80SIO(config, "sio", 8_MHz_XTAL / 2));
// Channel A - console #2
@@ -470,7 +470,7 @@ MACHINE_CONFIG_START(altos5_state::altos5)
MCFG_DEVICE_ADD("fdc", FD1797, 8_MHz_XTAL / 8)
MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, altos5_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE("dma", z80dma_device, rdy_w))
+ MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(m_dma, z80dma_device, rdy_w))
MCFG_FLOPPY_DRIVE_ADD("fdc:0", altos5_floppies, "525qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", altos5_floppies, "525qd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/ampro.cpp b/src/mame/drivers/ampro.cpp
index f26e4583856..a233bab84da 100644
--- a/src/mame/drivers/ampro.cpp
+++ b/src/mame/drivers/ampro.cpp
@@ -167,18 +167,18 @@ MACHINE_CONFIG_START(ampro_state::ampro)
/* Devices */
Z80CTC(config, m_ctc, 16_MHz_XTAL / 4);
m_ctc->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- m_ctc->zc_callback<0>().set("dart", FUNC(z80dart_device::txca_w)); // Z80DART Ch A, SIO Ch A
- m_ctc->zc_callback<0>().append("dart", FUNC(z80dart_device::rxca_w));
- m_ctc->zc_callback<1>().set("dart", FUNC(z80dart_device::rxtxcb_w)); // SIO Ch B
+ m_ctc->zc_callback<0>().set(m_dart, FUNC(z80dart_device::txca_w)); // Z80DART Ch A, SIO Ch A
+ m_ctc->zc_callback<0>().append(m_dart, FUNC(z80dart_device::rxca_w));
+ m_ctc->zc_callback<1>().set(m_dart, FUNC(z80dart_device::rxtxcb_w)); // SIO Ch B
- MCFG_DEVICE_ADD("dart", Z80DART, 16_MHz_XTAL / 4)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE("rs232", rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE("rs232", rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE("rs232", rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
+ Z80DART(config, m_dart, 16_MHz_XTAL / 4);
+ m_dart->out_txda_callback().set("rs232", FUNC(rs232_port_device::write_txd));
+ m_dart->out_dtra_callback().set("rs232", FUNC(rs232_port_device::write_dtr));
+ m_dart->out_rtsa_callback().set("rs232", FUNC(rs232_port_device::write_rts));
+ m_dart->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
MCFG_DEVICE_ADD("rs232", RS232_PORT, default_rs232_devices, "terminal")
- MCFG_RS232_RXD_HANDLER(WRITELINE("dart", z80dart_device, rxa_w))
+ MCFG_RS232_RXD_HANDLER(WRITELINE(m_dart, z80dart_device, rxa_w))
MCFG_DEVICE_ADD("fdc", WD1772, 16_MHz_XTAL / 2)
MCFG_FLOPPY_DRIVE_ADD("fdc:0", ampro_floppies, "525dd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp
index 137d4e411d5..a5a3769683e 100644
--- a/src/mame/drivers/bw12.cpp
+++ b/src/mame/drivers/bw12.cpp
@@ -589,14 +589,14 @@ MACHINE_CONFIG_START(bw12_state::common)
m_pia->irqa_handler().set_inputline(Z80_TAG, INPUT_LINE_IRQ0);
m_pia->irqb_handler().set_inputline(Z80_TAG, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD(Z80SIO_TAG, Z80SIO0, XTAL(16'000'000)/4)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRB_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSB_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
+ Z80SIO0(config, m_sio, XTAL(16'000'000)/4);
+ m_sio->out_txda_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd));
+ m_sio->out_dtra_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr));
+ m_sio->out_rtsa_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_rts));
+ m_sio->out_txdb_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_txd));
+ m_sio->out_dtrb_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_dtr));
+ m_sio->out_rtsb_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_rts));
+ m_sio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
MCFG_DEVICE_ADD(PIT8253_TAG, PIT8253, 0)
MCFG_PIT8253_CLK0(XTAL(1'843'200))
diff --git a/src/mame/drivers/dkong.cpp b/src/mame/drivers/dkong.cpp
index f97d0483899..3a6e5965ea9 100644
--- a/src/mame/drivers/dkong.cpp
+++ b/src/mame/drivers/dkong.cpp
@@ -1801,10 +1801,10 @@ MACHINE_CONFIG_START(dkong_state::dkong3)
MCFG_MACHINE_START_OVERRIDE(dkong_state, dkong3)
- MCFG_DEVICE_ADD("z80dma", Z80DMA, CLOCK_1H)
- MCFG_Z80DMA_OUT_BUSREQ_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
- MCFG_Z80DMA_IN_MREQ_CB(READ8(*this, dkong_state, memory_read_byte))
- MCFG_Z80DMA_OUT_MREQ_CB(WRITE8(*this, dkong_state, memory_write_byte))
+ Z80DMA(config, m_z80dma, CLOCK_1H);
+ m_z80dma->out_busreq_callback().set_inputline(m_maincpu, INPUT_LINE_HALT);
+ m_z80dma->in_mreq_callback().set(FUNC(dkong_state::memory_read_byte));
+ m_z80dma->out_mreq_callback().set(FUNC(dkong_state::memory_write_byte));
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
diff --git a/src/mame/drivers/huebler.cpp b/src/mame/drivers/huebler.cpp
index f3f64d746ce..bf61d2251ef 100644
--- a/src/mame/drivers/huebler.cpp
+++ b/src/mame/drivers/huebler.cpp
@@ -332,7 +332,7 @@ MACHINE_CONFIG_START(amu880_state::amu880)
MCFG_DEVICE_ADD(Z80CTC_TAG, Z80CTC, XTAL(10'000'000)/4)
MCFG_Z80CTC_INTR_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
MCFG_Z80CTC_ZC0_CB(WRITELINE(*this, amu880_state, ctc_z0_w))
- MCFG_Z80CTC_ZC1_CB(WRITELINE(Z80SIO_TAG, z80dart_device, rxtxcb_w))
+ MCFG_Z80CTC_ZC1_CB(WRITELINE(m_z80sio, z80dart_device, rxtxcb_w))
MCFG_Z80CTC_ZC2_CB(WRITELINE(*this, amu880_state, ctc_z2_w))
z80pio_device& pio1(Z80PIO(config, Z80PIO1_TAG, XTAL(10'000'000)/4));
@@ -341,9 +341,9 @@ MACHINE_CONFIG_START(amu880_state::amu880)
z80pio_device& pio2(Z80PIO(config, Z80PIO2_TAG, XTAL(10'000'000)/4));
pio2.out_int_callback().set_inputline(Z80_TAG, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD(Z80SIO_TAG, Z80SIO0, XTAL(10'000'000)/4) // U856
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(*this, amu880_state, cassette_w))
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
+ Z80SIO0(config, m_z80sio, XTAL(10'000'000)/4); // U856
+ m_z80sio->out_txda_callback().set(FUNC(amu880_state::cassette_w));
+ m_z80sio->out_int_callback().set_inputline(Z80_TAG, INPUT_LINE_IRQ0);
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED)
diff --git a/src/mame/drivers/mario.cpp b/src/mame/drivers/mario.cpp
index 1ffb77dd821..2ddbbfbf312 100644
--- a/src/mame/drivers/mario.cpp
+++ b/src/mame/drivers/mario.cpp
@@ -343,10 +343,10 @@ MACHINE_CONFIG_START(mario_state::mario_base)
MCFG_DEVICE_IO_MAP(mario_io_map)
/* devices */
- MCFG_DEVICE_ADD("z80dma", Z80DMA, Z80_CLOCK)
- MCFG_Z80DMA_OUT_BUSREQ_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
- MCFG_Z80DMA_IN_MREQ_CB(READ8(*this, mario_state, memory_read_byte))
- MCFG_Z80DMA_OUT_MREQ_CB(WRITE8(*this, mario_state, memory_write_byte))
+ Z80DMA(config, m_z80dma, Z80_CLOCK);
+ m_z80dma->out_busreq_callback().set_inputline(m_maincpu, INPUT_LINE_HALT);
+ m_z80dma->in_mreq_callback().set(FUNC(mario_state::memory_read_byte));
+ m_z80dma->out_mreq_callback().set(FUNC(mario_state::memory_write_byte));
ls259_device &mainlatch(LS259(config, "mainlatch")); // 2L (7E80H)
mainlatch.q_out_cb<0>().set(FUNC(mario_state::gfx_bank_w)); // ~T ROM
diff --git a/src/mame/drivers/mcr.cpp b/src/mame/drivers/mcr.cpp
index 9aad9555e92..03a6c62828e 100644
--- a/src/mame/drivers/mcr.cpp
+++ b/src/mame/drivers/mcr.cpp
@@ -1894,10 +1894,10 @@ MACHINE_CONFIG_START(mcr_nflfoot_state::mcr_91490_ipu)
Z80PIO(config, m_ipu_pio1, 7372800/2);
m_ipu_pio1->out_int_callback().set_inputline(m_ipu, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD("ipu_sio", Z80SIO0, 7372800/2)
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE("ipu", INPUT_LINE_IRQ0))
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(*this, mcr_nflfoot_state, sio_txda_w))
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE(*this, mcr_nflfoot_state, sio_txdb_w))
+ Z80SIO0(config, m_ipu_sio, 7372800/2);
+ m_ipu_sio->out_int_callback().set_inputline(m_ipu, INPUT_LINE_IRQ0);
+ m_ipu_sio->out_txda_callback().set(FUNC(mcr_nflfoot_state::sio_txda_w));
+ m_ipu_sio->out_txdb_callback().set(FUNC(mcr_nflfoot_state::sio_txdb_w));
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mikromik.cpp b/src/mame/drivers/mikromik.cpp
index d5aeecf5d1a..b1df94bccd8 100644
--- a/src/mame/drivers/mikromik.cpp
+++ b/src/mame/drivers/mikromik.cpp
@@ -498,18 +498,18 @@ MACHINE_CONFIG_START(mm1_state::mm1)
MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", mm1_floppies, "525qd", mm1_state::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_DEVICE_ADD(UPD7201_TAG, UPD7201, 6.144_MHz_XTAL/2)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_RXDRQA_CB(WRITELINE(*this, mm1_state, drq2_w))
- MCFG_Z80DART_OUT_TXDRQA_CB(WRITELINE(*this, mm1_state, drq1_w))
+ UPD7201(config, m_mpsc, 6.144_MHz_XTAL/2);
+ m_mpsc->out_txda_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd));
+ m_mpsc->out_dtra_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr));
+ m_mpsc->out_rtsa_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_rts));
+ m_mpsc->out_rxdrqa_callback().set(FUNC(mm1_state::drq2_w));
+ m_mpsc->out_txdrqa_callback().set(FUNC(mm1_state::drq1_w));
MCFG_DEVICE_ADD(RS232_A_TAG, RS232_PORT, default_rs232_devices, nullptr)
- MCFG_RS232_CTS_HANDLER(WRITELINE(UPD7201_TAG, z80dart_device, rxa_w))
+ MCFG_RS232_CTS_HANDLER(WRITELINE(m_mpsc, z80dart_device, rxa_w))
MCFG_DEVICE_ADD(RS232_B_TAG, RS232_PORT, default_rs232_devices, nullptr)
MCFG_DEVICE_ADD(RS232_C_TAG, RS232_PORT, default_rs232_devices, nullptr)
- MCFG_RS232_CTS_HANDLER(WRITELINE(UPD7201_TAG, z80dart_device, ctsb_w))
+ MCFG_RS232_CTS_HANDLER(WRITELINE(m_mpsc, z80dart_device, ctsb_w))
MCFG_DEVICE_ADD(KB_TAG, MM1_KEYBOARD, 2500) // actual KBCLK is 6.144_MHz_XTAL/2/16
MCFG_MM1_KEYBOARD_KBST_CALLBACK(WRITELINE(I8212_TAG, i8212_device, stb_w))
diff --git a/src/mame/drivers/mtx.cpp b/src/mame/drivers/mtx.cpp
index 232bf5be54e..ca375bc6431 100644
--- a/src/mame/drivers/mtx.cpp
+++ b/src/mame/drivers/mtx.cpp
@@ -369,8 +369,8 @@ MACHINE_CONFIG_START(mtx_state::rs128)
MCFG_Z80_DAISY_CHAIN(rs128_daisy_chain)
/* devices */
- MCFG_DEVICE_ADD(Z80DART_TAG, Z80DART, XTAL(4'000'000))
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
+ Z80DART(config, m_z80dart, XTAL(4'000'000));
+ m_z80dart->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
/* internal ram */
m_ram->set_default_size("128K").set_extra_options("192K,320K,448K,512K");
diff --git a/src/mame/drivers/pwrview.cpp b/src/mame/drivers/pwrview.cpp
index 01e6a9a18fd..98b580297d6 100644
--- a/src/mame/drivers/pwrview.cpp
+++ b/src/mame/drivers/pwrview.cpp
@@ -428,7 +428,7 @@ MACHINE_CONFIG_START(pwrview_state::pwrview)
MCFG_DEVICE_ADD("uart", I8251, 0)
- MCFG_DEVICE_ADD("sio", Z80SIO2, 4000000)
+ Z80SIO2(config, "sio", 4000000);
MCFG_DEVICE_ADD("crtc", HD6845, XTAL(64'000'000)/64) // clock unknown
MCFG_MC6845_CHAR_WIDTH(32) // ??
diff --git a/src/mame/drivers/qvt103.cpp b/src/mame/drivers/qvt103.cpp
index 017dfb9238f..bda819393b2 100644
--- a/src/mame/drivers/qvt103.cpp
+++ b/src/mame/drivers/qvt103.cpp
@@ -76,8 +76,8 @@ MACHINE_CONFIG_START(qvt103_state::qvt103)
MCFG_DEVICE_ADD("ctc", Z80CTC, XTAL(29'376'000) / 9)
MCFG_Z80CTC_INTR_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
- MCFG_DEVICE_ADD("dart", Z80DART, XTAL(29'376'000) / 9)
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
+ z80dart_device& dart(Z80DART(config, "dart", XTAL(29'376'000) / 9));
+ dart.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL(29'376'000) * 2 / 3, 102 * 10, 0, 80 * 10, 320, 0, 300)
diff --git a/src/mame/drivers/qx10.cpp b/src/mame/drivers/qx10.cpp
index c0451ca4b52..4b8829ffe36 100644
--- a/src/mame/drivers/qx10.cpp
+++ b/src/mame/drivers/qx10.cpp
@@ -775,14 +775,14 @@ MACHINE_CONFIG_START(qx10_state::qx10)
m_pic_s->out_int_callback().set(m_pic_m, FUNC(pic8259_device::ir7_w));
m_pic_s->in_sp_callback().set_constant(0);
- MCFG_DEVICE_ADD("upd7201", UPD7201, MAIN_CLK/4) // channel b clock set by pit2 channel 2
+ UPD7201(config, m_scc, MAIN_CLK/4); // channel b clock set by pit2 channel 2
// Channel A: Keyboard
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE("kbd", rs232_port_device, write_txd))
+ m_scc->out_txda_callback().set("kbd", FUNC(rs232_port_device::write_txd));
// Channel B: RS232
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE(RS232_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRB_CB(WRITELINE(RS232_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSB_CB(WRITELINE(RS232_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_INT_CB(WRITELINE(*this, qx10_state, keyboard_irq))
+ m_scc->out_txdb_callback().set(RS232_TAG, FUNC(rs232_port_device::write_txd));
+ m_scc->out_dtrb_callback().set(RS232_TAG, FUNC(rs232_port_device::write_dtr));
+ m_scc->out_rtsb_callback().set(RS232_TAG, FUNC(rs232_port_device::write_rts));
+ m_scc->out_int_callback().set(FUNC(qx10_state::keyboard_irq));
AM9517A(config, m_dma_1, MAIN_CLK/4);
m_dma_1->out_hreq_callback().set(FUNC(qx10_state::dma_hrq_changed));
@@ -815,10 +815,10 @@ MACHINE_CONFIG_START(qx10_state::qx10)
FLOPPY_CONNECTOR(config, m_floppy[1], qx10_floppies, "525dd", floppy_image_device::default_floppy_formats);
MCFG_DEVICE_ADD(RS232_TAG, RS232_PORT, default_rs232_devices, nullptr)
- MCFG_RS232_RXD_HANDLER(WRITELINE("upd7201", upd7201_device, rxb_w))
+ MCFG_RS232_RXD_HANDLER(WRITELINE(m_scc, upd7201_device, rxb_w))
MCFG_DEVICE_ADD("kbd", RS232_PORT, keyboard, "qx10")
- MCFG_RS232_RXD_HANDLER(WRITELINE("upd7201", z80dart_device, rxa_w))
+ MCFG_RS232_RXD_HANDLER(WRITELINE(m_scc, z80dart_device, rxa_w))
/* internal ram */
RAM(config, RAM_TAG).set_default_size("256K");
diff --git a/src/mame/drivers/rc702.cpp b/src/mame/drivers/rc702.cpp
index b6c33ba346e..fc6d4e78350 100644
--- a/src/mame/drivers/rc702.cpp
+++ b/src/mame/drivers/rc702.cpp
@@ -342,8 +342,8 @@ MACHINE_CONFIG_START(rc702_state::rc702)
m_ctc1->zc_callback<1>().set("sio1", FUNC(z80dart_device::rxtxcb_w));
m_ctc1->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD("sio1", Z80DART, XTAL(8'000'000) / 2)
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
+ z80dart_device& dart(Z80DART(config, "sio1", XTAL(8'000'000) / 2));
+ dart.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
Z80PIO(config, m_pio, 8_MHz_XTAL / 2);
m_pio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
diff --git a/src/mame/drivers/super6.cpp b/src/mame/drivers/super6.cpp
index 447070fb556..319787d7fb8 100644
--- a/src/mame/drivers/super6.cpp
+++ b/src/mame/drivers/super6.cpp
@@ -458,13 +458,13 @@ MACHINE_CONFIG_START(super6_state::super6)
clock_device &ctc_tick(CLOCK(config, "ctc_tick", 24_MHz_XTAL / 16));
ctc_tick.signal_handler().set(m_ctc, FUNC(z80ctc_device::trg0)); // J6 pin 1-14 (1.5MHz)
- MCFG_DEVICE_ADD(m_dma, Z80DMA, 24_MHz_XTAL / 6)
- MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(m_dma, z80dma_device, bai_w))
- MCFG_Z80DMA_OUT_INT_CB(WRITELINE(m_ctc, z80ctc_device, trg2))
- MCFG_Z80DMA_IN_MREQ_CB(READ8(*this, super6_state, memory_read_byte))
- MCFG_Z80DMA_OUT_MREQ_CB(WRITE8(*this, super6_state, memory_write_byte))
- MCFG_Z80DMA_IN_IORQ_CB(READ8(*this, super6_state, io_read_byte))
- MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(*this, super6_state, io_write_byte))
+ Z80DMA(config, m_dma, 24_MHz_XTAL / 6);
+ m_dma->out_busreq_callback().set(m_dma, FUNC(z80dma_device::bai_w));
+ m_dma->out_int_callback().set(m_ctc, FUNC(z80ctc_device::trg2));
+ m_dma->in_mreq_callback().set(FUNC(super6_state::memory_read_byte));
+ m_dma->out_mreq_callback().set(FUNC(super6_state::memory_write_byte));
+ m_dma->in_iorq_callback().set(FUNC(super6_state::io_read_byte));
+ m_dma->out_iorq_callback().set(FUNC(super6_state::io_write_byte));
Z80PIO(config, m_pio, 24_MHz_XTAL / 4);
m_pio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
@@ -479,14 +479,14 @@ MACHINE_CONFIG_START(super6_state::super6)
MCFG_FLOPPY_DRIVE_ADD(m_floppy1, super6_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_DEVICE_ADD(m_dart, Z80DART, 24_MHz_XTAL / 4)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRB_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSB_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
+ Z80DART(config, m_dart, 24_MHz_XTAL / 4);
+ m_dart->out_txda_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd));
+ m_dart->out_dtra_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_dtr));
+ m_dart->out_rtsa_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_rts));
+ m_dart->out_txdb_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_txd));
+ m_dart->out_dtrb_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_dtr));
+ m_dart->out_rtsb_callback().set(RS232_B_TAG, FUNC(rs232_port_device::write_rts));
+ m_dart->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
MCFG_DEVICE_ADD(RS232_A_TAG, RS232_PORT, default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER(WRITELINE(m_dart, z80dart_device, rxa_w))
diff --git a/src/mame/drivers/super80.cpp b/src/mame/drivers/super80.cpp
index 432a1be75bf..cfd20124d33 100644
--- a/src/mame/drivers/super80.cpp
+++ b/src/mame/drivers/super80.cpp
@@ -860,14 +860,14 @@ MACHINE_CONFIG_START(super80_state::super80r)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_IO_MAP(super80r_io)
- MCFG_DEVICE_ADD("dma", Z80DMA, MASTER_CLOCK/6)
- MCFG_Z80DMA_OUT_BUSREQ_CB(WRITELINE(*this, super80_state, busreq_w))
- MCFG_Z80DMA_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0))
+ Z80DMA(config, m_dma, MASTER_CLOCK/6);
+ m_dma->out_busreq_callback().set(FUNC(super80_state::busreq_w));
+ m_dma->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
//ba0 - not connected
- MCFG_Z80DMA_IN_MREQ_CB(READ8(*this, super80_state, memory_read_byte))
- MCFG_Z80DMA_OUT_MREQ_CB(WRITE8(*this, super80_state, memory_write_byte))
- MCFG_Z80DMA_IN_IORQ_CB(READ8(*this, super80_state, io_read_byte))
- MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(*this, super80_state, io_write_byte))
+ m_dma->in_mreq_callback().set(FUNC(super80_state::memory_read_byte));
+ m_dma->out_mreq_callback().set(FUNC(super80_state::memory_write_byte));
+ m_dma->in_iorq_callback().set(FUNC(super80_state::io_read_byte));
+ m_dma->out_iorq_callback().set(FUNC(super80_state::io_write_byte));
MCFG_DEVICE_ADD("fdc", WD2793, 2_MHz_XTAL)
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE("dma", z80dma_device, rdy_w))
diff --git a/src/mame/drivers/superslave.cpp b/src/mame/drivers/superslave.cpp
index 0c8122eed14..5bc3b3d1226 100644
--- a/src/mame/drivers/superslave.cpp
+++ b/src/mame/drivers/superslave.cpp
@@ -375,41 +375,41 @@ MACHINE_CONFIG_START(superslave_state::superslave)
z80pio_device& pio(Z80PIO(config, Z80PIO_TAG, XTAL(8'000'000)/2));
pio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD(Z80DART_0_TAG, Z80DART, XTAL(8'000'000)/2)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE(RS232_A_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRB_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSB_CB(WRITELINE(RS232_B_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
-
- MCFG_DEVICE_ADD(RS232_A_TAG, RS232_PORT, default_rs232_devices, "terminal")
+ z80dart_device& dart0(Z80DART(config, Z80DART_0_TAG, XTAL(8'000'000)/2));
+ dart0.out_txda_callback().set(m_rs232a, FUNC(rs232_port_device::write_txd));
+ dart0.out_dtra_callback().set(m_rs232a, FUNC(rs232_port_device::write_dtr));
+ dart0.out_rtsa_callback().set(m_rs232a, FUNC(rs232_port_device::write_rts));
+ dart0.out_txdb_callback().set(m_rs232b, FUNC(rs232_port_device::write_txd));
+ dart0.out_dtrb_callback().set(m_rs232b, FUNC(rs232_port_device::write_dtr));
+ dart0.out_rtsb_callback().set(m_rs232b, FUNC(rs232_port_device::write_rts));
+ dart0.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+
+ MCFG_DEVICE_ADD(m_rs232a, RS232_PORT, default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER(WRITELINE(Z80DART_0_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(WRITELINE(Z80DART_0_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(WRITELINE(Z80DART_0_TAG, z80dart_device, ctsa_w))
MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("terminal", terminal)
- MCFG_DEVICE_ADD(RS232_B_TAG, RS232_PORT, default_rs232_devices, nullptr)
+ MCFG_DEVICE_ADD(m_rs232b, RS232_PORT, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(Z80DART_0_TAG, z80dart_device, rxb_w))
MCFG_RS232_DCD_HANDLER(WRITELINE(Z80DART_0_TAG, z80dart_device, dcdb_w))
MCFG_RS232_CTS_HANDLER(WRITELINE(Z80DART_0_TAG, z80dart_device, ctsb_w))
- MCFG_DEVICE_ADD(Z80DART_1_TAG, Z80DART, XTAL(8'000'000)/2)
- MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(RS232_C_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRA_CB(WRITELINE(RS232_C_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSA_CB(WRITELINE(RS232_C_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_TXDB_CB(WRITELINE(RS232_D_TAG, rs232_port_device, write_txd))
- MCFG_Z80DART_OUT_DTRB_CB(WRITELINE(RS232_D_TAG, rs232_port_device, write_dtr))
- MCFG_Z80DART_OUT_RTSB_CB(WRITELINE(RS232_D_TAG, rs232_port_device, write_rts))
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
+ z80dart_device& dart1(Z80DART(config, Z80DART_1_TAG, XTAL(8'000'000)/2));
+ dart1.out_txda_callback().set(m_rs232c, FUNC(rs232_port_device::write_txd));
+ dart1.out_dtra_callback().set(m_rs232c, FUNC(rs232_port_device::write_dtr));
+ dart1.out_rtsa_callback().set(m_rs232c, FUNC(rs232_port_device::write_rts));
+ dart1.out_txdb_callback().set(m_rs232d, FUNC(rs232_port_device::write_txd));
+ dart1.out_dtrb_callback().set(m_rs232d, FUNC(rs232_port_device::write_dtr));
+ dart1.out_rtsb_callback().set(m_rs232d, FUNC(rs232_port_device::write_rts));
+ dart1.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD(RS232_C_TAG, RS232_PORT, default_rs232_devices, nullptr)
+ MCFG_DEVICE_ADD(m_rs232c, RS232_PORT, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(Z80DART_1_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(WRITELINE(Z80DART_1_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(WRITELINE(Z80DART_1_TAG, z80dart_device, ctsa_w))
- MCFG_DEVICE_ADD(RS232_D_TAG, RS232_PORT, default_rs232_devices, nullptr)
+ MCFG_DEVICE_ADD(m_rs232d, RS232_PORT, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(Z80DART_1_TAG, z80dart_device, rxb_w))
MCFG_RS232_DCD_HANDLER(WRITELINE(Z80DART_1_TAG, z80dart_device, dcdb_w))
MCFG_RS232_CTS_HANDLER(WRITELINE(Z80DART_1_TAG, z80dart_device, ctsb_w))
diff --git a/src/mame/drivers/symbolics.cpp b/src/mame/drivers/symbolics.cpp
index e8777dbf165..3e5966b0902 100644
--- a/src/mame/drivers/symbolics.cpp
+++ b/src/mame/drivers/symbolics.cpp
@@ -26,7 +26,7 @@
TODO:
The entire lispcpu half (more like 3/4) of the machine
Framebuffer 1152x864? 1150x900? (lives on the i/o card)
- I8274 MPSC (z80dart.cpp) x2
+ I8274 MPSC (z80sio.cpp) x2
1024x4bit SRAM AM2148-50 x6 @F22-F27
2048x8bit SRAM @F7 and @G7
keyboard/mouse (a 68k based console dedicated to this machine; talks through one of the MPSC chips)
diff --git a/src/mame/drivers/tdv2324.cpp b/src/mame/drivers/tdv2324.cpp
index a6b6851bcff..e4e0b772357 100644
--- a/src/mame/drivers/tdv2324.cpp
+++ b/src/mame/drivers/tdv2324.cpp
@@ -296,7 +296,7 @@ MACHINE_CONFIG_START(tdv2324_state::tdv2324)
MCFG_DEVICE_ADD(P8253_5_1_TAG, PIT8253, 0)
- MCFG_DEVICE_ADD(MK3887N4_TAG, Z80SIO2, 8000000/2)
+ Z80SIO2(config, MK3887N4_TAG, 8000000/2);
MCFG_DEVICE_ADD(FD1797PL02_TAG, FD1797, 8000000/4)
MCFG_FLOPPY_DRIVE_ADD(FD1797PL02_TAG":0", tdv2324_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/tranz330.cpp b/src/mame/drivers/tranz330.cpp
index 5dbd12c4257..df6c2b1ab58 100644
--- a/src/mame/drivers/tranz330.cpp
+++ b/src/mame/drivers/tranz330.cpp
@@ -162,11 +162,11 @@ void tranz330_state::tranz330(machine_config &config)
m_pio->in_pb_callback().set(FUNC(tranz330_state::pio_b_r));
Z80DART(config, m_dart, XTAL(7'159'090)/2); //*
- m_dart->set_out_syncb_callback(DEVCB_WRITELINE(*this, tranz330_state, syncb_w));
- m_dart->set_out_txdb_callback(DEVCB_WRITELINE(m_rs232, rs232_port_device, write_txd)); //?
- m_dart->set_out_dtrb_callback(DEVCB_WRITELINE(m_rs232, rs232_port_device, write_dtr)); //?
- m_dart->set_out_rtsb_callback(DEVCB_WRITELINE(m_rs232, rs232_port_device, write_rts)); //?
- m_dart->set_out_int_callback(DEVCB_WRITELINE("irq", input_merger_device, in_w<1>));
+ m_dart->out_syncb_callback().set(FUNC(tranz330_state::syncb_w));
+ m_dart->out_txdb_callback().set(m_rs232, FUNC(rs232_port_device::write_txd)); //?
+ m_dart->out_dtrb_callback().set(m_rs232, FUNC(rs232_port_device::write_dtr)); //?
+ m_dart->out_rtsb_callback().set(m_rs232, FUNC(rs232_port_device::write_rts)); //?
+ m_dart->out_int_callback().set("irq", FUNC(input_merger_device::in_w<1>));
Z80CTC(config, m_ctc, XTAL(7'159'090)/2); //*
m_ctc->set_zc_callback<2>(DEVCB_WRITELINE(*this, tranz330_state, sound_w));
diff --git a/src/mame/drivers/x1.cpp b/src/mame/drivers/x1.cpp
index a31ec973b58..ccb7418c222 100644
--- a/src/mame/drivers/x1.cpp
+++ b/src/mame/drivers/x1.cpp
@@ -2294,16 +2294,16 @@ MACHINE_CONFIG_START(x1_state::x1turbo)
MCFG_DEVICE_MODIFY("iobank")
MCFG_DEVICE_PROGRAM_MAP(x1turbo_io_banks)
- MCFG_DEVICE_ADD("sio", Z80SIO0, MAIN_CLOCK/4)
- MCFG_Z80DART_OUT_INT_CB(INPUTLINE("x1_cpu", INPUT_LINE_IRQ0))
-
- MCFG_DEVICE_ADD("dma", Z80DMA, MAIN_CLOCK/4)
- MCFG_Z80DMA_OUT_BUSREQ_CB(INPUTLINE("x1_cpu", INPUT_LINE_HALT))
- MCFG_Z80DMA_OUT_INT_CB(INPUTLINE("x1_cpu", INPUT_LINE_IRQ0))
- MCFG_Z80DMA_IN_MREQ_CB(READ8(*this, x1_state, memory_read_byte))
- MCFG_Z80DMA_OUT_MREQ_CB(WRITE8(*this, x1_state, memory_write_byte))
- MCFG_Z80DMA_IN_IORQ_CB(READ8(*this, x1_state, io_read_byte))
- MCFG_Z80DMA_OUT_IORQ_CB(WRITE8(*this, x1_state, io_write_byte))
+ z80sio0_device& sio(Z80SIO0(config, "sio", MAIN_CLOCK/4));
+ sio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+
+ Z80DMA(config, m_dma, MAIN_CLOCK/4);
+ m_dma->out_busreq_callback().set_inputline(m_maincpu, INPUT_LINE_HALT);
+ m_dma->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ m_dma->in_mreq_callback().set(FUNC(x1_state::memory_read_byte));
+ m_dma->out_mreq_callback().set(FUNC(x1_state::memory_write_byte));
+ m_dma->in_iorq_callback().set(FUNC(x1_state::io_read_byte));
+ m_dma->out_iorq_callback().set(FUNC(x1_state::io_write_byte));
MCFG_DEVICE_MODIFY("fdc")
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, x1_state, fdc_drq_w))