summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2019-01-07 03:36:29 +1100
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2019-01-07 03:36:29 +1100
commitfc59d08474bd285c17829b6b984213ee89832f12 (patch) (github)
treecf46d1d5c69cb682b734a5a55e91b53ff9b79053
parent486304da37674b20cad77426d144e1de985bbbdf (diff)
downloadmame-fc59d08474bd285c17829b6b984213ee89832f12.tar.bz2
mame-fc59d08474bd285c17829b6b984213ee89832f12.zip
get rid of the rest of the digfx MCFG as well (nw)
-rw-r--r--src/emu/digfx.h22
-rw-r--r--src/mame/drivers/amaticmg.cpp4
-rw-r--r--src/mame/drivers/ambush.cpp9
-rw-r--r--src/mame/drivers/ampoker2.cpp2
-rw-r--r--src/mame/drivers/atarifb.cpp4
-rw-r--r--src/mame/drivers/atm.cpp12
-rw-r--r--src/mame/drivers/btime.cpp48
-rw-r--r--src/mame/drivers/calomega.cpp7
-rw-r--r--src/mame/drivers/cclimber.cpp13
-rw-r--r--src/mame/drivers/cischeat.cpp10
-rw-r--r--src/mame/drivers/deco_mlc.cpp21
-rw-r--r--src/mame/drivers/esd16.cpp2
-rw-r--r--src/mame/drivers/expro02.cpp14
-rw-r--r--src/mame/drivers/fastfred.cpp7
-rw-r--r--src/mame/drivers/firetrk.cpp7
-rw-r--r--src/mame/drivers/funworld.cpp13
-rw-r--r--src/mame/drivers/galaxian.cpp31
-rw-r--r--src/mame/drivers/galaxold.cpp8
-rw-r--r--src/mame/drivers/goldnpkr.cpp4
-rw-r--r--src/mame/drivers/goldstar.cpp69
-rw-r--r--src/mame/drivers/hitme.cpp5
-rw-r--r--src/mame/drivers/homedata.cpp2
-rw-r--r--src/mame/drivers/ibmpcjr.cpp6
-rw-r--r--src/mame/drivers/igs009.cpp4
-rw-r--r--src/mame/drivers/igspoker.cpp6
-rw-r--r--src/mame/drivers/ironhors.cpp2
-rw-r--r--src/mame/drivers/jack.cpp5
-rw-r--r--src/mame/drivers/kingdrby.cpp2
-rw-r--r--src/mame/drivers/lasso.cpp4
-rw-r--r--src/mame/drivers/liberate.cpp6
-rw-r--r--src/mame/drivers/m62.cpp23
-rw-r--r--src/mame/drivers/marineb.cpp38
-rw-r--r--src/mame/drivers/mbee.cpp7
-rw-r--r--src/mame/drivers/mcr3.cpp9
-rw-r--r--src/mame/drivers/megadriv.cpp24
-rw-r--r--src/mame/drivers/ms32.cpp6
-rw-r--r--src/mame/drivers/mz700.cpp6
-rw-r--r--src/mame/drivers/mz80.cpp22
-rw-r--r--src/mame/drivers/nakajies.cpp16
-rw-r--r--src/mame/drivers/pacman.cpp11
-rw-r--r--src/mame/drivers/paradise.cpp26
-rw-r--r--src/mame/drivers/pc6001.cpp2
-rw-r--r--src/mame/drivers/pentagon.cpp4
-rw-r--r--src/mame/drivers/punchout.cpp6
-rw-r--r--src/mame/drivers/pyl601.cpp20
-rw-r--r--src/mame/drivers/realbrk.cpp12
-rw-r--r--src/mame/drivers/scorpion.cpp19
-rw-r--r--src/mame/drivers/scramble.cpp11
-rw-r--r--src/mame/drivers/seta2.cpp2
-rw-r--r--src/mame/drivers/shangkid.cpp2
-rw-r--r--src/mame/drivers/skylncr.cpp24
-rw-r--r--src/mame/drivers/snk6502.cpp2
-rw-r--r--src/mame/drivers/spec128.cpp2
-rw-r--r--src/mame/drivers/specpls3.cpp4
-rw-r--r--src/mame/drivers/ssingles.cpp48
-rw-r--r--src/mame/drivers/statriv2.cpp2
-rw-r--r--src/mame/drivers/thepit.cpp13
-rw-r--r--src/mame/drivers/tiamc1.cpp7
-rw-r--r--src/mame/drivers/timex.cpp3
-rw-r--r--src/mame/drivers/travrusa.cpp18
-rw-r--r--src/mame/drivers/trs80.cpp6
-rw-r--r--src/mame/drivers/videopkr.cpp6
-rw-r--r--src/mame/drivers/warpwarp.cpp4
-rw-r--r--src/mame/drivers/witch.cpp4
-rw-r--r--src/mame/drivers/wiz.cpp2
-rw-r--r--src/mame/includes/mcr3.h2
-rw-r--r--src/mame/includes/megadriv.h24
-rw-r--r--src/mame/includes/ms32.h13
-rw-r--r--src/mame/includes/witch.h1
69 files changed, 405 insertions, 395 deletions
diff --git a/src/emu/digfx.h b/src/emu/digfx.h
index 1b9bfccb798..3829cd2882e 100644
--- a/src/emu/digfx.h
+++ b/src/emu/digfx.h
@@ -122,28 +122,6 @@ const gfx_layout name = { width, height, RGN_FRAC(1,1), 8, { GFX_RAW }, { 0 }, {
//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_GFX_PALETTE(_palette_tag) \
- dynamic_cast<device_gfx_interface &>(*device).set_palette(_palette_tag);
-
-#define MCFG_GFX_INFO(_info) \
- dynamic_cast<device_gfx_interface &>(*device).set_info(_info);
-
-
-
-//**************************************************************************
-// DEVICE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_GFXDECODE_MODIFY(_tag, _info) \
- MCFG_DEVICE_MODIFY(_tag) \
- MCFG_GFX_INFO(_info)
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
diff --git a/src/mame/drivers/amaticmg.cpp b/src/mame/drivers/amaticmg.cpp
index 7f6547c4133..ae2f4f99c08 100644
--- a/src/mame/drivers/amaticmg.cpp
+++ b/src/mame/drivers/amaticmg.cpp
@@ -911,7 +911,7 @@ MACHINE_CONFIG_START(amaticmg_state::amaticmg2)
subdevice<mc6845_device>("crtc")->out_vsync_callback().set(FUNC(amaticmg_state::amaticmg2_irq));
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_amaticmg2)
+ m_gfxdecode->set_info(gfx_amaticmg2);
m_palette->set_init(FUNC(amaticmg_state::amaticmg2_palette));
m_palette->set_entries(0x10000);
MACHINE_CONFIG_END
@@ -930,7 +930,7 @@ MACHINE_CONFIG_START(amaticmg_state::amaticmg4)
subdevice<mc6845_device>("crtc")->out_vsync_callback().set(FUNC(amaticmg_state::amaticmg2_irq));
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_amaticmg2)
+ m_gfxdecode->set_info(gfx_amaticmg2);
m_palette->set_init(FUNC(amaticmg_state::amaticmg2_palette));
m_palette->set_entries(0x10000);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ambush.cpp b/src/mame/drivers/ambush.cpp
index 2b37533538a..781d8d2074e 100644
--- a/src/mame/drivers/ambush.cpp
+++ b/src/mame/drivers/ambush.cpp
@@ -785,7 +785,7 @@ MACHINE_CONFIG_START(ambush_state::mariobl)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(ambush_state, screen_update_bootleg)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_mariobl)
+ m_gfxdecode->set_info(gfx_mariobl);
subdevice<palette_device>("palette")->set_init(FUNC(ambush_state::mario_palette));
@@ -798,7 +798,8 @@ MACHINE_CONFIG_START(ambush_state::mariobl)
ay2.add_route(ALL_OUTPUTS, "mono", 0.33);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(ambush_state::mariobla)
+void ambush_state::mariobla(machine_config &config)
+{
mariobl(config);
subdevice<palette_device>("palette")->set_init(FUNC(ambush_state::mariobla_palette));
@@ -806,14 +807,14 @@ MACHINE_CONFIG_START(ambush_state::mariobla)
auto &outlatch(*subdevice<ls259_device>("outlatch"));
outlatch.q_out_cb<5>().set(FUNC(ambush_state::color_bank_1_w));
outlatch.q_out_cb<6>().set_nop();
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(ambush_state::dkong3abl)
mariobl(config);
MCFG_MACHINE_START_OVERRIDE(ambush_state, dkong3abl)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_dkong3abl)
+ m_gfxdecode->set_info(gfx_dkong3abl);
subdevice<palette_device>("palette")->set_init(FUNC(ambush_state::dkong3_palette));
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ampoker2.cpp b/src/mame/drivers/ampoker2.cpp
index 1a89b0c45c4..b5581f8e40f 100644
--- a/src/mame/drivers/ampoker2.cpp
+++ b/src/mame/drivers/ampoker2.cpp
@@ -1201,7 +1201,7 @@ MACHINE_CONFIG_START(ampoker2_state::sigma2k)
ampoker2(config);
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_sigma2k)
+ m_gfxdecode->set_info(gfx_sigma2k);
MCFG_VIDEO_START_OVERRIDE(ampoker2_state, sigma2k)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/atarifb.cpp b/src/mame/drivers/atarifb.cpp
index 578b377fcac..fb0f6ad1a47 100644
--- a/src/mame/drivers/atarifb.cpp
+++ b/src/mame/drivers/atarifb.cpp
@@ -575,7 +575,7 @@ MACHINE_CONFIG_START(atarifb_state::atarifb)
MCFG_SCREEN_UPDATE_DRIVER(atarifb_state, screen_update_atarifb)
MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_atarifb)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_atarifb);
PALETTE(config, m_palette, FUNC(atarifb_state::atarifb_palette), 12);
/* sound hardware */
@@ -623,7 +623,7 @@ MACHINE_CONFIG_START(atarifb_state::soccer)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_VISIBLE_AREA(0*8, 38*8-1, 2*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(atarifb_state, screen_update_soccer)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_soccer)
+ m_gfxdecode->set_info(gfx_soccer);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/atm.cpp b/src/mame/drivers/atm.cpp
index ee761f51e36..f75c0f69974 100644
--- a/src/mame/drivers/atm.cpp
+++ b/src/mame/drivers/atm.cpp
@@ -189,6 +189,7 @@ GFXDECODE_END
MACHINE_CONFIG_START(atm_state::atm)
spectrum_128(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(atm_mem)
MCFG_DEVICE_IO_MAP(atm_io)
@@ -197,15 +198,16 @@ MACHINE_CONFIG_START(atm_state::atm)
BETA_DISK(config, m_beta, 0);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_atm)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_atm);
- MCFG_DEVICE_REMOVE("exp")
+ config.device_remove("exp");
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(atm_state::atmtb2)
+void atm_state::atmtb2(machine_config &config)
+{
atm(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_atmtb2)
-MACHINE_CONFIG_END
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_atmtb2);
+}
/***************************************************************************
diff --git a/src/mame/drivers/btime.cpp b/src/mame/drivers/btime.cpp
index e0b1873f6b6..03366773cbf 100644
--- a/src/mame/drivers/btime.cpp
+++ b/src/mame/drivers/btime.cpp
@@ -1291,7 +1291,7 @@ MACHINE_CONFIG_START(btime_state::btime)
MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI))
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_ADD(m_screen, RASTER)
MCFG_SCREEN_RAW_PARAMS(HCLK, 384, 8, 248, 272, 8, 248)
MCFG_SCREEN_UPDATE_DRIVER(btime_state, screen_update_btime)
MCFG_SCREEN_PALETTE(m_palette)
@@ -1299,8 +1299,7 @@ MACHINE_CONFIG_START(btime_state::btime)
MCFG_MACHINE_START_OVERRIDE(btime_state,btime)
MCFG_MACHINE_RESET_OVERRIDE(btime_state,btime)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_btime)
-
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_btime);
PALETTE(config, m_palette, FUNC(btime_state::btime_palette)).set_format(palette_device::BGR_233_inverted, 16);
/* sound hardware */
@@ -1340,10 +1339,8 @@ MACHINE_CONFIG_START(btime_state::cookrace)
MCFG_DEVICE_PROGRAM_MAP(audio_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cookrace)
-
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(btime_state, screen_update_cookrace)
+ m_gfxdecode->set_info(gfx_cookrace);
+ m_screen->set_screen_update(FUNC(btime_state::screen_update_cookrace));
MACHINE_CONFIG_END
@@ -1357,25 +1354,22 @@ MACHINE_CONFIG_START(btime_state::lnc)
MCFG_MACHINE_RESET_OVERRIDE(btime_state,lnc)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_lnc)
+ m_gfxdecode->set_info(gfx_lnc);
m_palette->set_entries(8);
m_palette->set_init(FUNC(btime_state::lnc_palette));
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(btime_state, screen_update_lnc)
+ m_screen->set_screen_update(FUNC(btime_state::screen_update_lnc));
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(btime_state::wtennis)
+void btime_state::wtennis(machine_config &config)
+{
lnc(config);
- /* basic machine hardware */
-
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(btime_state, screen_update_eggs)
-MACHINE_CONFIG_END
+ m_screen->set_screen_update(FUNC(btime_state::screen_update_eggs));
+}
MACHINE_CONFIG_START(btime_state::mmonkey)
@@ -1398,13 +1392,12 @@ MACHINE_CONFIG_START(btime_state::bnj)
MCFG_DEVICE_PROGRAM_MAP(bnj_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_bnj)
+ m_gfxdecode->set_info(gfx_bnj);
MCFG_VIDEO_START_OVERRIDE(btime_state,bnj)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(btime_state, screen_update_bnj)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) // 256 * 240, confirmed
+ m_screen->set_screen_update(FUNC(btime_state::screen_update_bnj));
+ m_screen->set_visarea(0*8, 32*8-1, 1*8, 31*8-1); // 256 * 240, confirmed
MACHINE_CONFIG_END
@@ -1425,13 +1418,12 @@ MACHINE_CONFIG_START(btime_state::zoar)
MCFG_DEVICE_PROGRAM_MAP(zoar_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_zoar)
+ m_gfxdecode->set_info(gfx_zoar);
m_palette->set_entries(64);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(btime_state, screen_update_zoar)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) // 256 * 240, confirmed
+ m_screen->set_screen_update(FUNC(btime_state::screen_update_zoar));
+ m_screen->set_visarea(0*8, 32*8-1, 1*8, 31*8-1); // 256 * 240, confirmed
/* sound hardware */
ay8910_device &ay1(AY8910(config.replace(), "ay1", HCLK1));
@@ -1459,14 +1451,12 @@ MACHINE_CONFIG_START(btime_state::disco)
m_soundlatch->set_separate_acknowledge(true);
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_disco)
-
+ m_gfxdecode->set_info(gfx_disco);
m_palette->set_entries(32);
MCFG_VIDEO_START_OVERRIDE(btime_state,disco)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(btime_state, screen_update_disco)
+ m_screen->set_screen_update(FUNC(btime_state::screen_update_disco));
MACHINE_CONFIG_END
@@ -1478,7 +1468,7 @@ MACHINE_CONFIG_START(btime_state::tisland)
MCFG_DEVICE_PROGRAM_MAP(tisland_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_zoar)
+ m_gfxdecode->set_info(gfx_zoar);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/calomega.cpp b/src/mame/drivers/calomega.cpp
index ab1c504dae1..48a0be9467d 100644
--- a/src/mame/drivers/calomega.cpp
+++ b/src/mame/drivers/calomega.cpp
@@ -2677,14 +2677,13 @@ MACHINE_CONFIG_START(calomega_state::sys906)
m_pia[1]->writepa_handler().set(FUNC(calomega_state::pia1_aout_w));
m_pia[1]->writepb_handler().set(FUNC(calomega_state::pia1_bout_w));
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_sys906)
+ m_gfxdecode->set_info(gfx_sys906);
/* sound hardware */
subdevice<ay8912_device>("ay8912")->port_a_read_callback().set_ioport("SW2"); /* From PCB pic. Value is stored at $0539 */
- MCFG_DEVICE_REMOVE("acia6850_0")
-
- MCFG_DEVICE_REMOVE("aciabaud")
+ config.device_remove("acia6850_0");
+ config.device_remove("aciabaud");
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cclimber.cpp b/src/mame/drivers/cclimber.cpp
index 8a7d325b701..688276e222d 100644
--- a/src/mame/drivers/cclimber.cpp
+++ b/src/mame/drivers/cclimber.cpp
@@ -1160,7 +1160,8 @@ void cclimber_state::ckongb(machine_config &config)
}
-MACHINE_CONFIG_START(cclimber_state::cannonb)
+void cclimber_state::cannonb(machine_config &config)
+{
cclimber(config);
/* basic machine hardware */
@@ -1171,8 +1172,8 @@ MACHINE_CONFIG_START(cclimber_state::cannonb)
m_mainlatch->q_out_cb<2>().set_nop(); // not used
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cannonb)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_cannonb);
+}
void cclimber_state::bagmanf(machine_config &config)
{
@@ -1229,13 +1230,12 @@ MACHINE_CONFIG_START(cclimber_state::toprollr)
m_mainlatch->q_out_cb<6>().set(FUNC(cclimber_state::toprollr_rombank_w));
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_toprollr)
+ m_gfxdecode->set_info(gfx_toprollr);
m_palette->set_entries(32*5);
m_palette->set_init(FUNC(cclimber_state::toprollr_palette));
MCFG_VIDEO_START_OVERRIDE(cclimber_state,toprollr)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(cclimber_state, screen_update_toprollr)
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(cclimber_state::screen_update_toprollr));
MACHINE_CONFIG_END
@@ -1285,6 +1285,7 @@ MACHINE_CONFIG_END
void cclimber_state::guzzler(machine_config &config)
{
swimmer(config);
+
/* basic machine hardware */
m_maincpu->set_addrmap(AS_PROGRAM, &cclimber_state::guzzler_map);
}
diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp
index 5095e5590df..f4366c78afd 100644
--- a/src/mame/drivers/cischeat.cpp
+++ b/src/mame/drivers/cischeat.cpp
@@ -1981,7 +1981,7 @@ MACHINE_CONFIG_START(cischeat_state::bigrun)
MCFG_SCREEN_UPDATE_DRIVER(cischeat_state, screen_update_bigrun)
MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bigrun)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_bigrun);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x4000/2);
m_palette->enable_shadows();
@@ -2033,7 +2033,7 @@ MACHINE_CONFIG_START(cischeat_state::cischeat)
MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0+16, 256-16-8-1)
MCFG_SCREEN_UPDATE_DRIVER(cischeat_state, screen_update_cischeat)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cischeat)
+ m_gfxdecode->set_info(gfx_cischeat);
m_palette->set_format(palette_device::RRRRGGGGBBBBRGBx, 0x8000/2);
m_tmap[0]->set_colorbase(0x1c00/2);
@@ -2067,7 +2067,7 @@ MACHINE_CONFIG_START(cischeat_state::f1gpstar)
MCFG_DEVICE_PROGRAM_MAP(f1gpstar_sound_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_f1gpstar)
+ m_gfxdecode->set_info(gfx_f1gpstar);
m_palette->set_format(palette_device::RRRRGGGGBBBBRGBx, 0x8000/2);
m_tmap[0]->set_colorbase(0x1e00/2);
@@ -2147,7 +2147,7 @@ MACHINE_CONFIG_START(cischeat_state::scudhamm)
MCFG_SCREEN_UPDATE_DRIVER(cischeat_state, screen_update_scudhamm)
MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_scudhamm)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_scudhamm);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x8000/2);
m_palette->enable_shadows();
@@ -2238,7 +2238,7 @@ MACHINE_CONFIG_START(cischeat_state::captflag)
MCFG_SCREEN_UPDATE_DRIVER(cischeat_state, screen_update_scudhamm)
MCFG_SCREEN_PALETTE("palette")
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_scudhamm)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_scudhamm);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x8000/2);
m_palette->enable_shadows();
diff --git a/src/mame/drivers/deco_mlc.cpp b/src/mame/drivers/deco_mlc.cpp
index bf49ae120e8..5215d5db27f 100644
--- a/src/mame/drivers/deco_mlc.cpp
+++ b/src/mame/drivers/deco_mlc.cpp
@@ -526,9 +526,8 @@ MACHINE_CONFIG_START(deco_mlc_state::avengrgs)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, deco_mlc_state, screen_vblank_mlc))
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE)
- MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_deco_mlc)
- PALETTE(config, m_palette);
- m_palette->set_format(palette_device::xBGR_555, 2048);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_deco_mlc);
+ PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048);
m_palette->set_membits(16);
/* sound hardware */
@@ -559,9 +558,8 @@ MACHINE_CONFIG_START(deco_mlc_state::mlc)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, deco_mlc_state, screen_vblank_mlc))
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE)
- MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_deco_mlc)
- PALETTE(config, m_palette);
- m_palette->set_format(palette_device::xBGR_555, 2048);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_deco_mlc);
+ PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048);
m_palette->set_membits(16);
DECO146PROT(config, m_deco146, 0);
@@ -576,14 +574,17 @@ MACHINE_CONFIG_START(deco_mlc_state::mlc)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(deco_mlc_state::mlc_6bpp)
+void deco_mlc_state::mlc_6bpp(machine_config &config)
+{
mlc(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_6bpp)
-MACHINE_CONFIG_END
+
+ m_gfxdecode->set_info(gfx_6bpp);
+}
MACHINE_CONFIG_START(deco_mlc_state::mlc_5bpp)
mlc(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_5bpp)
+
+ m_gfxdecode->set_info(gfx_5bpp);
// TODO: mono? ch.0 doesn't output any sound in-game
MCFG_DEVICE_MODIFY("ymz")
diff --git a/src/mame/drivers/esd16.cpp b/src/mame/drivers/esd16.cpp
index ba3ae9dd816..ffafa26accd 100644
--- a/src/mame/drivers/esd16.cpp
+++ b/src/mame/drivers/esd16.cpp
@@ -688,7 +688,7 @@ MACHINE_CONFIG_START(esd16_state::jumppop)
MCFG_DEVICE_MODIFY("audiocpu")
MCFG_DEVICE_CLOCK( XTAL(14'000'000)/4) /* 3.5MHz - Verified */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_jumppop)
+ m_gfxdecode->set_info(gfx_jumppop);
MCFG_DEVICE_REPLACE("ymsnd", YM3812, XTAL(14'000'000)/4) /* 3.5MHz - Verified */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
diff --git a/src/mame/drivers/expro02.cpp b/src/mame/drivers/expro02.cpp
index bc078757484..8e74739d4e0 100644
--- a/src/mame/drivers/expro02.cpp
+++ b/src/mame/drivers/expro02.cpp
@@ -947,6 +947,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(expro02_state::comad)
expro02(config);
+
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(fantasia_map)
@@ -960,12 +961,14 @@ MACHINE_CONFIG_START(expro02_state::comad)
subdevice<watchdog_timer_device>("watchdog")->set_time(attotime::from_seconds(0)); /* a guess, and certainly wrong */
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(expro02_state::comad_noview2)
+void expro02_state::comad_noview2(machine_config &config)
+{
comad(config);
+
config.device_remove("view2_0");
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_expro02_noview2)
-MACHINE_CONFIG_END
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_expro02_noview2);
+}
MACHINE_CONFIG_START(expro02_state::fantasia)
@@ -977,6 +980,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(expro02_state::supmodel)
comad_noview2(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(supmodel_map)
MCFG_DEVICE_REPLACE("oki", OKIM6295, 1584000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
@@ -986,18 +990,21 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(expro02_state::smissw) // 951127 PCB, 12 & 16 clocks
comad_noview2(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(smissw_map)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(expro02_state::fantsia2)
comad_noview2(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(fantsia2_map)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(expro02_state::galhustl)
comad_noview2(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(galhustl_map)
MCFG_DEVICE_REPLACE("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
@@ -1010,6 +1017,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(expro02_state::zipzap)
comad_noview2(config);
+
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(zipzap_map)
diff --git a/src/mame/drivers/fastfred.cpp b/src/mame/drivers/fastfred.cpp
index 5a0cd8f3aed..097c52458fb 100644
--- a/src/mame/drivers/fastfred.cpp
+++ b/src/mame/drivers/fastfred.cpp
@@ -688,7 +688,7 @@ MACHINE_CONFIG_START(fastfred_state::jumpcoas)
MCFG_DEVICE_REMOVE("audiocpu")
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_jumpcoas)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_jumpcoas);
/* sound hardware */
MCFG_DEVICE_REMOVE("soundlatch")
@@ -710,11 +710,10 @@ MACHINE_CONFIG_START(fastfred_state::imago)
/* video hardware */
m_palette->set_entries(256+64+2); // 256 for characters, 64 for the stars and 2 for the web
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_imago)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_imago);
MCFG_VIDEO_START_OVERRIDE(fastfred_state,imago)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(fastfred_state, screen_update_imago)
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(fastfred_state::screen_update_imago));
MACHINE_CONFIG_END
#undef CLOCK
diff --git a/src/mame/drivers/firetrk.cpp b/src/mame/drivers/firetrk.cpp
index 1c3085dbbaf..1c8fdba15b0 100644
--- a/src/mame/drivers/firetrk.cpp
+++ b/src/mame/drivers/firetrk.cpp
@@ -871,8 +871,7 @@ MACHINE_CONFIG_START(firetrk_state::firetrk)
MCFG_SCREEN_PALETTE(m_palette)
PALETTE(config, m_palette, FUNC(firetrk_state::firetrk_palette), 28);
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_firetrk)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_firetrk);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -894,7 +893,7 @@ MACHINE_CONFIG_START(firetrk_state::superbug)
MCFG_SCREEN_UPDATE_DRIVER(firetrk_state, screen_update_superbug)
MCFG_VIDEO_START_OVERRIDE(firetrk_state,superbug)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_superbug)
+ m_gfxdecode->set_info(gfx_superbug);
/* sound hardware */
MCFG_DEVICE_REPLACE("discrete", DISCRETE, superbug_discrete)
@@ -914,7 +913,7 @@ MACHINE_CONFIG_START(firetrk_state::montecar)
MCFG_SCREEN_UPDATE_DRIVER(firetrk_state, screen_update_montecar)
MCFG_VIDEO_START_OVERRIDE(firetrk_state,montecar)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_montecar)
+ m_gfxdecode->set_info(gfx_montecar);
m_palette->set_entries(46);
m_palette->set_init(FUNC(firetrk_state::montecar_palette));
diff --git a/src/mame/drivers/funworld.cpp b/src/mame/drivers/funworld.cpp
index 393506694b6..e4ce7a960d4 100644
--- a/src/mame/drivers/funworld.cpp
+++ b/src/mame/drivers/funworld.cpp
@@ -3093,9 +3093,8 @@ MACHINE_CONFIG_START(funworld_state::fw1stpal)
MCFG_SCREEN_UPDATE_DRIVER(funworld_state, screen_update_funworld)
MCFG_SCREEN_PALETTE("palette")
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fw1stpal)
-
- PALETTE(config, "palette", FUNC(funworld_state::funworld_palette), 0x200);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_fw1stpal);
+ PALETTE(config, m_palette, FUNC(funworld_state::funworld_palette), 0x200);
mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK)); /* 2MHz, verified on jollycrd & royalcrd */
crtc.set_screen("screen");
@@ -3117,7 +3116,7 @@ MACHINE_CONFIG_START(funworld_state::fw2ndpal)
fw1stpal(config);
MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
MCFG_DEVICE_PROGRAM_MAP(funworld_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_fw2ndpal)
+ m_gfxdecode->set_info(gfx_fw2ndpal);
MACHINE_CONFIG_END
@@ -3208,7 +3207,7 @@ MACHINE_CONFIG_START(funworld_state::intrgmes)
fw1stpal(config);
MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
MCFG_DEVICE_PROGRAM_MAP(intergames_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_fw2ndpal)
+ m_gfxdecode->set_info(gfx_fw2ndpal);
MACHINE_CONFIG_END
@@ -3216,7 +3215,7 @@ MACHINE_CONFIG_START(funworld_state::fw_brick_1)
fw1stpal(config);
MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
MCFG_DEVICE_PROGRAM_MAP(fw_a7_11_map)
-// MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_fw2ndpal)
+// m_gfxdecode->set_info(gfx_fw2ndpal);
MACHINE_CONFIG_END
@@ -3224,7 +3223,7 @@ MACHINE_CONFIG_START(funworld_state::fw_brick_2)
fw2ndpal(config);
MCFG_DEVICE_REPLACE("maincpu", R65C02, CPU_CLOCK) /* 2MHz */
MCFG_DEVICE_PROGRAM_MAP(fw_a7_11_map)
-// MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_fw2ndpal)
+// m_gfxdecode->set_info(gfx_fw2ndpal);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index e942ef73940..0c2c902a7c3 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -6019,7 +6019,7 @@ MACHINE_CONFIG_START(galaxian_state::sidam_bootleg_base)
MCFG_DEVICE_CLOCK(12_MHz_XTAL / 2 / 2)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_sidam)
+ m_gfxdecode->set_info(gfx_sidam);
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_RAW_PARAMS(12_MHz_XTAL, SIDAM_HTOTAL, SIDAM_HBEND, SIDAM_HBSTART, GALAXIAN_VTOTAL, GALAXIAN_VBEND, GALAXIAN_VBSTART)
@@ -6150,12 +6150,13 @@ MACHINE_CONFIG_START(galaxian_state::mandingarf)
MCFG_DEVICE_PROGRAM_MAP(mandingarf_map)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(galaxian_state::pacmanbl)
+void galaxian_state::pacmanbl(machine_config &config)
+{
galaxian(config);
/* separate tile/sprite ROMs */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_pacmanbl)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_pacmanbl);
+}
MACHINE_CONFIG_START(galaxian_state::tenspot)
galaxian(config);
@@ -6166,7 +6167,7 @@ MACHINE_CONFIG_START(galaxian_state::tenspot)
//MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse)
/* separate tile/sprite ROMs */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_tenspot)
+ m_gfxdecode->set_info(gfx_tenspot);
// MCFG_CPU_VBLANK_INT("screen", nmi_line_pulse)
/* video hardware */
@@ -6178,7 +6179,7 @@ MACHINE_CONFIG_START(galaxian_state::zigzag)
galaxian_base(config);
/* separate tile/sprite ROMs */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_pacmanbl)
+ m_gfxdecode->set_info(gfx_pacmanbl);
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
@@ -6189,14 +6190,15 @@ MACHINE_CONFIG_START(galaxian_state::zigzag)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(galaxian_state::gmgalax)
+void galaxian_state::gmgalax(machine_config &config)
+{
galaxian(config);
/* banked video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_gmgalax)
+ m_gfxdecode->set_info(gfx_gmgalax);
m_palette->set_entries(64);
m_palette->set_init(FUNC(galaxian_state::galaxian_palette));
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(galaxian_state::mooncrst)
@@ -6206,11 +6208,9 @@ MACHINE_CONFIG_START(galaxian_state::mooncrst)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(mooncrst_map)
- MCFG_DEVICE_ADD("cust", GALAXIAN, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.4)
+ GALAXIAN(config, "cust", 0).add_route(ALL_OUTPUTS, "speaker", 0.4);
- MCFG_DEVICE_ADD(GAL_AUDIO, DISCRETE, mooncrst_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ DISCRETE(config, GAL_AUDIO, mooncrst_discrete).add_route(ALL_OUTPUTS, "speaker", 1.0);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(galaxian_state::moonqsr)
@@ -6735,12 +6735,13 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(galaxian_state::fourplay)
galaxian(config);
+
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(fourplay_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_gmgalax)
+ m_gfxdecode->set_info(gfx_gmgalax);
m_palette->set_entries(64);
MACHINE_CONFIG_END
@@ -6752,7 +6753,7 @@ MACHINE_CONFIG_START(galaxian_state::videight)
MCFG_DEVICE_PROGRAM_MAP(videight_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_videight)
+ m_gfxdecode->set_info(gfx_videight);
m_palette->set_entries(8 * 32);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/galaxold.cpp b/src/mame/drivers/galaxold.cpp
index 7679ae3cdbc..d3ead10ae53 100644
--- a/src/mame/drivers/galaxold.cpp
+++ b/src/mame/drivers/galaxold.cpp
@@ -2430,7 +2430,7 @@ MACHINE_CONFIG_START(galaxold_state::_4in1)
MCFG_DEVICE_PROGRAM_MAP(_4in1_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_4in1)
+ m_gfxdecode->set_info(gfx_4in1);
MCFG_VIDEO_START_OVERRIDE(galaxold_state,pisces)
MACHINE_CONFIG_END
@@ -2477,7 +2477,7 @@ MACHINE_CONFIG_START(galaxold_state::rockclim)
/* basic machine hardware */
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(rockclim_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_rockclim)
+ m_gfxdecode->set_info(gfx_rockclim);
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(galaxold_state,rockclim)
@@ -2660,7 +2660,7 @@ MACHINE_CONFIG_START(galaxold_state::ckongg)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(ckongg_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_gmgalax)
+ m_gfxdecode->set_info(gfx_gmgalax);
MCFG_VIDEO_START_OVERRIDE(galaxold_state,ckongs)
MACHINE_CONFIG_END
@@ -2673,7 +2673,7 @@ MACHINE_CONFIG_START(galaxold_state::ckongmc)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(ckongmc_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_gmgalax)
+ m_gfxdecode->set_info(gfx_gmgalax);
MCFG_VIDEO_START_OVERRIDE(galaxold_state,ckongs)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp
index ea4c97d9cde..1f22d80d8ce 100644
--- a/src/mame/drivers/goldnpkr.cpp
+++ b/src/mame/drivers/goldnpkr.cpp
@@ -4403,7 +4403,7 @@ void goldnpkr_state::wildcard(machine_config &config)
m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w));
/* video hardware */
-// MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_wildcard)
+// m_gfxdecode->set_info(gfx_wildcard);
m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette));
// MCFG_VIDEO_START_OVERRIDE(goldnpkr_state,wildcard)
@@ -4447,7 +4447,7 @@ void goldnpkr_state::wildcrdb(machine_config &config)
m_pia[1]->writepa_handler().set(FUNC(goldnpkr_state::wcfalcon_snd_w));
/* video hardware */
-// MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_wildcard)
+// m_gfxdecode->set_info(gfx_wildcard);
m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette));
// MCFG_VIDEO_START_OVERRIDE(goldnpkr_state,wildcard)
diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp
index e540c466f71..f5b67192894 100644
--- a/src/mame/drivers/goldstar.cpp
+++ b/src/mame/drivers/goldstar.cpp
@@ -8513,15 +8513,17 @@ MACHINE_CONFIG_START(goldstar_state::goldstbl)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(goldstar_state::moonlght)
+void goldstar_state::moonlght(machine_config &config)
+{
goldstbl(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_ml)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_ml);
+}
-MACHINE_CONFIG_START(goldstar_state::goldfrui)
+void goldstar_state::goldfrui(machine_config &config)
+{
goldstbl(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_goldfrui)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_goldfrui);
+}
MACHINE_CONFIG_START(sanghopm_state::star100)
@@ -8693,30 +8695,35 @@ MACHINE_CONFIG_START(cb3_state::ncb3)
aysnd.add_route(ALL_OUTPUTS, "mono", 0.50);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(cb3_state::cb3c)
+void cb3_state::cb3c(machine_config &config)
+{
ncb3(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cb3c)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_cb3c);
+}
-MACHINE_CONFIG_START(cb3_state::cb3e)
+void cb3_state::cb3e(machine_config &config)
+{
ncb3(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cb3e)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_cb3e);
+}
-MACHINE_CONFIG_START(cb3_state::chrygld)
+void cb3_state::chrygld(machine_config &config)
+{
ncb3(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_chry10)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_chry10);
+}
-MACHINE_CONFIG_START(cb3_state::cherrys)
+void cb3_state::cherrys(machine_config &config)
+{
ncb3(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cherrys)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_cherrys);
+}
-MACHINE_CONFIG_START(cb3_state::cm97)
+void cb3_state::cm97(machine_config &config)
+{
ncb3(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cm97)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_cm97);
+}
MACHINE_CONFIG_START(goldstar_state::wcherry)
@@ -8808,10 +8815,11 @@ MACHINE_CONFIG_START(cmaster_state::cm)
aysnd.add_route(ALL_OUTPUTS, "mono", 0.50);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(cmaster_state::cmasterc)
+void cmaster_state::cmasterc(machine_config &config)
+{
cm(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cmasterc)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_cmasterc);
+}
MACHINE_CONFIG_START(goldstar_state::cmast91)
@@ -8969,10 +8977,11 @@ MACHINE_CONFIG_START(wingco_state::bingowng)
aysnd.add_route(ALL_OUTPUTS, "mono", 0.50);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(wingco_state::bingownga)
+void wingco_state::bingownga(machine_config &config)
+{
bingowng(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_bingownga)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_bingownga);
+}
MACHINE_CONFIG_START(wingco_state::flam7_w4)
@@ -8992,7 +9001,7 @@ MACHINE_CONFIG_START(wingco_state::flaming7)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(flaming7_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_flaming7)
+ m_gfxdecode->set_info(gfx_flaming7);
// to do serial protection.
m_ppi[0]->out_pc_callback().set(FUNC(wingco_state::fl7w4_outc802_w));
@@ -9006,7 +9015,7 @@ MACHINE_CONFIG_START(wingco_state::flam7_tw)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(flaming7_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_flam7_tw)
+ m_gfxdecode->set_info(gfx_flam7_tw);
// to do serial protection.
m_ppi[0]->out_pc_callback().set(FUNC(wingco_state::fl7w4_outc802_w));
@@ -9337,7 +9346,7 @@ MACHINE_CONFIG_START(cmaster_state::nfm)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(nfm_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_nfm)
+ m_gfxdecode->set_info(gfx_nfm);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/hitme.cpp b/src/mame/drivers/hitme.cpp
index e80ee193270..a0aef7850e8 100644
--- a/src/mame/drivers/hitme.cpp
+++ b/src/mame/drivers/hitme.cpp
@@ -331,8 +331,7 @@ MACHINE_CONFIG_START(hitme_state::hitme)
MCFG_SCREEN_UPDATE_DRIVER(hitme_state, screen_update_hitme)
MCFG_SCREEN_PALETTE("palette")
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_hitme)
-
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_hitme);
PALETTE(config, "palette", palette_device::MONOCHROME);
/* sound hardware */
@@ -358,7 +357,7 @@ MACHINE_CONFIG_START(hitme_state::barricad)
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 24*8-1)
MCFG_SCREEN_UPDATE_DRIVER(hitme_state, screen_update_barricad)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_barricad)
+ m_gfxdecode->set_info(gfx_barricad);
MCFG_VIDEO_START_OVERRIDE(hitme_state,barricad)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/homedata.cpp b/src/mame/drivers/homedata.cpp
index de844e42ee8..a648e371963 100644
--- a/src/mame/drivers/homedata.cpp
+++ b/src/mame/drivers/homedata.cpp
@@ -1374,7 +1374,7 @@ MACHINE_CONFIG_START(homedata_state::lemnangl)
pteacher(config);
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_lemnangl)
+ m_gfxdecode->set_info(gfx_lemnangl);
MCFG_VIDEO_START_OVERRIDE(homedata_state,lemnangl)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp
index fbb9e3aa502..170af410333 100644
--- a/src/mame/drivers/ibmpcjr.cpp
+++ b/src/mame/drivers/ibmpcjr.cpp
@@ -641,7 +641,7 @@ MACHINE_CONFIG_START(pcjr_state::ibmpcjr)
MCFG_DEVICE_ADD("pcvideo_pcjr", PCVIDEO_PCJR, 0)
MCFG_VIDEO_SET_SCREEN("pcvideo_pcjr:screen")
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "pcvideo_pcjr:palette", gfx_pcjr)
+ GFXDECODE(config, "gfxdecode", "pcvideo_pcjr:palette", gfx_pcjr);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -692,6 +692,7 @@ GFXDECODE_END
MACHINE_CONFIG_START(pcjr_state::ibmpcjx)
ibmpcjr(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(ibmpcjx_map)
MCFG_DEVICE_IO_MAP(ibmpcjx_io)
@@ -702,7 +703,8 @@ MACHINE_CONFIG_START(pcjr_state::ibmpcjx)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", pcjr_floppies, "35dd", isa8_fdc_device::floppy_formats)
MCFG_SLOT_FIXED(true)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_ibmpcjx)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_ibmpcjx);
+
/* internal ram */
m_ram->set_default_size("512K").set_extra_options(""); // only boots with 512k currently
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/igs009.cpp b/src/mame/drivers/igs009.cpp
index d2ab5786bb9..2afbc08d220 100644
--- a/src/mame/drivers/igs009.cpp
+++ b/src/mame/drivers/igs009.cpp
@@ -856,7 +856,7 @@ MACHINE_CONFIG_START(igs009_state::jingbell)
MCFG_SCREEN_PALETTE(m_palette)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, igs009_state, vblank_irq))
- MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_jingbell)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_jingbell);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x400);
/* sound hardware */
@@ -875,7 +875,7 @@ MACHINE_CONFIG_START(igs009_state::gp98)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_IO_MAP(gp98_portmap)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_gp98)
+ m_gfxdecode->set_info(gfx_gp98);
MCFG_VIDEO_START_OVERRIDE(igs009_state,gp98)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/igspoker.cpp b/src/mame/drivers/igspoker.cpp
index 2e8ff33ac9a..993dcd9c373 100644
--- a/src/mame/drivers/igspoker.cpp
+++ b/src/mame/drivers/igspoker.cpp
@@ -1943,7 +1943,7 @@ MACHINE_CONFIG_START(igspoker_state::igspoker)
MCFG_SCREEN_UPDATE_DRIVER(igspoker_state, screen_update_igs_video)
MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_igspoker)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_igspoker);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048);
/* sound hardware */
@@ -1970,6 +1970,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(igspoker_state::number10)
igspoker(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_IO_MAP(number10_io_map)
@@ -1985,9 +1986,10 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(igspoker_state::cpokerpk)
number10(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_IO_MAP(cpokerpk_io_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cpokerpk)
+ m_gfxdecode->set_info(gfx_cpokerpk);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ironhors.cpp b/src/mame/drivers/ironhors.cpp
index 3ff1379258e..0c39d8a1c4d 100644
--- a/src/mame/drivers/ironhors.cpp
+++ b/src/mame/drivers/ironhors.cpp
@@ -454,7 +454,7 @@ MACHINE_CONFIG_START(ironhors_state::farwest)
MCFG_DEVICE_PROGRAM_MAP(farwest_slave_map)
MCFG_DEVICE_REMOVE_ADDRESS_MAP(AS_IO)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_farwest)
+ m_gfxdecode->set_info(gfx_farwest);
MCFG_VIDEO_START_OVERRIDE(ironhors_state,farwest)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(ironhors_state, screen_update_farwest)
diff --git a/src/mame/drivers/jack.cpp b/src/mame/drivers/jack.cpp
index 5aaa0d113ad..3addd7185b3 100644
--- a/src/mame/drivers/jack.cpp
+++ b/src/mame/drivers/jack.cpp
@@ -931,8 +931,7 @@ MACHINE_CONFIG_START(jack_state::jack)
MCFG_SCREEN_UPDATE_DRIVER(jack_state, screen_update_jack)
MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_jack)
-
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_jack);
PALETTE(config, m_palette).set_format(palette_device::BGR_233_inverted, 32);
/* sound hardware */
@@ -994,7 +993,7 @@ MACHINE_CONFIG_START(jack_state::joinem)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(jack_state, screen_update_joinem)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_joinem)
+ m_gfxdecode->set_info(gfx_joinem);
PALETTE(config.replace(), m_palette, FUNC(jack_state::joinem_palette), 64);
diff --git a/src/mame/drivers/kingdrby.cpp b/src/mame/drivers/kingdrby.cpp
index b710cc0cb2b..b0e32ecf479 100644
--- a/src/mame/drivers/kingdrby.cpp
+++ b/src/mame/drivers/kingdrby.cpp
@@ -1053,7 +1053,7 @@ MACHINE_CONFIG_START(kingdrby_state::cowrace)
MCFG_DEVICE_PROGRAM_MAP(cowrace_sound_map)
MCFG_DEVICE_IO_MAP(cowrace_sound_io)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_cowrace)
+ m_gfxdecode->set_info(gfx_cowrace);
m_palette->set_init(FUNC(kingdrby_state::kingdrby_palette));
MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
diff --git a/src/mame/drivers/lasso.cpp b/src/mame/drivers/lasso.cpp
index cf307aab66f..1adaac2ab58 100644
--- a/src/mame/drivers/lasso.cpp
+++ b/src/mame/drivers/lasso.cpp
@@ -567,7 +567,7 @@ MACHINE_CONFIG_START(lasso_state::wwjgtin)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MCFG_SCREEN_UPDATE_DRIVER(lasso_state, screen_update_wwjgtin)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_wwjgtin) // Has 1 additional layer
+ m_gfxdecode->set_info(gfx_wwjgtin); // Has 1 additional layer
PALETTE(config, m_palette, FUNC(lasso_state::wwjgtin_palette), 0x40 + 16*16, 64);
MCFG_VIDEO_START_OVERRIDE(lasso_state,wwjgtin)
@@ -591,7 +591,7 @@ MACHINE_CONFIG_START(lasso_state::pinbo)
MCFG_DEVICE_IO_MAP(pinbo_audio_io_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_pinbo)
+ m_gfxdecode->set_info(gfx_pinbo);
PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256);
MCFG_VIDEO_START_OVERRIDE(lasso_state,pinbo)
diff --git a/src/mame/drivers/liberate.cpp b/src/mame/drivers/liberate.cpp
index e2c31f14e29..2452718fcd0 100644
--- a/src/mame/drivers/liberate.cpp
+++ b/src/mame/drivers/liberate.cpp
@@ -767,7 +767,7 @@ MACHINE_CONFIG_START(liberate_state::liberate_base)
MCFG_SCREEN_PALETTE(m_palette)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, liberate_state, deco16_interrupt))
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_liberate)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_liberate);
PALETTE(config, m_palette, FUNC(liberate_state::liberate_palette), 33);
MCFG_VIDEO_START_OVERRIDE(liberate_state,liberate)
@@ -823,7 +823,7 @@ MACHINE_CONFIG_START(liberate_state::prosoccr)
MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(liberate_state, screen_update_prosoccr)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_prosoccr)
+ m_gfxdecode->set_info(gfx_prosoccr);
MCFG_VIDEO_START_OVERRIDE(liberate_state,prosoccr)
MACHINE_CONFIG_END
@@ -854,7 +854,7 @@ MACHINE_CONFIG_START(liberate_state::prosport)
MCFG_SCREEN_PALETTE(m_palette)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, liberate_state, deco16_interrupt))
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_prosport)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_prosport);
PALETTE(config, m_palette).set_format(palette_device::BGR_233_inverted, 256);
MCFG_VIDEO_START_OVERRIDE(liberate_state,prosport)
diff --git a/src/mame/drivers/m62.cpp b/src/mame/drivers/m62.cpp
index 9c12b6e6ae1..08690cb65be 100644
--- a/src/mame/drivers/m62.cpp
+++ b/src/mame/drivers/m62.cpp
@@ -982,8 +982,8 @@ MACHINE_CONFIG_START(m62_state::ldrun)
MCFG_SCREEN_VISIBLE_AREA((64*8-384)/2, 64*8-(64*8-384)/2-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_ldrun)
- MCFG_DEVICE_ADD(m_spr_decode, GFXDECODE, m_spr_palette, gfx_m62_sprites)
- MCFG_DEVICE_ADD(m_chr_decode, GFXDECODE, m_chr_palette, gfx_m62_tiles)
+ GFXDECODE(config, m_spr_decode, m_spr_palette, gfx_m62_sprites);
+ GFXDECODE(config, m_chr_decode, m_chr_palette, gfx_m62_tiles);
PALETTE(config, m_chr_palette, FUNC(m62_state::m62_chr), 256);
PALETTE(config, m_spr_palette, FUNC(m62_state::m62_spr), 256);
@@ -1029,7 +1029,7 @@ MACHINE_CONFIG_START(m62_state::battroad)
MCFG_SCREEN_VISIBLE_AREA((64*8-256)/2, 64*8-(64*8-256)/2-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_battroad)
- MCFG_DEVICE_ADD(m_fg_decode, GFXDECODE, m_fg_palette, gfx_m62_fg_battroad)
+ GFXDECODE(config, m_fg_decode, m_fg_palette, gfx_m62_fg_battroad);
PALETTE(config, m_fg_palette, FUNC(m62_state::m62_battroad_fg), 32);
@@ -1089,9 +1089,8 @@ MACHINE_CONFIG_START(m62_state::lotlot)
MCFG_DEVICE_PROGRAM_MAP(lotlot_map)
/* video hardware */
-
- MCFG_DEVICE_ADD(m_fg_decode, GFXDECODE, m_fg_palette, gfx_m62_fg_lotlot)
- MCFG_GFXDECODE_MODIFY("chr_decode", gfx_m62_tiles_lotlot)
+ GFXDECODE(config, m_fg_decode, m_fg_palette, gfx_m62_fg_lotlot);
+ m_chr_decode->set_info(gfx_m62_tiles_lotlot);
PALETTE(config, m_fg_palette, FUNC(m62_state::m62_lotlot_fg), 256);
@@ -1111,7 +1110,7 @@ MACHINE_CONFIG_START(m62_state::kidniki)
MCFG_DEVICE_IO_MAP(kidniki_io_map)
/* video hardware */
- MCFG_DEVICE_ADD("fg_decode", GFXDECODE, "chr_palette", gfx_m62_fg_kidniki)
+ GFXDECODE(config, m_fg_decode, m_chr_palette, gfx_m62_fg_kidniki);
MCFG_VIDEO_START_OVERRIDE(m62_state,kidniki)
MCFG_SCREEN_MODIFY("screen")
@@ -1127,7 +1126,7 @@ MACHINE_CONFIG_START(m62_state::spelunkr)
MCFG_DEVICE_PROGRAM_MAP(spelunkr_map)
/* video hardware */
- MCFG_DEVICE_ADD("fg_decode", GFXDECODE, "chr_palette", gfx_m62_fg_spelunkr)
+ GFXDECODE(config, m_fg_decode, m_chr_palette, gfx_m62_fg_spelunkr);
MCFG_VIDEO_START_OVERRIDE(m62_state,spelunkr)
MCFG_SCREEN_MODIFY("screen")
@@ -1143,8 +1142,8 @@ MACHINE_CONFIG_START(m62_state::spelunk2)
MCFG_DEVICE_PROGRAM_MAP(spelunk2_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("chr_decode", gfx_m62_tiles_spelunk2)
- MCFG_DEVICE_ADD(m_fg_decode, GFXDECODE, m_chr_palette, gfx_m62_fg_spelunk2)
+ m_chr_decode->set_info(gfx_m62_tiles_spelunk2);
+ GFXDECODE(config, m_fg_decode, m_chr_palette, gfx_m62_fg_spelunk2);
m_chr_palette->set_entries(512);
m_chr_palette->set_init(FUNC(m62_state::spelunk2_palette));
@@ -1169,8 +1168,8 @@ MACHINE_CONFIG_START(m62_state::youjyudn)
MCFG_SCREEN_VISIBLE_AREA((64*8-256)/2, 64*8-(64*8-256)/2-1, 0*8, 32*8-1)
MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_youjyudn)
- MCFG_GFXDECODE_MODIFY("chr_decode", gfx_m62_tiles_youjyudn)
- MCFG_DEVICE_ADD("fg_decode", GFXDECODE, "chr_palette", gfx_m62_fg_youjyudn)
+ m_chr_decode->set_info(gfx_m62_tiles_youjyudn);
+ GFXDECODE(config, m_fg_decode, m_chr_palette, gfx_m62_fg_youjyudn);
MCFG_VIDEO_START_OVERRIDE(m62_state,youjyudn)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/marineb.cpp b/src/mame/drivers/marineb.cpp
index b1ac1423195..4462671bf5f 100644
--- a/src/mame/drivers/marineb.cpp
+++ b/src/mame/drivers/marineb.cpp
@@ -569,16 +569,14 @@ MACHINE_CONFIG_START(marineb_state::marineb)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(marineb_state::changes)
+void marineb_state::changes(machine_config &config)
+{
marineb(config);
- /* basic machine hardware */
-
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_changes)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(marineb_state, screen_update_changes)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_changes);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(marineb_state::screen_update_changes));
+}
void marineb_state::springer(machine_config &config)
@@ -592,16 +590,14 @@ void marineb_state::springer(machine_config &config)
}
-MACHINE_CONFIG_START(marineb_state::hoccer)
+void marineb_state::hoccer(machine_config &config)
+{
marineb(config);
- /* basic machine hardware */
-
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_hoccer)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(marineb_state, screen_update_hoccer)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_hoccer);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(marineb_state::screen_update_hoccer));
+}
MACHINE_CONFIG_START(marineb_state::wanted)
@@ -614,7 +610,7 @@ MACHINE_CONFIG_START(marineb_state::wanted)
m_outlatch->q_out_cb<0>().set(FUNC(marineb_state::irq_mask_w));
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_wanted)
+ m_gfxdecode->set_info(gfx_wanted);
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(marineb_state, screen_update_springer)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, marineb_state, wanted_vblank_irq))
@@ -626,16 +622,14 @@ MACHINE_CONFIG_START(marineb_state::wanted)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(marineb_state::hopprobo)
+void marineb_state::hopprobo(machine_config &config)
+{
marineb(config);
- /* basic machine hardware */
-
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_hopprobo)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(marineb_state, screen_update_hopprobo)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_hopprobo);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(marineb_state::screen_update_hopprobo));
+}
void marineb_state::bcruzm12(machine_config &config)
diff --git a/src/mame/drivers/mbee.cpp b/src/mame/drivers/mbee.cpp
index adc737303a1..bdca3e27910 100644
--- a/src/mame/drivers/mbee.cpp
+++ b/src/mame/drivers/mbee.cpp
@@ -666,7 +666,7 @@ MACHINE_CONFIG_START(mbee_state::mbee)
MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0, 19*16-1)
MCFG_SCREEN_UPDATE_DRIVER(mbee_state, screen_update_mbee)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_mono)
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_mono);
PALETTE(config, m_palette, FUNC(mbee_state::standard_palette), 100);
@@ -723,7 +723,7 @@ MACHINE_CONFIG_START(mbee_state::mbeeic)
MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 19*16-1)
MCFG_SCREEN_UPDATE_DRIVER(mbee_state, screen_update_mbee)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_standard)
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_standard);
PALETTE(config, m_palette, FUNC(mbee_state::standard_palette), 100);
@@ -765,11 +765,12 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(mbee_state::mbeeppc)
mbeeic(config);
+
MCFG_DEVICE_MODIFY( "maincpu" )
MCFG_DEVICE_PROGRAM_MAP(mbeeppc_mem)
MCFG_DEVICE_IO_MAP(mbeeppc_io)
MCFG_VIDEO_START_OVERRIDE(mbee_state, premium)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_premium)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_premium);
m_palette->set_init(FUNC(mbee_state::premium_palette));
MC146818(config, m_rtc, 32.768_kHz_XTAL);
diff --git a/src/mame/drivers/mcr3.cpp b/src/mame/drivers/mcr3.cpp
index 6e2d7191d51..a40a55a245e 100644
--- a/src/mame/drivers/mcr3.cpp
+++ b/src/mame/drivers/mcr3.cpp
@@ -104,7 +104,6 @@
#include "emu.h"
-#include "includes/mcr.h"
#include "includes/mcr3.h"
#include "machine/nvram.h"
@@ -1108,10 +1107,10 @@ MACHINE_CONFIG_START(mcr3_state::mcrmono)
MCFG_SCREEN_SIZE(32*16, 30*16)
MCFG_SCREEN_VISIBLE_AREA(0*16, 32*16-1, 0*16, 30*16-1)
MCFG_SCREEN_UPDATE_DRIVER(mcr3_state, screen_update_mcr3)
- MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_PALETTE(m_palette)
- GFXDECODE(config, "gfxdecode", "palette", gfx_mcr3);
- PALETTE(config, "palette").set_entries(64);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_mcr3);
+ PALETTE(config, m_palette).set_entries(64);
MACHINE_CONFIG_END
@@ -1171,7 +1170,7 @@ MACHINE_CONFIG_START(mcr3_state::mcrscroll)
MCFG_SCREEN_SIZE(30*16, 30*16)
MCFG_SCREEN_VISIBLE_AREA(0, 30*16-1, 0, 30*16-1)
MCFG_SCREEN_UPDATE_DRIVER(mcr3_state, screen_update_spyhunt)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_spyhunt)
+ m_gfxdecode->set_info(gfx_spyhunt);
subdevice<palette_device>("palette")->set_entries(64 + 4).set_init(FUNC(mcr3_state::spyhunt_palette));
MCFG_VIDEO_START_OVERRIDE(mcr3_state,spyhunt)
diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp
index d6a7c70cfda..a3ad9daf15d 100644
--- a/src/mame/drivers/megadriv.cpp
+++ b/src/mame/drivers/megadriv.cpp
@@ -753,8 +753,8 @@ MACHINE_CONFIG_START(md_cons_state::genesis_scd)
MCFG_SCREEN_MODIFY("megadriv")
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
- MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_US, 0)
- MCFG_GFX_PALETTE("gen_vdp:palette")
+ SEGA_SEGACD_US(config, m_segacd, 0);
+ m_segacd->set_palette("gen_vdp:palette");
MCFG_CDROM_ADD( "cdrom" )
MCFG_CDROM_INTERFACE("scd_cdrom")
@@ -771,8 +771,8 @@ MACHINE_CONFIG_START(md_cons_state::md_scd)
MCFG_SCREEN_MODIFY("megadriv")
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
- MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_EUROPE, 0)
- MCFG_GFX_PALETTE("gen_vdp:palette")
+ SEGA_SEGACD_EUROPE(config, m_segacd, 0);
+ m_segacd->set_palette("gen_vdp:palette");
MCFG_CDROM_ADD( "cdrom" )
MCFG_CDROM_INTERFACE("scd_cdrom")
@@ -789,8 +789,8 @@ MACHINE_CONFIG_START(md_cons_state::mdj_scd)
MCFG_SCREEN_MODIFY("megadriv")
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, md_cons_state, screen_vblank_console))
- MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_JAPAN, 0)
- MCFG_GFX_PALETTE("gen_vdp:palette")
+ SEGA_SEGACD_JAPAN(config, m_segacd, 0);
+ m_segacd->set_palette("gen_vdp:palette");
MCFG_CDROM_ADD( "cdrom" )
MCFG_CDROM_INTERFACE("scd_cdrom")
@@ -803,8 +803,8 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(md_cons_state::genesis_32x_scd)
genesis_32x(config);
- MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_US, 0)
- MCFG_GFX_PALETTE("gen_vdp:palette")
+ SEGA_SEGACD_US(config, m_segacd, 0);
+ m_segacd->set_palette("gen_vdp:palette");
MCFG_CDROM_ADD( "cdrom" )
MCFG_CDROM_INTERFACE("scd_cdrom")
@@ -823,8 +823,8 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(md_cons_state::md_32x_scd)
md_32x(config);
- MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_EUROPE, 0)
- MCFG_GFX_PALETTE("gen_vdp:palette")
+ SEGA_SEGACD_EUROPE(config, m_segacd, 0);
+ m_segacd->set_palette("gen_vdp:palette");
MCFG_CDROM_ADD( "cdrom" )
MCFG_CDROM_INTERFACE("scd_cdrom")
@@ -843,8 +843,8 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(md_cons_state::mdj_32x_scd)
mdj_32x(config);
- MCFG_DEVICE_ADD("segacd", SEGA_SEGACD_JAPAN, 0)
- MCFG_GFX_PALETTE("gen_vdp:palette")
+ SEGA_SEGACD_JAPAN(config, m_segacd, 0);
+ m_segacd->set_palette("gen_vdp:palette");
MCFG_CDROM_ADD( "cdrom" )
MCFG_CDROM_INTERFACE("scd_cdrom")
diff --git a/src/mame/drivers/ms32.cpp b/src/mame/drivers/ms32.cpp
index 582a0457c85..b25f282b41d 100644
--- a/src/mame/drivers/ms32.cpp
+++ b/src/mame/drivers/ms32.cpp
@@ -1723,8 +1723,8 @@ MACHINE_CONFIG_START(ms32_state::ms32)
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
MCFG_SCREEN_UPDATE_DRIVER(ms32_state, screen_update_ms32)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ms32)
- MCFG_PALETTE_ADD("palette", 0x10000)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_ms32);
+ PALETTE(config, m_palette).set_entries(0x10000);
/* sound hardware */
@@ -1748,7 +1748,7 @@ MACHINE_CONFIG_START(ms32_state::f1superb)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(f1superb_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_f1superb)
+ m_gfxdecode->set_info(gfx_f1superb);
MCFG_VIDEO_START_OVERRIDE(ms32_state,f1superb)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/mz700.cpp b/src/mame/drivers/mz700.cpp
index 4affb3ddcee..c7b8c520c32 100644
--- a/src/mame/drivers/mz700.cpp
+++ b/src/mame/drivers/mz700.cpp
@@ -387,9 +387,9 @@ MACHINE_CONFIG_START(mz_state::mz700)
MCFG_SCREEN_RAW_PARAMS(XTAL(17'734'470)/2, 568, 0, 40*8, 312, 0, 25*8)
MCFG_SCREEN_UPDATE_DRIVER(mz_state, screen_update_mz700)
MCFG_SCREEN_PALETTE(m_palette)
- PALETTE(config, m_palette, palette_device::RGB_3BIT);
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mz700)
+ PALETTE(config, m_palette, palette_device::RGB_3BIT);
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_mz700);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -441,7 +441,7 @@ MACHINE_CONFIG_START(mz_state::mz800)
ADDRESS_MAP_BANK(config, "bankf").set_map(&mz_state::mz800_bankf).set_options(ENDIANNESS_LITTLE, 8, 16, 0x2000);
MCFG_MACHINE_RESET_OVERRIDE(mz_state, mz800)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_mz800)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_mz800);
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(mz_state, screen_update_mz800)
diff --git a/src/mame/drivers/mz80.cpp b/src/mame/drivers/mz80.cpp
index 78a4aaeaba7..78d00a062b7 100644
--- a/src/mame/drivers/mz80.cpp
+++ b/src/mame/drivers/mz80.cpp
@@ -294,7 +294,7 @@ MACHINE_CONFIG_START(mz80_state::mz80k)
MCFG_SCREEN_UPDATE_DRIVER(mz80_state, screen_update_mz80k)
MCFG_SCREEN_PALETTE("palette")
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_mz80k)
+ GFXDECODE(config, "gfxdecode", "palette", gfx_mz80k);
PALETTE(config, "palette", palette_device::MONOCHROME);
/* Audio */
@@ -323,18 +323,20 @@ MACHINE_CONFIG_START(mz80_state::mz80k)
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(mz80_state::mz80kj)
+void mz80_state::mz80kj(machine_config &config)
+{
mz80k(config);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(mz80_state, screen_update_mz80kj)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_mz80kj)
-MACHINE_CONFIG_END
-MACHINE_CONFIG_START(mz80_state::mz80a)
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(mz80_state::screen_update_mz80kj));
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_mz80kj);
+}
+
+void mz80_state::mz80a(machine_config &config)
+{
mz80k(config);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(mz80_state, screen_update_mz80a)
-MACHINE_CONFIG_END
+
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(mz80_state::screen_update_mz80a));
+}
ROM_START( mz80k )
diff --git a/src/mame/drivers/nakajies.cpp b/src/mame/drivers/nakajies.cpp
index e6b91e59e4c..3066db4fdeb 100644
--- a/src/mame/drivers/nakajies.cpp
+++ b/src/mame/drivers/nakajies.cpp
@@ -775,22 +775,24 @@ MACHINE_CONFIG_START(nakajies_state::nakajies210)
MCFG_TIMER_DRIVER_ADD_PERIODIC("kb_timer", nakajies_state, kb_timer, attotime::from_hz(250))
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(nakajies_state::dator3k)
+void nakajies_state::dator3k(machine_config &config)
+{
nakajies210(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_dator3k)
-MACHINE_CONFIG_END
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_dator3k);
+}
-MACHINE_CONFIG_START(nakajies_state::nakajies220)
+void nakajies_state::nakajies220(machine_config &config)
+{
nakajies210(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_drwrt400)
-MACHINE_CONFIG_END
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_drwrt400);
+}
MACHINE_CONFIG_START(nakajies_state::nakajies250)
nakajies210(config);
MCFG_SCREEN_MODIFY( "screen" )
MCFG_SCREEN_SIZE( 80 * 6, 16 * 8 )
MCFG_SCREEN_VISIBLE_AREA( 0, 6 * 80 - 1, 0, 16 * 8 - 1 )
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_drwrt200)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_drwrt200);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pacman.cpp b/src/mame/drivers/pacman.cpp
index a7f551473d0..fe318404144 100644
--- a/src/mame/drivers/pacman.cpp
+++ b/src/mame/drivers/pacman.cpp
@@ -3787,7 +3787,7 @@ MACHINE_CONFIG_START(pacman_state::s2650games)
m_mainlatch->q_out_cb<6>().set_nop();
m_mainlatch->q_out_cb<7>().set(FUNC(pacman_state::coin_counter_w));
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_s2650games)
+ m_gfxdecode->set_info(gfx_s2650games);
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_SIZE(32*8, 32*8)
@@ -3869,16 +3869,17 @@ MACHINE_CONFIG_START(pacman_state::superabc)
MCFG_MACHINE_RESET_OVERRIDE(pacman_state,superabc)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_superabc)
+ m_gfxdecode->set_info(gfx_superabc);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(pacman_state::crush4)
+void pacman_state::crush4(machine_config &config)
+{
mschamp(config);
/* basic machine hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_crush4)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_crush4);
+}
MACHINE_CONFIG_START(pacman_state::crushs)
pacman(config);
diff --git a/src/mame/drivers/paradise.cpp b/src/mame/drivers/paradise.cpp
index 0db6858a5d7..bf93a4dd828 100644
--- a/src/mame/drivers/paradise.cpp
+++ b/src/mame/drivers/paradise.cpp
@@ -741,7 +741,7 @@ MACHINE_CONFIG_START(paradise_state::paradise)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_ADD(m_screen, RASTER)
MCFG_SCREEN_REFRESH_RATE(54) /* 54 verified */
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */ /* we're using PORT_VBLANK */)
MCFG_SCREEN_SIZE(256, 256)
@@ -779,21 +779,20 @@ MACHINE_CONFIG_START(paradise_state::torus)
MCFG_DEVICE_PROGRAM_MAP(torus_map)
MCFG_DEVICE_IO_MAP(torus_io_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_torus)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(paradise_state, screen_update_torus)
+ m_gfxdecode->set_info(gfx_torus);
+ m_screen->set_screen_update(FUNC(paradise_state::screen_update_torus));
- MCFG_DEVICE_REMOVE("oki2")
+ config.device_remove("oki2");
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(paradise_state::madball)
+void paradise_state::madball(machine_config &config)
+{
torus(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_madball)
+ m_gfxdecode->set_info(gfx_madball);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(paradise_state, screen_update_madball)
-MACHINE_CONFIG_END
+ m_screen->set_screen_update(FUNC(paradise_state::screen_update_madball));
+}
MACHINE_CONFIG_START(paradise_state::penky)
paradise(config);
@@ -805,13 +804,14 @@ MACHINE_CONFIG_START(paradise_state::penky)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(paradise_state::penkyi)
+void paradise_state::penkyi(machine_config &config)
+{
penky(config);
// TODO add ticket dispenser
- MCFG_DEVICE_REMOVE("oki2")
-MACHINE_CONFIG_END
+ config.device_remove("oki2");
+}
/***************************************************************************
diff --git a/src/mame/drivers/pc6001.cpp b/src/mame/drivers/pc6001.cpp
index 8ce0970755b..47d35daf5cf 100644
--- a/src/mame/drivers/pc6001.cpp
+++ b/src/mame/drivers/pc6001.cpp
@@ -1549,7 +1549,7 @@ MACHINE_CONFIG_START(pc6001mk2_state::pc6001mk2)
m_palette->set_entries(16+16);
m_palette->set_init(FUNC(pc6001mk2_state::pc6001mk2_palette));
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_pc6001m2)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_pc6001m2);
MCFG_DEVICE_ADD("upd7752", UPD7752, PC6001_MAIN_CLOCK/4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
diff --git a/src/mame/drivers/pentagon.cpp b/src/mame/drivers/pentagon.cpp
index 82c56cac504..bd38a1deb7a 100644
--- a/src/mame/drivers/pentagon.cpp
+++ b/src/mame/drivers/pentagon.cpp
@@ -292,7 +292,7 @@ MACHINE_CONFIG_START(pentagon_state::pentagon)
MCFG_VIDEO_START_OVERRIDE(pentagon_state, pentagon )
BETA_DISK(config, m_beta, 0);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_pentagon)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_pentagon);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
@@ -303,7 +303,7 @@ MACHINE_CONFIG_START(pentagon_state::pentagon)
ay8912.add_route(1, "rspeaker", 0.25);
ay8912.add_route(2, "rspeaker", 0.50);
- MCFG_DEVICE_REMOVE("exp")
+ config.device_remove("exp");
MCFG_SOFTWARE_LIST_ADD("cass_list_pen","pentagon_cass")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/punchout.cpp b/src/mame/drivers/punchout.cpp
index 344dd66a340..aeb98cd8d66 100644
--- a/src/mame/drivers/punchout.cpp
+++ b/src/mame/drivers/punchout.cpp
@@ -645,8 +645,8 @@ MACHINE_CONFIG_START(punchout_state::punchout)
mainlatch.q_out_cb<7>().set_nop(); // enable NVRAM?
/* video hardware */
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_punchout)
- MCFG_PALETTE_ADD("palette", 0x200)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_punchout);
+ PALETTE(config, m_palette).set_entries(0x200);
config.set_default_layout(layout_dualhovu);
screen_device &top(SCREEN(config, "top", SCREEN_TYPE_RASTER));
@@ -704,7 +704,7 @@ MACHINE_CONFIG_START(punchout_state::armwrest)
MCFG_DEVICE_PROGRAM_MAP(armwrest_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_armwrest)
+ m_gfxdecode->set_info(gfx_armwrest);
MCFG_VIDEO_START_OVERRIDE(punchout_state, armwrest)
MCFG_SCREEN_MODIFY("top")
diff --git a/src/mame/drivers/pyl601.cpp b/src/mame/drivers/pyl601.cpp
index 13c06294886..5481ad7a8f1 100644
--- a/src/mame/drivers/pyl601.cpp
+++ b/src/mame/drivers/pyl601.cpp
@@ -546,7 +546,7 @@ GFXDECODE_END
MACHINE_CONFIG_START(pyl601_state::pyl601)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",M6800, XTAL(1'000'000))
+ MCFG_DEVICE_ADD(m_maincpu, M6800, 1_MHz_XTAL)
MCFG_DEVICE_PROGRAM_MAP(pyl601_mem)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", pyl601_state, pyl601_interrupt)
@@ -557,16 +557,15 @@ MACHINE_CONFIG_START(pyl601_state::pyl601)
MCFG_SCREEN_SIZE(640, 200)
MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 200 - 1)
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_pyl601)
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_pyl601);
PALETTE(config, m_palette, palette_device::MONOCHROME);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
/* Devices */
- mc6845_device &crtc(MC6845(config, "crtc", XTAL(2'000'000)));
+ mc6845_device &crtc(MC6845(config, "crtc", 2_MHz_XTAL));
crtc.set_screen("screen");
crtc.set_show_border_area(false);
crtc.set_char_width(8); /* ? */
@@ -581,15 +580,16 @@ MACHINE_CONFIG_START(pyl601_state::pyl601)
RAM(config, RAM_TAG).set_default_size("576K"); // 64 + 512
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(pyl601_state::pyl601a)
+void pyl601_state::pyl601a(machine_config &config)
+{
pyl601(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK( XTAL(2'000'000))
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_pyl601a)
+ m_maincpu->set_clock(2_MHz_XTAL);
+
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_pyl601a);
subdevice<mc6845_device>("crtc")->set_update_row_callback(FUNC(pyl601_state::pyl601a_update_row), this);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( pyl601 )
diff --git a/src/mame/drivers/realbrk.cpp b/src/mame/drivers/realbrk.cpp
index 464402e08dc..023963328dd 100644
--- a/src/mame/drivers/realbrk.cpp
+++ b/src/mame/drivers/realbrk.cpp
@@ -779,7 +779,7 @@ MACHINE_CONFIG_START(realbrk_state::realbrk)
m_tmp68301->out_parallel_callback().set(FUNC(realbrk_state::realbrk_flipscreen_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_ADD(m_screen, RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(0x140, 0xe0)
@@ -788,7 +788,7 @@ MACHINE_CONFIG_START(realbrk_state::realbrk)
MCFG_SCREEN_PALETTE(m_palette)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, realbrk_state, vblank_irq))
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_realbrk)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_realbrk);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x8000);
/* sound hardware */
@@ -806,6 +806,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(realbrk_state::pkgnsh)
realbrk(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(pkgnsh_mem)
@@ -814,18 +815,19 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(realbrk_state::pkgnshdx)
pkgnsh(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(pkgnshdx_mem)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(realbrk_state::dai2kaku)
realbrk(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(dai2kaku_mem)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_dai2kaku)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(realbrk_state, screen_update_dai2kaku)
+ m_gfxdecode->set_info(gfx_dai2kaku);
+ m_screen->set_screen_update(FUNC(realbrk_state::screen_update_dai2kaku));
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/scorpion.cpp b/src/mame/drivers/scorpion.cpp
index 4fb403cbeb1..4aab54a3b56 100644
--- a/src/mame/drivers/scorpion.cpp
+++ b/src/mame/drivers/scorpion.cpp
@@ -294,6 +294,7 @@ GFXDECODE_END
MACHINE_CONFIG_START(scorpion_state::scorpion)
spectrum_128(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(scorpion_mem)
MCFG_DEVICE_IO_MAP(scorpion_io)
@@ -301,7 +302,7 @@ MACHINE_CONFIG_START(scorpion_state::scorpion)
MCFG_MACHINE_START_OVERRIDE(scorpion_state, scorpion )
MCFG_MACHINE_RESET_OVERRIDE(scorpion_state, scorpion )
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_scorpion)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_scorpion);
BETA_DISK(config, m_beta, 0);
@@ -310,18 +311,20 @@ MACHINE_CONFIG_START(scorpion_state::scorpion)
MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", scorpion_state, nmi_check_callback, attotime::from_hz(50))
- MCFG_DEVICE_REMOVE("exp")
+ config.device_remove("exp");
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(scorpion_state::profi)
+void scorpion_state::profi(machine_config &config)
+{
scorpion(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_profi)
-MACHINE_CONFIG_END
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_profi);
+}
-MACHINE_CONFIG_START(scorpion_state::quorum)
+void scorpion_state::quorum(machine_config &config)
+{
scorpion(config);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_quorum)
-MACHINE_CONFIG_END
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_quorum);
+}
diff --git a/src/mame/drivers/scramble.cpp b/src/mame/drivers/scramble.cpp
index ef27e13b754..de587f7de68 100644
--- a/src/mame/drivers/scramble.cpp
+++ b/src/mame/drivers/scramble.cpp
@@ -1388,7 +1388,7 @@ MACHINE_CONFIG_START(scramble_state::devilfsh)
MCFG_DEVICE_PROGRAM_MAP(mars_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_devilfsh)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_devilfsh);
m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
MACHINE_CONFIG_END
@@ -1402,7 +1402,7 @@ MACHINE_CONFIG_START(scramble_state::newsin7)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", scramble_state, irq0_line_hold) // newsin7a has a corrupt opcode at 0x67, the irq routine instead of NMI avoids it by jumping to 0x68 after doing some other things, probably intentional. newsin7 has this fixed, maybe a bootleg?
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_newsin7)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_newsin7);
m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
MCFG_VIDEO_START_OVERRIDE(scramble_state,newsin7)
@@ -1424,12 +1424,13 @@ MACHINE_CONFIG_START(scramble_state::mrkougb)
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(scramble_state::mrkougar)
+void scramble_state::mrkougar(machine_config &config)
+{
mrkougb(config);
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_mrkougar)
-MACHINE_CONFIG_END
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_mrkougar);
+}
MACHINE_CONFIG_START(scramble_state::ckongs)
scramble(config);
diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp
index a1e7523efb5..1526aafafef 100644
--- a/src/mame/drivers/seta2.cpp
+++ b/src/mame/drivers/seta2.cpp
@@ -2465,7 +2465,7 @@ MACHINE_CONFIG_START(staraudi_state::staraudi)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
MCFG_SCREEN_VISIBLE_AREA(0x00, 0x140-1, 0x000, 0x0f0-1)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_seta2)
+ m_gfxdecode->set_info(gfx_seta2);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/shangkid.cpp b/src/mame/drivers/shangkid.cpp
index 8cbb3abc4cc..e87d840ef4c 100644
--- a/src/mame/drivers/shangkid.cpp
+++ b/src/mame/drivers/shangkid.cpp
@@ -450,7 +450,7 @@ MACHINE_CONFIG_START(shangkid_state::shangkid)
MCFG_MACHINE_RESET_OVERRIDE(shangkid_state,shangkid)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_shangkid)
+ m_gfxdecode->set_info(gfx_shangkid);
m_aysnd->port_a_write_callback().set(FUNC(shangkid_state::shangkid_ay8910_porta_w));
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp
index 0bbceeabed6..9da28fad07b 100644
--- a/src/mame/drivers/skylncr.cpp
+++ b/src/mame/drivers/skylncr.cpp
@@ -1677,8 +1677,8 @@ MACHINE_CONFIG_START(skylncr_state::skylncr)
MCFG_SCREEN_UPDATE_DRIVER(skylncr_state, screen_update_skylncr)
MCFG_SCREEN_PALETTE("palette")
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_skylncr)
- MCFG_PALETTE_ADD("palette", 0x200)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_skylncr);
+ PALETTE(config, m_palette).set_entries(0x200);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette));
ramdac.set_addrmap(0, &skylncr_state::ramdac_map);
@@ -1705,22 +1705,20 @@ MACHINE_CONFIG_START(skylncr_state::mbutrfly)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(skylncr_state::neraidou)
+void skylncr_state::neraidou(machine_config &config)
+{
skylncr(config);
- /* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_neraidou)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_neraidou);
+}
-MACHINE_CONFIG_START(skylncr_state::sstar97)
+void skylncr_state::sstar97(machine_config &config)
+{
skylncr(config);
- /* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_sstar97)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_sstar97);
+}
MACHINE_CONFIG_START(skylncr_state::bdream97)
@@ -1730,7 +1728,7 @@ MACHINE_CONFIG_START(skylncr_state::bdream97)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_OPCODES_MAP(bdream97_opcode_map)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_bdream97)
+ m_gfxdecode->set_info(gfx_bdream97);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/snk6502.cpp b/src/mame/drivers/snk6502.cpp
index cb6d6b296d2..0e6504de149 100644
--- a/src/mame/drivers/snk6502.cpp
+++ b/src/mame/drivers/snk6502.cpp
@@ -844,7 +844,7 @@ MACHINE_CONFIG_START(snk6502_state::satansat)
MCFG_DEVICE_PROGRAM_MAP(satansat_map)
// video hardware
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_satansat)
+ m_gfxdecode->set_info(gfx_satansat);
// sound hardware
MCFG_DEVICE_REPLACE("snk6502", SATANSAT_SOUND, 0)
diff --git a/src/mame/drivers/spec128.cpp b/src/mame/drivers/spec128.cpp
index de427ad095c..1b54426da55 100644
--- a/src/mame/drivers/spec128.cpp
+++ b/src/mame/drivers/spec128.cpp
@@ -314,7 +314,7 @@ MACHINE_CONFIG_START(spectrum_state::spectrum_128)
MCFG_SCREEN_RAW_PARAMS(X1_128_SINCLAIR / 2.5f, 456, 0, 352, 311, 0, 296)
MCFG_VIDEO_START_OVERRIDE(spectrum_state, spectrum_128 )
- MCFG_GFXDECODE_MODIFY("gfxdecode", spec128)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(spec128);
/* sound hardware */
AY8912(config, "ay8912", X1_128_SINCLAIR / 10).add_route(ALL_OUTPUTS, "mono", 0.25);
diff --git a/src/mame/drivers/specpls3.cpp b/src/mame/drivers/specpls3.cpp
index deee57e2cec..9245a147bab 100644
--- a/src/mame/drivers/specpls3.cpp
+++ b/src/mame/drivers/specpls3.cpp
@@ -380,12 +380,14 @@ GFXDECODE_END
MACHINE_CONFIG_START(spectrum_state::spectrum_plus3)
spectrum_128(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(spectrum_plus3_mem)
MCFG_DEVICE_IO_MAP(spectrum_plus3_io)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_REFRESH_RATE(50.01)
- MCFG_GFXDECODE_MODIFY("gfxdecode", specpls3)
+
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(specpls3);
MCFG_MACHINE_RESET_OVERRIDE(spectrum_state, spectrum_plus3 )
diff --git a/src/mame/drivers/ssingles.cpp b/src/mame/drivers/ssingles.cpp
index ec22d683741..e39887b2e8b 100644
--- a/src/mame/drivers/ssingles.cpp
+++ b/src/mame/drivers/ssingles.cpp
@@ -161,8 +161,9 @@ class ssingles_state : public driver_device
{
public:
ssingles_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu") { }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ { }
void ssingles(machine_config &config);
void atamanot(machine_config &config);
@@ -171,6 +172,9 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(controls_r);
+protected:
+ virtual void video_start() override;
+
private:
uint8_t m_videoram[VMEM_SIZE];
uint8_t m_colorram[VMEM_SIZE];
@@ -178,6 +182,9 @@ private:
pen_t m_pens[NUM_PENS];
uint8_t m_atamanot_prot_state;
+
+ required_device<cpu_device> m_maincpu;
+
DECLARE_WRITE8_MEMBER(ssingles_videoram_w);
DECLARE_WRITE8_MEMBER(ssingles_colorram_w);
DECLARE_READ8_MEMBER(c000_r);
@@ -186,11 +193,10 @@ private:
DECLARE_READ8_MEMBER(atamanot_prot_r);
DECLARE_WRITE8_MEMBER(atamanot_prot_w);
- virtual void video_start() override;
DECLARE_WRITE_LINE_MEMBER(atamanot_irq);
MC6845_UPDATE_ROW(ssingles_update_row);
MC6845_UPDATE_ROW(atamanot_update_row);
- required_device<cpu_device> m_maincpu;
+
void atamanot_io_map(address_map &map);
void atamanot_map(address_map &map);
void ssingles_io_map(address_map &map);
@@ -198,16 +204,16 @@ private:
};
//fake palette
-static const uint8_t ssingles_colors[NUM_PENS*3]=
+static constexpr rgb_t ssingles_colors[NUM_PENS] =
{
- 0x00,0x00,0x00, 0xff,0xff,0xff, 0xff,0x00,0x00, 0x80,0x00,0x00,
- 0x00,0x00,0x00, 0xf0,0xf0,0xf0, 0xff,0xff,0x00, 0x40,0x40,0x40,
- 0x00,0x00,0x00, 0xff,0xff,0xff, 0xff,0x00,0x00, 0xff,0xff,0x00,
- 0x00,0x00,0x00, 0xff,0xff,0x00, 0xd0,0x00,0x00, 0x80,0x00,0x00,
- 0x00,0x00,0x00, 0xff,0x00,0x00, 0xff,0xff,0x00, 0x80,0x80,0x00,
- 0x00,0x00,0x00, 0xff,0x00,0x00, 0x40,0x40,0x40, 0xd0,0xd0,0xd0,
- 0x00,0x00,0x00, 0x00,0x00,0xff, 0x60,0x40,0x30, 0xff,0xff,0x00,
- 0x00,0x00,0x00, 0xff,0x00,0xff, 0x80,0x00,0x80, 0x40,0x00,0x40
+ { 0x00,0x00,0x00 }, { 0xff,0xff,0xff }, { 0xff,0x00,0x00 }, { 0x80,0x00,0x00 },
+ { 0x00,0x00,0x00 }, { 0xf0,0xf0,0xf0 }, { 0xff,0xff,0x00 }, { 0x40,0x40,0x40 },
+ { 0x00,0x00,0x00 }, { 0xff,0xff,0xff }, { 0xff,0x00,0x00 }, { 0xff,0xff,0x00 },
+ { 0x00,0x00,0x00 }, { 0xff,0xff,0x00 }, { 0xd0,0x00,0x00 }, { 0x80,0x00,0x00 },
+ { 0x00,0x00,0x00 }, { 0xff,0x00,0x00 }, { 0xff,0xff,0x00 }, { 0x80,0x80,0x00 },
+ { 0x00,0x00,0x00 }, { 0xff,0x00,0x00 }, { 0x40,0x40,0x40 }, { 0xd0,0xd0,0xd0 },
+ { 0x00,0x00,0x00 }, { 0x00,0x00,0xff }, { 0x60,0x40,0x30 }, { 0xff,0xff,0x00 },
+ { 0x00,0x00,0x00 }, { 0xff,0x00,0xff }, { 0x80,0x00,0x80 }, { 0x40,0x00,0x40 }
};
MC6845_UPDATE_ROW( ssingles_state::ssingles_update_row )
@@ -300,13 +306,8 @@ WRITE8_MEMBER(ssingles_state::ssingles_colorram_w)
void ssingles_state::video_start()
{
- {
- int i;
- for(i=0;i<NUM_PENS;++i)
- {
- m_pens[i]=rgb_t(ssingles_colors[3*i], ssingles_colors[3*i+1], ssingles_colors[3*i+2]);
- }
- }
+ for (int i=0; i<NUM_PENS; ++i)
+ m_pens[i] = ssingles_colors[i];
}
@@ -562,9 +563,9 @@ MACHINE_CONFIG_START(ssingles_state::ssingles)
MCFG_SCREEN_RAW_PARAMS(4000000, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */
MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_PALETTE_ADD("palette", 4) //guess
+ PALETTE(config, "palette").set_entries(4); //guess
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ssingles)
+ GFXDECODE(config, "gfxdecode", "palette", gfx_ssingles);
mc6845_device &crtc(MC6845(config, "crtc", 1000000 /* ? MHz */));
crtc.set_screen("screen");
@@ -589,6 +590,7 @@ WRITE_LINE_MEMBER(ssingles_state::atamanot_irq)
MACHINE_CONFIG_START(ssingles_state::atamanot)
ssingles(config);
+
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(atamanot_map)
MCFG_DEVICE_IO_MAP(atamanot_io_map)
@@ -597,7 +599,7 @@ MACHINE_CONFIG_START(ssingles_state::atamanot)
crtc.set_update_row_callback(FUNC(ssingles_state::atamanot_update_row), this);
crtc.out_vsync_callback().set(FUNC(ssingles_state::atamanot_irq));
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_atamanot)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_atamanot);
MACHINE_CONFIG_END
ROM_START( ssingles )
diff --git a/src/mame/drivers/statriv2.cpp b/src/mame/drivers/statriv2.cpp
index 286765200a4..d93d7ee5524 100644
--- a/src/mame/drivers/statriv2.cpp
+++ b/src/mame/drivers/statriv2.cpp
@@ -650,7 +650,7 @@ MACHINE_CONFIG_START(statriv2_state::statriv2v)
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 392, 0, 256, 262, 0, 256)
MCFG_VIDEO_START_OVERRIDE(statriv2_state, vertical)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_vertical)
+ m_gfxdecode->set_info(gfx_vertical);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(statriv2_state::funcsino)
diff --git a/src/mame/drivers/thepit.cpp b/src/mame/drivers/thepit.cpp
index 1b883cf0b78..0e90466fbad 100644
--- a/src/mame/drivers/thepit.cpp
+++ b/src/mame/drivers/thepit.cpp
@@ -774,7 +774,7 @@ MACHINE_CONFIG_START(thepit_state::desertdn)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(thepit_state, screen_update_desertdan)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_intrepid)
+ m_gfxdecode->set_info(gfx_intrepid);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(thepit_state::intrepid)
@@ -787,19 +787,18 @@ MACHINE_CONFIG_START(thepit_state::intrepid)
m_mainlatch->q_out_cb<5>().set(FUNC(thepit_state::intrepid_graphics_bank_w));
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_intrepid)
+ m_gfxdecode->set_info(gfx_intrepid);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(thepit_state::suprmous)
+void thepit_state::suprmous(machine_config &config)
+{
intrepid(config);
- /* basic machine hardware */
-
/* video hardware */
m_palette->set_init(FUNC(thepit_state::suprmous_palette));
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_suprmous)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_suprmous);
+}
diff --git a/src/mame/drivers/tiamc1.cpp b/src/mame/drivers/tiamc1.cpp
index 0638e152925..254b127ac1c 100644
--- a/src/mame/drivers/tiamc1.cpp
+++ b/src/mame/drivers/tiamc1.cpp
@@ -366,11 +366,10 @@ MACHINE_CONFIG_START(tiamc1_state::kot)
MCFG_VIDEO_START_OVERRIDE(tiamc1_state, kot)
MCFG_SCREEN_UPDATE_DRIVER(tiamc1_state, screen_update_kot)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_kot)
+ m_gfxdecode->set_info(gfx_kot);
- MCFG_DEVICE_REMOVE("2x8253")
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ config.device_remove("2x8253");
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
pit8253_device &pit8253(PIT8253(config, "pit8253", 0));
pit8253.set_clk<0>(PIXEL_CLOCK / 4);
diff --git a/src/mame/drivers/timex.cpp b/src/mame/drivers/timex.cpp
index 18386314adb..3116b458264 100644
--- a/src/mame/drivers/timex.cpp
+++ b/src/mame/drivers/timex.cpp
@@ -694,6 +694,7 @@ GFXDECODE_END
MACHINE_CONFIG_START(spectrum_state::ts2068)
spectrum_128(config);
+
MCFG_DEVICE_REPLACE("maincpu", Z80, XTAL(14'112'000)/4) /* From Schematic; 3.528 MHz */
MCFG_DEVICE_PROGRAM_MAP(ts2068_mem)
MCFG_DEVICE_IO_MAP(ts2068_io)
@@ -710,7 +711,7 @@ MACHINE_CONFIG_START(spectrum_state::ts2068)
MCFG_SCREEN_UPDATE_DRIVER(spectrum_state, screen_update_ts2068)
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, spectrum_state, screen_vblank_timex))
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_ts2068)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_ts2068);
MCFG_VIDEO_START_OVERRIDE(spectrum_state, ts2068 )
diff --git a/src/mame/drivers/travrusa.cpp b/src/mame/drivers/travrusa.cpp
index 2e45691afa2..9dbe6af5b38 100644
--- a/src/mame/drivers/travrusa.cpp
+++ b/src/mame/drivers/travrusa.cpp
@@ -323,30 +323,30 @@ MACHINE_CONFIG_START(travrusa_state::travrusa)
MCFG_SCREEN_UPDATE_DRIVER(travrusa_state, screen_update_travrusa)
MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD(m_gfxdecode, GFXDECODE, m_palette, gfx_travrusa)
-
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_travrusa);
PALETTE(config, m_palette, FUNC(travrusa_state::travrusa_palette), 16*8+16*8, 128+16);
/* sound hardware */
//m52_sound_c_audio(config);
- MCFG_DEVICE_ADD("irem_audio", IREM_M52_SOUNDC_AUDIO, 0)
-
+ IREM_M52_SOUNDC_AUDIO(config, "irem_audio", 0);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(travrusa_state::shtrider)
+void travrusa_state::shtrider(machine_config &config)
+{
travrusa(config);
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_shtrider)
+ m_gfxdecode->set_info(gfx_shtrider);
m_palette->set_init(FUNC(travrusa_state::shtrider_palette));
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(travrusa_state::shtriderb)
+void travrusa_state::shtriderb(machine_config &config)
+{
travrusa(config);
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_shtrider)
-MACHINE_CONFIG_END
+ m_gfxdecode->set_info(gfx_shtrider);
+}
/***************************************************************************
diff --git a/src/mame/drivers/trs80.cpp b/src/mame/drivers/trs80.cpp
index c3362b9414e..7c58811e433 100644
--- a/src/mame/drivers/trs80.cpp
+++ b/src/mame/drivers/trs80.cpp
@@ -585,7 +585,7 @@ MACHINE_CONFIG_START(trs80_state::ht1080z)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(trs80_state, screen_update_ht1080z)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_ht1080z)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_ht1080z);
AY8910(config, "ay1", 1'500'000).add_route(ALL_OUTPUTS, "mono", 0.25); // guess of clock
//ay1.port_a_read_callback(FUNC(trs80_state::...); // ports are some kind of expansion slot
@@ -608,7 +608,7 @@ MACHINE_CONFIG_START(trs80_state::lnw80)
MCFG_MACHINE_RESET_OVERRIDE(trs80_state, lnw80)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_lnw80)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_lnw80);
subdevice<palette_device>("palette")->set_entries(8).set_init(FUNC(trs80_state::lnw80_palette));
MCFG_SCREEN_MODIFY("screen")
@@ -630,7 +630,7 @@ MACHINE_CONFIG_START(trs80_state::radionic)
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_RAW_PARAMS(12_MHz_XTAL, 768, 0, 512, 312, 0, 256)
MCFG_SCREEN_UPDATE_DRIVER(trs80_state, screen_update_radionic)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_radionic)
+ subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_radionic);
// Interface to external circuits
I8255(config, m_ppi);
diff --git a/src/mame/drivers/videopkr.cpp b/src/mame/drivers/videopkr.cpp
index 6b5730338b9..bcf005e0c81 100644
--- a/src/mame/drivers/videopkr.cpp
+++ b/src/mame/drivers/videopkr.cpp
@@ -1254,7 +1254,7 @@ MACHINE_CONFIG_START(videopkr_state::videopkr)
MCFG_SCREEN_UPDATE_DRIVER(videopkr_state, screen_update_videopkr)
MCFG_SCREEN_PALETTE("palette")
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_videopkr)
+ GFXDECODE(config, m_gfxdecode, "palette", gfx_videopkr);
PALETTE(config, "palette", FUNC(videopkr_state::videopkr_palette), 256);
/* sound hardware */
@@ -1288,7 +1288,7 @@ MACHINE_CONFIG_START(videopkr_state::videodad)
MCFG_SCREEN_SIZE(32*16, 32*8)
MCFG_SCREEN_VISIBLE_AREA(4*16, 31*16-1, 2*8, 30*8-1)
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_videodad)
+ m_gfxdecode->set_info(gfx_videodad);
MCFG_VIDEO_START_OVERRIDE(videopkr_state,vidadcba)
MACHINE_CONFIG_END
@@ -1315,7 +1315,7 @@ MACHINE_CONFIG_START(videopkr_state::babypkr)
MCFG_SCREEN_VISIBLE_AREA(5*16, 31*16-1, 3*8, 29*8-1)
subdevice<palette_device>("palette")->set_init(FUNC(videopkr_state::babypkr_palette));
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_videodad)
+ m_gfxdecode->set_info(gfx_videodad);
MCFG_VIDEO_START_OVERRIDE(videopkr_state,vidadcba)
AY8910(config, m_aysnd, CPU_CLOCK / 6).add_route(ALL_OUTPUTS, "speaker", 0.3); /* no ports used */
diff --git a/src/mame/drivers/warpwarp.cpp b/src/mame/drivers/warpwarp.cpp
index 3434f94315b..abe4df33031 100644
--- a/src/mame/drivers/warpwarp.cpp
+++ b/src/mame/drivers/warpwarp.cpp
@@ -758,7 +758,7 @@ MACHINE_CONFIG_START(warpwarp_state::navarone)
geebee(config);
/* basic machine hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_2k)
+ m_gfxdecode->set_info(gfx_2k);
m_palette->set_entries(2*2);
m_palette->set_init(FUNC(warpwarp_state::navarone_palette));
@@ -769,7 +769,7 @@ MACHINE_CONFIG_START(warpwarp_state::kaitei)
geebee(config);
/* basic machine hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_1k)
+ m_gfxdecode->set_info(gfx_1k);
m_palette->set_entries(4*2+1);
MCFG_MACHINE_RESET_OVERRIDE(warpwarp_state,kaitei)
diff --git a/src/mame/drivers/witch.cpp b/src/mame/drivers/witch.cpp
index a7031a689f2..7cf072ecbf6 100644
--- a/src/mame/drivers/witch.cpp
+++ b/src/mame/drivers/witch.cpp
@@ -991,7 +991,7 @@ MACHINE_CONFIG_START(witch_state::witch)
MCFG_SCREEN_UPDATE_DRIVER(witch_state, screen_update_witch)
MCFG_SCREEN_PALETTE(m_palette)
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, m_palette, gfx_witch)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_witch);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800);
/* sound hardware */
@@ -1027,7 +1027,7 @@ MACHINE_CONFIG_START(keirinou_state::keirinou)
MCFG_DEVICE_PROGRAM_MAP(keirinou_sub_map)
PALETTE(config.replace(), m_palette).set_entries(0x200+0x80);
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_keirinou)
+ m_gfxdecode->set_info(gfx_keirinou);
// MCFG_PALETTE_FORMAT(IIBBGGRR)
diff --git a/src/mame/drivers/wiz.cpp b/src/mame/drivers/wiz.cpp
index c5f5df16ded..eae8b307de5 100644
--- a/src/mame/drivers/wiz.cpp
+++ b/src/mame/drivers/wiz.cpp
@@ -833,7 +833,7 @@ MACHINE_CONFIG_START(wiz_state::wiz)
MCFG_DEVICE_PROGRAM_MAP(wiz_main_map)
/* video hardware */
- MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_wiz)
+ m_gfxdecode->set_info(gfx_wiz);
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(wiz_state, screen_update_wiz)
MACHINE_CONFIG_END
diff --git a/src/mame/includes/mcr3.h b/src/mame/includes/mcr3.h
index f98c59d90ed..3224846502e 100644
--- a/src/mame/includes/mcr3.h
+++ b/src/mame/includes/mcr3.h
@@ -10,6 +10,8 @@
#pragma once
+#include "includes/mcr.h"
+
#include "machine/74259.h"
#include "machine/adc0844.h"
#include "screen.h"
diff --git a/src/mame/includes/megadriv.h b/src/mame/includes/megadriv.h
index f1950f2113a..c208c0a1af0 100644
--- a/src/mame/includes/megadriv.h
+++ b/src/mame/includes/megadriv.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
+#ifndef MAME_INCLUDES_MEGADRIV_H
+#define MAME_INCLUDES_MEGADRIV_H
+
+#pragma once
#include "coreutil.h"
#include "cpu/m68000/m68000.h"
@@ -40,8 +44,8 @@ struct genesis_z80_vars
class md_base_state : public driver_device
{
public:
- md_base_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ md_base_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
m_z80snd(*this,"genesis_snd_z80"),
m_ymsnd(*this,"ymsnd"),
@@ -50,6 +54,7 @@ public:
m_megadrive_ram(*this,"megadrive_ram"),
m_io_reset(*this, "RESET")
{ }
+
required_device<m68000_base_device> m_maincpu;
optional_device<cpu_device> m_z80snd;
optional_device<ym2612_device> m_ymsnd;
@@ -57,7 +62,6 @@ public:
required_device<sega315_5313_device> m_vdp;
optional_shared_ptr<uint16_t> m_megadrive_ram;
-
optional_ioport m_io_reset;
ioport_port *m_io_pad_3b[4];
ioport_port *m_io_pad_6b[4];
@@ -145,12 +149,12 @@ public:
class md_cons_state : public md_base_state
{
public:
- md_cons_state(const machine_config &mconfig, device_type type, const char *tag)
- : md_base_state(mconfig, type, tag),
- m_32x(*this,"sega32x"),
- m_segacd(*this,"segacd"),
- m_cart(*this, "mdslot"),
- m_tmss(*this, "tmss")
+ md_cons_state(const machine_config &mconfig, device_type type, const char *tag) :
+ md_base_state(mconfig, type, tag),
+ m_32x(*this,"sega32x"),
+ m_segacd(*this,"segacd"),
+ m_cart(*this, "mdslot"),
+ m_tmss(*this, "tmss")
{ }
ioport_port *m_io_ctrlr;
@@ -202,3 +206,5 @@ public:
void genesis_scd(machine_config &config);
void genesis_tmss(machine_config &config);
};
+
+#endif // MAME_INCLUDES_MEGADRIV_H
diff --git a/src/mame/includes/ms32.h b/src/mame/includes/ms32.h
index 1a1f54a80db..acdece07691 100644
--- a/src/mame/includes/ms32.h
+++ b/src/mame/includes/ms32.h
@@ -1,5 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood,Paul Priest
+#ifndef MAME_INCLUDES_MS32_H
+#define MAME_INCLUDES_MS32_H
+
+#pragma once
#include "machine/gen_latch.h"
#include "machine/timer.h"
@@ -9,8 +13,8 @@
class ms32_state : public driver_device
{
public:
- ms32_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ ms32_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
m_palette(*this, "palette"),
m_gfxdecode(*this, "gfxdecode"),
m_audiocpu(*this, "audiocpu"),
@@ -30,7 +34,8 @@ public:
m_txram(*this, "txram", 32),
m_bgram(*this, "bgram", 32),
m_f1superb_extraram(*this, "f1sb_extraram", 32),
- m_z80bank(*this, "z80bank%u", 1) { }
+ m_z80bank(*this, "z80bank%u", 1)
+ { }
void ms32(machine_config &config);
void f1superb(machine_config &config);
@@ -148,3 +153,5 @@ private:
void ms32_map(address_map &map);
void ms32_sound_map(address_map &map);
};
+
+#endif // MAME_INCLUDES_MS32_H
diff --git a/src/mame/includes/witch.h b/src/mame/includes/witch.h
index 1615aa853f7..1c8c56dd1b7 100644
--- a/src/mame/includes/witch.h
+++ b/src/mame/includes/witch.h
@@ -9,6 +9,7 @@ Witch / Pinball Champ '95 / Keirin Ou
#ifndef MAME_INCLUDES_WITCH_H
#define MAME_INCLUDES_WITCH_H
+#pragma once
#include "cpu/z80/z80.h"
#include "machine/i8255.h"