summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-19 18:16:28 +0100
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-19 18:16:28 +0100
commit7ebde83736ae780aeb54b8262fedde528aacb529 (patch) (github)
tree69495bc0a86e5aa2d0cd16230947594e89c3193c
parente49c52f54c3dcec1a86d73f7ec7dbc8881d844d2 (diff)
downloadmame-7ebde83736ae780aeb54b8262fedde528aacb529.tar.bz2
mame-7ebde83736ae780aeb54b8262fedde528aacb529.zip
mame\drivers: removed MCFG and MACHINE_CONFIG macros from most drivers starting with t (nw)
-rw-r--r--src/mame/drivers/spec128.cpp23
-rw-r--r--src/mame/drivers/spectrum.cpp6
-rw-r--r--src/mame/drivers/tagteam.cpp32
-rw-r--r--src/mame/drivers/tail2nos.cpp32
-rw-r--r--src/mame/drivers/taito_o.cpp24
-rw-r--r--src/mame/drivers/taitosj.cpp60
-rw-r--r--src/mame/drivers/taitottl.cpp10
-rw-r--r--src/mame/drivers/taitotx.cpp27
-rw-r--r--src/mame/drivers/taitowlf.cpp20
-rw-r--r--src/mame/drivers/tank8.cpp32
-rw-r--r--src/mame/drivers/tankbust.cpp36
-rw-r--r--src/mame/drivers/targeth.cpp36
-rw-r--r--src/mame/drivers/tasman.cpp25
-rw-r--r--src/mame/drivers/tatsumi.cpp117
-rw-r--r--src/mame/drivers/tavernie.cpp34
-rw-r--r--src/mame/drivers/taxidriv.cpp40
-rw-r--r--src/mame/drivers/tdv2324.cpp23
-rw-r--r--src/mame/drivers/tec1.cpp16
-rw-r--r--src/mame/drivers/techno.cpp14
-rw-r--r--src/mame/drivers/tecmo16.cpp49
-rw-r--r--src/mame/drivers/tek410x.cpp23
-rw-r--r--src/mame/drivers/tek440x.cpp33
-rw-r--r--src/mame/drivers/tekxp33x.cpp25
-rw-r--r--src/mame/drivers/terco.cpp15
-rw-r--r--src/mame/drivers/terminal.cpp9
-rw-r--r--src/mame/drivers/terracre.cpp80
-rw-r--r--src/mame/drivers/testpat.cpp10
-rw-r--r--src/mame/drivers/tetrisp2.cpp293
-rw-r--r--src/mame/drivers/tg100.cpp20
-rw-r--r--src/mame/drivers/tgtpanic.cpp26
-rw-r--r--src/mame/drivers/thedealr.cpp19
-rw-r--r--src/mame/drivers/thepit.cpp47
-rw-r--r--src/mame/drivers/thomson.cpp90
-rw-r--r--src/mame/drivers/thoop2.cpp36
-rw-r--r--src/mame/drivers/thunderj.cpp24
-rw-r--r--src/mame/drivers/ti74.cpp30
-rw-r--r--src/mame/drivers/ti85.cpp168
-rw-r--r--src/mame/drivers/ti89.cpp61
-rw-r--r--src/mame/drivers/ti990_4.cpp10
-rw-r--r--src/mame/drivers/tiamc1.cpp35
-rw-r--r--src/mame/drivers/ticalc1x.cpp74
-rw-r--r--src/mame/drivers/tickee.cpp50
-rw-r--r--src/mame/drivers/tim011.cpp29
-rw-r--r--src/mame/drivers/tim100.cpp25
-rw-r--r--src/mame/drivers/timelimt.cpp36
-rw-r--r--src/mame/drivers/timetrv.cpp28
-rw-r--r--src/mame/drivers/timex.cpp48
-rw-r--r--src/mame/drivers/tispellb.cpp9
-rw-r--r--src/mame/drivers/tk2000.cpp27
-rw-r--r--src/mame/drivers/tk80bs.cpp23
-rw-r--r--src/mame/drivers/tm990189.cpp10
-rw-r--r--src/mame/drivers/tmaster.cpp27
-rw-r--r--src/mame/drivers/tmspoker.cpp21
-rw-r--r--src/mame/drivers/toaplan2.cpp149
-rw-r--r--src/mame/drivers/tomcat.cpp47
-rw-r--r--src/mame/drivers/toobin.cpp24
-rw-r--r--src/mame/drivers/tosh1000.cpp26
-rw-r--r--src/mame/drivers/tourvis.cpp14
-rw-r--r--src/mame/drivers/tp84.cpp51
-rw-r--r--src/mame/drivers/travrusa.cpp27
-rw-r--r--src/mame/drivers/triforce.cpp23
-rw-r--r--src/mame/drivers/trkfldch.cpp5
-rw-r--r--src/mame/drivers/trs80.cpp92
-rw-r--r--src/mame/drivers/trs80m2.cpp4
-rw-r--r--src/mame/drivers/trs80m3.cpp44
-rw-r--r--src/mame/drivers/truco.cpp26
-rw-r--r--src/mame/drivers/trucocl.cpp27
-rw-r--r--src/mame/drivers/trvmadns.cpp31
-rw-r--r--src/mame/drivers/tryout.cpp32
-rw-r--r--src/mame/drivers/ts3000.cpp11
-rw-r--r--src/mame/drivers/tsamurai.cpp96
-rw-r--r--src/mame/drivers/ttchamp.cpp34
-rw-r--r--src/mame/drivers/tugboat.cpp23
-rw-r--r--src/mame/drivers/tumbleb.cpp157
-rw-r--r--src/mame/drivers/turbo.cpp84
-rw-r--r--src/mame/drivers/turrett.cpp22
-rw-r--r--src/mame/drivers/tutankhm.cpp24
-rw-r--r--src/mame/drivers/tvcapcom.cpp25
-rw-r--r--src/mame/drivers/tvgame.cpp28
-rw-r--r--src/mame/drivers/tx0.cpp30
-rw-r--r--src/mame/drivers/tx1.cpp125
-rw-r--r--src/mame/includes/taitosj.h2
-rw-r--r--src/mame/includes/terracre.h3
-rw-r--r--src/mame/includes/thomson.h16
-rw-r--r--src/mame/includes/ti85.h10
-rw-r--r--src/mame/machine/ti85.cpp32
86 files changed, 1720 insertions, 1741 deletions
diff --git a/src/mame/drivers/spec128.cpp b/src/mame/drivers/spec128.cpp
index af114340842..8da68cafa73 100644
--- a/src/mame/drivers/spec128.cpp
+++ b/src/mame/drivers/spec128.cpp
@@ -296,22 +296,20 @@ static GFXDECODE_START( spec128 )
GFXDECODE_END
-MACHINE_CONFIG_START(spectrum_state::spectrum_128)
+void spectrum_state::spectrum_128(machine_config &config)
+{
spectrum(config);
- config.device_remove("maincpu");
-
- MCFG_DEVICE_ADD("maincpu", Z80, X1_128_SINCLAIR / 5)
- MCFG_DEVICE_PROGRAM_MAP(spectrum_128_mem)
- MCFG_DEVICE_IO_MAP(spectrum_128_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", spectrum_state, spec_interrupt)
+ Z80(config.replace(), m_maincpu, X1_128_SINCLAIR / 5);
+ m_maincpu->set_addrmap(AS_PROGRAM, &spectrum_state::spectrum_128_mem);
+ m_maincpu->set_addrmap(AS_IO, &spectrum_state::spectrum_128_io);
+ m_maincpu->set_vblank_int("screen", FUNC(spectrum_state::spec_interrupt));
config.m_minimum_quantum = attotime::from_hz(60);
MCFG_MACHINE_RESET_OVERRIDE(spectrum_state, spectrum_128 )
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_RAW_PARAMS(X1_128_SINCLAIR / 2.5f, 456, 0, 352, 311, 0, 296)
+ m_screen->set_raw(X1_128_SINCLAIR / 2.5f, 456, 0, 352, 311, 0, 296);
MCFG_VIDEO_START_OVERRIDE(spectrum_state, spectrum_128 )
subdevice<gfxdecode_device>("gfxdecode")->set_info(spec128);
@@ -320,12 +318,13 @@ MACHINE_CONFIG_START(spectrum_state::spectrum_128)
AY8912(config, "ay8912", X1_128_SINCLAIR / 10).add_route(ALL_OUTPUTS, "mono", 0.25);
/* expansion port */
- MCFG_DEVICE_MODIFY("exp")
- MCFG_DEVICE_SLOT_INTERFACE(spec128_expansion_devices, nullptr, false)
+ SPECTRUM_EXPANSION_SLOT(config.replace(), m_exp, spec128_expansion_devices, nullptr);
+ m_exp->irq_handler().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
+ m_exp->nmi_handler().set_inputline(m_maincpu, INPUT_LINE_NMI);
/* internal ram */
m_ram->set_default_size("128K");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/spectrum.cpp b/src/mame/drivers/spectrum.cpp
index f1add2f80c2..ccd29d7cc45 100644
--- a/src/mame/drivers/spectrum.cpp
+++ b/src/mame/drivers/spectrum.cpp
@@ -668,8 +668,8 @@ INTERRUPT_GEN_MEMBER(spectrum_state::spec_interrupt)
m_irq_off_timer->adjust(m_maincpu->clocks_to_attotime(32));
}
-MACHINE_CONFIG_START(spectrum_state::spectrum_common)
-
+void spectrum_state::spectrum_common(machine_config &config)
+{
/* basic machine hardware */
Z80(config, m_maincpu, X1 / 4); /* This is verified only for the ZX Spectrum. Other clones are reported to have different clocks */
m_maincpu->set_addrmap(AS_PROGRAM, &spectrum_state::spectrum_mem);
@@ -714,7 +714,7 @@ MACHINE_CONFIG_START(spectrum_state::spectrum_common)
m_cassette->set_interface("spectrum_cass");
SOFTWARE_LIST(config, "cass_list").set_original("spectrum_cass");
-MACHINE_CONFIG_END
+}
void spectrum_state::spectrum(machine_config &config)
{
diff --git a/src/mame/drivers/tagteam.cpp b/src/mame/drivers/tagteam.cpp
index 871023dbac8..1046292c820 100644
--- a/src/mame/drivers/tagteam.cpp
+++ b/src/mame/drivers/tagteam.cpp
@@ -209,25 +209,25 @@ INTERRUPT_GEN_MEMBER(tagteam_state::sound_timer_irq)
}
-MACHINE_CONFIG_START(tagteam_state::tagteam)
-
+void tagteam_state::tagteam(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, XTAL(12'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(tagteam_state, irq0_line_assert, 272/16*57) // connected to bit 4 of vcount (basically once every 16 scanlines)
+ M6502(config, m_maincpu, XTAL(12'000'000)/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tagteam_state::main_map);
+ m_maincpu->set_periodic_int(FUNC(tagteam_state::irq0_line_assert), attotime::from_hz(272/16*57)); // connected to bit 4 of vcount (basically once every 16 scanlines)
- MCFG_DEVICE_ADD("audiocpu", M6502, XTAL(12'000'000)/2/6) // daughterboard gets 12mhz/2 from mainboard, but how it's divided further is a guess
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(tagteam_state, sound_timer_irq, 272/16*57) // same source as maincpu irq
+ M6502(config, m_audiocpu, XTAL(12'000'000)/2/6); // daughterboard gets 12mhz/2 from mainboard, but how it's divided further is a guess
+ m_audiocpu->set_addrmap(AS_PROGRAM, &tagteam_state::sound_map);
+ m_audiocpu->set_periodic_int(FUNC(tagteam_state::sound_timer_irq), attotime::from_hz(272/16*57)); // same source as maincpu irq
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57) // measured?
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(3072))
- 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(tagteam_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(57); // measured?
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(3072));
+ 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(tagteam_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tagteam);
PALETTE(config, m_palette, FUNC(tagteam_state::tagteam_palette), 32);
@@ -245,7 +245,7 @@ MACHINE_CONFIG_START(tagteam_state::tagteam)
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/tail2nos.cpp b/src/mame/drivers/tail2nos.cpp
index 8e595e64e54..06c6e75470e 100644
--- a/src/mame/drivers/tail2nos.cpp
+++ b/src/mame/drivers/tail2nos.cpp
@@ -232,16 +232,16 @@ void tail2nos_state::machine_reset()
{
}
-MACHINE_CONFIG_START(tail2nos_state::tail2nos)
-
+void tail2nos_state::tail2nos(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,XTAL(20'000'000)/2) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tail2nos_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(20'000'000)/2); /* verified on pcb */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tail2nos_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tail2nos_state::irq6_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80,XTAL(20'000'000)/4) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_port_map)
+ Z80(config, m_audiocpu, XTAL(20'000'000)/4); /* verified on pcb */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &tail2nos_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &tail2nos_state::sound_port_map);
/* IRQs are triggered by the YM2608 */
ACIA6850(config, m_acia, 0);
@@ -250,13 +250,13 @@ MACHINE_CONFIG_START(tail2nos_state::tail2nos)
//m_acia->rts_handler().set("link", FUNC(rs232_port_device::write_rts));
/* 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, 40*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(tail2nos_state, screen_update_tail2nos)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(tail2nos_state::screen_update_tail2nos));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tail2nos);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 2048);
@@ -285,7 +285,7 @@ MACHINE_CONFIG_START(tail2nos_state::tail2nos)
ymsnd.add_route(0, "rspeaker", 0.25);
ymsnd.add_route(1, "lspeaker", 1.0);
ymsnd.add_route(2, "rspeaker", 1.0);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/taito_o.cpp b/src/mame/drivers/taito_o.cpp
index 637beb44e70..c43880d7313 100644
--- a/src/mame/drivers/taito_o.cpp
+++ b/src/mame/drivers/taito_o.cpp
@@ -233,21 +233,21 @@ void taitoo_state::machine_start()
{
}
-MACHINE_CONFIG_START(taitoo_state::parentj)
-
- MCFG_DEVICE_ADD("maincpu", M68000,12000000 ) /*?? MHz */
- MCFG_DEVICE_PROGRAM_MAP(parentj_map)
+void taitoo_state::parentj(machine_config &config)
+{
+ M68000(config, m_maincpu, 12000000); /*?? MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &taitoo_state::parentj_map);
TIMER(config, "scantimer").configure_scanline(FUNC(taitoo_state::parentj_interrupt), "screen", 0, 1);
WATCHDOG_TIMER(config, m_watchdog);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*16, 64*16)
- MCFG_SCREEN_VISIBLE_AREA(0*16, 32*16-1, 3*16, 31*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(taitoo_state, screen_update_parentj)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*16, 64*16);
+ screen.set_visarea(0*16, 32*16-1, 3*16, 31*16-1);
+ screen.set_screen_update(FUNC(taitoo_state::screen_update_parentj));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_parentj);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 33*16);
@@ -265,7 +265,7 @@ MACHINE_CONFIG_START(taitoo_state::parentj)
ymsnd.port_a_read_callback().set_ioport("DSWA");
ymsnd.port_b_read_callback().set_ioport("DSWB");
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
ROM_START( parentj )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 68000 Code */
diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp
index 29ae9cee71f..e34022abd85 100644
--- a/src/mame/drivers/taitosj.cpp
+++ b/src/mame/drivers/taitosj.cpp
@@ -1770,33 +1770,33 @@ WRITE8_MEMBER(taitosj_state::taitosj_dacvol_w)
m_dacvol->write(NODE_01, data ^ 0xff); // 7416 hex inverter
}
-MACHINE_CONFIG_START(taitosj_state::nomcu)
-
+void taitosj_state::nomcu(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80,XTAL(8'000'000)/2) /* 8 MHz / 2, on CPU board */
- MCFG_DEVICE_PROGRAM_MAP(taitosj_main_nomcu_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", taitosj_state, irq0_line_hold)
+ Z80(config, m_maincpu, XTAL(8'000'000)/2); /* 8 MHz / 2, on CPU board */
+ m_maincpu->set_addrmap(AS_PROGRAM, &taitosj_state::taitosj_main_nomcu_map);
+ m_maincpu->set_vblank_int("screen", FUNC(taitosj_state::irq0_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80,XTAL(6'000'000)/2) /* 6 MHz / 2, on GAME board */
- MCFG_DEVICE_PROGRAM_MAP(taitosj_audio_map)
+ Z80(config, m_audiocpu, XTAL(6'000'000)/2); /* 6 MHz / 2, on GAME board */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &taitosj_state::taitosj_audio_map);
/* interrupts: */
/* - no interrupts synced with vblank */
/* - NMI triggered by the main CPU */
/* - periodic IRQ, with frequency 6000000/(4*16*16*10*16) = 36.621 Hz, */
- MCFG_DEVICE_PERIODIC_INT_DRIVER(taitosj_state, irq0_line_hold, XTAL(6'000'000)/(4*16*16*10*16))
+ m_audiocpu->set_periodic_int(FUNC(taitosj_state::irq0_line_hold), attotime::from_hz(XTAL(6'000'000)/(4*16*16*10*16)));
/* 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(taitosj_state, screen_update_taitosj)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ 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(taitosj_state::screen_update_taitosj));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_taitosj);
- MCFG_PALETTE_ADD("palette", 64)
+ PALETTE(config, m_palette).set_entries(64);
/* sound hardware */
@@ -1835,19 +1835,20 @@ MACHINE_CONFIG_START(taitosj_state::nomcu)
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // 74LS393 on CPU board, counts 128 vblanks before firing watchdog
- DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // 30k r-2r network
- MCFG_DEVICE_ADD("dacvol", DISCRETE, taitosj_dacvol_discrete)
- MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
-MACHINE_CONFIG_END
+ DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // 30k r-2r network
+ DISCRETE(config, m_dacvol, taitosj_dacvol_discrete);
+ m_dacvol->add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
+ m_dacvol->add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
+}
/* same as above, but with additional 68705 MCU */
-MACHINE_CONFIG_START(taitosj_state::mcu)
+void taitosj_state::mcu(machine_config &config)
+{
nomcu(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(taitosj_main_mcu_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &taitosj_state::taitosj_main_mcu_map);
TAITO_SJ_SECURITY_MCU(config, m_mcu, XTAL(3'000'000)); /* xtal is 3MHz, divided by 4 internally */
m_mcu->set_int_mode(taito_sj_security_mcu_device::int_mode::LATCH);
@@ -1857,19 +1858,18 @@ MACHINE_CONFIG_START(taitosj_state::mcu)
m_mcu->busrq_cb().set(FUNC(taitosj_state::mcu_busrq_w));
config.m_minimum_quantum = attotime::from_hz(6000);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(taitosj_state::kikstart)
+void taitosj_state::kikstart(machine_config &config)
+{
mcu(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(kikstart_main_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &taitosj_state::kikstart_main_map);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(taitosj_state, screen_update_kikstart)
-MACHINE_CONFIG_END
+ m_screen->set_screen_update(FUNC(taitosj_state::screen_update_kikstart));
+}
diff --git a/src/mame/drivers/taitottl.cpp b/src/mame/drivers/taitottl.cpp
index 74cdb371bd5..809242a9338 100644
--- a/src/mame/drivers/taitottl.cpp
+++ b/src/mame/drivers/taitottl.cpp
@@ -136,11 +136,11 @@ void taitottl_state::video_start()
{
}
-MACHINE_CONFIG_START(taitottl_state::taitottl)
-
+void taitottl_state::taitottl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK)
- MCFG_NETLIST_SETUP(taitottl)
+ NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK);
+ m_maincpu->set_constructor(netlist_taitottl);
/* video hardware */
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
@@ -150,7 +150,7 @@ MACHINE_CONFIG_START(taitottl_state::taitottl)
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/taitotx.cpp b/src/mame/drivers/taitotx.cpp
index 83e5169e335..f12ad04a2fb 100644
--- a/src/mame/drivers/taitotx.cpp
+++ b/src/mame/drivers/taitotx.cpp
@@ -172,23 +172,22 @@ void taito_type_x_state::machine_reset()
}
// todo: different configs for the different machine types.
-MACHINE_CONFIG_START(taito_type_x_state::taito_type_x)
-
+void taito_type_x_state::taito_type_x(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", PENTIUM3, 733333333) /* Wrong, much newer processors, much faster. */
- MCFG_DEVICE_PROGRAM_MAP(taito_type_x_map)
+ PENTIUM3(config, m_maincpu, 733333333); /* Wrong, much newer processors, much faster. */
+ m_maincpu->set_addrmap(AS_PROGRAM, &taito_type_x_state::taito_type_x_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
- MCFG_SCREEN_UPDATE_DRIVER(taito_type_x_state, screen_update_taito_type_x)
-
- MCFG_PALETTE_ADD("palette", 0x10000)
-
-MACHINE_CONFIG_END
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 640-1, 0, 480-1);
+ screen.set_screen_update(FUNC(taito_type_x_state::screen_update_taito_type_x));
+
+ PALETTE(config, "palette").set_entries(0x10000);
+}
diff --git a/src/mame/drivers/taitowlf.cpp b/src/mame/drivers/taitowlf.cpp
index 0fa7d7b05f7..71ff3629d2e 100644
--- a/src/mame/drivers/taitowlf.cpp
+++ b/src/mame/drivers/taitowlf.cpp
@@ -372,10 +372,10 @@ void taitowlf_state::taitowlf_palette(palette_device &palette) const
MACHINE_CONFIG_START(taitowlf_state::taitowlf)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", PENTIUM, 200000000)
- MCFG_DEVICE_PROGRAM_MAP(taitowlf_map)
- MCFG_DEVICE_IO_MAP(taitowlf_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
+ PENTIUM(config, m_maincpu, 200000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &taitowlf_state::taitowlf_map);
+ m_maincpu->set_addrmap(AS_IO, &taitowlf_state::taitowlf_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb));
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
@@ -389,12 +389,12 @@ MACHINE_CONFIG_START(taitowlf_state::taitowlf)
pcvideo_vga(config);
#else
/* 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(taitowlf_state, screen_update_taitowlf)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 0, 256-1);
+ screen.set_screen_update(FUNC(taitowlf_state::screen_update_taitowlf));
PALETTE(config, m_palette, FUNC(taitowlf_state::taitowlf_palette), 256);
#endif
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/tank8.cpp b/src/mame/drivers/tank8.cpp
index ba993fccfe0..63a6f3da119 100644
--- a/src/mame/drivers/tank8.cpp
+++ b/src/mame/drivers/tank8.cpp
@@ -328,23 +328,22 @@ static GFXDECODE_START( gfx_tank8 )
GFXDECODE_END
-MACHINE_CONFIG_START(tank8_state::tank8)
-
+void tank8_state::tank8(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6800, 11055000 / 10) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(tank8_cpu_map)
-
+ M6800(config, m_maincpu, 11055000 / 10); /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tank8_state::tank8_cpu_map);
/* 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(30 * 1000000 / 15681))
- MCFG_SCREEN_SIZE(512, 524)
- MCFG_SCREEN_VISIBLE_AREA(16, 495, 0, 463)
- MCFG_SCREEN_UPDATE_DRIVER(tank8_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tank8_state, screen_vblank))
- 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(30 * 1000000 / 15681));
+ m_screen->set_size(512, 524);
+ m_screen->set_visarea(16, 495, 0, 463);
+ m_screen->set_screen_update(FUNC(tank8_state::screen_update));
+ m_screen->screen_vblank().set(FUNC(tank8_state::screen_vblank));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tank8);
PALETTE(config, m_palette, FUNC(tank8_state::tank8_palette), 20, 10);
@@ -352,9 +351,8 @@ MACHINE_CONFIG_START(tank8_state::tank8)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("discrete", DISCRETE, tank8_discrete)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
-MACHINE_CONFIG_END
+ DISCRETE(config, m_discrete, tank8_discrete).add_route(ALL_OUTPUTS, "mono", 0.80);
+}
ROM_START( tank8a )
diff --git a/src/mame/drivers/tankbust.cpp b/src/mame/drivers/tankbust.cpp
index 8ba4804074e..bf7cef07fae 100644
--- a/src/mame/drivers/tankbust.cpp
+++ b/src/mame/drivers/tankbust.cpp
@@ -330,30 +330,30 @@ INTERRUPT_GEN_MEMBER(tankbust_state::vblank_irq)
device.execute().set_input_line(0, HOLD_LINE);
}
-MACHINE_CONFIG_START(tankbust_state::tankbust)
-
+void tankbust_state::tankbust(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(14'318'181)/2) /* Verified on PCB */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tankbust_state, vblank_irq)
+ Z80(config, m_maincpu, XTAL(14'318'181)/2); /* Verified on PCB */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tankbust_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tankbust_state::vblank_irq));
- MCFG_DEVICE_ADD("sub", Z80, XTAL(14'318'181)/4) /* Verified on PCB */
-// MCFG_DEVICE_ADD("sub", Z80, XTAL(14'318'181)/3) /* Accurate to audio recording, but apparently incorrect clock */
- MCFG_DEVICE_PROGRAM_MAP(map_cpu2)
- MCFG_DEVICE_IO_MAP(port_map_cpu2)
+ Z80(config, m_subcpu, XTAL(14'318'181)/4); /* Verified on PCB */
+// Z80(config, m_subcpu, XTAL(14'318'181)/3); /* Accurate to audio recording, but apparently incorrect clock */
+ m_subcpu->set_addrmap(AS_PROGRAM, &tankbust_state::map_cpu2);
+ m_subcpu->set_addrmap(AS_IO, &tankbust_state::port_map_cpu2);
config.m_minimum_quantum = attotime::from_hz(6000);
/* 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 ( 64*8, 32*8 )
- MCFG_SCREEN_VISIBLE_AREA ( 16*8, 56*8-1, 1*8, 31*8-1 )
-// MCFG_SCREEN_VISIBLE_AREA ( 0*8, 64*8-1, 1*8, 31*8-1 )
- MCFG_SCREEN_UPDATE_DRIVER(tankbust_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( 64*8, 32*8);
+ screen.set_visarea( 16*8, 56*8-1, 1*8, 31*8-1);
+// screen.set_visarea( 0*8, 64*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(tankbust_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tankbust);
PALETTE(config, m_palette, FUNC(tankbust_state::tankbust_palette), 128);
@@ -367,7 +367,7 @@ MACHINE_CONFIG_START(tankbust_state::tankbust)
ay1.add_route(ALL_OUTPUTS, "mono", 0.10);
AY8910(config, "ay2", XTAL(14'318'181)/16).add_route(ALL_OUTPUTS, "mono", 0.10); /* Verified on PCB */
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/targeth.cpp b/src/mame/drivers/targeth.cpp
index 2460c289cd7..3afa4def461 100644
--- a/src/mame/drivers/targeth.cpp
+++ b/src/mame/drivers/targeth.cpp
@@ -268,28 +268,28 @@ static INPUT_PORTS_START( targeth )
INPUT_PORTS_END
-MACHINE_CONFIG_START(targeth_state::targeth)
-
+void targeth_state::targeth(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000)/2) /* 12 MHz */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", targeth_state, irq2_line_hold)
+ M68000(config, m_maincpu, XTAL(24'000'000)/2); /* 12 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &targeth_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(targeth_state::irq2_line_hold));
- MCFG_DEVICE_ADD("gaelco_ds5002fp", GAELCO_DS5002FP, XTAL(24'000'000) / 2)
- MCFG_DEVICE_ADDRESS_MAP(0, mcu_hostmem_map)
+ gaelco_ds5002fp_device &ds5002fp(GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(24'000'000) / 2));
+ ds5002fp.set_addrmap(0, &targeth_state::mcu_hostmem_map);
LS259(config, m_outlatch);
m_outlatch->q_out_cb<2>().set(FUNC(targeth_state::coin1_counter_w));
m_outlatch->q_out_cb<3>().set(FUNC(targeth_state::coin2_counter_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(64*16, 16*16)
- MCFG_SCREEN_VISIBLE_AREA(3*8, 23*16-8-1, 16, 16*16-8-1)
- MCFG_SCREEN_UPDATE_DRIVER(targeth_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(2500) /* not accurate */);
+ m_screen->set_size(64*16, 16*16);
+ m_screen->set_visarea(3*8, 23*16-8-1, 16, 16*16-8-1);
+ m_screen->set_screen_update(FUNC(targeth_state::screen_update));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_targeth);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024);
@@ -297,10 +297,10 @@ MACHINE_CONFIG_START(targeth_state::targeth)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(1'000'000), okim6295_device::PIN7_HIGH) // 1MHz resonator - pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ okim6295_device &oki(OKIM6295(config, "oki", XTAL(1'000'000), okim6295_device::PIN7_HIGH)); // 1MHz resonator - pin 7 not verified
+ oki.set_addrmap(0, &targeth_state::oki_map);
+ oki.add_route(ALL_OUTPUTS, "mono", 1.0);
+}
ROM_START( targeth )
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */
diff --git a/src/mame/drivers/tasman.cpp b/src/mame/drivers/tasman.cpp
index 53a6beac5b6..3e8efe41fbd 100644
--- a/src/mame/drivers/tasman.cpp
+++ b/src/mame/drivers/tasman.cpp
@@ -645,27 +645,28 @@ TIMER_DEVICE_CALLBACK_MEMBER(kongambl_state::kongambl_vblank)
}
-MACHINE_CONFIG_START(kongambl_state::kongambl)
- MCFG_DEVICE_ADD("maincpu", M68EC020, 25000000)
- MCFG_DEVICE_PROGRAM_MAP(kongambl_map)
+void kongambl_state::kongambl(machine_config &config)
+{
+ M68EC020(config, m_maincpu, 25000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &kongambl_state::kongambl_map);
TIMER(config, "scantimer").configure_scanline(FUNC(kongambl_state::kongambl_vblank), "screen", 0, 1);
- MCFG_DEVICE_ADD("sndcpu", M68000, 16000000)
- MCFG_DEVICE_PROGRAM_MAP(kongamaud_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(kongambl_state, irq2_line_hold, 480)
+ m68000_device &sndcpu(M68000(config, "sndcpu", 16000000));
+ sndcpu.set_addrmap(AS_PROGRAM, &kongambl_state::kongamaud_map);
+ sndcpu.set_periodic_int(FUNC(kongambl_state::irq2_line_hold), attotime::from_hz(480));
K053252(config, m_k053252, 25000000);
m_k053252->set_offsets(0, 16); // TBD
m_k053252->int1_ack().set(FUNC(kongambl_state::vblank_irq_ack_w));
m_k053252->int2_ack().set(FUNC(kongambl_state::hblank_irq_ack_w));
- m_k053252->set_screen("screen");
+ m_k053252->set_screen(m_screen);
EEPROM_93C46_16BIT(config, "eeprom");
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(25000000, 288+16+32+48, 0, 287, 224+16+8+16, 0, 223) // fake, they'll be changed by CCU anyway, TBD
- MCFG_SCREEN_UPDATE_DRIVER(kongambl_state, screen_update_kongambl)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(25000000, 288+16+32+48, 0, 287, 224+16+8+16, 0, 223); // fake, they'll be changed by CCU anyway, TBD
+ m_screen->set_screen_update(FUNC(kongambl_state::screen_update_kongambl));
+ m_screen->set_palette(m_palette);
PALETTE(config, m_palette).set_format(palette_device::xRGB_888, 32768);
@@ -689,7 +690,7 @@ MACHINE_CONFIG_START(kongambl_state::kongambl)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
-MACHINE_CONFIG_END
+}
ROM_START( kingtut )
diff --git a/src/mame/drivers/tatsumi.cpp b/src/mame/drivers/tatsumi.cpp
index 540f19f6326..51aa5849fda 100644
--- a/src/mame/drivers/tatsumi.cpp
+++ b/src/mame/drivers/tatsumi.cpp
@@ -864,23 +864,23 @@ MACHINE_RESET_MEMBER(apache3_state,apache3)
}
-MACHINE_CONFIG_START(apache3_state::apache3)
-
+void apache3_state::apache3(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V30, CLOCK_1 / 2)
- MCFG_DEVICE_PROGRAM_MAP(apache3_v30_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tatsumi_state, v30_interrupt)
+ V30(config, m_maincpu, CLOCK_1 / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &apache3_state::apache3_v30_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tatsumi_state::v30_interrupt));
- MCFG_DEVICE_ADD("sub", M68000, CLOCK_2 / 4)
- MCFG_DEVICE_PROGRAM_MAP(apache3_68000_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", apache3_state, irq4_line_hold)
+ M68000(config, m_subcpu, CLOCK_2 / 4);
+ m_subcpu->set_addrmap(AS_PROGRAM, &apache3_state::apache3_68000_map);
+ m_subcpu->set_vblank_int("screen", FUNC(apache3_state::irq4_line_hold));
- MCFG_DEVICE_ADD("audiocpu", V20, CLOCK_1 / 2)
- MCFG_DEVICE_PROGRAM_MAP(apache3_v20_map)
+ V20(config, m_audiocpu, CLOCK_1 / 2);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &apache3_state::apache3_v20_map);
- MCFG_DEVICE_ADD("sub2", Z80, CLOCK_2 / 8)
- MCFG_DEVICE_PROGRAM_MAP(apache3_z80_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", apache3_state, irq0_line_hold)
+ Z80(config, m_subcpu2, CLOCK_2 / 8);
+ m_subcpu2->set_addrmap(AS_PROGRAM, &apache3_state::apache3_z80_map);
+ m_subcpu2->set_vblank_int("screen", FUNC(apache3_state::irq0_line_hold));
config.m_minimum_quantum = attotime::from_hz(6000);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -898,9 +898,9 @@ MACHINE_CONFIG_START(apache3_state::apache3)
I8255(config, "ppi");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240) // TODO: Hook up CRTC
- MCFG_SCREEN_UPDATE_DRIVER(apache3_state, screen_update_apache3)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240); // TODO: Hook up CRTC
+ screen.set_screen_update(FUNC(apache3_state::screen_update_apache3));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_apache3);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024 + 4096); // 1024 real colours, and 4096 arranged as series of CLUTs
@@ -924,23 +924,23 @@ MACHINE_CONFIG_START(apache3_state::apache3)
m_ym2151->add_route(0, "lspeaker", 0.45);
m_ym2151->add_route(1, "rspeaker", 0.45);
- MCFG_DEVICE_ADD("oki", OKIM6295, CLOCK_1 / 4 / 2, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(roundup5_state::roundup5)
+ OKIM6295(config, m_oki, CLOCK_1 / 4 / 2, okim6295_device::PIN7_HIGH);
+ m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.75);
+ m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.75);
+}
+void roundup5_state::roundup5(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V30, CLOCK_1 / 2)
- MCFG_DEVICE_PROGRAM_MAP(roundup5_v30_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tatsumi_state, v30_interrupt)
+ V30(config, m_maincpu, CLOCK_1 / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &roundup5_state::roundup5_v30_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tatsumi_state::v30_interrupt));
- MCFG_DEVICE_ADD("sub", M68000, CLOCK_2 / 4)
- MCFG_DEVICE_PROGRAM_MAP(roundup5_68000_map)
+ M68000(config, m_subcpu, CLOCK_2 / 4);
+ m_subcpu->set_addrmap(AS_PROGRAM, &roundup5_state::roundup5_68000_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, CLOCK_1 / 4)
- MCFG_DEVICE_PROGRAM_MAP(roundup5_z80_map)
+ Z80(config, m_audiocpu, CLOCK_1 / 4);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &roundup5_state::roundup5_z80_map);
config.m_minimum_quantum = attotime::from_hz(6000);
@@ -950,9 +950,9 @@ MACHINE_CONFIG_START(roundup5_state::roundup5)
ppi.out_pc_callback().set(FUNC(roundup5_state::output_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240) // TODO: Hook up CRTC
- MCFG_SCREEN_UPDATE_DRIVER(roundup5_state, screen_update_roundup5)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240); // TODO: Hook up CRTC
+ screen.set_screen_update(FUNC(roundup5_state::screen_update_roundup5));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_roundup5);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024 + 4096); // 1024 real colours, and 4096 arranged as series of CLUTs
@@ -969,10 +969,10 @@ MACHINE_CONFIG_START(roundup5_state::roundup5)
m_ym2151->add_route(0, "lspeaker", 0.45);
m_ym2151->add_route(1, "rspeaker", 0.45);
- MCFG_DEVICE_ADD("oki", OKIM6295, CLOCK_1 / 4 / 2, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, CLOCK_1 / 4 / 2, okim6295_device::PIN7_HIGH);
+ m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.75);
+ m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.75);
+}
void cyclwarr_state::machine_reset()
{
@@ -1000,19 +1000,19 @@ void cyclwarr_state::machine_reset()
m_road_color_bank = m_prev_road_bank = 0;
}
-MACHINE_CONFIG_START(cyclwarr_state::cyclwarr)
-
+void cyclwarr_state::cyclwarr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, CLOCK_2 / 4)
- MCFG_DEVICE_PROGRAM_MAP(master_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cyclwarr_state, irq5_line_hold)
+ M68000(config, m_maincpu, CLOCK_2 / 4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &cyclwarr_state::master_map);
+ m_maincpu->set_vblank_int("screen", FUNC(cyclwarr_state::irq5_line_hold));
- MCFG_DEVICE_ADD("sub", M68000, CLOCK_2 / 4)
- MCFG_DEVICE_PROGRAM_MAP(slave_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cyclwarr_state, irq5_line_hold)
+ M68000(config, m_subcpu, CLOCK_2 / 4);
+ m_subcpu->set_addrmap(AS_PROGRAM, &cyclwarr_state::slave_map);
+ m_subcpu->set_vblank_int("screen", FUNC(cyclwarr_state::irq5_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80, CLOCK_1 / 4)
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ Z80(config, m_audiocpu, CLOCK_1 / 4);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &cyclwarr_state::sound_map);
// saner sync value (avoids crashing after crediting)
config.m_minimum_quantum = attotime::from_hz(CLOCK_2 / 1024);
@@ -1031,9 +1031,9 @@ MACHINE_CONFIG_START(cyclwarr_state::cyclwarr)
io2.out_porte_cb().set(FUNC(cyclwarr_state::cyclwarr_control_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240) // TODO: Hook up CRTC
- MCFG_SCREEN_UPDATE_DRIVER(cyclwarr_state, screen_update_cyclwarr)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240); // TODO: Hook up CRTC
+ screen.set_screen_update(FUNC(cyclwarr_state::screen_update_cyclwarr));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cyclwarr);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 8192 + 8192);
@@ -1052,25 +1052,24 @@ MACHINE_CONFIG_START(cyclwarr_state::cyclwarr)
m_ym2151->add_route(0, "lspeaker", 0.45);
m_ym2151->add_route(1, "rspeaker", 0.45);
- MCFG_DEVICE_ADD("oki", OKIM6295, CLOCK_1 / 8, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, CLOCK_1 / 8, okim6295_device::PIN7_HIGH);
+ m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.75);
+ m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.75);
+}
-MACHINE_CONFIG_START(cyclwarr_state::bigfight)
+void cyclwarr_state::bigfight(machine_config &config)
+{
cyclwarr(config);
// TODO: it's same video HW, we don't know how/where video registers are mapped
-// MCFG_SCREEN_MODIFY("screen")
-// MCFG_SCREEN_UPDATE_DRIVER(cyclwarr_state, screen_update_bigfight)
+// subdevice<screen_device>("screen")->set_screen_update(FUNC(cyclwarr_state::screen_update_bigfight));
MCFG_VIDEO_START_OVERRIDE(cyclwarr_state, bigfight)
/* sound hardware */
// TODO: 2MHz was too fast. Can the clock be software controlled?
- MCFG_DEVICE_MODIFY("oki")
- MCFG_DEVICE_CLOCK(CLOCK_1 / 8 / 2)
-MACHINE_CONFIG_END
+ m_oki->set_clock(CLOCK_1 / 8 / 2);
+}
/***************************************************************************/
diff --git a/src/mame/drivers/tavernie.cpp b/src/mame/drivers/tavernie.cpp
index 101a556e869..ec03e61a2bc 100644
--- a/src/mame/drivers/tavernie.cpp
+++ b/src/mame/drivers/tavernie.cpp
@@ -297,10 +297,11 @@ void tavernie_state::kbd_put(u8 data)
m_pia_ivg->cb1_w(1);
}
-MACHINE_CONFIG_START(tavernie_state::cpu09)
+void tavernie_state::cpu09(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809, 4_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(cpu09_mem)
+ MC6809(config, m_maincpu, 4_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tavernie_state::cpu09_mem);
MCFG_MACHINE_RESET_OVERRIDE(tavernie_state, cpu09)
/* sound hardware */
@@ -335,28 +336,27 @@ MACHINE_CONFIG_START(tavernie_state::cpu09)
clock_device &acia_clock(CLOCK(config, "acia_clock", 153600));
acia_clock.signal_handler().set("acia", FUNC(acia6850_device::write_txc));
acia_clock.signal_handler().append("acia", FUNC(acia6850_device::write_rxc));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tavernie_state::ivg09)
+void tavernie_state::ivg09(machine_config &config)
+{
cpu09(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ivg09_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &tavernie_state::ivg09_mem);
MCFG_MACHINE_RESET_OVERRIDE(tavernie_state, ivg09)
/* 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(80*8, 25*10)
- MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 25*10-1)
- 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(80*8, 25*10);
+ screen.set_visarea(0, 80*8-1, 0, 25*10-1);
+ screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update));
PALETTE(config, m_palette, palette_device::MONOCHROME);
config.set_default_layout(layout_tavernie);
/* sound hardware */
- MCFG_DEVICE_ADD("beeper", BEEP, 950) // guess
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ BEEP(config, m_beep, 950).add_route(ALL_OUTPUTS, "mono", 0.50); // guess
/* Devices */
generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
@@ -371,11 +371,11 @@ MACHINE_CONFIG_START(tavernie_state::ivg09)
PIA6821(config, m_pia_ivg, 0);
m_pia_ivg->readpb_handler().set(FUNC(tavernie_state::pb_ivg_r));
m_pia_ivg->writepa_handler().set(FUNC(tavernie_state::pa_ivg_w));
- m_pia_ivg->cb2_handler().set("beeper", FUNC(beep_device::set_state));
+ m_pia_ivg->cb2_handler().set(m_beep, FUNC(beep_device::set_state));
FD1795(config, m_fdc, 8_MHz_XTAL / 8);
FLOPPY_CONNECTOR(config, "fdc:0", ifd09_floppies, "525dd", floppy_image_device::default_floppy_formats).enable_sound(true);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( cpu09 )
diff --git a/src/mame/drivers/taxidriv.cpp b/src/mame/drivers/taxidriv.cpp
index 4756ff18a1b..fc3e0af0d8c 100644
--- a/src/mame/drivers/taxidriv.cpp
+++ b/src/mame/drivers/taxidriv.cpp
@@ -332,21 +332,21 @@ void taxidriv_state::taxidriv_palette(palette_device &palette) const
}
}
-MACHINE_CONFIG_START(taxidriv_state::taxidriv)
-
+void taxidriv_state::taxidriv(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,4000000) /* 4 MHz ??? */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", taxidriv_state, irq0_line_hold)
+ Z80(config, m_maincpu, 4000000); /* 4 MHz ??? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &taxidriv_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(taxidriv_state::irq0_line_hold));
- MCFG_DEVICE_ADD("sub", Z80,4000000) /* 4 MHz ??? */
- MCFG_DEVICE_PROGRAM_MAP(cpu2_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", taxidriv_state, irq0_line_hold) /* ??? */
+ z80_device &subcpu(Z80(config, "sub", 4000000)); /* 4 MHz ??? */
+ subcpu.set_addrmap(AS_PROGRAM, &taxidriv_state::cpu2_map);
+ subcpu.set_vblank_int("screen", FUNC(taxidriv_state::irq0_line_hold)); /* ??? */
- MCFG_DEVICE_ADD("audiocpu", Z80,4000000) /* 4 MHz ??? */
- MCFG_DEVICE_PROGRAM_MAP(cpu3_map)
- MCFG_DEVICE_IO_MAP(cpu3_port_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", taxidriv_state, irq0_line_hold) /* ??? */
+ z80_device &audiocpu(Z80(config, "audiocpu", 4000000)); /* 4 MHz ??? */
+ audiocpu.set_addrmap(AS_PROGRAM, &taxidriv_state::cpu3_map);
+ audiocpu.set_addrmap(AS_IO, &taxidriv_state::cpu3_port_map);
+ audiocpu.set_vblank_int("screen", FUNC(taxidriv_state::irq0_line_hold)); /* ??? */
config.m_minimum_quantum = attotime::from_hz(6000); /* 100 CPU slices per frame - a high value to ensure proper */
/* synchronization of the CPUs */
@@ -379,13 +379,13 @@ MACHINE_CONFIG_START(taxidriv_state::taxidriv)
ppi4.out_pc_callback().set(FUNC(taxidriv_state::p4c_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, 1*8, 27*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(taxidriv_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(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 1*8, 27*8-1);
+ screen.set_screen_update(FUNC(taxidriv_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_taxidriv);
PALETTE(config, m_palette, FUNC(taxidriv_state::taxidriv_palette), 16);
@@ -401,7 +401,7 @@ MACHINE_CONFIG_START(taxidriv_state::taxidriv)
ay8910_device &ay2(AY8910(config, "ay2", 1250000));
ay2.port_a_read_callback().set(FUNC(taxidriv_state::p8910_1a_r));
ay2.add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/tdv2324.cpp b/src/mame/drivers/tdv2324.cpp
index a183d2dc99b..bb0bd3abf13 100644
--- a/src/mame/drivers/tdv2324.cpp
+++ b/src/mame/drivers/tdv2324.cpp
@@ -261,21 +261,22 @@ static void tdv2324_floppies(device_slot_interface &device)
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( tdv2324 )
+// machine_config( tdv2324 )
//-------------------------------------------------
-MACHINE_CONFIG_START(tdv2324_state::tdv2324)
+void tdv2324_state::tdv2324(machine_config &config)
+{
// basic system hardware
- MCFG_DEVICE_ADD(P8085AH_0_TAG, I8085A, 8700000/2) // ???
- MCFG_DEVICE_PROGRAM_MAP(tdv2324_mem)
- MCFG_DEVICE_IO_MAP(tdv2324_io)
+ I8085A(config, m_maincpu, 8700000/2); // ???
+ m_maincpu->set_addrmap(AS_PROGRAM, &tdv2324_state::tdv2324_mem);
+ m_maincpu->set_addrmap(AS_IO, &tdv2324_state::tdv2324_io);
- MCFG_DEVICE_ADD(P8085AH_1_TAG, I8085A, 8000000/2) // ???
- MCFG_DEVICE_PROGRAM_MAP(tdv2324_sub_mem)
- MCFG_DEVICE_IO_MAP(tdv2324_sub_io)
+ I8085A(config, m_subcpu, 8000000/2); // ???
+ m_subcpu->set_addrmap(AS_PROGRAM, &tdv2324_state::tdv2324_sub_mem);
+ m_subcpu->set_addrmap(AS_IO, &tdv2324_state::tdv2324_sub_io);
- MCFG_DEVICE_ADD(MC68B02P_TAG, M6802, 8000000/2) // ???
- MCFG_DEVICE_PROGRAM_MAP(tdv2324_fdc_mem)
+ M6802(config, m_fdccpu, 8000000/2); // ???
+ m_fdccpu->set_addrmap(AS_PROGRAM, &tdv2324_state::tdv2324_fdc_mem);
// video hardware
screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER, rgb_t::green()));
@@ -306,7 +307,7 @@ MACHINE_CONFIG_START(tdv2324_state::tdv2324)
// software list
SOFTWARE_LIST(config, "flop_list").set_original("tdv2324");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/tec1.cpp b/src/mame/drivers/tec1.cpp
index f968b701f20..7d24f438830 100644
--- a/src/mame/drivers/tec1.cpp
+++ b/src/mame/drivers/tec1.cpp
@@ -420,20 +420,20 @@ INPUT_PORTS_END
***************************************************************************/
-MACHINE_CONFIG_START(tec1_state::tec1)
+void tec1_state::tec1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 1000000) /* speed can be varied between 250kHz and 2MHz */
- MCFG_DEVICE_PROGRAM_MAP(tec1_map)
- MCFG_DEVICE_IO_MAP(tec1_io)
+ Z80(config, m_maincpu, 1000000); /* speed can be varied between 250kHz and 2MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tec1_state::tec1_map);
+ m_maincpu->set_addrmap(AS_IO, &tec1_state::tec1_io);
/* video hardware */
config.set_default_layout(layout_tec1);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
void tec1_state::tecjmon(machine_config &config)
{
@@ -447,7 +447,7 @@ void tec1_state::tecjmon(machine_config &config)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05);
/* Devices */
diff --git a/src/mame/drivers/techno.cpp b/src/mame/drivers/techno.cpp
index b7d193944aa..46b7715023e 100644
--- a/src/mame/drivers/techno.cpp
+++ b/src/mame/drivers/techno.cpp
@@ -288,18 +288,20 @@ void techno_state::machine_reset()
m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE);
}
-MACHINE_CONFIG_START(techno_state::techno)
+void techno_state::techno(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(8'000'000))
- MCFG_DEVICE_PROGRAM_MAP(techno_map)
+ M68000(config, m_maincpu, XTAL(8'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &techno_state::techno_map);
+
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- //MCFG_DEVICE_ADD("cpu2", TMS7000, XTAL(4'000'000))
- //MCFG_DEVICE_PROGRAM_MAP(techno_sub_map)
+ //tms7000_device &cpu2(TMS7000(config, "cpu2", XTAL(4'000'000)));
+ //cpu2.set_addrmap(AS_PROGRAM, &techno_state::techno_sub_map);
/* Video */
config.set_default_layout(layout_techno);
-MACHINE_CONFIG_END
+}
ROM_START(xforce)
ROM_REGION(0x10000, "maincpu", 0)
diff --git a/src/mame/drivers/tecmo16.cpp b/src/mame/drivers/tecmo16.cpp
index ba197fc828e..f2db7d3bb90 100644
--- a/src/mame/drivers/tecmo16.cpp
+++ b/src/mame/drivers/tecmo16.cpp
@@ -354,28 +354,28 @@ GFXDECODE_END
#define MASTER_CLOCK XTAL(24'000'000)
#define OKI_CLOCK XTAL(8'000'000)
-MACHINE_CONFIG_START(tecmo16_state::fstarfrc)
-
+void tecmo16_state::fstarfrc(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,MASTER_CLOCK/2) /* 12MHz */
- MCFG_DEVICE_PROGRAM_MAP(fstarfrc_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tecmo16_state, irq5_line_hold)
+ M68000(config, m_maincpu, MASTER_CLOCK/2); /* 12MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tecmo16_state::fstarfrc_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tecmo16_state::irq5_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80,MASTER_CLOCK/6) /* 4MHz */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
+ Z80(config, m_audiocpu, MASTER_CLOCK/6); /* 4MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &tecmo16_state::sound_map);
/* NMIs are triggered by the main CPU */
config.m_minimum_quantum = attotime::from_hz(600);
/* video hardware */
BUFFERED_SPRITERAM16(config, m_spriteram);
- 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(tecmo16_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
+ 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, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(tecmo16_state::screen_update));
+ m_screen->screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tecmo16);
PALETTE(config, m_palette, palette_device::BLACK).set_format(palette_device::xBGR_444, 4096);
@@ -402,26 +402,27 @@ MACHINE_CONFIG_START(tecmo16_state::fstarfrc)
ymsnd.add_route(0, "lspeaker", 0.60);
ymsnd.add_route(1, "rspeaker", 0.60);
- MCFG_DEVICE_ADD("oki", OKIM6295, OKI_CLOCK/8, okim6295_device::PIN7_HIGH) // sample rate 1 MHz / 132
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.40)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.40)
-MACHINE_CONFIG_END
+ okim6295_device &oki(OKIM6295(config, "oki", OKI_CLOCK/8, okim6295_device::PIN7_HIGH)); // sample rate 1 MHz / 132
+ oki.add_route(ALL_OUTPUTS, "lspeaker", 0.40);
+ oki.add_route(ALL_OUTPUTS, "rspeaker", 0.40);
+}
-MACHINE_CONFIG_START(tecmo16_state::ginkun)
+void tecmo16_state::ginkun(machine_config &config)
+{
fstarfrc(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ginkun_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &tecmo16_state::ginkun_map);
MCFG_VIDEO_START_OVERRIDE(tecmo16_state,ginkun)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tecmo16_state::riot)
+void tecmo16_state::riot(machine_config &config)
+{
ginkun(config);
/* basic machine hardware */
MCFG_VIDEO_START_OVERRIDE(tecmo16_state,riot)
-MACHINE_CONFIG_END
+}
/******************************************************************************/
diff --git a/src/mame/drivers/tek410x.cpp b/src/mame/drivers/tek410x.cpp
index fa21406364e..c70f2a6fec4 100644
--- a/src/mame/drivers/tek410x.cpp
+++ b/src/mame/drivers/tek410x.cpp
@@ -97,23 +97,24 @@ void tek4107a_state::machine_start()
/* Machine Driver */
-MACHINE_CONFIG_START(tek4107a_state::tek4107a)
+void tek4107a_state::tek4107a(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(I80188_TAG, I80188, 21000000)
- MCFG_DEVICE_PROGRAM_MAP(tek4107a_mem)
- MCFG_DEVICE_IO_MAP(tek4107a_io)
+ i80188_cpu_device &maincpu(I80188(config, I80188_TAG, 21000000));
+ maincpu.set_addrmap(AS_PROGRAM, &tek4107a_state::tek4107a_mem);
+ maincpu.set_addrmap(AS_IO, &tek4107a_state::tek4107a_io);
/* video hardware */
- MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(tek4107a_state, screen_update)
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(FUNC(tek4107a_state::screen_update));
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 640-1, 0, 480-1);
PALETTE(config, "palette").set_entries(64);
GFXDECODE(config, "gfxdecode", "palette", gfx_tek4107a);
-MACHINE_CONFIG_END
+}
void tek4107a_state::tek4109a(machine_config &config)
{
diff --git a/src/mame/drivers/tek440x.cpp b/src/mame/drivers/tek440x.cpp
index 4c71fc1b4a3..3d43d6f98c3 100644
--- a/src/mame/drivers/tek440x.cpp
+++ b/src/mame/drivers/tek440x.cpp
@@ -193,24 +193,24 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(tek440x_state::tek4404)
-
+void tek440x_state::tek4404(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68010, 40_MHz_XTAL / 4) // MC68010L10
- MCFG_DEVICE_PROGRAM_MAP(maincpu_map)
+ M68010(config, m_maincpu, 40_MHz_XTAL / 4); // MC68010L10
+ m_maincpu->set_addrmap(AS_PROGRAM, &tek440x_state::maincpu_map);
- MCFG_DEVICE_ADD("fdccpu", M6502, 1000000)
- MCFG_DEVICE_PROGRAM_MAP(fdccpu_map)
+ M6502(config, m_fdccpu, 1000000);
+ m_fdccpu->set_addrmap(AS_PROGRAM, &tek440x_state::fdccpu_map);
/* 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(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
- MCFG_SCREEN_UPDATE_DRIVER(tek440x_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 639, 0, 479);
+ screen.set_screen_update(FUNC(tek440x_state::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
mos6551_device &aica(MOS6551(config, "aica", 0));
@@ -227,9 +227,8 @@ MACHINE_CONFIG_START(tek440x_state::tek4404)
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("snsnd", SN76496, VIDEO_CLOCK / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
-MACHINE_CONFIG_END
+ SN76496(config, "snsnd", VIDEO_CLOCK / 8).add_route(ALL_OUTPUTS, "mono", 0.80);
+}
diff --git a/src/mame/drivers/tekxp33x.cpp b/src/mame/drivers/tekxp33x.cpp
index de2e0d3aad0..ed2e4bb74f1 100644
--- a/src/mame/drivers/tekxp33x.cpp
+++ b/src/mame/drivers/tekxp33x.cpp
@@ -97,25 +97,26 @@ void tekxp330_state::machine_start()
/* Machine Driver */
-MACHINE_CONFIG_START(tekxp330_state::tekxp330)
+void tekxp330_state::tekxp330(machine_config &config)
+{
/* basic machine hardware */
r3052e_device &maincpu(R3052E(config, "maincpu", XTAL(20'000'000))); /* IDT 79R3052E, clock unknown */
maincpu.set_endianness(ENDIANNESS_BIG);
maincpu.set_addrmap(AS_PROGRAM, &tekxp330_state::cpu_map);
- MCFG_DEVICE_ADD("tms", TMS34010, XTAL(40'000'000)) /* clock unknown */
- MCFG_DEVICE_PROGRAM_MAP(tms_map)
+ tms34010_device &tms(TMS34010(config, "tms", XTAL(40'000'000))); /* clock unknown */
+ tms.set_addrmap(AS_PROGRAM, &tekxp330_state::tms_map);
/* video hardware */
- MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(tekxp330_state, screen_update)
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
-
- MCFG_PALETTE_ADD("palette", 64)
-MACHINE_CONFIG_END
+ screen_device &screen(SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(FUNC(tekxp330_state::screen_update));
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 640-1, 0, 480-1);
+
+ PALETTE(config, "palette").set_entries(64);
+}
/* ROMs */
diff --git a/src/mame/drivers/terco.cpp b/src/mame/drivers/terco.cpp
index a169121c0f6..c4257a95d8f 100644
--- a/src/mame/drivers/terco.cpp
+++ b/src/mame/drivers/terco.cpp
@@ -295,15 +295,16 @@ void t4490_state::t4490_map(address_map &map)
static INPUT_PORTS_START( t4490 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(t4490_state::t4490)
- MCFG_DEVICE_ADD("maincpu", M6800, XTAL(8'000'000)/4) // divided by a MC6875
- MCFG_DEVICE_PROGRAM_MAP(t4490_map)
+void t4490_state::t4490(machine_config &config)
+{
+ M6800(config, m_maincpu, XTAL(8'000'000)/4); // divided by a MC6875
+ m_maincpu->set_addrmap(AS_PROGRAM, &t4490_state::t4490_map);
/* devices */
- MCFG_DEVICE_ADD("pia1", PIA6821, 0)
- MCFG_DEVICE_ADD("pia2", PIA6821, 0)
- MCFG_DEVICE_ADD("acia", ACIA6850, 0)
-MACHINE_CONFIG_END
+ PIA6821(config, m_pia1, 0);
+ PIA6821(config, m_pia2, 0);
+ ACIA6850(config, "acia", 0);
+}
ROM_START( t4490 )
ROM_REGION(0x10000, "maincpu", 0)
diff --git a/src/mame/drivers/terminal.cpp b/src/mame/drivers/terminal.cpp
index 202ce67e470..3cb8670861c 100644
--- a/src/mame/drivers/terminal.cpp
+++ b/src/mame/drivers/terminal.cpp
@@ -45,10 +45,11 @@ static INPUT_PORTS_START( terminal )
INPUT_PORTS_END
-MACHINE_CONFIG_START( terminal_state::terminal )
- MCFG_DEVICE_ADD("maincpu", I8031, 12'000'000)
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
-MACHINE_CONFIG_END
+void terminal_state::terminal(machine_config &config)
+{
+ I8031(config, m_maincpu, 12'000'000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &terminal_state::mem_map);
+}
/* ROM definition */
diff --git a/src/mame/drivers/terracre.cpp b/src/mame/drivers/terracre.cpp
index b8f18c92070..745c79bf475 100644
--- a/src/mame/drivers/terracre.cpp
+++ b/src/mame/drivers/terracre.cpp
@@ -454,26 +454,27 @@ static GFXDECODE_START( gfx_terracre )
GFXDECODE_END
-MACHINE_CONFIG_START(terracre_state::ym3526)
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)/2) // 8mhz
- MCFG_DEVICE_PROGRAM_MAP(terracre_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", terracre_state, irq1_line_hold)
-
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(16'000'000)/4) // 4.0mhz when compared to sound recordings, should be derived from XTAL(22'000'000)? how?
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_3526_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(terracre_state, irq0_line_hold, XTAL(16'000'000)/4/512) // ?
-
- MCFG_DEVICE_ADD("spriteram", BUFFERED_SPRITERAM16)
-
- 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(terracre_state, screen_update_amazon)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE("spriteram", buffered_spriteram16_device, vblank_copy_rising))
- MCFG_SCREEN_PALETTE(m_palette)
+void terracre_state::ym3526(machine_config &config)
+{
+ M68000(config, m_maincpu, XTAL(16'000'000)/2); // 8mhz
+ m_maincpu->set_addrmap(AS_PROGRAM, &terracre_state::terracre_map);
+ m_maincpu->set_vblank_int("screen", FUNC(terracre_state::irq1_line_hold));
+
+ z80_device &audiocpu(Z80(config, "audiocpu", XTAL(16'000'000)/4)); // 4.0mhz when compared to sound recordings, should be derived from XTAL(22'000'000)? how?
+ audiocpu.set_addrmap(AS_PROGRAM, &terracre_state::sound_map);
+ audiocpu.set_addrmap(AS_IO, &terracre_state::sound_3526_io_map);
+ audiocpu.set_periodic_int(FUNC(terracre_state::irq0_line_hold), attotime::from_hz(XTAL(16'000'000)/4/512)); // ?
+
+ BUFFERED_SPRITERAM16(config, m_spriteram);
+
+ 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(terracre_state::screen_update_amazon));
+ screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_terracre);
PALETTE(config, m_palette, FUNC(terracre_state::terracre_palette), 1*16+16*16+16*256, 256);
@@ -482,43 +483,42 @@ MACHINE_CONFIG_START(terracre_state::ym3526)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("ymsnd", YM3526, XTAL(16'000'000)/4)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ YM3526(config, "ymsnd", XTAL(16'000'000)/4).add_route(ALL_OUTPUTS, "speaker", 1.0);
DAC_8BIT_R2R(config, "dac1", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
DAC_8BIT_R2R(config, "dac2", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
vref.add_route(0, "dac2", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac2", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(terracre_state::ym2203)
+void terracre_state::ym2203(machine_config &config)
+{
ym3526(config);
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_IO_MAP(sound_2203_io_map)
+ subdevice<z80_device>("audiocpu")->set_addrmap(AS_IO, &terracre_state::sound_2203_io_map);
config.device_remove("ymsnd");
- MCFG_DEVICE_ADD("ym1", YM2203, XTAL(16'000'000)/4)
- MCFG_SOUND_ROUTE(0, "speaker", 0.2)
- MCFG_SOUND_ROUTE(1, "speaker", 0.2)
- MCFG_SOUND_ROUTE(2, "speaker", 0.2)
- MCFG_SOUND_ROUTE(3, "speaker", 0.4)
-MACHINE_CONFIG_END
+ ym2203_device &ym1(YM2203(config, "ym1", XTAL(16'000'000)/4));
+ ym1.add_route(0, "speaker", 0.2);
+ ym1.add_route(1, "speaker", 0.2);
+ ym1.add_route(2, "speaker", 0.2);
+ ym1.add_route(3, "speaker", 0.4);
+}
-MACHINE_CONFIG_START(terracre_state::amazon_base)
+void terracre_state::amazon_base(machine_config &config)
+{
ym3526(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(amazon_base_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &terracre_state::amazon_base_map);
+}
-MACHINE_CONFIG_START(amazon_state::amazon_1412m2)
+void amazon_state::amazon_1412m2(machine_config &config)
+{
amazon_base(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(amazon_1412m2_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &amazon_state::amazon_1412m2_map);
NB1412M2(config, m_prot, XTAL(16'000'000)); // divided by 4 maybe
-MACHINE_CONFIG_END
+}
/**************************************
diff --git a/src/mame/drivers/testpat.cpp b/src/mame/drivers/testpat.cpp
index c11421ab3be..83c1d82c66f 100644
--- a/src/mame/drivers/testpat.cpp
+++ b/src/mame/drivers/testpat.cpp
@@ -103,8 +103,8 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(tp1983_state::tp1983)
- MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK)
- MCFG_NETLIST_SETUP(tp1983)
+ NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK);
+ m_maincpu->set_constructor(netlist_tp1983);
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_composite_monochrome, "fixfreq")
@@ -116,11 +116,11 @@ MACHINE_CONFIG_START(tp1983_state::tp1983)
m_video->set_fieldcount(1);
m_video->set_threshold(1);
m_video->set_gain(0.36);
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(tp1985_state::tp1985)
- MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK)
- MCFG_NETLIST_SETUP(tp1985)
+ NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK);
+ m_maincpu->set_constructor(netlist_tp1985);
MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", tp1985_state, video_out_cb, "")
diff --git a/src/mame/drivers/tetrisp2.cpp b/src/mame/drivers/tetrisp2.cpp
index 62a2090ac11..5947f894901 100644
--- a/src/mame/drivers/tetrisp2.cpp
+++ b/src/mame/drivers/tetrisp2.cpp
@@ -1692,28 +1692,28 @@ void stepstag_state::init_stepstag()
}
-MACHINE_CONFIG_START(tetrisp2_state::tetrisp2)
-
+void tetrisp2_state::tetrisp2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(tetrisp2_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold)
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tetrisp2_state::tetrisp2_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tetrisp2_state::irq2_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); /* guess */
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x140, 0xe0)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0, 0xe0-1)
- MCFG_SCREEN_UPDATE_DRIVER(tetrisp2_state, screen_update_tetrisp2)
- 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(0x140, 0xe0);
+ screen.set_visarea(0, 0x140-1, 0, 0xe0-1);
+ screen.set_screen_update(FUNC(tetrisp2_state::screen_update_tetrisp2));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2);
- MCFG_PALETTE_ADD("palette", 0x8000)
+ PALETTE(config, m_palette).set_entries(0x8000);
MCFG_VIDEO_START_OVERRIDE(tetrisp2_state,tetrisp2)
@@ -1721,67 +1721,66 @@ MACHINE_CONFIG_START(tetrisp2_state::tetrisp2)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymz", YMZ280B, 16934400)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
-
+ ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400));
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(tetrisp2_state::nndmseal)
+void tetrisp2_state::nndmseal(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(12'000'000))
- MCFG_DEVICE_PROGRAM_MAP(nndmseal_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold)
+ M68000(config, m_maincpu, XTAL(12'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &tetrisp2_state::nndmseal_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tetrisp2_state::irq2_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x180, 0xf0)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x180-1, 0, 0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(tetrisp2_state, screen_update_tetrisp2)
- 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(0x180, 0xf0);
+ screen.set_visarea(0, 0x180-1, 0, 0xf0-1);
+ screen.set_screen_update(FUNC(tetrisp2_state::screen_update_tetrisp2));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2);
- MCFG_PALETTE_ADD("palette", 0x8000)
+ PALETTE(config, m_palette).set_entries(0x8000);
MCFG_VIDEO_START_OVERRIDE(tetrisp2_state,nndmseal) // bg layer offset
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(2'000'000), okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
+ OKIM6295(config, "oki", XTAL(2'000'000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
-MACHINE_CONFIG_START(tetrisp2_state::rockn)
+void tetrisp2_state::rockn(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(rockn1_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold)
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tetrisp2_state::rockn1_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tetrisp2_state::irq2_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x140, 0xe0)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0, 0xe0-1)
- MCFG_SCREEN_UPDATE_DRIVER(tetrisp2_state, screen_update_rockntread)
- 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(0x140, 0xe0);
+ screen.set_visarea(0, 0x140-1, 0, 0xe0-1);
+ screen.set_screen_update(FUNC(tetrisp2_state::screen_update_rockntread));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2);
- MCFG_PALETTE_ADD("palette", 0x8000)
+ PALETTE(config, m_palette).set_entries(0x8000);
MCFG_VIDEO_START_OVERRIDE(tetrisp2_state,rockntread)
@@ -1789,34 +1788,34 @@ MACHINE_CONFIG_START(tetrisp2_state::rockn)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymz", YMZ280B, 16934400)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
-
+ ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400));
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(tetrisp2_state::rockn2)
+void tetrisp2_state::rockn2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(rockn2_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold)
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tetrisp2_state::rockn2_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tetrisp2_state::irq2_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x140, 0xe0)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0, 0xe0-1)
- MCFG_SCREEN_UPDATE_DRIVER(tetrisp2_state, screen_update_rockntread)
- 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(0x140, 0xe0);
+ screen.set_visarea(0, 0x140-1, 0, 0xe0-1);
+ screen.set_screen_update(FUNC(tetrisp2_state::screen_update_rockntread));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2);
- MCFG_PALETTE_ADD("palette", 0x8000)
+ PALETTE(config, m_palette).set_entries(0x8000);
MCFG_VIDEO_START_OVERRIDE(tetrisp2_state,rockntread)
@@ -1824,22 +1823,22 @@ MACHINE_CONFIG_START(tetrisp2_state::rockn2)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymz", YMZ280B, 16934400)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
-
+ ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400));
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(tetrisp2_state::rocknms)
+void tetrisp2_state::rocknms(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(rocknms_main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("lscreen", tetrisp2_state, irq2_line_hold)
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tetrisp2_state::rocknms_main_map);
+ m_maincpu->set_vblank_int("lscreen", FUNC(tetrisp2_state::irq2_line_hold));
- MCFG_DEVICE_ADD("sub", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(rocknms_sub_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("lscreen", tetrisp2_state, irq2_line_hold)
+ M68000(config, m_subcpu, 12000000);
+ m_subcpu->set_addrmap(AS_PROGRAM, &tetrisp2_state::rocknms_sub_map);
+ m_subcpu->set_vblank_int("lscreen", FUNC(tetrisp2_state::irq2_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -1848,10 +1847,10 @@ MACHINE_CONFIG_START(tetrisp2_state::rocknms)
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2);
- MCFG_PALETTE_ADD("palette", 0x8000)
+ PALETTE(config, m_palette).set_entries(0x8000);
GFXDECODE(config, m_sub_gfxdecode, m_sub_palette, gfx_rocknms_sub);
- MCFG_PALETTE_ADD("sub_palette", 0x8000)
+ PALETTE(config, m_sub_palette).set_entries(0x8000);
config.set_default_layout(layout_rocknms);
@@ -1877,20 +1876,21 @@ MACHINE_CONFIG_START(tetrisp2_state::rocknms)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymz", YMZ280B, 16934400)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400));
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(stepstag_state::stepstag)
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000 )
- MCFG_DEVICE_PROGRAM_MAP(stepstag_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("mscreen", tetrisp2_state, irq2_line_hold) // lev 4 triggered by system timer
+void stepstag_state::stepstag(machine_config &config)
+{
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &stepstag_state::stepstag_map);
+ m_maincpu->set_vblank_int("mscreen", FUNC(tetrisp2_state::irq2_line_hold)); // lev 4 triggered by system timer
- MCFG_DEVICE_ADD("sub", M68000, 16000000 ) //??
- MCFG_DEVICE_PROGRAM_MAP(stepstag_sub_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("lscreen", tetrisp2_state, irq4_line_hold) // lev 6 triggered by main CPU
+ M68000(config, m_subcpu, 16000000); //??
+ m_subcpu->set_addrmap(AS_PROGRAM, &stepstag_state::stepstag_sub_map);
+ m_subcpu->set_vblank_int("lscreen", FUNC(tetrisp2_state::irq4_line_hold)); // lev 6 triggered by main CPU
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -1905,7 +1905,7 @@ MACHINE_CONFIG_START(stepstag_state::stepstag)
lscreen.set_size(0x160, 0xf0);
lscreen.set_visarea(0, 0x160-1, 0, 0xf0-1);
lscreen.set_screen_update(FUNC(stepstag_state::screen_update_stepstag_left));
-// lscreen.set_palette("lpalette"));
+// lscreen.set_palette(m_vj_palette_l));
screen_device &mscreen(SCREEN(config, "mscreen", SCREEN_TYPE_RASTER));
mscreen.set_orientation(ROT0);
@@ -1914,7 +1914,7 @@ MACHINE_CONFIG_START(stepstag_state::stepstag)
mscreen.set_size(0x160, 0xf0);
mscreen.set_visarea(0, 0x160-1, 0, 0xf0-1);
mscreen.set_screen_update(FUNC(stepstag_state::screen_update_stepstag_mid));
-// mscreen.set_palette("mpalette"));
+// mscreen.set_palette(m_vj_palette_m));
screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER));
rscreen.set_orientation(ROT270);;
@@ -1923,20 +1923,20 @@ MACHINE_CONFIG_START(stepstag_state::stepstag)
rscreen.set_size(0x160, 0xf0);
rscreen.set_visarea(0, 0x160-1, 0, 0xf0-1);
rscreen.set_screen_update(FUNC(stepstag_state::screen_update_stepstag_right));
- rscreen.set_palette("rpalette");
+ rscreen.set_palette(m_vj_palette_r);
MCFG_VIDEO_START_OVERRIDE(stepstag_state, stepstag )
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2);
- MCFG_PALETTE_ADD("palette", 0x8000)
+ PALETTE(config, m_palette).set_entries(0x8000);
GFXDECODE(config, m_vj_gfxdecode_l, m_vj_palette_l, gfx_vj_lscreen);
- MCFG_PALETTE_ADD("lpalette", 0x8000)
+ PALETTE(config, m_vj_palette_l).set_entries(0x8000);
GFXDECODE(config, m_vj_gfxdecode_m, m_vj_palette_m, gfx_vj_mscreen);
- MCFG_PALETTE_ADD("mpalette", 0x8000)
+ PALETTE(config, m_vj_palette_m).set_entries(0x8000);
GFXDECODE(config, m_vj_gfxdecode_r, m_vj_palette_r, gfx_vj_rscreen);
- MCFG_PALETTE_ADD("rpalette", 0x8000)
+ PALETTE(config, m_vj_palette_r).set_entries(0x8000);
config.set_default_layout(layout_stepstag);
@@ -1946,70 +1946,71 @@ MACHINE_CONFIG_START(stepstag_state::stepstag)
GENERIC_LATCH_16(config, m_soundlatch);
- MCFG_DEVICE_ADD("ymz", YMZ280B, 16934400)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400));
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(stepstag_state::vjdash) // 4 Screens
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000 )
- MCFG_DEVICE_PROGRAM_MAP(vjdash_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tetrisp2_state, irq2_line_hold) // lev 4 triggered by system timer
+void stepstag_state::vjdash(machine_config &config) // 4 Screens
+{
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &stepstag_state::vjdash_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tetrisp2_state::irq2_line_hold)); // lev 4 triggered by system timer
- MCFG_DEVICE_ADD("sub", M68000, 16000000 ) //??
- MCFG_DEVICE_PROGRAM_MAP(stepstag_sub_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("mscreen", tetrisp2_state, irq4_line_hold) // lev 6 triggered by main CPU
+ M68000(config, m_subcpu, 16000000); //??
+ m_subcpu->set_addrmap(AS_PROGRAM, &stepstag_state::stepstag_sub_map);
+ m_subcpu->set_vblank_int("mscreen", FUNC(tetrisp2_state::irq4_line_hold)); // lev 6 triggered by main CPU
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
WATCHDOG_TIMER(config, "watchdog");
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x160, 0xf0)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0, 0xe0-1)
- MCFG_SCREEN_UPDATE_DRIVER(stepstag_state, screen_update_stepstag_main)
-// MCFG_SCREEN_UPDATE_DRIVER(tetrisp2_state, screen_update_rockntread)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_SCREEN_ADD("lscreen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(30)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x160, 0xf0)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x160-1, 0, 0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(stepstag_state, screen_update_stepstag_left)
-// MCFG_SCREEN_PALETTE("lpalette")
-
- MCFG_SCREEN_ADD("mscreen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(30)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x160, 0xf0)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x160-1, 0, 0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(stepstag_state, screen_update_stepstag_mid)
-// MCFG_SCREEN_PALETTE("mpalette")
-
- MCFG_SCREEN_ADD("rscreen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(30)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x160, 0xf0)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x160-1, 0, 0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(stepstag_state, screen_update_stepstag_right)
- MCFG_SCREEN_PALETTE("rpalette")
+ 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(0x160, 0xf0);
+ screen.set_visarea(0, 0x140-1, 0, 0xe0-1);
+ screen.set_screen_update(FUNC(stepstag_state::screen_update_stepstag_main));
+// screen.set_screen_update(FUNC(tetrisp2_state::screen_update_rockntread));
+ screen.set_palette(m_palette);
+
+ screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER));
+ lscreen.set_refresh_hz(30);
+ lscreen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ lscreen.set_size(0x160, 0xf0);
+ lscreen.set_visarea(0, 0x160-1, 0, 0xf0-1);
+ lscreen.set_screen_update(FUNC(stepstag_state::screen_update_stepstag_left));
+// lscreen.set_palette(m_vj_palette_l);
+
+ screen_device &mscreen(SCREEN(config, "mscreen", SCREEN_TYPE_RASTER));
+ mscreen.set_refresh_hz(30);
+ mscreen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ mscreen.set_size(0x160, 0xf0);
+ mscreen.set_visarea(0, 0x160-1, 0, 0xf0-1);
+ mscreen.set_screen_update(FUNC(stepstag_state::screen_update_stepstag_mid));
+// mscreen.set_palette(m_vj_palette_m);
+
+ screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER));
+ rscreen.set_refresh_hz(30);
+ rscreen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ rscreen.set_size(0x160, 0xf0);
+ rscreen.set_visarea(0, 0x160-1, 0, 0xf0-1);
+ rscreen.set_screen_update(FUNC(stepstag_state::screen_update_stepstag_right));
+ rscreen.set_palette(m_vj_palette_r);
MCFG_VIDEO_START_OVERRIDE(stepstag_state, stepstag )
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tetrisp2);
- MCFG_PALETTE_ADD("palette", 0x8000)
+ PALETTE(config, m_palette).set_entries(0x8000);
GFXDECODE(config, m_vj_gfxdecode_l, m_vj_palette_l, gfx_vj_lscreen);
- MCFG_PALETTE_ADD("lpalette", 0x8000)
+ PALETTE(config, m_vj_palette_l).set_entries(0x8000);
GFXDECODE(config, m_vj_gfxdecode_m, m_vj_palette_m, gfx_vj_mscreen);
- MCFG_PALETTE_ADD("mpalette", 0x8000)
+ PALETTE(config, m_vj_palette_m).set_entries(0x8000);
GFXDECODE(config, m_vj_gfxdecode_r, m_vj_palette_r, gfx_vj_rscreen);
- MCFG_PALETTE_ADD("rpalette", 0x8000)
+ PALETTE(config, m_vj_palette_r).set_entries(0x8000);
config.set_default_layout(layout_vjdash);
@@ -2019,10 +2020,10 @@ MACHINE_CONFIG_START(stepstag_state::vjdash) // 4 Screens
GENERIC_LATCH_16(config, m_soundlatch);
- MCFG_DEVICE_ADD("ymz", YMZ280B, 16934400)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400));
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(1, "rspeaker", 1.0);
+}
/***************************************************************************
diff --git a/src/mame/drivers/tg100.cpp b/src/mame/drivers/tg100.cpp
index 4f047d21d19..aeca288be89 100644
--- a/src/mame/drivers/tg100.cpp
+++ b/src/mame/drivers/tg100.cpp
@@ -73,21 +73,21 @@ void tg100_state::ymw258_map(address_map &map)
map(0x000000, 0x1fffff).rom();
}
-MACHINE_CONFIG_START(tg100_state::tg100)
+void tg100_state::tg100(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", H83002, XTAL(20'000'000)) /* TODO: correct CPU type (H8/520) */
- MCFG_DEVICE_PROGRAM_MAP( tg100_map )
- MCFG_DEVICE_IO_MAP( tg100_io_map )
+ H83002(config, m_maincpu, XTAL(20'000'000)); /* TODO: correct CPU type (H8/520) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tg100_state::tg100_map);
+ m_maincpu->set_addrmap(AS_IO, &tg100_state::tg100_io_map);
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymw258", MULTIPCM, 9400000)
- MCFG_DEVICE_ADDRESS_MAP(0, ymw258_map)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-
-MACHINE_CONFIG_END
+ MULTIPCM(config, m_ymw258, 9400000);
+ m_ymw258->set_addrmap(0, ymw258_map);
+ m_ymw258->add_route(0, "lspeaker", 1.0);
+ m_ymw258->add_route(1, "rspeaker", 1.0);
+}
ROM_START( tg100 )
diff --git a/src/mame/drivers/tgtpanic.cpp b/src/mame/drivers/tgtpanic.cpp
index 33d194bea99..faeffcb562e 100644
--- a/src/mame/drivers/tgtpanic.cpp
+++ b/src/mame/drivers/tgtpanic.cpp
@@ -153,22 +153,22 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(tgtpanic_state::tgtpanic)
-
+void tgtpanic_state::tgtpanic(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(prg_map)
- MCFG_DEVICE_IO_MAP(io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(tgtpanic_state, irq0_line_hold, 20) /* Unverified */
+ Z80(config,m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &tgtpanic_state::prg_map);
+ m_maincpu->set_addrmap(AS_IO, &tgtpanic_state::io_map);
+ m_maincpu->set_periodic_int(FUNC(tgtpanic_state::irq0_line_hold), attotime::from_hz(20)); /* Unverified */
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) /* Unverified */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* Unverified */
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 192 - 1, 0, 192 - 1)
- MCFG_SCREEN_UPDATE_DRIVER(tgtpanic_state, screen_update)
-MACHINE_CONFIG_END
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60); /* Unverified */
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* Unverified */
+ m_screen->set_size(256, 256);
+ m_screen->set_visarea(0, 192 - 1, 0, 192 - 1);
+ m_screen->set_screen_update(FUNC(tgtpanic_state::screen_update));
+}
/*************************************
diff --git a/src/mame/drivers/thedealr.cpp b/src/mame/drivers/thedealr.cpp
index 8b3c140d685..2519435c9fd 100644
--- a/src/mame/drivers/thedealr.cpp
+++ b/src/mame/drivers/thedealr.cpp
@@ -75,7 +75,7 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
- void thedealr(address_map &map);
+ void thedealr_main(address_map &map);
void thedealr_sub(address_map &map);
virtual void machine_start() override;
@@ -282,7 +282,7 @@ WRITE8_MEMBER(thedealr_state::unk_w)
// popmessage("UNK %02x", data);
}
-void thedealr_state::thedealr(address_map &map)
+void thedealr_state::thedealr_main(address_map &map)
{
map(0x0000, 0x07ff).ram().share("nvram");
@@ -540,15 +540,16 @@ TIMER_DEVICE_CALLBACK_MEMBER(thedealr_state::thedealr_interrupt)
m_maincpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
}
-MACHINE_CONFIG_START(thedealr_state::thedealr)
-
+void thedealr_state::thedealr(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", R65C02, XTAL(16'000'000)/8) // 2 MHz?
- MCFG_DEVICE_PROGRAM_MAP(thedealr)
+ R65C02(config, m_maincpu, XTAL(16'000'000)/8); // 2 MHz?
+ m_maincpu->set_addrmap(AS_PROGRAM, &thedealr_state::thedealr_main);
+
TIMER(config, "scantimer").configure_scanline(FUNC(thedealr_state::thedealr_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("subcpu", R65C02, XTAL(16'000'000)/8) // 2 MHz?
- MCFG_DEVICE_PROGRAM_MAP(thedealr_sub)
+ R65C02(config, m_subcpu, XTAL(16'000'000)/8); // 2 MHz?
+ m_subcpu->set_addrmap(AS_PROGRAM, &thedealr_state::thedealr_sub);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -577,7 +578,7 @@ MACHINE_CONFIG_START(thedealr_state::thedealr)
aysnd.port_a_read_callback().set_ioport("DSW2");
aysnd.port_b_read_callback().set_ioport("DSW1");
aysnd.add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/thepit.cpp b/src/mame/drivers/thepit.cpp
index 0e90466fbad..b159ad2f1bf 100644
--- a/src/mame/drivers/thepit.cpp
+++ b/src/mame/drivers/thepit.cpp
@@ -715,17 +715,17 @@ INTERRUPT_GEN_MEMBER(thepit_state::vblank_irq)
device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
-MACHINE_CONFIG_START(thepit_state::thepit)
-
+void thepit_state::thepit(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, PIXEL_CLOCK/2) /* 3.072 MHz */
- MCFG_DEVICE_PROGRAM_MAP(thepit_main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", thepit_state, vblank_irq)
+ Z80(config, m_maincpu, PIXEL_CLOCK/2); /* 3.072 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &thepit_state::thepit_main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(thepit_state::vblank_irq));
- MCFG_DEVICE_ADD("audiocpu", Z80, SOUND_CLOCK/4) /* 2.5 MHz */
- MCFG_DEVICE_PROGRAM_MAP(audio_map)
- MCFG_DEVICE_IO_MAP(audio_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", thepit_state, irq0_line_hold)
+ z80_device &audiocpu(Z80(config, "audiocpu", SOUND_CLOCK/4)); /* 2.5 MHz */
+ audiocpu.set_addrmap(AS_PROGRAM, &thepit_state::audio_map);
+ audiocpu.set_addrmap(AS_IO, &thepit_state::audio_io_map);
+ audiocpu.set_vblank_int("screen", FUNC(thepit_state::irq0_line_hold));
LS259(config, m_mainlatch); // IC42
m_mainlatch->q_out_cb<0>().set(FUNC(thepit_state::nmi_mask_w));
@@ -740,10 +740,10 @@ MACHINE_CONFIG_START(thepit_state::thepit)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_thepit);
PALETTE(config, m_palette, FUNC(thepit_state::thepit_palette), 32+8);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(thepit_state, screen_update)
- 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(thepit_state::screen_update));
+ screen.set_palette(m_palette);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -755,7 +755,7 @@ MACHINE_CONFIG_START(thepit_state::thepit)
ay1.add_route(ALL_OUTPUTS, "mono", 0.25);
AY8910(config, "ay2", PIXEL_CLOCK/4).add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
void thepit_state::fitter(machine_config &config)
{
@@ -763,32 +763,31 @@ void thepit_state::fitter(machine_config &config)
m_mainlatch->q_out_cb<2>().set(FUNC(thepit_state::coin_lockout_w));
}
-MACHINE_CONFIG_START(thepit_state::desertdn)
+void thepit_state::desertdn(machine_config &config)
+{
fitter(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(desertdan_main_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thepit_state::desertdan_main_map);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(thepit_state, screen_update_desertdan)
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(thepit_state::screen_update_desertdan));
m_gfxdecode->set_info(gfx_intrepid);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(thepit_state::intrepid)
+void thepit_state::intrepid(machine_config &config)
+{
fitter(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(intrepid_main_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thepit_state::intrepid_main_map);
m_mainlatch->q_out_cb<5>().set(FUNC(thepit_state::intrepid_graphics_bank_w));
/* video hardware */
m_gfxdecode->set_info(gfx_intrepid);
-MACHINE_CONFIG_END
+}
void thepit_state::suprmous(machine_config &config)
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index ee0bcb3e5f0..a096c39acf7 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -300,7 +300,7 @@ T9000 (1980)
Early TO7 prototype.
The hardware seems to be the exactly same. Only the BIOS is different.
It has some bug that were corrected later for the TO7.
-Actually, the two computers are undistinguishable, except for the different
+Actually, the two computers are indistinguishable, except for the different
startup screen, and a couple BIOS addresses.
They can run the same software and accept the same devices and extensions.
@@ -309,7 +309,7 @@ They can run the same software and accept the same devices and extensions.
/* ------------ address maps ------------ */
-void thomson_state::to7(address_map &map)
+void thomson_state::to7_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to7_cartridge_w)); /* 4 * 16 KB */
@@ -625,22 +625,21 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to7 )
/* cpu */
- MCFG_DEVICE_ADD("maincpu", MC6809E, 16_MHz_XTAL / 16)
- MCFG_DEVICE_PROGRAM_MAP(to7)
+ MC6809E(config, m_maincpu, 16_MHz_XTAL / 16);
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to7_map);
INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE);
INPUT_MERGER_ANY_HIGH(config, "mainfirq").output_handler().set_inputline(m_maincpu, M6809_FIRQ_LINE);
/* video */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE ( /*50*/ 1./0.019968 )
- MCFG_SCREEN_SIZE ( THOM_TOTAL_WIDTH * 2, THOM_TOTAL_HEIGHT )
- MCFG_SCREEN_VISIBLE_AREA ( 0, THOM_TOTAL_WIDTH * 2 - 1,
- 0, THOM_TOTAL_HEIGHT - 1 )
- MCFG_SCREEN_UPDATE_DRIVER( thomson_state, screen_update_thom )
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, thomson_state, thom_vblank))
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(/*50*/ 1./0.019968);
+ m_screen->set_size(THOM_TOTAL_WIDTH * 2, THOM_TOTAL_HEIGHT);
+ m_screen->set_visarea(0, THOM_TOTAL_WIDTH * 2 - 1, 0, THOM_TOTAL_HEIGHT - 1);
+ m_screen->set_screen_update(FUNC(thomson_state::screen_update_thom));
+ m_screen->screen_vblank().set(FUNC(thomson_state::thom_vblank));
+ m_screen->set_palette("palette");
PALETTE(config, "palette", FUNC(thomson_state::thom_palette), 4097); // 12-bit color + transparency
MCFG_VIDEO_START_OVERRIDE( thomson_state, thom )
@@ -655,8 +654,7 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
/* speech synthesis */
- MCFG_DEVICE_ADD("mea8000", MEA8000, 3840000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ MEA8000(config, m_mea8000, 3840000).add_route(ALL_OUTPUTS, "speaker", 1.0);
/* cassette */
CASSETTE(config, m_cassette);
@@ -665,7 +663,7 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
m_cassette->set_interface("to_cass");
/* floppy */
- MCFG_DEVICE_ADD("mc6843", MC6843, 16_MHz_XTAL / 16 / 2)
+ MC6843(config, m_mc6843, 16_MHz_XTAL / 16 / 2);
LEGACY_FLOPPY(config, m_floppy_image[0], 0, &thomson_floppy_interface);
m_floppy_image[0]->out_idx_cb().set(FUNC(thomson_state::fdc_index_0_w));
@@ -819,7 +817,7 @@ In arabic mode, Ctrl+E / Ctrl+X to start / stop typing in-line latin.
**********************************************************************/
-void thomson_state::to770(address_map &map)
+void thomson_state::to770_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to7_cartridge_w)); /* 4 * 16 KB */
@@ -924,13 +922,13 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::to770)
+void thomson_state::to770(machine_config &config)
+{
to7(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, to770 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to770 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( to770)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to770_map);
m_pia_sys->readpa_handler().set(FUNC(thomson_state::to770_sys_porta_in));
m_pia_sys->readpb_handler().set_constant(0);
@@ -944,7 +942,7 @@ MACHINE_CONFIG_START(thomson_state::to770)
SOFTWARE_LIST(config, "t770_cart_list").set_original("to770_cart");
SOFTWARE_LIST(config.replace(), "to7_cart_list").set_compatible("to7_cart");
-MACHINE_CONFIG_END
+}
void thomson_state::to770a(machine_config &config)
{
@@ -1017,7 +1015,7 @@ Differences include:
**********************************************************************/
-void thomson_state::mo5(address_map &map)
+void thomson_state::mo5_map(address_map &map)
{
map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w));
@@ -1118,8 +1116,7 @@ MACHINE_CONFIG_START(thomson_state::mo5)
MCFG_MACHINE_START_OVERRIDE( thomson_state, mo5 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo5 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( mo5)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::mo5_map);
m_cassette->set_formats(mo5_cassette_formats);
m_cassette->set_interface("mo_cass");
@@ -1153,9 +1150,10 @@ MACHINE_CONFIG_START(thomson_state::mo5)
m_ram->set_default_size("112K");
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(thomson_state::mo5e)
+void thomson_state::mo5e(machine_config &config)
+{
mo5(config);
-MACHINE_CONFIG_END
+}
COMP( 1984, mo5, 0, 0, mo5, mo5, thomson_state, empty_init, "Thomson", "MO5", 0 )
@@ -1235,7 +1233,7 @@ It was replaced quickly with the improved TO9+.
**********************************************************************/
-void thomson_state::to9(address_map &map)
+void thomson_state::to9_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to9_cartridge_w));/* 4 * 16 KB */
@@ -1470,14 +1468,14 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::to9)
+void thomson_state::to9(machine_config &config)
+{
to7(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, to9 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to9 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( to9)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to9_map);
m_pia_sys->readpa_handler().set(FUNC(thomson_state::to9_sys_porta_in));
m_pia_sys->readpb_handler().set_constant(0);
@@ -1493,7 +1491,7 @@ MACHINE_CONFIG_START(thomson_state::to9)
/* internal ram */
m_ram->set_default_size("192K").set_extra_options("128K");
-MACHINE_CONFIG_END
+}
COMP( 1985, to9, 0, 0, to9, to9, thomson_state, empty_init, "Thomson", "TO9", MACHINE_IMPERFECT_COLORS )
@@ -1562,7 +1560,7 @@ The TO8D is simply a TO8 with an integrated 3"1/2 floppy drive.
**********************************************************************/
-void thomson_state::to8(address_map &map)
+void thomson_state::to8_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to8_cartridge_w)); /* 4 * 16 KB */
@@ -1691,15 +1689,15 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::to8)
+void thomson_state::to8(machine_config &config)
+{
to7(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, to8 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to8 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( to8)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to8_map);
- //MCFG_DEVICE_ADD("kbdmcu", MC6804, 11_MHz_XTAL)
+ //MC6804(config, "kbdmcu", 11_MHz_XTAL);
m_pia_sys->readpa_handler().set(FUNC(thomson_state::to8_sys_porta_in));
m_pia_sys->readpb_handler().set_constant(0);
@@ -1722,7 +1720,7 @@ MACHINE_CONFIG_START(thomson_state::to8)
SOFTWARE_LIST(config, "to8_qd_list").set_original("to8_qd");
SOFTWARE_LIST(config.replace(), "to7_cass_list").set_compatible("to7_cass");
SOFTWARE_LIST(config.replace(), "to7_qd_list").set_compatible("to7_qd");
-MACHINE_CONFIG_END
+}
void thomson_state::to8d(machine_config &config)
{
@@ -1772,7 +1770,7 @@ The differences with the TO8 are:
**********************************************************************/
-void thomson_state::to9p(address_map &map)
+void thomson_state::to9p_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to8_cartridge_w)); /* 4 * 16 KB */
@@ -1853,13 +1851,13 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::to9p)
+void thomson_state::to9p(machine_config &config)
+{
to7(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, to9p )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to9p )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( to9p)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to9p_map);
m_pia_sys->readpa_handler().set(FUNC(thomson_state::to8_sys_porta_in));
m_pia_sys->readpb_handler().set_constant(0);
@@ -1883,7 +1881,7 @@ MACHINE_CONFIG_START(thomson_state::to9p)
SOFTWARE_LIST(config, "to8_qd_list").set_original("to8_qd");
SOFTWARE_LIST(config.replace(), "to7_cass_list").set_compatible("to7_cass");
SOFTWARE_LIST(config.replace(), "to7_qd_list").set_compatible("to7_qd");
-MACHINE_CONFIG_END
+}
COMP( 1986, to9p, 0, 0, to9p, to9p, thomson_state, empty_init, "Thomson", "TO9+", 0 )
@@ -1947,7 +1945,7 @@ a PC XT.
**********************************************************************/
-void thomson_state::mo6(address_map &map)
+void thomson_state::mo6_map(address_map &map)
{
map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w));
@@ -2201,8 +2199,7 @@ MACHINE_CONFIG_START(thomson_state::mo6)
MCFG_MACHINE_START_OVERRIDE( thomson_state, mo6 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo6 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( mo6)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::mo6_map);
m_cassette->set_formats(mo5_cassette_formats);
m_cassette->set_interface("mo_cass");
@@ -2297,7 +2294,7 @@ Here are the differences between the MO6 and MO5NR:
**********************************************************************/
-void thomson_state::mo5nr(address_map &map)
+void thomson_state::mo5nr_map(address_map &map)
{
map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w));
@@ -2467,8 +2464,7 @@ MACHINE_CONFIG_START(thomson_state::mo5nr)
MCFG_MACHINE_START_OVERRIDE( thomson_state, mo5nr )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo5nr )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( mo5nr)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::mo5nr_map);
m_cassette->set_formats(mo5_cassette_formats);
m_cassette->set_interface("mo_cass");
diff --git a/src/mame/drivers/thoop2.cpp b/src/mame/drivers/thoop2.cpp
index 626b61066ed..b3f201a1ec2 100644
--- a/src/mame/drivers/thoop2.cpp
+++ b/src/mame/drivers/thoop2.cpp
@@ -263,15 +263,15 @@ static GFXDECODE_START( gfx_thoop2 )
GFXDECODE_END
-MACHINE_CONFIG_START(thoop2_state::thoop2)
-
+void thoop2_state::thoop2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,XTAL(24'000'000) / 2) // 12MHz verified
- MCFG_DEVICE_PROGRAM_MAP(thoop2_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", thoop2_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2); // 12MHz verified
+ m_maincpu->set_addrmap(AS_PROGRAM, &thoop2_state::thoop2_map);
+ m_maincpu->set_vblank_int("screen", FUNC(thoop2_state::irq6_line_hold));
- MCFG_DEVICE_ADD("gaelco_ds5002fp", GAELCO_DS5002FP, XTAL(24'000'000) / 2) // 12MHz verified
- MCFG_DEVICE_ADDRESS_MAP(0, mcu_hostmem_map)
+ gaelco_ds5002fp_device &ds5002fp(GAELCO_DS5002FP(config, "gaelco_ds5002fp", XTAL(24'000'000) / 2)); // 12MHz verified
+ ds5002fp.set_addrmap(0, &thoop2_state::mcu_hostmem_map);
LS259(config, m_outlatch);
m_outlatch->q_out_cb<0>().set(FUNC(thoop2_state::coin1_lockout_w));
@@ -284,13 +284,13 @@ MACHINE_CONFIG_START(thoop2_state::thoop2)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(59.24)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*16, 32*16)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 16, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(thoop2_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(59.24);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*16, 32*16);
+ screen.set_visarea(0, 320-1, 16, 256-1);
+ screen.set_screen_update(FUNC(thoop2_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_thoop2);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024);
@@ -298,10 +298,10 @@ MACHINE_CONFIG_START(thoop2_state::thoop2)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(1'000'000), okim6295_device::PIN7_HIGH) // 1MHz resonator - pin 7 not connected
- MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ okim6295_device &oki(OKIM6295(config, "oki", XTAL(1'000'000), okim6295_device::PIN7_HIGH)); // 1MHz resonator - pin 7 not connected
+ oki.set_addrmap(0, &thoop2_state::oki_map);
+ oki.add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp
index 102c9292f17..53403e0eaa3 100644
--- a/src/mame/drivers/thunderj.cpp
+++ b/src/mame/drivers/thunderj.cpp
@@ -241,14 +241,14 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(thunderj_state::thunderj)
-
+void thunderj_state::thunderj(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M68000(config, m_maincpu, ATARI_CLOCK_14MHz/2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &thunderj_state::main_map);
- MCFG_DEVICE_ADD("extra", M68000, ATARI_CLOCK_14MHz/2)
- MCFG_DEVICE_PROGRAM_MAP(extra_map)
+ M68000(config, m_extra, ATARI_CLOCK_14MHz/2);
+ m_extra->set_addrmap(AS_PROGRAM, &thunderj_state::extra_map);
EEPROM_2816(config, "eeprom").lock_after_write(true);
@@ -268,13 +268,13 @@ MACHINE_CONFIG_START(thunderj_state::thunderj)
TILEMAP(config, "vad:alpha", "gfxdecode", 2, 8, 8, TILEMAP_SCAN_ROWS, 64, 32, 0).set_info_callback(DEVICE_SELF_OWNER, FUNC(thunderj_state::get_alpha_tile_info));
ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, thunderj_state::s_mob_config).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 a VAD chip to generate video signals */
- MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240)
- MCFG_SCREEN_UPDATE_DRIVER(thunderj_state, screen_update_thunderj)
- MCFG_SCREEN_PALETTE("palette")
+ m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240);
+ m_screen->set_screen_update(FUNC(thunderj_state::screen_update_thunderj));
+ m_screen->set_palette("palette");
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -283,7 +283,7 @@ MACHINE_CONFIG_START(thunderj_state::thunderj)
m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_6);
m_jsa->test_read_cb().set_ioport("260012").bit(1);
m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/ti74.cpp b/src/mame/drivers/ti74.cpp
index ed14d5ec522..99c85670ae0 100644
--- a/src/mame/drivers/ti74.cpp
+++ b/src/mame/drivers/ti74.cpp
@@ -530,14 +530,15 @@ MACHINE_CONFIG_START(ti74_state::ti74)
NVRAM(config, "sysram.ic3", 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_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(0, 6*31, 0, 9*1+1);
+ screen.set_screen_update("hd44780", FUNC(hd44780_device::screen_update));
+ screen.set_palette("palette");
+
config.set_default_layout(layout_ti74);
- MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
- MCFG_SCREEN_PALETTE("palette")
PALETTE(config, "palette", FUNC(ti74_state::ti74_palette), 3);
@@ -565,14 +566,15 @@ MACHINE_CONFIG_START(ti74_state::ti95)
NVRAM(config, "sysram.ic3", 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(200, 20)
- MCFG_SCREEN_VISIBLE_AREA(0, 200-1, 0, 20-1)
+ 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(200, 20);
+ screen.set_visarea(0, 200-1, 0, 20-1);
+ screen.set_screen_update("hd44780", FUNC(hd44780_device::screen_update));
+ screen.set_palette("palette");
+
config.set_default_layout(layout_ti95);
- MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
- MCFG_SCREEN_PALETTE("palette")
PALETTE(config, "palette", FUNC(ti74_state::ti74_palette), 3);
diff --git a/src/mame/drivers/ti85.cpp b/src/mame/drivers/ti85.cpp
index afaf512e3af..e4a049b11a5 100644
--- a/src/mame/drivers/ti85.cpp
+++ b/src/mame/drivers/ti85.cpp
@@ -374,10 +374,10 @@ void ti85_state::ti83p_banked_mem(address_map &map)
void ti85_state::ti83p_asic_mem(address_map &map)
{
- map(0x0000, 0x3fff).rw(m_membank1, FUNC(address_map_bank_device::read8), FUNC(address_map_bank_device::write8));
- map(0x4000, 0x7fff).w(m_membank2, FUNC(address_map_bank_device::write8)).r(FUNC(ti85_state::ti83p_membank2_r));
- map(0x8000, 0xbfff).w(m_membank3, FUNC(address_map_bank_device::write8)).r(FUNC(ti85_state::ti83p_membank3_r));
- map(0xc000, 0xffff).rw(m_membank4, FUNC(address_map_bank_device::read8), FUNC(address_map_bank_device::write8));
+ map(0x0000, 0x3fff).rw(m_membank[0], FUNC(address_map_bank_device::read8), FUNC(address_map_bank_device::write8));
+ map(0x4000, 0x7fff).w(m_membank[1], FUNC(address_map_bank_device::write8)).r(FUNC(ti85_state::ti83p_membank2_r));
+ map(0x8000, 0xbfff).w(m_membank[2], FUNC(address_map_bank_device::write8)).r(FUNC(ti85_state::ti83p_membank3_r));
+ map(0xc000, 0xffff).rw(m_membank[3], FUNC(address_map_bank_device::read8), FUNC(address_map_bank_device::write8));
}
/* keyboard input */
@@ -578,97 +578,94 @@ static INPUT_PORTS_START (ti83)
INPUT_PORTS_END
/* machine definition */
-MACHINE_CONFIG_START(ti85_state::ti81)
+void ti85_state::ti81(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 2000000) /* 2 MHz */
- MCFG_DEVICE_PROGRAM_MAP(ti81_mem)
- MCFG_DEVICE_IO_MAP(ti81_io)
+ Z80(config, m_maincpu, 2000000); /* 2 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &ti85_state::ti81_mem);
+ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti81_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(0)
- MCFG_SCREEN_SIZE(96, 64)
- MCFG_SCREEN_VISIBLE_AREA(0, 96-1, 0, 64-1)
- MCFG_SCREEN_UPDATE_DRIVER(ti85_state, screen_update_ti85)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(0);
+ screen.set_size(96, 64);
+ screen.set_visarea(0, 96-1, 0, 64-1);
+ screen.set_screen_update(FUNC(ti85_state::screen_update_ti85));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(ti85_state::ti85_palette), 224, 224);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ti85_state::ti85)
+void ti85_state::ti85(machine_config &config)
+{
ti81(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(6000000) /* 6 MHz */
- MCFG_DEVICE_IO_MAP(ti85_io)
+ m_maincpu->set_clock(6000000); /* 6 MHz */
+ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti85_io);
MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti85 )
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_SIZE(128, 64)
- MCFG_SCREEN_VISIBLE_AREA(0, 128-1, 0, 64-1)
+ subdevice<screen_device>("screen")->set_size(128, 64);
+ subdevice<screen_device>("screen")->set_visarea(0, 128-1, 0, 64-1);
- MCFG_DEVICE_ADD("linkport", TI8X_LINK_PORT, default_ti8x_link_devices, nullptr)
-MACHINE_CONFIG_END
+ TI8X_LINK_PORT(config, m_link_port, default_ti8x_link_devices, nullptr);
+}
MACHINE_CONFIG_START(ti85_state::ti85d)
ti85(config);
MCFG_SNAPSHOT_ADD("snapshot", ti85_state, ti8x, "sav")
- //MCFG_TI85SERIAL_ADD( "tiserial" )
+ //TI85SERIAL(config, "tiserial");
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(ti85_state::ti82)
+void ti85_state::ti82(machine_config &config)
+{
ti81(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(6000000) /* 6 MHz */
- MCFG_DEVICE_IO_MAP(ti82_io)
+ m_maincpu->set_clock(6000000); /* 6 MHz */
+ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti82_io);
MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti85 )
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DEVICE("t6a04", t6a04_device, screen_update)
+ subdevice<screen_device>("screen")->set_screen_update("t6a04", FUNC(t6a04_device::screen_update));
subdevice<palette_device>("palette")->set_entries(2).set_init(FUNC(ti85_state::ti82_palette));
T6A04(config, "t6a04", 0).set_size(96, 64);
- MCFG_DEVICE_ADD("linkport", TI8X_LINK_PORT, default_ti8x_link_devices, nullptr)
-MACHINE_CONFIG_END
+ TI8X_LINK_PORT(config, m_link_port, default_ti8x_link_devices, nullptr);
+}
-MACHINE_CONFIG_START(ti85_state::ti81v2)
+void ti85_state::ti81v2(machine_config &config)
+{
ti82(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(ti81v2_io)
+ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti81v2_io);
config.device_remove("linkport");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ti85_state::ti83)
+void ti85_state::ti83(machine_config &config)
+{
ti81(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(6000000) /* 6 MHz */
- MCFG_DEVICE_IO_MAP(ti83_io)
+ m_maincpu->set_clock(6000000); /* 6 MHz */
+ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti83_io);
MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti85 )
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DEVICE("t6a04", t6a04_device, screen_update)
+ subdevice<screen_device>("screen")->set_screen_update("t6a04", FUNC(t6a04_device::screen_update));
subdevice<palette_device>("palette")->set_entries(2).set_init(FUNC(ti85_state::ti82_palette));
T6A04(config, "t6a04", 0).set_size(96, 64);
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(ti85_state::ti86)
ti85(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ti86_mem)
- MCFG_DEVICE_IO_MAP(ti86_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &ti85_state::ti86_mem);
+ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti86_io);
MCFG_MACHINE_START_OVERRIDE(ti85_state, ti86 )
MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti85 )
@@ -676,77 +673,70 @@ MACHINE_CONFIG_START(ti85_state::ti86)
MCFG_SNAPSHOT_ADD("snapshot", ti85_state, ti8x, "sav")
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(ti85_state::ti83p)
+void ti85_state::ti83p(machine_config &config)
+{
ti81(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(6000000) /* 8 MHz running at 6 MHz */
- MCFG_DEVICE_PROGRAM_MAP(ti83p_asic_mem)
- MCFG_DEVICE_IO_MAP(ti83p_io)
+ m_maincpu->set_clock(6000000); /* 8 MHz running at 6 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &ti85_state::ti83p_asic_mem);
+ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti83p_io);
MCFG_MACHINE_START_OVERRIDE(ti85_state, ti83p )
MCFG_MACHINE_RESET_OVERRIDE(ti85_state, ti83p )
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DEVICE("t6a04", t6a04_device, screen_update)
+ subdevice<screen_device>("screen")->set_screen_update("t6a04", FUNC(t6a04_device::screen_update));
subdevice<palette_device>("palette")->set_entries(2).set_init(FUNC(ti85_state::ti82_palette));
- ADDRESS_MAP_BANK(config, "membank1").set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
- ADDRESS_MAP_BANK(config, "membank2").set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
- ADDRESS_MAP_BANK(config, "membank3").set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
- ADDRESS_MAP_BANK(config, "membank4").set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
+ ADDRESS_MAP_BANK(config, m_membank[0]).set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
+ ADDRESS_MAP_BANK(config, m_membank[1]).set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
+ ADDRESS_MAP_BANK(config, m_membank[2]).set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
+ ADDRESS_MAP_BANK(config, m_membank[3]).set_map(&ti85_state::ti83p_banked_mem).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
T6A04(config, "t6a04", 0).set_size(96, 64);
- MCFG_DEVICE_ADD("linkport", TI8X_LINK_PORT, default_ti8x_link_devices, nullptr)
+ TI8X_LINK_PORT(config, m_link_port, default_ti8x_link_devices, nullptr);
- AMD_29F400T(config, "flash");
-MACHINE_CONFIG_END
+ AMD_29F400T(config, m_flash);
+}
-MACHINE_CONFIG_START(ti85_state::ti83pse)
+void ti85_state::ti83pse(machine_config &config)
+{
ti83p(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK( 15000000)
- MCFG_DEVICE_IO_MAP(ti83pse_io)
+ m_maincpu->set_clock(15000000);
+ m_maincpu->set_addrmap(AS_IO, &ti85_state::ti83pse_io);
- MCFG_DEVICE_MODIFY("membank1")
- MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
+ m_membank[0]->set_map(&ti85_state::ti83pse_banked_mem);
- MCFG_DEVICE_MODIFY("membank2")
- MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
+ m_membank[1]->set_map(&ti85_state::ti83pse_banked_mem);
- MCFG_DEVICE_MODIFY("membank3")
- MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
+ m_membank[2]->set_map(&ti85_state::ti83pse_banked_mem);
- MCFG_DEVICE_MODIFY("membank4")
- MCFG_DEVICE_PROGRAM_MAP(ti83pse_banked_mem)
+ m_membank[3]->set_map(&ti85_state::ti83pse_banked_mem);
MCFG_MACHINE_START_OVERRIDE(ti85_state, ti83pse )
- MCFG_DEVICE_REPLACE("flash", FUJITSU_29F160T, 0)
-MACHINE_CONFIG_END
+ FUJITSU_29F160T(config.replace(), m_flash, 0);
+}
-MACHINE_CONFIG_START(ti85_state::ti84p)
+void ti85_state::ti84p(machine_config &config)
+{
ti83pse(config);
- MCFG_DEVICE_MODIFY("membank1")
- MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
+ m_membank[0]->set_map(&ti85_state::ti84p_banked_mem);
- MCFG_DEVICE_MODIFY("membank2")
- MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
+ m_membank[1]->set_map(&ti85_state::ti84p_banked_mem);
- MCFG_DEVICE_MODIFY("membank3")
- MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
+ m_membank[2]->set_map(&ti85_state::ti84p_banked_mem);
- MCFG_DEVICE_MODIFY("membank4")
- MCFG_DEVICE_PROGRAM_MAP(ti84p_banked_mem)
+ m_membank[3]->set_map(&ti85_state::ti84p_banked_mem);
MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84p )
- MCFG_DEVICE_REPLACE("flash", AMD_29F800T , 0)
-MACHINE_CONFIG_END
+ AMD_29F800T(config.replace(), m_flash, 0);
+}
-MACHINE_CONFIG_START(ti85_state::ti84pse)
+void ti85_state::ti84pse(machine_config &config)
+{
ti83pse(config);
MCFG_MACHINE_START_OVERRIDE(ti85_state, ti84pse )
-MACHINE_CONFIG_END
+}
void ti85_state::ti73(machine_config &config)
{
diff --git a/src/mame/drivers/ti89.cpp b/src/mame/drivers/ti89.cpp
index af68b2ff668..8724747af2a 100644
--- a/src/mame/drivers/ti89.cpp
+++ b/src/mame/drivers/ti89.cpp
@@ -519,60 +519,63 @@ void ti68k_state::ti68k_palette(palette_device &palette) const
palette.set_pen_color(1, rgb_t(92, 83, 88));
}
-MACHINE_CONFIG_START(ti68k_state::ti89)
+void ti68k_state::ti89(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(10'000'000))
- MCFG_DEVICE_PROGRAM_MAP(ti89_mem)
+ M68000(config, m_maincpu, XTAL(10'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &ti68k_state::ti89_mem);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", LCD)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(ti68k_state, screen_update)
- MCFG_SCREEN_SIZE(240, 128)
- MCFG_SCREEN_VISIBLE_AREA(0, 160-1, 0, 100-1)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(FUNC(ti68k_state::screen_update));
+ screen.set_size(240, 128);
+ screen.set_visarea(0, 160-1, 0, 100-1);
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(ti68k_state::ti68k_palette), 2);
SHARP_UNK128MBIT(config, "flash"); //should be LH28F320 for ti89t and v200 and LH28F160S3T for other models
TIMER(config, "ti68k_timer").configure_periodic(FUNC(ti68k_state::ti68k_timer_callback), attotime::from_hz(1<<14));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ti68k_state::ti92)
+void ti68k_state::ti92(machine_config &config)
+{
ti89(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ti92_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &ti68k_state::ti92_mem);
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 240-1, 0, 128-1)
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_visarea(0, 240-1, 0, 128-1);
+}
-MACHINE_CONFIG_START(ti68k_state::ti92p)
+void ti68k_state::ti92p(machine_config &config)
+{
ti92(config);
- MCFG_DEVICE_REPLACE("maincpu", M68000, XTAL(12'000'000))
- MCFG_DEVICE_PROGRAM_MAP(ti92p_mem)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(XTAL(12'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &ti68k_state::ti92p_mem);
+}
-MACHINE_CONFIG_START(ti68k_state::v200)
+void ti68k_state::v200(machine_config &config)
+{
ti92(config);
- MCFG_DEVICE_REPLACE("maincpu", M68000, XTAL(12'000'000))
- MCFG_DEVICE_PROGRAM_MAP(v200_mem)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(XTAL(12'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &ti68k_state::v200_mem);
+}
-MACHINE_CONFIG_START(ti68k_state::ti89t)
+void ti68k_state::ti89t(machine_config &config)
+{
ti89(config);
- MCFG_DEVICE_REPLACE("maincpu", M68000, XTAL(16'000'000))
- MCFG_DEVICE_PROGRAM_MAP(ti89t_mem)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(XTAL(16'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &ti68k_state::ti89t_mem);
+}
/* ROM definition */
diff --git a/src/mame/drivers/ti990_4.cpp b/src/mame/drivers/ti990_4.cpp
index 1592b1ab93a..00170f41f00 100644
--- a/src/mame/drivers/ti990_4.cpp
+++ b/src/mame/drivers/ti990_4.cpp
@@ -291,7 +291,8 @@ void ti990_4_state::init_ti990_4()
m_nmi_timer = timer_alloc(NMI_TIMER_ID);
}
-MACHINE_CONFIG_START(ti990_4_state::ti990_4)
+void ti990_4_state::ti990_4(machine_config &config)
+{
/* basic machine hardware */
/* TMS9900 CPU @ 3.0(???) MHz */
TMS9900(config, m_maincpu, 3000000);
@@ -311,9 +312,10 @@ MACHINE_CONFIG_START(ti990_4_state::ti990_4)
TI99X_FD800(config, "fd800", 0).int_cb().set(FUNC(ti990_4_state::fd_interrupt));
// TODO: Add floppy drives
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ti990_4_state::ti990_4v)
+void ti990_4_state::ti990_4v(machine_config &config)
+{
/* basic machine hardware */
/* TMS9900 CPU @ 3.0(???) MHz */
TMS9900(config, m_maincpu, 3000000);
@@ -331,7 +333,7 @@ MACHINE_CONFIG_START(ti990_4_state::ti990_4v)
TI99X_FD800(config, "fd800", 0).int_cb().set(FUNC(ti990_4_state::fd_interrupt));
// TODO: Add floppy drives
-MACHINE_CONFIG_END
+}
/*
ROM loading
diff --git a/src/mame/drivers/tiamc1.cpp b/src/mame/drivers/tiamc1.cpp
index 254b127ac1c..2c54dd55b6a 100644
--- a/src/mame/drivers/tiamc1.cpp
+++ b/src/mame/drivers/tiamc1.cpp
@@ -327,11 +327,12 @@ static GFXDECODE_START( gfx_kot )
GFXDECODE_END
-MACHINE_CONFIG_START(tiamc1_state::tiamc1)
+void tiamc1_state::tiamc1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(tiamc1_map)
- MCFG_DEVICE_IO_MAP(tiamc1_io_map)
+ I8080(config, m_maincpu, CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tiamc1_state::tiamc1_map);
+ m_maincpu->set_addrmap(AS_IO, &tiamc1_state::tiamc1_io_map);
i8255_device &ppi(I8255A(config, "kr580vv55a")); /* soviet clone of i8255 */
ppi.in_pa_callback().set_ioport("IN0");
@@ -340,10 +341,10 @@ MACHINE_CONFIG_START(tiamc1_state::tiamc1)
ppi.out_pc_callback().set(FUNC(tiamc1_state::tiamc1_control_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 336, 0, 256, 312, 0, 256) // pixel clock and htotal comes from docs/schematics, the rest is guess (determined by undumped PROM)
- MCFG_SCREEN_UPDATE_DRIVER(tiamc1_state, screen_update_tiamc1)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(PIXEL_CLOCK, 336, 0, 256, 312, 0, 256); // pixel clock and htotal comes from docs/schematics, the rest is guess (determined by undumped PROM)
+ screen.set_screen_update(FUNC(tiamc1_state::screen_update_tiamc1));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tiamc1);
PALETTE(config, m_palette, FUNC(tiamc1_state::tiamc1_palette), 32);
@@ -351,20 +352,18 @@ MACHINE_CONFIG_START(tiamc1_state::tiamc1)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("2x8253", TIAMC1, SND_CLOCK)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ TIAMC1(config, "2x8253", SND_CLOCK).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
-MACHINE_CONFIG_START(tiamc1_state::kot)
+void tiamc1_state::kot(machine_config &config)
+{
tiamc1(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(kotrybolov_map)
- MCFG_DEVICE_IO_MAP(kotrybolov_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &tiamc1_state::kotrybolov_map);
+ m_maincpu->set_addrmap(AS_IO, &tiamc1_state::kotrybolov_io_map);
- MCFG_SCREEN_MODIFY("screen")
MCFG_VIDEO_START_OVERRIDE(tiamc1_state, kot)
- MCFG_SCREEN_UPDATE_DRIVER(tiamc1_state, screen_update_kot)
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(tiamc1_state::screen_update_kot));
m_gfxdecode->set_info(gfx_kot);
@@ -375,7 +374,7 @@ MACHINE_CONFIG_START(tiamc1_state::kot)
pit8253.set_clk<0>(PIXEL_CLOCK / 4);
pit8253.set_clk<2>(SND_CLOCK); // guess
pit8253.out_handler<2>().set(FUNC(tiamc1_state::pit8253_2_w));
-MACHINE_CONFIG_END
+}
ROM_START( konek )
diff --git a/src/mame/drivers/ticalc1x.cpp b/src/mame/drivers/ticalc1x.cpp
index bf3942b485d..d2db7c4c78d 100644
--- a/src/mame/drivers/ticalc1x.cpp
+++ b/src/mame/drivers/ticalc1x.cpp
@@ -187,8 +187,8 @@ static INPUT_PORTS_START( cmulti8 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
-MACHINE_CONFIG_START(cmulti8_state::cmulti8)
-
+void cmulti8_state::cmulti8(machine_config &config)
+{
/* basic machine hardware */
TMS1070(config, m_maincpu, 250000); // approximation - RC osc. R=56K, C=68pf
m_maincpu->k().set(FUNC(cmulti8_state::read_k));
@@ -199,7 +199,7 @@ MACHINE_CONFIG_START(cmulti8_state::cmulti8)
config.set_default_layout(layout_cmulti8);
/* no sound! */
-MACHINE_CONFIG_END
+}
@@ -404,8 +404,8 @@ static INPUT_PORTS_START( tisr16ii )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9")
INPUT_PORTS_END
-MACHINE_CONFIG_START(tisr16_state::tisr16)
-
+void tisr16_state::tisr16(machine_config &config)
+{
/* basic machine hardware */
TMS1000(config, m_maincpu, 300000); // approximation - RC osc. R=43K, C=68pf (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf, same freq)
m_maincpu->k().set(FUNC(tisr16_state::read_k));
@@ -416,7 +416,7 @@ MACHINE_CONFIG_START(tisr16_state::tisr16)
config.set_default_layout(layout_tisr16);
/* no sound! */
-MACHINE_CONFIG_END
+}
@@ -546,8 +546,8 @@ static INPUT_PORTS_START( ti1270 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("+/-")
INPUT_PORTS_END
-MACHINE_CONFIG_START(ti1250_state::ti1250)
-
+void ti1250_state::ti1250(machine_config &config)
+{
/* basic machine hardware */
TMS0950(config, m_maincpu, 200000); // approximation - RC osc. R=68K, C=68pf
m_maincpu->k().set(FUNC(ti1250_state::read_k));
@@ -558,9 +558,10 @@ MACHINE_CONFIG_START(ti1250_state::ti1250)
config.set_default_layout(layout_ti1250);
/* no sound! */
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(ti1250_state::ti1270)
+void ti1250_state::ti1270(machine_config &config)
+{
ti1250(config);
/* basic machine hardware */
@@ -570,7 +571,7 @@ MACHINE_CONFIG_START(ti1250_state::ti1270)
m_maincpu->r().set(FUNC(ti1250_state::write_r));
config.set_default_layout(layout_ti1270);
-MACHINE_CONFIG_END
+}
@@ -676,8 +677,8 @@ static INPUT_PORTS_START( ti25503 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("1/x")
INPUT_PORTS_END
-MACHINE_CONFIG_START(ti25503_state::ti25503)
-
+void ti25503_state::ti25503(machine_config &config)
+{
/* basic machine hardware */
TMS1000(config, m_maincpu, 250000); // approximation
m_maincpu->k().set(FUNC(ti25503_state::read_k));
@@ -688,7 +689,7 @@ MACHINE_CONFIG_START(ti25503_state::ti25503)
config.set_default_layout(layout_ti25503);
/* no sound! */
-MACHINE_CONFIG_END
+}
@@ -779,8 +780,8 @@ static INPUT_PORTS_START( ti1000 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("=")
INPUT_PORTS_END
-MACHINE_CONFIG_START(ti1000_state::ti1000)
-
+void ti1000_state::ti1000(machine_config &config)
+{
/* basic machine hardware */
TMS1990(config, m_maincpu, 250000); // approximation
m_maincpu->k().set(FUNC(ti1000_state::read_k));
@@ -791,7 +792,7 @@ MACHINE_CONFIG_START(ti1000_state::ti1000)
config.set_default_layout(layout_ti1270);
/* no sound! */
-MACHINE_CONFIG_END
+}
@@ -881,8 +882,8 @@ static INPUT_PORTS_START( wizatron )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE)
INPUT_PORTS_END
-MACHINE_CONFIG_START(wizatron_state::wizatron)
-
+void wizatron_state::wizatron(machine_config &config)
+{
/* basic machine hardware */
TMS0970(config, m_maincpu, 250000); // approximation
m_maincpu->k().set(FUNC(wizatron_state::read_k));
@@ -893,7 +894,7 @@ MACHINE_CONFIG_START(wizatron_state::wizatron)
config.set_default_layout(layout_wizatron);
/* no sound! */
-MACHINE_CONFIG_END
+}
@@ -958,8 +959,8 @@ static INPUT_PORTS_START( lilprof )
PORT_CONFSETTING( 0x08, "4" )
INPUT_PORTS_END
-MACHINE_CONFIG_START(lilprof_state::lilprof)
-
+void lilprof_state::lilprof(machine_config &config)
+{
/* basic machine hardware */
TMS0970(config, m_maincpu, 250000); // approximation
m_maincpu->k().set(FUNC(lilprof_state::read_k));
@@ -970,7 +971,7 @@ MACHINE_CONFIG_START(lilprof_state::lilprof)
config.set_default_layout(layout_wizatron);
/* no sound! */
-MACHINE_CONFIG_END
+}
@@ -1071,8 +1072,8 @@ static INPUT_PORTS_START( lilprof78 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+")
INPUT_PORTS_END
-MACHINE_CONFIG_START(lilprof78_state::lilprof78)
-
+void lilprof78_state::lilprof78(machine_config &config)
+{
/* basic machine hardware */
TMS1990(config, m_maincpu, 250000); // approximation
m_maincpu->k().set(FUNC(lilprof78_state::read_k));
@@ -1083,7 +1084,7 @@ MACHINE_CONFIG_START(lilprof78_state::lilprof78)
config.set_default_layout(layout_wizatron);
/* no sound! */
-MACHINE_CONFIG_END
+}
@@ -1185,8 +1186,8 @@ static INPUT_PORTS_START( dataman )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("Electro Flash")
INPUT_PORTS_END
-MACHINE_CONFIG_START(dataman_state::dataman)
-
+void dataman_state::dataman(machine_config &config)
+{
/* basic machine hardware */
TMS1980(config, m_maincpu, 300000); // patent says 300kHz
m_maincpu->k().set(FUNC(dataman_state::read_k));
@@ -1198,7 +1199,7 @@ MACHINE_CONFIG_START(dataman_state::dataman)
config.set_default_layout(layout_dataman);
/* no sound! */
-MACHINE_CONFIG_END
+}
@@ -1255,8 +1256,8 @@ static INPUT_PORTS_START( mathmarv )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("Flash")
INPUT_PORTS_END
-MACHINE_CONFIG_START(mathmarv_state::mathmarv)
-
+void mathmarv_state::mathmarv(machine_config &config)
+{
/* basic machine hardware */
TMS1980(config, m_maincpu, 300000); // assume same as dataman
m_maincpu->k().set(FUNC(dataman_state::read_k));
@@ -1269,9 +1270,8 @@ MACHINE_CONFIG_START(mathmarv_state::mathmarv)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
+}
@@ -1518,8 +1518,8 @@ static INPUT_PORTS_START( tibusan )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false)
INPUT_PORTS_END
-MACHINE_CONFIG_START(ti30_state::ti30)
-
+void ti30_state::ti30(machine_config &config)
+{
/* basic machine hardware */
TMS0980(config, m_maincpu, 400000); // guessed
m_maincpu->k().set(FUNC(ti30_state::read_k));
@@ -1531,7 +1531,7 @@ MACHINE_CONFIG_START(ti30_state::ti30)
config.set_default_layout(layout_ti30);
/* no sound! */
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/tickee.cpp b/src/mame/drivers/tickee.cpp
index 255f7274053..48698080c09 100644
--- a/src/mame/drivers/tickee.cpp
+++ b/src/mame/drivers/tickee.cpp
@@ -754,8 +754,8 @@ INPUT_PORTS_END
*
*************************************/
-MACHINE_CONFIG_START(tickee_state::tickee)
-
+void tickee_state::tickee(machine_config &config)
+{
/* basic machine hardware */
TMS34010(config, m_maincpu, XTAL(40'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &tickee_state::tickee_map);
@@ -775,9 +775,9 @@ MACHINE_CONFIG_START(tickee_state::tickee)
MCFG_VIDEO_START_OVERRIDE(tickee_state,tickee)
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200)
- MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_rgb32)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200);
+ m_screen->set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_rgb32));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -791,20 +791,20 @@ MACHINE_CONFIG_START(tickee_state::tickee)
ym2.port_a_read_callback().set_ioport("IN0");
ym2.port_b_read_callback().set_ioport("IN2");
ym2.add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tickee_state::ghoshunt)
+void tickee_state::ghoshunt(machine_config &config)
+{
tickee(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ghoshunt_map)
-MACHINE_CONFIG_END
-
+ m_maincpu->set_addrmap(AS_PROGRAM, &tickee_state::ghoshunt_map);
+}
-MACHINE_CONFIG_START(tickee_state::rapidfir)
+void tickee_state::rapidfir(machine_config &config)
+{
/* basic machine hardware */
TMS34010(config, m_maincpu, XTAL(50'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &tickee_state::rapidfir_map);
@@ -825,20 +825,19 @@ MACHINE_CONFIG_START(tickee_state::rapidfir)
MCFG_VIDEO_START_OVERRIDE(tickee_state,tickee)
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200)
- MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_rgb32)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200);
+ m_screen->set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_rgb32));
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, OKI_CLOCK, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
-MACHINE_CONFIG_END
-
+ OKIM6295(config, m_oki, OKI_CLOCK, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00);
+}
-MACHINE_CONFIG_START(tickee_state::mouseatk)
+void tickee_state::mouseatk(machine_config &config)
+{
/* basic machine hardware */
TMS34010(config, m_maincpu, XTAL(40'000'000));
m_maincpu->set_addrmap(AS_PROGRAM, &tickee_state::mouseatk_map);
@@ -856,9 +855,9 @@ MACHINE_CONFIG_START(tickee_state::mouseatk)
/* video hardware */
TLC34076(config, m_tlc34076, tlc34076_device::TLC34076_6_BIT);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200)
- MCFG_SCREEN_UPDATE_DEVICE("maincpu", tms34010_device, tms340x0_rgb32)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(VIDEO_CLOCK/2, 444, 0, 320, 233, 0, 200);
+ m_screen->set_screen_update("maincpu", FUNC(tms34010_device::tms340x0_rgb32));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -868,9 +867,8 @@ MACHINE_CONFIG_START(tickee_state::mouseatk)
ym.port_b_read_callback().set_ioport("IN1");
ym.add_route(ALL_OUTPUTS, "mono", 0.50);
- MCFG_DEVICE_ADD("oki", OKIM6295, OKI_CLOCK, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, OKI_CLOCK, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00);
+}
/*************************************
diff --git a/src/mame/drivers/tim011.cpp b/src/mame/drivers/tim011.cpp
index 0e489c9674e..ebbaae170b2 100644
--- a/src/mame/drivers/tim011.cpp
+++ b/src/mame/drivers/tim011.cpp
@@ -132,14 +132,15 @@ static const floppy_format_type tim011_floppy_formats[] = {
nullptr
};
-MACHINE_CONFIG_START(tim011_state::tim011)
+void tim011_state::tim011(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z180, XTAL(12'288'000) / 2) // location U17 HD64180
- MCFG_DEVICE_PROGRAM_MAP(tim011_mem)
- MCFG_DEVICE_IO_MAP(tim011_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tim011_state, irq0_line_hold)
+ Z180(config, m_maincpu, XTAL(12'288'000) / 2); // location U17 HD64180
+ m_maincpu->set_addrmap(AS_PROGRAM, &tim011_state::tim011_mem);
+ m_maincpu->set_addrmap(AS_IO, &tim011_state::tim011_io);
+ m_maincpu->set_vblank_int("screen", FUNC(tim011_state::irq0_line_hold));
-// MCFG_DEVICE_ADD("keyboard",CDP1802, XTAL(1'750'000)) // CDP1802, unknown clock
+// CDP1802(config, "keyboard", XTAL(1'750'000)); // CDP1802, unknown clock
// FDC9266 location U43
UPD765A(config, m_fdc, XTAL(8'000'000), true, true);
@@ -152,16 +153,16 @@ MACHINE_CONFIG_START(tim011_state::tim011)
FLOPPY_CONNECTOR(config, FDC9266_TAG ":3", tim011_floppies, "35dd", tim011_floppy_formats);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(tim011_state, screen_update_tim011)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 0, 256-1);
+ screen.set_screen_update(FUNC(tim011_state::screen_update_tim011));
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( tim011 )
diff --git a/src/mame/drivers/tim100.cpp b/src/mame/drivers/tim100.cpp
index 260e4d7b669..22717a5374f 100644
--- a/src/mame/drivers/tim100.cpp
+++ b/src/mame/drivers/tim100.cpp
@@ -161,19 +161,20 @@ WRITE_LINE_MEMBER( tim100_state::irq_w )
}
-MACHINE_CONFIG_START(tim100_state::tim100)
+void tim100_state::tim100(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8085A, XTAL(4'915'200)) // divider unknown
- MCFG_DEVICE_PROGRAM_MAP(tim100_mem)
- MCFG_DEVICE_IO_MAP(tim100_io)
+ I8085A(config, m_maincpu, XTAL(4'915'200)); // divider unknown
+ m_maincpu->set_addrmap(AS_PROGRAM, &tim100_state::tim100_mem);
+ m_maincpu->set_addrmap(AS_IO, &tim100_state::tim100_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", i8276_device, screen_update)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(600, 352)
- MCFG_SCREEN_VISIBLE_AREA(0, 40*12-1, 0, 16*16-1)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_screen_update("crtc", FUNC(i8276_device::screen_update));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(600, 352);
+ screen.set_visarea(0, 40*12-1, 0, 16*16-1);
GFXDECODE(config, "gfxdecode", m_palette, gfx_tim100);
@@ -184,7 +185,7 @@ MACHINE_CONFIG_START(tim100_state::tim100)
m_crtc->irq_wr_callback().set(FUNC(tim100_state::irq_w));
m_crtc->set_screen("screen");
- MCFG_PALETTE_ADD("palette", 3)
+ PALETTE(config, m_palette).set_entries(3);
i8251_device &uart_u17(I8251(config, "uart_u17", 0));
uart_u17.txd_handler().set("rs232", FUNC(rs232_port_device::write_txd));
@@ -213,7 +214,7 @@ MACHINE_CONFIG_START(tim100_state::tim100)
uart_clock.signal_handler().append("uart_u17", FUNC(i8251_device::write_rxc));
uart_clock.signal_handler().append("uart_u18", FUNC(i8251_device::write_txc));
uart_clock.signal_handler().append("uart_u18", FUNC(i8251_device::write_rxc));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( tim100 )
diff --git a/src/mame/drivers/timelimt.cpp b/src/mame/drivers/timelimt.cpp
index 78adbaa83fb..c6593f263c0 100644
--- a/src/mame/drivers/timelimt.cpp
+++ b/src/mame/drivers/timelimt.cpp
@@ -222,18 +222,18 @@ INTERRUPT_GEN_MEMBER(timelimt_state::irq)
/***************************************************************************/
-MACHINE_CONFIG_START(timelimt_state::timelimt)
-
+void timelimt_state::timelimt(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 5000000) /* 5.000 MHz */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", timelimt_state, irq)
+ Z80(config, m_maincpu, 5000000); /* 5.000 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &timelimt_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &timelimt_state::main_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(timelimt_state::irq));
- MCFG_DEVICE_ADD("audiocpu", Z80,18432000/6) /* 3.072 MHz */
- MCFG_DEVICE_PROGRAM_MAP(sound_map)
- MCFG_DEVICE_IO_MAP(sound_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", timelimt_state, irq0_line_hold) /* ? */
+ Z80(config, m_audiocpu, 18432000/6); /* 3.072 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &timelimt_state::sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &timelimt_state::sound_io_map);
+ m_audiocpu->set_vblank_int("screen", FUNC(timelimt_state::irq0_line_hold)); /* ? */
config.m_minimum_quantum = attotime::from_hz(3000);
@@ -247,13 +247,13 @@ MACHINE_CONFIG_START(timelimt_state::timelimt)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(timelimt_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(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(timelimt_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_timelimt);
PALETTE(config, m_palette, FUNC(timelimt_state::timelimt_palette), 64+32);
@@ -268,7 +268,7 @@ MACHINE_CONFIG_START(timelimt_state::timelimt)
ay8910_device &ay2(AY8910(config, "ay2", 18432000/12));
ay2.port_a_read_callback().set("soundlatch", FUNC(generic_latch_8_device::read));
ay2.add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/timetrv.cpp b/src/mame/drivers/timetrv.cpp
index fcba7d7649e..dda61157b56 100644
--- a/src/mame/drivers/timetrv.cpp
+++ b/src/mame/drivers/timetrv.cpp
@@ -141,12 +141,12 @@ static INPUT_PORTS_START( timetrv )
// 0x80 eeprom read bit
INPUT_PORTS_END
-MACHINE_CONFIG_START(timetrv_state::timetrv)
-
+void timetrv_state::timetrv(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I80188,20000000) //???
- MCFG_DEVICE_PROGRAM_MAP(timetrv_map)
- MCFG_DEVICE_IO_MAP(timetrv_io)
+ I80188(config, m_maincpu, 20000000); //???
+ m_maincpu->set_addrmap(AS_PROGRAM, &timetrv_state::timetrv_map);
+ m_maincpu->set_addrmap(AS_IO, &timetrv_state::timetrv_io);
// interrupts are generated by internally-driven timers
EEPROM_2816(config, "eeprom");
@@ -160,20 +160,20 @@ MACHINE_CONFIG_START(timetrv_state::timetrv)
ppi2.in_pb_callback().set(FUNC(timetrv_state::in_r)); //dsw
ppi2.in_pc_callback().set(FUNC(timetrv_state::in_r)); //dsw
- MCFG_DEVICE_ADD("uart", NS16450, 1843200) // P82050 (serial interface for laserdisc)
+ NS16450(config, "uart", 1843200); // P82050 (serial interface for laserdisc)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 512)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 512-1, 0*8, 512-1)
- MCFG_SCREEN_UPDATE_DRIVER(timetrv_state, screen_update_timetrv)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 512);
+ screen.set_visarea(0*8, 512-1, 0*8, 512-1);
+ screen.set_screen_update(FUNC(timetrv_state::screen_update_timetrv));
- MCFG_PALETTE_ADD("palette", 512)
+ PALETTE(config, "palette").set_entries(512);
/* sound hardware */
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/timex.cpp b/src/mame/drivers/timex.cpp
index 5e6976b11d4..ae0d2d29549 100644
--- a/src/mame/drivers/timex.cpp
+++ b/src/mame/drivers/timex.cpp
@@ -695,21 +695,20 @@ GFXDECODE_END
MACHINE_CONFIG_START(spectrum_state::ts2068)
spectrum_128(config);
- MCFG_DEVICE_REPLACE("maincpu", Z80, XTAL(14'112'000)/4) /* From Schematic; 3.528 MHz */
- MCFG_DEVICE_PROGRAM_MAP(ts2068_mem)
- MCFG_DEVICE_IO_MAP(ts2068_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", spectrum_state, spec_interrupt)
+ Z80(config.replace(), m_maincpu, XTAL(14'112'000)/4); /* From Schematic; 3.528 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &spectrum_state::ts2068_mem);
+ m_maincpu->set_addrmap(AS_IO, &spectrum_state::ts2068_io);
+ m_maincpu->set_vblank_int("screen", FUNC(spectrum_state::spec_interrupt));
config.m_minimum_quantum = attotime::from_hz(60);
MCFG_MACHINE_RESET_OVERRIDE(spectrum_state, ts2068 )
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(TS2068_SCREEN_WIDTH, TS2068_SCREEN_HEIGHT)
- MCFG_SCREEN_VISIBLE_AREA(0, TS2068_SCREEN_WIDTH-1, 0, TS2068_SCREEN_HEIGHT-1)
- MCFG_SCREEN_UPDATE_DRIVER(spectrum_state, screen_update_ts2068)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, spectrum_state, screen_vblank_timex))
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(TS2068_SCREEN_WIDTH, TS2068_SCREEN_HEIGHT);
+ m_screen->set_visarea(0, TS2068_SCREEN_WIDTH-1, 0, TS2068_SCREEN_HEIGHT-1);
+ m_screen->set_screen_update(FUNC(spectrum_state::screen_update_ts2068));
+ m_screen->screen_vblank().set(FUNC(spectrum_state::screen_vblank_timex));
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_ts2068);
@@ -731,34 +730,33 @@ MACHINE_CONFIG_START(spectrum_state::ts2068)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(spectrum_state::uk2086)
+void spectrum_state::uk2086(machine_config &config)
+{
ts2068(config);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_REFRESH_RATE(50)
-MACHINE_CONFIG_END
+ m_screen->set_refresh_hz(50);
+}
-MACHINE_CONFIG_START(spectrum_state::tc2048)
+void spectrum_state::tc2048(machine_config &config)
+{
spectrum(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(tc2048_mem)
- MCFG_DEVICE_IO_MAP(tc2048_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &spectrum_state::tc2048_mem);
+ m_maincpu->set_addrmap(AS_IO, &spectrum_state::tc2048_io);
MCFG_MACHINE_RESET_OVERRIDE(spectrum_state, tc2048 )
/* video hardware */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_SIZE(TS2068_SCREEN_WIDTH, SPEC_SCREEN_HEIGHT)
- MCFG_SCREEN_VISIBLE_AREA(0, TS2068_SCREEN_WIDTH-1, 0, SPEC_SCREEN_HEIGHT-1)
- MCFG_SCREEN_UPDATE_DRIVER(spectrum_state, screen_update_tc2048)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, spectrum_state, screen_vblank_timex))
+ m_screen->set_refresh_hz(50);
+ m_screen->set_size(TS2068_SCREEN_WIDTH, SPEC_SCREEN_HEIGHT);
+ m_screen->set_visarea(0, TS2068_SCREEN_WIDTH-1, 0, SPEC_SCREEN_HEIGHT-1);
+ m_screen->set_screen_update(FUNC(spectrum_state::screen_update_tc2048));
+ m_screen->screen_vblank().set(FUNC(spectrum_state::screen_vblank_timex));
MCFG_VIDEO_START_OVERRIDE(spectrum_state, spectrum_128 )
/* internal ram */
m_ram->set_default_size("48K");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp
index e083579e4e8..81a4a29d9a5 100644
--- a/src/mame/drivers/tispellb.cpp
+++ b/src/mame/drivers/tispellb.cpp
@@ -369,8 +369,8 @@ void tispellb_state::rev1(machine_config &config)
}
-MACHINE_CONFIG_START(tispellb_state::rev2)
-
+void tispellb_state::rev2(machine_config &config)
+{
/* basic machine hardware */
tms0270_cpu_device &tms(TMS0270(config, m_maincpu, 350000)); // approximation
tms.k().set(FUNC(tispellb_state::main_read_k));
@@ -387,9 +387,8 @@ MACHINE_CONFIG_START(tispellb_state::rev2)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
+}
diff --git a/src/mame/drivers/tk2000.cpp b/src/mame/drivers/tk2000.cpp
index e480687ab15..dd44c72a319 100644
--- a/src/mame/drivers/tk2000.cpp
+++ b/src/mame/drivers/tk2000.cpp
@@ -566,27 +566,28 @@ static INPUT_PORTS_START( tk2000 )
PORT_CONFSETTING(0x03, "Amber")
INPUT_PORTS_END
-MACHINE_CONFIG_START(tk2000_state::tk2000)
+void tk2000_state::tk2000(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(A2_CPU_TAG, M6502, 1021800) /* close to actual CPU frequency of 1.020484 MHz */
- MCFG_DEVICE_PROGRAM_MAP(apple2_map)
+ M6502(config, m_maincpu, 1021800); /* close to actual CPU frequency of 1.020484 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tk2000_state::apple2_map);
+
TIMER(config, "scantimer").configure_scanline(FUNC(tk2000_state::apple2_interrupt), "screen", 0, 1);
config.m_minimum_quantum = attotime::from_hz(60);
APPLE2_VIDEO(config, m_video, XTAL(14'318'181));
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(280*2, 262)
- MCFG_SCREEN_VISIBLE_AREA(0, (280*2)-1,0,192-1)
- MCFG_SCREEN_UPDATE_DRIVER(tk2000_state, screen_update)
- MCFG_SCREEN_PALETTE(m_video)
+ 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(280*2, 262);
+ m_screen->set_visarea(0, (280*2)-1,0,192-1);
+ m_screen->set_screen_update(FUNC(tk2000_state::screen_update));
+ m_screen->set_palette(m_video);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(A2_SPEAKER_TAG, SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00);
/* /INH banking */
ADDRESS_MAP_BANK(config, A2_UPPERBANK_TAG).set_map(&tk2000_state::inhbank_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x4000);
@@ -595,7 +596,7 @@ MACHINE_CONFIG_START(tk2000_state::tk2000)
CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_STOPPED);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/tk80bs.cpp b/src/mame/drivers/tk80bs.cpp
index 7109956a936..893dfdaf5f7 100644
--- a/src/mame/drivers/tk80bs.cpp
+++ b/src/mame/drivers/tk80bs.cpp
@@ -172,19 +172,20 @@ static GFXDECODE_START( gfx_tk80bs )
GFXDECODE_END
-MACHINE_CONFIG_START(tk80bs_state::tk80bs)
+void tk80bs_state::tk80bs(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8080, XTAL(1'000'000)) //unknown clock
- MCFG_DEVICE_PROGRAM_MAP(tk80bs_mem)
+ I8080(config, m_maincpu, XTAL(1'000'000)); //unknown clock
+ m_maincpu->set_addrmap(AS_PROGRAM, &tk80bs_state::tk80bs_mem);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(256, 128)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 128-1)
- MCFG_SCREEN_UPDATE_DRIVER(tk80bs_state, screen_update_tk80bs)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(256, 128);
+ screen.set_visarea(0, 256-1, 0, 128-1);
+ screen.set_screen_update(FUNC(tk80bs_state::screen_update_tk80bs));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette, palette_device::MONOCHROME);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tk80bs);
@@ -196,7 +197,7 @@ MACHINE_CONFIG_START(tk80bs_state::tk80bs)
generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0));
keyboard.set_keyboard_callback(FUNC(tk80bs_state::kbd_put));
-MACHINE_CONFIG_END
+}
ROM_START( tk80bs )
diff --git a/src/mame/drivers/tm990189.cpp b/src/mame/drivers/tm990189.cpp
index 30faffb571e..73db95e309f 100644
--- a/src/mame/drivers/tm990189.cpp
+++ b/src/mame/drivers/tm990189.cpp
@@ -821,7 +821,8 @@ void tm990189_state::tm990_189_cru_map(address_map &map)
map(0x0400, 0x05ff).w(m_tms9902, FUNC(tms9902_device::cruwrite)); /* optional tms9902 */
}
-MACHINE_CONFIG_START(tm990189_state::tm990_189)
+void tm990189_state::tm990_189(machine_config &config)
+{
/* basic machine hardware */
TMS9980A(config, m_tms9980a, 8_MHz_XTAL); // clock divided by 4 internally
m_tms9980a->set_addrmap(AS_PROGRAM, &tm990189_state::tm990_189_memmap);
@@ -877,9 +878,10 @@ MACHINE_CONFIG_START(tm990189_state::tm990_189)
// Need to delay the timer, or it will spoil the initial LOAD
// TODO: Fix this, probably inside CPU
display_timer.set_start_delay(attotime::from_msec(150));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tm990189_state::tm990_189_v)
+void tm990189_state::tm990_189_v(machine_config &config)
+{
/* basic machine hardware */
TMS9980A(config, m_tms9980a, 8_MHz_XTAL);
m_tms9980a->set_addrmap(AS_PROGRAM, &tm990189_state::tm990_189_v_memmap);
@@ -938,7 +940,7 @@ MACHINE_CONFIG_START(tm990189_state::tm990_189_v)
timer_device &display_timer(TIMER(config, "display_timer"));
display_timer.configure_periodic(FUNC(tm990189_state::display_callback), attotime::from_hz(30));
display_timer.set_start_delay(attotime::from_msec(150));
-MACHINE_CONFIG_END
+}
/*
diff --git a/src/mame/drivers/tmaster.cpp b/src/mame/drivers/tmaster.cpp
index 9a3038b569e..1fbe7c9326b 100644
--- a/src/mame/drivers/tmaster.cpp
+++ b/src/mame/drivers/tmaster.cpp
@@ -366,9 +366,11 @@ int tmaster_compute_addr(uint16_t reg_low, uint16_t reg_mid, uint16_t reg_high)
return (reg_low & 0xff) | ((reg_mid & 0x1ff) << 8) | (reg_high << 17);
}
-MACHINE_CONFIG_START(tmaster_state::tm)
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(24'000'000) / 2) /* 12MHz */
- MCFG_DEVICE_PROGRAM_MAP(tmaster_map)
+void tmaster_state::tm(machine_config &config)
+{
+ M68000(config, m_maincpu, XTAL(24'000'000) / 2); /* 12MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tmaster_state::tmaster_map);
+
TIMER(config, "scantimer").configure_scanline(FUNC(tmaster_state::scanline_interrupt), "screen", 0, 1);
MC68681(config, m_duart, XTAL(8'664'000) / 2 /*??*/);
@@ -380,13 +382,13 @@ MACHINE_CONFIG_START(tmaster_state::tm)
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(400, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 400-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(tmaster_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(400, 256);
+ m_screen->set_visarea(0, 400-1, 0, 256-1);
+ m_screen->set_screen_update(FUNC(tmaster_state::screen_update));
+ m_screen->set_palette(m_palette);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x1000);
@@ -397,9 +399,8 @@ MACHINE_CONFIG_START(tmaster_state::tm)
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(24'000'000) / 16, okim6295_device::PIN7_HIGH) /* 1.5Mhz? clock frequency & pin 7 not verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, XTAL(24'000'000) / 16, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); /* 1.5Mhz? clock frequency & pin 7 not verified */
+}
void tmaster_state::tmds1204(machine_config &config)
{
diff --git a/src/mame/drivers/tmspoker.cpp b/src/mame/drivers/tmspoker.cpp
index 8b89cc18270..0a658e55cad 100644
--- a/src/mame/drivers/tmspoker.cpp
+++ b/src/mame/drivers/tmspoker.cpp
@@ -564,8 +564,8 @@ GFXDECODE_END
* Machine Drivers *
*************************/
-MACHINE_CONFIG_START(tmspoker_state::tmspoker)
-
+void tmspoker_state::tmspoker(machine_config &config)
+{
// CPU TMS9980A; no line connections
TMS9980A(config, m_maincpu, MASTER_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &tmspoker_state::tmspoker_map);
@@ -573,13 +573,13 @@ MACHINE_CONFIG_START(tmspoker_state::tmspoker)
m_maincpu->set_vblank_int("screen", FUNC(tmspoker_state::tmspoker_interrupt));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(tmspoker_state, screen_update_tmspoker)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(tmspoker_state::screen_update_tmspoker));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_tmspoker);
PALETTE(config, "palette", FUNC(tmspoker_state::tmspoker_palette), 256);
@@ -588,8 +588,7 @@ MACHINE_CONFIG_START(tmspoker_state::tmspoker)
crtc.set_screen("screen");
crtc.set_show_border_area(false);
crtc.set_char_width(8);
-
-MACHINE_CONFIG_END
+}
/*************************
diff --git a/src/mame/drivers/toaplan2.cpp b/src/mame/drivers/toaplan2.cpp
index 2bedef01040..e0294a4002b 100644
--- a/src/mame/drivers/toaplan2.cpp
+++ b/src/mame/drivers/toaplan2.cpp
@@ -3205,8 +3205,8 @@ static GFXDECODE_START( gfx_batrider )
GFXDECODE_END
-MACHINE_CONFIG_START(toaplan2_state::tekipaki)
-
+void toaplan2_state::tekipaki(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 10_MHz_XTAL); // 10MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::tekipaki_68k_mem);
@@ -3246,10 +3246,10 @@ MACHINE_CONFIG_START(toaplan2_state::tekipaki)
ym3812_device &ymsnd(YM3812(config, "ymsnd", 27_MHz_XTAL/8));
ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(toaplan2_state::ghox)
+}
+void toaplan2_state::ghox(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 10_MHz_XTAL); /* verified on pcb */
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::ghox_68k_mem);
@@ -3284,7 +3284,7 @@ MACHINE_CONFIG_START(toaplan2_state::ghox)
SPEAKER(config, "mono").front_center();
YM2151(config, "ymsnd", 27_MHz_XTAL/8).add_route(ALL_OUTPUTS, "mono", 1.0); // verified on pcb
-MACHINE_CONFIG_END
+}
/* probably dogyuun, vfive and kbash use the same decryption table;
those 3 games have been seen with the NITRO905 chip, other alias are
@@ -3336,8 +3336,8 @@ a4849 cd
*/
-MACHINE_CONFIG_START(toaplan2_state::dogyuun)
-
+void toaplan2_state::dogyuun(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 25_MHz_XTAL/2); /* verified on pcb */
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::dogyuun_68k_mem);
@@ -3376,11 +3376,11 @@ MACHINE_CONFIG_START(toaplan2_state::dogyuun)
OKIM6295(config, m_oki[0], 25_MHz_XTAL/24, okim6295_device::PIN7_HIGH); // verified on PCB
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.5);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::kbash)
+void toaplan2_state::kbash(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 16_MHz_XTAL); /* 16MHz Oscillator */
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::kbash_68k_mem);
@@ -3420,11 +3420,11 @@ MACHINE_CONFIG_START(toaplan2_state::kbash)
OKIM6295(config, m_oki[0], 32_MHz_XTAL/32, okim6295_device::PIN7_HIGH);
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.5);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::kbash2)
+void toaplan2_state::kbash2(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 16_MHz_XTAL); /* 16MHz Oscillator */
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::kbash2_68k_mem);
@@ -3456,11 +3456,11 @@ MACHINE_CONFIG_START(toaplan2_state::kbash2)
OKIM6295(config, m_oki[1], 16_MHz_XTAL/16, okim6295_device::PIN7_HIGH);
m_oki[1]->add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::truxton2)
+void toaplan2_state::truxton2(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 16_MHz_XTAL); /* verified on pcb */
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::truxton2_68k_mem);
@@ -3500,11 +3500,11 @@ MACHINE_CONFIG_START(toaplan2_state::truxton2)
OKIM6295(config, m_oki[0], 16_MHz_XTAL/4, okim6295_device::PIN7_LOW); // verified on PCB
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 1.0);
#endif
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::pipibibs)
+void toaplan2_state::pipibibs(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 10_MHz_XTAL); // verified on PCB
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::pipibibs_68k_mem);
@@ -3541,15 +3541,15 @@ MACHINE_CONFIG_START(toaplan2_state::pipibibs)
ym3812_device &ymsnd(YM3812(config, "ymsnd", 27_MHz_XTAL/8)); // verified on PCB
ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::pipibibsbl)
+void toaplan2_state::pipibibsbl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12_MHz_XTAL) // ??? (position labeled "68000-12" but 10 MHz-rated parts used)
- MCFG_DEVICE_PROGRAM_MAP(pipibibi_bootleg_68k_mem)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(toaplan2_state, pipibibsbl_irq_ack)
+ M68000(config, m_maincpu, 12_MHz_XTAL); // ??? (position labeled "68000-12" but 10 MHz-rated parts used)
+ m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::pipibibi_bootleg_68k_mem);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(toaplan2_state::pipibibsbl_irq_ack));
Z80(config, m_audiocpu, 12_MHz_XTAL / 2); // GoldStar Z8400B; clock source and divider unknown
m_audiocpu->set_addrmap(AS_PROGRAM, &toaplan2_state::pipibibs_sound_z80_mem);
@@ -3580,7 +3580,7 @@ MACHINE_CONFIG_START(toaplan2_state::pipibibsbl)
ym3812_device &ymsnd(YM3812(config, "ymsnd", 28.322_MHz_XTAL / 8)); // ???
ymsnd.irq_handler().set_inputline(m_audiocpu, 0);
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
/* x = modified to match batsugun 'unencrypted' code - '?' likewise, but not so sure about them */
/* e = opcodes used in the EEPROM service routine */
@@ -3621,8 +3621,8 @@ static const uint8_t ts001turbo_decryption_table[256] = {
};
-MACHINE_CONFIG_START(toaplan2_state::fixeight)
-
+void toaplan2_state::fixeight(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 16_MHz_XTAL); // verified on PCB
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::fixeight_68k_mem);
@@ -3659,15 +3659,15 @@ MACHINE_CONFIG_START(toaplan2_state::fixeight)
OKIM6295(config, m_oki[0], 16_MHz_XTAL/16, okim6295_device::PIN7_HIGH); /* verified on pcb */
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.5);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::fixeightbl)
+void toaplan2_state::fixeightbl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(10'000'000)) /* 10MHz Oscillator */
- MCFG_DEVICE_PROGRAM_MAP(fixeightbl_68k_mem)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(toaplan2_state, fixeightbl_irq_ack)
+ M68000(config, m_maincpu, XTAL(10'000'000)); /* 10MHz Oscillator */
+ m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::fixeightbl_68k_mem);
+ m_maincpu->set_irq_acknowledge_callback(FUNC(toaplan2_state::fixeightbl_irq_ack));
/* video hardware */
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
@@ -3695,11 +3695,11 @@ MACHINE_CONFIG_START(toaplan2_state::fixeightbl)
OKIM6295(config, m_oki[0], 14_MHz_XTAL/16, okim6295_device::PIN7_LOW);
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 1.0);
m_oki[0]->set_addrmap(0, &toaplan2_state::fixeightbl_oki);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::vfive)
+void toaplan2_state::vfive(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 20_MHz_XTAL/2); // verified on PCB
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::vfive_68k_mem);
@@ -3732,11 +3732,11 @@ MACHINE_CONFIG_START(toaplan2_state::vfive)
SPEAKER(config, "mono").front_center();
YM2151(config, "ymsnd", 27_MHz_XTAL/8).add_route(ALL_OUTPUTS, "mono", 1.0); // verified on PCB
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::batsugun)
+void toaplan2_state::batsugun(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::batsugun_68k_mem);
@@ -3777,10 +3777,10 @@ MACHINE_CONFIG_START(toaplan2_state::batsugun)
OKIM6295(config, m_oki[0], 32_MHz_XTAL/8, okim6295_device::PIN7_LOW);
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.5);
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(toaplan2_state::pwrkick)
+}
+void toaplan2_state::pwrkick(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 16_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::pwrkick_68k_mem);
@@ -3812,9 +3812,10 @@ MACHINE_CONFIG_START(toaplan2_state::pwrkick)
// empty YM2151 socket
OKIM6295(config, m_oki[0], 27_MHz_XTAL/8, okim6295_device::PIN7_HIGH); // not confirmed
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.5);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(toaplan2_state::othldrby)
+void toaplan2_state::othldrby(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 16_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::othldrby_68k_mem);
@@ -3844,10 +3845,11 @@ MACHINE_CONFIG_START(toaplan2_state::othldrby)
OKIM6295(config, m_oki[0], 27_MHz_XTAL/8, okim6295_device::PIN7_HIGH); // not confirmed
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.5);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(toaplan2_state::enmadaio)
+void toaplan2_state::enmadaio(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 20_MHz_XTAL/2);
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::enmadaio_68k_mem);
@@ -3876,10 +3878,10 @@ MACHINE_CONFIG_START(toaplan2_state::enmadaio)
OKIM6295(config, m_oki[0], 16_MHz_XTAL/4, okim6295_device::PIN7_LOW); // pin7 not confirmed
m_oki[0]->set_addrmap(0, &toaplan2_state::enmadaio_oki);
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.5);
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(toaplan2_state::snowbro2)
+}
+void toaplan2_state::snowbro2(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 16_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::snowbro2_68k_mem);
@@ -3910,11 +3912,11 @@ MACHINE_CONFIG_START(toaplan2_state::snowbro2)
OKIM6295(config, m_oki[0], 27_MHz_XTAL/10, okim6295_device::PIN7_HIGH);
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::mahoudai)
+void toaplan2_state::mahoudai(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::mahoudai_68k_mem);
@@ -3953,11 +3955,11 @@ MACHINE_CONFIG_START(toaplan2_state::mahoudai)
OKIM6295(config, m_oki[0], 32_MHz_XTAL/32, okim6295_device::PIN7_HIGH);
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::shippumd)
+void toaplan2_state::shippumd(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::shippumd_68k_mem);
@@ -3996,10 +3998,10 @@ MACHINE_CONFIG_START(toaplan2_state::shippumd)
OKIM6295(config, m_oki[0], 32_MHz_XTAL/32, okim6295_device::PIN7_HIGH);
m_oki[0]->add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(toaplan2_state::bgaregga)
+}
+void toaplan2_state::bgaregga(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::bgaregga_68k_mem);
@@ -4045,18 +4047,19 @@ MACHINE_CONFIG_START(toaplan2_state::bgaregga)
NMK112(config, m_nmk112, 0);
m_nmk112->set_rom0_tag("oki1");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(toaplan2_state::bgareggabl)
+void toaplan2_state::bgareggabl(machine_config &config)
+{
bgaregga(config);
MCFG_VIDEO_START_OVERRIDE(toaplan2_state,bgareggabl)
m_screen->set_screen_update(FUNC(toaplan2_state::screen_update_bootleg));
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(toaplan2_state::batrider)
+}
+void toaplan2_state::batrider(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator (verified)
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::batrider_68k_mem);
@@ -4116,19 +4119,19 @@ MACHINE_CONFIG_START(toaplan2_state::batrider)
NMK112(config, m_nmk112, 0);
m_nmk112->set_rom0_tag("oki1");
m_nmk112->set_rom1_tag("oki2");
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(toaplan2_state::bbakraid)
+void toaplan2_state::bbakraid(machine_config &config)
+{
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &toaplan2_state::bbakraid_68k_mem);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(32'000'000)/6) /* 5.3333MHz , 32MHz Oscillator */
- MCFG_DEVICE_PROGRAM_MAP(bbakraid_sound_z80_mem)
- MCFG_DEVICE_IO_MAP(bbakraid_sound_z80_port)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(toaplan2_state, bbakraid_snd_interrupt, 448)
+ Z80(config, m_audiocpu, XTAL(32'000'000)/6); /* 5.3333MHz , 32MHz Oscillator */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &toaplan2_state::bbakraid_sound_z80_mem);
+ m_audiocpu->set_addrmap(AS_IO, &toaplan2_state::bbakraid_sound_z80_port);
+ m_audiocpu->set_periodic_int(FUNC(toaplan2_state::bbakraid_snd_interrupt), attotime::from_hz(448));
config.m_minimum_quantum = attotime::from_hz(600);
@@ -4174,7 +4177,7 @@ MACHINE_CONFIG_START(toaplan2_state::bbakraid)
YMZ280B(config, "ymz", 16.9344_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 1.0);
// IRQ not used ??? Connected to a test pin (TP082)
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/tomcat.cpp b/src/mame/drivers/tomcat.cpp
index 394b5a34553..ba8f361d667 100644
--- a/src/mame/drivers/tomcat.cpp
+++ b/src/mame/drivers/tomcat.cpp
@@ -308,25 +308,26 @@ void tomcat_state::machine_start()
m_dsp_bio = 0;
}
-MACHINE_CONFIG_START(tomcat_state::tomcat)
- MCFG_DEVICE_ADD("maincpu", M68010, 12.096_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(tomcat_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(tomcat_state, irq1_line_assert, 5*60)
- //MCFG_DEVICE_PERIODIC_INT_DRIVER(tomcat_state, irq1_line_assert, 12.096_MHz_XTAL / 16 / 16 / 16 / 12)
+void tomcat_state::tomcat(machine_config &config)
+{
+ M68010(config, m_maincpu, 12.096_MHz_XTAL / 2);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tomcat_state::tomcat_map);
+ m_maincpu->set_periodic_int(FUNC(tomcat_state::irq1_line_assert), attotime::from_hz(5*60));
+ //m_maincpu->set_periodic_int(FUNC(tomcat_state::irq1_line_assert), attotime::from_hz(12.096_MHz_XTAL / 16 / 16 / 16 / 12));
TMS32010(config, m_dsp, 16_MHz_XTAL);
m_dsp->set_addrmap(AS_PROGRAM, &tomcat_state::dsp_map);
m_dsp->bio().set(FUNC(tomcat_state::dsp_bio_r));
- MCFG_DEVICE_ADD("soundcpu", M6502, 14.318181_MHz_XTAL / 8)
- MCFG_DEVICE_DISABLE()
- MCFG_DEVICE_PROGRAM_MAP( sound_map)
+ m6502_device &soundcpu(M6502(config, "soundcpu", 14.318181_MHz_XTAL / 8));
+ soundcpu.set_disable();
+ soundcpu.set_addrmap(AS_PROGRAM, &tomcat_state::sound_map);
ADC0809(config, m_adc, 12.096_MHz_XTAL / 16);
m_adc->in_callback<0>().set_ioport("STICKY");
m_adc->in_callback<1>().set_ioport("STICKX");
- MCFG_DEVICE_ADD("riot", RIOT6532, 14.318181_MHz_XTAL / 8)
+ RIOT6532(config, "riot", 14.318181_MHz_XTAL / 8);
/*
PA0 = /WS OUTPUT (TMS-5220 WRITE STROBE)
PA1 = /RS OUTPUT (TMS-5220 READ STROBE)
@@ -358,33 +359,31 @@ MACHINE_CONFIG_START(tomcat_state::tomcat)
WATCHDOG_TIMER(config, "watchdog");
- MCFG_DEVICE_ADD("m48t02", M48T02, 0)
+ M48T02(config, "m48t02", 0);
VECTOR(config, "vector", 0);
- MCFG_SCREEN_ADD("screen", VECTOR)
- MCFG_SCREEN_REFRESH_RATE(40)
- //MCFG_SCREEN_REFRESH_RATE((double)XTAL(12'000'000) / 16 / 16 / 16 / 12 / 5 )
- MCFG_SCREEN_SIZE(400, 300)
- MCFG_SCREEN_VISIBLE_AREA(0, 280, 0, 250)
- MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_VECTOR));
+ screen.set_refresh_hz(40);
+ //screen.set_refresh_hz((double)XTAL(12'000'000) / 16 / 16 / 16 / 12 / 5 );
+ screen.set_size(400, 300);
+ screen.set_visarea(0, 280, 0, 250);
+ screen.set_screen_update("vector", FUNC(vector_device::screen_update));
avg_device &avg(AVG_TOMCAT(config, "avg", 0));
avg.set_vector_tag("vector");
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("pokey1", POKEY, XTAL(14'318'181) / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.20)
+ POKEY(config, "pokey1", XTAL(14'318'181) / 8).add_route(ALL_OUTPUTS, "lspeaker", 0.20);
- MCFG_DEVICE_ADD("pokey2", POKEY, XTAL(14'318'181) / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.20)
+ POKEY(config, "pokey2", XTAL(14'318'181) / 8).add_route(ALL_OUTPUTS, "rspeaker", 0.20);
- MCFG_DEVICE_ADD("tms", TMS5220, 325000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
+ TMS5220(config, m_tms, 325000);
+ m_tms->add_route(ALL_OUTPUTS, "lspeaker", 0.50);
+ m_tms->add_route(ALL_OUTPUTS, "rspeaker", 0.50);
YM2151(config, "ymsnd", XTAL(14'318'181)/4).add_route(0, "lspeaker", 0.60).add_route(1, "rspeaker", 0.60);
-MACHINE_CONFIG_END
+}
ROM_START( tomcat )
ROM_REGION( 0x10000, "maincpu", 0)
diff --git a/src/mame/drivers/toobin.cpp b/src/mame/drivers/toobin.cpp
index dfffdf747a0..9d791ffcaef 100644
--- a/src/mame/drivers/toobin.cpp
+++ b/src/mame/drivers/toobin.cpp
@@ -203,30 +203,30 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(toobin_state::toobin)
-
+void toobin_state::toobin(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68010, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ M68010(config, m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &toobin_state::main_map);
EEPROM_2804(config, "eeprom").lock_after_write(true);
WATCHDOG_TIMER(config, "watchdog").set_vblank_count(m_screen, 8);
/* video hardware */
- MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 4, toobin_state, get_playfield_tile_info, 8,8, SCAN_ROWS, 128,64)
- MCFG_TILEMAP_ADD_STANDARD_TRANSPEN("alpha", "gfxdecode", 2, toobin_state, get_alpha_tile_info, 8,8, SCAN_ROWS, 64,48, 0)
+ TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 4, 8,8, TILEMAP_SCAN_ROWS, 128,64).set_info_callback(FUNC(toobin_state::get_playfield_tile_info));
+ TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64,48, 0).set_info_callback(FUNC(toobin_state::get_alpha_tile_info));
ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, toobin_state::s_mob_config);
m_mob->set_gfxdecode(m_gfxdecode);
- MCFG_SCREEN_ADD(m_screen, RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 640, 0, 512, 416, 0, 384)
- MCFG_SCREEN_UPDATE_DRIVER(toobin_state, screen_update)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
+ m_screen->set_raw(MASTER_CLOCK/2, 640, 0, 512, 416, 0, 384);
+ m_screen->set_screen_update(FUNC(toobin_state::screen_update));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_toobin);
- MCFG_PALETTE_ADD("palette", 1024)
+ PALETTE(config, m_palette).set_entries(1024);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -238,7 +238,7 @@ MACHINE_CONFIG_START(toobin_state::toobin)
m_jsa->add_route(0, "lspeaker", 1.0);
m_jsa->add_route(1, "rspeaker", 1.0);
config.device_remove("jsa:tms");
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/tosh1000.cpp b/src/mame/drivers/tosh1000.cpp
index faaa3bb6bb0..741f31563b8 100644
--- a/src/mame/drivers/tosh1000.cpp
+++ b/src/mame/drivers/tosh1000.cpp
@@ -253,11 +253,12 @@ void tosh1000_state::cfg_fdc_35(device_t *device)
dynamic_cast<device_slot_interface &>(*device->subdevice("fdc:1")).set_default_option("");
}
-MACHINE_CONFIG_START(tosh1000_state::tosh1000)
- MCFG_DEVICE_ADD("maincpu", I8088, XTAL(5'000'000))
- MCFG_DEVICE_PROGRAM_MAP(tosh1000_map)
- MCFG_DEVICE_IO_MAP(tosh1000_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259", pic8259_device, inta_cb)
+void tosh1000_state::tosh1000(machine_config &config)
+{
+ I8088(config, m_maincpu, XTAL(5'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &tosh1000_state::tosh1000_map);
+ m_maincpu->set_addrmap(AS_IO, &tosh1000_state::tosh1000_io);
+ m_maincpu->set_irq_acknowledge_callback("mb:pic8259", FUNC(pic8259_device::inta_cb));
ADDRESS_MAP_BANK(config, "bankdev").set_map(&tosh1000_state::tosh1000_romdos).set_options(ENDIANNESS_LITTLE, 8, 20, 0x10000);
@@ -268,13 +269,12 @@ MACHINE_CONFIG_START(tosh1000_state::tosh1000)
TC8521(config, "rtc", XTAL(32'768));
// FIXME: determine ISA bus clock
- MCFG_DEVICE_ADD("isa1", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "cga", false)
- MCFG_DEVICE_ADD("isa2", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "fdc_xt", false)
- MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc_xt", cfg_fdc_35)
- MCFG_DEVICE_ADD("isa3", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "lpt", false)
- MCFG_DEVICE_ADD("isa4", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, "com", false)
- MCFG_DEVICE_ADD("isa5", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
- MCFG_DEVICE_ADD("isa6", ISA8_SLOT, 0, "mb:isa", pc_isa8_cards, nullptr, false)
+ ISA8_SLOT(config, "isa1", 0, "mb:isa", pc_isa8_cards, "cga", false);
+ ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "fdc_xt", false).set_option_machine_config("fdc_xt", cfg_fdc_35);
+ ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "lpt", false);
+ ISA8_SLOT(config, "isa4", 0, "mb:isa", pc_isa8_cards, "com", false);
+ ISA8_SLOT(config, "isa5", 0, "mb:isa", pc_isa8_cards, nullptr, false);
+ ISA8_SLOT(config, "isa6", 0, "mb:isa", pc_isa8_cards, nullptr, false);
// SOFTWARE_LIST(config, "flop_list").set_original("tosh1000");
@@ -284,7 +284,7 @@ MACHINE_CONFIG_START(tosh1000_state::tosh1000)
RAM(config, RAM_TAG).set_default_size("512K");
TOSH1000_BRAM(config, m_bram, 0);
-MACHINE_CONFIG_END
+}
ROM_START( tosh1000 )
diff --git a/src/mame/drivers/tourvis.cpp b/src/mame/drivers/tourvis.cpp
index 088c8a94a09..8409fb21bd5 100644
--- a/src/mame/drivers/tourvis.cpp
+++ b/src/mame/drivers/tourvis.cpp
@@ -403,14 +403,14 @@ MACHINE_CONFIG_START(tourvision_state::tourvision)
config.m_minimum_quantum = attotime::from_hz(60);
- MCFG_DEVICE_ADD("subcpu", I8085A, 18000000/3 /*?*/)
- MCFG_DEVICE_PROGRAM_MAP(tourvision_8085_map)
+ I8085A(config, m_subcpu, 18000000/3 /*?*/);
+ m_subcpu->set_addrmap(AS_PROGRAM, &tourvision_state::tourvision_8085_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PCE_MAIN_CLOCK, huc6260_device::WPF, 64, 64 + 1024 + 64, huc6260_device::LPF, 18, 18 + 242)
- MCFG_SCREEN_UPDATE_DRIVER( pce_common_state, screen_update )
- MCFG_SCREEN_PALETTE("huc6260")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(PCE_MAIN_CLOCK, huc6260_device::WPF, 64, 64 + 1024 + 64, huc6260_device::LPF, 18, 18 + 242);
+ screen.set_screen_update(FUNC(pce_common_state::screen_update));
+ screen.set_palette(m_huc6260);
HUC6260(config, m_huc6260, PCE_MAIN_CLOCK);
m_huc6260->next_pixel_data().set("huc6270", FUNC(huc6270_device::next_pixel));
@@ -437,8 +437,6 @@ MACHINE_CONFIG_START(tourvision_state::tourvision)
MCFG_GENERIC_MANDATORY
SOFTWARE_LIST(config, "tv_list").set_original("pce_tourvision");
-
-
MACHINE_CONFIG_END
#define TOURVISION_BIOS \
diff --git a/src/mame/drivers/tp84.cpp b/src/mame/drivers/tp84.cpp
index fe252e1fcf3..ed82130285f 100644
--- a/src/mame/drivers/tp84.cpp
+++ b/src/mame/drivers/tp84.cpp
@@ -329,17 +329,17 @@ static GFXDECODE_START( gfx_tp84 )
GFXDECODE_END
-MACHINE_CONFIG_START(tp84_state::tp84)
-
+void tp84_state::tp84(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("cpu1", MC6809E, XTAL(18'432'000)/12) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(tp84_cpu1_map)
+ MC6809E(config, m_maincpu, XTAL(18'432'000)/12); /* verified on pcb */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tp84_state::tp84_cpu1_map);
- MCFG_DEVICE_ADD("sub", MC6809E, XTAL(18'432'000)/12) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(cpu2_map)
+ MC6809E(config, m_subcpu, XTAL(18'432'000)/12); /* verified on pcb */
+ m_subcpu->set_addrmap(AS_PROGRAM, &tp84_state::cpu2_map);
- MCFG_DEVICE_ADD("audiocpu", Z80,XTAL(14'318'181)/4) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(audio_map)
+ Z80(config, m_audiocpu, XTAL(14'318'181)/4); /* verified on pcb */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &tp84_state::audio_map);
config.m_minimum_quantum = attotime::from_hz(6000); /* 100 CPU slices per frame - a high value to ensure proper */
/* synchronization of the CPUs */
@@ -354,14 +354,14 @@ MACHINE_CONFIG_START(tp84_state::tp84)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(tp84_state, screen_update_tp84)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tp84_state, vblank_irq))
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_size(32*8, 32*8);
+ m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ m_screen->set_screen_update(FUNC(tp84_state::screen_update_tp84));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set(FUNC(tp84_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tp84);
PALETTE(config, m_palette, FUNC(tp84_state::tp84_palette), 4096, 256);
@@ -371,24 +371,21 @@ MACHINE_CONFIG_START(tp84_state::tp84)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("y2404_1", Y2404, XTAL(14'318'181)/8) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 0.75)
+ Y2404(config, "y2404_1", XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "filter1", 0.75); /* verified on pcb */
- MCFG_DEVICE_ADD("y2404_2", Y2404, XTAL(14'318'181)/8) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter2", 0.75)
+ Y2404(config, "y2404_2", XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "filter2", 0.75); /* verified on pcb */
- MCFG_DEVICE_ADD("y2404_3", Y2404, XTAL(14'318'181)/8) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "filter3", 0.75)
+ Y2404(config, "y2404_3", XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "filter3", 0.75); /* verified on pcb */
for (auto &filter : m_filter)
FILTER_RC(config, filter).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tp84_state::tp84b)
+void tp84_state::tp84b(machine_config &config)
+{
tp84(config);
- MCFG_DEVICE_MODIFY("cpu1")
- MCFG_DEVICE_PROGRAM_MAP(tp84b_cpu1_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &tp84_state::tp84b_cpu1_map);
+}
/***************************************************************************
diff --git a/src/mame/drivers/travrusa.cpp b/src/mame/drivers/travrusa.cpp
index 91bc67f5487..e692ebb0f08 100644
--- a/src/mame/drivers/travrusa.cpp
+++ b/src/mame/drivers/travrusa.cpp
@@ -304,24 +304,23 @@ void travrusa_state::machine_reset()
m_scrollx[1] = 0;
}
-MACHINE_CONFIG_START(travrusa_state::travrusa)
-
+void travrusa_state::travrusa(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* 4 MHz (?) */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", travrusa_state, irq0_line_hold)
-
+ Z80(config, m_maincpu, 4000000); /* 4 MHz (?) */
+ m_maincpu->set_addrmap(AS_PROGRAM, &travrusa_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(travrusa_state::irq0_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(56.75)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(1790) /* accurate frequency, measured on a Moon Patrol board, is 56.75Hz. */)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(56.75);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(1790) /* accurate frequency, measured on a Moon Patrol board, is 56.75Hz. */);
/* the Lode Runner manual (similar but different hardware) */
/* talks about 55Hz and 1790ms vblank duration. */
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(travrusa_state, screen_update_travrusa)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(1*8, 31*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(travrusa_state::screen_update_travrusa));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_travrusa);
PALETTE(config, m_palette, FUNC(travrusa_state::travrusa_palette), 16*8+16*8, 128+16);
@@ -329,7 +328,7 @@ MACHINE_CONFIG_START(travrusa_state::travrusa)
/* sound hardware */
//m52_sound_c_audio(config);
IREM_M52_SOUNDC_AUDIO(config, "irem_audio", 0);
-MACHINE_CONFIG_END
+}
void travrusa_state::shtrider(machine_config &config)
{
diff --git a/src/mame/drivers/triforce.cpp b/src/mame/drivers/triforce.cpp
index 6b0b7ce664f..d4a9fc8aee0 100644
--- a/src/mame/drivers/triforce.cpp
+++ b/src/mame/drivers/triforce.cpp
@@ -586,25 +586,24 @@ void triforce_state::machine_start()
descrambler(&rom[0x100], 0x1afe00);
}
-MACHINE_CONFIG_START(triforce_state::triforce_base)
-
+void triforce_state::triforce_base(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", PPC603, 64000000) /* Correct CPU is a PowerPC 750 (what Apple called "G3") with paired-single vector instructions added */
- MCFG_DEVICE_PROGRAM_MAP(gc_map)
+ PPC603(config, m_maincpu, 64000000); /* Correct CPU is a PowerPC 750 (what Apple called "G3") with paired-single vector instructions added */
+ m_maincpu->set_addrmap(AS_PROGRAM, &triforce_state::gc_map);
config.m_minimum_quantum = attotime::from_hz(6000);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
- MCFG_SCREEN_UPDATE_DRIVER(triforce_state, screen_update_triforce)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 639, 0, 479);
+ screen.set_screen_update(FUNC(triforce_state::screen_update_triforce));
- MCFG_PALETTE_ADD("palette", 65536)
-
-MACHINE_CONFIG_END
+ PALETTE(config, "palette").set_entries(65536);
+}
void triforce_state::triforcegd(machine_config &config)
{
diff --git a/src/mame/drivers/trkfldch.cpp b/src/mame/drivers/trkfldch.cpp
index e0141527ade..cde7b9594cf 100644
--- a/src/mame/drivers/trkfldch.cpp
+++ b/src/mame/drivers/trkfldch.cpp
@@ -159,7 +159,8 @@ void trkfldch_state::machine_reset()
m_maincpu->set_state_int(1, addr);
}
-MACHINE_CONFIG_START(trkfldch_state::trkfldch)
+void trkfldch_state::trkfldch(machine_config &config)
+{
/* basic machine hardware */
G65816(config, m_maincpu, 20000000);
//m_maincpu->set_addrmap(AS_DATA, &tv965_state::mem_map);
@@ -177,7 +178,7 @@ MACHINE_CONFIG_START(trkfldch_state::trkfldch)
GFXDECODE(config, m_gfxdecode, "palette", gfx_trkfldch); // dummy
PALETTE(config, "palette").set_format(palette_device::xRGB_444, 0x100).set_endianness(ENDIANNESS_BIG); // dummy
-MACHINE_CONFIG_END
+}
ROM_START( trkfldch )
ROM_REGION( 0x400000, "maincpu", 0 )
diff --git a/src/mame/drivers/trs80.cpp b/src/mame/drivers/trs80.cpp
index 41bb67287bf..9d1d20c9c66 100644
--- a/src/mame/drivers/trs80.cpp
+++ b/src/mame/drivers/trs80.cpp
@@ -502,17 +502,18 @@ static void trs80_floppies(device_slot_interface &device)
}
-MACHINE_CONFIG_START(trs80_state::trs80) // the original model I, level I, with no extras
+void trs80_state::trs80(machine_config &config) // the original model I, level I, with no extras
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 10.6445_MHz_XTAL / 6)
- MCFG_DEVICE_PROGRAM_MAP(trs80_mem)
- MCFG_DEVICE_IO_MAP(trs80_io)
+ Z80(config, m_maincpu, 10.6445_MHz_XTAL / 6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &trs80_state::trs80_mem);
+ m_maincpu->set_addrmap(AS_IO, &trs80_state::trs80_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(10.6445_MHz_XTAL, 672, 0, 384, 264, 0, 192)
- MCFG_SCREEN_UPDATE_DRIVER(trs80_state, screen_update_trs80)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(10.6445_MHz_XTAL, 672, 0, 384, 264, 0, 192);
+ screen.set_screen_update(FUNC(trs80_state::screen_update_trs80));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_trs80);
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -524,15 +525,14 @@ MACHINE_CONFIG_START(trs80_state::trs80) // the original model I, level I,
/* devices */
CASSETTE(config, m_cassette);
-MACHINE_CONFIG_END
+}
MACHINE_CONFIG_START(trs80_state::model1) // model I, level II
trs80(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(m1_mem)
- MCFG_DEVICE_IO_MAP(m1_io)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(trs80_state, rtc_interrupt, 40)
+ m_maincpu->set_addrmap(AS_PROGRAM, &trs80_state::m1_mem);
+ m_maincpu->set_addrmap(AS_IO, &trs80_state::m1_io);
+ m_maincpu->set_periodic_int(FUNC(trs80_state::rtc_interrupt), attotime::from_hz(40));
/* devices */
m_cassette->set_formats(trs80l2_cassette_formats);
@@ -571,46 +571,44 @@ MACHINE_CONFIG_START(trs80_state::model1) // model I, level II
RS232_PORT(config, "rs232", default_rs232_devices, nullptr);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(trs80_state::sys80)
+void trs80_state::sys80(machine_config &config)
+{
model1(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(sys80_io)
+ m_maincpu->set_addrmap(AS_IO, &trs80_state::sys80_io);
config.device_remove("brg");
CLOCK(config, m_uart_clock, 19200 * 16);
m_uart_clock->signal_handler().set(m_uart, FUNC(ay31015_device::write_rcp));
m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_tcp));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(trs80_state::sys80p)
+void trs80_state::sys80p(machine_config &config)
+{
sys80(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(10.48_MHz_XTAL / 6)
- MCFG_DEVICE_MODIFY("screen")
- MCFG_SCREEN_RAW_PARAMS(10.48_MHz_XTAL, 672, 0, 384, 312, 0, 192)
-MACHINE_CONFIG_END
+ m_maincpu->set_clock(10.48_MHz_XTAL / 6);
+ subdevice<screen_device>("screen")->set_raw(10.48_MHz_XTAL, 672, 0, 384, 312, 0, 192);
+}
-MACHINE_CONFIG_START(trs80_state::ht1080z)
+void trs80_state::ht1080z(machine_config &config)
+{
sys80p(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(ht1080z_io)
+ m_maincpu->set_addrmap(AS_IO, &trs80_state::ht1080z_io);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(trs80_state, screen_update_ht1080z)
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(trs80_state::screen_update_ht1080z));
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_ht1080z);
AY8910(config, "ay1", 1'500'000).add_route(ALL_OUTPUTS, "mono", 0.25); // guess of clock
//ay1.port_a_read_callback(FUNC(trs80_state::...); // ports are some kind of expansion slot
//ay1.port_b_read_callback(FUNC(trs80_state::...);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(trs80_state::lnw80)
+void trs80_state::lnw80(machine_config &config)
+{
model1(config);
- MCFG_DEVICE_MODIFY("maincpu")
- //MCFG_DEVICE_CLOCK(16_MHz_XTAL / 4) // or 16MHz / 9; 4MHz or 1.77MHz operation selected by HI/LO switch
- MCFG_DEVICE_CLOCK(16_MHz_XTAL / 9) // need this so cassette can work
- MCFG_DEVICE_PROGRAM_MAP(lnw80_mem)
- MCFG_DEVICE_IO_MAP(lnw80_io)
+ //m_maincpu->set_clock(16_MHz_XTAL / 4); // or 16MHz / 9; 4MHz or 1.77MHz operation selected by HI/LO switch
+ m_maincpu->set_clock(16_MHz_XTAL / 9); // need this so cassette can work
+ m_maincpu->set_addrmap(AS_PROGRAM, &trs80_state::lnw80_mem);
+ m_maincpu->set_addrmap(AS_IO, &trs80_state::lnw80_io);
ADDRESS_MAP_BANK(config, m_lnw_bank, 0);
m_lnw_bank->set_addrmap(0, &trs80_state::lnw_banked_mem);
@@ -623,30 +621,28 @@ MACHINE_CONFIG_START(trs80_state::lnw80)
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_lnw80);
subdevice<palette_device>("palette")->set_entries(8).set_init(FUNC(trs80_state::lnw80_palette));
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_RAW_PARAMS(3.579545_MHz_XTAL * 3, 682, 0, 480, 264, 0, 192) // 10.738MHz generated by tank circuit (top left of page 2 of schematics)
+ subdevice<screen_device>("screen")->set_raw(3.579545_MHz_XTAL * 3, 682, 0, 480, 264, 0, 192); // 10.738MHz generated by tank circuit (top left of page 2 of schematics)
// LNW80 Theory of Operations gives H and V periods as 15.750kHz and 59.66Hz, probably due to rounding the calculated ~15.7468kHz to 4 figures
- MCFG_SCREEN_UPDATE_DRIVER(trs80_state, screen_update_lnw80)
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(trs80_state::screen_update_lnw80));
config.device_remove("brg");
CLOCK(config, m_uart_clock, 19200 * 16);
m_uart_clock->signal_handler().set(m_uart, FUNC(ay31015_device::write_rcp));
m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_tcp));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(trs80_state::radionic)
+void trs80_state::radionic(machine_config &config)
+{
model1(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(12_MHz_XTAL / 6) // or 3.579MHz / 2 (selectable?)
+ m_maincpu->set_clock(12_MHz_XTAL / 6); // or 3.579MHz / 2 (selectable?)
// Komtek I "User Friendly Manual" calls for "Z80 running at 1.97 MHz." This likely refers to an alternate NTSC version
// whose master clock was approximately 11.8005 MHz (6 times ~1.966 MHz and 750 times 15.734 kHz). Though the schematics
// provide the main XTAL frequency as 12 MHz, that they also include a 3.579 MHz XTAL suggests this possibility.
- MCFG_DEVICE_PERIODIC_INT_DRIVER(trs80_state, nmi_line_pulse, 12_MHz_XTAL / 12 / 16384)
- MCFG_DEVICE_PROGRAM_MAP(radionic_mem)
+ m_maincpu->set_periodic_int(FUNC(trs80_state::nmi_line_pulse), attotime::from_hz(12_MHz_XTAL / 12 / 16384));
+ m_maincpu->set_addrmap(AS_PROGRAM, &trs80_state::radionic_mem);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_RAW_PARAMS(12_MHz_XTAL, 768, 0, 512, 312, 0, 256)
- MCFG_SCREEN_UPDATE_DRIVER(trs80_state, screen_update_radionic)
+ subdevice<screen_device>("screen")->set_raw(12_MHz_XTAL, 768, 0, 512, 312, 0, 256);
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(trs80_state::screen_update_radionic));
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_radionic);
// Interface to external circuits
@@ -655,7 +651,7 @@ MACHINE_CONFIG_START(trs80_state::radionic)
//m_ppi->out_pa_callback().set(FUNC(pulsar_state::ppi_pa_w)); // Data for external plugin printer module
//m_ppi->out_pb_callback().set(FUNC(pulsar_state::ppi_pb_w)); // Control data to external
//m_ppi->out_pc_callback().set(FUNC(pulsar_state::ppi_pc_w)); // Printer strobe
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/trs80m2.cpp b/src/mame/drivers/trs80m2.cpp
index 72f863a2dc1..ba499eb57e5 100644
--- a/src/mame/drivers/trs80m2.cpp
+++ b/src/mame/drivers/trs80m2.cpp
@@ -704,7 +704,7 @@ void trs80m2_state::machine_reset()
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( trs80m2 )
+// machine_config( trs80m2 )
//-------------------------------------------------
void trs80m2_state::trs80m2(machine_config &config)
@@ -791,7 +791,7 @@ void trs80m2_state::trs80m2(machine_config &config)
//-------------------------------------------------
-// MACHINE_CONFIG( trs80m16 )
+// machine_config( trs80m16 )
//-------------------------------------------------
void trs80m16_state::trs80m16(machine_config &config)
diff --git a/src/mame/drivers/trs80m3.cpp b/src/mame/drivers/trs80m3.cpp
index def0c09bd95..953b16f98b2 100644
--- a/src/mame/drivers/trs80m3.cpp
+++ b/src/mame/drivers/trs80m3.cpp
@@ -335,16 +335,16 @@ static void trs80_floppies(device_slot_interface &device)
MACHINE_CONFIG_START(trs80m3_state::model3)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 20.2752_MHz_XTAL / 10) // FIXME: actual Model III XTAL is 10.1376 MHz
- MCFG_DEVICE_PROGRAM_MAP(m3_mem)
- MCFG_DEVICE_IO_MAP(m3_io)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(trs80m3_state, rtc_interrupt, 20.2752_MHz_XTAL / 10 / 67584)
+ Z80(config, m_maincpu, 20.2752_MHz_XTAL / 10); // FIXME: actual Model III XTAL is 10.1376 MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &trs80m3_state::m3_mem);
+ m_maincpu->set_addrmap(AS_IO, &trs80m3_state::m3_io);
+ m_maincpu->set_periodic_int(FUNC(trs80m3_state::rtc_interrupt), attotime::from_hz(20.2752_MHz_XTAL / 10 / 67584));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(12.672_MHz_XTAL, 800, 0, 640, 264, 0, 240) // FIXME: these are Model 4 80-column parameters
- MCFG_SCREEN_UPDATE_DRIVER(trs80m3_state, screen_update_trs80m3)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(12.672_MHz_XTAL, 800, 0, 640, 264, 0, 240); // FIXME: these are Model 4 80-column parameters
+ screen.set_screen_update(FUNC(trs80m3_state::screen_update_trs80m3));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_trs80m3);
PALETTE(config, "palette", palette_device::MONOCHROME);
@@ -392,11 +392,11 @@ MACHINE_CONFIG_START(trs80m3_state::model3)
RS232_PORT(config, "rs232", default_rs232_devices, nullptr);
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(trs80m3_state::model4)
+void trs80m3_state::model4(machine_config &config)
+{
model3(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(m4_mem)
- MCFG_DEVICE_IO_MAP(m4_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &trs80m3_state::m4_mem);
+ m_maincpu->set_addrmap(AS_IO, &trs80m3_state::m4_io);
RAM(config, m_mainram, 0);
m_mainram->set_default_size("64K");
@@ -408,13 +408,13 @@ MACHINE_CONFIG_START(trs80m3_state::model4)
m_m4_bank->set_data_width(8);
m_m4_bank->set_addr_width(18);
m_m4_bank->set_stride(0x10000);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(trs80m3_state::model4p)
+void trs80m3_state::model4p(machine_config &config)
+{
model3(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(m4p_mem)
- MCFG_DEVICE_IO_MAP(m4p_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &trs80m3_state::m4p_mem);
+ m_maincpu->set_addrmap(AS_IO, &trs80m3_state::m4p_io);
RAM(config, m_mainram, 0);
m_mainram->set_default_size("64K");
@@ -428,13 +428,13 @@ MACHINE_CONFIG_START(trs80m3_state::model4p)
m_m4p_bank->set_stride(0x10000);
config.device_remove("quickload");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(trs80m3_state::cp500)
+void trs80m3_state::cp500(machine_config &config)
+{
model3(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(cp500_io)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &trs80m3_state::cp500_io);
+}
/***************************************************************************
diff --git a/src/mame/drivers/truco.cpp b/src/mame/drivers/truco.cpp
index c3dcf0e6c5e..76166d70408 100644
--- a/src/mame/drivers/truco.cpp
+++ b/src/mame/drivers/truco.cpp
@@ -417,12 +417,12 @@ INTERRUPT_GEN_MEMBER(truco_state::interrupt)
* Machine Driver *
*******************************************/
-MACHINE_CONFIG_START(truco_state::truco)
-
+void truco_state::truco(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6809, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", truco_state, interrupt)
+ M6809(config, m_maincpu, CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &truco_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(truco_state::interrupt));
WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_msec(1600)); /* 1.6 seconds */
@@ -436,13 +436,13 @@ MACHINE_CONFIG_START(truco_state::truco)
pia.irqb_handler().set(FUNC(truco_state::pia_irqb_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(256, 192)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 192-1)
- MCFG_SCREEN_UPDATE_DRIVER(truco_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(256, 192);
+ screen.set_visarea(0, 256-1, 0, 192-1);
+ screen.set_screen_update(FUNC(truco_state::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(truco_state::truco_palette), 16);
@@ -456,7 +456,7 @@ MACHINE_CONFIG_START(truco_state::truco)
DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.4);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref", 0));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/trucocl.cpp b/src/mame/drivers/trucocl.cpp
index bfd624c5976..94735cdf7f5 100644
--- a/src/mame/drivers/trucocl.cpp
+++ b/src/mame/drivers/trucocl.cpp
@@ -180,23 +180,24 @@ INTERRUPT_GEN_MEMBER(trucocl_state::trucocl_interrupt)
device.execute().set_input_line(0, HOLD_LINE);
}
-MACHINE_CONFIG_START(trucocl_state::trucocl)
+void trucocl_state::trucocl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 18432000/6)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(main_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", trucocl_state, trucocl_interrupt)
+ Z80(config, m_maincpu, 18432000/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &trucocl_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &trucocl_state::main_io);
+ m_maincpu->set_vblank_int("screen", FUNC(trucocl_state::trucocl_interrupt));
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(trucocl_state, screen_update_trucocl)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(trucocl_state::screen_update_trucocl));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_trucocl);
PALETTE(config, "palette", FUNC(trucocl_state::trucocl_palette), 32);
@@ -208,7 +209,7 @@ MACHINE_CONFIG_START(trucocl_state::trucocl)
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/trvmadns.cpp b/src/mame/drivers/trvmadns.cpp
index 779828acbb0..93e34381e1d 100644
--- a/src/mame/drivers/trvmadns.cpp
+++ b/src/mame/drivers/trvmadns.cpp
@@ -387,31 +387,30 @@ void trvmadns_state::machine_reset()
m_old_data = -1;
}
-MACHINE_CONFIG_START(trvmadns_state::trvmadns)
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(10'000'000)/4) // Most likely 2.5MHz (less likely 5MHz (10MHz/2))
- MCFG_DEVICE_PROGRAM_MAP(cpu_map)
- MCFG_DEVICE_IO_MAP(io_map)
-
+void trvmadns_state::trvmadns(machine_config &config)
+{
+ Z80(config, m_maincpu, XTAL(10'000'000)/4); // Most likely 2.5MHz (less likely 5MHz (10MHz/2))
+ m_maincpu->set_addrmap(AS_PROGRAM, &trvmadns_state::cpu_map);
+ m_maincpu->set_addrmap(AS_IO, &trvmadns_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(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 31*8-1, 0*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(trvmadns_state, screen_update_trvmadns)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(INPUTLINE("maincpu", INPUT_LINE_NMI))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(256, 256);
+ screen.set_visarea(0*8, 31*8-1, 0*8, 30*8-1);
+ screen.set_screen_update(FUNC(trvmadns_state::screen_update_trvmadns));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_trvmadns);
- MCFG_PALETTE_ADD("palette", 16)
-
+ PALETTE(config, m_palette).set_entries(16);
/* sound hardware */
SPEAKER(config, "mono").front_center();
AY8910(config, "aysnd", XTAL(10'000'000)/2/4).add_route(ALL_OUTPUTS, "mono", 1.0); //?
-MACHINE_CONFIG_END
+}
ROM_START( trvmadns )
diff --git a/src/mame/drivers/tryout.cpp b/src/mame/drivers/tryout.cpp
index ac8f10ded2e..5a30afd1faf 100644
--- a/src/mame/drivers/tryout.cpp
+++ b/src/mame/drivers/tryout.cpp
@@ -191,23 +191,24 @@ static GFXDECODE_START( gfx_tryout )
GFXDECODE_ENTRY( nullptr, 0, vramlayout, 0, 4 )
GFXDECODE_END
-MACHINE_CONFIG_START(tryout_state::tryout)
+void tryout_state::tryout(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 2000000) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(main_cpu)
+ M6502(config, m_maincpu, 2000000); /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tryout_state::main_cpu);
- MCFG_DEVICE_ADD("audiocpu", M6502, 1500000) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(sound_cpu)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(tryout_state, nmi_line_pulse, 1000) /* controls BGM tempo, 1000 is an hand-tuned value to match a side-by-side video */
+ M6502(config, m_audiocpu, 1500000); /* ? */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &tryout_state::sound_cpu);
+ m_audiocpu->set_periodic_int(FUNC(tryout_state::nmi_line_pulse), attotime::from_hz(1000)); /* controls BGM tempo, 1000 is an hand-tuned value to match a side-by-side video */
/* 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(tryout_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(256, 256);
+ screen.set_visarea(0*8, 32*8-1, 1*8, 31*8-1);
+ screen.set_screen_update(FUNC(tryout_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tryout);
PALETTE(config, m_palette, FUNC(tryout_state::tryout_palette), 0x20);
@@ -217,9 +218,8 @@ MACHINE_CONFIG_START(tryout_state::tryout)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("ymsnd", YM2203, 1500000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ YM2203(config, "ymsnd", 1500000).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
ROM_START( tryout )
ROM_REGION( 0x14000, "maincpu", 0 )
diff --git a/src/mame/drivers/ts3000.cpp b/src/mame/drivers/ts3000.cpp
index 148be14f9a4..65fdb5d6312 100644
--- a/src/mame/drivers/ts3000.cpp
+++ b/src/mame/drivers/ts3000.cpp
@@ -43,11 +43,12 @@ void ts3000_state::io_map(address_map &map)
static INPUT_PORTS_START( ts3000 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(ts3000_state::ts3000)
- MCFG_DEVICE_ADD("maincpu", I8088, XTAL(14'318'181)/3) // no idea of clock
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
-MACHINE_CONFIG_END
+void ts3000_state::ts3000(machine_config &config)
+{
+ i8088_cpu_device &maincpu(I8088(config, "maincpu", XTAL(14'318'181)/3)); // no idea of clock
+ maincpu.set_addrmap(AS_PROGRAM, &ts3000_state::mem_map);
+ maincpu.set_addrmap(AS_IO, &ts3000_state::io_map);
+}
ROM_START( ts3000 )
ROM_REGION( 0x4000, "roms", 0 )
diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp
index 63f4277b236..dab0db07855 100644
--- a/src/mame/drivers/tsamurai.cpp
+++ b/src/mame/drivers/tsamurai.cpp
@@ -717,18 +717,18 @@ GFXDECODE_END
/*******************************************************************************/
-MACHINE_CONFIG_START(tsamurai_state::tsamurai)
-
+void tsamurai_state::tsamurai(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(24'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(z80_io_map)
+ Z80(config, m_maincpu, XTAL(24'000'000)/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tsamurai_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &tsamurai_state::z80_io_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(24'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(sound1_map)
+ Z80(config, m_audiocpu, XTAL(24'000'000)/8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &tsamurai_state::sound1_map);
- MCFG_DEVICE_ADD("audio2", Z80, XTAL(24'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(sound2_map)
+ Z80(config, m_audio2, XTAL(24'000'000)/8);
+ m_audio2->set_addrmap(AS_PROGRAM, &tsamurai_state::sound2_map);
MCFG_MACHINE_START_OVERRIDE(tsamurai_state,tsamurai)
@@ -740,14 +740,14 @@ MACHINE_CONFIG_START(tsamurai_state::tsamurai)
mainlatch.q_out_cb<4>().set(FUNC(tsamurai_state::coin2_counter_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 255-16)
- MCFG_SCREEN_UPDATE_DRIVER(tsamurai_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tsamurai_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0, 255, 16, 255-16);
+ screen.set_screen_update(FUNC(tsamurai_state::screen_update));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(tsamurai_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tsamurai);
PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256);
@@ -763,19 +763,19 @@ MACHINE_CONFIG_START(tsamurai_state::tsamurai)
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
-
+}
-MACHINE_CONFIG_START(tsamurai_state::vsgongf)
+void tsamurai_state::vsgongf(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(24'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(vsgongf_map)
+ Z80(config, m_maincpu, XTAL(24'000'000)/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tsamurai_state::vsgongf_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(24'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(sound_vsgongf_map)
- MCFG_DEVICE_IO_MAP(vsgongf_audio_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(tsamurai_state, vsgongf_sound_interrupt, 3*60)
+ Z80(config, m_audiocpu, XTAL(24'000'000)/8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &tsamurai_state::sound_vsgongf_map);
+ m_audiocpu->set_addrmap(AS_IO, &tsamurai_state::vsgongf_audio_io_map);
+ m_audiocpu->set_periodic_int(FUNC(tsamurai_state::vsgongf_sound_interrupt), attotime::from_hz(3*60));
MCFG_MACHINE_START_OVERRIDE(tsamurai_state,vsgongf)
@@ -787,14 +787,14 @@ MACHINE_CONFIG_START(tsamurai_state::vsgongf)
mainlatch.q_out_cb<4>().set(FUNC(tsamurai_state::textbank1_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 16, 255-16)
- MCFG_SCREEN_UPDATE_DRIVER(tsamurai_state, screen_update_vsgongf)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tsamurai_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0, 255, 16, 255-16);
+ screen.set_screen_update(FUNC(tsamurai_state::screen_update_vsgongf));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(tsamurai_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tsamurai);
PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256);
@@ -811,25 +811,25 @@ MACHINE_CONFIG_START(tsamurai_state::vsgongf)
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(tsamurai_state::m660)
+void tsamurai_state::m660(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(24'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(m660_map)
- MCFG_DEVICE_IO_MAP(z80_m660_io_map)
+ Z80(config, m_maincpu, XTAL(24'000'000)/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tsamurai_state::m660_map);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tsamurai_state::z80_m660_io_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(24'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(sound1_m660_map)
+ Z80(config, m_audiocpu, XTAL(24'000'000)/8);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &tsamurai_state::sound1_m660_map);
- MCFG_DEVICE_ADD("audio2", Z80, XTAL(24'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(sound2_m660_map)
+ Z80(config, m_audio2, XTAL(24'000'000)/8);
+ m_audio2->set_addrmap(AS_PROGRAM, &tsamurai_state::sound2_m660_map);
- MCFG_DEVICE_ADD("audio3", Z80, XTAL(24'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(sound3_m660_map)
- MCFG_DEVICE_IO_MAP(sound3_m660_io_map)
+ Z80(config, m_audio3, XTAL(24'000'000)/8);
+ m_audio3->set_addrmap(AS_PROGRAM, &tsamurai_state::sound3_m660_map);
+ m_audio3->set_addrmap(AS_IO, &tsamurai_state::sound3_m660_io_map);
MCFG_MACHINE_START_OVERRIDE(tsamurai_state,m660)
@@ -866,7 +866,7 @@ MACHINE_CONFIG_START(tsamurai_state::m660)
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
+}
/*******************************************************************************/
diff --git a/src/mame/drivers/ttchamp.cpp b/src/mame/drivers/ttchamp.cpp
index 45cbb0df0bf..270f1984a0e 100644
--- a/src/mame/drivers/ttchamp.cpp
+++ b/src/mame/drivers/ttchamp.cpp
@@ -645,32 +645,30 @@ INTERRUPT_GEN_MEMBER(ttchamp_state::irq)/* right? */
device.execute().pulse_input_line(INPUT_LINE_NMI, attotime::zero);
}
-MACHINE_CONFIG_START(ttchamp_state::ttchamp)
+void ttchamp_state::ttchamp(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V30, 8000000)
- MCFG_DEVICE_PROGRAM_MAP(ttchamp_map)
- MCFG_DEVICE_IO_MAP(ttchamp_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", ttchamp_state, irq)
+ V30(config, m_maincpu, 8000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ttchamp_state::ttchamp_map);
+ m_maincpu->set_addrmap(AS_IO, &ttchamp_state::ttchamp_io);
+ m_maincpu->set_vblank_int("screen", FUNC(ttchamp_state::irq));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(1024,1024)
- MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 200-1)
- MCFG_SCREEN_UPDATE_DRIVER(ttchamp_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 0x400)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(1024,1024);
+ screen.set_visarea(0, 320-1, 0, 200-1);
+ screen.set_screen_update(FUNC(ttchamp_state::screen_update));
+ screen.set_palette(m_palette);
+ PALETTE(config, m_palette).set_entries(0x400);
NVRAM(config, "backram", nvram_device::DEFAULT_ALL_0);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 8000000/8, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", 8000000/8, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
ROM_START( ttchamp )
ROM_REGION16_LE( 0x200000, "maincpu", 0 )
diff --git a/src/mame/drivers/tugboat.cpp b/src/mame/drivers/tugboat.cpp
index 55e3d72b31c..93e6e1863d6 100644
--- a/src/mame/drivers/tugboat.cpp
+++ b/src/mame/drivers/tugboat.cpp
@@ -359,9 +359,10 @@ static GFXDECODE_START( gfx_tugboat )
GFXDECODE_END
-MACHINE_CONFIG_START(tugboat_state::tugboat)
- MCFG_DEVICE_ADD("maincpu", M6502, 2000000) /* 2 MHz ???? */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+void tugboat_state::tugboat(machine_config &config)
+{
+ M6502(config, m_maincpu, 2000000); /* 2 MHz ???? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tugboat_state::main_map);
pia6821_device &pia0(PIA6821(config, "pia0", 0));
pia0.readpa_handler().set(FUNC(tugboat_state::input_r));
@@ -370,13 +371,13 @@ MACHINE_CONFIG_START(tugboat_state::tugboat)
pia1.readpa_handler().set_ioport("DSW");
pia1.writepb_handler().set(FUNC(tugboat_state::ctrl_w));
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(32*8,32*8)
- MCFG_SCREEN_VISIBLE_AREA(1*8,31*8-1,2*8,30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(tugboat_state, screen_update)
- MCFG_SCREEN_PALETTE(m_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_size(32*8,32*8);
+ m_screen->set_visarea(1*8,31*8-1,2*8,30*8-1);
+ m_screen->set_screen_update(FUNC(tugboat_state::screen_update));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tugboat);
PALETTE(config, m_palette, FUNC(tugboat_state::tugboat_palette), 256);
@@ -385,7 +386,7 @@ MACHINE_CONFIG_START(tugboat_state::tugboat)
SPEAKER(config, "mono").front_center();
AY8912(config, "aysnd", XTAL(10'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.35);
-MACHINE_CONFIG_END
+}
ROM_START( tugboat )
diff --git a/src/mame/drivers/tumbleb.cpp b/src/mame/drivers/tumbleb.cpp
index 0f5f81d7cfe..0b91a31aacf 100644
--- a/src/mame/drivers/tumbleb.cpp
+++ b/src/mame/drivers/tumbleb.cpp
@@ -2065,24 +2065,24 @@ MACHINE_RESET_MEMBER(tumbleb_state,tumbleb)
memset(m_control_0, 0, sizeof(m_control_0));
}
-MACHINE_CONFIG_START(tumbleb_state::tumblepb)
-
+void tumbleb_state::tumblepb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 14000000)
- MCFG_DEVICE_PROGRAM_MAP(tumblepopb_main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tumbleb_state, irq6_line_hold)
+ M68000(config, m_maincpu, 14000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tumbleb_state::tumblepopb_main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tumbleb_state::irq6_line_hold));
MCFG_MACHINE_START_OVERRIDE(tumbleb_state,tumbleb)
MCFG_MACHINE_RESET_OVERRIDE(tumbleb_state,tumbleb)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(58)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(tumbleb_state, screen_update_tumblepb)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(58);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(529));
+ m_screen->set_size(40*8, 32*8);
+ m_screen->set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
+ m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_tumblepb));
+ m_screen->set_palette(m_palette);
DECO_SPRITE(config, m_sprgen, 0);
m_sprgen->set_gfx_region(3);
@@ -2097,34 +2097,33 @@ MACHINE_CONFIG_START(tumbleb_state::tumblepb)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 8000000/10, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, 8000000/10, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70);
+}
-MACHINE_CONFIG_START(tumbleb_state::tumblepba)
+void tumbleb_state::tumblepba(machine_config &config)
+{
tumblepb(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(tumblepopba_main_map)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(tumbleb_state::tumbleb2)
+ m_maincpu->set_addrmap(AS_PROGRAM, &tumbleb_state::tumblepopba_main_map);
+}
+void tumbleb_state::tumbleb2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, M68000, 14000000)
- MCFG_DEVICE_PROGRAM_MAP(tumblepopb_main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tumbleb_state, tumbleb2_interrupt)
+ M68000(config, m_maincpu, 14000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tumbleb_state::tumblepopb_main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tumbleb_state::tumbleb2_interrupt));
MCFG_MACHINE_START_OVERRIDE(tumbleb_state,tumbleb)
MCFG_MACHINE_RESET_OVERRIDE(tumbleb_state,tumbleb)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(58)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(tumbleb_state, screen_update_tumblepb)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(58);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(529));
+ m_screen->set_size(40*8, 32*8);
+ m_screen->set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
+ m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_tumblepb));
+ m_screen->set_palette(m_palette);
DECO_SPRITE(config, m_sprgen, 0);
m_sprgen->set_gfx_region(3);
@@ -2139,9 +2138,8 @@ MACHINE_CONFIG_START(tumbleb_state::tumbleb2)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 8000000/10, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, 8000000/10, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70);
+}
void tumbleb_state::funkyjetb(machine_config &config)
{
@@ -2151,28 +2149,28 @@ void tumbleb_state::funkyjetb(machine_config &config)
m_maincpu->set_vblank_int("screen", FUNC(tumbleb_state::irq6_line_hold));
}
-MACHINE_CONFIG_START(tumbleb_state::jumpkids)
-
+void tumbleb_state::jumpkids(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(jumpkids_main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tumbleb_state, irq6_line_hold)
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tumbleb_state::jumpkids_main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tumbleb_state::irq6_line_hold));
/* z80? */
- MCFG_DEVICE_ADD("audiocpu", Z80, 8000000/2)
- MCFG_DEVICE_PROGRAM_MAP(jumpkids_sound_map)
+ Z80(config, m_audiocpu, 8000000/2);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &tumbleb_state::jumpkids_sound_map);
MCFG_MACHINE_START_OVERRIDE(tumbleb_state,tumbleb)
MCFG_MACHINE_RESET_OVERRIDE(tumbleb_state,tumbleb)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(tumbleb_state, screen_update_jumpkids)
- 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(529));
+ m_screen->set_size(40*8, 32*8);
+ m_screen->set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
+ m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_jumpkids));
+ m_screen->set_palette(m_palette);
DECO_SPRITE(config, m_sprgen, 0);
m_sprgen->set_gfx_region(3);
@@ -2189,28 +2187,27 @@ MACHINE_CONFIG_START(tumbleb_state::jumpkids)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("oki", OKIM6295, 8000000/8, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(tumbleb_state::fncywld)
+ OKIM6295(config, m_oki, 8000000/8, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.70);
+}
+void tumbleb_state::fncywld(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(fncywld_main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tumbleb_state, irq6_line_hold)
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tumbleb_state::fncywld_main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tumbleb_state::irq6_line_hold));
MCFG_MACHINE_START_OVERRIDE(tumbleb_state,tumbleb)
MCFG_MACHINE_RESET_OVERRIDE(tumbleb_state,tumbleb)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(tumbleb_state, screen_update_fncywld)
- 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(529));
+ m_screen->set_size(40*8, 32*8);
+ m_screen->set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
+ m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_fncywld));
+ m_screen->set_palette(m_palette);
DECO_SPRITE(config, m_sprgen, 0);
m_sprgen->set_gfx_region(3);
@@ -2228,29 +2225,28 @@ MACHINE_CONFIG_START(tumbleb_state::fncywld)
YM2151(config, "ymsnd", 32220000/9).add_route(ALL_OUTPUTS, "mono", 0.10);
- MCFG_DEVICE_ADD("oki", OKIM6295, 1023924, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, 1023924, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified
+}
/// OSCs: 12MHz, 4MHz, 28.63636MHz, not the same PCB as fncywld
-MACHINE_CONFIG_START(tumbleb_state::magipur)
-
+void tumbleb_state::magipur(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(12'000'000))
- MCFG_DEVICE_PROGRAM_MAP(magipur_main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tumbleb_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(12'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &tumbleb_state::magipur_main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(tumbleb_state::irq6_line_hold));
MCFG_MACHINE_START_OVERRIDE(tumbleb_state,tumbleb)
MCFG_MACHINE_RESET_OVERRIDE(tumbleb_state,tumbleb)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) // refresh rate not verified
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529))
- MCFG_SCREEN_SIZE(40*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 1*8, 31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(tumbleb_state, screen_update_fncywld)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60); // refresh rate not verified
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(529));
+ m_screen->set_size(40*8, 32*8);
+ m_screen->set_visarea(0*8, 40*8-1, 1*8, 31*8-1);
+ m_screen->set_screen_update(FUNC(tumbleb_state::screen_update_fncywld));
+ m_screen->set_palette(m_palette);
DECO_SPRITE(config, m_sprgen, 0);
m_sprgen->set_gfx_region(3);
@@ -2268,9 +2264,8 @@ MACHINE_CONFIG_START(tumbleb_state::magipur)
YM2151(config, "ymsnd", XTAL(4'000'000)).add_route(ALL_OUTPUTS, "mono", 0.10);
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(4'000'000)/4, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, XTAL(4'000'000)/4, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified
+}
MACHINE_RESET_MEMBER(tumbleb_state,htchctch)
diff --git a/src/mame/drivers/turbo.cpp b/src/mame/drivers/turbo.cpp
index 4fe5dc1842b..80e6d144308 100644
--- a/src/mame/drivers/turbo.cpp
+++ b/src/mame/drivers/turbo.cpp
@@ -843,12 +843,12 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(turbo_state::turbo)
-
+void turbo_state::turbo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(turbo_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", turbo_state, irq0_line_hold)
+ Z80(config, m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &turbo_state::turbo_map);
+ m_maincpu->set_vblank_int("screen", FUNC(turbo_state::irq0_line_hold));
I8255(config, m_i8255_0);
m_i8255_0->out_pa_callback().set(FUNC(turbo_state::turbo_ppi0a_w));
@@ -884,25 +884,25 @@ MACHINE_CONFIG_START(turbo_state::turbo)
GFXDECODE(config, m_gfxdecode, "palette", gfx_turbo);
PALETTE(config, "palette", FUNC(turbo_state::turbo_palette), 256);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(turbo_state, screen_update_turbo)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE);
+ m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ m_screen->set_screen_update(FUNC(turbo_state::screen_update_turbo));
+ m_screen->set_palette("palette");
MCFG_VIDEO_START_OVERRIDE(turbo_state,turbo)
/* sound hardware */
turbo_samples(config);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(turbo_state::subroc3d)
+void turbo_state::subroc3d(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(subroc3d_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", turbo_state, irq0_line_hold)
+ Z80(config, m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &turbo_state::subroc3d_map);
+ m_maincpu->set_vblank_int("screen", FUNC(turbo_state::irq0_line_hold));
I8255(config, m_i8255_0);
m_i8255_0->out_pa_callback().set(FUNC(turbo_state::subroc3d_ppi0a_w));
@@ -923,30 +923,30 @@ MACHINE_CONFIG_START(turbo_state::subroc3d)
GFXDECODE(config, m_gfxdecode, "palette", gfx_turbo);
PALETTE(config, "palette", FUNC(turbo_state::subroc3d_palette), 256);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(turbo_state, screen_update_subroc3d)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE);
+ m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ m_screen->set_screen_update(FUNC(turbo_state::screen_update_subroc3d));
+ m_screen->set_palette("palette");
MCFG_VIDEO_START_OVERRIDE(turbo_state,turbo)
/* sound hardware */
subroc3d_samples(config);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(turbo_state::buckrog)
+void turbo_state::buckrog(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(buckrog_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", turbo_state, irq0_line_hold)
+ Z80(config, m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &turbo_state::buckrog_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &turbo_state::decrypted_opcodes_map);
+ m_maincpu->set_vblank_int("screen", FUNC(turbo_state::irq0_line_hold));
- MCFG_DEVICE_ADD("subcpu", Z80, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(buckrog_cpu2_map)
- MCFG_DEVICE_IO_MAP(buckrog_cpu2_portmap)
+ Z80(config, m_subcpu, MASTER_CLOCK/4);
+ m_subcpu->set_addrmap(AS_PROGRAM, &turbo_state::buckrog_cpu2_map);
+ m_subcpu->set_addrmap(AS_IO, &turbo_state::buckrog_cpu2_portmap);
config.m_minimum_quantum = attotime::from_hz(600);
MCFG_MACHINE_RESET_OVERRIDE(turbo_state,buckrog)
@@ -970,23 +970,25 @@ MACHINE_CONFIG_START(turbo_state::buckrog)
GFXDECODE(config, m_gfxdecode, "palette", gfx_turbo);
PALETTE(config, "palette", FUNC(turbo_state::buckrog_palette), 1024);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(turbo_state, screen_update_buckrog)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE);
+ m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ m_screen->set_screen_update(FUNC(turbo_state::screen_update_buckrog));
+ m_screen->set_palette("palette");
MCFG_VIDEO_START_OVERRIDE(turbo_state,buckrog)
/* sound hardware */
buckrog_samples(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(turbo_state::buckrogu)
+void turbo_state::buckrogu(machine_config &config)
+{
buckrog(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_REMOVE_ADDRESS_MAP(AS_OPCODES)
-MACHINE_CONFIG_END
+ Z80(config.replace(), m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &turbo_state::buckrog_map);
+ m_maincpu->set_vblank_int("screen", FUNC(turbo_state::irq0_line_hold));
+}
void turbo_state::buckroge(machine_config &config)
diff --git a/src/mame/drivers/turrett.cpp b/src/mame/drivers/turrett.cpp
index de69211ca0e..c40bd25bf75 100644
--- a/src/mame/drivers/turrett.cpp
+++ b/src/mame/drivers/turrett.cpp
@@ -345,8 +345,8 @@ void turrett_devices(device_slot_interface &device)
*
*************************************/
-MACHINE_CONFIG_START(turrett_state::turrett)
-
+void turrett_state::turrett(machine_config &config)
+{
/* basic machine hardware */
R3041(config, m_maincpu, R3041_CLOCK);
m_maincpu->set_endianness(ENDIANNESS_BIG);
@@ -359,12 +359,12 @@ MACHINE_CONFIG_START(turrett_state::turrett)
ATA_INTERFACE(config, m_ata).options(turrett_devices, "hdd", nullptr, true);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
// TODO: Likely not correct. Refresh rate empirically determined
// to ensure in-sync streaming sound
- MCFG_SCREEN_RAW_PARAMS(4000000, 512, 0, 336, 259, 0, 244)
- MCFG_SCREEN_UPDATE_DRIVER(turrett_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ m_screen->set_raw(4000000, 512, 0, 336, 259, 0, 244);
+ m_screen->set_screen_update(FUNC(turrett_state::screen_update));
+ m_screen->set_palette("palette");
PALETTE(config, "palette", palette_device::RGB_555);
@@ -372,11 +372,11 @@ MACHINE_CONFIG_START(turrett_state::turrett)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ttsound", TURRETT, R3041_CLOCK) // ?
- MCFG_DEVICE_ADDRESS_MAP(0, turrett_sound_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ turrett_device &ttsound(TURRETT(config, "ttsound", R3041_CLOCK)); // ?
+ ttsound.set_addrmap(0, turrett_sound_map);
+ ttsound.add_route(ALL_OUTPUTS, "lspeaker", 1.0);
+ ttsound.add_route(ALL_OUTPUTS, "rspeaker", 1.0);
+}
diff --git a/src/mame/drivers/tutankhm.cpp b/src/mame/drivers/tutankhm.cpp
index 99acaf88b9d..7e07de74dc9 100644
--- a/src/mame/drivers/tutankhm.cpp
+++ b/src/mame/drivers/tutankhm.cpp
@@ -226,11 +226,11 @@ void tutankhm_state::machine_reset()
m_irq_toggle = 0;
}
-MACHINE_CONFIG_START(tutankhm_state::tutankhm)
-
+void tutankhm_state::tutankhm(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, XTAL(18'432'000)/12) /* 1.5 MHz ??? */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
+ MC6809E(config, m_maincpu, XTAL(18'432'000)/12); /* 1.5 MHz ??? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &tutankhm_state::main_map);
ls259_device &mainlatch(LS259(config, "mainlatch")); // C3
mainlatch.q_out_cb<0>().set(FUNC(tutankhm_state::irq_enable_w));
@@ -245,19 +245,19 @@ MACHINE_CONFIG_START(tutankhm_state::tutankhm)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) /* not sure about the visible area */
- MCFG_SCREEN_UPDATE_DRIVER(tutankhm_state, screen_update_tutankhm)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tutankhm_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); /* not sure about the visible area */
+ screen.set_screen_update(FUNC(tutankhm_state::screen_update_tutankhm));
+ screen.screen_vblank().set(FUNC(tutankhm_state::vblank_irq));
PALETTE(config, m_palette).set_format(palette_device::BGR_233, 16);
/* sound hardware */
TIMEPLT_AUDIO(config, "timeplt_audio");
-MACHINE_CONFIG_END
+}
/*************************************
diff --git a/src/mame/drivers/tvcapcom.cpp b/src/mame/drivers/tvcapcom.cpp
index 3b66e8b3dbc..d4254f72348 100644
--- a/src/mame/drivers/tvcapcom.cpp
+++ b/src/mame/drivers/tvcapcom.cpp
@@ -55,26 +55,25 @@ uint32_t tvcapcom_state::screen_update_tvcapcom(screen_device &screen, bitmap_rg
static INPUT_PORTS_START( tvcapcom )
INPUT_PORTS_END
-MACHINE_CONFIG_START(tvcapcom_state::tvcapcom)
-
+void tvcapcom_state::tvcapcom(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", PPC603, 72900000) // IBM PowerPC Broadway CPU @ 729 MHz ?
- MCFG_DEVICE_PROGRAM_MAP(gc_map)
- MCFG_DEVICE_DISABLE()
+ PPC603(config, m_maincpu, 72900000); // IBM PowerPC Broadway CPU @ 729 MHz ?
+ m_maincpu->set_addrmap(AS_PROGRAM, &tvcapcom_state::gc_map);
+ m_maincpu->set_disable();
config.m_minimum_quantum = attotime::from_hz(6000);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
- MCFG_SCREEN_UPDATE_DRIVER(tvcapcom_state, screen_update_tvcapcom)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 639, 0, 479);
+ screen.set_screen_update(FUNC(tvcapcom_state::screen_update_tvcapcom));
- MCFG_PALETTE_ADD("palette", 65536)
-
-MACHINE_CONFIG_END
+ PALETTE(config, "palette").set_entries(65536);
+}
ROM_START( tvcapcom )
// Bios??
diff --git a/src/mame/drivers/tvgame.cpp b/src/mame/drivers/tvgame.cpp
index 24f911a9a3c..f99e0445b00 100644
--- a/src/mame/drivers/tvgame.cpp
+++ b/src/mame/drivers/tvgame.cpp
@@ -101,32 +101,32 @@ uint32_t tvgame_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
return 0;
}
-MACHINE_CONFIG_START(tvgame_state::tvgame)
+void tvgame_state::tvgame(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ Z80(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &tvgame_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &tvgame_state::io_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_UPDATE_DRIVER(tvgame_state, screen_update)
- MCFG_SCREEN_SIZE(216, 213)
- MCFG_SCREEN_VISIBLE_AREA(0, 215, 0, 212)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_screen_update(FUNC(tvgame_state::screen_update));
+ screen.set_size(216, 213);
+ screen.set_visarea(0, 215, 0, 212);
+ screen.set_palette("palette");
PALETTE(config, "palette", palette_device::MONOCHROME);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50);
// Devices
i8255_device &ppi(I8255(config, "ppi"));
ppi.in_pa_callback().set_ioport("LINE0");
ppi.out_pc_callback().set(FUNC(tvgame_state::speaker_w));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( tvgame )
diff --git a/src/mame/drivers/tx0.cpp b/src/mame/drivers/tx0.cpp
index 0a905600d53..8cd353f7202 100644
--- a/src/mame/drivers/tx0.cpp
+++ b/src/mame/drivers/tx0.cpp
@@ -1537,7 +1537,8 @@ INTERRUPT_GEN_MEMBER(tx0_state::tx0_interrupt)
}
}
-MACHINE_CONFIG_START(tx0_state::tx0_64kw)
+void tx0_state::tx0_64kw(machine_config &config)
+{
/* basic machine hardware */
/* TX0 CPU @ approx. 167 kHz (no master clock, but the memory cycle time is approximately 6usec) */
TX0_64KW(config, m_maincpu, 166667);
@@ -1556,14 +1557,14 @@ MACHINE_CONFIG_START(tx0_state::tx0_64kw)
m_maincpu->set_vblank_int("screen", FUNC(tx0_state::tx0_interrupt));
/* video hardware (includes the control panel and typewriter output) */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(refresh_rate)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(virtual_width, virtual_height)
- MCFG_SCREEN_VISIBLE_AREA(0, virtual_width-1, 0, virtual_height-1)
- MCFG_SCREEN_UPDATE_DRIVER(tx0_state, screen_update_tx0)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tx0_state, screen_vblank_tx0))
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(refresh_rate);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(virtual_width, virtual_height);
+ screen.set_visarea(0, virtual_width-1, 0, virtual_height-1);
+ screen.set_screen_update(FUNC(tx0_state::screen_update_tx0));
+ screen.screen_vblank().set(FUNC(tx0_state::screen_vblank_tx0));
+ screen.set_palette(m_palette);
CRT(config, m_crt, 0);
m_crt->set_num_levels(pen_crt_num_levels);
@@ -1577,18 +1578,17 @@ MACHINE_CONFIG_START(tx0_state::tx0_64kw)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_tx0);
PALETTE(config, m_palette, FUNC(tx0_state::tx0_palette), total_colors_needed + sizeof(tx0_pens), total_colors_needed);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(tx0_state::tx0_8kw)
+void tx0_state::tx0_8kw(machine_config &config)
+{
tx0_64kw(config);
/* basic machine hardware */
/* TX0 CPU @ approx. 167 kHz (no master clock, but the memory cycle time is
approximately 6usec) */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(tx0_8kw_map)
- /*MCFG_CPU_PORTS(readport, writeport)*/
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &tx0_state::tx0_8kw_map);
+}
ROM_START(tx0_64kw)
/*CPU memory space*/
diff --git a/src/mame/drivers/tx1.cpp b/src/mame/drivers/tx1.cpp
index ac7ca3804b7..6bbba6c424c 100644
--- a/src/mame/drivers/tx1.cpp
+++ b/src/mame/drivers/tx1.cpp
@@ -167,15 +167,15 @@ void tx1_state::buggyboy_math(address_map &map)
*
*************************************/
-MACHINE_CONFIG_START(tx1_state::tx1)
- MCFG_DEVICE_ADD("main_cpu", I8086, CPU_MASTER_CLOCK / 3)
- MCFG_DEVICE_PROGRAM_MAP(tx1_main)
+void tx1_state::tx1(machine_config &config)
+{
+ I8086(config, m_maincpu, CPU_MASTER_CLOCK / 3);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tx1_state::tx1_main);
- WATCHDOG_TIMER(config, "watchdog");
-// MCFG_WATCHDOG_TIME_INIT(5)
+ WATCHDOG_TIMER(config, "watchdog");//.set_time(5);
- MCFG_DEVICE_ADD("math_cpu", I8086, CPU_MASTER_CLOCK / 3)
- MCFG_DEVICE_PROGRAM_MAP(tx1_math)
+ I8086(config, m_mathcpu, CPU_MASTER_CLOCK / 3);
+ m_mathcpu->set_addrmap(AS_PROGRAM, &tx1_state::tx1_math);
MCFG_MACHINE_RESET_OVERRIDE(tx1_state,tx1)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -184,97 +184,96 @@ MACHINE_CONFIG_START(tx1_state::tx1)
config.set_default_layout(layout_triphsxs);
- MCFG_SCREEN_ADD("lscreen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(TX1_PIXEL_CLOCK, TX1_HTOTAL, TX1_HBEND, TX1_HBSTART, TX1_VTOTAL, TX1_VBEND, TX1_VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(tx1_state, screen_update_tx1_left)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER));
+ lscreen.set_raw(TX1_PIXEL_CLOCK, TX1_HTOTAL, TX1_HBEND, TX1_HBSTART, TX1_VTOTAL, TX1_VBEND, TX1_VBSTART);
+ lscreen.set_screen_update(FUNC(tx1_state::screen_update_tx1_left));
+ lscreen.set_palette("palette");
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(TX1_PIXEL_CLOCK, TX1_HTOTAL, TX1_HBEND, TX1_HBSTART, TX1_VTOTAL, TX1_VBEND, TX1_VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(tx1_state, screen_update_tx1_middle)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(TX1_PIXEL_CLOCK, TX1_HTOTAL, TX1_HBEND, TX1_HBSTART, TX1_VTOTAL, TX1_VBEND, TX1_VBSTART);
+ m_screen->set_screen_update(FUNC(tx1_state::screen_update_tx1_middle));
+ m_screen->set_palette("palette");
- MCFG_SCREEN_ADD("rscreen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(TX1_PIXEL_CLOCK, TX1_HTOTAL, TX1_HBEND, TX1_HBSTART, TX1_VTOTAL, TX1_VBEND, TX1_VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(tx1_state, screen_update_tx1_right)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tx1_state, screen_vblank_tx1))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER));
+ rscreen.set_raw(TX1_PIXEL_CLOCK, TX1_HTOTAL, TX1_HBEND, TX1_HBSTART, TX1_VTOTAL, TX1_VBEND, TX1_VBSTART);
+ rscreen.set_screen_update(FUNC(tx1_state::screen_update_tx1_right));
+ rscreen.screen_vblank().set(FUNC(tx1_state::screen_vblank_tx1));
+ rscreen.set_palette("palette");
MCFG_VIDEO_START_OVERRIDE(tx1_state,tx1)
- MCFG_DEVICE_ADD("soundbrd", TX1_SOUND, TX1_PIXEL_CLOCK)
-MACHINE_CONFIG_END
+ TX1_SOUND(config, m_sound, TX1_PIXEL_CLOCK);
+}
-MACHINE_CONFIG_START(tx1_state::tx1j)
+void tx1_state::tx1j(machine_config &config)
+{
tx1(config);
- config.device_remove("soundbrd");
-
- MCFG_DEVICE_ADD("soundbrd", TX1J_SOUND, TX1_PIXEL_CLOCK)
-MACHINE_CONFIG_END
+ TX1J_SOUND(config.replace(), m_sound, TX1_PIXEL_CLOCK);
+}
-MACHINE_CONFIG_START(tx1_state::buggyboy)
- MCFG_DEVICE_ADD("main_cpu", I8086, CPU_MASTER_CLOCK / 3)
- MCFG_DEVICE_PROGRAM_MAP(buggyboy_main)
+void tx1_state::buggyboy(machine_config &config)
+{
+ I8086(config, m_maincpu, CPU_MASTER_CLOCK / 3);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tx1_state::buggyboy_main);
- WATCHDOG_TIMER(config, "watchdog");
-// MCFG_WATCHDOG_TIME_INIT(5)
+ WATCHDOG_TIMER(config, "watchdog");//.set_time(5);
- MCFG_DEVICE_ADD("math_cpu", I8086, CPU_MASTER_CLOCK / 3)
- MCFG_DEVICE_PROGRAM_MAP(buggyboy_math)
+ I8086(config, m_mathcpu, CPU_MASTER_CLOCK / 3);
+ m_mathcpu->set_addrmap(AS_PROGRAM, &tx1_state::buggyboy_math);
MCFG_MACHINE_RESET_OVERRIDE(tx1_state,buggyboy)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
config.set_default_layout(layout_triphsxs);
- MCFG_SCREEN_ADD("lscreen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(BB_PIXEL_CLOCK, BB_HTOTAL, BB_HBEND, BB_HBSTART, BB_VTOTAL, BB_VBEND, BB_VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(tx1_state, screen_update_buggyboy_left)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &lscreen(SCREEN(config, "lscreen", SCREEN_TYPE_RASTER));
+ lscreen.set_raw(BB_PIXEL_CLOCK, BB_HTOTAL, BB_HBEND, BB_HBSTART, BB_VTOTAL, BB_VBEND, BB_VBSTART);
+ lscreen.set_screen_update(FUNC(tx1_state::screen_update_buggyboy_left));
+ lscreen.set_palette("palette");
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(BB_PIXEL_CLOCK, BB_HTOTAL, BB_HBEND, BB_HBSTART, BB_VTOTAL, BB_VBEND, BB_VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(tx1_state, screen_update_buggyboy_middle)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(BB_PIXEL_CLOCK, BB_HTOTAL, BB_HBEND, BB_HBSTART, BB_VTOTAL, BB_VBEND, BB_VBSTART);
+ m_screen->set_screen_update(FUNC(tx1_state::screen_update_buggyboy_middle));
+ m_screen->set_palette("palette");
- MCFG_SCREEN_ADD("rscreen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(BB_PIXEL_CLOCK, BB_HTOTAL, BB_HBEND, BB_HBSTART, BB_VTOTAL, BB_VBEND, BB_VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(tx1_state, screen_update_buggyboy_right)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tx1_state, screen_vblank_buggyboy))
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &rscreen(SCREEN(config, "rscreen", SCREEN_TYPE_RASTER));
+ rscreen.set_raw(BB_PIXEL_CLOCK, BB_HTOTAL, BB_HBEND, BB_HBSTART, BB_VTOTAL, BB_VBEND, BB_VBSTART);
+ rscreen.set_screen_update(FUNC(tx1_state::screen_update_buggyboy_right));
+ rscreen.screen_vblank().set(FUNC(tx1_state::screen_vblank_buggyboy));
+ rscreen.set_palette("palette");
PALETTE(config, "palette", FUNC(tx1_state::buggyboy_palette), 256);
MCFG_VIDEO_START_OVERRIDE(tx1_state,buggyboy)
- MCFG_DEVICE_ADD("soundbrd", BUGGYBOY_SOUND, BUGGYBOY_ZCLK)
-MACHINE_CONFIG_END
+ BUGGYBOY_SOUND(config, m_sound, BUGGYBOY_ZCLK);
+}
-MACHINE_CONFIG_START(tx1_state::buggybjr)
- MCFG_DEVICE_ADD("main_cpu", I8086, CPU_MASTER_CLOCK / 3)
- MCFG_DEVICE_PROGRAM_MAP(buggybjr_main)
+void tx1_state::buggybjr(machine_config &config)
+{
+ I8086(config, m_maincpu, CPU_MASTER_CLOCK / 3);
+ m_maincpu->set_addrmap(AS_PROGRAM, &tx1_state::buggybjr_main);
- WATCHDOG_TIMER(config, "watchdog");
-// MCFG_WATCHDOG_TIME_INIT(5)
+ WATCHDOG_TIMER(config, "watchdog");//.set_time(5);
- MCFG_DEVICE_ADD("math_cpu", I8086, CPU_MASTER_CLOCK / 3)
- MCFG_DEVICE_PROGRAM_MAP(buggyboy_math)
+ I8086(config, m_mathcpu, CPU_MASTER_CLOCK / 3);
+ m_mathcpu->set_addrmap(AS_PROGRAM, &tx1_state::buggyboy_math);
MCFG_MACHINE_RESET_OVERRIDE(tx1_state,buggyboy)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(BB_PIXEL_CLOCK, BB_HTOTAL, BB_HBEND, BB_HBSTART, BB_VTOTAL, BB_VBEND, BB_VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(tx1_state, screen_update_buggybjr)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, tx1_state, screen_vblank_buggyboy))
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(BB_PIXEL_CLOCK, BB_HTOTAL, BB_HBEND, BB_HBSTART, BB_VTOTAL, BB_VBEND, BB_VBSTART);
+ m_screen->set_screen_update(FUNC(tx1_state::screen_update_buggybjr));
+ m_screen->screen_vblank().set(FUNC(tx1_state::screen_vblank_buggyboy));
+ m_screen->set_palette("palette");
PALETTE(config, "palette", FUNC(tx1_state::buggyboy_palette), 256);
MCFG_VIDEO_START_OVERRIDE(tx1_state,buggybjr)
- MCFG_DEVICE_ADD("soundbrd", BUGGYBOYJR_SOUND, BUGGYBOY_ZCLK)
-MACHINE_CONFIG_END
+ BUGGYBOYJR_SOUND(config, m_sound, BUGGYBOY_ZCLK);
+}
/*************************************
diff --git a/src/mame/includes/taitosj.h b/src/mame/includes/taitosj.h
index e1fea20a1c5..4736857f79d 100644
--- a/src/mame/includes/taitosj.h
+++ b/src/mame/includes/taitosj.h
@@ -82,7 +82,7 @@ private:
required_device<input_merger_device> m_soundnmi;
required_device<input_merger_device> m_soundnmi2;
required_device<dac_8bit_r2r_device> m_dac;
- required_device<discrete_device> m_dacvol;
+ required_device<discrete_sound_device> m_dacvol;
required_device<ay8910_device> m_ay1;
required_device<ay8910_device> m_ay2;
required_device<ay8910_device> m_ay3;
diff --git a/src/mame/includes/terracre.h b/src/mame/includes/terracre.h
index d6f2b35806d..9eedc5773f6 100644
--- a/src/mame/includes/terracre.h
+++ b/src/mame/includes/terracre.h
@@ -31,8 +31,9 @@ public:
protected:
void amazon_base_map(address_map &map);
-private:
required_device<cpu_device> m_maincpu;
+
+private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<buffered_spriteram16_device> m_spriteram;
diff --git a/src/mame/includes/thomson.h b/src/mame/includes/thomson.h
index 79de6f56b43..b0d1dc13c88 100644
--- a/src/mame/includes/thomson.h
+++ b/src/mame/includes/thomson.h
@@ -379,14 +379,14 @@ private:
void to7_network_got_frame(uint8_t *data, int length);
- void mo5(address_map &map);
- void mo5nr(address_map &map);
- void mo6(address_map &map);
- void to7(address_map &map);
- void to770(address_map &map);
- void to8(address_map &map);
- void to9(address_map &map);
- void to9p(address_map &map);
+ void mo5_map(address_map &map);
+ void mo5nr_map(address_map &map);
+ void mo6_map(address_map &map);
+ void to7_map(address_map &map);
+ void to770_map(address_map &map);
+ void to8_map(address_map &map);
+ void to9_map(address_map &map);
+ void to9p_map(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<cassette_image_device> m_cassette;
diff --git a/src/mame/includes/ti85.h b/src/mame/includes/ti85.h
index 8ba897422dc..ff2cdf841ce 100644
--- a/src/mame/includes/ti85.h
+++ b/src/mame/includes/ti85.h
@@ -62,10 +62,7 @@ public:
, m_link_port(*this, "linkport")
, m_nvram(*this, "nvram")
, m_flash(*this, "flash")
- , m_membank1(*this, "membank1")
- , m_membank2(*this, "membank2")
- , m_membank3(*this, "membank3")
- , m_membank4(*this, "membank4")
+ , m_membank(*this, "membank%u", 0U)
{
}
@@ -87,10 +84,7 @@ private:
optional_device<ti8x_link_port_device> m_link_port;
optional_shared_ptr<uint8_t> m_nvram;
optional_device<intelfsh8_device> m_flash;
- optional_device<address_map_bank_device> m_membank1;
- optional_device<address_map_bank_device> m_membank2;
- optional_device<address_map_bank_device> m_membank3;
- optional_device<address_map_bank_device> m_membank4;
+ optional_device_array<address_map_bank_device, 4> m_membank;
ti85_model m_model;
diff --git a/src/mame/machine/ti85.cpp b/src/mame/machine/ti85.cpp
index f7aa783b3ab..dd8e23dc6bd 100644
--- a/src/mame/machine/ti85.cpp
+++ b/src/mame/machine/ti85.cpp
@@ -155,24 +155,24 @@ void ti85_state::update_ti83p_memory ()
{
//address_space &space = m_maincpu->space(AS_PROGRAM);
- m_membank1->set_bank(m_booting ? 0x1f : 0); //Always flash page 0, well almost
+ m_membank[0]->set_bank(m_booting ? 0x1f : 0); //Always flash page 0, well almost
if (m_ti83p_port4 & 1)
{
- m_membank2->set_bank(m_ti8x_memory_page_1 & 0xfe);
+ m_membank[1]->set_bank(m_ti8x_memory_page_1 & 0xfe);
- m_membank3->set_bank(m_ti8x_memory_page_1);
+ m_membank[2]->set_bank(m_ti8x_memory_page_1);
- m_membank4->set_bank(m_ti8x_memory_page_2);
+ m_membank[3]->set_bank(m_ti8x_memory_page_2);
}
else
{
- m_membank2->set_bank(m_ti8x_memory_page_1);
+ m_membank[1]->set_bank(m_ti8x_memory_page_1);
- m_membank3->set_bank(m_ti8x_memory_page_2);
+ m_membank[2]->set_bank(m_ti8x_memory_page_2);
- m_membank4->set_bank(0x40); //Always first ram page
+ m_membank[3]->set_bank(0x40); //Always first ram page
}
}
@@ -181,25 +181,25 @@ void ti85_state::update_ti83pse_memory ()
{
//address_space &space = m_maincpu->space(AS_PROGRAM);
- m_membank1->set_bank(m_booting ? (m_model==TI84P ? 0x3f : 0x7f) : 0);
+ m_membank[0]->set_bank(m_booting ? (m_model==TI84P ? 0x3f : 0x7f) : 0);
if (m_ti83p_port4 & 1)
{
- m_membank2->set_bank(m_ti8x_memory_page_1 & 0xfe);
+ m_membank[1]->set_bank(m_ti8x_memory_page_1 & 0xfe);
- m_membank3->set_bank(m_ti8x_memory_page_1 | 1);
+ m_membank[2]->set_bank(m_ti8x_memory_page_1 | 1);
- m_membank4->set_bank(m_ti8x_memory_page_2);
+ m_membank[3]->set_bank(m_ti8x_memory_page_2);
}
else
{
- m_membank2->set_bank(m_ti8x_memory_page_1);
+ m_membank[1]->set_bank(m_ti8x_memory_page_1);
- m_membank3->set_bank(m_ti8x_memory_page_2);
+ m_membank[2]->set_bank(m_ti8x_memory_page_2);
- m_membank4->set_bank(m_ti8x_memory_page_3 + 0x80);
+ m_membank[3]->set_bank(m_ti8x_memory_page_3 + 0x80);
}
}
@@ -287,7 +287,7 @@ uint8_t ti85_state::ti83p_membank2_r(offs_t offset)
}
}
- return m_membank2->read8(offset);
+ return m_membank[1]->read8(offset);
}
uint8_t ti85_state::ti83p_membank3_r(offs_t offset)
@@ -309,7 +309,7 @@ uint8_t ti85_state::ti83p_membank3_r(offs_t offset)
}
}
- return m_membank3->read8(offset);
+ return m_membank[2]->read8(offset);
}
MACHINE_RESET_MEMBER(ti85_state,ti83p)