summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar mooglyguy <therealmogminer@gmail.com>2019-06-30 15:07:35 +0200
committerGravatarGravatar MooglyGuy <therealmogminer@gmail.com>2019-06-30 15:08:18 +0200
commitfa9fe1a9046baa617897c0ae928d058d9dd7407f (patch) (github)
tree45517718b9efc1a3ac2b0228cc7348a736ea3eb6
parentde808fdacbe1de18c6fdae6eecefd3b276b671fd (diff)
downloadmame-fa9fe1a9046baa617897c0ae928d058d9dd7407f.tar.bz2
mame-fa9fe1a9046baa617897c0ae928d058d9dd7407f.zip
-imagedev/harddriv: Removed MCFG macros. [Ryan Holtz]
-generic/slot: Removed MCFG macros. [Ryan Holtz]
-rw-r--r--src/devices/bus/acorn/system/8k.cpp13
-rw-r--r--src/devices/bus/cgenie/expansion/floppy.cpp11
-rw-r--r--src/devices/bus/electron/cart/ap5.cpp4
-rw-r--r--src/devices/bus/electron/cart/romp144.cpp14
-rw-r--r--src/devices/bus/electron/plus2.cpp6
-rw-r--r--src/devices/bus/electron/rombox.cpp16
-rw-r--r--src/devices/bus/electron/romboxp.cpp8
-rw-r--r--src/devices/bus/generic/slot.h57
-rw-r--r--src/devices/bus/spectrum/intf2.cpp4
-rw-r--r--src/devices/bus/spectrum/intf2.h2
-rw-r--r--src/devices/bus/ti99x/990_hd.cpp38
-rw-r--r--src/devices/bus/ti99x/990_hd.h4
-rw-r--r--src/devices/imagedev/diablo.cpp4
-rw-r--r--src/devices/imagedev/diablo.h6
-rw-r--r--src/devices/imagedev/harddriv.cpp4
-rw-r--r--src/devices/imagedev/harddriv.h10
-rw-r--r--src/emu/diimage.h21
-rw-r--r--src/mame/drivers/aci_ggm.cpp4
-rw-r--r--src/mame/drivers/aim65.cpp38
-rw-r--r--src/mame/drivers/alphatro.cpp9
-rw-r--r--src/mame/drivers/amstrad.cpp12
-rw-r--r--src/mame/drivers/atom.cpp58
-rw-r--r--src/mame/drivers/ave_arb.cpp6
-rw-r--r--src/mame/drivers/bbc.cpp4
-rw-r--r--src/mame/drivers/beta.cpp20
-rw-r--r--src/mame/drivers/c2color.cpp6
-rw-r--r--src/mame/drivers/casloopy.cpp15
-rw-r--r--src/mame/drivers/cc40.cpp15
-rw-r--r--src/mame/drivers/clickstart.cpp6
-rw-r--r--src/mame/drivers/fidel_as12.cpp2
-rw-r--r--src/mame/drivers/fidel_eag68k.cpp2
-rw-r--r--src/mame/drivers/fidel_elite.cpp2
-rw-r--r--src/mame/drivers/fidel_sc12.cpp2
-rw-r--r--src/mame/drivers/fidel_sc6.cpp6
-rw-r--r--src/mame/drivers/fidel_sc9.cpp2
-rw-r--r--src/mame/drivers/force68k.cpp14
-rw-r--r--src/mame/drivers/gamecom.cpp15
-rw-r--r--src/mame/drivers/gameking.cpp13
-rw-r--r--src/mame/drivers/geniusiq.cpp19
-rw-r--r--src/mame/drivers/hh_tms1k.cpp12
-rw-r--r--src/mame/drivers/hx20.cpp4
-rw-r--r--src/mame/drivers/i7000.cpp14
-rw-r--r--src/mame/drivers/ibmpcjr.cpp18
-rw-r--r--src/mame/drivers/intellect02.cpp6
-rw-r--r--src/mame/drivers/jaguar.cpp4
-rw-r--r--src/mame/drivers/jupace.cpp5
-rw-r--r--src/mame/drivers/leapfrog_leappad.cpp8
-rw-r--r--src/mame/drivers/leapster.cpp13
-rw-r--r--src/mame/drivers/lynx.cpp12
-rw-r--r--src/mame/drivers/m68705prg.cpp8
-rw-r--r--src/mame/drivers/macs.cpp16
-rw-r--r--src/mame/drivers/megadriv.cpp65
-rw-r--r--src/mame/drivers/megatech.cpp36
-rw-r--r--src/mame/drivers/microvsn.cpp15
-rw-r--r--src/mame/drivers/monon_color.cpp18
-rw-r--r--src/mame/drivers/mtx.cpp4
-rw-r--r--src/mame/drivers/myvision.cpp15
-rw-r--r--src/mame/drivers/n64.cpp20
-rw-r--r--src/mame/drivers/nascom1.cpp16
-rw-r--r--src/mame/drivers/nc.cpp11
-rw-r--r--src/mame/drivers/ngp.cpp32
-rw-r--r--src/mame/drivers/patinho_feio.cpp5
-rw-r--r--src/mame/drivers/pc.cpp142
-rw-r--r--src/mame/drivers/pc2000.cpp7
-rw-r--r--src/mame/drivers/pegasus.cpp24
-rw-r--r--src/mame/drivers/pockchal.cpp16
-rw-r--r--src/mame/drivers/pockstat.cpp6
-rw-r--r--src/mame/drivers/pokemini.cpp7
-rw-r--r--src/mame/drivers/pv1000.cpp15
-rw-r--r--src/mame/drivers/pv2000.cpp13
-rw-r--r--src/mame/drivers/rx78.cpp13
-rw-r--r--src/mame/drivers/sega_beena.cpp6
-rw-r--r--src/mame/drivers/squale.cpp12
-rw-r--r--src/mame/drivers/storio.cpp6
-rw-r--r--src/mame/drivers/studio2.cpp13
-rw-r--r--src/mame/drivers/stv.cpp3
-rw-r--r--src/mame/drivers/supracan.cpp18
-rw-r--r--src/mame/drivers/sv8000.cpp13
-rw-r--r--src/mame/drivers/svi318.cpp13
-rw-r--r--src/mame/drivers/svision.cpp14
-rw-r--r--src/mame/drivers/thomson.cpp40
-rw-r--r--src/mame/drivers/ti74.cpp24
-rw-r--r--src/mame/drivers/timex.cpp11
-rw-r--r--src/mame/drivers/tispeak.cpp16
-rw-r--r--src/mame/drivers/tourvis.cpp16
-rw-r--r--src/mame/drivers/uzebox.cpp6
-rw-r--r--src/mame/drivers/vii.cpp24
-rw-r--r--src/mame/drivers/vtech2.cpp9
-rw-r--r--src/mame/drivers/x07.cpp12
-rw-r--r--src/mame/includes/bbc.h4
-rw-r--r--src/mame/includes/fidelbase.h2
-rw-r--r--src/mame/includes/gamecom.h4
-rw-r--r--src/mame/includes/hx20.h2
-rw-r--r--src/mame/includes/jaguar.h2
-rw-r--r--src/mame/includes/lynx.h2
-rw-r--r--src/mame/includes/nc.h4
-rw-r--r--src/mame/includes/patinhofeio.h2
-rw-r--r--src/mame/includes/snes.h4
-rw-r--r--src/mame/includes/svision.h2
-rw-r--r--src/mame/includes/timex.h2
-rw-r--r--src/mame/includes/vectrex.h2
-rw-r--r--src/mame/includes/x07.h2
-rw-r--r--src/mame/machine/amstrad.cpp2
-rw-r--r--src/mame/machine/fidelbase.cpp2
-rw-r--r--src/mame/machine/gamecom.cpp4
-rw-r--r--src/mame/machine/lynx.cpp2
-rw-r--r--src/mame/machine/mtx.cpp4
-rw-r--r--src/mame/machine/nc.cpp4
-rw-r--r--src/mame/machine/thomson.cpp4
-rw-r--r--src/mame/machine/vtech2.cpp2
110 files changed, 669 insertions, 737 deletions
diff --git a/src/devices/bus/acorn/system/8k.cpp b/src/devices/bus/acorn/system/8k.cpp
index 071ceceeddb..b8635920aab 100644
--- a/src/devices/bus/acorn/system/8k.cpp
+++ b/src/devices/bus/acorn/system/8k.cpp
@@ -67,15 +67,12 @@ ioport_constructor acorn_8k_device::device_input_ports() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(acorn_8k_device::device_add_mconfig)
+void acorn_8k_device::device_add_mconfig(machine_config &config)
+{
/* rom sockets */
- MCFG_GENERIC_SOCKET_ADD("rom0", generic_plain_slot, "acrnsys_rom") // IC17
- MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_LOAD(acorn_8k_device, rom0_load)
- MCFG_GENERIC_SOCKET_ADD("rom1", generic_plain_slot, "acrnsys_rom") // IC18
- MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_LOAD(acorn_8k_device, rom1_load)
-MACHINE_CONFIG_END
+ GENERIC_SOCKET(config, "rom0", generic_plain_slot, "acrnsys_rom", "bin,rom").set_device_load(FUNC(acorn_8k_device::rom0_load), this); // IC17
+ GENERIC_SOCKET(config, "rom1", generic_plain_slot, "acrnsys_rom", "bin,rom").set_device_load(FUNC(acorn_8k_device::rom1_load), this); // IC18
+}
//**************************************************************************
diff --git a/src/devices/bus/cgenie/expansion/floppy.cpp b/src/devices/bus/cgenie/expansion/floppy.cpp
index 2cf4595ec03..a25e49c7019 100644
--- a/src/devices/bus/cgenie/expansion/floppy.cpp
+++ b/src/devices/bus/cgenie/expansion/floppy.cpp
@@ -83,7 +83,8 @@ const tiny_rom_entry *cgenie_fdc_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(cgenie_fdc_device::device_add_mconfig)
+void cgenie_fdc_device::device_add_mconfig(machine_config &config)
+{
TIMER(config, "timer").configure_periodic(FUNC(cgenie_fdc_device::timer_callback), attotime::from_msec(25));
WD2793(config, m_fdc, 4_MHz_XTAL / 4);
@@ -96,12 +97,10 @@ MACHINE_CONFIG_START(cgenie_fdc_device::device_add_mconfig)
// SOFTWARE_LIST(config, "floppy_list").set_original("cgenie_flop");
- MCFG_GENERIC_SOCKET_ADD("socket", generic_plain_slot, "cgenie_flop_rom")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_LOAD(cgenie_fdc_device, socket_load)
+ GENERIC_SOCKET(config, "socket", generic_plain_slot, "cgenie_flop_rom", "bin,rom").set_device_load(FUNC(cgenie_fdc_device::socket_load), this);
SOFTWARE_LIST(config, "rom_list").set_original("cgenie_flop_rom");
-MACHINE_CONFIG_END
+}
//**************************************************************************
@@ -174,7 +173,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( cgenie_fdc_device::timer_callback )
m_slot->int_w(ASSERT_LINE);
}
-DEVICE_IMAGE_LOAD_MEMBER( cgenie_fdc_device, socket_load )
+DEVICE_IMAGE_LOAD_MEMBER( cgenie_fdc_device::socket_load )
{
uint32_t size = m_socket->common_get_size("rom");
diff --git a/src/devices/bus/electron/cart/ap5.cpp b/src/devices/bus/electron/cart/ap5.cpp
index 660587c7642..e72e9ac4e25 100644
--- a/src/devices/bus/electron/cart/ap5.cpp
+++ b/src/devices/bus/electron/cart/ap5.cpp
@@ -26,9 +26,9 @@ void electron_ap5_device::device_add_mconfig(machine_config &config)
{
/* rom sockets */
GENERIC_SOCKET(config, m_romslot[0], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 14
- m_romslot[0]->set_device_load(device_image_load_delegate(&electron_ap5_device::device_image_load_rom1_load, this));
+ m_romslot[0]->set_device_load(FUNC(electron_ap5_device::rom1_load), this);
GENERIC_SOCKET(config, m_romslot[1], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 15
- m_romslot[1]->set_device_load(device_image_load_delegate(&electron_ap5_device::device_image_load_rom2_load, this));
+ m_romslot[1]->set_device_load(FUNC(electron_ap5_device::rom2_load), this);
/* via */
VIA6522(config, m_via, DERIVED_CLOCK(1, 16));
diff --git a/src/devices/bus/electron/cart/romp144.cpp b/src/devices/bus/electron/cart/romp144.cpp
index 6e4eb96bd84..14853d86949 100644
--- a/src/devices/bus/electron/cart/romp144.cpp
+++ b/src/devices/bus/electron/cart/romp144.cpp
@@ -26,19 +26,19 @@ void electron_romp144_device::device_add_mconfig(machine_config &config)
{
/* rom sockets */
GENERIC_SOCKET(config, m_romslot[0], generic_plain_slot, "electron_rom", "bin,rom");
- m_romslot[0]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom0, this));
+ m_romslot[0]->set_device_load(FUNC(electron_romp144_device::rom0), this);
GENERIC_SOCKET(config, m_romslot[1], generic_plain_slot, "electron_rom", "bin,rom");
- m_romslot[1]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom1, this));
+ m_romslot[1]->set_device_load(FUNC(electron_romp144_device::rom1), this);
GENERIC_SOCKET(config, m_romslot[2], generic_plain_slot, "electron_rom", "bin,rom");
- m_romslot[2]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom2, this));
+ m_romslot[2]->set_device_load(FUNC(electron_romp144_device::rom2), this);
GENERIC_SOCKET(config, m_romslot[3], generic_plain_slot, "electron_rom", "bin,rom");
- m_romslot[3]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom3, this));
+ m_romslot[3]->set_device_load(FUNC(electron_romp144_device::rom3), this);
GENERIC_SOCKET(config, m_romslot[4], generic_plain_slot, "electron_rom", "bin,rom");
- m_romslot[4]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom4, this));
+ m_romslot[4]->set_device_load(FUNC(electron_romp144_device::rom4), this);
GENERIC_SOCKET(config, m_romslot[5], generic_plain_slot, "electron_rom", "bin,rom");
- m_romslot[5]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom5, this));
+ m_romslot[5]->set_device_load(FUNC(electron_romp144_device::rom5), this);
GENERIC_SOCKET(config, m_romslot[6], generic_plain_slot, "electron_rom", "bin,rom");
- m_romslot[6]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom6, this));
+ m_romslot[6]->set_device_load(FUNC(electron_romp144_device::rom6), this);
}
//**************************************************************************
diff --git a/src/devices/bus/electron/plus2.cpp b/src/devices/bus/electron/plus2.cpp
index 040ec58eb35..dd8be6e09eb 100644
--- a/src/devices/bus/electron/plus2.cpp
+++ b/src/devices/bus/electron/plus2.cpp
@@ -33,11 +33,11 @@ void electron_plus2_device::device_add_mconfig(machine_config &config)
{
/* rom sockets */
GENERIC_SOCKET(config, m_rom[0], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 13
- m_rom[0]->set_device_load(device_image_load_delegate(&electron_plus2_device::device_image_load_rom1_load, this));
+ m_rom[0]->set_device_load(FUNC(electron_plus2_device::rom1_load), this);
GENERIC_SOCKET(config, m_rom[1], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 14
- m_rom[1]->set_device_load(device_image_load_delegate(&electron_plus2_device::device_image_load_rom2_load, this));
+ m_rom[1]->set_device_load(FUNC(electron_plus2_device::rom2_load), this);
GENERIC_SOCKET(config, m_rom[2], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 15
- m_rom[2]->set_device_load(device_image_load_delegate(&electron_plus2_device::device_image_load_rom3_load, this));
+ m_rom[2]->set_device_load(FUNC(electron_plus2_device::rom3_load), this);
/* cartridges */
ELECTRON_CARTSLOT(config, m_cart[0], DERIVED_CLOCK(1, 1), electron_cart, nullptr);
diff --git a/src/devices/bus/electron/rombox.cpp b/src/devices/bus/electron/rombox.cpp
index 35f94b08d13..05d0a7c9092 100644
--- a/src/devices/bus/electron/rombox.cpp
+++ b/src/devices/bus/electron/rombox.cpp
@@ -55,21 +55,21 @@ void electron_rombox_device::device_add_mconfig(machine_config &config)
{
/* rom sockets */
GENERIC_SOCKET(config, m_rom[0], generic_plain_slot, "electron_rom", "bin,rom");
- m_rom[0]->set_device_load(device_image_load_delegate(&electron_rombox_device::device_image_load_rom1_load, this));
+ m_rom[0]->set_device_load(FUNC(electron_rombox_device::rom1_load), this);
GENERIC_SOCKET(config, m_rom[1], generic_plain_slot, "electron_rom", "bin,rom");
- m_rom[1]->set_device_load(device_image_load_delegate(&electron_rombox_device::device_image_load_rom2_load, this));
+ m_rom[1]->set_device_load(FUNC(electron_rombox_device::rom2_load), this);
GENERIC_SOCKET(config, m_rom[2], generic_plain_slot, "electron_rom", "bin,rom");
- m_rom[2]->set_device_load(device_image_load_delegate(&electron_rombox_device::device_image_load_rom3_load, this));
+ m_rom[2]->set_device_load(FUNC(electron_rombox_device::rom3_load), this);
GENERIC_SOCKET(config, m_rom[3], generic_plain_slot, "electron_rom", "bin,rom");
- m_rom[3]->set_device_load(device_image_load_delegate(&electron_rombox_device::device_image_load_rom4_load, this));
+ m_rom[3]->set_device_load(FUNC(electron_rombox_device::rom4_load), this);
GENERIC_SOCKET(config, m_rom[4], generic_plain_slot, "electron_rom", "bin,rom");
- m_rom[4]->set_device_load(device_image_load_delegate(&electron_rombox_device::device_image_load_rom5_load, this));
+ m_rom[4]->set_device_load(FUNC(electron_rombox_device::rom5_load), this);
GENERIC_SOCKET(config, m_rom[5], generic_plain_slot, "electron_rom", "bin,rom");
- m_rom[5]->set_device_load(device_image_load_delegate(&electron_rombox_device::device_image_load_rom6_load, this));
+ m_rom[5]->set_device_load(FUNC(electron_rombox_device::rom6_load), this);
GENERIC_SOCKET(config, m_rom[6], generic_plain_slot, "electron_rom", "bin,rom");
- m_rom[6]->set_device_load(device_image_load_delegate(&electron_rombox_device::device_image_load_rom7_load, this));
+ m_rom[6]->set_device_load(FUNC(electron_rombox_device::rom7_load), this);
GENERIC_SOCKET(config, m_rom[7], generic_plain_slot, "electron_rom", "bin,rom");
- m_rom[7]->set_device_load(device_image_load_delegate(&electron_rombox_device::device_image_load_rom8_load, this));
+ m_rom[7]->set_device_load(FUNC(electron_rombox_device::rom8_load), this);
/* pass-through */
ELECTRON_EXPANSION_SLOT(config, m_exp, DERIVED_CLOCK(1, 1), electron_expansion_devices, nullptr);
diff --git a/src/devices/bus/electron/romboxp.cpp b/src/devices/bus/electron/romboxp.cpp
index 7917ae3d539..7581cf5b2e1 100644
--- a/src/devices/bus/electron/romboxp.cpp
+++ b/src/devices/bus/electron/romboxp.cpp
@@ -94,13 +94,13 @@ void electron_romboxp_device::device_add_mconfig(machine_config &config)
/* rom sockets */
GENERIC_SOCKET(config, m_rom[0], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 4/12
- m_rom[0]->set_device_load(device_image_load_delegate(&electron_romboxp_device::device_image_load_rom1_load, this));
+ m_rom[0]->set_device_load(FUNC(electron_romboxp_device::rom1_load), this);
GENERIC_SOCKET(config, m_rom[1], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 5/13
- m_rom[1]->set_device_load(device_image_load_delegate(&electron_romboxp_device::device_image_load_rom2_load, this));
+ m_rom[1]->set_device_load(FUNC(electron_romboxp_device::rom2_load), this);
GENERIC_SOCKET(config, m_rom[2], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 6/14 also ROM/RAM
- m_rom[2]->set_device_load(device_image_load_delegate(&electron_romboxp_device::device_image_load_rom3_load, this));
+ m_rom[2]->set_device_load(FUNC(electron_romboxp_device::rom3_load), this);
GENERIC_SOCKET(config, m_rom[3], generic_plain_slot, "electron_rom", "bin,rom"); // ROM SLOT 7/15
- m_rom[3]->set_device_load(device_image_load_delegate(&electron_romboxp_device::device_image_load_rom4_load, this));
+ m_rom[3]->set_device_load(FUNC(electron_romboxp_device::rom4_load), this);
/* cartridges */
ELECTRON_CARTSLOT(config, m_cart[0], DERIVED_CLOCK(1, 1), electron_cart, nullptr); // ROM SLOT 0/1
diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h
index 3fac098afb7..83a1795e813 100644
--- a/src/devices/bus/generic/slot.h
+++ b/src/devices/bus/generic/slot.h
@@ -67,32 +67,6 @@ enum
-#define MCFG_GENERIC_MANDATORY \
- static_cast<generic_slot_device *>(device)->set_must_be_loaded(true);
-
-#define MCFG_GENERIC_WIDTH(_width) \
- static_cast<generic_slot_device *>(device)->set_width(_width);
-
-#define MCFG_GENERIC_ENDIAN(_endianness) \
- static_cast<generic_slot_device *>(device)->set_endian(_endianness);
-
-#define MCFG_GENERIC_DEFAULT_CARD(_def_card) \
- static_cast<generic_slot_device *>(device)->set_default_card(_def_card);
-
-#define MCFG_GENERIC_INTERFACE(_intf) \
- static_cast<generic_slot_device *>(device)->set_interface(_intf);
-
-#define MCFG_GENERIC_EXTENSIONS(_ext) \
- static_cast<generic_slot_device *>(device)->set_extensions(_ext);
-
-#define MCFG_GENERIC_LOAD(_class, _method) \
- downcast<generic_slot_device &>(*device).set_device_load(device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_method), this));
-
-#define MCFG_GENERIC_UNLOAD(_class, _method) \
- downcast<generic_slot_device &>(*device).set_device_unload(device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_method), this));
-
-
-
// ======================> generic_slot_device
class generic_slot_device : public device_t,
@@ -104,8 +78,8 @@ public:
generic_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
virtual ~generic_slot_device();
- template <typename Object> void set_device_load(Object &&cb) { m_device_image_load = std::forward<Object>(cb); }
- template <typename Object> void set_device_unload(Object &&cb) { m_device_image_unload = std::forward<Object>(cb); }
+ template <typename... T> void set_device_load(T &&... args) { m_device_image_load = load_delegate(std::forward<T>(args)...); }
+ template <typename... T> void set_device_unload(T &&... args) { m_device_image_unload = unload_delegate(std::forward<T>(args)...); }
void set_interface(const char * interface) { m_interface = interface; }
void set_default_card(const char * def) { m_default_card = def; }
@@ -182,21 +156,22 @@ protected:
int m_width;
endianness_t m_endianness;
device_generic_cart_interface *m_cart;
- device_image_load_delegate m_device_image_load;
- device_image_func_delegate m_device_image_unload;
+ load_delegate m_device_image_load;
+ unload_delegate m_device_image_unload;
};
class generic_socket_device : public generic_slot_device
{
public:
template <typename T>
- generic_socket_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *intf, const char *exts)
+ generic_socket_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *intf, const char *exts = nullptr)
: generic_socket_device(mconfig, tag, owner, (uint32_t)0)
{
opts(*this);
set_fixed(false);
set_interface(intf);
- set_extensions(exts);
+ if (exts)
+ set_extensions(exts);
}
generic_socket_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
@@ -233,22 +208,4 @@ DECLARE_DEVICE_TYPE(GENERIC_CARTSLOT, generic_cartslot_device)
DEVICE CONFIGURATION MACROS
***************************************************************************/
-#define MCFG_GENERIC_CARTSLOT_ADD(_tag, _slot_intf, _dev_intf) \
- MCFG_DEVICE_ADD(_tag, GENERIC_CARTSLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false) \
- MCFG_GENERIC_INTERFACE(_dev_intf)
-#define MCFG_GENERIC_SOCKET_ADD(_tag, _slot_intf, _dev_intf) \
- MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false) \
- MCFG_GENERIC_INTERFACE(_dev_intf)
-
-#define MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT(_tag, _slot_intf, _dev_intf, _default) \
- MCFG_DEVICE_ADD(_tag, GENERIC_CARTSLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _default, false) \
- MCFG_GENERIC_INTERFACE(_dev_intf)
-#define MCFG_GENERIC_SOCKET_ADD_WITH_DEFAULT(_tag, _slot_intf, _dev_intf, _default) \
- MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _default, false) \
- MCFG_GENERIC_INTERFACE(_dev_intf)
-
#endif // MAME_BUS_GENERIC_SLOT_H
diff --git a/src/devices/bus/spectrum/intf2.cpp b/src/devices/bus/spectrum/intf2.cpp
index 789be29717d..ab9caf68f8c 100644
--- a/src/devices/bus/spectrum/intf2.cpp
+++ b/src/devices/bus/spectrum/intf2.cpp
@@ -58,7 +58,7 @@ void spectrum_intf2_device::device_add_mconfig(machine_config &config)
{
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "spectrum_cart", "bin,rom");
- m_cart->set_device_load(device_image_load_delegate(&spectrum_intf2_device::device_image_load_spectrum_cart, this));
+ m_cart->set_device_load(FUNC(spectrum_intf2_device::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("spectrum_cart");
}
@@ -93,7 +93,7 @@ void spectrum_intf2_device::device_start()
// IMPLEMENTATION
//**************************************************************************
-DEVICE_IMAGE_LOAD_MEMBER(spectrum_intf2_device, spectrum_cart)
+DEVICE_IMAGE_LOAD_MEMBER(spectrum_intf2_device::cart_load)
{
uint32_t size = m_cart->common_get_size("rom");
diff --git a/src/devices/bus/spectrum/intf2.h b/src/devices/bus/spectrum/intf2.h
index fd131112a3c..4faecbae93a 100644
--- a/src/devices/bus/spectrum/intf2.h
+++ b/src/devices/bus/spectrum/intf2.h
@@ -40,7 +40,7 @@ protected:
private:
image_init_result load_cart(device_image_interface &image, generic_slot_device *slot);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(spectrum_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
required_device<generic_slot_device> m_cart;
required_ioport m_exp_line3;
diff --git a/src/devices/bus/ti99x/990_hd.cpp b/src/devices/bus/ti99x/990_hd.cpp
index c17f63b807e..8e9c08648a5 100644
--- a/src/devices/bus/ti99x/990_hd.cpp
+++ b/src/devices/bus/ti99x/990_hd.cpp
@@ -162,7 +162,7 @@ int ti990_hdc_device::get_id_from_device( device_t *device )
/*
Initialize hard disk unit and open a hard disk image
*/
-DEVICE_IMAGE_LOAD_MEMBER( ti990_hdc_device, ti990_hd )
+DEVICE_IMAGE_LOAD_MEMBER( ti990_hdc_device::load_hd )
{
int id = get_id_from_device( &image.device() );
hd_unit_t *d;
@@ -239,7 +239,7 @@ DEVICE_IMAGE_LOAD_MEMBER( ti990_hdc_device, ti990_hd )
/*
close a hard disk image
*/
-DEVICE_IMAGE_UNLOAD_MEMBER( ti990_hdc_device, ti990_hd )
+DEVICE_IMAGE_UNLOAD_MEMBER( ti990_hdc_device::unload_hd )
{
int id = get_id_from_device(&image.device());
hd_unit_t *d;
@@ -977,7 +977,7 @@ void ti990_hdc_device::device_start()
int i;
/* initialize harddisk information */
- /* attention lines will be set by DEVICE_IMAGE_LOD */
+ /* attention lines will be set by DEVICE_IMAGE_LOAD */
for (i=0; i<MAX_DISK_UNIT; i++)
{
m_d[i].format = format_mame;
@@ -1004,17 +1004,21 @@ void ti990_hdc_device::device_start()
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(ti990_hdc_device::device_add_mconfig)
- MCFG_HARDDISK_ADD( "harddisk1" )
- MCFG_HARDDISK_LOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_UNLOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_ADD( "harddisk2" )
- MCFG_HARDDISK_LOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_UNLOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_ADD( "harddisk3" )
- MCFG_HARDDISK_LOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_UNLOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_ADD( "harddisk4" )
- MCFG_HARDDISK_LOAD(ti990_hdc_device, ti990_hd)
- MCFG_HARDDISK_UNLOAD(ti990_hdc_device, ti990_hd)
-MACHINE_CONFIG_END
+void ti990_hdc_device::device_add_mconfig(machine_config &config)
+{
+ harddisk_image_device &harddisk1(HARDDISK(config, "harddisk1"));
+ harddisk1.set_device_load(FUNC(ti990_hdc_device::load_hd), this);
+ harddisk1.set_device_unload(FUNC(ti990_hdc_device::unload_hd), this);
+
+ harddisk_image_device &harddisk2(HARDDISK(config, "harddisk2"));
+ harddisk2.set_device_load(FUNC(ti990_hdc_device::load_hd), this);
+ harddisk2.set_device_unload(FUNC(ti990_hdc_device::unload_hd), this);
+
+ harddisk_image_device &harddisk3(HARDDISK(config, "harddisk3"));
+ harddisk3.set_device_load(FUNC(ti990_hdc_device::load_hd), this);
+ harddisk3.set_device_unload(FUNC(ti990_hdc_device::unload_hd), this);
+
+ harddisk_image_device &harddisk4(HARDDISK(config, "harddisk4"));
+ harddisk4.set_device_load(FUNC(ti990_hdc_device::load_hd), this);
+ harddisk4.set_device_unload(FUNC(ti990_hdc_device::unload_hd), this);
+}
diff --git a/src/devices/bus/ti99x/990_hd.h b/src/devices/bus/ti99x/990_hd.h
index 22436d389f5..2f9be99a1e7 100644
--- a/src/devices/bus/ti99x/990_hd.h
+++ b/src/devices/bus/ti99x/990_hd.h
@@ -18,8 +18,8 @@ public:
DECLARE_READ16_MEMBER(read);
DECLARE_WRITE16_MEMBER(write);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( ti990_hd );
- DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( ti990_hd );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( load_hd );
+ DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( unload_hd );
template <typename T> void set_memory_space(T &&tag, int spacenum) { m_memory_space.set_tag(std::forward<T>(tag), spacenum); }
auto int_cb() { return m_interrupt_callback.bind(); }
diff --git a/src/devices/imagedev/diablo.cpp b/src/devices/imagedev/diablo.cpp
index 56c90e0c66f..5e8162ce842 100644
--- a/src/devices/imagedev/diablo.cpp
+++ b/src/devices/imagedev/diablo.cpp
@@ -36,8 +36,8 @@ diablo_image_device::diablo_image_device(const machine_config &mconfig, const ch
device_image_interface(mconfig, *this),
m_chd(nullptr),
m_hard_disk_handle(nullptr),
- m_device_image_load(device_image_load_delegate()),
- m_device_image_unload(device_image_func_delegate()),
+ m_device_image_load(load_delegate()),
+ m_device_image_unload(unload_delegate()),
m_interface(nullptr)
{
}
diff --git a/src/devices/imagedev/diablo.h b/src/devices/imagedev/diablo.h
index 543d89d3438..d3156e49ae0 100644
--- a/src/devices/imagedev/diablo.h
+++ b/src/devices/imagedev/diablo.h
@@ -65,9 +65,9 @@ protected:
chd_file m_diffchd; /* handle to the diff CHD */
hard_disk_file *m_hard_disk_handle;
- device_image_load_delegate m_device_image_load;
- device_image_func_delegate m_device_image_unload;
- const char * m_interface;
+ load_delegate m_device_image_load;
+ unload_delegate m_device_image_unload;
+ const char * m_interface;
};
// device type definition
diff --git a/src/devices/imagedev/harddriv.cpp b/src/devices/imagedev/harddriv.cpp
index c3d2e9ca50c..145ce0ebdbb 100644
--- a/src/devices/imagedev/harddriv.cpp
+++ b/src/devices/imagedev/harddriv.cpp
@@ -53,8 +53,8 @@ harddisk_image_device::harddisk_image_device(const machine_config &mconfig, devi
device_image_interface(mconfig, *this),
m_chd(nullptr),
m_hard_disk_handle(nullptr),
- m_device_image_load(device_image_load_delegate()),
- m_device_image_unload(device_image_func_delegate()),
+ m_device_image_load(load_delegate()),
+ m_device_image_unload(unload_delegate()),
m_interface(nullptr)
{
}
diff --git a/src/devices/imagedev/harddriv.h b/src/devices/imagedev/harddriv.h
index 7b71d13d2c7..25048595bde 100644
--- a/src/devices/imagedev/harddriv.h
+++ b/src/devices/imagedev/harddriv.h
@@ -33,8 +33,8 @@ public:
harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~harddisk_image_device();
- template <typename Object> void set_device_load(Object &&cb) { m_device_image_load = std::forward<Object>(cb); }
- template <typename Object> void set_device_unload(Object &&cb) { m_device_image_unload = std::forward<Object>(cb); }
+ template <typename... T> void set_device_load(T &&... args) { m_device_image_load = load_delegate(std::forward<T>(args)...); }
+ template <typename... T> void set_device_unload(T &&... args) { m_device_image_unload = unload_delegate(std::forward<T>(args)...); }
void set_interface(const char *interface) { m_interface = interface; }
// image-level overrides
@@ -73,9 +73,9 @@ protected:
chd_file m_diffchd; /* handle to the diff CHD */
hard_disk_file *m_hard_disk_handle;
- device_image_load_delegate m_device_image_load;
- device_image_func_delegate m_device_image_unload;
- const char * m_interface;
+ load_delegate m_device_image_load;
+ unload_delegate m_device_image_unload;
+ const char * m_interface;
};
// device type definition
diff --git a/src/emu/diimage.h b/src/emu/diimage.h
index 82c3d338a1f..d96aae352be 100644
--- a/src/emu/diimage.h
+++ b/src/emu/diimage.h
@@ -94,25 +94,15 @@ private:
enum class image_init_result { PASS, FAIL };
enum class image_verify_result { PASS, FAIL };
-// device image interface function types
-typedef delegate<image_init_result (device_image_interface &)> device_image_load_delegate;
-typedef delegate<void (device_image_interface &)> device_image_func_delegate;
-
//**************************************************************************
// MACROS
//**************************************************************************
-#define DEVICE_IMAGE_LOAD_MEMBER_NAME(_name) device_image_load_##_name
-#define DEVICE_IMAGE_LOAD_NAME(_class,_name) _class::DEVICE_IMAGE_LOAD_MEMBER_NAME(_name)
-#define DECLARE_DEVICE_IMAGE_LOAD_MEMBER(_name) image_init_result DEVICE_IMAGE_LOAD_MEMBER_NAME(_name)(device_image_interface &image)
-#define DEVICE_IMAGE_LOAD_MEMBER(_class,_name) image_init_result DEVICE_IMAGE_LOAD_NAME(_class,_name)(device_image_interface &image)
-#define DEVICE_IMAGE_LOAD_DELEGATE(_class,_name) device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_name), downcast<_class *>(device->owner()))
+#define DEVICE_IMAGE_LOAD_MEMBER(_name) image_init_result _name(device_image_interface &image)
+#define DECLARE_DEVICE_IMAGE_LOAD_MEMBER(_name) DEVICE_IMAGE_LOAD_MEMBER(_name)
-#define DEVICE_IMAGE_UNLOAD_MEMBER_NAME(_name) device_image_unload_##_name
-#define DEVICE_IMAGE_UNLOAD_NAME(_class,_name) _class::DEVICE_IMAGE_UNLOAD_MEMBER_NAME(_name)
-#define DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(_name) void DEVICE_IMAGE_UNLOAD_MEMBER_NAME(_name)(device_image_interface &image)
-#define DEVICE_IMAGE_UNLOAD_MEMBER(_class,_name) void DEVICE_IMAGE_UNLOAD_NAME(_class,_name)(device_image_interface &image)
-#define DEVICE_IMAGE_UNLOAD_DELEGATE(_class,_name) device_image_func_delegate(&DEVICE_IMAGE_UNLOAD_NAME(_class,_name), downcast<_class *>(device->owner()))
+#define DEVICE_IMAGE_UNLOAD_MEMBER(_name) void _name(device_image_interface &image)
+#define DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(_name) DEVICE_IMAGE_UNLOAD_MEMBER(_name)
#define MCFG_SET_IMAGE_LOADABLE(_usrload) \
dynamic_cast<device_image_interface &>(*device).set_user_loadable(_usrload);
@@ -124,6 +114,9 @@ typedef delegate<void (device_image_interface &)> device_image_func_delegate;
class device_image_interface : public device_interface
{
public:
+ typedef device_delegate<image_init_result (device_image_interface &)> load_delegate;
+ typedef device_delegate<void (device_image_interface &)> unload_delegate;
+
typedef std::vector<std::unique_ptr<image_device_format>> formatlist_type;
// construction/destruction
diff --git a/src/mame/drivers/aci_ggm.cpp b/src/mame/drivers/aci_ggm.cpp
index f210b60c5ae..45a5963dc0c 100644
--- a/src/mame/drivers/aci_ggm.cpp
+++ b/src/mame/drivers/aci_ggm.cpp
@@ -169,7 +169,7 @@ void ggm_state::update_reset(ioport_value state)
// cartridge
-DEVICE_IMAGE_LOAD_MEMBER(ggm_state, cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(ggm_state::cartridge)
{
u32 size = m_cart->common_get_size("rom");
m_cart_mask = ((1 << (31 - count_leading_zeros(size))) - 1) & 0x7fff;
@@ -373,7 +373,7 @@ void ggm_state::ggm(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "ggm", "bin");
- m_cart->set_device_load(device_image_load_delegate(&ggm_state::device_image_load_cartridge, this));
+ m_cart->set_device_load(FUNC(ggm_state::cartridge), this);
m_cart->set_must_be_loaded(true);
SOFTWARE_LIST(config, "cart_list").set_original("ggm");
diff --git a/src/mame/drivers/aim65.cpp b/src/mame/drivers/aim65.cpp
index 619c8c4fe99..ef94ced78f4 100644
--- a/src/mame/drivers/aim65.cpp
+++ b/src/mame/drivers/aim65.cpp
@@ -205,7 +205,8 @@ static DEVICE_INPUT_DEFAULTS_START( serial_term )
DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_1 )
DEVICE_INPUT_DEFAULTS_END
-MACHINE_CONFIG_START(aim65_state::aim65)
+void aim65_state::aim65(machine_config &config)
+{
/* basic machine hardware */
M6502(config, m_maincpu, AIM65_CLOCK); /* 1 MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &aim65_state::mem_map);
@@ -276,41 +277,22 @@ MACHINE_CONFIG_START(aim65_state::aim65)
//m_rs232->rxd_handler().set(m_via0, FUNC(via6522_device::write_pb6)); // function disabled in 6522via.cpp
m_rs232->set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(serial_term));
- MCFG_GENERIC_SOCKET_ADD("z26", generic_plain_slot, "aim65_z26_cart")
- MCFG_GENERIC_EXTENSIONS("z26")
- MCFG_GENERIC_LOAD(aim65_state, z26_load)
-
- MCFG_GENERIC_SOCKET_ADD("z25", generic_plain_slot, "aim65_z25_cart")
- MCFG_GENERIC_EXTENSIONS("z25")
- MCFG_GENERIC_LOAD(aim65_state, z25_load)
-
- MCFG_GENERIC_SOCKET_ADD("z24", generic_plain_slot, "aim65_z24_cart")
- MCFG_GENERIC_EXTENSIONS("z24")
- MCFG_GENERIC_LOAD(aim65_state, z24_load)
+ GENERIC_SOCKET(config, "z26", generic_plain_slot, "aim65_z26_cart", "z26").set_device_load(FUNC(aim65_state::z26_load), this);
+ GENERIC_SOCKET(config, "z25", generic_plain_slot, "aim65_z25_cart", "z25").set_device_load(FUNC(aim65_state::z25_load), this);
+ GENERIC_SOCKET(config, "z24", generic_plain_slot, "aim65_z24_cart", "z24").set_device_load(FUNC(aim65_state::z24_load), this);
/* PROM/ROM module sockets */
- MCFG_GENERIC_SOCKET_ADD("z12", generic_plain_slot, "rm65_z12_cart")
- MCFG_GENERIC_EXTENSIONS("z12")
- MCFG_GENERIC_LOAD(aim65_state, z12_load)
-
- MCFG_GENERIC_SOCKET_ADD("z13", generic_plain_slot, "rm65_z13_cart")
- MCFG_GENERIC_EXTENSIONS("z13")
- MCFG_GENERIC_LOAD(aim65_state, z13_load)
-
- MCFG_GENERIC_SOCKET_ADD("z14", generic_plain_slot, "rm65_z14_cart")
- MCFG_GENERIC_EXTENSIONS("z14")
- MCFG_GENERIC_LOAD(aim65_state, z14_load)
-
- MCFG_GENERIC_SOCKET_ADD("z15", generic_plain_slot, "rm65_z15_cart")
- MCFG_GENERIC_EXTENSIONS("z15")
- MCFG_GENERIC_LOAD(aim65_state, z15_load)
+ GENERIC_SOCKET(config, "z12", generic_plain_slot, "rm65_z12_cart", "z12").set_device_load(FUNC(aim65_state::z12_load), this);
+ GENERIC_SOCKET(config, "z13", generic_plain_slot, "rm65_z13_cart", "z13").set_device_load(FUNC(aim65_state::z13_load), this);
+ GENERIC_SOCKET(config, "z14", generic_plain_slot, "rm65_z14_cart", "z14").set_device_load(FUNC(aim65_state::z14_load), this);
+ GENERIC_SOCKET(config, "z15", generic_plain_slot, "rm65_z15_cart", "z15").set_device_load(FUNC(aim65_state::z15_load), this);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("4K").set_extra_options("1K,2K,3K");
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("aim65_cart");
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/alphatro.cpp b/src/mame/drivers/alphatro.cpp
index 1e7b09f6dae..b0d1726fab9 100644
--- a/src/mame/drivers/alphatro.cpp
+++ b/src/mame/drivers/alphatro.cpp
@@ -728,7 +728,8 @@ static void alphatro_floppies(device_slot_interface &device)
device.option_add("525dd", FLOPPY_525_DD);
}
-MACHINE_CONFIG_START(alphatro_state::alphatro)
+void alphatro_state::alphatro(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, 16_MHz_XTAL / 4);
m_maincpu->set_addrmap(AS_PROGRAM, &alphatro_state::alphatro_map);
@@ -787,9 +788,7 @@ MACHINE_CONFIG_START(alphatro_state::alphatro)
RAM(config, "ram").set_default_size("64K");
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "alphatro_cart")
- MCFG_GENERIC_EXTENSIONS("bin")
- MCFG_GENERIC_LOAD(alphatro_state, cart_load)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "alphatro_cart", "bin").set_device_load(FUNC(alphatro_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("alphatro_cart");
/* 0000 banking */
@@ -800,7 +799,7 @@ MACHINE_CONFIG_START(alphatro_state::alphatro)
/* F000 banking */
ADDRESS_MAP_BANK(config, "monbank").set_map(&alphatro_state::monbank_map).set_options(ENDIANNESS_BIG, 8, 32, 0x1000);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/amstrad.cpp b/src/mame/drivers/amstrad.cpp
index 42a8edad593..f8f7ddc89ef 100644
--- a/src/mame/drivers/amstrad.cpp
+++ b/src/mame/drivers/amstrad.cpp
@@ -807,14 +807,14 @@ FLOPPY_FORMATS_MEMBER( amstrad_state::aleste_floppy_formats )
FLOPPY_MSX_FORMAT
FLOPPY_FORMATS_END
-MACHINE_CONFIG_START(amstrad_state::cpcplus_cartslot)
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "gx4000_cart")
- MCFG_GENERIC_EXTENSIONS("bin,cpr")
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(amstrad_state, amstrad_plus_cartridge)
+void amstrad_state::cpcplus_cartslot(machine_config &config)
+{
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "gx4000_cart", "bin,cpr"));
+ cartslot.set_must_be_loaded(true);
+ cartslot.set_device_load(FUNC(amstrad_state::amstrad_plus_cartridge), this);
SOFTWARE_LIST(config, "cart_list").set_original("gx4000");
-MACHINE_CONFIG_END
+}
void cpc464_exp_cards(device_slot_interface &device)
{
diff --git a/src/mame/drivers/atom.cpp b/src/mame/drivers/atom.cpp
index 6df118bd1b6..ce13ffd7964 100644
--- a/src/mame/drivers/atom.cpp
+++ b/src/mame/drivers/atom.cpp
@@ -709,7 +709,8 @@ FLOPPY_FORMATS_END0
MACHINE_DRIVER( atom )
-------------------------------------------------*/
-MACHINE_CONFIG_START(atom_state::atom)
+void atom_state::atom(machine_config &config)
+{
/* basic machine hardware */
M6502(config, m_maincpu, X2/4);
m_maincpu->set_addrmap(AS_PROGRAM, &atom_state::atom_mem);
@@ -761,9 +762,7 @@ MACHINE_CONFIG_START(atom_state::atom)
QUICKLOAD(config, "quickload", "atm").set_load_callback(FUNC(atom_state::quickload_cb), this);
/* utility rom slot */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "atom_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_LOAD(atom_state, cart_load)
+ GENERIC_CARTSLOT(config, "cartslot", generic_linear_slot, "atom_cart", "bin,rom").set_device_load(FUNC(atom_state::cart_load), this);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("32K").set_extra_options("2K,4K,6K,8K,10K,12K").set_default_value(0x00);
@@ -772,44 +771,43 @@ MACHINE_CONFIG_START(atom_state::atom)
SOFTWARE_LIST(config, "rom_list").set_original("atom_rom");
SOFTWARE_LIST(config, "cass_list").set_original("atom_cass");
SOFTWARE_LIST(config, "flop_list").set_original("atom_flop");
-MACHINE_CONFIG_END
+}
/*-------------------------------------------------
MACHINE_DRIVER( atomeb )
-------------------------------------------------*/
-#define MCFG_ATOM_ROM_ADD(_tag, _load) \
- MCFG_GENERIC_SOCKET_ADD(_tag, generic_linear_slot, "atom_cart") \
- MCFG_GENERIC_EXTENSIONS("bin,rom") \
- MCFG_GENERIC_LOAD(atomeb_state, _load)
+#define ATOM_ROM(_tag, _load) \
+ GENERIC_SOCKET(config, _tag, generic_linear_slot, "atom_cart", "bin,rom").set_device_load(FUNC(atomeb_state::_load), this) \
-MACHINE_CONFIG_START(atomeb_state::atomeb)
+void atomeb_state::atomeb(machine_config &config)
+{
atom(config);
m_maincpu->set_addrmap(AS_PROGRAM, &atomeb_state::atomeb_mem);
/* cartridges */
config.device_remove("cartslot");
- MCFG_ATOM_ROM_ADD("rom_a0", ext_load<0x0>)
- MCFG_ATOM_ROM_ADD("rom_a1", ext_load<0x1>)
- MCFG_ATOM_ROM_ADD("rom_a2", ext_load<0x2>)
- MCFG_ATOM_ROM_ADD("rom_a3", ext_load<0x3>)
- MCFG_ATOM_ROM_ADD("rom_a4", ext_load<0x4>)
- MCFG_ATOM_ROM_ADD("rom_a5", ext_load<0x5>)
- MCFG_ATOM_ROM_ADD("rom_a6", ext_load<0x6>)
- MCFG_ATOM_ROM_ADD("rom_a7", ext_load<0x7>)
- MCFG_ATOM_ROM_ADD("rom_a8", ext_load<0x8>)
- MCFG_ATOM_ROM_ADD("rom_a9", ext_load<0x9>)
- MCFG_ATOM_ROM_ADD("rom_aa", ext_load<0xa>)
- MCFG_ATOM_ROM_ADD("rom_ab", ext_load<0xb>)
- MCFG_ATOM_ROM_ADD("rom_ac", ext_load<0xc>)
- MCFG_ATOM_ROM_ADD("rom_ad", ext_load<0xd>)
- MCFG_ATOM_ROM_ADD("rom_ae", ext_load<0xe>)
- MCFG_ATOM_ROM_ADD("rom_af", ext_load<0xf>)
-
- MCFG_ATOM_ROM_ADD("rom_e0", e0_load)
- MCFG_ATOM_ROM_ADD("rom_e1", e1_load)
-MACHINE_CONFIG_END
+ ATOM_ROM("rom_a0", ext_load<0x0>);
+ ATOM_ROM("rom_a1", ext_load<0x1>);
+ ATOM_ROM("rom_a2", ext_load<0x2>);
+ ATOM_ROM("rom_a3", ext_load<0x3>);
+ ATOM_ROM("rom_a4", ext_load<0x4>);
+ ATOM_ROM("rom_a5", ext_load<0x5>);
+ ATOM_ROM("rom_a6", ext_load<0x6>);
+ ATOM_ROM("rom_a7", ext_load<0x7>);
+ ATOM_ROM("rom_a8", ext_load<0x8>);
+ ATOM_ROM("rom_a9", ext_load<0x9>);
+ ATOM_ROM("rom_aa", ext_load<0xa>);
+ ATOM_ROM("rom_ab", ext_load<0xb>);
+ ATOM_ROM("rom_ac", ext_load<0xc>);
+ ATOM_ROM("rom_ad", ext_load<0xd>);
+ ATOM_ROM("rom_ae", ext_load<0xe>);
+ ATOM_ROM("rom_af", ext_load<0xf>);
+
+ ATOM_ROM("rom_e0", e0_load);
+ ATOM_ROM("rom_e1", e1_load);
+}
/*-------------------------------------------------
MACHINE_DRIVER( atombb )
diff --git a/src/mame/drivers/ave_arb.cpp b/src/mame/drivers/ave_arb.cpp
index 7892ec8a3cf..429bd1ad74e 100644
--- a/src/mame/drivers/ave_arb.cpp
+++ b/src/mame/drivers/ave_arb.cpp
@@ -100,7 +100,7 @@ private:
void v2_map(address_map &map);
// cartridge
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
DECLARE_READ8_MEMBER(cartridge_r);
u32 m_cart_mask;
@@ -142,7 +142,7 @@ void arb_state::machine_start()
// cartridge
-DEVICE_IMAGE_LOAD_MEMBER(arb_state, cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(arb_state::cart_load)
{
u32 size = m_cart->common_get_size("rom");
m_cart_mask = ((1 << (31 - count_leading_zeros(size))) - 1) & 0x7fff;
@@ -299,7 +299,7 @@ void arb_state::arb(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "arb", "bin");
- m_cart->set_device_load(device_image_load_delegate(&arb_state::device_image_load_cartridge, this));
+ m_cart->set_device_load(FUNC(arb_state::cart_load), this);
m_cart->set_must_be_loaded(true);
SOFTWARE_LIST(config, "cart_list").set_original("arb");
diff --git a/src/mame/drivers/bbc.cpp b/src/mame/drivers/bbc.cpp
index b283071c4b9..8d45735ea56 100644
--- a/src/mame/drivers/bbc.cpp
+++ b/src/mame/drivers/bbc.cpp
@@ -1465,9 +1465,9 @@ void bbcm_state::bbcm(machine_config &config)
/* cartridge slots */
GENERIC_CARTSLOT(config, m_cart[0], generic_linear_slot, "bbcm_cart", "bin,rom");
- m_cart[0]->set_device_load(device_image_load_delegate(&bbc_state::device_image_load_cart1, this));
+ m_cart[0]->set_device_load(FUNC(bbc_state::cart1_load), this);
GENERIC_CARTSLOT(config, m_cart[1], generic_linear_slot, "bbcm_cart", "bin,rom");
- m_cart[1]->set_device_load(device_image_load_delegate(&bbc_state::device_image_load_cart2, this));
+ m_cart[1]->set_device_load(FUNC(bbc_state::cart2_load), this);
/* eprom sockets */
BBC_ROMSLOT16(config, m_rom[0x08], bbc_rom_devices, nullptr); /* ic27 */
diff --git a/src/mame/drivers/beta.cpp b/src/mame/drivers/beta.cpp
index 45ad006e090..2413c7c4663 100644
--- a/src/mame/drivers/beta.cpp
+++ b/src/mame/drivers/beta.cpp
@@ -74,8 +74,8 @@ protected:
DECLARE_READ8_MEMBER( riot_pb_r );
DECLARE_WRITE8_MEMBER( riot_pb_w );
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( beta_eprom );
- DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( beta_eprom );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(load_beta_eprom);
+ DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(unload_beta_eprom);
TIMER_CALLBACK_MEMBER(led_refresh);
@@ -291,7 +291,7 @@ WRITE8_MEMBER( beta_state::riot_pb_w )
/* EPROM socket */
-DEVICE_IMAGE_LOAD_MEMBER( beta_state, beta_eprom )
+DEVICE_IMAGE_LOAD_MEMBER(beta_state::load_beta_eprom)
{
uint32_t size = m_eprom->common_get_size("rom");
@@ -307,7 +307,7 @@ DEVICE_IMAGE_LOAD_MEMBER( beta_state, beta_eprom )
return image_init_result::PASS;
}
-DEVICE_IMAGE_UNLOAD_MEMBER( beta_state, beta_eprom )
+DEVICE_IMAGE_UNLOAD_MEMBER(beta_state::unload_beta_eprom)
{
if (!image.loaded_through_softlist())
image.fwrite(&m_eprom_rom[0], 0x800);
@@ -345,7 +345,8 @@ void beta_state::machine_start()
/* Machine Driver */
-MACHINE_CONFIG_START(beta_state::beta)
+void beta_state::beta(machine_config &config)
+{
/* basic machine hardware */
M6502(config, m_maincpu, XTAL(4'000'000)/4);
m_maincpu->set_addrmap(AS_PROGRAM, &beta_state::beta_mem);
@@ -366,14 +367,13 @@ MACHINE_CONFIG_START(beta_state::beta)
m6532.irq_wr_callback().set_inputline(m_maincpu, M6502_IRQ_LINE);
/* EPROM socket */
- MCFG_GENERIC_CARTSLOT_ADD(EPROM_TAG, generic_plain_slot, nullptr)
- MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_LOAD(beta_state, beta_eprom)
- MCFG_GENERIC_UNLOAD(beta_state, beta_eprom)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, EPROM_TAG, generic_plain_slot, nullptr, "bin,rom"));
+ cartslot.set_device_load(FUNC(beta_state::load_beta_eprom), this);
+ cartslot.set_device_unload(FUNC(beta_state::unload_beta_eprom), this);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("256");
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/c2color.cpp b/src/mame/drivers/c2color.cpp
index 4164553a1a2..53c7d94e519 100644
--- a/src/mame/drivers/c2color.cpp
+++ b/src/mame/drivers/c2color.cpp
@@ -54,7 +54,7 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
required_device<generic_slot_device> m_cart;
memory_region *m_cart_region;
@@ -84,7 +84,7 @@ void c2_color_state::machine_reset()
{
}
-DEVICE_IMAGE_LOAD_MEMBER(c2_color_state, cart)
+DEVICE_IMAGE_LOAD_MEMBER(c2_color_state::cart_load)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -113,7 +113,7 @@ void c2_color_state::c2_color(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "c2color_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&c2_color_state::device_image_load_cart, this));
+ m_cart->set_device_load(FUNC(c2_color_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("c2color_cart");
}
diff --git a/src/mame/drivers/casloopy.cpp b/src/mame/drivers/casloopy.cpp
index a11cf3b67c6..85567a36dbe 100644
--- a/src/mame/drivers/casloopy.cpp
+++ b/src/mame/drivers/casloopy.cpp
@@ -207,7 +207,7 @@ private:
DECLARE_WRITE16_MEMBER(sh7021_w);
DECLARE_READ8_MEMBER(bitmap_r);
DECLARE_WRITE8_MEMBER(bitmap_w);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(loopy_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void casloopy_map(address_map &map);
void casloopy_sub_map(address_map &map);
@@ -490,7 +490,7 @@ static const gfx_layout casloopy_8bpp_layoutROM =
#endif
-DEVICE_IMAGE_LOAD_MEMBER( casloopy_state, loopy_cart )
+DEVICE_IMAGE_LOAD_MEMBER( casloopy_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
uint8_t *SRC, *DST;
@@ -540,12 +540,11 @@ MACHINE_CONFIG_START(casloopy_state::casloopy)
GFXDECODE(config, m_gfxdecode, m_palette, gfxdecode_device::empty);
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "loopy_cart")
- MCFG_GENERIC_EXTENSIONS("bin,ic1")
- MCFG_GENERIC_WIDTH(GENERIC_ROM32_WIDTH)
- MCFG_GENERIC_ENDIAN(ENDIANNESS_LITTLE)
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(casloopy_state, loopy_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "loopy_cart", "bin,ic1"));
+ cartslot.set_width(GENERIC_ROM32_WIDTH);
+ cartslot.set_endian(ENDIANNESS_LITTLE);
+ cartslot.set_must_be_loaded(true);
+ cartslot.set_device_load(FUNC(casloopy_state::cart_load), this);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("casloopy");
diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp
index a8c4f440bb4..f4e556a1e70 100644
--- a/src/mame/drivers/cc40.cpp
+++ b/src/mame/drivers/cc40.cpp
@@ -133,7 +133,7 @@ private:
DECLARE_WRITE8_MEMBER(keyboard_w);
void cc40_palette(palette_device &palette) const;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cc40_cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
HD44780_PIXEL_UPDATE(cc40_pixel_update);
void main_map(address_map &map);
@@ -168,7 +168,7 @@ private:
***************************************************************************/
-DEVICE_IMAGE_LOAD_MEMBER(cc40_state, cc40_cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(cc40_state::cart_load)
{
u32 size = m_cart->common_get_size("rom");
@@ -585,8 +585,8 @@ void cc40_state::machine_start()
machine().save().register_postload(save_prepost_delegate(FUNC(cc40_state::postload), this));
}
-MACHINE_CONFIG_START(cc40_state::cc40)
-
+void cc40_state::cc40(machine_config &config)
+{
/* basic machine hardware */
TMS70C20(config, m_maincpu, XTAL(5'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &cc40_state::main_map);
@@ -619,12 +619,9 @@ MACHINE_CONFIG_START(cc40_state::cc40)
VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "cc40_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom,256")
- MCFG_GENERIC_LOAD(cc40_state, cc40_cartridge)
-
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "cc40_cart", "bin,rom,256").set_device_load(FUNC(cc40_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("cc40_cart");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/clickstart.cpp b/src/mame/drivers/clickstart.cpp
index 6c2801132df..9342c3d6367 100644
--- a/src/mame/drivers/clickstart.cpp
+++ b/src/mame/drivers/clickstart.cpp
@@ -74,7 +74,7 @@ private:
void mem_map(address_map &map);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
DECLARE_READ16_MEMBER(rom_r);
@@ -155,7 +155,7 @@ void clickstart_state::machine_reset()
m_unk_portc_toggle = 0;
}
-DEVICE_IMAGE_LOAD_MEMBER(clickstart_state, cart)
+DEVICE_IMAGE_LOAD_MEMBER(clickstart_state::cart_load)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -423,7 +423,7 @@ void clickstart_state::clickstart(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "clickstart_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&clickstart_state::device_image_load_cart, this));
+ m_cart->set_device_load(FUNC(clickstart_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("clickstart_cart");
}
diff --git a/src/mame/drivers/fidel_as12.cpp b/src/mame/drivers/fidel_as12.cpp
index 6a74dd44c20..9230a46b792 100644
--- a/src/mame/drivers/fidel_as12.cpp
+++ b/src/mame/drivers/fidel_as12.cpp
@@ -160,7 +160,7 @@ void as12_state::as12(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(device_image_load_delegate(&as12_state::device_image_load_scc_cartridge, this));
+ m_cart->set_device_load(FUNC(as12_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
diff --git a/src/mame/drivers/fidel_eag68k.cpp b/src/mame/drivers/fidel_eag68k.cpp
index f81693c304c..db52972ba5d 100644
--- a/src/mame/drivers/fidel_eag68k.cpp
+++ b/src/mame/drivers/fidel_eag68k.cpp
@@ -541,7 +541,7 @@ void eag_state::eag_base(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(device_image_load_delegate(&eag_state::device_image_load_scc_cartridge, this));
+ m_cart->set_device_load(FUNC(eag_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
diff --git a/src/mame/drivers/fidel_elite.cpp b/src/mame/drivers/fidel_elite.cpp
index c2d8422e4bd..674f4e7ef16 100644
--- a/src/mame/drivers/fidel_elite.cpp
+++ b/src/mame/drivers/fidel_elite.cpp
@@ -340,7 +340,7 @@ void elite_state::pc(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(device_image_load_delegate(&elite_state::device_image_load_scc_cartridge, this));
+ m_cart->set_device_load(FUNC(elite_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
diff --git a/src/mame/drivers/fidel_sc12.cpp b/src/mame/drivers/fidel_sc12.cpp
index a6610e6f316..696ca137f3f 100644
--- a/src/mame/drivers/fidel_sc12.cpp
+++ b/src/mame/drivers/fidel_sc12.cpp
@@ -189,7 +189,7 @@ void sc12_state::sc12(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(device_image_load_delegate(&sc12_state::device_image_load_scc_cartridge, this));
+ m_cart->set_device_load(FUNC(sc12_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
diff --git a/src/mame/drivers/fidel_sc6.cpp b/src/mame/drivers/fidel_sc6.cpp
index b2e96892ace..7e32dff7a1d 100644
--- a/src/mame/drivers/fidel_sc6.cpp
+++ b/src/mame/drivers/fidel_sc6.cpp
@@ -53,7 +53,7 @@ private:
// address maps
void main_map(address_map &map);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
// I/O handlers
void update_display();
@@ -71,7 +71,7 @@ private:
// cartridge
-DEVICE_IMAGE_LOAD_MEMBER(sc6_state, cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(sc6_state::cart_load)
{
u32 size = m_cart->common_get_size("rom");
@@ -195,7 +195,7 @@ void sc6_state::sc6(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_sc6", "bin");
- m_cart->set_device_load(device_image_load_delegate(&sc6_state::device_image_load_cartridge, this));
+ m_cart->set_device_load(FUNC(sc6_state::cart_load), this);
m_cart->set_must_be_loaded(true);
SOFTWARE_LIST(config, "cart_list").set_original("fidel_sc6");
diff --git a/src/mame/drivers/fidel_sc9.cpp b/src/mame/drivers/fidel_sc9.cpp
index c0bb6e2bef0..56ee21ac6b7 100644
--- a/src/mame/drivers/fidel_sc9.cpp
+++ b/src/mame/drivers/fidel_sc9.cpp
@@ -227,7 +227,7 @@ void sc9_state::sc9d(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "fidel_scc", "bin,dat");
- m_cart->set_device_load(device_image_load_delegate(&sc9_state::device_image_load_scc_cartridge, this));
+ m_cart->set_device_load(FUNC(sc9_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("fidel_scc");
}
diff --git a/src/mame/drivers/force68k.cpp b/src/mame/drivers/force68k.cpp
index 13117f91258..b39eced31f0 100644
--- a/src/mame/drivers/force68k.cpp
+++ b/src/mame/drivers/force68k.cpp
@@ -495,14 +495,14 @@ void force68k_state::write_acia_clocks(int id, int state)
*/
// Implementation of static 2 x 64K EPROM in sockets J10/J11 as 16 bit wide cartridge for easier
// software handling. TODO: make configurable according to table above.
-MACHINE_CONFIG_START(force68k_state::fccpu1_eprom_sockets)
- MCFG_GENERIC_CARTSLOT_ADD("exp_rom1", generic_plain_slot, "fccpu1_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_WIDTH(GENERIC_ROM16_WIDTH)
- MCFG_GENERIC_ENDIAN(ENDIANNESS_BIG)
- MCFG_GENERIC_LOAD(force68k_state, exp1_load)
+void force68k_state::fccpu1_eprom_sockets(machine_config &config)
+{
+ generic_cartslot_device &exp_rom1(GENERIC_CARTSLOT(config, "exp_rom1", generic_plain_slot, "fccpu1_cart", "bin,rom"));
+ exp_rom1.set_width(GENERIC_ROM16_WIDTH);
+ exp_rom1.set_endian(ENDIANNESS_BIG);
+ exp_rom1.set_device_load(FUNC(force68k_state::exp1_load), this);
// SOFTWARE_LIST(config, "cart_list").set_original("fccpu1_cart");
-MACHINE_CONFIG_END
+}
/***************************
Rom loading functions
diff --git a/src/mame/drivers/gamecom.cpp b/src/mame/drivers/gamecom.cpp
index 480840cd550..ac4b2752a15 100644
--- a/src/mame/drivers/gamecom.cpp
+++ b/src/mame/drivers/gamecom.cpp
@@ -255,7 +255,8 @@ INTERRUPT_GEN_MEMBER(gamecom_state::gamecom_interrupt)
m_maincpu->set_input_line(sm8500_cpu_device::LCDC_INT, ASSERT_LINE );
}
-MACHINE_CONFIG_START(gamecom_state::gamecom)
+void gamecom_state::gamecom(machine_config &config)
+{
/* basic machine hardware */
SM8500(config, m_maincpu, XTAL(11'059'200)/2); /* actually it's an sm8521 microcontroller containing an sm8500 cpu */
m_maincpu->set_addrmap(AS_PROGRAM, &gamecom_state::gamecom_mem_map);
@@ -291,16 +292,10 @@ MACHINE_CONFIG_START(gamecom_state::gamecom)
vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_linear_slot, "gamecom_cart")
- MCFG_GENERIC_EXTENSIONS("bin,tgc")
- MCFG_GENERIC_LOAD(gamecom_state, gamecom_cart1)
-
- MCFG_GENERIC_CARTSLOT_ADD("cartslot2", generic_linear_slot, "gamecom_cart")
- MCFG_GENERIC_EXTENSIONS("bin,tgc")
- MCFG_GENERIC_LOAD(gamecom_state, gamecom_cart2)
-
+ GENERIC_CARTSLOT(config, "cartslot1", generic_linear_slot, "gamecom_cart", "bin,tgc").set_device_load(FUNC(gamecom_state::cart1_load), this);
+ GENERIC_CARTSLOT(config, "cartslot2", generic_linear_slot, "gamecom_cart", "bin,tgc").set_device_load(FUNC(gamecom_state::cart2_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("gamecom");
-MACHINE_CONFIG_END
+}
ROM_START( gamecom )
ROM_REGION( 0x2000, "maincpu", 0 )
diff --git a/src/mame/drivers/gameking.cpp b/src/mame/drivers/gameking.cpp
index 86dbffe3875..43ac943b3dd 100644
--- a/src/mame/drivers/gameking.cpp
+++ b/src/mame/drivers/gameking.cpp
@@ -67,7 +67,7 @@ private:
TIMER_CALLBACK_MEMBER(gameking_timer2);
uint32_t screen_update_gameking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(gameking_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
struct Gkio {
uint8_t input, input2;
@@ -239,7 +239,7 @@ TIMER_CALLBACK_MEMBER(gameking_state::gameking_timer2)
timer1->reset(m_maincpu->cycles_to_attotime(io->timer * 300/*?*/));
}
-DEVICE_IMAGE_LOAD_MEMBER( gameking_state, gameking_cart )
+DEVICE_IMAGE_LOAD_MEMBER(gameking_state::cart_load)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -286,7 +286,8 @@ INTERRUPT_GEN_MEMBER(gameking_state::gameking_frame_int) // guess to get over bi
}
-MACHINE_CONFIG_START(gameking_state::gameking)
+void gameking_state::gameking(machine_config &config)
+{
/* basic machine hardware */
R65C02(config, m_maincpu, 6000000);
m_maincpu->set_addrmap(AS_PROGRAM, &gameking_state::gameking_mem);
@@ -303,10 +304,8 @@ MACHINE_CONFIG_START(gameking_state::gameking)
PALETTE(config, m_palette, FUNC(gameking_state::gameking_palette), ARRAY_LENGTH(gameking_pens));
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "gameking_cart")
- MCFG_GENERIC_EXTENSIONS("bin")
- MCFG_GENERIC_LOAD(gameking_state, gameking_cart)
-MACHINE_CONFIG_END
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "gameking_cart", "bin").set_device_load(FUNC(gameking_state::cart_load), this);
+}
void gameking_state::gameking1(machine_config &config)
{
diff --git a/src/mame/drivers/geniusiq.cpp b/src/mame/drivers/geniusiq.cpp
index ea3d83e356b..cb7d2490ca8 100644
--- a/src/mame/drivers/geniusiq.cpp
+++ b/src/mame/drivers/geniusiq.cpp
@@ -216,8 +216,8 @@ private:
DECLARE_READ16_MEMBER(unk0_r) { return 0; }
DECLARE_READ16_MEMBER(unk_r) { return machine().rand(); }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( iq128_cart );
- DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( iq128_cart );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
+ DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(cart_unload);
void geniusiq_mem(address_map &map);
@@ -667,7 +667,7 @@ void geniusiq_state::machine_reset()
m_mouse_gfx_posy = 0;
}
-DEVICE_IMAGE_LOAD_MEMBER(geniusiq_state,iq128_cart)
+DEVICE_IMAGE_LOAD_MEMBER(geniusiq_state::cart_load)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -692,13 +692,14 @@ DEVICE_IMAGE_LOAD_MEMBER(geniusiq_state,iq128_cart)
return image_init_result::PASS;
}
-DEVICE_IMAGE_UNLOAD_MEMBER(geniusiq_state,iq128_cart)
+DEVICE_IMAGE_UNLOAD_MEMBER(geniusiq_state::cart_unload)
{
m_cart_state = IQ128_NO_CART;
}
-MACHINE_CONFIG_START(geniusiq_state::iq128)
+void geniusiq_state::iq128(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(32'000'000)/2); // The main crystal is at 32MHz, not sure whats the CPU freq
m_maincpu->set_addrmap(AS_PROGRAM, &geniusiq_state::geniusiq_mem);
@@ -719,13 +720,13 @@ MACHINE_CONFIG_START(geniusiq_state::iq128)
AMD_29F010(config, "flash");
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "iq128_cart")
- MCFG_GENERIC_LOAD(geniusiq_state, iq128_cart)
- MCFG_GENERIC_UNLOAD(geniusiq_state, iq128_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "iq128_cart"));
+ cartslot.set_device_load(FUNC(geniusiq_state::cart_load), this);
+ cartslot.set_device_unload(FUNC(geniusiq_state::cart_unload), this);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("iq128");
-MACHINE_CONFIG_END
+}
void geniusiq_state::iqtv512(machine_config &config)
{
diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp
index 7295a601e9b..6a4e546a673 100644
--- a/src/mame/drivers/hh_tms1k.cpp
+++ b/src/mame/drivers/hh_tms1k.cpp
@@ -2140,7 +2140,7 @@ public:
m_pinout(0)
{ }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
u16 m_pinout; // cartridge R pins
void update_display();
@@ -2163,7 +2163,7 @@ void quizwizc_state::machine_start()
// handlers
-DEVICE_IMAGE_LOAD_MEMBER(quizwizc_state, cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(quizwizc_state::cart_load)
{
if (!image.loaded_through_softlist())
{
@@ -2275,7 +2275,7 @@ void quizwizc_state::quizwizc(machine_config &config)
/* cartridge */
generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "quizwiz_cart"));
cartslot.set_must_be_loaded(true);
- cartslot.set_device_load(device_image_load_delegate(&quizwizc_state::device_image_load_cartridge, this));
+ cartslot.set_device_load(FUNC(quizwizc_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("quizwiz");
}
@@ -2328,7 +2328,7 @@ public:
m_pinout(0)
{ }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
u8 m_pinout; // cartridge K pins
void update_display();
@@ -2351,7 +2351,7 @@ void tc4_state::machine_start()
// handlers
-DEVICE_IMAGE_LOAD_MEMBER(tc4_state, cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(tc4_state::cart_load)
{
if (!image.loaded_through_softlist())
{
@@ -2463,7 +2463,7 @@ void tc4_state::tc4(machine_config &config)
/* cartridge */
generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "tc4_cart"));
cartslot.set_must_be_loaded(true); // system won't power on without cartridge
- cartslot.set_device_load(device_image_load_delegate(&tc4_state::device_image_load_cartridge, this));
+ cartslot.set_device_load(FUNC(tc4_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("tc4");
}
diff --git a/src/mame/drivers/hx20.cpp b/src/mame/drivers/hx20.cpp
index b603709405a..9bd4eca1ff8 100644
--- a/src/mame/drivers/hx20.cpp
+++ b/src/mame/drivers/hx20.cpp
@@ -829,7 +829,7 @@ uint32_t hx20_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
// OPTIONAL ROMS
//**************************************************************************
-DEVICE_IMAGE_LOAD_MEMBER(hx20_state, optrom)
+DEVICE_IMAGE_LOAD_MEMBER(hx20_state::optrom_load)
{
uint32_t size = m_optrom->common_get_size("rom");
@@ -941,7 +941,7 @@ void hx20_state::hx20(machine_config &config)
// optional rom
GENERIC_SOCKET(config, m_optrom, generic_plain_slot, "opt_rom", "bin,rom");
- m_optrom->set_device_load(device_image_load_delegate(&hx20_state::device_image_load_optrom, this));
+ m_optrom->set_device_load(FUNC(hx20_state::optrom_load), this);
// software lists
SOFTWARE_LIST(config, "hx20_opt_list").set_original("hx20_rom");
diff --git a/src/mame/drivers/i7000.cpp b/src/mame/drivers/i7000.cpp
index e97a8d0e4e9..0d196e1a8ba 100644
--- a/src/mame/drivers/i7000.cpp
+++ b/src/mame/drivers/i7000.cpp
@@ -87,7 +87,7 @@ private:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr);
void i7000_palette(palette_device &palette) const;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( i7000_card );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(card_load);
DECLARE_READ8_MEMBER(i7000_kbd_r);
DECLARE_WRITE8_MEMBER(i7000_scanlines_w);
@@ -287,7 +287,7 @@ void i7000_state::i7000_io(address_map &map)
// AM_RANGE(0xbb, 0xbb) AM_WRITE(i7000_io_?_w) //may be related to page-swapping...
}
-DEVICE_IMAGE_LOAD_MEMBER( i7000_state, i7000_card )
+DEVICE_IMAGE_LOAD_MEMBER(i7000_state::card_load)
{
uint32_t size = m_card->common_get_size("rom");
@@ -341,8 +341,8 @@ MC6845_ON_UPDATE_ADDR_CHANGED(i7000_state::crtc_addr)
}
-MACHINE_CONFIG_START(i7000_state::i7000)
-
+void i7000_state::i7000(machine_config &config)
+{
/* basic machine hardware */
NSC800(config, m_maincpu, XTAL(4'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &i7000_state::i7000_mem);
@@ -386,13 +386,11 @@ MACHINE_CONFIG_START(i7000_state::i7000)
kbdc.in_ctrl_callback().set_constant(1); // TODO: Ctrl key
/* Cartridge slot */
- MCFG_GENERIC_CARTSLOT_ADD("cardslot", generic_romram_plain_slot, "i7000_card")
- MCFG_GENERIC_EXTENSIONS("rom")
- MCFG_GENERIC_LOAD(i7000_state, i7000_card)
+ GENERIC_CARTSLOT(config, "cardslot", generic_romram_plain_slot, "i7000_card", "rom").set_device_load(FUNC(i7000_state::card_load), this);
/* Software lists */
SOFTWARE_LIST(config, "card_list").set_original("i7000_card");
-MACHINE_CONFIG_END
+}
ROM_START( i7000 )
ROM_REGION( 0x1000, "boot", 0 )
diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp
index caeaea3ba4b..c50c9e373b5 100644
--- a/src/mame/drivers/ibmpcjr.cpp
+++ b/src/mame/drivers/ibmpcjr.cpp
@@ -79,8 +79,8 @@ private:
void pcjx_set_bank(int unk1, int unk2, int unk3);
image_init_result load_cart(device_image_interface &image, generic_slot_device *slot);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pcjr_cart1) { return load_cart(image, m_cart1); }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pcjr_cart2) { return load_cart(image, m_cart2); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart1_load) { return load_cart(image, m_cart1); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart2_load) { return load_cart(image, m_cart2); }
void pc_speaker_set_spkrdata(uint8_t data);
uint8_t m_pc_spkrdata;
@@ -597,7 +597,8 @@ void pcjr_state::ibmpcjx_io(address_map &map)
map(0x01ff, 0x01ff).rw(FUNC(pcjr_state::pcjx_port_1ff_r), FUNC(pcjr_state::pcjx_port_1ff_w));
}
-MACHINE_CONFIG_START(pcjr_state::ibmpcjr)
+void pcjr_state::ibmpcjr(machine_config &config)
+{
/* basic machine hardware */
I8088(config, m_maincpu, 4900000);
m_maincpu->set_addrmap(AS_PROGRAM, &pcjr_state::ibmpcjr_map);
@@ -665,13 +666,8 @@ MACHINE_CONFIG_START(pcjr_state::ibmpcjr)
m_keyboard->keypress().set(FUNC(pcjr_state::keyb_interrupt));
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_plain_slot, "ibmpcjr_cart")
- MCFG_GENERIC_EXTENSIONS("bin,jrc")
- MCFG_GENERIC_LOAD(pcjr_state, pcjr_cart1)
-
- MCFG_GENERIC_CARTSLOT_ADD("cartslot2", generic_plain_slot, "ibmpcjr_cart")
- MCFG_GENERIC_EXTENSIONS("bin,jrc")
- MCFG_GENERIC_LOAD(pcjr_state, pcjr_cart2)
+ GENERIC_CARTSLOT(config, "cartslot1", generic_plain_slot, "ibmpcjr_cart", "bin,jrc").set_device_load(FUNC(pcjr_state::cart1_load), this);
+ GENERIC_CARTSLOT(config, "cartslot2", generic_plain_slot, "ibmpcjr_cart", "bin,jrc").set_device_load(FUNC(pcjr_state::cart2_load), this);
/* internal ram */
RAM(config, m_ram).set_default_size("640K").set_extra_options("128K, 256K, 512K");
@@ -680,7 +676,7 @@ MACHINE_CONFIG_START(pcjr_state::ibmpcjr)
SOFTWARE_LIST(config, "cart_list").set_original("ibmpcjr_cart");
SOFTWARE_LIST(config, "flop_list").set_original("ibmpcjr_flop");
SOFTWARE_LIST(config, "pc_list").set_compatible("ibm5150");
-MACHINE_CONFIG_END
+}
static GFXDECODE_START( gfx_ibmpcjx )
GFXDECODE_ENTRY( "gfx1", 0x0000, pc_8_charlayout, 3, 1 )
diff --git a/src/mame/drivers/intellect02.cpp b/src/mame/drivers/intellect02.cpp
index 7bfcf4df83e..edaac71698b 100644
--- a/src/mame/drivers/intellect02.cpp
+++ b/src/mame/drivers/intellect02.cpp
@@ -84,7 +84,7 @@ private:
required_device<generic_slot_device> m_cart;
required_ioport_array<2> m_inputs;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
// display stuff
void update_display();
@@ -128,7 +128,7 @@ INPUT_CHANGED_MEMBER(intel02_state::reset_button)
// cartridge
-DEVICE_IMAGE_LOAD_MEMBER(intel02_state, cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(intel02_state::cart_load)
{
u32 size = m_cart->common_get_size("rom");
m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
@@ -256,7 +256,7 @@ void intel02_state::intel02(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "intellect02", "bin");
- m_cart->set_device_load(device_image_load_delegate(&intel02_state::device_image_load_cartridge, this));
+ m_cart->set_device_load(FUNC(intel02_state::cart_load), this);
m_cart->set_must_be_loaded(true);
SOFTWARE_LIST(config, "cart_list").set_original("intellect02");
diff --git a/src/mame/drivers/jaguar.cpp b/src/mame/drivers/jaguar.cpp
index 6ee2b225399..94d8cc03de5 100644
--- a/src/mame/drivers/jaguar.cpp
+++ b/src/mame/drivers/jaguar.cpp
@@ -1924,7 +1924,7 @@ void jaguar_state::jaguar(machine_config &config)
/* cartridge */
generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "jaguar_cart", "j64,rom,bin"));
- cartslot.set_device_load(device_image_load_delegate(&jaguar_state::device_image_load_jaguar_cart, this));
+ cartslot.set_device_load(FUNC(jaguar_state::cart_load), this);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("jaguar");
@@ -2083,7 +2083,7 @@ void jaguar_state::cart_start()
memset(m_cart_base, 0, memshare("cart")->bytes());
}
-DEVICE_IMAGE_LOAD_MEMBER( jaguar_state, jaguar_cart )
+DEVICE_IMAGE_LOAD_MEMBER( jaguar_state::cart_load )
{
uint32_t size, load_offset = 0;
diff --git a/src/mame/drivers/jupace.cpp b/src/mame/drivers/jupace.cpp
index ac4aef5e746..1b326cec830 100644
--- a/src/mame/drivers/jupace.cpp
+++ b/src/mame/drivers/jupace.cpp
@@ -754,7 +754,8 @@ void ace_state::machine_start()
// machine_config( ace )
//-------------------------------------------------
-MACHINE_CONFIG_START(ace_state::ace)
+void ace_state::ace(machine_config &config)
+{
// basic machine hardware
Z80(config, m_maincpu, XTAL(6'500'000)/2);
m_maincpu->set_addrmap(AS_PROGRAM, &ace_state::ace_mem);
@@ -811,7 +812,7 @@ MACHINE_CONFIG_START(ace_state::ace)
RAM(config, RAM_TAG).set_default_size("1K").set_extra_options("16K,32K,48K");
SOFTWARE_LIST(config, "cass_list").set_original("jupace_cass");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/leapfrog_leappad.cpp b/src/mame/drivers/leapfrog_leappad.cpp
index 3eca2599d12..2a7af785163 100644
--- a/src/mame/drivers/leapfrog_leappad.cpp
+++ b/src/mame/drivers/leapfrog_leappad.cpp
@@ -51,7 +51,7 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
required_device<generic_slot_device> m_cart;
memory_region *m_cart_region;
@@ -73,7 +73,7 @@ void leapfrog_leappad_state::machine_reset()
{
}
-DEVICE_IMAGE_LOAD_MEMBER(leapfrog_leappad_state, cart)
+DEVICE_IMAGE_LOAD_MEMBER(leapfrog_leappad_state::cart_load)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -97,7 +97,7 @@ void leapfrog_leappad_state::leapfrog_leappad(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "leapfrog_leappad_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&leapfrog_leappad_state::device_image_load_cart, this));
+ m_cart->set_device_load(FUNC(leapfrog_leappad_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("leapfrog_leappad_cart");
}
@@ -111,7 +111,7 @@ void leapfrog_leappad_state::leapfrog_mfleappad(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "leapfrog_mfleappad_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&leapfrog_leappad_state::device_image_load_cart, this));
+ m_cart->set_device_load(FUNC(leapfrog_leappad_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("leapfrog_mfleappad_cart");
}
diff --git a/src/mame/drivers/leapster.cpp b/src/mame/drivers/leapster.cpp
index 993aa687149..c5b4cf7bdcc 100644
--- a/src/mame/drivers/leapster.cpp
+++ b/src/mame/drivers/leapster.cpp
@@ -232,7 +232,7 @@ private:
virtual void machine_reset() override;
uint32_t screen_update_leapster(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(leapster_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
DECLARE_READ32_MEMBER(leapster_random_r)
{
@@ -266,7 +266,7 @@ uint32_t leapster_state::screen_update_leapster(screen_device &screen, bitmap_rg
return 0;
}
-DEVICE_IMAGE_LOAD_MEMBER( leapster_state, leapster_cart )
+DEVICE_IMAGE_LOAD_MEMBER( leapster_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -308,7 +308,8 @@ void leapster_state::leapster_aux(address_map &map)
map(0x00000004b, 0x00000004b).w(FUNC(leapster_state::leapster_aux004b_w)); // this address isn't used by ARC internal stuff afaik, so probably leapster specific
}
-MACHINE_CONFIG_START(leapster_state::leapster)
+void leapster_state::leapster(machine_config &config)
+{
/* basic machine hardware */
// CPU is ArcTangent-A5 '5.1' (ARCompact core)
ARCA5(config, m_maincpu, 96000000/10);
@@ -323,13 +324,11 @@ MACHINE_CONFIG_START(leapster_state::leapster)
screen.set_screen_update(FUNC(leapster_state::screen_update_leapster));
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "leapster_cart")
- MCFG_GENERIC_EXTENSIONS("bin")
- MCFG_GENERIC_LOAD(leapster_state, leapster_cart)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "leapster_cart", "bin").set_device_load(FUNC(leapster_state::cart_load), this);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("leapster");
-MACHINE_CONFIG_END
+}
#define ROM_LOAD_BIOS(bios,name,offset,length,hash) \
ROMX_LOAD(name, offset, length, hash, ROM_BIOS(bios))
diff --git a/src/mame/drivers/lynx.cpp b/src/mame/drivers/lynx.cpp
index 10d413dadba..a5f71e1a7aa 100644
--- a/src/mame/drivers/lynx.cpp
+++ b/src/mame/drivers/lynx.cpp
@@ -74,7 +74,8 @@ void lynx_state::sound_cb()
lynx_timer_count_down(1);
}
-MACHINE_CONFIG_START(lynx_state::lynx)
+void lynx_state::lynx(machine_config &config)
+{
/* basic machine hardware */
M65SC02(config, m_maincpu, 4000000); /* vti core, integrated in vlsi, stz, but not bbr bbs */
m_maincpu->set_addrmap(AS_PROGRAM, &lynx_state::lynx_mem);
@@ -103,14 +104,13 @@ MACHINE_CONFIG_START(lynx_state::lynx)
/* devices */
QUICKLOAD(config, "quickload", "o").set_load_callback(FUNC(lynx_state::quickload_cb), this);
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "lynx_cart")
- MCFG_GENERIC_EXTENSIONS("lnx,lyx")
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(lynx_state, lynx_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "lynx_cart", "lnx,lyx"));
+ cartslot.set_must_be_loaded(true);
+ cartslot.set_device_load(FUNC(lynx_state::cart_load), this);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("lynx");
-MACHINE_CONFIG_END
+}
#if 0
void lynx_state::lynx2(machine_config &config)
diff --git a/src/mame/drivers/m68705prg.cpp b/src/mame/drivers/m68705prg.cpp
index b76bf3e0280..9bb8e2618f7 100644
--- a/src/mame/drivers/m68705prg.cpp
+++ b/src/mame/drivers/m68705prg.cpp
@@ -61,7 +61,7 @@ protected:
void m68705prg(machine_config &config);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(eprom)
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(eprom_load)
{
auto const desired(m_mcu_region.bytes());
auto const actual(m_eprom_image->common_get_size("rom"));
@@ -78,7 +78,7 @@ protected:
}
}
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(mcu)
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(mcu_load)
{
auto const desired(m_mcu_region.bytes());
auto const actual(m_mcu_image->common_get_size("rom"));
@@ -232,10 +232,10 @@ void m68705prg_state_base::m68705prg(machine_config &config)
config.m_perfect_cpu_quantum = subtag("mcu");
GENERIC_SOCKET(config, m_eprom_image, generic_plain_slot, "eprom", "bin,rom");
- m_eprom_image->set_device_load(device_image_load_delegate(&m68705prg_state_base::device_image_load_eprom, this));
+ m_eprom_image->set_device_load(FUNC(m68705prg_state_base::eprom_load), this);
GENERIC_SOCKET(config, m_mcu_image, generic_plain_slot, "mcu", "bin,rom");
- m_mcu_image->set_device_load(device_image_load_delegate(&m68705prg_state_base::device_image_load_mcu, this));
+ m_mcu_image->set_device_load(FUNC(m68705prg_state_base::mcu_load), this);
config.set_default_layout(layout_m68705prg);
}
diff --git a/src/mame/drivers/macs.cpp b/src/mame/drivers/macs.cpp
index 1d4e6d487a1..6b37f85e11c 100644
--- a/src/mame/drivers/macs.cpp
+++ b/src/mame/drivers/macs.cpp
@@ -502,7 +502,8 @@ uint8_t macs_state::dma_offset()
}
-MACHINE_CONFIG_START(macs_state::macs)
+void macs_state::macs(machine_config &config)
+{
/* basic machine hardware */
ST0016_CPU(config, m_maincpu, 8000000); // 8 MHz ?
m_maincpu->set_memory_map(&macs_state::macs_mem);
@@ -519,12 +520,13 @@ MACHINE_CONFIG_START(macs_state::macs)
screen.set_palette("maincpu:palette");
screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_IRQ0, HOLD_LINE); // FIXME: HOLD_LINE is bad juju
- MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT("slot_a", generic_plain_slot, "macs_cart", "rom")
- MCFG_SET_IMAGE_LOADABLE(false)
- MCFG_GENERIC_CARTSLOT_ADD_WITH_DEFAULT("slot_b", generic_plain_slot, "macs_cart", "rom")
- MCFG_SET_IMAGE_LOADABLE(false)
-
-MACHINE_CONFIG_END
+ generic_cartslot_device &slot_a(GENERIC_CARTSLOT(config, "slot_a", generic_plain_slot, "macs_cart"));
+ slot_a.set_default_option("rom");
+ slot_a.set_user_loadable(false);
+ generic_cartslot_device &slot_b(GENERIC_CARTSLOT(config, "slot_b", generic_plain_slot, "macs_cart"));
+ slot_b.set_default_option("rom");
+ slot_b.set_user_loadable(false);
+}
#define MACS_BIOS \
diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp
index 838aa8742e7..bdb2be6e823 100644
--- a/src/mame/drivers/megadriv.cpp
+++ b/src/mame/drivers/megadriv.cpp
@@ -541,7 +541,7 @@ void md_cons_state::init_md_jpn()
/****************************************** 32X emulation ****************************************/
-DEVICE_IMAGE_LOAD_MEMBER( md_cons_state, _32x_cart )
+DEVICE_IMAGE_LOAD_MEMBER( md_cons_state::_32x_cart )
{
uint32_t length;
std::vector<uint8_t> temp_copy;
@@ -598,7 +598,8 @@ void md_cons_state::_32x_scanline_helper_callback(int scanline)
m_32x->render_videobuffer_to_screenbuffer_helper(scanline);
}
-MACHINE_CONFIG_START(md_cons_state::genesis_32x)
+void md_cons_state::genesis_32x(machine_config &config)
+{
md_ntsc(config);
MCFG_MACHINE_START_OVERRIDE(md_cons_state, md_common)
@@ -623,16 +624,16 @@ MACHINE_CONFIG_START(md_cons_state::genesis_32x)
m_ymsnd->add_route(0, "lspeaker", (0.50)/2);
m_ymsnd->add_route(1, "rspeaker", (0.50)/2);
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "_32x_cart")
- MCFG_GENERIC_EXTENSIONS("32x,bin")
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(md_cons_state, _32x_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "_32x_cart", "32x,bin"));
+ cartslot.set_must_be_loaded(true);
+ cartslot.set_device_load(FUNC(md_cons_state::_32x_cart), this);
SOFTWARE_LIST(config, "cart_list").set_original("32x").set_filter("NTSC-U");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(md_cons_state::mdj_32x)
+void md_cons_state::mdj_32x(machine_config &config)
+{
md_ntsc(config);
MCFG_MACHINE_START_OVERRIDE(md_cons_state, md_common)
@@ -657,16 +658,16 @@ MACHINE_CONFIG_START(md_cons_state::mdj_32x)
m_ymsnd->add_route(0, "lspeaker", (0.50)/2);
m_ymsnd->add_route(1, "rspeaker", (0.50)/2);
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "_32x_cart")
- MCFG_GENERIC_EXTENSIONS("32x,bin")
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(md_cons_state, _32x_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "_32x_cart", "32x,bin"));
+ cartslot.set_must_be_loaded(true);
+ cartslot.set_device_load(FUNC(md_cons_state::_32x_cart), this);
SOFTWARE_LIST(config, "cart_list").set_original("32x").set_filter("NTSC-J");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(md_cons_state::md_32x)
+void md_cons_state::md_32x(machine_config &config)
+{
md_pal(config);
MCFG_MACHINE_START_OVERRIDE(md_cons_state, md_common)
@@ -691,13 +692,12 @@ MACHINE_CONFIG_START(md_cons_state::md_32x)
m_ymsnd->add_route(0, "lspeaker", (0.50)/2);
m_ymsnd->add_route(1, "rspeaker", (0.50)/2);
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "_32x_cart")
- MCFG_GENERIC_EXTENSIONS("32x,bin")
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(md_cons_state, _32x_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "_32x_cart", "32x,bin"));
+ cartslot.set_must_be_loaded(true);
+ cartslot.set_device_load(FUNC(md_cons_state::_32x_cart), this);
SOFTWARE_LIST(config, "cart_list").set_original("32x").set_filter("PAL");
-MACHINE_CONFIG_END
+}
@@ -788,7 +788,8 @@ void md_cons_state::mdj_scd(machine_config &config)
/******************SEGA CD + 32X****************************/
-MACHINE_CONFIG_START(md_cons_state::genesis_32x_scd)
+void md_cons_state::genesis_32x_scd(machine_config &config)
+{
genesis_32x(config);
SEGA_SEGACD_US(config, m_segacd, 0);
@@ -800,15 +801,14 @@ MACHINE_CONFIG_START(md_cons_state::genesis_32x_scd)
MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megacd)
config.device_remove("cartslot");
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "_32x_cart")
- MCFG_GENERIC_EXTENSIONS("32x,bin")
- MCFG_GENERIC_LOAD(md_cons_state, _32x_cart)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "_32x_cart", "32x,bin").set_device_load(FUNC(md_cons_state::_32x_cart), this);
//config.m_perfect_cpu_quantum = subtag("32x_master_sh2");
SOFTWARE_LIST(config, "cd_list").set_original("segacd");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(md_cons_state::md_32x_scd)
+void md_cons_state::md_32x_scd(machine_config &config)
+{
md_32x(config);
SEGA_SEGACD_EUROPE(config, m_segacd, 0);
@@ -820,15 +820,14 @@ MACHINE_CONFIG_START(md_cons_state::md_32x_scd)
MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megacd)
config.device_remove("cartslot");
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "_32x_cart")
- MCFG_GENERIC_EXTENSIONS("32x,bin")
- MCFG_GENERIC_LOAD(md_cons_state, _32x_cart)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "_32x_cart", "32x,bin").set_device_load(FUNC(md_cons_state::_32x_cart), this);
//config.m_perfect_cpu_quantum = subtag("32x_master_sh2");
SOFTWARE_LIST(config, "cd_list").set_original("megacd");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(md_cons_state::mdj_32x_scd)
+void md_cons_state::mdj_32x_scd(machine_config &config)
+{
mdj_32x(config);
SEGA_SEGACD_JAPAN(config, m_segacd, 0);
@@ -840,13 +839,11 @@ MACHINE_CONFIG_START(md_cons_state::mdj_32x_scd)
MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megacd)
config.device_remove("cartslot");
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "_32x_cart")
- MCFG_GENERIC_EXTENSIONS("32x,bin")
- MCFG_GENERIC_LOAD(md_cons_state, _32x_cart)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "_32x_cart", "32x,bin").set_device_load(FUNC(md_cons_state::_32x_cart), this);
//config.m_perfect_cpu_quantum = subtag("32x_master_sh2");
SOFTWARE_LIST(config, "cd_list").set_original("megacdj");
-MACHINE_CONFIG_END
+}
/* We need proper names for most of these BIOS ROMs! */
ROM_START( segacd )
diff --git a/src/mame/drivers/megatech.cpp b/src/mame/drivers/megatech.cpp
index c49e0bc2015..1a6f6916dd8 100644
--- a/src/mame/drivers/megatech.cpp
+++ b/src/mame/drivers/megatech.cpp
@@ -767,34 +767,36 @@ image_init_result mtech_state::load_cart(device_image_interface &image, generic_
return image_init_result::PASS;
}
-#define MCFG_MEGATECH_CARTSLOT_ADD(_tag, _load) \
- MCFG_GENERIC_CARTSLOT_ADD(_tag, generic_plain_slot, "megatech_cart") \
- MCFG_GENERIC_LOAD(mtech_state, _load)
+#define MEGATECH_CARTSLOT(_tag, _load) \
+ GENERIC_CARTSLOT(config, _tag, generic_plain_slot, "megatech_cart").set_device_load(FUNC(mtech_state::_load), this)
-MACHINE_CONFIG_START(mtech_state::megatech_multislot)
+void mtech_state::megatech_multislot(machine_config &config)
+{
megatech(config);
// add cart slots
- MCFG_MEGATECH_CARTSLOT_ADD("mt_slot1", mt_cart1)
- MCFG_MEGATECH_CARTSLOT_ADD("mt_slot2", mt_cart2)
- MCFG_MEGATECH_CARTSLOT_ADD("mt_slot3", mt_cart3)
- MCFG_MEGATECH_CARTSLOT_ADD("mt_slot4", mt_cart4)
- MCFG_MEGATECH_CARTSLOT_ADD("mt_slot5", mt_cart5)
- MCFG_MEGATECH_CARTSLOT_ADD("mt_slot6", mt_cart6)
- MCFG_MEGATECH_CARTSLOT_ADD("mt_slot7", mt_cart7)
- MCFG_MEGATECH_CARTSLOT_ADD("mt_slot8", mt_cart8)
+ MEGATECH_CARTSLOT("mt_slot1", mt_cart1);
+ MEGATECH_CARTSLOT("mt_slot2", mt_cart2);
+ MEGATECH_CARTSLOT("mt_slot3", mt_cart3);
+ MEGATECH_CARTSLOT("mt_slot4", mt_cart4);
+ MEGATECH_CARTSLOT("mt_slot5", mt_cart5);
+ MEGATECH_CARTSLOT("mt_slot6", mt_cart6);
+ MEGATECH_CARTSLOT("mt_slot7", mt_cart7);
+ MEGATECH_CARTSLOT("mt_slot8", mt_cart8);
SOFTWARE_LIST(config, "cart_list").set_original("megatech");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mtech_state::megatech_fixedslot)
+void mtech_state::megatech_fixedslot(machine_config &config)
+{
megatech(config);
// add cart slots
- MCFG_MEGATECH_CARTSLOT_ADD("mt_slot1", mt_cart1)
- MCFG_SET_IMAGE_LOADABLE(false)
-MACHINE_CONFIG_END
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "mt_slot1", generic_plain_slot, "megatech_cart"));
+ cartslot.set_device_load(FUNC(mtech_state::mt_cart1), this);
+ cartslot.set_user_loadable(false);
+}
/* MegaTech Games - Genesis & sms! Games with a timer */
diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp
index 859749f43bc..412afcfaf92 100644
--- a/src/mame/drivers/microvsn.cpp
+++ b/src/mame/drivers/microvsn.cpp
@@ -59,7 +59,7 @@ private:
void microvision_palette(palette_device &palette) const;
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( microvsn_cart );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
// i8021 interface
DECLARE_WRITE8_MEMBER(i8021_p0_write);
@@ -505,7 +505,7 @@ static const u16 microvision_output_pla_1[0x20] =
};
-DEVICE_IMAGE_LOAD_MEMBER(microvision_state, microvsn_cart)
+DEVICE_IMAGE_LOAD_MEMBER(microvision_state::cart_load)
{
uint8_t *rom1 = memregion("maincpu1")->base();
uint8_t *rom2 = memregion("maincpu2")->base();
@@ -633,7 +633,8 @@ static INPUT_PORTS_START( microvision )
INPUT_PORTS_END
-MACHINE_CONFIG_START(microvision_state::microvision)
+void microvision_state::microvision(machine_config &config)
+{
I8021(config, m_i8021, 2000000); // approximately
m_i8021->bus_out_cb().set(FUNC(microvision_state::i8021_p0_write));
m_i8021->p1_out_cb().set(FUNC(microvision_state::i8021_p1_write));
@@ -667,13 +668,13 @@ MACHINE_CONFIG_START(microvision_state::microvision)
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "microvision_cart")
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(microvision_state, microvsn_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "microvision_cart"));
+ cartslot.set_must_be_loaded(true);
+ cartslot.set_device_load(FUNC(microvision_state::cart_load), this);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("microvision");
-MACHINE_CONFIG_END
+}
ROM_START( microvsn )
diff --git a/src/mame/drivers/monon_color.cpp b/src/mame/drivers/monon_color.cpp
index 9d2b1228e88..6eeb017882d 100644
--- a/src/mame/drivers/monon_color.cpp
+++ b/src/mame/drivers/monon_color.cpp
@@ -51,7 +51,7 @@ private:
required_shared_ptr<uint8_t> m_mainram;
required_shared_ptr<uint8_t> m_otherram;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(monon_color_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void monon_color_map(address_map &map);
};
@@ -118,7 +118,8 @@ void monon_color_state::monon_color_map(address_map &map)
map(0x9000, 0x9fff).ram().share("otherram"); // lots of jumps to here, is there some kind of BIOS? none of the code appears to map here?
}
-MACHINE_CONFIG_START(monon_color_state::monon_color)
+void monon_color_state::monon_color(machine_config &config)
+{
/* basic machine hardware */
AX208(config, m_maincpu, 96000000); // (8051 / MCS51 derived) incomplete core!
m_maincpu->set_addrmap(AS_PROGRAM, &monon_color_state::monon_color_map);
@@ -137,17 +138,16 @@ MACHINE_CONFIG_START(monon_color_state::monon_color)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "monon_color_cart")
- MCFG_GENERIC_EXTENSIONS("bin")
- MCFG_GENERIC_WIDTH(GENERIC_ROM8_WIDTH)
- MCFG_GENERIC_LOAD(monon_color_state, monon_color_cart)
- MCFG_GENERIC_MANDATORY
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "monon_color_cart", "bin"));
+ cartslot.set_width(GENERIC_ROM8_WIDTH);
+ cartslot.set_device_load(FUNC(monon_color_state::cart_load), this);
+ cartslot.set_must_be_loaded(true);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("monon_color");
-MACHINE_CONFIG_END
+}
-DEVICE_IMAGE_LOAD_MEMBER( monon_color_state, monon_color_cart )
+DEVICE_IMAGE_LOAD_MEMBER( monon_color_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
std::vector<uint8_t> temp;
diff --git a/src/mame/drivers/mtx.cpp b/src/mame/drivers/mtx.cpp
index 5b12a18ce40..7b00c749d33 100644
--- a/src/mame/drivers/mtx.cpp
+++ b/src/mame/drivers/mtx.cpp
@@ -336,7 +336,7 @@ void mtx_state::mtx512(machine_config &config)
/* rom extension board */
GENERIC_SOCKET(config, m_extrom, generic_plain_slot, "mtx_rom", "bin,rom");
- m_extrom->set_device_load(device_image_load_delegate(&mtx_state::device_image_load_extrom_load, this));
+ m_extrom->set_device_load(FUNC(mtx_state::extrom_load), this);
/* rs232 board with disk drive bus */
MTX_EXP_SLOT(config, m_exp, mtx_expansion_devices, nullptr);
@@ -348,7 +348,7 @@ void mtx_state::mtx512(machine_config &config)
/* cartridge slot */
GENERIC_CARTSLOT(config, m_rompak, generic_plain_slot, "mtx_cart", "bin,rom");
- m_rompak->set_device_load(device_image_load_delegate(&mtx_state::device_image_load_rompak_load, this));
+ m_rompak->set_device_load(FUNC(mtx_state::rompak_load), this);
/* software lists */
SOFTWARE_LIST(config, "cass_list").set_original("mtx_cass");
diff --git a/src/mame/drivers/myvision.cpp b/src/mame/drivers/myvision.cpp
index e4277bec8cd..27534cd8867 100644
--- a/src/mame/drivers/myvision.cpp
+++ b/src/mame/drivers/myvision.cpp
@@ -52,7 +52,7 @@ public:
void myvision(machine_config &config);
private:
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart_load );
DECLARE_READ8_MEMBER( ay_port_a_r );
DECLARE_READ8_MEMBER( ay_port_b_r );
DECLARE_WRITE8_MEMBER( ay_port_a_w );
@@ -152,7 +152,7 @@ void myvision_state::machine_reset()
}
-DEVICE_IMAGE_LOAD_MEMBER( myvision_state, cart )
+DEVICE_IMAGE_LOAD_MEMBER( myvision_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -214,7 +214,8 @@ WRITE8_MEMBER( myvision_state::ay_port_b_w )
m_column = data;
}
-MACHINE_CONFIG_START(myvision_state::myvision)
+void myvision_state::myvision(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(10'738'635)/3); /* Not verified */
m_maincpu->set_addrmap(AS_PROGRAM, &myvision_state::myvision_mem);
@@ -237,13 +238,13 @@ MACHINE_CONFIG_START(myvision_state::myvision)
ay8910.add_route(ALL_OUTPUTS, "mono", 0.50);
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "myvision_cart")
- MCFG_GENERIC_LOAD(myvision_state, cart)
- //MCFG_GENERIC_MANDATORY
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "myvision_cart"));
+ cartslot.set_device_load(FUNC(myvision_state::cart_load), this);
+ //cartslot.set_must_be_loaded(true);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("myvision");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( myvision )
diff --git a/src/mame/drivers/n64.cpp b/src/mame/drivers/n64.cpp
index 56c34dbff4c..83f5198a6a9 100644
--- a/src/mame/drivers/n64.cpp
+++ b/src/mame/drivers/n64.cpp
@@ -37,12 +37,12 @@ private:
DECLARE_READ32_MEMBER(dd_null_r);
DECLARE_MACHINE_START(n64dd);
INTERRUPT_GEN_MEMBER(n64_reset_poll);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(n64_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void mempak_format(uint8_t* pak);
image_init_result disk_load(device_image_interface &image);
void disk_unload(device_image_interface &image);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( n64dd );
- DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( n64dd );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(load_n64dd);
+ DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(unload_n64dd);
void n64_map(address_map &map);
void n64dd_map(address_map &map);
void rsp_map(address_map &map);
@@ -306,7 +306,7 @@ void n64_mess_state::mempak_format(uint8_t* pak)
memcpy(pak+512, pak_inode_table, 256); // Mirror
}
-DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state,n64_cart)
+DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state::cart_load)
{
int i, length;
uint8_t *cart = memregion("user2")->base();
@@ -399,12 +399,12 @@ MACHINE_START_MEMBER(n64_mess_state,n64dd)
}
}
-DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state,n64dd)
+DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state::load_n64dd)
{
return disk_load(image);
}
-DEVICE_IMAGE_UNLOAD_MEMBER(n64_mess_state,n64dd)
+DEVICE_IMAGE_UNLOAD_MEMBER(n64_mess_state::unload_n64dd)
{
disk_unload(image);
}
@@ -469,7 +469,7 @@ void n64_mess_state::n64(machine_config &config)
/* cartridge */
generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "n64_cart", "v64,z64,rom,n64,bin"));
cartslot.set_must_be_loaded(true);
- cartslot.set_device_load(device_image_load_delegate(&n64_mess_state::device_image_load_n64_cart, this));
+ cartslot.set_device_load(FUNC(n64_mess_state::cart_load), this);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("n64");
@@ -484,11 +484,11 @@ void n64_mess_state::n64dd(machine_config &config)
generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "n64_cart"));
cartslot.set_extensions("v64,z64,rom,n64,bin");
- cartslot.set_device_load(device_image_load_delegate(&n64_mess_state::device_image_load_n64_cart, this));
+ cartslot.set_device_load(FUNC(n64_mess_state::cart_load), this);
harddisk_image_device &hdd(HARDDISK(config, "n64disk"));
- hdd.set_device_load(device_image_load_delegate(&n64_mess_state::device_image_load_n64dd, this));
- hdd.set_device_unload(device_image_func_delegate(&n64_mess_state::device_image_unload_n64dd, this));
+ hdd.set_device_load(FUNC(n64_mess_state::load_n64dd), this);
+ hdd.set_device_unload(FUNC(n64_mess_state::unload_n64dd), this);
hdd.set_interface("n64dd_disk");
SOFTWARE_LIST(config, "dd_list").set_original("n64dd");
diff --git a/src/mame/drivers/nascom1.cpp b/src/mame/drivers/nascom1.cpp
index b3c2a944923..30288be22b0 100644
--- a/src/mame/drivers/nascom1.cpp
+++ b/src/mame/drivers/nascom1.cpp
@@ -105,8 +105,8 @@ private:
DECLARE_READ_LINE_MEMBER(nascom1_hd6402_si);
DECLARE_WRITE_LINE_MEMBER(nascom1_hd6402_so);
DECLARE_WRITE_LINE_MEMBER(kansas_w);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( nascom1_cassette );
- DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( nascom1_cassette );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( load_nascom1_cassette );
+ DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( unload_nascom1_cassette );
template<int Dest> DECLARE_SNAPSHOT_LOAD_MEMBER( snapshot_cb );
};
@@ -148,8 +148,8 @@ private:
uint32_t screen_update_nascom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
image_init_result load_cart(device_image_interface &image, generic_slot_device *slot, int slot_id);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(socket1) { return load_cart(image, m_socket1, 1); }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(socket2) { return load_cart(image, m_socket2, 2); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(socket1_load) { return load_cart(image, m_socket1, 1); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(socket2_load) { return load_cart(image, m_socket2, 2); }
void nascom2_io(address_map &map);
void nascom2_mem(address_map &map);
@@ -267,7 +267,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( nascom_state::kansas_r )
}
// This stuff has never been connected up - what's it for?
-DEVICE_IMAGE_LOAD_MEMBER( nascom_state, nascom1_cassette )
+DEVICE_IMAGE_LOAD_MEMBER( nascom_state::load_nascom1_cassette )
{
m_tape_size = image.length();
m_tape_image = (uint8_t*)image.ptr();
@@ -279,7 +279,7 @@ DEVICE_IMAGE_LOAD_MEMBER( nascom_state, nascom1_cassette )
return image_init_result::PASS;
}
-DEVICE_IMAGE_UNLOAD_MEMBER( nascom_state, nascom1_cassette )
+DEVICE_IMAGE_UNLOAD_MEMBER( nascom_state::unload_nascom1_cassette )
{
m_tape_image = nullptr;
m_tape_size = m_tape_index = 0;
@@ -786,9 +786,9 @@ void nascom2_state::nascom2(machine_config &config)
// generic sockets for ram/rom (todo: support ram here)
GENERIC_SOCKET(config, m_socket1, generic_plain_slot, "nascom_socket", "bin,rom");
- m_socket1->set_device_load(device_image_load_delegate(&nascom2_state::device_image_load_socket1, this));
+ m_socket1->set_device_load(FUNC(nascom2_state::socket1_load), this);
GENERIC_SOCKET(config, m_socket2, generic_plain_slot, "nascom_socket", "bin,rom");
- m_socket2->set_device_load(device_image_load_delegate(&nascom2_state::device_image_load_socket2, this));
+ m_socket2->set_device_load(FUNC(nascom2_state::socket2_load), this);
// nasbus expansion bus
nasbus_device &nasbus(NASBUS(config, NASBUS_TAG));
diff --git a/src/mame/drivers/nc.cpp b/src/mame/drivers/nc.cpp
index 08265f57ffd..ee78441506b 100644
--- a/src/mame/drivers/nc.cpp
+++ b/src/mame/drivers/nc.cpp
@@ -1376,7 +1376,8 @@ INPUT_PORTS_END
/**********************************************************************************************************/
-MACHINE_CONFIG_START(nc_state::nc_base)
+void nc_state::nc_base(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, /*6000000*/ 4606000); /* Russell Marks says this is more accurate */
m_maincpu->set_addrmap(AS_PROGRAM, &nc_state::nc_map);
@@ -1409,9 +1410,9 @@ MACHINE_CONFIG_START(nc_state::nc_base)
uart_clock.signal_handler().set(FUNC(nc_state::write_uart_clock));
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cardslot", generic_plain_slot, nullptr)
- MCFG_GENERIC_LOAD(nc_state, nc_pcmcia_card)
- MCFG_GENERIC_UNLOAD(nc_state, nc_pcmcia_card)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cardslot", generic_plain_slot, nullptr));
+ cartslot.set_device_load(FUNC(nc_state::load_pcmcia_card), this);
+ cartslot.set_device_unload(FUNC(nc_state::unload_pcmcia_card), this);
/* internal ram */
RAM(config, m_ram).set_default_size("64K");
@@ -1419,7 +1420,7 @@ MACHINE_CONFIG_START(nc_state::nc_base)
/* dummy timer */
TIMER(config, "dummy_timer").configure_periodic(FUNC(nc_state::dummy_timer_callback), attotime::from_hz(50));
-MACHINE_CONFIG_END
+}
void nc100_state::nc100(machine_config &config)
{
diff --git a/src/mame/drivers/ngp.cpp b/src/mame/drivers/ngp.cpp
index 567969f18b7..270a990462d 100644
--- a/src/mame/drivers/ngp.cpp
+++ b/src/mame/drivers/ngp.cpp
@@ -205,8 +205,8 @@ private:
uint32_t screen_update_ngp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(ngp_seconds_callback);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ngp_cart);
- DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(ngp_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(load_ngp_cart);
+ DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(unload_ngp_cart);
void ngp_mem(address_map &map);
void z80_io(address_map &map);
@@ -751,7 +751,7 @@ uint32_t ngp_state::screen_update_ngp(screen_device &screen, bitmap_ind16 &bitma
}
-DEVICE_IMAGE_LOAD_MEMBER(ngp_state, ngp_cart)
+DEVICE_IMAGE_LOAD_MEMBER(ngp_state::load_ngp_cart)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -798,7 +798,7 @@ DEVICE_IMAGE_LOAD_MEMBER(ngp_state, ngp_cart)
}
-DEVICE_IMAGE_UNLOAD_MEMBER(ngp_state, ngp_cart)
+DEVICE_IMAGE_UNLOAD_MEMBER(ngp_state::unload_ngp_cart)
{
m_flash_chip[0].present = 0;
m_flash_chip[0].state = F_READ;
@@ -857,7 +857,8 @@ void ngp_state::ngp_common(machine_config &config)
}
-MACHINE_CONFIG_START(ngp_state::ngp)
+void ngp_state::ngp(machine_config &config)
+{
ngp_common(config);
K1GE(config, m_k1ge, 6.144_MHz_XTAL, "screen");
@@ -866,18 +867,18 @@ MACHINE_CONFIG_START(ngp_state::ngp)
subdevice<screen_device>("screen")->set_palette("k1ge:palette");
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ngp_cart")
- MCFG_GENERIC_EXTENSIONS("bin,ngp,npc,ngc")
- MCFG_GENERIC_LOAD(ngp_state, ngp_cart)
- MCFG_GENERIC_UNLOAD(ngp_state, ngp_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "ngp_cart", "bin,ngp,npc,ngc"));
+ cartslot.set_device_load(FUNC(ngp_state::load_ngp_cart), this);
+ cartslot.set_device_unload(FUNC(ngp_state::unload_ngp_cart), this);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("ngp");
SOFTWARE_LIST(config, "ngpc_list").set_compatible("ngpc");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ngp_state::ngpc)
+void ngp_state::ngpc(machine_config &config)
+{
ngp_common(config);
K2GE(config, m_k1ge, 6.144_MHz_XTAL, "screen");
m_k1ge->vblank_callback().set(FUNC(ngp_state::ngp_vblank_pin_w));
@@ -885,15 +886,14 @@ MACHINE_CONFIG_START(ngp_state::ngpc)
subdevice<screen_device>("screen")->set_palette("k1ge:palette");
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ngp_cart")
- MCFG_GENERIC_EXTENSIONS("bin,ngp,npc,ngc")
- MCFG_GENERIC_LOAD(ngp_state, ngp_cart)
- MCFG_GENERIC_UNLOAD(ngp_state, ngp_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "ngp_cart", "bin,ngp,npc,ngc"));
+ cartslot.set_device_load(FUNC(ngp_state::load_ngp_cart), this);
+ cartslot.set_device_unload(FUNC(ngp_state::unload_ngp_cart), this);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("ngpc");
SOFTWARE_LIST(config, "ngp_list").set_compatible("ngp");
-MACHINE_CONFIG_END
+}
ROM_START(ngp)
diff --git a/src/mame/drivers/patinho_feio.cpp b/src/mame/drivers/patinho_feio.cpp
index 2e4697a8186..5cfc76779a8 100644
--- a/src/mame/drivers/patinho_feio.cpp
+++ b/src/mame/drivers/patinho_feio.cpp
@@ -173,7 +173,7 @@ void patinho_feio_state::load_raw_data(const char* name, unsigned int start_addr
memcpy(&RAM[start_address], data, data_length);
}
-DEVICE_IMAGE_LOAD_MEMBER( patinho_feio_state, patinho_tape )
+DEVICE_IMAGE_LOAD_MEMBER( patinho_feio_state::tape_load )
{
if (image.loaded_through_softlist())
{
@@ -282,8 +282,7 @@ void patinho_feio_state::patinho_feio(machine_config &config)
m_tty->set_keyboard_callback(FUNC(patinho_feio_state::teletype_kbd_input));
/* punched tape */
- generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "patinho_tape", "bin"));
- cartslot.set_device_load(device_image_load_delegate(&patinho_feio_state::device_image_load_patinho_tape, this));
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "patinho_tape", "bin").set_device_load(FUNC(patinho_feio_state::tape_load), this);
config.set_default_layout(layout_patinho);
diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp
index fedaec504d6..41c9f546132 100644
--- a/src/mame/drivers/pc.cpp
+++ b/src/mame/drivers/pc.cpp
@@ -176,13 +176,6 @@ static DEVICE_INPUT_DEFAULTS_START( pccga )
DEVICE_INPUT_DEFAULTS_END
-#define MCFG_CPU_PC(mem, port, type, clock) \
- MCFG_DEVICE_ADD("maincpu", type, clock) \
- MCFG_DEVICE_PROGRAM_MAP(mem##_map) \
- MCFG_DEVICE_IO_MAP(port##_io) \
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
-
-
// Floppy configurations
void pc_state::cfg_dual_720K(device_t *device)
{
@@ -204,9 +197,13 @@ void pc_state::cfg_single_720K(device_t *device)
dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
-MACHINE_CONFIG_START(pc_state::pccga)
+void pc_state::pccga(machine_config &config)
+{
/* basic machine hardware */
- MCFG_CPU_PC(pc8, pc8, I8088, 4772720) /* 4,77 MHz */
+ i8088_cpu_device &maincpu(I8088(config, "maincpu", 4772720)); /* 4.77 MHz */
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc8_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc8_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
ibm5160_mb_device &mb(IBM5160_MOTHERBOARD(config, "mb", 0));
mb.set_cputag(m_maincpu);
@@ -227,7 +224,7 @@ MACHINE_CONFIG_START(pc_state::pccga)
/* software lists */
SOFTWARE_LIST(config, "disk_list").set_original("ibm5150");
-MACHINE_CONFIG_END
+}
/**************************************************************** Atari PC1 ***
@@ -332,11 +329,15 @@ static INPUT_PORTS_START( bondwell )
PORT_DIPSETTING( 0x02, "On (12 MHz)" )
INPUT_PORTS_END
-MACHINE_CONFIG_START(pc_state::bondwell)
+void pc_state::bondwell(machine_config &config)
+{
pccga(config);
- config.device_remove("maincpu");
- MCFG_CPU_PC(pc8, pc8, I8088, 4772720) // turbo?
-MACHINE_CONFIG_END
+
+ i8088_cpu_device &maincpu(I8088(config.replace(), "maincpu", 4772720)); /* turbo? */
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc8_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc8_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
+}
ROM_START( bw230 )
ROM_REGION(0x10000,"bios", 0)
@@ -466,11 +467,15 @@ Options: 8087 FPU, EagleNet File server, EightPort serial card, High Resolution
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::eagle1600)
+void pc_state::eagle1600(machine_config &config)
+{
pccga(config);
- config.device_remove("maincpu");
- MCFG_CPU_PC(pc16, pc16, I8086, 8000000)
-MACHINE_CONFIG_END
+
+ i8086_cpu_device &maincpu(I8086(config.replace(), "maincpu", 8000000));
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc16_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc16_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
+}
ROM_START( eagle1600 )
ROM_REGION(0x10000,"bios", 0)
@@ -536,13 +541,18 @@ void pc_state::epc_io(address_map &map)
map(0x0070, 0x0071).rw("i8251", FUNC(i8251_device::read), FUNC(i8251_device::write));
}
-MACHINE_CONFIG_START(pc_state::epc)
+void pc_state::epc(machine_config &config)
+{
pccga(config);
- config.device_remove("maincpu");
- MCFG_CPU_PC(pc8, epc, I8088, 4772720)
+
+ i8088_cpu_device &maincpu(I8088(config.replace(), "maincpu", 4772720));
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc8_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::epc_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
+
subdevice<isa8_slot_device>("isa1")->set_default_option("ega");
I8251(config, "i8251", 0); // clock?
-MACHINE_CONFIG_END
+}
ROM_START( epc )
ROM_REGION(0x10000,"bios", 0)
@@ -595,9 +605,13 @@ void pc_state::ibm5550_io(address_map &map)
map(0x00a0, 0x00a0).r(FUNC(pc_state::unk_r));
}
-MACHINE_CONFIG_START(pc_state::ibm5550)
+void pc_state::ibm5550(machine_config &config)
+{
/* basic machine hardware */
- MCFG_CPU_PC(pc16, ibm5550, I8086, 8000000)
+ i8086_cpu_device &maincpu(I8086(config, "maincpu", 8000000));
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc16_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::ibm5550_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
ibm5160_mb_device &mb(IBM5160_MOTHERBOARD(config, "mb", 0));
mb.set_cputag(m_maincpu);
@@ -614,7 +628,7 @@ MACHINE_CONFIG_START(pc_state::ibm5550)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
-MACHINE_CONFIG_END
+}
ROM_START( ibm5550 )
ROM_REGION16_LE(0x10000,"bios", 0)
@@ -809,15 +823,20 @@ Options: 8087 FPU
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::olytext30)
+void pc_state::olytext30(machine_config &config)
+{
pccga(config);
- config.device_remove("maincpu");
- MCFG_CPU_PC(pc8, pc8, V20, XTAL(14'318'181)/3) /* 4,77 MHz */
+
+ v20_device &maincpu(V20(config.replace(), "maincpu", XTAL(14'318'181)/3)); /* 4.77 MHz */
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc8_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc8_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
+
subdevice<isa8_slot_device>("isa2")->set_option_machine_config("fdc_xt", cfg_single_720K);
subdevice<isa8_slot_device>("isa3")->set_default_option("");
subdevice<isa8_slot_device>("isa5")->set_default_option("hdc");
subdevice<ram_device>(RAM_TAG)->set_default_size("768K");
-MACHINE_CONFIG_END
+}
ROM_START( olytext30 )
ROM_REGION(0x10000, "bios", 0)
@@ -829,9 +848,13 @@ ROM_END
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::poisk2)
+void pc_state::poisk2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_CPU_PC(pc16, pc16, I8086, 4772720)
+ i8086_cpu_device &maincpu(I8086(config, "maincpu", 4772720));
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc16_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc16_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
ibm5160_mb_device &mb(IBM5160_MOTHERBOARD(config, "mb", 0));
mb.set_cputag(m_maincpu);
@@ -847,7 +870,7 @@ MACHINE_CONFIG_START(pc_state::poisk2)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
-MACHINE_CONFIG_END
+}
ROM_START( poisk2 )
ROM_REGION16_LE(0x10000,"bios", 0)
@@ -921,9 +944,13 @@ static DEVICE_INPUT_DEFAULTS_START( iskr3104 )
DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x00)
DEVICE_INPUT_DEFAULTS_END
-MACHINE_CONFIG_START(pc_state::iskr3104)
+void pc_state::iskr3104(machine_config &config)
+{
/* basic machine hardware */
- MCFG_CPU_PC(pc16, pc16, I8086, 4772720)
+ i8086_cpu_device &maincpu(I8086(config, "maincpu", 4772720));
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc16_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc16_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
ibm5160_mb_device &mb(IBM5160_MOTHERBOARD(config, "mb", 0));
mb.set_cputag(m_maincpu);
@@ -939,7 +966,7 @@ MACHINE_CONFIG_START(pc_state::iskr3104)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
-MACHINE_CONFIG_END
+}
ROM_START( iskr3104 )
ROM_REGION16_LE(0x10000,"bios", 0)
@@ -996,9 +1023,13 @@ static DEVICE_INPUT_DEFAULTS_START( siemens )
DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x30)
DEVICE_INPUT_DEFAULTS_END
-MACHINE_CONFIG_START(pc_state::siemens)
+void pc_state::siemens(machine_config &config)
+{
/* basic machine hardware */
- MCFG_CPU_PC(pc8, pc8, I8088, XTAL(14'318'181)/3) /* 4,77 MHz */
+ i8088_cpu_device &maincpu(I8088(config, "maincpu", XTAL(14'318'181)/3)); /* 4.77 MHz */
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc8_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc8_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
ibm5150_mb_device &mb(IBM5150_MOTHERBOARD(config, "mb", 0));
mb.set_cputag(m_maincpu);
@@ -1017,7 +1048,7 @@ MACHINE_CONFIG_START(pc_state::siemens)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
-MACHINE_CONFIG_END
+}
ROM_START( sicpc1605 )
ROM_REGION(0x10000,"bios", 0)
@@ -1041,8 +1072,12 @@ Options: 8087 FPU
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::laser_turbo_xt)
- MCFG_CPU_PC(pc8, pc8, I8088, XTAL(14'318'181)/3) /* 4,77 MHz */
+void pc_state::laser_turbo_xt(machine_config &config)
+{
+ i8088_cpu_device &maincpu(I8088(config, "maincpu", XTAL(14'318'181)/3)); /* 4.77 MHz */
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc8_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc8_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
ibm5160_mb_device &mb(IBM5160_MOTHERBOARD(config, "mb", 0));
mb.set_cputag(m_maincpu);
@@ -1066,7 +1101,7 @@ MACHINE_CONFIG_START(pc_state::laser_turbo_xt)
/* software lists */
SOFTWARE_LIST(config, "disk_list").set_original("ibm5150");
-MACHINE_CONFIG_END
+}
ROM_START( laser_turbo_xt )
ROM_REGION(0x10000, "bios", 0)
@@ -1120,9 +1155,13 @@ void pc_state::zenith_map(address_map &map)
map(0xf8000, 0xfffff).rom().region("bios", 0x8000);
}
-MACHINE_CONFIG_START(pc_state::zenith)
+void pc_state::zenith(machine_config &config)
+{
/* basic machine hardware */
- MCFG_CPU_PC(zenith, pc8, I8088, XTAL(14'318'181)/3) /* 4,77 MHz */
+ i8088_cpu_device &maincpu(I8088(config, "maincpu", XTAL(14'318'181)/3)); /* 4.77 MHz */
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::zenith_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc8_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
ibm5150_mb_device &mb(IBM5150_MOTHERBOARD(config, "mb", 0));
mb.set_cputag(m_maincpu);
@@ -1141,7 +1180,7 @@ MACHINE_CONFIG_START(pc_state::zenith)
/* software lists */
SOFTWARE_LIST(config, "disk_list").set_original("ibm5150");
-MACHINE_CONFIG_END
+}
ROM_START( zdsupers )
ROM_REGION(0x10000,"bios", 0)
@@ -1161,11 +1200,12 @@ emits a steady beep and waits for F1 to be pressed.
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::cadd810)
+void pc_state::cadd810(machine_config &config)
+{
pccga(config);
config.device_remove("kbd");
PC_KBDC_SLOT(config, "kbd", pc_at_keyboards, STR_KBD_IBM_PC_AT_101).set_pc_kbdc_slot(subdevice("mb:pc_kbdc"));
-MACHINE_CONFIG_END
+}
ROM_START( cadd810 )
ROM_REGION(0x10000,"bios", 0) // continuous beep, complains about missing keyboard
@@ -1182,9 +1222,13 @@ http://www.vcfed.org/forum/showthread.php?67127-Juko-nest-n3
******************************************************************************/
-MACHINE_CONFIG_START(pc_state::juko16)
+void pc_state::juko16(machine_config &config)
+{
/* basic machine hardware */
- MCFG_CPU_PC(pc16, pc16, V30, 4772720)
+ v30_device &maincpu(V30(config, "maincpu", 4772720));
+ maincpu.set_addrmap(AS_PROGRAM, &pc_state::pc16_map);
+ maincpu.set_addrmap(AS_IO, &pc_state::pc16_io);
+ maincpu.set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
ibm5160_mb_device &mb(IBM5160_MOTHERBOARD(config, "mb", 0));
mb.set_cputag(m_maincpu);
@@ -1200,7 +1244,7 @@ MACHINE_CONFIG_START(pc_state::juko16)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("640K").set_extra_options("64K, 128K, 256K, 512K");
-MACHINE_CONFIG_END
+}
ROM_START( juko16 )
ROM_REGION(0x10000,"bios", 0)
diff --git a/src/mame/drivers/pc2000.cpp b/src/mame/drivers/pc2000.cpp
index 9f111f5e8b3..849bf3c0c5f 100644
--- a/src/mame/drivers/pc2000.cpp
+++ b/src/mame/drivers/pc2000.cpp
@@ -63,7 +63,7 @@ protected:
DECLARE_READ8_MEMBER( beep_r );
DECLARE_WRITE8_MEMBER( beep_w );
void pc2000_palette(palette_device &palette) const;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pc2000_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void pc2000_io(address_map &map);
void pc2000_mem(address_map &map);
@@ -868,7 +868,7 @@ static GFXDECODE_START( gfx_pc2000 )
GFXDECODE_END
-DEVICE_IMAGE_LOAD_MEMBER( pc2000_state, pc2000_cart )
+DEVICE_IMAGE_LOAD_MEMBER( pc2000_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -907,8 +907,7 @@ void pc2000_state::pc2000(machine_config &config)
SPEAKER(config, "mono").front_center();
BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 1.00);
- generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "genius_cart"));
- cartslot.set_device_load(device_image_load_delegate(&pc2000_state::device_image_load_pc2000_cart, this));
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "genius_cart").set_device_load(FUNC(pc2000_state::cart_load), this);
SOFTWARE_LIST(config, "pc1000_cart").set_compatible("pc1000");
}
diff --git a/src/mame/drivers/pegasus.cpp b/src/mame/drivers/pegasus.cpp
index 77ddc422697..209ad99a690 100644
--- a/src/mame/drivers/pegasus.cpp
+++ b/src/mame/drivers/pegasus.cpp
@@ -488,7 +488,8 @@ void pegasus_state::init_pegasus()
pegasus_decrypt_rom(base);
}
-MACHINE_CONFIG_START(pegasus_state::pegasus)
+void pegasus_state::pegasus(machine_config &config)
+{
/* basic machine hardware */
MC6809(config, m_maincpu, XTAL(4'000'000)); // actually a 6809C - 4MHZ clock coming in, 1MHZ internally
m_maincpu->set_addrmap(AS_PROGRAM, &pegasus_state::pegasus_mem);
@@ -526,27 +527,18 @@ MACHINE_CONFIG_START(pegasus_state::pegasus)
m_pia_u->irqa_handler().set_inputline("maincpu", M6809_IRQ_LINE);
m_pia_u->irqb_handler().set_inputline("maincpu", M6809_IRQ_LINE);
- MCFG_GENERIC_SOCKET_ADD("exp00", generic_plain_slot, "pegasus_cart")
- MCFG_GENERIC_LOAD(pegasus_state, exp00_load)
-
- MCFG_GENERIC_SOCKET_ADD("exp01", generic_plain_slot, "pegasus_cart")
- MCFG_GENERIC_LOAD(pegasus_state, exp01_load)
-
- MCFG_GENERIC_SOCKET_ADD("exp02", generic_plain_slot, "pegasus_cart")
- MCFG_GENERIC_LOAD(pegasus_state, exp02_load)
-
- MCFG_GENERIC_SOCKET_ADD("exp0c", generic_plain_slot, "pegasus_cart")
- MCFG_GENERIC_LOAD(pegasus_state, exp0c_load)
-
- MCFG_GENERIC_SOCKET_ADD("exp0d", generic_plain_slot, "pegasus_cart")
- MCFG_GENERIC_LOAD(pegasus_state, exp0d_load)
+ GENERIC_SOCKET(config, "exp00", generic_plain_slot, "pegasus_cart").set_device_load(FUNC(pegasus_state::exp00_load), this);
+ GENERIC_SOCKET(config, "exp01", generic_plain_slot, "pegasus_cart").set_device_load(FUNC(pegasus_state::exp01_load), this);
+ GENERIC_SOCKET(config, "exp02", generic_plain_slot, "pegasus_cart").set_device_load(FUNC(pegasus_state::exp02_load), this);
+ GENERIC_SOCKET(config, "exp0c", generic_plain_slot, "pegasus_cart").set_device_load(FUNC(pegasus_state::exp0c_load), this);
+ GENERIC_SOCKET(config, "exp0d", generic_plain_slot, "pegasus_cart").set_device_load(FUNC(pegasus_state::exp0d_load), this);
CASSETTE(config, m_cass);
m_cass->set_default_state(CASSETTE_STOPPED|CASSETTE_MOTOR_ENABLED);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("pegasus_cart");
-MACHINE_CONFIG_END
+}
void pegasus_state::pegasusm(machine_config &config)
{
diff --git a/src/mame/drivers/pockchal.cpp b/src/mame/drivers/pockchal.cpp
index f0a699cd39d..cc151eb8f3b 100644
--- a/src/mame/drivers/pockchal.cpp
+++ b/src/mame/drivers/pockchal.cpp
@@ -50,7 +50,7 @@ protected:
private:
uint32_t screen_update_pockchalv1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pockchalv1_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void pockchalv1_map(address_map &map);
required_device<cpu_device> m_maincpu;
@@ -59,7 +59,7 @@ private:
};
-DEVICE_IMAGE_LOAD_MEMBER( pockchalv1_state, pockchalv1_cart )
+DEVICE_IMAGE_LOAD_MEMBER( pockchalv1_state::cart_load )
{
m_rom_size = m_cart->common_get_size("rom");
m_cart->rom_alloc(m_rom_size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
@@ -100,7 +100,8 @@ void pockchalv1_state::machine_reset()
}
-MACHINE_CONFIG_START(pockchalv1_state::pockchalv1)
+void pockchalv1_state::pockchalv1(machine_config &config)
+{
/* basic machine hardware */
TMP90845(config, m_maincpu, 8000000); /* ? MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &pockchalv1_state::pockchalv1_map);
@@ -118,13 +119,12 @@ MACHINE_CONFIG_START(pockchalv1_state::pockchalv1)
screen.set_screen_update(FUNC(pockchalv1_state::screen_update_pockchalv1));
screen.set_palette("palette");
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pockchalw_cart")
- MCFG_GENERIC_EXTENSIONS("bin")
- MCFG_GENERIC_LOAD(pockchalv1_state, pockchalv1_cart)
- MCFG_GENERIC_MANDATORY
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "pockchalw_cart", "bin"));
+ cartslot.set_device_load(FUNC(pockchalv1_state::cart_load), this);
+ cartslot.set_must_be_loaded(true);
SOFTWARE_LIST(config, "pc1_list").set_compatible("pockchalw");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/pockstat.cpp b/src/mame/drivers/pockstat.cpp
index 39f5e594697..b21afa92105 100644
--- a/src/mame/drivers/pockstat.cpp
+++ b/src/mame/drivers/pockstat.cpp
@@ -182,7 +182,7 @@ private:
DECLARE_WRITE32_MEMBER(audio_w);
TIMER_CALLBACK_MEMBER(timer_tick);
TIMER_CALLBACK_MEMBER(rtc_tick);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(flash);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(flash_load);
static const int CPU_FREQ[16];
};
@@ -958,7 +958,7 @@ uint32_t pockstat_state::screen_update_pockstat(screen_device &screen, bitmap_rg
return 0;
}
-DEVICE_IMAGE_LOAD_MEMBER(pockstat_state, flash)
+DEVICE_IMAGE_LOAD_MEMBER(pockstat_state::flash_load)
{
static const char *gme_id = "123-456-STD";
char cart_id[0xf40];
@@ -1007,7 +1007,7 @@ void pockstat_state::pockstat(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "pockstat_cart", "gme");
m_cart->set_width(GENERIC_ROM32_WIDTH);
m_cart->set_endian(ENDIANNESS_LITTLE);
- m_cart->set_device_load(device_image_load_delegate(&pockstat_state::device_image_load_flash, this));
+ m_cart->set_device_load(FUNC(pockstat_state::flash_load), this);
}
/* ROM definition */
diff --git a/src/mame/drivers/pokemini.cpp b/src/mame/drivers/pokemini.cpp
index ceac27a2966..9ca4c699607 100644
--- a/src/mame/drivers/pokemini.cpp
+++ b/src/mame/drivers/pokemini.cpp
@@ -104,7 +104,7 @@ private:
DECLARE_WRITE8_MEMBER(hwreg_w);
DECLARE_READ8_MEMBER(hwreg_r);
DECLARE_READ8_MEMBER(rom_r);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pokemini_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void pokemini_mem_map(address_map &map);
@@ -1509,7 +1509,7 @@ READ8_MEMBER(pokemini_state::hwreg_r)
return data;
}
-DEVICE_IMAGE_LOAD_MEMBER( pokemini_state, pokemini_cart )
+DEVICE_IMAGE_LOAD_MEMBER( pokemini_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -1789,8 +1789,7 @@ void pokemini_state::pokemini(machine_config &config)
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.50);
/* cartridge */
- generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "pokemini_cart", "bin,min"));
- cartslot.set_device_load(device_image_load_delegate(&pokemini_state::device_image_load_pokemini_cart, this));
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "pokemini_cart", "bin,min").set_device_load(FUNC(pokemini_state::cart_load), this);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("pokemini");
diff --git a/src/mame/drivers/pv1000.cpp b/src/mame/drivers/pv1000.cpp
index abc184e8645..8791a6fadbe 100644
--- a/src/mame/drivers/pv1000.cpp
+++ b/src/mame/drivers/pv1000.cpp
@@ -173,7 +173,7 @@ private:
uint32_t screen_update_pv1000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(d65010_irq_on_cb);
TIMER_CALLBACK_MEMBER(d65010_irq_off_cb);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( pv1000_cart );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart_load );
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
@@ -302,7 +302,7 @@ static INPUT_PORTS_START( pv1000 )
INPUT_PORTS_END
-DEVICE_IMAGE_LOAD_MEMBER( pv1000_state, pv1000_cart )
+DEVICE_IMAGE_LOAD_MEMBER( pv1000_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -440,7 +440,8 @@ static GFXDECODE_START( gfx_pv1000 )
GFXDECODE_END
-MACHINE_CONFIG_START(pv1000_state::pv1000)
+void pv1000_state::pv1000(machine_config &config)
+{
Z80(config, m_maincpu, 17897725/5);
m_maincpu->set_addrmap(AS_PROGRAM, &pv1000_state::pv1000_mem);
m_maincpu->set_addrmap(AS_IO, &pv1000_state::pv1000_io);
@@ -459,13 +460,13 @@ MACHINE_CONFIG_START(pv1000_state::pv1000)
PV1000(config, m_sound, 17897725).add_route(ALL_OUTPUTS, "mono", 1.00);
/* Cartridge slot */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "pv1000_cart")
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(pv1000_state, pv1000_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_linear_slot, "pv1000_cart"));
+ cartslot.set_must_be_loaded(true);
+ cartslot.set_device_load(FUNC(pv1000_state::cart_load), this);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("pv1000");
-MACHINE_CONFIG_END
+}
ROM_START( pv1000 )
diff --git a/src/mame/drivers/pv2000.cpp b/src/mame/drivers/pv2000.cpp
index 3314bcd2cae..d419b2f2f90 100644
--- a/src/mame/drivers/pv2000.cpp
+++ b/src/mame/drivers/pv2000.cpp
@@ -72,7 +72,7 @@ private:
uint8_t m_cass_conf;
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(pv2000_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void pv2000_io_map(address_map &map);
void pv2000_map(address_map &map);
};
@@ -368,7 +368,7 @@ void pv2000_state::machine_reset()
memset(&memregion("maincpu")->base()[0x7000], 0xff, 0x1000); // initialize RAM
}
-DEVICE_IMAGE_LOAD_MEMBER( pv2000_state, pv2000_cart )
+DEVICE_IMAGE_LOAD_MEMBER( pv2000_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -385,7 +385,8 @@ DEVICE_IMAGE_LOAD_MEMBER( pv2000_state, pv2000_cart )
}
/* Machine Drivers */
-MACHINE_CONFIG_START(pv2000_state::pv2000)
+void pv2000_state::pv2000(machine_config &config)
+{
// basic machine hardware
Z80(config, m_maincpu, XTAL(7'159'090)/2); // 3.579545 MHz
m_maincpu->set_addrmap(AS_PROGRAM, &pv2000_state::pv2000_map);
@@ -410,13 +411,11 @@ MACHINE_CONFIG_START(pv2000_state::pv2000)
m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED);
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pv2000_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom,col")
- MCFG_GENERIC_LOAD(pv2000_state, pv2000_cart)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "pv2000_cart", "bin,rom,col").set_device_load(FUNC(pv2000_state::cart_load), this);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("pv2000");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/rx78.cpp b/src/mame/drivers/rx78.cpp
index c6002549395..71acb964e4e 100644
--- a/src/mame/drivers/rx78.cpp
+++ b/src/mame/drivers/rx78.cpp
@@ -100,7 +100,7 @@ private:
DECLARE_WRITE8_MEMBER( vdp_reg_w );
DECLARE_WRITE8_MEMBER( vdp_bg_reg_w );
DECLARE_WRITE8_MEMBER( vdp_pri_mask_w );
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( rx78_cart );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart_load );
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void machine_reset() override;
@@ -435,7 +435,7 @@ void rx78_state::machine_reset()
prg.install_read_handler(0x2000, 0x5fff, read8sm_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart));
}
-DEVICE_IMAGE_LOAD_MEMBER( rx78_state, rx78_cart )
+DEVICE_IMAGE_LOAD_MEMBER( rx78_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -470,7 +470,8 @@ static GFXDECODE_START( gfx_rx78 )
GFXDECODE_END
-MACHINE_CONFIG_START(rx78_state::rx78)
+void rx78_state::rx78(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, MASTER_CLOCK/7); // unknown divider
m_maincpu->set_addrmap(AS_PROGRAM, &rx78_state::rx78_mem);
@@ -491,9 +492,7 @@ MACHINE_CONFIG_START(rx78_state::rx78)
PALETTE(config, m_palette).set_entries(16+1); //+1 for the background color
GFXDECODE(config, "gfxdecode", m_palette, gfx_rx78);
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "rx78_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_LOAD(rx78_state, rx78_cart)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "rx78_cart", "bin,rom").set_device_load(FUNC(rx78_state::cart_load), this);
RAM(config, RAM_TAG).set_default_size("32K").set_extra_options("16K");
@@ -507,7 +506,7 @@ MACHINE_CONFIG_START(rx78_state::rx78)
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("rx78");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( rx78 )
diff --git a/src/mame/drivers/sega_beena.cpp b/src/mame/drivers/sega_beena.cpp
index 14ca416f9ba..7ad05c481e9 100644
--- a/src/mame/drivers/sega_beena.cpp
+++ b/src/mame/drivers/sega_beena.cpp
@@ -51,7 +51,7 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void beena_arm7_map(address_map &map);
@@ -87,7 +87,7 @@ void sega_beena_state::machine_reset()
{
}
-DEVICE_IMAGE_LOAD_MEMBER(sega_beena_state, cart)
+DEVICE_IMAGE_LOAD_MEMBER(sega_beena_state::cart_load)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -124,7 +124,7 @@ void sega_beena_state::sega_beena(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "sega_beena_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&sega_beena_state::device_image_load_cart, this));
+ m_cart->set_device_load(FUNC(sega_beena_state::cart_load), this);
m_cart->set_must_be_loaded(true);
SOFTWARE_LIST(config, "cart_list").set_original("sega_beena_cart");
diff --git a/src/mame/drivers/squale.cpp b/src/mame/drivers/squale.cpp
index 3526408558e..2bca87871d5 100644
--- a/src/mame/drivers/squale.cpp
+++ b/src/mame/drivers/squale.cpp
@@ -124,7 +124,7 @@ private:
DECLARE_WRITE_LINE_MEMBER(pia_u75_cb2_w);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( squale_cart );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart_load );
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -599,7 +599,7 @@ WRITE_LINE_MEMBER( squale_state::pia_u72_cb2_w )
#endif
}
-DEVICE_IMAGE_LOAD_MEMBER( squale_state, squale_cart )
+DEVICE_IMAGE_LOAD_MEMBER( squale_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -781,7 +781,8 @@ void squale_state::machine_reset()
{
}
-MACHINE_CONFIG_START(squale_state::squale)
+void squale_state::squale(machine_config &config)
+{
/* basic machine hardware */
MC6809(config, m_maincpu, CPU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &squale_state::squale_mem);
@@ -837,10 +838,9 @@ MACHINE_CONFIG_START(squale_state::squale)
SOFTWARE_LIST(config, "flop525_list").set_original("squale");
/* Cartridge slot */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "squale_cart")
- MCFG_GENERIC_LOAD(squale_state, squale_cart)
+ GENERIC_CARTSLOT(config, "cartslot", generic_linear_slot, "squale_cart").set_device_load(FUNC(squale_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("squale_cart");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( squale )
diff --git a/src/mame/drivers/storio.cpp b/src/mame/drivers/storio.cpp
index f61ebdf9fd8..74037d65289 100644
--- a/src/mame/drivers/storio.cpp
+++ b/src/mame/drivers/storio.cpp
@@ -46,7 +46,7 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
required_device<cpu_device> m_maincpu;
@@ -76,7 +76,7 @@ void vtech_storio_state::machine_reset()
{
}
-DEVICE_IMAGE_LOAD_MEMBER(vtech_storio_state, cart)
+DEVICE_IMAGE_LOAD_MEMBER(vtech_storio_state::cart_load)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -105,7 +105,7 @@ void vtech_storio_state::vtech_storio(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "vtech_storio_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&vtech_storio_state::device_image_load_cart, this));
+ m_cart->set_device_load(FUNC(vtech_storio_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("vtech_storio_cart");
}
diff --git a/src/mame/drivers/studio2.cpp b/src/mame/drivers/studio2.cpp
index 54a8b672af0..a240f8d3e2d 100644
--- a/src/mame/drivers/studio2.cpp
+++ b/src/mame/drivers/studio2.cpp
@@ -255,7 +255,7 @@ protected:
DECLARE_READ_LINE_MEMBER( ef3_r );
DECLARE_READ_LINE_MEMBER( ef4_r );
DECLARE_WRITE_LINE_MEMBER( q_w );
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( studio2_cart_load );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart_load );
/* keyboard state */
uint8_t m_keylatch;
@@ -562,7 +562,7 @@ void mpt02_state::machine_reset()
m_cti->reset();
}
-DEVICE_IMAGE_LOAD_MEMBER( studio2_state, studio2_cart_load )
+DEVICE_IMAGE_LOAD_MEMBER( studio2_state::cart_load )
{
uint32_t size;
@@ -645,14 +645,13 @@ DEVICE_IMAGE_LOAD_MEMBER( studio2_state, studio2_cart_load )
/* Machine Drivers */
-MACHINE_CONFIG_START(studio2_state::studio2_cartslot)
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "studio2_cart")
- MCFG_GENERIC_EXTENSIONS("st2,bin,rom")
- MCFG_GENERIC_LOAD(studio2_state, studio2_cart_load)
+void studio2_state::studio2_cartslot(machine_config &config)
+{
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "studio2_cart", "st2,bin,rom").set_device_load(FUNC(studio2_state::cart_load), this);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("studio2");
-MACHINE_CONFIG_END
+}
void studio2_state::studio2(machine_config &config)
{
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp
index d5e621ec88c..7b291026a68 100644
--- a/src/mame/drivers/stv.cpp
+++ b/src/mame/drivers/stv.cpp
@@ -1240,8 +1240,7 @@ void stv_state::batmanfr(machine_config &config)
}
#define STV_CARTSLOT_ADD(_tag, _load) \
- GENERIC_CARTSLOT(config, _tag, generic_plain_slot, "stv_cart") \
- .set_device_load(device_image_load_delegate(&stv_state::device_image_load_##_load, this));
+ GENERIC_CARTSLOT(config, _tag, generic_plain_slot, "stv_cart").set_device_load(FUNC(stv_state::_load), this);
void stv_state::stv_cartslot(machine_config &config)
{
diff --git a/src/mame/drivers/supracan.cpp b/src/mame/drivers/supracan.cpp
index 30dcba191a4..c0a04d4cecb 100644
--- a/src/mame/drivers/supracan.cpp
+++ b/src/mame/drivers/supracan.cpp
@@ -227,7 +227,7 @@ private:
TIMER_CALLBACK_MEMBER(supracan_line_on_callback);
TIMER_CALLBACK_MEMBER(supracan_line_off_callback);
TIMER_CALLBACK_MEMBER(supracan_video_callback);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(supracan_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3,4);
int supracan_tilemap_get_region(int layer);
void supracan_tilemap_get_info_common(int layer, tile_data &tileinfo, int count);
@@ -1737,7 +1737,7 @@ WRITE16_MEMBER( supracan_state::video_w )
}
-DEVICE_IMAGE_LOAD_MEMBER( supracan_state, supracan_cart )
+DEVICE_IMAGE_LOAD_MEMBER( supracan_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -1881,8 +1881,8 @@ INTERRUPT_GEN_MEMBER(supracan_state::supracan_sound_irq)
}
}
-MACHINE_CONFIG_START(supracan_state::supracan)
-
+void supracan_state::supracan(machine_config &config)
+{
M68000(config, m_maincpu, XTAL(10'738'635)); /* Correct frequency unknown */
m_maincpu->set_addrmap(AS_PROGRAM, &supracan_state::supracan_mem);
m_maincpu->set_vblank_int("screen", FUNC(supracan_state::supracan_irq));
@@ -1905,13 +1905,13 @@ MACHINE_CONFIG_START(supracan_state::supracan)
GFXDECODE(config, m_gfxdecode, "palette", gfx_supracan);
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "supracan_cart")
- MCFG_GENERIC_WIDTH(GENERIC_ROM16_WIDTH)
- MCFG_GENERIC_ENDIAN(ENDIANNESS_BIG)
- MCFG_GENERIC_LOAD(supracan_state, supracan_cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "supracan_cart"));
+ cartslot.set_width(GENERIC_ROM16_WIDTH);
+ cartslot.set_endian(ENDIANNESS_BIG);
+ cartslot.set_device_load(FUNC(supracan_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("supracan");
-MACHINE_CONFIG_END
+}
ROM_START( supracan )
diff --git a/src/mame/drivers/sv8000.cpp b/src/mame/drivers/sv8000.cpp
index 8c61b9643aa..5725a225b8b 100644
--- a/src/mame/drivers/sv8000.cpp
+++ b/src/mame/drivers/sv8000.cpp
@@ -54,7 +54,7 @@ public:
void sv8000(machine_config &config);
private:
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart_load );
DECLARE_READ8_MEMBER( ay_port_a_r );
DECLARE_READ8_MEMBER( ay_port_b_r );
@@ -202,7 +202,7 @@ void sv8000_state::machine_reset()
}
-DEVICE_IMAGE_LOAD_MEMBER( sv8000_state, cart )
+DEVICE_IMAGE_LOAD_MEMBER( sv8000_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -374,7 +374,8 @@ READ8_MEMBER( sv8000_state::mc6847_videoram_r )
return data;
}
-MACHINE_CONFIG_START(sv8000_state::sv8000)
+void sv8000_state::sv8000(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(10'738'635)/3); /* Not verified */
m_maincpu->set_addrmap(AS_PROGRAM, &sv8000_state::sv8000_mem);
@@ -407,9 +408,9 @@ MACHINE_CONFIG_START(sv8000_state::sv8000)
ay8910.add_route(ALL_OUTPUTS, "mono", 0.50);
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "sv8000_cart")
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(sv8000_state, cart)
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "sv8000_cart"));
+ cartslot.set_must_be_loaded(true);
+ cartslot.set_device_load(FUNC(sv8000_state::cart_load), this);
/* software lists */
SOFTWARE_LIST(config, "cart_list").set_original("sv8000");
diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp
index 3a7d60fb647..b9f430de548 100644
--- a/src/mame/drivers/svi318.cpp
+++ b/src/mame/drivers/svi318.cpp
@@ -94,7 +94,7 @@ private:
DECLARE_WRITE_LINE_MEMBER( ramdis_w );
DECLARE_WRITE_LINE_MEMBER( ctrl1_w );
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void svi3x8_io(address_map &map);
void svi3x8_io_bank(address_map &map);
@@ -498,7 +498,7 @@ WRITE_LINE_MEMBER( svi3x8_state::ctrl1_w )
// CARTRIDGE
//**************************************************************************
-DEVICE_IMAGE_LOAD_MEMBER( svi3x8_state, cartridge )
+DEVICE_IMAGE_LOAD_MEMBER( svi3x8_state::cart_load )
{
uint32_t size = m_cart_rom->common_get_size("rom");
@@ -513,7 +513,8 @@ DEVICE_IMAGE_LOAD_MEMBER( svi3x8_state, cartridge )
// MACHINE DEFINTIONS
//**************************************************************************
-MACHINE_CONFIG_START(svi3x8_state::svi318)
+void svi3x8_state::svi318(machine_config &config)
+{
// basic machine hardware
Z80(config, m_maincpu, XTAL(10'738'635) / 3);
m_maincpu->set_addrmap(AS_PROGRAM, &svi3x8_state::svi3x8_mem);
@@ -545,9 +546,7 @@ MACHINE_CONFIG_START(svi3x8_state::svi318)
SOFTWARE_LIST(config, "cass_list").set_original("svi318_cass");
// cartridge slot
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "svi318_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_LOAD(svi3x8_state, cartridge)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "svi318_cart", "bin,rom").set_device_load(FUNC(svi3x8_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("svi318_cart");
// expander bus
@@ -558,7 +557,7 @@ MACHINE_CONFIG_START(svi3x8_state::svi318)
m_expander->ctrl1_handler().set(FUNC(svi3x8_state::ctrl1_w));
m_expander->excsr_handler().set(m_vdp, FUNC(tms9928a_device::read));
m_expander->excsw_handler().set(m_vdp, FUNC(tms9928a_device::write));
-MACHINE_CONFIG_END
+}
void svi3x8_state::svi318p(machine_config &config)
{
diff --git a/src/mame/drivers/svision.cpp b/src/mame/drivers/svision.cpp
index b7b1d2db97e..d16f7fef2f2 100644
--- a/src/mame/drivers/svision.cpp
+++ b/src/mame/drivers/svision.cpp
@@ -443,7 +443,7 @@ void svision_state::init_svisions()
m_pet.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(svision_state::svision_pet_timer),this));
}
-DEVICE_IMAGE_LOAD_MEMBER( svision_state, svision_cart )
+DEVICE_IMAGE_LOAD_MEMBER( svision_state::cart_load )
{
uint32_t size = m_cart->common_get_size("rom");
@@ -494,7 +494,8 @@ MACHINE_RESET_MEMBER(svision_state,tvlink)
m_tvlink.palette[3] = MAKE24_RGB32(svisionp_pens[3].r(), svisionp_pens[3].g(), svisionp_pens[3].b());
}
-MACHINE_CONFIG_START(svision_state::svision_base)
+void svision_state::svision_base(machine_config &config)
+{
config.set_default_layout(layout_svision);
SPEAKER(config, "lspeaker").front_left();
@@ -504,13 +505,12 @@ MACHINE_CONFIG_START(svision_state::svision_base)
m_sound->add_route(1, "rspeaker", 0.50);
m_sound->irq_cb().set(FUNC(svision_state::sound_irq_w));
- MCFG_GENERIC_CARTSLOT_ADD(m_cart, generic_plain_slot, "svision_cart")
- MCFG_GENERIC_EXTENSIONS("bin,ws,sv")
- MCFG_GENERIC_MANDATORY
- MCFG_GENERIC_LOAD(svision_state, svision_cart)
+ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "svision_cart", "bin,ws,sv");
+ m_cart->set_must_be_loaded(true);
+ m_cart->set_device_load(FUNC(svision_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("svision");
-MACHINE_CONFIG_END
+}
void svision_state::svision(machine_config &config)
{
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index a096c39acf7..42f13f41042 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -619,8 +619,8 @@ static void cd90_640_floppies(device_slot_interface &device)
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::to7_base)
-
+void thomson_state::to7_base(machine_config &config)
+{
MCFG_MACHINE_START_OVERRIDE( thomson_state, to7 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to7 )
@@ -730,9 +730,7 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
acia_clock.signal_handler().set(FUNC(thomson_state::write_acia_clock));
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "to_cart")
- MCFG_GENERIC_EXTENSIONS("m7,rom")
- MCFG_GENERIC_LOAD(thomson_state, to7_cartridge)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "to_cart", "m7,rom").set_device_load(FUNC(thomson_state::to7_cartridge), this);
/* internal ram */
RAM(config, m_ram).set_default_size("40K").set_extra_options("24K,48K");
@@ -742,7 +740,7 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
SOFTWARE_LIST(config, "to7_cass_list").set_original("to7_cass");
SOFTWARE_LIST(config, "to_flop_list").set_original("to_flop");
SOFTWARE_LIST(config, "to7_qd_list").set_original("to7_qd");
-MACHINE_CONFIG_END
+}
void thomson_state::to7(machine_config &config)
{
@@ -1111,7 +1109,8 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::mo5)
+void thomson_state::mo5(machine_config &config)
+{
to7_base(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, mo5 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo5 )
@@ -1131,10 +1130,7 @@ MACHINE_CONFIG_START(thomson_state::mo5)
m_pia_sys->cb2_handler().set_nop();
m_pia_sys->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); // WARNING: differs from TO7 !
- config.device_remove("cartslot");
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mo_cart")
- MCFG_GENERIC_EXTENSIONS("m5,rom")
- MCFG_GENERIC_LOAD(thomson_state, mo5_cartridge)
+ GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "mo_cart", "m5,rom").set_device_load(FUNC(thomson_state::mo5_cartridge), this);
config.device_remove("to7_cart_list");
config.device_remove("to7_cass_list");
@@ -1148,7 +1144,7 @@ MACHINE_CONFIG_START(thomson_state::mo5)
/* internal ram */
m_ram->set_default_size("112K");
-MACHINE_CONFIG_END
+}
void thomson_state::mo5e(machine_config &config)
{
@@ -2194,7 +2190,8 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::mo6)
+void thomson_state::mo6(machine_config &config)
+{
to7_base(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, mo6 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo6 )
@@ -2221,10 +2218,7 @@ MACHINE_CONFIG_START(thomson_state::mo6)
OUTPUT_LATCH(config, m_cent_data_out);
m_centronics->set_output_latch(*m_cent_data_out);
- config.device_remove("cartslot");
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mo_cart")
- MCFG_GENERIC_EXTENSIONS("m5,rom")
- MCFG_GENERIC_LOAD(thomson_state, mo5_cartridge)
+ GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "mo_cart", "m5,rom").set_device_load(FUNC(thomson_state::mo5_cartridge), this);
/* internal ram */
m_ram->set_default_size("128K");
@@ -2241,7 +2235,7 @@ MACHINE_CONFIG_START(thomson_state::mo6)
SOFTWARE_LIST(config, "mo5_cass_list").set_compatible("mo5_cass");
SOFTWARE_LIST(config, "mo5_flop_list").set_compatible("mo5_flop");
SOFTWARE_LIST(config, "mo5_qd_list").set_compatible("mo5_qd");
-MACHINE_CONFIG_END
+}
void thomson_state::pro128(machine_config &config)
{
@@ -2459,7 +2453,8 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::mo5nr)
+void thomson_state::mo5nr(machine_config &config)
+{
to7_base(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, mo5nr )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo5nr )
@@ -2488,10 +2483,7 @@ MACHINE_CONFIG_START(thomson_state::mo5nr)
OUTPUT_LATCH(config, m_cent_data_out);
m_centronics->set_output_latch(*m_cent_data_out);
- config.device_remove("cartslot");
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "mo_cart")
- MCFG_GENERIC_EXTENSIONS("m5,rom")
- MCFG_GENERIC_LOAD(thomson_state, mo5_cartridge)
+ GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "mo_cart", "m5,rom").set_device_load(FUNC(thomson_state::mo5_cartridge), this);
/* internal ram */
m_ram->set_default_size("128K");
@@ -2508,6 +2500,6 @@ MACHINE_CONFIG_START(thomson_state::mo5nr)
SOFTWARE_LIST(config, "mo5_cass_list").set_compatible("mo5_cass");
SOFTWARE_LIST(config, "mo5_flop_list").set_compatible("mo5_flop");
SOFTWARE_LIST(config, "mo5_qd_list").set_compatible("mo5_qd");
-MACHINE_CONFIG_END
+}
COMP( 1986, mo5nr, 0, 0, mo5nr, mo5nr, thomson_state, empty_init, "Thomson", "MO5 NR", 0 )
diff --git a/src/mame/drivers/ti74.cpp b/src/mame/drivers/ti74.cpp
index ba84d7fd57d..8081b37f94b 100644
--- a/src/mame/drivers/ti74.cpp
+++ b/src/mame/drivers/ti74.cpp
@@ -113,7 +113,7 @@ private:
DECLARE_WRITE8_MEMBER(bankswitch_w);
void ti74_palette(palette_device &palette) const;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(ti74_cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
HD44780_PIXEL_UPDATE(ti74_pixel_update);
HD44780_PIXEL_UPDATE(ti95_pixel_update);
void main_map(address_map &map);
@@ -137,7 +137,7 @@ private:
***************************************************************************/
-DEVICE_IMAGE_LOAD_MEMBER(ti74_state, ti74_cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(ti74_state::cart_load)
{
u32 size = m_cart->common_get_size("rom");
@@ -518,8 +518,8 @@ void ti74_state::machine_start()
save_item(NAME(m_power));
}
-MACHINE_CONFIG_START(ti74_state::ti74)
-
+void ti74_state::ti74(machine_config &config)
+{
/* basic machine hardware */
TMS70C46(config, m_maincpu, XTAL(4'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &ti74_state::main_map);
@@ -547,15 +547,13 @@ MACHINE_CONFIG_START(ti74_state::ti74)
hd44780.set_pixel_update_cb(FUNC(ti74_state::ti74_pixel_update), this);
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ti74_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom,256")
- MCFG_GENERIC_LOAD(ti74_state, ti74_cartridge)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "ti74_cart", "bin,rom,256").set_device_load(FUNC(ti74_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("ti74_cart");
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(ti74_state::ti95)
+}
+void ti74_state::ti95(machine_config &config)
+{
/* basic machine hardware */
TMS70C46(config, m_maincpu, XTAL(4'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &ti74_state::main_map);
@@ -583,12 +581,10 @@ MACHINE_CONFIG_START(ti74_state::ti95)
hd44780.set_pixel_update_cb(FUNC(ti74_state::ti95_pixel_update), this);
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ti95_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom,256")
- MCFG_GENERIC_LOAD(ti74_state, ti74_cartridge)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "ti95_cart", "bin,rom,256").set_device_load(FUNC(ti74_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("ti95_cart");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/timex.cpp b/src/mame/drivers/timex.cpp
index fe27daa9f5b..b09f26844fe 100644
--- a/src/mame/drivers/timex.cpp
+++ b/src/mame/drivers/timex.cpp
@@ -595,7 +595,7 @@ MACHINE_RESET_MEMBER(timex_state,tc2048)
}
-DEVICE_IMAGE_LOAD_MEMBER( timex_state, timex_cart )
+DEVICE_IMAGE_LOAD_MEMBER( timex_state::cart_load )
{
uint32_t size = m_dock->common_get_size("rom");
@@ -686,7 +686,8 @@ static GFXDECODE_START( gfx_ts2068 )
GFXDECODE_ENTRY( "maincpu", 0x13d00, ts2068_charlayout, 0, 8 )
GFXDECODE_END
-MACHINE_CONFIG_START(timex_state::ts2068)
+void timex_state::ts2068(machine_config &config)
+{
spectrum_128(config);
Z80(config.replace(), m_maincpu, XTAL(14'112'000)/4); /* From Schematic; 3.528 MHz */
@@ -712,16 +713,14 @@ MACHINE_CONFIG_START(timex_state::ts2068)
AY8912(config.replace(), "ay8912", XTAL(14'112'000)/8).add_route(ALL_OUTPUTS, "mono", 0.25); /* From Schematic; 1.764 MHz */
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("dockslot", generic_plain_slot, "timex_cart")
- MCFG_GENERIC_EXTENSIONS("dck,bin")
- MCFG_GENERIC_LOAD(timex_state, timex_cart)
+ GENERIC_CARTSLOT(config, "dockslot", generic_plain_slot, "timex_cart", "dck,bin").set_device_load(FUNC(timex_state::cart_load), this);
/* Software lists */
SOFTWARE_LIST(config, "cart_list").set_original("timex_dock");
/* internal ram */
m_ram->set_default_size("48K");
-MACHINE_CONFIG_END
+}
void timex_state::uk2086(machine_config &config)
diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp
index 6e05a7a841b..9de61d8631c 100644
--- a/src/mame/drivers/tispeak.cpp
+++ b/src/mame/drivers/tispeak.cpp
@@ -482,7 +482,7 @@ private:
DECLARE_WRITE16_MEMBER(k28_write_o);
DECLARE_WRITE16_MEMBER(k28_write_r);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tispeak_cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
u8 tntell_get_hexchar(const char c);
TIMER_DEVICE_CALLBACK_MEMBER(tntell_get_overlay);
@@ -535,7 +535,7 @@ void tispeak_state::init_cartridge()
}
}
-DEVICE_IMAGE_LOAD_MEMBER(tispeak_state, tispeak_cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(tispeak_state::cart_load)
{
u32 size = m_cart->common_get_size("rom");
@@ -1328,7 +1328,7 @@ void tispeak_state::sns_cd2801(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "snspell", "vsm");
- m_cart->set_device_load(device_image_load_delegate(&tispeak_state::device_image_load_tispeak_cartridge, this));
+ m_cart->set_device_load(FUNC(tispeak_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("snspell");
}
@@ -1379,7 +1379,7 @@ void tispeak_state::snread(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "snread", "vsm");
- m_cart->set_device_load(device_image_load_delegate(&tispeak_state::device_image_load_tispeak_cartridge, this));
+ m_cart->set_device_load(FUNC(tispeak_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("snread");
}
@@ -1398,7 +1398,7 @@ void tispeak_state::lantutor(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "lantutor", "vsm,bin");
m_cart->set_must_be_loaded(true);
- m_cart->set_device_load(device_image_load_delegate(&tispeak_state::device_image_load_tispeak_cartridge, this));
+ m_cart->set_device_load(FUNC(tispeak_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("lantutor");
}
@@ -1423,7 +1423,7 @@ void tispeak_state::snspellc(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "snspell", "vsm");
- m_cart->set_device_load(device_image_load_delegate(&tispeak_state::device_image_load_tispeak_cartridge, this));
+ m_cart->set_device_load(FUNC(tispeak_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("snspell");
}
@@ -1463,7 +1463,7 @@ void tispeak_state::tntell(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "tntell", "vsm");
- m_cart->set_device_load(device_image_load_delegate(&tispeak_state::device_image_load_tispeak_cartridge, this));
+ m_cart->set_device_load(FUNC(tispeak_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("tntell");
}
@@ -1488,7 +1488,7 @@ void tispeak_state::k28m2(machine_config &config)
/* cartridge */
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "k28m2", "vsm");
- m_cart->set_device_load(device_image_load_delegate(&tispeak_state::device_image_load_tispeak_cartridge, this));
+ m_cart->set_device_load(FUNC(tispeak_state::cart_load), this);
SOFTWARE_LIST(config, "cart_list").set_original("k28m2");
}
diff --git a/src/mame/drivers/tourvis.cpp b/src/mame/drivers/tourvis.cpp
index 8409fb21bd5..d5f46c0fd2a 100644
--- a/src/mame/drivers/tourvis.cpp
+++ b/src/mame/drivers/tourvis.cpp
@@ -210,7 +210,7 @@ private:
DECLARE_WRITE8_MEMBER(tourvision_i8155_c_w);
DECLARE_WRITE_LINE_MEMBER(tourvision_timer_out);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tourvision_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void pce_io(address_map &map);
void pce_mem(address_map &map);
@@ -221,7 +221,7 @@ private:
uint32_t m_rom_size;
};
-DEVICE_IMAGE_LOAD_MEMBER( tourvision_state, tourvision_cart )
+DEVICE_IMAGE_LOAD_MEMBER( tourvision_state::cart_load )
{
m_rom_size = m_cart->common_get_size("rom");
m_cart->rom_alloc(m_rom_size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
@@ -391,7 +391,8 @@ WRITE_LINE_MEMBER(tourvision_state::tourvision_timer_out)
}
-MACHINE_CONFIG_START(tourvision_state::tourvision)
+void tourvision_state::tourvision(machine_config &config)
+{
/* basic machine hardware */
H6280(config, m_maincpu, PCE_MAIN_CLOCK/3);
m_maincpu->set_addrmap(AS_PROGRAM, &tourvision_state::pce_mem);
@@ -431,13 +432,12 @@ MACHINE_CONFIG_START(tourvision_state::tourvision)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "tourvision_cart")
- MCFG_GENERIC_EXTENSIONS("bin")
- MCFG_GENERIC_LOAD(tourvision_state, tourvision_cart)
- MCFG_GENERIC_MANDATORY
+ generic_cartslot_device &cartslot(GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "tourvision_cart", "bin"));
+ cartslot.set_device_load(FUNC(tourvision_state::cart_load), this);
+ cartslot.set_must_be_loaded(true);
SOFTWARE_LIST(config, "tv_list").set_original("pce_tourvision");
-MACHINE_CONFIG_END
+}
#define TOURVISION_BIOS \
ROM_REGION( 0x8000, "subcpu", 0 ) \
diff --git a/src/mame/drivers/uzebox.cpp b/src/mame/drivers/uzebox.cpp
index 806c1a92e70..dff2ec63c7a 100644
--- a/src/mame/drivers/uzebox.cpp
+++ b/src/mame/drivers/uzebox.cpp
@@ -66,7 +66,7 @@ private:
virtual void machine_reset() override;
void line_update();
uint32_t screen_update_uzebox(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(uzebox_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void uzebox_data_map(address_map &map);
void uzebox_io_map(address_map &map);
@@ -257,7 +257,7 @@ uint32_t uzebox_state::screen_update_uzebox(screen_device &screen, bitmap_rgb32
return 0;
}
-DEVICE_IMAGE_LOAD_MEMBER(uzebox_state, uzebox_cart)
+DEVICE_IMAGE_LOAD_MEMBER(uzebox_state::cart_load)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -307,7 +307,7 @@ void uzebox_state::uzebox(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "uzebox", "bin,uze");
m_cart->set_must_be_loaded(true);
- m_cart->set_device_load(device_image_load_delegate(&uzebox_state::device_image_load_uzebox_cart, this));
+ m_cart->set_device_load(FUNC(uzebox_state::cart_load), this);
SNES_CONTROL_PORT(config, m_ctrl1, snes_control_port_devices, "joypad");
SNES_CONTROL_PORT(config, m_ctrl2, snes_control_port_devices, "joypad");
diff --git a/src/mame/drivers/vii.cpp b/src/mame/drivers/vii.cpp
index afc8453143a..c02c56282e4 100644
--- a/src/mame/drivers/vii.cpp
+++ b/src/mame/drivers/vii.cpp
@@ -260,7 +260,7 @@ private:
DECLARE_READ16_MEMBER(jakks_porta_key_io_r);
bool m_porta_key_mode;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(gamekey_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load_gamekey);
required_device<jakks_gamekey_slot_device> m_cart;
memory_region *m_cart_region;
@@ -290,7 +290,7 @@ private:
DECLARE_WRITE16_MEMBER(vii_portb_w);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(vii_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load_vii);
virtual void poll_controls();
@@ -322,7 +322,7 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(icanguit_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load_icanguit);
DECLARE_READ16_MEMBER(porta_r);
DECLARE_READ16_MEMBER(portb_r);
@@ -358,7 +358,7 @@ private:
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(tvgogo_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load_tvgogo);
required_device<generic_slot_device> m_cart;
memory_region *m_cart_region;
@@ -1740,7 +1740,7 @@ void icanguit_state::machine_reset()
}
-DEVICE_IMAGE_LOAD_MEMBER(icanguit_state, icanguit_cart)
+DEVICE_IMAGE_LOAD_MEMBER(icanguit_state::cart_load_icanguit)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -1776,7 +1776,7 @@ void tvgogo_state::machine_reset()
}
-DEVICE_IMAGE_LOAD_MEMBER(tvgogo_state, tvgogo_cart)
+DEVICE_IMAGE_LOAD_MEMBER(tvgogo_state::cart_load_tvgogo)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -1876,7 +1876,7 @@ void vii_state::poll_controls()
}
}
-DEVICE_IMAGE_LOAD_MEMBER(vii_state, vii_cart)
+DEVICE_IMAGE_LOAD_MEMBER(vii_state::cart_load_vii)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -1938,7 +1938,7 @@ void vii_state::vii(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "vii_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&vii_state::device_image_load_vii_cart, this));
+ m_cart->set_device_load(FUNC(vii_state::cart_load_vii), this);
SOFTWARE_LIST(config, "vii_cart").set_original("vii");
}
@@ -1960,7 +1960,7 @@ void icanguit_state::icanguit(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "icanguit_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&icanguit_state::device_image_load_icanguit_cart, this));
+ m_cart->set_device_load(FUNC(icanguit_state::cart_load_icanguit), this);
m_cart->set_must_be_loaded(true);
SOFTWARE_LIST(config, "icanguit_cart").set_original("icanguit");
@@ -1982,7 +1982,7 @@ void icanguit_state::icanpian(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "icanpian_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&icanguit_state::device_image_load_icanguit_cart, this));
+ m_cart->set_device_load(FUNC(icanguit_state::cart_load_icanguit), this);
m_cart->set_must_be_loaded(true);
SOFTWARE_LIST(config, "icanpian_cart").set_original("icanpian");
@@ -2001,7 +2001,7 @@ void tvgogo_state::tvgogo(machine_config &config)
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "tvgogo_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&tvgogo_state::device_image_load_tvgogo_cart, this));
+ m_cart->set_device_load(FUNC(tvgogo_state::cart_load_tvgogo), this);
m_cart->set_must_be_loaded(true);
SOFTWARE_LIST(config, "tvgogo_cart").set_original("tvgogo");
@@ -2052,7 +2052,7 @@ void jakks_gkr_state::machine_start()
}
}
-DEVICE_IMAGE_LOAD_MEMBER(jakks_gkr_state, gamekey_cart)
+DEVICE_IMAGE_LOAD_MEMBER(jakks_gkr_state::cart_load_gamekey)
{
return m_cart->call_load();
}
diff --git a/src/mame/drivers/vtech2.cpp b/src/mame/drivers/vtech2.cpp
index 6f724b3f2f4..304d4875cd5 100644
--- a/src/mame/drivers/vtech2.cpp
+++ b/src/mame/drivers/vtech2.cpp
@@ -484,7 +484,8 @@ static const floppy_interface vtech2_floppy_interface =
nullptr
};
-MACHINE_CONFIG_START(vtech2_state::laser350)
+void vtech2_state::laser350(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, 3694700); /* 3.694700 MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &vtech2_state::mem_map);
@@ -521,13 +522,11 @@ MACHINE_CONFIG_START(vtech2_state::laser350)
VTECH_IOEXP_SLOT(config, "io").set_io_space(m_maincpu, AS_IO);
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "vtech_cart")
- MCFG_GENERIC_EXTENSIONS("rom,bin")
- MCFG_GENERIC_LOAD(vtech2_state, cart_load)
+ GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "vtech_cart", "rom,bin").set_device_load(FUNC(vtech2_state::cart_load), this);
/* 5.25" Floppy drive */
LEGACY_FLOPPY(config, FLOPPY_0, 0, &vtech2_floppy_interface);
-MACHINE_CONFIG_END
+}
void vtech2_state::laser500(machine_config &config)
diff --git a/src/mame/drivers/x07.cpp b/src/mame/drivers/x07.cpp
index a6af4c9e50a..5c63df1f68e 100644
--- a/src/mame/drivers/x07.cpp
+++ b/src/mame/drivers/x07.cpp
@@ -1052,7 +1052,7 @@ inline void x07_state::draw_udk()
}
}
-DEVICE_IMAGE_LOAD_MEMBER( x07_state, x07_card )
+DEVICE_IMAGE_LOAD_MEMBER( x07_state::card_load )
{
uint32_t size = m_card->common_get_size("rom");
@@ -1479,8 +1479,8 @@ void x07_state::machine_reset()
m_maincpu->set_state_int(Z80_PC, 0xc3c3);
}
-MACHINE_CONFIG_START(x07_state::x07)
-
+void x07_state::x07(machine_config &config)
+{
/* basic machine hardware */
NSC800(config, m_maincpu, 15.36_MHz_XTAL / 4);
m_maincpu->set_addrmap(AS_PROGRAM, &x07_state::x07_mem);
@@ -1520,9 +1520,7 @@ MACHINE_CONFIG_START(x07_state::x07)
RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("8K,12K,20K,24K");
/* Memory Card */
- MCFG_GENERIC_CARTSLOT_ADD("cardslot", generic_romram_plain_slot, "x07_card")
- MCFG_GENERIC_EXTENSIONS("rom,bin")
- MCFG_GENERIC_LOAD(x07_state, x07_card)
+ GENERIC_CARTSLOT(config, "cardslot", generic_romram_plain_slot, "x07_card", "rom,bin").set_device_load(FUNC(x07_state::card_load), this);
/* cassette */
CASSETTE(config, m_cassette);
@@ -1533,7 +1531,7 @@ MACHINE_CONFIG_START(x07_state::x07)
/* Software lists */
SOFTWARE_LIST(config, "card_list").set_original("x07_card");
SOFTWARE_LIST(config, "cass_list").set_original("x07_cass");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( x07 )
diff --git a/src/mame/includes/bbc.h b/src/mame/includes/bbc.h
index db9497ee69e..519a60cc59f 100644
--- a/src/mame/includes/bbc.h
+++ b/src/mame/includes/bbc.h
@@ -188,8 +188,8 @@ public:
void setup_device_roms();
image_init_result load_cart(device_image_interface &image, generic_slot_device *slot);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart1) { return load_cart(image, m_cart[0]); }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart2) { return load_cart(image, m_cart[1]); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart1_load) { return load_cart(image, m_cart[0]); }
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart2_load) { return load_cart(image, m_cart[1]); }
MC6845_UPDATE_ROW(crtc_update_row);
diff --git a/src/mame/includes/fidelbase.h b/src/mame/includes/fidelbase.h
index 93d69c75f27..49f8ac98585 100644
--- a/src/mame/includes/fidelbase.h
+++ b/src/mame/includes/fidelbase.h
@@ -59,7 +59,7 @@ protected:
u8 m_speech_bank; // speech rom higher address bits
// cross-compatible cartridges(opening book modules)
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(scc_cartridge);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
virtual DECLARE_READ8_MEMBER(cartridge_r);
// periodic interrupts
diff --git a/src/mame/includes/gamecom.h b/src/mame/includes/gamecom.h
index cd1dfda724a..3c297f8e685 100644
--- a/src/mame/includes/gamecom.h
+++ b/src/mame/includes/gamecom.h
@@ -251,8 +251,8 @@ private:
TIMER_CALLBACK_MEMBER(gamecom_scanline);
DECLARE_WRITE8_MEMBER( gamecom_handle_dma );
DECLARE_WRITE8_MEMBER( gamecom_update_timers );
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart1 );
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart2 );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart1_load );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart2_load );
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void gamecom_mem_map(address_map &map);
diff --git a/src/mame/includes/hx20.h b/src/mame/includes/hx20.h
index d0dcba1d3d1..f93e68aeb7c 100644
--- a/src/mame/includes/hx20.h
+++ b/src/mame/includes/hx20.h
@@ -95,7 +95,7 @@ private:
DECLARE_WRITE_LINE_MEMBER( sio_rx_w ) { m_sio_rx = state; }
DECLARE_WRITE_LINE_MEMBER( sio_pin_w ) { m_sio_pin = state; }
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( optrom );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( optrom_load );
DECLARE_READ8_MEMBER( optrom_r );
void update_interrupt();
diff --git a/src/mame/includes/jaguar.h b/src/mame/includes/jaguar.h
index 3fe3f12f868..8e5a2350bfd 100644
--- a/src/mame/includes/jaguar.h
+++ b/src/mame/includes/jaguar.h
@@ -274,7 +274,7 @@ private:
image_init_result quickload_cb(device_image_interface &image, const char *file_type, int quickload_size);
void cart_start();
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( jaguar_cart );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart_load );
void cpu_space_map(address_map &map);
void dsp_map(address_map &map);
void dsp_rom_map(address_map &map);
diff --git a/src/mame/includes/lynx.h b/src/mame/includes/lynx.h
index 7c5966c7a01..dad968322fe 100644
--- a/src/mame/includes/lynx.h
+++ b/src/mame/includes/lynx.h
@@ -189,7 +189,7 @@ private:
TIMER_CALLBACK_MEMBER(lynx_uart_loopback_timer);
TIMER_CALLBACK_MEMBER(lynx_uart_timer);
void lynx_postload();
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( lynx_cart );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
uint8_t lynx_read_ram(uint16_t address);
void lynx_write_ram(uint16_t address, uint8_t data);
inline void lynx_plot_pixel(const int mode, const int16_t x, const int y, const int color);
diff --git a/src/mame/includes/nc.h b/src/mame/includes/nc.h
index 4610b3903d7..a7f354b3c0c 100644
--- a/src/mame/includes/nc.h
+++ b/src/mame/includes/nc.h
@@ -79,8 +79,8 @@ protected:
DECLARE_WRITE_LINE_MEMBER(write_uart_clock);
DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( nc_pcmcia_card );
- DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( nc_pcmcia_card );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( load_pcmcia_card );
+ DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( unload_pcmcia_card );
virtual void machine_start() override;
virtual void machine_reset() override;
diff --git a/src/mame/includes/patinhofeio.h b/src/mame/includes/patinhofeio.h
index 0de449afa53..ecfbbb1483f 100644
--- a/src/mame/includes/patinhofeio.h
+++ b/src/mame/includes/patinhofeio.h
@@ -26,7 +26,7 @@ public:
void teletype_kbd_input(u8 data);
TIMER_CALLBACK_MEMBER(teletype_callback);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( patinho_tape );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( tape_load );
void update_panel(uint8_t ACC, uint8_t opcode, uint8_t mem_data, uint16_t mem_addr, uint16_t PC, uint8_t FLAGS, uint16_t RC, uint8_t mode);
diff --git a/src/mame/includes/snes.h b/src/mame/includes/snes.h
index cfaaefc4e4c..9f02a5c022d 100644
--- a/src/mame/includes/snes.h
+++ b/src/mame/includes/snes.h
@@ -429,8 +429,8 @@ protected:
TIMER_CALLBACK_MEMBER(snes_scanline_tick);
TIMER_CALLBACK_MEMBER(snes_hblank_tick);
DECLARE_WRITE_LINE_MEMBER(snes_extern_irq_w);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(snes_cart);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(sufami_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(load_snes_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(load_sufami_cart);
void snes_init_timers();
virtual void machine_start() override;
virtual void machine_reset() override;
diff --git a/src/mame/includes/svision.h b/src/mame/includes/svision.h
index 65ed473ccc1..3138e1d14b0 100644
--- a/src/mame/includes/svision.h
+++ b/src/mame/includes/svision.h
@@ -80,7 +80,7 @@ private:
uint32_t screen_update_svision(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_tvlink(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(frame_int_w);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(svision_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
void svision_palette(palette_device &palette) const;
void svisionp_palette(palette_device &palette) const;
diff --git a/src/mame/includes/timex.h b/src/mame/includes/timex.h
index 590d98e8d18..f1a51eb7425 100644
--- a/src/mame/includes/timex.h
+++ b/src/mame/includes/timex.h
@@ -62,7 +62,7 @@ private:
uint32_t screen_update_ts2068(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank_timex);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(timex_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
int m_dock_cart_type, m_ram_chunks;
memory_region *m_dock_crt;
diff --git a/src/mame/includes/vectrex.h b/src/mame/includes/vectrex.h
index b49b366bda3..cedbf0b60b5 100644
--- a/src/mame/includes/vectrex.h
+++ b/src/mame/includes/vectrex.h
@@ -76,7 +76,7 @@ protected:
DECLARE_WRITE8_MEMBER(v_via_pa_w);
DECLARE_WRITE_LINE_MEMBER(v_via_ca2_w);
DECLARE_WRITE_LINE_MEMBER(v_via_cb2_w);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(vectrex_cart);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load);
DECLARE_WRITE_LINE_MEMBER(vectrex_via_irq);
void vectrex_base(machine_config &config);
diff --git a/src/mame/includes/x07.h b/src/mame/includes/x07.h
index 85fa6ddc1e9..f17d6d4b1bd 100644
--- a/src/mame/includes/x07.h
+++ b/src/mame/includes/x07.h
@@ -221,7 +221,7 @@ private:
inline void draw_point(uint8_t x, uint8_t y, uint8_t color);
inline void draw_udk();
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER( x07_card );
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER( card_load );
/* general */
uint8_t m_sleep;
diff --git a/src/mame/machine/amstrad.cpp b/src/mame/machine/amstrad.cpp
index 2efe4883872..0449b71d391 100644
--- a/src/mame/machine/amstrad.cpp
+++ b/src/mame/machine/amstrad.cpp
@@ -3263,7 +3263,7 @@ SNAPSHOT_LOAD_MEMBER(amstrad_state::snapshot_cb)
}
-DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(amstrad_state::amstrad_plus_cartridge)
{
uint32_t size = m_cart->common_get_size("rom");
unsigned char header[12];
diff --git a/src/mame/machine/fidelbase.cpp b/src/mame/machine/fidelbase.cpp
index 50e7387ff74..e1da97c2e19 100644
--- a/src/mame/machine/fidelbase.cpp
+++ b/src/mame/machine/fidelbase.cpp
@@ -78,7 +78,7 @@ void fidelbase_state::machine_reset()
// cartridge
-DEVICE_IMAGE_LOAD_MEMBER(fidelbase_state, scc_cartridge)
+DEVICE_IMAGE_LOAD_MEMBER(fidelbase_state::cart_load)
{
u32 size = m_cart->common_get_size("rom");
diff --git a/src/mame/machine/gamecom.cpp b/src/mame/machine/gamecom.cpp
index 48f08ee9d59..108887651d0 100644
--- a/src/mame/machine/gamecom.cpp
+++ b/src/mame/machine/gamecom.cpp
@@ -650,12 +650,12 @@ image_init_result gamecom_state::common_load(device_image_interface &image, gene
return image_init_result::PASS;
}
-DEVICE_IMAGE_LOAD_MEMBER( gamecom_state, gamecom_cart1 )
+DEVICE_IMAGE_LOAD_MEMBER( gamecom_state::cart1_load )
{
return common_load(image, m_cart1);
}
-DEVICE_IMAGE_LOAD_MEMBER( gamecom_state, gamecom_cart2 )
+DEVICE_IMAGE_LOAD_MEMBER( gamecom_state::cart2_load )
{
return common_load(image, m_cart2);
}
diff --git a/src/mame/machine/lynx.cpp b/src/mame/machine/lynx.cpp
index a24ee0e7198..2ed5da8b021 100644
--- a/src/mame/machine/lynx.cpp
+++ b/src/mame/machine/lynx.cpp
@@ -2040,7 +2040,7 @@ image_verify_result lynx_state::lynx_verify_cart(char *header, int kind)
return image_verify_result::PASS;
}
-DEVICE_IMAGE_LOAD_MEMBER( lynx_state, lynx_cart )
+DEVICE_IMAGE_LOAD_MEMBER(lynx_state::cart_load)
{
/* Lynx carts have 19 address lines, the upper 8 used for bank select. The lower
11 bits are used to address data within the selected bank. Valid bank sizes are 256,
diff --git a/src/mame/machine/mtx.cpp b/src/mame/machine/mtx.cpp
index c4e23092dee..f4b96943f23 100644
--- a/src/mame/machine/mtx.cpp
+++ b/src/mame/machine/mtx.cpp
@@ -399,7 +399,7 @@ WRITE8_MEMBER(mtx_state::hrx_attr_w)
EXTENSION BOARD ROMS
***************************************************************************/
-DEVICE_IMAGE_LOAD_MEMBER( mtx_state, extrom_load )
+DEVICE_IMAGE_LOAD_MEMBER( mtx_state::extrom_load )
{
uint32_t size = m_extrom->common_get_size("rom");
@@ -419,7 +419,7 @@ DEVICE_IMAGE_LOAD_MEMBER( mtx_state, extrom_load )
ROMPAK ROMS
***************************************************************************/
-DEVICE_IMAGE_LOAD_MEMBER( mtx_state, rompak_load )
+DEVICE_IMAGE_LOAD_MEMBER( mtx_state::rompak_load )
{
uint32_t size = m_rompak->common_get_size("rom");
diff --git a/src/mame/machine/nc.cpp b/src/mame/machine/nc.cpp
index 8fc35c5e8d6..bf742ffbaca 100644
--- a/src/mame/machine/nc.cpp
+++ b/src/mame/machine/nc.cpp
@@ -46,7 +46,7 @@ int nc_state::card_calculate_mask(int size)
// load pcmcia card data
-DEVICE_IMAGE_LOAD_MEMBER( nc_state, nc_pcmcia_card )
+DEVICE_IMAGE_LOAD_MEMBER( nc_state::load_pcmcia_card )
{
uint32_t size = m_card->common_get_size("rom");
@@ -61,7 +61,7 @@ DEVICE_IMAGE_LOAD_MEMBER( nc_state, nc_pcmcia_card )
// save pcmcia card data back
-DEVICE_IMAGE_UNLOAD_MEMBER( nc_state, nc_pcmcia_card )
+DEVICE_IMAGE_UNLOAD_MEMBER( nc_state::unload_pcmcia_card )
{
// if there is no data to write, quit
if (!m_card_size)
diff --git a/src/mame/machine/thomson.cpp b/src/mame/machine/thomson.cpp
index bae9ce420b4..6a419ca4d64 100644
--- a/src/mame/machine/thomson.cpp
+++ b/src/mame/machine/thomson.cpp
@@ -269,7 +269,7 @@ void thomson_state::thom_set_caps_led( int led )
/***************************** TO7 / T9000 *************************/
-DEVICE_IMAGE_LOAD_MEMBER( thomson_state, to7_cartridge )
+DEVICE_IMAGE_LOAD_MEMBER( thomson_state::to7_cartridge )
{
int i,j;
uint8_t* pos = memregion("maincpu" )->base() + 0x10000;
@@ -1369,7 +1369,7 @@ WRITE8_MEMBER( thomson_state::mo5_gatearray_w )
-DEVICE_IMAGE_LOAD_MEMBER( thomson_state, mo5_cartridge )
+DEVICE_IMAGE_LOAD_MEMBER( thomson_state::mo5_cartridge )
{
uint8_t* pos = memregion("maincpu")->base() + 0x10000;
uint64_t size, i;
diff --git a/src/mame/machine/vtech2.cpp b/src/mame/machine/vtech2.cpp
index 494044db80b..0c576b19a2e 100644
--- a/src/mame/machine/vtech2.cpp
+++ b/src/mame/machine/vtech2.cpp
@@ -46,7 +46,7 @@ void vtech2_state::init_laser()
}
-DEVICE_IMAGE_LOAD_MEMBER( vtech2_state, cart_load )
+DEVICE_IMAGE_LOAD_MEMBER( vtech2_state::cart_load )
{
m_cart_size = m_cart->common_get_size("rom");