summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2018-09-04 19:12:23 +0200
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2018-09-04 19:12:23 +0200
commit502a131126d8906bb2e63b3215fcbfc4a91a746b (patch) (github)
treee678b6eea62ed3fdfcb082619df9b05beb5c822b
parent618c4d7165a6f66e392ae533fbba82de13f42e23 (diff)
downloadmame-502a131126d8906bb2e63b3215fcbfc4a91a746b.tar.bz2
mame-502a131126d8906bb2e63b3215fcbfc4a91a746b.zip
wd11c00_17, wd2010, wd33c93, wd7600, x76f041, x76f100, ym2148, ym3802: removed MCFG macros (nw)
wd_fdc: started removing MCFG macros (nw)
-rw-r--r--src/devices/bus/isa/p1_hdc.cpp9
-rw-r--r--src/devices/bus/isa/wdxt_gen.cpp9
-rw-r--r--src/devices/bus/msx_cart/yamaha.cpp10
-rw-r--r--src/devices/bus/tiki100/hdc.cpp27
-rw-r--r--src/devices/bus/x68k/x68k_midi.cpp6
-rw-r--r--src/devices/machine/pdc.h4
-rw-r--r--src/devices/machine/wd11c00_17.h49
-rw-r--r--src/devices/machine/wd2010.h66
-rw-r--r--src/devices/machine/wd33c93.h4
-rw-r--r--src/devices/machine/wd7600.h53
-rw-r--r--src/devices/machine/x76f041.h5
-rw-r--r--src/devices/machine/x76f100.h5
-rw-r--r--src/devices/machine/ym2148.h21
-rw-r--r--src/devices/machine/ym3802.h10
-rw-r--r--src/mame/drivers/aa310.cpp8
-rw-r--r--src/mame/drivers/altos5.cpp6
-rw-r--r--src/mame/drivers/altos8600.cpp8
-rw-r--r--src/mame/drivers/apricot.cpp11
-rw-r--r--src/mame/drivers/apricotf.cpp6
-rw-r--r--src/mame/drivers/at.cpp24
-rw-r--r--src/mame/drivers/b2m.cpp4
-rw-r--r--src/mame/drivers/bbc.cpp43
-rw-r--r--src/mame/drivers/bw2.cpp6
-rw-r--r--src/mame/drivers/ccs2810.cpp2
-rw-r--r--src/mame/drivers/cmi.cpp6
-rw-r--r--src/mame/drivers/cps3.cpp4
-rw-r--r--src/mame/drivers/dgn_beta.cpp6
-rw-r--r--src/mame/drivers/fm7.cpp30
-rw-r--r--src/mame/drivers/fmtowns.cpp6
-rw-r--r--src/mame/drivers/guab.cpp4
-rw-r--r--src/mame/drivers/harriet.cpp19
-rw-r--r--src/mame/drivers/hp64k.cpp8
-rw-r--r--src/mame/drivers/hp_ipc.cpp4
-rw-r--r--src/mame/drivers/indigo.cpp6
-rw-r--r--src/mame/drivers/kaypro.cpp16
-rw-r--r--src/mame/drivers/lb186.cpp6
-rw-r--r--src/mame/drivers/magnum.cpp2
-rw-r--r--src/mame/drivers/msx.cpp43
-rw-r--r--src/mame/drivers/naomi.cpp2
-rw-r--r--src/mame/drivers/ngen.cpp50
-rw-r--r--src/mame/drivers/pg685.cpp8
-rw-r--r--src/mame/drivers/pk8020.cpp4
-rw-r--r--src/mame/drivers/r9751.cpp10
-rw-r--r--src/mame/drivers/rainbow.cpp29
-rw-r--r--src/mame/drivers/segasp.cpp2
-rw-r--r--src/mame/drivers/sorcerer.cpp8
-rw-r--r--src/mame/drivers/super6.cpp8
-rw-r--r--src/mame/drivers/super80.cpp4
-rw-r--r--src/mame/drivers/twinkle.cpp7
-rw-r--r--src/mame/drivers/unixpc.cpp6
-rw-r--r--src/mame/drivers/vector06.cpp2
-rw-r--r--src/mame/machine/k573cass.cpp43
-rw-r--r--src/mame/machine/k573cass.h4
53 files changed, 294 insertions, 449 deletions
diff --git a/src/devices/bus/isa/p1_hdc.cpp b/src/devices/bus/isa/p1_hdc.cpp
index 8b743bdac03..d0971e6c3c6 100644
--- a/src/devices/bus/isa/p1_hdc.cpp
+++ b/src/devices/bus/isa/p1_hdc.cpp
@@ -56,7 +56,8 @@ ROM_END
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(p1_hdc_device::device_add_mconfig)
+void p1_hdc_device::device_add_mconfig(machine_config &config)
+{
WD2010(config, m_hdc, 5'000'000); // XXX clock?
m_hdc->in_drdy_callback().set_constant(1);
m_hdc->in_index_callback().set_constant(1);
@@ -64,9 +65,9 @@ MACHINE_CONFIG_START(p1_hdc_device::device_add_mconfig)
m_hdc->in_tk000_callback().set_constant(1);
m_hdc->in_sc_callback().set_constant(1);
- MCFG_HARDDISK_ADD("hard0")
- MCFG_HARDDISK_ADD("hard1")
-MACHINE_CONFIG_END
+ HARDDISK(config, "hard0", 0);
+ HARDDISK(config, "hard1", 0);
+}
//-------------------------------------------------
diff --git a/src/devices/bus/isa/wdxt_gen.cpp b/src/devices/bus/isa/wdxt_gen.cpp
index 18778d5c092..690bc161f7f 100644
--- a/src/devices/bus/isa/wdxt_gen.cpp
+++ b/src/devices/bus/isa/wdxt_gen.cpp
@@ -137,7 +137,8 @@ WRITE8_MEMBER( wdxt_gen_device::ram_w )
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(wdxt_gen_device::device_add_mconfig)
+void wdxt_gen_device::device_add_mconfig(machine_config &config)
+{
mcs48_cpu_device &cpu(I8049(config, m_maincpu, 5000000));
cpu.set_addrmap(AS_IO, &wdxt_gen_device::wd1015_io);
cpu.t0_in_cb().set(m_host, FUNC(wd11c00_17_device::busy_r));
@@ -168,9 +169,9 @@ MACHINE_CONFIG_START(wdxt_gen_device::device_add_mconfig)
m_hdc->in_tk000_callback().set_constant(1);
m_hdc->in_sc_callback().set_constant(1);
- MCFG_HARDDISK_ADD("hard0")
- MCFG_HARDDISK_ADD("hard1")
-MACHINE_CONFIG_END
+ HARDDISK(config, "hard0", 0);
+ HARDDISK(config, "hard1", 0);
+}
//**************************************************************************
diff --git a/src/devices/bus/msx_cart/yamaha.cpp b/src/devices/bus/msx_cart/yamaha.cpp
index 1ba78c75af9..25152208bc9 100644
--- a/src/devices/bus/msx_cart/yamaha.cpp
+++ b/src/devices/bus/msx_cart/yamaha.cpp
@@ -58,11 +58,11 @@ MACHINE_CONFIG_START(msx_cart_sfg_device::device_add_mconfig)
MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
- MCFG_DEVICE_ADD("ym2148", YM2148, XTAL(4'000'000))
- MCFG_YM2148_TXD_HANDLER(WRITELINE("mdout", midi_port_device, write_txd))
- MCFG_YM2148_PORT_WRITE_HANDLER(WRITE8("kbdc", msx_audio_kbdc_port_device, write))
- MCFG_YM2148_PORT_READ_HANDLER(READ8("kbdc", msx_audio_kbdc_port_device, read))
- MCFG_YM2148_IRQ_HANDLER(WRITELINE(*this, msx_cart_sfg_device, ym2148_irq_w))
+ YM2148(config, m_ym2148, XTAL(4'000'000));
+ m_ym2148->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
+ m_ym2148->port_write_handler().set("kbdc", FUNC(msx_audio_kbdc_port_device::write));
+ m_ym2148->port_read_handler().set("kbdc", FUNC(msx_audio_kbdc_port_device::read));
+ m_ym2148->irq_handler().set(FUNC(msx_cart_sfg_device::ym2148_irq_w));
MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, nullptr)
diff --git a/src/devices/bus/tiki100/hdc.cpp b/src/devices/bus/tiki100/hdc.cpp
index 9a0b10384c7..9a997119935 100644
--- a/src/devices/bus/tiki100/hdc.cpp
+++ b/src/devices/bus/tiki100/hdc.cpp
@@ -27,21 +27,22 @@ DEFINE_DEVICE_TYPE(TIKI100_HDC, tiki100_hdc_device, "tiki100_hdc", "TIKI-100 Win
//-------------------------------------------------
-// MACHINE_CONFIG_START( tiki100_hdc )
+// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(tiki100_hdc_device::device_add_mconfig)
- MCFG_DEVICE_ADD(WD1010_TAG, WD2010, 5000000)
- //MCFG_WD2010_OUT_INTRQ_CB()
- MCFG_WD2010_IN_DRDY_CB(CONSTANT(1))
- MCFG_WD2010_IN_INDEX_CB(CONSTANT(1))
- MCFG_WD2010_IN_WF_CB(CONSTANT(1))
- MCFG_WD2010_IN_TK000_CB(CONSTANT(1))
- MCFG_WD2010_IN_SC_CB(CONSTANT(1))
-
- MCFG_HARDDISK_ADD("hard0")
- MCFG_HARDDISK_ADD("hard1")
-MACHINE_CONFIG_END
+void tiki100_hdc_device::device_add_mconfig(machine_config & config)
+{
+ WD2010(config, m_hdc, 5000000);
+ //m_hdc->out_intr_callback().set();
+ m_hdc->in_drdy_callback().set_constant(1);
+ m_hdc->in_index_callback().set_constant(1);
+ m_hdc->in_wf_callback().set_constant(1);
+ m_hdc->in_tk000_callback().set_constant(1);
+ m_hdc->in_sc_callback().set_constant(1);
+
+ HARDDISK(config, "hard0", 0);
+ HARDDISK(config, "hard1", 0);
+}
diff --git a/src/devices/bus/x68k/x68k_midi.cpp b/src/devices/bus/x68k/x68k_midi.cpp
index be26ef9f1df..b4f27554b70 100644
--- a/src/devices/bus/x68k/x68k_midi.cpp
+++ b/src/devices/bus/x68k/x68k_midi.cpp
@@ -18,9 +18,9 @@
DEFINE_DEVICE_TYPE(X68K_MIDI, x68k_midi_device, "x68k_midi", "X68000 MIDI Interface")
MACHINE_CONFIG_START(x68k_midi_device::device_add_mconfig)
- MCFG_DEVICE_ADD("midi", YM3802, XTAL(1'000'000)) // clock is unknown
- MCFG_YM3802_TXD_HANDLER(WRITELINE("mdout",midi_port_device,write_txd))
- MCFG_YM3802_IRQ_HANDLER(WRITELINE(*this, x68k_midi_device,irq_w))
+ YM3802(config, m_midi, XTAL(1'000'000)); // clock is unknown
+ m_midi->txd_handler().set("mdout", FUNC(midi_port_device::write_txd));
+ m_midi->irq_handler().set(FUNC(x68k_midi_device::irq_w));
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
// MCFG_MIDI_PORT_ADD("mdthru", midiout_slot, "midiout")
diff --git a/src/devices/machine/pdc.h b/src/devices/machine/pdc.h
index 984f93b27b5..fad97e2c724 100644
--- a/src/devices/machine/pdc.h
+++ b/src/devices/machine/pdc.h
@@ -37,8 +37,8 @@ public:
pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
/* Callbacks */
- template <class Object> devcb_base &m68k_r_callback(Object &&cb) { return m_m68k_r_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &m68k_w_callback(Object &&cb) { return m_m68k_w_cb.set_callback(std::forward<Object>(cb)); }
+ auto m68k_r_callback() { return m_m68k_r_cb.bind(); }
+ auto m68k_w_callback() { return m_m68k_w_cb.bind(); }
/* Read and Write members */
DECLARE_WRITE_LINE_MEMBER(hdd_irq);
diff --git a/src/devices/machine/wd11c00_17.h b/src/devices/machine/wd11c00_17.h
index c0fb4391924..e109c548202 100644
--- a/src/devices/machine/wd11c00_17.h
+++ b/src/devices/machine/wd11c00_17.h
@@ -12,44 +12,6 @@
#pragma once
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_WD11C00_17_OUT_IRQ5_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_out_irq5_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_OUT_DRQ3_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_out_drq3_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_OUT_MR_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_out_mr_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_OUT_BUSY_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_out_busy_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_OUT_REQ_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_out_req_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_OUT_RA3_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_out_ra3_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_IN_RD322_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_in_rd322_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_IN_RAMCS_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_in_ramcs_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_OUT_RAMWR_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_out_ramwr_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_IN_CS1010_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_in_cs1010_callback(DEVCB_##_devcb);
-
-#define MCFG_WD11C00_17_OUT_CS1010_CB(_devcb) \
- downcast<wd11c00_17_device &>(*device).set_out_cs1010_callback(DEVCB_##_devcb);
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -62,17 +24,6 @@ public:
// construction/destruction
wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_out_irq5_callback(Object &&cb) { return m_out_irq5_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_drq3_callback(Object &&cb) { return m_out_drq3_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_mr_callback(Object &&cb) { return m_out_mr_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_busy_callback(Object &&cb) { return m_out_busy_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_req_callback(Object &&cb) { return m_out_req_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_ra3_callback(Object &&cb) { return m_out_ra3_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_rd322_callback(Object &&cb) { return m_in_rd322_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_ramcs_callback(Object &&cb) { return m_in_ramcs_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_ramwr_callback(Object &&cb) { return m_out_ramwr_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_cs1010_callback(Object &&cb) { return m_in_cs1010_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_cs1010_callback(Object &&cb) { return m_out_cs1010_cb.set_callback(std::forward<Object>(cb)); }
auto out_irq5_callback() { return m_out_irq5_cb.bind(); }
auto out_drq3_callback() { return m_out_drq3_cb.bind(); }
auto out_mr_callback() { return m_out_mr_cb.bind(); }
diff --git a/src/devices/machine/wd2010.h b/src/devices/machine/wd2010.h
index 5cba995b3da..fdfc2c4462c 100644
--- a/src/devices/machine/wd2010.h
+++ b/src/devices/machine/wd2010.h
@@ -12,57 +12,6 @@
#pragma once
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_WD2010_OUT_INTRQ_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_out_intrq_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_OUT_BDRQ_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_out_bdrq_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_OUT_BCR_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_out_bcr_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_IN_BRDY_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_in_brdy_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_IN_BCS_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_in_bcs_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_OUT_BCS_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_out_bcs_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_OUT_DIRIN_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_out_dirin_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_OUT_STEP_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_out_step_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_OUT_RWC_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_out_rwc_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_OUT_WG_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_out_wg_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_IN_DRDY_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_in_drdy_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_IN_INDEX_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_in_index_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_IN_WF_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_in_wf_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_IN_TK000_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_in_tk000_callback(DEVCB_##_devcb);
-
-#define MCFG_WD2010_IN_SC_CB(_devcb) \
- downcast<wd2010_device &>(*device).set_in_sc_callback(DEVCB_##_devcb);
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -75,21 +24,6 @@ public:
// construction/destruction
wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template <class Object> devcb_base &set_out_intrq_callback(Object &&cb) { return m_out_intrq_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_bdrq_callback(Object &&cb) { return m_out_bdrq_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_bcr_callback(Object &&cb) { return m_out_bcr_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_brdy_callback(Object &&cb) { return m_in_brdy_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_bcs_callback(Object &&cb) { return m_in_bcs_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_bcs_callback(Object &&cb) { return m_out_bcs_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_dirin_callback(Object &&cb) { return m_out_dirin_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_step_callback(Object &&cb) { return m_out_step_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_rwc_callback(Object &&cb) { return m_out_rwc_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_out_wg_callback(Object &&cb) { return m_out_wg_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_drdy_callback(Object &&cb) { return m_in_drdy_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_index_callback(Object &&cb) { return m_in_index_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_wf_callback(Object &&cb) { return m_in_wf_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_tk000_callback(Object &&cb) { return m_in_tk000_cb.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_in_sc_callback(Object &&cb) { return m_in_sc_cb.set_callback(std::forward<Object>(cb)); }
auto out_intrq_callback() { return m_out_intrq_cb.bind(); }
auto out_bdrq_callback() { return m_out_bdrq_cb.bind(); }
auto out_bcr_callback() { return m_out_bcr_cb.bind(); }
diff --git a/src/devices/machine/wd33c93.h b/src/devices/machine/wd33c93.h
index d7d14d91e37..f59169602c6 100644
--- a/src/devices/machine/wd33c93.h
+++ b/src/devices/machine/wd33c93.h
@@ -12,9 +12,6 @@
#include "legscsi.h"
-#define MCFG_WD33C93_IRQ_CB(cb) \
- downcast<wd33c93_device &>(*device).set_irq_callback((DEVCB_##cb));
-
class wd33c93_device : public legacy_scsi_host_adapter
{
public:
@@ -26,7 +23,6 @@ public:
wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- template<class Object> devcb_base &set_irq_callback(Object &&cb) { return m_irq_cb.set_callback(std::forward<Object>(cb)); }
auto irq_cb() { return m_irq_cb.bind(); }
DECLARE_READ8_MEMBER(read);
diff --git a/src/devices/machine/wd7600.h b/src/devices/machine/wd7600.h
index 40dbb379340..1cacdf6cb23 100644
--- a/src/devices/machine/wd7600.h
+++ b/src/devices/machine/wd7600.h
@@ -19,41 +19,6 @@
#include "machine/ram.h"
-#define MCFG_WD7600_ADD(_tag, _clock, _cputag, _isatag, _biostag, _keybctag) \
- MCFG_DEVICE_ADD(_tag, WD7600, _clock) \
- downcast<wd7600_device &>(*device).set_cputag(_cputag); \
- downcast<wd7600_device &>(*device).set_isatag(_isatag); \
- downcast<wd7600_device &>(*device).set_biostag(_biostag); \
- downcast<wd7600_device &>(*device).set_keybctag(_keybctag);
-
-#define MCFG_WD7600_IOR(_ior) \
- downcast<wd7600_device *>(device)->set_ior_callback(DEVCB_##_ior);
-
-#define MCFG_WD7600_IOW(_iow) \
- downcast<wd7600_device *>(device)->set_iow_callback(DEVCB_##_iow);
-
-#define MCFG_WD7600_TC(_tc) \
- downcast<wd7600_device *>(device)->set_tc_callback(DEVCB_##_tc);
-
-#define MCFG_WD7600_HOLD(_hold) \
- downcast<wd7600_device *>(device)->set_hold_callback(DEVCB_##_hold);
-
-#define MCFG_WD7600_NMI(_nmi) \
- downcast<wd7600_device *>(device)->set_nmi_callback(DEVCB_##_nmi);
-
-#define MCFG_WD7600_INTR(_intr) \
- downcast<wd7600_device *>(device)->set_intr_callback(DEVCB_##_intr);
-
-#define MCFG_WD7600_CPURESET(_cpureset) \
- downcast<wd7600_device *>(device)->set_cpureset_callback(DEVCB_##_cpureset);
-
-#define MCFG_WD7600_A20M(_a20m) \
- downcast<wd7600_device *>(device)->set_a20m_callback(DEVCB_##_a20m);
-
-#define MCFG_WD7600_SPKR(_spkr) \
- downcast<wd7600_device *>(device)->set_spkr_callback(DEVCB_##_spkr);
-
-
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@@ -67,15 +32,15 @@ public:
wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// callbacks
- template <class Object> devcb_base &set_ior_callback(Object &&ior) { return m_read_ior.set_callback(std::forward<Object>(ior)); }
- template <class Object> devcb_base &set_iow_callback(Object &&iow) { return m_write_iow.set_callback(std::forward<Object>(iow)); }
- template <class Object> devcb_base &set_tc_callback(Object &&tc) { return m_write_tc.set_callback(std::forward<Object>(tc)); }
- template <class Object> devcb_base &set_hold_callback(Object &&hold) { return m_write_hold.set_callback(std::forward<Object>(hold)); }
- template <class Object> devcb_base &set_cpureset_callback(Object &&cpureset) { return m_write_cpureset.set_callback(std::forward<Object>(cpureset)); }
- template <class Object> devcb_base &set_nmi_callback(Object &&nmi) { return m_write_nmi.set_callback(std::forward<Object>(nmi)); }
- template <class Object> devcb_base &set_intr_callback(Object &&intr) { return m_write_intr.set_callback(std::forward<Object>(intr)); }
- template <class Object> devcb_base &set_a20m_callback(Object &&a20m) { return m_write_a20m.set_callback(std::forward<Object>(a20m)); }
- template <class Object> devcb_base &set_spkr_callback(Object &&spkr) { return m_write_spkr.set_callback(std::forward<Object>(spkr)); }
+ auto ior_callback() { return m_read_ior.bind(); }
+ auto iow_callback() { return m_write_iow.bind(); }
+ auto tc_callback() { return m_write_tc.bind(); }
+ auto hold_callback() { return m_write_hold.bind(); }
+ auto cpureset_callback() { return m_write_cpureset.bind(); }
+ auto nmi_callback() { return m_write_nmi.bind(); }
+ auto intr_callback() { return m_write_intr.bind(); }
+ auto a20m_callback() { return m_write_a20m.bind(); }
+ auto spkr_callback() { return m_write_spkr.bind(); }
// inline configuration
template <typename T> void set_cputag(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); }
diff --git a/src/devices/machine/x76f041.h b/src/devices/machine/x76f041.h
index 8ccce9ba035..af487f75a1d 100644
--- a/src/devices/machine/x76f041.h
+++ b/src/devices/machine/x76f041.h
@@ -13,15 +13,12 @@
#pragma once
-#define MCFG_X76F041_ADD( _tag ) \
- MCFG_DEVICE_ADD( _tag, X76F041, 0 )
-
class x76f041_device : public device_t,
public device_nvram_interface
{
public:
// construction/destruction
- x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock );
+ x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
DECLARE_WRITE_LINE_MEMBER( write_cs );
DECLARE_WRITE_LINE_MEMBER( write_rst );
diff --git a/src/devices/machine/x76f100.h b/src/devices/machine/x76f100.h
index 8757ed4f7eb..acec66e9c62 100644
--- a/src/devices/machine/x76f100.h
+++ b/src/devices/machine/x76f100.h
@@ -13,14 +13,11 @@
#pragma once
-#define MCFG_X76F100_ADD( tag ) \
- MCFG_DEVICE_ADD( (tag), X76F100, 0 )
-
class x76f100_device : public device_t, public device_nvram_interface
{
public:
// construction/destruction
- x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock );
+ x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
DECLARE_WRITE_LINE_MEMBER( write_cs );
DECLARE_WRITE_LINE_MEMBER( write_rst );
diff --git a/src/devices/machine/ym2148.h b/src/devices/machine/ym2148.h
index 3e554cec240..ace9248054c 100644
--- a/src/devices/machine/ym2148.h
+++ b/src/devices/machine/ym2148.h
@@ -19,19 +19,6 @@
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
-#define MCFG_YM2148_TXD_HANDLER(_devcb) \
- downcast<ym2148_device &>(*device).set_txd_handler(DEVCB_##_devcb);
-
-#define MCFG_YM2148_PORT_WRITE_HANDLER(_devcb) \
- downcast<ym2148_device &>(*device).set_port_write_handler(DEVCB_##_devcb);
-
-#define MCFG_YM2148_PORT_READ_HANDLER(_devcb) \
- downcast<ym2148_device &>(*device).set_port_read_handler(DEVCB_##_devcb);
-
-#define MCFG_YM2148_IRQ_HANDLER(_devcb) \
- downcast<ym2148_device &>(*device).set_irq_handler(DEVCB_##_devcb);
-
-
class ym2148_device : public device_t, public device_serial_interface
{
public:
@@ -39,10 +26,10 @@ public:
ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration helpers
- template <class Object> devcb_base &set_txd_handler(Object &&cb) { return m_txd_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_port_write_handler(Object &&cb) { return m_port_write_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_port_read_handler(Object &&cb) { return m_port_read_handler.set_callback(std::forward<Object>(cb)); }
- template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
+ auto txd_handler() { return m_txd_handler.bind(); }
+ auto port_write_handler() { return m_port_write_handler.bind(); }
+ auto port_read_handler() { return m_port_read_handler.bind(); }
+ auto irq_handler() { return m_irq_handler.bind(); }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
diff --git a/src/devices/machine/ym3802.h b/src/devices/machine/ym3802.h
index f1f827cb619..31301fab4f1 100644
--- a/src/devices/machine/ym3802.h
+++ b/src/devices/machine/ym3802.h
@@ -23,12 +23,6 @@
#include <queue>
-#define MCFG_YM3802_IRQ_HANDLER(_devcb) \
- downcast<ym3802_device &>(*device).set_irq_handler(DEVCB_##_devcb);
-
-#define MCFG_YM3802_TXD_HANDLER(_devcb) \
- downcast<ym3802_device &>(*device).set_txd_handler(DEVCB_##_devcb);
-
class ym3802_device : public device_t, public device_serial_interface
{
public:
@@ -36,8 +30,8 @@ public:
ym3802_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_txd_handler(Object &&cb) { return m_txd_handler.set_callback(std::forward<Object>(cb)); }
+ auto irq_handler() { return m_irq_handler.bind(); }
+ auto txd_handler() { return m_txd_handler.bind(); }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
diff --git a/src/mame/drivers/aa310.cpp b/src/mame/drivers/aa310.cpp
index 0e88415e344..408e258ed4d 100644
--- a/src/mame/drivers/aa310.cpp
+++ b/src/mame/drivers/aa310.cpp
@@ -426,10 +426,10 @@ MACHINE_CONFIG_START(aa310_state::aa310)
RAM(config, m_ram).set_default_size("1M");
- MCFG_DEVICE_ADD("fdc", WD1772, 8000000 / 1) // TODO: frequency
- MCFG_WD_FDC_DISABLE_MOTOR_CONTROL
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, aa310_state, aa310_wd177x_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, aa310_state, aa310_wd177x_drq_w))
+ wd1772_device& fdc(WD1772(config, "fdc", 8000000 / 1)); // TODO: frequency
+ fdc.set_disable_motor_control(true);
+ fdc.intrq_wr_callback().set(FUNC(aa310_state::aa310_wd177x_intrq_w));
+ fdc.drq_wr_callback().set(FUNC(aa310_state::aa310_wd177x_drq_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", aa310_floppies, "35dd", aa310_state::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", aa310_floppies, nullptr, aa310_state::floppy_formats) // rarely had 2nd FDD installed, space was used for HDD
diff --git a/src/mame/drivers/altos5.cpp b/src/mame/drivers/altos5.cpp
index c81fd7e1f4c..df01069142a 100644
--- a/src/mame/drivers/altos5.cpp
+++ b/src/mame/drivers/altos5.cpp
@@ -468,9 +468,9 @@ MACHINE_CONFIG_START(altos5_state::altos5)
MCFG_RS232_DCD_HANDLER(WRITELINE("sio", z80sio_device, dcdb_w))
MCFG_RS232_CTS_HANDLER(WRITELINE("sio", z80sio_device, ctsb_w))
- MCFG_DEVICE_ADD("fdc", FD1797, 8_MHz_XTAL / 8)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, altos5_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(m_dma, z80dma_device, rdy_w))
+ FD1797(config, m_fdc, 8_MHz_XTAL / 8);
+ m_fdc->intrq_wr_callback().set(FUNC(altos5_state::fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(m_dma, FUNC(z80dma_device::rdy_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", altos5_floppies, "525qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", altos5_floppies, "525qd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/altos8600.cpp b/src/mame/drivers/altos8600.cpp
index 91e7e5800f8..9560c0163c5 100644
--- a/src/mame/drivers/altos8600.cpp
+++ b/src/mame/drivers/altos8600.cpp
@@ -776,7 +776,7 @@ MACHINE_CONFIG_START(altos8600_state::altos8600)
MCFG_RS232_DCD_HANDLER(WRITELINE(m_uart8274, i8274_new_device, dcdb_w))
MCFG_RS232_CTS_HANDLER(WRITELINE(m_uart8274, i8274_new_device, ctsb_w))
- MCFG_DEVICE_ADD("ppi", I8255A, 0)
+ I8255A(config, "ppi", 0);
pit8253_device &pit(PIT8253(config, "pit", 0));
pit.set_clk<0>(1228800);
@@ -787,9 +787,9 @@ MACHINE_CONFIG_START(altos8600_state::altos8600)
pit.set_clk<2>(1228800);
pit.out_handler<1>().set(m_pic1, FUNC(pic8259_device::ir1_w));
- MCFG_DEVICE_ADD("fd1797", FD1797, 2000000)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE("pic8259_2", pic8259_device, ir1_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, altos8600_state, fddrq_w))
+ FD1797(config, m_fdc, 2000000);
+ m_fdc->intrq_wr_callback().set(m_pic2, FUNC(pic8259_device::ir1_w));
+ m_fdc->drq_wr_callback().set(FUNC(altos8600_state::fddrq_w));
MCFG_FLOPPY_DRIVE_ADD("fd1797:0", altos8600_floppies, "8dd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fd1797:1", altos8600_floppies, "8dd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fd1797:2", altos8600_floppies, "8dd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/apricot.cpp b/src/mame/drivers/apricot.cpp
index 43fd3b0200b..4578a5f35cc 100644
--- a/src/mame/drivers/apricot.cpp
+++ b/src/mame/drivers/apricot.cpp
@@ -458,9 +458,9 @@ MACHINE_CONFIG_START(apricot_state::apricot)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
// floppy
- MCFG_DEVICE_ADD("ic68", WD2797, 4_MHz_XTAL / 2)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, apricot_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE("ic71", i8089_device, drq1_w))
+ WD2797(config, m_fdc, 4_MHz_XTAL / 2);
+ m_fdc->intrq_wr_callback().set(FUNC(apricot_state::fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(m_iop, FUNC(i8089_device::drq1_w));
MCFG_FLOPPY_DRIVE_ADD("ic68:0", apricot_floppies, "d32w", apricot_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("ic68:1", apricot_floppies, "d32w", apricot_state::floppy_formats)
@@ -473,9 +473,10 @@ MACHINE_CONFIG_START(apricot_state::apricot)
MCFG_EXPANSION_SLOT_ADD("exp:2", apricot_expansion_cards, nullptr)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(apricot_state::apricotxi)
+void apricot_state::apricotxi(machine_config &config)
+{
apricot(config);
-MACHINE_CONFIG_END
+}
//**************************************************************************
diff --git a/src/mame/drivers/apricotf.cpp b/src/mame/drivers/apricotf.cpp
index 924dcc76594..c569ba937f7 100644
--- a/src/mame/drivers/apricotf.cpp
+++ b/src/mame/drivers/apricotf.cpp
@@ -383,9 +383,9 @@ MACHINE_CONFIG_START(f1_state::act_f1)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
// floppy
- MCFG_DEVICE_ADD(WD2797_TAG, WD2797, 4_MHz_XTAL / 2 /* ? */)
- MCFG_WD_FDC_INTRQ_CALLBACK(INPUTLINE(I8086_TAG, INPUT_LINE_NMI))
- MCFG_WD_FDC_DRQ_CALLBACK(INPUTLINE(I8086_TAG, INPUT_LINE_TEST))
+ WD2797(config, m_fdc, 4_MHz_XTAL / 2 /* ? */);
+ m_fdc->intrq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_fdc->drq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_TEST);
MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG ":0", apricotf_floppies, "d32w", f1_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG ":1", apricotf_floppies, "d32w", f1_state::floppy_formats)
diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp
index 91014f6728c..979a4e5ccde 100644
--- a/src/mame/drivers/at.cpp
+++ b/src/mame/drivers/at.cpp
@@ -634,18 +634,22 @@ MACHINE_CONFIG_START(megapc_state::megapc)
MCFG_DEVICE_IO_MAP(megapc_io)
MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("wd7600", wd7600_device, intack_cb)
- MCFG_WD7600_ADD("wd7600", 50_MHz_XTAL / 2, ":maincpu", ":isa", ":bios", ":keybc")
- MCFG_WD7600_HOLD(WRITELINE(*this, megapc_state, wd7600_hold));
- MCFG_WD7600_NMI(INPUTLINE("maincpu", INPUT_LINE_NMI));
- MCFG_WD7600_INTR(INPUTLINE("maincpu", INPUT_LINE_IRQ0));
- MCFG_WD7600_CPURESET(INPUTLINE("maincpu", INPUT_LINE_RESET));
- MCFG_WD7600_A20M(INPUTLINE("maincpu", INPUT_LINE_A20));
+ WD7600(config, m_wd7600, 50_MHz_XTAL / 2);
+ m_wd7600->set_cputag(":maincpu");
+ m_wd7600->set_isatag(":isa");
+ m_wd7600->set_biostag(":bios");
+ m_wd7600->set_keybctag(":keybc");
+ m_wd7600->hold_callback().set(FUNC(megapc_state::wd7600_hold));
+ m_wd7600->nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
+ m_wd7600->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ m_wd7600->cpureset_callback().set_inputline(m_maincpu, INPUT_LINE_RESET);
+ m_wd7600->a20m_callback().set_inputline(m_maincpu, INPUT_LINE_A20);
// isa dma
- MCFG_WD7600_IOR(READ16(*this, megapc_state, wd7600_ior))
- MCFG_WD7600_IOW(WRITE16(*this, megapc_state, wd7600_iow))
- MCFG_WD7600_TC(WRITE8(*this, megapc_state, wd7600_tc))
+ m_wd7600->ior_callback().set(FUNC(megapc_state::wd7600_ior));
+ m_wd7600->iow_callback().set(FUNC(megapc_state::wd7600_iow));
+ m_wd7600->tc_callback().set(FUNC(megapc_state::wd7600_tc));
// speaker
- MCFG_WD7600_SPKR(WRITELINE(*this, megapc_state, wd7600_spkr))
+ m_wd7600->spkr_callback().set(FUNC(megapc_state::wd7600_spkr));
// on board devices
MCFG_DEVICE_ADD("isabus", ISA16, 0)
diff --git a/src/mame/drivers/b2m.cpp b/src/mame/drivers/b2m.cpp
index 7fa08c09810..e3584d0b747 100644
--- a/src/mame/drivers/b2m.cpp
+++ b/src/mame/drivers/b2m.cpp
@@ -242,8 +242,8 @@ MACHINE_CONFIG_START(b2m_state::b2m)
/* uart */
MCFG_DEVICE_ADD("uart", I8251, 0)
- MCFG_DEVICE_ADD("fd1793", FD1793, 8_MHz_XTAL / 8)
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, b2m_state, b2m_fdc_drq))
+ FD1793(config, m_fdc, 8_MHz_XTAL / 8);
+ m_fdc->drq_wr_callback().set(FUNC(b2m_state::b2m_fdc_drq));
MCFG_FLOPPY_DRIVE_ADD("fd0", b2m_floppies, "525qd", b2m_state::b2m_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fd1", b2m_floppies, "525qd", b2m_state::b2m_floppy_formats)
diff --git a/src/mame/drivers/bbc.cpp b/src/mame/drivers/bbc.cpp
index c8a761bcb4d..af78c26ebe6 100644
--- a/src/mame/drivers/bbc.cpp
+++ b/src/mame/drivers/bbc.cpp
@@ -1053,9 +1053,9 @@ MACHINE_CONFIG_START(bbc_state::bbcbp)
/* fdc */
MCFG_DEVICE_REMOVE("fdc")
- MCFG_DEVICE_ADD("wd1770", WD1770, 16_MHz_XTAL / 2)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, bbc_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, bbc_state, fdc_drq_w))
+ WD1770(config, m_wd1770, 16_MHz_XTAL / 2);
+ m_wd1770->intrq_wr_callback().set(FUNC(bbc_state::fdc_intrq_w));
+ m_wd1770->drq_wr_callback().set(FUNC(bbc_state::fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD("wd1770:0", bbc_floppies_525, "525qd", bbc_state::floppy_formats_bbc)
MCFG_FLOPPY_DRIVE_SOUND(true)
@@ -1252,7 +1252,7 @@ MACHINE_CONFIG_START(bbc_state::reutapm)
MCFG_DEVICE_REMOVE( "cassette" )
/* fdc */
- MCFG_DEVICE_REMOVE("wd1770")
+ config.device_remove("wd1770");
/* software lists */
MCFG_SOFTWARE_LIST_REMOVE("cass_ls_a")
@@ -1272,25 +1272,26 @@ MACHINE_CONFIG_END
****************************************************************************/
-MACHINE_CONFIG_START(bbc_state::econx25)
+void bbc_state::econx25(machine_config &config)
+{
bbcbp(config);
/* sound hardware */
- MCFG_DEVICE_REMOVE("vsm")
- MCFG_DEVICE_REMOVE("tms5220")
+ config.device_remove("vsm");
+ config.device_remove("tms5220");
/* fdc */
- //MCFG_DEVICE_REMOVE("wd1770")
+ //config.device_remove("wd1770");
/* Add Econet X25 Gateway co-processor */
//MCFG_DEVICE_MODIFY("tube")
//MCFG_DEVICE_SLOT_INTERFACE(bbc_x25tube_devices, "x25", true)
/* software lists */
- MCFG_SOFTWARE_LIST_REMOVE("cass_ls_a")
- MCFG_SOFTWARE_LIST_REMOVE("cass_ls_b")
- MCFG_SOFTWARE_LIST_REMOVE("flop_ls_b")
- MCFG_SOFTWARE_LIST_REMOVE("flop_ls_b_orig")
-MACHINE_CONFIG_END
+ config.device_remove("cass_ls_a");
+ config.device_remove("cass_ls_b");
+ config.device_remove("flop_ls_b");
+ config.device_remove("flop_ls_b_orig");
+}
/***************************************************************************
@@ -1418,9 +1419,9 @@ MACHINE_CONFIG_START(bbc_state::bbcm)
m_via6522_1->irq_handler().set("irqs", FUNC(input_merger_device::in_w<2>));
/* fdc */
- MCFG_DEVICE_ADD("wd1770", WD1770, 16_MHz_XTAL / 2)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, bbc_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, bbc_state, fdc_drq_w))
+ WD1770(config, m_wd1770, 16_MHz_XTAL / 2);
+ m_wd1770->intrq_wr_callback().set(FUNC(bbc_state::fdc_intrq_w));
+ m_wd1770->drq_wr_callback().set(FUNC(bbc_state::fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD("wd1770:0", bbc_floppies_525, "525qd", bbc_state::floppy_formats_bbc)
MCFG_FLOPPY_DRIVE_SOUND(true)
@@ -1508,7 +1509,7 @@ MACHINE_CONFIG_START(bbc_state::bbcmet)
MCFG_DEVICE_REMOVE("via6522_1")
/* fdc */
- MCFG_DEVICE_REMOVE("wd1770")
+ config.device_remove("wd1770");
/* expansion ports */
MCFG_DEVICE_REMOVE("analogue")
@@ -1615,11 +1616,11 @@ MACHINE_CONFIG_START(bbc_state::bbcmc)
MCFG_DEVICE_REMOVE("cassette")
/* fdc */
- MCFG_DEVICE_REMOVE("wd1770")
+ config.device_remove("wd1770");
- MCFG_DEVICE_ADD("wd1772", WD1772, 16_MHz_XTAL / 2)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, bbc_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, bbc_state, fdc_drq_w))
+ wd1772_device& wd1772(WD1772(config, "wd1772", 16_MHz_XTAL / 2));
+ wd1772.intrq_wr_callback().set(FUNC(bbc_state::fdc_intrq_w));
+ wd1772.drq_wr_callback().set(FUNC(bbc_state::fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD_FIXED("wd1772:0", bbc_floppies_35, "35dd", bbc_state::floppy_formats_bbc)
MCFG_FLOPPY_DRIVE_SOUND(true)
diff --git a/src/mame/drivers/bw2.cpp b/src/mame/drivers/bw2.cpp
index 6dce244ec2c..55dd940c817 100644
--- a/src/mame/drivers/bw2.cpp
+++ b/src/mame/drivers/bw2.cpp
@@ -593,9 +593,9 @@ MACHINE_CONFIG_START(bw2_state::bw2)
MCFG_RS232_RXD_HANDLER(WRITELINE(m_uart, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(WRITELINE(m_uart, i8251_device, write_dsr))
- MCFG_DEVICE_ADD(WD2797_TAG, WD2797, 16_MHz_XTAL / 16)
- MCFG_WD_FDC_INTRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, bw2_state, fdc_drq_w))
+ WD2797(config, m_fdc, 16_MHz_XTAL / 16);
+ m_fdc->intrq_wr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ m_fdc->drq_wr_callback().set(FUNC(bw2_state::fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":0", bw2_floppies, "35dd", bw2_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":1", bw2_floppies, nullptr, bw2_state::floppy_formats)
diff --git a/src/mame/drivers/ccs2810.cpp b/src/mame/drivers/ccs2810.cpp
index bf5ad539207..3067d72d8d0 100644
--- a/src/mame/drivers/ccs2810.cpp
+++ b/src/mame/drivers/ccs2810.cpp
@@ -954,7 +954,7 @@ MACHINE_CONFIG_START(ccs_state::ccs2422)
rs232.dsr_handler().set(m_ins8250, FUNC(ins8250_device::dsr_w));
rs232.cts_handler().set(m_ins8250, FUNC(ins8250_device::cts_w));
- MCFG_DEVICE_ADD("fdc", MB8877, 16_MHz_XTAL / 8) // UB1793 or MB8877
+ MB8877(config, m_fdc, 16_MHz_XTAL / 8); // UB1793 or MB8877
MCFG_FLOPPY_DRIVE_ADD("fdc:0", ccs_floppies, "8sssd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cmi.cpp b/src/mame/drivers/cmi.cpp
index 32ec546c762..d5c8d1a72dd 100644
--- a/src/mame/drivers/cmi.cpp
+++ b/src/mame/drivers/cmi.cpp
@@ -2280,9 +2280,9 @@ MACHINE_CONFIG_START(cmi_state::cmi2x)
PTM6840(config, m_cmi07_ptm, 2000000); // ptm_cmi07_config TODO
m_cmi07_ptm->irq_callback().set(FUNC(cmi_state::cmi07_irq));
- MCFG_DEVICE_ADD("wd1791", FD1791, 16_MHz_XTAL / 8) // wd1791_interface
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, cmi_state, wd1791_irq))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, cmi_state, wd1791_drq))
+ FD1791(config, m_wd1791, 16_MHz_XTAL / 8); // wd1791_interface
+ m_wd1791->intrq_wr_callback().set(FUNC(cmi_state::wd1791_irq));
+ m_wd1791->drq_wr_callback().set(FUNC(cmi_state::wd1791_drq));
MCFG_FLOPPY_DRIVE_ADD("wd1791:0", cmi2x_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("wd1791:1", cmi2x_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/cps3.cpp b/src/mame/drivers/cps3.cpp
index c5a5df501d1..2f553916f1a 100644
--- a/src/mame/drivers/cps3.cpp
+++ b/src/mame/drivers/cps3.cpp
@@ -2527,8 +2527,8 @@ MACHINE_CONFIG_START(cps3_state::cps3)
MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0)
MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "cdrom", SCSICD, SCSI_ID_1)
- MCFG_DEVICE_ADD("wd33c93", WD33C93, 0)
- MCFG_LEGACY_SCSI_PORT("scsi")
+ wd33c93_device& wd33c93(WD33C93(config, "wd33c93"));
+ wd33c93.set_scsi_port("scsi");
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/dgn_beta.cpp b/src/mame/drivers/dgn_beta.cpp
index 7a13d7febea..ab378c6b577 100644
--- a/src/mame/drivers/dgn_beta.cpp
+++ b/src/mame/drivers/dgn_beta.cpp
@@ -372,9 +372,9 @@ MACHINE_CONFIG_START(dgn_beta_state::dgnbeta)
m_pia_2->irqa_handler().set(FUNC(dgn_beta_state::d_pia2_irq_a));
m_pia_2->irqb_handler().set(FUNC(dgn_beta_state::d_pia2_irq_b));
- MCFG_DEVICE_ADD(FDC_TAG, WD2797, 1_MHz_XTAL)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, dgn_beta_state, dgnbeta_fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, dgn_beta_state, dgnbeta_fdc_drq_w))
+ WD2797(config, m_fdc, 1_MHz_XTAL);
+ m_fdc->intrq_wr_callback().set(FUNC(dgn_beta_state::dgnbeta_fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(dgn_beta_state::dgnbeta_fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD(FDC_TAG ":0", dgnbeta_floppies, "dd", dgn_beta_state::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
diff --git a/src/mame/drivers/fm7.cpp b/src/mame/drivers/fm7.cpp
index af3925e02a6..4174e50ab4d 100644
--- a/src/mame/drivers/fm7.cpp
+++ b/src/mame/drivers/fm7.cpp
@@ -2068,9 +2068,9 @@ MACHINE_CONFIG_START(fm7_state::fm7)
MCFG_SOFTWARE_LIST_ADD("cass_list","fm7_cass")
- MCFG_DEVICE_ADD("fdc", MB8877, 8_MHz_XTAL / 8)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_drq_w))
+ MB8877(config, m_fdc, 8_MHz_XTAL / 8);
+ m_fdc->intrq_wr_callback().set(FUNC(fm7_state::fm7_fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(fm7_state::fm7_fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
@@ -2117,9 +2117,9 @@ MACHINE_CONFIG_START(fm7_state::fm8)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_CASSETTE_INTERFACE("fm7_cass")
- MCFG_DEVICE_ADD("fdc", MB8877, 8_MHz_XTAL / 8)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_drq_w))
+ MB8877(config, m_fdc, 8_MHz_XTAL / 8);
+ m_fdc->intrq_wr_callback().set(FUNC(fm7_state::fm7_fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(fm7_state::fm7_fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
@@ -2176,9 +2176,9 @@ MACHINE_CONFIG_START(fm7_state::fm77av)
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("cass_list", "fm7_cass")
- MCFG_DEVICE_ADD("fdc", MB8877, 8_MHz_XTAL / 8)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_drq_w))
+ MB8877(config, m_fdc, 8_MHz_XTAL / 8);
+ m_fdc->intrq_wr_callback().set(FUNC(fm7_state::fm7_fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(fm7_state::fm7_fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
@@ -2234,9 +2234,9 @@ MACHINE_CONFIG_START(fm7_state::fm11)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_CASSETTE_INTERFACE("fm7_cass")
- MCFG_DEVICE_ADD("fdc", MB8877, 8_MHz_XTAL / 8)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_drq_w))
+ MB8877(config, m_fdc, 8_MHz_XTAL / 8);
+ m_fdc->intrq_wr_callback().set(FUNC(fm7_state::fm7_fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(fm7_state::fm7_fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
@@ -2280,9 +2280,9 @@ MACHINE_CONFIG_START(fm7_state::fm16beta)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
MCFG_CASSETTE_INTERFACE("fm7_cass")
- MCFG_DEVICE_ADD("fdc", MB8877, 8_MHz_XTAL / 8)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, fm7_state, fm7_fdc_drq_w))
+ MB8877(config, m_fdc, 8_MHz_XTAL / 8);
+ m_fdc->intrq_wr_callback().set(FUNC(fm7_state::fm7_fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(fm7_state::fm7_fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", fm7_floppies, "qd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp
index 3f9d83ac390..733cd5d8e7d 100644
--- a/src/mame/drivers/fmtowns.cpp
+++ b/src/mame/drivers/fmtowns.cpp
@@ -2819,9 +2819,9 @@ MACHINE_CONFIG_START(towns_state::towns_base)
MCFG_PIC8259_OUT_INT_CB(WRITELINE("pic8259_master", pic8259_device, ir7_w))
MCFG_PIC8259_IN_SP_CB(CONSTANT(0))
- MCFG_DEVICE_ADD("fdc", MB8877, 8'000'000 / 4) // clock unknown
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, towns_state,mb8877a_irq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, towns_state,mb8877a_drq_w))
+ MB8877(config, m_fdc, 8'000'000 / 4); // clock unknown
+ m_fdc->intrq_wr_callback().set(FUNC(towns_state::mb8877a_irq_w));
+ m_fdc->drq_wr_callback().set(FUNC(towns_state::mb8877a_drq_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", towns_floppies, "35hd", towns_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", towns_floppies, "35hd", towns_state::floppy_formats)
MCFG_SOFTWARE_LIST_ADD("fd_list","fmtowns_flop")
diff --git a/src/mame/drivers/guab.cpp b/src/mame/drivers/guab.cpp
index 5414121802f..03a1690f7f9 100644
--- a/src/mame/drivers/guab.cpp
+++ b/src/mame/drivers/guab.cpp
@@ -546,8 +546,8 @@ MACHINE_CONFIG_START(guab_state::guab)
ACIA6850(config, "acia6850_2", 0);
// floppy
- MCFG_DEVICE_ADD("fdc", WD1773, 8000000)
- MCFG_WD_FDC_DRQ_CALLBACK(INPUTLINE("maincpu", 6))
+ WD1773(config, m_fdc, 8000000);
+ m_fdc->drq_wr_callback().set_inputline(m_maincpu, 6);
MCFG_FLOPPY_DRIVE_ADD("fdc:0", guab_floppies, "dd", guab_state::floppy_formats)
MCFG_SLOT_FIXED(true)
diff --git a/src/mame/drivers/harriet.cpp b/src/mame/drivers/harriet.cpp
index 2f129373064..72329276ae6 100644
--- a/src/mame/drivers/harriet.cpp
+++ b/src/mame/drivers/harriet.cpp
@@ -84,11 +84,12 @@ void harriet_state::machine_reset()
}
-MACHINE_CONFIG_START(harriet_state::harriet)
- MCFG_DEVICE_ADD("maincpu", M68010, 40_MHz_XTAL / 4) // MC68010FN10
- MCFG_DEVICE_PROGRAM_MAP(harriet_map)
+void harriet_state::harriet(machine_config &config)
+{
+ M68010(config, m_maincpu, 40_MHz_XTAL / 4); // MC68010FN10
+ m_maincpu->set_addrmap(AS_PROGRAM, &harriet_state::harriet_map);
- MCFG_DEVICE_ADD("duart", MC68681, 3.6864_MHz_XTAL)
+ MC68681(config, "duart", 3.6864_MHz_XTAL);
mc68901_device &mfp(MC68901(config, "mfp", 40_MHz_XTAL / 16));
mfp.set_timer_clock(2.4576_MHz_XTAL);
@@ -100,17 +101,17 @@ MACHINE_CONFIG_START(harriet_state::harriet)
HD63450(config, "dmac", 40_MHz_XTAL / 4, "maincpu"); // MC68450R10 (or HD68450Y-10)
- MCFG_DEVICE_ADD("timekpr", M48T02, 0)
+ M48T02(config, "timekpr", 0);
NVRAM(config, "zpram", nvram_device::DEFAULT_ALL_0); // MK48Z02
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
rs232.rxd_handler().set("mfp", FUNC(mc68901_device::write_rx));
rs232.rxd_handler().append("mfp", FUNC(mc68901_device::tbi_w));
- //MCFG_DEVICE_ADD("wdca", WD33C93, 40_MHz_XTAL / 4)
- //MCFG_DEVICE_ADD("wdcb", WD33C93, 40_MHz_XTAL / 4)
- //MCFG_DEVICE_ADD("c012", IMSC012, 40_MHz_XTAL / 8) // INMOS IMSC012-P20S link adaptor
-MACHINE_CONFIG_END
+ //WD33C93(config, "wdca", 40_MHz_XTAL / 4);
+ //WD33C93(config, "wdcb", 40_MHz_XTAL / 4);
+ //IMSC012(config, "c012", 40_MHz_XTAL / 8); // INMOS IMSC012-P20S link adaptor
+}
ROM_START( harriet )
diff --git a/src/mame/drivers/hp64k.cpp b/src/mame/drivers/hp64k.cpp
index 2b7a9429e18..9528f53c968 100644
--- a/src/mame/drivers/hp64k.cpp
+++ b/src/mame/drivers/hp64k.cpp
@@ -1412,10 +1412,10 @@ MACHINE_CONFIG_START(hp64k_state::hp64k)
MCFG_SCREEN_VISIBLE_AREA(0, 720-1, 0, 390-1)
MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette")
- MCFG_DEVICE_ADD("fdc", FD1791, 4_MHz_XTAL / 4)
- MCFG_WD_FDC_FORCE_READY
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, hp64k_state, hp64k_flp_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, hp64k_state, hp64k_flp_drq_w))
+ FD1791(config, m_fdc, 4_MHz_XTAL / 4);
+ m_fdc->set_force_ready(true); // should be able to get rid of this when fdc issue is fixed
+ m_fdc->intrq_wr_callback().set(FUNC(hp64k_state::hp64k_flp_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(hp64k_state::hp64k_flp_drq_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", hp64k_floppies, "525dd", floppy_image_device::default_floppy_formats)
MCFG_SLOT_FIXED(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", hp64k_floppies, "525dd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/hp_ipc.cpp b/src/mame/drivers/hp_ipc.cpp
index 12aea9f9138..c28116b37a4 100644
--- a/src/mame/drivers/hp_ipc.cpp
+++ b/src/mame/drivers/hp_ipc.cpp
@@ -744,8 +744,8 @@ MACHINE_CONFIG_START(hp_ipc_state::hp_ipc_base)
// XXX actual clock is 1MHz; remove this workaround (and change 2000 to 100 in hp_ipc_dsk.cpp)
// XXX when floppy code correctly handles 600 rpm drives.
- MCFG_DEVICE_ADD("fdc", WD2797, 2_MHz_XTAL)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, hp_ipc_state, irq_5))
+ WD2797(config, m_fdc, 2_MHz_XTAL);
+ m_fdc->intrq_wr_callback().set(FUNC(hp_ipc_state::irq_5));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", hp_ipc_floppies, "35dd", hp_ipc_state::floppy_formats)
MCFG_SOFTWARE_LIST_ADD("flop_list","hp_ipc")
diff --git a/src/mame/drivers/indigo.cpp b/src/mame/drivers/indigo.cpp
index 9f9fbf94df1..0a2a43424fc 100644
--- a/src/mame/drivers/indigo.cpp
+++ b/src/mame/drivers/indigo.cpp
@@ -609,9 +609,9 @@ MACHINE_CONFIG_START(indigo_state::indigo3k)
MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "cdrom", SCSICD, SCSI_ID_6)
MCFG_SLOT_OPTION_MACHINE_CONFIG("cdrom", cdrom_config)
- MCFG_DEVICE_ADD("wd33c93", WD33C93, 0)
- MCFG_LEGACY_SCSI_PORT("scsi")
- MCFG_WD33C93_IRQ_CB(WRITELINE(*this, indigo_state, scsi_irq)) /* command completion IRQ */
+ WD33C93(config, m_wd33c93);
+ m_wd33c93->set_scsi_port("scsi");
+ m_wd33c93->irq_cb().set(FUNC(indigo_state::scsi_irq)); /* command completion IRQ */
EEPROM_93C56_16BIT(config, "eeprom");
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/kaypro.cpp b/src/mame/drivers/kaypro.cpp
index 1cb1dff0271..67511e84e36 100644
--- a/src/mame/drivers/kaypro.cpp
+++ b/src/mame/drivers/kaypro.cpp
@@ -262,10 +262,10 @@ MACHINE_CONFIG_START(kaypro_state::kayproii)
sio.out_rtsa_callback().set("serial", FUNC(rs232_port_device::write_rts));
sio.out_txdb_callback().set("kbd", FUNC(kaypro_10_keyboard_device::txd_w));
- MCFG_DEVICE_ADD("fdc", FD1793, 20_MHz_XTAL / 20)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, kaypro_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, kaypro_state, fdc_drq_w))
- MCFG_WD_FDC_FORCE_READY
+ FD1793(config, m_fdc, 20_MHz_XTAL / 20);
+ m_fdc->intrq_wr_callback().set(FUNC(kaypro_state::fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(kaypro_state::fdc_drq_w));
+ m_fdc->set_force_ready(true);
MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525ssdd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525ssdd", floppy_image_device::default_floppy_formats)
@@ -358,10 +358,10 @@ MACHINE_CONFIG_START(kaypro_state::kaypro484)
brg.ft_handler().set("sio_2", FUNC(z80sio_device::rxca_w));
brg.ft_handler().append("sio_2", FUNC(z80sio_device::txca_w));
- MCFG_DEVICE_ADD("fdc", FD1793, 16_MHz_XTAL / 16)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, kaypro_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, kaypro_state, fdc_drq_w))
- MCFG_WD_FDC_FORCE_READY
+ FD1793(config, m_fdc, 16_MHz_XTAL / 16);
+ m_fdc->intrq_wr_callback().set(FUNC(kaypro_state::fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(kaypro_state::fdc_drq_w));
+ m_fdc->set_force_ready(true);
MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/lb186.cpp b/src/mame/drivers/lb186.cpp
index dccfc5b05a4..73a42c04d55 100644
--- a/src/mame/drivers/lb186.cpp
+++ b/src/mame/drivers/lb186.cpp
@@ -148,9 +148,9 @@ MACHINE_CONFIG_START(lb186_state::lb186)
MCFG_DEVICE_ADD("rs232_2", RS232_PORT, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE("duart", scn2681_device, rx_b_w))
- MCFG_DEVICE_ADD("fdc", WD1772, 16_MHz_XTAL / 2)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE("maincpu", i80186_cpu_device, int2_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE("maincpu", i80186_cpu_device, drq0_w))
+ WD1772(config, m_fdc, 16_MHz_XTAL / 2);
+ m_fdc->intrq_wr_callback().set(m_maincpu, FUNC(i80186_cpu_device::int2_w));
+ m_fdc->drq_wr_callback().set(m_maincpu, FUNC(i80186_cpu_device::drq0_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", lb186_floppies, "525dd", lb186_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", lb186_floppies, nullptr, lb186_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:2", lb186_floppies, nullptr, lb186_state::floppy_formats)
diff --git a/src/mame/drivers/magnum.cpp b/src/mame/drivers/magnum.cpp
index 1d24ab79cfa..e2287dce921 100644
--- a/src/mame/drivers/magnum.cpp
+++ b/src/mame/drivers/magnum.cpp
@@ -310,7 +310,7 @@ MACHINE_CONFIG_START(magnum_state::magnum)
//MCFG_DEVICE_ADD("crtc", I8275, 3000000) // unknown clock
- //MCFG_DEVICE_ADD("fdc", WD1793, 1000000) // nothing known, type or if any disks even exist, port 0x44 is possibly motor control
+ //WD1793(config, "fdc", 1000000); // nothing known, type or if any disks even exist, port 0x44 is possibly motor control
MCFG_PALETTE_ADD_MONOCHROME_INVERTED("palette")
diff --git a/src/mame/drivers/msx.cpp b/src/mame/drivers/msx.cpp
index c2756dc8370..54897d21496 100644
--- a/src/mame/drivers/msx.cpp
+++ b/src/mame/drivers/msx.cpp
@@ -1288,39 +1288,44 @@ static void msx_floppies(device_slot_interface &device)
device.option_add("35ssdd", FLOPPY_35_SSDD);
}
-MACHINE_CONFIG_START(msx_state::msx_fd1793)
- MCFG_DEVICE_ADD("fdc", FD1793, 4_MHz_XTAL / 4)
- MCFG_WD_FDC_FORCE_READY
-MACHINE_CONFIG_END
+void msx_state::msx_fd1793(machine_config &config)
+{
+ fd1793_device& fdc(FD1793(config, "fdc", 4_MHz_XTAL / 4));
+ fdc.set_force_ready(true);
+}
-MACHINE_CONFIG_START(msx_state::msx_wd2793_force_ready)
+void msx_state::msx_wd2793_force_ready(machine_config &config)
+{
// From NMS8245 schematics:
// READY + HLT - pulled high
// SSO/-ENMF + -DDEN + ENP + -5/8 - pulled low
- MCFG_DEVICE_ADD("fdc", WD2793, 4_MHz_XTAL / 4)
- MCFG_WD_FDC_FORCE_READY
-MACHINE_CONFIG_END
+ wd2793_device& fdc(WD2793(config, "fdc", 4_MHz_XTAL / 4));
+ fdc.set_force_ready(true);
+}
-MACHINE_CONFIG_START(msx_state::msx_wd2793)
- MCFG_DEVICE_ADD("fdc", WD2793, 4_MHz_XTAL / 4)
-MACHINE_CONFIG_END
+void msx_state::msx_wd2793(machine_config &config)
+{
+ WD2793(config, "fdc", 4_MHz_XTAL / 4);
+}
-MACHINE_CONFIG_START(msx_state::msx_mb8877a)
+void msx_state::msx_mb8877a(machine_config & config)
+{
// From CF-3300 FDC schematic:
// READY + HLT - pulled high
// -DDEN - pulled low
- MCFG_DEVICE_ADD("fdc", MB8877, 4_MHz_XTAL / 4)
- MCFG_WD_FDC_FORCE_READY
-MACHINE_CONFIG_END
+ mb8877_device& fdc(MB8877(config, "fdc", 4_MHz_XTAL / 4));
+ fdc.set_force_ready(true);
+}
MACHINE_CONFIG_START(msx_state::msx_tc8566af)
MCFG_TC8566AF_ADD("fdc")
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(msx_state::msx_microsol)
- MCFG_DEVICE_ADD("fdc", WD2793, 4_MHz_XTAL / 4)
- MCFG_WD_FDC_FORCE_READY
-MACHINE_CONFIG_END
+void msx_state::msx_microsol(machine_config &config)
+{
+ wd2793_device& fdc(WD2793(config, "fdc", 4_MHz_XTAL / 4));
+ fdc.set_force_ready(true);
+}
MACHINE_CONFIG_START(msx_state::msx_1_35_ssdd_drive)
MCFG_FLOPPY_DRIVE_ADD("fdc:0", msx_floppies, "35ssdd", msx_state::floppy_formats)
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 578fc400624..9eeb95f534a 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -2954,7 +2954,7 @@ MACHINE_CONFIG_START(naomi_state::naomi_base)
MCFG_SEGA_837_13551_DEVICE_ADD("837_13551", "mie", ":TILT", ":P1", ":P2", ":A0", ":A1", ":A2", ":A3", ":A4", ":A5", ":A6", ":A7", ":OUTPUT")
EEPROM_93C46_8BIT(config, "mie_eeprom");
- MCFG_X76F100_ADD("naomibd_eeprom")
+ X76F100(config, "naomibd_eeprom");
MCFG_M3COMM_ADD("comm_board")
MCFG_MACHINE_RESET_OVERRIDE(naomi_state,naomi)
NVRAM(config, "sram", nvram_device::DEFAULT_ALL_0);
diff --git a/src/mame/drivers/ngen.cpp b/src/mame/drivers/ngen.cpp
index 0280c9a1f93..f56dbc11afa 100644
--- a/src/mame/drivers/ngen.cpp
+++ b/src/mame/drivers/ngen.cpp
@@ -92,11 +92,11 @@ public:
m_dmac(*this,"dmac"),
m_pic(*this,"pic"),
m_pit(*this,"pit"),
+ m_hdc(*this,"hdc"),
m_disk_rom(*this,"disk"),
m_fdc(*this,"fdc"),
m_fd0(*this,"fdc:0"),
m_fdc_timer(*this,"fdc_timer"),
- m_hdc(*this,"hdc"),
m_hdc_timer(*this,"hdc_timer"),
m_hd_buffer(*this,"hd_buffer_ram")
{
@@ -148,6 +148,7 @@ protected:
required_device<am9517a_device> m_dmac;
required_device<pic8259_device> m_pic;
required_device<pit8254_device> m_pit;
+ optional_device<wd2010_device> m_hdc;
private:
DECLARE_WRITE16_MEMBER(cpu_peripheral_cb);
@@ -182,7 +183,6 @@ private:
optional_device<wd2797_device> m_fdc;
optional_device<floppy_connector> m_fd0;
optional_device<pit8253_device> m_fdc_timer;
- optional_device<wd2010_device> m_hdc;
optional_device<pit8253_device> m_hdc_timer;
optional_shared_ptr<uint8_t> m_hd_buffer;
@@ -1014,7 +1014,7 @@ MACHINE_CONFIG_START(ngen_state::ngen)
// keyboard UART (patent says i8251 is used for keyboard communications, it is located on the video board)
I8251(config, m_viduart, 0); // main clock unknown, Rx/Tx clocks are 19.53kHz
-// m_viduart->txempty_handler().set("pic", FUNC(pic8259_device::ir4_w));
+// m_viduart->txempty_handler().set(m_pic, FUNC(pic8259_device::ir4_w));
m_viduart->txd_handler().set("keyboard", FUNC(rs232_port_device::write_txd));
MCFG_DEVICE_ADD("keyboard", RS232_PORT, keyboard, "ngen")
MCFG_RS232_RXD_HANDLER(WRITELINE(m_viduart, i8251_device, write_rxd))
@@ -1029,22 +1029,23 @@ MACHINE_CONFIG_START(ngen_state::ngen)
MCFG_WD_FDC_FORCE_READY
MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0)
MCFG_PIT8253_CLK0(0)
- MCFG_PIT8253_OUT0_HANDLER(WRITELINE("pic",pic8259_device,ir5_w)) // clocked on FDC data register access
+ MCFG_PIT8253_OUT0_HANDLER(WRITELINE(m_pic,pic8259_device,ir5_w)) // clocked on FDC data register access
MCFG_PIT8253_CLK1(20_MHz_XTAL / 20)
-// MCFG_PIT8253_OUT1_HANDLER(WRITELINE("pic",pic8259_device,ir5_w)) // 1MHz
+// MCFG_PIT8253_OUT1_HANDLER(WRITELINE(m_pic,pic8259_device,ir5_w)) // 1MHz
MCFG_PIT8253_CLK2(20_MHz_XTAL / 20)
-// MCFG_PIT8253_OUT2_HANDLER(WRITELINE("pic",pic8259_device,ir5_w))
+// MCFG_PIT8253_OUT2_HANDLER(WRITELINE(m_pic,pic8259_device,ir5_w))
// TODO: WD1010 HDC (not implemented), use WD2010 for now
- MCFG_DEVICE_ADD("hdc", WD2010, 20_MHz_XTAL / 4)
- MCFG_WD2010_OUT_INTRQ_CB(WRITELINE("pic",pic8259_device,ir2_w))
- MCFG_WD2010_IN_BCS_CB(READ8(*this, ngen_state,hd_buffer_r))
- MCFG_WD2010_OUT_BCS_CB(WRITE8(*this, ngen_state,hd_buffer_w))
- MCFG_WD2010_IN_DRDY_CB(CONSTANT(1))
- MCFG_WD2010_IN_INDEX_CB(CONSTANT(1))
- MCFG_WD2010_IN_WF_CB(CONSTANT(1))
- MCFG_WD2010_IN_TK000_CB(CONSTANT(1))
- MCFG_WD2010_IN_SC_CB(CONSTANT(1))
+ WD2010(config, m_hdc, 20_MHz_XTAL / 4);
+ m_hdc->out_intrq_callback().set(m_pic, FUNC(pic8259_device::ir2_w));
+ m_hdc->in_bcs_callback().set(FUNC(ngen_state::hd_buffer_r));
+ m_hdc->out_bcs_callback().set(FUNC(ngen_state::hd_buffer_w));
+ m_hdc->in_drdy_callback().set_constant(1);
+ m_hdc->in_index_callback().set_constant(1);
+ m_hdc->in_wf_callback().set_constant(1);
+ m_hdc->in_tk000_callback().set_constant(1);
+ m_hdc->in_sc_callback().set_constant(1);
+
MCFG_DEVICE_ADD("hdc_timer", PIT8253, 0)
MCFG_PIT8253_CLK2(20_MHz_XTAL / 10) // 2MHz
MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats)
@@ -1147,15 +1148,16 @@ MACHINE_CONFIG_START(ngen386_state::ngen386)
// MCFG_PIT8253_OUT2_HANDLER(WRITELINE("pic",pic8259_device,ir5_w))
// TODO: WD1010 HDC (not implemented), use WD2010 for now
- MCFG_DEVICE_ADD("hdc", WD2010, 20_MHz_XTAL / 4)
- MCFG_WD2010_OUT_INTRQ_CB(WRITELINE("pic",pic8259_device,ir2_w))
- MCFG_WD2010_IN_BCS_CB(READ8(*this, ngen386_state,hd_buffer_r))
- MCFG_WD2010_OUT_BCS_CB(WRITE8(*this, ngen386_state,hd_buffer_w))
- MCFG_WD2010_IN_DRDY_CB(CONSTANT(1))
- MCFG_WD2010_IN_INDEX_CB(CONSTANT(1))
- MCFG_WD2010_IN_WF_CB(CONSTANT(1))
- MCFG_WD2010_IN_TK000_CB(CONSTANT(1))
- MCFG_WD2010_IN_SC_CB(CONSTANT(1))
+ WD2010(config, m_hdc, 20_MHz_XTAL / 4);
+ m_hdc->out_intrq_callback().set(m_pic, FUNC(pic8259_device::ir2_w));
+ m_hdc->in_bcs_callback().set(FUNC(ngen386_state::hd_buffer_r));
+ m_hdc->out_bcs_callback().set(FUNC(ngen386_state::hd_buffer_w));
+ m_hdc->in_drdy_callback().set_constant(1);
+ m_hdc->in_index_callback().set_constant(1);
+ m_hdc->in_wf_callback().set_constant(1);
+ m_hdc->in_tk000_callback().set_constant(1);
+ m_hdc->in_sc_callback().set_constant(1);
+
MCFG_DEVICE_ADD("hdc_timer", PIT8253, 0)
MCFG_PIT8253_CLK2(20_MHz_XTAL / 10) // 2MHz
MCFG_FLOPPY_DRIVE_ADD("fdc:0", ngen_floppies, "525qd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/pg685.cpp b/src/mame/drivers/pg685.cpp
index 1bdc6fdc617..1a1920b39c5 100644
--- a/src/mame/drivers/pg685.cpp
+++ b/src/mame/drivers/pg685.cpp
@@ -520,8 +520,8 @@ MACHINE_CONFIG_START(pg685_state::pg685)
MCFG_FLOPPY_DRIVE_SOUND(true)
// harddisk
- MCFG_DEVICE_ADD("hdc", WD2010, XTAL(10'000'000) / 2) // divider guessed
- MCFG_WD2010_OUT_INTRQ_CB(WRITELINE("mainpic", pic8259_device, ir3_w))
+ wd2010_device& hdc(WD2010(config, "hdc", XTAL(10'000'000) / 2)); // divider guessed
+ hdc.out_intrq_callback().set("mainpic", FUNC(pic8259_device::ir3_w));
MACHINE_CONFIG_END
MACHINE_CONFIG_START(pg685_state::pg685oua12)
@@ -571,8 +571,8 @@ MACHINE_CONFIG_START(pg685_state::pg685oua12)
MCFG_FLOPPY_DRIVE_SOUND(true)
// harddisk
- MCFG_DEVICE_ADD("hdc", WD2010, XTAL(10'000'000) / 2) // divider guessed
- MCFG_WD2010_OUT_INTRQ_CB(WRITELINE("mainpic", pic8259_device, ir3_w))
+ wd2010_device& hdc(WD2010(config, "hdc", XTAL(10'000'000) / 2)); // divider guessed
+ hdc.out_intrq_callback().set("mainpic", FUNC(pic8259_device::ir3_w));
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pk8020.cpp b/src/mame/drivers/pk8020.cpp
index 88ec2c70011..7532358a663 100644
--- a/src/mame/drivers/pk8020.cpp
+++ b/src/mame/drivers/pk8020.cpp
@@ -245,8 +245,8 @@ MACHINE_CONFIG_START(pk8020_state::pk8020)
I8251(config, m_lan, 0);
- MCFG_DEVICE_ADD("wd1793", FD1793, 20_MHz_XTAL / 20)
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE("pic8259", pic8259_device, ir7_w))
+ FD1793(config, m_wd1793, 20_MHz_XTAL / 20);
+ m_wd1793->intrq_wr_callback().set(m_pic8259, FUNC(pic8259_device::ir7_w));
MCFG_FLOPPY_DRIVE_ADD("wd1793:0", pk8020_floppies, "qd", pk8020_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("wd1793:1", pk8020_floppies, "qd", pk8020_state::floppy_formats)
diff --git a/src/mame/drivers/r9751.cpp b/src/mame/drivers/r9751.cpp
index 856e00297b8..eebad9ae277 100644
--- a/src/mame/drivers/r9751.cpp
+++ b/src/mame/drivers/r9751.cpp
@@ -656,12 +656,12 @@ MACHINE_CONFIG_START(r9751_state::r9751)
MCFG_DEVICE_ADD("smioc", SMIOC, 0)
/* disk hardware */
- MCFG_DEVICE_ADD("pdc", PDC, 0)
- MCFG_PDC_R_CB(READ8(*this, r9751_state, pdc_dma_r))
- MCFG_PDC_W_CB(WRITE8(*this, r9751_state, pdc_dma_w))
+ PDC(config, m_pdc, 0);
+ m_pdc->m68k_r_callback().set(FUNC(r9751_state::pdc_dma_r));
+ m_pdc->m68k_w_callback().set(FUNC(r9751_state::pdc_dma_w));
MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0)
- MCFG_DEVICE_ADD("wd33c93", WD33C93, 0)
- MCFG_LEGACY_SCSI_PORT("scsi")
+ WD33C93(config, m_wd33c93);
+ m_wd33c93->set_scsi_port("scsi");
/* software list */
MCFG_SOFTWARE_LIST_ADD("flop_list","r9751")
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index aa22f3373aa..83918c57854 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -3261,7 +3261,7 @@ MACHINE_CONFIG_START(rainbow_state::rainbow)
MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)
- MCFG_DEVICE_ADD(FD1793_TAG, FD1793, 24.0734_MHz_XTAL / 24) // no separate 1 Mhz quartz
+ FD1793(config, m_fdc, 24.0734_MHz_XTAL / 24); // no separate 1 Mhz quartz
MCFG_FLOPPY_DRIVE_ADD(FD1793_TAG ":0", rainbow_floppies, "525qd", rainbow_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FD1793_TAG ":1", rainbow_floppies, "525qd", rainbow_state::floppy_formats)
//MCFG_FLOPPY_DRIVE_ADD(FD1793_TAG ":2", rainbow_floppies, "525qd", rainbow_state::floppy_formats)
@@ -3271,25 +3271,26 @@ MACHINE_CONFIG_START(rainbow_state::rainbow)
MCFG_SOFTWARE_LIST_ADD("flop_list", "rainbow")
/// ********************************* HARD DISK CONTROLLER *****************************************
- MCFG_DEVICE_ADD("hdc", WD2010, 5000000) // 10 Mhz quartz on controller (divided by 2 for WCLK)
- MCFG_WD2010_OUT_INTRQ_CB(WRITELINE(*this, rainbow_state, bundle_irq)) // FIRST IRQ SOURCE (OR'ed with DRQ)
- MCFG_WD2010_OUT_BDRQ_CB(WRITELINE(*this, rainbow_state, hdc_bdrq)) // BUFFER DATA REQUEST
+ WD2010(config, m_hdc, 5000000); // 10 Mhz quartz on controller (divided by 2 for WCLK)
+ m_hdc->out_intrq_callback().set(FUNC(rainbow_state::bundle_irq)); // FIRST IRQ SOURCE (OR'ed with DRQ)
+ m_hdc->out_bdrq_callback().set(FUNC(rainbow_state::hdc_bdrq)); // BUFFER DATA REQUEST
// SIGNALS -FROM- WD CONTROLLER:
- MCFG_WD2010_OUT_BCS_CB(WRITELINE(*this, rainbow_state, hdc_read_sector)) // Problem: OUT_BCS_CB = WRITE8 ... (!)
- MCFG_WD2010_OUT_BCR_CB(WRITELINE(*this, rainbow_state, hdc_bcr)) // BUFFER COUNTER RESET (pulses)
+ m_hdc->out_bcs_callback().set(FUNC(rainbow_state::hdc_read_sector)); // Problem: OUT_BCS_CB = WRITE8 ... (!)
+ m_hdc->out_bcr_callback().set(FUNC(rainbow_state::hdc_bcr)); // BUFFER COUNTER RESET (pulses)
- MCFG_WD2010_OUT_WG_CB(WRITELINE(*this, rainbow_state, hdc_write_sector)) // WRITE GATE
- MCFG_WD2010_OUT_STEP_CB(WRITELINE(*this, rainbow_state, hdc_step)) // STEP PULSE
- MCFG_WD2010_OUT_DIRIN_CB(WRITELINE(*this, rainbow_state, hdc_direction))
+ m_hdc->out_wg_callback().set(FUNC(rainbow_state::hdc_write_sector)); // WRITE GATE
+ m_hdc->out_step_callback().set(FUNC(rainbow_state::hdc_step)); // STEP PULSE
+ m_hdc->out_dirin_callback().set(FUNC(rainbow_state::hdc_direction));
- MCFG_WD2010_IN_WF_CB(READLINE(*this, rainbow_state, hdc_write_fault)) // WRITE FAULT (set to GND if not serviced)
+ m_hdc->in_wf_callback().set(FUNC(rainbow_state::hdc_write_fault)); // WRITE FAULT (set to GND if not serviced)
- MCFG_WD2010_IN_DRDY_CB(READLINE(*this, rainbow_state, hdc_drive_ready)) // DRIVE_READY (set to VCC if not serviced)
- MCFG_WD2010_IN_SC_CB(CONSTANT(1)) // SEEK COMPLETE (set to VCC if not serviced)
+ m_hdc->in_drdy_callback().set(FUNC(rainbow_state::hdc_drive_ready)); // DRIVE_READY (set to VCC if not serviced)
- MCFG_WD2010_IN_TK000_CB(CONSTANT(1)) // CURRENTLY NOT EVALUATED WITHIN 'WD2010'
- MCFG_WD2010_IN_INDEX_CB(CONSTANT(1)) // "
+ m_hdc->in_sc_callback().set_constant(1); // SEEK COMPLETE (set to VCC if not serviced)
+
+ m_hdc->in_tk000_callback().set_constant(1); // CURRENTLY NOT EVALUATED WITHIN 'WD2010'
+ m_hdc->in_wf_callback().set_constant(1); // "
MCFG_HARDDISK_ADD("decharddisk1")
/// ******************************** / HARD DISK CONTROLLER ****************************************
diff --git a/src/mame/drivers/segasp.cpp b/src/mame/drivers/segasp.cpp
index e59d70942b4..d6b730e29c3 100644
--- a/src/mame/drivers/segasp.cpp
+++ b/src/mame/drivers/segasp.cpp
@@ -308,7 +308,7 @@ MACHINE_CONFIG_START(segasp_state::segasp)
EEPROM_93C46_16BIT(config, "sp_eeprom");
// todo, not exactly NaomiM4 (see notes at top of driver) use custom board type here instead
- MCFG_X76F100_ADD("naomibd_eeprom") // actually not present
+ X76F100(config, "naomibd_eeprom"); // actually not present
MCFG_NAOMI_M4_BOARD_ADD("rom_board", "pic_readout", "naomibd_eeprom", WRITE8(*this, dc_state, g1_irq))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sorcerer.cpp b/src/mame/drivers/sorcerer.cpp
index eab714d84ed..f2279e5790b 100644
--- a/src/mame/drivers/sorcerer.cpp
+++ b/src/mame/drivers/sorcerer.cpp
@@ -489,10 +489,10 @@ MACHINE_CONFIG_START(sorcerer_state::sorcererd)
MCFG_MICROPOLIS_DEFAULT_DRIVE4_TAGS
MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(sorcerer_floppy_interface)
- MCFG_DEVICE_ADD("fdc2", FD1793, 8_MHz_XTAL / 8) // confirmed clock
- MCFG_WD_FDC_FORCE_READY // should be able to get rid of this when fdc issue is fixed
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, sorcerer_state, intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, sorcerer_state, drq_w))
+ FD1793(config, m_fdc2, 8_MHz_XTAL / 8); // confirmed clock
+ m_fdc2->set_force_ready(true); // should be able to get rid of this when fdc issue is fixed
+ m_fdc2->intrq_wr_callback().set(FUNC(sorcerer_state::intrq_w));
+ m_fdc2->drq_wr_callback().set(FUNC(sorcerer_state::drq_w));
MCFG_FLOPPY_DRIVE_ADD("fdc2:0", floppies, "525qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc2:1", floppies, "525qd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/super6.cpp b/src/mame/drivers/super6.cpp
index 45c6f55c79f..4ea4fdcadfb 100644
--- a/src/mame/drivers/super6.cpp
+++ b/src/mame/drivers/super6.cpp
@@ -469,10 +469,10 @@ MACHINE_CONFIG_START(super6_state::super6)
Z80PIO(config, m_pio, 24_MHz_XTAL / 4);
m_pio->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
- MCFG_DEVICE_ADD(m_fdc, WD2793, 24_MHz_XTAL / 12)
- MCFG_WD_FDC_FORCE_READY
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, super6_state, fdc_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, super6_state, fdc_drq_w))
+ WD2793(config, m_fdc, 24_MHz_XTAL / 12);
+ m_fdc->set_force_ready(true);
+ m_fdc->intrq_wr_callback().set(FUNC(super6_state::fdc_intrq_w));
+ m_fdc->drq_wr_callback().set(FUNC(super6_state::fdc_drq_w));
MCFG_FLOPPY_DRIVE_ADD(m_floppy0, super6_floppies, "525dd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
diff --git a/src/mame/drivers/super80.cpp b/src/mame/drivers/super80.cpp
index 6b1ecc5da4f..ac510900be3 100644
--- a/src/mame/drivers/super80.cpp
+++ b/src/mame/drivers/super80.cpp
@@ -871,8 +871,8 @@ MACHINE_CONFIG_START(super80_state::super80r)
m_dma->in_iorq_callback().set(FUNC(super80_state::io_read_byte));
m_dma->out_iorq_callback().set(FUNC(super80_state::io_write_byte));
- MCFG_DEVICE_ADD("fdc", WD2793, 2_MHz_XTAL)
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE("dma", z80dma_device, rdy_w))
+ WD2793(config, m_fdc, 2_MHz_XTAL);
+ m_fdc->drq_wr_callback().set(m_dma, FUNC(z80dma_device::rdy_w));
MCFG_FLOPPY_DRIVE_ADD("fdc:0", super80_floppies, "525dd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", super80_floppies, "525dd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/twinkle.cpp b/src/mame/drivers/twinkle.cpp
index 8c2a6de9e33..eb77403c176 100644
--- a/src/mame/drivers/twinkle.cpp
+++ b/src/mame/drivers/twinkle.cpp
@@ -1138,10 +1138,11 @@ MACHINE_CONFIG_START(twinkle_state::twinkle)
MCFG_SOUND_ROUTE(1, "speakerright", 1.0)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(twinkle_state::twinklex)
+void twinkle_state::twinklex(machine_config &config)
+{
twinkle(config);
- MCFG_X76F041_ADD( "security" )
-MACHINE_CONFIG_END
+ X76F041(config, "security");
+}
void twinkle_state::twinklei(machine_config &config)
{
diff --git a/src/mame/drivers/unixpc.cpp b/src/mame/drivers/unixpc.cpp
index e912f2e858c..33a9c640971 100644
--- a/src/mame/drivers/unixpc.cpp
+++ b/src/mame/drivers/unixpc.cpp
@@ -380,9 +380,9 @@ MACHINE_CONFIG_START(unixpc_state::unixpc)
ADDRESS_MAP_BANK(config, "ramrombank").set_map(&unixpc_state::ramrombank_map).set_options(ENDIANNESS_BIG, 16, 32, 0x400000);
// floppy
- MCFG_DEVICE_ADD("wd2797", WD2797, 40_MHz_XTAL / 40) // 1PCK (CPU clock) divided by custom DMA chip
- MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(*this, unixpc_state, wd2797_intrq_w))
- MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(*this, unixpc_state, wd2797_drq_w))
+ WD2797(config, m_wd2797, 40_MHz_XTAL / 40); // 1PCK (CPU clock) divided by custom DMA chip
+ m_wd2797->intrq_wr_callback().set(FUNC(unixpc_state::wd2797_intrq_w));
+ m_wd2797->drq_wr_callback().set(FUNC(unixpc_state::wd2797_drq_w));
MCFG_FLOPPY_DRIVE_ADD("wd2797:0", unixpc_floppies, "525dd", floppy_image_device::default_floppy_formats)
upd7201_new_device& mpsc(UPD7201_NEW(config, "mpsc", 19.6608_MHz_XTAL / 8));
diff --git a/src/mame/drivers/vector06.cpp b/src/mame/drivers/vector06.cpp
index 91aefcdaf16..9a9abc347db 100644
--- a/src/mame/drivers/vector06.cpp
+++ b/src/mame/drivers/vector06.cpp
@@ -199,7 +199,7 @@ MACHINE_CONFIG_START(vector06_state::vector06)
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_DEVICE_ADD("wd1793", KR1818VG93, 1_MHz_XTAL)
+ KR1818VG93(config, m_fdc, 1_MHz_XTAL);
MCFG_FLOPPY_DRIVE_ADD("wd1793:0", vector06_floppies, "qd", vector06_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("wd1793:1", vector06_floppies, "qd", vector06_state::floppy_formats)
diff --git a/src/mame/machine/k573cass.cpp b/src/mame/machine/k573cass.cpp
index 48bcf915e96..78d6fd046ff 100644
--- a/src/mame/machine/k573cass.cpp
+++ b/src/mame/machine/k573cass.cpp
@@ -76,9 +76,10 @@ konami573_cassette_x_device::konami573_cassette_x_device(const machine_config &m
{
}
-MACHINE_CONFIG_START(konami573_cassette_x_device::device_add_mconfig)
- MCFG_X76F041_ADD( "eeprom" )
-MACHINE_CONFIG_END
+void konami573_cassette_x_device::device_add_mconfig(machine_config &config)
+{
+ X76F041( config, m_x76f041 );
+}
void konami573_cassette_x_device::device_start()
{
@@ -120,11 +121,12 @@ konami573_cassette_xi_device::konami573_cassette_xi_device(const machine_config
{
}
-MACHINE_CONFIG_START(konami573_cassette_xi_device::device_add_mconfig)
- MCFG_X76F041_ADD( "eeprom" );
- DS2401( config, "id" );
- MCFG_DEVICE_ADD( "adc0838", ADC0838, 0 )
-MACHINE_CONFIG_END
+void konami573_cassette_xi_device::device_add_mconfig(machine_config &config)
+{
+ X76F041( config, m_x76f041 );
+ DS2401( config, m_ds2401 );
+ ADC0838( config, m_adc0838, 0 );
+}
WRITE_LINE_MEMBER(konami573_cassette_xi_device::write_line_d0)
{
@@ -188,9 +190,10 @@ konami573_cassette_y_device::konami573_cassette_y_device(const machine_config &m
{
}
-MACHINE_CONFIG_START(konami573_cassette_y_device::device_add_mconfig)
- MCFG_X76F100_ADD( "eeprom" )
-MACHINE_CONFIG_END
+void konami573_cassette_y_device::device_add_mconfig(machine_config &config)
+{
+ X76F100( config, m_x76f100 );
+}
void konami573_cassette_y_device::device_start()
{
@@ -264,10 +267,11 @@ konami573_cassette_yi_device::konami573_cassette_yi_device(const machine_config
{
}
-MACHINE_CONFIG_START(konami573_cassette_yi_device::device_add_mconfig)
- MCFG_X76F100_ADD( "eeprom" )
- DS2401( config, "id" );
-MACHINE_CONFIG_END
+void konami573_cassette_yi_device::device_add_mconfig(machine_config &config)
+{
+ X76F100( config, m_x76f100 );
+ DS2401( config, m_ds2401 );
+}
WRITE_LINE_MEMBER(konami573_cassette_yi_device::write_line_d4)
{
@@ -292,10 +296,11 @@ konami573_cassette_zi_device::konami573_cassette_zi_device(const machine_config
{
}
-MACHINE_CONFIG_START(konami573_cassette_zi_device::device_add_mconfig)
- DS2401( config, "id" );
- ZS01( config, "eeprom" ).set_ds2401_tag( "id" );
-MACHINE_CONFIG_END
+void konami573_cassette_zi_device::device_add_mconfig(machine_config &config)
+{
+ DS2401( config, m_ds2401 );
+ ZS01( config, m_zs01 ).set_ds2401_tag( "id" );
+}
void konami573_cassette_zi_device::device_start()
{
diff --git a/src/mame/machine/k573cass.h b/src/mame/machine/k573cass.h
index 708f3eeb74a..0481b5c02fd 100644
--- a/src/mame/machine/k573cass.h
+++ b/src/mame/machine/k573cass.h
@@ -107,7 +107,6 @@ protected:
virtual void device_start() override;
virtual void device_add_mconfig(machine_config &config) override;
-private:
required_device<x76f041_device> m_x76f041;
};
@@ -198,8 +197,9 @@ protected:
virtual void device_start() override;
virtual void device_add_mconfig(machine_config &config) override;
-private:
required_device<x76f100_device> m_x76f100;
+
+private:
devcb_write_line m_d0_handler;
devcb_write_line m_d1_handler;
devcb_write_line m_d2_handler;