summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2018-12-04 19:29:05 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2018-12-04 19:29:05 +0100
commitf91bbc9c7bfaad52324ebfcfc33cb6b4146274da (patch)
treea5eb81bf603f953905107b51164c32b84b6a2f9a
parent805699c0310c1a84825bc9e91aa9aafe258a3845 (diff)
src/mame: more misc MCFG removal (nw)
-rw-r--r--src/devices/bus/spectrum/intf1.cpp11
-rw-r--r--src/mame/drivers/abc80.cpp6
-rw-r--r--src/mame/drivers/apollo.cpp36
-rw-r--r--src/mame/drivers/apricotf.cpp2
-rw-r--r--src/mame/drivers/asteroid.cpp4
-rw-r--r--src/mame/drivers/atarisy2.cpp39
-rw-r--r--src/mame/drivers/boogwing.cpp4
-rw-r--r--src/mame/drivers/bwidow.cpp4
-rw-r--r--src/mame/drivers/bzone.cpp6
-rw-r--r--src/mame/drivers/coco12.cpp8
-rw-r--r--src/mame/drivers/dbz.cpp2
-rw-r--r--src/mame/drivers/deco32.cpp16
-rw-r--r--src/mame/drivers/decstation.cpp6
-rw-r--r--src/mame/drivers/dragon.cpp6
-rw-r--r--src/mame/drivers/dvk_kcgd.cpp4
-rw-r--r--src/mame/drivers/dvk_ksm.cpp4
-rw-r--r--src/mame/drivers/fmtowns.cpp12
-rw-r--r--src/mame/drivers/gauntlet.cpp30
-rw-r--r--src/mame/drivers/gijoe.cpp2
-rw-r--r--src/mame/drivers/harddriv.cpp5
-rw-r--r--src/mame/drivers/kc.cpp8
-rw-r--r--src/mame/drivers/ksys573.cpp111
-rw-r--r--src/mame/drivers/lethal.cpp2
-rw-r--r--src/mame/drivers/littlerb.cpp2
-rw-r--r--src/mame/drivers/llc.cpp2
-rw-r--r--src/mame/drivers/m24.cpp9
-rw-r--r--src/mame/drivers/megaphx.cpp4
-rw-r--r--src/mame/drivers/mhavoc.cpp4
-rw-r--r--src/mame/drivers/mikromik.cpp4
-rw-r--r--src/mame/drivers/moo.cpp2
-rw-r--r--src/mame/drivers/ms0515.cpp6
-rw-r--r--src/mame/drivers/msx.cpp104
-rw-r--r--src/mame/drivers/mystwarr.cpp2
-rw-r--r--src/mame/drivers/namcos21_de.cpp13
-rw-r--r--src/mame/drivers/naomi.cpp2
-rw-r--r--src/mame/drivers/omegrace.cpp4
-rw-r--r--src/mame/drivers/overdriv.cpp3
-rw-r--r--src/mame/drivers/pcm.cpp2
-rw-r--r--src/mame/drivers/psion.cpp4
-rw-r--r--src/mame/drivers/ql.cpp6
-rw-r--r--src/mame/drivers/quantum.cpp4
-rw-r--r--src/mame/drivers/rainbow.cpp4
-rw-r--r--src/mame/drivers/rampart.cpp2
-rw-r--r--src/mame/drivers/rohga.cpp16
-rw-r--r--src/mame/drivers/simpsons.cpp2
-rw-r--r--src/mame/drivers/sm7238.cpp10
-rw-r--r--src/mame/drivers/starwars.cpp6
-rw-r--r--src/mame/drivers/tempest.cpp6
-rw-r--r--src/mame/drivers/thomson.cpp2
-rw-r--r--src/mame/drivers/tomcat.cpp4
-rw-r--r--src/mame/drivers/vendetta.cpp4
-rw-r--r--src/mame/drivers/vt240.cpp11
-rw-r--r--src/mame/drivers/xexex.cpp2
-rw-r--r--src/mame/drivers/xmen.cpp4
-rw-r--r--src/mame/includes/coco12.h2
-rw-r--r--src/mame/includes/slapstic.h3
-rw-r--r--src/mame/includes/thomson.h5
-rw-r--r--src/mame/machine/6883sam.h6
-rw-r--r--src/mame/machine/abc80kb.h12
-rw-r--r--src/mame/machine/apollo.cpp2
-rw-r--r--src/mame/machine/apollo_kbd.h14
-rw-r--r--src/mame/machine/apricotkb.h12
-rw-r--r--src/mame/machine/dec_lk201.h8
-rw-r--r--src/mame/machine/decocass_tape.h3
-rw-r--r--src/mame/machine/fm_scsi.h11
-rw-r--r--src/mame/machine/inder_sb.h3
-rw-r--r--src/mame/machine/inder_vid.h3
-rw-r--r--src/mame/machine/k573dio.h10
-rw-r--r--src/mame/machine/k7659kb.h10
-rw-r--r--src/mame/machine/kc_keyb.h4
-rw-r--r--src/mame/machine/km035.h19
-rw-r--r--src/mame/machine/m24_kbd.h4
-rw-r--r--src/mame/machine/m24_z8000.h4
-rw-r--r--src/mame/machine/m3comm.h2
-rw-r--r--src/mame/machine/mathbox.h7
-rw-r--r--src/mame/machine/microdrv.h10
-rw-r--r--src/mame/machine/mm1kb.h12
-rw-r--r--src/mame/machine/ms7004.h15
-rw-r--r--src/mame/machine/msx_matsushita.h9
-rw-r--r--src/mame/machine/msx_s1985.h4
-rw-r--r--src/mame/machine/namcoio_gearbox.h17
-rw-r--r--src/mame/machine/psion_pack.h8
-rw-r--r--src/mame/video/airraid_dev.h4
-rw-r--r--src/mame/video/avgdvg.h4
-rw-r--r--src/mame/video/deco_ace.h10
-rw-r--r--src/mame/video/deco_zoomspr.h5
-rw-r--r--src/mame/video/decocomn.h13
-rw-r--r--src/mame/video/k053251.h2
-rw-r--r--src/mame/video/k054000.h3
89 files changed, 321 insertions, 517 deletions
diff --git a/src/devices/bus/spectrum/intf1.cpp b/src/devices/bus/spectrum/intf1.cpp
index d8245554976..d324e931e2c 100644
--- a/src/devices/bus/spectrum/intf1.cpp
+++ b/src/devices/bus/spectrum/intf1.cpp
@@ -39,20 +39,21 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(spectrum_intf1_device::device_add_mconfig)
+void spectrum_intf1_device::device_add_mconfig(machine_config &config)
+{
/* rs232 */
RS232_PORT(config, m_rs232, default_rs232_devices, nullptr);
/* microdrive */
- MCFG_MICRODRIVE_ADD("mdv1")
- MCFG_MICRODRIVE_COMMS_OUT_CALLBACK(WRITELINE("mdv2", microdrive_image_device, comms_in_w))
- MCFG_MICRODRIVE_ADD("mdv2")
+ MICRODRIVE(config, m_mdv1, 0);
+ m_mdv1->comms_out_wr_callback().set(m_mdv2, FUNC(microdrive_image_device::comms_in_w));
+ MICRODRIVE(config, m_mdv2, 0);
/* passthru */
SPECTRUM_EXPANSION_SLOT(config, m_exp, spectrum_expansion_devices, nullptr);
m_exp->irq_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::irq_w));
m_exp->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::nmi_w));
-MACHINE_CONFIG_END
+}
const tiny_rom_entry *spectrum_intf1_device::device_rom_region() const
{
diff --git a/src/mame/drivers/abc80.cpp b/src/mame/drivers/abc80.cpp
index 3f69e2eed92..957288239c4 100644
--- a/src/mame/drivers/abc80.cpp
+++ b/src/mame/drivers/abc80.cpp
@@ -341,7 +341,7 @@ static const z80_daisy_config abc80_daisy_chain[] =
//-------------------------------------------------
-// ABC80_KEYBOARD_INTERFACE( kb_intf )
+// ABC80_KEYBOARD_INTERFACE
//-------------------------------------------------
WRITE_LINE_MEMBER( abc80_state::keydown_w )
@@ -522,8 +522,8 @@ MACHINE_CONFIG_START(abc80_state::abc80)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_CASSETTE_INTERFACE("abc80_cass")
- MCFG_DEVICE_ADD(ABC80_KEYBOARD_TAG, ABC80_KEYBOARD, 0)
- MCFG_ABC80_KEYBOARD_KEYDOWN_CALLBACK(WRITELINE(*this, abc80_state, keydown_w))
+ ABC80_KEYBOARD(config, m_kb, 0);
+ m_kb->keydown_wr_callback().set(FUNC(abc80_state::keydown_w));
MCFG_ABCBUS_SLOT_ADD(ABCBUS_TAG, abc80_cards, "abcexp")
diff --git a/src/mame/drivers/apollo.cpp b/src/mame/drivers/apollo.cpp
index 95dfd473828..969b845e321 100644
--- a/src/mame/drivers/apollo.cpp
+++ b/src/mame/drivers/apollo.cpp
@@ -1092,18 +1092,18 @@ MACHINE_CONFIG_START(apollo_state::dn3500_19i)
dn3500(config);
/* video hardware 19" monochrome */
MCFG_APOLLO_MONO19I_ADD(APOLLO_SCREEN_TAG)
- MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
- MCFG_APOLLO_KBD_TX_CALLBACK(WRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
- MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(*this, apollo_state, apollo_kbd_is_german))
+ APOLLO_KBD(config, m_keyboard, 0);
+ m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w));
+ m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german));
MACHINE_CONFIG_END
MACHINE_CONFIG_START(apollo_state::dn3500_15i)
dn3500(config);
/* video hardware is 15" monochrome or color */
MCFG_APOLLO_GRAPHICS_ADD(APOLLO_SCREEN_TAG)
- MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
- MCFG_APOLLO_KBD_TX_CALLBACK(WRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
- MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(*this, apollo_state, apollo_kbd_is_german))
+ APOLLO_KBD(config, m_keyboard, 0);
+ m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w));
+ m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german));
MACHINE_CONFIG_END
MACHINE_CONFIG_START(apollo_state::dn3000)
@@ -1144,18 +1144,18 @@ MACHINE_CONFIG_START(apollo_state::dn3000_19i)
dn3000(config);
/* video hardware 19" monochrome */
MCFG_APOLLO_MONO19I_ADD(APOLLO_SCREEN_TAG)
- MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
- MCFG_APOLLO_KBD_TX_CALLBACK(WRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
- MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(*this, apollo_state, apollo_kbd_is_german))
+ APOLLO_KBD(config, m_keyboard, 0);
+ m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w));
+ m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german));
MACHINE_CONFIG_END
MACHINE_CONFIG_START(apollo_state::dn3000_15i)
dn3000(config);
/* video hardware 15" monochrome */
MCFG_APOLLO_GRAPHICS_ADD(APOLLO_SCREEN_TAG)
- MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
- MCFG_APOLLO_KBD_TX_CALLBACK(WRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
- MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(*this, apollo_state, apollo_kbd_is_german))
+ APOLLO_KBD(config, m_keyboard, 0);
+ m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w));
+ m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german));
MACHINE_CONFIG_END
MACHINE_CONFIG_START(apollo_state::dn5500)
@@ -1189,18 +1189,18 @@ MACHINE_CONFIG_START(apollo_state::dn5500_19i)
dn5500(config);
/* video hardware 19" monochrome */
MCFG_APOLLO_MONO19I_ADD(APOLLO_SCREEN_TAG)
- MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
- MCFG_APOLLO_KBD_TX_CALLBACK(WRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
- MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(*this, apollo_state, apollo_kbd_is_german))
+ APOLLO_KBD(config, m_keyboard, 0);
+ m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w));
+ m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german));
MACHINE_CONFIG_END
MACHINE_CONFIG_START(apollo_state::dn5500_15i)
dn5500(config);
/* video hardware 15" monochrome */
MCFG_APOLLO_GRAPHICS_ADD(APOLLO_SCREEN_TAG)
- MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
- MCFG_APOLLO_KBD_TX_CALLBACK(WRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
- MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(*this, apollo_state, apollo_kbd_is_german))
+ APOLLO_KBD(config, m_keyboard, 0);
+ m_keyboard->tx_cb().set(m_sio, FUNC(apollo_sio::rx_a_w));
+ m_keyboard->german_cb().set(FUNC(apollo_state::apollo_kbd_is_german));
MACHINE_CONFIG_END
/***************************************************************************
diff --git a/src/mame/drivers/apricotf.cpp b/src/mame/drivers/apricotf.cpp
index a91ee74b0a7..ceffb12675d 100644
--- a/src/mame/drivers/apricotf.cpp
+++ b/src/mame/drivers/apricotf.cpp
@@ -367,7 +367,7 @@ MACHINE_CONFIG_START(f1_state::act_f1)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_act_f1)
/* Devices */
- MCFG_DEVICE_ADD(APRICOT_KEYBOARD_TAG, APRICOT_KEYBOARD, 0)
+ APRICOT_KEYBOARD(config, APRICOT_KEYBOARD_TAG, 0);
Z80SIO(config, m_sio, 2500000);
m_sio->out_int_callback().set("irqs", FUNC(input_merger_device::in_w<0>));
diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp
index ed0de3147d0..d790b5760ed 100644
--- a/src/mame/drivers/asteroid.cpp
+++ b/src/mame/drivers/asteroid.cpp
@@ -760,8 +760,8 @@ MACHINE_CONFIG_START(asteroid_state::asteroid_base)
MCFG_SCREEN_VISIBLE_AREA(522, 1566, 394, 1182)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_ADD("dvg", DVG, 0)
- MCFG_AVGDVG_VECTOR("vector")
+ DVG(config, m_dvg, 0);
+ m_dvg->set_vector_tag("vector");
MACHINE_CONFIG_END
MACHINE_CONFIG_START(asteroid_state::asteroid)
diff --git a/src/mame/drivers/atarisy2.cpp b/src/mame/drivers/atarisy2.cpp
index 8da5fd20a4e..4633c00bc76 100644
--- a/src/mame/drivers/atarisy2.cpp
+++ b/src/mame/drivers/atarisy2.cpp
@@ -1254,44 +1254,49 @@ MACHINE_CONFIG_START(atarisy2_state::atarisy2)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(atarisy2_state::paperboy)
+void atarisy2_state::paperboy(machine_config &config)
+{
atarisy2(config);
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 105, false)
-MACHINE_CONFIG_END
+ SLAPSTIC(config, m_slapstic, 105, false);
+}
-MACHINE_CONFIG_START(atarisy2_state::_720)
+void atarisy2_state::_720(machine_config &config)
+{
atarisy2(config);
/* without the default EEPROM, 720 hangs at startup due to communication
issues with the sound CPU; temporarily increasing the sound CPU frequency
to ~2.2MHz "fixes" the problem */
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 107, false)
-MACHINE_CONFIG_END
+ SLAPSTIC(config, m_slapstic, 107, false);
+}
-MACHINE_CONFIG_START(atarisy2_state::ssprint)
+void atarisy2_state::ssprint(machine_config &config)
+{
atarisy2(config);
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 108, false)
+ SLAPSTIC(config, m_slapstic, 108, false);
/* sound hardware */
- MCFG_DEVICE_REMOVE("tms")
-MACHINE_CONFIG_END
+ config.device_remove("tms");
+}
-MACHINE_CONFIG_START(atarisy2_state::csprint)
+void atarisy2_state::csprint(machine_config &config)
+{
atarisy2(config);
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 109, false)
+ SLAPSTIC(config, m_slapstic, 109, false);
/* sound hardware */
- MCFG_DEVICE_REMOVE("tms")
-MACHINE_CONFIG_END
+ config.device_remove("tms");
+}
-MACHINE_CONFIG_START(atarisy2_state::apb)
+void atarisy2_state::apb(machine_config &config)
+{
atarisy2(config);
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 110, false)
-MACHINE_CONFIG_END
+ SLAPSTIC(config, m_slapstic, 110, false);
+}
/*************************************
diff --git a/src/mame/drivers/boogwing.cpp b/src/mame/drivers/boogwing.cpp
index 79a4ab80c44..f1f6ba71179 100644
--- a/src/mame/drivers/boogwing.cpp
+++ b/src/mame/drivers/boogwing.cpp
@@ -354,12 +354,12 @@ MACHINE_CONFIG_START(boogwing_state::boogwing)
MCFG_SCREEN_RAW_PARAMS(MAIN_XTAL / 4, 442, 0, 320, 274, 8, 248) // same as robocop2(cninja.cpp)? verify this from real pcb.
MCFG_SCREEN_UPDATE_DRIVER(boogwing_state, screen_update_boogwing)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "deco_ace", gfx_boogwing)
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_deco_ace, gfx_boogwing)
MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16)
MCFG_DEVICE_ADD("spriteram2", BUFFERED_SPRITERAM16)
- MCFG_DECO_ACE_ADD("deco_ace")
+ DECO_ACE(config, m_deco_ace, 0);
MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
diff --git a/src/mame/drivers/bwidow.cpp b/src/mame/drivers/bwidow.cpp
index 3d3c6eeac0f..3cb71a0c334 100644
--- a/src/mame/drivers/bwidow.cpp
+++ b/src/mame/drivers/bwidow.cpp
@@ -780,8 +780,8 @@ MACHINE_CONFIG_START(bwidow_state::bwidow)
MCFG_SCREEN_VISIBLE_AREA(0, 480, 0, 440)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_ADD("avg", AVG, 0)
- MCFG_AVGDVG_VECTOR("vector")
+ avg_device &avg(AVG(config, "avg", 0));
+ avg.set_vector_tag("vector");
/* sound hardware */
bwidow_audio(config);
diff --git a/src/mame/drivers/bzone.cpp b/src/mame/drivers/bzone.cpp
index e101e5182c1..bbc762cfe8f 100644
--- a/src/mame/drivers/bzone.cpp
+++ b/src/mame/drivers/bzone.cpp
@@ -586,11 +586,11 @@ MACHINE_CONFIG_START(bzone_state::bzone_base)
MCFG_SCREEN_VISIBLE_AREA(0, 580, 0, 400)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_ADD("avg", AVG_BZONE, 0)
- MCFG_AVGDVG_VECTOR("vector")
+ avg_device &avg(AVG_BZONE(config, "avg", 0));
+ avg.set_vector_tag("vector");
/* Drivers */
- MCFG_MATHBOX_ADD("mathbox")
+ MATHBOX(config, m_mathbox, 0);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/coco12.cpp b/src/mame/drivers/coco12.cpp
index de787328542..2c4131efb74 100644
--- a/src/mame/drivers/coco12.cpp
+++ b/src/mame/drivers/coco12.cpp
@@ -457,8 +457,8 @@ MACHINE_CONFIG_START(coco12_state::coco)
pia1.irqa_handler().set(FUNC(coco_state::pia1_firq_a));
pia1.irqb_handler().set(FUNC(coco_state::pia1_firq_b));
- MCFG_DEVICE_ADD(SAM_TAG, SAM6883, XTAL(14'318'181), MAINCPU_TAG)
- MCFG_SAM6883_RES_CALLBACK(READ8(*this, coco12_state, sam_read))
+ SAM6883(config, m_sam, XTAL(14'318'181), m_maincpu);
+ m_sam->res_rd_callback().set(FUNC(coco12_state::sam_read));
// Becker Port device
MCFG_DEVICE_ADD(DWSOCK_TAG, COCO_DWSOCK, 0)
@@ -482,7 +482,7 @@ MACHINE_CONFIG_START(coco12_state::coco)
MCFG_DEVICE_ADD(VDG_TAG, MC6847_NTSC, XTAL(14'318'181) / 4) // VClk output from MC6883
MCFG_MC6847_HSYNC_CALLBACK(WRITELINE(*this, coco12_state, horizontal_sync))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, coco12_state, field_sync))
- MCFG_MC6847_INPUT_CALLBACK(READ8(SAM_TAG, sam6883_device, display_read))
+ MCFG_MC6847_INPUT_CALLBACK(READ8(m_sam, sam6883_device, display_read))
// sound hardware
coco_sound(config);
@@ -550,7 +550,7 @@ MACHINE_CONFIG_START(coco12_state::coco2b)
MCFG_DEVICE_ADD(VDG_TAG, MC6847T1_NTSC, XTAL(14'318'181) / 4)
MCFG_MC6847_HSYNC_CALLBACK(WRITELINE(*this, coco12_state, horizontal_sync))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, coco12_state, field_sync))
- MCFG_MC6847_INPUT_CALLBACK(READ8(SAM_TAG, sam6883_device, display_read))
+ MCFG_MC6847_INPUT_CALLBACK(READ8(m_sam, sam6883_device, display_read))
MACHINE_CONFIG_END
MACHINE_CONFIG_START(coco12_state::coco2bh)
diff --git a/src/mame/drivers/dbz.cpp b/src/mame/drivers/dbz.cpp
index 65df6a3446a..b318a591adc 100644
--- a/src/mame/drivers/dbz.cpp
+++ b/src/mame/drivers/dbz.cpp
@@ -364,7 +364,7 @@ MACHINE_CONFIG_START(dbz_state::dbz)
m_k053246->set_config("gfx2", NORMAL_PLANE_ORDER, -87, 32); // or -52, 16?
m_k053246->set_palette("palette");
- MCFG_K053251_ADD("k053251")
+ K053251(config, m_k053251, 0);
MCFG_DEVICE_ADD("k053936_1", K053936, 0)
MCFG_K053936_WRAP(1)
diff --git a/src/mame/drivers/deco32.cpp b/src/mame/drivers/deco32.cpp
index 0fef7f79446..a83a0583536 100644
--- a/src/mame/drivers/deco32.cpp
+++ b/src/mame/drivers/deco32.cpp
@@ -2123,8 +2123,8 @@ MACHINE_CONFIG_START(dragngun_state::dragngun)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DEVICE_ADD("spritegen_zoom", DECO_ZOOMSPR, 0)
- MCFG_DECO_ZOOMSPR_GFXDECODE("gfxdecode")
+ DECO_ZOOMSPR(config, m_sprgenzoom, 0);
+ m_sprgenzoom->set_gfxdecode(m_gfxdecode);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_dragngun)
MCFG_PALETTE_ADD("palette", 2048)
@@ -2256,8 +2256,8 @@ MACHINE_CONFIG_START(dragngun_state::lockload)
MCFG_DECO16IC_PF12_16X16_BANK(2)
MCFG_DECO16IC_GFXDECODE("gfxdecode")
- MCFG_DEVICE_ADD("spritegen_zoom", DECO_ZOOMSPR, 0)
- MCFG_DECO_ZOOMSPR_GFXDECODE("gfxdecode")
+ DECO_ZOOMSPR(config, m_sprgenzoom, 0);
+ m_sprgenzoom->set_gfxdecode(m_gfxdecode);
MCFG_DECO146_ADD("ioprot")
MCFG_DECO146_IN_PORTA_CB(IOPORT("INPUTS"))
@@ -2302,7 +2302,7 @@ MACHINE_CONFIG_START(nslasher_state::tattass)
MCFG_SCREEN_RAW_PARAMS(XTAL(28'000'000) / 4, 442, 0, 320, 274, 8, 248)
MCFG_SCREEN_UPDATE_DRIVER(nslasher_state, screen_update)
- MCFG_DECO_ACE_ADD("deco_ace")
+ DECO_ACE(config, m_deco_ace, 0);
MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2344,7 +2344,7 @@ MACHINE_CONFIG_START(nslasher_state::tattass)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "deco_ace", gfx_tattass)
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_deco_ace, gfx_tattass)
DECO104PROT(config, m_ioprot, 0);
m_ioprot->port_a_cb().set_ioport("IN0");
@@ -2379,7 +2379,7 @@ MACHINE_CONFIG_START(nslasher_state::nslasher)
MCFG_SCREEN_RAW_PARAMS(XTAL(28'322'000) / 4, 442, 0, 320, 274, 8, 248)
MCFG_SCREEN_UPDATE_DRIVER(nslasher_state, screen_update)
- MCFG_DECO_ACE_ADD("deco_ace")
+ DECO_ACE(config, m_deco_ace, 0);
MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -2421,7 +2421,7 @@ MACHINE_CONFIG_START(nslasher_state::nslasher)
MCFG_DECO_SPRITE_GFX_REGION(4)
MCFG_DECO_SPRITE_GFXDECODE("gfxdecode")
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "deco_ace", gfx_nslasher)
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_deco_ace, gfx_nslasher)
DECO104PROT(config, m_ioprot, 0);
m_ioprot->port_a_cb().set_ioport("IN0");
diff --git a/src/mame/drivers/decstation.cpp b/src/mame/drivers/decstation.cpp
index 4ec74fce645..1a64c5735d6 100644
--- a/src/mame/drivers/decstation.cpp
+++ b/src/mame/drivers/decstation.cpp
@@ -393,10 +393,10 @@ MACHINE_CONFIG_START(decstation_state::kn02ba)
SCC85C30(config, m_scc1, XTAL(14'745'600)/2);
m_scc1->out_int_callback().set("ioga", FUNC(dec_ioga_device::scc1_irq_w));
- m_scc1->out_txdb_callback().set("lk201", FUNC(lk201_device::rx_w));
+ m_scc1->out_txdb_callback().set(m_lk201, FUNC(lk201_device::rx_w));
- MCFG_DEVICE_ADD("lk201", LK201, 0)
- MCFG_LK201_TX_HANDLER(WRITELINE("scc1", z80scc_device, rxb_w))
+ LK201(config, m_lk201, 0);
+ m_lk201->tx_handler().set(m_scc1, FUNC(z80scc_device::rxb_w));
rs232_port_device &rs232a(RS232_PORT(config, "rs232a", default_rs232_devices, nullptr));
rs232a.rxd_handler().set(m_scc0, FUNC(z80scc_device::rxa_w));
diff --git a/src/mame/drivers/dragon.cpp b/src/mame/drivers/dragon.cpp
index 7a803f3f810..0a76935956b 100644
--- a/src/mame/drivers/dragon.cpp
+++ b/src/mame/drivers/dragon.cpp
@@ -214,8 +214,8 @@ MACHINE_CONFIG_START(dragon_state::dragon_base)
pia1.irqa_handler().set(FUNC(coco_state::pia1_firq_a));
pia1.irqb_handler().set(FUNC(coco_state::pia1_firq_b));
- MCFG_DEVICE_ADD(SAM_TAG, SAM6883, 14.218_MHz_XTAL, MAINCPU_TAG)
- MCFG_SAM6883_RES_CALLBACK(READ8(*this, dragon_state, sam_read))
+ SAM6883(config, m_sam, 14.218_MHz_XTAL, m_maincpu);
+ m_sam->res_rd_callback().set(FUNC(dragon_state::sam_read));
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_FORMATS(coco_cassette_formats)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
@@ -229,7 +229,7 @@ MACHINE_CONFIG_START(dragon_state::dragon_base)
MCFG_DEVICE_ADD(VDG_TAG, MC6847_PAL, 4.433619_MHz_XTAL)
MCFG_MC6847_HSYNC_CALLBACK(WRITELINE(*this, dragon_state, horizontal_sync))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, dragon_state, field_sync))
- MCFG_MC6847_INPUT_CALLBACK(READ8(SAM_TAG, sam6883_device, display_read))
+ MCFG_MC6847_INPUT_CALLBACK(READ8(m_sam, sam6883_device, display_read))
// sound hardware
coco_sound(config);
diff --git a/src/mame/drivers/dvk_kcgd.cpp b/src/mame/drivers/dvk_kcgd.cpp
index cd0a2b7ca5d..feec8e6adac 100644
--- a/src/mame/drivers/dvk_kcgd.cpp
+++ b/src/mame/drivers/dvk_kcgd.cpp
@@ -366,8 +366,8 @@ MACHINE_CONFIG_START(kcgd_state::kcgd)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_kcgd)
#if 0
- MCFG_DEVICE_ADD("ms7004", MS7004, 0)
- MCFG_MS7004_TX_HANDLER(WRITELINE("i8251kbd", i8251_device, write_rxd))
+ MS7004(config, m_ms7004, 0);
+ m_ms7004->tx_handler().set("i8251kbd", FUNC(i8251_device::write_rxd));
MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4800*16)
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, kcgd_state, write_keyboard_clock))
diff --git a/src/mame/drivers/dvk_ksm.cpp b/src/mame/drivers/dvk_ksm.cpp
index 762b9662565..4392ee8faad 100644
--- a/src/mame/drivers/dvk_ksm.cpp
+++ b/src/mame/drivers/dvk_ksm.cpp
@@ -461,8 +461,8 @@ MACHINE_CONFIG_START(ksm_state::ksm)
m_i8251kbd->rts_handler().set(FUNC(ksm_state::write_brga));
m_i8251kbd->dtr_handler().set(FUNC(ksm_state::write_brgb));
- MCFG_DEVICE_ADD("ms7004", MS7004, 0)
- MCFG_MS7004_TX_HANDLER(WRITELINE("i8251kbd", i8251_device, write_rxd))
+ MS7004(config, m_ms7004, 0);
+ m_ms7004->tx_handler().set(m_i8251kbd, FUNC(i8251_device::write_rxd));
// baud rate is supposed to be 4800 but keyboard is slightly faster
MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4960*16)
diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp
index f1cced2c40b..7399de30841 100644
--- a/src/mame/drivers/fmtowns.cpp
+++ b/src/mame/drivers/fmtowns.cpp
@@ -2303,7 +2303,7 @@ void towns_state::towns_io(address_map &map)
// RS-232C interface
map(0x0a00, 0x0a0b).rw(FUNC(towns_state::towns_serial_r), FUNC(towns_state::towns_serial_w)).umask32(0x00ff00ff);
// SCSI controller
- map(0x0c30, 0x0c37).rw("fmscsi", FUNC(fmscsi_device::fmscsi_r), FUNC(fmscsi_device::fmscsi_w)).umask32(0x00ff00ff);
+ map(0x0c30, 0x0c37).rw(m_scsi, FUNC(fmscsi_device::fmscsi_r), FUNC(fmscsi_device::fmscsi_w)).umask32(0x00ff00ff);
// CMOS
map(0x3000, 0x4fff).rw(FUNC(towns_state::towns_cmos_r), FUNC(towns_state::towns_cmos_w)).umask32(0x00ff00ff);
// Something (MS-DOS wants this 0x41ff to be 1)
@@ -2362,7 +2362,7 @@ void towns_state::towns16_io(address_map &map)
// RS-232C interface
map(0x0a00, 0x0a0b).rw(FUNC(towns_state::towns_serial_r), FUNC(towns_state::towns_serial_w)).umask16(0x00ff);
// SCSI controller
- map(0x0c30, 0x0c37).rw("fmscsi", FUNC(fmscsi_device::fmscsi_r), FUNC(fmscsi_device::fmscsi_w)).umask16(0x00ff);
+ map(0x0c30, 0x0c37).rw(m_scsi, FUNC(fmscsi_device::fmscsi_r), FUNC(fmscsi_device::fmscsi_w)).umask16(0x00ff);
// CMOS
map(0x3000, 0x4fff).rw(FUNC(towns_state::towns_cmos_r), FUNC(towns_state::towns_cmos_w)).umask16(0x00ff);
// Something (MS-DOS wants this 0x41ff to be 1)
@@ -2832,10 +2832,10 @@ MACHINE_CONFIG_START(towns_state::towns_base)
MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE4, "harddisk", SCSIHD, SCSI_ID_3)
MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE5, "harddisk", SCSIHD, SCSI_ID_4)
- MCFG_FMSCSI_ADD("fmscsi")
- MCFG_LEGACY_SCSI_PORT("scsi")
- MCFG_FMSCSI_IRQ_HANDLER(WRITELINE(*this, towns_state, towns_scsi_irq))
- MCFG_FMSCSI_DRQ_HANDLER(WRITELINE(*this, towns_state, towns_scsi_drq))
+ FMSCSI(config, m_scsi, 0);
+ m_scsi->set_scsi_port("scsi");
+ m_scsi->irq_handler().set(FUNC(towns_state::towns_scsi_irq));
+ m_scsi->drq_handler().set(FUNC(towns_state::towns_scsi_drq));
UPD71071(config, m_dma[0], 0);
m_dma[0]->set_cpu_tag("maincpu");
diff --git a/src/mame/drivers/gauntlet.cpp b/src/mame/drivers/gauntlet.cpp
index 07499f60bbf..c7cb2bdef87 100644
--- a/src/mame/drivers/gauntlet.cpp
+++ b/src/mame/drivers/gauntlet.cpp
@@ -549,30 +549,32 @@ MACHINE_CONFIG_START(gauntlet_state::gauntlet_base)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(gauntlet_state::gauntlet)
+void gauntlet_state::gauntlet(machine_config & config)
+{
gauntlet_base(config);
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 104, true)
-MACHINE_CONFIG_END
+ SLAPSTIC(config, m_slapstic_device, 104, true);
+}
-MACHINE_CONFIG_START(gauntlet_state::gaunt2p)
+void gauntlet_state::gaunt2p(machine_config & config)
+{
gauntlet_base(config);
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 107, true)
-MACHINE_CONFIG_END
+ SLAPSTIC(config, m_slapstic_device, 107, true);
+}
-MACHINE_CONFIG_START(gauntlet_state::gauntlet2)
+void gauntlet_state::gauntlet2(machine_config & config)
+{
gauntlet_base(config);
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 106, true)
-MACHINE_CONFIG_END
+ SLAPSTIC(config, m_slapstic_device, 106, true);
+}
-MACHINE_CONFIG_START(gauntlet_state::vindctr2)
+void gauntlet_state::vindctr2(machine_config & config)
+{
gauntlet_base(config);
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 118, true)
-MACHINE_CONFIG_END
-
-
+ SLAPSTIC(config, m_slapstic_device, 118, true);
+}
/*************************************
diff --git a/src/mame/drivers/gijoe.cpp b/src/mame/drivers/gijoe.cpp
index d0109f6e38b..9355d688ef6 100644
--- a/src/mame/drivers/gijoe.cpp
+++ b/src/mame/drivers/gijoe.cpp
@@ -327,7 +327,7 @@ MACHINE_CONFIG_START(gijoe_state::gijoe)
m_k053246->set_config("gfx2", NORMAL_PLANE_ORDER, -37, 20);
m_k053246->set_palette(m_palette);
- MCFG_K053251_ADD("k053251")
+ K053251(config, m_k053251, 0);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp
index f4f866cb8b3..ba205a2d536 100644
--- a/src/mame/drivers/harddriv.cpp
+++ b/src/mame/drivers/harddriv.cpp
@@ -1461,7 +1461,7 @@ MACHINE_CONFIG_START(harddriv_state::driver_nomsp)
MCFG_DEVICE_PROGRAM_MAP(driver_68k_map)
MCFG_DEVICE_PERIODIC_INT_DRIVER(harddriv_state, hd68k_irq_gen, HARDDRIV_MASTER_CLOCK/16/16/16/16/2)
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 117, true)
+ SLAPSTIC(config, m_slapstic_device, 117, true);
WATCHDOG_TIMER(config, "watchdog");
@@ -2085,8 +2085,7 @@ MACHINE_CONFIG_START(harddriv_new_state::racedriv_panorama_machine)
MCFG_MC68681_A_TX_CALLBACK(WRITELINE(*this, harddriv_new_state, tx_a))
// boots with 'PROGRAM OK' when using standard Hard Drivin' board type (needs 137412-115 slapstic)
- MCFG_DEVICE_MODIFY("mainpcb:slapstic")
- MCFG_SLAPSTIC_NUM(115)
+ subdevice<atari_slapstic_device>("mainpcb:slapstic")->set_chipnum(115);
MCFG_TIMER_DRIVER_ADD_PERIODIC("hack_timer", harddriv_new_state, hack_timer, attotime::from_hz(60))
// MCFG_QUANTUM_TIME(attotime::from_hz(60000))
diff --git a/src/mame/drivers/kc.cpp b/src/mame/drivers/kc.cpp
index f438a29259d..77e47af8938 100644
--- a/src/mame/drivers/kc.cpp
+++ b/src/mame/drivers/kc.cpp
@@ -130,8 +130,8 @@ MACHINE_CONFIG_START(kc_state::kc85_3)
MCFG_PALETTE_ADD("palette", KC85_PALETTE_SIZE)
MCFG_PALETTE_INIT_OWNER(kc_state, kc85 )
- MCFG_DEVICE_ADD("keyboard", KC_KEYBOARD, XTAL(4'000'000))
- MCFG_KC_KEYBOARD_OUT_CALLBACK(WRITELINE(*this, kc_state, keyboard_cb))
+ kc_keyboard_device &keyboard(KC_KEYBOARD(config, "keyboard", XTAL(4'000'000)));
+ keyboard.out_wr_callback().set(FUNC(kc_state::keyboard_cb));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -211,8 +211,8 @@ MACHINE_CONFIG_START(kc85_4_state::kc85_4)
MCFG_PALETTE_ADD("palette", KC85_PALETTE_SIZE)
MCFG_PALETTE_INIT_OWNER(kc85_4_state, kc85 )
- MCFG_DEVICE_ADD("keyboard", KC_KEYBOARD, XTAL(4'000'000))
- MCFG_KC_KEYBOARD_OUT_CALLBACK(WRITELINE(*this, kc_state, keyboard_cb))
+ kc_keyboard_device &keyboard(KC_KEYBOARD(config, "keyboard", XTAL(4'000'000)));
+ keyboard.out_wr_callback().set(FUNC(kc_state::keyboard_cb));
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp
index f033f6ff45f..e5ef2bf3779 100644
--- a/src/mame/drivers/ksys573.cpp
+++ b/src/mame/drivers/ksys573.cpp
@@ -2147,17 +2147,19 @@ MACHINE_CONFIG_START(ksys573_state::konami573)
MACHINE_CONFIG_END
// Variants with additional digital sound board
-MACHINE_CONFIG_START(ksys573_state::k573d)
+void ksys573_state::k573d(machine_config &config)
+{
konami573(config);
m_maincpu->set_addrmap(AS_PROGRAM, &ksys573_state::konami573d_map);
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_ADD( "k573dio", XTAL(19'660'800) )
-MACHINE_CONFIG_END
+ KONAMI_573_DIGITAL_IO_BOARD(config, "k573dio", XTAL(19'660'800));
+}
// Variants with additional analogue i/o board
-MACHINE_CONFIG_START(ksys573_state::k573a)
+void ksys573_state::k573a(machine_config &config)
+{
konami573(config);
m_maincpu->set_addrmap(AS_PROGRAM, &ksys573_state::konami573a_map);
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(ksys573_state::pccard1_16mb)
MCFG_DEVICE_MODIFY( "pccard1" )
@@ -2254,40 +2256,40 @@ MACHINE_CONFIG_START(ksys573_state::ddr2ml)
cassx(config);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(ksys573_state::ddr3m)
+void ksys573_state::ddr3m(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, ddr_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::ddr_output_callback));
pccard2_32mb(config);
cassyyi(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ksys573_state::ddr3mp)
+void ksys573_state::ddr3mp(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, ddr_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::ddr_output_callback));
pccard2_32mb(config);
cassxzi(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ksys573_state::ddrusa)
+void ksys573_state::ddrusa(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, ddr_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::ddr_output_callback));
casszi(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ksys573_state::ddr5m)
+void ksys573_state::ddr5m(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, ddr_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::ddr_output_callback));
pccard2_32mb(config);
casszi(config);
-MACHINE_CONFIG_END
+}
// Dancing Stage
@@ -2304,48 +2306,48 @@ void ksys573_state::dsftkd(machine_config &config)
cassyi(config);
}
-MACHINE_CONFIG_START(ksys573_state::dsfdr)
+void ksys573_state::dsfdr(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, ddr_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::ddr_output_callback));
cassxzi(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ksys573_state::dsem)
+void ksys573_state::dsem(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, ddr_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::ddr_output_callback));
cassxi(config);
-MACHINE_CONFIG_END
+}
// Dance Dance Revolution Solo
-MACHINE_CONFIG_START(ksys573_state::ddrsolo)
+void ksys573_state::ddrsolo(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, ddrsolo_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::ddrsolo_output_callback));
cassyi(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ksys573_state::ddrs2k)
+void ksys573_state::ddrs2k(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, ddrsolo_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::ddrsolo_output_callback));
cassyyi(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ksys573_state::ddr4ms)
+void ksys573_state::ddr4ms(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, ddrsolo_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::ddrsolo_output_callback));
pccard2_32mb(config);
cassxzi(config);
-MACHINE_CONFIG_END
+}
// DrumMania
@@ -2355,18 +2357,17 @@ void ksys573_state::drmn(machine_config &config)
cassx(config);
}
-MACHINE_CONFIG_START(ksys573_state::drmn2m)
+void ksys573_state::drmn2m(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, drmn_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::drmn_output_callback));
cassxzi(config);
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(ksys573_state::drmn4m)
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, drmn_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::drmn_output_callback));
casszi(config);
@@ -2490,21 +2491,21 @@ void ksys573_state::gunmania(machine_config &config)
pccard2_32mb(config);
}
-MACHINE_CONFIG_START(ksys573_state::dmx)
+void ksys573_state::dmx(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, dmx_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::dmx_output_callback));
casszi(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ksys573_state::mamboagg)
+void ksys573_state::mamboagg(machine_config &config)
+{
k573d(config);
- MCFG_DEVICE_MODIFY( "k573dio" )
- MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( WRITE8( *this, ksys573_state, mamboagg_output_callback ) )
+ subdevice<k573dio_device>("k573dio")->output_callback().set(FUNC(ksys573_state::mamboagg_output_callback));
casszi(config);
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(ksys573_state::mamboagga)
mamboagg(config);
diff --git a/src/mame/drivers/lethal.cpp b/src/mame/drivers/lethal.cpp
index a9d7c091a71..f8b0a4f7652 100644
--- a/src/mame/drivers/lethal.cpp
+++ b/src/mame/drivers/lethal.cpp
@@ -527,7 +527,7 @@ MACHINE_CONFIG_START(lethal_state::lethalen)
m_k053244->set_offsets(95, 0);
m_k053244->set_sprite_callback(FUNC(lethal_state::sprite_callback), this);
- MCFG_K054000_ADD("k054000")
+ K054000(config, "k054000", 0);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
diff --git a/src/mame/drivers/littlerb.cpp b/src/mame/drivers/littlerb.cpp
index c1c426b824f..4573075593e 100644
--- a/src/mame/drivers/littlerb.cpp
+++ b/src/mame/drivers/littlerb.cpp
@@ -291,7 +291,7 @@ MACHINE_CONFIG_START(littlerb_state::littlerb)
MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)/2) // 10MHz rated part, near 16Mhz XTAL
MCFG_DEVICE_PROGRAM_MAP(littlerb_main)
- MCFG_INDER_VIDEO_ADD("inder_vid") // XTAL(40'000'000)
+ INDER_VIDEO(config, m_indervid, 0); // XTAL(40'000'000)
// TODO: not accurate - driven by XTAL(6'000'000)?
MCFG_TIMER_DRIVER_ADD_PERIODIC("step_timer", littlerb_state, littlerb_sound_step_cb, attotime::from_hz(7500/150))
diff --git a/src/mame/drivers/llc.cpp b/src/mame/drivers/llc.cpp
index 516eb7f7d3a..f203f4eb088 100644
--- a/src/mame/drivers/llc.cpp
+++ b/src/mame/drivers/llc.cpp
@@ -280,7 +280,7 @@ MACHINE_CONFIG_START(llc_state::llc2)
MCFG_DEVICE_ADD("z80ctc", Z80CTC, XTAL(3'000'000))
- MCFG_K7659_KEYBOARD_ADD()
+ K7659_KEYBOARD(config, K7659_KEYBOARD_TAG, 0);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K");
diff --git a/src/mame/drivers/m24.cpp b/src/mame/drivers/m24.cpp
index b1551dcb131..5b298ede92f 100644
--- a/src/mame/drivers/m24.cpp
+++ b/src/mame/drivers/m24.cpp
@@ -283,15 +283,16 @@ MACHINE_CONFIG_START(m24_state::olivetti)
MCFG_TMS7000_IN_PORTA_CB(READ8(*this, m24_state, pa_r))
MCFG_TMS7000_OUT_PORTB_CB(WRITE8(*this, m24_state, pb_w))
- MCFG_DEVICE_ADD("keyboard", M24_KEYBOARD, 0)
- MCFG_M24_KEYBOARD_OUT_DATA_HANDLER(WRITELINE(*this, m24_state, kbcin_w))
+ M24_KEYBOARD(config, m_keyboard, 0);
+ m_keyboard->out_data_handler().set(FUNC(m24_state::kbcin_w));
MCFG_DEVICE_ADD("mm58174an", MM58274C, 0)
MCFG_MM58274C_MODE24(1) // ?
MCFG_MM58274C_DAY1(1) // ?
- MCFG_DEVICE_ADD("z8000_apb", M24_Z8000, 0)
- MCFG_M24_Z8000_HALT(WRITELINE(*this, m24_state, halt_i86_w))
+ M24_Z8000(config, m_z8000_apb, 0);
+ m_z8000_apb->halt_callback().set(FUNC(m24_state::halt_i86_w));
+
subdevice<am9517a_device>("mb:dma8237")->out_hreq_callback().set(FUNC(m24_state::dma_hrq_w));
subdevice<pic8259_device>("mb:pic8259")->out_int_callback().set(FUNC(m24_state::int_w));
diff --git a/src/mame/drivers/megaphx.cpp b/src/mame/drivers/megaphx.cpp
index 13778f88fc0..48987219692 100644
--- a/src/mame/drivers/megaphx.cpp
+++ b/src/mame/drivers/megaphx.cpp
@@ -402,9 +402,9 @@ MACHINE_CONFIG_START(megaphx_state::megaphx)
m_ppi->in_pc_callback().set(FUNC(megaphx_state::ppi_portc_r));
m_ppi->out_pc_callback().set(FUNC(megaphx_state::ppi_portc_w));
- MCFG_INDER_VIDEO_ADD("inder_vid")
+ INDER_VIDEO(config, m_indervid, 0);
- MCFG_INDER_AUDIO_ADD("inder_sb")
+ INDER_AUDIO(config, "inder_sb", 0);
MACHINE_CONFIG_END
void megaphx_state::init_megaphx()
diff --git a/src/mame/drivers/mhavoc.cpp b/src/mame/drivers/mhavoc.cpp
index 3d74e3f4f44..9a84a3de54f 100644
--- a/src/mame/drivers/mhavoc.cpp
+++ b/src/mame/drivers/mhavoc.cpp
@@ -539,8 +539,8 @@ MACHINE_CONFIG_START(mhavoc_state::mhavoc)
MCFG_SCREEN_VISIBLE_AREA(0, 300, 0, 260)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_ADD("avg", AVG_MHAVOC, 0)
- MCFG_AVGDVG_VECTOR("vector")
+ avg_device &avg(AVG_MHAVOC(config, "avg", 0));
+ avg.set_vector_tag("vector");
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/mikromik.cpp b/src/mame/drivers/mikromik.cpp
index 84dfd1e26b7..3598457087c 100644
--- a/src/mame/drivers/mikromik.cpp
+++ b/src/mame/drivers/mikromik.cpp
@@ -511,8 +511,8 @@ MACHINE_CONFIG_START(mm1_state::mm1)
RS232_PORT(config, m_rs232c, default_rs232_devices, nullptr);
m_rs232c->cts_handler().set(m_mpsc, FUNC(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))
+ mm1_keyboard_device &kb(MM1_KEYBOARD(config, KB_TAG, 2500)); // actual KBCLK is 6.144_MHz_XTAL/2/16
+ kb.kbst_wr_callback().set(m_iop, FUNC(i8212_device::stb_w));
// internal ram
RAM(config, RAM_TAG).set_default_size("64K");
diff --git a/src/mame/drivers/moo.cpp b/src/mame/drivers/moo.cpp
index f5544fb86e0..ac4e594c533 100644
--- a/src/mame/drivers/moo.cpp
+++ b/src/mame/drivers/moo.cpp
@@ -612,7 +612,7 @@ MACHINE_CONFIG_START(moo_state::bucky)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(bucky_map)
- MCFG_K054000_ADD("k054000")
+ K054000(config, "k054000", 0);
m_k053246->set_config("gfx2", NORMAL_PLANE_ORDER, -48, 23);
diff --git a/src/mame/drivers/ms0515.cpp b/src/mame/drivers/ms0515.cpp
index 6fb9ae6f081..d8122586284 100644
--- a/src/mame/drivers/ms0515.cpp
+++ b/src/mame/drivers/ms0515.cpp
@@ -569,9 +569,9 @@ MACHINE_CONFIG_START(ms0515_state::ms0515)
m_i8251kbd->rxrdy_handler().set(FUNC(ms0515_state::irq5_w));
m_i8251kbd->txd_handler().set("ms7004", FUNC(ms7004_device::write_rxd));
- MCFG_DEVICE_ADD("ms7004", MS7004, 0)
- MCFG_MS7004_TX_HANDLER(WRITELINE(m_i8251kbd, i8251_device, write_rxd))
- MCFG_MS7004_RTS_HANDLER(WRITELINE(m_i8251kbd, i8251_device, write_cts))
+ MS7004(config, m_ms7004, 0);
+ m_ms7004->tx_handler().set(m_i8251kbd, FUNC(i8251_device::write_rxd));
+ m_ms7004->rts_handler().set(m_i8251kbd, FUNC(i8251_device::write_cts));
// baud rate is supposed to be 4800 but keyboard is slightly faster
MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4960*16)
diff --git a/src/mame/drivers/msx.cpp b/src/mame/drivers/msx.cpp
index 5d1b63fbd0c..60faf3c68d9 100644
--- a/src/mame/drivers/msx.cpp
+++ b/src/mame/drivers/msx.cpp
@@ -3288,7 +3288,7 @@ MACHINE_CONFIG_START(msx_state::hb10)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0)
MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 3, 1) /* 16KB? RAM */
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx1_cartlist(config);
MACHINE_CONFIG_END
@@ -4624,7 +4624,7 @@ MACHINE_CONFIG_START(msx2_state::canonv25)
MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) // EXT
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) // 64KB Mapper RAM
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_64kb_vram(config);
@@ -4654,7 +4654,7 @@ MACHINE_CONFIG_START(msx2_state::canonv30)
MCFG_MSX_LAYOUT_DISK1("disk", 3, 1, 1, 1, "maincpu", 0xc000) // DISK
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) // 64KB?? Mapper RAM
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793(config);
msx_2_35_dd_drive(config);
@@ -4686,7 +4686,7 @@ MACHINE_CONFIG_START(msx2_state::canonv30f)
MCFG_MSX_LAYOUT_DISK1("disk", 3, 1, 1, 1, "maincpu", 0xc000) // DISK
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) // 128KB Mapper RAM
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793(config);
msx_2_35_dd_drive(config);
@@ -4719,7 +4719,7 @@ MACHINE_CONFIG_START(msx2_state::cpc300)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -4778,7 +4778,7 @@ MACHINE_CONFIG_START(msx2_state::cpc330k)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -4847,7 +4847,7 @@ MACHINE_CONFIG_START(msx2_state::cpc400s)
MCFG_MSX_LAYOUT_DISK2("disk", 2, 0, 1, 1, "maincpu", 0x8000)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_mb8877a(config);
msx_1_35_dd_drive(config);
@@ -4883,7 +4883,7 @@ MACHINE_CONFIG_START(msx2_state::cpc61)
MCFG_MSX_LAYOUT_ROM("ext", 0, 3, 0, 2, "maincpu", 0x8000)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -4919,7 +4919,7 @@ MACHINE_CONFIG_START(msx2_state::cpg120)
MCFG_MSX_LAYOUT_MUSIC("mus", 2, 0, 1, 1, "maincpu", 0x10000)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_ym2413(config);
@@ -5020,7 +5020,7 @@ MACHINE_CONFIG_START(msx2_state::mbh70)
MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) // 128KB Mapper RAM
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793(config);
msx_1_35_dd_drive(config);
@@ -5057,7 +5057,7 @@ MACHINE_CONFIG_START(msx2_state::kmc5000)
MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x10000)
MCFG_MSX_LAYOUT_DISK3("disk", 3, 2, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_tc8566af(config);
msx_1_35_dd_drive(config);
@@ -5089,7 +5089,7 @@ MACHINE_CONFIG_START(msx2_state::mlg1)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) // 64KB or 128KB Mapper RAM ?
MCFG_MSX_LAYOUT_ROM("paint", 3, 3, 0, 2, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -5119,7 +5119,7 @@ MACHINE_CONFIG_START(msx2_state::mlg3)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) // 64KB or 128KB Mapper RAM?
//MCFG_MSX_LAYOUT_ROM("rs232c", 3, 3, 1, 1, "maincpu", 0x10000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793(config);
msx_1_35_dd_drive(config);
@@ -5152,7 +5152,7 @@ MACHINE_CONFIG_START(msx2_state::mlg10)
MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) // 64KB or 128KB Mapper RAM?
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -5232,9 +5232,9 @@ MACHINE_CONFIG_START(msx2_state::fs4500)
MCFG_MSX_LAYOUT_ROM("kdr2", 3, 1, 3, 1, "maincpu", 0x3c000)
MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
- MCFG_MSX_MATSUSHITA_ADD( "matsushita" )
+ MSX_MATSUSHITA(config, "matsushita", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -5278,7 +5278,7 @@ MACHINE_CONFIG_START(msx2_state::fs4600)
MCFG_MSX_RAMIO_SET_BITS(0x80)
MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_mb8877a(config);
msx_1_35_dd_drive(config);
@@ -5332,9 +5332,9 @@ MACHINE_CONFIG_START(msx2_state::fs4700)
MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */
MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
- MCFG_MSX_MATSUSHITA_ADD( "matsushita" )
+ MSX_MATSUSHITA(config, "matsushita", 0);
msx_mb8877a(config);
msx_1_35_dd_drive(config);
@@ -5378,7 +5378,7 @@ MACHINE_CONFIG_START(msx2_state::fs5000)
MCFG_MSX_RAMIO_SET_BITS(0x80)
MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793_force_ready(config);
msx_2_35_dd_drive(config);
@@ -5425,9 +5425,9 @@ MACHINE_CONFIG_START(msx2_state::fs5500f1)
MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */
MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
- MCFG_MSX_MATSUSHITA_ADD( "matsushita" )
+ MSX_MATSUSHITA(config, "matsushita", 0);
msx_mb8877a(config);
msx_1_35_dd_drive(config);
@@ -5474,9 +5474,9 @@ MACHINE_CONFIG_START(msx2_state::fs5500f2)
MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */
MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
- MCFG_MSX_MATSUSHITA_ADD( "matsushita" )
+ MSX_MATSUSHITA(config, "matsushita", 0);
msx_mb8877a(config);
msx_2_35_dd_drive(config);
@@ -6337,7 +6337,7 @@ MACHINE_CONFIG_START(msx2_state::phc23)
MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000)
MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -6365,7 +6365,7 @@ MACHINE_CONFIG_START(msx2_state::phc55fd2)
MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000)
MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793_force_ready(config);
msx_2_35_dd_drive(config);
@@ -6403,7 +6403,7 @@ MACHINE_CONFIG_START(msx2_state::phc77)
MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000)
MCFG_MSX_LAYOUT_ROM("write", 3, 3, 1, 2, "maincpu", 0x10000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793_force_ready(config);
msx_1_35_dd_drive(config);
@@ -6527,7 +6527,7 @@ MACHINE_CONFIG_START(msx2_state::hbf1xd)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x10000) /* 64KB Mapper RAM */
MCFG_MSX_RAMIO_SET_BITS(0x80)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793(config);
msx_1_35_dd_drive(config);
@@ -6708,7 +6708,7 @@ MACHINE_CONFIG_START(msx2_state::hbf700d)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x40000) /* 256KB Mapper RAM */
MCFG_MSX_RAMIO_SET_BITS(0x80)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793(config);
msx_1_35_dd_drive(config);
@@ -6769,7 +6769,7 @@ MACHINE_CONFIG_START(msx2_state::hbf700p)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x40000) /* 256KB Mapper RAM */
MCFG_MSX_RAMIO_SET_BITS(0x80)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793_force_ready(config);
msx_1_35_dd_drive(config);
@@ -6901,7 +6901,7 @@ MACHINE_CONFIG_START(msx2_state::hbf9p)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */
MCFG_MSX_RAMIO_SET_BITS(0x80)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -6927,7 +6927,7 @@ MACHINE_CONFIG_START(msx2_state::hbf9pr)
MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -6956,7 +6956,7 @@ MACHINE_CONFIG_START(msx2_state::hbf9s)
MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */
MCFG_MSX_RAMIO_SET_BITS(0x80)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -7061,7 +7061,7 @@ MACHINE_CONFIG_START(msx2_state::tpc310)
MCFG_MSX_LAYOUT_ROM("acc", 3, 1, 1, 2, "maincpu", 0x14000)
MCFG_MSX_LAYOUT_DISK2("disk", 3, 2, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_mb8877a(config);
msx_1_35_dd_drive(config);
@@ -7203,7 +7203,7 @@ MACHINE_CONFIG_START(msx2_state::hx23i)
MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000)
MCFG_MSX_LAYOUT_ROM("word", 3, 3, 1, 2, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -7235,7 +7235,7 @@ MACHINE_CONFIG_START(msx2_state::hx33)
MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000)
MCFG_MSX_LAYOUT_ROM("firm", 3, 2, 1, 2, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_64kb_vram(config);
@@ -7272,7 +7272,7 @@ MACHINE_CONFIG_START(msx2_state::hx34)
MCFG_MSX_LAYOUT_DISK6("disk", 3, 2, 1, 1, "maincpu", 0xc000)
MCFG_MSX_LAYOUT_ROM("firm", 3, 3, 1, 2, "maincpu", 0x10000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793(config);
msx_1_35_dd_drive(config);
@@ -7308,7 +7308,7 @@ MACHINE_CONFIG_START(msx2_state::hx34i)
MCFG_MSX_LAYOUT_DISK6("disk", 3, 2, 1, 1, "maincpu", 0xc000)
MCFG_MSX_LAYOUT_ROM("firm", 3, 3, 1, 2, "maincpu", 0x10000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793(config);
msx_1_35_dd_drive(config);
@@ -7342,7 +7342,7 @@ MACHINE_CONFIG_START(msx2_state::fstm1)
MCFG_MSX_LAYOUT_ROM("desk1", 3, 2, 1, 2, "maincpu", 0xc000)
MCFG_MSX_LAYOUT_ROM("desk2", 3, 3, 1, 2, "maincpu", 0x14000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx2_cartlist(config);
MACHINE_CONFIG_END
@@ -7376,7 +7376,7 @@ MACHINE_CONFIG_START(msx2_state::victhc90)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot", 1, 0)
MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793_force_ready(config);
msx_1_35_dd_drive(config);
@@ -7414,7 +7414,7 @@ MACHINE_CONFIG_START(msx2_state::victhc95)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot", 1, 0)
MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793_force_ready(config);
msx_2_35_dd_drive(config);
@@ -7453,7 +7453,7 @@ MACHINE_CONFIG_START(msx2_state::victhc95a)
MCFG_MSX_LAYOUT_CARTRIDGE("cartslot", 1, 0)
MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_wd2793_force_ready(config);
msx_2_35_dd_drive(config);
@@ -7950,8 +7950,8 @@ MACHINE_CONFIG_START(msx2_state::fsa1fx)
MCFG_MSX_LAYOUT_DISK3("disk", 3, 2, 1, 1, "maincpu", 0xc000)
MCFG_MSX_LAYOUT_ROM("cock", 3, 3, 1, 2, "maincpu", 0x18000)
- MCFG_MSX_MATSUSHITA_ADD( "matsushita" )
- MCFG_MSX_MATSUSHITA_TURBO_CB(WRITELINE(*this, msx2_state, turbo_w))
+ msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0));
+ matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w));
MCFG_MSX_SYSTEMFLAGS_ADD("sysflags", 0xff)
@@ -7996,8 +7996,8 @@ MACHINE_CONFIG_START(msx2_state::fsa1wsx)
MCFG_MSX_LAYOUT_DISK3("disk", 3, 2, 1, 1, "maincpu", 0xc000)
MCFG_MSX_LAYOUT_PANASONIC08("firm", 3, 3, 0, 4, "maincpu", 0x1c000)
- MCFG_MSX_MATSUSHITA_ADD( "matsushita" )
- MCFG_MSX_MATSUSHITA_TURBO_CB(WRITELINE(*this, msx2_state, turbo_w))
+ msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0));
+ matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w));
MCFG_MSX_SYSTEMFLAGS_ADD("sysflags", 0xff)
@@ -8044,8 +8044,8 @@ MACHINE_CONFIG_START(msx2_state::fsa1wx)
MCFG_MSX_LAYOUT_DISK3("disk", 3, 2, 1, 1, "maincpu", 0xc000)
MCFG_MSX_LAYOUT_PANASONIC08("firm", 3, 3, 0, 4, "maincpu", 0x1c000)
- MCFG_MSX_MATSUSHITA_ADD( "matsushita" )
- MCFG_MSX_MATSUSHITA_TURBO_CB(WRITELINE(*this, msx2_state, turbo_w))
+ msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0));
+ matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w));
MCFG_MSX_SYSTEMFLAGS_ADD("sysflags", 0xff)
@@ -8090,8 +8090,8 @@ MACHINE_CONFIG_START(msx2_state::fsa1wxa)
MCFG_MSX_LAYOUT_DISK3("disk", 3, 2, 1, 1, "maincpu", 0xc000)
MCFG_MSX_LAYOUT_PANASONIC08("firm", 3, 3, 0, 4, "maincpu", 0x1c000)
- MCFG_MSX_MATSUSHITA_ADD( "matsushita" )
- MCFG_MSX_MATSUSHITA_TURBO_CB(WRITELINE(*this, msx2_state, turbo_w))
+ msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0));
+ matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w));
MCFG_MSX_SYSTEMFLAGS_ADD("sysflags", 0xff)
@@ -8258,7 +8258,7 @@ MACHINE_CONFIG_START(msx2_state::hbf1xdj)
MCFG_MSX_SYSTEMFLAGS_ADD("sysflags", 0x00)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_ym2413(config);
@@ -8305,7 +8305,7 @@ MACHINE_CONFIG_START(msx2_state::hbf1xv)
MCFG_MSX_SYSTEMFLAGS_ADD("sysflags", 0x00)
- MCFG_MSX_S1985_ADD("s1985")
+ MSX_S1985(config, "s1985", 0);
msx_ym2413(config);
diff --git a/src/mame/drivers/mystwarr.cpp b/src/mame/drivers/mystwarr.cpp
index c5dcecb91d4..f62e0d537fe 100644
--- a/src/mame/drivers/mystwarr.cpp
+++ b/src/mame/drivers/mystwarr.cpp
@@ -1116,7 +1116,7 @@ MACHINE_CONFIG_START(mystwarr_state::gaiapols)
m_k053252->set_offsets(40, 16);
- MCFG_K054000_ADD("k054000")
+ K054000(config, "k054000", 0);
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_gaiapols)
diff --git a/src/mame/drivers/namcos21_de.cpp b/src/mame/drivers/namcos21_de.cpp
index e85de195659..c2ace71c309 100644
--- a/src/mame/drivers/namcos21_de.cpp
+++ b/src/mame/drivers/namcos21_de.cpp
@@ -511,13 +511,14 @@ private:
};
// driveyes only
-MACHINE_CONFIG_START(namcos21_de_state::driveyes)
- MCFG_DEVICE_ADD("pcb_0", NAMCO_DE_PCB,0)
- MCFG_DEVICE_ADD("pcb_1", NAMCO_DE_PCB,0)
- MCFG_DEVICE_ADD("pcb_2", NAMCO_DE_PCB,0)
+void namcos21_de_state::driveyes(machine_config &config)
+{
+ NAMCO_DE_PCB(config, m_pcb[0], 0);
+ NAMCO_DE_PCB(config, m_pcb[1], 0);
+ NAMCO_DE_PCB(config, m_pcb[2], 0);
- MCFG_DEVICE_ADD("gearbox", NAMCOIO_GEARBOX, 0)
-MACHINE_CONFIG_END
+ NAMCOIO_GEARBOX(config, m_io_gearbox, 0);
+}
// stacks with the DSWs set to left or right screen will show 'receive error' because they want comms from the main screen
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 02a271e97c8..10a1b35d9f3 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -2958,7 +2958,7 @@ MACHINE_CONFIG_START(naomi_state::naomi_base)
EEPROM_93C46_8BIT(config, "mie_eeprom");
X76F100(config, "naomibd_eeprom");
- MCFG_M3COMM_ADD("comm_board")
+ M3COMM(config, "comm_board", 0);
MCFG_MACHINE_RESET_OVERRIDE(naomi_state,naomi)
NVRAM(config, "sram", nvram_device::DEFAULT_ALL_0);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/omegrace.cpp b/src/mame/drivers/omegrace.cpp
index e06638416f8..a9cbe0c208c 100644
--- a/src/mame/drivers/omegrace.cpp
+++ b/src/mame/drivers/omegrace.cpp
@@ -546,8 +546,8 @@ MACHINE_CONFIG_START(omegrace_state::omegrace)
MCFG_SCREEN_VISIBLE_AREA(522, 1566, 522, 1566)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_ADD("dvg", DVG, 0)
- MCFG_AVGDVG_VECTOR("vector")
+ DVG(config, m_dvg, 0);
+ m_dvg->set_vector_tag("vector");
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp
index 160eb0e3c3e..3f5ce0ed6ba 100644
--- a/src/mame/drivers/overdriv.cpp
+++ b/src/mame/drivers/overdriv.cpp
@@ -373,7 +373,8 @@ MACHINE_CONFIG_START(overdriv_state::overdriv)
m_k051316_2->set_offsets(15, 1);
m_k051316_2->set_zoom_callback(FUNC(overdriv_state::zoom_callback_2), this);
- MCFG_K053251_ADD("k053251")
+ K053251(config, m_k053251, 0);
+
MCFG_K053250_ADD("k053250_1", "palette", "screen", 0, 0)
MCFG_K053250_ADD("k053250_2", "palette", "screen", 0, 0)
diff --git a/src/mame/drivers/pcm.cpp b/src/mame/drivers/pcm.cpp
index 487b1316a75..77452c327f8 100644
--- a/src/mame/drivers/pcm.cpp
+++ b/src/mame/drivers/pcm.cpp
@@ -281,7 +281,7 @@ MACHINE_CONFIG_START(pcm_state::pcm)
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
/* Devices */
- MCFG_K7659_KEYBOARD_ADD()
+ K7659_KEYBOARD(config, K7659_KEYBOARD_TAG, 0);
MCFG_CASSETTE_ADD("cassette")
Z80PIO(config, m_pio_u, XTAL(10'000'000)/4);
diff --git a/src/mame/drivers/psion.cpp b/src/mame/drivers/psion.cpp
index d7eb5777f8e..1df9f392840 100644
--- a/src/mame/drivers/psion.cpp
+++ b/src/mame/drivers/psion.cpp
@@ -600,8 +600,8 @@ MACHINE_CONFIG_START(psion_state::psion_2lines)
MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", psion_state, nmi_timer, attotime::from_seconds(1))
/* Datapack */
- MCFG_PSION_DATAPACK_ADD("pack1")
- MCFG_PSION_DATAPACK_ADD("pack2")
+ PSION_DATAPACK(config, m_pack1, 0);
+ PSION_DATAPACK(config, m_pack2, 0);
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("pack_list", "psion2")
diff --git a/src/mame/drivers/ql.cpp b/src/mame/drivers/ql.cpp
index 23d168c30fe..b6a738e3f02 100644
--- a/src/mame/drivers/ql.cpp
+++ b/src/mame/drivers/ql.cpp
@@ -946,9 +946,9 @@ MACHINE_CONFIG_START(ql_state::ql)
m_zx8302->out_raw2_callback().set(FUNC(ql_state::zx8302_raw2_w));
m_zx8302->in_raw2_callback().set(FUNC(ql_state::zx8302_raw2_r));
- MCFG_MICRODRIVE_ADD(MDV_1)
- MCFG_MICRODRIVE_COMMS_OUT_CALLBACK(WRITELINE(MDV_2, microdrive_image_device, comms_in_w))
- MCFG_MICRODRIVE_ADD(MDV_2)
+ MICRODRIVE(config, m_mdv1, 0);
+ m_mdv1->comms_out_wr_callback().set(m_mdv2, FUNC(microdrive_image_device::comms_in_w));
+ MICRODRIVE(config, m_mdv2, 0);
RS232_PORT(config, m_ser1, default_rs232_devices, nullptr); // wired as DCE
RS232_PORT(config, m_ser2, default_rs232_devices, nullptr); // wired as DTE
diff --git a/src/mame/drivers/quantum.cpp b/src/mame/drivers/quantum.cpp
index 0ea10275b60..ffa9b11753c 100644
--- a/src/mame/drivers/quantum.cpp
+++ b/src/mame/drivers/quantum.cpp
@@ -304,8 +304,8 @@ MACHINE_CONFIG_START(quantum_state::quantum)
MCFG_SCREEN_VISIBLE_AREA(0, 900, 0, 600)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_ADD("avg", AVG_QUANTUM, 0)
- MCFG_AVGDVG_VECTOR("vector")
+ AVG_QUANTUM(config, m_avg, 0);
+ m_avg->set_vector_tag("vector");
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index c10f4dd50fd..7dfcab165bb 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -3337,8 +3337,8 @@ MACHINE_CONFIG_START(rainbow_state::rainbow)
m_kbd8251->rxrdy_handler().set(FUNC(rainbow_state::kbd_rxready_w));
m_kbd8251->txrdy_handler().set(FUNC(rainbow_state::kbd_txready_w));
- MCFG_DEVICE_ADD(LK201_TAG, LK201, 0)
- MCFG_LK201_TX_HANDLER(WRITELINE("kbdser", i8251_device, write_rxd))
+ LK201(config, m_lk201, 0);
+ m_lk201->tx_handler().set(m_kbd8251, FUNC(i8251_device::write_rxd));
ripple_counter_device &prtbrg(RIPPLE_COUNTER(config, "prtbrg", 24.0734_MHz_XTAL / 6 / 13)); // 74LS393 at E17 (both halves)
// divided clock should ideally be 307.2 kHz, but is actually approximately 308.6333 kHz
diff --git a/src/mame/drivers/rampart.cpp b/src/mame/drivers/rampart.cpp
index 4bc1865f330..b08de800246 100644
--- a/src/mame/drivers/rampart.cpp
+++ b/src/mame/drivers/rampart.cpp
@@ -344,7 +344,7 @@ MACHINE_CONFIG_START(rampart_state::rampart)
MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK/2)
MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 118, true)
+ SLAPSTIC(config, m_slapstic_device, 118, true);
EEPROM_2816(config, "eeprom").lock_after_write(true);
diff --git a/src/mame/drivers/rohga.cpp b/src/mame/drivers/rohga.cpp
index a465c80abe2..efebdc5cab2 100644
--- a/src/mame/drivers/rohga.cpp
+++ b/src/mame/drivers/rohga.cpp
@@ -897,8 +897,8 @@ MACHINE_CONFIG_START(rohga_state::rohga)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_rohga)
MCFG_PALETTE_ADD("palette", 2048)
- MCFG_DECOCOMN_ADD("deco_common")
- MCFG_DECOCOMN_PALETTE("palette")
+ DECOCOMN(config, m_decocomn, 0);
+ m_decocomn->set_palette_tag(m_palette);
MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -989,8 +989,8 @@ MACHINE_CONFIG_START(rohga_state::wizdfire)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_wizdfire)
MCFG_PALETTE_ADD("palette", 2048)
- MCFG_DECOCOMN_ADD("deco_common")
- MCFG_DECOCOMN_PALETTE("palette")
+ DECOCOMN(config, m_decocomn, 0);
+ m_decocomn->set_palette_tag(m_palette);
MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1086,8 +1086,8 @@ MACHINE_CONFIG_START(rohga_state::nitrobal)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_wizdfire)
MCFG_PALETTE_ADD("palette", 2048)
- MCFG_DECOCOMN_ADD("deco_common")
- MCFG_DECOCOMN_PALETTE("palette")
+ DECOCOMN(config, m_decocomn, 0);
+ m_decocomn->set_palette_tag(m_palette);
MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
@@ -1184,8 +1184,8 @@ MACHINE_CONFIG_START(rohga_state::schmeisr)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_schmeisr)
MCFG_PALETTE_ADD("palette", 2048)
- MCFG_DECOCOMN_ADD("deco_common")
- MCFG_DECOCOMN_PALETTE("palette")
+ DECOCOMN(config, m_decocomn, 0);
+ m_decocomn->set_palette_tag(m_palette);
MCFG_DEVICE_ADD("tilegen1", DECO16IC, 0)
MCFG_DECO16IC_SPLIT(0)
diff --git a/src/mame/drivers/simpsons.cpp b/src/mame/drivers/simpsons.cpp
index cd2c77a0a99..83173077009 100644
--- a/src/mame/drivers/simpsons.cpp
+++ b/src/mame/drivers/simpsons.cpp
@@ -363,7 +363,7 @@ MACHINE_CONFIG_START(simpsons_state::simpsons)
m_k053246->set_config("gfx2", NORMAL_PLANE_ORDER, 53, 23);
m_k053246->set_palette("palette");
- MCFG_K053251_ADD("k053251")
+ K053251(config, m_k053251, 0);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
diff --git a/src/mame/drivers/sm7238.cpp b/src/mame/drivers/sm7238.cpp
index f7add03ba11..c103a7a16a0 100644
--- a/src/mame/drivers/sm7238.cpp
+++ b/src/mame/drivers/sm7238.cpp
@@ -413,12 +413,12 @@ MACHINE_CONFIG_START(sm7238_state::sm7238)
// serial connection to KM-035 keyboard
I8251(config, m_i8251kbd, 0);
- m_i8251kbd->txd_handler().set("keyboard", FUNC(km035_device::write_rxd));
- m_i8251kbd->rxrdy_handler().set("pic8259", FUNC(pic8259_device::ir3_w));
+ m_i8251kbd->txd_handler().set(m_keyboard, FUNC(km035_device::write_rxd));
+ m_i8251kbd->rxrdy_handler().set(m_pic8259, FUNC(pic8259_device::ir3_w));
- MCFG_DEVICE_ADD("keyboard", KM035, 0)
- MCFG_KM035_TX_HANDLER(WRITELINE("i8251kbd", i8251_device, write_rxd))
- MCFG_KM035_RTS_HANDLER(WRITELINE("i8251kbd", i8251_device, write_cts))
+ KM035(config, m_keyboard, 0);
+ m_keyboard->tx_handler().set(m_i8251kbd, FUNC(i8251_device::write_rxd));
+ m_keyboard->rts_handler().set(m_i8251kbd, FUNC(i8251_device::write_cts));
// serial connection to printer
I8251(config, m_i8251prn, 0);
diff --git a/src/mame/drivers/starwars.cpp b/src/mame/drivers/starwars.cpp
index cb0f381a092..04995349634 100644
--- a/src/mame/drivers/starwars.cpp
+++ b/src/mame/drivers/starwars.cpp
@@ -342,8 +342,8 @@ MACHINE_CONFIG_START(starwars_state::starwars)
MCFG_SCREEN_VISIBLE_AREA(0, 250, 0, 280)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_ADD("avg", AVG_STARWARS, 0)
- MCFG_AVGDVG_VECTOR("vector")
+ avg_device &avg(AVG_STARWARS(config, "avg", 0));
+ avg.set_vector_tag("vector");
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -371,7 +371,7 @@ MACHINE_CONFIG_START(starwars_state::esb)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(esb_main_map)
- MCFG_DEVICE_ADD("slapstic", SLAPSTIC, 101, false)
+ SLAPSTIC(config, m_slapstic_device, 101, false);
subdevice<ls259_device>("outlatch")->q_out_cb<4>().append_membank("bank2");
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tempest.cpp b/src/mame/drivers/tempest.cpp
index 7657f1027e2..8626bd2be72 100644
--- a/src/mame/drivers/tempest.cpp
+++ b/src/mame/drivers/tempest.cpp
@@ -650,11 +650,11 @@ MACHINE_CONFIG_START(tempest_state::tempest)
MCFG_SCREEN_VISIBLE_AREA(0, 580, 0, 570)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_ADD("avg", AVG_TEMPEST, 0)
- MCFG_AVGDVG_VECTOR("vector")
+ AVG_TEMPEST(config, m_avg, 0);
+ m_avg->set_vector_tag("vector");
/* Drivers */
- MCFG_MATHBOX_ADD("mathbox")
+ MATHBOX(config, m_mathbox, 0);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index f3331971922..6b66337e1bd 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -724,7 +724,7 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
/* TODO: CONVERT THIS TO A SLOT DEVICE (CC 90-232) */
- MCFG_TO7_IO_LINE_ADD("to7_io")
+ TO7_IO_LINE(config, "to7_io", 0);
/* TODO: CONVERT THIS TO A SLOT DEVICE (MD 90-120) */
diff --git a/src/mame/drivers/tomcat.cpp b/src/mame/drivers/tomcat.cpp
index 1cb495c4c38..56d629591de 100644
--- a/src/mame/drivers/tomcat.cpp
+++ b/src/mame/drivers/tomcat.cpp
@@ -368,8 +368,8 @@ MACHINE_CONFIG_START(tomcat_state::tomcat)
MCFG_SCREEN_VISIBLE_AREA(0, 280, 0, 250)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
- MCFG_DEVICE_ADD("avg", AVG_TOMCAT, 0)
- MCFG_AVGDVG_VECTOR("vector")
+ avg_device &avg(AVG_TOMCAT(config, "avg", 0));
+ avg.set_vector_tag("vector");
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp
index 1b22c9110c6..b7442976c55 100644
--- a/src/mame/drivers/vendetta.cpp
+++ b/src/mame/drivers/vendetta.cpp
@@ -468,9 +468,9 @@ MACHINE_CONFIG_START(vendetta_state::vendetta)
m_k053246->set_config("gfx2", NORMAL_PLANE_ORDER, 53, 6);
m_k053246->set_palette(m_palette);
- MCFG_K053251_ADD("k053251")
+ K053251(config, m_k053251, 0);
- MCFG_K054000_ADD("k054000")
+ K054000(config, m_k054000, 0);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
diff --git a/src/mame/drivers/vt240.cpp b/src/mame/drivers/vt240.cpp
index 1a9630d5270..51ff55baf52 100644
--- a/src/mame/drivers/vt240.cpp
+++ b/src/mame/drivers/vt240.cpp
@@ -693,8 +693,8 @@ MACHINE_CONFIG_START(vt240_state::vt240)
m_i8251->rxrdy_handler().set(FUNC(vt240_state::irq9_w));
m_i8251->txrdy_handler().set(FUNC(vt240_state::irq7_w));
- MCFG_DEVICE_ADD("lk201", LK201, 0)
- MCFG_LK201_TX_HANDLER(WRITELINE("i8251", i8251_device, write_rxd))
+ LK201(config, m_lk201, 0);
+ m_lk201->tx_handler().set(m_i8251, FUNC(i8251_device::write_rxd));
MCFG_DEVICE_ADD("keyboard_clock", CLOCK, 4800 * 64) // 8251 is set to /64 on the clock input
MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(*this, vt240_state, write_keyboard_clock))
@@ -714,9 +714,10 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(vt240_state::mc7105)
vt240(config);
- MCFG_DEVICE_REMOVE("lk201")
- MCFG_DEVICE_ADD("ms7004", MS7004, 0)
- MCFG_MS7004_TX_HANDLER(WRITELINE("i8251", i8251_device, write_rxd))
+ config.device_remove("lk201");
+
+ ms7004_device &ms7004(MS7004(config, "ms7004", 0));
+ ms7004.tx_handler().set(m_i8251, FUNC(i8251_device::write_rxd));
m_i8251->txd_handler().set_nop();
//m_i8251->txd_handler().set("ms7004", FUNC(ms7004_device::rx_w));
diff --git a/src/mame/drivers/xexex.cpp b/src/mame/drivers/xexex.cpp
index 89bb1dd6bb0..1adb759447e 100644
--- a/src/mame/drivers/xexex.cpp
+++ b/src/mame/drivers/xexex.cpp
@@ -510,7 +510,7 @@ MACHINE_CONFIG_START(xexex_state::xexex)
MCFG_K053250_ADD("k053250", "palette", "screen", -5, -16)
- MCFG_K053251_ADD("k053251")
+ K053251(config, m_k053251, 0);
MCFG_DEVICE_ADD("k053252", K053252, XTAL(32'000'000)/4)
diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp
index 6c0cffebb98..93739e995e7 100644
--- a/src/mame/drivers/xmen.cpp
+++ b/src/mame/drivers/xmen.cpp
@@ -334,7 +334,7 @@ MACHINE_CONFIG_START(xmen_state::xmen)
m_k053246->set_config("gfx2", NORMAL_PLANE_ORDER, 53, -2);
m_k053246->set_palette("palette");
- MCFG_K053251_ADD("k053251")
+ K053251(config, m_k053251, 0);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -398,7 +398,7 @@ MACHINE_CONFIG_START(xmen_state::xmen6p)
m_k053246->set_screen(m_screen);
m_k053246->set_palette("palette");
- MCFG_K053251_ADD("k053251")
+ K053251(config, m_k053251, 0);
K054321(config, m_k054321, "lspeaker", "rspeaker");
diff --git a/src/mame/includes/coco12.h b/src/mame/includes/coco12.h
index 395bfcb34b1..dcfe82c895b 100644
--- a/src/mame/includes/coco12.h
+++ b/src/mame/includes/coco12.h
@@ -67,11 +67,11 @@ protected:
virtual void pia1_pb_changed(uint8_t data) override;
sam6883_device &sam() { return *m_sam; }
+ required_device<sam6883_device> m_sam;
private:
void configure_sam(void);
- required_device<sam6883_device> m_sam;
required_device<mc6847_base_device> m_vdg;
};
diff --git a/src/mame/includes/slapstic.h b/src/mame/includes/slapstic.h
index 3b14ebfadfb..17d3c064af8 100644
--- a/src/mame/includes/slapstic.h
+++ b/src/mame/includes/slapstic.h
@@ -19,9 +19,6 @@
DECLARE_DEVICE_TYPE(SLAPSTIC, atari_slapstic_device)
-#define MCFG_SLAPSTIC_NUM(_chipnum) \
- downcast<atari_slapstic_device &>(*device).set_chipnum(_chipnum);
-
/*************************************
*
* Structure of slapstic params
diff --git a/src/mame/includes/thomson.h b/src/mame/includes/thomson.h
index c53489ce0a9..e70f2e1e968 100644
--- a/src/mame/includes/thomson.h
+++ b/src/mame/includes/thomson.h
@@ -645,7 +645,7 @@ private:
void to9_floppy_reset();
};
-/*----------- defined in video/thomson.c -----------*/
+/*----------- defined in video/thomson.cpp -----------*/
/*
TO7 video:
@@ -727,7 +727,4 @@ private:
DECLARE_DEVICE_TYPE(TO7_IO_LINE, to7_io_line_device)
-#define MCFG_TO7_IO_LINE_ADD(_tag) \
- MCFG_DEVICE_ADD((_tag), TO7_IO_LINE, 0)
-
#endif // MAME_INCLUDES_THOMSON_H
diff --git a/src/mame/machine/6883sam.h b/src/mame/machine/6883sam.h
index 1e5669ef246..0ca43fed538 100644
--- a/src/mame/machine/6883sam.h
+++ b/src/mame/machine/6883sam.h
@@ -14,10 +14,6 @@
#pragma once
-#define MCFG_SAM6883_RES_CALLBACK(_read) \
- downcast<sam6883_device &>(*device).set_res_rd_callback(DEVCB_##_read);
-
-
//**************************************************************************
// SAM6883 CORE
//**************************************************************************
@@ -94,7 +90,7 @@ public:
sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_res_rd_callback(Object &&cb) { return m_read_res.set_callback(std::forward<Object>(cb)); }
+ auto res_rd_callback() { return m_read_res.bind(); }
// called to configure banks
void configure_bank(int bank, uint8_t *memory, uint32_t memory_size, bool is_read_only);
diff --git a/src/mame/machine/abc80kb.h b/src/mame/machine/abc80kb.h
index 7e26881183d..6e097f61142 100644
--- a/src/mame/machine/abc80kb.h
+++ b/src/mame/machine/abc80kb.h
@@ -19,16 +19,6 @@
#define ABC80_KEYBOARD_TAG "abc80kb"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_ABC80_KEYBOARD_KEYDOWN_CALLBACK(_write) \
- downcast<abc80_keyboard_device &>(*device).set_keydown_wr_callback(DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -41,7 +31,7 @@ public:
// construction/destruction
abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_keydown_wr_callback(Object &&cb) { return m_write_keydown.set_callback(std::forward<Object>(cb)); }
+ auto keydown_wr_callback() { return m_write_keydown.bind(); }
uint8_t data_r();
diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp
index 48c863a2d6c..9a80fae2563 100644
--- a/src/mame/machine/apollo.cpp
+++ b/src/mame/machine/apollo.cpp
@@ -1152,7 +1152,7 @@ MACHINE_CONFIG_START(apollo_state::apollo)
MCFG_APOLLO_SIO_ADD(APOLLO_SIO_TAG, 3.6864_MHz_XTAL)
MCFG_APOLLO_SIO_IRQ_CALLBACK(WRITELINE(*this, apollo_state, sio_irq_handler))
MCFG_APOLLO_SIO_OUTPORT_CALLBACK(WRITE8(*this, apollo_state, sio_output))
- MCFG_APOLLO_SIO_A_TX_CALLBACK(WRITELINE(APOLLO_KBD_TAG, apollo_kbd_device, rx_w))
+ MCFG_APOLLO_SIO_A_TX_CALLBACK(WRITELINE(m_keyboard, apollo_kbd_device, rx_w))
#ifdef APOLLO_XXL
MCFG_APOLLO_SIO_B_TX_CALLBACK(WRITELINE(APOLLO_STDIO_TAG, apollo_stdio_device, rx_w))
diff --git a/src/mame/machine/apollo_kbd.h b/src/mame/machine/apollo_kbd.h
index 97221e62fa9..a7343470a3d 100644
--- a/src/mame/machine/apollo_kbd.h
+++ b/src/mame/machine/apollo_kbd.h
@@ -27,16 +27,6 @@
#undef putchar
#endif
-//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_APOLLO_KBD_TX_CALLBACK(_cb) \
- downcast<apollo_kbd_device &>(*device).set_tx_cb(DEVCB_##_cb);
-
-#define MCFG_APOLLO_KBD_GERMAN_CALLBACK(_cb) \
- downcast<apollo_kbd_device &>(*device).set_german_cb(DEVCB_##_cb);
-
//**************************************************************************
// TYPE DEFINITIONS
@@ -50,8 +40,8 @@ public:
// construction/destruction
apollo_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_tx_cb(Object &&cb) { return m_tx_w.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_german_cb(Object &&cb) { return m_german_r.set_callback(std::forward<Object>(cb)); }
+ auto tx_cb() { return m_tx_w.bind(); }
+ auto german_cb() { return m_german_r.bind(); }
private:
// device-level overrides
diff --git a/src/mame/machine/apricotkb.h b/src/mame/machine/apricotkb.h
index 530346608fd..e9537650c2b 100644
--- a/src/mame/machine/apricotkb.h
+++ b/src/mame/machine/apricotkb.h
@@ -21,16 +21,6 @@
#define APRICOT_KEYBOARD_TAG "aprikb"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_APRICOT_KEYBOARD_TXD_CALLBACK(_write) \
- downcast<apricot_keyboard_device &>(*device).set_tcd_wr_callback(DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -43,7 +33,7 @@ public:
// construction/destruction
apricot_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_txd_wr_callback(Object &&cb) { return m_write_txd.set_callback(std::forward<Object>(cb)); }
+ auto txd_wr_callback() { return m_write_txd.bind(); }
uint8_t read_keyboard();
diff --git a/src/mame/machine/dec_lk201.h b/src/mame/machine/dec_lk201.h
index 9d1bc423722..5dec5c4bd46 100644
--- a/src/mame/machine/dec_lk201.h
+++ b/src/mame/machine/dec_lk201.h
@@ -33,12 +33,6 @@
// TSR - Timer Status Register
#define TSR_OCFL 0x40 // TSR (68HC05 output compare flag)
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_LK201_TX_HANDLER(_cb) \
- downcast<lk201_device &>(*device).set_tx_handler(DEVCB_##_cb);
//**************************************************************************
// TYPE DEFINITIONS
@@ -63,7 +57,7 @@ public:
DECLARE_READ8_MEMBER(timer_r);
DECLARE_WRITE8_MEMBER(timer_w);
- template <class Object> devcb_base &set_tx_handler(Object &&wr) { return m_tx_handler.set_callback(std::forward<Object>(wr)); }
+ auto tx_handler() { return m_tx_handler.bind(); }
void lk201_map(address_map &map);
protected:
diff --git a/src/mame/machine/decocass_tape.h b/src/mame/machine/decocass_tape.h
index 0b6131d5ae8..da7749a2603 100644
--- a/src/mame/machine/decocass_tape.h
+++ b/src/mame/machine/decocass_tape.h
@@ -73,7 +73,4 @@ private:
DECLARE_DEVICE_TYPE(DECOCASS_TAPE, decocass_tape_device)
-#define MCFG_DECOCASS_TAPE_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, DECOCASS_TAPE, 0)
-
#endif // MAME_MACHINE_DECOCASS_TAPE_H
diff --git a/src/mame/machine/fm_scsi.h b/src/mame/machine/fm_scsi.h
index c93b2d0ae4c..f5f533955f0 100644
--- a/src/mame/machine/fm_scsi.h
+++ b/src/mame/machine/fm_scsi.h
@@ -12,13 +12,6 @@
#include "machine/legscsi.h"
-#define MCFG_FMSCSI_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, FMSCSI, 0)
-
-#define MCFG_FMSCSI_IRQ_HANDLER(_devcb) \
- downcast<fmscsi_device &>(*device).set_irq_handler(DEVCB_##_devcb);
-#define MCFG_FMSCSI_DRQ_HANDLER(_devcb) \
- downcast<fmscsi_device &>(*device).set_drq_handler(DEVCB_##_devcb);
class fmscsi_device : public legacy_scsi_host_adapter
{
@@ -27,8 +20,8 @@ public:
fmscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers
- template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_drq_handler(Object &&cb) { return m_drq_handler.set_callback(std::forward<Object>(cb)); }
+ auto irq_handler() { return m_irq_handler.bind(); }
+ auto drq_handler() { return m_drq_handler.bind(); }
// any publically accessible interfaces needed for runtime
uint8_t fmscsi_data_r(void);
diff --git a/src/mame/machine/inder_sb.h b/src/mame/machine/inder_sb.h
index 70a2ba11070..28b29f6be72 100644
--- a/src/mame/machine/inder_sb.h
+++ b/src/mame/machine/inder_sb.h
@@ -16,9 +16,6 @@
DECLARE_DEVICE_TYPE(INDER_AUDIO, inder_sb_device)
-#define MCFG_INDER_AUDIO_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, INDER_AUDIO, 0)
-
class inder_sb_device : public device_t,
public device_mixer_interface
diff --git a/src/mame/machine/inder_vid.h b/src/mame/machine/inder_vid.h
index 4e55570bb2d..0a866ed3a6e 100644
--- a/src/mame/machine/inder_vid.h
+++ b/src/mame/machine/inder_vid.h
@@ -18,9 +18,6 @@
DECLARE_DEVICE_TYPE(INDER_VIDEO, inder_vid_device)
-#define MCFG_INDER_VIDEO_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, INDER_VIDEO, 0)
-
class inder_vid_device : public device_t
/* public device_video_interface */
diff --git a/src/mame/machine/k573dio.h b/src/mame/machine/k573dio.h
index bf4d90afbcd..80ff4a3dab3 100644
--- a/src/mame/machine/k573dio.h
+++ b/src/mame/machine/k573dio.h
@@ -8,21 +8,13 @@
#include "sound/mas3507d.h"
#include "machine/ds2401.h"
-#define MCFG_KONAMI_573_DIGITAL_IO_BOARD_ADD(_tag, _clock) \
- MCFG_DEVICE_ADD(_tag, KONAMI_573_DIGITAL_IO_BOARD, _clock)
-
-#define MCFG_KONAMI_573_DIGITAL_IO_BOARD_OUTPUT_CALLBACK( _output_cb ) \
- downcast<k573dio_device *>(device)->set_output_cb(DEVCB_##_output_cb);
class k573dio_device : public device_t
{
public:
k573dio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Write> void set_output_cb(Write &&_output_cb)
- {
- output_cb.set_callback(std::forward<Write>(_output_cb));
- }
+ auto output_callback() { return output_cb.bind(); }
required_device<mas3507d_device> mas3507d;
required_device<ds2401_device> digital_id;
diff --git a/src/mame/machine/k7659kb.h b/src/mame/machine/k7659kb.h
index 1945139f2a9..81987c75466 100644
--- a/src/mame/machine/k7659kb.h
+++ b/src/mame/machine/k7659kb.h
@@ -21,16 +21,6 @@
#define K7659_KEYBOARD_TAG "k7659kb"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_K7659_KEYBOARD_ADD() \
- MCFG_DEVICE_ADD(K7659_KEYBOARD_TAG, K7659_KEYBOARD, 0)
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/mame/machine/kc_keyb.h b/src/mame/machine/kc_keyb.h
index 1ccef297e9f..3e4e53f1856 100644
--- a/src/mame/machine/kc_keyb.h
+++ b/src/mame/machine/kc_keyb.h
@@ -11,8 +11,6 @@
#pragma once
-#define MCFG_KC_KEYBOARD_OUT_CALLBACK(_write) \
- downcast<kc_keyboard_device &>(*device).set_out_wr_callback(DEVCB_##_write);
/***************************************************************************
TYPE DEFINITIONS
@@ -27,7 +25,7 @@ public:
kc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~kc_keyboard_device();
- template <class Object> devcb_base &set_out_wr_callback(Object &&cb) { return m_write_out.set_callback(std::forward<Object>(cb)); }
+ auto out_wr_callback() { return m_write_out.bind(); }
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
diff --git a/src/mame/machine/km035.h b/src/mame/machine/km035.h
index ad8dc58d21b..74245c373cf 100644
--- a/src/mame/machine/km035.h
+++ b/src/mame/machine/km035.h
@@ -8,21 +8,6 @@
#include "cpu/mcs48/mcs48.h"
#include "sound/beep.h"
-//**************************************************************************
-// MACROS / CONSTANTS
-//**************************************************************************
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_KM035_TX_HANDLER(_cb) \
- downcast<km035_device &>(*device).set_tx_handler(DEVCB_##_cb);
-
-#define MCFG_KM035_RTS_HANDLER(_cb) \
- downcast<km035_device &>(*device).set_rts_handler(DEVCB_##_cb);
-
//**************************************************************************
// TYPE DEFINITIONS
@@ -36,8 +21,8 @@ public:
// construction/destruction
km035_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_tx_handler(Object &&wr) { return m_tx_handler.set_callback(std::forward<Object>(wr)); }
- template <class Object> devcb_base &set_rts_handler(Object &&wr) { return m_rts_handler.set_callback(std::forward<Object>(wr)); }
+ auto tx_handler() { return m_tx_handler.bind(); }
+ auto rts_handler() { return m_rts_handler.bind(); }
DECLARE_WRITE_LINE_MEMBER( write_rxd );
diff --git a/src/mame/machine/m24_kbd.h b/src/mame/machine/m24_kbd.h
index 5aa4fe3ccae..86ad4344e08 100644
--- a/src/mame/machine/m24_kbd.h
+++ b/src/mame/machine/m24_kbd.h
@@ -7,15 +7,13 @@
#include "cpu/mcs48/mcs48.h"
-#define MCFG_M24_KEYBOARD_OUT_DATA_HANDLER(_devcb) \
- downcast<m24_keyboard_device &>(*device).set_out_data_handler(DEVCB_##_devcb);
class m24_keyboard_device : public device_t
{
public:
m24_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_out_data_handler(Object &&cb) { return m_out_data.set_callback(std::forward<Object>(cb)); }
+ auto out_data_handler() { return m_out_data.bind(); }
DECLARE_WRITE_LINE_MEMBER(clock_w);
DECLARE_WRITE_LINE_MEMBER(data_w);
diff --git a/src/mame/machine/m24_z8000.h b/src/mame/machine/m24_z8000.h
index df226b87926..2a977ff827d 100644
--- a/src/mame/machine/m24_z8000.h
+++ b/src/mame/machine/m24_z8000.h
@@ -10,15 +10,13 @@
#include "machine/pit8253.h"
#include "machine/pic8259.h"
-#define MCFG_M24_Z8000_HALT(_devcb) \
- downcast<m24_z8000_device &>(*device).set_halt_callback(DEVCB_##_devcb);
class m24_z8000_device : public device_t
{
public:
m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_halt_callback(Object &&cb) { return m_halt_out.set_callback(std::forward<Object>(cb)); }
+ auto halt_callback() { return m_halt_out.bind(); }
DECLARE_READ16_MEMBER(pmem_r);
DECLARE_WRITE16_MEMBER(pmem_w);
diff --git a/src/mame/machine/m3comm.h b/src/mame/machine/m3comm.h
index 85caa3f21e3..6e80c24eeff 100644
--- a/src/mame/machine/m3comm.h
+++ b/src/mame/machine/m3comm.h
@@ -8,8 +8,6 @@
#include "machine/ram.h"
#include "cpu/m68000/m68000.h"
-#define MCFG_M3COMM_ADD(_tag ) \
- MCFG_DEVICE_ADD(_tag, M3COMM, 0)
//**************************************************************************
// TYPE DEFINITIONS
diff --git a/src/mame/machine/mathbox.h b/src/mame/machine/mathbox.h
index 035093b0c4b..7bb9cf035d2 100644
--- a/src/mame/machine/mathbox.h
+++ b/src/mame/machine/mathbox.h
@@ -11,13 +11,6 @@
#pragma once
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_MATHBOX_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MATHBOX, 0)
-
/* ----- device interface ----- */
class mathbox_device : public device_t
diff --git a/src/mame/machine/microdrv.h b/src/mame/machine/microdrv.h
index 7fa62714adb..2b7202cd321 100644
--- a/src/mame/machine/microdrv.h
+++ b/src/mame/machine/microdrv.h
@@ -24,14 +24,6 @@
#define MDV_2 "mdv2"
-#define MCFG_MICRODRIVE_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MICRODRIVE, 0)
-
-#define MCFG_MICRODRIVE_COMMS_OUT_CALLBACK(_write) \
- downcast<microdrive_image_device &>(*device).set_comms_out_wr_callback(DEVCB_##_write);
-
-
-
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
@@ -46,7 +38,7 @@ public:
microdrive_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~microdrive_image_device();
- template <class Object> devcb_base &set_comms_out_wr_callback(Object &&cb) { return m_write_comms_out.set_callback(std::forward<Object>(cb)); }
+ auto comms_out_wr_callback() { return m_write_comms_out.bind(); }
// image-level overrides
virtual image_init_result call_load() override;
diff --git a/src/mame/machine/mm1kb.h b/src/mame/machine/mm1kb.h
index d9204ae3f69..3e2571d12b9 100644
--- a/src/mame/machine/mm1kb.h
+++ b/src/mame/machine/mm1kb.h
@@ -14,16 +14,6 @@
#include "sound/samples.h"
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_MM1_KEYBOARD_KBST_CALLBACK(_write) \
- downcast<mm1_keyboard_device &>(*device).set_kbst_wr_callback(DEVCB_##_write);
-
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -36,7 +26,7 @@ public:
// construction/destruction
mm1_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_kbst_wr_callback(Object &&cb) { return m_write_kbst.set_callback(std::forward<Object>(cb)); }
+ auto kbst_wr_callback() { return m_write_kbst.bind(); }
DECLARE_READ8_MEMBER( read ) { return m_data; }
diff --git a/src/mame/machine/ms7004.h b/src/mame/machine/ms7004.h
index 654cc4d33dc..3cf3b38f411 100644
--- a/src/mame/machine/ms7004.h
+++ b/src/mame/machine/ms7004.h
@@ -13,17 +13,6 @@
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_MS7004_TX_HANDLER(_cb) \
- downcast<ms7004_device &>(*device).set_tx_handler(DEVCB_##_cb);
-
-#define MCFG_MS7004_RTS_HANDLER(_cb) \
- downcast<ms7004_device &>(*device).set_rts_handler(DEVCB_##_cb);
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -35,8 +24,8 @@ public:
// construction/destruction
ms7004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_tx_handler(Object &&wr) { return m_tx_handler.set_callback(std::forward<Object>(wr)); }
- template <class Object> devcb_base &set_rts_handler(Object &&wr) { return m_rts_handler.set_callback(std::forward<Object>(wr)); }
+ auto tx_handler() { return m_tx_handler.bind(); }
+ auto rts_handler() { return m_rts_handler.bind(); }
DECLARE_WRITE_LINE_MEMBER( write_rxd );
diff --git a/src/mame/machine/msx_matsushita.h b/src/mame/machine/msx_matsushita.h
index 0cf24e8bcdb..ef5f3b80343 100644
--- a/src/mame/machine/msx_matsushita.h
+++ b/src/mame/machine/msx_matsushita.h
@@ -10,13 +10,6 @@
DECLARE_DEVICE_TYPE(MSX_MATSUSHITA, msx_matsushita_device)
-#define MCFG_MSX_MATSUSHITA_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MSX_MATSUSHITA, 0)
-
-#define MCFG_MSX_MATSUSHITA_TURBO_CB(_devcb) \
- downcast<msx_matsushita_device &>(*device).set_turbo_callback(DEVCB_##_devcb);
-
-
class msx_matsushita_device : public device_t,
public msx_switched_interface,
public device_nvram_interface
@@ -24,7 +17,7 @@ class msx_matsushita_device : public device_t,
public:
msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_turbo_callback(Object &&cb) { return m_turbo_out_cb.set_callback(std::forward<Object>(cb)); }
+ auto turbo_callback() { return m_turbo_out_cb.bind(); }
virtual DECLARE_READ8_MEMBER(switched_read) override;
virtual DECLARE_WRITE8_MEMBER(switched_write) override;
diff --git a/src/mame/machine/msx_s1985.h b/src/mame/machine/msx_s1985.h
index df93f2f455d..14e7d21355a 100644
--- a/src/mame/machine/msx_s1985.h
+++ b/src/mame/machine/msx_s1985.h
@@ -10,10 +10,6 @@
DECLARE_DEVICE_TYPE(MSX_S1985, msx_s1985_device)
-#define MCFG_MSX_S1985_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, MSX_S1985, 0)
-
-
class msx_s1985_device : public device_t,
public msx_switched_interface,
public device_nvram_interface
diff --git a/src/mame/machine/namcoio_gearbox.h b/src/mame/machine/namcoio_gearbox.h
index d276a08c7a0..703adc74bd1 100644
--- a/src/mame/machine/namcoio_gearbox.h
+++ b/src/mame/machine/namcoio_gearbox.h
@@ -11,15 +11,6 @@
#pragma once
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_NAMCOIO_GEARBOX_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, NAMCOIO_GEARBOX, 0)
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -49,12 +40,4 @@ protected:
// device type definition
DECLARE_DEVICE_TYPE(NAMCOIO_GEARBOX, namcoio_gearbox_device)
-
-
-//**************************************************************************
-// GLOBAL VARIABLES
-//**************************************************************************
-
-
-
#endif // MAME_MACHINE_NAMCOIO_GEARBOX_H
diff --git a/src/mame/machine/psion_pack.h b/src/mame/machine/psion_pack.h
index 13584013754..884ee306ea0 100644
--- a/src/mame/machine/psion_pack.h
+++ b/src/mame/machine/psion_pack.h
@@ -71,12 +71,4 @@ private:
// device type definition
DECLARE_DEVICE_TYPE(PSION_DATAPACK, datapack_device)
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_PSION_DATAPACK_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, PSION_DATAPACK, 0)
-
#endif // MAME_MACHINE_PSION_PACK_H
diff --git a/src/mame/video/airraid_dev.h b/src/mame/video/airraid_dev.h
index d99df0f067a..d95971d412e 100644
--- a/src/mame/video/airraid_dev.h
+++ b/src/mame/video/airraid_dev.h
@@ -12,10 +12,6 @@
DECLARE_DEVICE_TYPE(AIRRAID_VIDEO, airraid_video_device)
-#define MCFG_AIRRAID_VIDEO_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, AIRRAID_VIDEO, 0)
-
-
class airraid_video_device : public device_t
/* public device_video_interface */
{
diff --git a/src/mame/video/avgdvg.h b/src/mame/video/avgdvg.h
index 40cdc2a803b..25e11a2dec9 100644
--- a/src/mame/video/avgdvg.h
+++ b/src/mame/video/avgdvg.h
@@ -8,15 +8,13 @@
#include "video/vector.h"
-#define MCFG_AVGDVG_VECTOR(_tag) \
- downcast<avgdvg_device &>(*device).set_vector_tag(_tag);
// ======================> avgdvg_device
class avgdvg_device : public device_t
{
public:
- void set_vector_tag(const char *tag) { m_vector.set_tag(tag); }
+ template <typename T> void set_vector_tag(T &&tag) { m_vector.set_tag(std::forward<T>(tag)); }
DECLARE_CUSTOM_INPUT_MEMBER(done_r);
DECLARE_WRITE8_MEMBER(go_w);
diff --git a/src/mame/video/deco_ace.h b/src/mame/video/deco_ace.h
index b9f9e927c67..de73d1f064f 100644
--- a/src/mame/video/deco_ace.h
+++ b/src/mame/video/deco_ace.h
@@ -6,7 +6,7 @@
Data East 99 "ACE" Chip Emulation
- Original source (from deco32.cpp) by Bryan McPhail, Splited by cam900.
+ Original source (from deco32.cpp) by Bryan McPhail, split by cam900.
**************************************************************************/
#ifndef MAME_VIDEO_DECO_ACE_H
@@ -58,12 +58,4 @@ private:
DECLARE_DEVICE_TYPE(DECO_ACE, deco_ace_device)
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_DECO_ACE_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, DECO_ACE, 0)
-
#endif // MAME_VIDEO_DECO_ACE_H
diff --git a/src/mame/video/deco_zoomspr.h b/src/mame/video/deco_zoomspr.h
index 583e227ce14..ed9b96079e6 100644
--- a/src/mame/video/deco_zoomspr.h
+++ b/src/mame/video/deco_zoomspr.h
@@ -11,7 +11,7 @@ class deco_zoomspr_device : public device_t
public:
deco_zoomspr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- void set_gfxdecode_tag(const char *tag) { m_gfxdecode.set_tag(tag); }
+ template <typename T> void set_gfxdecode(T &&tag) { m_gfxdecode.set_tag(std::forward<T>(tag)); }
void dragngun_draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, const uint32_t *spritedata, uint32_t* dragngun_sprite_layout_0_ram, uint32_t* dragngun_sprite_layout_1_ram, uint32_t* dragngun_sprite_lookup_0_ram, uint32_t* dragngun_sprite_lookup_1_ram, uint32_t dragngun_sprite_ctrl, bitmap_ind8 &pri_bitmap, bitmap_rgb32 &temp_bitmap);
@@ -35,7 +35,4 @@ private:
DECLARE_DEVICE_TYPE(DECO_ZOOMSPR, deco_zoomspr_device)
-#define MCFG_DECO_ZOOMSPR_GFXDECODE(_gfxtag) \
- downcast<deco_zoomspr_device &>(*device).set_gfxdecode_tag(_gfxtag);
-
#endif // MAME_VIDEO_DECO_ZOOMSPR_H
diff --git a/src/mame/video/decocomn.h b/src/mame/video/decocomn.h
index f6ec0a0a547..87d2153d466 100644
--- a/src/mame/video/decocomn.h
+++ b/src/mame/video/decocomn.h
@@ -25,7 +25,7 @@ public:
decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
- void set_palette_tag(const char *tag) { m_palette.set_tag(tag); }
+ template <typename T> void set_palette_tag(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); }
DECLARE_WRITE16_MEMBER( buffered_palette_w );
DECLARE_WRITE16_MEMBER( palette_dma_w );
@@ -49,15 +49,4 @@ private:
DECLARE_DEVICE_TYPE(DECOCOMN, decocomn_device)
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
-***************************************************************************/
-
-#define MCFG_DECOCOMN_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, DECOCOMN, 0)
-
-#define MCFG_DECOCOMN_PALETTE(_palette_tag) \
- downcast<decocomn_device &>(*device).set_palette_tag(_palette_tag);
-
#endif // MAME_VIDEO_DECOCOMN_H
diff --git a/src/mame/video/k053251.h b/src/mame/video/k053251.h
index 43c879e2698..3da509e0ecd 100644
--- a/src/mame/video/k053251.h
+++ b/src/mame/video/k053251.h
@@ -53,7 +53,5 @@ private:
DECLARE_DEVICE_TYPE(K053251, k053251_device)
-#define MCFG_K053251_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, K053251, 0)
#endif // MAME_VIDEO_K053251_H
diff --git a/src/mame/video/k054000.h b/src/mame/video/k054000.h
index 9e951822456..318d4c50319 100644
--- a/src/mame/video/k054000.h
+++ b/src/mame/video/k054000.h
@@ -6,9 +6,6 @@
#pragma once
-#define MCFG_K054000_ADD(_tag) \
- MCFG_DEVICE_ADD(_tag, K054000, 0)
-
class k054000_device : public device_t
{
public: