summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-26 19:32:59 +0100
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-26 19:32:59 +0100
commit684e5c4d57596de1427c840ad7495c0823edd96b (patch) (github)
tree3bc88632d408564a985997826e9e023effe6a17a
parent0f60932bf53aaff8a2a9a2f2ce821f094f97b32f (diff)
downloadmame-684e5c4d57596de1427c840ad7495c0823edd96b.tar.bz2
mame-684e5c4d57596de1427c840ad7495c0823edd96b.zip
mame\drivers: removed most MCFG and MACHINE_CONFIG macros from drivers starting with m, n and o (nw)
-rw-r--r--src/mame/drivers/m20.cpp29
-rw-r--r--src/mame/drivers/m5.cpp8
-rw-r--r--src/mame/drivers/m52.cpp35
-rw-r--r--src/mame/drivers/m57.cpp29
-rw-r--r--src/mame/drivers/m58.cpp22
-rw-r--r--src/mame/drivers/m62.cpp176
-rw-r--r--src/mame/drivers/m6805evs.cpp9
-rw-r--r--src/mame/drivers/m72.cpp179
-rw-r--r--src/mame/drivers/m79152pc.cpp5
-rw-r--r--src/mame/drivers/m79amb.cpp27
-rw-r--r--src/mame/drivers/macp.cpp24
-rw-r--r--src/mame/drivers/madalien.cpp17
-rw-r--r--src/mame/drivers/madmotor.cpp37
-rw-r--r--src/mame/drivers/magic10.cpp71
-rw-r--r--src/mame/drivers/magicard.cpp40
-rw-r--r--src/mame/drivers/magicfly.cpp30
-rw-r--r--src/mame/drivers/magictg.cpp13
-rw-r--r--src/mame/drivers/magmax.cpp30
-rw-r--r--src/mame/drivers/magnum.cpp38
-rw-r--r--src/mame/drivers/magreel.cpp29
-rw-r--r--src/mame/drivers/magtouch.cpp21
-rw-r--r--src/mame/drivers/mainsnk.cpp32
-rw-r--r--src/mame/drivers/majorpkr.cpp24
-rw-r--r--src/mame/drivers/marineb.cpp41
-rw-r--r--src/mame/drivers/marinedt.cpp22
-rw-r--r--src/mame/drivers/mario.cpp33
-rw-r--r--src/mame/drivers/markham.cpp65
-rw-r--r--src/mame/drivers/marywu.cpp11
-rw-r--r--src/mame/drivers/mastboyo.cpp29
-rw-r--r--src/mame/drivers/maygay1b.cpp36
-rw-r--r--src/mame/drivers/maygayep.cpp12
-rw-r--r--src/mame/drivers/maygaysw.cpp10
-rw-r--r--src/mame/drivers/maygayv1.cpp33
-rw-r--r--src/mame/drivers/mazerbla.cpp94
-rw-r--r--src/mame/drivers/mbc200.cpp35
-rw-r--r--src/mame/drivers/mbee.cpp94
-rw-r--r--src/mame/drivers/mc1000.cpp14
-rw-r--r--src/mame/drivers/mc1502.cpp11
-rw-r--r--src/mame/drivers/mc8020.cpp19
-rw-r--r--src/mame/drivers/mc8030.cpp19
-rw-r--r--src/mame/drivers/mcb216.cpp30
-rw-r--r--src/mame/drivers/mcr3.cpp78
-rw-r--r--src/mame/drivers/mcr68.cpp65
-rw-r--r--src/mame/drivers/meadwttl.cpp10
-rw-r--r--src/mame/drivers/mediagx.cpp26
-rw-r--r--src/mame/drivers/megadriv_acbl.cpp18
-rw-r--r--src/mame/drivers/megadriv_rad.cpp24
-rw-r--r--src/mame/drivers/megaplay.cpp12
-rw-r--r--src/mame/drivers/megatech.cpp23
-rw-r--r--src/mame/drivers/megazone.cpp41
-rw-r--r--src/mame/drivers/meijinsn.cpp32
-rw-r--r--src/mame/drivers/mephisto.cpp39
-rw-r--r--src/mame/drivers/mephisto_montec.cpp66
-rw-r--r--src/mame/drivers/merit.cpp113
-rw-r--r--src/mame/drivers/meritm.cpp15
-rw-r--r--src/mame/drivers/meritum.cpp18
-rw-r--r--src/mame/drivers/mes.cpp25
-rw-r--r--src/mame/drivers/metalmx.cpp38
-rw-r--r--src/mame/drivers/metlfrzr.cpp28
-rw-r--r--src/mame/drivers/mgames.cpp34
-rw-r--r--src/mame/drivers/mgolf.cpp22
-rw-r--r--src/mame/drivers/micral.cpp20
-rw-r--r--src/mame/drivers/micro3d.cpp26
-rw-r--r--src/mame/drivers/micronic.cpp23
-rw-r--r--src/mame/drivers/micropin.cpp27
-rw-r--r--src/mame/drivers/microtan.cpp22
-rw-r--r--src/mame/drivers/microvsn.cpp16
-rw-r--r--src/mame/drivers/midqslvr.cpp8
-rw-r--r--src/mame/drivers/midvunit.cpp21
-rw-r--r--src/mame/drivers/midyunit.cpp69
-rw-r--r--src/mame/drivers/midzeus.cpp32
-rw-r--r--src/mame/drivers/mightyframe.cpp9
-rw-r--r--src/mame/drivers/mikie.cpp36
-rw-r--r--src/mame/drivers/mikromik.cpp6
-rw-r--r--src/mame/drivers/mil4000.cpp38
-rw-r--r--src/mame/drivers/milton6805.cpp13
-rw-r--r--src/mame/drivers/mini2440.cpp24
-rw-r--r--src/mame/drivers/miniboy7.cpp23
-rw-r--r--src/mame/drivers/minivadr.cpp24
-rw-r--r--src/mame/drivers/mirage.cpp32
-rw-r--r--src/mame/drivers/mirax.cpp31
-rw-r--r--src/mame/drivers/mjsenpu.cpp33
-rw-r--r--src/mame/drivers/mjsister.cpp28
-rw-r--r--src/mame/drivers/mk1.cpp13
-rw-r--r--src/mame/drivers/mmodular.cpp60
-rw-r--r--src/mame/drivers/mod8.cpp13
-rw-r--r--src/mame/drivers/modena.cpp12
-rw-r--r--src/mame/drivers/mogura.cpp28
-rw-r--r--src/mame/drivers/mole.cpp26
-rw-r--r--src/mame/drivers/molecular.cpp42
-rw-r--r--src/mame/drivers/momoko.cpp30
-rw-r--r--src/mame/drivers/monacogp.cpp10
-rw-r--r--src/mame/drivers/monon_color.cpp23
-rw-r--r--src/mame/drivers/moo.cpp76
-rw-r--r--src/mame/drivers/mosaic.cpp38
-rw-r--r--src/mame/drivers/mouser.cpp36
-rw-r--r--src/mame/drivers/mpc3000.cpp13
-rw-r--r--src/mame/drivers/mps1230.cpp20
-rw-r--r--src/mame/drivers/mpu12wbk.cpp25
-rw-r--r--src/mame/drivers/mpu2.cpp9
-rw-r--r--src/mame/drivers/mpu4dealem.cpp21
-rw-r--r--src/mame/drivers/mpu4plasma.cpp31
-rw-r--r--src/mame/drivers/mpz80.cpp4
-rw-r--r--src/mame/drivers/mrdo.cpp26
-rw-r--r--src/mame/drivers/mrflea.cpp36
-rw-r--r--src/mame/drivers/mrjong.cpp28
-rw-r--r--src/mame/drivers/ms0515.cpp15
-rw-r--r--src/mame/drivers/ms32.cpp47
-rw-r--r--src/mame/drivers/msbc1.cpp9
-rw-r--r--src/mame/drivers/mstation.cpp25
-rw-r--r--src/mame/drivers/mt735.cpp9
-rw-r--r--src/mame/drivers/mtx.cpp7
-rw-r--r--src/mame/drivers/mugsmash.cpp36
-rw-r--r--src/mame/drivers/multfish.cpp37
-rw-r--r--src/mame/drivers/multi16.cpp21
-rw-r--r--src/mame/drivers/multi8.cpp26
-rw-r--r--src/mame/drivers/munchmo.cpp34
-rw-r--r--src/mame/drivers/murogem.cpp25
-rw-r--r--src/mame/drivers/murogmbl.cpp46
-rw-r--r--src/mame/drivers/mustache.cpp28
-rw-r--r--src/mame/drivers/mvme147.cpp4
-rw-r--r--src/mame/drivers/mw18w.cpp14
-rw-r--r--src/mame/drivers/mwarr.cpp34
-rw-r--r--src/mame/drivers/mwsub.cpp14
-rw-r--r--src/mame/drivers/myb3k.cpp20
-rw-r--r--src/mame/drivers/mycom.cpp32
-rw-r--r--src/mame/drivers/mystston.cpp10
-rw-r--r--src/mame/drivers/myvision.cpp6
-rw-r--r--src/mame/drivers/mz2000.cpp33
-rw-r--r--src/mame/drivers/mz2500.cpp26
-rw-r--r--src/mame/drivers/mz3500.cpp30
-rw-r--r--src/mame/drivers/mz6500.cpp25
-rw-r--r--src/mame/drivers/mz700.cpp35
-rw-r--r--src/mame/drivers/mz80.cpp23
-rw-r--r--src/mame/drivers/nakajies.cpp35
-rw-r--r--src/mame/drivers/namcofl.cpp37
-rw-r--r--src/mame/drivers/namconb1.cpp46
-rw-r--r--src/mame/drivers/namcond1.cpp52
-rw-r--r--src/mame/drivers/namcos2.cpp235
-rw-r--r--src/mame/drivers/namcos21.cpp39
-rw-r--r--src/mame/drivers/namcos21_c67.cpp54
-rw-r--r--src/mame/drivers/namcos21_de.cpp33
-rw-r--r--src/mame/drivers/namcos22.cpp135
-rw-r--r--src/mame/drivers/nanos.cpp19
-rw-r--r--src/mame/drivers/naomi.cpp10
-rw-r--r--src/mame/drivers/nbmj8688.cpp195
-rw-r--r--src/mame/drivers/nbmj8891.cpp217
-rw-r--r--src/mame/drivers/nbmj8900.cpp41
-rw-r--r--src/mame/drivers/nbmj8991.cpp160
-rw-r--r--src/mame/drivers/nc.cpp50
-rw-r--r--src/mame/drivers/neptunp2.cpp31
-rw-r--r--src/mame/drivers/nes_vt.cpp4
-rw-r--r--src/mame/drivers/newbrain.cpp8
-rw-r--r--src/mame/drivers/news.cpp29
-rw-r--r--src/mame/drivers/next.cpp98
-rw-r--r--src/mame/drivers/nexus3d.cpp25
-rw-r--r--src/mame/drivers/ngp.cpp10
-rw-r--r--src/mame/drivers/nibble.cpp20
-rw-r--r--src/mame/drivers/nichild.cpp6
-rw-r--r--src/mame/drivers/nightgal.cpp73
-rw-r--r--src/mame/drivers/nitedrvr.cpp23
-rw-r--r--src/mame/drivers/niyanpai.cpp54
-rw-r--r--src/mame/drivers/nmkmedal.cpp12
-rw-r--r--src/mame/drivers/notechan.cpp16
-rw-r--r--src/mame/drivers/nsmpoker.cpp21
-rw-r--r--src/mame/drivers/nss.cpp46
-rw-r--r--src/mame/drivers/nyny.cpp26
-rw-r--r--src/mame/drivers/ob68k1a.cpp2
-rw-r--r--src/mame/drivers/octopus.cpp23
-rw-r--r--src/mame/drivers/odyssey.cpp22
-rw-r--r--src/mame/drivers/odyssey2.cpp44
-rw-r--r--src/mame/drivers/offtwall.cpp20
-rw-r--r--src/mame/drivers/ohmygod.cpp32
-rw-r--r--src/mame/drivers/okean240.cpp41
-rw-r--r--src/mame/drivers/olibochu.cpp30
-rw-r--r--src/mame/drivers/olytext.cpp25
-rw-r--r--src/mame/drivers/omegrace.cpp32
-rw-r--r--src/mame/drivers/ondra.cpp27
-rw-r--r--src/mame/drivers/orao.cpp23
-rw-r--r--src/mame/drivers/orbit.cpp26
-rw-r--r--src/mame/drivers/otomedius.cpp22
-rw-r--r--src/mame/includes/m52.h9
-rw-r--r--src/mame/includes/orbit.h2
183 files changed, 3179 insertions, 3173 deletions
diff --git a/src/mame/drivers/m20.cpp b/src/mame/drivers/m20.cpp
index f566e401b1b..28d5b810d6f 100644
--- a/src/mame/drivers/m20.cpp
+++ b/src/mame/drivers/m20.cpp
@@ -790,23 +790,24 @@ static void keyboard(device_slot_interface &device)
device.option_add("m20", M20_KEYBOARD);
}
-MACHINE_CONFIG_START(m20_state::m20)
+void m20_state::m20(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z8001, MAIN_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(m20_program_mem)
- MCFG_DEVICE_DATA_MAP(m20_data_mem)
- MCFG_DEVICE_IO_MAP(m20_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(m20_state,m20_irq_callback)
+ Z8001(config, m_maincpu, MAIN_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &m20_state::m20_program_mem);
+ m_maincpu->set_addrmap(AS_DATA, &m20_state::m20_data_mem);
+ m_maincpu->set_addrmap(AS_IO, &m20_state::m20_io);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(m20_state::m20_irq_callback));
RAM(config, RAM_TAG).set_default_size("160K").set_default_value(0).set_extra_options("128K,192K,224K,256K,384K,512K");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 0, 256-1);
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
PALETTE(config, m_palette, palette_device::MONOCHROME);
/* Devices */
@@ -849,10 +850,10 @@ MACHINE_CONFIG_START(m20_state::m20)
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr));
rs232.rxd_handler().set(m_ttyi8251, FUNC(i8251_device::write_rxd));
- MCFG_DEVICE_ADD("apb", M20_8086, "maincpu", m_i8259, RAM_TAG)
+ M20_8086(config, m_apb, m_maincpu, m_i8259, RAM_TAG);
SOFTWARE_LIST(config, "flop_list").set_original("m20");
-MACHINE_CONFIG_END
+}
ROM_START(m20)
ROM_REGION(0x2000,"maincpu", 0)
diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp
index 14104c55c04..654dd5ca6ae 100644
--- a/src/mame/drivers/m5.cpp
+++ b/src/mame/drivers/m5.cpp
@@ -1401,7 +1401,7 @@ void brno_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( m5 )
+// machine_config( m5 )
//-------------------------------------------------
void m5_state::m5(machine_config &config)
@@ -1464,7 +1464,7 @@ void m5_state::m5(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG_START( ntsc )
+// machine_config( ntsc )
//-------------------------------------------------
void m5_state::ntsc(machine_config &config)
@@ -1480,7 +1480,7 @@ void m5_state::ntsc(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG_START( pal )
+// machine_config( pal )
//-------------------------------------------------
void m5_state::pal(machine_config &config)
@@ -1495,7 +1495,7 @@ void m5_state::pal(machine_config &config)
}
//-------------------------------------------------
-// MACHINE_CONFIG( m5p_brno )
+// machine_config( m5p_brno )
//-------------------------------------------------
diff --git a/src/mame/drivers/m52.cpp b/src/mame/drivers/m52.cpp
index 999b58f8210..a441b45c69a 100644
--- a/src/mame/drivers/m52.cpp
+++ b/src/mame/drivers/m52.cpp
@@ -398,13 +398,13 @@ void m52_state::machine_reset()
m_bgcontrol = 0;
}
-MACHINE_CONFIG_START(m52_state::m52)
-
+void m52_state::m52(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK / 6)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(main_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", m52_state, irq0_line_hold)
+ Z80(config, m_maincpu, MASTER_CLOCK / 6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &m52_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &m52_state::main_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(m52_state::irq0_line_hold));
/* video hardware */
PALETTE(config, m_sp_palette).set_entries(256, 32);
@@ -416,27 +416,24 @@ MACHINE_CONFIG_START(m52_state::m52)
PALETTE(config, m_bg_palette).set_entries(3 * 4, 32);
GFXDECODE(config, m_bg_gfxdecode, m_bg_palette, gfx_m52_bg);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK / 3, 384, 136, 376, 282, 22, 274)
- MCFG_SCREEN_UPDATE_DRIVER(m52_state, screen_update_m52)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK / 3, 384, 136, 376, 282, 22, 274);
+ m_screen->set_screen_update(FUNC(m52_state::screen_update_m52));
/* sound hardware */
//m52_sound_c_audio(config);
- MCFG_DEVICE_ADD("irem_audio", IREM_M52_SOUNDC_AUDIO, 0)
-
-MACHINE_CONFIG_END
+ IREM_M52_SOUNDC_AUDIO(config, "irem_audio", 0);
+}
-MACHINE_CONFIG_START(m52_alpha1v_state::alpha1v)
+void m52_alpha1v_state::alpha1v(machine_config &config)
+{
m52(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(alpha1v_map)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK / 3, 384, 136, 376, 282, 16, 272)
-
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &m52_alpha1v_state::alpha1v_map);
+ m_screen->set_raw(MASTER_CLOCK / 3, 384, 136, 376, 282, 16, 272);
+}
diff --git a/src/mame/drivers/m57.cpp b/src/mame/drivers/m57.cpp
index 42c2958c921..7377b320cef 100644
--- a/src/mame/drivers/m57.cpp
+++ b/src/mame/drivers/m57.cpp
@@ -229,32 +229,31 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(m57_state::m57)
-
+void m57_state::m57(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000)/6) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", m57_state, irq0_line_hold)
+ Z80(config, m_maincpu, XTAL(18'432'000)/6); /* verified on pcb */
+ m_maincpu->set_addrmap(AS_PROGRAM, &m57_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(m57_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(1790) /* accurate frequency, measured on a Moon Patrol board, is 56.75Hz. */)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(57);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(1790) /* accurate frequency, measured on a Moon Patrol board, is 56.75Hz. */);
/* the Lode Runner manual (similar but different hardware) */
/* talks about 55Hz and 1790ms vblank duration. */
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(m57_state, screen_update_m57)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(1*8, 31*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(m57_state::screen_update_m57));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_m57);
PALETTE(config, m_palette, FUNC(m57_state::m57_palette), 32*8+32*8, 256+16);
/* sound hardware */
//m52_sound_c_audio(config);
- MCFG_DEVICE_ADD("irem_audio", IREM_M52_SOUNDC_AUDIO, 0)
-
-MACHINE_CONFIG_END
+ IREM_M52_SOUNDC_AUDIO(config, "irem_audio", 0);
+}
diff --git a/src/mame/drivers/m58.cpp b/src/mame/drivers/m58.cpp
index de533cec2ec..fd0507bc4f9 100644
--- a/src/mame/drivers/m58.cpp
+++ b/src/mame/drivers/m58.cpp
@@ -192,25 +192,25 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(m58_state::yard)
-
+void m58_state::yard(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK/3/2)
- MCFG_DEVICE_PROGRAM_MAP(yard_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", m58_state, irq0_line_hold)
+ Z80(config, m_maincpu, MASTER_CLOCK/3/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &m58_state::yard_map);
+ m_maincpu->set_vblank_int("screen", FUNC(m58_state::irq0_line_hold));
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_yard);
PALETTE(config, m_palette, FUNC(m58_state::m58_palette), 256+256+256, 256+256+16);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/3, 384, 0, 256, 282, 42, 266)
- MCFG_SCREEN_UPDATE_DRIVER(m58_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK/3, 384, 0, 256, 282, 42, 266);
+ m_screen->set_screen_update(FUNC(m58_state::screen_update));
+ m_screen->set_palette(m_palette);
/* sound hardware */
- MCFG_DEVICE_ADD("irem_audio", IREM_M52_LARGE_AUDIO, 0)
-MACHINE_CONFIG_END
+ IREM_M52_LARGE_AUDIO(config, "irem_audio", 0);
+}
diff --git a/src/mame/drivers/m62.cpp b/src/mame/drivers/m62.cpp
index 08690cb65be..1b491be7ab0 100644
--- a/src/mame/drivers/m62.cpp
+++ b/src/mame/drivers/m62.cpp
@@ -965,22 +965,23 @@ void m62_state::machine_reset()
m_bankcontrol[1] = 0;
}
-MACHINE_CONFIG_START(m62_state::ldrun)
+void m62_state::ldrun(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 24000000/6)
- MCFG_DEVICE_PROGRAM_MAP(ldrun_map)
- MCFG_DEVICE_IO_MAP(kungfum_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", m62_state, irq0_line_hold)
+ Z80(config, m_maincpu, 24000000/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::ldrun_map);
+ m_maincpu->set_addrmap(AS_IO, &m62_state::kungfum_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(m62_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(55)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(1790) /* frames per second and vblank duration from the Lode Runner manual */)
- MCFG_SCREEN_SIZE(64*8, 32*8)
- 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)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(55);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(1790) /* frames per second and vblank duration from the Lode Runner manual */);
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea((64*8-384)/2, 64*8-(64*8-384)/2-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(m62_state::screen_update_ldrun));
GFXDECODE(config, m_spr_decode, m_spr_palette, gfx_m62_sprites);
GFXDECODE(config, m_chr_decode, m_chr_palette, gfx_m62_tiles);
@@ -990,103 +991,98 @@ MACHINE_CONFIG_START(m62_state::ldrun)
/* sound hardware */
//m62_audio(config);
- MCFG_DEVICE_ADD("irem_audio", IREM_M62_AUDIO, 0)
+ IREM_M62_AUDIO(config, m_audio, 0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(m62_state::kungfum)
+void m62_state::kungfum(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(18432000/6)
- MCFG_DEVICE_PROGRAM_MAP(kungfum_map)
- MCFG_DEVICE_IO_MAP(kungfum_io_map)
+ m_maincpu->set_clock(18432000/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::kungfum_map);
+ m_maincpu->set_addrmap(AS_IO, &m62_state::kungfum_io_map);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- 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_kungfum)
+ subdevice<screen_device>("screen")->set_visarea((64*8-256)/2, 64*8-(64*8-256)/2-1, 0*8, 32*8-1);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_kungfum));
MCFG_VIDEO_START_OVERRIDE(m62_state,kungfum)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(m62_state::battroad)
+void m62_state::battroad(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(18432000/6)
- MCFG_DEVICE_PROGRAM_MAP(battroad_map)
- MCFG_DEVICE_IO_MAP(battroad_io_map)
+ m_maincpu->set_clock(18432000/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::battroad_map);
+ m_maincpu->set_addrmap(AS_IO, &m62_state::battroad_io_map);
MCFG_MACHINE_START_OVERRIDE(m62_state,battroad)
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- 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)
+ subdevice<screen_device>("screen")->set_visarea((64*8-256)/2, 64*8-(64*8-256)/2-1, 0*8, 32*8-1);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_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);
MCFG_VIDEO_START_OVERRIDE(m62_state,battroad)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(m62_state::ldrun2)
+void m62_state::ldrun2(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ldrun2_map)
- MCFG_DEVICE_IO_MAP(ldrun2_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::ldrun2_map);
+ m_maincpu->set_addrmap(AS_IO, &m62_state::ldrun2_io_map);
MCFG_VIDEO_START_OVERRIDE(m62_state,ldrun2)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_ldrun)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_ldrun));
+}
-MACHINE_CONFIG_START(m62_state::ldrun3)
+void m62_state::ldrun3(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ldrun3_map)
- MCFG_DEVICE_IO_MAP(ldrun3_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::ldrun3_map);
+ m_maincpu->set_addrmap(AS_IO, &m62_state::ldrun3_io_map);
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(m62_state,ldrun2)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_ldrun3)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_ldrun3));
+}
-MACHINE_CONFIG_START(m62_state::ldrun4)
+void m62_state::ldrun4(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ldrun4_map)
- MCFG_DEVICE_IO_MAP(ldrun4_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::ldrun4_map);
+ m_maincpu->set_addrmap(AS_IO, &m62_state::ldrun4_io_map);
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(m62_state,ldrun4)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_ldrun4)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_ldrun4));
+}
-MACHINE_CONFIG_START(m62_state::lotlot)
+void m62_state::lotlot(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(lotlot_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::lotlot_map);
/* video hardware */
GFXDECODE(config, m_fg_decode, m_fg_palette, gfx_m62_fg_lotlot);
@@ -1096,50 +1092,47 @@ MACHINE_CONFIG_START(m62_state::lotlot)
MCFG_VIDEO_START_OVERRIDE(m62_state,lotlot)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_lotlot)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_lotlot));
+}
-MACHINE_CONFIG_START(m62_state::kidniki)
+void m62_state::kidniki(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(kidniki_map)
- MCFG_DEVICE_IO_MAP(kidniki_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::kidniki_map);
+ m_maincpu->set_addrmap(AS_IO, &m62_state::kidniki_io_map);
/* video hardware */
GFXDECODE(config, m_fg_decode, m_chr_palette, gfx_m62_fg_kidniki);
MCFG_VIDEO_START_OVERRIDE(m62_state,kidniki)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_kidniki)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_kidniki));
+}
-MACHINE_CONFIG_START(m62_state::spelunkr)
+void m62_state::spelunkr(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(spelunkr_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::spelunkr_map);
/* video hardware */
GFXDECODE(config, m_fg_decode, m_chr_palette, gfx_m62_fg_spelunkr);
MCFG_VIDEO_START_OVERRIDE(m62_state,spelunkr)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_spelunkr)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_spelunkr));
+}
-MACHINE_CONFIG_START(m62_state::spelunk2)
+void m62_state::spelunk2(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(spelunk2_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::spelunk2_map);
/* video hardware */
m_chr_decode->set_info(gfx_m62_tiles_spelunk2);
@@ -1149,46 +1142,43 @@ MACHINE_CONFIG_START(m62_state::spelunk2)
m_chr_palette->set_init(FUNC(m62_state::spelunk2_palette));
MCFG_VIDEO_START_OVERRIDE(m62_state,spelunk2)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(m62_state, screen_update_spelunk2)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_spelunk2));
+}
-MACHINE_CONFIG_START(m62_state::youjyudn)
+void m62_state::youjyudn(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(18432000/6)
- MCFG_DEVICE_PROGRAM_MAP(youjyudn_map)
- MCFG_DEVICE_IO_MAP(youjyudn_io_map)
+ m_maincpu->set_clock(18432000/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::youjyudn_map);
+ m_maincpu->set_addrmap(AS_IO, &m62_state::youjyudn_io_map);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- 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)
+ subdevice<screen_device>("screen")->set_visarea((64*8-256)/2, 64*8-(64*8-256)/2-1, 0*8, 32*8-1);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_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
+}
-MACHINE_CONFIG_START(m62_state::horizon)
+void m62_state::horizon(machine_config &config)
+{
ldrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(horizon_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::horizon_map);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- 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_horizon)
+ subdevice<screen_device>("screen")->set_visarea((64*8-256)/2, 64*8-(64*8-256)/2-1, 0*8, 32*8-1);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_horizon));
MCFG_VIDEO_START_OVERRIDE(m62_state,horizon)
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/m6805evs.cpp b/src/mame/drivers/m6805evs.cpp
index a7789452380..0212023cd9a 100644
--- a/src/mame/drivers/m6805evs.cpp
+++ b/src/mame/drivers/m6805evs.cpp
@@ -102,13 +102,14 @@ void m6805evs_state::machine_reset()
{
}
-MACHINE_CONFIG_START(m6805evs_state::m6805evs)
+void m6805evs_state::m6805evs(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6805, XTAL(4'000'000))
+ M6805(config, m_maincpu, XTAL(4'000'000));
// Needs a 13-bits address bus wide version of the cpu
-// MCFG_DEVICE_PROGRAM_MAP(mem_map)
-MACHINE_CONFIG_END
+// m_maincpu->set_addrmap(AS_PROGRAM, &m6805evs_state::mem_map);
+}
ROM_START(m6805evs)
ROM_REGION(0x2000, "eprom", 0)
diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp
index c624d1a43de..a09ca5dfb54 100644
--- a/src/mame/drivers/m72.cpp
+++ b/src/mame/drivers/m72.cpp
@@ -1826,8 +1826,8 @@ void m72_state::m72_audio_chips(machine_config &config)
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
}
-MACHINE_CONFIG_START(m72_state::m72_base)
-
+void m72_state::m72_base(machine_config &config)
+{
/* basic machine hardware */
V30(config, m_maincpu, MASTER_CLOCK/2/2); /* 16 MHz external freq (8MHz internal) */
m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::m72_map);
@@ -1917,53 +1917,51 @@ void m72_state::m72_dbreed(machine_config &config)
/****************************************** M81 ***********************************************/
// M81 is closest to M72
-MACHINE_CONFIG_START(m72_state::m81_hharry)
+void m72_state::m81_hharry(machine_config &config)
+{
m72_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hharry_map)
- MCFG_DEVICE_IO_MAP(m81_portmap)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::hharry_map);
+ m_maincpu->set_addrmap(AS_IO, &m72_state::m81_portmap);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_PROGRAM_MAP(sound_rom_map)
- MCFG_DEVICE_IO_MAP(rtype2_sound_portmap)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55)
+ m_soundcpu->set_addrmap(AS_PROGRAM, &m72_state::sound_rom_map);
+ m_soundcpu->set_addrmap(AS_IO, &m72_state::rtype2_sound_portmap);
+ m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(128*55));
MCFG_VIDEO_START_OVERRIDE(m72_state,hharry)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(m72_state, screen_update_m81)
-MACHINE_CONFIG_END
+ m_screen->set_screen_update(FUNC(m72_state::screen_update_m81));
+}
-MACHINE_CONFIG_START(m72_state::m81_xmultipl)
+void m72_state::m81_xmultipl(machine_config &config)
+{
m81_hharry(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(xmultipl_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::xmultipl_map);
MCFG_VIDEO_START_OVERRIDE(m72_state,xmultipl) // different offsets
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(m72_state::m81_dbreed)
+void m72_state::m81_dbreed(machine_config &config)
+{
m81_xmultipl(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(dbreed_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::dbreed_map);
+}
/****************************************** M84 ***********************************************/
// M84
-MACHINE_CONFIG_START(m72_state::rtype2)
-
+void m72_state::rtype2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V30,MASTER_CLOCK/2/2) /* 16 MHz external freq (8MHz internal) */
- MCFG_DEVICE_PROGRAM_MAP(rtype2_map)
- MCFG_DEVICE_IO_MAP(m84_portmap)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb)
-
- MCFG_DEVICE_ADD(m_soundcpu, Z80, SOUND_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(sound_rom_map)
- MCFG_DEVICE_IO_MAP(rtype2_sound_portmap)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
+ V30(config, m_maincpu, MASTER_CLOCK/2/2); /* 16 MHz external freq (8MHz internal) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::rtype2_map);
+ m_maincpu->set_addrmap(AS_IO, &m72_state::m84_portmap);
+ m_maincpu->set_irq_acknowledge_callback("upd71059c", FUNC(pic8259_device::inta_cb));
+
+ Z80(config, m_soundcpu, SOUND_CLOCK);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &m72_state::sound_rom_map);
+ m_soundcpu->set_addrmap(AS_IO, &m72_state::rtype2_sound_portmap);
+ m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(128*55)); /* clocked by V1? (Vigilante) */
/* IRQs are generated by main Z80 and YM2151 */
PIC8259(config, m_upd71059c, 0);
@@ -1971,42 +1969,42 @@ MACHINE_CONFIG_START(m72_state::rtype2)
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_rtype2);
- MCFG_PALETTE_ADD("palette", 512)
+ PALETTE(config, m_palette).set_entries(512);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4, 512, 64, 448, 284, 0, 256)
- MCFG_SCREEN_UPDATE_DRIVER(m72_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK/4, 512, 64, 448, 284, 0, 256);
+ m_screen->set_screen_update(FUNC(m72_state::screen_update));
+ m_screen->set_palette(m_palette);
MCFG_VIDEO_START_OVERRIDE(m72_state,rtype2)
m72_audio_chips(config);
-MACHINE_CONFIG_END
+}
// not m72, different video system (less tiles regions?) (M84? M82?)
-MACHINE_CONFIG_START(m72_state::hharryu)
+void m72_state::hharryu(machine_config &config)
+{
rtype2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hharryu_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::hharryu_map);
MCFG_VIDEO_START_OVERRIDE(m72_state,hharryu)
-MACHINE_CONFIG_END
+}
// M84
-MACHINE_CONFIG_START(m72_state::cosmccop)
-
+void m72_state::cosmccop(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V35,MASTER_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(kengo_map)
- MCFG_DEVICE_IO_MAP(m84_v33_portmap)
-
- MCFG_DEVICE_ADD(m_soundcpu, Z80, SOUND_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(sound_rom_map)
- MCFG_DEVICE_IO_MAP(rtype2_sound_portmap)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
+ V35(config, m_maincpu, MASTER_CLOCK/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::kengo_map);
+ m_maincpu->set_addrmap(AS_IO, &m72_state::m84_v33_portmap);
+
+ Z80(config, m_soundcpu, SOUND_CLOCK);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &m72_state::sound_rom_map);
+ m_soundcpu->set_addrmap(AS_IO, &m72_state::rtype2_sound_portmap);
+ m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(128*55)); /* clocked by V1? (Vigilante) */
/* IRQs are generated by main Z80 and YM2151 */
MCFG_MACHINE_START_OVERRIDE(m72_state,kengo)
@@ -2016,17 +2014,17 @@ MACHINE_CONFIG_START(m72_state::cosmccop)
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_rtype2);
- MCFG_PALETTE_ADD("palette", 512)
+ PALETTE(config, m_palette).set_entries(512);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4, 512, 64, 448, 284, 0, 256)
- MCFG_SCREEN_UPDATE_DRIVER(m72_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK/4, 512, 64, 448, 284, 0, 256);
+ m_screen->set_screen_update(FUNC(m72_state::screen_update));
+ m_screen->set_palette(m_palette);
MCFG_VIDEO_START_OVERRIDE(m72_state,hharryu)
m72_audio_chips(config);
-MACHINE_CONFIG_END
+}
void m72_state::kengo(machine_config &config)
{
@@ -2043,17 +2041,17 @@ M82-A-A as the top board
M82-B-A and as the bottom board
*/
-MACHINE_CONFIG_START(m72_state::m82)
-
+void m72_state::m82(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V30,MASTER_CLOCK/2/2) /* 16 MHz external freq (8MHz internal) */
- MCFG_DEVICE_PROGRAM_MAP(m82_map)
- MCFG_DEVICE_IO_MAP(m82_portmap)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb)
- MCFG_DEVICE_ADD(m_soundcpu, Z80, SOUND_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(sound_rom_map)
- MCFG_DEVICE_IO_MAP(rtype2_sound_portmap)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(m72_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
+ V30(config, m_maincpu, MASTER_CLOCK/2/2); /* 16 MHz external freq (8MHz internal) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::m82_map);
+ m_maincpu->set_addrmap(AS_IO, &m72_state::m82_portmap);
+ m_maincpu->set_irq_acknowledge_callback("upd71059c", FUNC(pic8259_device::inta_cb));
+ Z80(config, m_soundcpu, SOUND_CLOCK);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &m72_state::sound_rom_map);
+ m_soundcpu->set_addrmap(AS_IO, &m72_state::rtype2_sound_portmap);
+ m_soundcpu->set_periodic_int(FUNC(m72_state::nmi_line_pulse), attotime::from_hz(128*55)); /* clocked by V1? (Vigilante) */
/* IRQs are generated by main Z80 and YM2151 */
PIC8259(config, m_upd71059c, 0);
@@ -2061,34 +2059,35 @@ MACHINE_CONFIG_START(m72_state::m82)
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_majtitle);
- MCFG_PALETTE_ADD("palette", 512)
+ PALETTE(config, m_palette).set_entries(512);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4, 512, 64, 448, 284, 0, 256)
- MCFG_SCREEN_UPDATE_DRIVER(m72_state, screen_update_m82)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK/4, 512, 64, 448, 284, 0, 256);
+ m_screen->set_screen_update(FUNC(m72_state::screen_update_m82));
+ m_screen->set_palette(m_palette);
MCFG_VIDEO_START_OVERRIDE(m72_state,m82)
m72_audio_chips(config);
-MACHINE_CONFIG_END
+}
/* Pound for Pound uses
M85-A-B / M85-B
*/
-MACHINE_CONFIG_START(m72_state::poundfor)
-
+void m72_state::poundfor(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V30,MASTER_CLOCK/2/2) /* 16 MHz external freq (8MHz internal) */
- MCFG_DEVICE_PROGRAM_MAP(rtype2_map)
- MCFG_DEVICE_IO_MAP(poundfor_portmap)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("upd71059c", pic8259_device, inta_cb)
- MCFG_DEVICE_ADD(m_soundcpu, Z80, SOUND_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(sound_rom_map)
- MCFG_DEVICE_IO_MAP(poundfor_sound_portmap)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(m72_state, fake_nmi, 128*55) /* clocked by V1? (Vigilante) */
+ V30(config, m_maincpu, MASTER_CLOCK/2/2); /* 16 MHz external freq (8MHz internal) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &m72_state::rtype2_map);
+ m_maincpu->set_addrmap(AS_IO, &m72_state::poundfor_portmap);
+ m_maincpu->set_irq_acknowledge_callback("upd71059c", FUNC(pic8259_device::inta_cb));
+
+ Z80(config, m_soundcpu, SOUND_CLOCK);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &m72_state::sound_rom_map);
+ m_soundcpu->set_addrmap(AS_IO, &m72_state::poundfor_sound_portmap);
+ m_soundcpu->set_periodic_int(FUNC(m72_state::fake_nmi), attotime::from_hz(128*55)); /* clocked by V1? (Vigilante) */
/* IRQs are generated by main Z80 and YM2151 */
PIC8259(config, m_upd71059c, 0);
@@ -2104,17 +2103,17 @@ MACHINE_CONFIG_START(m72_state::poundfor)
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_rtype2);
- MCFG_PALETTE_ADD("palette", 512)
+ PALETTE(config, m_palette).set_entries(512);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4, 512, 64, 448, 284, 0, 256)
- MCFG_SCREEN_UPDATE_DRIVER(m72_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK/4, 512, 64, 448, 284, 0, 256);
+ m_screen->set_screen_update(FUNC(m72_state::screen_update));
+ m_screen->set_palette(m_palette);
MCFG_VIDEO_START_OVERRIDE(m72_state,poundfor)
m72_audio_chips(config);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/m79152pc.cpp b/src/mame/drivers/m79152pc.cpp
index 172cbb37fd6..a84453b6bec 100644
--- a/src/mame/drivers/m79152pc.cpp
+++ b/src/mame/drivers/m79152pc.cpp
@@ -264,7 +264,8 @@ static const z80_daisy_config daisy_chain[] =
{ nullptr }
};
-MACHINE_CONFIG_START(m79152pc_state::m79152pc)
+void m79152pc_state::m79152pc(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, 4'000'000); // UA880D
m_maincpu->set_addrmap(AS_PROGRAM, &m79152pc_state::mem_map);
@@ -342,7 +343,7 @@ MACHINE_CONFIG_START(m79152pc_state::m79152pc)
SPEAKER(config, "mono").front_center();
BEEP(config, m_beep, 1000);
m_beep->add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( m79152pc )
diff --git a/src/mame/drivers/m79amb.cpp b/src/mame/drivers/m79amb.cpp
index f06097e01ab..4dc3beb74cc 100644
--- a/src/mame/drivers/m79amb.cpp
+++ b/src/mame/drivers/m79amb.cpp
@@ -194,27 +194,26 @@ INTERRUPT_GEN_MEMBER(m79amb_state::m79amb_interrupt)
device.execute().set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
}
-MACHINE_CONFIG_START(m79amb_state::m79amb)
-
+void m79amb_state::m79amb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080, XTAL(19'660'800) / 10)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", m79amb_state, m79amb_interrupt)
+ I8080(config, m_maincpu, XTAL(19'660'800) / 10);
+ m_maincpu->set_addrmap(AS_PROGRAM, &m79amb_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(m79amb_state::m79amb_interrupt));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 4*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(m79amb_state, screen_update_ramtek)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 4*8, 32*8-1);
+ screen.set_screen_update(FUNC(m79amb_state::screen_update_ramtek));
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, m79amb_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ DISCRETE(config, m_discrete, m79amb_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/drivers/macp.cpp b/src/mame/drivers/macp.cpp
index 6caaaa8ee98..3ae5799d64a 100644
--- a/src/mame/drivers/macp.cpp
+++ b/src/mame/drivers/macp.cpp
@@ -53,11 +53,12 @@ INPUT_PORTS_END
static INPUT_PORTS_START( cicplay )
INPUT_PORTS_END
-MACHINE_CONFIG_START(macp_state::macp)
+void macp_state::macp(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 2500000)
- MCFG_DEVICE_PROGRAM_MAP(macp_map)
- MCFG_DEVICE_IO_MAP(macp_io)
+ Z80(config, m_maincpu, 2500000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &macp_state::macp_map);
+ m_maincpu->set_addrmap(AS_IO, &macp_state::macp_io);
/* video hardware */
//config.set_default_layout();
@@ -67,18 +68,19 @@ MACHINE_CONFIG_START(macp_state::macp)
/* sound hardware */
//2x AY8910
genpin_audio(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(macp_state::macp0)
+void macp_state::macp0(machine_config &config)
+{
macp(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(macp0_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &macp_state::macp0_map);
+}
-MACHINE_CONFIG_START(macp_state::macpmsm)
+void macp_state::macpmsm(machine_config &config)
+{
macp(config);
// MSM5205
-MACHINE_CONFIG_END
+}
ROM_START(macgalxy)
ROM_REGION(0x4000, "maincpu", 0)
diff --git a/src/mame/drivers/madalien.cpp b/src/mame/drivers/madalien.cpp
index a0d3f1863f7..fcd20dcfb1b 100644
--- a/src/mame/drivers/madalien.cpp
+++ b/src/mame/drivers/madalien.cpp
@@ -150,14 +150,14 @@ static INPUT_PORTS_START( madalien )
INPUT_PORTS_END
-MACHINE_CONFIG_START(madalien_state::madalien)
-
+void madalien_state::madalien(machine_config &config)
+{
/* main CPU */
- MCFG_DEVICE_ADD("maincpu", M6502, MADALIEN_MAIN_CLOCK / 8) /* 1324kHz */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M6502(config, m_maincpu, MADALIEN_MAIN_CLOCK / 8); /* 1324kHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &madalien_state::main_map);
- MCFG_DEVICE_ADD("audiocpu", M6502, SOUND_CLOCK / 8) /* 512kHz */
- MCFG_DEVICE_PROGRAM_MAP(audio_map)
+ M6502(config, m_audiocpu, SOUND_CLOCK / 8); /* 512kHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &madalien_state::audio_map);
/* video hardware */
madalien_video(config);
@@ -177,9 +177,8 @@ MACHINE_CONFIG_START(madalien_state::madalien)
aysnd.add_route(1, "discrete", 1.0, 1);
aysnd.add_route(2, "discrete", 1.0, 2);
- MCFG_DEVICE_ADD("discrete", DISCRETE, madalien_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ DISCRETE(config, m_discrete, madalien_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
ROM_START( madalien )
diff --git a/src/mame/drivers/madmotor.cpp b/src/mame/drivers/madmotor.cpp
index 5f53e2f9ff0..2092c8c426b 100644
--- a/src/mame/drivers/madmotor.cpp
+++ b/src/mame/drivers/madmotor.cpp
@@ -258,26 +258,26 @@ uint32_t madmotor_state::screen_update(screen_device &screen, bitmap_ind16 &bitm
/******************************************************************************/
-MACHINE_CONFIG_START(madmotor_state::madmotor)
-
+void madmotor_state::madmotor(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000) /* Custom chip 59, 24 MHz crystal */
- MCFG_DEVICE_PROGRAM_MAP(madmotor_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", madmotor_state, irq6_line_hold)/* VBL */
+ M68000(config, m_maincpu, 12000000); /* Custom chip 59, 24 MHz crystal */
+ m_maincpu->set_addrmap(AS_PROGRAM, &madmotor_state::madmotor_map);
+ m_maincpu->set_vblank_int("screen", FUNC(madmotor_state::irq6_line_hold)); /* VBL */
H6280(config, m_audiocpu, 8053000/2); /* Custom chip 45, Crystal near CPU is 8.053 MHz */
m_audiocpu->set_addrmap(AS_PROGRAM, &madmotor_state::sound_map);
m_audiocpu->add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_REFRESH_RATE(58)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */ /* frames per second, vblank duration taken from Burger Time */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(madmotor_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ screen.set_refresh_hz(58);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */ /* frames per second, vblank duration taken from Burger Time */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(madmotor_state::screen_update));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_madmotor);
PALETTE(config, "palette").set_format(palette_device::xBGR_444, 1024);
@@ -303,20 +303,17 @@ MACHINE_CONFIG_START(madmotor_state::madmotor)
GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, 0);
- MCFG_DEVICE_ADD("ym1", YM2203, 21470000/6)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
+ YM2203(config, "ym1", 21470000/6).add_route(ALL_OUTPUTS, "mono", 0.40);
ym2151_device &ym2(YM2151(config, "ym2", 21470000/6));
ym2.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */
ym2.add_route(0, "mono", 0.45);
ym2.add_route(1, "mono", 0.45);
- MCFG_DEVICE_ADD("oki1", OKIM6295, 1023924, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ OKIM6295(config, "oki1", 1023924, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADD("oki2", OKIM6295, 2047848, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki2", 2047848, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.25); // clock frequency & pin 7 not verified
+}
/******************************************************************************/
diff --git a/src/mame/drivers/magic10.cpp b/src/mame/drivers/magic10.cpp
index 9195fff8044..c67df432427 100644
--- a/src/mame/drivers/magic10.cpp
+++ b/src/mame/drivers/magic10.cpp
@@ -736,22 +736,23 @@ GFXDECODE_END
* Machine Drivers *
****************************/
-MACHINE_CONFIG_START(magic10_state::magic10)
+void magic10_state::magic10(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, CPU_CLOCK) // 10 MHz.
- MCFG_DEVICE_PROGRAM_MAP(magic10_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", magic10_state, irq1_line_hold)
+ M68000(config, m_maincpu, CPU_CLOCK); // 10 MHz.
+ m_maincpu->set_addrmap(AS_PROGRAM, &magic10_state::magic10_map);
+ m_maincpu->set_vblank_int("screen", FUNC(magic10_state::irq1_line_hold));
// 1FILL is required by vanilla magic10 at least (otherwise gameplay won't work properly)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 44*8-1, 2*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(magic10_state, screen_update_magic10)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 64*8);
+ screen.set_visarea(0*8, 44*8-1, 2*8, 32*8-1);
+ screen.set_screen_update(FUNC(magic10_state::screen_update_magic10));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 256);
@@ -759,55 +760,51 @@ MACHINE_CONFIG_START(magic10_state::magic10)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) /* clock frequency & pin 7 not verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); /* clock frequency & pin 7 not verified */
+}
-MACHINE_CONFIG_START(magic10_state::magic10a)
+void magic10_state::magic10a(machine_config &config)
+{
magic10(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(magic10a_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &magic10_state::magic10a_map);
+}
-MACHINE_CONFIG_START(magic10_state::magic102)
+void magic10_state::magic102(machine_config &config)
+{
magic10(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(magic102_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &magic10_state::magic102_map);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 0*8, 30*8-1)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_visarea(0*8, 48*8-1, 0*8, 30*8-1);
+}
-MACHINE_CONFIG_START(magic10_state::hotslot)
+void magic10_state::hotslot(machine_config &config)
+{
magic10(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hotslot_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &magic10_state::hotslot_map);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(8*8, 56*8-1, 2*8, 32*8-1)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_visarea(8*8, 56*8-1, 2*8, 32*8-1);
+}
-MACHINE_CONFIG_START(magic10_state::sgsafari)
+void magic10_state::sgsafari(machine_config &config)
+{
magic10(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(sgsafari_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", magic10_state, irq2_line_hold) /* L1 interrupts */
+ m_maincpu->set_addrmap(AS_PROGRAM, &magic10_state::sgsafari_map);
+ m_maincpu->set_vblank_int("screen", FUNC(magic10_state::irq2_line_hold)); /* L1 interrupts */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0*8, 44*8-1, 0*8, 30*8-1)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_visarea(0*8, 44*8-1, 0*8, 30*8-1);
+}
/****************************
diff --git a/src/mame/drivers/magicard.cpp b/src/mame/drivers/magicard.cpp
index e08bbb3cf7e..43dff213718 100644
--- a/src/mame/drivers/magicard.cpp
+++ b/src/mame/drivers/magicard.cpp
@@ -997,35 +997,35 @@ void magicard_state::ramdac_map(address_map &map)
}
-MACHINE_CONFIG_START(magicard_state::magicard)
- MCFG_DEVICE_ADD("maincpu", SCC68070, CLOCK_A / 2) /* SCC-68070 CCA84 datasheet */
- MCFG_DEVICE_PROGRAM_MAP(magicard_mem)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", magicard_state, magicard_irq) /* no interrupts? (it erases the vectors..) */
-
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(400, 300)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 256-1) //dynamic resolution,TODO
- MCFG_SCREEN_UPDATE_DRIVER(magicard_state, screen_update_magicard)
-
- MCFG_PALETTE_ADD("palette", 0x100)
+void magicard_state::magicard(machine_config &config)
+{
+ SCC68070(config, m_maincpu, CLOCK_A / 2); /* SCC-68070 CCA84 datasheet */
+ m_maincpu->set_addrmap(AS_PROGRAM, &magicard_state::magicard_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(magicard_state::magicard_irq)); /* no interrupts? (it erases the vectors..) */
+
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(50);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(400, 300);
+ m_screen->set_visarea(0, 320-1, 0, 256-1); //dynamic resolution,TODO
+ m_screen->set_screen_update(FUNC(magicard_state::screen_update_magicard));
+
+ PALETTE(config, m_palette).set_entries(0x100);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette));
ramdac.set_addrmap(0, &magicard_state::ramdac_map);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("saa", SAA1099, CLOCK_B)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ SAA1099(config, "saa", CLOCK_B).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
-MACHINE_CONFIG_START(magicard_state::hotslots)
+void magicard_state::hotslots(machine_config &config)
+{
magicard(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hotslots_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &magicard_state::hotslots_mem);
config.device_remove("saa");
YMZ284(config, "ssg", 4000000).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
/*************************
* Rom Load *
diff --git a/src/mame/drivers/magicfly.cpp b/src/mame/drivers/magicfly.cpp
index 817bc3cce27..38d22cf4657 100644
--- a/src/mame/drivers/magicfly.cpp
+++ b/src/mame/drivers/magicfly.cpp
@@ -940,22 +940,22 @@ GFXDECODE_END
* Machine Drivers *
*********************************************/
-MACHINE_CONFIG_START(magicfly_state::magicfly)
-
+void magicfly_state::magicfly(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, MASTER_CLOCK / 16) /* guess */
- MCFG_DEVICE_PROGRAM_MAP(magicfly_map)
+ M6502(config, m_maincpu, MASTER_CLOCK / 16); /* guess */
+ m_maincpu->set_addrmap(AS_PROGRAM, &magicfly_state::magicfly_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE((39+1)*8, (31+1)*8) /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1). */
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 29*8-1) /* Taken from MC6845 init, registers 01 & 06. */
- MCFG_SCREEN_UPDATE_DRIVER(magicfly_state, screen_update_magicfly)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size((39+1)*8, (31+1)*8); /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1). */
+ screen.set_visarea(0*8, 32*8-1, 0*8, 29*8-1); /* Taken from MC6845 init, registers 01 & 06. */
+ screen.set_screen_update(FUNC(magicfly_state::screen_update_magicfly));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_magicfly);
PALETTE(config, "palette", FUNC(magicfly_state::magicfly_palette), 32);
@@ -971,16 +971,16 @@ MACHINE_CONFIG_START(magicfly_state::magicfly)
DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(magicfly_state::_7mezzo)
+void magicfly_state::_7mezzo(machine_config &config)
+{
magicfly(config);
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(magicfly_state, 7mezzo)
-
-MACHINE_CONFIG_END
+}
void magicfly_state::bchance(machine_config &config)
diff --git a/src/mame/drivers/magictg.cpp b/src/mame/drivers/magictg.cpp
index 7c0ace88055..a39a4dfb253 100644
--- a/src/mame/drivers/magictg.cpp
+++ b/src/mame/drivers/magictg.cpp
@@ -948,13 +948,12 @@ MACHINE_CONFIG_START(magictg_state::magictg)
m_voodoo[1]->set_screen_tag("screen");
m_voodoo[1]->set_cpu_tag(m_mips);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(1024, 1024)
- MCFG_SCREEN_VISIBLE_AREA(0, 511, 16, 447)
-
- MCFG_SCREEN_UPDATE_DRIVER(magictg_state, screen_update_magictg)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(1024, 1024);
+ screen.set_visarea(0, 511, 16, 447);
+ screen.set_screen_update(FUNC(magictg_state::screen_update_magictg));
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/magmax.cpp b/src/mame/drivers/magmax.cpp
index 274eecde31e..647abfb29a6 100644
--- a/src/mame/drivers/magmax.cpp
+++ b/src/mame/drivers/magmax.cpp
@@ -325,27 +325,27 @@ static GFXDECODE_START( gfx_magmax )
GFXDECODE_END
-MACHINE_CONFIG_START(magmax_state::magmax)
-
+void magmax_state::magmax(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, M68000, XTAL(16'000'000)/2) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", magmax_state, irq1_line_assert)
+ M68000(config, m_maincpu, XTAL(16'000'000)/2); /* verified on pcb */
+ m_maincpu->set_addrmap(AS_PROGRAM, &magmax_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(magmax_state::irq1_line_assert));
- MCFG_DEVICE_ADD(m_audiocpu, Z80,XTAL(20'000'000)/8) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_io_map)
+ Z80(config, m_audiocpu, XTAL(20'000'000)/8); /* verified on pcb */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &magmax_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &magmax_state::sound_io_map);
config.m_minimum_quantum = attotime::from_hz(600);
/* video hardware */
- MCFG_SCREEN_ADD(m_screen, RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(magmax_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(magmax_state::screen_update));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_magmax);
PALETTE(config, m_palette, FUNC(magmax_state::magmax_palette), 1*16 + 16*16 + 256, 256);
@@ -365,7 +365,7 @@ MACHINE_CONFIG_START(magmax_state::magmax)
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0);
m_soundlatch->set_separate_acknowledge(true);
-MACHINE_CONFIG_END
+}
ROM_START( magmax )
diff --git a/src/mame/drivers/magnum.cpp b/src/mame/drivers/magnum.cpp
index 3e177c899ff..9ba4bb1439a 100644
--- a/src/mame/drivers/magnum.cpp
+++ b/src/mame/drivers/magnum.cpp
@@ -279,26 +279,27 @@ void magnum_state::magnum_lcdc(address_map &map)
map(0x0000, 0x027f).ram();
}
-MACHINE_CONFIG_START(magnum_state::magnum)
- MCFG_DEVICE_ADD("maincpu", I80186, XTAL(12'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(magnum_map)
- MCFG_DEVICE_IO_MAP(magnum_io)
+void magnum_state::magnum(machine_config &config)
+{
+ I80186(config, m_maincpu, XTAL(12'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &magnum_state::magnum_map);
+ m_maincpu->set_addrmap(AS_IO, &magnum_state::magnum_io);
CDP1879(config, "rtc", XTAL(32'768)).irq_callback().set(FUNC(magnum_state::rtcirq_w));
- MCFG_SCREEN_ADD("screen1", LCD)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_UPDATE_DEVICE("lcdc1", hd61830_device, screen_update)
- MCFG_SCREEN_SIZE(6*40, 9*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 6*40-1, 0, 8*16-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen1(SCREEN(config, "screen1", SCREEN_TYPE_LCD));
+ screen1.set_refresh_hz(50);
+ screen1.set_screen_update("lcdc1", FUNC(hd61830_device::screen_update));
+ screen1.set_size(6*40, 9*16);
+ screen1.set_visarea(0, 6*40-1, 0, 8*16-1);
+ screen1.set_palette("palette");
- MCFG_SCREEN_ADD("screen2", LCD)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_UPDATE_DEVICE("lcdc2", hd61830_device, screen_update)
- MCFG_SCREEN_SIZE(6*40, 9*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 6*40-1, 0, 8*16-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen2(SCREEN(config, "screen2", SCREEN_TYPE_LCD));
+ screen2.set_refresh_hz(50);
+ screen2.set_screen_update("lcdc2", FUNC(hd61830_device::screen_update));
+ screen2.set_size(6*40, 9*16);
+ screen2.set_visarea(0, 6*40-1, 0, 8*16-1);
+ screen2.set_palette("palette");
hd61830_device &lcdc1(HD61830(config, "lcdc1", 1000000)); // unknown clock
lcdc1.set_addrmap(0, &magnum_state::magnum_lcdc);
@@ -315,9 +316,8 @@ MACHINE_CONFIG_START(magnum_state::magnum)
PALETTE(config, "palette", palette_device::MONOCHROME_INVERTED);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("beep", BEEP, 500) /// frequency is guessed
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.50)
-MACHINE_CONFIG_END
+ BEEP(config, m_beep, 500).add_route(ALL_OUTPUTS, "speaker", 0.50); // frequency is guessed
+}
ROM_START( magnum )
ROM_REGION(0x20000, "bios", 0)
diff --git a/src/mame/drivers/magreel.cpp b/src/mame/drivers/magreel.cpp
index 968d3cce8ca..70b56114e1a 100644
--- a/src/mame/drivers/magreel.cpp
+++ b/src/mame/drivers/magreel.cpp
@@ -118,30 +118,29 @@ void magreel_state::machine_reset()
}
-MACHINE_CONFIG_START(magreel_state::magreel)
-
+void magreel_state::magreel(machine_config &config)
+{
/* basic machine hardware - all information unknown */
-// MCFG_DEVICE_ADD("maincpu",m68000,MAIN_CLOCK/12)
-// MCFG_DEVICE_PROGRAM_MAP(magreel_map)
+// m68000_device &maincpu(M68000(config, "maincpu", MAIN_CLOCK/12));
+// maincpu.set_addrmap(AS_PROGRAM, &magreel_state::magreel_map);
/* video hardware */
-// MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
-// MCFG_SCREEN_UPDATE_DRIVER(magreel_state, screen_update)
-// MCFG_SCREEN_SIZE(32*8, 32*8)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
-// MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 442, 0, 320, 264, 0, 240) /* generic NTSC video timing at 320x240 */
-// MCFG_SCREEN_PALETTE("palette")
+// screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+// screen.set_refresh_hz(60);
+// screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+// screen.set_screen_update(FUNC(magreel_state::screen_update));
+// screen.set_size(32*8, 32*8);
+// screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+// screen.set_raw(MAIN_CLOCK/2, 442, 0, 320, 264, 0, 240); /* generic NTSC video timing at 320x240 */
+// screen.set_palette("palette");
// GFXDECODE(config, "gfxdecode", "palette", gfx_magreel);
-// MCFG_PALETTE_ADD("palette", 8)
-// MCFG_PALETTE_INIT_OWNER(magreel_state, magreel)
+// PALETTE(config, "palette", FUNC(magreel_state::magreel), 8)
/* sound hardware */
SPEAKER(config, "mono").front_center();
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/magtouch.cpp b/src/mame/drivers/magtouch.cpp
index 5932ca4934d..5be7b28db81 100644
--- a/src/mame/drivers/magtouch.cpp
+++ b/src/mame/drivers/magtouch.cpp
@@ -193,16 +193,17 @@ void magtouch_state::magtouch_sb_conf(device_t *device)
MCFG_DEVICE_SLOT_INTERFACE(pc_joysticks, nullptr, true) // remove joystick
}
-MACHINE_CONFIG_START(magtouch_state::magtouch)
+void magtouch_state::magtouch(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I386, 14318180*2) /* I386 ?? Mhz */
- MCFG_DEVICE_PROGRAM_MAP(magtouch_map)
- MCFG_DEVICE_IO_MAP(magtouch_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
+ I386(config, m_maincpu, 14318180*2); /* I386 ?? Mhz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &magtouch_state::magtouch_map);
+ m_maincpu->set_addrmap(AS_IO, &magtouch_state::magtouch_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb));
/* video hardware */
pcvideo_trident_vga(config);
- MCFG_DEVICE_REPLACE("vga", TVGA9000_VGA, 0)
+ TVGA9000_VGA(config.replace(), "vga", 0);
pcat_common(config);
@@ -230,10 +231,10 @@ MACHINE_CONFIG_START(magtouch_state::magtouch)
m_isabus->drq3_callback().set("dma8237_1", FUNC(am9517a_device::dreq3_w));
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "isa", magtouch_isa8_cards, "sb15", true)
- MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("sb15", magtouch_sb_def)
- MCFG_SLOT_OPTION_MACHINE_CONFIG("sb15", magtouch_sb_conf)
-MACHINE_CONFIG_END
+ isa8_slot_device &isa1(ISA8_SLOT(config, "isa1", 0, m_isabus, magtouch_isa8_cards, "sb15", true));
+ isa1.set_option_device_input_defaults("sb15", DEVICE_INPUT_DEFAULTS_NAME(magtouch_sb_def));
+ isa1.set_option_machine_config("sb15", magtouch_sb_conf);
+}
ROM_START(magtouch)
diff --git a/src/mame/drivers/mainsnk.cpp b/src/mame/drivers/mainsnk.cpp
index 408822e302a..6f869be918d 100644
--- a/src/mame/drivers/mainsnk.cpp
+++ b/src/mame/drivers/mainsnk.cpp
@@ -375,24 +375,24 @@ GFXDECODE_END
-MACHINE_CONFIG_START(mainsnk_state::mainsnk)
-
- MCFG_DEVICE_ADD("maincpu", Z80, 3360000)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mainsnk_state, irq0_line_hold)
+void mainsnk_state::mainsnk(machine_config &config)
+{
+ Z80(config, m_maincpu, 3360000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mainsnk_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mainsnk_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80,4000000)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_portmap)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mainsnk_state, irq0_line_assert, 244)
+ Z80(config, m_audiocpu, 4000000);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &mainsnk_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &mainsnk_state::sound_portmap);
+ m_audiocpu->set_periodic_int(FUNC(mainsnk_state::irq0_line_assert), attotime::from_hz(244));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(36*8, 28*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 1*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mainsnk_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_size(36*8, 28*8);
+ screen.set_visarea(0*8, 36*8-1, 1*8, 28*8-1);
+ screen.set_screen_update(FUNC(mainsnk_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mainsnk);
PALETTE(config, m_palette, FUNC(mainsnk_state::mainsnk_palette), 0x400);
@@ -406,7 +406,7 @@ MACHINE_CONFIG_START(mainsnk_state::mainsnk)
AY8910(config, "ay1", 2000000).add_route(ALL_OUTPUTS, "mono", 0.35);
AY8910(config, "ay2", 2000000).add_route(ALL_OUTPUTS, "mono", 0.35);
-MACHINE_CONFIG_END
+}
ROM_START(mainsnk)
diff --git a/src/mame/drivers/majorpkr.cpp b/src/mame/drivers/majorpkr.cpp
index a632af8ca67..486413c360b 100644
--- a/src/mame/drivers/majorpkr.cpp
+++ b/src/mame/drivers/majorpkr.cpp
@@ -1004,12 +1004,13 @@ GFXDECODE_END
* Machine Drivers *
*************************/
-MACHINE_CONFIG_START(majorpkr_state::majorpkr)
+void majorpkr_state::majorpkr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK) // 6 MHz.
- MCFG_DEVICE_PROGRAM_MAP(map)
- MCFG_DEVICE_IO_MAP(portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", majorpkr_state, irq0_line_hold)
+ z80_device &maincpu(Z80(config, "maincpu", CPU_CLOCK)); // 6 MHz.
+ maincpu.set_addrmap(AS_PROGRAM, &majorpkr_state::map);
+ maincpu.set_addrmap(AS_IO, &majorpkr_state::portmap);
+ maincpu.set_vblank_int("screen", FUNC(majorpkr_state::irq0_line_hold));
ADDRESS_MAP_BANK(config, "palette_bank").set_map(&majorpkr_state::palettebanks).set_options(ENDIANNESS_LITTLE, 8, 13, 0x800);
ADDRESS_MAP_BANK(config, "vram_bank").set_map(&majorpkr_state::vrambanks).set_options(ENDIANNESS_LITTLE, 8, 13, 0x800);
@@ -1017,10 +1018,10 @@ MACHINE_CONFIG_START(majorpkr_state::majorpkr)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(CRTC_CLOCK*16, (47+1)*16, 0, (36*16)-16, (36+1)*8, 0, (28*8)) // from CRTC registers.
- MCFG_SCREEN_UPDATE_DRIVER(majorpkr_state, screen_update_majorpkr)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(CRTC_CLOCK*16, (47+1)*16, 0, (36*16)-16, (36+1)*8, 0, (28*8)); // from CRTC registers.
+ screen.set_screen_update(FUNC(majorpkr_state::screen_update_majorpkr));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_majorpkr);
@@ -1034,9 +1035,8 @@ MACHINE_CONFIG_START(majorpkr_state::majorpkr)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, OKI_CLOCK, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 verified.
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", OKI_CLOCK, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 verified.
+}
/*************************
diff --git a/src/mame/drivers/marineb.cpp b/src/mame/drivers/marineb.cpp
index 4462671bf5f..61b07ee3c56 100644
--- a/src/mame/drivers/marineb.cpp
+++ b/src/mame/drivers/marineb.cpp
@@ -538,12 +538,12 @@ WRITE_LINE_MEMBER(marineb_state::wanted_vblank_irq)
}
-MACHINE_CONFIG_START(marineb_state::marineb)
-
+void marineb_state::marineb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK) /* 3 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(marineb_map)
- MCFG_DEVICE_IO_MAP(marineb_io_map)
+ Z80(config, m_maincpu, CPU_CLOCK); /* 3 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &marineb_state::marineb_map);
+ m_maincpu->set_addrmap(AS_IO, &marineb_state::marineb_io_map);
LS259(config, m_outlatch);
m_outlatch->q_out_cb<0>().set(FUNC(marineb_state::nmi_mask_w));
@@ -551,14 +551,14 @@ MACHINE_CONFIG_START(marineb_state::marineb)
m_outlatch->q_out_cb<2>().set(FUNC(marineb_state::flipscreen_x_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(5000) /* frames per second, vblank duration */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(marineb_state, screen_update_marineb)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, marineb_state, marineb_vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(5000) /* frames per second, vblank duration */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(marineb_state::screen_update_marineb));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(marineb_state::marineb_vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_marineb);
PALETTE(config, m_palette, FUNC(marineb_state::marineb_palette), 256);
@@ -566,7 +566,7 @@ MACHINE_CONFIG_START(marineb_state::marineb)
/* sound hardware */
SPEAKER(config, "mono").front_center();
AY8910(config, "ay1", SOUND_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
void marineb_state::changes(machine_config &config)
@@ -600,26 +600,25 @@ void marineb_state::hoccer(machine_config &config)
}
-MACHINE_CONFIG_START(marineb_state::wanted)
+void marineb_state::wanted(machine_config &config)
+{
marineb(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(wanted_io_map)
+ m_maincpu->set_addrmap(AS_IO, &marineb_state::wanted_io_map);
m_outlatch->q_out_cb<0>().set(FUNC(marineb_state::irq_mask_w));
/* video hardware */
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))
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(marineb_state::screen_update_springer));
+ subdevice<screen_device>("screen")->screen_vblank().set(FUNC(marineb_state::wanted_vblank_irq));
// sound hardware (PSG type verified only for bcruzm12)
AY8912(config.replace(), "ay1", SOUND_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.25);
AY8912(config, "ay2", SOUND_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
void marineb_state::hopprobo(machine_config &config)
diff --git a/src/mame/drivers/marinedt.cpp b/src/mame/drivers/marinedt.cpp
index ff7d507c187..c018c2fdd30 100644
--- a/src/mame/drivers/marinedt.cpp
+++ b/src/mame/drivers/marinedt.cpp
@@ -626,19 +626,19 @@ void marinedt_state::marinedt_palette(palette_device &palette) const
}
}
-MACHINE_CONFIG_START(marinedt_state::marinedt)
-
+void marinedt_state::marinedt(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80,MAIN_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(marinedt_map)
- MCFG_DEVICE_IO_MAP(marinedt_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", marinedt_state, irq0_line_hold)
+ Z80(config, m_maincpu, MAIN_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &marinedt_state::marinedt_map);
+ m_maincpu->set_addrmap(AS_IO, &marinedt_state::marinedt_io);
+ m_maincpu->set_vblank_int("screen", FUNC(marinedt_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DRIVER(marinedt_state, screen_update)
- MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 328, 0, 256, 263, 32, 256) // template to get ~60 fps
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_screen_update(FUNC(marinedt_state::screen_update));
+ m_screen->set_raw(MAIN_CLOCK/2, 328, 0, 256, 263, 32, 256); // template to get ~60 fps
+ m_screen->set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_marinedt);
@@ -647,7 +647,7 @@ MACHINE_CONFIG_START(marinedt_state::marinedt)
/* sound hardware */
SPEAKER(config, "mono").front_center();
//AY8910(config, "aysnd", MAIN_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 0.30);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/mario.cpp b/src/mame/drivers/mario.cpp
index fa40440ebc3..c937aa5e377 100644
--- a/src/mame/drivers/mario.cpp
+++ b/src/mame/drivers/mario.cpp
@@ -335,12 +335,12 @@ WRITE_LINE_MEMBER(mario_state::vblank_irq)
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
-MACHINE_CONFIG_START(mario_state::mario_base)
-
+void mario_state::mario_base(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, Z80_CLOCK) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(mario_map)
- MCFG_DEVICE_IO_MAP(mario_io_map)
+ Z80(config, m_maincpu, Z80_CLOCK); /* verified on pcb */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mario_state::mario_map);
+ m_maincpu->set_addrmap(AS_IO, &mario_state::mario_io_map);
/* devices */
Z80DMA(config, m_z80dma, Z80_CLOCK);
@@ -359,16 +359,15 @@ MACHINE_CONFIG_START(mario_state::mario_base)
mainlatch.q_out_cb<7>().set(FUNC(mario_state::coin_counter_2_w)); // COUNTER 1 (misnumbered on schematic)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(mario_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mario_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ screen.set_screen_update(FUNC(mario_state::screen_update));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(mario_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mario);
PALETTE(config, m_palette, FUNC(mario_state::mario_palette), 256);
-
-MACHINE_CONFIG_END
+}
void mario_state::mario(machine_config &config)
{
@@ -376,15 +375,15 @@ void mario_state::mario(machine_config &config)
mario_audio(config);
}
-MACHINE_CONFIG_START(mario_state::masao)
+void mario_state::masao(machine_config &config)
+{
mario_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(4000000) /* 4.000 MHz (?) */
- MCFG_DEVICE_PROGRAM_MAP(masao_map)
+ m_maincpu->set_clock(4000000); /* 4.000 MHz (?) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mario_state::masao_map);
/* sound hardware */
masao_audio(config);
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/markham.cpp b/src/mame/drivers/markham.cpp
index 29a4616c748..b0f4e3a6b63 100644
--- a/src/mame/drivers/markham.cpp
+++ b/src/mame/drivers/markham.cpp
@@ -543,24 +543,24 @@ static GFXDECODE_START( gfx_markham )
GFXDECODE_ENTRY( "gfx1", 0x0000, spritelayout, 0, 64 )
GFXDECODE_END
-MACHINE_CONFIG_START(markham_state::markham)
-
+void markham_state::markham(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK/2) /* 4.000MHz */
- MCFG_DEVICE_PROGRAM_MAP(markham_master_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", markham_state, irq0_line_hold)
+ Z80(config, m_maincpu, CPU_CLOCK/2); /* 4.000MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &markham_state::markham_master_map);
+ m_maincpu->set_vblank_int("screen", FUNC(markham_state::irq0_line_hold));
- MCFG_DEVICE_ADD("subcpu", Z80, CPU_CLOCK/2) /* 4.000MHz */
- MCFG_DEVICE_PROGRAM_MAP(markham_slave_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", markham_state, irq0_line_hold)
+ Z80(config, m_subcpu, CPU_CLOCK/2); /* 4.000MHz */
+ m_subcpu->set_addrmap(AS_PROGRAM, &markham_state::markham_slave_map);
+ m_subcpu->set_vblank_int("screen", FUNC(markham_state::irq0_line_hold));
config.m_minimum_quantum = attotime::from_hz(6000);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(markham_state, screen_update_markham)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ m_screen->set_screen_update(FUNC(markham_state::screen_update_markham));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_markham);
PALETTE(config, m_palette, FUNC(markham_state::markham_palette), 1024, 256);
@@ -568,43 +568,36 @@ MACHINE_CONFIG_START(markham_state::markham)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("sn1", SN76496, CPU_CLOCK/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
-
- MCFG_DEVICE_ADD("sn2", SN76496, CPU_CLOCK/2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
-MACHINE_CONFIG_END
+ SN76496(config, m_sn[0], CPU_CLOCK/2).add_route(ALL_OUTPUTS, "mono", 0.75);
-MACHINE_CONFIG_START(markham_state::strnskil)
+ SN76496(config, m_sn[1], CPU_CLOCK/2).add_route(ALL_OUTPUTS, "mono", 0.75);
+}
+void markham_state::strnskil(machine_config &config)
+{
markham(config);
/* basic machine hardware */
- config.device_remove("maincpu");
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK/2) /* 4.000MHz */
- MCFG_DEVICE_PROGRAM_MAP(strnskil_master_map)
+ Z80(config.replace(), m_maincpu, CPU_CLOCK/2); /* 4.000MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &markham_state::strnskil_master_map);
TIMER(config, "scantimer").configure_scanline(FUNC(markham_state::strnskil_scanline), "screen", 0, 1);
- config.device_remove("subcpu");
- MCFG_DEVICE_ADD("subcpu", Z80, CPU_CLOCK/2) /* 4.000MHz */
- MCFG_DEVICE_PROGRAM_MAP(strnskil_slave_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(markham_state, irq0_line_hold, 2*(PIXEL_CLOCK/HTOTAL/VTOTAL))
+ Z80(config.replace(), m_subcpu, CPU_CLOCK/2); /* 4.000MHz */
+ m_subcpu->set_addrmap(AS_PROGRAM, &markham_state::strnskil_slave_map);
+ m_subcpu->set_periodic_int(FUNC(markham_state::irq0_line_hold), attotime::from_hz(2*(PIXEL_CLOCK/HTOTAL/VTOTAL)));
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(markham_state, screen_update_strnskil)
+ m_screen->set_screen_update(FUNC(markham_state::screen_update_strnskil));
MCFG_VIDEO_START_OVERRIDE(markham_state, strnskil)
/* sound hardware */
- MCFG_DEVICE_MODIFY("sn1")
- MCFG_DEVICE_CLOCK(CPU_CLOCK/4)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(markham_state::banbam)
+ m_sn[0]->set_clock(CPU_CLOCK/4);
+}
+void markham_state::banbam(machine_config &config)
+{
strnskil(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(banbam_master_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &markham_state::banbam_master_map);
MB8841(config, m_mcu, CPU_CLOCK/2); /* 4.000MHz */
// m_mcu->read_k().set(FUNC(markham_state::mcu_portk_r));
@@ -619,7 +612,7 @@ MACHINE_CONFIG_START(markham_state::banbam)
// m_mcu->read_r<3>().set(FUNC(markham_state::mcu_port_r3_r));
// m_mcu->write_r<3>().set(FUNC(markham_state::mcu_port_r3_w));
m_mcu->set_disable();
-MACHINE_CONFIG_END
+}
/****************************************************************************/
diff --git a/src/mame/drivers/marywu.cpp b/src/mame/drivers/marywu.cpp
index 0d99de7f3f2..79c03162f5b 100644
--- a/src/mame/drivers/marywu.cpp
+++ b/src/mame/drivers/marywu.cpp
@@ -186,11 +186,12 @@ void marywu_state::machine_start()
m_leds.resolve();
}
-MACHINE_CONFIG_START(marywu_state::marywu)
+void marywu_state::marywu(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I80C31, XTAL(10'738'635)) //actual CPU is a Winbond w78c31b-24
- MCFG_DEVICE_PROGRAM_MAP(program_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ i80c31_device &maincpu(I80C31(config, "maincpu", XTAL(10'738'635))); //actual CPU is a Winbond w78c31b-24
+ maincpu.set_addrmap(AS_PROGRAM, &marywu_state::program_map);
+ maincpu.set_addrmap(AS_IO, &marywu_state::io_map);
//TODO: figure out what each bit is mapped to in the 80c31 ports P1 and P3
/* Keyboard & display interface */
@@ -213,7 +214,7 @@ MACHINE_CONFIG_START(marywu_state::marywu)
ay2.add_route(ALL_OUTPUTS, "mono", 0.50);
ay2.port_a_write_callback().set(FUNC(marywu_state::ay2_port_a_w));
ay2.port_b_write_callback().set(FUNC(marywu_state::ay2_port_b_w));
-MACHINE_CONFIG_END
+}
ROM_START( marywu )
ROM_REGION( 0x8000, "maincpu", 0 )
diff --git a/src/mame/drivers/mastboyo.cpp b/src/mame/drivers/mastboyo.cpp
index 51209ae443c..344f94cb2f8 100644
--- a/src/mame/drivers/mastboyo.cpp
+++ b/src/mame/drivers/mastboyo.cpp
@@ -196,24 +196,24 @@ void mastboyo_state::machine_start()
}
-MACHINE_CONFIG_START(mastboyo_state::mastboyo)
-
+void mastboyo_state::mastboyo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 20_MHz_XTAL / 6)
- MCFG_DEVICE_PROGRAM_MAP(mastboyo_map)
- MCFG_DEVICE_IO_MAP(mastboyo_portmap)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mastboyo_state, irq0_line_hold, 256.244f) // not sure, INT0 pin was measured at 256.244Hz
+ Z80(config, m_maincpu, 20_MHz_XTAL / 6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mastboyo_state::mastboyo_map);
+ m_maincpu->set_addrmap(AS_IO, &mastboyo_state::mastboyo_portmap);
+ m_maincpu->set_periodic_int(FUNC(mastboyo_state::irq0_line_hold), attotime::from_hz(256.244f)); // not sure, INT0 pin was measured at 256.244Hz
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 2*8, 256-2*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mastboyo_state, screen_update_mastboyo)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 256-1, 2*8, 256-2*8-1);
+ screen.set_screen_update(FUNC(mastboyo_state::screen_update_mastboyo));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_mastboyo);
@@ -226,8 +226,7 @@ MACHINE_CONFIG_START(mastboyo_state::mastboyo)
aysnd.port_a_read_callback().set_ioport("DSW"); // DSW
aysnd.port_b_read_callback().set_ioport("IN0"); // player inputs
aysnd.add_route(ALL_OUTPUTS, "mono", 0.50);
-
-MACHINE_CONFIG_END
+}
/*
diff --git a/src/mame/drivers/maygay1b.cpp b/src/mame/drivers/maygay1b.cpp
index fc1aa93b1e0..6be81bbb2d6 100644
--- a/src/mame/drivers/maygay1b.cpp
+++ b/src/mame/drivers/maygay1b.cpp
@@ -762,10 +762,10 @@ READ8_MEMBER(maygay1b_state::mcu_port2_r)
// machine driver for maygay m1 board /////////////////////////////////
-MACHINE_CONFIG_START(maygay1b_state::maygay_m1)
-
- MCFG_DEVICE_ADD("maincpu", MC6809, M1_MASTER_CLOCK/2) // claimed to be 4 MHz
- MCFG_DEVICE_PROGRAM_MAP(m1_memmap)
+void maygay1b_state::maygay_m1(machine_config &config)
+{
+ MC6809(config, m_maincpu, M1_MASTER_CLOCK/2); // claimed to be 4 MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &maygay1b_state::m1_memmap);
I80C51(config, m_mcu, 2000000); // EP840034.A-P-80C51AVW
m_mcu->port_in_cb<0>().set(FUNC(maygay1b_state::mcu_port0_r));
@@ -801,13 +801,13 @@ MACHINE_CONFIG_START(maygay1b_state::maygay_m1)
m_ay->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
m_ay->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
- MCFG_DEVICE_ADD("ymsnd", YM2413, M1_MASTER_CLOCK/4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ ym2413_device &ymsnd(YM2413(config, "ymsnd", M1_MASTER_CLOCK/4));
+ ymsnd.add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ ymsnd.add_route(ALL_OUTPUTS, "rspeaker", 1.0);
- MCFG_DEVICE_ADD("msm6376", OKIM6376, 102400) //? Seems to work well with samples, but unconfirmed
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ OKIM6376(config, m_msm6376, 102400); //? Seems to work well with samples, but unconfirmed
+ m_msm6376->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ m_msm6376->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
TIMER(config, "nmitimer").configure_periodic(FUNC(maygay1b_state::maygay1b_nmitimer_callback), attotime::from_hz(75)); // freq?
@@ -841,7 +841,7 @@ MACHINE_CONFIG_START(maygay1b_state::maygay_m1)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
config.set_default_layout(layout_maygay1b);
-MACHINE_CONFIG_END
+}
void maygay1b_state::maygay_m1_no_oki(machine_config &config)
{
@@ -849,17 +849,17 @@ void maygay1b_state::maygay_m1_no_oki(machine_config &config)
config.device_remove("msm6376");
}
-MACHINE_CONFIG_START(maygay1b_state::maygay_m1_nec)
+void maygay1b_state::maygay_m1_nec(machine_config &config)
+{
maygay_m1(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(m1_nec_memmap)
+ m_maincpu->set_addrmap(AS_PROGRAM, &maygay1b_state::m1_nec_memmap);
config.device_remove("msm6376");
- MCFG_DEVICE_ADD("upd", UPD7759)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ UPD7759(config, m_upd7759);
+ m_upd7759->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ m_upd7759->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+}
WRITE8_MEMBER(maygay1b_state::m1ab_no_oki_w)
{
diff --git a/src/mame/drivers/maygayep.cpp b/src/mame/drivers/maygayep.cpp
index 858796660b8..4d3399db597 100644
--- a/src/mame/drivers/maygayep.cpp
+++ b/src/mame/drivers/maygayep.cpp
@@ -105,15 +105,15 @@ void maygayep_state::init_maygayep()
}
-MACHINE_CONFIG_START(maygayep_state::maygayep)
- MCFG_DEVICE_ADD("maincpu", H83002, 16000000 )
- MCFG_DEVICE_PROGRAM_MAP( maygayep_map )
+void maygayep_state::maygayep(machine_config &config)
+{
+ H83002(config, m_maincpu, 16000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &maygayep_state::maygayep_map);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("ymz", YMZ280B, 10000000 )
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ YMZ280B(config, "ymz", 10000000).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
#define MISSING_SOUND \
ROM_REGION( 0x100000, "ymz", ROMREGION_ERASE00 ) \
diff --git a/src/mame/drivers/maygaysw.cpp b/src/mame/drivers/maygaysw.cpp
index 137b5b72fbc..4fb1f75042d 100644
--- a/src/mame/drivers/maygaysw.cpp
+++ b/src/mame/drivers/maygaysw.cpp
@@ -131,12 +131,12 @@ static INPUT_PORTS_START( maygayew )
INPUT_PORTS_END
-MACHINE_CONFIG_START(maygayew_state::maygayew)
-
+void maygayew_state::maygayew(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,8000000) // MC68306FC16 - standard 68000 core + peripherals
- MCFG_DEVICE_PROGRAM_MAP(maygayew_map)
-MACHINE_CONFIG_END
+ M68000(config, m_maincpu, 8000000); // MC68306FC16 - standard 68000 core + peripherals
+ m_maincpu->set_addrmap(AS_PROGRAM, &maygayew_state::maygayew_map);
+}
ROM_START( mg_gbr )
ROM_REGION( 0x040000, "mainrom", 0 )
diff --git a/src/mame/drivers/maygayv1.cpp b/src/mame/drivers/maygayv1.cpp
index 165047a6936..5bc77116c26 100644
--- a/src/mame/drivers/maygayv1.cpp
+++ b/src/mame/drivers/maygayv1.cpp
@@ -878,9 +878,10 @@ void maygayv1_state::machine_reset()
}
-MACHINE_CONFIG_START(maygayv1_state::maygayv1)
- MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK / 2)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+void maygayv1_state::maygayv1(machine_config &config)
+{
+ M68000(config, m_maincpu, MASTER_CLOCK / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &maygayv1_state::main_map);
I8052(config, m_soundcpu, SOUND_CLOCK);
m_soundcpu->set_addrmap(AS_PROGRAM, &maygayv1_state::sound_prg);
@@ -899,16 +900,16 @@ MACHINE_CONFIG_START(maygayv1_state::maygayv1)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* TODO: Use real video timings */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(640, 300)
- MCFG_SCREEN_VISIBLE_AREA(0, 640 - 1, 0, 300 - 1)
- MCFG_SCREEN_UPDATE_DRIVER(maygayv1_state, screen_update_maygayv1)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, maygayv1_state, screen_vblank_maygayv1))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ screen.set_size(640, 300);
+ screen.set_visarea(0, 640 - 1, 0, 300 - 1);
+ screen.set_screen_update(FUNC(maygayv1_state::screen_update_maygayv1));
+ screen.screen_vblank().set(FUNC(maygayv1_state::screen_vblank_maygayv1));
+ screen.set_palette("palette");
- MCFG_PALETTE_ADD("palette", 16)
+ PALETTE(config, "palette").set_entries(16);
MC68681(config, m_duart68681, DUART_CLOCK);
m_duart68681->irq_cb().set(FUNC(maygayv1_state::duart_irq_handler));
@@ -921,12 +922,10 @@ MACHINE_CONFIG_START(maygayv1_state::maygayv1)
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("ymsnd",YM2413, MASTER_CLOCK / 4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.8)
+ YM2413(config, "ymsnd", MASTER_CLOCK / 4).add_route(ALL_OUTPUTS, "mono", 0.8);
- MCFG_DEVICE_ADD("upd",UPD7759)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ UPD7759(config, m_upd7759).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
/*************************************
diff --git a/src/mame/drivers/mazerbla.cpp b/src/mame/drivers/mazerbla.cpp
index 2e9d272a2c8..c5cdaa330d3 100644
--- a/src/mame/drivers/mazerbla.cpp
+++ b/src/mame/drivers/mazerbla.cpp
@@ -973,27 +973,27 @@ void mazerbla_state::machine_reset()
}
}
-MACHINE_CONFIG_START(mazerbla_state::mazerbla)
-
+void mazerbla_state::mazerbla(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK) /* 4 MHz, no NMI, IM2 - vectors at 0xf8, 0xfa, 0xfc */
- MCFG_DEVICE_PROGRAM_MAP(mazerbla_map)
- MCFG_DEVICE_IO_MAP(mazerbla_io_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(mazerbla_state,irq_callback)
-
- MCFG_DEVICE_ADD("sub", Z80, MASTER_CLOCK) /* 4 MHz, NMI, IM1 INT */
- MCFG_DEVICE_PROGRAM_MAP(mazerbla_cpu2_map)
- MCFG_DEVICE_IO_MAP(mazerbla_cpu2_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mazerbla_state, irq0_line_hold, 400) /* frequency in Hz */
-
- MCFG_DEVICE_ADD("sub2", Z80, MASTER_CLOCK) /* 4 MHz, no NMI, IM1 INT */
- MCFG_DEVICE_PROGRAM_MAP(mazerbla_cpu3_map)
- MCFG_DEVICE_IO_MAP(mazerbla_cpu3_io_map)
+ Z80(config, m_maincpu, MASTER_CLOCK); /* 4 MHz, no NMI, IM2 - vectors at 0xf8, 0xfa, 0xfc */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mazerbla_state::mazerbla_map);
+ m_maincpu->set_addrmap(AS_IO, &mazerbla_state::mazerbla_io_map);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(mazerbla_state::irq_callback));
+
+ Z80(config, m_subcpu, MASTER_CLOCK); /* 4 MHz, NMI, IM1 INT */
+ m_subcpu->set_addrmap(AS_PROGRAM, &mazerbla_state::mazerbla_cpu2_map);
+ m_subcpu->set_addrmap(AS_IO, &mazerbla_state::mazerbla_cpu2_io_map);
+ m_subcpu->set_periodic_int(FUNC(mazerbla_state::irq0_line_hold), attotime::from_hz(400)); /* frequency in Hz */
+
+ z80_device &sub2(Z80(config, "sub2", MASTER_CLOCK)); /* 4 MHz, no NMI, IM1 INT */
+ sub2.set_addrmap(AS_PROGRAM, &mazerbla_state::mazerbla_cpu3_map);
+ sub2.set_addrmap(AS_IO, &mazerbla_state::mazerbla_cpu3_io_map);
/* (vblank related ??) int generated by a custom video processor
and cleared on ANY port access.
but handled differently for now
*/
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mazerbla_state, irq0_line_hold)
+ sub2.set_vblank_int("screen", FUNC(mazerbla_state::irq0_line_hold));
/* synchronization forced on the fly */
MB_VCU(config, m_vcu, SOUND_CLOCK/4);
@@ -1003,40 +1003,40 @@ MACHINE_CONFIG_START(mazerbla_state::mazerbla)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mazerbla_state, screen_update_mazerbla)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mazerbla_state, screen_vblank))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ m_screen->set_size(40*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
+ m_screen->set_screen_update(FUNC(mazerbla_state::screen_update_mazerbla));
+ m_screen->screen_vblank().set(FUNC(mazerbla_state::screen_vblank));
PALETTE(config, "palette", FUNC(mazerbla_state::mazerbla_palette), 256+1);
/* sound hardware */
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(mazerbla_state::greatgun)
+void mazerbla_state::greatgun(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK) /* 4 MHz, no NMI, IM2 - vectors at 0xf8, 0xfa, 0xfc */
- MCFG_DEVICE_PROGRAM_MAP(mazerbla_map)
- MCFG_DEVICE_IO_MAP(greatgun_io_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(mazerbla_state,irq_callback)
-
- MCFG_DEVICE_ADD("sub", Z80, SOUND_CLOCK / 4) /* 3.579500 MHz, NMI - caused by sound command write, periodic INT */
- MCFG_DEVICE_PROGRAM_MAP(greatgun_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mazerbla_state, sound_interrupt, (double)14318180/16/16/16/16 )
-
- MCFG_DEVICE_ADD("sub2", Z80, MASTER_CLOCK) /* 4 MHz, no NMI, IM1 INT */
- MCFG_DEVICE_PROGRAM_MAP(mazerbla_cpu3_map)
- MCFG_DEVICE_IO_MAP(greatgun_cpu3_io_map)
+ Z80(config, m_maincpu, MASTER_CLOCK); /* 4 MHz, no NMI, IM2 - vectors at 0xf8, 0xfa, 0xfc */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mazerbla_state::mazerbla_map);
+ m_maincpu->set_addrmap(AS_IO, &mazerbla_state::greatgun_io_map);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(mazerbla_state::irq_callback));
+
+ Z80(config, m_subcpu, SOUND_CLOCK / 4); /* 3.579500 MHz, NMI - caused by sound command write, periodic INT */
+ m_subcpu->set_addrmap(AS_PROGRAM, &mazerbla_state::greatgun_sound_map);
+ m_subcpu->set_periodic_int(FUNC(mazerbla_state::sound_interrupt), attotime::from_hz((double)14318180/16/16/16/16 ));
+
+ z80_device &sub2(Z80(config, "sub2", MASTER_CLOCK)); /* 4 MHz, no NMI, IM1 INT */
+ sub2.set_addrmap(AS_PROGRAM, &mazerbla_state::mazerbla_cpu3_map);
+ sub2.set_addrmap(AS_IO, &mazerbla_state::greatgun_cpu3_io_map);
/* (vblank related ??) int generated by a custom video processor
and cleared on ANY port access.
but handled differently for now
*/
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mazerbla_state, irq0_line_hold)
+ sub2.set_vblank_int("screen", FUNC(mazerbla_state::irq0_line_hold));
MB_VCU(config, m_vcu, SOUND_CLOCK/4);
m_vcu->set_cpu_tag("sub2");
@@ -1045,13 +1045,13 @@ MACHINE_CONFIG_START(mazerbla_state::greatgun)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mazerbla_state, screen_update_mazerbla)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mazerbla_state, screen_vblank))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ m_screen->set_size(40*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
+ m_screen->set_screen_update(FUNC(mazerbla_state::screen_update_mazerbla));
+ m_screen->screen_vblank().set(FUNC(mazerbla_state::screen_vblank));
PALETTE(config, "palette", FUNC(mazerbla_state::mazerbla_palette), 246+1);
@@ -1069,7 +1069,7 @@ MACHINE_CONFIG_START(mazerbla_state::greatgun)
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set_inputline(m_subcpu, INPUT_LINE_NMI);
m_soundlatch->set_separate_acknowledge(true);
-MACHINE_CONFIG_END
+}
/*************************************
*
diff --git a/src/mame/drivers/mbc200.cpp b/src/mame/drivers/mbc200.cpp
index 7f25fc50f78..abb4dd2f6c1 100644
--- a/src/mame/drivers/mbc200.cpp
+++ b/src/mame/drivers/mbc200.cpp
@@ -302,23 +302,24 @@ static GFXDECODE_START( gfx_mbc200 )
GFXDECODE_END
-MACHINE_CONFIG_START(mbc200_state::mbc200)
+void mbc200_state::mbc200(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 8_MHz_XTAL / 2) // NEC D780C-1
- MCFG_DEVICE_PROGRAM_MAP(mbc200_mem)
- MCFG_DEVICE_IO_MAP(mbc200_io)
+ Z80(config, m_maincpu, 8_MHz_XTAL / 2); // NEC D780C-1
+ m_maincpu->set_addrmap(AS_PROGRAM, &mbc200_state::mbc200_mem);
+ m_maincpu->set_addrmap(AS_IO, &mbc200_state::mbc200_io);
- MCFG_DEVICE_ADD("subcpu", Z80, 8_MHz_XTAL / 2) // NEC D780C-1
- MCFG_DEVICE_PROGRAM_MAP(mbc200_sub_mem)
- MCFG_DEVICE_IO_MAP(mbc200_sub_io)
+ z80_device &subcpu(Z80(config, "subcpu", 8_MHz_XTAL / 2)); // NEC D780C-1
+ subcpu.set_addrmap(AS_PROGRAM, &mbc200_state::mbc200_sub_mem);
+ subcpu.set_addrmap(AS_IO, &mbc200_state::mbc200_sub_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(640, 400)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", h46505_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(640, 400);
+ screen.set_visarea(0, 640-1, 0, 400-1);
+ screen.set_screen_update("crtc", FUNC(h46505_device::screen_update));
GFXDECODE(config, "gfxdecode", m_palette, gfx_mbc200);
PALETTE(config, m_palette, palette_device::MONOCHROME);
@@ -330,10 +331,8 @@ MACHINE_CONFIG_START(mbc200_state::mbc200)
// sound
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("beeper", BEEP, 1000) // frequency unknown
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ BEEP(config, m_beep, 1000).add_route(ALL_OUTPUTS, "mono", 0.50); // frequency unknown
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
I8255(config, "ppi_1").out_pc_callback().set(FUNC(mbc200_state::p1_portc_w));
I8255(config, "ppi_2").in_pa_callback().set(FUNC(mbc200_state::p2_porta_r));
@@ -356,7 +355,7 @@ MACHINE_CONFIG_START(mbc200_state::mbc200)
/* software lists */
SOFTWARE_LIST(config, "flop_list").set_original("mbc200");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( mbc200 )
diff --git a/src/mame/drivers/mbee.cpp b/src/mame/drivers/mbee.cpp
index b20b3eb1064..0d7d36c9a6c 100644
--- a/src/mame/drivers/mbee.cpp
+++ b/src/mame/drivers/mbee.cpp
@@ -659,12 +659,12 @@ MACHINE_CONFIG_START(mbee_state::mbee)
m_pio->in_pb_callback().set(FUNC(mbee_state::pio_port_b_r));
m_pio->out_pb_callback().set(FUNC(mbee_state::pio_port_b_w));
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(250)) /* not accurate */
- MCFG_SCREEN_SIZE(64*8, 19*16) /* need at least 17 lines for NET */
- MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0, 19*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(mbee_state, screen_update_mbee)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(50);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(250)); /* not accurate */
+ m_screen->set_size(64*8, 19*16); /* need at least 17 lines for NET */
+ m_screen->set_visarea(0*8, 64*8-1, 0, 19*16-1);
+ m_screen->set_screen_update(FUNC(mbee_state::screen_update_mbee));
GFXDECODE(config, "gfxdecode", m_palette, gfx_mono);
@@ -717,12 +717,12 @@ MACHINE_CONFIG_START(mbee_state::mbeeic)
m_pio->in_pb_callback().set(FUNC(mbee_state::pio_port_b_r));
m_pio->out_pb_callback().set(FUNC(mbee_state::pio_port_b_w));
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(250)) /* not accurate */
- MCFG_SCREEN_SIZE(80*8, 310)
- MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 19*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(mbee_state, screen_update_mbee)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(50);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(250)); /* not accurate */
+ m_screen->set_size(80*8, 310);
+ m_screen->set_visarea(0, 80*8-1, 0, 19*16-1);
+ m_screen->set_screen_update(FUNC(mbee_state::screen_update_mbee));
GFXDECODE(config, "gfxdecode", m_palette, gfx_standard);
@@ -758,32 +758,32 @@ MACHINE_CONFIG_START(mbee_state::mbeeic)
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(mbee_state::mbeepc)
+void mbee_state::mbeepc(machine_config &config)
+{
mbeeic(config);
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP(mbeepc_mem)
- MCFG_DEVICE_IO_MAP(mbeepc_io)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &mbee_state::mbeepc_mem);
+ m_maincpu->set_addrmap(AS_IO, &mbee_state::mbeepc_io);
+}
-MACHINE_CONFIG_START(mbee_state::mbeeppc)
+void mbee_state::mbeeppc(machine_config &config)
+{
mbeeic(config);
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP(mbeeppc_mem)
- MCFG_DEVICE_IO_MAP(mbeeppc_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mbee_state::mbeeppc_mem);
+ m_maincpu->set_addrmap(AS_IO, &mbee_state::mbeeppc_io);
MCFG_VIDEO_START_OVERRIDE(mbee_state, 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);
m_rtc->irq().set(FUNC(mbee_state::rtc_irq_w));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mbee_state::mbee56)
+void mbee_state::mbee56(machine_config &config)
+{
mbeeic(config);
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP(mbee56_mem)
- MCFG_DEVICE_IO_MAP(mbee56_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mbee_state::mbee56_mem);
+ m_maincpu->set_addrmap(AS_IO, &mbee_state::mbee56_io);
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee56)
WD2793(config, m_fdc, 4_MHz_XTAL / 2);
@@ -792,24 +792,24 @@ MACHINE_CONFIG_START(mbee_state::mbee56)
m_fdc->enmf_rd_callback().set_constant(0);
FLOPPY_CONNECTOR(config, m_floppy0, mbee_floppies, "525qd", floppy_image_device::default_floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, m_floppy1, mbee_floppies, "525qd", floppy_image_device::default_floppy_formats).enable_sound(true);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mbee_state::mbee128)
+void mbee_state::mbee128(machine_config &config)
+{
mbee56(config);
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP(mbee256_mem)
- MCFG_DEVICE_IO_MAP(mbee128_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mbee_state::mbee256_mem);
+ m_maincpu->set_addrmap(AS_IO, &mbee_state::mbee128_io);
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee128)
MC146818(config, m_rtc, 32.768_kHz_XTAL);
m_rtc->irq().set(FUNC(mbee_state::rtc_irq_w));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mbee_state::mbee128p)
+void mbee_state::mbee128p(machine_config &config)
+{
mbeeppc(config);
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP(mbee256_mem)
- MCFG_DEVICE_IO_MAP(mbee128_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mbee_state::mbee256_mem);
+ m_maincpu->set_addrmap(AS_IO, &mbee_state::mbee128_io);
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee128)
WD2793(config, m_fdc, 4_MHz_XTAL / 2);
@@ -818,31 +818,31 @@ MACHINE_CONFIG_START(mbee_state::mbee128p)
m_fdc->enmf_rd_callback().set_constant(0);
FLOPPY_CONNECTOR(config, m_floppy0, mbee_floppies, "525qd", floppy_image_device::default_floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, m_floppy1, mbee_floppies, "525qd", floppy_image_device::default_floppy_formats).enable_sound(true);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mbee_state::mbee256)
+void mbee_state::mbee256(machine_config &config)
+{
mbee128p(config);
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP(mbee256_mem)
- MCFG_DEVICE_IO_MAP(mbee256_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mbee_state::mbee256_mem);
+ m_maincpu->set_addrmap(AS_IO, &mbee_state::mbee256_io);
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee256)
config.device_remove("fdc:0");
config.device_remove("fdc:1");
FLOPPY_CONNECTOR(config, m_floppy0, mbee_floppies, "35dd", floppy_image_device::default_floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, m_floppy1, mbee_floppies, "35dd", floppy_image_device::default_floppy_formats).enable_sound(true);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mbee_state::mbeett)
+void mbee_state::mbeett(machine_config &config)
+{
mbeeppc(config);
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP(mbeett_mem)
- MCFG_DEVICE_IO_MAP(mbeett_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mbee_state::mbeett_mem);
+ m_maincpu->set_addrmap(AS_IO, &mbee_state::mbeett_io);
MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbeett)
config.device_remove("quickload");
config.device_remove("quickload2");
SCC8530(config, "scc", 4000000); // clock unknown
-MACHINE_CONFIG_END
+}
/* Unused roms:
ROM_LOAD_OPTIONAL("net.rom", 0xe000, 0x1000, CRC(e14aac4c) SHA1(330902cf47f53c22c85003a620f7d7d3261ebb67) )
diff --git a/src/mame/drivers/mc1000.cpp b/src/mame/drivers/mc1000.cpp
index 3c6b2c03058..0e97e92265d 100644
--- a/src/mame/drivers/mc1000.cpp
+++ b/src/mame/drivers/mc1000.cpp
@@ -541,13 +541,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(mc1000_state::ne555_tick)
m_maincpu->set_input_line(INPUT_LINE_IRQ0, param);
}
-MACHINE_CONFIG_START(mc1000_state::mc1000)
-
+void mc1000_state::mc1000(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(Z80_TAG, Z80, 3579545)
- MCFG_DEVICE_PROGRAM_MAP(mc1000_mem)
- MCFG_DEVICE_OPCODES_MAP(mc1000_banking_mem)
- MCFG_DEVICE_IO_MAP(mc1000_io)
+ Z80(config, m_maincpu, 3579545);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mc1000_state::mc1000_mem);
+ m_maincpu->set_addrmap(AS_OPCODES, &mc1000_state::mc1000_banking_mem);
+ m_maincpu->set_addrmap(AS_IO, &mc1000_state::mc1000_io);
/* timers */
timer_device &ne555clear(TIMER(config, "ne555clear"));
@@ -592,7 +592,7 @@ MACHINE_CONFIG_START(mc1000_state::mc1000)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("16K").set_extra_options("48K");
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/mc1502.cpp b/src/mame/drivers/mc1502.cpp
index e7ae929465e..21dc9813aeb 100644
--- a/src/mame/drivers/mc1502.cpp
+++ b/src/mame/drivers/mc1502.cpp
@@ -229,7 +229,8 @@ static INPUT_PORTS_START( mc1502 )
PORT_INCLUDE( mc7007_3_keyboard )
INPUT_PORTS_END
-MACHINE_CONFIG_START(mc1502_state::mc1502)
+void mc1502_state::mc1502(machine_config &config)
+{
I8088(config, m_maincpu, XTAL(16'000'000)/3);
m_maincpu->set_addrmap(AS_PROGRAM, &mc1502_state::mc1502_map);
m_maincpu->set_addrmap(AS_IO, &mc1502_state::mc1502_io);
@@ -285,9 +286,9 @@ MACHINE_CONFIG_START(mc1502_state::mc1502)
isa.irq6_callback().set(m_pic8259, FUNC(pic8259_device::ir6_w));
isa.irq7_callback().set(m_pic8259, FUNC(pic8259_device::ir7_w));
- MCFG_DEVICE_ADD("board0", ISA8_SLOT, 0, "isa", mc1502_isa8_cards, "cga_mc1502", true) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "isa", mc1502_isa8_cards, "fdc", false)
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "isa", mc1502_isa8_cards, "rom", false)
+ ISA8_SLOT(config, "board0", 0, "isa", mc1502_isa8_cards, "cga_mc1502", true); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa1", 0, "isa", mc1502_isa8_cards, "fdc", false);
+ ISA8_SLOT(config, "isa2", 0, "isa", mc1502_isa8_cards, "rom", false);
SPEAKER(config, "mono").front_center();
WAVE(config, "wave", m_cassette); // FIXME: really no output routes for the cassette sound?
@@ -311,7 +312,7 @@ MACHINE_CONFIG_START(mc1502_state::mc1502)
// SOFTWARE_LIST(config, "cass_list").set_original("mc1502_cass");
RAM(config, RAM_TAG).set_default_size("608K").set_extra_options("96K"); /* 96 base + 512 on expansion card */
-MACHINE_CONFIG_END
+}
/*
diff --git a/src/mame/drivers/mc8020.cpp b/src/mame/drivers/mc8020.cpp
index 1a5d8dd041f..137fd859428 100644
--- a/src/mame/drivers/mc8020.cpp
+++ b/src/mame/drivers/mc8020.cpp
@@ -296,7 +296,8 @@ static const z80_daisy_config daisy_chain[] =
{ nullptr }
};
-MACHINE_CONFIG_START(mc8020_state::mc8020)
+void mc8020_state::mc8020(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(2'457'600));
m_maincpu->set_addrmap(AS_PROGRAM, &mc8020_state::mem_map);
@@ -304,13 +305,13 @@ MACHINE_CONFIG_START(mc8020_state::mc8020)
m_maincpu->set_daisy_config(daisy_chain);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(32*6, 16*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 32*6-1, 0, 16*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mc8020_state, screen_update_mc8020)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(32*6, 16*8);
+ screen.set_visarea(0, 32*6-1, 0, 16*8-1);
+ screen.set_screen_update(FUNC(mc8020_state::screen_update_mc8020));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -325,7 +326,7 @@ MACHINE_CONFIG_START(mc8020_state::mc8020)
ctc.set_clk<2>(XTAL(2'457'600) / 64); // guess
ctc.zc_callback<2>().set("ctc", FUNC(z80ctc_device::trg1));
ctc.zc_callback<2>().append("ctc", FUNC(z80ctc_device::trg0));
-MACHINE_CONFIG_END
+}
/* ROM definition */
diff --git a/src/mame/drivers/mc8030.cpp b/src/mame/drivers/mc8030.cpp
index cffbecdc3fb..29d4ad16c2e 100644
--- a/src/mame/drivers/mc8030.cpp
+++ b/src/mame/drivers/mc8030.cpp
@@ -184,7 +184,8 @@ static const z80_daisy_config daisy_chain[] =
};
-MACHINE_CONFIG_START(mc8030_state::mc8030)
+void mc8030_state::mc8030(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(2'457'600));
m_maincpu->set_addrmap(AS_PROGRAM, &mc8030_state::mem_map);
@@ -192,13 +193,13 @@ MACHINE_CONFIG_START(mc8030_state::mc8030)
m_maincpu->set_daisy_config(daisy_chain);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(mc8030_state, screen_update_mc8030)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 0, 256-1);
+ screen.set_screen_update(FUNC(mc8030_state::screen_update_mc8030));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -240,7 +241,7 @@ MACHINE_CONFIG_START(mc8030_state::mc8030)
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "keyboard"));
rs232.rxd_handler().set("asp_sio", FUNC(z80sio_device::rxa_w));
rs232.cts_handler().set("asp_sio", FUNC(z80sio_device::ctsa_w));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( mc8030 )
diff --git a/src/mame/drivers/mcb216.cpp b/src/mame/drivers/mcb216.cpp
index a6ca9952aec..43e0e5022aa 100644
--- a/src/mame/drivers/mcb216.cpp
+++ b/src/mame/drivers/mcb216.cpp
@@ -119,39 +119,41 @@ MACHINE_RESET_MEMBER( mcb216_state, cb308 )
m_maincpu->set_state_int(Z80_PC, 0xe000);
}
-MACHINE_CONFIG_START(mcb216_state::mcb216)
+void mcb216_state::mcb216(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 8_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(mcb216_mem)
- MCFG_DEVICE_IO_MAP(mcb216_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(mcb216_state, irq_callback)
+ Z80(config, m_maincpu, 8_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mcb216_state::mcb216_mem);
+ m_maincpu->set_addrmap(AS_IO, &mcb216_state::mcb216_io);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(mcb216_state::irq_callback));
MCFG_MACHINE_RESET_OVERRIDE(mcb216_state, mcb216)
TMS5501(config, m_tms5501, 8_MHz_XTAL / 4);
m_tms5501->xmt_callback().set("rs232", FUNC(rs232_port_device::write_txd));
- m_tms5501->int_callback().set_inputline("maincpu", 0);
+ m_tms5501->int_callback().set_inputline(m_maincpu, 0);
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
rs232.rxd_handler().set(m_tms5501, FUNC(tms5501_device::rcv_w));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mcb216_state::cb308)
+void mcb216_state::cb308(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 8_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(cb308_mem)
- MCFG_DEVICE_IO_MAP(mcb216_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(mcb216_state, irq_callback)
+ Z80(config, m_maincpu, 8_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mcb216_state::cb308_mem);
+ m_maincpu->set_addrmap(AS_IO, &mcb216_state::mcb216_io);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(mcb216_state::irq_callback));
MCFG_MACHINE_RESET_OVERRIDE(mcb216_state, cb308)
TMS5501(config, m_tms5501, 8_MHz_XTAL / 4);
m_tms5501->xmt_callback().set("rs232", FUNC(rs232_port_device::write_txd));
- m_tms5501->int_callback().set_inputline("maincpu", 0);
+ m_tms5501->int_callback().set_inputline(m_maincpu, 0);
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
rs232.rxd_handler().set(m_tms5501, FUNC(tms5501_device::rcv_w));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( mcb216 )
diff --git a/src/mame/drivers/mcr3.cpp b/src/mame/drivers/mcr3.cpp
index 4a5cf4f5dfa..193a58241fc 100644
--- a/src/mame/drivers/mcr3.cpp
+++ b/src/mame/drivers/mcr3.cpp
@@ -1077,8 +1077,8 @@ GFXDECODE_END
*************************************/
/* Core MCR monoboard system with no sound */
-MACHINE_CONFIG_START(mcr3_state::mcrmono)
-
+void mcr3_state::mcrmono(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, MASTER_CLOCK/4);
m_maincpu->set_addrmap(AS_PROGRAM, &mcr3_state::mcrmono_map);
@@ -1100,32 +1100,33 @@ MACHINE_CONFIG_START(mcr3_state::mcrmono)
SPEAKER(config, "rspeaker").front_right();
/* video hardware */
- MCFG_SCREEN_ADD(m_screen, RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_REFRESH_RATE(30)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- 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(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ m_screen->set_refresh_hz(30);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ m_screen->set_size(32*16, 30*16);
+ m_screen->set_visarea(0*16, 32*16-1, 0*16, 30*16-1);
+ m_screen->set_screen_update(FUNC(mcr3_state::screen_update_mcr3));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mcr3);
PALETTE(config, m_palette).set_entries(64);
-MACHINE_CONFIG_END
+}
/*************************************/
/* Sarge/Demolition Derby Mono/Max RPM = MCR monoboard with Turbo Cheap Squeak */
-MACHINE_CONFIG_START(mcr3_state::mono_tcs)
+void mcr3_state::mono_tcs(machine_config &config)
+{
mcrmono(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("tcs", MIDWAY_TURBO_CHEAP_SQUEAK)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ MIDWAY_TURBO_CHEAP_SQUEAK(config, m_turbo_cheap_squeak);
+ m_turbo_cheap_squeak->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ m_turbo_cheap_squeak->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+}
void mcr3_state::maxrpm(machine_config &config)
{
@@ -1140,51 +1141,53 @@ void mcr3_state::maxrpm(machine_config &config)
/* Rampage/Power Drive/Star Guards = MCR monoboard with Sounds Good */
-MACHINE_CONFIG_START(mcr3_state::mono_sg)
+void mcr3_state::mono_sg(machine_config &config)
+{
mcrmono(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("sg", MIDWAY_SOUNDS_GOOD)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ MIDWAY_SOUNDS_GOOD(config, m_sounds_good);
+ m_sounds_good->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ m_sounds_good->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+}
/*************************************/
/* Core scrolling system with SSIO sound */
-MACHINE_CONFIG_START(mcr3_state::mcrscroll)
+void mcr3_state::mcrscroll(machine_config &config)
+{
mcrmono(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("ssio", MIDWAY_SSIO)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
+ MIDWAY_SSIO(config, m_ssio);
+ m_ssio->add_route(0, "lspeaker", 1.0);
+ m_ssio->add_route(1, "rspeaker", 1.0);
m_maincpu->set_addrmap(AS_PROGRAM, &mcr3_state::spyhunt_map);
m_maincpu->set_addrmap(AS_IO, &mcr3_state::spyhunt_portmap);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- 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)
+ m_screen->set_size(30*16, 30*16);
+ m_screen->set_visarea(0, 30*16-1, 0, 30*16-1);
+ m_screen->set_screen_update(FUNC(mcr3_state::screen_update_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)
-MACHINE_CONFIG_END
+}
/* Spy Hunter = scrolling system with an SSIO and a cheap squeak deluxe */
-MACHINE_CONFIG_START(mcr3_state::mcrsc_csd)
+void mcr3_state::mcrsc_csd(machine_config &config)
+{
mcrscroll(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("csd", MIDWAY_CHEAP_SQUEAK_DELUXE)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ MIDWAY_CHEAP_SQUEAK_DELUXE(config, m_cheap_squeak_deluxe);
+ m_cheap_squeak_deluxe->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ m_cheap_squeak_deluxe->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
CD4099(config, m_lamplatch); // U1 on Lamp Driver Board
m_lamplatch->q_out_cb<0>().set_output("lamp0");
@@ -1195,12 +1198,7 @@ MACHINE_CONFIG_START(mcr3_state::mcrsc_csd)
m_lamplatch->q_out_cb<5>().set_output("lamp5");
m_lamplatch->q_out_cb<6>().set_output("lamp6");
m_lamplatch->q_out_cb<7>().set_output("lamp7");
-MACHINE_CONFIG_END
-
-
-
-
-
+}
/*************************************
diff --git a/src/mame/drivers/mcr68.cpp b/src/mame/drivers/mcr68.cpp
index 0116142792a..e8367ad72bf 100644
--- a/src/mame/drivers/mcr68.cpp
+++ b/src/mame/drivers/mcr68.cpp
@@ -896,11 +896,11 @@ GFXDECODE_END
=================================================================*/
-MACHINE_CONFIG_START(mcr68_state::mcr68)
-
+void mcr68_state::mcr68(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 7723800)
- MCFG_DEVICE_PROGRAM_MAP(mcr68_map)
+ M68000(config, m_maincpu, 7723800);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mcr68_state::mcr68_map);
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8);
MCFG_MACHINE_START_OVERRIDE(mcr68_state,mcr68)
@@ -910,13 +910,13 @@ MACHINE_CONFIG_START(mcr68_state::mcr68)
m_ptm->irq_callback().set_inputline("maincpu", 2);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(30)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*16, 30*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 32*16-1, 0, 30*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(mcr68_state, screen_update_mcr68)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(30);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ m_screen->set_size(32*16, 30*16);
+ m_screen->set_visarea(0, 32*16-1, 0, 30*16-1);
+ m_screen->set_screen_update(FUNC(mcr68_state::screen_update_mcr68));
+ m_screen->set_palette("palette");
TIMER(config, "scantimer").configure_scanline(FUNC(mcr68_state::scanline_cb), "screen", 0, 1);
@@ -927,7 +927,7 @@ MACHINE_CONFIG_START(mcr68_state::mcr68)
/* sound hardware -- determined by specific machine */
SPEAKER(config, "speaker").front_center();
-MACHINE_CONFIG_END
+}
void mcr68_state::xenophob(machine_config &config)
@@ -949,56 +949,53 @@ void mcr68_state::intlaser(machine_config &config)
}
-MACHINE_CONFIG_START(mcr68_state::spyhunt2)
+void mcr68_state::spyhunt2(machine_config &config)
+{
mcr68(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_sounds_good, MIDWAY_SOUNDS_GOOD)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DEVICE_ADD("tcs", MIDWAY_TURBO_CHEAP_SQUEAK)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ MIDWAY_SOUNDS_GOOD(config, m_sounds_good).add_route(ALL_OUTPUTS, "speaker", 1.0);
+ MIDWAY_TURBO_CHEAP_SQUEAK(config, m_turbo_cheap_squeak).add_route(ALL_OUTPUTS, "speaker", 1.0);
ADC0844(config, m_adc);
m_adc->ch1_callback().set_ioport("AN1");
m_adc->ch2_callback().set_ioport("AN2");
m_adc->ch3_callback().set_ioport("AN3");
m_adc->ch4_callback().set_ioport("AN4");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mcr68_state::archrivl)
+void mcr68_state::archrivl(machine_config &config)
+{
mcr68(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("cvsd", WILLIAMS_CVSD_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ WILLIAMS_CVSD_SOUND(config, m_cvsd_sound).add_route(ALL_OUTPUTS, "speaker", 1.0);
+}
-MACHINE_CONFIG_START(mcr68_state::pigskin)
+void mcr68_state::pigskin(machine_config &config)
+{
mcr68(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("cvsd", WILLIAMS_CVSD_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ WILLIAMS_CVSD_SOUND(config, m_cvsd_sound).add_route(ALL_OUTPUTS, "speaker", 1.0);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(pigskin_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &mcr68_state::pigskin_map);
+}
-MACHINE_CONFIG_START(mcr68_state::trisport)
+void mcr68_state::trisport(machine_config &config)
+{
mcr68(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("cvsd", WILLIAMS_CVSD_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ WILLIAMS_CVSD_SOUND(config, m_cvsd_sound).add_route(ALL_OUTPUTS, "speaker", 1.0);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(trisport_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mcr68_state::trisport_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/meadwttl.cpp b/src/mame/drivers/meadwttl.cpp
index 71888ff3aa7..aa4cd9a537d 100644
--- a/src/mame/drivers/meadwttl.cpp
+++ b/src/mame/drivers/meadwttl.cpp
@@ -90,11 +90,11 @@ void meadwttl_state::video_start()
{
}
-MACHINE_CONFIG_START(meadwttl_state::meadows)
-
+void meadwttl_state::meadows(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK)
- MCFG_NETLIST_SETUP(meadows)
+ NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK);
+ m_maincpu->set_constructor(netlist_meadows);
/* video hardware */
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
@@ -104,7 +104,7 @@ MACHINE_CONFIG_START(meadwttl_state::meadows)
m_video->set_vert_params(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL);
m_video->set_fieldcount(1);
m_video->set_threshold(0.30);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/mediagx.cpp b/src/mame/drivers/mediagx.cpp
index c1e7572cfbc..27831b89759 100644
--- a/src/mame/drivers/mediagx.cpp
+++ b/src/mame/drivers/mediagx.cpp
@@ -883,10 +883,10 @@ void mediagx_state::ramdac_map(address_map &map)
MACHINE_CONFIG_START(mediagx_state::mediagx)
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, MEDIAGX, 166000000)
- MCFG_DEVICE_PROGRAM_MAP(mediagx_map)
- MCFG_DEVICE_IO_MAP(mediagx_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
+ MEDIAGX(config, m_maincpu, 166000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mediagx_state::mediagx_map);
+ m_maincpu->set_addrmap(AS_IO, &mediagx_state::mediagx_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb));
pcat_common(config);
@@ -902,25 +902,23 @@ MACHINE_CONFIG_START(mediagx_state::mediagx)
m_ramdac->set_addrmap(0, &mediagx_state::ramdac_map);
/* video hardware */
- MCFG_SCREEN_ADD(m_screen, RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 239)
- MCFG_SCREEN_UPDATE_DRIVER(mediagx_state, screen_update)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(640, 480);
+ m_screen->set_visarea(0, 639, 0, 239);
+ m_screen->set_screen_update(FUNC(mediagx_state::screen_update));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cga);
- MCFG_PALETTE_ADD(m_palette, 256)
+ PALETTE(config, m_palette).set_entries(256);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD(m_dmadac[0], DMADAC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ DMADAC(config, m_dmadac[0]).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
- MCFG_DEVICE_ADD(m_dmadac[1], DMADAC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ DMADAC(config, m_dmadac[1]).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/megadriv_acbl.cpp b/src/mame/drivers/megadriv_acbl.cpp
index de9c20e5b1a..3933e54e55b 100644
--- a/src/mame/drivers/megadriv_acbl.cpp
+++ b/src/mame/drivers/megadriv_acbl.cpp
@@ -287,12 +287,12 @@ void md_boot_state::md_bootleg_map(address_map &map)
map(0xe00000, 0xe0ffff).ram().mirror(0x1f0000).share("megadrive_ram");
}
-MACHINE_CONFIG_START(md_boot_state::md_bootleg)
+void md_boot_state::md_bootleg(machine_config &config)
+{
md_ntsc(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(md_bootleg_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &md_boot_state::md_bootleg_map);
+}
/*************************************
*
@@ -792,10 +792,11 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(md_boot_state::megadrvb)
+void md_boot_state::megadrvb(machine_config &config)
+{
md_ntsc(config);
MCFG_MACHINE_START_OVERRIDE(md_boot_state, md_bootleg)
-MACHINE_CONFIG_END
+}
MACHINE_START_MEMBER(md_boot_state, md_6button)
{
@@ -811,10 +812,11 @@ MACHINE_START_MEMBER(md_boot_state, md_6button)
m_io_timeout[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(md_base_state::io_timeout_timer_callback),this), (void*)(uintptr_t)i);
}
-MACHINE_CONFIG_START(md_boot_state::megadrvb_6b)
+void md_boot_state::megadrvb_6b(machine_config &config)
+{
md_ntsc(config);
MCFG_MACHINE_START_OVERRIDE(md_boot_state, md_6button)
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/megadriv_rad.cpp b/src/mame/drivers/megadriv_rad.cpp
index 60597e07a53..c41967b0923 100644
--- a/src/mame/drivers/megadriv_rad.cpp
+++ b/src/mame/drivers/megadriv_rad.cpp
@@ -133,29 +133,29 @@ MACHINE_RESET_MEMBER(megadriv_radica_state, megadriv_radica)
m_maincpu->reset();
}
-MACHINE_CONFIG_START(megadriv_radica_state::megadriv_radica_3button_ntsc)
+void megadriv_radica_state::megadriv_radica_3button_ntsc(machine_config &config)
+{
md_ntsc(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(megadriv_radica_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &megadriv_radica_state::megadriv_radica_map);
MCFG_MACHINE_START_OVERRIDE(megadriv_radica_state, megadriv_radica_3button)
MCFG_MACHINE_RESET_OVERRIDE(megadriv_radica_state, megadriv_radica)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(megadriv_radica_state::megadriv_radica_3button_pal)
+void megadriv_radica_state::megadriv_radica_3button_pal(machine_config &config)
+{
md_pal(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(megadriv_radica_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &megadriv_radica_state::megadriv_radica_map);
MCFG_MACHINE_START_OVERRIDE(megadriv_radica_state, megadriv_radica_3button)
MCFG_MACHINE_RESET_OVERRIDE(megadriv_radica_state, megadriv_radica)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(megadriv_radica_state::megadriv_radica_6button_pal)
+void megadriv_radica_state::megadriv_radica_6button_pal(machine_config &config)
+{
md_pal(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(megadriv_radica_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &megadriv_radica_state::megadriv_radica_map);
MCFG_MACHINE_START_OVERRIDE(megadriv_radica_state, megadriv_radica_6button)
MCFG_MACHINE_RESET_OVERRIDE(megadriv_radica_state, megadriv_radica)
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/megaplay.cpp b/src/mame/drivers/megaplay.cpp
index 52fece47612..29e51560ca4 100644
--- a/src/mame/drivers/megaplay.cpp
+++ b/src/mame/drivers/megaplay.cpp
@@ -662,7 +662,8 @@ MACHINE_RESET_MEMBER(mplay_state,megaplay)
MACHINE_RESET_CALL_MEMBER(megadriv);
}
-MACHINE_CONFIG_START(mplay_state::megaplay)
+void mplay_state::megaplay(machine_config &config)
+{
/* basic machine hardware */
md_ntsc(config);
@@ -691,11 +692,10 @@ MACHINE_CONFIG_START(mplay_state::megaplay)
io2.out_porte_cb().set(FUNC(mplay_state::bios_6404_w));
/* New update functions to handle the extra layer */
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_RAW_PARAMS(XTAL(10'738'635)/2, \
+ subdevice<screen_device>("megadriv")->set_raw(XTAL(10'738'635)/2, \
sega315_5124_device::WIDTH, sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH, sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH + 256, \
- sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT + 224)
- MCFG_SCREEN_UPDATE_DRIVER(mplay_state, screen_update_megplay)
+ sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT + 224);
+ subdevice<screen_device>("megadriv")->set_screen_update(FUNC(mplay_state::screen_update_megplay));
// Megaplay has an additional SMS VDP as an overlay
SEGA315_5246(config, m_vdp1, MASTER_CLOCK / 5); /* ?? */
@@ -704,7 +704,7 @@ MACHINE_CONFIG_START(mplay_state::megaplay)
m_vdp1->irq().set_inputline(m_bioscpu, 0);
m_vdp1->add_route(ALL_OUTPUTS, "lspeaker", 0.25);
m_vdp1->add_route(ALL_OUTPUTS, "rspeaker", 0.25);
-MACHINE_CONFIG_END
+}
/* MegaPlay Games - Modified Genesis games */
diff --git a/src/mame/drivers/megatech.cpp b/src/mame/drivers/megatech.cpp
index 996f217dbe5..11731195cb8 100644
--- a/src/mame/drivers/megatech.cpp
+++ b/src/mame/drivers/megatech.cpp
@@ -681,7 +681,8 @@ uint32_t mtech_state::screen_update_menu(screen_device &screen, bitmap_rgb32 &bi
}
-MACHINE_CONFIG_START(mtech_state::megatech)
+void mtech_state::megatech(machine_config &config)
+{
/* basic machine hardware */
md_ntsc(config);
@@ -707,21 +708,21 @@ MACHINE_CONFIG_START(mtech_state::megatech)
config.set_default_layout(layout_dualhovu);
- MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_RAW_PARAMS(XTAL(10'738'635)/2, \
+ screen_device &screen(*subdevice<screen_device>("megadriv"));
+ screen.set_raw(XTAL(10'738'635)/2, \
sega315_5124_device::WIDTH , sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH, sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH + 256, \
- sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT + 224)
- MCFG_SCREEN_UPDATE_DRIVER(mtech_state, screen_update_main)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mtech_state, screen_vblank_main))
+ sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT + 224);
+ screen.set_screen_update(FUNC(mtech_state::screen_update_main));
+ screen.screen_vblank().set(FUNC(mtech_state::screen_vblank_main));
m_vdp->irq().set_inputline(m_z80snd, 0);
- MCFG_SCREEN_ADD("menu", RASTER)
+ screen_device &menu(SCREEN(config, "menu", SCREEN_TYPE_RASTER));
// check frq
- MCFG_SCREEN_RAW_PARAMS(XTAL(10'738'635)/2, \
+ menu.set_raw(XTAL(10'738'635)/2, \
sega315_5124_device::WIDTH , sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH, sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH + 256, \
- sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT + 224)
- MCFG_SCREEN_UPDATE_DRIVER(mtech_state, screen_update_menu)
+ sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_224_TBORDER_HEIGHT + 224);
+ menu.set_screen_update(FUNC(mtech_state::screen_update_menu));
SEGA315_5246(config, m_vdp1, MASTER_CLOCK / 5); /* ?? */
m_vdp1->set_screen("menu");
@@ -729,7 +730,7 @@ MACHINE_CONFIG_START(mtech_state::megatech)
m_vdp1->irq().set_inputline(m_bioscpu, 0);
m_vdp1->add_route(ALL_OUTPUTS, "lspeaker", 0.25);
m_vdp1->add_route(ALL_OUTPUTS, "rspeaker", 0.25);
-MACHINE_CONFIG_END
+}
image_init_result mtech_state::load_cart(device_image_interface &image, generic_slot_device *slot, int gameno)
diff --git a/src/mame/drivers/megazone.cpp b/src/mame/drivers/megazone.cpp
index 2c3ff06eaaf..52548698b5e 100644
--- a/src/mame/drivers/megazone.cpp
+++ b/src/mame/drivers/megazone.cpp
@@ -293,15 +293,15 @@ WRITE_LINE_MEMBER(megazone_state::vblank_irq)
}
-MACHINE_CONFIG_START(megazone_state::megazone)
-
+void megazone_state::megazone(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", KONAMI1, XTAL(18'432'000)/9) /* 2.048 MHz */
- MCFG_DEVICE_PROGRAM_MAP(megazone_map)
+ KONAMI1(config, m_maincpu, XTAL(18'432'000)/9); /* 2.048 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &megazone_state::megazone_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(18'432'000)/6) /* Z80 Clock is derived from the H1 signal */
- MCFG_DEVICE_PROGRAM_MAP(megazone_sound_map)
- MCFG_DEVICE_IO_MAP(megazone_sound_io_map)
+ Z80(config, m_audiocpu, XTAL(18'432'000)/6); /* Z80 Clock is derived from the H1 signal */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &megazone_state::megazone_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &megazone_state::megazone_sound_io_map);
I8039(config, m_daccpu, XTAL(14'318'181)/2); /* 7.15909MHz */
m_daccpu->set_addrmap(AS_PROGRAM, &megazone_state::megazone_i8039_map);
@@ -320,14 +320,14 @@ MACHINE_CONFIG_START(megazone_state::megazone)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(36*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(megazone_state, screen_update_megazone)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, megazone_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(36*8, 32*8);
+ screen.set_visarea(0*8, 36*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(megazone_state::screen_update_megazone));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(megazone_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_megazone);
PALETTE(config, m_palette, FUNC(megazone_state::megazone_palette), 16*16+16*16, 32);
@@ -349,13 +349,10 @@ MACHINE_CONFIG_START(megazone_state::megazone)
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
- MCFG_DEVICE_ADD("filter.0.0", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DEVICE_ADD("filter.0.1", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
- MCFG_DEVICE_ADD("filter.0.2", FILTER_RC)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ FILTER_RC(config, m_filter[0]).add_route(ALL_OUTPUTS, "speaker", 1.0);
+ FILTER_RC(config, m_filter[1]).add_route(ALL_OUTPUTS, "speaker", 1.0);
+ FILTER_RC(config, m_filter[2]).add_route(ALL_OUTPUTS, "speaker", 1.0);
+}
diff --git a/src/mame/drivers/meijinsn.cpp b/src/mame/drivers/meijinsn.cpp
index bb3ffb08ee6..044f9e47e00 100644
--- a/src/mame/drivers/meijinsn.cpp
+++ b/src/mame/drivers/meijinsn.cpp
@@ -357,27 +357,27 @@ void meijinsn_state::machine_reset()
}
-MACHINE_CONFIG_START(meijinsn_state::meijinsn)
-
+void meijinsn_state::meijinsn(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 9000000 )
- MCFG_DEVICE_PROGRAM_MAP(meijinsn_map)
+ M68000(config, m_maincpu, 9000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &meijinsn_state::meijinsn_map);
TIMER(config, "scantimer").configure_scanline(FUNC(meijinsn_state::meijinsn_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("audiocpu", Z80, 4000000)
- MCFG_DEVICE_PROGRAM_MAP(meijinsn_sound_map)
- MCFG_DEVICE_IO_MAP(meijinsn_sound_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(meijinsn_state, irq0_line_hold, 160*60)
+ z80_device &audiocpu(Z80(config, "audiocpu", 4000000));
+ audiocpu.set_addrmap(AS_PROGRAM, &meijinsn_state::meijinsn_sound_map);
+ audiocpu.set_addrmap(AS_IO, &meijinsn_state::meijinsn_sound_io_map);
+ audiocpu.set_periodic_int(FUNC(meijinsn_state::irq0_line_hold), attotime::from_hz(160*60));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(12, 243, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(meijinsn_state, screen_update_meijinsn)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(12, 243, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(meijinsn_state::screen_update_meijinsn));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(meijinsn_state::meijinsn_palette), 32);
@@ -389,7 +389,7 @@ MACHINE_CONFIG_START(meijinsn_state::meijinsn)
ay8910_device &aysnd(AY8910(config, "aysnd", 2000000));
aysnd.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read));
aysnd.add_route(ALL_OUTPUTS, "mono", 0.75);
-MACHINE_CONFIG_END
+}
ROM_START( meijinsn )
diff --git a/src/mame/drivers/mephisto.cpp b/src/mame/drivers/mephisto.cpp
index 6da04074995..10831424658 100644
--- a/src/mame/drivers/mephisto.cpp
+++ b/src/mame/drivers/mephisto.cpp
@@ -294,10 +294,11 @@ void mephisto_state::machine_reset()
}
-MACHINE_CONFIG_START(mephisto_state::mephisto)
+void mephisto_state::mephisto(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",M65C02,4915200) /* 65C02 */
- MCFG_DEVICE_PROGRAM_MAP(mephisto_mem)
+ M65C02(config, m_maincpu, 4915200); /* 65C02 */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::mephisto_mem);
HC259(config, m_outlatch);
m_outlatch->q_out_cb<0>().set_output("led100");
@@ -311,45 +312,45 @@ MACHINE_CONFIG_START(mephisto_state::mephisto)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("beeper", BEEP, 3250)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 1.0);
TIMER(config, "nmi_timer").configure_periodic(FUNC(mephisto_state::update_nmi), attotime::from_hz(600));
MEPHISTO_SENSORS_BOARD(config, "board", 0);
config.set_default_layout(layout_mephisto);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mephisto_state::rebel5)
+void mephisto_state::rebel5(machine_config &config)
+{
mephisto(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(rebel5_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::rebel5_mem);
config.device_remove("nmi_timer");
TIMER(config, "nmi_timer_r5").configure_periodic(FUNC(mephisto_state::update_nmi_r5), attotime::from_hz(600));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mephisto_state::mm2)
+void mephisto_state::mm2(machine_config &config)
+{
mephisto(config);
- MCFG_DEVICE_REPLACE("maincpu", M65C02, 3700000)
- MCFG_DEVICE_PROGRAM_MAP(mm2_mem)
+ m_maincpu->set_clock(3700000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::mm2_mem);
MCFG_MACHINE_START_OVERRIDE(mephisto_state, mm2 )
config.device_remove("nmi_timer");
TIMER(config, "irq_timer").configure_periodic(FUNC(mephisto_state::update_irq), attotime::from_hz(450));
m_outlatch->q_out_cb<7>().set(FUNC(mephisto_state::write_led7)).invert();
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mephisto_state::mm4tk)
+void mephisto_state::mm4tk(machine_config &config)
+{
mephisto(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_REPLACE("maincpu", M65C02, 18000000)
- MCFG_DEVICE_PROGRAM_MAP(mephisto_mem)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(18000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::mephisto_mem);
+}
ROM_START(rebel5)
ROM_REGION(0x10000,"maincpu",0)
diff --git a/src/mame/drivers/mephisto_montec.cpp b/src/mame/drivers/mephisto_montec.cpp
index ed9c6518243..eec48437d00 100644
--- a/src/mame/drivers/mephisto_montec.cpp
+++ b/src/mame/drivers/mephisto_montec.cpp
@@ -459,69 +459,69 @@ static INPUT_PORTS_START( smondial2 )
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Clear") PORT_CODE(KEYCODE_BACKSPACE)
INPUT_PORTS_END
-MACHINE_CONFIG_START(mephisto_montec_state::montec)
- MCFG_DEVICE_ADD("maincpu", M65C02, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP( montec_mem )
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mephisto_montec_state, nmi_line_assert, XTAL(4'000'000) / (1 << 13))
+void mephisto_montec_state::montec(machine_config &config)
+{
+ M65C02(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_montec_state::montec_mem);
+ m_maincpu->set_periodic_int(FUNC(mephisto_montec_state::nmi_line_assert), attotime::from_hz(XTAL(4'000'000) / (1 << 13)));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("beeper", BEEP, 3250)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ BEEP(config, m_beeper, 3250).add_route(ALL_OUTPUTS, "mono", 1.0);
MEPHISTO_SENSORS_BOARD(config, m_board, 0);
config.set_default_layout(layout_mephisto_montec);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mephisto_montec_state::monteciv)
+void mephisto_montec_state::monteciv(machine_config &config)
+{
montec(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK( XTAL(8'000'000) )
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(XTAL(8'000'000));
+}
-MACHINE_CONFIG_START(mephisto_montec_state::megaiv)
+void mephisto_montec_state::megaiv(machine_config &config)
+{
montec(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK( XTAL(4'915'200) )
- MCFG_DEVICE_PROGRAM_MAP(megaiv_mem)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mephisto_montec_state, nmi_line_pulse, XTAL(4'915'200) / (1 << 13))
+ m_maincpu->set_clock(XTAL(4'915'200));
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_montec_state::megaiv_mem);
+ m_maincpu->set_periodic_int(FUNC(mephisto_montec_state::nmi_line_pulse), attotime::from_hz(XTAL(4'915'200) / (1 << 13)));
MEPHISTO_BUTTONS_BOARD(config.replace(), m_board, 0);
m_board->set_disable_leds(true);
config.set_default_layout(layout_mephisto_megaiv);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mephisto_montec_state::mondial2)
+void mephisto_montec_state::mondial2(machine_config &config)
+{
megaiv(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK( XTAL(2'000'000) )
- MCFG_DEVICE_PROGRAM_MAP(mondial2_mem)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mephisto_montec_state, nmi_line_pulse, XTAL(2'000'000) / (1 << 12))
+ m_maincpu->set_clock(XTAL(2'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_montec_state::mondial2_mem);
+ m_maincpu->set_periodic_int(FUNC(mephisto_montec_state::nmi_line_pulse), attotime::from_hz(XTAL(2'000'000) / (1 << 12)));
TIMER(config, "refresh_leds").configure_periodic(FUNC(mephisto_montec_state::refresh_leds), attotime::from_hz(10));
config.set_default_layout(layout_mephisto_mondial2);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mephisto_montec_state::smondial)
+void mephisto_montec_state::smondial(machine_config &config)
+{
megaiv(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK( XTAL(4'000'000) )
- MCFG_DEVICE_PROGRAM_MAP(smondial_mem)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mephisto_montec_state, nmi_line_pulse, XTAL(4'000'000) / (1 << 13))
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_montec_state::smondial_mem);
+ m_maincpu->set_periodic_int(FUNC(mephisto_montec_state::nmi_line_pulse), attotime::from_hz(XTAL(4'000'000) / (1 << 13)));
+}
-MACHINE_CONFIG_START(mephisto_montec_state::smondial2)
+void mephisto_montec_state::smondial2(machine_config &config)
+{
smondial(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(smondial2_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_montec_state::smondial2_mem);
GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "smondial2_cart");
SOFTWARE_LIST(config, "cart_list").set_original("smondial2");
config.set_default_layout(layout_mephisto_smondial2);
-MACHINE_CONFIG_END
+}
ROM_START(megaiv)
diff --git a/src/mame/drivers/merit.cpp b/src/mame/drivers/merit.cpp
index 0cf37ab2960..8c932d55280 100644
--- a/src/mame/drivers/merit.cpp
+++ b/src/mame/drivers/merit.cpp
@@ -1409,10 +1409,11 @@ MACHINE_START_MEMBER(merit_state,casino5)
membank("bank2")->set_entry(0);
}
-MACHINE_CONFIG_START(merit_state::pitboss)
- MCFG_DEVICE_ADD("maincpu",Z80, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(pitboss_map)
- MCFG_DEVICE_IO_MAP(trvwhiz_io_map)
+void merit_state::pitboss(machine_config &config)
+{
+ Z80(config, m_maincpu, CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::pitboss_map);
+ m_maincpu->set_addrmap(AS_IO, &merit_state::trvwhiz_io_map);
I8255A(config, m_ppi[0]);
m_ppi[0]->in_pa_callback().set_ioport("IN0");
@@ -1425,9 +1426,9 @@ MACHINE_CONFIG_START(merit_state::pitboss)
m_ppi[1]->out_pc_callback().set(FUNC(merit_state::misc_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 512, 0, 512, 256, 0, 256) /* temporary, CRTC will configure screen */
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(PIXEL_CLOCK, 512, 0, 512, 256, 0, 256); /* temporary, CRTC will configure screen */
+ m_screen->set_screen_update("crtc", FUNC(mc6845_device::screen_update));
mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK));
crtc.set_screen(m_screen);
@@ -1444,97 +1445,97 @@ MACHINE_CONFIG_START(merit_state::pitboss)
ay8912_device &aysnd(AY8912(config, "aysnd", CRTC_CLOCK));
aysnd.port_a_write_callback().set(FUNC(merit_state::led2_w));
aysnd.add_route(ALL_OUTPUTS, "mono", 0.33);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(merit_state::casino5)
+void merit_state::casino5(machine_config &config)
+{
pitboss(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(casino5_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::casino5_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
MCFG_MACHINE_START_OVERRIDE(merit_state,casino5)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(merit_state::bigappg)
+void merit_state::bigappg(machine_config &config)
+{
pitboss(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(bigappg_map)
- MCFG_DEVICE_IO_MAP(tictac_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::bigappg_map);
+ m_maincpu->set_addrmap(AS_IO, &merit_state::tictac_io_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(merit_state::misdraw)
+void merit_state::misdraw(machine_config &config)
+{
bigappg(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(misdraw_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::misdraw_map);
NVRAM(config, "cpunvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(merit_state::dodge)
+void merit_state::dodge(machine_config &config)
+{
pitboss(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(dodge_map)
- MCFG_DEVICE_IO_MAP(tictac_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::dodge_map);
+ m_maincpu->set_addrmap(AS_IO, &merit_state::tictac_io_map);
NVRAM(config, "nvram").set_custom_handler(FUNC(merit_state::dodge_nvram_init));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(merit_state::tictac)
+void merit_state::tictac(machine_config &config)
+{
pitboss(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(tictac_map)
- MCFG_DEVICE_IO_MAP(tictac_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::tictac_map);
+ m_maincpu->set_addrmap(AS_IO, &merit_state::tictac_io_map);
+}
-MACHINE_CONFIG_START(merit_state::trvwhiz)
+void merit_state::trvwhiz(machine_config &config)
+{
pitboss(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(trvwhiz_map)
- MCFG_DEVICE_IO_MAP(trvwhiz_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::trvwhiz_map);
+ m_maincpu->set_addrmap(AS_IO, &merit_state::trvwhiz_io_map);
+}
-MACHINE_CONFIG_START(merit_state::dtrvwz5)
+void merit_state::dtrvwz5(machine_config &config)
+{
pitboss(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(dtrvwz5_map)
- MCFG_DEVICE_IO_MAP(tictac_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::dtrvwz5_map);
+ m_maincpu->set_addrmap(AS_IO, &merit_state::tictac_io_map);
+}
-MACHINE_CONFIG_START(merit_state::phrcraze)
+void merit_state::phrcraze(machine_config &config)
+{
pitboss(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(phrcraze_map)
- MCFG_DEVICE_IO_MAP(phrcraze_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::phrcraze_map);
+ m_maincpu->set_addrmap(AS_IO, &merit_state::phrcraze_io_map);
+}
-MACHINE_CONFIG_START(merit_state::trvwhziv)
+void merit_state::trvwhziv(machine_config &config)
+{
pitboss(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(trvwhziv_map)
- MCFG_DEVICE_IO_MAP(tictac_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::trvwhziv_map);
+ m_maincpu->set_addrmap(AS_IO, &merit_state::tictac_io_map);
+}
-MACHINE_CONFIG_START(merit_state::couple)
+void merit_state::couple(machine_config &config)
+{
pitboss(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(couple_map)
- MCFG_DEVICE_IO_MAP(tictac_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &merit_state::couple_map);
+ m_maincpu->set_addrmap(AS_IO, &merit_state::tictac_io_map);
m_ppi[1]->out_pc_callback().set(FUNC(merit_state::misc_couple_w));
-MACHINE_CONFIG_END
+}
ROM_START( pitboss ) /* Program roms were all printed as 2214-05 with the "7" hand written over the 5, U5 also had an added hand written "A" */
diff --git a/src/mame/drivers/meritm.cpp b/src/mame/drivers/meritm.cpp
index 26505250c94..34aae5bd85a 100644
--- a/src/mame/drivers/meritm.cpp
+++ b/src/mame/drivers/meritm.cpp
@@ -1154,15 +1154,17 @@ void meritm_state::crt250(machine_config &config)
aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
}
-MACHINE_CONFIG_START(meritm_state::crt250_questions)
+void meritm_state::crt250_questions(machine_config &config)
+{
crt250(config);
m_maincpu->set_addrmap(AS_PROGRAM, &meritm_state::crt250_questions_map);
MCFG_MACHINE_START_OVERRIDE(meritm_state, crt250_questions)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(meritm_state::crt250_crt252_crt258)
+void meritm_state::crt250_crt252_crt258(machine_config &config)
+{
crt250_questions(config);
m_maincpu->set_addrmap(AS_IO, &meritm_state::crt250_crt258_io_map);
@@ -1174,9 +1176,10 @@ MACHINE_CONFIG_START(meritm_state::crt250_crt252_crt258)
MICROTOUCH(config, m_microtouch, 9600).stx().set(m_uart, FUNC(ins8250_uart_device::rx_w));
m_microtouch->set_touch_callback(FUNC(meritm_state::touch_coord_transform), this);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(meritm_state::crt260)
+void meritm_state::crt260(machine_config &config)
+{
crt250(config);
m_maincpu->set_addrmap(AS_PROGRAM, &meritm_state::map);
@@ -1192,7 +1195,7 @@ MACHINE_CONFIG_START(meritm_state::crt260)
MICROTOUCH(config, m_microtouch, 9600).stx().set(m_uart, FUNC(ins8250_uart_device::rx_w));
m_microtouch->set_touch_callback(FUNC(meritm_state::touch_coord_transform), this);
-MACHINE_CONFIG_END
+}
/*
diff --git a/src/mame/drivers/meritum.cpp b/src/mame/drivers/meritum.cpp
index f9d46e2601e..7c15230f9e3 100644
--- a/src/mame/drivers/meritum.cpp
+++ b/src/mame/drivers/meritum.cpp
@@ -395,9 +395,9 @@ GFXDECODE_END
MACHINE_CONFIG_START(meritum_state::meritum)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 10_MHz_XTAL / 4) // U880D @ 2.5 MHz or 1.67 MHz by jumper selection
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ Z80(config, m_maincpu, 10_MHz_XTAL / 4); // U880D @ 2.5 MHz or 1.67 MHz by jumper selection
+ m_maincpu->set_addrmap(AS_PROGRAM, &meritum_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &meritum_state::io_map);
i8251_device &usart(I8251(config, "usart", 10_MHz_XTAL / 4)); // same as CPU clock
usart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd));
@@ -420,14 +420,14 @@ MACHINE_CONFIG_START(meritum_state::meritum)
i8255_device &mainppi(I8255(config, "mainppi")); // parallel interface
mainppi.out_pc_callback().set("nmigate", FUNC(input_merger_device::in_w<0>)).bit(7).invert();
- MCFG_DEVICE_ADD("flopppi", I8255, 0) // floppy disk interface
- MCFG_DEVICE_ADD("audiopit", PIT8253, 0) // optional audio interface
+ I8255(config, "flopppi", 0); // floppy disk interface
+ PIT8253(config, "audiopit", 0); // optional audio interface
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(10_MHz_XTAL, 107 * 6, 0, 64 * 6, 312, 0, 192)
- MCFG_SCREEN_UPDATE_DRIVER(meritum_state, screen_update_meritum)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(10_MHz_XTAL, 107 * 6, 0, 64 * 6, 312, 0, 192);
+ screen.set_screen_update(FUNC(meritum_state::screen_update_meritum));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_meritum);
PALETTE(config, "palette", palette_device::MONOCHROME);
diff --git a/src/mame/drivers/mes.cpp b/src/mame/drivers/mes.cpp
index e8899cfc15e..7685d75f35b 100644
--- a/src/mame/drivers/mes.cpp
+++ b/src/mame/drivers/mes.cpp
@@ -131,20 +131,21 @@ void mes_state::kbd_put(u8 data)
m_term_data = data;
}
-MACHINE_CONFIG_START(mes_state::mes)
+void mes_state::mes(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(16'000'000) / 4)
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ Z80(config, m_maincpu, XTAL(16'000'000) / 4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mes_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &mes_state::io_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(mes_state, screen_update)
- MCFG_SCREEN_SIZE(640, 250)
- MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(FUNC(mes_state::screen_update));
+ screen.set_size(640, 250);
+ screen.set_visarea(0, 639, 0, 249);
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -154,7 +155,7 @@ MACHINE_CONFIG_START(mes_state::mes)
generic_keyboard_device &keybd(GENERIC_KEYBOARD(config, "keybd", 0));
keybd.set_keyboard_callback(FUNC(mes_state::kbd_put));
-MACHINE_CONFIG_END
+}
/* ROM definition */
diff --git a/src/mame/drivers/metalmx.cpp b/src/mame/drivers/metalmx.cpp
index b64a45ec2ad..a702481129f 100644
--- a/src/mame/drivers/metalmx.cpp
+++ b/src/mame/drivers/metalmx.cpp
@@ -656,14 +656,14 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(metalmx_state::metalmx)
-
- MCFG_DEVICE_ADD("maincpu", M68EC020, XTAL(14'318'181))
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+void metalmx_state::metalmx(machine_config &config)
+{
+ M68EC020(config, m_maincpu, XTAL(14'318'181));
+ m_maincpu->set_addrmap(AS_PROGRAM, &metalmx_state::main_map);
- MCFG_DEVICE_ADD("adsp", ADSP2105, XTAL(10'000'000))
- MCFG_DEVICE_PROGRAM_MAP(adsp_program_map)
- MCFG_DEVICE_DATA_MAP(adsp_data_map)
+ ADSP2105(config, m_adsp, XTAL(10'000'000));
+ m_adsp->set_addrmap(AS_PROGRAM, &metalmx_state::adsp_program_map);
+ m_adsp->set_addrmap(AS_DATA, &metalmx_state::adsp_data_map);
TMS34020(config, m_gsp, 40000000); /* Unverified */
m_gsp->set_addrmap(AS_PROGRAM, &metalmx_state::gsp_map);
@@ -672,26 +672,26 @@ MACHINE_CONFIG_START(metalmx_state::metalmx)
m_gsp->set_pixels_per_clock(2);
m_gsp->output_int().set_inputline("maincpu", 4);
- MCFG_DEVICE_ADD("dsp32c_1", DSP32C, 40000000) /* Unverified */
- MCFG_DEVICE_PROGRAM_MAP(dsp32c_1_map)
+ DSP32C(config, m_dsp32c[0], 40000000); /* Unverified */
+ m_dsp32c[0]->set_addrmap(AS_PROGRAM, &metalmx_state::dsp32c_1_map);
- MCFG_DEVICE_ADD("dsp32c_2", DSP32C, 40000000) /* Unverified */
- MCFG_DEVICE_PROGRAM_MAP(dsp32c_2_map)
+ DSP32C(config, m_dsp32c[1], 40000000); /* Unverified */
+ m_dsp32c[1]->set_addrmap(AS_PROGRAM, &metalmx_state::dsp32c_2_map);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 384)
- MCFG_SCREEN_VISIBLE_AREA(0, 511, 0, 383)
- MCFG_SCREEN_UPDATE_DRIVER(metalmx_state, screen_update_metalmx)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 384);
+ screen.set_visarea(0, 511, 0, 383);
+ screen.set_screen_update(FUNC(metalmx_state::screen_update_metalmx));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::RGB_565);
ATARI_CAGE(config, m_cage, 0);
m_cage->set_speedup(0); // TODO: speedup address
m_cage->irq_handler().set(FUNC(metalmx_state::cage_irq_callback));
-MACHINE_CONFIG_END
+}
void metalmx_state::init_metalmx()
diff --git a/src/mame/drivers/metlfrzr.cpp b/src/mame/drivers/metlfrzr.cpp
index c01abc0cfa0..2e5cdbdb68c 100644
--- a/src/mame/drivers/metlfrzr.cpp
+++ b/src/mame/drivers/metlfrzr.cpp
@@ -366,28 +366,28 @@ TIMER_DEVICE_CALLBACK_MEMBER(metlfrzr_state::scanline)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE,0x08); /* RST 08h */
}
-MACHINE_CONFIG_START(metlfrzr_state::metlfrzr)
-
+void metlfrzr_state::metlfrzr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(12'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(metlfrzr_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ Z80(config, m_maincpu, XTAL(12'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &metlfrzr_state::metlfrzr_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &metlfrzr_state::decrypted_opcodes_map);
TIMER(config, "scantimer").configure_scanline(FUNC(metlfrzr_state::scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("t5182", T5182, 0)
+ T5182(config, "t5182", 0);
PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 0x200).set_indirect_entries(256 * 2);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_metlfrzr);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256 - 1, 16, 256 - 16 - 1)
- MCFG_SCREEN_UPDATE_DRIVER(metlfrzr_state, screen_update_metlfrzr)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 256 - 1, 16, 256 - 16 - 1);
+ screen.set_screen_update(FUNC(metlfrzr_state::screen_update_metlfrzr));
+ screen.set_palette(m_palette);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -396,7 +396,7 @@ MACHINE_CONFIG_START(metlfrzr_state::metlfrzr)
ymsnd.irq_handler().set("t5182", FUNC(t5182_device::ym2151_irq_handler));
ymsnd.add_route(0, "mono", 1.0);
ymsnd.add_route(1, "mono", 1.0);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/mgames.cpp b/src/mame/drivers/mgames.cpp
index f171c7ea4ce..7da4899e525 100644
--- a/src/mame/drivers/mgames.cpp
+++ b/src/mame/drivers/mgames.cpp
@@ -23,7 +23,7 @@
FOR AMUSEMENT ONLY.
The ingenious Match Games offers something for everyone. Four captivating themes
- with brillant graphics, challenging play action, an enticing bonus feature and a
+ with brilliant graphics, challenging play action, an enticing bonus feature and a
host of options to tailor the game to any location.
Match Games is today's perfect alternative in adult video skill games...
@@ -36,19 +36,19 @@
and number combinations. Play appeal stays high as new characters are introduced.
"Wild" characters liven the action even more and build special bonus points, co-
- llected on a 5-way number match. The appeal is irresistable... Players stay hoo-
+ llected on a 5-way number match. The appeal is irresistible... Players stay hoo-
ked in for lot more action (and more earnings) for you!.
GAME THEMES:
- Match Games aknowledges every scoring combination by displaying its own special
+ Match Games acknowledges every scoring combination by displaying its own special
name keyed to each game theme.
Every time 2 "Wild" characters pop up together, special bonus symbols appear,
increasing bonus by 5 points.
- * "THE WHITE KNIGHT" features knights in armor with colores plumes and wild
+ * "THE WHITE KNIGHT" features knights in armor with colored plumes and wild
'White Knights'.
* "THE FROG POND" stars colorful and humorous frogs perched on top of mushrooms.
@@ -639,30 +639,30 @@ static GFXDECODE_START( gfx_mgames )
GFXDECODE_END
-MACHINE_CONFIG_START(mgames_state::mgames)
+void mgames_state::mgames(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,MASTER_CLOCK/6) /* 3 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mgames_state, irq0_line_hold)
+ Z80(config, m_maincpu, MASTER_CLOCK/6); /* 3 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mgames_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mgames_state::irq0_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(mgames_state, screen_update_mgames)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 0, 256-1);
+ screen.set_screen_update(FUNC(mgames_state::screen_update_mgames));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mgames);
PALETTE(config, m_palette, FUNC(mgames_state::mgames_palette), 0x200);
/* sound hardware */
// to do...
-
-MACHINE_CONFIG_END
+}
ROM_START( mgames )
diff --git a/src/mame/drivers/mgolf.cpp b/src/mame/drivers/mgolf.cpp
index 225880e27a2..cc47c4c2c9a 100644
--- a/src/mame/drivers/mgolf.cpp
+++ b/src/mame/drivers/mgolf.cpp
@@ -368,26 +368,26 @@ void mgolf_state::machine_reset()
}
-MACHINE_CONFIG_START(mgolf_state::mgolf)
-
+void mgolf_state::mgolf(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 12096000 / 16) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(cpu_map)
+ M6502(config, m_maincpu, 12096000 / 16); /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mgolf_state::cpu_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(256, 262)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 0, 223)
- MCFG_SCREEN_UPDATE_DRIVER(mgolf_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(256, 262);
+ m_screen->set_visarea(0, 255, 0, 223);
+ m_screen->set_screen_update(FUNC(mgolf_state::screen_update));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mgolf);
PALETTE(config, m_palette, FUNC(mgolf_state::mgolf_palette), 4);
/* sound hardware */
-MACHINE_CONFIG_END
+}
ROM_START( mgolf )
diff --git a/src/mame/drivers/micral.cpp b/src/mame/drivers/micral.cpp
index 650d763e135..6b1bab57c18 100644
--- a/src/mame/drivers/micral.cpp
+++ b/src/mame/drivers/micral.cpp
@@ -378,14 +378,15 @@ MACHINE_RESET_MEMBER( micral_state, micral )
m_uart->write_cs(0);
}
-MACHINE_CONFIG_START(micral_state::micral)
+void micral_state::micral(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD( "maincpu", Z80, XTAL(4'000'000) )
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
+ Z80(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &micral_state::mem_map);
// no i/o ports on main cpu
- MCFG_DEVICE_ADD( "keyboard", Z80, XTAL(1'000'000) ) // freq unknown
- MCFG_DEVICE_PROGRAM_MAP(mem_kbd)
- MCFG_DEVICE_IO_MAP(io_kbd)
+ z80_device &keyboard(Z80(config, "keyboard", XTAL(1'000'000))); // freq unknown
+ keyboard.set_addrmap(AS_PROGRAM, &micral_state::mem_kbd);
+ keyboard.set_addrmap(AS_IO, &micral_state::io_kbd);
MCFG_MACHINE_RESET_OVERRIDE(micral_state, micral)
@@ -406,9 +407,8 @@ MACHINE_CONFIG_START(micral_state::micral)
m_crtc->set_screen("screen");
/* sound hardware */
- //MCFG_SPEAKER_STANDARD_MONO("mono")
- //MCFG_DEVICE_ADD("beeper", BEEP, 2000)
- //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ //SPEAKER(config, "mono").front_center();
+ //BEEP(config, m_beep, 2000).add_route(ALL_OUTPUTS, "mono", 0.50);
AY31015(config, m_uart); // CDP6402
m_uart->read_si_callback().set("rs232", FUNC(rs232_port_device::rxd_r));
@@ -419,7 +419,7 @@ MACHINE_CONFIG_START(micral_state::micral)
uart_clock.signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp));
RS232_PORT(config, "rs232", default_rs232_devices, "keyboard");
-MACHINE_CONFIG_END
+}
ROM_START( micral )
ROM_REGION( 0x10000, "maincpu", 0 )
diff --git a/src/mame/drivers/micro3d.cpp b/src/mame/drivers/micro3d.cpp
index c5f37d66058..8ab44180560 100644
--- a/src/mame/drivers/micro3d.cpp
+++ b/src/mame/drivers/micro3d.cpp
@@ -298,11 +298,11 @@ void micro3d_state::soundmem_io(address_map &map)
*
*************************************/
-MACHINE_CONFIG_START(micro3d_state::micro3d)
-
- MCFG_DEVICE_ADD("maincpu", M68000, 32_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(hostmem)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", micro3d_state, micro3d_vblank)
+void micro3d_state::micro3d(machine_config &config)
+{
+ M68000(config, m_maincpu, 32_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &micro3d_state::hostmem);
+ m_maincpu->set_vblank_int("screen", FUNC(micro3d_state::micro3d_vblank));
TMS34010(config, m_vgb, 40_MHz_XTAL);
m_vgb->set_addrmap(AS_PROGRAM, &micro3d_state::vgbmem);
@@ -313,9 +313,9 @@ MACHINE_CONFIG_START(micro3d_state::micro3d)
m_vgb->output_int().set(FUNC(micro3d_state::tms_interrupt));
m_vgb->set_screen("screen");
- MCFG_DEVICE_ADD("drmath", AM29000, 32_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(drmath_prg)
- MCFG_DEVICE_DATA_MAP(drmath_data)
+ AM29000(config, m_drmath, 32_MHz_XTAL / 2);
+ m_drmath->set_addrmap(AS_PROGRAM, &micro3d_state::drmath_prg);
+ m_drmath->set_addrmap(AS_DATA, &micro3d_state::drmath_data);
scc8530_device &scc(SCC8530N(config, "scc", 32_MHz_XTAL / 2 / 2));
scc.out_txdb_callback().set("monitor_drmath", FUNC(rs232_port_device::write_txd));
@@ -351,10 +351,10 @@ MACHINE_CONFIG_START(micro3d_state::micro3d)
PALETTE(config, m_palette).set_format(palette_device::BRGx_555, 4096);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(40_MHz_XTAL/8*4, 192*4, 0, 144*4, 434, 0, 400)
- MCFG_SCREEN_UPDATE_DEVICE("vgb", tms34010_device, tms340x0_ind16)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(40_MHz_XTAL/8*4, 192*4, 0, 144*4, 434, 0, 400);
+ screen.set_screen_update("vgb", FUNC(tms34010_device::tms340x0_ind16));
+ screen.set_palette(m_palette);
MC2661(config, m_vgb_uart, 40_MHz_XTAL / 8); // actually SCN2651
m_vgb_uart->txd_handler().set("monitor_vgb", FUNC(rs232_port_device::write_txd));
@@ -393,7 +393,7 @@ MACHINE_CONFIG_START(micro3d_state::micro3d)
MICRO3D_SOUND(config, m_noise_2);
m_noise_2->add_route(0, "lspeaker", 1.0);
m_noise_2->add_route(1, "rspeaker", 1.0);
-MACHINE_CONFIG_END
+}
void micro3d_state::botss11(machine_config &config)
{
diff --git a/src/mame/drivers/micronic.cpp b/src/mame/drivers/micronic.cpp
index db29b94f986..0b8c102747b 100644
--- a/src/mame/drivers/micronic.cpp
+++ b/src/mame/drivers/micronic.cpp
@@ -349,19 +349,20 @@ WRITE_LINE_MEMBER( micronic_state::mc146818_irq )
}
-MACHINE_CONFIG_START(micronic_state::micronic)
+void micronic_state::micronic(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(Z80_TAG, Z80, 3.579545_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(micronic_mem)
- MCFG_DEVICE_IO_MAP(micronic_io)
+ Z80(config, m_maincpu, 3.579545_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &micronic_state::micronic_mem);
+ m_maincpu->set_addrmap(AS_IO, &micronic_state::micronic_io);
/* video hardware */
- MCFG_SCREEN_ADD(SCREEN_TAG, LCD)
- MCFG_SCREEN_REFRESH_RATE(80)
- MCFG_SCREEN_UPDATE_DEVICE(HD61830_TAG, hd61830_device, screen_update)
- MCFG_SCREEN_SIZE(120, 64) //6x20, 8x8
- MCFG_SCREEN_VISIBLE_AREA(0, 120-1, 0, 64-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(80);
+ screen.set_screen_update(HD61830_TAG, FUNC(hd61830_device::screen_update));
+ screen.set_size(120, 64); //6x20, 8x8
+ screen.set_visarea(0, 120-1, 0, 64-1);
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(micronic_state::micronic_palette), 2);
@@ -379,7 +380,7 @@ MACHINE_CONFIG_START(micronic_state::micronic)
MC146818(config, m_rtc, 32.768_kHz_XTAL);
m_rtc->irq().set(FUNC(micronic_state::mc146818_irq));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( micronic )
diff --git a/src/mame/drivers/micropin.cpp b/src/mame/drivers/micropin.cpp
index 494a3e594f9..19f3aff32c7 100644
--- a/src/mame/drivers/micropin.cpp
+++ b/src/mame/drivers/micropin.cpp
@@ -298,11 +298,12 @@ void micropin_state::init_micropin()
{
}
-MACHINE_CONFIG_START(micropin_state::micropin)
+void micropin_state::micropin(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("v1cpu", M6800, XTAL(2'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(micropin_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(micropin_state, irq0_line_hold, 500)
+ M6800(config, m_v1cpu, XTAL(2'000'000) / 2);
+ m_v1cpu->set_addrmap(AS_PROGRAM, &micropin_state::micropin_map);
+ m_v1cpu->set_periodic_int(FUNC(micropin_state::irq0_line_hold), attotime::from_hz(500));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -312,8 +313,7 @@ MACHINE_CONFIG_START(micropin_state::micropin)
/* Sound */
genpin_audio(config);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("beeper", BEEP, 387)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ BEEP(config, m_beep, 387).add_route(ALL_OUTPUTS, "mono", 0.50);
/* Devices */
pia6821_device &pia50(PIA6821(config, "pia50", 0));
@@ -333,20 +333,21 @@ MACHINE_CONFIG_START(micropin_state::micropin)
//m_pia51->cb2_handler().set(FUNC(micropin_state::p51cb2_w));
TIMER(config, "timer_a").configure_periodic(FUNC(micropin_state::timer_a), attotime::from_hz(100));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(micropin_state::pentacup2)
+void micropin_state::pentacup2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("v2cpu", I8085A, 2000000)
- MCFG_DEVICE_PROGRAM_MAP(pentacup2_map)
- MCFG_DEVICE_IO_MAP(pentacup2_io)
- //MCFG_DEVICE_PERIODIC_INT_DRIVER(micropin_state, irq2_line_hold, 50)
+ I8085A(config, m_v2cpu, 2000000);
+ m_v2cpu->set_addrmap(AS_PROGRAM, &micropin_state::pentacup2_map);
+ m_v2cpu->set_addrmap(AS_IO, &micropin_state::pentacup2_io);
+ //m_v2cpu->set_periodic_int(FUNC(micropin_state::irq2_line_hold), attotime::from_hz(50));
// NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* Sound */
genpin_audio(config);
-MACHINE_CONFIG_END
+}
/*-------------------------------------------------------------------
/ Pentacup
diff --git a/src/mame/drivers/microtan.cpp b/src/mame/drivers/microtan.cpp
index ac5d8f43709..4366447ff27 100644
--- a/src/mame/drivers/microtan.cpp
+++ b/src/mame/drivers/microtan.cpp
@@ -209,21 +209,21 @@ GFXDECODE_END
MACHINE_CONFIG_START(microtan_state::microtan)
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, M6502, 6_MHz_XTAL / 8) // 750 kHz
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", microtan_state, interrupt)
+ M6502(config, m_maincpu, 6_MHz_XTAL / 8); // 750 kHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &microtan_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(microtan_state::interrupt));
// The 6502 IRQ line is active low and probably driven by open collector outputs (guess).
INPUT_MERGER_ANY_HIGH(config, m_irq_line).output_handler().set_inputline(m_maincpu, 0);
/* video hardware - include overscan */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(32*8, 16*16)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*16, 16*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(microtan_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(32*8, 16*16);
+ screen.set_visarea(0*8, 32*8-1, 0*16, 16*16-1);
+ screen.set_screen_update(FUNC(microtan_state::screen_update));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_microtan);
@@ -255,7 +255,7 @@ MACHINE_CONFIG_START(microtan_state::microtan)
m_via6522[0]->cb2_handler().set(FUNC(microtan_state::via_0_out_cb2));
m_via6522[0]->irq_handler().set(m_irq_line, FUNC(input_merger_device::in_w<IRQ_VIA_0>));
- MCFG_DEVICE_ADD(m_via6522[1], VIA6522, 6_MHz_XTAL / 8)
+ VIA6522(config, m_via6522[1], 6_MHz_XTAL / 8);
m_via6522[1]->writepa_handler().set(FUNC(microtan_state::via_1_out_a));
m_via6522[1]->writepb_handler().set(FUNC(microtan_state::via_1_out_b));
m_via6522[1]->ca2_handler().set(FUNC(microtan_state::via_1_out_ca2));
diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp
index 231e827beee..859749f43bc 100644
--- a/src/mame/drivers/microvsn.cpp
+++ b/src/mame/drivers/microvsn.cpp
@@ -647,16 +647,16 @@ MACHINE_CONFIG_START(microvision_state::microvision)
m_tms1100->o().set(FUNC(microvision_state::tms1100_write_o));
m_tms1100->r().set(FUNC(microvision_state::tms1100_write_r));
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(0)
config.m_minimum_quantum = attotime::from_hz(60);
- MCFG_SCREEN_UPDATE_DRIVER(microvision_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, microvision_state, screen_vblank))
- MCFG_SCREEN_SIZE(16, 16)
- MCFG_SCREEN_VISIBLE_AREA(0, 15, 0, 15)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(0);
+ screen.set_screen_update(FUNC(microvision_state::screen_update));
+ screen.screen_vblank().set(FUNC(microvision_state::screen_vblank));
+ screen.set_size(16, 16);
+ screen.set_visarea(0, 15, 0, 15);
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(microvision_state::microvision_palette), 16);
diff --git a/src/mame/drivers/midqslvr.cpp b/src/mame/drivers/midqslvr.cpp
index 20024e51f4c..af25727af8e 100644
--- a/src/mame/drivers/midqslvr.cpp
+++ b/src/mame/drivers/midqslvr.cpp
@@ -418,10 +418,10 @@ void midqslvr_state::machine_reset()
}
MACHINE_CONFIG_START(midqslvr_state::midqslvr)
- MCFG_DEVICE_ADD("maincpu", PENTIUM, 333000000) // actually Celeron 333
- MCFG_DEVICE_PROGRAM_MAP(midqslvr_map)
- MCFG_DEVICE_IO_MAP(midqslvr_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
+ PENTIUM(config, m_maincpu, 333000000); // actually Celeron 333
+ m_maincpu->set_addrmap(AS_PROGRAM, &midqslvr_state::midqslvr_map);
+ m_maincpu->set_addrmap(AS_IO, &midqslvr_state::midqslvr_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb));
pcat_common(config);
diff --git a/src/mame/drivers/midvunit.cpp b/src/mame/drivers/midvunit.cpp
index 26d11e8e5ea..6bcbf5272f1 100644
--- a/src/mame/drivers/midvunit.cpp
+++ b/src/mame/drivers/midvunit.cpp
@@ -1055,8 +1055,8 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(midvunit_state::midvcommon)
-
+void midvunit_state::midvcommon(machine_config &config)
+{
/* basic machine hardware */
TMS32031(config, m_maincpu, CPU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &midvunit_state::midvunit_map);
@@ -1069,13 +1069,13 @@ MACHINE_CONFIG_START(midvunit_state::midvcommon)
WATCHDOG_TIMER(config, m_watchdog);
/* video hardware */
- MCFG_PALETTE_ADD("palette", 32768)
+ PALETTE(config, m_palette).set_entries(32768);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MIDVUNIT_VIDEO_CLOCK/2, 666, 0, 512, 432, 0, 400)
- MCFG_SCREEN_UPDATE_DRIVER(midvunit_state, screen_update_midvunit)
- MCFG_SCREEN_PALETTE("palette")
-MACHINE_CONFIG_END
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MIDVUNIT_VIDEO_CLOCK/2, 666, 0, 512, 432, 0, 400);
+ m_screen->set_screen_update(FUNC(midvunit_state::screen_update_midvunit));
+ m_screen->set_palette(m_palette);
+}
void midvunit_state::midvunit(machine_config &config)
@@ -1110,7 +1110,8 @@ void midvunit_state::offroadc(machine_config &config)
m_midway_serial_pic2->set_yearoffs(94);
}
-MACHINE_CONFIG_START(midvunit_state::midvplus)
+void midvunit_state::midvplus(machine_config &config)
+{
midvcommon(config);
/* basic machine hardware */
@@ -1131,7 +1132,7 @@ MACHINE_CONFIG_START(midvunit_state::midvplus)
DCS2_AUDIO_2115(config, m_dcs, 0);
m_dcs->set_dram_in_mb(2);
m_dcs->set_polling_offset(0x3839);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/midyunit.cpp b/src/mame/drivers/midyunit.cpp
index 55b749e2e34..4d35c966546 100644
--- a/src/mame/drivers/midyunit.cpp
+++ b/src/mame/drivers/midyunit.cpp
@@ -1098,8 +1098,8 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(midyunit_state::zunit)
-
+void midyunit_state::zunit(machine_config &config)
+{
/* basic machine hardware */
TMS34010(config, m_maincpu, FAST_MASTER_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &midyunit_state::main_map);
@@ -1116,12 +1116,12 @@ MACHINE_CONFIG_START(midyunit_state::zunit)
/* video hardware */
PALETTE(config, m_palette).set_entries(8192);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_ALWAYS_UPDATE);
// from TMS340 registers
- MCFG_SCREEN_RAW_PARAMS(MEDRES_PIXEL_CLOCK*2, 674, 122, 634, 433, 27, 427)
- MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_ind16)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen.set_raw(MEDRES_PIXEL_CLOCK*2, 674, 122, 634, 433, 27, 427);
+ screen.set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_ind16));
+ screen.set_palette(m_palette);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midzunit)
@@ -1131,7 +1131,7 @@ MACHINE_CONFIG_START(midyunit_state::zunit)
WILLIAMS_NARC_SOUND(config, m_narc_sound);
m_narc_sound->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
m_narc_sound->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
-MACHINE_CONFIG_END
+}
@@ -1141,8 +1141,8 @@ MACHINE_CONFIG_END
*
*************************************/
-MACHINE_CONFIG_START(midyunit_state::yunit_core)
-
+void midyunit_state::yunit_core(machine_config &config)
+{
/* basic machine hardware */
TMS34010(config, m_maincpu, SLOW_MASTER_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &midyunit_state::main_map);
@@ -1159,20 +1159,21 @@ MACHINE_CONFIG_START(midyunit_state::yunit_core)
/* video hardware */
PALETTE(config, m_palette).set_entries(256);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_ALWAYS_UPDATE);
// from TMS340 registers - visible area varies slightly between games
// we use the largest visarea (smashtv's) here so that aviwrite will work nicely
- MCFG_SCREEN_RAW_PARAMS(STDRES_PIXEL_CLOCK*2, 506, 90, 500, 289, 20, 276)
- MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_ind16)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen.set_raw(STDRES_PIXEL_CLOCK*2, 506, 90, 500, 289, 20, 276);
+ screen.set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_ind16));
+ screen.set_palette(m_palette);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_4bit_slow)
+void midyunit_state::yunit_cvsd_4bit_slow(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1181,10 +1182,11 @@ MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_4bit_slow)
/* video hardware */
m_palette->set_entries(256);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_4bit)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_4bit_fast)
+void midyunit_state::yunit_cvsd_4bit_fast(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1195,10 +1197,11 @@ MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_4bit_fast)
/* video hardware */
m_palette->set_entries(256);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_4bit)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_6bit_slow)
+void midyunit_state::yunit_cvsd_6bit_slow(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1207,10 +1210,11 @@ MACHINE_CONFIG_START(midyunit_state::yunit_cvsd_6bit_slow)
/* video hardware */
m_palette->set_entries(4096);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_6bit)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_adpcm_6bit_fast)
+void midyunit_state::yunit_adpcm_6bit_fast(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1221,10 +1225,11 @@ MACHINE_CONFIG_START(midyunit_state::yunit_adpcm_6bit_fast)
/* video hardware */
m_palette->set_entries(4096);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_6bit)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midyunit_state::yunit_adpcm_6bit_faster)
+void midyunit_state::yunit_adpcm_6bit_faster(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
@@ -1235,7 +1240,7 @@ MACHINE_CONFIG_START(midyunit_state::yunit_adpcm_6bit_faster)
/* video hardware */
m_palette->set_entries(4096);
MCFG_VIDEO_START_OVERRIDE(midyunit_state,midyunit_6bit)
-MACHINE_CONFIG_END
+}
void midyunit_state::term2(machine_config &config)
@@ -1250,13 +1255,14 @@ void midyunit_state::term2(machine_config &config)
}
-MACHINE_CONFIG_START(midyunit_state::mkyawdim)
+void midyunit_state::mkyawdim(machine_config &config)
+{
yunit_core(config);
/* basic machine hardware */
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(8'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(yawdim_sound_map)
+ Z80(config, m_audiocpu, XTAL(8'000'000) / 2);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &midyunit_state::yawdim_sound_map);
/* video hardware */
m_palette->set_entries(4096);
@@ -1266,9 +1272,8 @@ MACHINE_CONFIG_START(midyunit_state::mkyawdim)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(8'000'000) / 8, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, XTAL(8'000'000) / 8, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "speaker", 1.0);
+}
diff --git a/src/mame/drivers/midzeus.cpp b/src/mame/drivers/midzeus.cpp
index 9264ba1fd1e..2f0fc5f84e7 100644
--- a/src/mame/drivers/midzeus.cpp
+++ b/src/mame/drivers/midzeus.cpp
@@ -1255,8 +1255,8 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(midzeus_state::midzeus)
-
+void midzeus_state::midzeus(machine_config &config)
+{
/* basic machine hardware */
TMS32032(config, m_maincpu, CPU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &midzeus_state::zeus_map);
@@ -1282,22 +1282,24 @@ MACHINE_CONFIG_START(midzeus_state::midzeus)
MIDWAY_IOASIC(config, m_ioasic, 0);
m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD);
m_ioasic->set_yearoffs(94);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midzeus_state::mk4)
+void midzeus_state::mk4(machine_config &config)
+{
midzeus(config);
m_ioasic->set_upper(461/* or 474 */);
m_ioasic->set_shuffle_default(1);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midzeus_state::invasn)
+void midzeus_state::invasn(machine_config &config)
+{
midzeus(config);
PIC16C57(config, "pic", 8000000); /* ? */
m_ioasic->set_upper(468/* or 488 */);
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(midzeus2_state::midzeus2)
+}
+void midzeus2_state::midzeus2(machine_config &config)
+{
/* basic machine hardware */
TMS32032(config, m_maincpu, CPU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &midzeus2_state::zeus2_map);
@@ -1323,17 +1325,19 @@ MACHINE_CONFIG_START(midzeus2_state::midzeus2)
m_ioasic->set_shuffle(MIDWAY_IOASIC_STANDARD);
m_ioasic->set_yearoffs(99);
m_ioasic->set_upper(474);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midzeus2_state::crusnexo)
+void midzeus2_state::crusnexo(machine_config &config)
+{
midzeus2(config);
m_ioasic->set_upper(472/* or 476,477,478,110 */);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(midzeus2_state::thegrid)
+void midzeus2_state::thegrid(machine_config &config)
+{
midzeus2(config);
m_ioasic->set_upper(474/* or 491 */);
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/mightyframe.cpp b/src/mame/drivers/mightyframe.cpp
index e873ec63a7d..99f774e34ed 100644
--- a/src/mame/drivers/mightyframe.cpp
+++ b/src/mame/drivers/mightyframe.cpp
@@ -38,10 +38,11 @@ void mightyframe_state::mem_map(address_map &map)
static INPUT_PORTS_START( mightyframe )
INPUT_PORTS_END
-MACHINE_CONFIG_START(mightyframe_state::mightyframe)
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)) // no idea of clock
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
-MACHINE_CONFIG_END
+void mightyframe_state::mightyframe(machine_config &config)
+{
+ m68000_device &maincpu(M68000(config, "maincpu", XTAL(16'000'000))); // no idea of clock
+ maincpu.set_addrmap(AS_PROGRAM, &mightyframe_state::mem_map);
+}
ROM_START( mightyframe )
ROM_REGION( 0x8000, "maincpu", 0 )
diff --git a/src/mame/drivers/mikie.cpp b/src/mame/drivers/mikie.cpp
index 7f18b9c86cf..a8b8cbd3842 100644
--- a/src/mame/drivers/mikie.cpp
+++ b/src/mame/drivers/mikie.cpp
@@ -258,14 +258,14 @@ WRITE_LINE_MEMBER(mikie_state::vblank_irq)
m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
}
-MACHINE_CONFIG_START(mikie_state::mikie)
-
+void mikie_state::mikie(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, OSC/12) // 9A (surface scratched)
- MCFG_DEVICE_PROGRAM_MAP(mikie_map)
+ MC6809E(config, m_maincpu, OSC/12); // 9A (surface scratched)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mikie_state::mikie_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, CLK) // 4E (surface scratched)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ Z80(config, m_audiocpu, CLK); // 4E (surface scratched)
+ m_audiocpu->set_addrmap(AS_PROGRAM, &mikie_state::sound_map);
ls259_device &mainlatch(LS259(config, "mainlatch")); // 6I
mainlatch.q_out_cb<0>().set(FUNC(mikie_state::coin_counter_1_w)); // COIN1
@@ -278,14 +278,14 @@ MACHINE_CONFIG_START(mikie_state::mikie)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60.59)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mikie_state, screen_update_mikie)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mikie_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60.59);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(mikie_state::screen_update_mikie));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(mikie_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mikie);
PALETTE(config, m_palette, FUNC(mikie_state::mikie_palette), 16*8*16+16*8*16, 256);
@@ -295,12 +295,10 @@ MACHINE_CONFIG_START(mikie_state::mikie)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("sn1", SN76489A, XTAL/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
+ SN76489A(config, "sn1", XTAL/8).add_route(ALL_OUTPUTS, "mono", 0.60);
- MCFG_DEVICE_ADD("sn2", SN76489A, CLK)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
-MACHINE_CONFIG_END
+ SN76489A(config, "sn2", CLK).add_route(ALL_OUTPUTS, "mono", 0.60);
+}
/*************************************
*
diff --git a/src/mame/drivers/mikromik.cpp b/src/mame/drivers/mikromik.cpp
index 4c333c4379d..1ced344d7f5 100644
--- a/src/mame/drivers/mikromik.cpp
+++ b/src/mame/drivers/mikromik.cpp
@@ -456,7 +456,7 @@ void mm1_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( mm1 )
+// machine_config( mm1 )
//-------------------------------------------------
void mm1_state::mm1(machine_config &config)
@@ -525,7 +525,7 @@ void mm1_state::mm1(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( mm1m6 )
+// machine_config( mm1m6 )
//-------------------------------------------------
void mm1_state::mm1m6(machine_config &config)
@@ -537,7 +537,7 @@ void mm1_state::mm1m6(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( mm1m7 )
+// machine_config( mm1m7 )
//-------------------------------------------------
void mm1_state::mm1m7(machine_config &config)
diff --git a/src/mame/drivers/mil4000.cpp b/src/mame/drivers/mil4000.cpp
index fe28b93c707..3c7e1efb736 100644
--- a/src/mame/drivers/mil4000.cpp
+++ b/src/mame/drivers/mil4000.cpp
@@ -561,37 +561,37 @@ static GFXDECODE_START( gfx_mil4000 )
GFXDECODE_END
-MACHINE_CONFIG_START(mil4000_state::mil4000)
- MCFG_DEVICE_ADD("maincpu", M68000, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(mil4000_map)
+void mil4000_state::mil4000(machine_config &config)
+{
+ M68000(config, m_maincpu, CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mil4000_state::mil4000_map);
// irq 2/4/5 point to the same place, others invalid
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mil4000_state, irq5_line_hold)
+ m_maincpu->set_vblank_int("screen", FUNC(mil4000_state::irq5_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(320, 240)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1)
- MCFG_SCREEN_UPDATE_DRIVER(mil4000_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(320, 240);
+ screen.set_visarea(0, 320-1, 0, 240-1);
+ screen.set_screen_update(FUNC(mil4000_state::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::BLACK).set_format(palette_device::RGBx_555, 0x800);
GFXDECODE(config, m_gfxdecode, "palette", gfx_mil4000);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1000000, okim6295_device::PIN7_HIGH) // frequency from 1000 kHz resonator. pin 7 high not verified.
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // frequency from 1000 kHz resonator. pin 7 high not verified.
+}
-MACHINE_CONFIG_START(mil4000_state::chewheel)
+void mil4000_state::chewheel(machine_config &config)
+{
mil4000(config);
- MCFG_DEVICE_REPLACE("maincpu", M68000, CPU_CLOCK) /* 2MHz */
- MCFG_DEVICE_PROGRAM_MAP(chewheel_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mil4000_state, irq5_line_hold)
-MACHINE_CONFIG_END
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &mil4000_state::chewheel_map); /* 2MHz */
+}
ROM_START( mil4000 )
diff --git a/src/mame/drivers/milton6805.cpp b/src/mame/drivers/milton6805.cpp
index 03789aff3c8..89f5de74f16 100644
--- a/src/mame/drivers/milton6805.cpp
+++ b/src/mame/drivers/milton6805.cpp
@@ -115,11 +115,11 @@ void milton_state::prg_map(address_map &map)
static INPUT_PORTS_START( milton )
INPUT_PORTS_END
-MACHINE_CONFIG_START(milton_state::milton)
-
+void milton_state::milton(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6805, 3120000) // MC6805P2, needs a CPU core
- MCFG_DEVICE_PROGRAM_MAP(prg_map)
+ M6805(config, m_maincpu, 3120000); // MC6805P2, needs a CPU core
+ m_maincpu->set_addrmap(AS_PROGRAM, &milton_state::prg_map);
// GROMs. They still require a ready callback and external clock
// of 3120000/8 Hz, pulsing their glock_in line (see tmc0430.cpp and ti99_4x.cpp)
@@ -127,9 +127,8 @@ MACHINE_CONFIG_START(milton_state::milton)
TMC0430(config, "grom4", "groms", 0x2000, 1);
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("sp0250", SP0250, 3120000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ SP0250(config, "sp0250", 3120000).add_route(ALL_OUTPUTS, "speaker", 1.0);
+}
/***************************************************************************
diff --git a/src/mame/drivers/mini2440.cpp b/src/mame/drivers/mini2440.cpp
index c4d7f995377..6ec4b19e85c 100644
--- a/src/mame/drivers/mini2440.cpp
+++ b/src/mame/drivers/mini2440.cpp
@@ -225,19 +225,19 @@ void mini2440_state::init_mini2440()
// do nothing
}
-MACHINE_CONFIG_START(mini2440_state::mini2440)
- MCFG_DEVICE_ADD("maincpu", ARM920T, 400000000)
- MCFG_DEVICE_PROGRAM_MAP(mini2440_map)
-
- MCFG_PALETTE_ADD("palette", 32768)
+void mini2440_state::mini2440(machine_config &config)
+{
+ ARM920T(config, m_maincpu, 400000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mini2440_state::mini2440_map);
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(1024, 768)
- MCFG_SCREEN_VISIBLE_AREA(0, 239, 0, 319)
+ PALETTE(config, "palette").set_entries(32768);
- MCFG_SCREEN_UPDATE_DEVICE("s3c2440", s3c2440_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(1024, 768);
+ screen.set_visarea(0, 239, 0, 319);
+ screen.set_screen_update("s3c2440", FUNC(s3c2440_device::screen_update));
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
@@ -263,7 +263,7 @@ MACHINE_CONFIG_START(mini2440_state::mini2440)
NAND(config, m_nand, 0);
m_nand->set_nand_type(nand_device::chip::K9F1G08U0B);
m_nand->rnb_wr_callback().set(m_s3c2440, FUNC(s3c2440_device::frnb_w));
-MACHINE_CONFIG_END
+}
static INPUT_PORTS_START( mini2440 )
PORT_START( "PENB" )
diff --git a/src/mame/drivers/miniboy7.cpp b/src/mame/drivers/miniboy7.cpp
index e814d2a50e3..55806601093 100644
--- a/src/mame/drivers/miniboy7.cpp
+++ b/src/mame/drivers/miniboy7.cpp
@@ -513,11 +513,11 @@ GFXDECODE_END
* Machine Drivers *
***********************************/
-MACHINE_CONFIG_START(miniboy7_state::miniboy7)
-
+void miniboy7_state::miniboy7(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, MASTER_CLOCK / 16) /* guess */
- MCFG_DEVICE_PROGRAM_MAP(miniboy7_map)
+ M6502(config, m_maincpu, MASTER_CLOCK / 16); /* guess */
+ m_maincpu->set_addrmap(AS_PROGRAM, &miniboy7_state::miniboy7_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -529,12 +529,12 @@ MACHINE_CONFIG_START(miniboy7_state::miniboy7)
pia.irqb_handler().set_inputline("maincpu", 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE((47+1)*8, (39+1)*8) /* Taken from MC6845, registers 00 & 04. Normally programmed with (value-1) */
- MCFG_SCREEN_VISIBLE_AREA(0*8, 37*8-1, 0*8, 37*8-1) /* Taken from MC6845, registers 01 & 06 */
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size((47+1)*8, (39+1)*8); /* Taken from MC6845, registers 00 & 04. Normally programmed with (value-1) */
+ screen.set_visarea(0*8, 37*8-1, 0*8, 37*8-1); /* Taken from MC6845, registers 01 & 06 */
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_miniboy7);
@@ -553,8 +553,7 @@ MACHINE_CONFIG_START(miniboy7_state::miniboy7)
ay8910.add_route(ALL_OUTPUTS, "mono", 0.75);
ay8910.port_a_write_callback().set(FUNC(miniboy7_state::ay_pa_w));
ay8910.port_b_write_callback().set(FUNC(miniboy7_state::ay_pb_w));
-
-MACHINE_CONFIG_END
+}
/***********************************
diff --git a/src/mame/drivers/minivadr.cpp b/src/mame/drivers/minivadr.cpp
index 40b9b0c2865..0b0b1bd4c88 100644
--- a/src/mame/drivers/minivadr.cpp
+++ b/src/mame/drivers/minivadr.cpp
@@ -110,23 +110,23 @@ static INPUT_PORTS_START( minivadr )
INPUT_PORTS_END
-MACHINE_CONFIG_START(minivadr_state::minivadr)
-
+void minivadr_state::minivadr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(24'000'000) / 6)
- MCFG_DEVICE_PROGRAM_MAP(minivadr_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", minivadr_state, irq0_line_hold)
+ Z80(config, m_maincpu, XTAL(24'000'000) / 6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &minivadr_state::minivadr_map);
+ m_maincpu->set_vblank_int("screen", FUNC(minivadr_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 240-1)
- MCFG_SCREEN_UPDATE_DRIVER(minivadr_state, screen_update_minivadr)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 256-1, 16, 240-1);
+ screen.set_screen_update(FUNC(minivadr_state::screen_update_minivadr));
/* the board has no sound hardware */
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/mirage.cpp b/src/mame/drivers/mirage.cpp
index 7b93a363369..49f970c0b9d 100644
--- a/src/mame/drivers/mirage.cpp
+++ b/src/mame/drivers/mirage.cpp
@@ -291,25 +291,25 @@ void miragemj_state::machine_reset()
m_mux_data = 0;
}
-MACHINE_CONFIG_START(miragemj_state::mirage)
-
+void miragemj_state::mirage(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 28000000/2)
- MCFG_DEVICE_PROGRAM_MAP(mirage_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", miragemj_state, irq6_line_hold)
+ M68000(config, m_maincpu, 28000000/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &miragemj_state::mirage_map);
+ m_maincpu->set_vblank_int("screen", FUNC(miragemj_state::irq6_line_hold));
EEPROM_93C46_16BIT(config, "eeprom"); // 93C45
/* video hardware */
BUFFERED_SPRITERAM16(config, m_spriteram);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(58)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(miragemj_state, screen_update_mirage)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(58);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(529));
+ screen.set_size(40*8, 32*8);
+ screen.set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(miragemj_state::screen_update_mirage));
+ screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
GFXDECODE(config, "gfxdecode", "palette", gfx_mirage);
PALETTE(config, "palette").set_format(palette_device::xBGR_555, 1024);
@@ -337,12 +337,10 @@ MACHINE_CONFIG_START(miragemj_state::mirage)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki_bgm", OKIM6295, 2000000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
+ OKIM6295(config, m_oki_bgm, 2000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.30); // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADD("oki_sfx", OKIM6295, 1000000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki_sfx, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70); // clock frequency & pin 7 not verified
+}
ROM_START( mirage )
diff --git a/src/mame/drivers/mirax.cpp b/src/mame/drivers/mirax.cpp
index 7d3060c9870..41946d23965 100644
--- a/src/mame/drivers/mirax.cpp
+++ b/src/mame/drivers/mirax.cpp
@@ -482,13 +482,14 @@ WRITE_LINE_MEMBER(mirax_state::vblank_irq)
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
-MACHINE_CONFIG_START(mirax_state::mirax)
- MCFG_DEVICE_ADD("maincpu", Z80, 12000000/4) // ceramic potted module, encrypted z80
- MCFG_DEVICE_PROGRAM_MAP(mirax_main_map)
+void mirax_state::mirax(machine_config &config)
+{
+ Z80(config, m_maincpu, 12000000/4); // ceramic potted module, encrypted z80
+ m_maincpu->set_addrmap(AS_PROGRAM, &mirax_state::mirax_main_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 12000000/4)
- MCFG_DEVICE_PROGRAM_MAP(mirax_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mirax_state, irq0_line_hold, 4*60)
+ Z80(config, m_audiocpu, 12000000/4);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &mirax_state::mirax_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(mirax_state::irq0_line_hold), attotime::from_hz(4*60));
ls259_device &mainlatch(LS259(config, "mainlatch")); // R10
mainlatch.q_out_cb<0>().set(FUNC(mirax_state::coin_counter0_w));
@@ -500,14 +501,14 @@ MACHINE_CONFIG_START(mirax_state::mirax)
mainlatch.q_out_cb<7>().set(FUNC(mirax_state::flip_screen_y_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mirax_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mirax_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(256, 256);
+ screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(mirax_state::screen_update));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(mirax_state::vblank_irq));
PALETTE(config, m_palette, FUNC(mirax_state::mirax_palette), 0x40);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mirax);
@@ -518,7 +519,7 @@ MACHINE_CONFIG_START(mirax_state::mirax)
AY8912(config, m_ay[0], 12000000/4).add_route(ALL_OUTPUTS, "mono", 0.80);
AY8912(config, m_ay[1], 12000000/4).add_route(ALL_OUTPUTS, "mono", 0.80);
-MACHINE_CONFIG_END
+}
ROM_START( mirax )
diff --git a/src/mame/drivers/mjsenpu.cpp b/src/mame/drivers/mjsenpu.cpp
index fae721c1710..c0780ae7eea 100644
--- a/src/mame/drivers/mjsenpu.cpp
+++ b/src/mame/drivers/mjsenpu.cpp
@@ -463,13 +463,13 @@ following clocks are on the PCB
*/
-MACHINE_CONFIG_START(mjsenpu_state::mjsenpu)
-
+void mjsenpu_state::mjsenpu(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", E132XT, 27000000*2) /* ?? Mhz */
- MCFG_DEVICE_PROGRAM_MAP(mjsenpu_32bit_map)
- MCFG_DEVICE_IO_MAP(mjsenpu_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mjsenpu_state, irq0_line_hold)
+ E132XT(config, m_maincpu, 27000000*2); /* ?? Mhz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mjsenpu_state::mjsenpu_32bit_map);
+ m_maincpu->set_addrmap(AS_IO, &mjsenpu_state::mjsenpu_io);
+ m_maincpu->set_vblank_int("screen", FUNC(mjsenpu_state::irq0_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
@@ -477,21 +477,20 @@ MACHINE_CONFIG_START(mjsenpu_state::mjsenpu)
TICKET_DISPENSER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_HIGH);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-16-1)
- MCFG_SCREEN_UPDATE_DRIVER(mjsenpu_state, screen_update_mjsenpu)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 0, 256-16-1);
+ screen.set_screen_update(FUNC(mjsenpu_state::screen_update_mjsenpu));
+ screen.set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 0x100)
+ PALETTE(config, m_palette).set_entries(0x100);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1000000, okim6295_device::PIN7_HIGH) /* 1 Mhz? */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); /* 1 Mhz? */
+}
ROM_START( mjsenpu )
diff --git a/src/mame/drivers/mjsister.cpp b/src/mame/drivers/mjsister.cpp
index 06c97b20cb9..37a2378a550 100644
--- a/src/mame/drivers/mjsister.cpp
+++ b/src/mame/drivers/mjsister.cpp
@@ -493,13 +493,13 @@ INTERRUPT_GEN_MEMBER(mjsister_state::interrupt)
m_maincpu->set_input_line(0, ASSERT_LINE);
}
-MACHINE_CONFIG_START(mjsister_state::mjsister)
-
+void mjsister_state::mjsister(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MCLK/2) /* 6.000 MHz */
- MCFG_DEVICE_PROGRAM_MAP(mjsister_map)
- MCFG_DEVICE_IO_MAP(mjsister_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mjsister_state, interrupt, 2*60)
+ Z80(config, m_maincpu, MCLK/2); /* 6.000 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mjsister_state::mjsister_map);
+ m_maincpu->set_addrmap(AS_IO, &mjsister_state::mjsister_io_map);
+ m_maincpu->set_periodic_int(FUNC(mjsister_state::interrupt), attotime::from_hz(2*60));
LS259(config, m_mainlatch[0]);
m_mainlatch[0]->q_out_cb<0>().set(FUNC(mjsister_state::rombank_w));
@@ -517,13 +517,13 @@ MACHINE_CONFIG_START(mjsister_state::mjsister)
m_mainlatch[1]->q_out_cb<6>().set(FUNC(mjsister_state::rombank_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(256+4, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255+4, 8, 247)
- MCFG_SCREEN_UPDATE_DRIVER(mjsister_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(256+4, 256);
+ screen.set_visarea(0, 255+4, 8, 247);
+ screen.set_screen_update(FUNC(mjsister_state::screen_update));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256);
@@ -540,7 +540,7 @@ MACHINE_CONFIG_START(mjsister_state::mjsister)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
/*************************************
*
diff --git a/src/mame/drivers/mk1.cpp b/src/mame/drivers/mk1.cpp
index e0aa24791b7..b7b94e13307 100644
--- a/src/mame/drivers/mk1.cpp
+++ b/src/mame/drivers/mk1.cpp
@@ -183,12 +183,13 @@ void mk1_state::machine_start()
}
-MACHINE_CONFIG_START(mk1_state::mk1)
+void mk1_state::mk1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD( "maincpu", F8, 2000000 ) // MK3850
- MCFG_DEVICE_PROGRAM_MAP(mk1_mem)
- MCFG_DEVICE_IO_MAP(mk1_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("f3853", f3853_device, int_acknowledge)
+ F8(config, m_maincpu, 2000000); // MK3850
+ m_maincpu->set_addrmap(AS_PROGRAM, &mk1_state::mk1_mem);
+ m_maincpu->set_addrmap(AS_IO, &mk1_state::mk1_io);
+ m_maincpu->set_irq_acknowledge_callback("f3853", FUNC(f3853_device::int_acknowledge));
f3853_device &f3853(F3853(config, "f3853", 2000000));
f3853.int_req_callback().set_inputline("maincpu", F8_INPUT_LINE_INT_REQ);
@@ -197,7 +198,7 @@ MACHINE_CONFIG_START(mk1_state::mk1)
config.set_default_layout(layout_mk1);
TIMER(config, "led_timer").configure_periodic(FUNC(mk1_state::mk1_update_leds), attotime::from_hz(30));
-MACHINE_CONFIG_END
+}
ROM_START( ccmk1 )
diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp
index 982610b5170..25a256d9d92 100644
--- a/src/mame/drivers/mmodular.cpp
+++ b/src/mame/drivers/mmodular.cpp
@@ -255,68 +255,72 @@ void mmodular_state::init_gen32()
rom[0x870] = 0x38;
}
-MACHINE_CONFIG_START(mmodular_state::alm16)
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(12'000'000))
- MCFG_DEVICE_PROGRAM_MAP(alm16_mem)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mmodular_state, irq2_line_hold, 600)
+void mmodular_state::alm16(machine_config &config)
+{
+ m68000_device &maincpu(M68000(config, "maincpu", XTAL(12'000'000)));
+ maincpu.set_addrmap(AS_PROGRAM, &mmodular_state::alm16_mem);
+ maincpu.set_periodic_int(FUNC(mmodular_state::irq2_line_hold), attotime::from_hz(600));
MEPHISTO_SENSORS_BOARD(config, "board", 0);
MEPHISTO_DISPLAY_MODUL(config, "display", 0);
config.set_default_layout(layout_mmodular);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mmodular_state::van16)
+void mmodular_state::van16(machine_config &config)
+{
alm16(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(van16_mem)
-MACHINE_CONFIG_END
+ subdevice<m68000_device>("maincpu")->set_addrmap(AS_PROGRAM, &mmodular_state::van16_mem);
+}
-MACHINE_CONFIG_START(mmodular_state::alm32)
- MCFG_DEVICE_ADD("maincpu", M68020, XTAL(12'000'000))
- MCFG_DEVICE_PROGRAM_MAP(alm32_mem)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mmodular_state, irq6_line_hold, 750)
+void mmodular_state::alm32(machine_config &config)
+{
+ m68020_device &maincpu(M68020(config, "maincpu", XTAL(12'000'000)));
+ maincpu.set_addrmap(AS_PROGRAM, &mmodular_state::alm32_mem);
+ maincpu.set_periodic_int(FUNC(mmodular_state::irq6_line_hold), attotime::from_hz(750));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
MEPHISTO_SENSORS_BOARD(config, "board", 0);
MEPHISTO_DISPLAY_MODUL(config, "display", 0);
config.set_default_layout(layout_mmodular);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mmodular_state::van32)
+void mmodular_state::van32(machine_config &config)
+{
alm32(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(van32_mem)
-MACHINE_CONFIG_END
+ subdevice<m68020_device>("maincpu")->set_addrmap(AS_PROGRAM, &mmodular_state::van32_mem);
+}
-MACHINE_CONFIG_START(mmodular_state::gen32)
- MCFG_DEVICE_ADD("maincpu", M68030, XTAL(33'333'000))
- MCFG_DEVICE_PROGRAM_MAP(gen32_mem)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mmodular_state, irq2_line_hold, 375)
+void mmodular_state::gen32(machine_config &config)
+{
+ m68030_device &maincpu(M68030(config, "maincpu", XTAL(33'333'000)));
+ maincpu.set_addrmap(AS_PROGRAM, &mmodular_state::gen32_mem);
+ maincpu.set_periodic_int(FUNC(mmodular_state::irq2_line_hold), attotime::from_hz(375));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
MEPHISTO_SENSORS_BOARD(config, "board", 0);
MEPHISTO_DISPLAY_MODUL(config, "display", 0);
config.set_default_layout(layout_mmodular);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(berlinp_state::berlinp)
- MCFG_DEVICE_ADD("maincpu", M68020, XTAL(24'576'000))
- MCFG_DEVICE_PROGRAM_MAP(berlinp_mem)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(berlinp_state, irq2_line_hold, 750)
+void berlinp_state::berlinp(machine_config &config)
+{
+ m68020_device &maincpu(M68020(config, "maincpu", XTAL(24'576'000)));
+ maincpu.set_addrmap(AS_PROGRAM, &berlinp_state::berlinp_mem);
+ maincpu.set_periodic_int(FUNC(berlinp_state::irq2_line_hold), attotime::from_hz(750));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
MEPHISTO_BUTTONS_BOARD(config, m_board, 0);
MEPHISTO_DISPLAY_MODUL(config, "display", 0);
config.set_default_layout(layout_mmodular);
-MACHINE_CONFIG_END
+}
ROM_START( alm16 )
diff --git a/src/mame/drivers/mod8.cpp b/src/mame/drivers/mod8.cpp
index 5d4f7589d61..afef506dc15 100644
--- a/src/mame/drivers/mod8.cpp
+++ b/src/mame/drivers/mod8.cpp
@@ -146,17 +146,18 @@ void mod8_state::kbd_put(u8 data)
m_maincpu->set_input_line(0, HOLD_LINE);
}
-MACHINE_CONFIG_START(mod8_state::mod8)
+void mod8_state::mod8(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8008, 800000)
- MCFG_DEVICE_PROGRAM_MAP(mod8_mem)
- MCFG_DEVICE_IO_MAP(mod8_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(mod8_state,mod8_irq_callback)
+ I8008(config, m_maincpu, 800000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mod8_state::mod8_mem);
+ m_maincpu->set_addrmap(AS_IO, &mod8_state::mod8_io);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(mod8_state::mod8_irq_callback));
/* video hardware */
TELEPRINTER(config, m_teleprinter, 0);
m_teleprinter->set_keyboard_callback(FUNC(mod8_state::kbd_put));
-MACHINE_CONFIG_END
+}
/* ROM definition */
diff --git a/src/mame/drivers/modena.cpp b/src/mame/drivers/modena.cpp
index 36154d8faed..43fce448759 100644
--- a/src/mame/drivers/modena.cpp
+++ b/src/mame/drivers/modena.cpp
@@ -138,9 +138,10 @@ void mephisto_modena_state::machine_reset()
}
-MACHINE_CONFIG_START(mephisto_modena_state::modena)
- MCFG_DEVICE_ADD("maincpu", M65C02, XTAL(4'194'304)) // W65C02SP
- MCFG_DEVICE_PROGRAM_MAP(modena_mem)
+void mephisto_modena_state::modena(machine_config &config)
+{
+ M65C02(config, m_maincpu, XTAL(4'194'304)); // W65C02SP
+ m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_modena_state::modena_mem);
timer_device &nmi_on(TIMER(config, "nmi_on"));
nmi_on.configure_periodic(FUNC(mephisto_modena_state::nmi_on), attotime::from_hz(XTAL(4'194'304) / (1 << 13)));
nmi_on.set_start_delay(attotime::from_hz(XTAL(4'194'304) / (1 << 13)) - attotime::from_usec(975)); // active for 975us
@@ -154,9 +155,8 @@ MACHINE_CONFIG_START(mephisto_modena_state::modena)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("beeper", BEEP, 3250)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ BEEP(config, m_beeper, 3250).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
ROM_START(modena)
diff --git a/src/mame/drivers/mogura.cpp b/src/mame/drivers/mogura.cpp
index cca38b8402e..71965ec7e99 100644
--- a/src/mame/drivers/mogura.cpp
+++ b/src/mame/drivers/mogura.cpp
@@ -208,22 +208,22 @@ void mogura_state::machine_start()
{
}
-MACHINE_CONFIG_START(mogura_state::mogura)
-
+void mogura_state::mogura(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,3000000) /* 3 MHz */
- MCFG_DEVICE_PROGRAM_MAP(mogura_map)
- MCFG_DEVICE_IO_MAP(mogura_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mogura_state, irq0_line_hold)
+ Z80(config, m_maincpu, 3000000); /* 3 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mogura_state::mogura_map);
+ m_maincpu->set_addrmap(AS_IO, &mogura_state::mogura_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mogura_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) // ?
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 512)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(mogura_state, screen_update_mogura)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60); // ?
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 512);
+ screen.set_visarea(0, 320-1, 0, 256-1);
+ screen.set_screen_update(FUNC(mogura_state::screen_update_mogura));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_mogura);
PALETTE(config, "palette", FUNC(mogura_state::mogura_palette), 32);
@@ -236,7 +236,7 @@ MACHINE_CONFIG_START(mogura_state::mogura)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "ldac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "ldac", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "rdac", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
ROM_START( mogura )
diff --git a/src/mame/drivers/mole.cpp b/src/mame/drivers/mole.cpp
index 5cf939ee286..83702b50d6b 100644
--- a/src/mame/drivers/mole.cpp
+++ b/src/mame/drivers/mole.cpp
@@ -323,21 +323,21 @@ void mole_state::machine_reset()
m_tile_bank = 0;
}
-MACHINE_CONFIG_START(mole_state::mole)
-
+void mole_state::mole(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 4000000) // ???
- MCFG_DEVICE_PROGRAM_MAP(mole_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mole_state, irq0_line_assert)
+ M6502(config, m_maincpu, 4000000); // ???
+ m_maincpu->set_addrmap(AS_PROGRAM, &mole_state::mole_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mole_state::irq0_line_assert));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(40*8, 25*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 25*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mole_state, screen_update_mole)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ screen.set_size(40*8, 25*8);
+ screen.set_visarea(0*8, 40*8-1, 0*8, 25*8-1);
+ screen.set_screen_update(FUNC(mole_state::screen_update_mole));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_mole);
PALETTE(config, "palette", palette_device::RBG_3BIT);
@@ -346,7 +346,7 @@ MACHINE_CONFIG_START(mole_state::mole)
SPEAKER(config, "mono").front_center();
AY8910(config, "aysnd", 2000000).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/molecular.cpp b/src/mame/drivers/molecular.cpp
index 538cb78742b..90ad41e69e8 100644
--- a/src/mame/drivers/molecular.cpp
+++ b/src/mame/drivers/molecular.cpp
@@ -297,31 +297,31 @@ void molecula_state::molecula_palette(palette_device &palette) const
{
}
-MACHINE_CONFIG_START(molecula_state::molecula)
-
+void molecula_state::molecula(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("filecpu",Z80,Z80_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(molecula_file_map)
- MCFG_DEVICE_IO_MAP(molecula_file_io)
- MCFG_DEVICE_DISABLE()
+ Z80(config, m_filecpu, Z80_CLOCK/2);
+ m_filecpu->set_addrmap(AS_PROGRAM, &molecula_state::molecula_file_map);
+ m_filecpu->set_addrmap(AS_IO, &molecula_state::molecula_file_io);
+ m_filecpu->set_disable();
- MCFG_DEVICE_ADD("appcpu",Z80,Z80_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(molecula_app_map)
- MCFG_DEVICE_IO_MAP(molecula_app_io)
+ z80_device &appcpu(Z80(config, "appcpu", Z80_CLOCK/2));
+ appcpu.set_addrmap(AS_PROGRAM, &molecula_state::molecula_app_map);
+ appcpu.set_addrmap(AS_IO, &molecula_state::molecula_app_io);
-// MCFG_DEVICE_ADD("sub",I8086,I86_CLOCK/2)
-// MCFG_DEVICE_PROGRAM_MAP(molecula_map)
-// MCFG_DEVICE_IO_MAP(molecula_io)
-// MCFG_DEVICE_DISABLE()
+// i8086_device &sub(I8086(config, "sub", I86_CLOCK/2));
+// sub.set_addrmap(AS_PROGRAM, &molecula_state::molecula_map);
+// sub.set_addrmap(AS_IO, &molecula_state::molecula_io);
+// sub.set_disable();
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_UPDATE_DRIVER(molecula_state, screen_update)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ screen.set_screen_update(FUNC(molecula_state::screen_update));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_molecula);
@@ -330,7 +330,7 @@ MACHINE_CONFIG_START(molecula_state::molecula)
/* sound hardware */
SPEAKER(config, "mono").front_center();
// AY8910(config, "aysnd", MAIN_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 0.30);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/momoko.cpp b/src/mame/drivers/momoko.cpp
index c3aea29e4e9..ec0d9096651 100644
--- a/src/mame/drivers/momoko.cpp
+++ b/src/mame/drivers/momoko.cpp
@@ -255,26 +255,26 @@ void momoko_state::machine_reset()
m_flipscreen = 0;
}
-MACHINE_CONFIG_START(momoko_state::momoko)
-
+void momoko_state::momoko(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(10'000'000)/2) /* 5.0MHz */
- MCFG_DEVICE_PROGRAM_MAP(momoko_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", momoko_state, irq0_line_hold)
+ Z80(config, m_maincpu, XTAL(10'000'000)/2); /* 5.0MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &momoko_state::momoko_map);
+ m_maincpu->set_vblank_int("screen", FUNC(momoko_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(10'000'000)/4) /* 2.5MHz */
- MCFG_DEVICE_PROGRAM_MAP(momoko_sound_map)
+ z80_device &audiocpu(Z80(config, "audiocpu", XTAL(10'000'000)/4)); /* 2.5MHz */
+ audiocpu.set_addrmap(AS_PROGRAM, &momoko_state::momoko_sound_map);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 29*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(momoko_state, screen_update_momoko)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(1*8, 31*8-1, 2*8, 29*8-1);
+ screen.set_screen_update(FUNC(momoko_state::screen_update_momoko));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_momoko);
PALETTE(config, m_palette).set_format(palette_device::xRGB_444, 512);
@@ -297,7 +297,7 @@ MACHINE_CONFIG_START(momoko_state::momoko)
ym2.add_route(1, "mono", 0.15);
ym2.add_route(2, "mono", 0.15);
ym2.add_route(3, "mono", 0.40);
-MACHINE_CONFIG_END
+}
/****************************************************************************/
diff --git a/src/mame/drivers/monacogp.cpp b/src/mame/drivers/monacogp.cpp
index 1c4caeef1d2..dcac825ec5f 100644
--- a/src/mame/drivers/monacogp.cpp
+++ b/src/mame/drivers/monacogp.cpp
@@ -183,11 +183,11 @@ void monacogp_state::video_start()
{
}
-MACHINE_CONFIG_START(monacogp_state::monacogp)
-
+void monacogp_state::monacogp(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK)
- MCFG_NETLIST_SETUP(monacogp)
+ NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK);
+ m_maincpu->set_constructor(netlist_monacogp);
/* video hardware */
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
@@ -197,7 +197,7 @@ MACHINE_CONFIG_START(monacogp_state::monacogp)
m_video->set_vert_params(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL);
m_video->set_fieldcount(1);
m_video->set_threshold(0.30);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/monon_color.cpp b/src/mame/drivers/monon_color.cpp
index 0cb170b6dbe..bc7cac52cea 100644
--- a/src/mame/drivers/monon_color.cpp
+++ b/src/mame/drivers/monon_color.cpp
@@ -117,21 +117,20 @@ void monon_color_state::monon_color_map(address_map &map)
}
MACHINE_CONFIG_START(monon_color_state::monon_color)
-
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", AX208, 96000000) // (8051 / MCS51 derived) incomplete core!
- MCFG_DEVICE_PROGRAM_MAP(monon_color_map)
+ AX208(config, m_maincpu, 96000000); // (8051 / MCS51 derived) incomplete core!
+ m_maincpu->set_addrmap(AS_PROGRAM, &monon_color_state::monon_color_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_UPDATE_DRIVER(monon_color_state, screen_update)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 256)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ m_screen->set_screen_update(FUNC(monon_color_state::screen_update));
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_palette(m_palette);
+
+ PALETTE(config, m_palette).set_entries(256);
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/moo.cpp b/src/mame/drivers/moo.cpp
index f2ea25096f8..e01c2c4d483 100644
--- a/src/mame/drivers/moo.cpp
+++ b/src/mame/drivers/moo.cpp
@@ -494,15 +494,15 @@ MACHINE_RESET_MEMBER(moo_state,moo)
m_sprite_colorbase = 0;
}
-MACHINE_CONFIG_START(moo_state::moo)
-
+void moo_state::moo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(32'000'000)/2) // 16MHz verified
- MCFG_DEVICE_PROGRAM_MAP(moo_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", moo_state, moo_interrupt)
+ M68000(config, m_maincpu, XTAL(32'000'000)/2); // 16MHz verified
+ m_maincpu->set_addrmap(AS_PROGRAM, &moo_state::moo_map);
+ m_maincpu->set_vblank_int("screen", FUNC(moo_state::moo_interrupt));
- MCFG_DEVICE_ADD("soundcpu", Z80, XTAL(32'000'000)/4) // 8MHz verified
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ Z80(config, m_soundcpu, XTAL(32'000'000)/4); // 8MHz verified
+ m_soundcpu->set_addrmap(AS_PROGRAM, &moo_state::sound_map);
MCFG_MACHINE_START_OVERRIDE(moo_state,moo)
MCFG_MACHINE_RESET_OVERRIDE(moo_state,moo)
@@ -513,13 +513,13 @@ MACHINE_CONFIG_START(moo_state::moo)
m_k053252->set_offsets(40, 16);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(1200)) // should give IRQ4 sufficient time to update scroll registers
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(40, 40+384-1, 16, 16+224-1)
- MCFG_SCREEN_UPDATE_DRIVER(moo_state, screen_update_moo)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(1200)); // should give IRQ4 sufficient time to update scroll registers
+ m_screen->set_size(64*8, 32*8);
+ m_screen->set_visarea(40, 40+384-1, 16, 16+224-1);
+ m_screen->set_screen_update(FUNC(moo_state::screen_update_moo));
PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 2048);
m_palette->enable_shadows();
@@ -549,17 +549,17 @@ MACHINE_CONFIG_START(moo_state::moo)
YM2151(config, "ymsnd", XTAL(32'000'000)/8).add_route(0, "lspeaker", 0.50).add_route(1, "rspeaker", 0.50); // 4MHz verified
- MCFG_DEVICE_ADD("k054539", K054539, XTAL(18'432'000))
- MCFG_SOUND_ROUTE(0, "rspeaker", 0.75)
- MCFG_SOUND_ROUTE(1, "lspeaker", 0.75)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(moo_state::moobl)
+ K054539(config, m_k054539, XTAL(18'432'000));
+ m_k054539->add_route(0, "rspeaker", 0.75);
+ m_k054539->add_route(1, "lspeaker", 0.75);
+}
+void moo_state::moobl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 16100000)
- MCFG_DEVICE_PROGRAM_MAP(moobl_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", moo_state, moobl_interrupt)
+ M68000(config, m_maincpu, 16100000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &moo_state::moobl_map);
+ m_maincpu->set_vblank_int("screen", FUNC(moo_state::moobl_interrupt));
MCFG_MACHINE_START_OVERRIDE(moo_state,moo)
MCFG_MACHINE_RESET_OVERRIDE(moo_state,moo)
@@ -567,13 +567,13 @@ MACHINE_CONFIG_START(moo_state::moobl)
EEPROM_ER5911_8BIT(config, "eeprom");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(1200)) // should give IRQ4 sufficient time to update scroll registers
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(40, 40+384-1, 16, 16+224-1)
- MCFG_SCREEN_UPDATE_DRIVER(moo_state, screen_update_moo)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(1200)); // should give IRQ4 sufficient time to update scroll registers
+ m_screen->set_size(64*8, 32*8);
+ m_screen->set_visarea(40, 40+384-1, 16, 16+224-1);
+ m_screen->set_screen_update(FUNC(moo_state::screen_update_moo));
PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 2048);
m_palette->enable_shadows();
@@ -599,16 +599,16 @@ MACHINE_CONFIG_START(moo_state::moobl)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified
+ m_oki->add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ m_oki->add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(moo_state::bucky)
+void moo_state::bucky(machine_config &config)
+{
moo(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(bucky_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &moo_state::bucky_map);
K054000(config, "k054000", 0);
@@ -618,7 +618,7 @@ MACHINE_CONFIG_START(moo_state::bucky)
m_palette->set_format(palette_device::xRGB_888, 4096);
MCFG_VIDEO_START_OVERRIDE(moo_state,bucky)
-MACHINE_CONFIG_END
+}
ROM_START( moomesa ) /* Version EA */
diff --git a/src/mame/drivers/mosaic.cpp b/src/mame/drivers/mosaic.cpp
index 37cabb24b2d..5bca285848e 100644
--- a/src/mame/drivers/mosaic.cpp
+++ b/src/mame/drivers/mosaic.cpp
@@ -277,23 +277,23 @@ void mosaic_state::machine_reset()
m_prot_val = 0;
}
-MACHINE_CONFIG_START(mosaic_state::mosaic)
-
+void mosaic_state::mosaic(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z180, XTAL(12'288'000)/2) /* 6.144MHz */
- MCFG_DEVICE_PROGRAM_MAP(mosaic_map)
- MCFG_DEVICE_IO_MAP(mosaic_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mosaic_state, irq0_line_hold)
+ Z180(config, m_maincpu, XTAL(12'288'000)/2); /* 6.144MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mosaic_state::mosaic_map);
+ m_maincpu->set_addrmap(AS_IO, &mosaic_state::mosaic_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mosaic_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(8*8, 48*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mosaic_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(8*8, 48*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(mosaic_state::screen_update));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_mosaic);
PALETTE(config, "palette").set_format(palette_device::xRGB_555, 256);
@@ -305,15 +305,15 @@ MACHINE_CONFIG_START(mosaic_state::mosaic)
ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'288'000)/4)); /* 3.072MHz or 3.579545MHz (14.31818MHz/4)? */
ymsnd.port_a_read_callback().set_ioport("DSW");
ymsnd.add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mosaic_state::gfire2)
+void mosaic_state::gfire2(machine_config &config)
+{
mosaic(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(gfire2_map)
- MCFG_DEVICE_IO_MAP(gfire2_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &mosaic_state::gfire2_map);
+ m_maincpu->set_addrmap(AS_IO, &mosaic_state::gfire2_io_map);
+}
diff --git a/src/mame/drivers/mouser.cpp b/src/mame/drivers/mouser.cpp
index 4dd9341441c..cde0dabd118 100644
--- a/src/mame/drivers/mouser.cpp
+++ b/src/mame/drivers/mouser.cpp
@@ -190,17 +190,17 @@ void mouser_state::machine_reset()
{
}
-MACHINE_CONFIG_START(mouser_state::mouser)
-
+void mouser_state::mouser(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* 4 MHz ? */
- MCFG_DEVICE_PROGRAM_MAP(mouser_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ Z80(config, m_maincpu, 4000000); /* 4 MHz ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mouser_state::mouser_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &mouser_state::decrypted_opcodes_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 4000000) /* ??? */
- MCFG_DEVICE_PROGRAM_MAP(mouser_sound_map)
- MCFG_DEVICE_IO_MAP(mouser_sound_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mouser_state, mouser_sound_nmi_assert, 4*60) /* ??? This controls the sound tempo */
+ Z80(config, m_audiocpu, 4000000); /* ??? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &mouser_state::mouser_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &mouser_state::mouser_sound_io_map);
+ m_audiocpu->set_periodic_int(FUNC(mouser_state::mouser_sound_nmi_assert), attotime::from_hz(4*60)); /* ??? This controls the sound tempo */
ls259_device &mainlatch(LS259(config, "mainlatch")); // type unconfirmed
mainlatch.q_out_cb<0>().set(FUNC(mouser_state::nmi_enable_w));
@@ -210,14 +210,14 @@ MACHINE_CONFIG_START(mouser_state::mouser)
GENERIC_LATCH_8(config, "soundlatch").data_pending_callback().set_inputline(m_audiocpu, 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mouser_state, screen_update_mouser)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, mouser_state, mouser_nmi_interrupt))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(mouser_state::screen_update_mouser));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(mouser_state::mouser_nmi_interrupt));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mouser);
PALETTE(config, m_palette, FUNC(mouser_state::mouser_palette), 64);
@@ -227,7 +227,7 @@ MACHINE_CONFIG_START(mouser_state::mouser)
AY8910(config, "ay1", 4000000/2).add_route(ALL_OUTPUTS, "mono", 0.50);
AY8910(config, "ay2", 4000000/2).add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
ROM_START( mouser )
diff --git a/src/mame/drivers/mpc3000.cpp b/src/mame/drivers/mpc3000.cpp
index 799ee2b5c94..3110cd1f0cb 100644
--- a/src/mame/drivers/mpc3000.cpp
+++ b/src/mame/drivers/mpc3000.cpp
@@ -205,13 +205,12 @@ void mpc3000_state::mpc3000(machine_config &config)
hiledlatch.q_out_cb<6>().set_output("led14").invert(); // 16 Levels
hiledlatch.q_out_cb<7>().set_output("led15").invert(); // After
- device_t *device = nullptr;
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(80)
- MCFG_SCREEN_UPDATE_DEVICE("lcdc", hd61830_device, screen_update)
- MCFG_SCREEN_SIZE(240, 64) //6x20, 8x8
- MCFG_SCREEN_VISIBLE_AREA(0, 240-1, 0, 64-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(80);
+ screen.set_screen_update("lcdc", FUNC(hd61830_device::screen_update));
+ screen.set_size(240, 64); //6x20, 8x8
+ screen.set_visarea(0, 240-1, 0, 64-1);
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(mpc3000_state::mpc3000_palette), 2);
diff --git a/src/mame/drivers/mps1230.cpp b/src/mame/drivers/mps1230.cpp
index 3646d540904..71f8f4d9d39 100644
--- a/src/mame/drivers/mps1230.cpp
+++ b/src/mame/drivers/mps1230.cpp
@@ -138,15 +138,17 @@ void mps1230_state::mps1230_map(address_map &map)
static INPUT_PORTS_START( mps1230 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(mps1230_state::mps1230)
- MCFG_DEVICE_ADD(CPU_TAG, UPD7810, 11060000)
- MCFG_DEVICE_PROGRAM_MAP(mps1230_map)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mps1230_state::mps1000)
- MCFG_DEVICE_ADD(CPU_TAG, Z80, 4000000)
- MCFG_DEVICE_PROGRAM_MAP(mps1230_map)
-MACHINE_CONFIG_END
+void mps1230_state::mps1230(machine_config &config)
+{
+ UPD7810(config, m_maincpu, 11060000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mps1230_state::mps1230_map);
+}
+
+void mps1230_state::mps1000(machine_config &config)
+{
+ Z80(config, m_maincpu, 4000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mps1230_state::mps1230_map);
+}
/***************************************************************************
diff --git a/src/mame/drivers/mpu12wbk.cpp b/src/mame/drivers/mpu12wbk.cpp
index f1e22b2bf43..807716f04e8 100644
--- a/src/mame/drivers/mpu12wbk.cpp
+++ b/src/mame/drivers/mpu12wbk.cpp
@@ -494,22 +494,22 @@ GFXDECODE_END
* Machine Drivers *
*************************/
-MACHINE_CONFIG_START(mpu12wbk_state::mpu12wbk)
-
+void mpu12wbk_state::mpu12wbk(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809, MASTER_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(mpu12wbk_map)
+ MC6809(config, m_maincpu, MASTER_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mpu12wbk_state::mpu12wbk_map);
// NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE((32+1)*8, (32+1)*8) /* From MC6845, registers 00 & 04. (value-1) */
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) /* Driven by MC6845, registers 01 & 06 */
- MCFG_SCREEN_UPDATE_DRIVER(mpu12wbk_state, screen_update_mpu12wbk)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size((32+1)*8, (32+1)*8); /* From MC6845, registers 00 & 04. (value-1) */
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1); /* Driven by MC6845, registers 01 & 06 */
+ screen.set_screen_update(FUNC(mpu12wbk_state::screen_update_mpu12wbk));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_mpu12wbk);
PALETTE(config, "palette", FUNC(mpu12wbk_state::mpu12wbk_palette), 512);
@@ -524,8 +524,7 @@ MACHINE_CONFIG_START(mpu12wbk_state::mpu12wbk)
SPEAKER(config, "mono").front_center();
AY8910(config, "ay8910", MASTER_CLOCK/8).add_route(ALL_OUTPUTS, "mono", 1.00); /* clock guessed */
-
-MACHINE_CONFIG_END
+}
/*************************
diff --git a/src/mame/drivers/mpu2.cpp b/src/mame/drivers/mpu2.cpp
index 566df8efea1..914dd61b447 100644
--- a/src/mame/drivers/mpu2.cpp
+++ b/src/mame/drivers/mpu2.cpp
@@ -74,10 +74,11 @@ INPUT_PORTS_END
-MACHINE_CONFIG_START(mpu2_state::mpu2)
- MCFG_DEVICE_ADD("maincpu", M6800, 2000000) // ?
- MCFG_DEVICE_PROGRAM_MAP(mpu2_basemap)
-MACHINE_CONFIG_END
+void mpu2_state::mpu2(machine_config &config)
+{
+ M6800(config, m_maincpu, 2000000); // ?
+ m_maincpu->set_addrmap(AS_PROGRAM, &mpu2_state::mpu2_basemap);
+}
// technically not a 'bios' because they're all on the same board.
#define MPU2_MASKROM \
diff --git a/src/mame/drivers/mpu4dealem.cpp b/src/mame/drivers/mpu4dealem.cpp
index a94ca7edc8b..73db940923c 100644
--- a/src/mame/drivers/mpu4dealem.cpp
+++ b/src/mame/drivers/mpu4dealem.cpp
@@ -196,12 +196,13 @@ MACHINE_RESET_MEMBER(mpu4dealem_state,dealem_vid)
/* machine driver for Zenitone Deal 'Em board */
-MACHINE_CONFIG_START(mpu4dealem_state::dealem)
+void mpu4dealem_state::dealem(machine_config &config)
+{
MCFG_MACHINE_START_OVERRIDE(mpu4dealem_state,mod2) /* main mpu4 board initialisation */
MCFG_MACHINE_RESET_OVERRIDE(mpu4dealem_state,dealem_vid)
- MCFG_DEVICE_ADD("maincpu", M6809, MPU4_MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(dealem_memmap)
+ M6809(config, m_maincpu, MPU4_MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mpu4dealem_state::dealem_memmap);
mpu4_common(config);
@@ -214,12 +215,12 @@ MACHINE_CONFIG_START(mpu4dealem_state::dealem)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_SIZE((54+1)*8, (32+1)*8) /* Taken from 6845 init, registers 00 & 04. Normally programmed with (value-1) */
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 31*8-1) /* Taken from 6845 init, registers 01 & 06 */
- MCFG_SCREEN_REFRESH_RATE(56) /* Measured accurately from the flip-flop, but 6845 handles this */
- MCFG_SCREEN_UPDATE_DRIVER(mpu4dealem_state, screen_update_dealem)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_size((54+1)*8, (32+1)*8); /* Taken from 6845 init, registers 00 & 04. Normally programmed with (value-1) */
+ screen.set_visarea(0*8, 40*8-1, 0*8, 31*8-1); /* Taken from 6845 init, registers 01 & 06 */
+ screen.set_refresh_hz(56); /* Measured accurately from the flip-flop, but 6845 handles this */
+ screen.set_screen_update(FUNC(mpu4dealem_state::screen_update_dealem));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_dealem);
@@ -230,7 +231,7 @@ MACHINE_CONFIG_START(mpu4dealem_state::dealem)
crtc.set_show_border_area(false);
crtc.set_char_width(8);
crtc.out_vsync_callback().set(FUNC(mpu4dealem_state::dealem_vsync_changed));
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/mpu4plasma.cpp b/src/mame/drivers/mpu4plasma.cpp
index f1f6930af61..9784f72a740 100644
--- a/src/mame/drivers/mpu4plasma.cpp
+++ b/src/mame/drivers/mpu4plasma.cpp
@@ -88,22 +88,23 @@ uint32_t mpu4plasma_state::screen_update_mpu4plasma(screen_device &screen, bitma
}
-MACHINE_CONFIG_START(mpu4plasma_state::mpu4plasma)
+void mpu4plasma_state::mpu4plasma(machine_config &config)
+{
mod2(config);
- MCFG_DEVICE_ADD("plasmacpu", M68000, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(mpu4plasma_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mpu4plasma_state, irq4_line_hold)
-
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 128-1, 0*8, 40-1)
- MCFG_SCREEN_UPDATE_DRIVER(mpu4plasma_state, screen_update_mpu4plasma)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 0x200)
-MACHINE_CONFIG_END
+ m68000_device &plasmacpu(M68000(config, "plasmacpu", 10000000));
+ plasmacpu.set_addrmap(AS_PROGRAM, &mpu4plasma_state::mpu4plasma_map);
+ plasmacpu.set_vblank_int("screen", FUNC(mpu4plasma_state::irq4_line_hold));
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(0, 128-1, 0*8, 40-1);
+ screen.set_screen_update(FUNC(mpu4plasma_state::screen_update_mpu4plasma));
+ screen.set_palette(m_palette);
+
+ PALETTE(config, m_palette).set_entries(0x200);
+}
// plasma v0.1
#define M4BIGCHF_PLASMA \
diff --git a/src/mame/drivers/mpz80.cpp b/src/mame/drivers/mpz80.cpp
index 0785a308562..344a1f14e7f 100644
--- a/src/mame/drivers/mpz80.cpp
+++ b/src/mame/drivers/mpz80.cpp
@@ -709,7 +709,7 @@ void mpz80_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( mpz80 )
+// machine_config( mpz80 )
//-------------------------------------------------
void mpz80_state::mpz80(machine_config &config)
@@ -744,7 +744,7 @@ void mpz80_state::mpz80(machine_config &config)
// software list
SOFTWARE_LIST(config, "flop_list").set_original("mpz80");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/mrdo.cpp b/src/mame/drivers/mrdo.cpp
index 90744563f71..c157b6f9b05 100644
--- a/src/mame/drivers/mrdo.cpp
+++ b/src/mame/drivers/mrdo.cpp
@@ -175,18 +175,18 @@ static GFXDECODE_START( gfx_mrdo )
GFXDECODE_END
-MACHINE_CONFIG_START(mrdo_state::mrdo)
-
+void mrdo_state::mrdo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MAIN_CLOCK/2) /* Verified */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mrdo_state, irq0_line_hold)
+ Z80(config, m_maincpu, MAIN_CLOCK/2); /* Verified */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mrdo_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mrdo_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/4, 312, 8, 248, 262, 32, 224)
- MCFG_SCREEN_UPDATE_DRIVER(mrdo_state, screen_update_mrdo)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(VIDEO_CLOCK/4, 312, 8, 248, 262, 32, 224);
+ screen.set_screen_update(FUNC(mrdo_state::screen_update_mrdo));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mrdo);
PALETTE(config, m_palette, FUNC(mrdo_state::mrdo_palette), 64*4 + 16*4, 256);
@@ -194,12 +194,10 @@ MACHINE_CONFIG_START(mrdo_state::mrdo)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("u8106_1", U8106, MAIN_CLOCK/2) /* sn76489-equivalent?, Verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ U8106(config, "u8106_1", MAIN_CLOCK/2).add_route(ALL_OUTPUTS, "mono", 0.50); /* sn76489-equivalent?, Verified */
- MCFG_DEVICE_ADD("u8106_2", U8106, MAIN_CLOCK/2) /* sn76489-equivalent?, Verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ U8106(config, "u8106_2", MAIN_CLOCK/2).add_route(ALL_OUTPUTS, "mono", 0.50); /* sn76489-equivalent?, Verified */
+}
void mrdo_state::mrlo(machine_config &config)
{
diff --git a/src/mame/drivers/mrflea.cpp b/src/mame/drivers/mrflea.cpp
index 2b30556c9f9..c9020ed39ec 100644
--- a/src/mame/drivers/mrflea.cpp
+++ b/src/mame/drivers/mrflea.cpp
@@ -255,17 +255,17 @@ void mrflea_state::machine_reset()
m_gfx_bank = 0;
}
-MACHINE_CONFIG_START(mrflea_state::mrflea)
-
+void mrflea_state::mrflea(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* 4 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(mrflea_master_map)
- MCFG_DEVICE_IO_MAP(mrflea_master_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mrflea_state, irq0_line_hold) /* NMI resets the game */
-
- MCFG_DEVICE_ADD("subcpu", Z80, 6000000) // runs in IM 1, so doesn't use 8259 INTA
- MCFG_DEVICE_PROGRAM_MAP(mrflea_slave_map)
- MCFG_DEVICE_IO_MAP(mrflea_slave_io_map)
+ Z80(config, m_maincpu, 4000000); /* 4 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mrflea_state::mrflea_master_map);
+ m_maincpu->set_addrmap(AS_IO, &mrflea_state::mrflea_master_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mrflea_state::irq0_line_hold)); /* NMI resets the game */
+
+ Z80(config, m_subcpu, 6000000); // runs in IM 1, so doesn't use 8259 INTA
+ m_subcpu->set_addrmap(AS_PROGRAM, &mrflea_state::mrflea_slave_map);
+ m_subcpu->set_addrmap(AS_IO, &mrflea_state::mrflea_slave_io_map);
TIMER(config, "scantimer").configure_scanline(FUNC(mrflea_state::mrflea_slave_interrupt), "screen", 0, 1);
config.m_minimum_quantum = attotime::from_hz(6000);
@@ -285,13 +285,13 @@ MACHINE_CONFIG_START(mrflea_state::mrflea)
m_pic->out_int_callback().set_inputline(m_subcpu, 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mrflea_state, screen_update_mrflea)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 0*8, 31*8-1);
+ m_screen->set_screen_update(FUNC(mrflea_state::screen_update_mrflea));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mrflea);
PALETTE(config, m_palette).set_format(palette_device::xRGB_444, 32);
@@ -315,7 +315,7 @@ MACHINE_CONFIG_START(mrflea_state::mrflea)
ay4.port_a_read_callback().set_ioport("UNKNOWN");
ay4.port_b_write_callback().set(FUNC(mrflea_state::mrflea_data1_w));
ay4.add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
/*************************************
*
diff --git a/src/mame/drivers/mrjong.cpp b/src/mame/drivers/mrjong.cpp
index 6f89035cbb5..f2de01ab5a6 100644
--- a/src/mame/drivers/mrjong.cpp
+++ b/src/mame/drivers/mrjong.cpp
@@ -185,22 +185,22 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(mrjong_state::mrjong)
-
+void mrjong_state::mrjong(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,15468000/6) /* 2.578 MHz?? */
- MCFG_DEVICE_PROGRAM_MAP(mrjong_map)
- MCFG_DEVICE_IO_MAP(mrjong_io_map)
+ Z80(config, m_maincpu,15468000/6); /* 2.578 MHz?? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mrjong_state::mrjong_map);
+ m_maincpu->set_addrmap(AS_IO, &mrjong_state::mrjong_io_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 30*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mrjong_state, screen_update_mrjong)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 30*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(mrjong_state::screen_update_mrjong));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mrjong);
PALETTE(config, m_palette, FUNC(mrjong_state::mrjong_palette), 4 * 32, 16);
@@ -209,7 +209,7 @@ MACHINE_CONFIG_START(mrjong_state::mrjong)
SPEAKER(config, "mono").front_center();
SN76489(config, "sn1", 15468000 / 6).add_route(ALL_OUTPUTS, "mono", 1.0);
SN76489(config, "sn2", 15468000 / 6).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/ms0515.cpp b/src/mame/drivers/ms0515.cpp
index 15ba8d59204..c0f1aa54baa 100644
--- a/src/mame/drivers/ms0515.cpp
+++ b/src/mame/drivers/ms0515.cpp
@@ -523,18 +523,19 @@ WRITE_LINE_MEMBER(ms0515_state::irq11_w)
irq_encoder(11, state);
}
-MACHINE_CONFIG_START(ms0515_state::ms0515)
+void ms0515_state::ms0515(machine_config &config)
+{
/* basic machine hardware */
T11(config, m_maincpu, XTAL(15'000'000) / 2); // actual CPU is T11 clone, KR1807VM1
m_maincpu->set_initial_mode(0xf2ff);
m_maincpu->set_addrmap(AS_PROGRAM, &ms0515_state::ms0515_mem);
/* video hardware -- 50 Hz refresh rate */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS( XTAL(15'000'000), 958,0,640, 313,0,200 )
- MCFG_SCREEN_UPDATE_DRIVER(ms0515_state, screen_update_ms0515)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, ms0515_state, screen_vblank))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw( XTAL(15'000'000), 958,0,640, 313,0,200 );
+ screen.set_screen_update(FUNC(ms0515_state::screen_update_ms0515));
+ screen.screen_vblank().set(FUNC(ms0515_state::screen_vblank));
+ screen.set_palette("palette");
config.set_default_layout(layout_ms0515);
PALETTE(config, "palette", FUNC(ms0515_state::ms0515_palette), 16);
@@ -588,7 +589,7 @@ MACHINE_CONFIG_START(ms0515_state::ms0515)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("128K");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( ms0515 )
diff --git a/src/mame/drivers/ms32.cpp b/src/mame/drivers/ms32.cpp
index 006c3a52685..431ee15cae4 100644
--- a/src/mame/drivers/ms32.cpp
+++ b/src/mame/drivers/ms32.cpp
@@ -1700,28 +1700,28 @@ void ms32_state::machine_reset()
/********** MACHINE DRIVER **********/
-MACHINE_CONFIG_START(ms32_state::ms32)
-
+void ms32_state::ms32(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V70, 20000000) // D70632GD-20 20MHz
- MCFG_DEVICE_PROGRAM_MAP(ms32_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(ms32_state,irq_callback)
+ V70(config, m_maincpu, 20000000); // D70632GD-20 20MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &ms32_state::ms32_map);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(ms32_state::irq_callback));
TIMER(config, "scantimer").configure_scanline(FUNC(ms32_state::ms32_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("audiocpu", Z80, 8000000) // Z0840008PSC, Clock from notes
- MCFG_DEVICE_PROGRAM_MAP(ms32_sound_map)
+ Z80(config, m_audiocpu, 8000000); // Z0840008PSC, Clock from notes
+ m_audiocpu->set_addrmap(AS_PROGRAM, &ms32_state::ms32_sound_map);
config.m_minimum_quantum = attotime::from_hz(60000);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(40*8, 28*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(ms32_state, screen_update_ms32)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(40*8, 28*8);
+ m_screen->set_visarea(0*8, 40*8-1, 0*8, 28*8-1);
+ m_screen->set_screen_update(FUNC(ms32_state::screen_update_ms32));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_ms32);
PALETTE(config, m_palette).set_entries(0x10000);
@@ -1734,24 +1734,23 @@ MACHINE_CONFIG_START(ms32_state::ms32)
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI);
- MCFG_DEVICE_ADD("ymf", YMF271, 16934400)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-// MCFG_SOUND_ROUTE(2, "lspeaker", 1.0) Output 2/3 not used?
-// MCFG_SOUND_ROUTE(3, "rspeaker", 1.0)
-
-MACHINE_CONFIG_END
+ ymf271_device &ymf(YMF271(config, "ymf", 16934400));
+ ymf.add_route(0, "lspeaker", 1.0);
+ ymf.add_route(1, "rspeaker", 1.0);
+// ymf.add_route(2, "lspeaker", 1.0); Output 2/3 not used?
+// ymf.add_route(3, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(ms32_state::f1superb)
+void ms32_state::f1superb(machine_config &config)
+{
ms32(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(f1superb_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &ms32_state::f1superb_map);
m_gfxdecode->set_info(gfx_f1superb);
MCFG_VIDEO_START_OVERRIDE(ms32_state,f1superb)
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/msbc1.cpp b/src/mame/drivers/msbc1.cpp
index f11756b0bd9..5ceecb1e4c2 100644
--- a/src/mame/drivers/msbc1.cpp
+++ b/src/mame/drivers/msbc1.cpp
@@ -94,11 +94,12 @@ void msbc1_state::machine_reset()
m_maincpu->reset();
}
-MACHINE_CONFIG_START(msbc1_state::msbc1)
+void msbc1_state::msbc1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(MC68000R12_TAG, M68000, XTAL(12'500'000))
- MCFG_DEVICE_PROGRAM_MAP(msbc1_mem)
-MACHINE_CONFIG_END
+ M68000(config, m_maincpu, XTAL(12'500'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &msbc1_state::msbc1_mem);
+}
/* ROM definition */
ROM_START( msbc1 )
diff --git a/src/mame/drivers/mstation.cpp b/src/mame/drivers/mstation.cpp
index 19d20a75ea8..4dce16f278e 100644
--- a/src/mame/drivers/mstation.cpp
+++ b/src/mame/drivers/mstation.cpp
@@ -446,20 +446,21 @@ void mstation_state::mstation_palette(palette_device &palette) const
}
-MACHINE_CONFIG_START(mstation_state::mstation)
+void mstation_state::mstation(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, XTAL(4'000'000)) //unknown clock
- MCFG_DEVICE_PROGRAM_MAP(mstation_mem)
- MCFG_DEVICE_IO_MAP(mstation_io)
+ Z80(config, m_maincpu, XTAL(4'000'000)); //unknown clock
+ m_maincpu->set_addrmap(AS_PROGRAM, &mstation_state::mstation_mem);
+ m_maincpu->set_addrmap(AS_IO, &mstation_state::mstation_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(mstation_state, screen_update)
- MCFG_SCREEN_SIZE(320, 128)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 128-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(FUNC(mstation_state::screen_update));
+ screen.set_size(320, 128);
+ screen.set_visarea(0, 320-1, 0, 128-1);
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(mstation_state::mstation_palette), 2);
@@ -480,7 +481,7 @@ MACHINE_CONFIG_START(mstation_state::mstation)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("128K");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( mstation )
diff --git a/src/mame/drivers/mt735.cpp b/src/mame/drivers/mt735.cpp
index a8dad4eaca1..c9a2550a648 100644
--- a/src/mame/drivers/mt735.cpp
+++ b/src/mame/drivers/mt735.cpp
@@ -64,10 +64,11 @@ void mt735_state::mt735_map(address_map &map)
static INPUT_PORTS_START( mt735 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(mt735_state::mt735)
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(48'000'000)/6)
- MCFG_DEVICE_PROGRAM_MAP(mt735_map)
-MACHINE_CONFIG_END
+void mt735_state::mt735(machine_config &config)
+{
+ M68000(config, m_cpu, XTAL(48'000'000)/6);
+ m_cpu->set_addrmap(AS_PROGRAM, &mt735_state::mt735_map);
+}
ROM_START( mt735 )
ROM_REGION( 0x40000, "maincpu", 0 )
diff --git a/src/mame/drivers/mtx.cpp b/src/mame/drivers/mtx.cpp
index 757218537d1..bf2fa152940 100644
--- a/src/mame/drivers/mtx.cpp
+++ b/src/mame/drivers/mtx.cpp
@@ -280,7 +280,7 @@ WRITE_LINE_MEMBER(mtx_state::mtx_tms9929a_interrupt)
***************************************************************************/
/*-------------------------------------------------
- MACHINE_CONFIG_START( mtx512 )
+ machine_config( mtx512 )
-------------------------------------------------*/
MACHINE_CONFIG_START(mtx_state::mtx512)
@@ -303,8 +303,7 @@ MACHINE_CONFIG_START(mtx_state::mtx512)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SN76489A_TAG, SN76489A, XTAL(4'000'000))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SN76489A(config, SN76489A_TAG, XTAL(4'000'000)).add_route(ALL_OUTPUTS, "mono", 1.00);
/* devices */
Z80CTC(config, m_z80ctc, XTAL(4'000'000));
@@ -358,7 +357,7 @@ void mtx_state::mtx500(machine_config &config)
}
/*-------------------------------------------------
- MACHINE_CONFIG_START( rs128 )
+ machine_config( rs128 )
-------------------------------------------------*/
void mtx_state::rs128(machine_config &config)
diff --git a/src/mame/drivers/mugsmash.cpp b/src/mame/drivers/mugsmash.cpp
index 7c107562ab2..55d8c7d9358 100644
--- a/src/mame/drivers/mugsmash.cpp
+++ b/src/mame/drivers/mugsmash.cpp
@@ -398,23 +398,23 @@ void mugsmash_state::machine_start()
{
}
-MACHINE_CONFIG_START(mugsmash_state::mugsmash)
-
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(mugsmash_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mugsmash_state, irq6_line_hold)
+void mugsmash_state::mugsmash(machine_config &config)
+{
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mugsmash_state::mugsmash_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mugsmash_state::irq6_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80, 4000000) /* Guess */
- MCFG_DEVICE_PROGRAM_MAP(mugsmash_sound_map)
+ Z80(config, m_audiocpu, 4000000); /* Guess */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &mugsmash_state::mugsmash_sound_map);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mugsmash_state, screen_update_mugsmash)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(40*8, 32*8);
+ screen.set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(mugsmash_state::screen_update_mugsmash));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mugsmash);
@@ -431,10 +431,10 @@ MACHINE_CONFIG_START(mugsmash_state::mugsmash)
ymsnd.add_route(0, "lspeaker", 1.00); /* music */
ymsnd.add_route(1, "rspeaker", 1.00);
- MCFG_DEVICE_ADD("oki", OKIM6295, 1122000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50) /* sound fx */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
-MACHINE_CONFIG_END
+ okim6295_device &oki(OKIM6295(config, "oki", 1122000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified
+ oki.add_route(ALL_OUTPUTS, "lspeaker", 0.50); /* sound fx */
+ oki.add_route(ALL_OUTPUTS, "rspeaker", 0.50);
+}
ROM_START( mugsmash )
ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 Code */
diff --git a/src/mame/drivers/multfish.cpp b/src/mame/drivers/multfish.cpp
index cc29ec855ce..a0e1d5bc07b 100644
--- a/src/mame/drivers/multfish.cpp
+++ b/src/mame/drivers/multfish.cpp
@@ -1053,26 +1053,27 @@ void igrosoft_gamble_state::machine_reset()
m_rambk = 0;
}
-MACHINE_CONFIG_START(igrosoft_gamble_state::igrosoft_gamble)
+void igrosoft_gamble_state::igrosoft_gamble(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(24'000'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(igrosoft_gamble_map)
- MCFG_DEVICE_IO_MAP(igrosoft_gamble_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", igrosoft_gamble_state, irq0_line_hold)
+ Z80(config, m_maincpu, XTAL(24'000'000)/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &igrosoft_gamble_state::igrosoft_gamble_map);
+ m_maincpu->set_addrmap(AS_IO, &igrosoft_gamble_state::igrosoft_gamble_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(igrosoft_gamble_state::irq0_line_hold));
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(17*16, 1024-16*7-1, 1*16, 32*16-1*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(igrosoft_gamble_state, screen_update_igrosoft_gamble)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(64*16, 32*16);
+ m_screen->set_visarea(17*16, 1024-16*7-1, 1*16, 32*16-1*16-1);
+ m_screen->set_screen_update(FUNC(igrosoft_gamble_state::screen_update_igrosoft_gamble));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_igrosoft_gamble);
- MCFG_PALETTE_ADD("palette", 0x1000)
+ PALETTE(config, m_palette).set_entries(0x1000);
SPEAKER(config, "mono").front_center();
@@ -1080,13 +1081,13 @@ MACHINE_CONFIG_START(igrosoft_gamble_state::igrosoft_gamble)
M48T35(config, m_m48t35, 0);
HOPPER(config, m_hopper, attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(igrosoft_gamble_state::rollfr)
+void igrosoft_gamble_state::rollfr(machine_config &config)
+{
igrosoft_gamble(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(rollfr_portmap)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &igrosoft_gamble_state::rollfr_portmap);
+}
diff --git a/src/mame/drivers/multi16.cpp b/src/mame/drivers/multi16.cpp
index 6cb4d834439..816aad95581 100644
--- a/src/mame/drivers/multi16.cpp
+++ b/src/mame/drivers/multi16.cpp
@@ -138,7 +138,8 @@ void multi16_state::machine_reset()
}
-MACHINE_CONFIG_START(multi16_state::multi16)
+void multi16_state::multi16(machine_config &config)
+{
/* basic machine hardware */
I8086(config, m_maincpu, 8000000);
m_maincpu->set_addrmap(AS_PROGRAM, &multi16_state::multi16_map);
@@ -146,15 +147,15 @@ MACHINE_CONFIG_START(multi16_state::multi16)
m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(640, 200)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1)
- MCFG_SCREEN_UPDATE_DRIVER(multi16_state, screen_update_multi16)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(640, 200);
+ screen.set_visarea(0, 640-1, 0, 200-1);
+ screen.set_screen_update(FUNC(multi16_state::screen_update_multi16));
+ screen.set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 8)
+ PALETTE(config, m_palette).set_entries(8);
/* devices */
H46505(config, m_crtc, 16000000/5); /* unknown clock, hand tuned to get ~60 fps */
@@ -164,7 +165,7 @@ MACHINE_CONFIG_START(multi16_state::multi16)
PIC8259(config, m_pic, 0);
m_pic->out_int_callback().set_inputline(m_maincpu, 0);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( multi16 )
diff --git a/src/mame/drivers/multi8.cpp b/src/mame/drivers/multi8.cpp
index ad65b40d9c8..119bc61d3b6 100644
--- a/src/mame/drivers/multi8.cpp
+++ b/src/mame/drivers/multi8.cpp
@@ -566,19 +566,20 @@ void multi8_state::machine_reset()
m_mcu_init = 0;
}
-MACHINE_CONFIG_START(multi8_state::multi8)
+void multi8_state::multi8(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(multi8_mem)
- MCFG_DEVICE_IO_MAP(multi8_io)
+ Z80(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &multi8_state::multi8_mem);
+ m_maincpu->set_addrmap(AS_IO, &multi8_state::multi8_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(640, 200)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 200-1)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(640, 200);
+ screen.set_visarea(0, 320-1, 0, 200-1);
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
PALETTE(config, m_palette, palette_device::BRG_3BIT);
GFXDECODE(config, "gfxdecode", m_palette, gfx_multi8);
@@ -588,8 +589,7 @@ MACHINE_CONFIG_START(multi8_state::multi8)
AY8912(config, m_aysnd, 1500000); //unknown clock / divider
m_aysnd->port_a_write_callback().set(FUNC(multi8_state::ym2203_porta_w));
m_aysnd->add_route(ALL_OUTPUTS, "mono", 0.50);
- MCFG_DEVICE_ADD("beeper", BEEP, 1200) // guesswork
- MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50)
+ BEEP(config, m_beeper, 1200).add_route(ALL_OUTPUTS,"mono",0.50); // guesswork
/* devices */
TIMER(config, "keyboard_timer").configure_periodic(FUNC(multi8_state::keyboard_callback), attotime::from_hz(240/32));
@@ -615,7 +615,7 @@ MACHINE_CONFIG_START(multi8_state::multi8)
//UPD765A(config, "fdc", false, true);
//FLOPPY_CONNECTOR(config, "fdc:0", multi8_floppies, "525hd", floppy_image_device::default_floppy_formats);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( multi8 )
diff --git a/src/mame/drivers/munchmo.cpp b/src/mame/drivers/munchmo.cpp
index f37bd75d291..084666ffd02 100644
--- a/src/mame/drivers/munchmo.cpp
+++ b/src/mame/drivers/munchmo.cpp
@@ -315,16 +315,16 @@ void munchmo_state::machine_start()
save_item(NAME(m_nmi_enable));
}
-MACHINE_CONFIG_START(munchmo_state::mnchmobl)
-
+void munchmo_state::mnchmobl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, Z80, XTAL(15'000'000)/4) // from pin 13 of XTAL-driven 163
- MCFG_DEVICE_PROGRAM_MAP(mnchmobl_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(munchmo_state, generic_irq_ack) // IORQ clears flip-flop at 1-2C
+ Z80(config, m_maincpu, XTAL(15'000'000)/4); // from pin 13 of XTAL-driven 163
+ m_maincpu->set_addrmap(AS_PROGRAM, &munchmo_state::mnchmobl_map);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(munchmo_state::generic_irq_ack)); // IORQ clears flip-flop at 1-2C
- MCFG_DEVICE_ADD(m_audiocpu, Z80, XTAL(15'000'000)/8) // from pin 12 of XTAL-driven 163
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(munchmo_state, generic_irq_ack) // IORQ clears flip-flop at 1-7H
+ Z80(config, m_audiocpu, XTAL(15'000'000)/8); // from pin 12 of XTAL-driven 163
+ m_audiocpu->set_addrmap(AS_PROGRAM, &munchmo_state::sound_map);
+ m_audiocpu->set_irq_acknowledge_callback(FUNC(munchmo_state::generic_irq_ack)); // IORQ clears flip-flop at 1-7H
LS259(config, m_mainlatch, 0); // 12E
m_mainlatch->q_out_cb<0>().set(FUNC(munchmo_state::palette_bank_0_w)); // BCL0 2-11E
@@ -336,14 +336,14 @@ MACHINE_CONFIG_START(munchmo_state::mnchmobl)
m_mainlatch->q_out_cb<6>().set(FUNC(munchmo_state::nmi_enable_w)); // ENI 1-10C
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(256+32+32, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255+32+32,0, 255-16)
- MCFG_SCREEN_UPDATE_DRIVER(munchmo_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, munchmo_state, vblank_irq))
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(57);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(256+32+32, 256);
+ screen.set_visarea(0, 255+32+32,0, 255-16);
+ screen.set_screen_update(FUNC(munchmo_state::screen_update));
+ screen.screen_vblank().set(FUNC(munchmo_state::vblank_irq));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mnchmobl);
PALETTE(config, m_palette, FUNC(munchmo_state::munchmo_palette), 256);
@@ -361,7 +361,7 @@ MACHINE_CONFIG_START(munchmo_state::mnchmobl)
AY8910(config, m_ay8910[1], XTAL(15'000'000)/8);
//m_ay8910[1]->set_flags(AY8910_SINGLE_OUTPUT);
m_ay8910[1]->add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/murogem.cpp b/src/mame/drivers/murogem.cpp
index 4d68edb840e..440c2183cea 100644
--- a/src/mame/drivers/murogem.cpp
+++ b/src/mame/drivers/murogem.cpp
@@ -249,20 +249,21 @@ uint32_t murogem_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
}
-MACHINE_CONFIG_START(murogem_state::murogem)
+void murogem_state::murogem(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6802, 8000000) /* ? MHz */
- MCFG_DEVICE_PROGRAM_MAP(murogem_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", murogem_state, irq0_line_hold)
+ M6802(config, m_maincpu, 8000000); /* ? MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &murogem_state::murogem_map);
+ m_maincpu->set_vblank_int("screen", FUNC(murogem_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE((39+1)*8, (38+1)*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(murogem_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size((39+1)*8, (38+1)*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(murogem_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_murogem);
PALETTE(config, m_palette, FUNC(murogem_state::murogem_palette), 0x100);
@@ -277,7 +278,7 @@ MACHINE_CONFIG_START(murogem_state::murogem)
DAC_1BIT(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.375);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
-MACHINE_CONFIG_END
+}
ROM_START( murogem )
diff --git a/src/mame/drivers/murogmbl.cpp b/src/mame/drivers/murogmbl.cpp
index 3cbd5519bfb..327cbc5da46 100644
--- a/src/mame/drivers/murogmbl.cpp
+++ b/src/mame/drivers/murogmbl.cpp
@@ -348,21 +348,22 @@ static GFXDECODE_START( gfx_slotunbl )
GFXDECODE_ENTRY( "gfx1", 0, layout8x8x2, 0x0, 1 )
GFXDECODE_END
-MACHINE_CONFIG_START(murogmbl_state::murogmbl)
+void murogmbl_state::murogmbl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 1000000) /* Z80? */
- MCFG_DEVICE_PROGRAM_MAP(murogmbl_map)
+ Z80(config, m_maincpu, 1000000); /* Z80? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &murogmbl_state::murogmbl_map);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_murogmbl);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(murogmbl_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(murogmbl_state::screen_update));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette, FUNC(murogmbl_state::murogmbl_palette), 0x100);
@@ -371,23 +372,24 @@ MACHINE_CONFIG_START(murogmbl_state::murogmbl)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(slotunbl_state::slotunbl)
+void slotunbl_state::slotunbl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 1000000) /* Z80? */
- MCFG_DEVICE_PROGRAM_MAP(slotunbl_map)
+ Z80(config, m_maincpu, 1000000); /* Z80? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &slotunbl_state::slotunbl_map);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_slotunbl);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(slotunbl_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(slotunbl_state::screen_update));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette, FUNC(slotunbl_state::slotunbl_palette), 0x100);
@@ -396,7 +398,7 @@ MACHINE_CONFIG_START(slotunbl_state::slotunbl)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
ROM_START(murogmbl)
ROM_REGION( 0x10000, "maincpu", 0 )
diff --git a/src/mame/drivers/mustache.cpp b/src/mame/drivers/mustache.cpp
index c246c5b7760..9462c33bf02 100644
--- a/src/mame/drivers/mustache.cpp
+++ b/src/mame/drivers/mustache.cpp
@@ -179,26 +179,26 @@ TIMER_DEVICE_CALLBACK_MEMBER(mustache_state::scanline)
-MACHINE_CONFIG_START(mustache_state::mustache)
-
+void mustache_state::mustache(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(memmap)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ Z80(config, m_maincpu, CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mustache_state::memmap);
+ m_maincpu->set_addrmap(AS_OPCODES, &mustache_state::decrypted_opcodes_map);
TIMER(config, "scantimer").configure_scanline(FUNC(mustache_state::scanline), "screen", 0, 1);
SEI80BU(config, "sei80bu", 0).set_device_rom_tag("maincpu");
- MCFG_DEVICE_ADD("t5182", T5182, 0)
+ T5182(config, "t5182", 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(56.747)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 0, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mustache_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(56.747);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(1*8, 31*8-1, 0, 31*8-1);
+ m_screen->set_screen_update(FUNC(mustache_state::screen_update));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mustache);
PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256);
@@ -210,7 +210,7 @@ MACHINE_CONFIG_START(mustache_state::mustache)
ymsnd.irq_handler().set("t5182", FUNC(t5182_device::ym2151_irq_handler));
ymsnd.add_route(0, "mono", 1.0);
ymsnd.add_route(1, "mono", 1.0);
-MACHINE_CONFIG_END
+}
ROM_START( mustache )
ROM_REGION( 0x20000, "maincpu", 0 )
diff --git a/src/mame/drivers/mvme147.cpp b/src/mame/drivers/mvme147.cpp
index 4ba6ed13afe..9f1f5b89f52 100644
--- a/src/mame/drivers/mvme147.cpp
+++ b/src/mame/drivers/mvme147.cpp
@@ -650,8 +650,8 @@ static void mvme147_vme_cards(device_slot_interface &device)
*/
MACHINE_CONFIG_START(mvme147_state::mvme147)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68030, 16_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(mvme147_mem)
+ M68030(config, m_maincpu, 16_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mvme147_state::mvme147_mem);
MCFG_VME_DEVICE_ADD("vme")
MCFG_VME_SLOT_ADD("vme", 1, mvme147_vme_cards, nullptr)
diff --git a/src/mame/drivers/mw18w.cpp b/src/mame/drivers/mw18w.cpp
index b502c17ef1d..f3a2e8263e4 100644
--- a/src/mame/drivers/mw18w.cpp
+++ b/src/mame/drivers/mw18w.cpp
@@ -279,13 +279,13 @@ INPUT_PORTS_END
***************************************************************************/
-MACHINE_CONFIG_START(mw18w_state::mw18w)
-
+void mw18w_state::mw18w(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(19'968'000)/8)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(mw18w_state, irq0_line_assert, 960.516) // 555 IC
- MCFG_DEVICE_PROGRAM_MAP(mw18w_map)
- MCFG_DEVICE_IO_MAP(mw18w_portmap)
+ Z80(config, m_maincpu, XTAL(19'968'000)/8);
+ m_maincpu->set_periodic_int(FUNC(mw18w_state::irq0_line_assert), attotime::from_hz(960.516)); // 555 IC
+ m_maincpu->set_addrmap(AS_PROGRAM, &mw18w_state::mw18w_map);
+ m_maincpu->set_addrmap(AS_IO, &mw18w_state::mw18w_portmap);
WATCHDOG_TIMER(config, "watchdog");
@@ -293,7 +293,7 @@ MACHINE_CONFIG_START(mw18w_state::mw18w)
/* sound hardware */
//...
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/mwarr.cpp b/src/mame/drivers/mwarr.cpp
index bf8c3e70423..420e7ae14cf 100644
--- a/src/mame/drivers/mwarr.cpp
+++ b/src/mame/drivers/mwarr.cpp
@@ -306,20 +306,21 @@ void mwarr_state::machine_reset()
{
}
-MACHINE_CONFIG_START(mwarr_state::mwarr)
+void mwarr_state::mwarr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(mwarr_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mwarr_state, irq4_line_hold)
+ M68000(config, m_maincpu, MASTER_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mwarr_state::mwarr_map);
+ m_maincpu->set_vblank_int("screen", FUNC(mwarr_state::irq4_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(54)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(8+1, 48*8-1-8-1, 0, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(mwarr_state, screen_update_mwarr)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(54);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(8+1, 48*8-1-8-1, 0, 30*8-1);
+ screen.set_screen_update(FUNC(mwarr_state::screen_update_mwarr));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mwarr);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800);
@@ -340,13 +341,12 @@ MACHINE_CONFIG_START(mwarr_state::mwarr)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki1", OKIM6295, SOUND_CLOCK/48 , okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ OKIM6295(config, "oki1", SOUND_CLOCK/48 , okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0);
- MCFG_DEVICE_ADD("oki2", OKIM6295, SOUND_CLOCK/48 , okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(0, oki2_map)
-MACHINE_CONFIG_END
+ okim6295_device &oki2(OKIM6295(config, "oki2", SOUND_CLOCK/48 , okim6295_device::PIN7_HIGH));
+ oki2.add_route(ALL_OUTPUTS, "mono", 1.0);
+ oki2.set_addrmap(0, &mwarr_state::oki2_map);
+}
/*************************************
diff --git a/src/mame/drivers/mwsub.cpp b/src/mame/drivers/mwsub.cpp
index 9e204f5c64d..9330a077a97 100644
--- a/src/mame/drivers/mwsub.cpp
+++ b/src/mame/drivers/mwsub.cpp
@@ -222,13 +222,13 @@ INPUT_PORTS_END
***************************************************************************/
-MACHINE_CONFIG_START(submar_state::submar)
-
+void submar_state::submar(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(19'968'000)/8)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(submar_state, irq0_line_assert, 124.675) // 555 IC
- MCFG_DEVICE_PROGRAM_MAP(submar_map)
- MCFG_DEVICE_IO_MAP(submar_portmap)
+ Z80(config, m_maincpu, XTAL(19'968'000)/8);
+ m_maincpu->set_periodic_int(FUNC(submar_state::irq0_line_assert), attotime::from_hz(124.675)); // 555 IC
+ m_maincpu->set_addrmap(AS_PROGRAM, &submar_state::submar_map);
+ m_maincpu->set_addrmap(AS_IO, &submar_state::submar_portmap);
WATCHDOG_TIMER(config, "watchdog");
@@ -236,7 +236,7 @@ MACHINE_CONFIG_START(submar_state::submar)
/* sound hardware */
//...
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/myb3k.cpp b/src/mame/drivers/myb3k.cpp
index a555f364266..b3639487930 100644
--- a/src/mame/drivers/myb3k.cpp
+++ b/src/mame/drivers/myb3k.cpp
@@ -930,7 +930,8 @@ static void stepone_isa_cards(device_slot_interface &device)
device.option_add("myb3k_fdc4711", ISA8_MYB3K_FDC4711);
}
-MACHINE_CONFIG_START(myb3k_state::myb3k)
+void myb3k_state::myb3k(machine_config &config)
+{
/* basic machine hardware */
I8088(config, m_maincpu, XTAL(14'318'181) / 3); /* 14.3182 main crystal divided by three through a 8284A */
m_maincpu->set_addrmap(AS_PROGRAM, &myb3k_state::myb3k_map);
@@ -1000,9 +1001,9 @@ MACHINE_CONFIG_START(myb3k_state::myb3k)
m_isabus->drq2_callback().set("dma", FUNC(i8257_device::dreq2_w));
m_isabus->drq3_callback().set("dma", FUNC(i8257_device::dreq3_w));
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "isa", stepone_isa_cards, "myb3k_fdc4711", false) // FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "isa", stepone_isa_cards, "myb3k_com", false)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "isa", stepone_isa_cards, nullptr, false)
+ ISA8_SLOT(config, "isa1", 0, m_isabus, stepone_isa_cards, "myb3k_fdc4711", false); // FIXME: determine ISA bus clock
+ ISA8_SLOT(config, "isa2", 0, m_isabus, stepone_isa_cards, "myb3k_com", false);
+ ISA8_SLOT(config, "isa3", 0, m_isabus, stepone_isa_cards, nullptr, false);
/* Centronics */
@@ -1017,18 +1018,17 @@ MACHINE_CONFIG_START(myb3k_state::myb3k)
/* Sound */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
/* Keyboard */
MYB3K_KEYBOARD(config, m_kb, 0);
m_kb->set_keyboard_callback(FUNC(myb3k_state::kbd_set_data_and_interrupt));
/* Monitor */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(14'318'181) / 3, 600, 0, 600, 400, 0, 400)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", h46505_device, screen_update)
-MACHINE_CONFIG_END
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(14'318'181) / 3, 600, 0, 600, 400, 0, 400);
+ m_screen->set_screen_update("crtc", FUNC(h46505_device::screen_update));
+}
void myb3k_state::jb3000(machine_config &config)
{
diff --git a/src/mame/drivers/mycom.cpp b/src/mame/drivers/mycom.cpp
index ed283f71669..609dc44fe5a 100644
--- a/src/mame/drivers/mycom.cpp
+++ b/src/mame/drivers/mycom.cpp
@@ -508,11 +508,12 @@ void mycom_state::init_mycom()
membank("boot")->configure_entries(0, 2, &RAM[0x0000], 0x10000);
}
-MACHINE_CONFIG_START(mycom_state::mycom)
+void mycom_state::mycom(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, 10_MHz_XTAL / 4)
- MCFG_DEVICE_PROGRAM_MAP(mycom_map)
- MCFG_DEVICE_IO_MAP(mycom_io)
+ Z80(config, m_maincpu, 10_MHz_XTAL / 4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mycom_state::mycom_map);
+ m_maincpu->set_addrmap(AS_IO, &mycom_state::mycom_io);
I8255(config, m_ppi0);
m_ppi0->out_pa_callback().set(FUNC(mycom_state::mycom_04_w));
@@ -525,17 +526,17 @@ MACHINE_CONFIG_START(mycom_state::mycom)
m_ppi1->out_pc_callback().set(FUNC(mycom_state::mycom_0a_w));
I8255(config, m_ppi2);
- m_ppi2->in_pb_callback().set("rtc", FUNC(msm5832_device::data_r));
- m_ppi2->out_pb_callback().set("rtc", FUNC(msm5832_device::data_w));
+ m_ppi2->in_pb_callback().set(m_rtc, FUNC(msm5832_device::data_r));
+ m_ppi2->out_pb_callback().set(m_rtc, FUNC(msm5832_device::data_w));
m_ppi2->out_pc_callback().set(FUNC(mycom_state::mycom_rtc_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 192-1)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 320-1, 0, 192-1);
PALETTE(config, m_palette, palette_device::MONOCHROME);
GFXDECODE(config, "gfxdecode", m_palette, gfx_mycom);
@@ -551,11 +552,10 @@ MACHINE_CONFIG_START(mycom_state::mycom)
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
- MCFG_DEVICE_ADD("sn1", SN76489, 10_MHz_XTAL / 4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.50)
+ SN76489(config, m_audio, 10_MHz_XTAL / 4).add_route(ALL_OUTPUTS, "mono", 1.50);
/* Devices */
- MCFG_DEVICE_ADD("rtc", MSM5832, 32.768_kHz_XTAL)
+ MSM5832(config, m_rtc, 32.768_kHz_XTAL);
CASSETTE(config, m_cass);
@@ -564,7 +564,7 @@ MACHINE_CONFIG_START(mycom_state::mycom)
FLOPPY_CONNECTOR(config, "fdc:1", mycom_floppies, "525sd", floppy_image_device::default_floppy_formats).enable_sound(true);
TIMER(config, "keyboard_timer").configure_periodic(FUNC(mycom_state::mycom_kbd), attotime::from_hz(20));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( mycom )
diff --git a/src/mame/drivers/mystston.cpp b/src/mame/drivers/mystston.cpp
index 6d1f3156cb4..691132bd391 100644
--- a/src/mame/drivers/mystston.cpp
+++ b/src/mame/drivers/mystston.cpp
@@ -191,11 +191,11 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(mystston_state::mystston)
-
+void mystston_state::mystston(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M6502(config, m_maincpu, CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mystston_state::main_map);
/* video hardware */
mystston_video(config);
@@ -206,7 +206,7 @@ MACHINE_CONFIG_START(mystston_state::mystston)
AY8910(config, m_ay8910[0], AY8910_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.30);
AY8910(config, m_ay8910[1], AY8910_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.30);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/myvision.cpp b/src/mame/drivers/myvision.cpp
index 6f9b2125866..9d2e0bd8179 100644
--- a/src/mame/drivers/myvision.cpp
+++ b/src/mame/drivers/myvision.cpp
@@ -216,9 +216,9 @@ WRITE8_MEMBER( myvision_state::ay_port_b_w )
MACHINE_CONFIG_START(myvision_state::myvision)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, XTAL(10'738'635)/3) /* Not verified */
- MCFG_DEVICE_PROGRAM_MAP(myvision_mem)
- MCFG_DEVICE_IO_MAP(myvision_io)
+ Z80(config, m_maincpu, XTAL(10'738'635)/3); /* Not verified */
+ m_maincpu->set_addrmap(AS_PROGRAM, &myvision_state::myvision_mem);
+ m_maincpu->set_addrmap(AS_IO, &myvision_state::myvision_io);
/* video hardware */
tms9918a_device &vdp(TMS9918A(config, "tms9918", XTAL(10'738'635))); /* Exact model not verified */
diff --git a/src/mame/drivers/mz2000.cpp b/src/mame/drivers/mz2000.cpp
index f35556c4d8a..683678c6f63 100644
--- a/src/mame/drivers/mz2000.cpp
+++ b/src/mame/drivers/mz2000.cpp
@@ -876,11 +876,12 @@ static void mz2000_floppies(device_slot_interface &device)
}
-MACHINE_CONFIG_START(mz2000_state::mz2000)
+void mz2000_state::mz2000(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, MASTER_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(mz2000_map)
- MCFG_DEVICE_IO_MAP(mz2000_io)
+ Z80(config, m_maincpu, MASTER_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mz2000_state::mz2000_map);
+ m_maincpu->set_addrmap(AS_IO, &mz2000_state::mz2000_io);
i8255_device &ppi(I8255(config, "i8255_0"));
ppi.in_pa_callback().set(FUNC(mz2000_state::mz2000_porta_r));
@@ -918,13 +919,13 @@ MACHINE_CONFIG_START(mz2000_state::mz2000)
SOFTWARE_LIST(config, "cass_list").set_original("mz2000_cass");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 400-1)
- MCFG_SCREEN_UPDATE_DRIVER(mz2000_state, screen_update_mz2000)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ m_screen->set_size(640, 480);
+ m_screen->set_visarea(0, 640-1, 0, 400-1);
+ m_screen->set_screen_update(FUNC(mz2000_state::screen_update_mz2000));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_mz2000);
PALETTE(config, m_palette, palette_device::BRG_3BIT);
@@ -934,13 +935,13 @@ MACHINE_CONFIG_START(mz2000_state::mz2000)
WAVE(config, "wave", m_cass).add_route(ALL_OUTPUTS, "mono", 0.25);
BEEP(config, "beeper", 4096).add_route(ALL_OUTPUTS,"mono",0.15);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mz2000_state::mz80b)
+void mz2000_state::mz80b(machine_config &config)
+{
mz2000(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(mz80b_io)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &mz2000_state::mz80b_io);
+}
diff --git a/src/mame/drivers/mz2500.cpp b/src/mame/drivers/mz2500.cpp
index f86c1ba6beb..514481eb977 100644
--- a/src/mame/drivers/mz2500.cpp
+++ b/src/mame/drivers/mz2500.cpp
@@ -1787,13 +1787,14 @@ static void mz2500_floppies(device_slot_interface &device)
device.option_add("dd", FLOPPY_35_DD);
}
-MACHINE_CONFIG_START(mz2500_state::mz2500)
+void mz2500_state::mz2500(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 6000000)
- MCFG_DEVICE_PROGRAM_MAP(mz2500_map)
- MCFG_DEVICE_IO_MAP(mz2500_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mz2500_state, mz2500_vbl)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(mz2500_state,mz2500_irq_ack)
+ Z80(config, m_maincpu, 6000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mz2500_state::mz2500_map);
+ m_maincpu->set_addrmap(AS_IO, &mz2500_state::mz2500_io);
+ m_maincpu->set_vblank_int("screen", FUNC(mz2500_state::mz2500_vbl));
+ m_maincpu->set_irq_acknowledge_callback(FUNC(mz2500_state::mz2500_irq_ack));
for (int bank = 0; bank < 8; bank++)
{
@@ -1836,10 +1837,10 @@ MACHINE_CONFIG_START(mz2500_state::mz2500)
SOFTWARE_LIST(config, "flop_list").set_original("mz2500");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(21'477'272, 640+108, 0, 640, 480, 0, 200) //unknown clock / divider
- MCFG_SCREEN_UPDATE_DRIVER(mz2500_state, screen_update_mz2500)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(21'477'272, 640+108, 0, 640, 480, 0, 200); //unknown clock / divider
+ m_screen->set_screen_update(FUNC(mz2500_state::screen_update_mz2500));
+ m_screen->set_palette(m_palette);
PALETTE(config, m_palette, FUNC(mz2500_state::mz2500_palette), 0x200);
@@ -1857,9 +1858,8 @@ MACHINE_CONFIG_START(mz2500_state::mz2500)
ym.add_route(2, "mono", 0.50);
ym.add_route(3, "mono", 0.50);
- MCFG_DEVICE_ADD("beeper", BEEP, 4096)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50)
-MACHINE_CONFIG_END
+ BEEP(config, m_beeper, 4096).add_route(ALL_OUTPUTS,"mono",0.50);
+}
diff --git a/src/mame/drivers/mz3500.cpp b/src/mame/drivers/mz3500.cpp
index 134ed18d7cd..6c965638dcc 100644
--- a/src/mame/drivers/mz3500.cpp
+++ b/src/mame/drivers/mz3500.cpp
@@ -809,16 +809,16 @@ static void mz3500_floppies(device_slot_interface &device)
}
/* TODO: clocks */
-MACHINE_CONFIG_START(mz3500_state::mz3500)
-
+void mz3500_state::mz3500(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("master",Z80,MAIN_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(mz3500_master_map)
- MCFG_DEVICE_IO_MAP(mz3500_master_io)
+ Z80(config, m_master, MAIN_CLOCK/2);
+ m_master->set_addrmap(AS_PROGRAM, &mz3500_state::mz3500_master_map);
+ m_master->set_addrmap(AS_IO, &mz3500_state::mz3500_master_io);
- MCFG_DEVICE_ADD("slave",Z80,MAIN_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(mz3500_slave_map)
- MCFG_DEVICE_IO_MAP(mz3500_slave_io)
+ Z80(config, m_slave, MAIN_CLOCK/2);
+ m_slave->set_addrmap(AS_PROGRAM, &mz3500_state::mz3500_slave_map);
+ m_slave->set_addrmap(AS_IO, &mz3500_state::mz3500_slave_io);
config.m_perfect_cpu_quantum = subtag("master");
@@ -844,12 +844,12 @@ MACHINE_CONFIG_START(mz3500_state::mz3500)
m_hgdc2->set_display_pixels(FUNC(mz3500_state::hgdc_display_pixels));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_UPDATE_DRIVER(mz3500_state, screen_update)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ screen.set_screen_update(FUNC(mz3500_state::screen_update));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
GFXDECODE(config, "gfxdecode", m_palette, gfx_mz3500);
@@ -859,7 +859,7 @@ MACHINE_CONFIG_START(mz3500_state::mz3500)
SPEAKER(config, "mono").front_center();
BEEP(config, m_beeper, 2400).add_route(ALL_OUTPUTS, "mono", 0.15);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/mz6500.cpp b/src/mame/drivers/mz6500.cpp
index 3fcf897c971..b26540cd920 100644
--- a/src/mame/drivers/mz6500.cpp
+++ b/src/mame/drivers/mz6500.cpp
@@ -149,21 +149,22 @@ void mz6500_state::upd7220_map(address_map &map)
}
-MACHINE_CONFIG_START(mz6500_state::mz6500)
+void mz6500_state::mz6500(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8086, 8000000) //unk clock
- MCFG_DEVICE_PROGRAM_MAP(mz6500_map)
- MCFG_DEVICE_IO_MAP(mz6500_io)
+ I8086(config, m_maincpu, 8000000); //unk clock
+ m_maincpu->set_addrmap(AS_PROGRAM, &mz6500_state::mz6500_map);
+ m_maincpu->set_addrmap(AS_IO, &mz6500_state::mz6500_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DEVICE("upd7220", upd7220_device, screen_update)
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
- MCFG_PALETTE_ADD("palette", 8)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update("upd7220", FUNC(upd7220_device::screen_update));
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 640-1, 0, 480-1);
+ PALETTE(config, "palette").set_entries(8);
/* Devices */
UPD7220(config, m_hgdc, 8000000/6); // unk clock
@@ -173,7 +174,7 @@ MACHINE_CONFIG_START(mz6500_state::mz6500)
UPD765A(config, m_fdc, 8000000, true, true);
FLOPPY_CONNECTOR(config, "upd765:0", mz6500_floppies, "525hd", floppy_image_device::default_floppy_formats);
FLOPPY_CONNECTOR(config, "upd765:1", mz6500_floppies, "525hd", floppy_image_device::default_floppy_formats);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( mz6500 )
diff --git a/src/mame/drivers/mz700.cpp b/src/mame/drivers/mz700.cpp
index e6d8b86ebea..09b1625cd39 100644
--- a/src/mame/drivers/mz700.cpp
+++ b/src/mame/drivers/mz700.cpp
@@ -372,21 +372,22 @@ GFXDECODE_END
MACHINE DRIVERS
***************************************************************************/
-MACHINE_CONFIG_START(mz_state::mz700)
+void mz_state::mz700(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(17'734'470)/5)
- MCFG_DEVICE_PROGRAM_MAP(mz700_mem)
- MCFG_DEVICE_IO_MAP(mz700_io)
+ Z80(config, m_maincpu, XTAL(17'734'470)/5);
+ m_maincpu->set_addrmap(AS_PROGRAM, &mz_state::mz700_mem);
+ m_maincpu->set_addrmap(AS_IO, &mz_state::mz700_io);
ADDRESS_MAP_BANK(config, "banke").set_map(&mz_state::mz700_banke).set_options(ENDIANNESS_LITTLE, 8, 16, 0x2000);
MCFG_MACHINE_RESET_OVERRIDE(mz_state, mz700)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- 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)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(17'734'470)/2, 568, 0, 40*8, 312, 0, 25*8);
+ m_screen->set_screen_update(FUNC(mz_state::screen_update_mz700));
+ m_screen->set_palette(m_palette);
PALETTE(config, m_palette, palette_device::RGB_3BIT);
GFXDECODE(config, "gfxdecode", m_palette, gfx_mz700);
@@ -426,28 +427,26 @@ MACHINE_CONFIG_START(mz_state::mz700)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(mz_state::mz800)
+void mz_state::mz800(machine_config &config)
+{
mz700(config);
config.device_remove("banke");
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mz800_mem)
- MCFG_DEVICE_IO_MAP(mz800_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &mz_state::mz800_mem);
+ m_maincpu->set_addrmap(AS_IO, &mz_state::mz800_io);
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)
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_mz800);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(mz_state, screen_update_mz800)
+ m_screen->set_screen_update(FUNC(mz_state::screen_update_mz800));
- MCFG_DEVICE_ADD("sn76489n", SN76489, XTAL(17'734'470)/5)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ SN76489(config, "sn76489n", XTAL(17'734'470)/5).add_route(ALL_OUTPUTS, "mono", 1.0);
config.device_remove("cass_list");
SOFTWARE_LIST(config, "cass_list").set_original("mz800_cass");
@@ -465,7 +464,7 @@ MACHINE_CONFIG_START(mz_state::mz800)
output_latch_device &cent_data_out(OUTPUT_LATCH(config, "cent_data_out"));
m_centronics->set_output_latch(cent_data_out);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/mz80.cpp b/src/mame/drivers/mz80.cpp
index 247b3944651..e54591a6114 100644
--- a/src/mame/drivers/mz80.cpp
+++ b/src/mame/drivers/mz80.cpp
@@ -277,22 +277,23 @@ TIMER_DEVICE_CALLBACK_MEMBER(mz80_state::ne555_tempo_callback)
m_mz80k_tempo_strobe ^= 1;
}
-MACHINE_CONFIG_START(mz80_state::mz80k)
+void mz80_state::mz80k(machine_config &config)
+{
/* basic machine hardware */
/* main CPU */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(8'000'000) / 4) /* 2 MHz */
- MCFG_DEVICE_PROGRAM_MAP(mz80k_mem)
- MCFG_DEVICE_IO_MAP(mz80k_io)
+ Z80(config, m_maincpu, XTAL(8'000'000) / 4); /* 2 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mz80_state::mz80k_mem);
+ m_maincpu->set_addrmap(AS_IO, &mz80_state::mz80k_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(320, 200)
- MCFG_SCREEN_VISIBLE_AREA(0, 319, 0, 199)
- MCFG_SCREEN_UPDATE_DRIVER(mz80_state, screen_update_mz80k)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_size(320, 200);
+ screen.set_visarea(0, 319, 0, 199);
+ screen.set_screen_update(FUNC(mz80_state::screen_update_mz80k));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_mz80k);
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -321,7 +322,7 @@ MACHINE_CONFIG_START(mz80_state::mz80k)
CASSETTE(config, m_cassette);
m_cassette->set_formats(mz700_cassette_formats);
m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
-MACHINE_CONFIG_END
+}
void mz80_state::mz80kj(machine_config &config)
{
diff --git a/src/mame/drivers/nakajies.cpp b/src/mame/drivers/nakajies.cpp
index 8a387980089..f95f0244270 100644
--- a/src/mame/drivers/nakajies.cpp
+++ b/src/mame/drivers/nakajies.cpp
@@ -750,17 +750,18 @@ static GFXDECODE_START( gfx_drwrt400 )
GFXDECODE_ENTRY( "bios", 0x580b6, nakajies_charlayout, 0, 1 )
GFXDECODE_END
-MACHINE_CONFIG_START(nakajies_state::nakajies210)
- MCFG_DEVICE_ADD( "v20hl", V20, X301 / 2 )
- MCFG_DEVICE_PROGRAM_MAP( nakajies_map)
- MCFG_DEVICE_IO_MAP( nakajies_io_map)
-
- MCFG_SCREEN_ADD( "screen", LCD )
- MCFG_SCREEN_REFRESH_RATE( 50 ) /* Wild guess */
- MCFG_SCREEN_UPDATE_DRIVER( nakajies_state, screen_update )
- MCFG_SCREEN_SIZE( 80 * 6, 8 * 8 )
- MCFG_SCREEN_VISIBLE_AREA( 0, 6 * 80 - 1, 0, 8 * 8 - 1 )
- MCFG_SCREEN_PALETTE("palette")
+void nakajies_state::nakajies210(machine_config &config)
+{
+ V20(config, m_maincpu, X301 / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nakajies_state::nakajies_map);
+ m_maincpu->set_addrmap(AS_IO, &nakajies_state::nakajies_io_map);
+
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(50); /* Wild guess */
+ screen.set_screen_update(FUNC(nakajies_state::screen_update));
+ screen.set_size(80 * 6, 8 * 8);
+ screen.set_visarea(0, 6 * 80 - 1, 0, 8 * 8 - 1);
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_wales210);
PALETTE(config, "palette", FUNC(nakajies_state::nakajies_palette), 2);
@@ -773,7 +774,7 @@ MACHINE_CONFIG_START(nakajies_state::nakajies210)
RP5C01(config, "rtc", XTAL(32'768));
TIMER(config, "kb_timer").configure_periodic(FUNC(nakajies_state::kb_timer), attotime::from_hz(250));
-MACHINE_CONFIG_END
+}
void nakajies_state::dator3k(machine_config &config)
{
@@ -787,13 +788,13 @@ void nakajies_state::nakajies220(machine_config &config)
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_drwrt400);
}
-MACHINE_CONFIG_START(nakajies_state::nakajies250)
+void nakajies_state::nakajies250(machine_config &config)
+{
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 )
+ subdevice<screen_device>("screen")->set_size(80 * 6, 16 * 8);
+ subdevice<screen_device>("screen")->set_visarea(0, 6 * 80 - 1, 0, 16 * 8 - 1);
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_drwrt200);
-MACHINE_CONFIG_END
+}
ROM_START(wales210)
diff --git a/src/mame/drivers/namcofl.cpp b/src/mame/drivers/namcofl.cpp
index 88d6d01cee5..f5ff7c0df01 100644
--- a/src/mame/drivers/namcofl.cpp
+++ b/src/mame/drivers/namcofl.cpp
@@ -553,13 +553,14 @@ MACHINE_RESET_MEMBER(namcofl_state,namcofl)
}
-MACHINE_CONFIG_START(namcofl_state::namcofl)
- MCFG_DEVICE_ADD("maincpu", I960, 80_MHz_XTAL/4) // i80960KA-20 == 20 MHz part
- MCFG_DEVICE_PROGRAM_MAP(namcofl_mem)
+void namcofl_state::namcofl(machine_config &config)
+{
+ I960(config, m_maincpu, 80_MHz_XTAL/4); // i80960KA-20 == 20 MHz part
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcofl_state::namcofl_mem);
- MCFG_DEVICE_ADD("mcu", NAMCO_C75, 48.384_MHz_XTAL/3)
- MCFG_DEVICE_PROGRAM_MAP(namcoc75_am)
- MCFG_DEVICE_IO_MAP(namcoc75_io)
+ NAMCO_C75(config, m_mcu, 48.384_MHz_XTAL/3);
+ m_mcu->set_addrmap(AS_PROGRAM, &namcofl_state::namcoc75_am);
+ m_mcu->set_addrmap(AS_IO, &namcofl_state::namcoc75_io);
/* TODO: irq generation for these */
TIMER(config, "mcu_irq0").configure_periodic(FUNC(namcofl_state::mcu_irq0_cb), attotime::from_hz(60));
TIMER(config, "mcu_irq2").configure_periodic(FUNC(namcofl_state::mcu_irq2_cb), attotime::from_hz(60));
@@ -569,12 +570,12 @@ MACHINE_CONFIG_START(namcofl_state::namcofl)
MCFG_MACHINE_RESET_OVERRIDE(namcofl_state,namcofl)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(NAMCOFL_HTOTAL, NAMCOFL_VTOTAL)
- MCFG_SCREEN_VISIBLE_AREA(0, NAMCOFL_HBSTART-1, 0, NAMCOFL_VBSTART-1)
- MCFG_SCREEN_UPDATE_DRIVER(namcofl_state, screen_update_namcofl)
- MCFG_SCREEN_PALETTE(m_c116)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(NAMCOFL_HTOTAL, NAMCOFL_VTOTAL);
+ m_screen->set_visarea(0, NAMCOFL_HBSTART-1, 0, NAMCOFL_VBSTART-1);
+ m_screen->set_screen_update(FUNC(namcofl_state::screen_update_namcofl));
+ m_screen->set_palette(m_c116);
GFXDECODE(config, "gfxdecode", m_c116, gfx_namcofl);
@@ -605,12 +606,12 @@ MACHINE_CONFIG_START(namcofl_state::namcofl)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("c352", C352, 48.384_MHz_XTAL/2, 288)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
- //MCFG_SOUND_ROUTE(2, "lspeaker", 1.00) // Second DAC not present.
- //MCFG_SOUND_ROUTE(3, "rspeaker", 1.00)
-MACHINE_CONFIG_END
+ c352_device &c352(C352(config, "c352", 48.384_MHz_XTAL/2, 288));
+ c352.add_route(0, "lspeaker", 1.00);
+ c352.add_route(1, "rspeaker", 1.00);
+ //c352.add_route(2, "lspeaker", 1.00); // Second DAC not present.
+ //c352.add_route(3, "rspeaker", 1.00);
+}
ROM_START( speedrcr )
ROM_REGION( 0x200000, "maincpu", 0 ) // i960 program
diff --git a/src/mame/drivers/namconb1.cpp b/src/mame/drivers/namconb1.cpp
index f27c7c9a35a..b41b05c7eba 100644
--- a/src/mame/drivers/namconb1.cpp
+++ b/src/mame/drivers/namconb1.cpp
@@ -1036,13 +1036,14 @@ void namconb1_state::machine_reset()
/***************************************************************/
-MACHINE_CONFIG_START(namconb1_state::namconb1)
- MCFG_DEVICE_ADD("maincpu", M68EC020, MASTER_CLOCK/2)
- MCFG_DEVICE_PROGRAM_MAP(namconb1_am)
+void namconb1_state::namconb1(machine_config &config)
+{
+ M68EC020(config, m_maincpu, MASTER_CLOCK/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &namconb1_state::namconb1_am);
- MCFG_DEVICE_ADD("mcu", NAMCO_C75, MASTER_CLOCK/3)
- MCFG_DEVICE_PROGRAM_MAP(namcoc75_am)
- MCFG_DEVICE_IO_MAP(namcoc75_io)
+ NAMCO_C75(config, m_mcu, MASTER_CLOCK/3);
+ m_mcu->set_addrmap(AS_PROGRAM, &namconb1_state::namcoc75_am);
+ m_mcu->set_addrmap(AS_IO, &namconb1_state::namcoc75_io);
EEPROM_2816(config, "eeprom");
@@ -1082,18 +1083,19 @@ MACHINE_CONFIG_START(namconb1_state::namconb1)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("c352", C352, MASTER_CLOCK/2, 288)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
- //MCFG_SOUND_ROUTE(2, "lspeaker", 1.00) // Second DAC not present.
- //MCFG_SOUND_ROUTE(3, "rspeaker", 1.00)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(namconb1_state::namconb2)
+
+ c352_device &c352(C352(config, "c352", MASTER_CLOCK/2, 288));
+ c352.add_route(0, "lspeaker", 1.00);
+ c352.add_route(1, "rspeaker", 1.00);
+ //c352.add_route(2, "lspeaker", 1.00); // Second DAC not present.
+ //c352.add_route(3, "rspeaker", 1.00);
+}
+
+void namconb1_state::namconb2(machine_config &config)
+{
namconb1(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(namconb2_am)
+ m_maincpu->set_addrmap(AS_PROGRAM, &namconb1_state::namconb2_am);
m_screen->set_screen_update(FUNC(namconb1_state::screen_update_namconb2));
@@ -1102,9 +1104,10 @@ MACHINE_CONFIG_START(namconb1_state::namconb2)
m_c169roz->set_is_namcofl(false);
m_c169roz->set_ram_words(0x20000/2);
m_c169roz->set_color_base(0x1800);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namconb1_state::machbrkr)
+void namconb1_state::machbrkr(machine_config &config)
+{
namconb2(config);
m_c123tmap->set_tile_callback(namco_c123tmap_device::c123_tilemap_delegate(&namconb1_state::NB2TilemapCB_machbrkr, this));
@@ -1114,9 +1117,10 @@ MACHINE_CONFIG_START(namconb1_state::machbrkr)
m_c355spr->set_tile_callback(namco_c355spr_device::c355_obj_code2tile_delegate(&namconb1_state::NB2objcode2tile_machbrkr, this));
MCFG_VIDEO_START_OVERRIDE(namconb1_state,machbrkr)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namconb1_state::outfxies)
+void namconb1_state::outfxies(machine_config &config)
+{
namconb2(config);
m_c123tmap->set_tile_callback(namco_c123tmap_device::c123_tilemap_delegate(&namconb1_state::NB2TilemapCB_outfxies, this));
@@ -1126,7 +1130,7 @@ MACHINE_CONFIG_START(namconb1_state::outfxies)
m_c355spr->set_tile_callback(namco_c355spr_device::c355_obj_code2tile_delegate(&namconb1_state::NB2objcode2tile_outfxies, this));
MCFG_VIDEO_START_OVERRIDE(namconb1_state,outfxies)
-MACHINE_CONFIG_END
+}
/***************************************************************/
diff --git a/src/mame/drivers/namcond1.cpp b/src/mame/drivers/namcond1.cpp
index d8bcb73e9b9..df2642001aa 100644
--- a/src/mame/drivers/namcond1.cpp
+++ b/src/mame/drivers/namcond1.cpp
@@ -368,17 +368,17 @@ WRITE_LINE_MEMBER( namcond1_state::raster_irq_w )
m_maincpu->set_input_line(2, state ? ASSERT_LINE : CLEAR_LINE);
}
-MACHINE_CONFIG_START(namcond1_state::namcond1)
-
+void namcond1_state::namcond1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(49'152'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(namcond1_map)
-// MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcond1_state, irq1_line_hold)
+ M68000(config, m_maincpu, XTAL(49'152'000)/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcond1_state::namcond1_map);
+// m_maincpu->set_vblank_int("screen", FUNC(namcond1_state::irq1_line_hold));
- MCFG_DEVICE_ADD("mcu", H83002, XTAL(49'152'000)/3 )
- MCFG_DEVICE_PROGRAM_MAP( nd1h8rwmap)
- MCFG_DEVICE_IO_MAP( nd1h8iomap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcond1_state, mcu_interrupt)
+ H83002(config, m_mcu, XTAL(49'152'000)/3 );
+ m_mcu->set_addrmap(AS_PROGRAM, &namcond1_state::nd1h8rwmap);
+ m_mcu->set_addrmap(AS_IO, &namcond1_state::nd1h8iomap);
+ m_mcu->set_vblank_int("screen", FUNC(namcond1_state::mcu_interrupt));
config.m_minimum_quantum = attotime::from_hz(6000);
@@ -389,39 +389,39 @@ MACHINE_CONFIG_START(namcond1_state::namcond1)
m_ygv608->set_screen("screen");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
/*
H 804 108 576 48 32
V 261 26 224 3 0
*/
- MCFG_SCREEN_RAW_PARAMS( XTAL(49'152'000)/8, 804/2, 108/2, (108+576)/2, 261, 26, 26+224)
- MCFG_SCREEN_UPDATE_DEVICE("ygv608", ygv608_device, update_screen)
- MCFG_SCREEN_PALETTE("palette")
+ screen.set_raw( XTAL(49'152'000)/8, 804/2, 108/2, (108+576)/2, 261, 26, 26+224);
+ screen.set_screen_update("ygv608", FUNC(ygv608_device::update_screen));
+ screen.set_palette("palette");
- MCFG_PALETTE_ADD("palette", 256)
+ PALETTE(config, "palette").set_entries(256);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("c352", C352, XTAL(49'152'000)/2, 288)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
- //MCFG_SOUND_ROUTE(2, "lspeaker", 1.00) // Second DAC not present.
- //MCFG_SOUND_ROUTE(3, "rspeaker", 1.00)
+ c352_device &c352(C352(config, "c352", XTAL(49'152'000)/2, 288));
+ c352.add_route(0, "lspeaker", 1.00);
+ c352.add_route(1, "rspeaker", 1.00);
+ //c352.add_route(2, "lspeaker", 1.00); // Second DAC not present.
+ //c352.add_route(3, "rspeaker", 1.00);
- MCFG_DEVICE_ADD("at28c16", AT28C16, 0)
-MACHINE_CONFIG_END
+ AT28C16(config, "at28c16", 0);
+}
-MACHINE_CONFIG_START(namcond1_state::abcheck)
+void namcond1_state::abcheck(machine_config &config)
+{
namcond1(config);
- MCFG_DEVICE_REPLACE("maincpu", M68000, XTAL(49'152'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(abcheck_map)
-// MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcond1_state, irq1_line_hold)
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcond1_state::abcheck_map);
+// m_maincpu->set_vblank_int("screen", FUNC(namcond1_state::irq1_line_hold));
NVRAM(config, "zpr1", nvram_device::DEFAULT_ALL_0);
NVRAM(config, "zpr2", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
ROM_START( ncv1 )
ROM_REGION( 0x100000, "maincpu", 0 ) /* 16MB for Main CPU */
diff --git a/src/mame/drivers/namcos2.cpp b/src/mame/drivers/namcos2.cpp
index eee3168c826..d3343cb5054 100644
--- a/src/mame/drivers/namcos2.cpp
+++ b/src/mame/drivers/namcos2.cpp
@@ -1777,18 +1777,19 @@ void namcos2_state::configure_c123tmap_standard(machine_config &config)
m_c123tmap->set_color_base(16*256);
}
-MACHINE_CONFIG_START(namcos2_state::base_noio)
- MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(master_default_am)
+void namcos2_state::base_noio(machine_config &config)
+{
+ M68000(config, m_maincpu, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos2_state::master_default_am);
TIMER(config, "scantimer").configure_scanline(FUNC(namcos2_state::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(slave_default_am)
+ M68000(config, m_slave, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_slave->set_addrmap(AS_PROGRAM, &namcos2_state::slave_default_am);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
- MCFG_DEVICE_PROGRAM_MAP(sound_default_am)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, M68B09_CPU_CLOCK); /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namcos2_state::sound_default_am);
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq1_line_hold), attotime::from_hz(120));
config.m_minimum_quantum = attotime::from_hz(12000); /* CPU slices per frame */
@@ -1797,10 +1798,10 @@ MACHINE_CONFIG_START(namcos2_state::base_noio)
configure_c148_standard(config);
NAMCO_C139(config, m_sci, 0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8)
- MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update)
- MCFG_SCREEN_PALETTE(m_c116)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8);
+ m_screen->set_screen_update(FUNC(namcos2_state::screen_update));
+ m_screen->set_palette(m_c116);
configure_c123tmap_standard(config);
@@ -1826,7 +1827,7 @@ MACHINE_CONFIG_START(namcos2_state::base_noio)
m_c140->add_route(1, "rspeaker", 0.75);
YM2151(config, "ymsnd", YM2151_SOUND_CLOCK).add_route(0, "lspeaker", 0.80).add_route(1, "rspeaker", 0.80); /* 3.579545MHz */
-MACHINE_CONFIG_END
+}
void namcos2_state::base(machine_config &config)
@@ -1868,18 +1869,19 @@ void namcos2_state::base3(machine_config &config)
YM2151(config.replace(), "ymsnd", YM2151_SOUND_CLOCK).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0); /* 3.579545MHz */
}
-MACHINE_CONFIG_START(namcos2_state::gollygho)
- MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(master_default_am)
+void namcos2_state::gollygho(machine_config &config)
+{
+ M68000(config, m_maincpu, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos2_state::master_default_am);
TIMER(config, "scantimer").configure_scanline(FUNC(namcos2_state::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(slave_default_am)
+ M68000(config, m_slave, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_slave->set_addrmap(AS_PROGRAM, &namcos2_state::slave_default_am);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
- MCFG_DEVICE_PROGRAM_MAP(sound_default_am)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, M68B09_CPU_CLOCK); /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namcos2_state::sound_default_am);
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq1_line_hold), attotime::from_hz(120));
configure_c65_standard(config);
@@ -1890,10 +1892,10 @@ MACHINE_CONFIG_START(namcos2_state::gollygho)
configure_c148_standard(config);
NAMCO_C139(config, m_sci, 0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8)
- MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update)
- MCFG_SCREEN_PALETTE(m_c116)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8);
+ m_screen->set_screen_update(FUNC(namcos2_state::screen_update));
+ m_screen->set_palette(m_c116);
GFXDECODE(config, m_gfxdecode, m_c116, gfx_namcos2);
@@ -1919,21 +1921,22 @@ MACHINE_CONFIG_START(namcos2_state::gollygho)
m_c140->add_route(1, "rspeaker", 0.75);
YM2151(config, "ymsnd", YM2151_SOUND_CLOCK).add_route(0, "lspeaker", 0.80).add_route(1, "rspeaker", 0.80); /* 3.579545MHz */
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos2_state::finallap_noio)
- MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(master_finallap_am)
+void namcos2_state::finallap_noio(machine_config &config)
+{
+ M68000(config, m_maincpu, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos2_state::master_finallap_am);
TIMER(config, "scantimer").configure_scanline(FUNC(namcos2_state::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(slave_finallap_am)
+ M68000(config, m_slave, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_slave->set_addrmap(AS_PROGRAM, &namcos2_state::slave_finallap_am);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
- MCFG_DEVICE_PROGRAM_MAP(sound_default_am)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, M68B09_CPU_CLOCK); /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namcos2_state::sound_default_am);
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq1_line_hold), attotime::from_hz(120));
config.m_minimum_quantum = attotime::from_hz(6000); /* CPU slices per frame */
@@ -1942,10 +1945,10 @@ MACHINE_CONFIG_START(namcos2_state::finallap_noio)
configure_c148_standard(config);
NAMCO_C139(config, m_sci, 0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8)
- MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_finallap)
- MCFG_SCREEN_PALETTE(m_c116)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8);
+ m_screen->set_screen_update(FUNC(namcos2_state::screen_update_finallap));
+ m_screen->set_palette(m_c116);
GFXDECODE(config, m_gfxdecode, m_c116, gfx_namcos2);
@@ -1969,45 +1972,50 @@ MACHINE_CONFIG_START(namcos2_state::finallap_noio)
m_c140->add_route(1, "rspeaker", 0.75);
YM2151(config, "ymsnd", YM2151_SOUND_CLOCK).add_route(0, "lspeaker", 0.80).add_route(1, "rspeaker", 0.80); /* 3.579545MHz */
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos2_state::finallap)
+void namcos2_state::finallap(machine_config &config)
+{
finallap_noio(config);
configure_c65_standard(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos2_state::finallap_c68)
+void namcos2_state::finallap_c68(machine_config &config)
+{
finallap_noio(config);
configure_c68_standard(config);
-MACHINE_CONFIG_END
+}
// finalap2 has different mangle
-MACHINE_CONFIG_START(namcos2_state::finalap2)
+void namcos2_state::finalap2(machine_config &config)
+{
finallap(config);
m_c123tmap->set_tile_callback(namco_c123tmap_device::c123_tilemap_delegate(&namcos2_state::TilemapCB_finalap2, this));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos2_state::finalap3)
+void namcos2_state::finalap3(machine_config &config)
+{
finallap_c68(config);
m_c123tmap->set_tile_callback(namco_c123tmap_device::c123_tilemap_delegate(&namcos2_state::TilemapCB_finalap2, this));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos2_state::sgunner)
- MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(master_sgunner_am)
+void namcos2_state::sgunner(machine_config &config)
+{
+ M68000(config, m_maincpu, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos2_state::master_sgunner_am);
TIMER(config, "scantimer").configure_scanline(FUNC(namcos2_state::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(slave_sgunner_am)
+ M68000(config, m_slave, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_slave->set_addrmap(AS_PROGRAM, &namcos2_state::slave_sgunner_am);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
- MCFG_DEVICE_PROGRAM_MAP(sound_default_am)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, M68B09_CPU_CLOCK); /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namcos2_state::sound_default_am);
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq1_line_hold), attotime::from_hz(120));
configure_c65_standard(config);
@@ -2018,10 +2026,10 @@ MACHINE_CONFIG_START(namcos2_state::sgunner)
configure_c148_standard(config);
NAMCO_C139(config, m_sci, 0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8)
- MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_sgunner)
- MCFG_SCREEN_PALETTE(m_c116)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8);
+ m_screen->set_screen_update(FUNC(namcos2_state::screen_update_sgunner));
+ m_screen->set_palette(m_c116);
GFXDECODE(config, m_gfxdecode, m_c116, gfx_c355);
@@ -2048,20 +2056,21 @@ MACHINE_CONFIG_START(namcos2_state::sgunner)
m_c140->add_route(1, "rspeaker", 0.75);
YM2151(config, "ymsnd", YM2151_SOUND_CLOCK).add_route(0, "lspeaker", 0.80).add_route(1, "rspeaker", 0.80); /* 3.579545MHz */
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos2_state::sgunner2)
- MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(master_sgunner_am)
+void namcos2_state::sgunner2(machine_config &config)
+{
+ M68000(config, m_maincpu, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos2_state::master_sgunner_am);
TIMER(config, "scantimer").configure_scanline(FUNC(namcos2_state::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(slave_sgunner_am)
+ M68000(config, m_slave, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_slave->set_addrmap(AS_PROGRAM, &namcos2_state::slave_sgunner_am);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
- MCFG_DEVICE_PROGRAM_MAP(sound_default_am)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, M68B09_CPU_CLOCK); /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namcos2_state::sound_default_am);
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq1_line_hold), attotime::from_hz(120));
configure_c68_standard(config);
@@ -2072,10 +2081,10 @@ MACHINE_CONFIG_START(namcos2_state::sgunner2)
configure_c148_standard(config);
NAMCO_C139(config, m_sci, 0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8)
- MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_sgunner)
- MCFG_SCREEN_PALETTE(m_c116)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8);
+ m_screen->set_screen_update(FUNC(namcos2_state::screen_update_sgunner));
+ m_screen->set_palette(m_c116);
GFXDECODE(config, m_gfxdecode, m_c116, gfx_c355);
@@ -2102,20 +2111,21 @@ MACHINE_CONFIG_START(namcos2_state::sgunner2)
m_c140->add_route(1, "rspeaker", 0.75);
YM2151(config, "ymsnd", YM2151_SOUND_CLOCK).add_route(0, "lspeaker", 0.80).add_route(1, "rspeaker", 0.80); /* 3.579545MHz */
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos2_state::suzuka8h)
- MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(master_suzuka8h_am)
+void namcos2_state::suzuka8h(machine_config &config)
+{
+ M68000(config, m_maincpu, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos2_state::master_suzuka8h_am);
TIMER(config, "scantimer").configure_scanline(FUNC(namcos2_state::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(slave_suzuka8h_am)
+ M68000(config, m_slave, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_slave->set_addrmap(AS_PROGRAM, &namcos2_state::slave_suzuka8h_am);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
- MCFG_DEVICE_PROGRAM_MAP(sound_default_am)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, M68B09_CPU_CLOCK); /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namcos2_state::sound_default_am);
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq1_line_hold), attotime::from_hz(120));
configure_c68_standard(config);
@@ -2126,10 +2136,10 @@ MACHINE_CONFIG_START(namcos2_state::suzuka8h)
configure_c148_standard(config);
NAMCO_C139(config, m_sci, 0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8)
- MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_luckywld)
- MCFG_SCREEN_PALETTE(m_c116)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8);
+ m_screen->set_screen_update(FUNC(namcos2_state::screen_update_luckywld));
+ m_screen->set_palette(m_c116);
GFXDECODE(config, m_gfxdecode, m_c116, gfx_c355);
@@ -2159,16 +2169,15 @@ MACHINE_CONFIG_START(namcos2_state::suzuka8h)
m_c140->add_route(1, "rspeaker", 0.75);
YM2151(config, "ymsnd", YM2151_SOUND_CLOCK).add_route(0, "lspeaker", 0.80).add_route(1, "rspeaker", 0.80); /* 3.579545MHz */
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos2_state::luckywld)
+void namcos2_state::luckywld(machine_config &config)
+{
suzuka8h(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(master_luckywld_am)
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos2_state::master_luckywld_am);
- MCFG_DEVICE_MODIFY("slave")
- MCFG_DEVICE_PROGRAM_MAP(slave_luckywld_am)
+ m_slave->set_addrmap(AS_PROGRAM, &namcos2_state::slave_luckywld_am);
NAMCO_C169ROZ(config, m_c169roz, 0);
m_c169roz->set_palette(m_c116);
@@ -2176,21 +2185,21 @@ MACHINE_CONFIG_START(namcos2_state::luckywld)
m_c169roz->set_ram_words(0x10000/2);
m_c169roz->set_tile_callback(namco_c169roz_device::c169_tilemap_delegate(&namcos2_state::RozCB_luckywld, this));
m_c169roz->set_color_base(0*256);
+}
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(namcos2_state::metlhawk)
- MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(master_metlhawk_am)
+void namcos2_state::metlhawk(machine_config &config)
+{
+ M68000(config, m_maincpu, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos2_state::master_metlhawk_am);
TIMER(config, "scantimer").configure_scanline(FUNC(namcos2_state::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
- MCFG_DEVICE_PROGRAM_MAP(slave_metlhawk_am)
+ M68000(config, m_slave, M68K_CPU_CLOCK); /* 12.288MHz (49.152MHz OSC/4) */
+ m_slave->set_addrmap(AS_PROGRAM, &namcos2_state::slave_metlhawk_am);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, M68B09_CPU_CLOCK) /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
- MCFG_DEVICE_PROGRAM_MAP(sound_default_am)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_state, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, M68B09_CPU_CLOCK); /* 2.048MHz (49.152MHz OSC/24) - Sound handling */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namcos2_state::sound_default_am);
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namcos2_state::irq1_line_hold), attotime::from_hz(120));
configure_c65_standard(config);
@@ -2201,10 +2210,10 @@ MACHINE_CONFIG_START(namcos2_state::metlhawk)
configure_c148_standard(config);
NAMCO_C139(config, m_sci, 0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8)
- MCFG_SCREEN_UPDATE_DRIVER(namcos2_state, screen_update_metlhawk)
- MCFG_SCREEN_PALETTE(m_c116)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MAIN_OSC_CLOCK/8, 384, 0*8, 36*8, 264, 0*8, 28*8);
+ m_screen->set_screen_update(FUNC(namcos2_state::screen_update_metlhawk));
+ m_screen->set_palette(m_c116);
GFXDECODE(config, m_gfxdecode, m_c116, gfx_metlhawk);
@@ -2235,7 +2244,7 @@ MACHINE_CONFIG_START(namcos2_state::metlhawk)
YM2151(config, "ymsnd", YM2151_SOUND_CLOCK).add_route(0, "lspeaker", 0.80).add_route(1, "rspeaker", 0.80); /* 3.579545MHz */
// ymsnd.irq_handler().set_inputline("audiocpu", 1);
-MACHINE_CONFIG_END
+}
/*************************************************************/
diff --git a/src/mame/drivers/namcos21.cpp b/src/mame/drivers/namcos21.cpp
index 80711068c20..d4b0b2b385b 100644
--- a/src/mame/drivers/namcos21.cpp
+++ b/src/mame/drivers/namcos21.cpp
@@ -291,11 +291,6 @@ Filter Board
#include "sound/c140.h"
#include "sound/ym2151.h"
-
-// TODO: basic parameters to get 60.606060 Hz, x2 is for interlace
-#define MCFG_SCREEN_RAW_PARAMS_NAMCO480I \
- MCFG_SCREEN_RAW_PARAMS(12288000*2, 768, 0, 496, 264*2,0,480)
-
#define ENABLE_LOGGING 0
#define NAMCOS21_NUM_COLORS 0x8000
@@ -858,26 +853,27 @@ void namcos21_state::configure_c148_standard(machine_config &config)
m_slave_intc->link_c148_device(m_master_intc);
}
-MACHINE_CONFIG_START(namcos21_state::winrun)
- MCFG_DEVICE_ADD("maincpu", M68000,12288000) /* Master */
- MCFG_DEVICE_PROGRAM_MAP(winrun_master_map)
+void namcos21_state::winrun(machine_config &config)
+{
+ M68000(config, m_maincpu, 12288000); /* Master */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos21_state::winrun_master_map);
TIMER(config, "scantimer").configure_scanline(FUNC(namcos21_state::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000,12288000) /* Slave */
- MCFG_DEVICE_PROGRAM_MAP(winrun_slave_map)
+ M68000(config, m_slave, 12288000); /* Slave */
+ m_slave->set_addrmap(AS_PROGRAM, &namcos21_state::winrun_slave_map);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, 3072000) /* Sound */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_state, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_state, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, 3072000); /* Sound */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namcos21_state::sound_map);
+ m_audiocpu->set_periodic_int(FUNC(namcos21_state::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namcos21_state::irq1_line_hold), attotime::from_hz(120));
configure_c65_namcos21(config);
NAMCOS21_DSP(config, m_namcos21_dsp, 0);
m_namcos21_dsp->set_renderer_tag("namcos21_3d");
- MCFG_DEVICE_ADD("gpu", M68000,12288000) /* graphics coprocessor */
- MCFG_DEVICE_PROGRAM_MAP(winrun_gpu_map)
+ m68000_device &gpu(M68000(config, "gpu", 12288000)); /* graphics coprocessor */
+ gpu.set_addrmap(AS_PROGRAM, &namcos21_state::winrun_gpu_map);
configure_c148_standard(config);
NAMCO_C148(config, m_gpu_intc, 0, "gpu", false);
@@ -887,10 +883,11 @@ MACHINE_CONFIG_START(namcos21_state::winrun)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS_NAMCO480I
- MCFG_SCREEN_UPDATE_DRIVER(namcos21_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ // TODO: basic parameters to get 60.606060 Hz, x2 is for interlace
+ m_screen->set_raw(12288000*2, 768, 0, 496, 264*2, 0, 480);
+ m_screen->set_screen_update(FUNC(namcos21_state::screen_update));
+ m_screen->set_palette(m_palette);
PALETTE(config, m_palette).set_format(palette_device::xBRG_888, NAMCOS21_NUM_COLORS);
@@ -909,7 +906,7 @@ MACHINE_CONFIG_START(namcos21_state::winrun)
m_c140->add_route(1, "rspeaker", 0.50);
YM2151(config, "ymsnd", 3579580).add_route(0, "lspeaker", 0.30).add_route(1, "rspeaker", 0.30);
-MACHINE_CONFIG_END
+}
ROM_START( winrun )
diff --git a/src/mame/drivers/namcos21_c67.cpp b/src/mame/drivers/namcos21_c67.cpp
index e167e6ad66d..51cee217c0c 100644
--- a/src/mame/drivers/namcos21_c67.cpp
+++ b/src/mame/drivers/namcos21_c67.cpp
@@ -271,10 +271,6 @@ Namco System 21 Video Hardware
#include "sound/ym2151.h"
#include "emupal.h"
-// TODO: basic parameters to get 60.606060 Hz, x2 is for interlace
-#define MCFG_SCREEN_RAW_PARAMS_NAMCO480I \
- MCFG_SCREEN_RAW_PARAMS(12288000*2, 768, 0, 496, 264*2,0,480)
-
#define ENABLE_LOGGING 0
#define NAMCOS21_NUM_COLORS 0x8000
@@ -810,18 +806,19 @@ void namcos21_c67_state::configure_c148_standard(machine_config &config)
}
// starblad, solvalou, aircomb, cybsled base state
-MACHINE_CONFIG_START(namcos21_c67_state::namcos21)
- MCFG_DEVICE_ADD("maincpu", M68000,12288000) /* Master */
- MCFG_DEVICE_PROGRAM_MAP(master_map)
+void namcos21_c67_state::namcos21(machine_config &config)
+{
+ M68000(config, m_maincpu, 12288000); /* Master */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos21_c67_state::master_map);
TIMER(config, "scantimer").configure_scanline(FUNC(namcos21_c67_state::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000,12288000) /* Slave */
- MCFG_DEVICE_PROGRAM_MAP(slave_map)
+ M68000(config, m_slave, 12288000); /* Slave */
+ m_slave->set_addrmap(AS_PROGRAM, &namcos21_c67_state::slave_map);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, 3072000) /* Sound */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_c67_state, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos21_c67_state, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, 3072000); /* Sound */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namcos21_c67_state::sound_map);
+ m_audiocpu->set_periodic_int(FUNC(namcos21_c67_state::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namcos21_c67_state::irq1_line_hold), attotime::from_hz(120));
configure_c68_namcos21(config);
@@ -832,10 +829,11 @@ MACHINE_CONFIG_START(namcos21_c67_state::namcos21)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS_NAMCO480I
- MCFG_SCREEN_UPDATE_DRIVER(namcos21_c67_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ // TODO: basic parameters to get 60.606060 Hz, x2 is for interlace
+ m_screen->set_raw(12288000*2, 768, 0, 496, 264*2, 0, 480);
+ m_screen->set_screen_update(FUNC(namcos21_c67_state::screen_update));
+ m_screen->set_palette(m_palette);
NAMCOS21_3D(config, m_namcos21_3d, 0);
m_namcos21_3d->set_zz_shift_mult(11, 0x200);
@@ -865,33 +863,37 @@ MACHINE_CONFIG_START(namcos21_c67_state::namcos21)
m_c140->add_route(1, "rspeaker", 0.50);
YM2151(config, "ymsnd", 3579580).add_route(0, "lspeaker", 0.30).add_route(1, "rspeaker", 0.30);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos21_c67_state::aircomb)
+void namcos21_c67_state::aircomb(machine_config &config)
+{
namcos21(config);
m_namcos21_dsp_c67->set_gametype(namcos21_dsp_c67_device::NAMCOS21_AIRCOMBAT);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos21_c67_state::starblad)
+void namcos21_c67_state::starblad(machine_config &config)
+{
namcos21(config);
m_namcos21_dsp_c67->set_gametype(namcos21_dsp_c67_device::NAMCOS21_STARBLADE);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos21_c67_state::cybsled)
+void namcos21_c67_state::cybsled(machine_config &config)
+{
namcos21(config);
m_namcos21_dsp_c67->set_gametype(namcos21_dsp_c67_device::NAMCOS21_CYBERSLED);
-MACHINE_CONFIG_END
+}
WRITE_LINE_MEMBER(namcos21_c67_state::yield_hack)
{
m_maincpu->yield();
}
-MACHINE_CONFIG_START(namcos21_c67_state::solvalou)
+void namcos21_c67_state::solvalou(machine_config &config)
+{
namcos21(config);
m_namcos21_dsp_c67->set_gametype(namcos21_dsp_c67_device::NAMCOS21_SOLVALOU);
m_namcos21_dsp_c67->yield_hack_callback().set(FUNC(namcos21_c67_state::yield_hack)); // VCK function
-MACHINE_CONFIG_END
+}
ROM_START( starblad )
diff --git a/src/mame/drivers/namcos21_de.cpp b/src/mame/drivers/namcos21_de.cpp
index 2969f64b269..7b1d98d4bcc 100644
--- a/src/mame/drivers/namcos21_de.cpp
+++ b/src/mame/drivers/namcos21_de.cpp
@@ -48,9 +48,6 @@ Driver's Eyes works,
#include "sound/c140.h"
#include "emupal.h"
-// TODO: basic parameters to get 60.606060 Hz, x2 is for interlace
-#define MCFG_SCREEN_RAW_PARAMS_NAMCO480I \
- MCFG_SCREEN_RAW_PARAMS(12288000*2, 768, 0, 496, 264*2,0,480)
#define ENABLE_LOGGING 0
@@ -183,18 +180,19 @@ static GFXDECODE_START( gfx_namcos21 )
GFXDECODE_END
-MACHINE_CONFIG_START(namco_de_pcbstack_device::device_add_mconfig)
- MCFG_DEVICE_ADD("maincpu", M68000,12288000) /* Master */
- MCFG_DEVICE_PROGRAM_MAP(driveyes_master_map)
+void namco_de_pcbstack_device::device_add_mconfig(machine_config &config)
+{
+ M68000(config, m_maincpu, 12288000); /* Master */
+ m_maincpu->set_addrmap(AS_PROGRAM, &namco_de_pcbstack_device::driveyes_master_map);
TIMER(config, "scantimer").configure_scanline(FUNC(namco_de_pcbstack_device::screen_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("slave", M68000,12288000) /* Slave */
- MCFG_DEVICE_PROGRAM_MAP(driveyes_slave_map)
+ M68000(config, m_slave, 12288000); /* Slave */
+ m_slave->set_addrmap(AS_PROGRAM, &namco_de_pcbstack_device::driveyes_slave_map);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, 3072000) /* Sound */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namco_de_pcbstack_device, irq0_line_hold, 2*60)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(namco_de_pcbstack_device, irq1_line_hold, 120)
+ MC6809E(config, m_audiocpu, 3072000); /* Sound */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &namco_de_pcbstack_device::sound_map);
+ m_audiocpu->set_periodic_int(FUNC(namco_de_pcbstack_device::irq0_line_hold), attotime::from_hz(2*60));
+ m_audiocpu->set_periodic_int(FUNC(namco_de_pcbstack_device::irq1_line_hold), attotime::from_hz(120));
configure_c68_namcos21(config);
@@ -208,10 +206,11 @@ MACHINE_CONFIG_START(namco_de_pcbstack_device::device_add_mconfig)
configure_c148_standard(config);
NAMCO_C139(config, m_sci, 0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS_NAMCO480I
- MCFG_SCREEN_UPDATE_DRIVER(namco_de_pcbstack_device, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ // TODO: basic parameters to get 60.606060 Hz, x2 is for interlace
+ m_screen->set_raw(12288000*2, 768, 0, 496, 264*2, 0, 480);
+ m_screen->set_screen_update(FUNC(namco_de_pcbstack_device::screen_update));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_namcos21);
PALETTE(config, m_palette).set_format(palette_device::xBRG_888, NAMCOS21_NUM_COLORS);
@@ -239,7 +238,7 @@ MACHINE_CONFIG_START(namco_de_pcbstack_device::device_add_mconfig)
m_c140->add_route(1, "rspeaker", 0.50);
YM2151(config, "ymsnd", 3579580).add_route(0, "lspeaker", 0.30).add_route(1, "rspeaker", 0.30);
-MACHINE_CONFIG_END
+}
uint32_t namco_de_pcbstack_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp
index 070624beddb..c91fc4628c6 100644
--- a/src/mame/drivers/namcos22.cpp
+++ b/src/mame/drivers/namcos22.cpp
@@ -3877,12 +3877,12 @@ void namcos22_state::machine_start()
}
// System22
-MACHINE_CONFIG_START(namcos22_state::namcos22)
-
+void namcos22_state::namcos22(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68020, 49.152_MHz_XTAL/2) // MC68020RP25E
- MCFG_DEVICE_PROGRAM_MAP(namcos22_am)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos22_state, namcos22_interrupt)
+ M68020(config, m_maincpu, 49.152_MHz_XTAL/2); // MC68020RP25E
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos22_state::namcos22_am);
+ m_maincpu->set_vblank_int("screen", FUNC(namcos22_state::namcos22_interrupt));
tms32025_device& master(TMS32025(config, m_master, 40_MHz_XTAL));
master.set_addrmap(AS_PROGRAM, &namcos22_state::master_dsp_program);
@@ -3906,58 +3906,59 @@ MACHINE_CONFIG_START(namcos22_state::namcos22)
slave.xf_out_cb().set(FUNC(namcos22_state::dsp_xf_output_w));
slave.dx_out_cb().set(FUNC(namcos22_state::slave_serial_io_w));
- MCFG_DEVICE_ADD("mcu", NAMCO_C74, 49.152_MHz_XTAL/3) // C74 on the CPU board has no periodic interrupts, it runs entirely off Timer A0
- MCFG_DEVICE_PROGRAM_MAP(mcu_s22_program)
- MCFG_DEVICE_IO_MAP(mcu_s22_io)
+ NAMCO_C74(config, m_mcu, 49.152_MHz_XTAL/3); // C74 on the CPU board has no periodic interrupts, it runs entirely off Timer A0
+ m_mcu->set_addrmap(AS_PROGRAM, &namcos22_state::mcu_s22_program);
+ m_mcu->set_addrmap(AS_IO, &namcos22_state::mcu_s22_io);
- MCFG_DEVICE_ADD("iomcu", NAMCO_C74, 6.144_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(iomcu_s22_program)
- MCFG_DEVICE_IO_MAP(iomcu_s22_io)
+ NAMCO_C74(config, m_iomcu, 6.144_MHz_XTAL);
+ m_iomcu->set_addrmap(AS_PROGRAM, &namcos22_state::iomcu_s22_program);
+ m_iomcu->set_addrmap(AS_IO, &namcos22_state::iomcu_s22_io);
EEPROM_2864(config, "eeprom").write_time(attotime::zero);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- //MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(namcos22_state, screen_update_namcos22)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, namcos22_state, screen_vblank))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ //m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE);
+ m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ m_screen->set_screen_update(FUNC(namcos22_state::screen_update_namcos22));
+ m_screen->screen_vblank().set(FUNC(namcos22_state::screen_vblank));
- MCFG_PALETTE_ADD("palette", 0x8000)
+ PALETTE(config, m_palette).set_entries(0x8000);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_namcos22);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("c352", C352, 49.152_MHz_XTAL/2, 288)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
-MACHINE_CONFIG_END
+ C352(config, m_c352, 49.152_MHz_XTAL/2, 288);
+ m_c352->add_route(0, "lspeaker", 1.00);
+ m_c352->add_route(1, "rspeaker", 1.00);
+}
-MACHINE_CONFIG_START(namcos22_state::cybrcomm)
+void namcos22_state::cybrcomm(machine_config &config)
+{
namcos22(config);
SPEAKER(config, "rear_left").rear_left();
SPEAKER(config, "rear_right").rear_right();
- MCFG_DEVICE_MODIFY("c352")
- MCFG_SOUND_ROUTE(2, "rear_left", 1.00)
- MCFG_SOUND_ROUTE(3, "rear_right", 1.00)
-MACHINE_CONFIG_END
+ m_c352->add_route(2, "rear_left", 1.00);
+ m_c352->add_route(3, "rear_right", 1.00);
+}
// System Super22
-MACHINE_CONFIG_START(namcos22_state::namcos22s)
+void namcos22_state::namcos22s(machine_config &config)
+{
namcos22(config);
/* basic machine hardware */
- MCFG_DEVICE_REPLACE("maincpu", M68EC020, 49.152_MHz_XTAL/2) // MC68EC020FG25
- MCFG_DEVICE_PROGRAM_MAP(namcos22s_am)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", namcos22_state, namcos22s_interrupt)
+ M68EC020(config.replace(), m_maincpu, 49.152_MHz_XTAL/2); // MC68EC020FG25
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos22_state::namcos22s_am);
+ m_maincpu->set_vblank_int("screen", FUNC(namcos22_state::namcos22s_interrupt));
- MCFG_DEVICE_REPLACE("mcu", M37710S4, 49.152_MHz_XTAL/3)
- MCFG_DEVICE_PROGRAM_MAP(mcu_program)
- MCFG_DEVICE_IO_MAP(mcu_io)
+ M37710S4(config.replace(), m_mcu, 49.152_MHz_XTAL/3);
+ m_mcu->set_addrmap(AS_PROGRAM, &namcos22_state::mcu_program);
+ m_mcu->set_addrmap(AS_IO, &namcos22_state::mcu_io);
TIMER(config, "mcu_irq").configure_scanline(FUNC(namcos22_state::mcu_irq), "screen", 0, 240);
config.m_minimum_quantum = attotime::from_hz(9000); // erratic inputs otherwise, probably mcu vs maincpu shareram
@@ -3967,72 +3968,71 @@ MACHINE_CONFIG_START(namcos22_state::namcos22s)
m_mb87078->gain_changed().set(FUNC(namcos22_state::mb87078_gain_changed));
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(namcos22_state, screen_update_namcos22s)
+ m_screen->set_screen_update(FUNC(namcos22_state::screen_update_namcos22s));
GFXDECODE(config.replace(), m_gfxdecode, m_palette, gfx_super);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos22_state::airco22b)
+void namcos22_state::airco22b(machine_config &config)
+{
namcos22s(config);
SPEAKER(config, "bodysonic").subwoofer();
- MCFG_DEVICE_MODIFY("c352")
- MCFG_SOUND_ROUTE(2, "bodysonic", 0.50) // to subwoofer
-MACHINE_CONFIG_END
+ m_c352->add_route(2, "bodysonic", 0.50); // to subwoofer
+}
-MACHINE_CONFIG_START(namcos22_state::alpine)
+void namcos22_state::alpine(machine_config &config)
+{
namcos22s(config);
- MCFG_DEVICE_MODIFY("mcu")
- MCFG_DEVICE_IO_MAP(alpine_io_map)
+ m_mcu->set_addrmap(AS_IO, &namcos22_state::alpine_io_map);
TIMER(config, m_motor_timer).configure_generic(FUNC(namcos22_state::alpine_steplock_callback));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(namcos22_state::alpinesa)
+void namcos22_state::alpinesa(machine_config &config)
+{
alpine(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(alpinesa_am)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos22_state::alpinesa_am);
+}
-MACHINE_CONFIG_START(namcos22_state::cybrcycc)
+void namcos22_state::cybrcycc(machine_config &config)
+{
namcos22s(config);
SPEAKER(config, "tank", 0.0, 0.0, 0.0);
- MCFG_DEVICE_MODIFY("c352")
- MCFG_SOUND_ROUTE(2, "tank", 1.00)
-MACHINE_CONFIG_END
+ m_c352->add_route(2, "tank", 1.00);
+}
-MACHINE_CONFIG_START(namcos22_state::dirtdash)
+void namcos22_state::dirtdash(machine_config &config)
+{
namcos22s(config);
SPEAKER(config, "road", 0.0, 0.0, 0.0);
- MCFG_DEVICE_MODIFY("c352")
- MCFG_SOUND_ROUTE(3, "road", 1.00)
-MACHINE_CONFIG_END
+ m_c352->add_route(3, "road", 1.00);
+}
-MACHINE_CONFIG_START(namcos22_state::timecris)
+void namcos22_state::timecris(machine_config &config)
+{
namcos22s(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(timecris_am)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &namcos22_state::timecris_am);
+}
-MACHINE_CONFIG_START(namcos22_state::tokyowar)
+void namcos22_state::tokyowar(machine_config &config)
+{
namcos22s(config);
SPEAKER(config, "vibration").subwoofer();
SPEAKER(config, "seat").rear_center();
- MCFG_DEVICE_MODIFY("c352")
- MCFG_SOUND_ROUTE(2, "vibration", 0.50) // to "bass shaker"
- MCFG_SOUND_ROUTE(3, "seat", 1.00)
-MACHINE_CONFIG_END
+ m_c352->add_route(2, "vibration", 0.50); // to "bass shaker"
+ m_c352->add_route(3, "seat", 1.00);
+}
void namcos22_state::propcycl(machine_config &config)
{
@@ -4050,12 +4050,13 @@ MACHINE_START_MEMBER(namcos22_state,adillor)
elem = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos22_state::adillor_trackball_interrupt),this));
}
-MACHINE_CONFIG_START(namcos22_state::adillor)
+void namcos22_state::adillor(machine_config &config)
+{
namcos22s(config);
TIMER(config, "ar_tb_upd").configure_periodic(FUNC(namcos22_state::adillor_trackball_update), attotime::from_msec(20));
MCFG_MACHINE_START_OVERRIDE(namcos22_state,adillor)
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/nanos.cpp b/src/mame/drivers/nanos.cpp
index 22ab6a3e042..4e982e40032 100644
--- a/src/mame/drivers/nanos.cpp
+++ b/src/mame/drivers/nanos.cpp
@@ -466,7 +466,8 @@ static GFXDECODE_START( gfx_nanos )
GFXDECODE_ENTRY( "chargen", 0x0000, nanos_charlayout, 0, 1 )
GFXDECODE_END
-MACHINE_CONFIG_START(nanos_state::nanos)
+void nanos_state::nanos(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(4'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &nanos_state::mem_map);
@@ -474,13 +475,13 @@ MACHINE_CONFIG_START(nanos_state::nanos)
m_maincpu->set_daisy_config(nanos_daisy_chain);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(nanos_state, screen_update)
- MCFG_SCREEN_SIZE(80*8, 25*10)
- MCFG_SCREEN_VISIBLE_AREA(0,80*8-1,0,25*10-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(FUNC(nanos_state::screen_update));
+ screen.set_size(80*8, 25*10);
+ screen.set_visarea(0,80*8-1,0,25*10-1);
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_nanos);
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -523,7 +524,7 @@ MACHINE_CONFIG_START(nanos_state::nanos)
RAM(config, RAM_TAG).set_default_size("64K");
TIMER(config, "keyboard_timer").configure_periodic(FUNC(nanos_state::keyboard_callback), attotime::from_hz(24000));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( nanos )
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index efb064516c3..e159a5eeddd 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -3115,12 +3115,12 @@ void naomi_state::naomigd_kb(machine_config &config)
* Naomi 2
*/
/*
-MACHINE_CONFIG_START((naomi2_state::naomi2)
+void naomi2_state::naomi2(machine_config &config)
+{
naomi(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(naomi2_map)
- MCFG_DEVICE_IO_MAP(naomi_port)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &naomi2_state::naomi2_map);
+ m_maincpu->set_addrmap(AS_IO, &naomi2_state::naomi_port);
+}
*/
/*
* Naomi 2 GD-Rom
diff --git a/src/mame/drivers/nbmj8688.cpp b/src/mame/drivers/nbmj8688.cpp
index 679c84cfcac..bbb4bbd7773 100644
--- a/src/mame/drivers/nbmj8688.cpp
+++ b/src/mame/drivers/nbmj8688.cpp
@@ -2453,23 +2453,23 @@ READ8_MEMBER(nbmj8688_state::dipsw2_r)
return m_nb1413m3->dipsw2_r(space,offset);
}
-MACHINE_CONFIG_START(nbmj8688_state::NBMJDRV_4096)
-
+void nbmj8688_state::NBMJDRV_4096(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 5000000) /* 5.00 MHz */
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nbmj8688_state, irq0_line_hold)
+ Z80(config, m_maincpu, 5000000); /* 5.00 MHz */
+ m_maincpu->set_vblank_int("screen", FUNC(nbmj8688_state::irq0_line_hold));
NB1413M3(config, m_nb1413m3, 0);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 16, 240-1)
- MCFG_SCREEN_UPDATE_DRIVER(nbmj8688_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 16, 240-1);
+ screen.set_screen_update(FUNC(nbmj8688_state::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(nbmj8688_state::mbmj8688_12bit), 4096);
@@ -2487,7 +2487,7 @@ MACHINE_CONFIG_START(nbmj8688_state::NBMJDRV_4096)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
void nbmj8688_state::NBMJDRV_256(machine_config &config)
{
@@ -2515,16 +2515,16 @@ void nbmj8688_state::NBMJDRV_65536(machine_config &config)
// --------------------------------------------------------------------------------
-MACHINE_CONFIG_START(nbmj8688_state::crystalg)
+void nbmj8688_state::crystalg(machine_config &config)
+{
NBMJDRV_256(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(secolove_map)
- MCFG_DEVICE_IO_MAP(crystalg_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::crystalg_io_map);
m_nb1413m3->set_type(NB1413M3_CRYSTALG);
-MACHINE_CONFIG_END
+}
void nbmj8688_state::crystal2(machine_config &config)
{
@@ -2540,28 +2540,28 @@ void nbmj8688_state::nightlov(machine_config &config)
m_nb1413m3->set_type(NB1413M3_NIGHTLOV);
}
-MACHINE_CONFIG_START(nbmj8688_state::apparel)
+void nbmj8688_state::apparel(machine_config &config)
+{
NBMJDRV_256(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(secolove_map)
- MCFG_DEVICE_IO_MAP(secolove_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::secolove_io_map);
m_nb1413m3->set_type(NB1413M3_APPAREL);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8688_state::mbmj_h12bit)
+void nbmj8688_state::mbmj_h12bit(machine_config &config)
+{
NBMJDRV_4096(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(secolove_map)
- MCFG_DEVICE_IO_MAP(secolove_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::secolove_io_map);
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(nbmj8688_state,mbmj8688_hybrid_12bit)
-MACHINE_CONFIG_END
+}
void nbmj8688_state::citylove(machine_config &config)
{
@@ -2585,42 +2585,40 @@ void nbmj8688_state::secolove(machine_config &config)
}
/*Same as h12bit HW with different sound HW + NMI enable bit*/
-MACHINE_CONFIG_START(nbmj8688_state::barline)
+void nbmj8688_state::barline(machine_config &config)
+{
mbmj_h12bit(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(barline_io_map)
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::barline_io_map);
m_nb1413m3->set_type(NB1413M3_BARLINE);
- MCFG_DEVICE_REPLACE("psg", YM3812, 20000000/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.35)
+ YM3812(config.replace(), "psg", 20000000/8).add_route(ALL_OUTPUTS, "speaker", 0.35);
config.device_remove("dac");
config.device_remove("vref");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8688_state::mbmj_p16bit)
+void nbmj8688_state::mbmj_p16bit(machine_config &config)
+{
NBMJDRV_65536(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(secolove_map)
- MCFG_DEVICE_IO_MAP(secolove_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::secolove_io_map);
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(nbmj8688_state,mbmj8688_pure_16bit)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(nbmj8688_state::mbmj_p16bit_LCD)
+}
+void nbmj8688_state::mbmj_p16bit_LCD(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 5000000) /* 5.00 MHz */
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nbmj8688_state, irq0_line_hold)
- MCFG_DEVICE_PROGRAM_MAP(secolove_map)
- MCFG_DEVICE_IO_MAP(secolove_io_map)
- MCFG_DEVICE_IO_MAP(p16bit_LCD_io_map)
+ Z80(config, m_maincpu, 5000000); /* 5.00 MHz */
+ m_maincpu->set_vblank_int("screen", FUNC(nbmj8688_state::irq0_line_hold));
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::p16bit_LCD_io_map);
NB1413M3(config, m_nb1413m3, 0);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -2629,13 +2627,13 @@ MACHINE_CONFIG_START(nbmj8688_state::mbmj_p16bit_LCD)
PALETTE(config, "palette", FUNC(nbmj8688_state::mbmj8688_16bit), 65536);
config.set_default_layout(layout_nbmj8688);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 16, 240-1)
- MCFG_SCREEN_UPDATE_DRIVER(nbmj8688_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 16, 240-1);
+ screen.set_screen_update(FUNC(nbmj8688_state::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette_lcd", FUNC(nbmj8688_state::mbmj8688_lcd), 2);
@@ -2677,7 +2675,7 @@ MACHINE_CONFIG_START(nbmj8688_state::mbmj_p16bit_LCD)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
void nbmj8688_state::bijokkoy(machine_config &config)
{
@@ -2735,16 +2733,16 @@ void nbmj8688_state::vipclub(machine_config &config)
m_nb1413m3->set_type(NB1413M3_VIPCLUB);
}
-MACHINE_CONFIG_START(nbmj8688_state::seiha)
+void nbmj8688_state::seiha(machine_config &config)
+{
NBMJDRV_65536(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(secolove_map)
- MCFG_DEVICE_IO_MAP(seiha_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::seiha_io_map);
m_nb1413m3->set_type(NB1413M3_SEIHA);
-MACHINE_CONFIG_END
+}
void nbmj8688_state::seiham(machine_config &config)
{
@@ -2753,39 +2751,39 @@ void nbmj8688_state::seiham(machine_config &config)
m_nb1413m3->set_type(NB1413M3_SEIHAM);
}
-MACHINE_CONFIG_START(nbmj8688_state::mjgaiden)
+void nbmj8688_state::mjgaiden(machine_config &config)
+{
NBMJDRV_4096(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ojousan_map)
- MCFG_DEVICE_IO_MAP(mjgaiden_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::ojousan_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::mjgaiden_io_map);
m_nb1413m3->set_type(NB1413M3_OJOUSAN);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8688_state::iemoto)
+void nbmj8688_state::iemoto(machine_config &config)
+{
NBMJDRV_65536(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(secolove_map)
- MCFG_DEVICE_IO_MAP(iemoto_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::iemoto_io_map);
m_nb1413m3->set_type(NB1413M3_IEMOTO);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8688_state::ojousan)
+void nbmj8688_state::ojousan(machine_config &config)
+{
NBMJDRV_65536(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ojousan_map)
- MCFG_DEVICE_IO_MAP(iemoto_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::ojousan_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::iemoto_io_map);
m_nb1413m3->set_type(NB1413M3_OJOUSAN);
-MACHINE_CONFIG_END
+}
void nbmj8688_state::ojousanm(machine_config &config)
{
@@ -2794,13 +2792,13 @@ void nbmj8688_state::ojousanm(machine_config &config)
m_nb1413m3->set_type(NB1413M3_OJOUSANM);
}
-MACHINE_CONFIG_START(nbmj8688_state::swinggal)
+void nbmj8688_state::swinggal(machine_config &config)
+{
ojousan(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(secolove_map)
- MCFG_DEVICE_IO_MAP(iemoto_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::iemoto_io_map);
+}
void nbmj8688_state::iemotom(machine_config &config)
{
@@ -2830,14 +2828,14 @@ void nbmj8688_state::korinaim(machine_config &config)
m_nb1413m3->set_type(NB1413M3_KORINAIM);
}
-MACHINE_CONFIG_START(nbmj8688_state::mbmj_p12bit)
+void nbmj8688_state::mbmj_p12bit(machine_config &config)
+{
NBMJDRV_4096(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mjsikaku_map)
- MCFG_DEVICE_IO_MAP(kaguya_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::mjsikaku_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::kaguya_io_map);
+}
void nbmj8688_state::kaguya(machine_config &config)
{
@@ -2874,41 +2872,40 @@ void nbmj8688_state::idhimitu(machine_config &config)
m_nb1413m3->set_type(NB1413M3_IDHIMITU);
}
-MACHINE_CONFIG_START(nbmj8688_state::mjsikaku)
+void nbmj8688_state::mjsikaku(machine_config &config)
+{
NBMJDRV_4096(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mjsikaku_map)
- MCFG_DEVICE_IO_MAP(mjsikaku_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::mjsikaku_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::mjsikaku_io_map);
m_nb1413m3->set_type(NB1413M3_MJSIKAKU);
/* sound hardware */
- MCFG_DEVICE_REPLACE("psg", YM3812, 20000000/8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
-MACHINE_CONFIG_END
+ YM3812(config.replace(), "psg", 20000000/8).add_route(ALL_OUTPUTS, "speaker", 0.7);
+}
-MACHINE_CONFIG_START(nbmj8688_state::mmsikaku)
+void nbmj8688_state::mmsikaku(machine_config &config)
+{
NBMJDRV_4096(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(secolove_map)
- MCFG_DEVICE_IO_MAP(mmsikaku_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8688_state::secolove_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::mmsikaku_io_map);
m_nb1413m3->set_type(NB1413M3_MMSIKAKU);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8688_state::otonano)
+void nbmj8688_state::otonano(machine_config &config)
+{
mjsikaku(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(otonano_io_map)
+ m_maincpu->set_addrmap(AS_IO, &nbmj8688_state::otonano_io_map);
m_nb1413m3->set_type(NB1413M3_OTONANO);
-MACHINE_CONFIG_END
+}
void nbmj8688_state::mjcamera(machine_config &config)
{
diff --git a/src/mame/drivers/nbmj8891.cpp b/src/mame/drivers/nbmj8891.cpp
index d35fe3c59ce..760357e048e 100644
--- a/src/mame/drivers/nbmj8891.cpp
+++ b/src/mame/drivers/nbmj8891.cpp
@@ -2189,26 +2189,26 @@ static INPUT_PORTS_START( taiwanmb )
INPUT_PORTS_END
-MACHINE_CONFIG_START(nbmj8891_state::gionbana)
-
+void nbmj8891_state::gionbana(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 20000000/4) /* 5.00 MHz ? */
- MCFG_DEVICE_PROGRAM_MAP(gionbana_map)
- MCFG_DEVICE_IO_MAP(gionbana_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nbmj8891_state, irq0_line_hold)
+ Z80(config, m_maincpu, 20000000/4); /* 5.00 MHz ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::gionbana_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::gionbana_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(nbmj8891_state::irq0_line_hold));
NB1413M3(config, m_nb1413m3, 0, NB1413M3_GIONBANA);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 8, 248-1)
- MCFG_SCREEN_UPDATE_DRIVER(nbmj8891_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(512, 256);
+ m_screen->set_visarea(0, 512-1, 8, 248-1);
+ m_screen->set_screen_update(FUNC(nbmj8891_state::screen_update));
+ m_screen->set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 256)
+ PALETTE(config, m_palette).set_entries(256);
/* sound hardware */
@@ -2220,28 +2220,28 @@ MACHINE_CONFIG_START(nbmj8891_state::gionbana)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::mgion)
+void nbmj8891_state::mgion(machine_config &config)
+{
gionbana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mgion_map)
- MCFG_DEVICE_IO_MAP(mgion_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::mgion_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::mgion_io_map);
m_nb1413m3->set_type(NB1413M3_MGION);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::omotesnd)
+void nbmj8891_state::omotesnd(machine_config &config)
+{
gionbana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(omotesnd_map)
- MCFG_DEVICE_IO_MAP(omotesnd_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::omotesnd_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::omotesnd_io_map);
m_nb1413m3->set_type(NB1413M3_OMOTESND);
@@ -2252,7 +2252,7 @@ MACHINE_CONFIG_START(nbmj8891_state::omotesnd)
fmsnd.port_a_read_callback().set_ioport("DSWA");
fmsnd.port_b_read_callback().set_ioport("DSWB");
fmsnd.add_route(ALL_OUTPUTS, "speaker", 0.35);
-MACHINE_CONFIG_END
+}
void nbmj8891_state::abunai(machine_config &config)
{
@@ -2262,76 +2262,74 @@ void nbmj8891_state::abunai(machine_config &config)
}
/* NBMJDRV2 */
-MACHINE_CONFIG_START(nbmj8891_state::mjcamerb)
+void nbmj8891_state::mjcamerb(machine_config &config)
+{
gionbana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(hanamomo_io_map)
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::hanamomo_io_map);
m_nb1413m3->set_type(NB1413M3_MJCAMERB);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 16, 240-1)
+ m_screen->set_visarea(0, 512-1, 16, 240-1);
MCFG_VIDEO_START_OVERRIDE(nbmj8891_state,_1layer)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::mmcamera)
+void nbmj8891_state::mmcamera(machine_config &config)
+{
gionbana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(hanamomo_io_map)
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::hanamomo_io_map);
m_nb1413m3->set_type(NB1413M3_MMCAMERA);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 16, 240-1)
+ m_screen->set_visarea(0, 512-1, 16, 240-1);
MCFG_VIDEO_START_OVERRIDE(nbmj8891_state,_1layer)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::hanamomo)
+void nbmj8891_state::hanamomo(machine_config &config)
+{
gionbana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hanamomo_map)
- MCFG_DEVICE_IO_MAP(hanamomo_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::hanamomo_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::hanamomo_io_map);
m_nb1413m3->set_type(NB1413M3_HANAMOMO);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 16, 240-1)
+ m_screen->set_visarea(0, 512-1, 16, 240-1);
MCFG_VIDEO_START_OVERRIDE(nbmj8891_state,_1layer)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::msjiken)
+void nbmj8891_state::msjiken(machine_config &config)
+{
hanamomo(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(gionbana_map)
- MCFG_DEVICE_IO_MAP(msjiken_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::gionbana_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::msjiken_io_map);
m_nb1413m3->set_type(NB1413M3_MSJIKEN);
-MACHINE_CONFIG_END
+}
/* NBMJDRV3 */
-MACHINE_CONFIG_START(nbmj8891_state::telmahjn)
+void nbmj8891_state::telmahjn(machine_config &config)
+{
gionbana(config);
m_nb1413m3->set_type(NB1413M3_TELMAHJN);
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(nbmj8891_state,_1layer)
-MACHINE_CONFIG_END
+}
void nbmj8891_state::mgmen89(machine_config &config)
{
@@ -2341,7 +2339,8 @@ void nbmj8891_state::mgmen89(machine_config &config)
}
/* NBMJDRV4 */
-MACHINE_CONFIG_START(nbmj8891_state::mjfocus)
+void nbmj8891_state::mjfocus(machine_config &config)
+{
gionbana(config);
/* basic machine hardware */
@@ -2350,7 +2349,7 @@ MACHINE_CONFIG_START(nbmj8891_state::mjfocus)
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(nbmj8891_state,_1layer)
-MACHINE_CONFIG_END
+}
void nbmj8891_state::pairsnb(machine_config &config)
{
@@ -2367,105 +2366,105 @@ void nbmj8891_state::pairsten(machine_config &config)
}
/* NBMJDRV5 */
-MACHINE_CONFIG_START(nbmj8891_state::mjnanpas)
+void nbmj8891_state::mjnanpas(machine_config &config)
+{
gionbana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(club90s_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::club90s_map);
m_nb1413m3->set_type(NB1413M3_MJNANPAS);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::maiko)
+void nbmj8891_state::maiko(machine_config &config)
+{
mjnanpas(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(maiko_map)
- MCFG_DEVICE_IO_MAP(maiko_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::maiko_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::maiko_io_map);
m_nb1413m3->set_type(NB1413M3_MAIKO);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::mmaiko)
+void nbmj8891_state::mmaiko(machine_config &config)
+{
maiko(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mmaiko_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::mmaiko_map);
m_nb1413m3->set_type(NB1413M3_MMAIKO);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::lovehous)
+void nbmj8891_state::lovehous(machine_config &config)
+{
mjnanpas(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(lovehous_map)
- MCFG_DEVICE_IO_MAP(lovehous_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::lovehous_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::lovehous_io_map);
m_nb1413m3->set_type(NB1413M3_LOVEHOUS);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::hanaoji)
+void nbmj8891_state::hanaoji(machine_config &config)
+{
maiko(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hanaoji_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::hanaoji_map);
m_nb1413m3->set_type(NB1413M3_HANAOJI);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::hnxmasev)
+void nbmj8891_state::hnxmasev(machine_config &config)
+{
maiko(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hnxmasev_map)
- MCFG_DEVICE_IO_MAP(maiko_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::hnxmasev_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::maiko_io_map);
+}
-MACHINE_CONFIG_START(nbmj8891_state::hnageman)
+void nbmj8891_state::hnageman(machine_config &config)
+{
maiko(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hnageman_map)
- MCFG_DEVICE_IO_MAP(maiko_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::hnageman_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::maiko_io_map);
+}
-MACHINE_CONFIG_START(nbmj8891_state::scandal)
+void nbmj8891_state::scandal(machine_config &config)
+{
hanamomo(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(scandalm_map)
- MCFG_DEVICE_IO_MAP(scandal_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::scandalm_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::scandal_io_map);
m_nb1413m3->set_type(NB1413M3_SCANDAL);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8891_state::bananadr)
+void nbmj8891_state::bananadr(machine_config &config)
+{
mjnanpas(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(scandalm_map)
- MCFG_DEVICE_IO_MAP(bananadr_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::scandalm_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::bananadr_io_map);
m_nb1413m3->set_type(NB1413M3_BANANADR);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
void nbmj8891_state::club90s(machine_config &config)
{
@@ -2489,21 +2488,20 @@ void nbmj8891_state::chinmoku(machine_config &config)
}
/* NBMJDRV6 */
-MACHINE_CONFIG_START(nbmj8891_state::mjfocusm)
+void nbmj8891_state::mjfocusm(machine_config &config)
+{
gionbana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(scandalm_map)
- MCFG_DEVICE_IO_MAP(scandalm_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::scandalm_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::scandalm_io_map);
m_nb1413m3->set_type(NB1413M3_MJFOCUSM);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 16, 240-1)
+ m_screen->set_visarea(0, 512-1, 16, 240-1);
MCFG_VIDEO_START_OVERRIDE(nbmj8891_state,_1layer)
/* sound hardware */
@@ -2511,7 +2509,7 @@ MACHINE_CONFIG_START(nbmj8891_state::mjfocusm)
fmsnd.port_a_read_callback().set_ioport("DSWA");
fmsnd.port_b_read_callback().set_ioport("DSWB");
fmsnd.add_route(ALL_OUTPUTS, "speaker", 0.7);
-MACHINE_CONFIG_END
+}
void nbmj8891_state::scandalm(machine_config &config)
{
@@ -2520,22 +2518,21 @@ void nbmj8891_state::scandalm(machine_config &config)
m_nb1413m3->set_type(NB1413M3_SCANDALM);
}
-MACHINE_CONFIG_START(nbmj8891_state::taiwanmb)
+void nbmj8891_state::taiwanmb(machine_config &config)
+{
gionbana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(taiwanmb_map)
- MCFG_DEVICE_IO_MAP(taiwanmb_io_map)
-// MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nbmj8891_state, irq0_line_hold)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8891_state::taiwanmb_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8891_state::taiwanmb_io_map);
+// m_maincpu->set_vblank_int("screen", FUNC(nbmj8891_state::irq0_line_hold));
m_nb1413m3->set_type(NB1413M3_TAIWANMB);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 16, 240-1)
+ m_screen->set_visarea(0, 512-1, 16, 240-1);
MCFG_VIDEO_START_OVERRIDE(nbmj8891_state,_1layer)
/* sound hardware */
@@ -2543,7 +2540,7 @@ MACHINE_CONFIG_START(nbmj8891_state::taiwanmb)
fmsnd.port_a_read_callback().set_ioport("DSWA");
fmsnd.port_b_read_callback().set_ioport("DSWB");
fmsnd.add_route(ALL_OUTPUTS, "speaker", 0.7);
-MACHINE_CONFIG_END
+}
ROM_START( gionbana )
diff --git a/src/mame/drivers/nbmj8900.cpp b/src/mame/drivers/nbmj8900.cpp
index d10337c88d8..6f6d794fc0f 100644
--- a/src/mame/drivers/nbmj8900.cpp
+++ b/src/mame/drivers/nbmj8900.cpp
@@ -304,49 +304,48 @@ INPUT_PORTS_END
-MACHINE_CONFIG_START(nbmj8900_state::ohpaipee)
-
+void nbmj8900_state::ohpaipee(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 20000000/4) /* 5.00 MHz ? */
- MCFG_DEVICE_PROGRAM_MAP(ohpaipee_map)
- MCFG_DEVICE_IO_MAP(ohpaipee_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nbmj8900_state, irq0_line_hold)
+ Z80(config, m_maincpu, 20000000/4); /* 5.00 MHz ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8900_state::ohpaipee_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8900_state::ohpaipee_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(nbmj8900_state::irq0_line_hold));
NB1413M3(config, m_nb1413m3, 0, NB1413M3_OHPAIPEE);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 8, 248-1)
- MCFG_SCREEN_UPDATE_DRIVER(nbmj8900_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(512, 256);
+ m_screen->set_visarea(0, 512-1, 8, 248-1);
+ m_screen->set_screen_update(FUNC(nbmj8900_state::screen_update));
+ m_screen->set_palette("palette");
- MCFG_PALETTE_ADD("palette", 256)
+ PALETTE(config, "palette").set_entries(256);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("ymsnd", YM3812, 2500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
+ YM3812(config, "ymsnd", 2500000).add_route(ALL_OUTPUTS, "speaker", 0.7);
DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.42); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8900_state::togenkyo)
+void nbmj8900_state::togenkyo(machine_config &config)
+{
ohpaipee(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(togenkyo_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8900_state::togenkyo_map);
m_nb1413m3->set_type(NB1413M3_TOGENKYO);
-MACHINE_CONFIG_END
+}
ROM_START( ohpaipee )
diff --git a/src/mame/drivers/nbmj8991.cpp b/src/mame/drivers/nbmj8991.cpp
index 9f31a173772..c42bd8cae89 100644
--- a/src/mame/drivers/nbmj8991.cpp
+++ b/src/mame/drivers/nbmj8991.cpp
@@ -1327,26 +1327,26 @@ static INPUT_PORTS_START( av2mj2rg )
INPUT_PORTS_END
-MACHINE_CONFIG_START(nbmj8991_state::nbmjdrv1) // galkoku
-
+void nbmj8991_state::nbmjdrv1(machine_config &config) // galkoku
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 25000000/5) /* 5.00 MHz ? */
- MCFG_DEVICE_PROGRAM_MAP(galkoku_map)
- MCFG_DEVICE_IO_MAP(galkoku_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nbmj8991_state, irq0_line_hold)
+ Z80(config, m_maincpu, 25000000/5); /* 5.00 MHz ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::galkoku_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8991_state::galkoku_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(nbmj8991_state::irq0_line_hold));
NB1413M3(config, m_nb1413m3, 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(1024, 512)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 240-1)
- MCFG_SCREEN_UPDATE_DRIVER(nbmj8991_state, screen_update_type1)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(1024, 512);
+ m_screen->set_visarea(0, 640-1, 0, 240-1);
+ m_screen->set_screen_update(FUNC(nbmj8991_state::screen_update_type1));
+ m_screen->set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 256)
+ PALETTE(config, m_palette).set_entries(256);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
@@ -1356,49 +1356,48 @@ MACHINE_CONFIG_START(nbmj8991_state::nbmjdrv1) // galkoku
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(nbmj8991_state::nbmjdrv2) // pstadium
+void nbmj8991_state::nbmjdrv2(machine_config &config) // pstadium
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 6000000/2) /* 3.00 MHz */
- MCFG_DEVICE_PROGRAM_MAP(pstadium_map)
- MCFG_DEVICE_IO_MAP(pstadium_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nbmj8991_state, irq0_line_hold)
+ Z80(config, m_maincpu, 6000000/2); /* 3.00 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::pstadium_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8991_state::pstadium_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(nbmj8991_state::irq0_line_hold));
NB1413M3(config, m_nb1413m3, 0);
- MCFG_DEVICE_ADD("audiocpu", Z80, 4000000) /* 4.00 MHz */
- MCFG_DEVICE_PROGRAM_MAP(nbmj8991_sound_map)
- MCFG_DEVICE_IO_MAP(nbmj8991_sound_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(nbmj8991_state, irq0_line_hold, 128*60) // ?
+ Z80(config, m_audiocpu, 4000000); /* 4.00 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::nbmj8991_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &nbmj8991_state::nbmj8991_sound_io_map);
+ m_audiocpu->set_periodic_int(FUNC(nbmj8991_state::irq0_line_hold), attotime::from_hz(128*60)); // ?
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(1024, 512)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 240-1)
- MCFG_SCREEN_UPDATE_DRIVER(nbmj8991_state, screen_update_type2)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(1024, 512);
+ m_screen->set_visarea(0, 640-1, 0, 240-1);
+ m_screen->set_screen_update(FUNC(nbmj8991_state::screen_update_type2));
+ m_screen->set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 256)
+ PALETTE(config, m_palette).set_entries(256);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("fmsnd", YM3812, 25000000/6.25)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.7)
+ YM3812(config, "fmsnd", 25000000/6.25).add_route(ALL_OUTPUTS, "speaker", 0.7);
DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC
DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
void nbmj8991_state::nbmjdrv3(machine_config &config)
@@ -1423,39 +1422,39 @@ void nbmj8991_state::galkoku(machine_config &config)
}
-MACHINE_CONFIG_START(nbmj8991_state::galkaika)
+void nbmj8991_state::galkaika(machine_config &config)
+{
nbmjdrv1(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(galkaika_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::galkaika_map);
m_nb1413m3->set_type(NB1413M3_GALKAIKA);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8991_state::tokyogal)
+void nbmj8991_state::tokyogal(machine_config &config)
+{
nbmjdrv1(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(tokyogal_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::tokyogal_map);
m_nb1413m3->set_type(NB1413M3_TOKYOGAL);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8991_state::tokimbsj)
+void nbmj8991_state::tokimbsj(machine_config &config)
+{
nbmjdrv1(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(galkaika_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::galkaika_map);
m_nb1413m3->set_type(NB1413M3_TOKIMBSJ);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
void nbmj8991_state::mcontest(machine_config &config)
@@ -1474,17 +1473,17 @@ void nbmj8991_state::uchuuai(machine_config &config)
}
-MACHINE_CONFIG_START(nbmj8991_state::hyouban)
+void nbmj8991_state::hyouban(machine_config &config)
+{
nbmjdrv3(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(hyouban_io_map)
+ m_maincpu->set_addrmap(AS_IO, &nbmj8991_state::hyouban_io_map);
m_nb1413m3->set_type(NB1413M3_HYOUBAN);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
void nbmj8991_state::pstadium(machine_config &config)
@@ -1495,26 +1494,26 @@ void nbmj8991_state::pstadium(machine_config &config)
}
-MACHINE_CONFIG_START(nbmj8991_state::triplew1)
+void nbmj8991_state::triplew1(machine_config &config)
+{
nbmjdrv2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(triplew1_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::triplew1_map);
m_nb1413m3->set_type(NB1413M3_TRIPLEW1);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8991_state::triplew2)
+void nbmj8991_state::triplew2(machine_config &config)
+{
nbmjdrv2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(triplew2_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::triplew2_map);
m_nb1413m3->set_type(NB1413M3_TRIPLEW2);
-MACHINE_CONFIG_END
+}
void nbmj8991_state::ntopstar(machine_config &config)
@@ -1525,15 +1524,15 @@ void nbmj8991_state::ntopstar(machine_config &config)
}
-MACHINE_CONFIG_START(nbmj8991_state::mjlstory)
+void nbmj8991_state::mjlstory(machine_config &config)
+{
nbmjdrv2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mjlstory_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::mjlstory_map);
m_nb1413m3->set_type(NB1413M3_MJLSTORY);
-MACHINE_CONFIG_END
+}
void nbmj8991_state::vanilla(machine_config &config)
@@ -1544,14 +1543,15 @@ void nbmj8991_state::vanilla(machine_config &config)
}
-MACHINE_CONFIG_START(nbmj8991_state::finalbny)
+void nbmj8991_state::finalbny(machine_config &config)
+{
nbmjdrv2(config);
/* basic machine hardware */
m_nb1413m3->set_type(NB1413M3_FINALBNY);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
void nbmj8991_state::qmhayaku(machine_config &config)
@@ -1562,41 +1562,41 @@ void nbmj8991_state::qmhayaku(machine_config &config)
}
-MACHINE_CONFIG_START(nbmj8991_state::mjgottub)
+void nbmj8991_state::mjgottub(machine_config &config)
+{
nbmjdrv2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(triplew1_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::triplew1_map);
m_nb1413m3->set_type(NB1413M3_MJGOTTUB);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8991_state::av2mj1bb)
+void nbmj8991_state::av2mj1bb(machine_config &config)
+{
nbmjdrv2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(av2mj1bb_map)
- MCFG_DEVICE_IO_MAP(av2mj1bb_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::av2mj1bb_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8991_state::av2mj1bb_io_map);
m_nb1413m3->set_type(NB1413M3_AV2MJ1BB);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nbmj8991_state::av2mj2rg)
+void nbmj8991_state::av2mj2rg(machine_config &config)
+{
nbmjdrv2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(av2mj2rg_map)
- MCFG_DEVICE_IO_MAP(av2mj1bb_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nbmj8991_state::av2mj2rg_map);
+ m_maincpu->set_addrmap(AS_IO, &nbmj8991_state::av2mj1bb_io_map);
m_nb1413m3->set_type(NB1413M3_AV2MJ2RG);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/nc.cpp b/src/mame/drivers/nc.cpp
index 128b0dc2ecb..a6be3546a7b 100644
--- a/src/mame/drivers/nc.cpp
+++ b/src/mame/drivers/nc.cpp
@@ -1378,24 +1378,22 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(nc_state::nc_base)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, /*6000000*/ 4606000) /* Russell Marks says this is more accurate */
- MCFG_DEVICE_PROGRAM_MAP(nc_map)
+ Z80(config, m_maincpu, /*6000000*/ 4606000); /* Russell Marks says this is more accurate */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nc_state::nc_map);
config.m_minimum_quantum = attotime::from_hz(60);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(nc_state::nc_colours), NC_NUM_COLOURS);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("beep.1", BEEP, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
- MCFG_DEVICE_ADD("beep.2", BEEP, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ BEEP(config, m_beeper1, 0).add_route(ALL_OUTPUTS, "mono", 0.50);
+ BEEP(config, m_beeper2, 0).add_route(ALL_OUTPUTS, "mono", 0.50);
/* printer */
CENTRONICS(config, m_centronics, centronics_devices, "printer");
@@ -1423,17 +1421,17 @@ MACHINE_CONFIG_START(nc_state::nc_base)
TIMER(config, "dummy_timer").configure_periodic(FUNC(nc_state::dummy_timer_callback), attotime::from_hz(50));
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(nc100_state::nc100)
+void nc100_state::nc100(machine_config &config)
+{
nc_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(nc100_io)
+ m_maincpu->set_addrmap(AS_IO, &nc100_state::nc100_io);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_SIZE(480, 64)
- MCFG_SCREEN_VISIBLE_AREA(0, 480-1, 0, 64-1)
- MCFG_SCREEN_UPDATE_DRIVER(nc100_state, screen_update_nc100)
+ screen_device &screen(*subdevice<screen_device>("screen"));
+ screen.set_size(480, 64);
+ screen.set_visarea(0, 480-1, 0, 64-1);
+ screen.set_screen_update(FUNC(nc100_state::screen_update_nc100));
/* printer */
m_centronics->ack_handler().set(FUNC(nc100_state::write_nc100_centronics_ack));
@@ -1445,7 +1443,7 @@ MACHINE_CONFIG_START(nc100_state::nc100)
/* rtc */
tc8521_device &rtc(TC8521(config, "rtc", XTAL(32'768)));
rtc.out_alarm_callback().set(FUNC(nc100_state::nc100_tc8521_alarm_callback));
-MACHINE_CONFIG_END
+}
static const floppy_format_type ibmpc_floppy_formats[] = {
FLOPPY_PC_FORMAT,
@@ -1458,17 +1456,17 @@ static void ibmpc_floppies(device_slot_interface &device)
device.option_add("525dd", FLOPPY_525_DD);
}
-MACHINE_CONFIG_START(nc200_state::nc200)
+void nc200_state::nc200(machine_config &config)
+{
nc_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(nc200_io)
+ m_maincpu->set_addrmap(AS_IO, &nc200_state::nc200_io);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_SIZE(NC200_SCREEN_WIDTH, NC200_SCREEN_HEIGHT)
- MCFG_SCREEN_VISIBLE_AREA(0, NC200_SCREEN_WIDTH-1, 0, NC200_SCREEN_HEIGHT-1)
- MCFG_SCREEN_UPDATE_DRIVER(nc200_state, screen_update_nc200)
+ screen_device &screen(*subdevice<screen_device>("screen"));
+ screen.set_size(NC200_SCREEN_WIDTH, NC200_SCREEN_HEIGHT);
+ screen.set_visarea(0, NC200_SCREEN_WIDTH-1, 0, NC200_SCREEN_HEIGHT-1);
+ screen.set_screen_update(FUNC(nc200_state::screen_update_nc200));
palette_device &palette(*subdevice<palette_device>("palette"));
palette.set_entries(NC200_NUM_COLOURS);
@@ -1490,7 +1488,7 @@ MACHINE_CONFIG_START(nc200_state::nc200)
/* internal ram */
m_ram->set_default_size("128K");
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/neptunp2.cpp b/src/mame/drivers/neptunp2.cpp
index 1d21db02f06..3e2bc25b33d 100644
--- a/src/mame/drivers/neptunp2.cpp
+++ b/src/mame/drivers/neptunp2.cpp
@@ -99,30 +99,29 @@ static GFXDECODE_START( gfx_neptunp2 )
// GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 8 )
GFXDECODE_END
-MACHINE_CONFIG_START(neptunp2_state::neptunp2)
-
+void neptunp2_state::neptunp2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I80188,20000000) // N80C188-20 AMD
- MCFG_DEVICE_PROGRAM_MAP(neptunp2_map)
- MCFG_DEVICE_IO_MAP(neptunp2_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", neptunp2_state, irq0_line_hold)
+ I80188(config, m_maincpu, 20000000); // N80C188-20 AMD
+ m_maincpu->set_addrmap(AS_PROGRAM, &neptunp2_state::neptunp2_map);
+ m_maincpu->set_addrmap(AS_IO, &neptunp2_state::neptunp2_io);
+ m_maincpu->set_vblank_int("screen", FUNC(neptunp2_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_UPDATE_DRIVER(neptunp2_state, screen_update)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_screen_update(FUNC(neptunp2_state::screen_update));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_neptunp2);
- MCFG_PALETTE_ADD("palette", 512)
+ PALETTE(config, "palette").set_entries(512);
/* sound hardware */
SPEAKER(config, "mono").front_center();
-
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/nes_vt.cpp b/src/mame/drivers/nes_vt.cpp
index cce1fb30c9f..9f5ef1b4f27 100644
--- a/src/mame/drivers/nes_vt.cpp
+++ b/src/mame/drivers/nes_vt.cpp
@@ -1506,14 +1506,14 @@ static INPUT_PORTS_START( nes_vt_fp )
PORT_DIPNAME( 0x06, 0x00, "Cartridge Select" ) PORT_CODE(KEYCODE_3) PORT_TOGGLE
PORT_DIPSETTING( 0x00, "472-in-1" )
PORT_DIPSETTING( 0x06, "128-in-1" )
-MACHINE_CONFIG_END
+INPUT_PORTS_END
static INPUT_PORTS_START( nes_vt_fa )
PORT_START("CARTSEL")
PORT_DIPNAME( 0x01, 0x00, "Cartridge Select" ) PORT_CODE(KEYCODE_3) PORT_TOGGLE
PORT_DIPSETTING( 0x00, "508-in-1" )
PORT_DIPSETTING( 0x01, "130-in-1" )
-MACHINE_CONFIG_END
+INPUT_PORTS_END
ROM_START( vdogdeme )
diff --git a/src/mame/drivers/newbrain.cpp b/src/mame/drivers/newbrain.cpp
index 86facbb1a04..f8ae3adb39d 100644
--- a/src/mame/drivers/newbrain.cpp
+++ b/src/mame/drivers/newbrain.cpp
@@ -806,7 +806,7 @@ void newbrain_state::device_timer(emu_timer &timer, device_timer_id id, int para
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( newbrain )
+// machine_config( newbrain )
//-------------------------------------------------
void newbrain_state::newbrain(machine_config &config)
@@ -847,7 +847,7 @@ void newbrain_state::newbrain(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( newbrain_ad )
+// machine_config( newbrain_ad )
//-------------------------------------------------
void newbrain_state::newbrain_ad(machine_config &config)
@@ -858,7 +858,7 @@ void newbrain_state::newbrain_ad(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( newbrain_a )
+// machine_config( newbrain_a )
//-------------------------------------------------
void newbrain_state::newbrain_a(machine_config &config)
@@ -869,7 +869,7 @@ void newbrain_state::newbrain_a(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( newbrain_md )
+// machine_config( newbrain_md )
//-------------------------------------------------
void newbrain_state::newbrain_md(machine_config &config)
diff --git a/src/mame/drivers/news.cpp b/src/mame/drivers/news.cpp
index f3314c0a476..28029890885 100644
--- a/src/mame/drivers/news.cpp
+++ b/src/mame/drivers/news.cpp
@@ -130,22 +130,22 @@ void news_state::machine_reset()
m_bgpic = 0;
}
-MACHINE_CONFIG_START(news_state::news)
-
+void news_state::news(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,8000000) /* ? MHz */
- MCFG_DEVICE_PROGRAM_MAP(news_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", news_state, irq0_line_hold)
+ Z80(config, m_maincpu, 8000000); /* ? MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &news_state::news_map);
+ m_maincpu->set_vblank_int("screen", FUNC(news_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-16-1)
- MCFG_SCREEN_UPDATE_DRIVER(news_state, screen_update_news)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 256-1, 16, 256-16-1);
+ screen.set_screen_update(FUNC(news_state::screen_update_news));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_news);
PALETTE(config, "palette").set_format(palette_device::xRGB_444, 0x100).set_endianness(ENDIANNESS_BIG);
@@ -153,9 +153,8 @@ MACHINE_CONFIG_START(news_state::news)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified
+}
diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp
index e788878ddc2..c7fe7db08a9 100644
--- a/src/mame/drivers/next.cpp
+++ b/src/mame/drivers/next.cpp
@@ -1002,16 +1002,16 @@ void next_state::ncr5390(device_t *device)
adapter.drq_handler_cb().set(*this, FUNC(next_state::scsi_drq));
}
-MACHINE_CONFIG_START(next_state::next_base)
-
+void next_state::next_base(machine_config &config)
+{
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(next_state, screen_update)
- MCFG_SCREEN_SIZE(1120, 900)
- MCFG_SCREEN_VISIBLE_AREA(0, 1120-1, 0, 832-1)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, next_state, vblank_w))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(FUNC(next_state::screen_update));
+ screen.set_size(1120, 900);
+ screen.set_visarea(0, 1120-1, 0, 832-1);
+ screen.screen_vblank().set(FUNC(next_state::vblank_w));
// devices
NSCSI_BUS(config, "scsibus");
@@ -1044,13 +1044,14 @@ MACHINE_CONFIG_START(next_state::next_base)
NEXTMO(config, mo, 0);
mo->irq_wr_callback().set(FUNC(next_state::mo_irq));
mo->drq_wr_callback().set(FUNC(next_state::mo_drq));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(next_state::next)
+void next_state::next(machine_config &config)
+{
next_base(config);
- MCFG_DEVICE_ADD("maincpu", M68030, XTAL(25'000'000))
- MCFG_DEVICE_PROGRAM_MAP(next_0b_m_nofdc_mem)
-MACHINE_CONFIG_END
+ M68030(config, maincpu, XTAL(25'000'000));
+ maincpu->set_addrmap(AS_PROGRAM, &next_state::next_0b_m_nofdc_mem);
+}
void next_state::next_fdc_base(machine_config &config)
{
@@ -1064,51 +1065,56 @@ void next_state::next_fdc_base(machine_config &config)
SOFTWARE_LIST(config, "flop_list").set_original("next");
}
-MACHINE_CONFIG_START(next_state::nexts)
+void next_state::nexts(machine_config &config)
+{
next_fdc_base(config);
- MCFG_DEVICE_ADD("maincpu", M68040, XTAL(25'000'000))
- MCFG_DEVICE_PROGRAM_MAP(next_0b_m_mem)
-MACHINE_CONFIG_END
+ M68040(config, maincpu, XTAL(25'000'000));
+ maincpu->set_addrmap(AS_PROGRAM, &next_state::next_0b_m_mem);
+}
-MACHINE_CONFIG_START(next_state::nexts2)
+void next_state::nexts2(machine_config &config)
+{
next_fdc_base(config);
- MCFG_DEVICE_ADD("maincpu", M68040, XTAL(25'000'000))
- MCFG_DEVICE_PROGRAM_MAP(next_0b_m_mem)
-MACHINE_CONFIG_END
+ M68040(config, maincpu, XTAL(25'000'000));
+ maincpu->set_addrmap(AS_PROGRAM, &next_state::next_0b_m_mem);
+}
-MACHINE_CONFIG_START(next_state::nextsc)
+void next_state::nextsc(machine_config &config)
+{
next_fdc_base(config);
- MCFG_DEVICE_ADD("maincpu", M68040, XTAL(25'000'000))
- MCFG_DEVICE_PROGRAM_MAP(next_2c_c_mem)
-MACHINE_CONFIG_END
+ M68040(config, maincpu, XTAL(25'000'000));
+ maincpu->set_addrmap(AS_PROGRAM, &next_state::next_2c_c_mem);
+}
-MACHINE_CONFIG_START(next_state::nextst)
+void next_state::nextst(machine_config &config)
+{
next_fdc_base(config);
- MCFG_DEVICE_ADD("maincpu", M68040, XTAL(33'000'000))
- MCFG_DEVICE_PROGRAM_MAP(next_0b_m_mem)
-MACHINE_CONFIG_END
+ M68040(config, maincpu, XTAL(33'000'000));
+ maincpu->set_addrmap(AS_PROGRAM, &next_state::next_0b_m_mem);
+}
-MACHINE_CONFIG_START(next_state::nextstc)
+void next_state::nextstc(machine_config &config)
+{
next_fdc_base(config);
- MCFG_DEVICE_ADD("maincpu", M68040, XTAL(33'000'000))
- MCFG_DEVICE_PROGRAM_MAP(next_0c_c_mem)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 832-1, 0, 624-1)
-MACHINE_CONFIG_END
+ M68040(config, maincpu, XTAL(33'000'000));
+ maincpu->set_addrmap(AS_PROGRAM, &next_state::next_0c_c_mem);
+ subdevice<screen_device>("screen")->set_visarea(0, 832-1, 0, 624-1);
+}
-MACHINE_CONFIG_START(next_state::nextct)
+void next_state::nextct(machine_config &config)
+{
next_fdc_base(config);
- MCFG_DEVICE_ADD("maincpu", M68040, XTAL(33'000'000))
- MCFG_DEVICE_PROGRAM_MAP(next_0c_m_mem)
-MACHINE_CONFIG_END
+ M68040(config, maincpu, XTAL(33'000'000));
+ maincpu->set_addrmap(AS_PROGRAM, &next_state::next_0c_m_mem);
+}
-MACHINE_CONFIG_START(next_state::nextctc)
+void next_state::nextctc(machine_config &config)
+{
next_fdc_base(config);
- MCFG_DEVICE_ADD("maincpu", M68040, XTAL(33'000'000))
- MCFG_DEVICE_PROGRAM_MAP(next_0c_c_mem)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 832-1, 0, 624-1)
-MACHINE_CONFIG_END
+ M68040(config, maincpu, XTAL(33'000'000));
+ maincpu->set_addrmap(AS_PROGRAM, &next_state::next_0c_c_mem);
+ subdevice<screen_device>("screen")->set_visarea(0, 832-1, 0, 624-1);
+}
/* ROM definition */
#define ROM_NEXT_V1 \
diff --git a/src/mame/drivers/nexus3d.cpp b/src/mame/drivers/nexus3d.cpp
index d8b1622050f..14d04558fd8 100644
--- a/src/mame/drivers/nexus3d.cpp
+++ b/src/mame/drivers/nexus3d.cpp
@@ -122,24 +122,23 @@ void nexus3d_state::machine_reset()
{
}
-MACHINE_CONFIG_START(nexus3d_state::nexus3d)
-
+void nexus3d_state::nexus3d(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", ARM920T, 200000000)
- MCFG_DEVICE_PROGRAM_MAP(nexus3d_map)
+ ARM920T(config, m_maincpu, 200000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nexus3d_state::nexus3d_map);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(320, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(nexus3d_state, screen_update_nexus3d)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(320, 256);
+ screen.set_visarea(0, 320-1, 0, 256-1);
+ screen.set_screen_update(FUNC(nexus3d_state::screen_update_nexus3d));
- MCFG_PALETTE_ADD("palette", 256)
+ PALETTE(config, "palette").set_entries(256);
SERFLASH(config, m_serflash, 0);
-
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/ngp.cpp b/src/mame/drivers/ngp.cpp
index 24d9e20bcd7..4ed19840969 100644
--- a/src/mame/drivers/ngp.cpp
+++ b/src/mame/drivers/ngp.cpp
@@ -860,12 +860,11 @@ void ngp_state::ngp_common(machine_config &config)
MACHINE_CONFIG_START(ngp_state::ngp)
ngp_common(config);
- K1GE(config , m_k1ge, 6.144_MHz_XTAL, "screen");
+ K1GE(config, m_k1ge, 6.144_MHz_XTAL, "screen");
m_k1ge->vblank_callback().set(FUNC(ngp_state::ngp_vblank_pin_w));
m_k1ge->hblank_callback().set(FUNC(ngp_state::ngp_hblank_pin_w));
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_PALETTE("k1ge:palette")
+ subdevice<screen_device>("screen")->set_palette("k1ge:palette");
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ngp_cart")
MCFG_GENERIC_EXTENSIONS("bin,ngp,npc,ngc")
@@ -880,12 +879,11 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(ngp_state::ngpc)
ngp_common(config);
- K2GE(config , m_k1ge, 6.144_MHz_XTAL, "screen");
+ K2GE(config, m_k1ge, 6.144_MHz_XTAL, "screen");
m_k1ge->vblank_callback().set(FUNC(ngp_state::ngp_vblank_pin_w));
m_k1ge->hblank_callback().set(FUNC(ngp_state::ngp_hblank_pin_w));
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_PALETTE("k1ge:palette")
+ subdevice<screen_device>("screen")->set_palette("k1ge:palette");
MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ngp_cart")
MCFG_GENERIC_EXTENSIONS("bin,ngp,npc,ngc")
diff --git a/src/mame/drivers/nibble.cpp b/src/mame/drivers/nibble.cpp
index 76710cc0714..c510a5daeb5 100644
--- a/src/mame/drivers/nibble.cpp
+++ b/src/mame/drivers/nibble.cpp
@@ -333,20 +333,20 @@ GFXDECODE_END
* Machine Drivers *
*************************/
-MACHINE_CONFIG_START(nibble_state::nibble)
-
+void nibble_state::nibble(machine_config &config)
+{
UPD7811(config, m_maincpu, MASTER_CLOCK / 3); // type guessed; clock not verified
m_maincpu->set_addrmap(AS_PROGRAM, &nibble_state::nibble_map);
//m_maincpu->set_vblank_int("screen", FUNC(nibble_state::nibble_interrupt));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nibble_state, screen_update_nibble)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(nibble_state::screen_update_nibble));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_nibble);
@@ -367,7 +367,7 @@ MACHINE_CONFIG_START(nibble_state::nibble)
SPEAKER(config, "mono").front_center();
AY8910(config, "aysnd", MASTER_CLOCK/8).add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
/*************************
diff --git a/src/mame/drivers/nichild.cpp b/src/mame/drivers/nichild.cpp
index a2873212d43..7f150a625a7 100644
--- a/src/mame/drivers/nichild.cpp
+++ b/src/mame/drivers/nichild.cpp
@@ -230,8 +230,8 @@ INTERRUPT_GEN_MEMBER(nichild_state::vdp_irq)
}
-MACHINE_CONFIG_START(nichild_state::nichild)
-
+void nichild_state::nichild(machine_config &config)
+{
/* basic machine hardware */
TMPZ84C011(config, m_maincpu, MAIN_CLOCK/4);
//m_maincpu->set_daisy_config(daisy_chain_main);
@@ -256,7 +256,7 @@ MACHINE_CONFIG_START(nichild_state::nichild)
/* sound hardware */
SPEAKER(config, "mono").front_center();
// YM3812(config, "fmsnd", SOUND_CLOCK).add_route(ALL_OUTPUTS, "speaker", 0.7);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/nightgal.cpp b/src/mame/drivers/nightgal.cpp
index 6db16327463..67d47158bcc 100644
--- a/src/mame/drivers/nightgal.cpp
+++ b/src/mame/drivers/nightgal.cpp
@@ -788,26 +788,26 @@ void nightgal_state::machine_reset()
memset(m_blit_raw_data, 0, ARRAY_LENGTH(m_blit_raw_data));
}
-MACHINE_CONFIG_START(nightgal_state::royalqn)
-
+void nightgal_state::royalqn(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,MASTER_CLOCK / 8) /* ? MHz */
- MCFG_DEVICE_PROGRAM_MAP(royalqn_map)
- MCFG_DEVICE_IO_MAP(royalqn_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nightgal_state, irq0_line_hold)
+ Z80(config, m_maincpu, MASTER_CLOCK / 8); /* ? MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nightgal_state::royalqn_map);
+ m_maincpu->set_addrmap(AS_IO, &nightgal_state::royalqn_io);
+ m_maincpu->set_vblank_int("screen", FUNC(nightgal_state::irq0_line_hold));
- MCFG_DEVICE_ADD("sub", NSC8105, MASTER_CLOCK / 8)
- MCFG_DEVICE_PROGRAM_MAP(royalqn_nsc_map)
+ NSC8105(config, m_subcpu, MASTER_CLOCK / 8);
+ m_subcpu->set_addrmap(AS_PROGRAM, &nightgal_state::royalqn_nsc_map);
config.m_perfect_cpu_quantum = subtag("maincpu");
JANGOU_BLITTER(config, m_blitter, MASTER_CLOCK/4);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4,320,0,256,264,16,240)
- MCFG_SCREEN_UPDATE_DRIVER(nightgal_state, screen_update_nightgal)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(MASTER_CLOCK/4,320,0,256,264,16,240);
+ screen.set_screen_update(FUNC(nightgal_state::screen_update_nightgal));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette, FUNC(nightgal_state::nightgal_palette), 0x20);
@@ -818,22 +818,21 @@ MACHINE_CONFIG_START(nightgal_state::royalqn)
aysnd.port_a_read_callback().set(FUNC(nightgal_state::input_1p_r));
aysnd.port_b_read_callback().set(FUNC(nightgal_state::input_2p_r));
aysnd.add_route(ALL_OUTPUTS, "mono", 0.40);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nightgal_state::sexygal)
+void nightgal_state::sexygal(machine_config &config)
+{
royalqn(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(sexygal_map)
- MCFG_DEVICE_IO_MAP(sexygal_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nightgal_state::sexygal_map);
+ m_maincpu->set_addrmap(AS_IO, &nightgal_state::sexygal_io);
- MCFG_DEVICE_MODIFY("sub")
- MCFG_DEVICE_PROGRAM_MAP(sexygal_nsc_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nightgal_state, irq0_line_hold)
+ m_subcpu->set_addrmap(AS_PROGRAM, &nightgal_state::sexygal_nsc_map);
+ m_subcpu->set_vblank_int("screen", FUNC(nightgal_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", NSC8105, MASTER_CLOCK / 8)
- MCFG_DEVICE_PROGRAM_MAP(sexygal_audio_map)
+ NSC8105(config, m_audiocpu, MASTER_CLOCK / 8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nightgal_state::sexygal_audio_map);
clock_device &sampleclk(CLOCK(config, "sampleclk", 6000)); // quite a wild guess
sampleclk.signal_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI);
@@ -849,37 +848,35 @@ MACHINE_CONFIG_START(nightgal_state::sexygal)
ymsnd.port_a_read_callback().set(FUNC(nightgal_state::input_1p_r));
ymsnd.port_b_read_callback().set(FUNC(nightgal_state::input_2p_r));
ymsnd.add_route(ALL_OUTPUTS, "mono", 0.40);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nightgal_state::sweetgal)
+void nightgal_state::sweetgal(machine_config &config)
+{
sexygal(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(sweetgal_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &nightgal_state::sweetgal_map);
// doesn't have the extra NSC8105 (so how does this play samples?)
config.device_remove("audiocpu");
config.device_remove("sampleclk");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(nightgal_state::ngalsumr)
+void nightgal_state::ngalsumr(machine_config &config)
+{
royalqn(config);
- MCFG_DEVICE_MODIFY("maincpu")
// TODO: happens from protection device
- MCFG_DEVICE_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 60)
-
-MACHINE_CONFIG_END
+ m_maincpu->set_periodic_int(FUNC(nightgal_state::nmi_line_pulse), attotime::from_hz(60));
+}
-MACHINE_CONFIG_START(nightgal_state::sgaltrop)
+void nightgal_state::sgaltrop(machine_config &config)
+{
sexygal(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(sgaltrop_io)
+ m_maincpu->set_addrmap(AS_IO, &nightgal_state::sgaltrop_io);
- MCFG_DEVICE_MODIFY("sub")
- MCFG_DEVICE_PROGRAM_MAP(sgaltrop_nsc_map)
+ m_subcpu->set_addrmap(AS_PROGRAM, &nightgal_state::sgaltrop_nsc_map);
config.device_remove("audiocpu");
config.device_remove("sampleclk");
-MACHINE_CONFIG_END
+}
/*
Night Gal
diff --git a/src/mame/drivers/nitedrvr.cpp b/src/mame/drivers/nitedrvr.cpp
index a608fa0b020..8cb9572a515 100644
--- a/src/mame/drivers/nitedrvr.cpp
+++ b/src/mame/drivers/nitedrvr.cpp
@@ -140,23 +140,23 @@ GFXDECODE_END
/* Machine Driver */
-MACHINE_CONFIG_START(nitedrvr_state::nitedrvr)
-
+void nitedrvr_state::nitedrvr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 12.096_MHz_XTAL / 12) // 1 MHz
- MCFG_DEVICE_PROGRAM_MAP(nitedrvr_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", nitedrvr_state, irq0_line_hold)
+ M6502(config, m_maincpu, 12.096_MHz_XTAL / 12); // 1 MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &nitedrvr_state::nitedrvr_map);
+ m_maincpu->set_vblank_int("screen", FUNC(nitedrvr_state::irq0_line_hold));
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 3);
TIMER(config, "crash_timer").configure_periodic(FUNC(nitedrvr_state::nitedrvr_crash_toggle_callback), PERIOD_OF_555_ASTABLE(RES_K(180), 330, CAP_U(1)));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(12.096_MHz_XTAL / 2, 384, 0, 256, 278, 0, 256) // ~57 Hz
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(12.096_MHz_XTAL / 2, 384, 0, 256, 278, 0, 256); // ~57 Hz
// PROM derives VRESET, VBLANK, VSYNC, IRQ from vertical scan count and last VBLANK
- MCFG_SCREEN_UPDATE_DRIVER(nitedrvr_state, screen_update_nitedrvr)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen.set_screen_update(FUNC(nitedrvr_state::screen_update_nitedrvr));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_nitedrvr);
@@ -165,9 +165,8 @@ MACHINE_CONFIG_START(nitedrvr_state::nitedrvr)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, nitedrvr_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ DISCRETE(config, m_discrete, nitedrvr_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
/* ROMs */
diff --git a/src/mame/drivers/niyanpai.cpp b/src/mame/drivers/niyanpai.cpp
index 74ea1878ff3..47a75a37d65 100644
--- a/src/mame/drivers/niyanpai.cpp
+++ b/src/mame/drivers/niyanpai.cpp
@@ -691,12 +691,12 @@ WRITE_LINE_MEMBER(niyanpai_state::vblank_irq)
}
-MACHINE_CONFIG_START(niyanpai_state::niyanpai)
-
+void niyanpai_state::niyanpai(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, M68000, 12288000/2) /* TMP68301, 6.144 MHz */
- MCFG_DEVICE_PROGRAM_MAP(niyanpai_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback)
+ M68000(config, m_maincpu, 12288000/2); /* TMP68301, 6.144 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &niyanpai_state::niyanpai_map);
+ m_maincpu->set_irq_acknowledge_callback("tmp68301", FUNC(tmp68301_device::irq_callback));
TMP68301(config, m_tmp68301, 0);
m_tmp68301->set_cputag(m_maincpu);
@@ -705,46 +705,46 @@ MACHINE_CONFIG_START(niyanpai_state::niyanpai)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(1024, 512)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 240-1)
- MCFG_SCREEN_UPDATE_DRIVER(niyanpai_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, niyanpai_state, vblank_irq))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(1024, 512);
+ m_screen->set_visarea(0, 640-1, 0, 240-1);
+ m_screen->set_screen_update(FUNC(niyanpai_state::screen_update));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set(FUNC(niyanpai_state::vblank_irq));
- MCFG_PALETTE_ADD("palette", 256*3)
+ PALETTE(config, m_palette).set_entries(256*3);
/* sound hardware */
NICHISND(config, "nichisnd", 0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(niyanpai_state::musobana)
+void niyanpai_state::musobana(machine_config &config)
+{
niyanpai(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(musobana_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &niyanpai_state::musobana_map);
MCFG_MACHINE_START_OVERRIDE(niyanpai_state, musobana)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(niyanpai_state::mhhonban)
+void niyanpai_state::mhhonban(machine_config &config)
+{
musobana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mhhonban_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &niyanpai_state::mhhonban_map);
+}
-MACHINE_CONFIG_START(niyanpai_state::zokumahj)
+void niyanpai_state::zokumahj(machine_config &config)
+{
musobana(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(zokumahj_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &niyanpai_state::zokumahj_map);
+}
ROM_START( niyanpai )
diff --git a/src/mame/drivers/nmkmedal.cpp b/src/mame/drivers/nmkmedal.cpp
index ec7e3d196bd..91fea27838e 100644
--- a/src/mame/drivers/nmkmedal.cpp
+++ b/src/mame/drivers/nmkmedal.cpp
@@ -55,14 +55,14 @@ void nmkmedal_state::mem_map(address_map &map)
static INPUT_PORTS_START( trocana )
INPUT_PORTS_END
-MACHINE_CONFIG_START(nmkmedal_state::trocana)
- MCFG_DEVICE_ADD("maincpu", TMP90841, 16500000 / 2) // actually TMP90C041AN
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
+void nmkmedal_state::trocana(machine_config &config)
+{
+ TMP90841(config, m_maincpu, 16500000 / 2); // actually TMP90C041AN
+ m_maincpu->set_addrmap(AS_PROGRAM, &nmkmedal_state::mem_map);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6376, 16500000 / 16) // actually MSM6650
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6376(config, "oki", 16500000 / 16).add_route(ALL_OUTPUTS, "mono", 1.0); // actually MSM6650
+}
ROM_START( trocana)
ROM_REGION(0x10000, "maincpu", 0)
diff --git a/src/mame/drivers/notechan.cpp b/src/mame/drivers/notechan.cpp
index cc6f1cd901d..e70841aa0d0 100644
--- a/src/mame/drivers/notechan.cpp
+++ b/src/mame/drivers/notechan.cpp
@@ -505,21 +505,21 @@ INPUT_PORTS_END
* Machine Config *
*********************************************/
-MACHINE_CONFIG_START(notechan_state::notechan)
+void notechan_state::notechan(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK) // unknown...
- MCFG_DEVICE_PROGRAM_MAP(notechan_map)
- MCFG_DEVICE_IO_MAP(notechan_port_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(driver_device, irq0_line_hold, 60)
+ Z80(config, m_maincpu, CPU_CLOCK); // unknown...
+ m_maincpu->set_addrmap(AS_PROGRAM, &notechan_state::notechan_map);
+ m_maincpu->set_addrmap(AS_IO, &notechan_state::notechan_port_map);
+ m_maincpu->set_periodic_int(FUNC(driver_device::irq0_line_hold), attotime::from_hz(60));
/* NO VIDEO */
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, SND_CLOCK, okim6295_device::PIN7_HIGH) // match the real sounds
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, SND_CLOCK, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "speaker", 1.0); // match the real sounds
+}
/*********************************************
diff --git a/src/mame/drivers/nsmpoker.cpp b/src/mame/drivers/nsmpoker.cpp
index 3245fade5a9..bfa658193d3 100644
--- a/src/mame/drivers/nsmpoker.cpp
+++ b/src/mame/drivers/nsmpoker.cpp
@@ -419,8 +419,8 @@ void nsmpoker_state::machine_reset()
* Machine Drivers *
*************************/
-MACHINE_CONFIG_START(nsmpoker_state::nsmpoker)
-
+void nsmpoker_state::nsmpoker(machine_config &config)
+{
// CPU TMS9995, standard variant; no line connections
TMS9995(config, m_maincpu, MASTER_CLOCK/2);
m_maincpu->set_addrmap(AS_PROGRAM, &nsmpoker_state::nsmpoker_map);
@@ -428,18 +428,17 @@ MACHINE_CONFIG_START(nsmpoker_state::nsmpoker)
m_maincpu->set_vblank_int("screen", FUNC(nsmpoker_state::nsmpoker_interrupt));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(nsmpoker_state, screen_update_nsmpoker)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(nsmpoker_state::screen_update_nsmpoker));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_nsmpoker);
PALETTE(config, "palette", FUNC(nsmpoker_state::nsmpoker_palette), 16);
-
-MACHINE_CONFIG_END
+}
/*************************
diff --git a/src/mame/drivers/nss.cpp b/src/mame/drivers/nss.cpp
index 812df518289..0586a8d61a8 100644
--- a/src/mame/drivers/nss.cpp
+++ b/src/mame/drivers/nss.cpp
@@ -832,22 +832,22 @@ void nss_state::machine_reset()
m_joy_flag = 1;
}
-MACHINE_CONFIG_START(nss_state::nss)
-
+void nss_state::nss(machine_config &config)
+{
/* base snes hardware */
- MCFG_DEVICE_ADD("maincpu", _5A22, MCLK_NTSC) /* 2.68Mhz, also 3.58Mhz */
- MCFG_DEVICE_PROGRAM_MAP(snes_map)
+ _5A22(config, m_maincpu, MCLK_NTSC); /* 2.68Mhz, also 3.58Mhz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nss_state::snes_map);
// runs at 24.576 MHz / 12 = 2.048 MHz
- MCFG_DEVICE_ADD("soundcpu", SPC700, XTAL(24'576'000) / 12)
- MCFG_DEVICE_PROGRAM_MAP(spc_mem)
+ SPC700(config, m_soundcpu, XTAL(24'576'000) / 12);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &nss_state::spc_mem);
config.m_perfect_cpu_quantum = subtag("maincpu");
/* nss hardware */
- MCFG_DEVICE_ADD("bios", Z80, 4000000)
- MCFG_DEVICE_PROGRAM_MAP(bios_map)
- MCFG_DEVICE_IO_MAP(bios_io_map)
+ Z80(config, m_bioscpu, 4000000);
+ m_bioscpu->set_addrmap(AS_PROGRAM, &nss_state::bios_map);
+ m_bioscpu->set_addrmap(AS_IO, &nss_state::bios_io_map);
M50458(config, m_m50458, 4000000, "osd"); /* TODO: correct clock */
S3520CF(config, m_s3520cf); /* RTC */
@@ -857,32 +857,32 @@ MACHINE_CONFIG_START(nss_state::nss)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("spc700", SNES_SOUND)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
+ SNES_SOUND(config, m_spc700);
+ m_spc700->add_route(0, "lspeaker", 1.00);
+ m_spc700->add_route(1, "rspeaker", 1.00);
/* video hardware */
/* TODO: the screen should actually superimpose, but for the time being let's just separate outputs */
config.set_default_layout(layout_dualhsxs);
// SNES PPU
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(DOTCLK_NTSC, SNES_HTOTAL, 0, SNES_SCR_WIDTH, SNES_VTOTAL_NTSC, 0, SNES_SCR_HEIGHT_NTSC)
- MCFG_SCREEN_UPDATE_DRIVER( snes_state, screen_update )
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, nss_state, nss_vblank_irq))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(DOTCLK_NTSC, SNES_HTOTAL, 0, SNES_SCR_WIDTH, SNES_VTOTAL_NTSC, 0, SNES_SCR_HEIGHT_NTSC);
+ m_screen->set_screen_update(FUNC(snes_state::screen_update));
+ m_screen->screen_vblank().set(FUNC(nss_state::nss_vblank_irq));
SNES_PPU(config, m_ppu, MCLK_NTSC);
m_ppu->open_bus_callback().set([this] { return snes_open_bus_r(); }); // lambda because overloaded function name
m_ppu->set_screen("screen");
// NSS
- MCFG_SCREEN_ADD("osd", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(288+22, 216+22)
- MCFG_SCREEN_VISIBLE_AREA(0, 288-1, 0, 216-1)
- MCFG_SCREEN_UPDATE_DRIVER(nss_state,screen_update)
-MACHINE_CONFIG_END
+ screen_device &osd(SCREEN(config, "osd", SCREEN_TYPE_RASTER));
+ osd.set_refresh_hz(60);
+ osd.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ osd.set_size(288+22, 216+22);
+ osd.set_visarea(0, 288-1, 0, 216-1);
+ osd.set_screen_update(FUNC(nss_state::screen_update));
+}
/***************************************************************************
diff --git a/src/mame/drivers/nyny.cpp b/src/mame/drivers/nyny.cpp
index 496f58cbde1..70c933ae030 100644
--- a/src/mame/drivers/nyny.cpp
+++ b/src/mame/drivers/nyny.cpp
@@ -596,25 +596,25 @@ void nyny_state::machine_reset()
*
*************************************/
-MACHINE_CONFIG_START(nyny_state::nyny)
-
+void nyny_state::nyny(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809, 5600000) /* 1.40 MHz? The clock signal is generated by analog chips */
- MCFG_DEVICE_PROGRAM_MAP(nyny_main_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(nyny_state, update_pia_1, 25)
+ MC6809(config, m_maincpu, 5600000); /* 1.40 MHz? The clock signal is generated by analog chips */
+ m_maincpu->set_addrmap(AS_PROGRAM, &nyny_state::nyny_main_map);
+ m_maincpu->set_periodic_int(FUNC(nyny_state::update_pia_1), attotime::from_hz(25));
- MCFG_DEVICE_ADD("audiocpu", M6802, AUDIO_CPU_1_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(nyny_audio_1_map)
+ M6802(config, m_audiocpu, AUDIO_CPU_1_CLOCK);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &nyny_state::nyny_audio_1_map);
- MCFG_DEVICE_ADD("audio2", M6802, AUDIO_CPU_2_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(nyny_audio_2_map)
+ M6802(config, m_audiocpu2, AUDIO_CPU_2_CLOCK);
+ m_audiocpu2->set_addrmap(AS_PROGRAM, &nyny_state::nyny_audio_2_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 256, 0, 256, 256, 0, 256) /* temporary, CRTC will configure screen */
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(PIXEL_CLOCK, 256, 0, 256, 256, 0, 256); /* temporary, CRTC will configure screen */
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
PALETTE(config, m_palette, palette_device::RGB_3BIT);
@@ -672,7 +672,7 @@ MACHINE_CONFIG_START(nyny_state::nyny)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/ob68k1a.cpp b/src/mame/drivers/ob68k1a.cpp
index 28041d1a4bf..e7efa1696fe 100644
--- a/src/mame/drivers/ob68k1a.cpp
+++ b/src/mame/drivers/ob68k1a.cpp
@@ -179,7 +179,7 @@ void ob68k1a_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( ob68k1a )
+// machine_config( ob68k1a )
//-------------------------------------------------
void ob68k1a_state::ob68k1a(machine_config &config)
diff --git a/src/mame/drivers/octopus.cpp b/src/mame/drivers/octopus.cpp
index e1dc6ad37d6..cee1859c38f 100644
--- a/src/mame/drivers/octopus.cpp
+++ b/src/mame/drivers/octopus.cpp
@@ -895,16 +895,17 @@ void octopus_centronics_devices(device_slot_interface &device)
device.option_add("printer", CENTRONICS_PRINTER);
}
-MACHINE_CONFIG_START(octopus_state::octopus)
+void octopus_state::octopus(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8088, 24_MHz_XTAL / 3) // 8MHz
- MCFG_DEVICE_PROGRAM_MAP(octopus_mem)
- MCFG_DEVICE_IO_MAP(octopus_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(octopus_state, x86_irq_cb)
+ I8088(config, m_maincpu, 24_MHz_XTAL / 3); // 8MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &octopus_state::octopus_mem);
+ m_maincpu->set_addrmap(AS_IO, &octopus_state::octopus_io);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(octopus_state::x86_irq_cb));
- MCFG_DEVICE_ADD("subcpu",Z80, 24_MHz_XTAL / 4) // 6MHz
- MCFG_DEVICE_PROGRAM_MAP(octopus_sub_mem)
- MCFG_DEVICE_IO_MAP(octopus_sub_io)
+ Z80(config, m_subcpu, 24_MHz_XTAL / 4); // 6MHz
+ m_subcpu->set_addrmap(AS_PROGRAM, &octopus_state::octopus_sub_mem);
+ m_subcpu->set_addrmap(AS_IO, &octopus_state::octopus_sub_io);
AM9517A(config, m_dma1, 24_MHz_XTAL / 6); // 4MHz
m_dma1->out_hreq_callback().set(m_dma2, FUNC(am9517a_device::dreq0_w));
@@ -989,8 +990,7 @@ MACHINE_CONFIG_START(octopus_state::octopus)
m_pit->out_handler<2>().set(FUNC(octopus_state::spk_freq_w));
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);
Z80SIO(config, m_serial, 16_MHz_XTAL / 4); // clock rate not mentioned in tech manual
m_serial->out_int_callback().set(m_pic1, FUNC(pic8259_device::ir1_w));
@@ -1029,8 +1029,7 @@ MACHINE_CONFIG_START(octopus_state::octopus)
ADDRESS_MAP_BANK(config, "z80_bank").set_map(&octopus_state::octopus_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x10000);
RAM(config, "ram").set_default_size("256K").set_extra_options("128K,512K,768K");
-
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( octopus )
diff --git a/src/mame/drivers/odyssey.cpp b/src/mame/drivers/odyssey.cpp
index 7e88e16b326..628fe45caa9 100644
--- a/src/mame/drivers/odyssey.cpp
+++ b/src/mame/drivers/odyssey.cpp
@@ -133,20 +133,20 @@ void odyssey_state::machine_reset()
* Machine Config *
**************************************/
-MACHINE_CONFIG_START(odyssey_state::odyssey)
-
+void odyssey_state::odyssey(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", PENTIUM, 133000000) // a Celeron at 1.70 GHz on the MB I checked.
- MCFG_DEVICE_PROGRAM_MAP(odyssey_map)
+ PENTIUM(config, m_maincpu, 133000000); // a Celeron at 1.70 GHz on the MB I checked.
+ m_maincpu->set_addrmap(AS_PROGRAM, &odyssey_state::odyssey_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
- MCFG_SCREEN_UPDATE_DRIVER(odyssey_state, screen_update)
-MACHINE_CONFIG_END
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 640-1, 0, 480-1);
+ screen.set_screen_update(FUNC(odyssey_state::screen_update));
+}
/**************************************
diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp
index 937e35cb4f2..f2502dd8284 100644
--- a/src/mame/drivers/odyssey2.cpp
+++ b/src/mame/drivers/odyssey2.cpp
@@ -681,7 +681,8 @@ void odyssey2_state::odyssey2_cartslot(machine_config &config)
}
-MACHINE_CONFIG_START(odyssey2_state::odyssey2)
+void odyssey2_state::odyssey2(machine_config &config)
+{
/* basic machine hardware */
I8048(config, m_maincpu, ((XTAL(7'159'090) * 3) / 4));
m_maincpu->set_addrmap(AS_PROGRAM, &odyssey2_state::odyssey2_mem);
@@ -698,9 +699,9 @@ MACHINE_CONFIG_START(odyssey2_state::odyssey2)
config.m_minimum_quantum = attotime::from_hz(60);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DRIVER(odyssey2_state, screen_update_odyssey2)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_screen_update(FUNC(odyssey2_state::screen_update_odyssey2));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_odyssey2);
PALETTE(config, "palette", FUNC(odyssey2_state::odyssey2_palette), 32);
@@ -714,10 +715,11 @@ MACHINE_CONFIG_START(odyssey2_state::odyssey2)
m_i8244->add_route(ALL_OUTPUTS, "mono", 0.40);
odyssey2_cartslot(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(odyssey2_state::videopac)
+void odyssey2_state::videopac(machine_config &config)
+{
/* basic machine hardware */
I8048(config, m_maincpu, (XTAL(17'734'470) / 3));
m_maincpu->set_addrmap(AS_PROGRAM, &odyssey2_state::odyssey2_mem);
@@ -726,9 +728,9 @@ MACHINE_CONFIG_START(odyssey2_state::videopac)
config.m_minimum_quantum = attotime::from_hz(60);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DRIVER(odyssey2_state, screen_update_odyssey2)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_screen_update(FUNC(odyssey2_state::screen_update_odyssey2));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_odyssey2);
PALETTE(config, "palette", FUNC(odyssey2_state::odyssey2_palette), 16);
@@ -742,10 +744,11 @@ MACHINE_CONFIG_START(odyssey2_state::videopac)
m_i8244->add_route(ALL_OUTPUTS, "mono", 0.40);
odyssey2_cartslot(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(g7400_state::g7400)
+void g7400_state::g7400(machine_config &config)
+{
/* basic machine hardware */
I8048(config, m_maincpu, XTAL(5'911'000));
m_maincpu->set_addrmap(AS_PROGRAM, &g7400_state::odyssey2_mem);
@@ -763,9 +766,9 @@ MACHINE_CONFIG_START(g7400_state::g7400)
config.m_minimum_quantum = attotime::from_hz(60);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DRIVER(odyssey2_state, screen_update_odyssey2)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_screen_update(FUNC(odyssey2_state::screen_update_odyssey2));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_odyssey2);
PALETTE(config, "palette", FUNC(g7400_state::g7400_palette), 16);
@@ -788,10 +791,11 @@ MACHINE_CONFIG_START(g7400_state::g7400)
odyssey2_cartslot(config);
SOFTWARE_LIST(config.replace(), "cart_list").set_original("g7400");
SOFTWARE_LIST(config, "ody2_list").set_compatible("odyssey2");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(g7400_state::odyssey3)
+void g7400_state::odyssey3(machine_config &config)
+{
/* basic machine hardware */
I8048(config, m_maincpu, XTAL(5'911'000));
m_maincpu->set_addrmap(AS_PROGRAM, &g7400_state::odyssey2_mem);
@@ -809,9 +813,9 @@ MACHINE_CONFIG_START(g7400_state::odyssey3)
config.m_minimum_quantum = attotime::from_hz(60);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DRIVER(odyssey2_state, screen_update_odyssey2)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_screen_update(FUNC(odyssey2_state::screen_update_odyssey2));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_odyssey2);
PALETTE(config, "palette", FUNC(g7400_state::g7400_palette), 16);
@@ -834,7 +838,7 @@ MACHINE_CONFIG_START(g7400_state::odyssey3)
odyssey2_cartslot(config);
SOFTWARE_LIST(config.replace(), "cart_list").set_original("g7400");
SOFTWARE_LIST(config, "ody2_list").set_compatible("odyssey2");
-MACHINE_CONFIG_END
+}
ROM_START (odyssey2)
diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp
index a357205dbdd..9cbc03d71a9 100644
--- a/src/mame/drivers/offtwall.cpp
+++ b/src/mame/drivers/offtwall.cpp
@@ -336,11 +336,11 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(offtwall_state::offtwall)
-
+void offtwall_state::offtwall(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &offtwall_state::main_map);
EEPROM_2816(config, "eeprom").lock_after_write(true);
@@ -355,13 +355,13 @@ MACHINE_CONFIG_START(offtwall_state::offtwall)
TILEMAP(config, "vad:playfield", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(DEVICE_SELF_OWNER, FUNC(offtwall_state::get_playfield_tile_info));
ATARI_MOTION_OBJECTS(config, "vad:mob", 0, "screen", offtwall_state::s_mob_config).set_gfxdecode("gfxdecode");
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
/* note: these parameters are from published specs, not derived */
/* the board uses a VAD chip to generate video signals */
- MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
- MCFG_SCREEN_UPDATE_DRIVER(offtwall_state, screen_update_offtwall)
- MCFG_SCREEN_PALETTE("palette")
+ screen.set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240);
+ screen.set_screen_update(FUNC(offtwall_state::screen_update_offtwall));
+ screen.set_palette("palette");
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -371,7 +371,7 @@ MACHINE_CONFIG_START(offtwall_state::offtwall)
m_jsa->test_read_cb().set_ioport("260010").bit(6);
m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0);
config.device_remove("jsa:oki1");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/ohmygod.cpp b/src/mame/drivers/ohmygod.cpp
index b8f0e93349a..23cc72d956d 100644
--- a/src/mame/drivers/ohmygod.cpp
+++ b/src/mame/drivers/ohmygod.cpp
@@ -320,24 +320,24 @@ void ohmygod_state::machine_reset()
m_scrolly = 0;
}
-MACHINE_CONFIG_START(ohmygod_state::ohmygod)
-
+void ohmygod_state::ohmygod(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(ohmygod_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", ohmygod_state, irq1_line_hold)
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ohmygod_state::ohmygod_map);
+ m_maincpu->set_vblank_int("screen", FUNC(ohmygod_state::irq1_line_hold));
WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 0*8, 30*8-1 )
- MCFG_SCREEN_UPDATE_DRIVER(ohmygod_state, screen_update_ohmygod)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(12*8, (64-12)*8-1, 0*8, 30*8-1 );
+ screen.set_screen_update(FUNC(ohmygod_state::screen_update_ohmygod));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_ohmygod);
@@ -346,10 +346,10 @@ MACHINE_CONFIG_START(ohmygod_state::ohmygod)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 14000000/8, okim6295_device::PIN7_HIGH)
- MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ okim6295_device &oki(OKIM6295(config, "oki", 14000000/8, okim6295_device::PIN7_HIGH));
+ oki.set_addrmap(0, &ohmygod_state::oki_map);
+ oki.add_route(ALL_OUTPUTS, "mono", 1.0);
+}
/***************************************************************************
diff --git a/src/mame/drivers/okean240.cpp b/src/mame/drivers/okean240.cpp
index bf346b21b97..a12bee1167d 100644
--- a/src/mame/drivers/okean240.cpp
+++ b/src/mame/drivers/okean240.cpp
@@ -507,11 +507,12 @@ static GFXDECODE_START( gfx_okean240a )
GFXDECODE_END
-MACHINE_CONFIG_START(okean240_state::okean240t)
+void okean240_state::okean240t(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8080, XTAL(12'000'000) / 6)
- MCFG_DEVICE_PROGRAM_MAP(okean240_mem)
- MCFG_DEVICE_IO_MAP(okean240t_io)
+ I8080(config, m_maincpu, XTAL(12'000'000) / 6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &okean240_state::okean240_mem);
+ m_maincpu->set_addrmap(AS_IO, &okean240_state::okean240t_io);
i8251_device &uart(I8251(config, "uart", 0));
uart.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd));
@@ -541,21 +542,21 @@ MACHINE_CONFIG_START(okean240_state::okean240t)
PIC8259(config, "pic", 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen1", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 0, 255)
- MCFG_SCREEN_UPDATE_DRIVER(okean240_state, screen_update_okean240)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen1(SCREEN(config, "screen1", SCREEN_TYPE_RASTER));
+ screen1.set_refresh_hz(50);
+ screen1.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen1.set_size(256, 256);
+ screen1.set_visarea(0, 255, 0, 255);
+ screen1.set_screen_update(FUNC(okean240_state::screen_update_okean240));
+ screen1.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(okean240_state::okean240a)
+void okean240_state::okean240a(machine_config &config)
+{
okean240t(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(okean240a_io)
+ m_maincpu->set_addrmap(AS_IO, &okean240_state::okean240a_io);
GFXDECODE(config, "gfxdecode", "palette", gfx_okean240a);
subdevice<rs232_port_device>("rs232")->set_default_option("keyboard");
@@ -564,19 +565,19 @@ MACHINE_CONFIG_START(okean240_state::okean240a)
m_ppikbd->in_pc_callback().set(FUNC(okean240_state::okean240a_port42_r));
subdevice<pit8253_device>("pit")->set_clk<1>(1536000); // artificial rate
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(okean240_state::okean240)
+void okean240_state::okean240(machine_config &config)
+{
okean240t(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(okean240_io)
+ m_maincpu->set_addrmap(AS_IO, &okean240_state::okean240_io);
GFXDECODE(config, "gfxdecode", "palette", gfx_okean240);
config.device_remove("uart");
config.device_remove("rs232");
subdevice<pit8253_device>("pit")->out_handler<1>().set_nop();
generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
keyboard.set_keyboard_callback(FUNC(okean240_state::kbd_put));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( okean240 )
diff --git a/src/mame/drivers/olibochu.cpp b/src/mame/drivers/olibochu.cpp
index 533c2e5c1d7..8f3db209f83 100644
--- a/src/mame/drivers/olibochu.cpp
+++ b/src/mame/drivers/olibochu.cpp
@@ -459,27 +459,27 @@ TIMER_DEVICE_CALLBACK_MEMBER(olibochu_state::olibochu_scanline)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */
}
-MACHINE_CONFIG_START(olibochu_state::olibochu)
-
+void olibochu_state::olibochu(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* 4 MHz ?? */
- MCFG_DEVICE_PROGRAM_MAP(olibochu_map)
+ Z80(config, m_maincpu, 4000000); /* 4 MHz ?? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &olibochu_state::olibochu_map);
TIMER(config, "scantimer").configure_scanline(FUNC(olibochu_state::olibochu_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("audiocpu", Z80, 4000000) /* 4 MHz ?? */
- MCFG_DEVICE_PROGRAM_MAP(olibochu_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(olibochu_state, irq0_line_hold, 60) //???
+ z80_device &audiocpu(Z80(config, "audiocpu", 4000000)); /* 4 MHz ?? */
+ audiocpu.set_addrmap(AS_PROGRAM, &olibochu_state::olibochu_sound_map);
+ audiocpu.set_periodic_int(FUNC(olibochu_state::irq0_line_hold), attotime::from_hz(60)); //???
// config.m_perfect_cpu_quantum = subtag("maincpu");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(olibochu_state, screen_update_olibochu)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(olibochu_state::screen_update_olibochu));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_olibochu);
PALETTE(config, m_palette, FUNC(olibochu_state::olibochu_palette), 512);
@@ -490,7 +490,7 @@ MACHINE_CONFIG_START(olibochu_state::olibochu)
GENERIC_LATCH_8(config, m_soundlatch);
AY8910(config, "aysnd", 2'000'000).add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/olytext.cpp b/src/mame/drivers/olytext.cpp
index 891e31ff22e..2d2d717cbc7 100644
--- a/src/mame/drivers/olytext.cpp
+++ b/src/mame/drivers/olytext.cpp
@@ -148,19 +148,20 @@ static void olytext_floppies(device_slot_interface &device)
// MACHINE CONFIGURATION
//**************************************************************************
-MACHINE_CONFIG_START( olytext_state::olytext )
- MCFG_DEVICE_ADD("maincpu", Z80, 16_MHz_XTAL / 4)
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
+void olytext_state::olytext(machine_config &config)
+{
+ Z80(config, m_maincpu, 16_MHz_XTAL / 4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &olytext_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &olytext_state::io_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(80*8, 28*11)
- MCFG_SCREEN_VISIBLE_AREA(0, (80*8)-1, 0, (28*11)-1)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(olytext_state, screen_update)
- //MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_size(80*8, 28*11);
+ screen.set_visarea(0, (80*8)-1, 0, (28*11)-1);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(FUNC(olytext_state::screen_update));
+ //screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
/* devices */
@@ -171,7 +172,7 @@ MACHINE_CONFIG_START( olytext_state::olytext )
/* keyboard */
generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
keyboard.set_keyboard_callback(FUNC(olytext_state::keyboard_put));
-MACHINE_CONFIG_END
+}
//**************************************************************************
diff --git a/src/mame/drivers/omegrace.cpp b/src/mame/drivers/omegrace.cpp
index f048b4cdc93..e1533bfd65a 100644
--- a/src/mame/drivers/omegrace.cpp
+++ b/src/mame/drivers/omegrace.cpp
@@ -513,26 +513,26 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(omegrace_state::omegrace)
-
+void omegrace_state::omegrace(machine_config &config)
+{
/* basic machine hardware */
/* main CPU */
/* XTAL101 Crystal @ 12mhz */
/* through 74LS161, Pin 13 = divide by 4 */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(12'000'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(port_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(omegrace_state, irq0_line_hold, 250)
+ Z80(config, m_maincpu, XTAL(12'000'000)/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &omegrace_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &omegrace_state::port_map);
+ m_maincpu->set_periodic_int(FUNC(omegrace_state::irq0_line_hold), attotime::from_hz(250));
/* audio CPU */
/* XTAL101 Crystal @ 12mhz */
/* through 74LS161, Pin 12 = divide by 8 */
/* Fed to CPU as 1.5mhz though line J4-D */
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(12'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_port)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(omegrace_state, nmi_line_pulse, 250)
+ Z80(config, m_audiocpu, XTAL(12'000'000)/8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &omegrace_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &omegrace_state::sound_port);
+ m_audiocpu->set_periodic_int(FUNC(omegrace_state::nmi_line_pulse), attotime::from_hz(250));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -540,11 +540,11 @@ MACHINE_CONFIG_START(omegrace_state::omegrace)
/* video hardware */
VECTOR(config, "vector", 0);
- MCFG_SCREEN_ADD("screen", VECTOR)
- MCFG_SCREEN_REFRESH_RATE(40)
- MCFG_SCREEN_SIZE(400, 300)
- MCFG_SCREEN_VISIBLE_AREA(522, 1566, 522, 1566)
- MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_VECTOR));
+ screen.set_refresh_hz(40);
+ screen.set_size(400, 300);
+ screen.set_visarea(522, 1566, 522, 1566);
+ screen.set_screen_update("vector", FUNC(vector_device::screen_update));
DVG(config, m_dvg, 0);
m_dvg->set_vector_tag("vector");
@@ -559,7 +559,7 @@ MACHINE_CONFIG_START(omegrace_state::omegrace)
AY8912(config, "ay1", XTAL(12'000'000)/12).add_route(ALL_OUTPUTS, "mono", 0.25);
AY8912(config, "ay2", XTAL(12'000'000)/12).add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/ondra.cpp b/src/mame/drivers/ondra.cpp
index f040ebd2f20..040e09fb591 100644
--- a/src/mame/drivers/ondra.cpp
+++ b/src/mame/drivers/ondra.cpp
@@ -122,21 +122,22 @@ WRITE_LINE_MEMBER(ondra_state::vblank_irq)
}
/* Machine driver */
-MACHINE_CONFIG_START(ondra_state::ondra)
+void ondra_state::ondra(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 2000000)
- MCFG_DEVICE_PROGRAM_MAP(ondra_mem)
- MCFG_DEVICE_IO_MAP(ondra_io)
+ Z80(config, m_maincpu, 2000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ondra_state::ondra_mem);
+ m_maincpu->set_addrmap(AS_IO, &ondra_state::ondra_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(320, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(ondra_state, screen_update_ondra)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, ondra_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(320, 256);
+ screen.set_visarea(0, 320-1, 0, 256-1);
+ screen.set_screen_update(FUNC(ondra_state::screen_update_ondra));
+ screen.set_palette("palette");
+ screen.screen_vblank().set(FUNC(ondra_state::vblank_irq));
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -153,7 +154,7 @@ MACHINE_CONFIG_START(ondra_state::ondra)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K").set_default_value(0x00);
-MACHINE_CONFIG_END
+}
/* ROM definition */
diff --git a/src/mame/drivers/orao.cpp b/src/mame/drivers/orao.cpp
index d703619eccb..7d7bf272614 100644
--- a/src/mame/drivers/orao.cpp
+++ b/src/mame/drivers/orao.cpp
@@ -171,19 +171,20 @@ static INPUT_PORTS_START( orao )
INPUT_PORTS_END
/* Machine driver */
-MACHINE_CONFIG_START(orao_state::orao)
+void orao_state::orao(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 1000000)
- MCFG_DEVICE_PROGRAM_MAP(orao_mem)
+ M6502(config, m_maincpu, 1000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &orao_state::orao_mem);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(orao_state, screen_update_orao)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 256-1, 0, 256-1);
+ screen.set_screen_update(FUNC(orao_state::screen_update_orao));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -199,7 +200,7 @@ MACHINE_CONFIG_START(orao_state::orao)
m_cassette->set_interface("orao_cass");
SOFTWARE_LIST(config, "cass_list").set_original("orao");
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( orao )
diff --git a/src/mame/drivers/orbit.cpp b/src/mame/drivers/orbit.cpp
index 656e68918fa..1cd1a45117e 100644
--- a/src/mame/drivers/orbit.cpp
+++ b/src/mame/drivers/orbit.cpp
@@ -265,12 +265,12 @@ void orbit_state::machine_reset()
*
*************************************/
-MACHINE_CONFIG_START(orbit_state::orbit)
-
+void orbit_state::orbit(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, M6800, MASTER_CLOCK / 16)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", orbit_state, interrupt)
+ M6800(config, m_maincpu, MASTER_CLOCK / 16);
+ m_maincpu->set_addrmap(AS_PROGRAM, &orbit_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(orbit_state::interrupt));
TIMER(config, "32v").configure_scanline(FUNC(orbit_state::nmi_32v), "screen", 0, 32);
@@ -291,10 +291,10 @@ MACHINE_CONFIG_START(orbit_state::orbit)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD(m_screen, RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK*2, 384*2, 0, 256*2, 261*2, 0, 240*2)
- MCFG_SCREEN_UPDATE_DRIVER(orbit_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK*2, 384*2, 0, 256*2, 261*2, 0, 240*2);
+ m_screen->set_screen_update(FUNC(orbit_state::screen_update));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_orbit);
@@ -304,10 +304,10 @@ MACHINE_CONFIG_START(orbit_state::orbit)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD(m_discrete, DISCRETE, orbit_discrete)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ DISCRETE(config, m_discrete, orbit_discrete);
+ m_discrete->add_route(0, "lspeaker", 1.0);
+ m_discrete->add_route(1, "rspeaker", 1.0);
+}
diff --git a/src/mame/drivers/otomedius.cpp b/src/mame/drivers/otomedius.cpp
index 0e71a41f04c..04b1646fe53 100644
--- a/src/mame/drivers/otomedius.cpp
+++ b/src/mame/drivers/otomedius.cpp
@@ -67,20 +67,20 @@ void konami_pc_state::machine_reset()
{
}
-MACHINE_CONFIG_START(konami_pc_state::konami_pc)
-
+void konami_pc_state::konami_pc(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", PENTIUM3, 100000000) // not correct, but why bother?
- MCFG_DEVICE_PROGRAM_MAP(konami_pc_map)
+ PENTIUM3(config, m_maincpu, 100000000); // not correct, but why bother?
+ m_maincpu->set_addrmap(AS_PROGRAM, &konami_pc_state::konami_pc_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
- MCFG_SCREEN_UPDATE_DRIVER(konami_pc_state, screen_update_konami_pc)
-MACHINE_CONFIG_END
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 640-1, 0, 480-1);
+ screen.set_screen_update(FUNC(konami_pc_state::screen_update_konami_pc));
+}
/***************************************************************************
diff --git a/src/mame/includes/m52.h b/src/mame/includes/m52.h
index 58f0d441ffe..8d11a75d229 100644
--- a/src/mame/includes/m52.h
+++ b/src/mame/includes/m52.h
@@ -13,14 +13,14 @@ class m52_state : public driver_device
public:
m52_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_screen(*this, "screen"),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_spriteram(*this, "spriteram"),
- m_maincpu(*this, "maincpu"),
m_sp_gfxdecode(*this, "sp_gfxdecode"),
m_tx_gfxdecode(*this, "tx_gfxdecode"),
m_bg_gfxdecode(*this, "bg_gfxdecode"),
- m_screen(*this, "screen"),
m_sp_palette(*this, "sp_palette"),
m_tx_palette(*this, "tx_palette"),
m_bg_palette(*this, "bg_palette")
@@ -43,6 +43,9 @@ protected:
tilemap_t* m_tx_tilemap;
+ required_device<cpu_device> m_maincpu;
+ required_device<screen_device> m_screen;
+
private:
/* memory pointers */
required_shared_ptr<uint8_t> m_videoram;
@@ -56,11 +59,9 @@ private:
uint8_t m_bg2ypos;
uint8_t m_bgcontrol;
- required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_sp_gfxdecode;
required_device<gfxdecode_device> m_tx_gfxdecode;
required_device<gfxdecode_device> m_bg_gfxdecode;
- required_device<screen_device> m_screen;
required_device<palette_device> m_sp_palette;
required_device<palette_device> m_tx_palette;
required_device<palette_device> m_bg_palette;
diff --git a/src/mame/includes/orbit.h b/src/mame/includes/orbit.h
index 6f48ad78feb..2f25989efa5 100644
--- a/src/mame/includes/orbit.h
+++ b/src/mame/includes/orbit.h
@@ -71,7 +71,7 @@ private:
required_shared_ptr<uint8_t> m_playfield_ram;
required_shared_ptr<uint8_t> m_sprite_ram;
- required_device<discrete_device> m_discrete;
+ required_device<discrete_sound_device> m_discrete;
/* video-related */
tilemap_t *m_bg_tilemap;