summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-03-21 18:05:29 +0100
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-03-21 18:05:29 +0100
commitf079fb82cd64ab898e1deb9c66c97c4c99a13d74 (patch) (github)
treea157ffd09c1c6044cae1e76efe9a701248f43eb3
parentf17ad47091ed5516d4b0734f92adbcec0d888812 (diff)
downloadmame-f079fb82cd64ab898e1deb9c66c97c4c99a13d74.tar.bz2
mame-f079fb82cd64ab898e1deb9c66c97c4c99a13d74.zip
mame\drivers: removed most MCFG and MACHINE_CONFIG macros from drivers starting with c (nw)
-rw-r--r--src/devices/bus/svi3x8/expander/sv603.cpp8
-rw-r--r--src/mame/drivers/c10.cpp25
-rw-r--r--src/mame/drivers/c128.cpp14
-rw-r--r--src/mame/drivers/c64.cpp18
-rw-r--r--src/mame/drivers/c64dtv.cpp15
-rw-r--r--src/mame/drivers/c65.cpp28
-rw-r--r--src/mame/drivers/cabaret.cpp30
-rw-r--r--src/mame/drivers/calchase.cpp16
-rw-r--r--src/mame/drivers/calcune.cpp34
-rw-r--r--src/mame/drivers/calomega.cpp19
-rw-r--r--src/mame/drivers/calorie.cpp36
-rw-r--r--src/mame/drivers/camplynx.cpp34
-rw-r--r--src/mame/drivers/candela.cpp25
-rw-r--r--src/mame/drivers/canon_s80.cpp9
-rw-r--r--src/mame/drivers/canyon.cpp26
-rw-r--r--src/mame/drivers/capbowl.cpp37
-rw-r--r--src/mame/drivers/capcom.cpp9
-rw-r--r--src/mame/drivers/caprcyc.cpp10
-rw-r--r--src/mame/drivers/cardline.cpp29
-rw-r--r--src/mame/drivers/carjmbre.cpp32
-rw-r--r--src/mame/drivers/carpolo.cpp22
-rw-r--r--src/mame/drivers/carrera.cpp25
-rw-r--r--src/mame/drivers/casloopy.cpp29
-rw-r--r--src/mame/drivers/castle.cpp24
-rw-r--r--src/mame/drivers/caswin.cpp27
-rw-r--r--src/mame/drivers/cat.cpp24
-rw-r--r--src/mame/drivers/cavepc.cpp29
-rw-r--r--src/mame/drivers/cball.cpp22
-rw-r--r--src/mame/drivers/cbasebal.cpp38
-rw-r--r--src/mame/drivers/cbm2.cpp36
-rw-r--r--src/mame/drivers/cbuster.cpp33
-rw-r--r--src/mame/drivers/cc40.cpp15
-rw-r--r--src/mame/drivers/cchance.cpp28
-rw-r--r--src/mame/drivers/cclimber.cpp86
-rw-r--r--src/mame/drivers/cedar_magnet.cpp30
-rw-r--r--src/mame/drivers/cesclass.cpp29
-rw-r--r--src/mame/drivers/chaknpop.cpp28
-rw-r--r--src/mame/drivers/champbas.cpp170
-rw-r--r--src/mame/drivers/champbwl.cpp65
-rw-r--r--src/mame/drivers/chanbara.cpp26
-rw-r--r--src/mame/drivers/chance32.cpp33
-rw-r--r--src/mame/drivers/channelf.cpp112
-rw-r--r--src/mame/drivers/chaos.cpp13
-rw-r--r--src/mame/drivers/cheekyms.cpp28
-rw-r--r--src/mame/drivers/chicago.cpp10
-rw-r--r--src/mame/drivers/chihiro.cpp7
-rw-r--r--src/mame/drivers/chsuper.cpp30
-rw-r--r--src/mame/drivers/circusc.cpp39
-rw-r--r--src/mame/drivers/cischeat.cpp215
-rw-r--r--src/mame/drivers/citycon.cpp26
-rw-r--r--src/mame/drivers/clayshoo.cpp26
-rw-r--r--src/mame/drivers/clcd.cpp24
-rw-r--r--src/mame/drivers/clowndwn.cpp20
-rw-r--r--src/mame/drivers/clpoker.cpp29
-rw-r--r--src/mame/drivers/clshroad.cpp72
-rw-r--r--src/mame/drivers/cmi.cpp35
-rw-r--r--src/mame/drivers/cmmb.cpp20
-rw-r--r--src/mame/drivers/cninja.cpp201
-rw-r--r--src/mame/drivers/cntsteer.cpp58
-rw-r--r--src/mame/drivers/cobra.cpp24
-rw-r--r--src/mame/drivers/coco12.cpp14
-rw-r--r--src/mame/drivers/coco3.cpp16
-rw-r--r--src/mame/drivers/cocoloco.cpp12
-rw-r--r--src/mame/drivers/coinmstr.cpp69
-rw-r--r--src/mame/drivers/coinmvga.cpp38
-rw-r--r--src/mame/drivers/comebaby.cpp29
-rw-r--r--src/mame/drivers/commando.cpp18
-rw-r--r--src/mame/drivers/compgolf.cpp26
-rw-r--r--src/mame/drivers/compis.cpp4
-rw-r--r--src/mame/drivers/compucolor.cpp19
-rw-r--r--src/mame/drivers/comquest.cpp31
-rw-r--r--src/mame/drivers/comx35.cpp2
-rw-r--r--src/mame/drivers/contra.cpp30
-rw-r--r--src/mame/drivers/controlid.cpp19
-rw-r--r--src/mame/drivers/coolridr.cpp52
-rw-r--r--src/mame/drivers/cop01.cpp71
-rw-r--r--src/mame/drivers/copsnrob.cpp10
-rw-r--r--src/mame/drivers/corona.cpp171
-rw-r--r--src/mame/drivers/cosmicos.cpp3
-rw-r--r--src/mame/drivers/cps2.cpp57
-rw-r--r--src/mame/drivers/crbaloon.cpp31
-rw-r--r--src/mame/drivers/crvision.cpp6
-rw-r--r--src/mame/drivers/cswat.cpp31
-rw-r--r--src/mame/drivers/ct486.cpp36
-rw-r--r--src/mame/drivers/cubo.cpp21
-rw-r--r--src/mame/drivers/cultures.cpp30
-rw-r--r--src/mame/drivers/cupidon.cpp21
-rw-r--r--src/mame/drivers/cvicny.cpp9
-rw-r--r--src/mame/drivers/cxhumax.cpp21
-rw-r--r--src/mame/drivers/cyberbal.cpp22
-rw-r--r--src/mame/drivers/cybertnk.cpp59
-rw-r--r--src/mame/drivers/cybstorm.cpp21
-rw-r--r--src/mame/drivers/cyclemb.cpp53
-rw-r--r--src/mame/drivers/cz101.cpp19
-rw-r--r--src/mame/includes/canyon.h2
95 files changed, 1661 insertions, 1674 deletions
diff --git a/src/devices/bus/svi3x8/expander/sv603.cpp b/src/devices/bus/svi3x8/expander/sv603.cpp
index ce4a9f11bcf..fc8e8c86d96 100644
--- a/src/devices/bus/svi3x8/expander/sv603.cpp
+++ b/src/devices/bus/svi3x8/expander/sv603.cpp
@@ -36,10 +36,10 @@ const tiny_rom_entry *sv603_device::device_rom_region() const
// device_add_mconfig - add device configuration
//-------------------------------------------------
-MACHINE_CONFIG_START(sv603_device::device_add_mconfig)
+void sv603_device::device_add_mconfig(machine_config &config)
+{
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("snd", SN76489A, XTAL(10'738'635) / 3)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SN76489A(config, m_snd, XTAL(10'738'635) / 3).add_route(ALL_OUTPUTS, "mono", 1.00);
// controller ports
COLECOVISION_CONTROL_PORT(config, m_joy[0], colecovision_control_port_devices, "hand");
@@ -50,7 +50,7 @@ MACHINE_CONFIG_START(sv603_device::device_add_mconfig)
// cartridge slot
COLECOVISION_CARTRIDGE_SLOT(config, m_cart, colecovision_cartridges, nullptr);
SOFTWARE_LIST(config, "cart_list").set_original("coleco");
-MACHINE_CONFIG_END
+}
//**************************************************************************
diff --git a/src/mame/drivers/c10.cpp b/src/mame/drivers/c10.cpp
index d58145bc62a..59462dfbea2 100644
--- a/src/mame/drivers/c10.cpp
+++ b/src/mame/drivers/c10.cpp
@@ -159,23 +159,24 @@ static GFXDECODE_START( gfx_c10 )
GFXDECODE_END
-MACHINE_CONFIG_START(c10_state::c10)
+void c10_state::c10(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(8'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(c10_mem)
- MCFG_DEVICE_IO_MAP(c10_io)
+ Z80(config, m_maincpu, XTAL(8'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &c10_state::c10_mem);
+ m_maincpu->set_addrmap(AS_IO, &c10_state::c10_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_UPDATE_DRIVER(c10_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(c10_state::screen_update));
+ screen.set_size(640, 250);
+ screen.set_visarea_full();
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_c10);
PALETTE(config, "palette", palette_device::MONOCHROME);
-MACHINE_CONFIG_END
+}
void c10_state::init_c10()
{
diff --git a/src/mame/drivers/c128.cpp b/src/mame/drivers/c128.cpp
index 3879b635d2b..9e5c25375b1 100644
--- a/src/mame/drivers/c128.cpp
+++ b/src/mame/drivers/c128.cpp
@@ -1629,7 +1629,7 @@ void c128_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( ntsc )
+// machine_config( ntsc )
//-------------------------------------------------
void c128_state::ntsc(machine_config &config)
@@ -1783,7 +1783,7 @@ void c128_state::ntsc(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( c128 )
+// machine_config( c128 )
//-------------------------------------------------
void c128_state::c128(machine_config &config)
@@ -1796,7 +1796,7 @@ void c128_state::c128(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( c128dcr )
+// machine_config( c128dcr )
//-------------------------------------------------
void c128_state::c128dcr(machine_config &config)
@@ -1809,7 +1809,7 @@ void c128_state::c128dcr(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( c128d81 )
+// machine_config( c128d81 )
//-------------------------------------------------
void c128_state::c128d81(machine_config &config)
@@ -1824,7 +1824,7 @@ void c128_state::c128d81(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( pal )
+// machine_config( pal )
//-------------------------------------------------
void c128_state::pal(machine_config &config)
@@ -1978,7 +1978,7 @@ void c128_state::pal(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( c128pal )
+// machine_config( c128pal )
//-------------------------------------------------
void c128_state::c128pal(machine_config &config)
@@ -1991,7 +1991,7 @@ void c128_state::c128pal(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( c128dcrp )
+// machine_config( c128dcrp )
//-------------------------------------------------
void c128_state::c128dcrp(machine_config &config)
diff --git a/src/mame/drivers/c64.cpp b/src/mame/drivers/c64.cpp
index 0344221dd7f..d532e00c410 100644
--- a/src/mame/drivers/c64.cpp
+++ b/src/mame/drivers/c64.cpp
@@ -1260,7 +1260,7 @@ void c64_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( ntsc )
+// machine_config( ntsc )
//-------------------------------------------------
void c64_state::ntsc(machine_config &config)
@@ -1380,7 +1380,7 @@ void c64_state::ntsc(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( pet64 )
+// machine_config( pet64 )
//-------------------------------------------------
void c64_state::pet64(machine_config &config)
@@ -1391,7 +1391,7 @@ void c64_state::pet64(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( ntsc_sx )
+// machine_config( ntsc_sx )
//-------------------------------------------------
void sx64_state::ntsc_sx(machine_config &config)
@@ -1409,7 +1409,7 @@ void sx64_state::ntsc_sx(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( ntsc_dx )
+// machine_config( ntsc_dx )
//-------------------------------------------------
void sx64_state::ntsc_dx(machine_config &config)
@@ -1422,7 +1422,7 @@ void sx64_state::ntsc_dx(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( ntsc_c )
+// machine_config( ntsc_c )
//-------------------------------------------------
void c64c_state::ntsc_c(machine_config &config)
@@ -1436,7 +1436,7 @@ void c64c_state::ntsc_c(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( pal )
+// machine_config( pal )
//-------------------------------------------------
void c64_state::pal(machine_config &config)
@@ -1556,7 +1556,7 @@ void c64_state::pal(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( pal_sx )
+// machine_config( pal_sx )
//-------------------------------------------------
void sx64_state::pal_sx(machine_config &config)
@@ -1574,7 +1574,7 @@ void sx64_state::pal_sx(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( pal_c )
+// machine_config( pal_c )
//-------------------------------------------------
void c64c_state::pal_c(machine_config &config)
@@ -1588,7 +1588,7 @@ void c64c_state::pal_c(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( pal_gs )
+// machine_config( pal_gs )
//-------------------------------------------------
void c64gs_state::pal_gs(machine_config &config)
diff --git a/src/mame/drivers/c64dtv.cpp b/src/mame/drivers/c64dtv.cpp
index d8843f8b1ec..ba115565d03 100644
--- a/src/mame/drivers/c64dtv.cpp
+++ b/src/mame/drivers/c64dtv.cpp
@@ -49,14 +49,15 @@ INPUT_PORTS_END
// MACHINE DRIVERS
//**************************************************************************
-MACHINE_CONFIG_START(c64dtv_state::c64dtv)
+void c64dtv_state::c64dtv(machine_config &config)
+{
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DRIVER(c64dtv_state, screen_update)
- MCFG_SCREEN_SIZE(640,480)
- MCFG_SCREEN_VISIBLE_AREA(0,639, 0,479)
- MCFG_SCREEN_REFRESH_RATE(30)
-MACHINE_CONFIG_END
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_screen_update(FUNC(c64dtv_state::screen_update));
+ screen.set_size(640,480);
+ screen.set_visarea_full();
+ screen.set_refresh_hz(30);
+}
diff --git a/src/mame/drivers/c65.cpp b/src/mame/drivers/c65.cpp
index 82a47b11fad..69d0e552db1 100644
--- a/src/mame/drivers/c65.cpp
+++ b/src/mame/drivers/c65.cpp
@@ -684,12 +684,12 @@ WRITE_LINE_MEMBER(c65_state::cia0_irq)
// c65_irq(state || m_vicirq);
}
-MACHINE_CONFIG_START(c65_state::c65)
-
+void c65_state::c65(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M4510, MAIN_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(c65_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", c65_state, vic3_vblank_irq)
+ M4510(config, m_maincpu, MAIN_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &c65_state::c65_map);
+ m_maincpu->set_vblank_int("screen", FUNC(c65_state::vic3_vblank_irq));
MOS6526(config, m_cia0, MAIN_CLOCK);
m_cia0->set_tod_clock(60);
@@ -707,14 +707,14 @@ MACHINE_CONFIG_START(c65_state::c65)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_UPDATE_DRIVER(c65_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*4, 910, 0, 640, 262, 0, 200) // mods needed
- 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));
+ m_screen->set_screen_update(FUNC(c65_state::screen_update));
+// m_screen->set_size(32*8, 32*8);
+// m_screen->set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ m_screen->set_raw(MAIN_CLOCK*4, 910, 0, 640, 262, 0, 200); // mods needed
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_c65);
@@ -727,7 +727,7 @@ MACHINE_CONFIG_START(c65_state::c65)
// software list
SOFTWARE_LIST(config, "flop_list").set_original("c65_flop");
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/cabaret.cpp b/src/mame/drivers/cabaret.cpp
index b4510bf9fc2..eaf24dac033 100644
--- a/src/mame/drivers/cabaret.cpp
+++ b/src/mame/drivers/cabaret.cpp
@@ -365,12 +365,13 @@ INTERRUPT_GEN_MEMBER(cabaret_state::cabaret_interrupt)
device.execute().pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
-MACHINE_CONFIG_START(cabaret_state::cabaret)
+void cabaret_state::cabaret(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z180, XTAL(12'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(cabaret_map)
- MCFG_DEVICE_IO_MAP(cabaret_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cabaret_state, cabaret_interrupt)
+ Z180(config, m_maincpu, XTAL(12'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cabaret_state::cabaret_map);
+ m_maincpu->set_addrmap(AS_IO, &cabaret_state::cabaret_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(cabaret_state::cabaret_interrupt));
i8255_device &ppi1(I8255(config, "ppi1"));
ppi1.in_pa_callback().set_ioport("BUTTONS2");
@@ -389,22 +390,21 @@ MACHINE_CONFIG_START(cabaret_state::cabaret)
ppi3.in_pc_callback().set_ioport("DSW2");
/* 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(cabaret_state, screen_update_cabaret)
- 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_full();
+ screen.set_screen_update(FUNC(cabaret_state::screen_update_cabaret));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cabaret);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x800);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("ymsnd", YM2413, XTAL(3'579'545))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ YM2413(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
void cabaret_state::init_cabaret()
diff --git a/src/mame/drivers/calchase.cpp b/src/mame/drivers/calchase.cpp
index 087b93dbda9..6d9f8322993 100644
--- a/src/mame/drivers/calchase.cpp
+++ b/src/mame/drivers/calchase.cpp
@@ -678,10 +678,10 @@ void calchase_state::machine_reset()
}
MACHINE_CONFIG_START(calchase_state::calchase)
- MCFG_DEVICE_ADD("maincpu", PENTIUM, 133000000) // Cyrix 686MX-PR200 CPU
- MCFG_DEVICE_PROGRAM_MAP(calchase_map)
- MCFG_DEVICE_IO_MAP(calchase_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
+ PENTIUM(config, m_maincpu, 133000000); // Cyrix 686MX-PR200 CPU
+ m_maincpu->set_addrmap(AS_PROGRAM, &calchase_state::calchase_map);
+ m_maincpu->set_addrmap(AS_IO, &calchase_state::calchase_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb));
pcat_common(config);
@@ -710,10 +710,10 @@ MACHINE_CONFIG_START(calchase_state::calchase)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(calchase_state::hostinv)
- MCFG_DEVICE_ADD("maincpu", PENTIUM, 133000000) // Cyrix 686MX-PR200 CPU
- MCFG_DEVICE_PROGRAM_MAP(calchase_map)
- MCFG_DEVICE_IO_MAP(calchase_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
+ PENTIUM(config, m_maincpu, 133000000); // Cyrix 686MX-PR200 CPU
+ m_maincpu->set_addrmap(AS_PROGRAM, &calchase_state::calchase_map);
+ m_maincpu->set_addrmap(AS_IO, &calchase_state::calchase_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb));
pcat_common(config);
diff --git a/src/mame/drivers/calcune.cpp b/src/mame/drivers/calcune.cpp
index 30b07a721b9..3ac491ca372 100644
--- a/src/mame/drivers/calcune.cpp
+++ b/src/mame/drivers/calcune.cpp
@@ -249,23 +249,23 @@ MACHINE_START_MEMBER(calcune_state,calcune)
m_vdp2->stop_timers();
}
-MACHINE_CONFIG_START(calcune_state::calcune)
- MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK_NTSC / 7) /* 7.67 MHz */
- MCFG_DEVICE_PROGRAM_MAP(calcune_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(calcune_state,genesis_int_callback)
+void calcune_state::calcune(machine_config &config)
+{
+ M68000(config, m_maincpu, MASTER_CLOCK_NTSC / 7); /* 7.67 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &calcune_state::calcune_map);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(calcune_state::genesis_int_callback));
- MCFG_DEVICE_ADD("z80", Z80, MASTER_CLOCK_NTSC / 15) /* 3.58 MHz */
- MCFG_DEVICE_DISABLE() /* no code is ever uploaded for the Z80, so it's unused here even if it is present on the PCB */
+ Z80(config, "z80", MASTER_CLOCK_NTSC / 15).set_disable(); /* 3.58 MHz, no code is ever uploaded for the Z80, so it's unused here even if it is present on the PCB */
MCFG_MACHINE_START_OVERRIDE(calcune_state,calcune)
MCFG_MACHINE_RESET_OVERRIDE(calcune_state,calcune)
- MCFG_SCREEN_ADD("megadriv", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) // Vblank handled manually.
- MCFG_SCREEN_SIZE(64*8, 620)
- MCFG_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(calcune_state, screen_update_calcune)
+ screen_device &screen(SCREEN(config, "megadriv", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); // Vblank handled manually.
+ screen.set_size(64*8, 620);
+ screen.set_visarea(0, 40*8-1, 0, 28*8-1);
+ screen.set_screen_update(FUNC(calcune_state::screen_update_calcune));
SEGA315_5313(config, m_vdp, MASTER_CLOCK_NTSC, m_maincpu);
m_vdp->set_is_pal(false);
@@ -293,7 +293,7 @@ MACHINE_CONFIG_START(calcune_state::calcune)
TIMER(config, "scantimer").configure_scanline("gen_vdp", FUNC(sega315_5313_device::megadriv_scanline_timer_callback_alt_timing), "megadriv", 0, 1);
TIMER(config, "scantimer2").configure_scanline("gen_vdp2", FUNC(sega315_5313_device::megadriv_scanline_timer_callback_alt_timing), "megadriv", 0, 1);
- MCFG_PALETTE_ADD("palette", 0xc0*2)
+ PALETTE(config, m_palette).set_entries(0xc0*2);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -301,10 +301,10 @@ MACHINE_CONFIG_START(calcune_state::calcune)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymz", YMZ280B, XTAL(16'934'400))
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL(16'934'400)));
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(1, "rspeaker", 1.0);
+}
void calcune_state::init_calcune()
{
diff --git a/src/mame/drivers/calomega.cpp b/src/mame/drivers/calomega.cpp
index ebc3b18c442..7ab70433082 100644
--- a/src/mame/drivers/calomega.cpp
+++ b/src/mame/drivers/calomega.cpp
@@ -2570,7 +2570,8 @@ WRITE_LINE_MEMBER(calomega_state::write_acia_clock)
* Machine Drivers *
*************************************************/
-MACHINE_CONFIG_START(calomega_state::sys903)
+void calomega_state::sys903(machine_config &config)
+{
/* basic machine hardware */
M6502(config, m_maincpu, CPU_CLOCK); /* confirmed */
m_maincpu->set_addrmap(AS_PROGRAM, &calomega_state::sys903_map);
@@ -2588,13 +2589,13 @@ MACHINE_CONFIG_START(calomega_state::sys903)
m_pia[1]->writepb_handler().set(FUNC(calomega_state::s903_mux_w));
/* 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, 31*8-1) /* Taken from MC6845 init, registers 01 & 06 */
- MCFG_SCREEN_UPDATE_DRIVER(calomega_state, screen_update_calomega)
- 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, (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, 31*8-1); /* Taken from MC6845 init, registers 01 & 06 */
+ screen.set_screen_update(FUNC(calomega_state::screen_update_calomega));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_calomega);
PALETTE(config, m_palette, FUNC(calomega_state::calomega_palette), 256); // or 128? is the upper half of the PROMs really valid colors?
@@ -2616,7 +2617,7 @@ MACHINE_CONFIG_START(calomega_state::sys903)
clock_device &aciabaud(CLOCK(config, "aciabaud", UART_CLOCK));
aciabaud.signal_handler().set(FUNC(calomega_state::write_acia_clock));
-MACHINE_CONFIG_END
+}
void calomega_state::s903mod(machine_config &config)
diff --git a/src/mame/drivers/calorie.cpp b/src/mame/drivers/calorie.cpp
index 7f834415829..5d3236a7d39 100644
--- a/src/mame/drivers/calorie.cpp
+++ b/src/mame/drivers/calorie.cpp
@@ -465,28 +465,28 @@ void calorie_state::machine_reset()
}
-MACHINE_CONFIG_START(calorie_state::calorie)
-
+void calorie_state::calorie(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,4000000) /* 4 MHz */
- MCFG_DEVICE_PROGRAM_MAP(calorie_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", calorie_state, irq0_line_hold)
+ Z80(config, m_maincpu, 4000000); /* 4 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &calorie_state::calorie_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &calorie_state::decrypted_opcodes_map);
+ m_maincpu->set_vblank_int("screen", FUNC(calorie_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80,3000000) /* 3 MHz */
- MCFG_DEVICE_PROGRAM_MAP(calorie_sound_map)
- MCFG_DEVICE_IO_MAP(calorie_sound_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(calorie_state, irq0_line_hold, 64)
+ z80_device &audiocpu(Z80(config, "audiocpu", 3000000)); /* 3 MHz */
+ audiocpu.set_addrmap(AS_PROGRAM, &calorie_state::calorie_sound_map);
+ audiocpu.set_addrmap(AS_IO, &calorie_state::calorie_sound_io_map);
+ audiocpu.set_periodic_int(FUNC(calorie_state::irq0_line_hold), attotime::from_hz(64));
/* 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(calorie_state, screen_update_calorie)
- 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(calorie_state::screen_update_calorie));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_calorie);
PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 0x100);
@@ -501,7 +501,7 @@ MACHINE_CONFIG_START(calorie_state::calorie)
YM2149(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "mono", 0.8);
YM2149(config, "ay3", 1500000).add_route(ALL_OUTPUTS, "mono", 0.8);
-MACHINE_CONFIG_END
+}
void calorie_state::caloriee(machine_config &config)
{
diff --git a/src/mame/drivers/camplynx.cpp b/src/mame/drivers/camplynx.cpp
index be69800ca53..4252753af13 100644
--- a/src/mame/drivers/camplynx.cpp
+++ b/src/mame/drivers/camplynx.cpp
@@ -867,7 +867,8 @@ void camplynx_state::lynx_disk(machine_config &config)
FLOPPY_CONNECTOR(config, m_floppy1, camplynx_floppies, "525qd", camplynx_state::camplynx_floppy_formats).enable_sound(true);
}
-MACHINE_CONFIG_START(camplynx_state::lynx48k)
+void camplynx_state::lynx48k(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, 24_MHz_XTAL / 6);
m_maincpu->set_addrmap(AS_PROGRAM, &camplynx_state::lynx48k_mem);
@@ -876,12 +877,12 @@ MACHINE_CONFIG_START(camplynx_state::lynx48k)
MCFG_MACHINE_RESET_OVERRIDE(camplynx_state, lynx48k)
/* 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, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 511, 0, 479)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_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(512, 480);
+ screen.set_visarea_full();
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
lynx_common(config);
@@ -900,7 +901,7 @@ MACHINE_CONFIG_START(camplynx_state::lynx48k)
/* software lists */
SOFTWARE_LIST(config, "cass_list").set_original("camplynx_cass");
-MACHINE_CONFIG_END
+}
void camplynx_state::lynx96k(machine_config &config)
{
@@ -914,7 +915,8 @@ void camplynx_state::lynx96k(machine_config &config)
SOFTWARE_LIST(config, "flop_list").set_original("camplynx_flop").set_filter("96K");
}
-MACHINE_CONFIG_START(camplynx_state::lynx128k)
+void camplynx_state::lynx128k(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, 24_MHz_XTAL / 4);
m_maincpu->set_addrmap(AS_PROGRAM, &camplynx_state::lynx128k_mem);
@@ -923,12 +925,12 @@ MACHINE_CONFIG_START(camplynx_state::lynx128k)
MCFG_MACHINE_RESET_OVERRIDE(camplynx_state, lynx128k)
/* 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, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 511, 0, 479)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_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(512, 480);
+ screen.set_visarea_full();
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
lynx_common(config);
@@ -950,7 +952,7 @@ MACHINE_CONFIG_START(camplynx_state::lynx128k)
/* software lists */
SOFTWARE_LIST(config, "cass_list").set_original("camplynx_cass");
SOFTWARE_LIST(config, "flop_list").set_original("camplynx_flop").set_filter("128K");
-MACHINE_CONFIG_END
+}
void camplynx_state::init_lynx48k()
{
diff --git a/src/mame/drivers/candela.cpp b/src/mame/drivers/candela.cpp
index 471b9a0c9bc..09528cc6d03 100644
--- a/src/mame/drivers/candela.cpp
+++ b/src/mame/drivers/candela.cpp
@@ -714,9 +714,10 @@ void can09t_state::can09t(machine_config &config)
#define CAN09_X1_CLOCK 22.1184_MHz_XTAL /* UKI 22118.40 Khz */
#define CAN09_CPU_CLOCK (CAN09_X1_CLOCK / 16) /* ~1.38MHz Divider needs to be check but is the most likelly */
-MACHINE_CONFIG_START(can09_state::can09)
- MCFG_DEVICE_ADD("maincpu", MC6809E, CAN09_CPU_CLOCK) // MC68A09EP
- MCFG_DEVICE_PROGRAM_MAP(can09_map)
+void can09_state::can09(machine_config &config)
+{
+ MC6809E(config, m_maincpu, CAN09_CPU_CLOCK); // MC68A09EP
+ m_maincpu->set_addrmap(AS_PROGRAM, &can09_state::can09_map);
/* RAM banks */
RAM(config, RAM_TAG).set_default_size("768K");
@@ -752,11 +753,11 @@ MACHINE_CONFIG_START(can09_state::can09)
/* screen - totally faked value for now */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_RAW_PARAMS(4_MHz_XTAL / 2, 512, 0, 512, 576, 0, 576)
- MCFG_SCREEN_UPDATE_DRIVER(can09_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_raw(4_MHz_XTAL / 2, 512, 0, 512, 576, 0, 576);
+ screen.set_screen_update(FUNC(can09_state::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
/* Floppy */
@@ -782,11 +783,11 @@ MACHINE_CONFIG_START(can09_state::can09)
/* 0xFF93 0xE034 (PIA1 Port B) = 0x18 - Write Data on Port B */
#if 1
- MCFG_DEVICE_ADD(PIA2_TAG, PIA6821, 0) // CPU board
- MCFG_DEVICE_ADD("acia1", ACIA6850, 0) // CPU board
- MCFG_DEVICE_ADD("acia2", ACIA6850, 0) // CPU board
+ PIA6821(config, PIA2_TAG, 0); // CPU board
+ ACIA6850(config, "acia1", 0); // CPU board
+ ACIA6850(config, "acia2", 0); // CPU board
#endif
-MACHINE_CONFIG_END
+}
ROM_START( can09t ) /* The smaller grey computer */
ROM_REGION(0x10000, "roms", 0)
diff --git a/src/mame/drivers/canon_s80.cpp b/src/mame/drivers/canon_s80.cpp
index ab08eab9614..d103fa2cfcc 100644
--- a/src/mame/drivers/canon_s80.cpp
+++ b/src/mame/drivers/canon_s80.cpp
@@ -39,11 +39,12 @@ void canons80_state::canons80_map(address_map &map)
map(0x8000, 0xffff).rom();
}
-MACHINE_CONFIG_START(canons80_state::canons80)
+void canons80_state::canons80(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", HD6301, 5000000) /* hd63a01xop 5 MHz guessed: TODO: check on PCB */
- MCFG_DEVICE_PROGRAM_MAP(canons80_map)
-MACHINE_CONFIG_END
+ hd6301_cpu_device &maincpu(HD6301(config, "maincpu", 5000000)); /* hd63a01xop 5 MHz guessed: TODO: check on PCB */
+ maincpu.set_addrmap(AS_PROGRAM, &canons80_state::canons80_map);
+}
void canons80_state::init_canons80()
{
diff --git a/src/mame/drivers/canyon.cpp b/src/mame/drivers/canyon.cpp
index 340b7c3e99d..22e5d3b0822 100644
--- a/src/mame/drivers/canyon.cpp
+++ b/src/mame/drivers/canyon.cpp
@@ -239,11 +239,11 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(canyon_state::canyon)
-
+void canyon_state::canyon(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 12.096_MHz_XTAL / 16)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M6502(config, m_maincpu, 12.096_MHz_XTAL / 16);
+ m_maincpu->set_addrmap(AS_PROGRAM, &canyon_state::main_map);
F9334(config, m_outlatch); // C7
m_outlatch->q_out_cb<0>().set("discrete", FUNC(discrete_device::write_line<CANYON_WHISTLE1_EN>));
@@ -256,11 +256,11 @@ MACHINE_CONFIG_START(canyon_state::canyon)
WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(12.096_MHz_XTAL / 2, 384, 0, 256, 262, 0, 240) // HSYNC = 15,750 Hz
- MCFG_SCREEN_UPDATE_DRIVER(canyon_state, screen_update_canyon)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", m6502_device::NMI_LINE))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(12.096_MHz_XTAL / 2, 384, 0, 256, 262, 0, 240); // HSYNC = 15,750 Hz
+ screen.set_screen_update(FUNC(canyon_state::screen_update_canyon));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set_inputline(m_maincpu, m6502_device::NMI_LINE);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_canyon);
PALETTE(config, m_palette, FUNC(canyon_state::canyon_palette), 4);
@@ -269,10 +269,10 @@ MACHINE_CONFIG_START(canyon_state::canyon)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("discrete", DISCRETE, canyon_discrete)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ DISCRETE(config, m_discrete, canyon_discrete);
+ m_discrete->add_route(0, "lspeaker", 1.0);
+ m_discrete->add_route(1, "rspeaker", 1.0);
+}
diff --git a/src/mame/drivers/capbowl.cpp b/src/mame/drivers/capbowl.cpp
index 63dc7f8bf21..4475eb512b2 100644
--- a/src/mame/drivers/capbowl.cpp
+++ b/src/mame/drivers/capbowl.cpp
@@ -316,30 +316,30 @@ void capbowl_state::machine_reset()
}
-MACHINE_CONFIG_START(capbowl_state::capbowl)
-
+void capbowl_state::capbowl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, MASTER_CLOCK / 4) // MC68B09EP
- MCFG_DEVICE_PROGRAM_MAP(capbowl_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", capbowl_state, interrupt)
+ MC6809E(config, m_maincpu, MASTER_CLOCK / 4); // MC68B09EP
+ m_maincpu->set_addrmap(AS_PROGRAM, &capbowl_state::capbowl_map);
+ m_maincpu->set_vblank_int("screen", FUNC(capbowl_state::interrupt));
// watchdog: 555 timer 16 cycles, edge triggered, ~0.3s
attotime const period = PERIOD_OF_555_ASTABLE(100000.0, 100000.0, 0.1e-6);
WATCHDOG_TIMER(config, m_watchdog).set_time(period * 16 - period / 2);
- MCFG_DEVICE_ADD("audiocpu", MC6809E, MASTER_CLOCK / 4) // MC68B09EP
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ MC6809E(config, m_audiocpu, MASTER_CLOCK / 4); // MC68B09EP
+ m_audiocpu->set_addrmap(AS_PROGRAM, &capbowl_state::sound_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_RANDOM);
TICKET_DISPENSER(config, "ticket", attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_SIZE(360, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 359, 0, 244)
- MCFG_SCREEN_REFRESH_RATE(57)
- MCFG_SCREEN_UPDATE_DRIVER(capbowl_state, screen_update)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_size(360, 256);
+ m_screen->set_visarea(0, 359, 0, 244);
+ m_screen->set_refresh_hz(57);
+ m_screen->set_screen_update(FUNC(capbowl_state::screen_update));
TMS34061(config, m_tms34061, 0);
m_tms34061->set_rowshift(8); /* VRAM address is (row << rowshift) | col */
@@ -364,21 +364,20 @@ MACHINE_CONFIG_START(capbowl_state::capbowl)
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(capbowl_state::bowlrama)
+void capbowl_state::bowlrama(machine_config &config)
+{
capbowl(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(bowlrama_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &capbowl_state::bowlrama_map);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 359, 0, 239)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0, 359, 0, 239);
+}
diff --git a/src/mame/drivers/capcom.cpp b/src/mame/drivers/capcom.cpp
index 5bfc2af9c90..9ce5ced5903 100644
--- a/src/mame/drivers/capcom.cpp
+++ b/src/mame/drivers/capcom.cpp
@@ -46,11 +46,12 @@ void capcom_state::init_capcom()
{
}
-MACHINE_CONFIG_START(capcom_state::capcom)
+void capcom_state::capcom(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 16670000) // M68306
- MCFG_DEVICE_PROGRAM_MAP(capcom_map)
-MACHINE_CONFIG_END
+ M68000(config, m_maincpu, 16670000); // M68306
+ m_maincpu->set_addrmap(AS_PROGRAM, &capcom_state::capcom_map);
+}
/*-------------------------------------------------------------------
/ Airborne (03/96)
diff --git a/src/mame/drivers/caprcyc.cpp b/src/mame/drivers/caprcyc.cpp
index ef07509a8f3..c4debe1e3b6 100644
--- a/src/mame/drivers/caprcyc.cpp
+++ b/src/mame/drivers/caprcyc.cpp
@@ -63,17 +63,17 @@ INPUT_PORTS_END
***************************************************************************/
-MACHINE_CONFIG_START(caprcyc_state::caprcyc)
-
+void caprcyc_state::caprcyc(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", VR4300BE, 100000000) // cpu configuration is unknown
- MCFG_DEVICE_PROGRAM_MAP(caprcyc_map)
+ VR4300BE(config, m_maincpu, 100000000); // cpu configuration is unknown
+ m_maincpu->set_addrmap(AS_PROGRAM, &caprcyc_state::caprcyc_map);
/* no video! */
/* sound hardware */
//..
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/cardline.cpp b/src/mame/drivers/cardline.cpp
index 2b41aedbbf6..a9eeb335eda 100644
--- a/src/mame/drivers/cardline.cpp
+++ b/src/mame/drivers/cardline.cpp
@@ -326,8 +326,8 @@ void cardline_state::cardline_palette(palette_device &palette) const
}
}
-MACHINE_CONFIG_START(cardline_state::cardline)
-
+void cardline_state::cardline(machine_config &config)
+{
/* basic machine hardware */
I80C32(config, m_maincpu, MASTER_CLOCK);
m_maincpu->set_port_forced_input(1, 0x10);
@@ -338,14 +338,14 @@ MACHINE_CONFIG_START(cardline_state::cardline)
//m_maincpu->set_vblank_int("screen", FUNC(cardline_state::irq1_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, 35*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1)
- //MCFG_SCREEN_UPDATE_DRIVER(cardline_state, screen_update_cardline)
- //MCFG_SCREEN_PALETTE(m_palette)
- 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(64*8, 35*8);
+ screen.set_visarea(0*8, 64*8-1, 0*8, 32*8-1);
+ //screen.set_screen_update(FUNC(cardline_state::screen_update_cardline));
+ //screen.set_palette(m_palette);
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cardline);
PALETTE(config, m_palette, FUNC(cardline_state::cardline_palette), 512);
@@ -365,11 +365,10 @@ MACHINE_CONFIG_START(cardline_state::cardline)
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_device &oki(OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified
+ oki.add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ oki.add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+}
/***************************************************************************
diff --git a/src/mame/drivers/carjmbre.cpp b/src/mame/drivers/carjmbre.cpp
index 57be932e911..e482a16d989 100644
--- a/src/mame/drivers/carjmbre.cpp
+++ b/src/mame/drivers/carjmbre.cpp
@@ -356,25 +356,25 @@ static GFXDECODE_START( gfx_carjmbre )
GFXDECODE_END
-MACHINE_CONFIG_START(carjmbre_state::carjmbre)
-
+void carjmbre_state::carjmbre(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000)/6)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", carjmbre_state, vblank_nmi)
+ Z80(config, m_maincpu, XTAL(18'432'000)/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &carjmbre_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(carjmbre_state::vblank_nmi));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(18'432'000)/6/2)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_io_map)
+ Z80(config, m_audiocpu, XTAL(18'432'000)/6/2);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &carjmbre_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &carjmbre_state::sound_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_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(carjmbre_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(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(carjmbre_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_carjmbre);
PALETTE(config, m_palette, FUNC(carjmbre_state::carjmbre_palette), 64);
@@ -387,7 +387,7 @@ MACHINE_CONFIG_START(carjmbre_state::carjmbre)
AY8910(config, "ay1", XTAL(18'432'000)/6/2).add_route(ALL_OUTPUTS, "mono", 0.25);
AY8910(config, "ay2", XTAL(18'432'000)/6/2).add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/carpolo.cpp b/src/mame/drivers/carpolo.cpp
index 07f3b2906e9..3063e809d50 100644
--- a/src/mame/drivers/carpolo.cpp
+++ b/src/mame/drivers/carpolo.cpp
@@ -231,8 +231,8 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(carpolo_state::carpolo)
-
+void carpolo_state::carpolo(machine_config &config)
+{
/* basic machine hardware */
M6502(config, m_maincpu, XTAL(11'289'000)/12); /* 940.75 kHz */
m_maincpu->set_addrmap(AS_PROGRAM, &carpolo_state::main_map);
@@ -279,18 +279,18 @@ MACHINE_CONFIG_START(carpolo_state::carpolo)
m_ttl74153_1k->zb_cb().set(FUNC(carpolo_state::ls153_zb_w)); // pia1 pb4
/* 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, 239, 0, 255)
- MCFG_SCREEN_UPDATE_DRIVER(carpolo_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, carpolo_state, screen_vblank))
- 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, 256);
+ screen.set_visarea(0, 239, 0, 255);
+ screen.set_screen_update(FUNC(carpolo_state::screen_update));
+ screen.screen_vblank().set(FUNC(carpolo_state::screen_vblank));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_carpolo);
PALETTE(config, m_palette, FUNC(carpolo_state::carpolo_palette), 12*2+2*16+4*2);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/carrera.cpp b/src/mame/drivers/carrera.cpp
index 6ba9a74ecc3..5cccb69c5c6 100644
--- a/src/mame/drivers/carrera.cpp
+++ b/src/mame/drivers/carrera.cpp
@@ -315,20 +315,21 @@ void carrera_state::carrera_palette(palette_device &palette) const
}
-MACHINE_CONFIG_START(carrera_state::carrera)
+void carrera_state::carrera(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK / 6)
- MCFG_DEVICE_PROGRAM_MAP(carrera_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ Z80(config, m_maincpu, MASTER_CLOCK / 6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &carrera_state::carrera_map);
+ m_maincpu->set_addrmap(AS_IO, &carrera_state::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(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(carrera_state, screen_update_carrera)
- 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_full();
+ screen.set_screen_update(FUNC(carrera_state::screen_update_carrera));
+ screen.set_palette(m_palette);
mc6845_device &crtc(MC6845(config, "crtc", MASTER_CLOCK / 16));
crtc.set_screen("screen");
@@ -347,7 +348,7 @@ MACHINE_CONFIG_START(carrera_state::carrera)
aysnd.port_a_read_callback().set(FUNC(carrera_state::unknown_r));
aysnd.port_b_read_callback().set(FUNC(carrera_state::unknown_r));
aysnd.add_route(ALL_OUTPUTS, "mono", 1.00);
-MACHINE_CONFIG_END
+}
ROM_START( carrera )
diff --git a/src/mame/drivers/casloopy.cpp b/src/mame/drivers/casloopy.cpp
index 417a3ceca75..a11cf3b67c6 100644
--- a/src/mame/drivers/casloopy.cpp
+++ b/src/mame/drivers/casloopy.cpp
@@ -520,24 +520,23 @@ DEVICE_IMAGE_LOAD_MEMBER( casloopy_state, loopy_cart )
MACHINE_CONFIG_START(casloopy_state::casloopy)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",SH2A,8000000)
- MCFG_DEVICE_PROGRAM_MAP(casloopy_map)
+ SH2A(config, m_maincpu, 8000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &casloopy_state::casloopy_map);
-// MCFG_DEVICE_ADD("subcpu",V60,8000000)
-// MCFG_DEVICE_PROGRAM_MAP(casloopy_sub_map)
+// v60_device &subcpu(V60(config, "subcpu", 8000000));
+// subcpu.set_addrmap(AS_PROGRAM, &casloopy_state::casloopy_sub_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(8000000, 444, 0, 256, 263, 0, 224)
-
-// MCFG_SCREEN_REFRESH_RATE(60)
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
-// MCFG_SCREEN_SIZE(444, 263)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(casloopy_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 512)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(8000000, 444, 0, 256, 263, 0, 224);
+// m_screen->set_refresh_hz(60);
+// m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+// m_screen->set_size(444, 263);
+// m_screen->set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ m_screen->set_screen_update(FUNC(casloopy_state::screen_update));
+ m_screen->set_palette(m_palette);
+
+ PALETTE(config, m_palette).set_entries(512);
GFXDECODE(config, m_gfxdecode, m_palette, gfxdecode_device::empty);
diff --git a/src/mame/drivers/castle.cpp b/src/mame/drivers/castle.cpp
index 1ab9a1b4209..7a10dfd8331 100644
--- a/src/mame/drivers/castle.cpp
+++ b/src/mame/drivers/castle.cpp
@@ -84,13 +84,14 @@ static INPUT_PORTS_START( castrev )
INPUT_PORTS_END
-MACHINE_CONFIG_START(castle_state::castle_V1rvE)
- MCFG_DEVICE_ADD("maincpu", HD6303Y, 1000000)
- MCFG_DEVICE_PROGRAM_MAP(V1rvE_mastermap)
+void castle_state::castle_V1rvE(machine_config &config)
+{
+ HD6303Y(config, m_maincpu, 1000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &castle_state::V1rvE_mastermap);
- MCFG_DEVICE_ADD("slavecpu", HD6303Y, 1000000)
- MCFG_DEVICE_PROGRAM_MAP(V1rvE_slavemap)
-MACHINE_CONFIG_END
+ hd6303y_cpu_device &slavecpu(HD6303Y(config, "slavecpu", 1000000));
+ slavecpu.set_addrmap(AS_PROGRAM, &castle_state::V1rvE_slavemap);
+}
@@ -102,12 +103,13 @@ void castle_state::V2rvA_map(address_map &map)
}
-MACHINE_CONFIG_START(castle_state::castle_V2rvA)
- MCFG_DEVICE_ADD("maincpu", HD6303Y, 1000000)
- MCFG_DEVICE_PROGRAM_MAP(V2rvA_map)
+void castle_state::castle_V2rvA(machine_config &config)
+{
+ HD6303Y(config, m_maincpu, 1000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &castle_state::V2rvA_map);
- MCFG_DEVICE_ADD("pia", PIA6821)
-MACHINE_CONFIG_END
+ PIA6821(config, "pia");
+}
ROM_START( castrev )
diff --git a/src/mame/drivers/caswin.cpp b/src/mame/drivers/caswin.cpp
index d9dffa9b6fd..36dd70252f3 100644
--- a/src/mame/drivers/caswin.cpp
+++ b/src/mame/drivers/caswin.cpp
@@ -333,21 +333,22 @@ void caswin_state::caswin_palette(palette_device &palette) const
}
-MACHINE_CONFIG_START(caswin_state::vvillage)
+void caswin_state::vvillage(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* ? MHz */
- MCFG_DEVICE_PROGRAM_MAP(vvillage_mem)
- MCFG_DEVICE_IO_MAP(vvillage_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", caswin_state, irq0_line_hold)
+ Z80(config, m_maincpu, 4000000); /* ? MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &caswin_state::vvillage_mem);
+ m_maincpu->set_addrmap(AS_IO, &caswin_state::vvillage_io);
+ m_maincpu->set_vblank_int("screen", FUNC(caswin_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(caswin_state, screen_update_vvillage)
- 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(caswin_state::screen_update_vvillage));
+ screen.set_palette("palette");
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -360,7 +361,7 @@ MACHINE_CONFIG_START(caswin_state::vvillage)
aysnd.port_a_read_callback().set_ioport("DSW1");
aysnd.port_b_read_callback().set_ioport("DSW2");
aysnd.add_route(ALL_OUTPUTS, "mono", 0.40);
-MACHINE_CONFIG_END
+}
ROM_START( caswin )
ROM_REGION( 0x8000, "maincpu", 0 )
diff --git a/src/mame/drivers/cat.cpp b/src/mame/drivers/cat.cpp
index 95bb7baffc5..8fb88335a64 100644
--- a/src/mame/drivers/cat.cpp
+++ b/src/mame/drivers/cat.cpp
@@ -1054,23 +1054,23 @@ WRITE_LINE_MEMBER(cat_state::prn_ack_ff) // switch the flipflop state on the ris
#endif
}
-MACHINE_CONFIG_START(cat_state::cat)
-
+void cat_state::cat(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",M68000, XTAL(19'968'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(cat_mem)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(cat_state,cat_int_ack)
+ M68000(config, m_maincpu, XTAL(19'968'000)/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cat_state::cat_mem);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(cat_state::cat_int_ack));
MCFG_MACHINE_START_OVERRIDE(cat_state,cat)
MCFG_MACHINE_RESET_OVERRIDE(cat_state,cat)
/* 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(672, 344)
- MCFG_SCREEN_VISIBLE_AREA(0, 672-1, 0, 344-1)
- MCFG_SCREEN_UPDATE_DRIVER(cat_state, screen_update_cat)
+ 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(672, 344);
+ screen.set_visarea_full();
+ screen.set_screen_update(FUNC(cat_state::screen_update_cat));
MCFG_VIDEO_START_OVERRIDE(cat_state,cat)
@@ -1091,7 +1091,7 @@ MACHINE_CONFIG_START(cat_state::cat)
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 1.00);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
ROM_START( cat )
ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASEFF )
diff --git a/src/mame/drivers/cavepc.cpp b/src/mame/drivers/cavepc.cpp
index b5d03cd967a..56455c256db 100644
--- a/src/mame/drivers/cavepc.cpp
+++ b/src/mame/drivers/cavepc.cpp
@@ -112,23 +112,24 @@ void cavepc_state::machine_reset()
membank("bank1")->set_base(memregion("bios")->base() + 0x30000);
}
-MACHINE_CONFIG_START(cavepc_state::cavepc)
+void cavepc_state::cavepc(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", PENTIUM3, 200000000) /* AMD Athlon 64 X2 5050e Brisbane 2.60GHz, 1024KB L2 Cache ! */
- MCFG_DEVICE_PROGRAM_MAP(cavepc_map)
- MCFG_DEVICE_IO_MAP(cavepc_io)
+ PENTIUM3(config, m_maincpu, 200000000); /* AMD Athlon 64 X2 5050e Brisbane 2.60GHz, 1024KB L2 Cache ! */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cavepc_state::cavepc_map);
+ m_maincpu->set_addrmap(AS_IO, &cavepc_state::cavepc_io);
/* 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, 639, 0, 199)
- MCFG_SCREEN_UPDATE_DRIVER(cavepc_state, screen_update_cavepc)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 16)
-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, 639, 0, 199);
+ screen.set_screen_update(FUNC(cavepc_state::screen_update_cavepc));
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette").set_entries(16);
+}
diff --git a/src/mame/drivers/cball.cpp b/src/mame/drivers/cball.cpp
index 37c9e8f1426..31cfcddf6fe 100644
--- a/src/mame/drivers/cball.cpp
+++ b/src/mame/drivers/cball.cpp
@@ -264,27 +264,27 @@ static GFXDECODE_START( gfx_cball )
GFXDECODE_END
-MACHINE_CONFIG_START(cball_state::cball)
-
+void cball_state::cball(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6800, XTAL(12'096'000) / 16) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(cpu_map)
+ M6800(config, m_maincpu, XTAL(12'096'000) / 16); /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cball_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(cball_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(cball_state::screen_update));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cball);
PALETTE(config, m_palette, FUNC(cball_state::cball_palette), 6);
/* sound hardware */
-MACHINE_CONFIG_END
+}
ROM_START( cball )
diff --git a/src/mame/drivers/cbasebal.cpp b/src/mame/drivers/cbasebal.cpp
index 8c22084cf2f..84cb59ac879 100644
--- a/src/mame/drivers/cbasebal.cpp
+++ b/src/mame/drivers/cbasebal.cpp
@@ -261,26 +261,26 @@ void cbasebal_state::machine_reset()
m_scroll_y[1] = 0;
}
-MACHINE_CONFIG_START(cbasebal_state::cbasebal)
-
+void cbasebal_state::cbasebal(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 6000000) /* ??? */
- MCFG_DEVICE_PROGRAM_MAP(cbasebal_map)
- MCFG_DEVICE_IO_MAP(cbasebal_portmap)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cbasebal_state, irq0_line_hold) /* ??? */
+ Z80(config, m_maincpu, 6000000); /* ??? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cbasebal_state::cbasebal_map);
+ m_maincpu->set_addrmap(AS_IO, &cbasebal_state::cbasebal_portmap);
+ m_maincpu->set_addrmap(AS_OPCODES, &cbasebal_state::decrypted_opcodes_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cbasebal_state::irq0_line_hold)); /* ??? */
EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(8*8, (64-8)*8-1, 2*8, 30*8-1 )
- MCFG_SCREEN_UPDATE_DRIVER(cbasebal_state, screen_update_cbasebal)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(8*8, (64-8)*8-1, 2*8, 30*8-1 );
+ screen.set_screen_update(FUNC(cbasebal_state::screen_update_cbasebal));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cbasebal);
@@ -289,12 +289,10 @@ MACHINE_CONFIG_START(cbasebal_state::cbasebal)
/* 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", 0.50)
+ OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.50); // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADD("ymsnd", YM2413, 3579545)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ YM2413(config, "ymsnd", 3579545).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp
index b208483c91c..069ee861e7e 100644
--- a/src/mame/drivers/cbm2.cpp
+++ b/src/mame/drivers/cbm2.cpp
@@ -2219,7 +2219,7 @@ MACHINE_RESET_MEMBER( p500_state, p500 )
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( 128k )
+// machine_config( 128k )
//-------------------------------------------------
void cbm2_state::_128k(machine_config &config)
@@ -2229,7 +2229,7 @@ void cbm2_state::_128k(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( 256k )
+// machine_config( 256k )
//-------------------------------------------------
void cbm2_state::_256k(machine_config &config)
@@ -2239,7 +2239,7 @@ void cbm2_state::_256k(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( p500_ntsc )
+// machine_config( p500_ntsc )
//-------------------------------------------------
void p500_state::p500_ntsc(machine_config &config)
@@ -2376,7 +2376,7 @@ void p500_state::p500_ntsc(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( p500_pal )
+// machine_config( p500_pal )
//-------------------------------------------------
void p500_state::p500_pal(machine_config &config)
@@ -2510,7 +2510,7 @@ void p500_state::p500_pal(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( cbm2lp_ntsc )
+// machine_config( cbm2lp_ntsc )
//-------------------------------------------------
void cbm2_state::cbm2lp_ntsc(machine_config &config)
@@ -2640,7 +2640,7 @@ void cbm2_state::cbm2lp_ntsc(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( b128 )
+// machine_config( b128 )
//-------------------------------------------------
void cbm2_state::b128(machine_config &config)
@@ -2651,7 +2651,7 @@ void cbm2_state::b128(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( b256 )
+// machine_config( b256 )
//-------------------------------------------------
void cbm2_state::b256(machine_config &config)
@@ -2662,7 +2662,7 @@ void cbm2_state::b256(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( cbm2lp_pal )
+// machine_config( cbm2lp_pal )
//-------------------------------------------------
void cbm2_state::cbm2lp_pal(machine_config &config)
@@ -2674,7 +2674,7 @@ void cbm2_state::cbm2lp_pal(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( cbm610 )
+// machine_config( cbm610 )
//-------------------------------------------------
void cbm2_state::cbm610(machine_config &config)
@@ -2685,7 +2685,7 @@ void cbm2_state::cbm610(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( cbm620 )
+// machine_config( cbm620 )
//-------------------------------------------------
void cbm2_state::cbm620(machine_config &config)
@@ -2696,7 +2696,7 @@ void cbm2_state::cbm620(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( cbm2hp_ntsc )
+// machine_config( cbm2hp_ntsc )
//-------------------------------------------------
void cbm2_state::cbm2hp_ntsc(machine_config &config)
@@ -2707,7 +2707,7 @@ void cbm2_state::cbm2hp_ntsc(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( b128hp )
+// machine_config( b128hp )
//-------------------------------------------------
void cbm2hp_state::b128hp(machine_config &config)
@@ -2718,7 +2718,7 @@ void cbm2hp_state::b128hp(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( b256hp )
+// machine_config( b256hp )
//-------------------------------------------------
void cbm2hp_state::b256hp(machine_config &config)
@@ -2729,7 +2729,7 @@ void cbm2hp_state::b256hp(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( bx256hp )
+// machine_config( bx256hp )
//-------------------------------------------------
void cbm2hp_state::bx256hp(machine_config &config)
@@ -2763,7 +2763,7 @@ void cbm2hp_state::bx256hp(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( cbm2hp_pal )
+// machine_config( cbm2hp_pal )
//-------------------------------------------------
void cbm2_state::cbm2hp_pal(machine_config &config)
@@ -2778,7 +2778,7 @@ void cbm2_state::cbm2hp_pal(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( cbm710 )
+// machine_config( cbm710 )
//-------------------------------------------------
void cbm2hp_state::cbm710(machine_config &config)
@@ -2789,7 +2789,7 @@ void cbm2hp_state::cbm710(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( cbm720 )
+// machine_config( cbm720 )
//-------------------------------------------------
void cbm2hp_state::cbm720(machine_config &config)
@@ -2800,7 +2800,7 @@ void cbm2hp_state::cbm720(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( cbm730 )
+// machine_config( cbm730 )
//-------------------------------------------------
void cbm2hp_state::cbm730(machine_config &config)
diff --git a/src/mame/drivers/cbuster.cpp b/src/mame/drivers/cbuster.cpp
index 188da21cdcf..6bfd645ed19 100644
--- a/src/mame/drivers/cbuster.cpp
+++ b/src/mame/drivers/cbuster.cpp
@@ -299,23 +299,23 @@ void cbuster_state::machine_reset()
m_pri = 0;
}
-MACHINE_CONFIG_START(cbuster_state::twocrude)
-
+void cbuster_state::twocrude(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000)/2) /* Custom chip 59 @ 12MHz Verified */
- MCFG_DEVICE_PROGRAM_MAP(twocrude_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cbuster_state, irq4_line_assert)/* VBL */
+ M68000(config, m_maincpu, XTAL(24'000'000)/2); /* Custom chip 59 @ 12MHz Verified */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cbuster_state::twocrude_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cbuster_state::irq4_line_assert)); /* VBL */
H6280(config, m_audiocpu, XTAL(24'000'000)/4); /* Custom chip 45, 6MHz Verified */
m_audiocpu->set_addrmap(AS_PROGRAM, &cbuster_state::sound_map);
m_audiocpu->add_route(ALL_OUTPUTS, "mono", 0); // internal sound unused
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(58)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
- 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(cbuster_state, screen_update_twocrude)
+ 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(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(cbuster_state::screen_update_twocrude));
GFXDECODE(config, "gfxdecode", m_palette, gfx_cbuster);
PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048);
@@ -365,19 +365,16 @@ MACHINE_CONFIG_START(cbuster_state::twocrude)
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0);
// YM2203_PITCH_HACK - Pitch is too low at 1.3425MHz (see also stfight.cpp)
- MCFG_DEVICE_ADD("ym1", YM2203, XTAL(32'220'000)/24 * 3) /* 1.3425MHz Verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
+ YM2203(config, "ym1", XTAL(32'220'000)/24 * 3).add_route(ALL_OUTPUTS, "mono", 0.60); /* 1.3425MHz Verified */
ym2151_device &ym2(YM2151(config, "ym2", XTAL(32'220'000)/9)); /* 3.58MHz Verified */
ym2.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */
ym2.add_route(ALL_OUTPUTS, "mono", 0.45);
- MCFG_DEVICE_ADD("oki1", OKIM6295, XTAL(32'220'000)/32, okim6295_device::PIN7_HIGH) /* 1.0068MHz Verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
+ OKIM6295(config, "oki1", XTAL(32'220'000)/32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75); /* 1.0068MHz Verified */
- MCFG_DEVICE_ADD("oki2", OKIM6295, XTAL(32'220'000)/16, okim6295_device::PIN7_HIGH) /* 2.01375MHz Verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki2", XTAL(32'220'000)/16, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.60); /* 2.01375MHz Verified */
+}
/******************************************************************************/
diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp
index 8736bed7f98..e333a96ba3a 100644
--- a/src/mame/drivers/cc40.cpp
+++ b/src/mame/drivers/cc40.cpp
@@ -598,15 +598,14 @@ MACHINE_CONFIG_START(cc40_state::cc40)
NVRAM(config, "sysram.2", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(60) // arbitrary
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(6*31+1, 9*1+1+1)
- MCFG_SCREEN_VISIBLE_AREA(0, 6*31, 0, 9*1+1)
- //screen.set_visarea_full();
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60); // arbitrary
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ screen.set_size(6*31+1, 9*1+1+1);
+ screen.set_visarea_full();
config.set_default_layout(layout_cc40);
- MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen.set_screen_update("hd44780", FUNC(hd44780_device::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(cc40_state::cc40_palette), 3);
diff --git a/src/mame/drivers/cchance.cpp b/src/mame/drivers/cchance.cpp
index e3d9a4cd3af..a57966eaee3 100644
--- a/src/mame/drivers/cchance.cpp
+++ b/src/mame/drivers/cchance.cpp
@@ -217,11 +217,11 @@ void cchance_state::machine_reset()
m_bell_io = 0;
}
-MACHINE_CONFIG_START(cchance_state::cchance)
-
- MCFG_DEVICE_ADD("maincpu", Z80,4000000) /* ? MHz */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cchance_state, irq0_line_hold)
+void cchance_state::cchance(machine_config &config)
+{
+ Z80(config, m_maincpu, 4000000); /* ? MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cchance_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cchance_state::irq0_line_hold));
GFXDECODE(config, "gfxdecode", m_palette, gfx_cchance);
@@ -229,14 +229,14 @@ MACHINE_CONFIG_START(cchance_state::cchance)
m_seta001->set_gfxdecode_tag("gfxdecode");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57.5)
- 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(cchance_state, screen_update_tnzs)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cchance_state, screen_vblank_tnzs))
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(57.5);
+ 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, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(cchance_state::screen_update_tnzs));
+ m_screen->screen_vblank().set(FUNC(cchance_state::screen_vblank_tnzs));
+ m_screen->set_palette(m_palette);
PALETTE(config, m_palette, FUNC(cchance_state::prompalette), 512);
@@ -246,7 +246,7 @@ MACHINE_CONFIG_START(cchance_state::cchance)
aysnd.port_a_read_callback().set_ioport("DSW1");
aysnd.port_b_read_callback().set_ioport("DSW2");
aysnd.add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
ROM_START( cchance )
ROM_REGION( 0x10000, "maincpu", 0 )
diff --git a/src/mame/drivers/cclimber.cpp b/src/mame/drivers/cclimber.cpp
index 688276e222d..1025f696fa0 100644
--- a/src/mame/drivers/cclimber.cpp
+++ b/src/mame/drivers/cclimber.cpp
@@ -1105,33 +1105,33 @@ WRITE_LINE_MEMBER(cclimber_state::bagmanf_vblank_irq)
m_maincpu->set_input_line(0, HOLD_LINE);
}
-MACHINE_CONFIG_START(cclimber_state::root)
-
+void cclimber_state::root(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, Z80, XTAL(18'432'000)/3/2) /* 3.072 MHz */
- MCFG_DEVICE_PROGRAM_MAP(cclimber_map)
- MCFG_DEVICE_IO_MAP(cclimber_portmap)
+ Z80(config, m_maincpu, XTAL(18'432'000)/3/2); /* 3.072 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cclimber_state::cclimber_map);
+ m_maincpu->set_addrmap(AS_IO, &cclimber_state::cclimber_portmap);
- MCFG_DEVICE_ADD(m_mainlatch, LS259, 0)
+ LS259(config, m_mainlatch, 0);
m_mainlatch->q_out_cb<0>().set(FUNC(cclimber_state::nmi_mask_w));
m_mainlatch->q_out_cb<1>().set(FUNC(cclimber_state::flip_screen_x_w));
m_mainlatch->q_out_cb<2>().set(FUNC(cclimber_state::flip_screen_y_w));
/* 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, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cclimber_state, screen_update_cclimber)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cclimber_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(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(cclimber_state::screen_update_cclimber));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(cclimber_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cclimber);
PALETTE(config, m_palette, FUNC(cclimber_state::cclimber_palette), 16*4+8*4);
MCFG_VIDEO_START_OVERRIDE(cclimber_state,cclimber)
-MACHINE_CONFIG_END
+}
void cclimber_state::cclimber(machine_config &config)
@@ -1186,7 +1186,8 @@ void cclimber_state::bagmanf(machine_config &config)
}
-MACHINE_CONFIG_START(cclimber_state::yamato)
+void cclimber_state::yamato(machine_config &config)
+{
root(config);
/* basic machine hardware */
@@ -1196,15 +1197,15 @@ MACHINE_CONFIG_START(cclimber_state::yamato)
maincpu.set_addrmap(AS_OPCODES, &cclimber_state::yamato_decrypted_opcodes_map);
maincpu.set_decrypted_tag(":decrypted_opcodes");
- MCFG_DEVICE_ADD("audiocpu", Z80, 3072000) /* 3.072 MHz ? */
- MCFG_DEVICE_PROGRAM_MAP(yamato_audio_map)
- MCFG_DEVICE_IO_MAP(yamato_audio_portmap)
+ Z80(config, m_audiocpu, 3072000); /* 3.072 MHz ? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cclimber_state::yamato_audio_map);
+ m_audiocpu->set_addrmap(AS_IO, &cclimber_state::yamato_audio_portmap);
/* video hardware */
m_palette->set_entries(16*4+8*4+256);
m_palette->set_init(FUNC(cclimber_state::yamato_palette));
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(cclimber_state, screen_update_yamato)
+
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(cclimber_state::screen_update_yamato));
/* audio hardware */
SPEAKER(config, "speaker").front_center();
@@ -1212,10 +1213,11 @@ MACHINE_CONFIG_START(cclimber_state::yamato)
AY8910(config, "ay1", XTAL(18'432'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.25); /* 1.536 MHz */
AY8910(config, "ay2", XTAL(18'432'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.25); /* 1.536 MHz */
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(cclimber_state::toprollr)
+void cclimber_state::toprollr(machine_config &config)
+{
cclimber(config);
sega_315_5018_device &maincpu(SEGA_315_5018(config.replace(), m_maincpu, XTAL(18'432'000)/3/2)); /* 3.072 MHz */
@@ -1236,36 +1238,36 @@ MACHINE_CONFIG_START(cclimber_state::toprollr)
MCFG_VIDEO_START_OVERRIDE(cclimber_state,toprollr)
subdevice<screen_device>("screen")->set_screen_update(FUNC(cclimber_state::screen_update_toprollr));
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(cclimber_state::swimmer)
+void cclimber_state::swimmer(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, Z80, XTAL(18'432'000)/6) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(swimmer_map)
+ Z80(config, m_maincpu, XTAL(18'432'000)/6); /* verified on pcb */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cclimber_state::swimmer_map);
- MCFG_DEVICE_ADD(m_mainlatch, LS259, 0)
+ LS259(config, m_mainlatch, 0);
m_mainlatch->q_out_cb<0>().set(FUNC(cclimber_state::nmi_mask_w));
m_mainlatch->q_out_cb<1>().set(FUNC(cclimber_state::flip_screen_x_w));
m_mainlatch->q_out_cb<2>().set(FUNC(cclimber_state::flip_screen_y_w));
m_mainlatch->q_out_cb<3>().set(FUNC(cclimber_state::sidebg_enable_w));
m_mainlatch->q_out_cb<4>().set(FUNC(cclimber_state::palette_bank_w));
- MCFG_DEVICE_ADD("audiocpu", Z80,XTAL(4'000'000)/2) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(swimmer_audio_map)
- MCFG_DEVICE_IO_MAP(swimmer_audio_portmap)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(cclimber_state, nmi_line_pulse, (double)4000000/16384) /* IRQs are triggered by the main CPU */
+ Z80(config, m_audiocpu, XTAL(4'000'000)/2); /* verified on pcb */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cclimber_state::swimmer_audio_map);
+ m_audiocpu->set_addrmap(AS_IO, &cclimber_state::swimmer_audio_portmap);
+ m_audiocpu->set_periodic_int(FUNC(cclimber_state::nmi_line_pulse), attotime::from_hz((double)4000000/16384)); /* IRQs are triggered by the main CPU */
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60.57) /* verified on pcb */
- 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(cclimber_state, screen_update_swimmer)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cclimber_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60.57); /* verified on pcb */
+ 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(cclimber_state::screen_update_swimmer));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(cclimber_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_swimmer);
PALETTE(config, m_palette, FUNC(cclimber_state::swimmer_palette), 32*8+4*8+1);
@@ -1280,7 +1282,7 @@ MACHINE_CONFIG_START(cclimber_state::swimmer)
AY8910(config, "ay1", XTAL(4'000'000)/2).add_route(ALL_OUTPUTS, "speaker", 0.25); /* verified on pcb */
AY8910(config, "ay2", XTAL(4'000'000)/2).add_route(ALL_OUTPUTS, "speaker", 0.25); /* verified on pcb */
-MACHINE_CONFIG_END
+}
void cclimber_state::guzzler(machine_config &config)
{
diff --git a/src/mame/drivers/cedar_magnet.cpp b/src/mame/drivers/cedar_magnet.cpp
index 219e83956f3..4c545df2b14 100644
--- a/src/mame/drivers/cedar_magnet.cpp
+++ b/src/mame/drivers/cedar_magnet.cpp
@@ -767,13 +767,13 @@ INTERRUPT_GEN_MEMBER(cedar_magnet_state::irq)
m_cedsprite->irq_hold();
}
-MACHINE_CONFIG_START(cedar_magnet_state::cedar_magnet)
-
+void cedar_magnet_state::cedar_magnet(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,4000000) /* ? MHz */
- MCFG_DEVICE_PROGRAM_MAP(cedar_magnet_map)
- MCFG_DEVICE_IO_MAP(cedar_magnet_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cedar_magnet_state, irq)
+ Z80(config, m_maincpu, 4000000); /* ? MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cedar_magnet_state::cedar_magnet_map);
+ m_maincpu->set_addrmap(AS_IO, &cedar_magnet_state::cedar_magnet_io);
+ m_maincpu->set_vblank_int("screen", FUNC(cedar_magnet_state::irq));
ADDRESS_MAP_BANK(config, "bank0").set_map(&cedar_magnet_state::cedar_bank0).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000);
ADDRESS_MAP_BANK(config, "mb_sub_ram").set_map(&cedar_magnet_state::cedar_magnet_mainboard_sub_ram_map).set_options(ENDIANNESS_LITTLE, 8, 18, 0x10000);
@@ -794,15 +794,15 @@ MACHINE_CONFIG_START(cedar_magnet_state::cedar_magnet)
m_ic49_pio->out_pb_callback().set(FUNC(cedar_magnet_state::ic49_pio_pb_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-8-1, 0, 192-1)
- MCFG_SCREEN_UPDATE_DRIVER(cedar_magnet_state, screen_update_cedar_magnet)
- 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(0));
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 256-8-1, 0, 192-1);
+ screen.set_screen_update(FUNC(cedar_magnet_state::screen_update_cedar_magnet));
+ screen.set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 0x400)
+ PALETTE(config, m_palette).set_entries(0x400);
CEDAR_MAGNET_SOUND(config, m_cedsound, 0);
CEDAR_MAGNET_PLANE(config, m_cedplane0, 0);
@@ -812,7 +812,7 @@ MACHINE_CONFIG_START(cedar_magnet_state::cedar_magnet)
CEDAR_MAGNET_FLOP(config, "flop", 0);
config.m_perfect_cpu_quantum = subtag("maincpu");
-MACHINE_CONFIG_END
+}
#define BIOS_ROM \
diff --git a/src/mame/drivers/cesclass.cpp b/src/mame/drivers/cesclass.cpp
index abbe6c160c1..a8633d13ae7 100644
--- a/src/mame/drivers/cesclass.cpp
+++ b/src/mame/drivers/cesclass.cpp
@@ -248,29 +248,28 @@ void cesclassic_state::cesclassic_palette(palette_device &palette) const
palette.set_pen_color(i, pal2bit(i), 0, 0);
}
-MACHINE_CONFIG_START(cesclassic_state::cesclassic)
-
- MCFG_DEVICE_ADD("maincpu", M68000, 24000000/2 )
- MCFG_DEVICE_PROGRAM_MAP(cesclassic_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("l_lcd", cesclassic_state, irq2_line_assert) // TODO: unknown sources
- MCFG_DEVICE_PERIODIC_INT_DRIVER(cesclassic_state, irq3_line_assert, 60*8)
+void cesclassic_state::cesclassic(machine_config &config)
+{
+ M68000(config, m_maincpu, 24000000/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cesclassic_state::cesclassic_map);
+ m_maincpu->set_vblank_int("l_lcd", FUNC(cesclassic_state::irq2_line_assert)); // TODO: unknown sources
+ m_maincpu->set_periodic_int(FUNC(cesclassic_state::irq3_line_assert), attotime::from_hz(60*8));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("l_lcd", LCD)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_UPDATE_DRIVER(cesclassic_state, screen_update)
- MCFG_SCREEN_SIZE(8*16*2, 8*8+3*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 8*16*2-1, 0*8, 8*8-1)
+ screen_device &screen(SCREEN(config, "l_lcd", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ screen.set_screen_update(FUNC(cesclassic_state::screen_update));
+ screen.set_size(8*16*2, 8*8+3*8);
+ screen.set_visarea(0*8, 8*16*2-1, 0*8, 8*8-1);
PALETTE(config, m_palette, FUNC(cesclassic_state::cesclassic_palette), 4);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 24000000/16, okim6295_device::PIN7_LOW)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, 24000000/16, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.5);
+}
ROM_START(hrclass)
diff --git a/src/mame/drivers/chaknpop.cpp b/src/mame/drivers/chaknpop.cpp
index 0bbc792177f..01feb17a84e 100644
--- a/src/mame/drivers/chaknpop.cpp
+++ b/src/mame/drivers/chaknpop.cpp
@@ -362,24 +362,24 @@ void chaknpop_state::machine_reset()
m_flip_y = 0;
}
-MACHINE_CONFIG_START(chaknpop_state::chaknpop)
-
+void chaknpop_state::chaknpop(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'000'000) / 6) // Verified on PCB
- MCFG_DEVICE_PROGRAM_MAP(chaknpop_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", chaknpop_state, irq0_line_hold)
+ Z80(config, m_maincpu, XTAL(18'000'000) / 6); // Verified on PCB
+ m_maincpu->set_addrmap(AS_PROGRAM, &chaknpop_state::chaknpop_map);
+ m_maincpu->set_vblank_int("screen", FUNC(chaknpop_state::irq0_line_hold));
- MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, XTAL(18'000'000) / 6) // Verified on PCB
+ TAITO68705_MCU(config, m_bmcu, XTAL(18'000'000) / 6); // Verified on PCB
config.m_minimum_quantum = attotime::from_hz(6000); // 100 CPU slices per frame - a high value to ensure proper synchronization of the CPUs
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.1828)
- 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(chaknpop_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.1828);
+ 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(chaknpop_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_chaknpop);
PALETTE(config, m_palette, FUNC(chaknpop_state::chaknpop_palette), 1024);
@@ -396,7 +396,7 @@ MACHINE_CONFIG_START(chaknpop_state::chaknpop)
ay2.port_a_write_callback().set(FUNC(chaknpop_state::unknown_port_1_w)); // ??
ay2.port_b_write_callback().set(FUNC(chaknpop_state::unknown_port_2_w)); // ??
ay2.add_route(ALL_OUTPUTS, "mono", 0.10);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp
index 97f1fc12b41..8bc7082d3a3 100644
--- a/src/mame/drivers/champbas.cpp
+++ b/src/mame/drivers/champbas.cpp
@@ -519,12 +519,12 @@ INTERRUPT_GEN_MEMBER(champbas_state::vblank_irq)
}
-MACHINE_CONFIG_START(champbas_state::talbot)
-
+void champbas_state::talbot(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000)/6)
- MCFG_DEVICE_PROGRAM_MAP(champbasj_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
+ Z80(config, m_maincpu, XTAL(18'432'000)/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbas_state::champbasj_map);
+ m_maincpu->set_vblank_int("screen", FUNC(champbas_state::vblank_irq));
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(champbas_state::irq_enable_w));
@@ -536,18 +536,18 @@ MACHINE_CONFIG_START(champbas_state::talbot)
m_mainlatch->q_out_cb<6>().set(FUNC(champbas_state::mcu_start_w));
m_mainlatch->q_out_cb<7>().set(FUNC(champbas_state::mcu_switch_w));
- MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(18'432'000)/6/8)
+ ALPHA_8201(config, m_alpha_8201, XTAL(18'432'000)/6/8);
config.m_perfect_cpu_quantum = subtag("alpha_8201:mcu");
WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 0x10);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(champbas_state, screen_update_champbas)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(champbas_state::screen_update_champbas));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_talbot);
PALETTE(config, m_palette, FUNC(champbas_state::champbas_palette), 512, 32);
@@ -558,15 +558,15 @@ MACHINE_CONFIG_START(champbas_state::talbot)
GENERIC_LATCH_8(config, "soundlatch");
AY8910(config, "ay1", XTAL(18'432'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.5);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(champbas_state::champbas)
+void champbas_state::champbas(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000)/6)
- MCFG_DEVICE_PROGRAM_MAP(champbas_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", champbas_state, vblank_irq)
+ Z80(config, m_maincpu, XTAL(18'432'000)/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbas_state::champbas_map);
+ m_maincpu->set_vblank_int("screen", FUNC(champbas_state::vblank_irq));
LS259(config, m_mainlatch); // 9D; 8G on Champion Baseball II Double Board Configuration
m_mainlatch->q_out_cb<0>().set(FUNC(champbas_state::irq_enable_w));
@@ -578,18 +578,18 @@ MACHINE_CONFIG_START(champbas_state::champbas)
m_mainlatch->q_out_cb<6>().set_nop(); // no MCU
m_mainlatch->q_out_cb<7>().set_nop(); // no MCU
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(18'432'000)/6)
- MCFG_DEVICE_PROGRAM_MAP(champbas_sound_map)
+ z80_device &audiocpu(Z80(config, "audiocpu", XTAL(18'432'000)/6));
+ audiocpu.set_addrmap(AS_PROGRAM, &champbas_state::champbas_sound_map);
WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 0x10);
/* video hardware */
- MCFG_SCREEN_ADD("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(champbas_state, screen_update_champbas)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ 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(champbas_state::screen_update_champbas));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_champbas);
PALETTE(config, m_palette, FUNC(champbas_state::champbas_palette), 512, 32);
@@ -605,70 +605,70 @@ MACHINE_CONFIG_START(champbas_state::champbas)
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(champbas_state::champbasj)
+void champbas_state::champbasj(machine_config &config)
+{
champbas(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(champbasj_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbas_state::champbasj_map);
m_mainlatch->q_out_cb<6>().set(FUNC(champbas_state::mcu_start_w));
m_mainlatch->q_out_cb<7>().set(FUNC(champbas_state::mcu_switch_w));
- MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(18'432'000)/6/8) // note: 8302 rom on champbb2 (same device!)
+ ALPHA_8201(config, m_alpha_8201, XTAL(18'432'000)/6/8); // note: 8302 rom on champbb2 (same device!)
config.m_perfect_cpu_quantum = subtag("alpha_8201:mcu");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(champbas_state::champbasja)
+void champbas_state::champbasja(machine_config &config)
+{
champbas(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(champbasja_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbas_state::champbasja_map);
+}
-MACHINE_CONFIG_START(champbas_state::champbasjb)
+void champbas_state::champbasjb(machine_config &config)
+{
champbas(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(champbasjb_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbas_state::champbasjb_map);
+}
-MACHINE_CONFIG_START(champbas_state::champbb2)
+void champbas_state::champbb2(machine_config &config)
+{
champbasj(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(champbb2_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbas_state::champbb2_map);
+}
-MACHINE_CONFIG_START(champbas_state::champbb2j)
+void champbas_state::champbb2j(machine_config &config)
+{
champbb2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(champbb2j_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbas_state::champbb2j_map);
+}
-MACHINE_CONFIG_START(champbas_state::tbasebal)
+void champbas_state::tbasebal(machine_config &config)
+{
champbas(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(tbasebal_map)
-
- MCFG_DEVICE_ADD("mcu", M68705P3, XTAL(18'432'000)/6) // ?Mhz
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbas_state::tbasebal_map);
+ M68705P3(config, "mcu", XTAL(18'432'000)/6); // ?Mhz
+}
-MACHINE_CONFIG_START(exctsccr_state::exctsccr)
+void exctsccr_state::exctsccr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000)/6 )
- MCFG_DEVICE_PROGRAM_MAP(exctsccr_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", exctsccr_state, vblank_irq)
+ Z80(config, m_maincpu, XTAL(18'432'000)/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &exctsccr_state::exctsccr_map);
+ m_maincpu->set_vblank_int("screen", FUNC(exctsccr_state::vblank_irq));
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(exctsccr_state::irq_enable_w));
@@ -680,27 +680,27 @@ MACHINE_CONFIG_START(exctsccr_state::exctsccr)
m_mainlatch->q_out_cb<6>().set(FUNC(exctsccr_state::mcu_start_w));
m_mainlatch->q_out_cb<7>().set(FUNC(exctsccr_state::mcu_switch_w));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(14'318'181)/4 )
- MCFG_DEVICE_PROGRAM_MAP(exctsccr_sound_map)
- MCFG_DEVICE_IO_MAP(exctsccr_sound_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(exctsccr_state, nmi_line_pulse, 4000) // 4 kHz, updates the dac
+ Z80(config, m_audiocpu, XTAL(14'318'181)/4);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &exctsccr_state::exctsccr_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &exctsccr_state::exctsccr_sound_io_map);
+ m_audiocpu->set_periodic_int(FUNC(exctsccr_state::nmi_line_pulse), attotime::from_hz(4000)); // 4 kHz, updates the dac
timer_device &exc_snd_irq(TIMER(config, "exc_snd_irq"));
exc_snd_irq.configure_periodic(FUNC(exctsccr_state::exctsccr_sound_irq), attotime::from_hz(75)); // irq source unknown, determines music tempo
exc_snd_irq.set_start_delay(attotime::from_hz(75));
- MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(18'432'000)/6/8) // note: 8302 rom, or 8303 on exctscc2 (same device!)
+ ALPHA_8201(config, m_alpha_8201, XTAL(18'432'000)/6/8); // note: 8302 rom, or 8303 on exctscc2 (same device!)
config.m_perfect_cpu_quantum = subtag("alpha_8201:mcu");
WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 0x10);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60.54)
- 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(exctsccr_state, screen_update_exctsccr)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60.54);
+ 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(exctsccr_state::screen_update_exctsccr));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_exctsccr);
PALETTE(config, m_palette, FUNC(exctsccr_state::exctsccr_palette), 512, 32);
@@ -724,15 +724,15 @@ MACHINE_CONFIG_START(exctsccr_state::exctsccr)
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
+}
/* Bootleg running on a modified Champion Baseball board */
-MACHINE_CONFIG_START(exctsccr_state::exctsccrb)
-
+void exctsccr_state::exctsccrb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000)/6)
- MCFG_DEVICE_PROGRAM_MAP(exctsccrb_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", exctsccr_state, vblank_irq)
+ Z80(config, m_maincpu, XTAL(18'432'000)/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &exctsccr_state::exctsccrb_map);
+ m_maincpu->set_vblank_int("screen", FUNC(exctsccr_state::vblank_irq));
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<0>().set(FUNC(exctsccr_state::irq_enable_w));
@@ -744,21 +744,21 @@ MACHINE_CONFIG_START(exctsccr_state::exctsccrb)
m_mainlatch->q_out_cb<6>().set(FUNC(exctsccr_state::mcu_start_w));
m_mainlatch->q_out_cb<7>().set(FUNC(exctsccr_state::mcu_switch_w));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(18'432'000)/6)
- MCFG_DEVICE_PROGRAM_MAP(champbas_sound_map)
+ Z80(config, m_audiocpu, XTAL(18'432'000)/6);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &exctsccr_state::champbas_sound_map);
- MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(18'432'000)/6/8) // champbasj 8201 on pcb, though unused
+ ALPHA_8201(config, m_alpha_8201, XTAL(18'432'000)/6/8); // champbasj 8201 on pcb, though unused
config.m_perfect_cpu_quantum = subtag("alpha_8201:mcu");
WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 0x10);
/* video hardware */
- MCFG_SCREEN_ADD("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(exctsccr_state, screen_update_exctsccr)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ 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(exctsccr_state::screen_update_exctsccr));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_exctsccr);
PALETTE(config, m_palette, FUNC(exctsccr_state::exctsccr_palette), 512, 32);
@@ -774,7 +774,7 @@ MACHINE_CONFIG_START(exctsccr_state::exctsccrb)
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/champbwl.cpp b/src/mame/drivers/champbwl.cpp
index bcba22c6383..2998b5b976c 100644
--- a/src/mame/drivers/champbwl.cpp
+++ b/src/mame/drivers/champbwl.cpp
@@ -489,12 +489,12 @@ WRITE_LINE_MEMBER(champbwl_state::screen_vblank_champbwl)
}
-MACHINE_CONFIG_START(champbwl_state::champbwl)
-
+void champbwl_state::champbwl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 16000000/4) /* 4MHz */
- MCFG_DEVICE_PROGRAM_MAP(champbwl_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", champbwl_state, irq0_line_hold)
+ Z80(config, m_maincpu, 16000000/4); /* 4MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbwl_state::champbwl_map);
+ m_maincpu->set_vblank_int("screen", FUNC(champbwl_state::irq0_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -505,14 +505,14 @@ MACHINE_CONFIG_START(champbwl_state::champbwl)
m_seta001->set_gfxdecode_tag("gfxdecode");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57.5)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(champbwl_state, screen_update_champbwl)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, champbwl_state, screen_vblank_champbwl))
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(57.5);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(0*8, 48*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(champbwl_state::screen_update_champbwl));
+ screen.screen_vblank().set(FUNC(champbwl_state::screen_vblank_champbwl));
+ screen.set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_champbwl);
PALETTE(config, m_palette, FUNC(champbwl_state::champbwl_palette), 512);
@@ -521,10 +521,10 @@ MACHINE_CONFIG_START(champbwl_state::champbwl)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("x1snd", X1_010, 16000000)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ X1_010(config, m_x1, 16000000);
+ m_x1->add_route(0, "lspeaker", 1.0);
+ m_x1->add_route(1, "rspeaker", 1.0);
+}
@@ -553,12 +553,12 @@ MACHINE_START_MEMBER(champbwl_state,doraemon)
m_mainbank->configure_entries(0, 4, &ROM[0], 0x4000);
}
-MACHINE_CONFIG_START(champbwl_state::doraemon)
-
+void champbwl_state::doraemon(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(14'318'181)/4)
- MCFG_DEVICE_PROGRAM_MAP(doraemon_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", champbwl_state, irq0_line_hold)
+ Z80(config, m_maincpu, XTAL(14'318'181)/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &champbwl_state::doraemon_map);
+ m_maincpu->set_vblank_int("screen", FUNC(champbwl_state::irq0_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -570,23 +570,22 @@ MACHINE_CONFIG_START(champbwl_state::doraemon)
MCFG_MACHINE_START_OVERRIDE(champbwl_state,doraemon)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(320, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 16, 256-16-1)
- MCFG_SCREEN_UPDATE_DRIVER(champbwl_state, screen_update_doraemon)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, champbwl_state, screen_vblank_doraemon))
- 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(320, 256);
+ screen.set_visarea(0, 320-1, 16, 256-16-1);
+ screen.set_screen_update(FUNC(champbwl_state::screen_update_doraemon));
+ screen.screen_vblank().set(FUNC(champbwl_state::screen_vblank_doraemon));
+ screen.set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_champbwl);
PALETTE(config, m_palette, FUNC(champbwl_state::champbwl_palette), 512);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("x1snd", X1_010, XTAL(14'318'181))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ X1_010(config, m_x1, XTAL(14'318'181)).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/drivers/chanbara.cpp b/src/mame/drivers/chanbara.cpp
index 290badcd9b2..352aeb368de 100644
--- a/src/mame/drivers/chanbara.cpp
+++ b/src/mame/drivers/chanbara.cpp
@@ -394,22 +394,22 @@ void chanbara_state::machine_reset()
m_scrollhi = 0;
}
-MACHINE_CONFIG_START(chanbara_state::chanbara)
-
- MCFG_DEVICE_ADD("maincpu", MC6809E, XTAL(12'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(chanbara_map)
+void chanbara_state::chanbara(machine_config &config)
+{
+ MC6809E(config, m_maincpu, XTAL(12'000'000)/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &chanbara_state::chanbara_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_REFRESH_RATE(57.4122)
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
-// MCFG_SCREEN_SIZE(32*8, 32*8)
-// MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+// screen.set_refresh_hz(57.4122);
+// screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+// screen.set_size(32*8, 32*8);
+// screen.set_visarea(0, 32*8-1, 2*8, 30*8-1);
// DECO video CRTC
- MCFG_SCREEN_RAW_PARAMS(XTAL(12'000'000)/2,384,0,256,272,16,240)
- MCFG_SCREEN_UPDATE_DRIVER(chanbara_state, screen_update_chanbara)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen.set_raw(XTAL(12'000'000)/2,384,0,256,272,16,240);
+ screen.set_screen_update(FUNC(chanbara_state::screen_update_chanbara));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_chanbara);
@@ -422,7 +422,7 @@ MACHINE_CONFIG_START(chanbara_state::chanbara)
ymsnd.port_a_write_callback().set(FUNC(chanbara_state::chanbara_ay_out_0_w));
ymsnd.port_b_write_callback().set(FUNC(chanbara_state::chanbara_ay_out_1_w));
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
ROM_START( chanbara )
diff --git a/src/mame/drivers/chance32.cpp b/src/mame/drivers/chance32.cpp
index 7169627c897..4e95975b043 100644
--- a/src/mame/drivers/chance32.cpp
+++ b/src/mame/drivers/chance32.cpp
@@ -458,23 +458,23 @@ void chance32_state::machine_reset()
}
-MACHINE_CONFIG_START(chance32_state::chance32)
-
+void chance32_state::chance32(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,12000000/2)
- MCFG_DEVICE_PROGRAM_MAP(chance32_map)
- MCFG_DEVICE_IO_MAP(chance32_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", chance32_state, irq0_line_hold)
+ Z80(config, m_maincpu, 12000000/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &chance32_state::chance32_map);
+ m_maincpu->set_addrmap(AS_IO, &chance32_state::chance32_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(chance32_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(52.786)
-// MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(40*16, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 35*16-1, 0, 29*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(chance32_state, screen_update_chance32)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(52.786);
+// screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(40*16, 32*8);
+ screen.set_visarea(0, 35*16-1, 0, 29*8-1);
+ screen.set_screen_update(FUNC(chance32_state::screen_update_chance32));
+ screen.set_palette("palette");
h46505_device &crtc(H46505(config, "crtc", 12000000/16)); /* 52.786 Hz (similar to Major Poker) */
crtc.set_screen("screen");
@@ -488,9 +488,8 @@ MACHINE_CONFIG_START(chance32_state::chance32)
SPEAKER(config, "mono").front_center();
/* clock at 1050 kHz match the 8000 Hz samples stored inside the ROM */
- MCFG_DEVICE_ADD("oki", OKIM6295, 1.056_MHz_XTAL, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", 1.056_MHz_XTAL, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified
+}
ROM_START( chance32 )
diff --git a/src/mame/drivers/channelf.cpp b/src/mame/drivers/channelf.cpp
index 5927fad742d..529a911e10d 100644
--- a/src/mame/drivers/channelf.cpp
+++ b/src/mame/drivers/channelf.cpp
@@ -207,107 +207,107 @@ void channelf_state::channelf_cart(machine_config &config)
SOFTWARE_LIST(config, "cart_list").set_original("channelf");
}
-MACHINE_CONFIG_START(channelf_state::channelf)
+void channelf_state::channelf(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", F8, 3.579545_MHz_XTAL/2) /* Colorburst/2 */
- MCFG_DEVICE_PROGRAM_MAP(channelf_map)
- MCFG_DEVICE_IO_MAP(channelf_io)
+ F8(config, m_maincpu, 3.579545_MHz_XTAL/2); /* Colorburst/2 */
+ m_maincpu->set_addrmap(AS_PROGRAM, &channelf_state::channelf_map);
+ m_maincpu->set_addrmap(AS_IO, &channelf_state::channelf_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(128, 64)
- MCFG_SCREEN_VISIBLE_AREA(4, 112 - 7, 4, 64 - 3)
- MCFG_SCREEN_UPDATE_DRIVER(channelf_state, screen_update_channelf)
- 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(128, 64);
+ screen.set_visarea(4, 112 - 7, 4, 64 - 3);
+ screen.set_screen_update(FUNC(channelf_state::screen_update_channelf));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(channelf_state::channelf_palette), 8);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("custom", CHANNELF_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ CHANNELF_SOUND(config, m_custom).add_route(ALL_OUTPUTS, "mono", 1.00);
channelf_cart(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(channelf_state::sabavdpl)
+void channelf_state::sabavdpl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", F8, 4_MHz_XTAL/2) /* PAL speed */
- MCFG_DEVICE_PROGRAM_MAP(channelf_map)
- MCFG_DEVICE_IO_MAP(channelf_io)
+ F8(config, m_maincpu, 4_MHz_XTAL/2); /* PAL speed */
+ m_maincpu->set_addrmap(AS_PROGRAM, &channelf_state::channelf_map);
+ m_maincpu->set_addrmap(AS_IO, &channelf_state::channelf_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(4623)) /* approximate */
- MCFG_SCREEN_SIZE(128, 64)
- MCFG_SCREEN_VISIBLE_AREA(4, 112 - 7, 4, 64 - 3)
- MCFG_SCREEN_UPDATE_DRIVER(channelf_state, screen_update_channelf)
- 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(4623)); /* approximate */
+ screen.set_size(128, 64);
+ screen.set_visarea(4, 112 - 7, 4, 64 - 3);
+ screen.set_screen_update(FUNC(channelf_state::screen_update_channelf));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(channelf_state::channelf_palette), 8);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("custom", CHANNELF_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ CHANNELF_SOUND(config, m_custom).add_route(ALL_OUTPUTS, "mono", 1.00);
channelf_cart(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(channelf_state::channlf2)
+void channelf_state::channlf2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", F8, 3.579545_MHz_XTAL/2) /* Colorburst / 2 */
- MCFG_DEVICE_PROGRAM_MAP(channelf_map)
- MCFG_DEVICE_IO_MAP(channelf_io)
+ F8(config, m_maincpu, 3.579545_MHz_XTAL/2); /* Colorburst / 2 */
+ m_maincpu->set_addrmap(AS_PROGRAM, &channelf_state::channelf_map);
+ m_maincpu->set_addrmap(AS_IO, &channelf_state::channelf_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(128, 64)
- MCFG_SCREEN_VISIBLE_AREA(4, 112 - 7, 4, 64 - 3)
- MCFG_SCREEN_UPDATE_DRIVER(channelf_state, screen_update_channelf)
- 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(128, 64);
+ screen.set_visarea(4, 112 - 7, 4, 64 - 3);
+ screen.set_screen_update(FUNC(channelf_state::screen_update_channelf));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(channelf_state::channelf_palette), 8);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("custom", CHANNELF_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ CHANNELF_SOUND(config, m_custom).add_route(ALL_OUTPUTS, "mono", 1.00);
channelf_cart(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(channelf_state::sabavpl2)
+void channelf_state::sabavpl2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", F8, 4_MHz_XTAL/2) /* PAL speed */
- MCFG_DEVICE_PROGRAM_MAP(channelf_map)
- MCFG_DEVICE_IO_MAP(channelf_io)
+ F8(config, m_maincpu, 4_MHz_XTAL/2); /* PAL speed */
+ m_maincpu->set_addrmap(AS_PROGRAM, &channelf_state::channelf_map);
+ m_maincpu->set_addrmap(AS_IO, &channelf_state::channelf_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(4623)) /* approximate */
- MCFG_SCREEN_SIZE(128, 64)
- MCFG_SCREEN_VISIBLE_AREA(4, 112 - 7, 4, 64 - 3)
- MCFG_SCREEN_UPDATE_DRIVER(channelf_state, screen_update_channelf)
- 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(4623)); /* approximate */
+ screen.set_size(128, 64);
+ screen.set_visarea(4, 112 - 7, 4, 64 - 3);
+ screen.set_screen_update(FUNC(channelf_state::screen_update_channelf));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(channelf_state::channelf_palette), 8);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("custom", CHANNELF_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ CHANNELF_SOUND(config, m_custom).add_route(ALL_OUTPUTS, "mono", 0.50);
channelf_cart(config);
-MACHINE_CONFIG_END
+}
ROM_START( channelf )
ROM_REGION(0x10000,"maincpu",0)
diff --git a/src/mame/drivers/chaos.cpp b/src/mame/drivers/chaos.cpp
index 91be9688c35..b21f9ec811b 100644
--- a/src/mame/drivers/chaos.cpp
+++ b/src/mame/drivers/chaos.cpp
@@ -148,17 +148,18 @@ void chaos_state::machine_reset()
memcpy(m_p_ram+0x7000, ROM+0x3000, 0x1000);
}
-MACHINE_CONFIG_START(chaos_state::chaos)
+void chaos_state::chaos(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", S2650, XTAL(1'000'000))
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
- MCFG_DEVICE_DATA_MAP(data_map)
+ S2650(config, m_maincpu, XTAL(1'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &chaos_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &chaos_state::io_map);
+ m_maincpu->set_addrmap(AS_DATA, &chaos_state::data_map);
/* video hardware */
GENERIC_TERMINAL(config, m_terminal, 0);
m_terminal->set_keyboard_callback(FUNC(chaos_state::kbd_put));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( chaos )
diff --git a/src/mame/drivers/cheekyms.cpp b/src/mame/drivers/cheekyms.cpp
index a13c1bc7f9f..e1d29578682 100644
--- a/src/mame/drivers/cheekyms.cpp
+++ b/src/mame/drivers/cheekyms.cpp
@@ -121,30 +121,30 @@ INTERRUPT_GEN_MEMBER(cheekyms_state::vblank_irq)
}
-MACHINE_CONFIG_START(cheekyms_state::cheekyms)
-
+void cheekyms_state::cheekyms(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,5000000/2) /* 2.5 MHz */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cheekyms_state, vblank_irq)
+ Z80(config, m_maincpu, 5000000/2); /* 2.5 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cheekyms_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &cheekyms_state::io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cheekyms_state::vblank_irq));
/* 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, 4*8, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cheekyms_state, screen_update)
- 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(0));
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 4*8, 28*8-1);
+ m_screen->set_screen_update(FUNC(cheekyms_state::screen_update));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cheekyms);
PALETTE(config, m_palette, FUNC(cheekyms_state::cheekyms_palette), 0xc0);
/* audio hardware */
CHEEKY_MOUSE_AUDIO(config, m_sound_board, 0);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/chicago.cpp b/src/mame/drivers/chicago.cpp
index e58d99d8501..aa26674789a 100644
--- a/src/mame/drivers/chicago.cpp
+++ b/src/mame/drivers/chicago.cpp
@@ -94,11 +94,11 @@ void chicago_state::video_start()
{
}
-MACHINE_CONFIG_START(chicago_state::chicago)
-
+void chicago_state::chicago(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK)
- MCFG_NETLIST_SETUP(chicago)
+ NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK);
+ m_maincpu->set_constructor(netlist_chicago);
/* video hardware */
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
@@ -108,7 +108,7 @@ MACHINE_CONFIG_START(chicago_state::chicago)
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/chihiro.cpp b/src/mame/drivers/chihiro.cpp
index fc1ea2d0e52..1080ae06f08 100644
--- a/src/mame/drivers/chihiro.cpp
+++ b/src/mame/drivers/chihiro.cpp
@@ -1864,9 +1864,8 @@ void chihiro_state::an2131sc_configuration(device_t *device)
MACHINE_CONFIG_START(chihiro_state::chihiro_base)
xbox_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(chihiro_map)
- MCFG_DEVICE_IO_MAP(chihiro_map_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &chihiro_state::chihiro_map);
+ m_maincpu->set_addrmap(AS_IO, &chihiro_state::chihiro_map_io);
//BUS_MASTER_IDE_CONTROLLER(config, "ide").options(ide_baseboard, nullptr, "bb", true);
MCFG_DEVICE_MODIFY(":pci:09.0:ide:0")
@@ -1879,7 +1878,7 @@ MACHINE_CONFIG_START(chihiro_state::chihiro_base)
OHCI_USB_CONNECTOR(config, ":pci:02.0:port3", usb_baseboard, nullptr, false);
OHCI_USB_CONNECTOR(config, ":pci:02.0:port4", usb_baseboard, nullptr, false);
- MCFG_DEVICE_ADD("jvs_master", JVS_MASTER, 0)
+ JVS_MASTER(config, "jvs_master", 0);
sega_837_13551_device &sega837(SEGA_837_13551(config, "837_13551", 0, "jvs_master"));
sega837.set_port_tag<0>("TILT");
sega837.set_port_tag<1>("P1");
diff --git a/src/mame/drivers/chsuper.cpp b/src/mame/drivers/chsuper.cpp
index d4db4037f48..e8e4407e7c1 100644
--- a/src/mame/drivers/chsuper.cpp
+++ b/src/mame/drivers/chsuper.cpp
@@ -364,27 +364,27 @@ void chsuper_state::ramdac_map(address_map &map)
* Machine Drivers *
***************************/
-MACHINE_CONFIG_START(chsuper_state::chsuper)
-
+void chsuper_state::chsuper(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z180, XTAL(12'000'000) / 4) /* HD64180RP8, 8 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(chsuper_prg_map)
- MCFG_DEVICE_IO_MAP(chsuper_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", chsuper_state, irq0_line_hold)
+ Z180(config, m_maincpu, XTAL(12'000'000) / 4); /* HD64180RP8, 8 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &chsuper_state::chsuper_prg_map);
+ m_maincpu->set_addrmap(AS_IO, &chsuper_state::chsuper_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(chsuper_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_UPDATE_DRIVER(chsuper_state, screen_update)
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 0, 30*8-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(57);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_screen_update(FUNC(chsuper_state::screen_update));
+ screen.set_size(64*8, 64*8);
+ screen.set_visarea(0*8, 48*8-1, 0, 30*8-1);
+ screen.set_palette(m_palette);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_chsuper);
- MCFG_PALETTE_ADD("palette", 0x100)
+ PALETTE(config, m_palette).set_entries(0x100);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette));
ramdac.set_addrmap(0, &chsuper_state::ramdac_map);
@@ -396,7 +396,7 @@ MACHINE_CONFIG_START(chsuper_state::chsuper)
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/circusc.cpp b/src/mame/drivers/circusc.cpp
index a5a75eb1491..111971420a4 100644
--- a/src/mame/drivers/circusc.cpp
+++ b/src/mame/drivers/circusc.cpp
@@ -344,11 +344,11 @@ WRITE_LINE_MEMBER(circusc_state::vblank_irq)
m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
}
-MACHINE_CONFIG_START(circusc_state::circusc)
-
+void circusc_state::circusc(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", KONAMI1, 2048000) /* 2 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(circusc_map)
+ KONAMI1(config, m_maincpu, 2048000); /* 2 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &circusc_state::circusc_map);
ls259_device &mainlatch(LS259(config, "mainlatch")); // 2C
mainlatch.q_out_cb<0>().set(FUNC(circusc_state::flipscreen_w)); // FLIP
@@ -360,18 +360,18 @@ MACHINE_CONFIG_START(circusc_state::circusc)
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(14'318'181)/4)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ Z80(config, m_audiocpu, XTAL(14'318'181)/4);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &circusc_state::sound_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, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(circusc_state, screen_update_circusc)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, circusc_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(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(circusc_state::screen_update_circusc));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(circusc_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_circusc);
PALETTE(config, m_palette, FUNC(circusc_state::circusc_palette), 16*16 + 16*16, 32);
@@ -381,19 +381,16 @@ MACHINE_CONFIG_START(circusc_state::circusc)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("sn1", SN76496, XTAL(14'318'181)/8)
- MCFG_SOUND_ROUTE(0, "fltdisc", 1.0, 0)
+ SN76496(config, m_sn_1, XTAL(14'318'181)/8).add_route(0, "fltdisc", 1.0, 0);
- MCFG_DEVICE_ADD("sn2", SN76496, XTAL(14'318'181)/8)
- MCFG_SOUND_ROUTE(0, "fltdisc", 1.0, 1)
+ SN76496(config, m_sn_2, XTAL(14'318'181)/8).add_route(0, "fltdisc", 1.0, 1);
DAC_8BIT_R2R(config, "dac", 0).add_route(0, "fltdisc", 1.0, 2); // ls374.7g + r44+r45+r47+r48+r50+r56+r57+r58+r59 (20k) + r46+r49+r51+r52+r53+r54+r55 (10k) + upc324.3h
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
- MCFG_DEVICE_ADD("fltdisc", DISCRETE, circusc_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ DISCRETE(config, m_discrete, circusc_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp
index d4392aaf2b9..f3917a6c2a9 100644
--- a/src/mame/drivers/cischeat.cpp
+++ b/src/mame/drivers/cischeat.cpp
@@ -1949,37 +1949,37 @@ WRITE_LINE_MEMBER(cischeat_state::sound_irq)
-MACHINE_CONFIG_START(cischeat_state::bigrun)
-
+void cischeat_state::bigrun(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("cpu1", M68000, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(bigrun_map)
+ M68000(config, m_cpu1, 10000000);
+ m_cpu1->set_addrmap(AS_PROGRAM, &cischeat_state::bigrun_map);
TIMER(config, "scantimer").configure_scanline(FUNC(cischeat_state::bigrun_scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("cpu2", M68000, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(bigrun_map2)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cischeat_state, irq4_line_hold)
+ M68000(config, m_cpu2, 10000000);
+ m_cpu2->set_addrmap(AS_PROGRAM, &cischeat_state::bigrun_map2);
+ m_cpu2->set_vblank_int("screen", FUNC(cischeat_state::irq4_line_hold));
- MCFG_DEVICE_ADD("cpu3", M68000, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(bigrun_map3)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cischeat_state, irq4_line_hold)
+ M68000(config, m_cpu3, 10000000);
+ m_cpu3->set_addrmap(AS_PROGRAM, &cischeat_state::bigrun_map3);
+ m_cpu3->set_vblank_int("screen", FUNC(cischeat_state::irq4_line_hold));
- MCFG_DEVICE_ADD("soundcpu", M68000, 6000000)
- MCFG_DEVICE_PROGRAM_MAP(bigrun_sound_map)
+ M68000(config, m_soundcpu, 6000000);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &cischeat_state::bigrun_sound_map);
// timing set by the YM irqhandler
-// MCFG_DEVICE_PERIODIC_INT_DRIVER(cischeat_state, irq4_line_hold, 16*30)
+// m_soundcpu->set_periodic_int(FUNC(cischeat_state::irq4_line_hold), attotime::from_hz(16*30));
config.m_minimum_quantum = attotime::from_hz(1200);
/* 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(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0+16, 256-16-1)
- MCFG_SCREEN_UPDATE_DRIVER(cischeat_state, screen_update_bigrun)
- MCFG_SCREEN_PALETTE(m_palette)
+ 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(2500) /* not accurate */);
+ m_screen->set_size(256, 256);
+ m_screen->set_visarea(0, 256-1, 0+16, 256-16-1);
+ m_screen->set_screen_update(FUNC(cischeat_state::screen_update_bigrun));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_bigrun);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x4000/2);
@@ -2002,36 +2002,32 @@ MACHINE_CONFIG_START(cischeat_state::bigrun)
ymsnd.add_route(0, "lspeaker", 0.50);
ymsnd.add_route(1, "rspeaker", 0.50);
- MCFG_DEVICE_ADD("oki1", OKIM6295, 4000000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25)
+ OKIM6295(config, m_oki1, 4000000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified
+ m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 0.25);
+ m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 0.25);
- MCFG_DEVICE_ADD("oki2", OKIM6295, 4000000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.25)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki2, 4000000, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified
+ m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.25);
+ m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.25);
+}
-MACHINE_CONFIG_START(cischeat_state::cischeat)
+void cischeat_state::cischeat(machine_config &config)
+{
bigrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("cpu1")
- MCFG_DEVICE_PROGRAM_MAP(cischeat_map)
+ m_cpu1->set_addrmap(AS_PROGRAM, &cischeat_state::cischeat_map);
- MCFG_DEVICE_MODIFY("cpu2")
- MCFG_DEVICE_PROGRAM_MAP(cischeat_map2)
+ m_cpu2->set_addrmap(AS_PROGRAM, &cischeat_state::cischeat_map2);
- MCFG_DEVICE_MODIFY("cpu3")
- MCFG_DEVICE_PROGRAM_MAP(cischeat_map3)
+ m_cpu3->set_addrmap(AS_PROGRAM, &cischeat_state::cischeat_map3);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_PROGRAM_MAP(cischeat_sound_map)
+ m_soundcpu->set_addrmap(AS_PROGRAM, &cischeat_state::cischeat_sound_map);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0+16, 256-16-8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cischeat_state, screen_update_cischeat)
+ m_screen->set_visarea(0, 256-1, 0+16, 256-16-8-1);
+ m_screen->set_screen_update(FUNC(cischeat_state::screen_update_cischeat));
m_gfxdecode->set_info(gfx_cischeat);
m_palette->set_format(palette_device::RRRRGGGGBBBBRGBx, 0x8000/2);
@@ -2044,27 +2040,24 @@ MACHINE_CONFIG_START(cischeat_state::cischeat)
m_tmap[2]->set_colorbase(0x6c00/2);
m_tmap[2]->set_bits_per_color_code(5);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(cischeat_state::f1gpstar)
+void cischeat_state::f1gpstar(machine_config &config)
+{
bigrun(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("cpu1")
- MCFG_DEVICE_CLOCK(12000000)
- MCFG_DEVICE_PROGRAM_MAP(f1gpstar_map)
+ m_cpu1->set_clock(12000000);
+ m_cpu1->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstar_map);
- MCFG_DEVICE_MODIFY("cpu2")
- MCFG_DEVICE_CLOCK(12000000)
- MCFG_DEVICE_PROGRAM_MAP(f1gpstar_map2)
+ m_cpu2->set_clock(12000000);
+ m_cpu2->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstar_map2);
- MCFG_DEVICE_MODIFY("cpu3")
- MCFG_DEVICE_CLOCK(12000000)
- MCFG_DEVICE_PROGRAM_MAP(f1gpstar_map3)
+ m_cpu3->set_clock(12000000);
+ m_cpu3->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstar_map3);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_PROGRAM_MAP(f1gpstar_sound_map)
+ m_soundcpu->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstar_sound_map);
/* video hardware */
m_gfxdecode->set_info(gfx_f1gpstar);
@@ -2076,34 +2069,32 @@ MACHINE_CONFIG_START(cischeat_state::f1gpstar)
m_tmap[2]->set_colorbase(0x6e00/2);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(cischeat_state, screen_update_f1gpstar)
-MACHINE_CONFIG_END
+ m_screen->set_screen_update(FUNC(cischeat_state::screen_update_f1gpstar));
+}
-MACHINE_CONFIG_START(cischeat_state::f1gpstr2)
+void cischeat_state::f1gpstr2(machine_config &config)
+{
f1gpstar(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("cpu1")
- MCFG_DEVICE_PROGRAM_MAP(f1gpstr2_map)
+ m_cpu1->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstr2_map);
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_PROGRAM_MAP(f1gpstr2_sound_map)
+ m_soundcpu->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstr2_sound_map);
- MCFG_DEVICE_ADD("cpu5", M68000, 10000000)
- MCFG_DEVICE_PROGRAM_MAP(f1gpstr2_io_map)
+ M68000(config, m_cpu5, 10000000);
+ m_cpu5->set_addrmap(AS_PROGRAM, &cischeat_state::f1gpstr2_io_map);
config.m_minimum_quantum = attotime::from_hz(12000);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(wildplt_state::wildplt)
+void wildplt_state::wildplt(machine_config &config)
+{
f1gpstr2(config);
- MCFG_DEVICE_MODIFY("cpu1")
- MCFG_DEVICE_PROGRAM_MAP(wildplt_map)
-MACHINE_CONFIG_END
+ m_cpu1->set_addrmap(AS_PROGRAM, &wildplt_state::wildplt_map);
+}
/**************************************************************************
@@ -2128,24 +2119,24 @@ TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::scudhamm_scanline)
m_maincpu->set_input_line(2, HOLD_LINE);
}
-MACHINE_CONFIG_START(cischeat_state::scudhamm)
-
+void cischeat_state::scudhamm(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(scudhamm_map)
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cischeat_state::scudhamm_map);
TIMER(config, "scantimer").configure_scanline(FUNC(cischeat_state::scudhamm_scanline), "screen", 0, 1);
WATCHDOG_TIMER(config, m_watchdog);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
- MCFG_SCREEN_REFRESH_RATE(30) //TODO: wrong!
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500 * 3) /* not accurate */)
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0 +16, 256-1 -16)
- MCFG_SCREEN_UPDATE_DRIVER(cischeat_state, screen_update_scudhamm)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK);
+ m_screen->set_refresh_hz(30); //TODO: wrong!
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500 * 3) /* not accurate */);
+ m_screen->set_size(256, 256);
+ m_screen->set_visarea(0, 256-1, 0 +16, 256-1 -16);
+ m_screen->set_screen_update(FUNC(cischeat_state::screen_update_scudhamm));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_scudhamm);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x8000/2);
@@ -2158,14 +2149,14 @@ MACHINE_CONFIG_START(cischeat_state::scudhamm)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("oki1", OKIM6295, 4000000/2, okim6295_device::PIN7_HIGH) // pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
+ OKIM6295(config, m_oki1, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified
+ m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
+ m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
- MCFG_DEVICE_ADD("oki2", OKIM6295, 4000000/2, okim6295_device::PIN7_HIGH) // pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki2, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified
+ m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
+ m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
+}
/**************************************************************************
@@ -2183,14 +2174,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::armchamp2_scanline)
m_maincpu->set_input_line(4, HOLD_LINE);
}
-MACHINE_CONFIG_START(cischeat_state::armchmp2)
+void cischeat_state::armchmp2(machine_config &config)
+{
scudhamm(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(armchmp2_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &cischeat_state::armchmp2_map);
subdevice<timer_device>("scantimer")->set_callback(FUNC(cischeat_state::armchamp2_scanline));
-MACHINE_CONFIG_END
+}
/**************************************************************************
@@ -2215,11 +2206,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::captflag_scanline)
m_maincpu->set_input_line(3, HOLD_LINE);
}
-MACHINE_CONFIG_START(cischeat_state::captflag)
-
+void cischeat_state::captflag(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",M68000, XTAL(24'000'000) / 2) // TMP68000P-12
- MCFG_DEVICE_PROGRAM_MAP(captflag_map)
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2); // TMP68000P-12
+ m_maincpu->set_addrmap(AS_PROGRAM, &cischeat_state::captflag_map);
TIMER(config, "scantimer").configure_scanline(FUNC(cischeat_state::captflag_scanline), "screen", 0, 1);
TICKET_DISPENSER(config, m_captflag_hopper, attotime::from_msec(2000), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH );
@@ -2228,14 +2219,14 @@ MACHINE_CONFIG_START(cischeat_state::captflag)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
- MCFG_SCREEN_REFRESH_RATE(30) //TODO: wrong!
-// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500 * 3) /* not accurate */)
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0 +16, 256-1 -16)
- MCFG_SCREEN_UPDATE_DRIVER(cischeat_state, screen_update_scudhamm)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+// m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK);
+ m_screen->set_refresh_hz(30); //TODO: wrong!
+// m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500 * 3) /* not accurate */);
+ m_screen->set_size(256, 256);
+ m_screen->set_visarea(0, 256-1, 0 +16, 256-1 -16);
+ m_screen->set_screen_update(FUNC(cischeat_state::screen_update_scudhamm));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_scudhamm);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::RRRRGGGGBBBBRGBx, 0x8000/2);
@@ -2255,16 +2246,16 @@ MACHINE_CONFIG_START(cischeat_state::captflag)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("oki1", OKIM6295, 4000000/2, okim6295_device::PIN7_HIGH) // pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(0, captflag_oki1_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
+ OKIM6295(config, m_oki1, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified
+ m_oki1->set_addrmap(0, &cischeat_state::captflag_oki1_map);
+ m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
+ m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
- MCFG_DEVICE_ADD("oki2", OKIM6295, 4000000/2, okim6295_device::PIN7_HIGH) // pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(0, captflag_oki2_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki2, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified
+ m_oki2->set_addrmap(0, &cischeat_state::captflag_oki2_map);
+ m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
+ m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
+}
/***************************************************************************
diff --git a/src/mame/drivers/citycon.cpp b/src/mame/drivers/citycon.cpp
index 5f440903871..47ea952a56e 100644
--- a/src/mame/drivers/citycon.cpp
+++ b/src/mame/drivers/citycon.cpp
@@ -198,22 +198,22 @@ void citycon_state::machine_reset()
}
-MACHINE_CONFIG_START(citycon_state::citycon)
-
+void citycon_state::citycon(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809, CPU_CLOCK) // HD68B09P
- MCFG_DEVICE_PROGRAM_MAP(citycon_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", citycon_state, irq0_line_assert)
+ MC6809(config, m_maincpu, CPU_CLOCK); // HD68B09P
+ m_maincpu->set_addrmap(AS_PROGRAM, &citycon_state::citycon_map);
+ m_maincpu->set_vblank_int("screen", FUNC(citycon_state::irq0_line_assert));
- MCFG_DEVICE_ADD("audiocpu", MC6809E, MASTER_CLOCK / 32) // schematics allow for either a 6809 or 6809E; HD68A09EP found on one actual PCB
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", citycon_state, irq0_line_hold) // actually unused, probably it was during development
+ mc6809e_device &audiocpu(MC6809E(config, "audiocpu", MASTER_CLOCK / 32)); // schematics allow for either a 6809 or 6809E; HD68A09EP found on one actual PCB
+ audiocpu.set_addrmap(AS_PROGRAM, &citycon_state::sound_map);
+ audiocpu.set_vblank_int("screen", FUNC(citycon_state::irq0_line_hold)); // actually unused, probably it was during development
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(citycon_state, screen_update_citycon)
- MCFG_SCREEN_PALETTE(m_palette)
+ 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(citycon_state::screen_update_citycon));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_citycon);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::RGBx_444, 640+1024); // 640 real palette + 1024 virtual palette
@@ -233,7 +233,7 @@ MACHINE_CONFIG_START(citycon_state::citycon)
ymsnd.add_route(1, "mono", 0.40);
ymsnd.add_route(2, "mono", 0.40);
ymsnd.add_route(3, "mono", 0.20);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/clayshoo.cpp b/src/mame/drivers/clayshoo.cpp
index bddff8b1082..3c571d811a0 100644
--- a/src/mame/drivers/clayshoo.cpp
+++ b/src/mame/drivers/clayshoo.cpp
@@ -322,30 +322,30 @@ void clayshoo_state::machine_reset()
m_analog_port_val = 0;
}
-MACHINE_CONFIG_START(clayshoo_state::clayshoo)
-
+void clayshoo_state::clayshoo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,5068000/4) /* 5.068/4 Mhz (divider is a guess) */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", clayshoo_state, irq0_line_hold)
+ Z80(config, m_maincpu, 5068000/4); /* 5.068/4 Mhz (divider is a guess) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &clayshoo_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &clayshoo_state::main_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(clayshoo_state::irq0_line_hold));
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 64, 255)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_UPDATE_DRIVER(clayshoo_state, screen_update_clayshoo)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 255, 64, 255);
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_screen_update(FUNC(clayshoo_state::screen_update_clayshoo));
I8255A(config, "ppi8255_0");
i8255_device &ppi1(I8255A(config, "ppi8255_1"));
ppi1.out_pa_callback().set(FUNC(clayshoo_state::input_port_select_w));
ppi1.in_pb_callback().set(FUNC(clayshoo_state::input_port_r));
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/clcd.cpp b/src/mame/drivers/clcd.cpp
index 136ccc419de..4e2f60a1795 100644
--- a/src/mame/drivers/clcd.cpp
+++ b/src/mame/drivers/clcd.cpp
@@ -657,10 +657,11 @@ static INPUT_PORTS_START( clcd )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // clears screen and goes into infinite loop
INPUT_PORTS_END
-MACHINE_CONFIG_START(clcd_state::clcd)
+void clcd_state::clcd(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M65C02, 2000000)
- MCFG_DEVICE_PROGRAM_MAP(clcd_mem)
+ M65C02(config, m_maincpu, 2000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &clcd_state::clcd_mem);
INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline("maincpu", m65c02_device::IRQ_LINE);
@@ -712,24 +713,23 @@ MACHINE_CONFIG_START(clcd_state::clcd)
m_rtc->set_default_24h(true);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(80)
- MCFG_SCREEN_UPDATE_DRIVER(clcd_state, screen_update)
- MCFG_SCREEN_SIZE(480, 128)
- MCFG_SCREEN_VISIBLE_AREA(0, 480-1, 0, 128-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(80);
+ screen.set_screen_update(FUNC(clcd_state::screen_update));
+ screen.set_size(480, 128);
+ screen.set_visarea_full();
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(clcd_state::clcd_palette), 2);
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.25);
RAM(config, "ram").set_default_size("128K").set_extra_options("32K,64K").set_default_value(0);
NVRAM(config, "nvram").set_custom_handler(FUNC(clcd_state::nvram_init));
-MACHINE_CONFIG_END
+}
ROM_START( clcd )
diff --git a/src/mame/drivers/clowndwn.cpp b/src/mame/drivers/clowndwn.cpp
index 2fe069950f8..e31862cef12 100644
--- a/src/mame/drivers/clowndwn.cpp
+++ b/src/mame/drivers/clowndwn.cpp
@@ -56,21 +56,21 @@ void clowndwn_state::machine_reset()
}
-MACHINE_CONFIG_START(clowndwn_state::clowndwn)
-
+void clowndwn_state::clowndwn(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6802, 8000000) // unknown type and clock
- MCFG_DEVICE_PROGRAM_MAP(clowndwn_map)
+ M6802(config, m_maincpu, 8000000); // unknown type and clock
+ m_maincpu->set_addrmap(AS_PROGRAM, &clowndwn_state::clowndwn_map);
- MCFG_DEVICE_ADD("pia0", PIA6821, 0)
- MCFG_DEVICE_ADD("pia1", PIA6821, 0)
- MCFG_DEVICE_ADD("pia2", PIA6821, 0)
- MCFG_DEVICE_ADD("pia3", PIA6821, 0)
- MCFG_DEVICE_ADD("pia4", PIA6821, 0)
+ PIA6821(config, "pia0", 0);
+ PIA6821(config, "pia1", 0);
+ PIA6821(config, "pia2", 0);
+ PIA6821(config, "pia3", 0);
+ PIA6821(config, "pia4", 0);
/* sound hardware */
SPEAKER(config, "mono").front_center();
-MACHINE_CONFIG_END
+}
// has
diff --git a/src/mame/drivers/clpoker.cpp b/src/mame/drivers/clpoker.cpp
index d80eb9e38eb..71f1c76c27a 100644
--- a/src/mame/drivers/clpoker.cpp
+++ b/src/mame/drivers/clpoker.cpp
@@ -253,11 +253,12 @@ static GFXDECODE_START( gfx_clpoker )
GFXDECODE_END
-MACHINE_CONFIG_START(clpoker_state::clpoker)
+void clpoker_state::clpoker(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(12'000'000) / 3) // Z0840004PSC, divider not verified
- MCFG_DEVICE_PROGRAM_MAP(prg_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ Z80(config, m_maincpu, XTAL(12'000'000) / 3); // Z0840004PSC, divider not verified
+ m_maincpu->set_addrmap(AS_PROGRAM, &clpoker_state::prg_map);
+ m_maincpu->set_addrmap(AS_IO, &clpoker_state::io_map);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // HY6116ALP-12
@@ -273,16 +274,16 @@ MACHINE_CONFIG_START(clpoker_state::clpoker)
TICKET_DISPENSER(config, m_hopper, attotime::from_msec(60), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) // wrong
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) // wrong
- MCFG_SCREEN_SIZE(64*8, 32*8) // wrong
- MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1) // probably right
- MCFG_SCREEN_UPDATE_DRIVER(clpoker_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, clpoker_state, vblank_w))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60); // wrong
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); // wrong
+ screen.set_size(64*8, 32*8); // wrong
+ screen.set_visarea_full(); // probably right
+ screen.set_screen_update(FUNC(clpoker_state::screen_update));
+ screen.set_palette("palette");
+ screen.screen_vblank().set(FUNC(clpoker_state::vblank_w));
- MCFG_PALETTE_ADD("palette", 0x100)
+ PALETTE(config, "palette").set_entries(0x100);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette")); // HM86171
ramdac.set_addrmap(0, &clpoker_state::ramdac_map);
@@ -294,7 +295,7 @@ MACHINE_CONFIG_START(clpoker_state::clpoker)
aysnd.port_a_read_callback().set_ioport("DSW1");
aysnd.port_b_read_callback().set_ioport("DSW2");
aysnd.add_route(ALL_OUTPUTS, "mono", 0.30);
-MACHINE_CONFIG_END
+}
ROM_START( clpoker )
diff --git a/src/mame/drivers/clshroad.cpp b/src/mame/drivers/clshroad.cpp
index 4c443919ac8..f908f05a46b 100644
--- a/src/mame/drivers/clshroad.cpp
+++ b/src/mame/drivers/clshroad.cpp
@@ -272,16 +272,16 @@ INTERRUPT_GEN_MEMBER(clshroad_state::sound_timer_irq)
device.execute().set_input_line(0, HOLD_LINE);
}
-MACHINE_CONFIG_START(clshroad_state::firebatl)
-
+void clshroad_state::firebatl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MAIN_CLOCK) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(clshroad_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", clshroad_state, vblank_irq)
+ Z80(config, m_maincpu, MAIN_CLOCK); /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &clshroad_state::clshroad_map);
+ m_maincpu->set_vblank_int("screen", FUNC(clshroad_state::vblank_irq));
- MCFG_DEVICE_ADD("audiocpu", Z80, MAIN_CLOCK) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(clshroad_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(clshroad_state, sound_timer_irq, 120) /* periodic interrupt, don't know about the frequency */
+ Z80(config, m_audiocpu, MAIN_CLOCK); /* ? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &clshroad_state::clshroad_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(clshroad_state::sound_timer_irq), attotime::from_hz(120)); /* periodic interrupt, don't know about the frequency */
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<0>().set_inputline(m_audiocpu, INPUT_LINE_RESET).invert();
@@ -290,13 +290,13 @@ MACHINE_CONFIG_START(clshroad_state::firebatl)
mainlatch.q_out_cb<4>().set(FUNC(clshroad_state::flipscreen_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x120, 0x100)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x120-1, 0x0+16, 0x100-16-1)
- MCFG_SCREEN_UPDATE_DRIVER(clshroad_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(0x120, 0x100);
+ screen.set_visarea(0, 0x120-1, 0x0+16, 0x100-16-1);
+ screen.set_screen_update(FUNC(clshroad_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_firebatl);
PALETTE(config, m_palette, FUNC(clshroad_state::firebatl_palette), 512+64*4, 256);
@@ -306,21 +306,20 @@ MACHINE_CONFIG_START(clshroad_state::firebatl)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("custom", WIPING_CUSTOM, 96000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(clshroad_state::clshroad)
+ WIPING_CUSTOM(config, "custom", 96000).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
+void clshroad_state::clshroad(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MAIN_CLOCK) /* ? real speed unknown. 3MHz is too low and causes problems */
- MCFG_DEVICE_PROGRAM_MAP(clshroad_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", clshroad_state, vblank_irq)
+ Z80(config, m_maincpu, MAIN_CLOCK); /* ? real speed unknown. 3MHz is too low and causes problems */
+ m_maincpu->set_addrmap(AS_PROGRAM, &clshroad_state::clshroad_map);
+ m_maincpu->set_vblank_int("screen", FUNC(clshroad_state::vblank_irq));
- MCFG_DEVICE_ADD("audiocpu", Z80, MAIN_CLOCK) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(clshroad_sound_map)
- //MCFG_DEVICE_VBLANK_INT_DRIVER("screen", clshroad_state, irq0_line_hold) /* IRQ, no NMI */
- MCFG_DEVICE_PERIODIC_INT_DRIVER(clshroad_state, sound_timer_irq, 60) /* periodic interrupt, don't know about the frequency */
+ Z80(config, m_audiocpu, MAIN_CLOCK); /* ? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &clshroad_state::clshroad_sound_map);
+ //m_audiocpu->set_vblank_int("screen", FUNC(clshroad_state::irq0_line_hold)); /* IRQ, no NMI */
+ m_audiocpu->set_periodic_int(FUNC(clshroad_state::sound_timer_irq), attotime::from_hz(60)); /* periodic interrupt, don't know about the frequency */
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<0>().set_nop(); // never writes here?
@@ -329,13 +328,13 @@ MACHINE_CONFIG_START(clshroad_state::clshroad)
mainlatch.q_out_cb<4>().set(FUNC(clshroad_state::flipscreen_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x120, 0x100)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x120-1, 0x0+16, 0x100-16-1)
- MCFG_SCREEN_UPDATE_DRIVER(clshroad_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(0x120, 0x100);
+ screen.set_visarea(0, 0x120-1, 0x0+16, 0x100-16-1);
+ screen.set_screen_update(FUNC(clshroad_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_clshroad);
PALETTE(config, m_palette, FUNC(clshroad_state::clshroad_palette), 256);
@@ -345,9 +344,8 @@ MACHINE_CONFIG_START(clshroad_state::clshroad)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("custom", WIPING_CUSTOM, 96000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ WIPING_CUSTOM(config, "custom", 96000).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
/***************************************************************************
diff --git a/src/mame/drivers/cmi.cpp b/src/mame/drivers/cmi.cpp
index 742537c6b29..148e0386fd8 100644
--- a/src/mame/drivers/cmi.cpp
+++ b/src/mame/drivers/cmi.cpp
@@ -2158,29 +2158,30 @@ static void cmi2x_floppies(device_slot_interface &device)
device.option_add("8dssd", FLOPPY_8_DSSD);
}
-MACHINE_CONFIG_START(cmi_state::cmi2x)
- MCFG_DEVICE_ADD("maincpu1", MC6809E, Q209_CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(maincpu1_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(cmi_state, cpu1_interrupt_callback)
+void cmi_state::cmi2x(machine_config &config)
+{
+ MC6809E(config, m_maincpu1, Q209_CPU_CLOCK);
+ m_maincpu1->set_addrmap(AS_PROGRAM, &cmi_state::maincpu1_map);
+ m_maincpu1->set_irq_acknowledge_callback(FUNC(cmi_state::cpu1_interrupt_callback));
config.m_perfect_cpu_quantum = subtag("maincpu1");
- MCFG_DEVICE_ADD("maincpu2", MC6809E, Q209_CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(maincpu2_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(cmi_state, cpu2_interrupt_callback)
+ MC6809E(config, m_maincpu2, Q209_CPU_CLOCK);
+ m_maincpu2->set_addrmap(AS_PROGRAM, &cmi_state::maincpu2_map);
+ m_maincpu2->set_irq_acknowledge_callback(FUNC(cmi_state::cpu2_interrupt_callback));
config.m_perfect_cpu_quantum = subtag("maincpu2");
- MCFG_DEVICE_ADD("muskeys", M6802, 4_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(muskeys_map)
+ M6802(config, m_muskeyscpu, 4_MHz_XTAL);
+ m_muskeyscpu->set_addrmap(AS_PROGRAM, &cmi_state::muskeys_map);
- MCFG_DEVICE_ADD("alphakeys", M6802, 3.84_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(alphakeys_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(cmi_state, irq0_line_hold, 3.84_MHz_XTAL / 400) // TODO: PIA controls this
+ M6802(config, m_alphakeyscpu, 3.84_MHz_XTAL);
+ m_alphakeyscpu->set_addrmap(AS_PROGRAM, &cmi_state::alphakeys_map);
+ m_alphakeyscpu->set_periodic_int(FUNC(cmi_state::irq0_line_hold), attotime::from_hz(3.84_MHz_XTAL / 400)); // TODO: PIA controls this
- MCFG_DEVICE_ADD("smptemidi", M68000, 20_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(midicpu_map)
+ M68000(config, m_midicpu, 20_MHz_XTAL / 2);
+ m_midicpu->set_addrmap(AS_PROGRAM, &cmi_state::midicpu_map);
- MCFG_DEVICE_ADD("cmi07cpu", MC6809E, Q209_CPU_CLOCK) // ?
- MCFG_DEVICE_PROGRAM_MAP(cmi07cpu_map)
+ MC6809E(config, m_cmi07cpu, Q209_CPU_CLOCK); // ?
+ m_cmi07cpu->set_addrmap(AS_PROGRAM, &cmi_state::cmi07cpu_map);
/* alpha-numeric display */
DL1416T(config, m_dp1, u32(0));
@@ -2324,7 +2325,7 @@ MACHINE_CONFIG_START(cmi_state::cmi2x)
cmi01a_device &cmi01a_7(CMI01A_CHANNEL_CARD(config, "cmi01a_7", 0));
cmi01a_7.add_route(ALL_OUTPUTS, "mono", 0.25);
cmi01a_7.irq_callback().set(FUNC(cmi_state::channel_irq<0>));
-MACHINE_CONFIG_END
+}
ROM_START( cmi2x )
/* Q133 Processor control card */
diff --git a/src/mame/drivers/cmmb.cpp b/src/mame/drivers/cmmb.cpp
index 6dab344cdc1..8b8a811fe07 100644
--- a/src/mame/drivers/cmmb.cpp
+++ b/src/mame/drivers/cmmb.cpp
@@ -416,22 +416,22 @@ void cmmb_state::machine_reset()
}
-MACHINE_CONFIG_START(cmmb_state::cmmb)
-
+void cmmb_state::cmmb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M65SC02, MAIN_CLOCK/5) // Unknown clock, but chip rated for 14MHz
- MCFG_DEVICE_PROGRAM_MAP(cmmb_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cmmb_state, vblank_irq)
+ M65SC02(config, m_maincpu, MAIN_CLOCK/5); // Unknown clock, but chip rated for 14MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &cmmb_state::cmmb_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cmmb_state::vblank_irq));
AT29C020(config, "at29c020");
ADDRESS_MAP_BANK(config, "bnk2000").set_map(&cmmb_state::bnk2000_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x8000);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/12, 384, 0, 256, 264, 0, 240) // TBD, not real measurements
- MCFG_SCREEN_UPDATE_DRIVER(cmmb_state, screen_update_cmmb)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(MAIN_CLOCK/12, 384, 0, 256, 264, 0, 240); // TBD, not real measurements
+ screen.set_screen_update(FUNC(cmmb_state::screen_update_cmmb));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cmmb);
@@ -440,7 +440,7 @@ MACHINE_CONFIG_START(cmmb_state::cmmb)
/* sound hardware */
// SPEAKER(config, "mono").front_center();
// AY8910(config, "aysnd", 8000000/4).add_route(ALL_OUTPUTS, "mono", 0.30);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/cninja.cpp b/src/mame/drivers/cninja.cpp
index 754914d6e9f..5bd7276e6ca 100644
--- a/src/mame/drivers/cninja.cpp
+++ b/src/mame/drivers/cninja.cpp
@@ -791,11 +791,11 @@ MACHINE_RESET_MEMBER(cninja_state,robocop2)
m_priority = 0;
}
-MACHINE_CONFIG_START(cninja_state::cninja)
-
+void cninja_state::cninja(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(cninja_map)
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cninja_state::cninja_map);
h6280_device &audiocpu(H6280(config, m_audiocpu, XTAL(32'220'000) / 8));
audiocpu.set_addrmap(AS_PROGRAM, &cninja_state::sound_map);
@@ -808,15 +808,15 @@ MACHINE_CONFIG_START(cninja_state::cninja)
irq.vblank_irq_callback().set_inputline(m_maincpu, 5);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000) / 4, 376, 0, 256, 274, 8, 248)
- MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_cninja)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(24'000'000) / 4, 376, 0, 256, 274, 8, 248);
+ m_screen->set_screen_update(FUNC(cninja_state::screen_update_cninja));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cninja);
PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048);
- MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram[0]);
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_split(1);
@@ -863,8 +863,7 @@ MACHINE_CONFIG_START(cninja_state::cninja)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("ym1", YM2203, XTAL(32'220'000) / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
+ YM2203(config, "ym1", XTAL(32'220'000) / 8).add_route(ALL_OUTPUTS, "mono", 0.60);
ym2151_device &ym2(YM2151(config, "ym2", XTAL(32'220'000) / 9));
ym2.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */
@@ -872,22 +871,20 @@ MACHINE_CONFIG_START(cninja_state::cninja)
ym2.add_route(0, "mono", 0.45);
ym2.add_route(1, "mono", 0.45);
- MCFG_DEVICE_ADD("oki1", OKIM6295, XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
-
- MCFG_DEVICE_ADD("oki2", OKIM6295, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75);
+ OKIM6295(config, m_oki2, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.60);
+}
-MACHINE_CONFIG_START(cninja_state::stoneage)
+void cninja_state::stoneage(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(cninja_map)
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cninja_state::cninja_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 3579545)
- MCFG_DEVICE_PROGRAM_MAP(stoneage_s_map)
+ Z80(config, m_audiocpu, 3579545);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cninja_state::stoneage_s_map);
deco_irq_device &irq(DECO_IRQ(config, "irq", 0));
irq.set_screen_tag(m_screen);
@@ -896,17 +893,17 @@ MACHINE_CONFIG_START(cninja_state::stoneage)
irq.vblank_irq_callback().set_inputline(m_maincpu, 5);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000) / 4, 376, 0, 256, 274, 8, 248)
- MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_cninja)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(24'000'000) / 4, 376, 0, 256, 274, 8, 248);
+ m_screen->set_screen_update(FUNC(cninja_state::screen_update_cninja));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cninja);
PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048);
MCFG_VIDEO_START_OVERRIDE(cninja_state,stoneage)
- MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram[0]);
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_split(1);
@@ -958,35 +955,33 @@ MACHINE_CONFIG_START(cninja_state::stoneage)
ymsnd.add_route(0, "mono", 0.45);
ymsnd.add_route(1, "mono", 0.45);
- MCFG_DEVICE_ADD("oki1", OKIM6295, XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75);
+}
-MACHINE_CONFIG_START(cninja_state::cninjabl2)
+void cninja_state::cninjabl2(machine_config &config)
+{
stoneage(config);
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_PROGRAM_MAP(cninjabl2_s_map)
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cninja_state::cninjabl2_s_map);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_cninjabl2)
+ m_screen->set_screen_update(FUNC(cninja_state::screen_update_cninjabl2));
m_ioprot->soundlatch_irq_cb().set_inputline(m_audiocpu, INPUT_LINE_IRQ0);
config.device_remove("ymsnd");
- MCFG_DEVICE_REPLACE("oki1", OKIM6295, XTAL(32'220'000) / 32, okim6295_device::PIN7_LOW)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(0, cninjabl2_oki_map)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(cninja_state::cninjabl)
+ okim6295_device &oki1(OKIM6295(config.replace(), "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_LOW));
+ oki1.add_route(ALL_OUTPUTS, "mono", 1.0);
+ oki1.set_addrmap(0, &cninja_state::cninjabl2_oki_map);
+}
+void cninja_state::cninjabl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(cninjabl_map)
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cninja_state::cninjabl_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 3579545)
- MCFG_DEVICE_PROGRAM_MAP(cninjabl_sound_map)
+ Z80(config, m_audiocpu, 3579545);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cninja_state::cninjabl_sound_map);
deco_irq_device &irq(DECO_IRQ(config, "irq", 0));
irq.set_screen_tag(m_screen);
@@ -995,15 +990,15 @@ MACHINE_CONFIG_START(cninja_state::cninjabl)
irq.vblank_irq_callback().set_inputline(m_maincpu, 5);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000) / 4, 376, 0, 256, 274, 8, 248)
- MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_cninjabl)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(24'000'000) / 4, 376, 0, 256, 274, 8, 248);
+ m_screen->set_screen_update(FUNC(cninja_state::screen_update_cninjabl));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cninjabl);
PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048);
- MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram[0]);
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_split(1);
@@ -1046,16 +1041,15 @@ MACHINE_CONFIG_START(cninja_state::cninjabl)
ymsnd.add_route(0, "mono", 0.45);
ymsnd.add_route(1, "mono", 0.45);
- MCFG_DEVICE_ADD("oki1", OKIM6295, XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
-MACHINE_CONFIG_END
-
+ OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75);
+}
-MACHINE_CONFIG_START(cninja_state::edrandy)
+void cninja_state::edrandy(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(edrandy_map)
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cninja_state::edrandy_map);
h6280_device &audiocpu(H6280(config, m_audiocpu, XTAL(32'220'000) / 8));
audiocpu.set_addrmap(AS_PROGRAM, &cninja_state::sound_map);
@@ -1068,15 +1062,15 @@ MACHINE_CONFIG_START(cninja_state::edrandy)
irq.vblank_irq_callback().set_inputline(m_maincpu, 5);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000) / 4, 376, 0, 256, 274, 8, 248)
- MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_edrandy)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(24'000'000) / 4, 376, 0, 256, 274, 8, 248);
+ m_screen->set_screen_update(FUNC(cninja_state::screen_update_edrandy));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cninja);
PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048);
- MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram[0]);
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_split(0);
@@ -1122,8 +1116,7 @@ MACHINE_CONFIG_START(cninja_state::edrandy)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("ym1", YM2203, XTAL(32'220'000) / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
+ YM2203(config, "ym1", XTAL(32'220'000) / 8).add_route(ALL_OUTPUTS, "mono", 0.60);
ym2151_device &ym2(YM2151(config, "ym2", XTAL(32'220'000) / 9));
ym2.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */
@@ -1131,19 +1124,17 @@ MACHINE_CONFIG_START(cninja_state::edrandy)
ym2.add_route(0, "mono", 0.45);
ym2.add_route(1, "mono", 0.45);
- MCFG_DEVICE_ADD("oki1", OKIM6295, XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
-
- MCFG_DEVICE_ADD("oki2", OKIM6295, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.75);
+ OKIM6295(config, m_oki2, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.60);
+}
-MACHINE_CONFIG_START(cninja_state::robocop2)
+void cninja_state::robocop2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(28'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(robocop2_map)
+ M68000(config, m_maincpu, XTAL(28'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cninja_state::robocop2_map);
h6280_device &audiocpu(H6280(config, m_audiocpu, XTAL(32'220'000) / 8));
audiocpu.set_addrmap(AS_PROGRAM, &cninja_state::sound_map);
@@ -1157,10 +1148,10 @@ MACHINE_CONFIG_START(cninja_state::robocop2)
irq.vblank_irq_callback().set_inputline(m_maincpu, 5);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(28'000'000) / 4, 442, 0, 320, 274, 8, 248)
- MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_robocop2)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(28'000'000) / 4, 442, 0, 320, 274, 8, 248);
+ m_screen->set_screen_update(FUNC(cninja_state::screen_update_robocop2));
+ m_screen->set_palette(m_palette);
MCFG_MACHINE_START_OVERRIDE(cninja_state,robocop2)
MCFG_MACHINE_RESET_OVERRIDE(cninja_state,robocop2)
@@ -1168,7 +1159,7 @@ MACHINE_CONFIG_START(cninja_state::robocop2)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_robocop2);
PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048);
- MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram[0]);
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_split(0);
@@ -1217,9 +1208,9 @@ MACHINE_CONFIG_START(cninja_state::robocop2)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ym1", YM2203, XTAL(32'220'000) / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.60)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.60)
+ ym2203_device &ym1(YM2203(config, "ym1", XTAL(32'220'000) / 8));
+ ym1.add_route(ALL_OUTPUTS, "lspeaker", 0.60);
+ ym1.add_route(ALL_OUTPUTS, "rspeaker", 0.60);
ym2151_device &ym2(YM2151(config, "ym2", XTAL(32'220'000) / 9));
ym2.irq_handler().set_inputline(m_audiocpu, 1); /* IRQ2 */
@@ -1227,22 +1218,22 @@ MACHINE_CONFIG_START(cninja_state::robocop2)
ym2.add_route(0, "lspeaker", 0.45);
ym2.add_route(1, "rspeaker", 0.45);
- MCFG_DEVICE_ADD("oki1", OKIM6295, XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
-
- MCFG_DEVICE_ADD("oki2", OKIM6295, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.60)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.60)
-MACHINE_CONFIG_END
+ okim6295_device &oki1(OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH));
+ oki1.add_route(ALL_OUTPUTS, "lspeaker", 0.75);
+ oki1.add_route(ALL_OUTPUTS, "rspeaker", 0.75);
+ OKIM6295(config, m_oki2, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH);
+ m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.60);
+ m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.60);
+}
-MACHINE_CONFIG_START(cninja_state::mutantf)
+void cninja_state::mutantf(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(28'000'000) / 2)
- MCFG_DEVICE_PROGRAM_MAP(mutantf_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cninja_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(28'000'000) / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cninja_state::mutantf_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cninja_state::irq6_line_hold));
h6280_device &audiocpu(H6280(config, m_audiocpu, XTAL(32'220'000) / 8));
audiocpu.set_addrmap(AS_PROGRAM, &cninja_state::sound_map_mutantf);
@@ -1250,9 +1241,9 @@ MACHINE_CONFIG_START(cninja_state::mutantf)
audiocpu.add_route(ALL_OUTPUTS, "rspeaker", 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(28'000'000) / 4, 442, 0, 320, 274, 8, 248) // same as robocop2? verify this from real pcb
- MCFG_SCREEN_UPDATE_DRIVER(cninja_state, screen_update_mutantf)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(28'000'000) / 4, 442, 0, 320, 274, 8, 248); // same as robocop2? verify this from real pcb
+ m_screen->set_screen_update(FUNC(cninja_state::screen_update_mutantf));
MCFG_MACHINE_START_OVERRIDE(cninja_state,robocop2)
MCFG_MACHINE_RESET_OVERRIDE(cninja_state,robocop2)
@@ -1261,8 +1252,8 @@ MACHINE_CONFIG_START(cninja_state::mutantf)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_mutantf);
PALETTE(config, m_palette).set_format(palette_device::xBGR_888, 2048);
- MCFG_DEVICE_ADD("spriteram1", BUFFERED_SPRITERAM16)
- MCFG_DEVICE_ADD("spriteram2", BUFFERED_SPRITERAM16)
+ BUFFERED_SPRITERAM16(config, m_spriteram[0]);
+ BUFFERED_SPRITERAM16(config, m_spriteram[1]);
DECO16IC(config, m_deco_tilegen[0], 0);
m_deco_tilegen[0]->set_split(0);
@@ -1320,14 +1311,14 @@ MACHINE_CONFIG_START(cninja_state::mutantf)
ymsnd.add_route(0, "lspeaker", 0.45);
ymsnd.add_route(1, "rspeaker", 0.45);
- MCFG_DEVICE_ADD("oki1", OKIM6295, XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
+ okim6295_device &oki1(OKIM6295(config, "oki1", XTAL(32'220'000) / 32, okim6295_device::PIN7_HIGH));
+ oki1.add_route(ALL_OUTPUTS, "lspeaker", 0.75);
+ oki1.add_route(ALL_OUTPUTS, "rspeaker", 0.75);
- MCFG_DEVICE_ADD("oki2", OKIM6295, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.60)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.60)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki2, XTAL(32'220'000) / 16, okim6295_device::PIN7_HIGH);
+ m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.60);
+ m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.60);
+}
/**********************************************************************************/
diff --git a/src/mame/drivers/cntsteer.cpp b/src/mame/drivers/cntsteer.cpp
index 2a1fd5ff109..8c51d520398 100644
--- a/src/mame/drivers/cntsteer.cpp
+++ b/src/mame/drivers/cntsteer.cpp
@@ -919,19 +919,19 @@ MACHINE_RESET_MEMBER(cntsteer_state,cntsteer)
MACHINE_RESET_CALL_MEMBER(zerotrgt);
}
-MACHINE_CONFIG_START(cntsteer_state::cntsteer)
-
+void cntsteer_state::cntsteer(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, 2000000) /* MC68B09E */
- MCFG_DEVICE_PROGRAM_MAP(cntsteer_cpu1_map)
+ MC6809E(config, m_maincpu, 2000000); /* MC68B09E */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cntsteer_state::cntsteer_cpu1_map);
- MCFG_DEVICE_ADD("subcpu", MC6809E, 2000000) /* MC68B09E */
- MCFG_DEVICE_PROGRAM_MAP(cntsteer_cpu2_map)
-// MCFG_DEVICE_DISABLE()
+ MC6809E(config, m_subcpu, 2000000); /* MC68B09E */
+ m_subcpu->set_addrmap(AS_PROGRAM, &cntsteer_state::cntsteer_cpu2_map);
+// m_subcpu->set_disable();
- MCFG_DEVICE_ADD("audiocpu", M6502, 1500000) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(cntsteer_state, sound_interrupt, 480)
+ M6502(config, m_audiocpu, 1500000); /* ? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cntsteer_state::sound_map);
+ m_audiocpu->set_periodic_int(FUNC(cntsteer_state::sound_interrupt), attotime::from_hz(480));
MCFG_MACHINE_START_OVERRIDE(cntsteer_state,cntsteer)
MCFG_MACHINE_RESET_OVERRIDE(cntsteer_state,cntsteer)
@@ -971,20 +971,20 @@ MACHINE_CONFIG_START(cntsteer_state::cntsteer)
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(cntsteer_state::zerotrgt)
+}
+void cntsteer_state::zerotrgt(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, 2000000) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(gekitsui_cpu1_map)
+ MC6809E(config, m_maincpu, 2000000); /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cntsteer_state::gekitsui_cpu1_map);
- MCFG_DEVICE_ADD("subcpu", MC6809E, 2000000) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(gekitsui_cpu2_map)
+ MC6809E(config, m_subcpu, 2000000); /* ? */
+ m_subcpu->set_addrmap(AS_PROGRAM, &cntsteer_state::gekitsui_cpu2_map);
- MCFG_DEVICE_ADD("audiocpu", M6502, 1500000) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(cntsteer_state, sound_interrupt, 480)
+ M6502(config, m_audiocpu, 1500000); /* ? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cntsteer_state::sound_map);
+ m_audiocpu->set_periodic_int(FUNC(cntsteer_state::sound_interrupt), attotime::from_hz(480));
config.m_minimum_quantum = attotime::from_hz(6000);
@@ -992,14 +992,14 @@ MACHINE_CONFIG_START(cntsteer_state::zerotrgt)
MCFG_MACHINE_RESET_OVERRIDE(cntsteer_state,zerotrgt)
/* 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(cntsteer_state, screen_update_zerotrgt)
- 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(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(cntsteer_state::screen_update_zerotrgt));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); // ?
GFXDECODE(config, m_gfxdecode, m_palette, gfx_zerotrgt);
PALETTE(config, m_palette, FUNC(cntsteer_state::zerotrgt_palette), 256);
@@ -1014,7 +1014,7 @@ MACHINE_CONFIG_START(cntsteer_state::zerotrgt)
AY8910(config, "ay1", 1500000).add_route(ALL_OUTPUTS, "speaker", 0.5);
AY8910(config, "ay2", 1500000).add_route(ALL_OUTPUTS, "speaker", 0.5);
-MACHINE_CONFIG_END
+}
/***************************************************************************/
diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp
index 3d358b5edaa..035c9ac6ea7 100644
--- a/src/mame/drivers/cobra.cpp
+++ b/src/mame/drivers/cobra.cpp
@@ -3305,25 +3305,23 @@ MACHINE_CONFIG_START(cobra_state::cobra)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(512, 400)
- MCFG_SCREEN_VISIBLE_AREA(0, 511, 0, 399)
- MCFG_SCREEN_UPDATE_DRIVER(cobra_state, screen_update_cobra)
- MCFG_PALETTE_ADD("palette", 65536)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(512, 400);
+ m_screen->set_visarea_full();
+ m_screen->set_screen_update(FUNC(cobra_state::screen_update_cobra));
+ PALETTE(config, m_palette).set_entries(65536);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("rfsnd", RF5C400, XTAL(16'934'400))
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
+ rf5c400_device &rfsnd(RF5C400(config, "rfsnd", XTAL(16'934'400)));
+ rfsnd.add_route(0, "lspeaker", 1.0);
+ rfsnd.add_route(1, "rspeaker", 1.0);
- 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);
M48T58(config, "m48t58", 0);
diff --git a/src/mame/drivers/coco12.cpp b/src/mame/drivers/coco12.cpp
index 8de06298232..45e0049cbef 100644
--- a/src/mame/drivers/coco12.cpp
+++ b/src/mame/drivers/coco12.cpp
@@ -378,7 +378,7 @@ void t4426_cart(device_slot_interface &device)
}
//-------------------------------------------------
-// MACHINE_CONFIG_START( coco_sound )
+// machine_config( coco_sound )
//-------------------------------------------------
void coco_state::coco_sound(machine_config &config)
@@ -399,7 +399,7 @@ void coco_state::coco_sound(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG ( coco_floating )
+// machine_config ( coco_floating )
//-------------------------------------------------
void coco_state::coco_floating_map(address_map &map)
@@ -427,12 +427,12 @@ static DEVICE_INPUT_DEFAULTS_START( printer )
DEVICE_INPUT_DEFAULTS_END
//-------------------------------------------------
-// MACHINE_CONFIG
+// machine_config
//-------------------------------------------------
-MACHINE_CONFIG_START(coco12_state::coco)
- MCFG_DEVICE_MODIFY(":")
- MCFG_DEVICE_CLOCK(XTAL(14'318'181) / 16)
+void coco12_state::coco(machine_config &config)
+{
+ this->set_clock(XTAL(14'318'181) / 16);
// basic machine hardware
MC6809E(config, m_maincpu, DERIVED_CLOCK(1, 1));
@@ -499,7 +499,7 @@ MACHINE_CONFIG_START(coco12_state::coco)
SOFTWARE_LIST(config, "coco_cart_list").set_original("coco_cart").set_filter("COCO");
SOFTWARE_LIST(config, "coco_flop_list").set_original("coco_flop").set_filter("COCO");
SOFTWARE_LIST(config, "dragon_cart_list").set_compatible("dragon_cart");
-MACHINE_CONFIG_END
+}
void coco12_state::cocoh(machine_config &config)
{
diff --git a/src/mame/drivers/coco3.cpp b/src/mame/drivers/coco3.cpp
index c341b6f3215..9c985218e0b 100644
--- a/src/mame/drivers/coco3.cpp
+++ b/src/mame/drivers/coco3.cpp
@@ -242,9 +242,9 @@ DEVICE_INPUT_DEFAULTS_END
// MACHINE CONFIGURATION
//**************************************************************************
-MACHINE_CONFIG_START(coco3_state::coco3)
- MCFG_DEVICE_MODIFY(":")
- MCFG_DEVICE_CLOCK(XTAL(28'636'363) / 32)
+void coco3_state::coco3(machine_config &config)
+{
+ this->set_clock(XTAL(28'636'363) / 32);
// basic machine hardware
MC6809E(config, m_maincpu, DERIVED_CLOCK(1, 1));
@@ -329,12 +329,12 @@ MACHINE_CONFIG_START(coco3_state::coco3)
SOFTWARE_LIST(config, "cart_list").set_original("coco_cart").set_filter("COCO3");
SOFTWARE_LIST(config, "flop_list").set_original("coco_flop").set_filter("COCO3");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(coco3_state::coco3p)
+void coco3_state::coco3p(machine_config &config)
+{
coco3(config);
- MCFG_DEVICE_MODIFY(":")
- MCFG_DEVICE_CLOCK(XTAL(28'475'000) / 32)
+ this->set_clock(XTAL(28'475'000) / 32);
// An additional 4.433618 MHz XTAL is required for PAL color encoding
GIME_PAL(config.replace(), m_gime, XTAL(28'475'000), MAINCPU_TAG, RAM_TAG, CARTRIDGE_TAG, MAINCPU_TAG);
@@ -344,7 +344,7 @@ MACHINE_CONFIG_START(coco3_state::coco3p)
m_gime->irq_wr_callback().set(FUNC(coco3_state::gime_irq_w));
m_gime->firq_wr_callback().set(FUNC(coco3_state::gime_firq_w));
m_gime->floating_bus_rd_callback().set(FUNC(coco3_state::floating_bus_r));
-MACHINE_CONFIG_END
+}
void coco3_state::coco3h(machine_config &config)
{
diff --git a/src/mame/drivers/cocoloco.cpp b/src/mame/drivers/cocoloco.cpp
index 6b1f8bbd68a..202477886be 100644
--- a/src/mame/drivers/cocoloco.cpp
+++ b/src/mame/drivers/cocoloco.cpp
@@ -514,14 +514,14 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(cocoloco_state::cocoloco)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(cocoloco_map)
+ M6502(config, m_maincpu, CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cocoloco_state::cocoloco_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(CPU_CLOCK * 4, 384, 0, 256, 262, 0, 256) // TODO: not accurate, ~50 Hz
- MCFG_SCREEN_UPDATE_DRIVER(cocoloco_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(CPU_CLOCK * 4, 384, 0, 256, 262, 0, 256); // TODO: not accurate, ~50 Hz
+ screen.set_screen_update(FUNC(cocoloco_state::screen_update));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette, FUNC(cocoloco_state::cocoloco_palette), 0x10);
diff --git a/src/mame/drivers/coinmstr.cpp b/src/mame/drivers/coinmstr.cpp
index 443f1bfdab2..5abd1acc21e 100644
--- a/src/mame/drivers/coinmstr.cpp
+++ b/src/mame/drivers/coinmstr.cpp
@@ -1255,10 +1255,11 @@ uint32_t coinmstr_state::screen_update_coinmstr(screen_device &screen, bitmap_in
}
-MACHINE_CONFIG_START(coinmstr_state::coinmstr)
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK) // 7 MHz.
- MCFG_DEVICE_PROGRAM_MAP(coinmstr_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", coinmstr_state, irq0_line_hold)
+void coinmstr_state::coinmstr(machine_config &config)
+{
+ Z80(config, m_maincpu, CPU_CLOCK); // 7 MHz.
+ m_maincpu->set_addrmap(AS_PROGRAM, &coinmstr_state::coinmstr_map);
+ m_maincpu->set_vblank_int("screen", FUNC(coinmstr_state::irq0_line_hold));
pia6821_device &pia0(PIA6821(config, "pia0", 0));
pia0.readpa_handler().set_ioport("PIA0.A");
@@ -1273,16 +1274,16 @@ MACHINE_CONFIG_START(coinmstr_state::coinmstr)
pia2.readpb_handler().set_ioport("PIA2.B");
/* 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, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 46*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(coinmstr_state, screen_update_coinmstr)
- 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, 64*8);
+ screen.set_visarea(0*8, 46*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(coinmstr_state::screen_update_coinmstr));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_coinmstr);
- MCFG_PALETTE_ADD("palette", 46*32*4)
+ PALETTE(config, m_palette).set_entries(46*32*4);
h46505_device &crtc(H46505(config, "crtc", 14000000 / 16));
crtc.set_screen("screen");
@@ -1295,39 +1296,39 @@ MACHINE_CONFIG_START(coinmstr_state::coinmstr)
ay8910_device &aysnd(AY8910(config, "aysnd", SND_CLOCK));
aysnd.port_a_read_callback().set_ioport("DSW1");
aysnd.add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(coinmstr_state::quizmstr)
+void coinmstr_state::quizmstr(machine_config &config)
+{
coinmstr(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(quizmstr_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &coinmstr_state::quizmstr_io_map);
+}
-MACHINE_CONFIG_START(coinmstr_state::trailblz)
+void coinmstr_state::trailblz(machine_config &config)
+{
coinmstr(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(trailblz_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &coinmstr_state::trailblz_io_map);
+}
-MACHINE_CONFIG_START(coinmstr_state::supnudg2)
+void coinmstr_state::supnudg2(machine_config &config)
+{
coinmstr(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(supnudg2_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &coinmstr_state::supnudg2_io_map);
+}
-MACHINE_CONFIG_START(coinmstr_state::pokeroul)
+void coinmstr_state::pokeroul(machine_config &config)
+{
coinmstr(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(pokeroul_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &coinmstr_state::pokeroul_io_map);
+}
-MACHINE_CONFIG_START(coinmstr_state::jpcoin)
+void coinmstr_state::jpcoin(machine_config &config)
+{
coinmstr(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(jpcoin_map)
- MCFG_DEVICE_IO_MAP(jpcoin_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &coinmstr_state::jpcoin_map);
+ m_maincpu->set_addrmap(AS_IO, &coinmstr_state::jpcoin_io_map);
// NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
/*
diff --git a/src/mame/drivers/coinmvga.cpp b/src/mame/drivers/coinmvga.cpp
index 00fcb00a8d7..3c3e47934dc 100644
--- a/src/mame/drivers/coinmvga.cpp
+++ b/src/mame/drivers/coinmvga.cpp
@@ -636,33 +636,33 @@ void coinmvga_state::ramdac2_map(address_map &map)
}
-MACHINE_CONFIG_START(coinmvga_state::coinmvga)
-
+void coinmvga_state::coinmvga(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", H83007, CPU_CLOCK) /* xtal */
- MCFG_DEVICE_PROGRAM_MAP(coinmvga_map)
- MCFG_DEVICE_IO_MAP(coinmvga_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", coinmvga_state, vblank_irq) /* wrong, fix me */
+ H83007(config, m_maincpu, CPU_CLOCK); /* xtal */
+ m_maincpu->set_addrmap(AS_PROGRAM, &coinmvga_state::coinmvga_map);
+ m_maincpu->set_addrmap(AS_IO, &coinmvga_state::coinmvga_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(coinmvga_state::vblank_irq)); /* wrong, fix me */
// 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(640,480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
- MCFG_SCREEN_UPDATE_DRIVER(coinmvga_state, screen_update_coinmvga)
- 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(640,480);
+ screen.set_visarea_full();
+ screen.set_screen_update(FUNC(coinmvga_state::screen_update_coinmvga));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_coinmvga);
GFXDECODE(config, "gfxdecode2", m_palette2, gfx_coinmvga2);
- MCFG_PALETTE_ADD("palette", 256)
+ PALETTE(config, m_palette).set_entries(256);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette));
ramdac.set_addrmap(0, &coinmvga_state::ramdac_map);
- MCFG_PALETTE_ADD("palette2", 16)
+ PALETTE(config, m_palette2).set_entries(16);
ramdac_device &ramdac2(RAMDAC(config, "ramdac2", 0, m_palette2));
ramdac2.set_addrmap(0, &coinmvga_state::ramdac2_map);
@@ -670,10 +670,10 @@ MACHINE_CONFIG_START(coinmvga_state::coinmvga)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymz", YMZ280B, SND_CLOCK)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ ymz280b_device &ymz(YMZ280B(config, "ymz", SND_CLOCK));
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(1, "rspeaker", 1.0);
+}
/*************************
diff --git a/src/mame/drivers/comebaby.cpp b/src/mame/drivers/comebaby.cpp
index 65bf27731f4..da1e49c37a9 100644
--- a/src/mame/drivers/comebaby.cpp
+++ b/src/mame/drivers/comebaby.cpp
@@ -236,25 +236,26 @@ static INPUT_PORTS_START( comebaby )
INPUT_PORTS_END
-MACHINE_CONFIG_START(comebaby_state::comebaby)
+void comebaby_state::comebaby(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", PENTIUM2, (66666666*19)/2) /* Actually a Celeron */
- MCFG_DEVICE_PROGRAM_MAP(comebaby_map)
- MCFG_DEVICE_IO_MAP(comebaby_io)
+ PENTIUM2(config, m_maincpu, (66666666*19)/2); /* Actually a Celeron */
+ m_maincpu->set_addrmap(AS_PROGRAM, &comebaby_state::comebaby_map);
+ m_maincpu->set_addrmap(AS_IO, &comebaby_state::comebaby_io);
pcat_common(config);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DRIVER(comebaby_state, screen_update)
- 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, 64*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 0x100)
-MACHINE_CONFIG_END
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_screen_update(FUNC(comebaby_state::screen_update));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea_full();
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette").set_entries(0x100);
+}
ROM_START(comebaby)
diff --git a/src/mame/drivers/commando.cpp b/src/mame/drivers/commando.cpp
index 442db94c3d1..4c310d24464 100644
--- a/src/mame/drivers/commando.cpp
+++ b/src/mame/drivers/commando.cpp
@@ -252,16 +252,16 @@ void commando_state::machine_reset()
}
-MACHINE_CONFIG_START(commando_state::commando)
-
+void commando_state::commando(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, PHI_MAIN) // ???
- MCFG_DEVICE_PROGRAM_MAP(commando_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ Z80(config, m_maincpu, PHI_MAIN); // ???
+ m_maincpu->set_addrmap(AS_PROGRAM, &commando_state::commando_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &commando_state::decrypted_opcodes_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, PHI_B) // 3 MHz
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(commando_state, irq0_line_hold, 4*60)
+ Z80(config, m_audiocpu, PHI_B); // 3 MHz
+ m_audiocpu->set_addrmap(AS_PROGRAM, &commando_state::sound_map);
+ m_audiocpu->set_periodic_int(FUNC(commando_state::irq0_line_hold), attotime::from_hz(4*60));
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
@@ -287,7 +287,7 @@ MACHINE_CONFIG_START(commando_state::commando)
YM2203(config, "ym1", PHI_B/2).add_route(ALL_OUTPUTS, "mono", 0.15);
YM2203(config, "ym2", PHI_B/2).add_route(ALL_OUTPUTS, "mono", 0.15);
-MACHINE_CONFIG_END
+}
/* ROMs */
diff --git a/src/mame/drivers/compgolf.cpp b/src/mame/drivers/compgolf.cpp
index bada8ab9c80..14c334fee6f 100644
--- a/src/mame/drivers/compgolf.cpp
+++ b/src/mame/drivers/compgolf.cpp
@@ -222,21 +222,21 @@ void compgolf_state::machine_reset()
m_scrolly_hi = 0;
}
-MACHINE_CONFIG_START(compgolf_state::compgolf)
-
+void compgolf_state::compgolf(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, 2000000) // HD68B09EP
- MCFG_DEVICE_PROGRAM_MAP(compgolf_map)
+ MC6809E(config, m_maincpu, 2000000); // HD68B09EP
+ m_maincpu->set_addrmap(AS_PROGRAM, &compgolf_state::compgolf_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_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(1*8, 32*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(compgolf_state, screen_update_compgolf)
- 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(2500) /* not accurate */);
+ screen.set_size(256, 256);
+ screen.set_visarea(1*8, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(compgolf_state::screen_update_compgolf));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
PALETTE(config, m_palette, FUNC(compgolf_state::compgolf_palette), 0x100);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_compgolf);
@@ -249,7 +249,7 @@ MACHINE_CONFIG_START(compgolf_state::compgolf)
ymsnd.port_a_write_callback().set(FUNC(compgolf_state::compgolf_scrollx_lo_w));
ymsnd.port_b_write_callback().set(FUNC(compgolf_state::compgolf_scrolly_lo_w));
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/compis.cpp b/src/mame/drivers/compis.cpp
index 18543289904..b8d28f9254e 100644
--- a/src/mame/drivers/compis.cpp
+++ b/src/mame/drivers/compis.cpp
@@ -734,7 +734,7 @@ void compis_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( compis )
+// machine_config( compis )
//-------------------------------------------------
void compis_state::compis(machine_config &config)
@@ -829,7 +829,7 @@ void compis_state::compis(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( compis2 )
+// machine_config( compis2 )
//-------------------------------------------------
void compis_state::compis2(machine_config &config)
diff --git a/src/mame/drivers/compucolor.cpp b/src/mame/drivers/compucolor.cpp
index fea08626904..7be709ab659 100644
--- a/src/mame/drivers/compucolor.cpp
+++ b/src/mame/drivers/compucolor.cpp
@@ -395,17 +395,18 @@ void compucolor2_state::machine_reset()
m_rs232->write_dtr(1);
}
-MACHINE_CONFIG_START(compucolor2_state::compucolor2)
+void compucolor2_state::compucolor2(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD(I8080_TAG, I8080, XTAL(17'971'200)/9)
- MCFG_DEVICE_PROGRAM_MAP(compucolor2_mem)
- MCFG_DEVICE_IO_MAP(compucolor2_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(compucolor2_state,int_ack)
+ I8080(config, m_maincpu, XTAL(17'971'200)/9);
+ m_maincpu->set_addrmap(AS_PROGRAM, &compucolor2_state::compucolor2_mem);
+ m_maincpu->set_addrmap(AS_IO, &compucolor2_state::compucolor2_io);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(compucolor2_state::int_ack));
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(17'971'200)/2, 93*6, 0, 64*6, 268, 0, 256)
- MCFG_SCREEN_UPDATE_DRIVER(compucolor2_state, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(XTAL(17'971'200)/2, 93*6, 0, 64*6, 268, 0, 256);
+ screen.set_screen_update(FUNC(compucolor2_state::screen_update));
PALETTE(config, m_palette, palette_device::RGB_3BIT);
@@ -439,7 +440,7 @@ MACHINE_CONFIG_START(compucolor2_state::compucolor2)
// software list
SOFTWARE_LIST(config, "flop_list").set_original("compclr2_flop");
-MACHINE_CONFIG_END
+}
ROM_START( compclr2 )
ROM_REGION( 0x4000, I8080_TAG, 0 )
diff --git a/src/mame/drivers/comquest.cpp b/src/mame/drivers/comquest.cpp
index 0afa37d849f..acec184d755 100644
--- a/src/mame/drivers/comquest.cpp
+++ b/src/mame/drivers/comquest.cpp
@@ -214,11 +214,12 @@ void comquest_state::machine_reset()
}
-MACHINE_CONFIG_START(comquest_state::comquest)
+void comquest_state::comquest(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6805, 4000000) /* 4000000? */
- /*MCFG_DEVICE_ADD("maincpu", HD63705, 4000000) instruction set looks like m6805/m6808 */
- /*MCFG_DEVICE_ADD("maincpu", M68705, 4000000) instruction set looks like m6805/m6808 */
+ M6805(config, m_maincpu, 4000000); /* 4000000? */
+ /* HD63705(config, m_maincpu, 4000000); instruction set looks like m6805/m6808 */
+ /* M68705(config, m_maincpu, 4000000); instruction set looks like m6805/m6808 */
/*
8 bit bus, integrated io, serial io?,
@@ -244,25 +245,25 @@ MACHINE_CONFIG_START(comquest_state::comquest)
not epson e0c88
*/
- MCFG_DEVICE_PROGRAM_MAP(comquest_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &comquest_state::comquest_mem);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(30)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(64*4, 128) /* 160 x 102 */
- MCFG_SCREEN_VISIBLE_AREA(0, 64*4-1, 0, 128-1)
- MCFG_SCREEN_UPDATE_DRIVER(comquest_state, screen_update_comquest)
- MCFG_SCREEN_PALETTE("palette")
-
- GFXDECODE(config, "gfxdecode", "palette", gfx_comquest );
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(30);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(64*4, 128); /* 160 x 102 */
+ screen.set_visarea_full();
+ screen.set_screen_update(FUNC(comquest_state::screen_update_comquest));
+ screen.set_palette("palette");
+
+ GFXDECODE(config, "gfxdecode", "palette", gfx_comquest);
PALETTE(config, "palette", palette_device::MONOCHROME);
/* sound hardware */
/* unknown ? */
-MACHINE_CONFIG_END
+}
ROM_START(comquest)
// ROM_REGION(0x10000,"maincpu",0)
diff --git a/src/mame/drivers/comx35.cpp b/src/mame/drivers/comx35.cpp
index bf3ed801e55..c6b10c873db 100644
--- a/src/mame/drivers/comx35.cpp
+++ b/src/mame/drivers/comx35.cpp
@@ -592,7 +592,7 @@ void comx35_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( pal )
+// machine_config( pal )
//-------------------------------------------------
void comx35_state::base(machine_config &config, const XTAL clock)
diff --git a/src/mame/drivers/contra.cpp b/src/mame/drivers/contra.cpp
index 5501a2e8367..b8990718f0c 100644
--- a/src/mame/drivers/contra.cpp
+++ b/src/mame/drivers/contra.cpp
@@ -206,27 +206,27 @@ void contra_state::machine_reset()
m_audiocpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
-MACHINE_CONFIG_START(contra_state::contra)
-
+void contra_state::contra(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", HD6309E, XTAL(24'000'000) / 8) /* 3000000? (HD63C09EP) */
- MCFG_DEVICE_PROGRAM_MAP(contra_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", contra_state, contra_interrupt)
+ HD6309E(config, m_maincpu, XTAL(24'000'000) / 8); /* 3000000? (HD63C09EP) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &contra_state::contra_map);
+ m_maincpu->set_vblank_int("screen", FUNC(contra_state::contra_interrupt));
- MCFG_DEVICE_ADD("audiocpu", MC6809E, XTAL(24'000'000)/8) /* 3000000? (HD68B09EP) */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ MC6809E(config, m_audiocpu, XTAL(24'000'000)/8); /* 3000000? (HD68B09EP) */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &contra_state::sound_map);
config.m_minimum_quantum = attotime::from_hz(6000); /* enough for the sound CPU to read all commands */
/* 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(37*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 35*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(contra_state, screen_update_contra)
- 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(37*8, 32*8);
+ m_screen->set_visarea(0*8, 35*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(contra_state::screen_update_contra));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_contra);
@@ -247,7 +247,7 @@ MACHINE_CONFIG_START(contra_state::contra)
GENERIC_LATCH_8(config, "soundlatch");
YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "lspeaker", 0.60).add_route(1, "rspeaker", 0.60);
-MACHINE_CONFIG_END
+}
ROM_START( contra )
diff --git a/src/mame/drivers/controlid.cpp b/src/mame/drivers/controlid.cpp
index 926eaea65f2..f026d795baa 100644
--- a/src/mame/drivers/controlid.cpp
+++ b/src/mame/drivers/controlid.cpp
@@ -144,7 +144,8 @@ void controlidx628_state::controlidx628_palette(palette_device &palette) const
* Machine Driver *
*************************/
-MACHINE_CONFIG_START(controlidx628_state::controlidx628)
+void controlidx628_state::controlidx628(machine_config &config)
+{
// basic machine hardware
at89s52_device &maincpu(AT89S52(config, "maincpu", XTAL(11'059'200)));
maincpu.set_addrmap(AS_IO, &controlidx628_state::io_map);
@@ -156,18 +157,18 @@ MACHINE_CONFIG_START(controlidx628_state::controlidx628)
maincpu.port_out_cb<3>().set(FUNC(controlidx628_state::p3_w));
// video hardware
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
- MCFG_SCREEN_SIZE(132, 65)
- MCFG_SCREEN_VISIBLE_AREA(3, 130, 0, 63)
- MCFG_SCREEN_UPDATE_DEVICE("nt7534", nt7534_device, screen_update)
- 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_size(132, 65);
+ screen.set_visarea(3, 130, 0, 63);
+ screen.set_screen_update("nt7534", FUNC(nt7534_device::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(controlidx628_state::controlidx628_palette), 2);
NT7534(config, m_lcdc);
-MACHINE_CONFIG_END
+}
/*************************
diff --git a/src/mame/drivers/coolridr.cpp b/src/mame/drivers/coolridr.cpp
index aea75c76552..b58f7718fb7 100644
--- a/src/mame/drivers/coolridr.cpp
+++ b/src/mame/drivers/coolridr.cpp
@@ -3219,16 +3219,17 @@ WRITE_LINE_MEMBER(coolridr_state::scsp2_to_sh1_irq)
#define MAIN_CLOCK XTAL(28'636'363)
-MACHINE_CONFIG_START(coolridr_state::coolridr)
- MCFG_DEVICE_ADD("maincpu", SH2, MAIN_CLOCK) // 28 MHz
- MCFG_DEVICE_PROGRAM_MAP(system_h1_map)
+void coolridr_state::coolridr(machine_config &config)
+{
+ SH2(config, m_maincpu, MAIN_CLOCK); // 28 MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &coolridr_state::system_h1_map);
TIMER(config, "scantimer").configure_scanline(FUNC(coolridr_state::interrupt_main), "screen", 0, 1);
- MCFG_DEVICE_ADD("soundcpu", M68000, 22579000/2) // 22.579 MHz XTAL / 2 = 11.2895 MHz
- MCFG_DEVICE_PROGRAM_MAP(system_h1_sound_map)
+ M68000(config, m_soundcpu, 22579000/2); // 22.579 MHz XTAL / 2 = 11.2895 MHz
+ m_soundcpu->set_addrmap(AS_PROGRAM, &coolridr_state::system_h1_sound_map);
- MCFG_DEVICE_ADD("sub", SH1, 16000000) // SH7032 HD6417032F20!! 16 MHz
- MCFG_DEVICE_PROGRAM_MAP(coolridr_submap)
+ SH1(config, m_subcpu, 16000000); // SH7032 HD6417032F20!! 16 MHz
+ m_subcpu->set_addrmap(AS_PROGRAM, &coolridr_state::coolridr_submap);
TIMER(config, "scantimer2").configure_scanline(FUNC(coolridr_state::interrupt_sub), "screen", 0, 1);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -3247,19 +3248,19 @@ MACHINE_CONFIG_START(coolridr_state::coolridr)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_coolridr);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(640, 512)
- MCFG_SCREEN_VISIBLE_AREA(CLIPMINX_FULL,CLIPMAXX_FULL, CLIPMINY_FULL, CLIPMAXY_FULL)
- MCFG_SCREEN_UPDATE_DRIVER(coolridr_state, screen_update<0>)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(640, 512);
+ m_screen->set_visarea(CLIPMINX_FULL,CLIPMAXX_FULL, CLIPMINY_FULL, CLIPMAXY_FULL);
+ m_screen->set_screen_update(FUNC(coolridr_state::screen_update<0>));
+ m_screen->set_palette(m_palette);
- MCFG_SCREEN_ADD("screen2", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(640, 512)
- MCFG_SCREEN_VISIBLE_AREA(CLIPMINX_FULL,CLIPMAXX_FULL, CLIPMINY_FULL, CLIPMAXY_FULL)
- MCFG_SCREEN_UPDATE_DRIVER(coolridr_state, screen_update<1>)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen2(SCREEN(config, "screen2", SCREEN_TYPE_RASTER));
+ screen2.set_refresh_hz(60);
+ screen2.set_size(640, 512);
+ screen2.set_visarea(CLIPMINX_FULL,CLIPMAXX_FULL, CLIPMINY_FULL, CLIPMAXY_FULL);
+ screen2.set_screen_update(FUNC(coolridr_state::screen_update<1>));
+ screen2.set_palette(m_palette);
PALETTE(config, m_palette, palette_device::RGB_555);
@@ -3280,20 +3281,19 @@ MACHINE_CONFIG_START(coolridr_state::coolridr)
scsp2.main_irq_cb().set(FUNC(coolridr_state::scsp2_to_sh1_irq));
scsp2.add_route(0, "lspeaker", 1.0);
scsp2.add_route(1, "rspeaker", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(coolridr_state::aquastge)
+void coolridr_state::aquastge(machine_config &config)
+{
coolridr(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(aquastge_h1_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &coolridr_state::aquastge_h1_map);
- MCFG_DEVICE_MODIFY("sub")
- MCFG_DEVICE_PROGRAM_MAP(aquastge_submap)
+ m_subcpu->set_addrmap(AS_PROGRAM, &coolridr_state::aquastge_submap);
sega_315_5649_device &io(SEGA_315_5649(config.replace(), "io", 0));
io.in_pc_callback().set_ioport("IN0");
io.in_pd_callback().set_ioport("IN1");
-MACHINE_CONFIG_END
+}
ROM_START( coolridr )
ROM_REGION( 0x200000, "maincpu", 0 ) /* SH2 code */
diff --git a/src/mame/drivers/cop01.cpp b/src/mame/drivers/cop01.cpp
index 75ee04124aa..605268c84f0 100644
--- a/src/mame/drivers/cop01.cpp
+++ b/src/mame/drivers/cop01.cpp
@@ -446,27 +446,27 @@ void cop01_state::machine_reset()
}
-MACHINE_CONFIG_START(cop01_state::cop01)
-
+void cop01_state::cop01(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MAINCPU_CLOCK/2) /* unknown clock / divider */
- MCFG_DEVICE_PROGRAM_MAP(cop01_map)
- MCFG_DEVICE_IO_MAP(io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cop01_state, irq0_line_assert)
+ Z80(config, m_maincpu, MAINCPU_CLOCK/2); /* unknown clock / divider */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cop01_state::cop01_map);
+ m_maincpu->set_addrmap(AS_IO, &cop01_state::io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cop01_state::irq0_line_assert));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'000'000)) /* unknown clock / divider, hand-tuned to match audio reference */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(audio_io_map)
+ Z80(config, m_audiocpu, XTAL(3'000'000)); /* unknown clock / divider, hand-tuned to match audio reference */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cop01_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &cop01_state::audio_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, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cop01_state, screen_update_cop01)
- 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, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(cop01_state::screen_update_cop01));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cop01);
PALETTE(config, m_palette, FUNC(cop01_state::cop01_palette), 16+8*16+16*16, 256);
@@ -481,31 +481,31 @@ MACHINE_CONFIG_START(cop01_state::cop01)
AY8910(config, "ay2", 1250000).add_route(ALL_OUTPUTS, "mono", 0.25); /* unknown clock / divider, hand-tuned to match audio reference */
AY8910(config, "ay3", 1250000).add_route(ALL_OUTPUTS, "mono", 0.25); /* unknown clock / divider, hand-tuned to match audio reference */
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(mightguy_state::mightguy)
+}
+void mightguy_state::mightguy(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MAINCPU_CLOCK/2) /* unknown divider */
- MCFG_DEVICE_PROGRAM_MAP(cop01_map)
- MCFG_DEVICE_IO_MAP(mightguy_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cop01_state, irq0_line_assert)
+ Z80(config, m_maincpu, MAINCPU_CLOCK/2); /* unknown divider */
+ m_maincpu->set_addrmap(AS_PROGRAM, &mightguy_state::cop01_map);
+ m_maincpu->set_addrmap(AS_IO, &mightguy_state::mightguy_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cop01_state::irq0_line_assert));
- MCFG_DEVICE_ADD("audiocpu", Z80, AUDIOCPU_CLOCK/2) /* unknown divider */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(mightguy_audio_io_map)
+ Z80(config, m_audiocpu, AUDIOCPU_CLOCK/2); /* unknown divider */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &mightguy_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &mightguy_state::mightguy_audio_io_map);
NB1412M2(config, m_prot, XTAL(8'000'000)/2); // divided by 2 maybe
m_prot->dac_callback().set("dac", FUNC(dac_byte_interface::data_w));
/* 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, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cop01_state, screen_update_cop01)
- 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, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(cop01_state::screen_update_cop01));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cop01);
PALETTE(config, m_palette, FUNC(cop01_state::cop01_palette), 16+8*16+16*16, 256);
@@ -515,14 +515,13 @@ MACHINE_CONFIG_START(mightguy_state::mightguy)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("ymsnd", YM3526, AUDIOCPU_CLOCK/2) /* unknown divider */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ YM3526(config, "ymsnd", AUDIOCPU_CLOCK/2).add_route(ALL_OUTPUTS, "mono", 1.0); /* unknown divider */
DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.5); // 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
+}
diff --git a/src/mame/drivers/copsnrob.cpp b/src/mame/drivers/copsnrob.cpp
index cff3ebf65f7..061158521e4 100644
--- a/src/mame/drivers/copsnrob.cpp
+++ b/src/mame/drivers/copsnrob.cpp
@@ -248,11 +248,11 @@ void copsnrob_state::machine_reset()
}
-MACHINE_CONFIG_START(copsnrob_state::copsnrob)
-
+void copsnrob_state::copsnrob(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502,14318180/16) /* 894886.25 kHz */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M6502(config, m_maincpu, 14318180/16); /* 894886.25 kHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &copsnrob_state::main_map);
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
@@ -267,7 +267,7 @@ MACHINE_CONFIG_START(copsnrob_state::copsnrob)
PALETTE(config, m_palette, palette_device::MONOCHROME);
copsnrob_audio(config);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/corona.cpp b/src/mame/drivers/corona.cpp
index 83e220434c4..21453d8c290 100644
--- a/src/mame/drivers/corona.cpp
+++ b/src/mame/drivers/corona.cpp
@@ -1385,28 +1385,29 @@ INPUT_PORTS_END
* Machine Drivers *
*******************************************/
-MACHINE_CONFIG_START(corona_state::winner81)
+void corona_state::winner81(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, WC81_MAIN_XTAL/8) /* measured */
- MCFG_DEVICE_PROGRAM_MAP(winner81_map)
- MCFG_DEVICE_IO_MAP(winner81_cpu_io_map)
+ Z80(config, m_maincpu, WC81_MAIN_XTAL/8); /* measured */
+ m_maincpu->set_addrmap(AS_PROGRAM, &corona_state::winner81_map);
+ m_maincpu->set_addrmap(AS_IO, &corona_state::winner81_cpu_io_map);
- MCFG_DEVICE_ADD("soundcpu", Z80, WC81_MAIN_XTAL/10) /* measured */
- MCFG_DEVICE_PROGRAM_MAP(winner81_sound_map)
- MCFG_DEVICE_IO_MAP(winner81_sound_cpu_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(corona_state, nmi_line_pulse, 244) /* 244 Hz (1MHz/16/16/16) */
+ Z80(config, m_soundcpu, WC81_MAIN_XTAL/10); /* measured */
+ m_soundcpu->set_addrmap(AS_PROGRAM, &corona_state::winner81_sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &corona_state::winner81_sound_cpu_io_map);
+ m_soundcpu->set_periodic_int(FUNC(corona_state::nmi_line_pulse), attotime::from_hz(244)); /* 244 Hz (1MHz/16/16/16) */
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(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(corona_state, screen_update_winner)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
+ 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(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ m_screen->set_screen_update(FUNC(corona_state::screen_update_winner));
+ m_screen->set_palette("palette");
+ m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
PALETTE(config, "palette", FUNC(corona_state::corona_palette), 0x100);
@@ -1415,30 +1416,31 @@ MACHINE_CONFIG_START(corona_state::winner81)
GENERIC_LATCH_8(config, m_soundlatch);
AY8912(config, "aysnd", AY_CLK1).add_route(ALL_OUTPUTS, "mono", 1.0); /* measured */
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(corona_state::winner82)
+void corona_state::winner82(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, WC82_MAIN_XTAL/8) /* measured */
- MCFG_DEVICE_PROGRAM_MAP(winner82_map)
- MCFG_DEVICE_IO_MAP(winner82_cpu_io_map)
+ Z80(config, m_maincpu, WC82_MAIN_XTAL/8); /* measured */
+ m_maincpu->set_addrmap(AS_PROGRAM, &corona_state::winner82_map);
+ m_maincpu->set_addrmap(AS_IO, &corona_state::winner82_cpu_io_map);
- MCFG_DEVICE_ADD("soundcpu", Z80, WC82_MAIN_XTAL/8) /* measured */
- MCFG_DEVICE_PROGRAM_MAP(winner82_sound_map) /* IM1 instead of NMI */
- MCFG_DEVICE_IO_MAP(winner82_sound_cpu_io_map)
+ Z80(config, m_soundcpu, WC82_MAIN_XTAL/8); /* measured */
+ m_soundcpu->set_addrmap(AS_PROGRAM, &corona_state::winner82_sound_map); /* IM1 instead of NMI */
+ m_soundcpu->set_addrmap(AS_IO, &corona_state::winner82_sound_cpu_io_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(2500)) //not accurate
- 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(corona_state, screen_update_winner)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
+ 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(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ m_screen->set_screen_update(FUNC(corona_state::screen_update_winner));
+ m_screen->set_palette("palette");
+ m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
PALETTE(config, "palette", FUNC(corona_state::corona_palette), 0x100);
@@ -1447,31 +1449,32 @@ MACHINE_CONFIG_START(corona_state::winner82)
GENERIC_LATCH_8(config, m_soundlatch);
AY8910(config, "aysnd", AY_CLK2).add_route(ALL_OUTPUTS, "mono", 1.0); /* measured */
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(corona_state::re800)
+void corona_state::re800(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */
- MCFG_DEVICE_PROGRAM_MAP(re800_map)
- MCFG_DEVICE_IO_MAP(re800_cpu_io_map)
+ Z80(config, m_maincpu, RE_MAIN_XTAL/8); /* measured 2MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &corona_state::re800_map);
+ m_maincpu->set_addrmap(AS_IO, &corona_state::re800_cpu_io_map);
- MCFG_DEVICE_ADD("soundcpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */
- MCFG_DEVICE_PROGRAM_MAP(re800_sound_map)
- MCFG_DEVICE_IO_MAP(re800_sound_cpu_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(corona_state, nmi_line_pulse, 244) /* 244 Hz (1MHz/16/16/16) */
+ Z80(config, m_soundcpu, RE_MAIN_XTAL/8); /* measured 2MHz */
+ m_soundcpu->set_addrmap(AS_PROGRAM, &corona_state::re800_sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &corona_state::re800_sound_cpu_io_map);
+ m_soundcpu->set_periodic_int(FUNC(corona_state::nmi_line_pulse), attotime::from_hz(244)); /* 244 Hz (1MHz/16/16/16) */
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(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(corona_state, screen_update_winner)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
+ 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(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 1*8, 32*8-1);
+ m_screen->set_screen_update(FUNC(corona_state::screen_update_winner));
+ m_screen->set_palette("palette");
+ m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
PALETTE(config, "palette", FUNC(corona_state::corona_palette), 0x100);
@@ -1480,30 +1483,31 @@ MACHINE_CONFIG_START(corona_state::re800)
GENERIC_LATCH_8(config, m_soundlatch);
AY8912(config, "aysnd", AY_CLK2).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(corona_state::rcirulet)
+void corona_state::rcirulet(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */
- MCFG_DEVICE_PROGRAM_MAP(re800_map)
- MCFG_DEVICE_IO_MAP(re800_cpu_io_map)
+ Z80(config, m_maincpu, RE_MAIN_XTAL/8); /* measured 2MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &corona_state::re800_map);
+ m_maincpu->set_addrmap(AS_IO, &corona_state::re800_cpu_io_map);
- MCFG_DEVICE_ADD("soundcpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */
- MCFG_DEVICE_PROGRAM_MAP(winner82_sound_map) /* IM1 instead of NMI */
- MCFG_DEVICE_IO_MAP(winner82_sound_cpu_io_map)
+ Z80(config, m_soundcpu, RE_MAIN_XTAL/8); /* measured 2MHz */
+ m_soundcpu->set_addrmap(AS_PROGRAM, &corona_state::winner82_sound_map); /* IM1 instead of NMI */
+ m_soundcpu->set_addrmap(AS_IO, &corona_state::winner82_sound_cpu_io_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(2500)) //not accurate
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(corona_state, screen_update_winner)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
+ 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(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 1*8, 32*8-1);
+ m_screen->set_screen_update(FUNC(corona_state::screen_update_winner));
+ m_screen->set_palette("palette");
+ m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
PALETTE(config, "palette", FUNC(corona_state::corona_palette), 0x100);
@@ -1512,31 +1516,32 @@ MACHINE_CONFIG_START(corona_state::rcirulet)
GENERIC_LATCH_8(config, m_soundlatch);
AY8912(config, "aysnd", AY_CLK2).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(corona_state::luckyrlt)
+void corona_state::luckyrlt(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */
- MCFG_DEVICE_PROGRAM_MAP(luckyrlt_map)
- MCFG_DEVICE_IO_MAP(luckyrlt_cpu_io_map)
+ Z80(config, m_maincpu, RE_MAIN_XTAL/8); /* measured 2MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &corona_state::luckyrlt_map);
+ m_maincpu->set_addrmap(AS_IO, &corona_state::luckyrlt_cpu_io_map);
- MCFG_DEVICE_ADD("soundcpu", Z80, RE_MAIN_XTAL/8) /* measured 2MHz */
- MCFG_DEVICE_PROGRAM_MAP(luckyrlt_sound_map)
- MCFG_DEVICE_IO_MAP(luckyrlt_sound_cpu_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(corona_state, nmi_line_pulse, 244) /* 244 Hz (1MHz/16/16/16) */
+ Z80(config, m_soundcpu, RE_MAIN_XTAL/8); /* measured 2MHz */
+ m_soundcpu->set_addrmap(AS_PROGRAM, &corona_state::luckyrlt_sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &corona_state::luckyrlt_sound_cpu_io_map);
+ m_soundcpu->set_periodic_int(FUNC(corona_state::nmi_line_pulse), attotime::from_hz(244)); /* 244 Hz (1MHz/16/16/16) */
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(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(corona_state, screen_update_luckyrlt)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
+ 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(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 1*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(corona_state::screen_update_luckyrlt));
+ m_screen->set_palette("palette");
+ m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
PALETTE(config, "palette", FUNC(corona_state::corona_palette), 0x100);
@@ -1545,7 +1550,7 @@ MACHINE_CONFIG_START(corona_state::luckyrlt)
GENERIC_LATCH_8(config, m_soundlatch);
AY8912(config, "aysnd", AY_CLK1).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
/**************** Corona Co,LTD. Hardware ****************
diff --git a/src/mame/drivers/cosmicos.cpp b/src/mame/drivers/cosmicos.cpp
index bca91f96fc8..628e0446309 100644
--- a/src/mame/drivers/cosmicos.cpp
+++ b/src/mame/drivers/cosmicos.cpp
@@ -533,8 +533,7 @@ MACHINE_CONFIG_START(cosmicos_state::cosmicos)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
CDP1864(config, m_cti, 1.75_MHz_XTAL).set_screen(SCREEN_TAG);
m_cti->inlace_cb().set_constant(0);
diff --git a/src/mame/drivers/cps2.cpp b/src/mame/drivers/cps2.cpp
index 0dc9143e303..40abe058624 100644
--- a/src/mame/drivers/cps2.cpp
+++ b/src/mame/drivers/cps2.cpp
@@ -1295,61 +1295,62 @@ MACHINE_START_MEMBER(cps2_state,cps2)
}
-MACHINE_CONFIG_START(cps2_state::cps2)
-
+void cps2_state::cps2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000))
- MCFG_DEVICE_PROGRAM_MAP(cps2_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ M68000(config, m_maincpu, XTAL(16'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &cps2_state::cps2_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &cps2_state::decrypted_opcodes_map);
TIMER(config, "scantimer").configure_scanline(FUNC(cps2_state::cps2_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(8'000'000))
- MCFG_DEVICE_PROGRAM_MAP(qsound_sub_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(cps2_state, irq0_line_hold, 250) // measured
+ Z80(config, m_audiocpu, XTAL(8'000'000));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cps2_state::qsound_sub_map);
+ m_audiocpu->set_periodic_int(FUNC(cps2_state::irq0_line_hold), attotime::from_hz(250)); // measured
MCFG_MACHINE_START_OVERRIDE(cps2_state, cps2)
EEPROM_93C46_16BIT(config, "eeprom");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_RAW_PARAMS(CPS_PIXEL_CLOCK, CPS_HTOTAL, CPS_HBEND, CPS_HBSTART, CPS_VTOTAL, CPS_VBEND, CPS_VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(cps2_state, screen_update_cps2)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cps2_state, screen_vblank_cps1))
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ m_screen->set_raw(CPS_PIXEL_CLOCK, CPS_HTOTAL, CPS_HBEND, CPS_HBSTART, CPS_VTOTAL, CPS_VBEND, CPS_VBSTART);
+ m_screen->set_screen_update(FUNC(cps2_state::screen_update_cps2));
+ m_screen->screen_vblank().set(FUNC(cps2_state::screen_vblank_cps1));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
- MCFG_PALETTE_ADD("palette", 0xc00)
+ PALETTE(config, m_palette).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("qsound", QSOUND)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ QSOUND(config, m_qsound);
+ m_qsound->add_route(0, "lspeaker", 1.0);
+ m_qsound->add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(cps2_state::dead_cps2)
+void cps2_state::dead_cps2(machine_config &config)
+{
cps2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(dead_cps2_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &cps2_state::dead_cps2_map);
+}
-MACHINE_CONFIG_START(cps2_state::gigaman2)
+void cps2_state::gigaman2(machine_config &config)
+{
cps2(config);
config.device_remove("audiocpu");
// gigaman2 has an AT89C4051 (8051) MCU as an audio cpu, no qsound.
config.device_remove("qsound");
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(32'000'000)/32, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.47)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.47)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, XTAL(32'000'000)/32, okim6295_device::PIN7_HIGH); // clock frequency & pin 7 not verified
+ m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.47);
+ m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.47);
+}
/*************************************
*
diff --git a/src/mame/drivers/crbaloon.cpp b/src/mame/drivers/crbaloon.cpp
index 4d24798c54b..ff32e1de93e 100644
--- a/src/mame/drivers/crbaloon.cpp
+++ b/src/mame/drivers/crbaloon.cpp
@@ -361,31 +361,30 @@ INTERRUPT_GEN_MEMBER(crbaloon_state::vblank_irq)
}
-MACHINE_CONFIG_START(crbaloon_state::crbaloon)
-
+void crbaloon_state::crbaloon(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, CRBALOON_MASTER_XTAL / 3)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", crbaloon_state, vblank_irq)
+ Z80(config, m_maincpu, CRBALOON_MASTER_XTAL / 3);
+ m_maincpu->set_addrmap(AS_PROGRAM, &crbaloon_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &crbaloon_state::main_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(crbaloon_state::vblank_irq));
/* video hardware */
GFXDECODE(config, m_gfxdecode, "palette", gfx_crbaloon);
PALETTE(config, "palette", FUNC(crbaloon_state::crbaloon_palette), 32);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
- 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, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(crbaloon_state, screen_update_crbaloon)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_ALWAYS_UPDATE);
+ 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, 28*8-1);
+ screen.set_screen_update(FUNC(crbaloon_state::screen_update_crbaloon));
+ screen.set_palette("palette");
/* audio hardware */
crbaloon_audio(config);
-
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/crvision.cpp b/src/mame/drivers/crvision.cpp
index 642e80b867f..081d886b9fb 100644
--- a/src/mame/drivers/crvision.cpp
+++ b/src/mame/drivers/crvision.cpp
@@ -780,7 +780,7 @@ void crvision_state::creativision(machine_config &config)
}
/*-------------------------------------------------
- MACHINE_CONFIG_START( ntsc )
+ machine_config( ntsc )
-------------------------------------------------*/
void crvision_state::ntsc(machine_config &config)
@@ -795,7 +795,7 @@ void crvision_state::ntsc(machine_config &config)
}
/*-------------------------------------------------
- MACHINE_CONFIG_START( pal )
+ machine_config( pal )
-------------------------------------------------*/
void crvision_pal_state::pal(machine_config &config)
@@ -810,7 +810,7 @@ void crvision_pal_state::pal(machine_config &config)
}
/*-------------------------------------------------
- MACHINE_CONFIG_START( lasr2001 )
+ machine_config( lasr2001 )
-------------------------------------------------*/
void laser2001_state::lasr2001(machine_config &config)
diff --git a/src/mame/drivers/cswat.cpp b/src/mame/drivers/cswat.cpp
index 2a9918b6ada..7052a3b98d3 100644
--- a/src/mame/drivers/cswat.cpp
+++ b/src/mame/drivers/cswat.cpp
@@ -257,30 +257,29 @@ void cswat_state::machine_start()
save_item(NAME(m_nmi_enabled));
}
-MACHINE_CONFIG_START(cswat_state::cswat)
-
+void cswat_state::cswat(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, XTAL(18'432'000)/3/4) // HD68A09EP, 1.5MHz?
- MCFG_DEVICE_PROGRAM_MAP(cswat_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cswat_state, irq0_line_assert)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(cswat_state, nmi_handler, 300) // ?
+ MC6809E(config, m_maincpu, XTAL(18'432'000)/3/4); // HD68A09EP, 1.5MHz?
+ m_maincpu->set_addrmap(AS_PROGRAM, &cswat_state::cswat_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cswat_state::irq0_line_assert));
+ m_maincpu->set_periodic_int(FUNC(cswat_state::nmi_handler), attotime::from_hz(300)); // ?
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(36*8, 28*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_SCREEN_UPDATE_DRIVER(cswat_state, screen_update_cswat)
+ 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(36*8, 28*8);
+ screen.set_visarea_full();
+ screen.set_palette("palette");
+ screen.set_screen_update(FUNC(cswat_state::screen_update_cswat));
GFXDECODE(config, "gfxdecode", "palette", gfx_cswat);
- MCFG_PALETTE_ADD("palette", 4*256)
+ PALETTE(config, "palette").set_entries(4*256);
/* sound hardware */
// TODO
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/ct486.cpp b/src/mame/drivers/ct486.cpp
index c9ed963917e..0cd1035ad38 100644
--- a/src/mame/drivers/ct486.cpp
+++ b/src/mame/drivers/ct486.cpp
@@ -110,11 +110,12 @@ void ct486_state::ct486_io(address_map &map)
// MACHINE DRIVERS
//**************************************************************************
-MACHINE_CONFIG_START(ct486_state::ct486)
- MCFG_DEVICE_ADD("maincpu", I486, XTAL(25'000'000))
- MCFG_DEVICE_PROGRAM_MAP(ct486_map)
- MCFG_DEVICE_IO_MAP(ct486_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("cs4031", cs4031_device, int_ack_r)
+void ct486_state::ct486(machine_config &config)
+{
+ I486(config, m_maincpu, XTAL(25'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &ct486_state::ct486_map);
+ m_maincpu->set_addrmap(AS_IO, &ct486_state::ct486_io);
+ m_maincpu->set_irq_acknowledge_callback("cs4031", FUNC(cs4031_device::int_ack_r));
CS4031(config, m_cs4031, XTAL(25'000'000), "maincpu", "isa", "bios", "keybc");
// cpu connections
@@ -166,29 +167,28 @@ MACHINE_CONFIG_START(ct486_state::ct486)
m_isabus->drq5_callback().set(m_cs4031, FUNC(cs4031_device::dreq5_w));
m_isabus->drq6_callback().set(m_cs4031, FUNC(cs4031_device::dreq6_w));
m_isabus->drq7_callback().set(m_cs4031, FUNC(cs4031_device::dreq7_w));
- MCFG_DEVICE_ADD("board1", ISA16_SLOT, 0, "isabus", pc_isa16_cards, "fdcsmc", true)
- MCFG_DEVICE_ADD("board2", ISA16_SLOT, 0, "isabus", pc_isa16_cards, "comat", true)
- MCFG_DEVICE_ADD("board3", ISA16_SLOT, 0, "isabus", pc_isa16_cards, "ide", true)
- MCFG_DEVICE_ADD("board4", ISA16_SLOT, 0, "isabus", pc_isa16_cards, "lpt", true)
- MCFG_DEVICE_ADD("isa1", ISA16_SLOT, 0, "isabus", pc_isa16_cards, "svga_et4k", false)
- MCFG_DEVICE_ADD("isa2", ISA16_SLOT, 0, "isabus", pc_isa16_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa3", ISA16_SLOT, 0, "isabus", pc_isa16_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa4", ISA16_SLOT, 0, "isabus", pc_isa16_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa5", ISA16_SLOT, 0, "isabus", pc_isa16_cards, nullptr, false)
+ ISA16_SLOT(config, "board1", 0, "isabus", pc_isa16_cards, "fdcsmc", true);
+ ISA16_SLOT(config, "board2", 0, "isabus", pc_isa16_cards, "comat", true);
+ ISA16_SLOT(config, "board3", 0, "isabus", pc_isa16_cards, "ide", true);
+ ISA16_SLOT(config, "board4", 0, "isabus", pc_isa16_cards, "lpt", true);
+ ISA16_SLOT(config, "isa1", 0, "isabus", pc_isa16_cards, "svga_et4k", false);
+ ISA16_SLOT(config, "isa2", 0, "isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa3", 0, "isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa4", 0, "isabus", pc_isa16_cards, nullptr, false);
+ ISA16_SLOT(config, "isa5", 0, "isabus", pc_isa16_cards, nullptr, false);
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
// video hardware
- MCFG_PALETTE_ADD("palette", 256) // todo: really needed?
+ PALETTE(config, "palette").set_entries(256); // todo: really needed?
/* software lists */
SOFTWARE_LIST(config, "pc_disk_list").set_original("ibm5150");
SOFTWARE_LIST(config, "at_disk_list").set_original("ibm5170");
SOFTWARE_LIST(config, "at_cdrom_list").set_original("ibm5170_cdrom");
-MACHINE_CONFIG_END
+}
//**************************************************************************
diff --git a/src/mame/drivers/cubo.cpp b/src/mame/drivers/cubo.cpp
index 64a9790afe3..4d2df329d95 100644
--- a/src/mame/drivers/cubo.cpp
+++ b/src/mame/drivers/cubo.cpp
@@ -1030,11 +1030,11 @@ static INPUT_PORTS_START( mgprem11 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(cubo_state::cubo)
-
+void cubo_state::cubo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68EC020, amiga_state::CLK_28M_PAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(cubo_mem)
+ M68EC020(config, m_maincpu, amiga_state::CLK_28M_PAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cubo_state::cubo_mem);
ADDRESS_MAP_BANK(config, "overlay").set_map(&amiga_state::overlay_2mb_map32).set_options(ENDIANNESS_BIG, 32, 22, 0x200000);
@@ -1050,9 +1050,8 @@ MACHINE_CONFIG_START(cubo_state::cubo)
// video hardware
pal_video(config);
- MCFG_DEVICE_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(amiga_state, screen_update_amiga_aga)
- MCFG_SCREEN_NO_PALETTE
+ m_screen->set_screen_update(FUNC(amiga_state::screen_update_amiga_aga));
+ m_screen->set_palette(finder_base::DUMMY_TAG);
MCFG_VIDEO_START_OVERRIDE(amiga_state, amiga_aga)
@@ -1068,9 +1067,9 @@ MACHINE_CONFIG_START(cubo_state::cubo)
paula.mem_read_cb().set(FUNC(amiga_state::chip_ram_r));
paula.int_cb().set(FUNC(amiga_state::paula_int_w));
- MCFG_DEVICE_ADD("cdda", CDDA)
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
+ CDDA(config, m_cdda);
+ m_cdda->add_route(0, "lspeaker", 0.50);
+ m_cdda->add_route(1, "rspeaker", 0.50);
/* cia */
// these are setup differently on other amiga drivers (needed for floppy to work) which is correct / why?
@@ -1093,7 +1092,7 @@ MACHINE_CONFIG_START(cubo_state::cubo)
m_fdc->write_dma_callback().set(FUNC(amiga_state::chip_ram_w));
m_fdc->dskblk_callback().set(FUNC(amiga_state::fdc_dskblk_w));
m_fdc->dsksyn_callback().set(FUNC(amiga_state::fdc_dsksyn_w));
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/cultures.cpp b/src/mame/drivers/cultures.cpp
index 1d9f7de846b..51acf0d401b 100644
--- a/src/mame/drivers/cultures.cpp
+++ b/src/mame/drivers/cultures.cpp
@@ -405,23 +405,22 @@ void cultures_state::machine_reset()
MACHINE_CONFIG_START(cultures_state::cultures)
-
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MCLK/2) /* 8.000 MHz */
- MCFG_DEVICE_PROGRAM_MAP(cultures_map)
- MCFG_DEVICE_IO_MAP(cultures_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cultures_state, cultures_interrupt)
+ Z80(config, m_maincpu, MCLK/2); /* 8.000 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &cultures_state::cultures_map);
+ m_maincpu->set_addrmap(AS_IO, &cultures_state::cultures_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cultures_state::cultures_interrupt));
ADDRESS_MAP_BANK(config, "vrambank").set_map(&cultures_state::vrambank_map).set_options(ENDIANNESS_LITTLE, 8, 15, 0x4000);
/* 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, 48*8-1, 0*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cultures_state, screen_update_cultures)
- 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(0*8, 48*8-1, 0*8, 30*8-1);
+ screen.set_screen_update(FUNC(cultures_state::screen_update_cultures));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_cultures);
MCFG_PALETTE_ADD("palette", 0x3000/2)
@@ -430,10 +429,9 @@ MACHINE_CONFIG_START(cultures_state::cultures)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, MCLK/8, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
- MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
-
+ okim6295_device &oki(OKIM6295(config, "oki", MCLK/8, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified
+ oki.add_route(ALL_OUTPUTS, "mono", 0.30);
+ oki.set_addrmap(0, &cultures_state::oki_map);
MACHINE_CONFIG_END
/*
diff --git a/src/mame/drivers/cupidon.cpp b/src/mame/drivers/cupidon.cpp
index 96cdaf46259..d6c776f615b 100644
--- a/src/mame/drivers/cupidon.cpp
+++ b/src/mame/drivers/cupidon.cpp
@@ -103,24 +103,25 @@ static INPUT_PORTS_START( cupidon )
INPUT_PORTS_END
-MACHINE_CONFIG_START(cupidon_state::cupidon)
+void cupidon_state::cupidon(machine_config &config)
+{
M68340(config, m_maincpu, 16000000); // The access to 3FF00 at the start would suggest this is a 68340 so probably 16 or 25 mhz?
m_maincpu->set_addrmap(AS_PROGRAM, &cupidon_state::cupidon_map);
- 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, 64*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cupidon_state, screen_update_cupidon)
- 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(0*8, 64*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(cupidon_state::screen_update_cupidon));
+ screen.set_palette("palette");
- MCFG_PALETTE_ADD("palette", 0x10000)
+ PALETTE(config, "palette").set_entries(0x10000);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
/* unknown sound, probably DAC driven using 68340 DMA */
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/cvicny.cpp b/src/mame/drivers/cvicny.cpp
index 12a03f7ee71..7d5dca51587 100644
--- a/src/mame/drivers/cvicny.cpp
+++ b/src/mame/drivers/cvicny.cpp
@@ -135,14 +135,15 @@ static INPUT_PORTS_START( cvicny )
INPUT_PORTS_END
-MACHINE_CONFIG_START(cvicny_state::cvicny)
+void cvicny_state::cvicny(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, XTAL(2'000'000))
- MCFG_DEVICE_PROGRAM_MAP(cvicny_mem)
+ Z80(config, m_maincpu, XTAL(2'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &cvicny_state::cvicny_mem);
/* video hardware */
config.set_default_layout(layout_cvicny);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( cvicny )
diff --git a/src/mame/drivers/cxhumax.cpp b/src/mame/drivers/cxhumax.cpp
index c256cc23952..3f990dd8a32 100644
--- a/src/mame/drivers/cxhumax.cpp
+++ b/src/mame/drivers/cxhumax.cpp
@@ -1055,26 +1055,27 @@ void cxhumax_state::machine_reset()
memset(m_gxa_cmd_regs,0,sizeof(m_gxa_cmd_regs));
}
-MACHINE_CONFIG_START(cxhumax_state::cxhumax)
- MCFG_DEVICE_ADD("maincpu", ARM920T, 180000000) // CX24175 (RevC up?)
- MCFG_DEVICE_PROGRAM_MAP(cxhumax_map)
+void cxhumax_state::cxhumax(machine_config &config)
+{
+ ARM920T(config, m_maincpu, 180000000); // CX24175 (RevC up?)
+ m_maincpu->set_addrmap(AS_PROGRAM, &cxhumax_state::cxhumax_map);
INTEL_28F320J3D(config, "flash");
I2CMEM(config, "eeprom", 0).set_data_size(0x2000);
/* 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(1920, 1080)
- MCFG_SCREEN_VISIBLE_AREA(0, 1920-1, 0, 1080-1)
- MCFG_SCREEN_UPDATE_DRIVER(cxhumax_state, screen_update_cxhumax)
+ 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(1920, 1080);
+ screen.set_visarea_full();
+ screen.set_screen_update(FUNC(cxhumax_state::screen_update_cxhumax));
PALETTE(config, "palette", palette_device::MONOCHROME);
GENERIC_TERMINAL(config, m_terminal, 0);
-MACHINE_CONFIG_END
+}
ROM_START( hxhdci2k )
ROM_REGION( 0x400000, "flash", 0 )
diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp
index 120ab37491d..dc1bb096aa3 100644
--- a/src/mame/drivers/cyberbal.cpp
+++ b/src/mame/drivers/cyberbal.cpp
@@ -487,11 +487,11 @@ void cyberbal_state::cyberbalt(machine_config &config)
SLAPSTIC(config, "slapstic", 116, true);
}
-MACHINE_CONFIG_START(cyberbal2p_state::cyberbal2p)
-
+void cyberbal2p_state::cyberbal2p(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(cyberbal2p_map)
+ M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cyberbal2p_state::cyberbal2p_map);
EEPROM_2816(config, "eeprom").lock_after_write(true);
@@ -509,14 +509,14 @@ MACHINE_CONFIG_START(cyberbal2p_state::cyberbal2p)
m_mob->set_config(cyberbal2p_state::s_mob_config);
m_mob->set_gfxdecode("gfxdecode");
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
/* note: these parameters are from published specs, not derived */
/* the board uses an SOS-2 chip to generate video signals */
- MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240)
- MCFG_SCREEN_UPDATE_DRIVER(cyberbal2p_state, screen_update_cyberbal2p)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, cyberbal2p_state, video_int_write_line))
+ m_screen->set_raw(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240);
+ m_screen->set_screen_update(FUNC(cyberbal2p_state::screen_update_cyberbal2p));
+ m_screen->set_palette("palette");
+ m_screen->screen_vblank().set(FUNC(cyberbal2p_state::video_int_write_line));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -525,7 +525,7 @@ MACHINE_CONFIG_START(cyberbal2p_state::cyberbal2p)
m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_3);
m_jsa->test_read_cb().set_ioport("IN2").bit(15);
m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/cybertnk.cpp b/src/mame/drivers/cybertnk.cpp
index bbdc9169587..c44fa12bf29 100644
--- a/src/mame/drivers/cybertnk.cpp
+++ b/src/mame/drivers/cybertnk.cpp
@@ -819,38 +819,39 @@ GFXDECODE_END
*/
-MACHINE_CONFIG_START(cybertnk_state::cybertnk)
- MCFG_DEVICE_ADD("maincpu", M68000,XTAL(20'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(master_mem)
- MCFG_DEVICE_VBLANK_INT_DRIVER("lscreen", cybertnk_state, irq1_line_assert)
+void cybertnk_state::cybertnk(machine_config &config)
+{
+ M68000(config, m_maincpu, XTAL(20'000'000)/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cybertnk_state::master_mem);
+ m_maincpu->set_vblank_int("lscreen", FUNC(cybertnk_state::irq1_line_assert));
- MCFG_DEVICE_ADD("slave", M68000,XTAL(20'000'000)/2)
- MCFG_DEVICE_PROGRAM_MAP(slave_mem)
- MCFG_DEVICE_VBLANK_INT_DRIVER("lscreen", cybertnk_state, irq3_line_hold)
+ m68000_device &slave(M68000(config, "slave", XTAL(20'000'000)/2));
+ slave.set_addrmap(AS_PROGRAM, &cybertnk_state::slave_mem);
+ slave.set_vblank_int("lscreen", FUNC(cybertnk_state::irq3_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80,XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(sound_mem)
+ Z80(config, m_audiocpu, XTAL(3'579'545));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cybertnk_state::sound_mem);
config.m_minimum_quantum = attotime::from_hz(60000); //arbitrary value, needed to get the communication to work
/* video hardware */
config.set_default_layout(layout_dualhsxs);
- MCFG_SCREEN_ADD("lscreen", 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, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cybertnk_state, screen_update_cybertnk_left)
- MCFG_SCREEN_PALETTE(m_palette)
-
- MCFG_SCREEN_ADD("rscreen", 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, 28*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cybertnk_state, screen_update_cybertnk_right)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER));
+ lscreen.set_refresh_hz(60);
+ lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ lscreen.set_size(32*8, 32*8);
+ lscreen.set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
+ lscreen.set_screen_update(FUNC(cybertnk_state::screen_update_cybertnk_left));
+ lscreen.set_palette(m_palette);
+
+ screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER));
+ rscreen.set_refresh_hz(60);
+ rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ rscreen.set_size(32*8, 32*8);
+ rscreen.set_visarea(0*8, 32*8-1, 0*8, 28*8-1);
+ rscreen.set_screen_update(FUNC(cybertnk_state::screen_update_cybertnk_right));
+ rscreen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cybertnk);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x4000);
@@ -862,13 +863,11 @@ MACHINE_CONFIG_START(cybertnk_state::cybertnk)
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0, HOLD_LINE);
- // Splited output per chip
- MCFG_DEVICE_ADD("ym1", Y8950, XTAL(3'579'545))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ // Split output per chip
+ Y8950(config, "ym1", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "lspeaker", 1.0);
- MCFG_DEVICE_ADD("ym2", Y8950, XTAL(3'579'545))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ Y8950(config, "ym2", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+}
/***************************************************************************
diff --git a/src/mame/drivers/cybstorm.cpp b/src/mame/drivers/cybstorm.cpp
index ebf8d211bfc..17ec3230508 100644
--- a/src/mame/drivers/cybstorm.cpp
+++ b/src/mame/drivers/cybstorm.cpp
@@ -222,11 +222,11 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(cybstorm_state::round2)
-
+void cybstorm_state::round2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68EC020, ATARI_CLOCK_14MHz)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M68EC020(config, m_maincpu, ATARI_CLOCK_14MHz);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cybstorm_state::main_map);
EEPROM_2816(config, "eeprom").lock_after_write(true);
@@ -245,15 +245,14 @@ MACHINE_CONFIG_START(cybstorm_state::round2)
GFXDECODE(config, m_gfxdecode, "palette", gfx_cybstorm);
PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 32768);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_palette("palette");
+ m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
/* note: these parameters are from published specs, not derived */
/* the board uses an SOS-2 chip to generate video signals */
- MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
-
- MCFG_SCREEN_UPDATE_DRIVER(cybstorm_state, screen_update_cybstorm)
-MACHINE_CONFIG_END
+ m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240);
+ m_screen->set_screen_update(FUNC(cybstorm_state::screen_update_cybstorm));
+}
void cybstorm_state::cybstorm(machine_config &config)
diff --git a/src/mame/drivers/cyclemb.cpp b/src/mame/drivers/cyclemb.cpp
index a41c93dca08..d60a7f808e8 100644
--- a/src/mame/drivers/cyclemb.cpp
+++ b/src/mame/drivers/cyclemb.cpp
@@ -976,26 +976,27 @@ static GFXDECODE_START( gfx_cyclemb )
GFXDECODE_ENTRY( "sprite_data", 0, spritelayout_32x32, 0x00, 0x40 )
GFXDECODE_END
-MACHINE_CONFIG_START(cyclemb_state::cyclemb)
+void cyclemb_state::cyclemb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'000'000)/3) // Z8400BPS
- MCFG_DEVICE_PROGRAM_MAP(cyclemb_map)
- MCFG_DEVICE_IO_MAP(cyclemb_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cyclemb_state, irq0_line_hold)
+ Z80(config, m_maincpu, XTAL(18'000'000)/3); // Z8400BPS
+ m_maincpu->set_addrmap(AS_PROGRAM, &cyclemb_state::cyclemb_map);
+ m_maincpu->set_addrmap(AS_IO, &cyclemb_state::cyclemb_io);
+ m_maincpu->set_vblank_int("screen", FUNC(cyclemb_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(18'000'000)/6)
- MCFG_DEVICE_PROGRAM_MAP(cyclemb_sound_map)
- MCFG_DEVICE_IO_MAP(cyclemb_sound_io)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(cyclemb_state, irq0_line_hold, 60)
+ Z80(config, m_audiocpu, XTAL(18'000'000)/6);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cyclemb_state::cyclemb_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &cyclemb_state::cyclemb_sound_io);
+ m_audiocpu->set_periodic_int(FUNC(cyclemb_state::irq0_line_hold), attotime::from_hz(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(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cyclemb_state, screen_update_cyclemb)
- 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, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(cyclemb_state::screen_update_cyclemb));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cyclemb);
PALETTE(config, m_palette, FUNC(cyclemb_state::cyclemb_palette), 256);
@@ -1010,20 +1011,20 @@ MACHINE_CONFIG_START(cyclemb_state::cyclemb)
// ymsnd.irq_handler().set(FUNC(cyclemb_state::ym_irq));
// ymsnd.port_b_read_callback().set_ioport("UNK");
ymsnd.add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(cyclemb_state::skydest)
+void cyclemb_state::skydest(machine_config &config)
+{
cyclemb(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(skydest_io)
+ m_maincpu->set_addrmap(AS_IO, &cyclemb_state::skydest_io);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(2*8, 34*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(cyclemb_state, screen_update_skydest)
+ screen_device &screen(*subdevice<screen_device>("screen"));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(2*8, 34*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(cyclemb_state::screen_update_skydest));
-// MCFG_PALETTE_INIT_OWNER(cyclemb_state,skydest)
-MACHINE_CONFIG_END
+// m_palette->set_init(FUNC(cyclemb_state::skydest));
+}
/***************************************************************************
diff --git a/src/mame/drivers/cz101.cpp b/src/mame/drivers/cz101.cpp
index 8c4de1be0fd..3ece028eed4 100644
--- a/src/mame/drivers/cz101.cpp
+++ b/src/mame/drivers/cz101.cpp
@@ -381,7 +381,8 @@ void cz101_state::machine_reset()
// MACHINE DEFINTIONS
//**************************************************************************
-MACHINE_CONFIG_START( cz101_state::cz101 )
+void cz101_state::cz101(machine_config &config)
+{
UPD7810(config, m_maincpu, 10_MHz_XTAL); // actually 7811, but internal ROM disabled
m_maincpu->set_addrmap(AS_PROGRAM, &cz101_state::maincpu_map);
m_maincpu->pa_in_cb().set(FUNC(cz101_state::port_a_r));
@@ -392,13 +393,13 @@ MACHINE_CONFIG_START( cz101_state::cz101 )
CLOCK(config, "midi_clock", 2_MHz_XTAL)/*.signal_handler().set(m_maincpu, FUNC(upd7810_device::sck_w))*/; // not supported yet
// video hardware
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(6*16+1, 19)
- MCFG_SCREEN_VISIBLE_AREA(0, 6*16, 0, 19-1)
- MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
- 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_size(6*16+1, 19);
+ screen.set_visarea_full();
+ screen.set_screen_update("hd44780", FUNC(hd44780_device::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(cz101_state::cz101_palette), 3);
@@ -407,7 +408,7 @@ MACHINE_CONFIG_START( cz101_state::cz101 )
m_hd44780->set_pixel_update_cb(FUNC(cz101_state::lcd_pixel_update), this);
config.set_default_layout(layout_cz101);
-MACHINE_CONFIG_END
+}
//**************************************************************************
diff --git a/src/mame/includes/canyon.h b/src/mame/includes/canyon.h
index 09553046039..8fc9ce9f167 100644
--- a/src/mame/includes/canyon.h
+++ b/src/mame/includes/canyon.h
@@ -63,7 +63,7 @@ private:
required_shared_ptr<uint8_t> m_videoram;
required_device<f9334_device> m_outlatch;
- required_device<discrete_device> m_discrete;
+ required_device<discrete_sound_device> m_discrete;
/* video-related */
tilemap_t *m_bg_tilemap;