summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2019-02-16 14:42:47 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2019-02-16 14:42:47 +0100
commitc1ba9b3616a08ec8a8b8da9fd3210e02cf91d022 (patch)
treefbfde313cc12cd1ae954c3613e2a82d8298904ea
parent55000018e7700cbbc2bd7f977cf0eec57f39b64b (diff)
devices\bus: some more MCFG macros removal (nw)
-rw-r--r--src/devices/bus/megadrive/ggenie.cpp9
-rw-r--r--src/devices/bus/megadrive/md_slot.h18
-rw-r--r--src/devices/bus/megadrive/sk.cpp9
-rw-r--r--src/devices/bus/nes/aladdin.cpp7
-rw-r--r--src/devices/bus/nes/aladdin.h15
-rw-r--r--src/devices/bus/nes/karastudio.cpp7
-rw-r--r--src/devices/bus/nes/karastudio.h15
-rw-r--r--src/devices/bus/nes/nes_slot.h5
-rw-r--r--src/devices/bus/nes/sunsoft_dcs.cpp7
-rw-r--r--src/devices/bus/nes/sunsoft_dcs.h15
-rw-r--r--src/devices/bus/pce/pce_slot.h11
-rw-r--r--src/mame/drivers/megadriv.cpp81
-rw-r--r--src/mame/drivers/pce.cpp42
13 files changed, 135 insertions, 106 deletions
diff --git a/src/devices/bus/megadrive/ggenie.cpp b/src/devices/bus/megadrive/ggenie.cpp
index a6001971529..17dbb78fc1d 100644
--- a/src/devices/bus/megadrive/ggenie.cpp
+++ b/src/devices/bus/megadrive/ggenie.cpp
@@ -172,7 +172,8 @@ static void ggenie_sub_cart(device_slot_interface &device)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(md_rom_ggenie_device::device_add_mconfig)
- MCFG_MD_CARTRIDGE_ADD("subslot", ggenie_sub_cart, nullptr)
- MCFG_MD_CARTRIDGE_NOT_MANDATORY
-MACHINE_CONFIG_END
+void md_rom_ggenie_device::device_add_mconfig(machine_config &config)
+{
+ MD_CART_SLOT(config, m_exp, ggenie_sub_cart, nullptr);
+ m_exp->set_must_be_loaded(false);
+}
diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h
index c9372ada7df..42fd2503f76 100644
--- a/src/devices/bus/megadrive/md_slot.h
+++ b/src/devices/bus/megadrive/md_slot.h
@@ -211,6 +211,16 @@ class md_cart_slot_device : public base_md_cart_slot_device
{
public:
// construction/destruction
+ template <typename T>
+ md_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt)
+ : md_cart_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
+
md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual const char *image_interface() const override { return "megadriv_cart"; }
virtual const char *file_extensions() const override { return "smd,bin,md,gen"; }
@@ -269,12 +279,4 @@ DECLARE_DEVICE_TYPE(COPERA_CART_SLOT, copera_cart_slot_device)
#define MDSLOT_ROM_REGION_TAG ":cart:rom"
-#define MCFG_MD_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \
- MCFG_DEVICE_ADD(_tag, MD_CART_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
-
-#define MCFG_MD_CARTRIDGE_NOT_MANDATORY \
- static_cast<md_cart_slot_device *>(device)->set_must_be_loaded(false);
-
-
#endif // MAME_BUS_MEGADRIVE_MD_SLOT_H
diff --git a/src/devices/bus/megadrive/sk.cpp b/src/devices/bus/megadrive/sk.cpp
index b48163e9b94..c45574ff1a3 100644
--- a/src/devices/bus/megadrive/sk.cpp
+++ b/src/devices/bus/megadrive/sk.cpp
@@ -79,7 +79,8 @@ static void sk_sub_cart(device_slot_interface &device)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(md_rom_sk_device::device_add_mconfig)
- MCFG_MD_CARTRIDGE_ADD("subslot", sk_sub_cart, nullptr)
- MCFG_MD_CARTRIDGE_NOT_MANDATORY
-MACHINE_CONFIG_END
+void md_rom_sk_device::device_add_mconfig(machine_config &config)
+{
+ MD_CART_SLOT(config, m_exp, sk_sub_cart, nullptr);
+ m_exp->set_must_be_loaded(false);
+}
diff --git a/src/devices/bus/nes/aladdin.cpp b/src/devices/bus/nes/aladdin.cpp
index e9d81555a72..4c8a6690be6 100644
--- a/src/devices/bus/nes/aladdin.cpp
+++ b/src/devices/bus/nes/aladdin.cpp
@@ -325,6 +325,7 @@ static void ade_cart(device_slot_interface &device)
}
-MACHINE_CONFIG_START(nes_aladdin_device::device_add_mconfig)
- MCFG_ALADDIN_MINICART_ADD("ade_slot", ade_cart)
-MACHINE_CONFIG_END
+void nes_aladdin_device::device_add_mconfig(machine_config &config)
+{
+ NES_ALADDIN_SLOT(config, m_subslot, ade_cart);
+}
diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h
index de6725bb9f1..1f00d49ba47 100644
--- a/src/devices/bus/nes/aladdin.h
+++ b/src/devices/bus/nes/aladdin.h
@@ -50,6 +50,16 @@ class nes_aladdin_slot_device : public device_t,
friend class nes_aladdin_device;
public:
// construction/destruction
+ template <typename T>
+ nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts)
+ : nes_aladdin_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(nullptr);
+ set_fixed(false);
+ }
+
nes_aladdin_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~nes_aladdin_slot_device();
@@ -83,11 +93,6 @@ protected:
DECLARE_DEVICE_TYPE(NES_ALADDIN_SLOT, nes_aladdin_slot_device)
-#define MCFG_ALADDIN_MINICART_ADD(_tag, _slot_intf) \
- MCFG_DEVICE_ADD(_tag, NES_ALADDIN_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
-
-
//----------------------------------
//
// Aladdin Minicart implementation
diff --git a/src/devices/bus/nes/karastudio.cpp b/src/devices/bus/nes/karastudio.cpp
index 1b828001078..0e076b8091c 100644
--- a/src/devices/bus/nes/karastudio.cpp
+++ b/src/devices/bus/nes/karastudio.cpp
@@ -296,6 +296,7 @@ static void karaoke_studio_cart(device_slot_interface &device)
}
-MACHINE_CONFIG_START(nes_karaokestudio_device::device_add_mconfig)
- MCFG_KSTUDIO_MINICART_ADD("exp_slot", karaoke_studio_cart)
-MACHINE_CONFIG_END
+void nes_karaokestudio_device::device_add_mconfig(machine_config &config)
+{
+ NES_KSEXPANSION_SLOT(config, m_subslot, karaoke_studio_cart);
+}
diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h
index bd712722fe9..4932c8b9426 100644
--- a/src/devices/bus/nes/karastudio.h
+++ b/src/devices/bus/nes/karastudio.h
@@ -49,6 +49,16 @@ class nes_kstudio_slot_device : public device_t,
friend class nes_karaokestudio_device;
public:
// construction/destruction
+ template <typename T>
+ nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts)
+ : nes_kstudio_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(nullptr);
+ set_fixed(false);
+ }
+
nes_kstudio_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~nes_kstudio_slot_device();
@@ -82,11 +92,6 @@ protected:
DECLARE_DEVICE_TYPE(NES_KSEXPANSION_SLOT, nes_kstudio_slot_device)
-#define MCFG_KSTUDIO_MINICART_ADD(_tag, _slot_intf) \
- MCFG_DEVICE_ADD(_tag, NES_KSEXPANSION_SLOT, 0) \
-MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
-
-
//-----------------------------------------------
//
// Karaoke Studio Expansion cart implementation
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index b86dbfb1e41..260d59d4ead 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -429,9 +429,4 @@ DECLARE_DEVICE_TYPE(NES_CART_SLOT, nes_cart_slot_device)
#define NESSLOT_PRGROM_REGION_TAG ":cart:prg_rom"
#define NESSLOT_CHRROM_REGION_TAG ":cart:chr_rom"
-
-#define MCFG_NES_CARTRIDGE_NOT_MANDATORY \
- static_cast<nes_cart_slot_device *>(device)->set_must_be_loaded(false);
-
-
#endif // MAME_BUS_NES_NES_SLOT_H
diff --git a/src/devices/bus/nes/sunsoft_dcs.cpp b/src/devices/bus/nes/sunsoft_dcs.cpp
index 5df2c6557d2..b4faf0afcc9 100644
--- a/src/devices/bus/nes/sunsoft_dcs.cpp
+++ b/src/devices/bus/nes/sunsoft_dcs.cpp
@@ -285,9 +285,10 @@ static void ntb_cart(device_slot_interface &device)
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(nes_sunsoft_dcs_device::device_add_mconfig)
- MCFG_NTB_MINICART_ADD("ntb_slot", ntb_cart)
-MACHINE_CONFIG_END
+void nes_sunsoft_dcs_device::device_add_mconfig(machine_config &config)
+{
+ NES_NTB_SLOT(config, m_subslot, ntb_cart);
+}
//-------------------------------------------------
diff --git a/src/devices/bus/nes/sunsoft_dcs.h b/src/devices/bus/nes/sunsoft_dcs.h
index f14d9f9c8c1..9971b8c48bd 100644
--- a/src/devices/bus/nes/sunsoft_dcs.h
+++ b/src/devices/bus/nes/sunsoft_dcs.h
@@ -46,6 +46,16 @@ class nes_ntb_slot_device : public device_t,
friend class nes_sunsoft_dcs_device;
public:
// construction/destruction
+ template <typename T>
+ nes_ntb_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts)
+ : nes_ntb_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(nullptr);
+ set_fixed(false);
+ }
+
nes_ntb_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~nes_ntb_slot_device();
@@ -78,11 +88,6 @@ protected:
DECLARE_DEVICE_TYPE(NES_NTB_SLOT, nes_ntb_slot_device)
-#define MCFG_NTB_MINICART_ADD(_tag, _slot_intf) \
- MCFG_DEVICE_ADD(_tag, NES_NTB_SLOT, 0) \
- MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
-
-
//-----------------------------------------------
//
// Nantettate!! Baseball Minicart implementation
diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h
index 658384cb82b..9c95a92484b 100644
--- a/src/devices/bus/pce/pce_slot.h
+++ b/src/devices/bus/pce/pce_slot.h
@@ -65,6 +65,17 @@ class pce_cart_slot_device : public device_t,
{
public:
// construction/destruction
+ template <typename T>
+ pce_cart_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt, const char *interface)
+ : pce_cart_slot_device(mconfig, tag, owner, (uint32_t)0)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ set_intf(interface);
+ }
+
pce_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~pce_cart_slot_device();
diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp
index 60418caf1b3..6f8bd49912b 100644
--- a/src/mame/drivers/megadriv.cpp
+++ b/src/mame/drivers/megadriv.cpp
@@ -377,31 +377,31 @@ WRITE_LINE_MEMBER(md_cons_state::screen_vblank_console)
}
}
-MACHINE_CONFIG_START(md_cons_state::ms_megadriv)
+void md_cons_state::ms_megadriv(machine_config &config)
+{
md_ntsc(config);
MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megadriv)
MCFG_MACHINE_RESET_OVERRIDE(md_cons_state, ms_megadriv)
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
+ subdevice<screen_device>("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console));
- MCFG_MD_CARTRIDGE_ADD("mdslot", md_cart, nullptr)
+ MD_CART_SLOT(config, m_cart, md_cart, nullptr);
SOFTWARE_LIST(config, "cart_list").set_original("megadriv");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(md_cons_state::ms_megadpal)
+void md_cons_state::ms_megadpal(machine_config &config)
+{
md_pal(config);
MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megadriv)
MCFG_MACHINE_RESET_OVERRIDE(md_cons_state, ms_megadriv)
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
+ subdevice<screen_device>("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console));
- MCFG_MD_CARTRIDGE_ADD("mdslot", md_cart, nullptr)
+ MD_CART_SLOT(config, m_cart, md_cart, nullptr);
SOFTWARE_LIST(config, "cart_list").set_original("megadriv");
-MACHINE_CONFIG_END
+}
void md_cons_state::genesis_tmss(machine_config &config)
{
@@ -409,19 +409,19 @@ void md_cons_state::genesis_tmss(machine_config &config)
subdevice<software_list_device>("cart_list")->set_filter("TMSS");
}
-MACHINE_CONFIG_START(md_cons_state::dcat16_megadriv)
+void md_cons_state::dcat16_megadriv(machine_config &config)
+{
dcat16_megadriv_base(config);
MCFG_MACHINE_START_OVERRIDE(md_cons_state, md_common)
MCFG_MACHINE_RESET_OVERRIDE(md_cons_state, megadriv)
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
+ subdevice<screen_device>("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console));
// has SD card slot instead?
-// MCFG_MD_CARTRIDGE_ADD("mdslot", md_cart, nullptr)
+// MD_CART_SLOT(config, m_cart, md_cart, nullptr);
// SOFTWARE_LIST(config, "cart_list").set_original("megadriv");
-MACHINE_CONFIG_END
+}
/*************************************
*
@@ -615,16 +615,15 @@ MACHINE_CONFIG_START(md_cons_state::genesis_32x)
SEGA_32X_NTSC(config, m_32x, (MASTER_CLOCK_NTSC * 3) / 7, m_maincpu, m_scan_timer);
m_32x->set_palette_tag("gen_vdp:palette");
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
+ subdevice<screen_device>("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console));
// we need to remove and re-add the YM because the balance is different
// due to MAME / MESS having severe issues if the dac output is > 0.40? (sound is corrupted even if DAC is silent?!)
config.device_remove("ymsnd");
- MCFG_DEVICE_ADD("ymsnd", YM2612, MASTER_CLOCK_NTSC/7)
- MCFG_SOUND_ROUTE(0, "lspeaker", (0.50)/2)
- MCFG_SOUND_ROUTE(1, "rspeaker", (0.50)/2)
+ YM2612(config, m_ymsnd, MASTER_CLOCK_NTSC/7);
+ 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")
@@ -651,16 +650,15 @@ MACHINE_CONFIG_START(md_cons_state::mdj_32x)
SEGA_32X_NTSC(config, m_32x, (MASTER_CLOCK_NTSC * 3) / 7, m_maincpu, m_scan_timer);
m_32x->set_palette_tag("gen_vdp:palette");
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
+ subdevice<screen_device>("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console));
// we need to remove and re-add the sound system because the balance is different
// due to MAME / MESS having severe issues if the dac output is > 0.40? (sound is corrupted even if DAC is silent?!)
config.device_remove("ymsnd");
- MCFG_DEVICE_ADD("ymsnd", YM2612, MASTER_CLOCK_NTSC/7)
- MCFG_SOUND_ROUTE(0, "lspeaker", (0.50)/2)
- MCFG_SOUND_ROUTE(1, "rspeaker", (0.50)/2)
+ YM2612(config, m_ymsnd, MASTER_CLOCK_NTSC/7);
+ 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")
@@ -687,16 +685,15 @@ MACHINE_CONFIG_START(md_cons_state::md_32x)
SEGA_32X_PAL(config, m_32x, (MASTER_CLOCK_PAL * 3) / 7, m_maincpu, m_scan_timer);
m_32x->set_palette_tag("gen_vdp:palette");
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
+ subdevice<screen_device>("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console));
// we need to remove and re-add the sound system because the balance is different
// due to MAME / MESS having severe issues if the dac output is > 0.40? (sound is corrupted even if DAC is silent?!)
config.device_remove("ymsnd");
- MCFG_DEVICE_ADD("ymsnd", YM2612, MASTER_CLOCK_NTSC/7)
- MCFG_SOUND_ROUTE(0, "lspeaker", (0.50)/2)
- MCFG_SOUND_ROUTE(1, "rspeaker", (0.50)/2)
+ YM2612(config, m_ymsnd, MASTER_CLOCK_NTSC/7);
+ 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")
@@ -739,14 +736,14 @@ ROM_END
/****************************************** SegaCD emulation ****************************************/
-MACHINE_CONFIG_START(md_cons_state::genesis_scd)
+void md_cons_state::genesis_scd(machine_config &config)
+{
md_ntsc(config);
MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megacd)
MCFG_MACHINE_RESET_OVERRIDE(md_cons_state, ms_megadriv)
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
+ subdevice<screen_device>("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console));
SEGA_SEGACD_US(config, m_segacd, 0);
m_segacd->set_palette("gen_vdp:palette");
@@ -755,16 +752,16 @@ MACHINE_CONFIG_START(md_cons_state::genesis_scd)
CDROM(config, "cdrom").set_interface("scd_cdrom");
SOFTWARE_LIST(config, "cd_list").set_original("segacd");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(md_cons_state::md_scd)
+void md_cons_state::md_scd(machine_config &config)
+{
md_pal(config);
MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megacd)
MCFG_MACHINE_RESET_OVERRIDE(md_cons_state, ms_megadriv)
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
+ subdevice<screen_device>("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console));
SEGA_SEGACD_EUROPE(config, m_segacd, 0);
m_segacd->set_palette("gen_vdp:palette");
@@ -773,16 +770,16 @@ MACHINE_CONFIG_START(md_cons_state::md_scd)
CDROM(config, "cdrom").set_interface("scd_cdrom");
SOFTWARE_LIST(config, "cd_list").set_original("megacd");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(md_cons_state::mdj_scd)
+void md_cons_state::mdj_scd(machine_config &config)
+{
md_ntsc(config);
MCFG_MACHINE_START_OVERRIDE(md_cons_state, ms_megacd)
MCFG_MACHINE_RESET_OVERRIDE(md_cons_state, ms_megadriv)
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
+ subdevice<screen_device>("megadriv")->screen_vblank().set(FUNC(md_cons_state::screen_vblank_console));
SEGA_SEGACD_JAPAN(config, m_segacd, 0);
m_segacd->set_palette("gen_vdp:palette");
@@ -791,7 +788,7 @@ MACHINE_CONFIG_START(md_cons_state::mdj_scd)
CDROM(config, "cdrom").set_interface("scd_cdrom");
SOFTWARE_LIST(config, "cd_list").set_original("megacdj");
-MACHINE_CONFIG_END
+}
/******************SEGA CD + 32X****************************/
diff --git a/src/mame/drivers/pce.cpp b/src/mame/drivers/pce.cpp
index 98f04f3f5b3..29b365e6443 100644
--- a/src/mame/drivers/pce.cpp
+++ b/src/mame/drivers/pce.cpp
@@ -305,7 +305,8 @@ static void pce_cart(device_slot_interface &device)
device.option_add_internal("sf2", PCE_ROM_SF2);
}
-MACHINE_CONFIG_START(pce_state::pce_common)
+void pce_state::pce_common(machine_config &config)
+{
/* basic machine hardware */
H6280(config, m_maincpu, MAIN_CLOCK/3);
m_maincpu->set_addrmap(AS_PROGRAM, &pce_state::pce_mem);
@@ -321,10 +322,10 @@ MACHINE_CONFIG_START(pce_state::pce_common)
MCFG_MACHINE_RESET_OVERRIDE(pce_state, mess_pce )
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK, huc6260_device::WPF, 64, 64 + 1024 + 64, huc6260_device::LPF, 18, 18 + 242)
- MCFG_SCREEN_UPDATE_DRIVER( pce_state, screen_update )
- MCFG_SCREEN_PALETTE("huc6260")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(MAIN_CLOCK, huc6260_device::WPF, 64, 64 + 1024 + 64, huc6260_device::LPF, 18, 18 + 242);
+ screen.set_screen_update(FUNC(pce_state::screen_update));
+ screen.set_palette(m_huc6260);
HUC6260(config, m_huc6260, MAIN_CLOCK);
m_huc6260->next_pixel_data().set("huc6270", FUNC(huc6270_device::next_pixel));
@@ -342,24 +343,27 @@ MACHINE_CONFIG_START(pce_state::pce_common)
PCE_CD(config, m_cd, 0);
SOFTWARE_LIST(config, "cd_list").set_original("pcecd");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(pce_state::pce)
+void pce_state::pce(machine_config &config)
+{
pce_common(config);
- MCFG_PCE_CARTRIDGE_ADD("cartslot", pce_cart, nullptr)
+ PCE_CART_SLOT(config, m_cartslot, pce_cart, nullptr, "pce_cart");
SOFTWARE_LIST(config, "cart_list").set_original("pce");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(pce_state::tg16)
+void pce_state::tg16(machine_config &config)
+{
pce_common(config);
- MCFG_TG16_CARTRIDGE_ADD("cartslot", pce_cart, nullptr)
+ PCE_CART_SLOT(config, m_cartslot, pce_cart, nullptr, "tg16_cart");
SOFTWARE_LIST(config, "cart_list").set_original("tg16");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(pce_state::sgx)
+void pce_state::sgx(machine_config &config)
+{
/* basic machine hardware */
H6280(config, m_maincpu, MAIN_CLOCK/3);
m_maincpu->set_addrmap(AS_PROGRAM, &pce_state::sgx_mem);
@@ -375,10 +379,10 @@ MACHINE_CONFIG_START(pce_state::sgx)
MCFG_MACHINE_RESET_OVERRIDE(pce_state, mess_pce )
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK, huc6260_device::WPF, 64, 64 + 1024 + 64, huc6260_device::LPF, 18, 18 + 242)
- MCFG_SCREEN_UPDATE_DRIVER( pce_state, screen_update )
- MCFG_SCREEN_PALETTE("huc6260")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(MAIN_CLOCK, huc6260_device::WPF, 64, 64 + 1024 + 64, huc6260_device::LPF, 18, 18 + 242);
+ screen.set_screen_update(FUNC(pce_state::screen_update));
+ screen.set_palette(m_huc6260);
HUC6260(config, m_huc6260, MAIN_CLOCK);
m_huc6260->next_pixel_data().set("huc6202", FUNC(huc6202_device::next_pixel));
@@ -411,14 +415,14 @@ MACHINE_CONFIG_START(pce_state::sgx)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_PCE_CARTRIDGE_ADD("cartslot", pce_cart, nullptr)
+ PCE_CART_SLOT(config, m_cartslot, pce_cart, nullptr, "pce_cart");
SOFTWARE_LIST(config, "cart_list").set_original("sgx");
SOFTWARE_LIST(config, "pce_list").set_compatible("pce");
PCE_CD(config, m_cd, 0);
SOFTWARE_LIST(config, "cd_list").set_original("pcecd");
-MACHINE_CONFIG_END
+}
/***************************************************************************