summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-22 18:18:42 +0100
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2019-02-22 18:18:42 +0100
commit6aa928a094a82c8b79dce199bdac8076dfc0321c (patch) (github)
treed08d3fe54cb4e067e83087ac70f127d66d2c1dba
parent23c11c7cb4e3bdeb0ec7f003239e573bc228ef4a (diff)
downloadmame-6aa928a094a82c8b79dce199bdac8076dfc0321c.tar.bz2
mame-6aa928a094a82c8b79dce199bdac8076dfc0321c.zip
mame\drivers: removed most MCFG and MACHINE_CONFIG macros from the rest of the drivers starting with s (nw)
-rw-r--r--src/mame/drivers/s11.cpp32
-rw-r--r--src/mame/drivers/s11a.cpp28
-rw-r--r--src/mame/drivers/sage2.cpp2
-rw-r--r--src/mame/drivers/sam.cpp9
-rw-r--r--src/mame/drivers/sandscrp.cpp38
-rw-r--r--src/mame/drivers/sangho.cpp32
-rw-r--r--src/mame/drivers/sanremmg.cpp24
-rw-r--r--src/mame/drivers/sanremo.cpp28
-rw-r--r--src/mame/drivers/sansa_fuze.cpp11
-rw-r--r--src/mame/drivers/sapi1.cpp70
-rw-r--r--src/mame/drivers/sartorius.cpp5
-rw-r--r--src/mame/drivers/sauro.cpp69
-rw-r--r--src/mame/drivers/savquest.cpp10
-rw-r--r--src/mame/drivers/sbasketb.cpp47
-rw-r--r--src/mame/drivers/sbowling.cpp23
-rw-r--r--src/mame/drivers/sbugger.cpp32
-rw-r--r--src/mame/drivers/sc1.cpp14
-rw-r--r--src/mame/drivers/sc2.cpp15
-rw-r--r--src/mame/drivers/scm_500.cpp7
-rw-r--r--src/mame/drivers/scobra.cpp149
-rw-r--r--src/mame/drivers/scopus.cpp36
-rw-r--r--src/mame/drivers/scorpion.cpp12
-rw-r--r--src/mame/drivers/scotrsht.cpp35
-rw-r--r--src/mame/drivers/scramble.cpp178
-rw-r--r--src/mame/drivers/scregg.cpp36
-rw-r--r--src/mame/drivers/sderby.cpp174
-rw-r--r--src/mame/drivers/sderby2.cpp37
-rw-r--r--src/mame/drivers/sdk85.cpp11
-rw-r--r--src/mame/drivers/sealy.cpp25
-rw-r--r--src/mame/drivers/seattlecmp.cpp13
-rw-r--r--src/mame/drivers/segae.cpp13
-rw-r--r--src/mame/drivers/segag80r.cpp80
-rw-r--r--src/mame/drivers/segald.cpp24
-rw-r--r--src/mame/drivers/segapm.cpp24
-rw-r--r--src/mame/drivers/segas16a.cpp8
-rw-r--r--src/mame/drivers/segas16b.cpp68
-rw-r--r--src/mame/drivers/segattl.cpp10
-rw-r--r--src/mame/drivers/seibucats.cpp36
-rw-r--r--src/mame/drivers/seicross.cpp48
-rw-r--r--src/mame/drivers/seicupbl.cpp37
-rw-r--r--src/mame/drivers/selz80.cpp19
-rw-r--r--src/mame/drivers/senjyo.cpp44
-rw-r--r--src/mame/drivers/seta2.cpp257
-rw-r--r--src/mame/drivers/sfbonus.cpp36
-rw-r--r--src/mame/drivers/sfcbox.cpp48
-rw-r--r--src/mame/drivers/sg1000.cpp61
-rw-r--r--src/mame/drivers/sg1000a.cpp24
-rw-r--r--src/mame/drivers/shadfrce.cpp30
-rw-r--r--src/mame/drivers/shanghai.cpp88
-rw-r--r--src/mame/drivers/shangkid.cpp28
-rw-r--r--src/mame/drivers/shaolins.cpp41
-rw-r--r--src/mame/drivers/shisen.cpp44
-rw-r--r--src/mame/drivers/shootaway2.cpp28
-rw-r--r--src/mame/drivers/shootout.cpp58
-rw-r--r--src/mame/drivers/shougi.cpp38
-rw-r--r--src/mame/drivers/shtzone.cpp29
-rw-r--r--src/mame/drivers/shuuz.cpp23
-rw-r--r--src/mame/drivers/sigmab52.cpp34
-rw-r--r--src/mame/drivers/sigmab98.cpp202
-rw-r--r--src/mame/drivers/silkroad.cpp40
-rw-r--r--src/mame/drivers/silvmil.cpp46
-rw-r--r--src/mame/drivers/simpl156.cpp74
-rw-r--r--src/mame/drivers/simple_st0016.cpp50
-rw-r--r--src/mame/drivers/sk1.cpp5
-rw-r--r--src/mame/drivers/skimaxx.cpp43
-rw-r--r--src/mame/drivers/skullxbo.cpp26
-rw-r--r--src/mame/drivers/skyarmy.cpp30
-rw-r--r--src/mame/drivers/skydiver.cpp20
-rw-r--r--src/mame/drivers/skyfox.cpp36
-rw-r--r--src/mame/drivers/skylncr.cpp44
-rw-r--r--src/mame/drivers/skyraid.cpp26
-rw-r--r--src/mame/drivers/slapfght.cpp108
-rw-r--r--src/mame/drivers/slc1.cpp14
-rw-r--r--src/mame/drivers/sleic.cpp9
-rw-r--r--src/mame/drivers/slicer.cpp11
-rw-r--r--src/mame/drivers/sliver.cpp34
-rw-r--r--src/mame/drivers/slotcarn.cpp20
-rw-r--r--src/mame/drivers/sm1800.cpp29
-rw-r--r--src/mame/drivers/sm7238.cpp23
-rw-r--r--src/mame/drivers/smc777.cpp25
-rw-r--r--src/mame/drivers/spbactn.cpp2
81 files changed, 1675 insertions, 1722 deletions
diff --git a/src/mame/drivers/s11.cpp b/src/mame/drivers/s11.cpp
index dc5a088feda..b1966c18077 100644
--- a/src/mame/drivers/s11.cpp
+++ b/src/mame/drivers/s11.cpp
@@ -382,10 +382,11 @@ void s11_state::init_s11()
m_irq_active = false;
}
-MACHINE_CONFIG_START(s11_state::s11)
+void s11_state::s11(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6802, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s11_main_map)
+ M6802(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &s11_state::s11_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s11_state, s11)
/* Video */
@@ -443,8 +444,8 @@ MACHINE_CONFIG_START(s11_state::s11)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6808, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s11_audio_map)
+ M6808(config, m_audiocpu, XTAL(4'000'000));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s11_state::s11_audio_map);
SPEAKER(config, "speaker").front_center();
MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
@@ -453,21 +454,20 @@ MACHINE_CONFIG_START(s11_state::s11)
vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
SPEAKER(config, "speech").front_center();
- MCFG_DEVICE_ADD("hc55516", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 1.00)
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, "speech", 1.00);
PIA6821(config, m_pias, 0);
m_pias->readpa_handler().set(FUNC(s11_state::sound_r));
m_pias->writepa_handler().set(FUNC(s11_state::sound_w));
m_pias->writepb_handler().set("dac", FUNC(dac_byte_interface::data_w));
- m_pias->ca2_handler().set("hc55516", FUNC(hc55516_device::clock_w));
- m_pias->cb2_handler().set("hc55516", FUNC(hc55516_device::digit_w));
- m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
- m_pias->irqa_handler().set_inputline("audiocpu", M6808_IRQ_LINE);
+ m_pias->ca2_handler().set(m_hc55516, FUNC(hc55516_device::clock_w));
+ m_pias->cb2_handler().set(m_hc55516, FUNC(hc55516_device::digit_w));
+ m_pias->irqa_handler().set_inputline(m_audiocpu, M6808_IRQ_LINE);
+ m_pias->irqa_handler().set_inputline(m_audiocpu, M6808_IRQ_LINE);
/* Add the background music card */
- MCFG_DEVICE_ADD("bgcpu", MC6809E, 8000000 / 4) // MC68B09E
- MCFG_DEVICE_PROGRAM_MAP(s11_bg_map)
+ MC6809E(config, m_bgcpu, 8000000 / 4); // MC68B09E
+ m_bgcpu->set_addrmap(AS_PROGRAM, &s11_state::s11_bg_map);
SPEAKER(config, "bg").front_center();
YM2151(config, m_ym, 3580000);
@@ -480,9 +480,9 @@ MACHINE_CONFIG_START(s11_state::s11)
m_pia40->writepa_handler().set("dac1", FUNC(dac_byte_interface::data_w));
m_pia40->writepb_handler().set(FUNC(s11_state::pia40_pb_w));
m_pia40->cb2_handler().set(FUNC(s11_state::pia40_cb2_w));
- m_pia40->irqa_handler().set_inputline("bgcpu", M6809_FIRQ_LINE);
- m_pia40->irqb_handler().set_inputline("bgcpu", INPUT_LINE_NMI);
-MACHINE_CONFIG_END
+ m_pia40->irqa_handler().set_inputline(m_bgcpu, M6809_FIRQ_LINE);
+ m_pia40->irqb_handler().set_inputline(m_bgcpu, INPUT_LINE_NMI);
+}
/*----------------------------
diff --git a/src/mame/drivers/s11a.cpp b/src/mame/drivers/s11a.cpp
index 3db3a209733..da5e5170178 100644
--- a/src/mame/drivers/s11a.cpp
+++ b/src/mame/drivers/s11a.cpp
@@ -174,10 +174,11 @@ void s11a_state::init_s11a()
s11_state::init_s11();
}
-MACHINE_CONFIG_START(s11a_state::s11a)
+void s11a_state::s11a(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6808, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s11a_main_map)
+ M6808(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &s11a_state::s11a_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s11a_state, s11a)
/* Video */
@@ -235,8 +236,8 @@ MACHINE_CONFIG_START(s11a_state::s11a)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
/* Add the soundcard */
- MCFG_DEVICE_ADD("audiocpu", M6802, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(s11a_audio_map)
+ M6802(config, m_audiocpu, XTAL(4'000'000));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &s11a_state::s11a_audio_map);
SPEAKER(config, "speaker").front_center();
MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25);
@@ -245,20 +246,19 @@ MACHINE_CONFIG_START(s11a_state::s11a)
vref.add_route(0, "dac1", 1.0, DAC_VREF_POS_INPUT); vref.add_route(0, "dac1", -1.0, DAC_VREF_NEG_INPUT);
SPEAKER(config, "speech").front_center();
- MCFG_DEVICE_ADD("hc55516", HC55516, 0)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speech", 0.50)
+ HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, "speech", 0.50);
PIA6821(config, m_pias, 0);
m_pias->readpa_handler().set(FUNC(s11_state::sound_r));
m_pias->writepa_handler().set(FUNC(s11_state::sound_w));
m_pias->writepb_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pias->cb2_handler().set(FUNC(s11_state::pia40_cb2_w));
- m_pias->irqa_handler().set_inputline("audiocpu", M6802_IRQ_LINE);
- m_pias->irqa_handler().set_inputline("audiocpu", M6802_IRQ_LINE);
+ m_pias->irqa_handler().set_inputline(m_audiocpu, M6802_IRQ_LINE);
+ m_pias->irqa_handler().set_inputline(m_audiocpu, M6802_IRQ_LINE);
/* Add the background music card */
- MCFG_DEVICE_ADD("bgcpu", MC6809E, XTAL(8'000'000) / 4) // MC68B09E
- MCFG_DEVICE_PROGRAM_MAP(s11a_bg_map)
+ MC6809E(config, m_bgcpu, XTAL(8'000'000) / 4); // MC68B09E
+ m_bgcpu->set_addrmap(AS_PROGRAM, &s11a_state::s11a_bg_map);
SPEAKER(config, "bg").front_center();
YM2151(config, m_ym, XTAL(3'579'545));
@@ -272,9 +272,9 @@ MACHINE_CONFIG_START(s11a_state::s11a)
m_pia40->writepb_handler().set(FUNC(s11_state::pia40_pb_w));
m_pia40->ca2_handler().set(FUNC(s11_state::pias_ca2_w));
m_pia40->cb2_handler().set(FUNC(s11_state::pias_cb2_w));
- m_pia40->irqa_handler().set_inputline("bgcpu", M6809_FIRQ_LINE);
- m_pia40->irqb_handler().set_inputline("bgcpu", INPUT_LINE_NMI);
-MACHINE_CONFIG_END
+ m_pia40->irqa_handler().set_inputline(m_bgcpu, M6809_FIRQ_LINE);
+ m_pia40->irqb_handler().set_inputline(m_bgcpu, INPUT_LINE_NMI);
+}
/*------------------------
/ F14 Tomcat 5/87 (#554)
diff --git a/src/mame/drivers/sage2.cpp b/src/mame/drivers/sage2.cpp
index d3a6cd9f1e8..5190d825669 100644
--- a/src/mame/drivers/sage2.cpp
+++ b/src/mame/drivers/sage2.cpp
@@ -405,7 +405,7 @@ READ16_MEMBER(sage2_state::rom_r)
//**************************************************************************
//-------------------------------------------------
-// MACHINE_CONFIG( sage2 )
+// machine_config( sage2 )
//-------------------------------------------------
void sage2_state::sage2(machine_config &config)
diff --git a/src/mame/drivers/sam.cpp b/src/mame/drivers/sam.cpp
index 58e7bef05f8..d89aafa8f87 100644
--- a/src/mame/drivers/sam.cpp
+++ b/src/mame/drivers/sam.cpp
@@ -25,10 +25,11 @@ void sam_state::sam_map(address_map &map)
static INPUT_PORTS_START( sam )
INPUT_PORTS_END
-MACHINE_CONFIG_START(sam_state::sam)
- MCFG_DEVICE_ADD("maincpu", ARM7, XTAL(40'000'000)) // AT91R40008
- MCFG_DEVICE_PROGRAM_MAP(sam_map)
-MACHINE_CONFIG_END
+void sam_state::sam(machine_config &config)
+{
+ arm7_cpu_device &maincpu(ARM7(config, "maincpu", XTAL(40'000'000))); // AT91R40008
+ maincpu.set_addrmap(AS_PROGRAM, &sam_state::sam_map);
+}
#define ROM_LOAD_BOOT_EPROM \
ROM_REGION( 0x100000, "boot", ROMREGION_ERASEFF ) \
diff --git a/src/mame/drivers/sandscrp.cpp b/src/mame/drivers/sandscrp.cpp
index 79d78641f22..979af82096b 100644
--- a/src/mame/drivers/sandscrp.cpp
+++ b/src/mame/drivers/sandscrp.cpp
@@ -133,7 +133,7 @@ private:
INTERRUPT_GEN_MEMBER(interrupt);
void update_irq_state();
- void sandscrp(address_map &map);
+ void sandscrp_mem(address_map &map);
void sandscrp_soundmem(address_map &map);
void sandscrp_soundport(address_map &map);
};
@@ -278,7 +278,7 @@ WRITE8_MEMBER(sandscrp_state::soundlatch_w)
m_soundlatch[Latch]->write(space,0,data);
}
-void sandscrp_state::sandscrp(address_map &map)
+void sandscrp_state::sandscrp_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x100000, 0x100001).w(FUNC(sandscrp_state::irq_cause_w)); // IRQ Ack
@@ -467,28 +467,28 @@ GFXDECODE_END
***************************************************************************/
-MACHINE_CONFIG_START(sandscrp_state::sandscrp)
-
+void sandscrp_state::sandscrp(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,12000000) /* TMP68HC000N-12 */
- MCFG_DEVICE_PROGRAM_MAP(sandscrp)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sandscrp_state, interrupt)
+ M68000(config, m_maincpu, 12000000); /* TMP68HC000N-12 */
+ m_maincpu->set_addrmap(AS_PROGRAM, &sandscrp_state::sandscrp_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(sandscrp_state::interrupt));
- MCFG_DEVICE_ADD("audiocpu", Z80,4000000) /* Z8400AB1, Reads the DSWs: it can't be disabled */
- MCFG_DEVICE_PROGRAM_MAP(sandscrp_soundmem)
- MCFG_DEVICE_IO_MAP(sandscrp_soundport)
+ Z80(config, m_audiocpu, 4000000); /* Z8400AB1, Reads the DSWs: it can't be disabled */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &sandscrp_state::sandscrp_soundmem);
+ m_audiocpu->set_addrmap(AS_IO, &sandscrp_state::sandscrp_soundport);
WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(3)); /* a guess, and certainly wrong */
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME( ATTOSECONDS_IN_USEC(2500) /* not accurate */ )
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0+16, 256-16-1)
- MCFG_SCREEN_UPDATE_DRIVER(sandscrp_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, sandscrp_state, screen_vblank))
- 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, 256);
+ screen.set_visarea(0, 256-1, 0+16, 256-16-1);
+ screen.set_screen_update(FUNC(sandscrp_state::screen_update));
+ screen.screen_vblank().set(FUNC(sandscrp_state::screen_vblank));
+ screen.set_palette("palette");
GFXDECODE(config, "gfxdecode", "palette", gfx_sandscrp);
PALETTE(config, "palette").set_format(palette_device::xGRB_555, 2048);
@@ -519,7 +519,7 @@ MACHINE_CONFIG_START(sandscrp_state::sandscrp)
ymsnd.port_a_read_callback().set_ioport("DSW1");
ymsnd.port_b_read_callback().set_ioport("DSW2");
ymsnd.add_route(ALL_OUTPUTS, "mono", 0.5);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/sangho.cpp b/src/mame/drivers/sangho.cpp
index bd6e859f44d..91c55bbcd8a 100644
--- a/src/mame/drivers/sangho.cpp
+++ b/src/mame/drivers/sangho.cpp
@@ -477,10 +477,11 @@ void sexyboom_state::machine_reset()
}
-MACHINE_CONFIG_START(pzlestar_state::pzlestar)
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(21'477'272)/6) // ?
- MCFG_DEVICE_PROGRAM_MAP(sangho_map)
- MCFG_DEVICE_IO_MAP(pzlestar_io_map)
+void pzlestar_state::pzlestar(machine_config &config)
+{
+ Z80(config, m_maincpu, XTAL(21'477'272)/6); // ?
+ m_maincpu->set_addrmap(AS_PROGRAM, &pzlestar_state::sangho_map);
+ m_maincpu->set_addrmap(AS_IO, &pzlestar_state::pzlestar_io_map);
v9958_device &v9958(V9958(config, "v9958", XTAL(21'477'272))); // typical 9958 clock, not verified
v9958.set_screen_ntsc("screen");
@@ -489,16 +490,15 @@ MACHINE_CONFIG_START(pzlestar_state::pzlestar)
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("ymsnd", YM2413, XTAL(21'477'272)/6)
-
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ YM2413(config, "ymsnd", XTAL(21'477'272)/6).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
-MACHINE_CONFIG_START(sexyboom_state::sexyboom)
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(21'477'272)/6)
- MCFG_DEVICE_PROGRAM_MAP(sangho_map)
- MCFG_DEVICE_IO_MAP(sexyboom_io_map)
+void sexyboom_state::sexyboom(machine_config &config)
+{
+ Z80(config, m_maincpu, XTAL(21'477'272)/6);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sexyboom_state::sangho_map);
+ m_maincpu->set_addrmap(AS_IO, &sexyboom_state::sexyboom_io_map);
v9958_device &v9958(V9958(config, "v9958", XTAL(21'477'272)));
v9958.set_screen_ntsc("screen");
@@ -506,13 +506,11 @@ MACHINE_CONFIG_START(sexyboom_state::sexyboom)
v9958.int_cb().set_inputline("maincpu", 0);
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
- MCFG_PALETTE_ADD("palette", 19780)
+ PALETTE(config, "palette").set_entries(19780);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("ymsnd", YM2413, XTAL(21'477'272)/6)
-
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ YM2413(config, "ymsnd", XTAL(21'477'272)/6).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
ROM_START( pzlestar )
ROM_REGION( 0x20000*16, "user1", 0 ) // 15 sockets, 13 used
diff --git a/src/mame/drivers/sanremmg.cpp b/src/mame/drivers/sanremmg.cpp
index 6bfed308e06..68278f6de4c 100644
--- a/src/mame/drivers/sanremmg.cpp
+++ b/src/mame/drivers/sanremmg.cpp
@@ -80,22 +80,22 @@ void sanremmg_state::sanremmg_map(address_map &map)
static INPUT_PORTS_START( sanremmg )
INPUT_PORTS_END
-MACHINE_CONFIG_START(sanremmg_state::sanremmg)
-
+void sanremmg_state::sanremmg(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", ARM7, 50000000) // wrong, this is an M30624FG (M16C/62A family) with 256K internal ROM, no CPU core available
- MCFG_DEVICE_PROGRAM_MAP(sanremmg_map)
+ ARM7(config, m_maincpu, 50000000); // wrong, this is an M30624FG (M16C/62A family) with 256K internal ROM, no CPU core available
+ m_maincpu->set_addrmap(AS_PROGRAM, &sanremmg_state::sanremmg_map);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(8*8, 48*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sanremmg_state, screen_update_sanremmg)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(8*8, 48*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(sanremmg_state::screen_update_sanremmg));
+ screen.set_palette("palette");
PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x200);
-MACHINE_CONFIG_END
+}
/*
PCB is marked: "ELSY CE" and "2-028B" and "San Remo Games - Via Val D'OLIVI 295 - 18038 SANREMO (IM)" on component side
diff --git a/src/mame/drivers/sanremo.cpp b/src/mame/drivers/sanremo.cpp
index 96ccc8320af..0c0ac776889 100644
--- a/src/mame/drivers/sanremo.cpp
+++ b/src/mame/drivers/sanremo.cpp
@@ -355,24 +355,24 @@ GFXDECODE_END
* Machine Drivers *
*********************************************/
-MACHINE_CONFIG_START(sanremo_state::sanremo)
-
+void sanremo_state::sanremo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(sanremo_map)
- MCFG_DEVICE_IO_MAP(sanremo_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sanremo_state, irq0_line_hold)
+ Z80(config, m_maincpu, CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sanremo_state::sanremo_map);
+ m_maincpu->set_addrmap(AS_IO, &sanremo_state::sanremo_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(sanremo_state::irq0_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(70*8, 41*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 48*8-1, 0, 38*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sanremo_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(70*8, 41*8);
+ screen.set_visarea(0, 48*8-1, 0, 38*8-1);
+ screen.set_screen_update(FUNC(sanremo_state::screen_update));
+ screen.set_palette("palette");
mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK));
// *** MC6845 init ***
@@ -391,7 +391,7 @@ MACHINE_CONFIG_START(sanremo_state::sanremo)
ay8910_device &ay8910(AY8910(config, "ay8910", SND_CLOCK));
ay8910.port_a_read_callback().set_ioport("DSW");
ay8910.add_route(ALL_OUTPUTS, "mono", 1.00);
-MACHINE_CONFIG_END
+}
/*********************************************
diff --git a/src/mame/drivers/sansa_fuze.cpp b/src/mame/drivers/sansa_fuze.cpp
index b82788b4909..c2b6c65a6c8 100644
--- a/src/mame/drivers/sansa_fuze.cpp
+++ b/src/mame/drivers/sansa_fuze.cpp
@@ -43,13 +43,12 @@ static INPUT_PORTS_START( sansa_fuze )
INPUT_PORTS_END
-MACHINE_CONFIG_START(sansa_fuze_state::sansa_fuze)
-
+void sansa_fuze_state::sansa_fuze(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", ARM7, 50000000) // arm based, speed unknown
- MCFG_DEVICE_PROGRAM_MAP(sansa_fuze_map)
-
-MACHINE_CONFIG_END
+ ARM7(config, m_maincpu, 50000000); // arm based, speed unknown
+ m_maincpu->set_addrmap(AS_PROGRAM, &sansa_fuze_state::sansa_fuze_map);
+}
ROM_START( sanfuze2 )
ROM_REGION(0x20000, "maincpu", 0 )
diff --git a/src/mame/drivers/sapi1.cpp b/src/mame/drivers/sapi1.cpp
index a1d57466d0c..f1bee7576da 100644
--- a/src/mame/drivers/sapi1.cpp
+++ b/src/mame/drivers/sapi1.cpp
@@ -626,26 +626,27 @@ void sapi1_state::init_sapizps3b()
/* Machine driver */
-MACHINE_CONFIG_START(sapi1_state::sapi1)
+void sapi1_state::sapi1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, I8080A, 18_MHz_XTAL / 9) // Tesla MHB8080A + MHB8224 + MHB8228
- MCFG_DEVICE_PROGRAM_MAP(sapi1_mem)
+ I8080A(config, m_maincpu, 18_MHz_XTAL / 9); // Tesla MHB8080A + MHB8224 + MHB8228
+ m_maincpu->set_addrmap(AS_PROGRAM, &sapi1_state::sapi1_mem);
MCFG_MACHINE_RESET_OVERRIDE(sapi1_state, sapi1)
/* 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(40*6, 24*9)
- MCFG_SCREEN_VISIBLE_AREA(0, 40*6-1, 0, 24*9-1)
- MCFG_SCREEN_UPDATE_DRIVER(sapi1_state, screen_update_sapi1)
- 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(40*6, 24*9);
+ screen.set_visarea(0, 40*6-1, 0, 24*9-1);
+ screen.set_screen_update(FUNC(sapi1_state::screen_update_sapi1));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette, palette_device::MONOCHROME);
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K");
-MACHINE_CONFIG_END
+}
void sapi1_state::sapi2(machine_config &config)
{
@@ -657,25 +658,26 @@ void sapi1_state::sapi2(machine_config &config)
keyboard.set_keyboard_callback(FUNC(sapi1_state::kbd_put));
}
-MACHINE_CONFIG_START(sapi1_state::sapi3)
+void sapi1_state::sapi3(machine_config &config)
+{
sapi2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(sapi3_mem)
- MCFG_DEVICE_IO_MAP(sapi3_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sapi1_state::sapi3_mem);
+ m_maincpu->set_addrmap(AS_IO, &sapi1_state::sapi3_io);
MCFG_MACHINE_RESET_OVERRIDE(sapi1_state, sapizps3 )
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_SIZE(40*6, 20*9)
- MCFG_SCREEN_VISIBLE_AREA(0, 40*6-1, 0, 20*9-1)
- MCFG_SCREEN_UPDATE_DRIVER(sapi1_state, screen_update_sapi3)
-MACHINE_CONFIG_END
-MACHINE_CONFIG_START(sapi1_state::sapi3b)
+ screen_device &screen(*subdevice<screen_device>("screen"));
+ screen.set_size(40*6, 20*9);
+ screen.set_visarea(0, 40*6-1, 0, 20*9-1);
+ screen.set_screen_update(FUNC(sapi1_state::screen_update_sapi3));
+}
+
+void sapi1_state::sapi3b(machine_config &config)
+{
sapi3(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(sapi3b_mem)
- MCFG_DEVICE_IO_MAP(sapi3b_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sapi1_state::sapi3b_mem);
+ m_maincpu->set_addrmap(AS_IO, &sapi1_state::sapi3b_io);
mc6845_device &crtc(MC6845(config, "crtc", 1008000)); // guess
crtc.set_screen("screen");
@@ -683,10 +685,9 @@ MACHINE_CONFIG_START(sapi1_state::sapi3b)
crtc.set_char_width(6);
crtc.set_update_row_callback(FUNC(sapi1_state::crtc_update_row), this);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
- MCFG_SCREEN_NO_PALETTE
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update("crtc", FUNC(mc6845_device::screen_update));
+ subdevice<screen_device>("screen")->set_palette(finder_base::DUMMY_TAG);
+}
static DEVICE_INPUT_DEFAULTS_START( terminal )
DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
@@ -697,11 +698,12 @@ static DEVICE_INPUT_DEFAULTS_START( terminal )
DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_1 )
DEVICE_INPUT_DEFAULTS_END
-MACHINE_CONFIG_START(sapi1_state::sapi3a)
+void sapi1_state::sapi3a(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080A, 18_MHz_XTAL / 9) // Tesla MHB8080A + MHB8224 + MHB8228
- MCFG_DEVICE_PROGRAM_MAP(sapi3a_mem)
- MCFG_DEVICE_IO_MAP(sapi3a_io)
+ I8080A(config, m_maincpu, 18_MHz_XTAL / 9); // Tesla MHB8080A + MHB8224 + MHB8228
+ m_maincpu->set_addrmap(AS_PROGRAM, &sapi1_state::sapi3a_mem);
+ m_maincpu->set_addrmap(AS_IO, &sapi1_state::sapi3a_io);
MCFG_MACHINE_RESET_OVERRIDE(sapi1_state, sapizps3 )
/* video hardware */
@@ -718,9 +720,7 @@ MACHINE_CONFIG_START(sapi1_state::sapi3a)
/* internal ram */
RAM(config, RAM_TAG).set_default_size("64K");
-MACHINE_CONFIG_END
-
-
+}
/**************************************
diff --git a/src/mame/drivers/sartorius.cpp b/src/mame/drivers/sartorius.cpp
index d455c705050..17df80470e4 100644
--- a/src/mame/drivers/sartorius.cpp
+++ b/src/mame/drivers/sartorius.cpp
@@ -87,12 +87,13 @@ private:
}
-MACHINE_CONFIG_START(sart3733_state::sart3733)
+void sart3733_state::sart3733(machine_config &config)
+{
i4040_cpu_device &cpu(I4040(config, "maincpu", 750'000)); // clock speed is a complete guess - can't see crystal or multi-phase clock generator
cpu.set_rom_map(&sart3733_state::sart3733_rom);
cpu.set_ram_memory_map(&sart3733_state::sart3733_memory);
cpu.set_ram_status_map(&sart3733_state::sart3733_status);
-MACHINE_CONFIG_END
+}
INPUT_PORTS_START(sart3733)
diff --git a/src/mame/drivers/sauro.cpp b/src/mame/drivers/sauro.cpp
index 17ce062c4e8..fa40c602acc 100644
--- a/src/mame/drivers/sauro.cpp
+++ b/src/mame/drivers/sauro.cpp
@@ -446,10 +446,10 @@ static GFXDECODE_START( gfx_trckydoc )
GFXDECODE_END
-MACHINE_CONFIG_START(sauro_state::tecfri)
-
+void sauro_state::tecfri(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(20'000'000)/4) /* verified on pcb */
+ Z80(config, m_maincpu, XTAL(20'000'000)/4); /* verified on pcb */
LS259(config, m_mainlatch);
m_mainlatch->q_out_cb<4>().set(FUNC(sauro_state::irq_reset_w));
@@ -459,29 +459,27 @@ MACHINE_CONFIG_START(sauro_state::tecfri)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(55.72) /* verified on pcb */
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(5000)) // frames per second, vblank duration (otherwise sprites lag)
- MCFG_SCREEN_SIZE(32 * 8, 32 * 8)
- MCFG_SCREEN_VISIBLE_AREA(1 * 8, 31 * 8 - 1, 2 * 8, 30 * 8 - 1)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, sauro_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(55.72); /* verified on pcb */
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(5000)); // frames per second, vblank duration (otherwise sprites lag)
+ screen.set_size(32 * 8, 32 * 8);
+ screen.set_visarea(1 * 8, 31 * 8 - 1, 2 * 8, 30 * 8 - 1);
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(sauro_state::vblank_irq));
PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 1024);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("ymsnd", YM3812, XTAL(20'000'000)/8) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
-MACHINE_CONFIG_END
+ YM3812(config, "ymsnd", XTAL(20'000'000)/8).add_route(ALL_OUTPUTS, "mono", 1.0); /* verified on pcb */
+}
-MACHINE_CONFIG_START(sauro_state::trckydoc)
+void sauro_state::trckydoc(machine_config &config)
+{
tecfri(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(trckydoc_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sauro_state::trckydoc_map);
m_mainlatch->q_out_cb<1>().set(FUNC(sauro_state::flip_screen_w));
m_mainlatch->q_out_cb<2>().set(FUNC(sauro_state::coin1_w));
@@ -490,17 +488,15 @@ MACHINE_CONFIG_START(sauro_state::trckydoc)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_trckydoc);
MCFG_VIDEO_START_OVERRIDE(sauro_state,trckydoc)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(sauro_state, screen_update_trckydoc)
-
-MACHINE_CONFIG_END
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(sauro_state::screen_update_trckydoc));
+}
-MACHINE_CONFIG_START(sauro_state::sauro)
+void sauro_state::sauro(machine_config &config)
+{
tecfri(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(sauro_map)
- MCFG_DEVICE_IO_MAP(sauro_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sauro_state::sauro_map);
+ m_maincpu->set_addrmap(AS_IO, &sauro_state::sauro_io_map);
// Z3
m_mainlatch->q_out_cb<0>().set(FUNC(sauro_state::flip_screen_w));
@@ -510,36 +506,33 @@ MACHINE_CONFIG_START(sauro_state::sauro)
m_mainlatch->q_out_cb<5>().set(FUNC(sauro_state::sauro_palette_bank0_w));
m_mainlatch->q_out_cb<6>().set(FUNC(sauro_state::sauro_palette_bank1_w));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(20'000'000) / 5) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(sauro_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(sauro_state, irq0_line_hold, 8 * 60) // ?
+ z80_device &audiocpu(Z80(config, "audiocpu", XTAL(20'000'000) / 5)); /* verified on pcb */
+ audiocpu.set_addrmap(AS_PROGRAM, &sauro_state::sauro_sound_map);
+ audiocpu.set_periodic_int(FUNC(sauro_state::irq0_line_hold), attotime::from_hz(8 * 60)); // ?
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sauro);
MCFG_VIDEO_START_OVERRIDE(sauro_state, sauro)
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(sauro_state, screen_update_sauro)
+ subdevice<screen_device>("screen")->set_screen_update(FUNC(sauro_state::screen_update_sauro));
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_MODIFY("ymsnd")
- MCFG_DEVICE_CLOCK(XTAL(20'000'000) / 5) /* verified on pcb */
+ subdevice<ym3812_device>("ymsnd")->set_clock(XTAL(20'000'000) / 5); /* verified on pcb */
SP0256(config, m_sp0256, XTAL(20'000'000) / 5); /* verified on pcb */
m_sp0256->data_request_callback().set_inputline("audiocpu", INPUT_LINE_NMI);
m_sp0256->add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(sauro_state::saurob)
+void sauro_state::saurob(machine_config &config)
+{
sauro(config);
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_PROGRAM_MAP(saurob_sound_map)
+ subdevice<z80_device>("audiocpu")->set_addrmap(AS_PROGRAM, &sauro_state::saurob_sound_map);
/* sound hardware */
config.device_remove("speech");
-
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/savquest.cpp b/src/mame/drivers/savquest.cpp
index b514ad215e0..770b38343da 100644
--- a/src/mame/drivers/savquest.cpp
+++ b/src/mame/drivers/savquest.cpp
@@ -813,10 +813,10 @@ void savquest_isa16_cards(device_slot_interface &device)
}
MACHINE_CONFIG_START(savquest_state::savquest)
- MCFG_DEVICE_ADD("maincpu", PENTIUM2, 450000000) // actually Pentium II 450
- MCFG_DEVICE_PROGRAM_MAP(savquest_map)
- MCFG_DEVICE_IO_MAP(savquest_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259_1", pic8259_device, inta_cb)
+ PENTIUM2(config, m_maincpu, 450000000); // actually Pentium II 450
+ m_maincpu->set_addrmap(AS_PROGRAM, &savquest_state::savquest_map);
+ m_maincpu->set_addrmap(AS_IO, &savquest_state::savquest_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259_1", FUNC(pic8259_device::inta_cb));
pcat_common(config);
DS12885(config.replace(), "rtc");
@@ -837,7 +837,7 @@ MACHINE_CONFIG_START(savquest_state::savquest)
isa16_device &isa(ISA16(config, "isa", 0)); // FIXME: determine ISA bus clock
isa.set_memspace("maincpu", AS_PROGRAM);
isa.set_iospace("maincpu", AS_IO);
- MCFG_DEVICE_ADD("isa1", ISA16_SLOT, 0, "isa", savquest_isa16_cards, "sb16", false)
+ ISA16_SLOT(config, "isa1", 0, "isa", savquest_isa16_cards, "sb16", false);
/* video hardware */
pcvideo_s3_vga(config);
diff --git a/src/mame/drivers/sbasketb.cpp b/src/mame/drivers/sbasketb.cpp
index 43f9b278752..478c314e5fe 100644
--- a/src/mame/drivers/sbasketb.cpp
+++ b/src/mame/drivers/sbasketb.cpp
@@ -192,14 +192,14 @@ WRITE_LINE_MEMBER(sbasketb_state::vblank_irq)
m_maincpu->set_input_line(0, HOLD_LINE);
}
-MACHINE_CONFIG_START(sbasketb_state::sbasketb)
-
+void sbasketb_state::sbasketb(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(m_maincpu, KONAMI1, 1400000) /* 1.400 MHz ??? */
- MCFG_DEVICE_PROGRAM_MAP(sbasketb_map)
+ KONAMI1(config, m_maincpu, 1400000); /* 1.400 MHz ??? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &sbasketb_state::sbasketb_map);
- MCFG_DEVICE_ADD(m_audiocpu, Z80, XTAL(14'318'181) / 4) /* 3.5795 MHz */
- MCFG_DEVICE_PROGRAM_MAP(sbasketb_sound_map)
+ Z80(config, m_audiocpu, XTAL(14'318'181) / 4); /* 3.5795 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &sbasketb_state::sbasketb_sound_map);
ls259_device &mainlatch(LS259(config, "mainlatch")); // B3
mainlatch.q_out_cb<0>().set(FUNC(sbasketb_state::flipscreen_w)); // FLIP
@@ -213,14 +213,14 @@ MACHINE_CONFIG_START(sbasketb_state::sbasketb)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD(m_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(sbasketb_state, screen_update_sbasketb)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, sbasketb_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(sbasketb_state::screen_update_sbasketb));
+ m_screen->set_palette(m_palette);
+ m_screen->screen_vblank().set(FUNC(sbasketb_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sbasketb);
PALETTE(config, m_palette, FUNC(sbasketb_state::sbasketb_palette), 16*16+16*16*16, 256);
@@ -230,25 +230,24 @@ MACHINE_CONFIG_START(sbasketb_state::sbasketb)
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD(m_soundbrd, TRACKFLD_AUDIO, 0, m_audiocpu, m_vlm)
+ TRACKFLD_AUDIO(config, m_soundbrd, 0, m_audiocpu, m_vlm);
DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.4); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
- MCFG_DEVICE_ADD(m_sn, SN76489, XTAL(14'318'181) / 8)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ SN76489(config, m_sn, XTAL(14'318'181) / 8).add_route(ALL_OUTPUTS, "speaker", 1.0);
- MCFG_DEVICE_ADD(m_vlm, VLM5030, XTAL(3'579'545)) /* Schematics say 3.58MHz, but board uses 3.579545MHz xtal */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ VLM5030(config, m_vlm, XTAL(3'579'545)).add_route(ALL_OUTPUTS, "speaker", 1.0); /* Schematics say 3.58MHz, but board uses 3.579545MHz xtal */
+}
-MACHINE_CONFIG_START(sbasketb_state::sbasketbu)
+void sbasketb_state::sbasketbu(machine_config &config)
+{
sbasketb(config);
- MCFG_DEVICE_REPLACE(m_maincpu, MC6809E, 1400000) /* 6809E at 1.400 MHz ??? */
- MCFG_DEVICE_PROGRAM_MAP(sbasketb_map)
-MACHINE_CONFIG_END
+ MC6809E(config.replace(), m_maincpu, 1400000); /* 6809E at 1.400 MHz ??? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &sbasketb_state::sbasketb_map);
+}
diff --git a/src/mame/drivers/sbowling.cpp b/src/mame/drivers/sbowling.cpp
index 8ae7deaa9b5..dd915396b75 100644
--- a/src/mame/drivers/sbowling.cpp
+++ b/src/mame/drivers/sbowling.cpp
@@ -412,21 +412,22 @@ void sbowling_state::sbowling_palette(palette_device &palette) const
}
}
-MACHINE_CONFIG_START(sbowling_state::sbowling)
- MCFG_DEVICE_ADD("maincpu", I8080, XTAL(19'968'000)/10) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(port_map)
+void sbowling_state::sbowling(machine_config &config)
+{
+ I8080(config, m_maincpu, XTAL(19'968'000)/10); /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &sbowling_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &sbowling_state::port_map);
TIMER(config, "scantimer").configure_scanline(FUNC(sbowling_state::interrupt), "screen", 0, 1);
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_SIZE(32*8, 262) /* vert size taken from mw8080bw */
- MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 4*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sbowling_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_size(32*8, 262); /* vert size taken from mw8080bw */
+ screen.set_visarea(1*8, 31*8-1, 4*8, 32*8-1);
+ screen.set_screen_update(FUNC(sbowling_state::screen_update));
+ screen.set_palette("palette");
GFXDECODE(config, m_gfxdecode, "palette", gfx_sbowling);
@@ -436,7 +437,7 @@ MACHINE_CONFIG_START(sbowling_state::sbowling)
SPEAKER(config, "mono").front_center();
AY8910(config, "aysnd", XTAL(19'968'000)/16).add_route(ALL_OUTPUTS, "mono", 0.33); /* ? */
-MACHINE_CONFIG_END
+}
ROM_START( sbowling )
ROM_REGION( 0x10000, "maincpu", 0 )
diff --git a/src/mame/drivers/sbugger.cpp b/src/mame/drivers/sbugger.cpp
index 6451a7a3952..52536def52d 100644
--- a/src/mame/drivers/sbugger.cpp
+++ b/src/mame/drivers/sbugger.cpp
@@ -214,11 +214,11 @@ INPUT_PORTS_END
/* machine driver */
-MACHINE_CONFIG_START(sbugger_state::sbugger)
-
- MCFG_DEVICE_ADD("maincpu", I8085A, 6000000) /* 3.00 MHz??? */
- MCFG_DEVICE_PROGRAM_MAP(sbugger_map)
- MCFG_DEVICE_IO_MAP(sbugger_io_map)
+void sbugger_state::sbugger(machine_config &config)
+{
+ I8085A(config, m_maincpu, 6000000); /* 3.00 MHz??? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &sbugger_state::sbugger_map);
+ m_maincpu->set_addrmap(AS_IO, &sbugger_state::sbugger_io_map);
i8156_device &i8156(I8156(config, "i8156", 200000)); /* freq is an approximation */
i8156.in_pa_callback().set_ioport("INPUTS");
@@ -228,25 +228,23 @@ MACHINE_CONFIG_START(sbugger_state::sbugger)
GFXDECODE(config, m_gfxdecode, "palette", gfx_sbugger);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sbugger_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(0*8, 64*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(sbugger_state::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(sbugger_state::sbugger_palette), 512);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("sn76489.1", SN76489, 3000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ SN76489(config, "sn76489.1", 3000000).add_route(ALL_OUTPUTS, "mono", 1.0);
- MCFG_DEVICE_ADD("sn76489.2", SN76489, 3000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ SN76489(config, "sn76489.2", 3000000).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
/* rom loading */
diff --git a/src/mame/drivers/sc1.cpp b/src/mame/drivers/sc1.cpp
index 55772bc1337..94dc6ce8c18 100644
--- a/src/mame/drivers/sc1.cpp
+++ b/src/mame/drivers/sc1.cpp
@@ -158,11 +158,12 @@ static INPUT_PORTS_START( sc1 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(sc1_state::sc1)
+void sc1_state::sc1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(sc1_mem)
- MCFG_DEVICE_IO_MAP(sc1_io)
+ Z80(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &sc1_state::sc1_mem);
+ m_maincpu->set_addrmap(AS_IO, &sc1_state::sc1_io);
/* video hardware */
config.set_default_layout(layout_sc1);
@@ -174,9 +175,8 @@ MACHINE_CONFIG_START(sc1_state::sc1)
/* 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);
+}
/* ROM definition */
ROM_START( sc1 )
diff --git a/src/mame/drivers/sc2.cpp b/src/mame/drivers/sc2.cpp
index abe351f6cd7..53e5fcd6699 100644
--- a/src/mame/drivers/sc2.cpp
+++ b/src/mame/drivers/sc2.cpp
@@ -212,12 +212,12 @@ WRITE8_MEMBER( sc2_state::pio_port_b_w )
m_kp_matrix = data;
}
-MACHINE_CONFIG_START(sc2_state::sc2)
+void sc2_state::sc2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(sc2_mem)
- MCFG_DEVICE_IO_MAP(sc2_io)
-
+ Z80(config, m_maincpu, XTAL(4'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &sc2_state::sc2_mem);
+ m_maincpu->set_addrmap(AS_IO, &sc2_state::sc2_io);
/* video hardware */
config.set_default_layout(layout_sc2);
@@ -231,9 +231,8 @@ MACHINE_CONFIG_START(sc2_state::sc2)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD( "beeper", BEEP, 3250 )
- MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 0.50 )
-MACHINE_CONFIG_END
+ BEEP(config, m_beep, 3250).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
/* ROM definition */
ROM_START( sc2 )
diff --git a/src/mame/drivers/scm_500.cpp b/src/mame/drivers/scm_500.cpp
index 7983f6482e3..ad16a0e2c57 100644
--- a/src/mame/drivers/scm_500.cpp
+++ b/src/mame/drivers/scm_500.cpp
@@ -40,11 +40,10 @@ void scm_500_state::machine_reset()
{
}
-MACHINE_CONFIG_START(scm_500_state::scm_500)
-
+void scm_500_state::scm_500(machine_config &config)
+{
// unknown CPU
-
-MACHINE_CONFIG_END
+}
/*
diff --git a/src/mame/drivers/scobra.cpp b/src/mame/drivers/scobra.cpp
index 8ae0988fa1c..f3783395f76 100644
--- a/src/mame/drivers/scobra.cpp
+++ b/src/mame/drivers/scobra.cpp
@@ -866,16 +866,16 @@ static INPUT_PORTS_START( mimonsco )
INPUT_PORTS_END
-MACHINE_CONFIG_START(scobra_state::type1)
-
+void scobra_state::type1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 18432000/6) /* 3.072 MHz */
- MCFG_DEVICE_PROGRAM_MAP(type1_map)
+ Z80(config, m_maincpu, 18432000/6); /* 3.072 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::type1_map);
- MCFG_DEVICE_ADD("audiocpu", Z80,14318000/8) /* 1.78975 MHz */
- MCFG_DEVICE_PROGRAM_MAP(scobra_sound_map)
- MCFG_DEVICE_IO_MAP(scobra_sound_io_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(scramble_state,scramble_sh_irq_callback)
+ Z80(config, m_audiocpu, 14318000/8); /* 1.78975 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &scobra_state::scobra_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &scobra_state::scobra_sound_io_map);
+ m_audiocpu->set_irq_acknowledge_callback(FUNC(scramble_state::scramble_sh_irq_callback));
ttl7474_device &konami_7474(TTL7474(config, "konami_7474", 0));
konami_7474.comp_output_cb().set(FUNC(scobra_state::scramble_sh_7474_q_callback));
@@ -902,13 +902,13 @@ MACHINE_CONFIG_START(scobra_state::type1)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(16000.0/132/2)
- 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(scobra_state, screen_update_galaxold)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(16000.0/132/2);
+ 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(scobra_state::screen_update_galaxold));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_scobra);
PALETTE(config, m_palette, FUNC(scobra_state::scrambold_palette), 32+64+2+1); // 32 for characters, 64 for stars, 2 for bullets, 1 for background
@@ -926,13 +926,14 @@ MACHINE_CONFIG_START(scobra_state::type1)
ay2.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read));
ay2.port_b_read_callback().set(FUNC(scramble_state::scramble_portB_r));
ay2.add_route(ALL_OUTPUTS, "mono", 0.16);
-MACHINE_CONFIG_END
+}
/* Rescue, Minefield and Strategy X have extra colors, and custom video initialise */
/* routines to set up the graduated color backgound they use */
-MACHINE_CONFIG_START(scobra_state::rescue)
+void scobra_state::rescue(machine_config &config)
+{
type1(config);
/* basic machine hardware */
@@ -942,14 +943,14 @@ MACHINE_CONFIG_START(scobra_state::rescue)
m_palette->set_init(FUNC(scobra_state::rescue_palette));
MCFG_VIDEO_START_OVERRIDE(scobra_state,rescue)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scobra_state::rescuefe)
+void scobra_state::rescuefe(machine_config &config)
+{
rescue(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(rescuefe_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::rescuefe_map);
+}
void scobra_state::rescueb(machine_config &config)
{
@@ -958,55 +959,55 @@ void scobra_state::rescueb(machine_config &config)
}
-MACHINE_CONFIG_START(scobra_state::minefld)
+void scobra_state::minefld(machine_config &config)
+{
type1(config);
- /* basic machine hardware */
-
/* video hardware */
m_palette->set_entries(32+64+2+256); // 32 for characters, 64 for stars, 2 for bullets, 256 for background
m_palette->set_init(FUNC(scobra_state::minefld_palette));
MCFG_VIDEO_START_OVERRIDE(scobra_state,minefld)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scobra_state::minefldfe)
+void scobra_state::minefldfe(machine_config &config)
+{
minefld(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(minefldfe_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::minefldfe_map);
+}
-MACHINE_CONFIG_START(scobra_state::mimonkey)
+void scobra_state::mimonkey(machine_config &config)
+{
type1(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mimonkey_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::mimonkey_map);
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(scobra_state,mimonkey)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scobra_state::type2)
+void scobra_state::type2(machine_config &config)
+{
type1(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(type2_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::type2_map);
+}
-MACHINE_CONFIG_START(scobra_state::tazmani3)
+void scobra_state::tazmani3(machine_config &config)
+{
type2(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(tazmani3_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::tazmani3_map);
+}
-MACHINE_CONFIG_START(scobra_state::stratgyx)
+void scobra_state::stratgyx(machine_config &config)
+{
type2(config);
/* basic machine hardware */
@@ -1020,32 +1021,31 @@ MACHINE_CONFIG_START(scobra_state::stratgyx)
m_palette->set_init(FUNC(scobra_state::stratgyx_palette));
MCFG_VIDEO_START_OVERRIDE(scobra_state,stratgyx)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scobra_state::darkplnt)
+void scobra_state::darkplnt(machine_config &config)
+{
type2(config);
- /* basic machine hardware */
-
/* video hardware */
m_palette->set_entries(32+64+2); // 32 for characters, 64 (buffer) for stars, 2 for bullets
m_palette->set_init(FUNC(scobra_state::darkplnt_palette));
MCFG_VIDEO_START_OVERRIDE(scobra_state,darkplnt)
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(scobra_state::hustler)
+void scobra_state::hustler(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 18432000/6) /* 3.072 MHz */
- MCFG_DEVICE_PROGRAM_MAP(hustler_map)
+ Z80(config, m_maincpu, 18432000/6); /* 3.072 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::hustler_map);
- MCFG_DEVICE_ADD("audiocpu",Z80,14318000/8) /* 1.78975 MHz */
- MCFG_DEVICE_PROGRAM_MAP(hustler_sound_map)
- MCFG_DEVICE_IO_MAP(hustler_sound_io_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(scramble_state,scramble_sh_irq_callback)
+ Z80(config, m_audiocpu, 14318000/8); /* 1.78975 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &scobra_state::hustler_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &scobra_state::hustler_sound_io_map);
+ m_audiocpu->set_irq_acknowledge_callback(FUNC(scramble_state::scramble_sh_irq_callback));
ttl7474_device &konami_7474(TTL7474(config, "konami_7474", 0));
konami_7474.comp_output_cb().set(FUNC(scobra_state::scramble_sh_7474_q_callback));
@@ -1072,13 +1072,13 @@ MACHINE_CONFIG_START(scobra_state::hustler)
m_ppi8255_1->out_pb_callback().set(FUNC(scramble_state::scramble_sh_irqtrigger_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(16000.0/132/2)
- 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(scobra_state, screen_update_galaxold)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(16000.0/132/2);
+ 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(scobra_state::screen_update_galaxold));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_scobra);
PALETTE(config, m_palette, FUNC(scobra_state::galaxold_palette), 32+64+2); // 32 for characters, 64 for stars, 2 for bullets
@@ -1093,27 +1093,26 @@ MACHINE_CONFIG_START(scobra_state::hustler)
aysnd.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read));
aysnd.port_b_read_callback().set(FUNC(scramble_state::hustler_portB_r));
aysnd.add_route(ALL_OUTPUTS, "mono", 0.33);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scobra_state::hustlerb)
+void scobra_state::hustlerb(machine_config &config)
+{
hustler(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hustlerb_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::hustlerb_map);
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_PROGRAM_MAP(hustlerb_sound_map)
- MCFG_DEVICE_IO_MAP(hustlerb_sound_io_map)
-MACHINE_CONFIG_END
+ m_audiocpu->set_addrmap(AS_PROGRAM, &scobra_state::hustlerb_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &scobra_state::hustlerb_sound_io_map);
+}
-MACHINE_CONFIG_START(scobra_state::hustlerb4)
+void scobra_state::hustlerb4(machine_config &config)
+{
hustler(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hustlerb_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &scobra_state::hustlerb_map);
+}
diff --git a/src/mame/drivers/scopus.cpp b/src/mame/drivers/scopus.cpp
index 17ea902edb0..95b35269492 100644
--- a/src/mame/drivers/scopus.cpp
+++ b/src/mame/drivers/scopus.cpp
@@ -173,13 +173,13 @@ READ8_MEMBER(sagitta180_state::memory_read_byte)
return prog_space.read_byte(offset);
}
-MACHINE_CONFIG_START(sagitta180_state::sagitta180)
-
+void sagitta180_state::sagitta180(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8080, XTAL(10'000'000)) /* guessed ! */
- MCFG_DEVICE_PROGRAM_MAP(maincpu_map)
- MCFG_DEVICE_IO_MAP(maincpu_io_map)
-// MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("intlatch", i8212_device, inta_cb)
+ I8080(config, m_maincpu, XTAL(10'000'000)); /* guessed ! */
+ m_maincpu->set_addrmap(AS_PROGRAM, &sagitta180_state::maincpu_map);
+ m_maincpu->set_addrmap(AS_IO, &sagitta180_state::maincpu_io_map);
+// m_maincpu->set_irq_acknowledge_callback("intlatch", FUNC(i8212_device::inta_cb));
I8257(config, m_dma8257, XTAL(14'745'600)); /* guessed xtal */
m_dma8257->out_iow_cb<2>().set("crtc", FUNC(i8275_device::dack_w));
@@ -200,18 +200,18 @@ MACHINE_CONFIG_START(sagitta180_state::sagitta180)
uart_clock.signal_handler().set("uart", FUNC(i8251_device::write_txc));
uart_clock.signal_handler().append("uart", FUNC(i8251_device::write_rxc));
-// MCFG_DEVICE_ADD("intlatch", I8212, 0)
-// MCFG_I8212_MD_CALLBACK(GND) // guessed !
-// MCFG_I8212_DI_CALLBACK(READ8("picu", i8214_device, vector_r))
-// MCFG_I8212_INT_CALLBACK(INPUTLINE("maincpu", I8085_INTR_LINE)) // guessed !
+// i8212_device &intlatch(I8212(config, "intlatch", 0));
+// intlatch.md_rd_callback().set_constant(GND); // guessed !
+// intlatch.di_rd_callback().set("picu", FUNC(i8214_device::vector_r));
+// intlatch.int_wr_callback().set_inputline("maincpu", I8085_INTR_LINE); // guessed !
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DEVICE("crtc", i8275_device, screen_update)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(80*5, 25*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 80*5-1, 0, 25*8-1)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_screen_update("crtc", FUNC(i8275_device::screen_update));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(80*5, 25*8);
+ screen.set_visarea(0, 80*5-1, 0, 25*8-1);
GFXDECODE(config, "gfxdecode", m_palette, gfx_sagitta180);
I8275(config, m_crtc, 12480000 / 8); /* guessed xtal */
@@ -221,8 +221,8 @@ MACHINE_CONFIG_START(sagitta180_state::sagitta180)
m_crtc->irq_wr_callback().set_inputline(m_maincpu, I8085_INTR_LINE);
m_crtc->set_screen("screen");
- MCFG_PALETTE_ADD("palette", 3)
-MACHINE_CONFIG_END
+ PALETTE(config, m_palette).set_entries(3);
+}
ROM_START( sagitta180 )
diff --git a/src/mame/drivers/scorpion.cpp b/src/mame/drivers/scorpion.cpp
index b8b054b01c8..d88d0f09ca9 100644
--- a/src/mame/drivers/scorpion.cpp
+++ b/src/mame/drivers/scorpion.cpp
@@ -292,13 +292,13 @@ static GFXDECODE_START( gfx_quorum )
GFXDECODE_ENTRY( "maincpu", 0x1fb00, quorum_charlayout, 0, 8 )
GFXDECODE_END
-MACHINE_CONFIG_START(scorpion_state::scorpion)
+void scorpion_state::scorpion(machine_config &config)
+{
spectrum_128(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(scorpion_mem)
- MCFG_DEVICE_IO_MAP(scorpion_io)
- MCFG_DEVICE_OPCODES_MAP(scorpion_switch)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scorpion_state::scorpion_mem);
+ m_maincpu->set_addrmap(AS_IO, &scorpion_state::scorpion_io);
+ m_maincpu->set_addrmap(AS_OPCODES, &scorpion_state::scorpion_switch);
MCFG_MACHINE_START_OVERRIDE(scorpion_state, scorpion )
MCFG_MACHINE_RESET_OVERRIDE(scorpion_state, scorpion )
@@ -312,7 +312,7 @@ MACHINE_CONFIG_START(scorpion_state::scorpion)
TIMER(config, "nmi_timer").configure_periodic(FUNC(scorpion_state::nmi_check_callback), attotime::from_hz(50));
config.device_remove("exp");
-MACHINE_CONFIG_END
+}
void scorpion_state::profi(machine_config &config)
{
diff --git a/src/mame/drivers/scotrsht.cpp b/src/mame/drivers/scotrsht.cpp
index 90db90d1fd0..b8685aacfac 100644
--- a/src/mame/drivers/scotrsht.cpp
+++ b/src/mame/drivers/scotrsht.cpp
@@ -187,27 +187,27 @@ static GFXDECODE_START( gfx_scotrsht )
GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 16*16*8, 16*8 ) /* sprites */
GFXDECODE_END
-MACHINE_CONFIG_START(scotrsht_state::scotrsht)
-
+void scotrsht_state::scotrsht(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, 18432000/6) /* 3.072 MHz */
- MCFG_DEVICE_PROGRAM_MAP(scotrsht_map)
+ MC6809E(config, m_maincpu, 18432000/6); /* 3.072 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &scotrsht_state::scotrsht_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 18432000/6) /* 3.072 MHz */
- MCFG_DEVICE_PROGRAM_MAP(scotrsht_sound_map)
- MCFG_DEVICE_IO_MAP(scotrsht_sound_port)
+ Z80(config, m_audiocpu, 18432000/6); /* 3.072 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &scotrsht_state::scotrsht_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &scotrsht_state::scotrsht_sound_port);
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(scotrsht_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, scotrsht_state, vblank_irq))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(scotrsht_state::screen_update));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(scotrsht_state::vblank_irq));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_scotrsht);
PALETTE(config, m_palette, FUNC(scotrsht_state::scotrsht_palette), 16*8*16+16*8*16, 256);
@@ -217,9 +217,8 @@ MACHINE_CONFIG_START(scotrsht_state::scotrsht)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("ymsnd", YM2203, 18432000/6)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
-MACHINE_CONFIG_END
+ YM2203(config, "ymsnd", 18432000/6).add_route(ALL_OUTPUTS, "mono", 0.40);
+}
/***************************************************************************
diff --git a/src/mame/drivers/scramble.cpp b/src/mame/drivers/scramble.cpp
index 59830f7b872..7ba5e5890bb 100644
--- a/src/mame/drivers/scramble.cpp
+++ b/src/mame/drivers/scramble.cpp
@@ -1302,16 +1302,16 @@ GFXDECODE_END
/**************************************************************************/
-MACHINE_CONFIG_START(scramble_state::scramble)
-
+void scramble_state::scramble(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 18432000/6) /* 3.072 MHz */
- MCFG_DEVICE_PROGRAM_MAP(scramble_map)
+ Z80(config, m_maincpu, 18432000/6); /* 3.072 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::scramble_map);
- MCFG_DEVICE_ADD("audiocpu", Z80, 14318000/8) /* 1.78975 MHz */
- MCFG_DEVICE_PROGRAM_MAP(scramble_sound_map)
- MCFG_DEVICE_IO_MAP(scramble_sound_io_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(scramble_state,scramble_sh_irq_callback)
+ Z80(config, m_audiocpu, 14318000/8); /* 1.78975 MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &scramble_state::scramble_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &scramble_state::scramble_sound_io_map);
+ m_audiocpu->set_irq_acknowledge_callback(FUNC(scramble_state::scramble_sh_irq_callback));
ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1", 0));
ttl7474_9m_1.output_cb().set(FUNC(scramble_state::galaxold_7474_9m_1_callback));
@@ -1338,13 +1338,13 @@ MACHINE_CONFIG_START(scramble_state::scramble)
m_ppi8255_1->out_pb_callback().set(FUNC(scramble_state::scramble_sh_irqtrigger_w));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(16000.0/132/2)
- 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(scramble_state, screen_update_galaxold)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(16000.0/132/2);
+ 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(scramble_state::screen_update_galaxold));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_scramble);
PALETTE(config, m_palette, FUNC(scramble_state::scrambold_palette), 32+64+2+1); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background
@@ -1362,14 +1362,14 @@ MACHINE_CONFIG_START(scramble_state::scramble)
ay2.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read));
ay2.port_b_read_callback().set(FUNC(scramble_state::scramble_portB_r));
ay2.add_route(ALL_OUTPUTS, "mono", 0.16);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::mars)
+void scramble_state::mars(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mars_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::mars_map);
m_ppi8255_1->out_pa_callback().set(m_soundlatch, FUNC(generic_latch_8_device::write));
m_ppi8255_1->out_pb_callback().set(FUNC(scramble_state::scramble_sh_irqtrigger_w));
@@ -1378,42 +1378,42 @@ MACHINE_CONFIG_START(scramble_state::mars)
/* video hardware */
m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::devilfsh)
+void scramble_state::devilfsh(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mars_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::mars_map);
/* video hardware */
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_devilfsh);
m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::newsin7)
+void scramble_state::newsin7(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(newsin7_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", scramble_state, irq0_line_hold) // newsin7a has a corrupt opcode at 0x67, the irq routine instead of NMI avoids it by jumping to 0x68 after doing some other things, probably intentional. newsin7 has this fixed, maybe a bootleg?
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::newsin7_map);
+ m_maincpu->set_vblank_int("screen", FUNC(scramble_state::irq0_line_hold)); // newsin7a has a corrupt opcode at 0x67, the irq routine instead of NMI avoids it by jumping to 0x68 after doing some other things, probably intentional. newsin7 has this fixed, maybe a bootleg?
/* video hardware */
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_newsin7);
m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
MCFG_VIDEO_START_OVERRIDE(scramble_state,newsin7)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::mrkougb)
+void scramble_state::mrkougb(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mrkougar_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::mrkougar_map);
m_ppi8255_1->out_pa_callback().set(m_soundlatch, FUNC(generic_latch_8_device::write));
m_ppi8255_1->out_pb_callback().set(FUNC(scramble_state::mrkougar_sh_irqtrigger_w));
@@ -1422,7 +1422,7 @@ MACHINE_CONFIG_START(scramble_state::mrkougb)
/* video hardware */
m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
-MACHINE_CONFIG_END
+}
void scramble_state::mrkougar(machine_config &config)
{
@@ -1432,31 +1432,30 @@ void scramble_state::mrkougar(machine_config &config)
subdevice<gfxdecode_device>("gfxdecode")->set_info(gfx_mrkougar);
}
-MACHINE_CONFIG_START(scramble_state::ckongs)
+void scramble_state::ckongs(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(ckongs_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::ckongs_map);
/* video hardware */
m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
MCFG_VIDEO_START_OVERRIDE(scramble_state,ckongs)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::hotshock)
+void scramble_state::hotshock(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(hotshock_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::hotshock_map);
config.device_remove( "ppi8255_0" );
config.device_remove( "ppi8255_1" );
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_IO_MAP(hotshock_sound_io_map)
+ m_audiocpu->set_addrmap(AS_IO, &scramble_state::hotshock_sound_io_map);
MCFG_MACHINE_RESET_OVERRIDE(scramble_state,galaxold)
@@ -1471,9 +1470,10 @@ MACHINE_CONFIG_START(scramble_state::hotshock)
subdevice<ay8910_device>("8910.2")->port_a_read_callback().set(FUNC(scramble_state::hotshock_soundlatch_r));
subdevice<ay8910_device>("8910.2")->reset_routes();
subdevice<ay8910_device>("8910.2")->add_route(ALL_OUTPUTS, "mono", 0.33);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::cavelon)
+void scramble_state::cavelon(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
@@ -1482,27 +1482,27 @@ MACHINE_CONFIG_START(scramble_state::cavelon)
m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
MCFG_VIDEO_START_OVERRIDE(scramble_state,ckongs)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::mimonscr)
+void scramble_state::mimonscr(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mimonscr_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::mimonscr_map);
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(scramble_state,mimonkey)
-MACHINE_CONFIG_END
+}
/* Triple Punch and Mariner are different - only one CPU, one 8910 */
-MACHINE_CONFIG_START(scramble_state::triplep)
+void scramble_state::triplep(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(triplep_map)
- MCFG_DEVICE_IO_MAP(triplep_io_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::triplep_map);
+ m_maincpu->set_addrmap(AS_IO, &scramble_state::triplep_io_map);
config.device_remove("audiocpu");
config.device_remove("ppi8255_1");
@@ -1513,30 +1513,27 @@ MACHINE_CONFIG_START(scramble_state::triplep)
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
/* sound hardware */
- MCFG_DEVICE_MODIFY("8910.1")
- MCFG_DEVICE_CLOCK(18432000/12) // triple punch/knock out ay clock is 1.535MHz, derived from main cpu xtal; verified on hardware
-
-
- MCFG_SOUND_ROUTES_RESET()
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ subdevice<ay8910_device>("8910.1")->set_clock(18432000/12); // triple punch/knock out ay clock is 1.535MHz, derived from main cpu xtal; verified on hardware
+ subdevice<ay8910_device>("8910.1")->reset_routes();
+ subdevice<ay8910_device>("8910.1")->add_route(ALL_OUTPUTS, "mono", 1.0);
config.device_remove("8910.2");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::mariner)
+void scramble_state::mariner(machine_config &config)
+{
triplep(config);
- /* basic machine hardware */
-
/* video hardware */
m_palette->set_entries(32+64+2+16); // 32 for characters, 64 for stars, 2 for bullets, 16 for background
m_palette->set_init(FUNC(scramble_state::mariner_palette));
MCFG_VIDEO_START_OVERRIDE(scramble_state,mariner)
-MACHINE_CONFIG_END
+}
/* Hunchback replaces the Z80 with a S2650 CPU */
-MACHINE_CONFIG_START(scramble_state::hunchbks)
+void scramble_state::hunchbks(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
@@ -1546,28 +1543,28 @@ MACHINE_CONFIG_START(scramble_state::hunchbks)
maincpu.sense_handler().set("screen", FUNC(screen_device::vblank));
maincpu.set_vblank_int("screen", FUNC(scramble_state::hunchbks_vh_interrupt));
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
/* video hardware */
m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets
m_palette->set_init(FUNC(scramble_state::galaxold_palette));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::hncholms)
+void scramble_state::hncholms(machine_config &config)
+{
hunchbks(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(18432000/6/2/2)
+ m_maincpu->set_clock(18432000/6/2/2);
MCFG_VIDEO_START_OVERRIDE(scramble_state,scorpion)
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::ad2083)
+void scramble_state::ad2083(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 18432000/6) /* 3.072 MHz */
- MCFG_DEVICE_PROGRAM_MAP(ad2083_map)
+ Z80(config, m_maincpu, 18432000/6); /* 3.072 MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::ad2083_map);
ttl7474_device &ttl7474_9m_1(TTL7474(config, "7474_9m_1", 0));
ttl7474_9m_1.output_cb().set(FUNC(scramble_state::galaxold_7474_9m_1_callback));
@@ -1585,13 +1582,13 @@ MACHINE_CONFIG_START(scramble_state::ad2083)
MCFG_MACHINE_RESET_OVERRIDE(scramble_state,galaxold)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(16000.0/132/2)
- 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(scramble_state, screen_update_galaxold)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(16000.0/132/2);
+ 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(scramble_state::screen_update_galaxold));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_ad2083);
PALETTE(config, m_palette, FUNC(scramble_state::turtles_palette), 32+64+2+8); // 32 for characters, 64 for stars, 2 for bullets, 8 for background
@@ -1602,20 +1599,19 @@ MACHINE_CONFIG_START(scramble_state::ad2083)
ad2083_audio(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(scramble_state::harem)
+void scramble_state::harem(machine_config &config)
+{
scramble(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(harem_map)
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &scramble_state::harem_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &scramble_state::decrypted_opcodes_map);
- MCFG_DEVICE_MODIFY("audiocpu")
- MCFG_DEVICE_PROGRAM_MAP(harem_sound_map)
- MCFG_DEVICE_IO_MAP(harem_sound_io_map)
+ m_audiocpu->set_addrmap(AS_PROGRAM, &scramble_state::harem_sound_map);
+ m_audiocpu->set_addrmap(AS_IO, &scramble_state::harem_sound_io_map);
MCFG_VIDEO_START_OVERRIDE(scramble_state,harem)
@@ -1626,7 +1622,7 @@ MACHINE_CONFIG_START(scramble_state::harem)
ay3.port_b_write_callback().set(FUNC(scramble_state::harem_digitalker_control_w));
DIGITALKER(config, m_digitalker, 4000000).add_route(ALL_OUTPUTS, "mono", 0.16);
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/scregg.cpp b/src/mame/drivers/scregg.cpp
index 2786d4e2d77..b8bc7a411a1 100644
--- a/src/mame/drivers/scregg.cpp
+++ b/src/mame/drivers/scregg.cpp
@@ -269,21 +269,21 @@ MACHINE_RESET_MEMBER(scregg_state,scregg)
m_btime_tilemap[3] = 0;
}
-MACHINE_CONFIG_START(scregg_state::dommy)
-
+void scregg_state::dommy(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, XTAL(12'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(dommy_map)
+ M6502(config, m_maincpu, XTAL(12'000'000)/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &scregg_state::dommy_map);
TIMER(config, "irq").configure_scanline(FUNC(scregg_state::scregg_interrupt), "screen", 0, 8);
MCFG_MACHINE_START_OVERRIDE(scregg_state,scregg)
MCFG_MACHINE_RESET_OVERRIDE(scregg_state,scregg)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(12'000'000)/2, 384, 8, 248, 272, 8, 248)
- MCFG_SCREEN_UPDATE_DRIVER(scregg_state, screen_update_eggs)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(12'000'000)/2, 384, 8, 248, 272, 8, 248);
+ m_screen->set_screen_update(FUNC(scregg_state::screen_update_eggs));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_scregg);
PALETTE(config, m_palette, FUNC(scregg_state::btime_palette), 8);
@@ -294,24 +294,24 @@ MACHINE_CONFIG_START(scregg_state::dommy)
AY8910(config, "ay1", XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.23);
AY8910(config, "ay2", XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.23);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(scregg_state::scregg)
+void scregg_state::scregg(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, XTAL(12'000'000)/8)
- MCFG_DEVICE_PROGRAM_MAP(eggs_map)
+ M6502(config, m_maincpu, XTAL(12'000'000)/8);
+ m_maincpu->set_addrmap(AS_PROGRAM, &scregg_state::eggs_map);
TIMER(config, "irq").configure_scanline(FUNC(scregg_state::scregg_interrupt), "screen", 0, 8);
MCFG_MACHINE_START_OVERRIDE(scregg_state,scregg)
MCFG_MACHINE_RESET_OVERRIDE(scregg_state,scregg)
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(12'000'000)/2, 384, 8, 248, 272, 8, 248)
- MCFG_SCREEN_UPDATE_DRIVER(scregg_state, screen_update_eggs)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(12'000'000)/2, 384, 8, 248, 272, 8, 248);
+ m_screen->set_screen_update(FUNC(scregg_state::screen_update_eggs));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_scregg);
PALETTE(config, m_palette, FUNC(scregg_state::btime_palette), 8);
@@ -322,7 +322,7 @@ MACHINE_CONFIG_START(scregg_state::scregg)
AY8910(config, "ay1", XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.23);
AY8910(config, "ay2", XTAL(12'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.23);
-MACHINE_CONFIG_END
+}
ROM_START( dommy )
diff --git a/src/mame/drivers/sderby.cpp b/src/mame/drivers/sderby.cpp
index 4ea8bbb14ef..4ab2643c85c 100644
--- a/src/mame/drivers/sderby.cpp
+++ b/src/mame/drivers/sderby.cpp
@@ -599,149 +599,143 @@ GFXDECODE_END
* Machine Drivers *
****************************/
-MACHINE_CONFIG_START(sderby_state::sderby)
-
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(sderby_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sderby_state, irq2_line_hold)
+void sderby_state::sderby(machine_config &config)
+{
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::sderby_map);
+ m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq2_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(4*8, 44*8-1, 3*8, 33*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sderby_state, screen_update_sderby)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 64*8);
+ screen.set_visarea(4*8, 44*8-1, 3*8, 33*8-1);
+ screen.set_screen_update(FUNC(sderby_state::screen_update_sderby));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sderby);
PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) /* clock frequency & pin 7 not verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(sderby_state::sderbya)
+ OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); /* clock frequency & pin 7 not verified */
+}
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(sderbya_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sderby_state, irq2_line_hold)
+void sderby_state::sderbya(machine_config &config)
+{
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::sderbya_map);
+ m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq2_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(4*8, 44*8-1, 3*8, 33*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sderby_state, screen_update_sderby)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 64*8);
+ screen.set_visarea(4*8, 44*8-1, 3*8, 33*8-1);
+ screen.set_screen_update(FUNC(sderby_state::screen_update_sderby));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sderby);
PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) /* clock frequency & pin 7 not verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(sderby_state::luckboom)
+ OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); /* clock frequency & pin 7 not verified */
+}
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(luckboom_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sderby_state, irq4_line_hold)
+void sderby_state::luckboom(machine_config &config)
+{
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::luckboom_map);
+ m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq4_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(4*8, 44*8-1, 3*8, 33*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sderby_state, screen_update_sderby)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 64*8);
+ screen.set_visarea(4*8, 44*8-1, 3*8, 33*8-1);
+ screen.set_screen_update(FUNC(sderby_state::screen_update_sderby));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sderby);
PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) /* clock frequency & pin 7 not verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(sderby_state::spacewin)
+ OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); /* clock frequency & pin 7 not verified */
+}
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(spacewin_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sderby_state, irq2_line_hold)
+void sderby_state::spacewin(machine_config &config)
+{
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::spacewin_map);
+ m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq2_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(4*8, 44*8-1, 3*8, 33*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sderby_state, screen_update_pmroulet)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 64*8);
+ screen.set_visarea(4*8, 44*8-1, 3*8, 33*8-1);
+ screen.set_screen_update(FUNC(sderby_state::screen_update_pmroulet));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sderby);
PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) /* clock frequency & pin 7 not verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(sderby_state::shinygld)
+ OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); /* clock frequency & pin 7 not verified */
+}
- MCFG_DEVICE_ADD("maincpu", M68000, 24_MHz_XTAL / 2) // verified
- MCFG_DEVICE_PROGRAM_MAP(shinygld_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sderby_state, irq4_line_hold)
+void sderby_state::shinygld(machine_config &config)
+{
+ M68000(config, m_maincpu, 24_MHz_XTAL / 2); // verified
+ m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::shinygld_map);
+ m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq4_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57.47) // measured on PCB
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(4*8, 44*8-1, 3*8, 33*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sderby_state, screen_update_sderby)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(57.47); // measured on PCB
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 64*8);
+ screen.set_visarea(4*8, 44*8-1, 3*8, 33*8-1);
+ screen.set_screen_update(FUNC(sderby_state::screen_update_sderby));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sderby);
PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1.056_MHz_XTAL, okim6295_device::PIN7_HIGH) /* clock frequency & pin 7 verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(sderby_state::pmroulet)
+ OKIM6295(config, "oki", 1.056_MHz_XTAL, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); /* clock frequency & pin 7 verified */
+}
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(roulette_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sderby_state, irq2_line_hold)
+void sderby_state::pmroulet(machine_config &config)
+{
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sderby_state::roulette_map);
+ m_maincpu->set_vblank_int("screen", FUNC(sderby_state::irq2_line_hold));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(4*8, 44*8-1, 3*8, 33*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sderby_state, screen_update_pmroulet)
- 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, 64*8);
+ screen.set_visarea(4*8, 44*8-1, 3*8, 33*8-1);
+ screen.set_screen_update(FUNC(sderby_state::screen_update_pmroulet));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sderby);
PALETTE(config, m_palette).set_format(palette_device::RGBx_555, 0x1000);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1056000, okim6295_device::PIN7_HIGH) /* clock frequency & pin 7 not verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); /* clock frequency & pin 7 not verified */
+}
/****************************
diff --git a/src/mame/drivers/sderby2.cpp b/src/mame/drivers/sderby2.cpp
index d8865e53b72..3c4f7648a6e 100644
--- a/src/mame/drivers/sderby2.cpp
+++ b/src/mame/drivers/sderby2.cpp
@@ -298,32 +298,33 @@ void sderby2_state::machine_reset()
}
-MACHINE_CONFIG_START(sderby2_state::sderby2)
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(main_program_map)
- MCFG_DEVICE_IO_MAP(main_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sderby2_state, irq0_line_hold)
+void sderby2_state::sderby2(machine_config &config)
+{
+ Z80(config, m_maincpu, XTAL(3'579'545));
+ m_maincpu->set_addrmap(AS_PROGRAM, &sderby2_state::main_program_map);
+ m_maincpu->set_addrmap(AS_IO, &sderby2_state::main_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(sderby2_state::irq0_line_hold));
- MCFG_DEVICE_ADD("subcpu", Z80, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(sub_program_map)
- MCFG_DEVICE_IO_MAP(sub_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sderby2_state, irq0_line_hold)
+ Z80(config, m_subcpu, XTAL(3'579'545));
+ m_subcpu->set_addrmap(AS_PROGRAM, &sderby2_state::sub_program_map);
+ m_subcpu->set_addrmap(AS_IO, &sderby2_state::sub_io_map);
+ m_subcpu->set_vblank_int("screen", FUNC(sderby2_state::irq0_line_hold));
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256 - 1, 0, 256 - 1)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
- MCFG_SCREEN_UPDATE_DRIVER(sderby2_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(256, 256);
+ screen.set_visarea(0, 256 - 1, 0, 256 - 1);
+ screen.set_video_attributes(VIDEO_ALWAYS_UPDATE);
+ screen.set_screen_update(FUNC(sderby2_state::screen_update));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette, FUNC(sderby2_state::sderby2_palette), 256+256*3);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sderby2);
// sound hardware
-MACHINE_CONFIG_END
+}
/*************************************
*
diff --git a/src/mame/drivers/sdk85.cpp b/src/mame/drivers/sdk85.cpp
index 1989ead5fc6..2eeff6a9a4e 100644
--- a/src/mame/drivers/sdk85.cpp
+++ b/src/mame/drivers/sdk85.cpp
@@ -148,11 +148,12 @@ READ8_MEMBER( sdk85_state::kbd_r )
return data;
}
-MACHINE_CONFIG_START(sdk85_state::sdk85)
+void sdk85_state::sdk85(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8085A, 6.144_MHz_XTAL)
- MCFG_DEVICE_PROGRAM_MAP(sdk85_mem)
- MCFG_DEVICE_IO_MAP(sdk85_io)
+ I8085A(config, m_maincpu, 6.144_MHz_XTAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sdk85_state::sdk85_mem);
+ m_maincpu->set_addrmap(AS_IO, &sdk85_state::sdk85_io);
I8355(config, "romio", 6.144_MHz_XTAL / 2); // Monitor ROM (A14)
@@ -174,7 +175,7 @@ MACHINE_CONFIG_START(sdk85_state::sdk85)
kdc.in_rl_callback().set(FUNC(sdk85_state::kbd_r)); // kbd RL lines
kdc.in_shift_callback().set_constant(1); // Shift key
kdc.in_ctrl_callback().set_constant(1);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( sdk85 )
diff --git a/src/mame/drivers/sealy.cpp b/src/mame/drivers/sealy.cpp
index 661ad948358..93d3c697800 100644
--- a/src/mame/drivers/sealy.cpp
+++ b/src/mame/drivers/sealy.cpp
@@ -101,28 +101,27 @@ static GFXDECODE_START( gfx_sealy )
GFXDECODE_END
-MACHINE_CONFIG_START(sealy_state::sealy)
-
+void sealy_state::sealy(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", H83044, MAIN_CLOCK) /* wrong CPU, but we have not a M16C core ATM */
- MCFG_DEVICE_PROGRAM_MAP(sealy_map)
+ H83044(config, m_maincpu, MAIN_CLOCK); /* wrong CPU, but we have not a M16C core ATM */
+ m_maincpu->set_addrmap(AS_PROGRAM, &sealy_state::sealy_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(sealy_state, screen_update_sealy)
+ 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(sealy_state::screen_update_sealy));
GFXDECODE(config, "gfxdecode", m_palette, gfx_sealy);
PALETTE(config, m_palette, FUNC(sealy_state::sealy_palette), 32768);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, MAIN_CLOCK/13, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", MAIN_CLOCK/13, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
ROM_START( crzyddz )
diff --git a/src/mame/drivers/seattlecmp.cpp b/src/mame/drivers/seattlecmp.cpp
index 0b8e8e38fa3..ce7a1df8e19 100644
--- a/src/mame/drivers/seattlecmp.cpp
+++ b/src/mame/drivers/seattlecmp.cpp
@@ -103,12 +103,13 @@ static DEVICE_INPUT_DEFAULTS_START( terminal )
DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 )
DEVICE_INPUT_DEFAULTS_END
-MACHINE_CONFIG_START(seattle_comp_state::seattle)
+void seattle_comp_state::seattle(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8086, XTAL(24'000'000) / 3) // 8 MHz or 4 MHz selectable
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic1", pic8259_device, inta_cb)
+ I8086(config, m_maincpu, XTAL(24'000'000) / 3); // 8 MHz or 4 MHz selectable
+ m_maincpu->set_addrmap(AS_PROGRAM, &seattle_comp_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &seattle_comp_state::io_map);
+ m_maincpu->set_irq_acknowledge_callback("pic1", FUNC(pic8259_device::inta_cb));
PIC8259(config, m_pic[0], 0);
m_pic[0]->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_INT0);
@@ -138,7 +139,7 @@ MACHINE_CONFIG_START(seattle_comp_state::seattle)
rs232.dsr_handler().set("uart", FUNC(i8251_device::write_dsr));
rs232.cts_handler().set("uart", FUNC(i8251_device::write_cts));
rs232.set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal));
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( scp300f )
diff --git a/src/mame/drivers/segae.cpp b/src/mame/drivers/segae.cpp
index 433016e017e..ef357426bc1 100644
--- a/src/mame/drivers/segae.cpp
+++ b/src/mame/drivers/segae.cpp
@@ -886,7 +886,8 @@ uint32_t systeme_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma
return 0;
}
-MACHINE_CONFIG_START(systeme_state::systeme)
+void systeme_state::systeme(machine_config &config)
+{
Z80(config, m_maincpu, XTAL(10'738'635)/2); /* Z80B @ 5.3693Mhz */
m_maincpu->set_addrmap(AS_PROGRAM, &systeme_state::systeme_map);
m_maincpu->set_addrmap(AS_IO, &systeme_state::io_map);
@@ -895,11 +896,11 @@ MACHINE_CONFIG_START(systeme_state::systeme)
m_ppi->out_pb_callback().set(FUNC(systeme_state::coin_counters_write));
m_ppi->tri_pb_callback().set_constant(0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(10'738'635)/2, \
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(XTAL(10'738'635)/2, \
sega315_5124_device::WIDTH , sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH, sega315_5124_device::LBORDER_START + sega315_5124_device::LBORDER_WIDTH + 256, \
- sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_192_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_192_TBORDER_HEIGHT + 192)
- MCFG_SCREEN_UPDATE_DRIVER(systeme_state, screen_update)
+ sega315_5124_device::HEIGHT_NTSC, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_192_TBORDER_HEIGHT, sega315_5124_device::TBORDER_START + sega315_5124_device::NTSC_192_TBORDER_HEIGHT + 192);
+ screen.set_screen_update(FUNC(systeme_state::screen_update));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -914,7 +915,7 @@ MACHINE_CONFIG_START(systeme_state::systeme)
m_vdp2->irq().set_inputline(m_maincpu, 0);
m_vdp2->set_addrmap(0, &systeme_state::vdp2_map);
m_vdp2->add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
void systeme_state::hangonjr(machine_config &config)
{
diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp
index fa4a4d5a3e5..0e6a28529d5 100644
--- a/src/mame/drivers/segag80r.cpp
+++ b/src/mame/drivers/segag80r.cpp
@@ -827,65 +827,61 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(segag80r_state::g80r_base)
-
+void segag80r_state::g80r_base(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, VIDEO_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(main_portmap)
- MCFG_DEVICE_OPCODES_MAP(g80r_opcodes_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segag80r_state, segag80r_vblank_start)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(segag80r_state, segag80r_irq_ack)
+ Z80(config, m_maincpu, VIDEO_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segag80r_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &segag80r_state::main_portmap);
+ m_maincpu->set_addrmap(AS_OPCODES, &segag80r_state::g80r_opcodes_map);
+ m_maincpu->set_vblank_int("screen", FUNC(segag80r_state::segag80r_vblank_start));
+ m_maincpu->set_irq_acknowledge_callback(FUNC(segag80r_state::segag80r_irq_ack));
/* video hardware */
GFXDECODE(config, m_gfxdecode, m_palette, gfx_segag80r);
PALETTE(config, m_palette).set_entries(64);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
- MCFG_SCREEN_UPDATE_DRIVER(segag80r_state, screen_update_segag80r)
- MCFG_SCREEN_PALETTE(m_palette)
-MACHINE_CONFIG_END
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART);
+ m_screen->set_screen_update(FUNC(segag80r_state::screen_update_segag80r));
+ m_screen->set_palette(m_palette);
+}
-MACHINE_CONFIG_START(segag80r_state::astrob)
+void segag80r_state::astrob(machine_config &config)
+{
g80r_base(config);
- /* basic machine hardware */
-
/* sound hardware */
SPEAKER(config, "speaker").front_center();
/* sound boards */
astrob_sound_board(config);
sega_speech_board(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segag80r_state::sega005)
+void segag80r_state::sega005(machine_config &config)
+{
g80r_base(config);
/* basic machine hardware */
-
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(main_ppi8255_portmap)
+ m_maincpu->set_addrmap(AS_IO, &segag80r_state::main_ppi8255_portmap);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
/* sound boards */
sega005_sound_board(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segag80r_state::spaceod)
+void segag80r_state::spaceod(machine_config &config)
+{
g80r_base(config);
- /* basic machine hardware */
-
/* background board changes */
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
+ m_screen->set_video_attributes(VIDEO_ALWAYS_UPDATE);
m_gfxdecode->set_info(gfx_spaceod);
m_palette->set_entries(64 + 64);
@@ -894,15 +890,15 @@ MACHINE_CONFIG_START(segag80r_state::spaceod)
/* sound boards */
spaceod_sound_board(config);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segag80r_state::monsterb)
+void segag80r_state::monsterb(machine_config &config)
+{
g80r_base(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(main_ppi8255_portmap)
+ m_maincpu->set_addrmap(AS_IO, &segag80r_state::main_ppi8255_portmap);
i8255_device &ppi(I8255A(config, "ppi8255"));
ppi.out_pa_callback().set(m_soundbrd, FUNC(monsterb_sound_device::sound_a_w));
@@ -915,8 +911,8 @@ MACHINE_CONFIG_START(segag80r_state::monsterb)
m_palette->set_entries(64 + 64);
/* sound boards */
- MCFG_DEVICE_ADD(m_soundbrd, MONSTERB_SOUND, 0)
-MACHINE_CONFIG_END
+ MONSTERB_SOUND(config, m_soundbrd, 0);
+}
void segag80r_state::monster2(machine_config &config)
{
@@ -930,11 +926,10 @@ void segag80r_state::monster2(machine_config &config)
maincpu.set_decrypted_tag(":decrypted_opcodes");
}
-MACHINE_CONFIG_START(segag80r_state::pignewt)
+void segag80r_state::pignewt(machine_config &config)
+{
g80r_base(config);
- /* basic machine hardware */
-
/* background board changes */
m_gfxdecode->set_info(gfx_monsterb);
m_palette->set_entries(64 + 64);
@@ -944,10 +939,11 @@ MACHINE_CONFIG_START(segag80r_state::pignewt)
/* sound boards */
SEGAUSB(config, m_usbsnd, 0, m_maincpu).add_route(ALL_OUTPUTS, "speaker", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(segag80r_state::sindbadm)
+void segag80r_state::sindbadm(machine_config &config)
+{
g80r_base(config);
/* basic machine hardware */
@@ -975,12 +971,10 @@ MACHINE_CONFIG_START(segag80r_state::sindbadm)
m_audiocpu->set_periodic_int(FUNC(segag80r_state::irq0_line_hold), attotime::from_hz(4*60));
/* sound hardware */
- MCFG_DEVICE_ADD("sn1", SN76496, SINDBADM_SOUND_CLOCK/2) /* matches PCB videos, correct? */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ SN76496(config, m_sn1, SINDBADM_SOUND_CLOCK/2).add_route(ALL_OUTPUTS, "speaker", 1.0); /* matches PCB videos, correct? */
- MCFG_DEVICE_ADD("sn2", SN76496, SINDBADM_SOUND_CLOCK/4) /* matches PCB videos, correct? */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ SN76496(config, m_sn2, SINDBADM_SOUND_CLOCK/4).add_route(ALL_OUTPUTS, "speaker", 1.0); /* matches PCB videos, correct? */
+}
diff --git a/src/mame/drivers/segald.cpp b/src/mame/drivers/segald.cpp
index 7c9b582db12..92b9bc71520 100644
--- a/src/mame/drivers/segald.cpp
+++ b/src/mame/drivers/segald.cpp
@@ -378,31 +378,27 @@ void segald_state::machine_start()
/* DRIVER */
MACHINE_CONFIG_START(segald_state::astron)
-
/* main cpu */
- MCFG_DEVICE_ADD("maincpu", Z80, SCHEMATIC_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(mainmem)
- MCFG_DEVICE_IO_MAP(mainport)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(segald_state, nmi_line_pulse, 1000.0/59.94)
-
+ Z80(config, m_maincpu, SCHEMATIC_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &segald_state::mainmem);
+ m_maincpu->set_addrmap(AS_IO, &segald_state::mainport);
+ m_maincpu->set_periodic_int(FUNC(segald_state::nmi_line_pulse), attotime::from_hz(1000.0/59.94));
- MCFG_LASERDISC_LDV1000_ADD("laserdisc")
- MCFG_LASERDISC_OVERLAY_DRIVER(256, 256, segald_state, screen_update_astron)
- MCFG_LASERDISC_OVERLAY_PALETTE("palette")
+ PIONEER_LDV1000(config, m_laserdisc, 0);
+ m_laserdisc->set_overlay(256, 256, FUNC(segald_state::screen_update_astron));
+ m_laserdisc->set_overlay_palette(m_palette);
+ m_laserdisc->add_route(0, "lspeaker", 1.0);
+ m_laserdisc->add_route(1, "rspeaker", 1.0);
/* video hardware */
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc")
GFXDECODE(config, m_gfxdecode, m_palette, gfx_segald);
- MCFG_PALETTE_ADD("palette", 256)
+ PALETTE(config, m_palette).set_entries(256);
/* sound hardare */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
-
- MCFG_DEVICE_MODIFY("laserdisc")
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/segapm.cpp b/src/mame/drivers/segapm.cpp
index 497ca93c5fe..494aedcd64e 100644
--- a/src/mame/drivers/segapm.cpp
+++ b/src/mame/drivers/segapm.cpp
@@ -58,23 +58,23 @@ INPUT_PORTS_END
-MACHINE_CONFIG_START(segapm_state::segapm)
-
- MCFG_DEVICE_ADD("maincpu", M68000, 8000000) // ??
- MCFG_DEVICE_PROGRAM_MAP(segapm_map)
+void segapm_state::segapm(machine_config &config)
+{
+ M68000(config, m_maincpu, 8000000); // ??
+ m_maincpu->set_addrmap(AS_PROGRAM, &segapm_state::segapm_map);
// + 2 sh2s on 32x board
- 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(segapm_state, screen_update_segapm)
- 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, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(segapm_state::screen_update_segapm));
+ screen.set_palette("palette");
PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x200);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp
index 4472fd2398e..a9f15030879 100644
--- a/src/mame/drivers/segas16a.cpp
+++ b/src/mame/drivers/segas16a.cpp
@@ -2095,15 +2095,15 @@ void segas16a_state::system16a_no7751p(machine_config &config)
}
/*
-static MACHINE_CONFIG_START( system16a_i8751_no7751 )
+void segas16a_state::system16a_i8751_no7751(machine_config &config)
+{
system16a_i8751(config);
config.device_remove("n7751");
config.device_remove("dac");
config.device_remove("vref");
- MCFG_DEVICE_REPLACE("ymsnd", YM2151, 4000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
-MACHINE_CONFIG_END
+ YM2151(config.replace(), "ymsnd", 4000000).add_route(ALL_OUTPUTS, "speaker", 1.0);
+}
*/
void segas16a_state::system16a_fd1089a_no7751(machine_config &config)
diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp
index cae112405ba..1b5d130769e 100644
--- a/src/mame/drivers/segas16b.cpp
+++ b/src/mame/drivers/segas16b.cpp
@@ -3729,13 +3729,13 @@ void segas16b_state::system16b(machine_config &config)
m_mapper->pbf().set_inputline(m_soundcpu, 0);
// video hardware
- GFXDECODE(config, m_gfxdecode, "palette", gfx_segas16b);
- PALETTE(config, "palette").set_entries(2048*3);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_segas16b);
+ PALETTE(config, m_palette).set_entries(2048*3);
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224);
m_screen->set_screen_update(FUNC(segas16b_state::screen_update));
- m_screen->set_palette("palette");
+ m_screen->set_palette(m_palette);
SEGA_SYS16B_SPRITES(config, m_sprites, 0);
SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode);
@@ -3913,28 +3913,28 @@ void segas16b_state::fpointbla(machine_config &config)
m_sprites->set_local_originx(60); // these align the pieces with the playfield
}
-MACHINE_CONFIG_START(segas16b_state::lockonph)
-
+void segas16b_state::lockonph(machine_config &config)
+{
// basic machine hardware
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)/2) // ?
- MCFG_DEVICE_PROGRAM_MAP(lockonph_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segas16b_state, irq4_line_hold)
+ M68000(config, m_maincpu, XTAL(16'000'000)/2); // ?
+ m_maincpu->set_addrmap(AS_PROGRAM, &segas16b_state::lockonph_map);
+ m_maincpu->set_vblank_int("screen", FUNC(segas16b_state::irq4_line_hold));
- MCFG_DEVICE_ADD("soundcpu", Z80, XTAL(16'000'000)/4) // ?
- MCFG_DEVICE_PROGRAM_MAP(lockonph_sound_map)
- MCFG_DEVICE_IO_MAP(lockonph_sound_iomap)
+ Z80(config, m_soundcpu, XTAL(16'000'000)/4); // ?
+ m_soundcpu->set_addrmap(AS_PROGRAM, &segas16b_state::lockonph_sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &segas16b_state::lockonph_sound_iomap);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
// video hardware
- GFXDECODE(config, m_gfxdecode, "palette", gfx_lockonph);
- MCFG_PALETTE_ADD("palette", 0x2000*4)
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_lockonph);
+ PALETTE(config, m_palette).set_entries(0x2000*4);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224) // wrong, other XTAL seems to be 17Mhz?
- MCFG_SCREEN_UPDATE_DRIVER(segas16b_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224); // wrong, other XTAL seems to be 17Mhz?
+ m_screen->set_screen_update(FUNC(segas16b_state::screen_update));
+ m_screen->set_palette(m_palette);
SEGA_SYS16B_SPRITES(config, m_sprites, 0);
SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode);
@@ -3950,12 +3950,10 @@ MACHINE_CONFIG_START(segas16b_state::lockonph)
m_ym2151->add_route(0, "mono", 0.5);
m_ym2151->add_route(1, "mono", 0.5);
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(16'000'000)/16, okim6295_device::PIN7_LOW) // clock / pin not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.2)
-
-
-MACHINE_CONFIG_END
+ okim6295_device &oki(OKIM6295(config, "oki", XTAL(16'000'000)/16, okim6295_device::PIN7_LOW)); // clock / pin not verified
+ oki.add_route(ALL_OUTPUTS, "mono", 0.2);
+ oki.add_route(ALL_OUTPUTS, "mono", 0.2);
+}
//**************************************************************************
@@ -3981,11 +3979,11 @@ void segas16b_state::atomicp(machine_config &config) // 10MHz CPU Clock verified
}
-MACHINE_CONFIG_START(segas16b_state::system16c)
+void segas16b_state::system16c(machine_config &config)
+{
system16b(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(system16c_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &segas16b_state::system16c_map);
+}
@@ -9847,23 +9845,23 @@ void isgsm_state::machine_reset()
}
-MACHINE_CONFIG_START(isgsm_state::isgsm)
+void isgsm_state::isgsm(machine_config &config)
+{
system16b(config);
// basic machine hardware
config.device_remove("maincpu");
config.device_remove("mapper");
- MCFG_DEVICE_ADD("maincpu", M68000, 16000000) // no obvious CPU, but seems to be clocked faster than an original system16 based on the boot times
- MCFG_DEVICE_PROGRAM_MAP(isgsm_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", isgsm_state, irq4_line_hold)
+ M68000(config, m_maincpu, 16000000); // no obvious CPU, but seems to be clocked faster than an original system16 based on the boot times
+ m_maincpu->set_addrmap(AS_PROGRAM, &isgsm_state::isgsm_map);
+ m_maincpu->set_vblank_int("screen", FUNC(isgsm_state::irq4_line_hold));
- MCFG_DEVICE_MODIFY("soundcpu")
- MCFG_DEVICE_PROGRAM_MAP(bootleg_sound_map)
- MCFG_DEVICE_IO_MAP(bootleg_sound_portmap)
+ m_soundcpu->set_addrmap(AS_PROGRAM, &isgsm_state::bootleg_sound_map);
+ m_soundcpu->set_addrmap(AS_IO, &isgsm_state::bootleg_sound_portmap);
GENERIC_LATCH_8(config, m_soundlatch);
-MACHINE_CONFIG_END
+}
void isgsm_state::init_isgsm()
{
diff --git a/src/mame/drivers/segattl.cpp b/src/mame/drivers/segattl.cpp
index aeb4e77ea1d..9d61f5e4863 100644
--- a/src/mame/drivers/segattl.cpp
+++ b/src/mame/drivers/segattl.cpp
@@ -131,11 +131,11 @@ void segattl_state::video_start()
{
}
-MACHINE_CONFIG_START(segattl_state::segattl)
-
+void segattl_state::segattl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK)
- MCFG_NETLIST_SETUP(segattl)
+ NETLIST_CPU(config, m_maincpu, NETLIST_CLOCK);
+ m_maincpu->set_constructor(netlist_segattl);
/* video hardware */
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
@@ -145,7 +145,7 @@ MACHINE_CONFIG_START(segattl_state::segattl)
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/seibucats.cpp b/src/mame/drivers/seibucats.cpp
index b2fa430f0ea..119003e59bb 100644
--- a/src/mame/drivers/seibucats.cpp
+++ b/src/mame/drivers/seibucats.cpp
@@ -293,41 +293,39 @@ IRQ_CALLBACK_MEMBER(seibucats_state::spi_irq_callback)
}
#endif
-MACHINE_CONFIG_START(seibucats_state::seibucats)
-
+void seibucats_state::seibucats(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I386, MAIN_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(seibucats_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(seibuspi_state, spi_irq_callback)
+ I386(config, m_maincpu, MAIN_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &seibucats_state::seibucats_map);
+ m_maincpu->set_vblank_int("screen", FUNC(seibuspi_state::spi_interrupt));
+ m_maincpu->set_irq_acknowledge_callback(FUNC(seibuspi_state::spi_irq_callback));
EEPROM_93C46_16BIT(config, "eeprom");
//JRC6355E(config, m_rtc, XTAL(32'768));
- MCFG_DEVICE_ADD("usart1", I8251, 0)
- MCFG_DEVICE_ADD("usart2", I8251, 0)
+ I8251(config, "usart1", 0);
+ I8251(config, "usart2", 0);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_UPDATE_DRIVER(seibucats_state, screen_update)
- MCFG_SCREEN_UPDATE_DRIVER(seibuspi_state, screen_update_sys386f)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, SPI_HTOTAL, SPI_HBEND, SPI_HBSTART, SPI_VTOTAL, SPI_VBEND, SPI_VBSTART)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+// screen.set_screen_update(FUNC(seibucats_state::screen_update));
+ screen.set_screen_update(FUNC(seibuspi_state::screen_update_sys386f));
+ screen.set_raw(PIXEL_CLOCK, SPI_HTOTAL, SPI_HBEND, SPI_HBSTART, SPI_VTOTAL, SPI_VBEND, SPI_VBSTART);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_seibucats);
- MCFG_DEVICE_ADD(m_palette, PALETTE, palette_device::BLACK, 8192);
-// MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
- //MCFG_PALETTE_INIT_OWNER(seibucats_state, seibucats)
+ PALETTE(config, m_palette, palette_device::BLACK, 8192);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymz", YMZ280B, XTAL(16'384'000))
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ ymz280b_device &ymz(YMZ280B(config, "ymz", XTAL(16'384'000)));
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(0, "rspeaker", 1.0);
+}
/***************************************************************************
diff --git a/src/mame/drivers/seicross.cpp b/src/mame/drivers/seicross.cpp
index 97d11dc46bf..5bf453541af 100644
--- a/src/mame/drivers/seicross.cpp
+++ b/src/mame/drivers/seicross.cpp
@@ -395,16 +395,16 @@ INTERRUPT_GEN_MEMBER(seicross_state::vblank_irq)
}
-MACHINE_CONFIG_START(seicross_state::no_nvram)
-
+void seicross_state::no_nvram(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(18'432'000) / 6) /* D780C, 3.072 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_IO_MAP(main_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seicross_state, vblank_irq)
+ Z80(config, m_maincpu, XTAL(18'432'000) / 6); /* D780C, 3.072 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &seicross_state::main_map);
+ m_maincpu->set_addrmap(AS_IO, &seicross_state::main_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(seicross_state::vblank_irq));
- MCFG_DEVICE_ADD("mcu", NSC8105, XTAL(18'432'000) / 6) /* ??? */
- MCFG_DEVICE_PROGRAM_MAP(mcu_no_nvram_map)
+ NSC8105(config, m_mcu, XTAL(18'432'000) / 6); /* ??? */
+ m_mcu->set_addrmap(AS_PROGRAM, &seicross_state::mcu_no_nvram_map);
config.m_minimum_quantum = attotime::from_hz(1200); /* 20 CPU slices per frame - a high value to ensure proper */
/* synchronization of the CPUs */
@@ -412,13 +412,13 @@ MACHINE_CONFIG_START(seicross_state::no_nvram)
WATCHDOG_TIMER(config, "watchdog");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */ /* frames per second, vblank duration */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(seicross_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 */ /* frames per second, vblank duration */);
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(seicross_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_seicross);
PALETTE(config, m_palette, FUNC(seicross_state::seicross_palette), 64);
@@ -435,24 +435,24 @@ MACHINE_CONFIG_START(seicross_state::no_nvram)
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(seicross_state::nvram)
+void seicross_state::nvram(machine_config &config)
+{
no_nvram(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("mcu")
- MCFG_DEVICE_PROGRAM_MAP(mcu_nvram_map)
+ m_mcu->set_addrmap(AS_PROGRAM, &seicross_state::mcu_nvram_map);
NVRAM(config, "nvram").set_custom_handler(FUNC(seicross_state::nvram_init));
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(seicross_state::friskytb)
+void seicross_state::friskytb(machine_config &config)
+{
nvram(config);
- MCFG_DEVICE_MODIFY("mcu")
- MCFG_DEVICE_OPCODES_MAP(decrypted_opcodes_map)
-MACHINE_CONFIG_END
+ m_mcu->set_addrmap(AS_OPCODES, &seicross_state::decrypted_opcodes_map);
+}
/***************************************************************************
diff --git a/src/mame/drivers/seicupbl.cpp b/src/mame/drivers/seicupbl.cpp
index f74f53ddce3..37408e10c00 100644
--- a/src/mame/drivers/seicupbl.cpp
+++ b/src/mame/drivers/seicupbl.cpp
@@ -557,28 +557,28 @@ static GFXDECODE_START( gfx_seicupbl_csb )
GFXDECODE_END
-MACHINE_CONFIG_START(seicupbl_state::cupsocbl)
-
+void seicupbl_state::cupsocbl(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000,12000000)
- MCFG_DEVICE_PROGRAM_MAP(cupsocbl_mem)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seicupbl_state, irq4_line_hold) /* VBL */
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &seicupbl_state::cupsocbl_mem);
+ m_maincpu->set_vblank_int("screen", FUNC(seicupbl_state::irq4_line_hold)); /* VBL */
- MCFG_DEVICE_ADD("seibucop_boot", SEIBU_COP_BOOTLEG, "maincpu")
+ SEIBU_COP_BOOTLEG(config, "seibucop_boot", m_maincpu);
/*Different Sound hardware*/
- MCFG_DEVICE_ADD("audiocpu", Z80,14318180/4)
- MCFG_DEVICE_PROGRAM_MAP(cupsocbl_sound_mem)
- //MCFG_PERIODIC_INT("screen", nmi_line_pulse)
+ Z80(config, m_audiocpu, 14318180/4);
+ m_audiocpu->set_addrmap(AS_PROGRAM, &seicupbl_state::cupsocbl_sound_mem);
+ //m_audiocpu->set_periodic_int("screen", FUNC(seicupbl_state::nmi_line_pulse));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(42*8, 36*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(seicupbl_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(42*8, 36*8);
+ screen.set_visarea(0*8, 40*8-1, 0*8, 30*8-1);
+ screen.set_screen_update(FUNC(seicupbl_state::screen_update));
+ screen.set_palette(m_palette);
//seibu_crtc_device &crtc(SEIBU_CRTC(config, "crtc", 0));
//crtc.layer_en_callback().set(FUNC(seicupbl_state::tilemap_enable_w));
@@ -597,9 +597,8 @@ MACHINE_CONFIG_START(seicupbl_state::cupsocbl)
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI);
- MCFG_DEVICE_ADD("oki", OKIM6295, 1000000, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/drivers/selz80.cpp b/src/mame/drivers/selz80.cpp
index ace9dad4f5b..9956c917ac0 100644
--- a/src/mame/drivers/selz80.cpp
+++ b/src/mame/drivers/selz80.cpp
@@ -216,11 +216,12 @@ void selz80_state::machine_start()
m_digits.resolve();
}
-MACHINE_CONFIG_START(selz80_state::selz80)
+void selz80_state::selz80(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, XTAL(4'000'000)) // it's actually a 5MHz XTAL with a NEC uPD780C-1 cpu
- MCFG_DEVICE_PROGRAM_MAP(selz80_mem)
- MCFG_DEVICE_IO_MAP(selz80_io)
+ Z80(config, m_maincpu, XTAL(4'000'000)); // it's actually a 5MHz XTAL with a NEC uPD780C-1 cpu
+ m_maincpu->set_addrmap(AS_PROGRAM, &selz80_state::selz80_mem);
+ m_maincpu->set_addrmap(AS_IO, &selz80_state::selz80_io);
MCFG_MACHINE_RESET_OVERRIDE(selz80_state, selz80 )
/* video hardware */
@@ -247,14 +248,14 @@ MACHINE_CONFIG_START(selz80_state::selz80)
kbdc.in_rl_callback().set(FUNC(selz80_state::kbd_r)); // kbd RL lines
kbdc.in_shift_callback().set_constant(1); // Shift key
kbdc.in_ctrl_callback().set_constant(1);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(selz80_state::dagz80)
+void selz80_state::dagz80(machine_config &config)
+{
selz80(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(dagz80_mem)
+ m_maincpu->set_addrmap(AS_PROGRAM, &selz80_state::dagz80_mem);
MCFG_MACHINE_RESET_OVERRIDE(selz80_state, dagz80 )
-MACHINE_CONFIG_END
+}
/* ROM definition */
diff --git a/src/mame/drivers/senjyo.cpp b/src/mame/drivers/senjyo.cpp
index 7f50bf4dcc9..552359d2af4 100644
--- a/src/mame/drivers/senjyo.cpp
+++ b/src/mame/drivers/senjyo.cpp
@@ -548,12 +548,12 @@ static GFXDECODE_START( gfx_senjyo )
GFXDECODE_END
-MACHINE_CONFIG_START(senjyo_state::senjyo)
-
+void senjyo_state::senjyo(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 4000000) /* 4 MHz? */
- MCFG_DEVICE_PROGRAM_MAP(senjyo_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", senjyo_state, irq0_line_assert)
+ Z80(config, m_maincpu, 4000000); /* 4 MHz? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &senjyo_state::senjyo_map);
+ m_maincpu->set_vblank_int("screen", FUNC(senjyo_state::irq0_line_assert));
z80_device& sub(Z80(config, "sub", 2000000)); /* 2 MHz? */
sub.set_daisy_config(senjyo_daisy_chain);
@@ -570,12 +570,12 @@ MACHINE_CONFIG_START(senjyo_state::senjyo)
ctc.zc_callback<2>().set(FUNC(senjyo_state::sound_line_clock));
/* 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(senjyo_state, screen_update)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(32*8, 32*8);
+ screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
+ screen.set_screen_update(FUNC(senjyo_state::screen_update));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_senjyo);
@@ -585,20 +585,17 @@ MACHINE_CONFIG_START(senjyo_state::senjyo)
/* sound hardware */
SPEAKER(config, "speaker").front_center();
- MCFG_DEVICE_ADD("sn1", SN76496, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ SN76496(config, "sn1", 2000000).add_route(ALL_OUTPUTS, "speaker", 0.5);
- MCFG_DEVICE_ADD("sn2", SN76496, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ SN76496(config, "sn2", 2000000).add_route(ALL_OUTPUTS, "speaker", 0.5);
- MCFG_DEVICE_ADD("sn3", SN76496, 2000000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.5)
+ SN76496(config, "sn3", 2000000).add_route(ALL_OUTPUTS, "speaker", 0.5);
DAC_4BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.05); // unknown DAC
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
-MACHINE_CONFIG_END
+}
@@ -623,16 +620,15 @@ void senjyo_state::senjyox_a(machine_config &config)
}
-MACHINE_CONFIG_START(senjyo_state::starforb)
+void senjyo_state::starforb(machine_config &config)
+{
senjyox_e(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(starforb_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &senjyo_state::starforb_map);
- MCFG_DEVICE_MODIFY("sub")
- MCFG_DEVICE_PROGRAM_MAP(starforb_sound_map)
-MACHINE_CONFIG_END
+ subdevice<z80_device>("sub")->set_addrmap(AS_PROGRAM, &senjyo_state::starforb_sound_map);
+}
/***************************************************************************
diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp
index 2f828e94884..c91a63dd12c 100644
--- a/src/mame/drivers/seta2.cpp
+++ b/src/mame/drivers/seta2.cpp
@@ -2309,11 +2309,12 @@ INTERRUPT_GEN_MEMBER(seta2_state::samshoot_interrupt)
m_tmp68301->external_interrupt_2(); // to do: hook up x1-10 interrupts
}
-MACHINE_CONFIG_START(seta2_state::seta2)
- MCFG_DEVICE_ADD(m_maincpu, M68301, XTAL(50'000'000)/3) // !! TMP68301 !!
- MCFG_DEVICE_PROGRAM_MAP(mj4simai_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta2_state, seta2_interrupt)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback)
+void seta2_state::seta2(machine_config &config)
+{
+ M68301(config, m_maincpu, XTAL(50'000'000)/3); // !! TMP68301 !!
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::mj4simai_map);
+ m_maincpu->set_vblank_int("screen", FUNC(seta2_state::seta2_interrupt));
+ m_maincpu->set_irq_acknowledge_callback("tmp68301", FUNC(tmp68301_device::irq_callback));
TMP68301(config, m_tmp68301, 0);
m_tmp68301->set_cputag(m_maincpu);
@@ -2321,15 +2322,15 @@ MACHINE_CONFIG_START(seta2_state::seta2)
WATCHDOG_TIMER(config, "watchdog");
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(0x200, 0x100)
- MCFG_SCREEN_VISIBLE_AREA(0x00, 0x180-1, 0x00, 0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(seta2_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, seta2_state, screen_vblank))
- MCFG_SCREEN_PALETTE(m_palette)
- //MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ m_screen->set_size(0x200, 0x100);
+ m_screen->set_visarea(0x00, 0x180-1, 0x00, 0xf0-1);
+ m_screen->set_screen_update(FUNC(seta2_state::screen_update));
+ m_screen->screen_vblank().set(FUNC(seta2_state::screen_vblank));
+ m_screen->set_palette(m_palette);
+ //m_screen->set_video_attributes(VIDEO_UPDATE_SCANLINE);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_seta2);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x8000+0xf0); // extra 0xf0 because we might draw 256-color object with 16-color granularity
@@ -2337,16 +2338,16 @@ MACHINE_CONFIG_START(seta2_state::seta2)
// sound hardware
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("x1snd", X1_010, XTAL(50'000'000)/3) // clock?
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(0, x1_map)
-MACHINE_CONFIG_END
+ x1_010_device &x1snd(X1_010(config, "x1snd", XTAL(50'000'000)/3)); // clock?
+ x1snd.add_route(ALL_OUTPUTS, "mono", 1.0);
+ x1snd.set_addrmap(0, &seta2_state::x1_map);
+}
-MACHINE_CONFIG_START(seta2_state::gundamex)
+void seta2_state::gundamex(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(gundamex_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::gundamex_map);
m_tmp68301->in_parallel_callback().set(FUNC(seta2_state::gundamex_eeprom_r));
m_tmp68301->out_parallel_callback().set(FUNC(seta2_state::gundamex_eeprom_w));
@@ -2354,125 +2355,117 @@ MACHINE_CONFIG_START(seta2_state::gundamex)
EEPROM_93C46_16BIT(config, "eeprom");
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0x00, 0x180-1, 0x000, 0x0e0-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0x00, 0x180-1, 0x000, 0x0e0-1);
+}
-MACHINE_CONFIG_START(seta2_state::grdians)
+void seta2_state::grdians(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(grdians_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::grdians_map);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0x00, 0x130-1, 0x00, 0xe8 -1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0x00, 0x130-1, 0x00, 0xe8 -1);
+}
-MACHINE_CONFIG_START(seta2_state::myangel)
+void seta2_state::myangel(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(myangel_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::myangel_map);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 0x178-1, 0x00, 0xf0-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0, 0x178-1, 0x00, 0xf0-1);
+}
-MACHINE_CONFIG_START(seta2_state::myangel2)
+void seta2_state::myangel2(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(myangel2_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::myangel2_map);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 0x178-1, 0x00, 0xf0-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0, 0x178-1, 0x00, 0xf0-1);
+}
-MACHINE_CONFIG_START(seta2_state::pzlbowl)
+void seta2_state::pzlbowl(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(pzlbowl_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::pzlbowl_map);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0x00, 0x180-1, 0x00, 0xf0-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0x00, 0x180-1, 0x00, 0xf0-1);
+}
-MACHINE_CONFIG_START(seta2_state::penbros)
+void seta2_state::penbros(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(penbros_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::penbros_map);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0x00, 0xe0-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0, 0x140-1, 0x00, 0xe0-1);
+}
-MACHINE_CONFIG_START(seta2_state::ablastb)
+void seta2_state::ablastb(machine_config &config)
+{
penbros(config);
- MCFG_DEVICE_REPLACE("maincpu", M68000, XTAL(16'000'000)) // TMP68HC000P-16
- MCFG_DEVICE_PROGRAM_MAP(ablastb_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta2_state, irq2_line_hold)
+ M68000(config.replace(), m_maincpu, XTAL(16'000'000)); // TMP68HC000P-16
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::ablastb_map);
+ m_maincpu->set_vblank_int("screen", FUNC(seta2_state::irq2_line_hold));
config.device_remove("tmp68301");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(seta2_state::reelquak)
+void seta2_state::reelquak(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(reelquak_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::reelquak_map);
m_tmp68301->out_parallel_callback().set(FUNC(seta2_state::reelquak_leds_w));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
TICKET_DISPENSER(config, m_dispenser, attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0x00, 0x140-1, 0x000, 0x0f0-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0x00, 0x140-1, 0x000, 0x0f0-1);
+}
-MACHINE_CONFIG_START(seta2_state::samshoot)
+void seta2_state::samshoot(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(samshoot_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(seta2_state, samshoot_interrupt, 60)
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::samshoot_map);
+ m_maincpu->set_periodic_int(FUNC(seta2_state::samshoot_interrupt), attotime::from_hz(60));
m_tmp68301->in_parallel_callback().set_ioport("DSW2");
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0x00, 0x140-1, 0x000, 0x0f0-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0x00, 0x140-1, 0x000, 0x0f0-1);
+}
-MACHINE_CONFIG_START(staraudi_state::staraudi)
+void staraudi_state::staraudi(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(staraudi_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &staraudi_state::staraudi_map);
SHARP_LH28F016S_16BIT(config, "flash");
UPD4992(config, m_rtc);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
- MCFG_SCREEN_VISIBLE_AREA(0x00, 0x140-1, 0x000, 0x0f0-1)
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate
+ m_screen->set_visarea(0x00, 0x140-1, 0x000, 0x0f0-1);
m_gfxdecode->set_info(gfx_seta2);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(seta2_state::telpacfl)
+void seta2_state::telpacfl(machine_config &config)
+{
seta2(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(telpacfl_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::telpacfl_map);
m_tmp68301->in_parallel_callback().set_ioport("KNOB");
@@ -2482,9 +2475,8 @@ MACHINE_CONFIG_START(seta2_state::telpacfl)
HOPPER(config, m_dispenser, attotime::from_msec(200), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0x0, 0x180-1, 0x00, 0xf0-1) // still off by 1 because of different CRTC regs?
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0x0, 0x180-1, 0x00, 0xf0-1); // still off by 1 because of different CRTC regs?
+}
/***************************************************************************
@@ -2515,15 +2507,15 @@ void funcube_state::machine_reset()
m_hopper_motor = 0;
}
-MACHINE_CONFIG_START(funcube_state::funcube)
-
- MCFG_DEVICE_ADD("maincpu", MCF5206E, XTAL(25'447'000))
- MCFG_DEVICE_PROGRAM_MAP(funcube_map)
+void funcube_state::funcube(machine_config &config)
+{
+ MCF5206E(config, m_maincpu, XTAL(25'447'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &funcube_state::funcube_map);
TIMER(config, "scantimer").configure_scanline(FUNC(funcube_state::funcube_interrupt), "screen", 0, 1);
- MCFG_DEVICE_ADD("sub", H83007, FUNCUBE_SUB_CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(funcube_sub_map)
- MCFG_DEVICE_IO_MAP(funcube_sub_io)
+ H83007(config, m_sub, FUNCUBE_SUB_CPU_CLOCK);
+ m_sub->set_addrmap(AS_PROGRAM, &funcube_state::funcube_sub_map);
+ m_sub->set_addrmap(AS_IO, &funcube_state::funcube_sub_io);
MCF5206E_PERIPHERAL(config, "maincpu_onboard", 0);
@@ -2534,14 +2526,14 @@ MACHINE_CONFIG_START(funcube_state::funcube)
WATCHDOG_TIMER(config, "watchdog");
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
- MCFG_SCREEN_SIZE(0x200, 0x200)
- MCFG_SCREEN_VISIBLE_AREA(0x0+1, 0x140-1+1, 0x00, 0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(funcube_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, funcube_state, screen_vblank))
- 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(0x200, 0x200);
+ m_screen->set_visarea(0x0+1, 0x140-1+1, 0x00, 0xf0-1);
+ m_screen->set_screen_update(FUNC(funcube_state::screen_update));
+ m_screen->screen_vblank().set(FUNC(funcube_state::screen_vblank));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_seta2);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x8000+0xf0); // extra 0xf0 because we might draw 256-color object with 16-color granularity
@@ -2550,52 +2542,51 @@ MACHINE_CONFIG_START(funcube_state::funcube)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("oki", OKIM9810, XTAL(4'096'000))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
-MACHINE_CONFIG_END
+ OKIM9810(config, m_oki, XTAL(4'096'000));
+ m_oki->add_route(0, "lspeaker", 0.80);
+ m_oki->add_route(1, "rspeaker", 0.80);
+}
-MACHINE_CONFIG_START(funcube_state::funcube2)
+void funcube_state::funcube2(machine_config &config)
+{
funcube(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(funcube2_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &funcube_state::funcube2_map);
- MCFG_DEVICE_MODIFY("sub")
- MCFG_DEVICE_IO_MAP(funcube2_sub_io)
+ m_sub->set_addrmap(AS_IO, &funcube_state::funcube2_sub_io);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0x0, 0x140-1, 0x00, 0xf0-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0x0, 0x140-1, 0x00, 0xf0-1);
+}
-MACHINE_CONFIG_START(funcube_state::funcube3)
+void funcube_state::funcube3(machine_config &config)
+{
funcube2(config);
// video hardware
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0x0, 0x140-1, 0x00, 0xf0-1)
-MACHINE_CONFIG_END
+ m_screen->set_visarea(0x0, 0x140-1, 0x00, 0xf0-1);
+}
-MACHINE_CONFIG_START(seta2_state::namcostr)
- MCFG_DEVICE_ADD(m_maincpu, M68301, XTAL(50'000'000)/3) // !! TMP68301 !!
- MCFG_DEVICE_PROGRAM_MAP(namcostr_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", seta2_state, seta2_interrupt)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("tmp68301",tmp68301_device,irq_callback)
+void seta2_state::namcostr(machine_config &config)
+{
+ M68301(config, m_maincpu, XTAL(50'000'000)/3); // !! TMP68301 !!
+ m_maincpu->set_addrmap(AS_PROGRAM, &seta2_state::namcostr_map);
+ m_maincpu->set_vblank_int("screen", FUNC(seta2_state::seta2_interrupt));
+ m_maincpu->set_irq_acknowledge_callback("tmp68301", FUNC(tmp68301_device::irq_callback));
TMP68301(config, m_tmp68301, 0); // does this have a ticket dispenser?
m_tmp68301->set_cputag(m_maincpu);
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(0x200, 0x200)
- MCFG_SCREEN_VISIBLE_AREA(0x40, 0x1c0-1, 0x00, 0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(seta2_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, seta2_state, screen_vblank))
- 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(0x200, 0x200);
+ m_screen->set_visarea(0x40, 0x1c0-1, 0x00, 0xf0-1);
+ m_screen->set_screen_update(FUNC(seta2_state::screen_update));
+ m_screen->screen_vblank().set(FUNC(seta2_state::screen_vblank));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_seta2);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x8000+0xf0); // extra 0xf0 because we might draw 256-color object with 16-color granularity
@@ -2604,10 +2595,10 @@ MACHINE_CONFIG_START(seta2_state::namcostr)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("oki", OKIM9810, XTAL(4'096'000))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
-MACHINE_CONFIG_END
+ OKIM9810(config, m_oki, XTAL(4'096'000));
+ m_oki->add_route(0, "lspeaker", 0.80);
+ m_oki->add_route(1, "rspeaker", 0.80);
+}
/***************************************************************************
diff --git a/src/mame/drivers/sfbonus.cpp b/src/mame/drivers/sfbonus.cpp
index a5deb953ef8..75b6ecea05f 100644
--- a/src/mame/drivers/sfbonus.cpp
+++ b/src/mame/drivers/sfbonus.cpp
@@ -1376,27 +1376,28 @@ void sfbonus_state::ramdac_map(address_map &map)
}
-MACHINE_CONFIG_START(sfbonus_state::sfbonus)
- MCFG_DEVICE_ADD("maincpu", Z80, 6000000) // custom packaged z80 CPU ?? Mhz
- MCFG_DEVICE_PROGRAM_MAP(sfbonus_map)
- MCFG_DEVICE_IO_MAP(sfbonus_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sfbonus_state, irq0_line_hold)
- //MCFG_DEVICE_PERIODIC_INT_DRIVER(sfbonus_state, nmi_line_pulse, 100)
+void sfbonus_state::sfbonus(machine_config &config)
+{
+ Z80(config, m_maincpu, 6000000); // custom packaged z80 CPU ?? Mhz
+ m_maincpu->set_addrmap(AS_PROGRAM, &sfbonus_state::sfbonus_map);
+ m_maincpu->set_addrmap(AS_IO, &sfbonus_state::sfbonus_io);
+ m_maincpu->set_vblank_int("screen", FUNC(sfbonus_state::irq0_line_hold));
+ //m_maincpu->set_periodic_int(FUNC(sfbonus_state::nmi_line_pulse), attotime::from_hz(100));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- GFXDECODE(config, "gfxdecode", "palette", gfx_sfbonus);
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_sfbonus);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(128*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 512-1, 0*8, 288-1)
- MCFG_SCREEN_UPDATE_DRIVER(sfbonus_state, screen_update_sfbonus)
- 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(128*8, 64*8);
+ screen.set_visarea(0*8, 512-1, 0*8, 288-1);
+ screen.set_screen_update(FUNC(sfbonus_state::screen_update_sfbonus));
+ screen.set_palette(m_palette);
- MCFG_PALETTE_ADD("palette", 0x100*2) // *2 for priority workaraound / custom drawing
+ PALETTE(config, m_palette).set_entries(0x100*2); // *2 for priority workaraound / custom drawing
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, m_palette));
ramdac.set_addrmap(0, &sfbonus_state::ramdac_map);
@@ -1404,9 +1405,8 @@ MACHINE_CONFIG_START(sfbonus_state::sfbonus)
/* Parrot 3 seems fine at 1 Mhz, but Double Challenge isn't? */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, 1000000, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.00); // clock frequency & pin 7 not verified
+}
/* Super Ball */
ROM_START( suprball )
diff --git a/src/mame/drivers/sfcbox.cpp b/src/mame/drivers/sfcbox.cpp
index 477f07c316a..01d1ec1c550 100644
--- a/src/mame/drivers/sfcbox.cpp
+++ b/src/mame/drivers/sfcbox.cpp
@@ -456,22 +456,22 @@ void sfcbox_state::machine_reset()
m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
-MACHINE_CONFIG_START(sfcbox_state::sfcbox)
-
+void sfcbox_state::sfcbox(machine_config &config)
+{
/* base snes hardware */
- MCFG_DEVICE_ADD("maincpu", _5A22, 3580000*6) /* 2.68Mhz, also 3.58Mhz */
- MCFG_DEVICE_PROGRAM_MAP(snes_map)
+ _5A22(config, m_maincpu, 3580000*6); /* 2.68Mhz, also 3.58Mhz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &sfcbox_state::snes_map);
// runs at 24.576 MHz / 12 = 2.048 MHz
- MCFG_DEVICE_ADD("soundcpu", SPC700, XTAL(24'576'000) / 12)
- MCFG_DEVICE_PROGRAM_MAP(spc_mem)
+ SPC700(config, m_soundcpu, XTAL(24'576'000) / 12);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &sfcbox_state::spc_mem);
config.m_perfect_cpu_quantum = subtag("maincpu");
/* sfcbox hardware */
- MCFG_DEVICE_ADD("bios", Z180, XTAL(12'000'000) / 2) /* HD64180RF6X */
- MCFG_DEVICE_PROGRAM_MAP(sfcbox_map)
- MCFG_DEVICE_IO_MAP(sfcbox_io)
+ Z180(config, m_bios, XTAL(12'000'000) / 2); /* HD64180RF6X */
+ m_bios->set_addrmap(AS_PROGRAM, &sfcbox_state::sfcbox_map);
+ m_bios->set_addrmap(AS_IO, &sfcbox_state::sfcbox_io);
MB90082(config, m_mb90082, XTAL(12'000'000) / 2); /* TODO: correct clock */
S3520CF(config, m_s3520cf); /* RTC */
@@ -479,33 +479,33 @@ MACHINE_CONFIG_START(sfcbox_state::sfcbox)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("spc700", SNES_SOUND)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
+ SNES_SOUND(config, m_spc700);
+ m_spc700->add_route(0, "lspeaker", 1.00);
+ m_spc700->add_route(1, "rspeaker", 1.00);
/* video hardware */
/* TODO: the screen should actually superimpose, but for the time being let's just separate outputs */
config.set_default_layout(layout_dualhsxs);
// SNES PPU
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(DOTCLK_NTSC, SNES_HTOTAL, 0, SNES_SCR_WIDTH, SNES_VTOTAL_NTSC, 0, SNES_SCR_HEIGHT_NTSC)
- MCFG_SCREEN_UPDATE_DRIVER( snes_state, screen_update )
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(DOTCLK_NTSC, SNES_HTOTAL, 0, SNES_SCR_WIDTH, SNES_VTOTAL_NTSC, 0, SNES_SCR_HEIGHT_NTSC);
+ screen.set_screen_update(FUNC(snes_state::screen_update));
SNES_PPU(config, m_ppu, MCLK_NTSC);
m_ppu->open_bus_callback().set([this] { return snes_open_bus_r(); }); // lambda because overloaded function name
m_ppu->set_screen("screen");
// SFCBOX
- MCFG_SCREEN_ADD("osd", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
-// MCFG_SCREEN_SIZE(24*12+22, 12*18+22)
-// MCFG_SCREEN_VISIBLE_AREA(0*8, 24*12-1, 0*8, 12*18-1)
- MCFG_SCREEN_SIZE(24*16+22, 12*16+22)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 24*16-1, 0*8, 12*16-1)
- MCFG_SCREEN_UPDATE_DRIVER(sfcbox_state,screen_update)
-MACHINE_CONFIG_END
+ screen_device &osd(SCREEN(config, "osd", SCREEN_TYPE_RASTER));
+ osd.set_refresh_hz(60);
+ osd.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+// osd.set_size(24*12+22, 12*18+22);
+// osd.set_visarea(0*8, 24*12-1, 0*8, 12*18-1);
+ osd.set_size(24*16+22, 12*16+22);
+ osd.set_visarea(0*8, 24*16-1, 0*8, 12*16-1);
+ osd.set_screen_update(FUNC(sfcbox_state::screen_update));
+}
/***************************************************************************
diff --git a/src/mame/drivers/sg1000.cpp b/src/mame/drivers/sg1000.cpp
index 285c8ab8842..7c60cb756d0 100644
--- a/src/mame/drivers/sg1000.cpp
+++ b/src/mame/drivers/sg1000.cpp
@@ -525,14 +525,15 @@ void sf7000_state::machine_reset()
***************************************************************************/
/*-------------------------------------------------
- MACHINE_CONFIG_START( sg1000 )
+ machine_config( sg1000 )
-------------------------------------------------*/
-MACHINE_CONFIG_START(sg1000_state::sg1000)
+void sg1000_state::sg1000(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(10'738'635)/3)
- MCFG_DEVICE_PROGRAM_MAP(sg1000_map)
- MCFG_DEVICE_IO_MAP(sg1000_io_map)
+ Z80(config, m_maincpu, XTAL(10'738'635)/3);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sg1000_state::sg1000_map);
+ m_maincpu->set_addrmap(AS_IO, &sg1000_state::sg1000_io_map);
/* video hardware */
tms9918a_device &vdp(TMS9918A(config, TMS9918A_TAG, XTAL(10'738'635)));
@@ -544,8 +545,7 @@ MACHINE_CONFIG_START(sg1000_state::sg1000)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SN76489AN_TAG, SN76489A, XTAL(10'738'635)/3)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SN76489A(config, SN76489AN_TAG, XTAL(10'738'635)/3).add_route(ALL_OUTPUTS, "mono", 1.00);
/* expansion slot */
SG1000_EXPANSION_SLOT(config, m_sgexpslot, sg1000_expansion_devices, nullptr, false);
@@ -558,33 +558,35 @@ MACHINE_CONFIG_START(sg1000_state::sg1000)
/* internal ram */
RAM(config, m_ram).set_default_size("1K");
-MACHINE_CONFIG_END
+}
/*-------------------------------------------------
- MACHINE_CONFIG_START( omv )
+ machine_config( omv )
-------------------------------------------------*/
-MACHINE_CONFIG_START(sg1000_state::omv)
+void sg1000_state::omv(machine_config &config)
+{
sg1000(config);
- MCFG_DEVICE_MODIFY(Z80_TAG)
- MCFG_DEVICE_PROGRAM_MAP(omv_map)
- MCFG_DEVICE_IO_MAP(omv_io_map)
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &sg1000_state::omv_map);
+ m_maincpu->set_addrmap(AS_IO, &sg1000_state::omv_io_map);
config.device_remove(CARTSLOT_TAG);
OMV_CART_SLOT(config, CARTSLOT_TAG, sg1000_cart, nullptr);
m_ram->set_default_size("2K");
-MACHINE_CONFIG_END
+}
/*-------------------------------------------------
- MACHINE_CONFIG_START( sc3000 )
+ machine_config( sc3000 )
-------------------------------------------------*/
-MACHINE_CONFIG_START(sc3000_state::sc3000)
+void sc3000_state::sc3000(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(10'738'635)/3) // LH0080A
- MCFG_DEVICE_PROGRAM_MAP(sc3000_map)
- MCFG_DEVICE_IO_MAP(sc3000_io_map)
+ Z80(config, m_maincpu, XTAL(10'738'635)/3); // LH0080A
+ m_maincpu->set_addrmap(AS_PROGRAM, &sc3000_state::sc3000_map);
+ m_maincpu->set_addrmap(AS_IO, &sc3000_state::sc3000_io_map);
/* video hardware */
tms9918a_device &vdp(TMS9918A(config, TMS9918A_TAG, XTAL(10'738'635)));
@@ -596,8 +598,7 @@ MACHINE_CONFIG_START(sc3000_state::sc3000)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SN76489AN_TAG, SN76489A, XTAL(10'738'635)/3)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SN76489A(config, SN76489AN_TAG, XTAL(10'738'635)/3).add_route(ALL_OUTPUTS, "mono", 1.00);
/* sc3000 has all sk1100 features built-in, so add it as a fixed slot */
SG1000_EXPANSION_SLOT(config, m_sgexpslot, sg1000_expansion_devices, "sk1100", true);
@@ -611,17 +612,18 @@ MACHINE_CONFIG_START(sc3000_state::sc3000)
/* internal ram */
RAM(config, m_ram).set_default_size("2K");
-MACHINE_CONFIG_END
+}
/*-------------------------------------------------
- MACHINE_CONFIG_START( sf7000 )
+ machine_config( sf7000 )
-------------------------------------------------*/
-MACHINE_CONFIG_START(sf7000_state::sf7000)
+void sf7000_state::sf7000(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD(Z80_TAG, Z80, XTAL(10'738'635)/3)
- MCFG_DEVICE_PROGRAM_MAP(sf7000_map)
- MCFG_DEVICE_IO_MAP(sf7000_io_map)
+ Z80(config, m_maincpu, XTAL(10'738'635)/3);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sf7000_state::sf7000_map);
+ m_maincpu->set_addrmap(AS_IO, &sf7000_state::sf7000_io_map);
/* video hardware */
tms9918a_device &vdp(TMS9918A(config, TMS9918A_TAG, XTAL(10'738'635)));
@@ -633,8 +635,7 @@ MACHINE_CONFIG_START(sf7000_state::sf7000)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD(SN76489AN_TAG, SN76489A, XTAL(10'738'635)/3)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
+ SN76489A(config, SN76489AN_TAG, XTAL(10'738'635)/3).add_route(ALL_OUTPUTS, "mono", 1.00);
/* devices */
i8255_device &ppi(I8255(config, UPD9255_1_TAG));
@@ -667,7 +668,7 @@ MACHINE_CONFIG_START(sf7000_state::sf7000)
/* internal ram */
RAM(config, m_ram).set_default_size("64K");
-MACHINE_CONFIG_END
+}
/***************************************************************************
ROMS
diff --git a/src/mame/drivers/sg1000a.cpp b/src/mame/drivers/sg1000a.cpp
index c0f2279c39d..8e70d2df101 100644
--- a/src/mame/drivers/sg1000a.cpp
+++ b/src/mame/drivers/sg1000a.cpp
@@ -468,11 +468,12 @@ WRITE8_MEMBER(sg1000a_state::sg1000a_coin_counter_w)
*
*************************************/
-MACHINE_CONFIG_START(sg1000a_state::sg1000a)
+void sg1000a_state::sg1000a(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(program_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ Z80(config, m_maincpu, XTAL(3'579'545));
+ m_maincpu->set_addrmap(AS_PROGRAM, &sg1000a_state::program_map);
+ m_maincpu->set_addrmap(AS_IO, &sg1000a_state::io_map);
i8255_device &ppi(I8255(config, "ppi8255"));
ppi.in_pa_callback().set_ioport("P1");
@@ -490,9 +491,8 @@ MACHINE_CONFIG_START(sg1000a_state::sg1000a)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("snsnd", SN76489A, XTAL(3'579'545))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ SN76489A(config, "snsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
void sg1000a_state::sg1000ax(machine_config &config)
{
@@ -504,14 +504,14 @@ void sg1000a_state::sg1000ax(machine_config &config)
maincpu.set_decrypted_tag(":decrypted_opcodes");
}
-MACHINE_CONFIG_START(sg1000a_state::sderbys)
+void sg1000a_state::sderbys(machine_config &config)
+{
sg1000a(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_CLOCK(XTAL(10'738'635) / 3)
- MCFG_DEVICE_IO_MAP(sderby_io_map)
+ m_maincpu->set_clock(XTAL(10'738'635) / 3);
+ m_maincpu->set_addrmap(AS_IO, &sg1000a_state::sderby_io_map);
// Actually uses a Sega 315-5066 chip, which is a TMS9918 and SN76489 in the same package but with RGB output
-MACHINE_CONFIG_END
+}
/*************************************
*
diff --git a/src/mame/drivers/shadfrce.cpp b/src/mame/drivers/shadfrce.cpp
index 3a9e4d4e407..17455f2c3a3 100644
--- a/src/mame/drivers/shadfrce.cpp
+++ b/src/mame/drivers/shadfrce.cpp
@@ -535,22 +535,22 @@ GFXDECODE_END
/* Machine Driver Bits */
-MACHINE_CONFIG_START(shadfrce_state::shadfrce)
-
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(28'000'000) / 2) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(shadfrce_map)
+void shadfrce_state::shadfrce(machine_config &config)
+{
+ M68000(config, m_maincpu, XTAL(28'000'000) / 2); /* verified on pcb */
+ m_maincpu->set_addrmap(AS_PROGRAM, &shadfrce_state::shadfrce_map);
TIMER(config, "scantimer").configure_scanline(FUNC(shadfrce_state::scanline), "screen", 0, 1);
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(3'579'545)) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(shadfrce_sound_map)
+ Z80(config, m_audiocpu, XTAL(3'579'545)); /* verified on pcb */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &shadfrce_state::shadfrce_sound_map);
WATCHDOG_TIMER(config, "watchdog");
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(XTAL(28'000'000) / 4, 448, 0, 320, 272, 8, 248) /* HTOTAL and VTOTAL are guessed */
- MCFG_SCREEN_UPDATE_DRIVER(shadfrce_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, shadfrce_state, screen_vblank))
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(XTAL(28'000'000) / 4, 448, 0, 320, 272, 8, 248); /* HTOTAL and VTOTAL are guessed */
+ m_screen->set_screen_update(FUNC(shadfrce_state::screen_update));
+ m_screen->screen_vblank().set(FUNC(shadfrce_state::screen_vblank));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_shadfrce);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x4000);
@@ -567,10 +567,10 @@ MACHINE_CONFIG_START(shadfrce_state::shadfrce)
ymsnd.add_route(0, "lspeaker", 0.50);
ymsnd.add_route(1, "rspeaker", 0.50);
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(13'495'200)/8, okim6295_device::PIN7_HIGH) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_oki, XTAL(13'495'200)/8, okim6295_device::PIN7_HIGH); /* verified on pcb */
+ m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.50);
+ m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.50);
+}
/* Rom Defs. */
diff --git a/src/mame/drivers/shanghai.cpp b/src/mame/drivers/shanghai.cpp
index 05b398039be..0493b7b0f53 100644
--- a/src/mame/drivers/shanghai.cpp
+++ b/src/mame/drivers/shanghai.cpp
@@ -398,22 +398,22 @@ void shanghai_state::hd63484_map(address_map &map)
map(0x00000, 0x3ffff).ram();
}
-MACHINE_CONFIG_START(shanghai_state::shanghai)
-
+void shanghai_state::shanghai(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V30, XTAL(16'000'000)/2) /* NEC D70116C-8 */
- MCFG_DEVICE_PROGRAM_MAP(shanghai_map)
- MCFG_DEVICE_IO_MAP(shanghai_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", shanghai_state, half_vblank_irq)
+ V30(config, m_maincpu, XTAL(16'000'000)/2); /* NEC D70116C-8 */
+ m_maincpu->set_addrmap(AS_PROGRAM, &shanghai_state::shanghai_map);
+ m_maincpu->set_addrmap(AS_IO, &shanghai_state::shanghai_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(shanghai_state::half_vblank_irq));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57)
- //MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(384, 280)
- MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 280-1)
- MCFG_SCREEN_UPDATE_DEVICE("hd63484", hd63484_device, update_screen)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(57);
+ //m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ m_screen->set_size(384, 280);
+ m_screen->set_visarea(0, 384-1, 0, 280-1);
+ m_screen->set_screen_update("hd63484", FUNC(hd63484_device::update_screen));
+ m_screen->set_palette("palette");
PALETTE(config, "palette", FUNC(shanghai_state::shanghai_palette)).set_format(palette_device::xBGR_444, 256);
@@ -429,25 +429,25 @@ MACHINE_CONFIG_START(shanghai_state::shanghai)
ymsnd.add_route(1, "mono", 0.15);
ymsnd.add_route(2, "mono", 0.15);
ymsnd.add_route(3, "mono", 0.80);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(shanghai_state::shangha2)
+void shanghai_state::shangha2(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V30, XTAL(16'000'000)/2) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(shangha2_map)
- MCFG_DEVICE_IO_MAP(shangha2_portmap)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", shanghai_state, half_vblank_irq)
+ V30(config, m_maincpu, XTAL(16'000'000)/2); /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &shanghai_state::shangha2_map);
+ m_maincpu->set_addrmap(AS_IO, &shanghai_state::shangha2_portmap);
+ m_maincpu->set_vblank_int("screen", FUNC(shanghai_state::half_vblank_irq));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57)
- //MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(384, 280)
- MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 280-1)
- MCFG_SCREEN_UPDATE_DEVICE("hd63484", hd63484_device, update_screen)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(57);
+ //m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ m_screen->set_size(384, 280);
+ m_screen->set_visarea(0, 384-1, 0, 280-1);
+ m_screen->set_screen_update("hd63484", FUNC(hd63484_device::update_screen));
+ m_screen->set_palette("palette");
PALETTE(config, "palette").set_format(palette_device::xBGR_444, 256);
@@ -463,30 +463,30 @@ MACHINE_CONFIG_START(shanghai_state::shangha2)
ymsnd.add_route(1, "mono", 0.15);
ymsnd.add_route(2, "mono", 0.15);
ymsnd.add_route(3, "mono", 0.80);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(shanghai_state::kothello)
+void shanghai_state::kothello(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", V30, XTAL(16'000'000))
- MCFG_DEVICE_PROGRAM_MAP(kothello_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", shanghai_state, half_vblank_irq)
+ V30(config, m_maincpu, XTAL(16'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &shanghai_state::kothello_map);
+ m_maincpu->set_vblank_int("screen", FUNC(shanghai_state::half_vblank_irq));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(16'000'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(kothello_sound_map)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("seibu_sound", seibu_sound_device, im0_vector_cb)
+ z80_device &audiocpu(Z80(config, "audiocpu", XTAL(16'000'000)/4));
+ audiocpu.set_addrmap(AS_PROGRAM, &shanghai_state::kothello_sound_map);
+ audiocpu.set_irq_acknowledge_callback("seibu_sound", FUNC(seibu_sound_device::im0_vector_cb));
config.m_minimum_quantum = attotime::from_hz(12000);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(57)
- //MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(384, 280)
- MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 280-1)
- MCFG_SCREEN_UPDATE_DEVICE("hd63484", hd63484_device, update_screen)
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(57);
+ //m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ m_screen->set_size(384, 280);
+ m_screen->set_visarea(0, 384-1, 0, 280-1);
+ m_screen->set_screen_update("hd63484", FUNC(hd63484_device::update_screen));
+ m_screen->set_palette("palette");
PALETTE(config, "palette").set_format(palette_device::xBGR_444, 256);
@@ -512,7 +512,7 @@ MACHINE_CONFIG_START(shanghai_state::kothello)
seibu_sound.ym_write_callback().set("ymsnd", FUNC(ym2203_device::write));
SEIBU_ADPCM(config, "adpcm", 8000).add_route(ALL_OUTPUTS, "mono", 0.80); // actually MSM5205
-MACHINE_CONFIG_END
+}
/***************************************************************************
diff --git a/src/mame/drivers/shangkid.cpp b/src/mame/drivers/shangkid.cpp
index 9d42e2f2651..8c631b7ac43 100644
--- a/src/mame/drivers/shangkid.cpp
+++ b/src/mame/drivers/shangkid.cpp
@@ -481,12 +481,12 @@ void shangkid_state::dynamski_portmap(address_map &map)
map(0x00, 0x01).w(m_aysnd, FUNC(ay8910_device::data_address_w));
}
-MACHINE_CONFIG_START(shangkid_state::dynamski)
-
+void shangkid_state::dynamski(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 3000000) /* ? */
- MCFG_DEVICE_PROGRAM_MAP(dynamski_map)
- MCFG_DEVICE_IO_MAP(dynamski_portmap)
+ Z80(config, m_maincpu, 3000000); /* ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &shangkid_state::dynamski_map);
+ m_maincpu->set_addrmap(AS_IO, &shangkid_state::dynamski_portmap);
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<0>().set(FUNC(shangkid_state::int_enable_1_w));
@@ -494,14 +494,14 @@ MACHINE_CONFIG_START(shangkid_state::dynamski)
mainlatch.q_out_cb<2>().set_nop(); // screen flip?
/* 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+32, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255+32, 16, 255-16)
- MCFG_SCREEN_UPDATE_DRIVER(shangkid_state, screen_update_dynamski)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, shangkid_state, irq_1_w))
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_size(256+32, 256);
+ screen.set_visarea(0, 255+32, 16, 255-16);
+ screen.set_screen_update(FUNC(shangkid_state::screen_update_dynamski));
+ screen.set_palette(m_palette);
+ screen.screen_vblank().set(FUNC(shangkid_state::irq_1_w));
GFXDECODE(config, m_gfxdecode, m_palette, gfx_dynamski);
PALETTE(config, m_palette, FUNC(shangkid_state::dynamski_palette), 16*4 + 16*4, 32);
@@ -510,7 +510,7 @@ MACHINE_CONFIG_START(shangkid_state::dynamski)
SPEAKER(config, "speaker").front_center();
AY8910(config, m_aysnd, 2000000).add_route(ALL_OUTPUTS, "speaker", 0.1);
-MACHINE_CONFIG_END
+}
/***************************************************************************************/
diff --git a/src/mame/drivers/shaolins.cpp b/src/mame/drivers/shaolins.cpp
index a27c0159396..e9577900407 100644
--- a/src/mame/drivers/shaolins.cpp
+++ b/src/mame/drivers/shaolins.cpp
@@ -193,22 +193,22 @@ static GFXDECODE_START( gfx_shaolins )
GFXDECODE_END
-MACHINE_CONFIG_START(shaolins_state::shaolins)
-
+void shaolins_state::shaolins(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809E, MASTER_CLOCK/12) /* verified on pcb */
- MCFG_DEVICE_PROGRAM_MAP(shaolins_map)
+ MC6809E(config, m_maincpu, MASTER_CLOCK/12); /* verified on pcb */
+ m_maincpu->set_addrmap(AS_PROGRAM, &shaolins_state::shaolins_map);
TIMER(config, "scantimer").configure_scanline(FUNC(shaolins_state::interrupt), "screen", 0, 1);
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(shaolins_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(shaolins_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_shaolins);
PALETTE(config, m_palette, FUNC(shaolins_state::shaolins_palette), 16*8*16+16*8*16, 256);
@@ -216,23 +216,20 @@ MACHINE_CONFIG_START(shaolins_state::shaolins)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("sn1", SN76489A, MASTER_CLOCK/12) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ SN76489A(config, "sn1", MASTER_CLOCK/12).add_route(ALL_OUTPUTS, "mono", 1.0); /* verified on pcb */
- MCFG_DEVICE_ADD("sn2", SN76489A, MASTER_CLOCK/6) /* verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ SN76489A(config, "sn2", MASTER_CLOCK/6).add_route(ALL_OUTPUTS, "mono", 1.0); /* verified on pcb */
+}
#if 0 // a bootleg board was found with downgraded sound hardware, but is otherwise the same
-static MACHINE_CONFIG_START( shaolinb )
+void shaolins_state::shaolinb(machine_config &config)
+{
shaolins(config);
- MCFG_DEVICE_REPLACE("sn1", SN76489, MASTER_CLOCK/12) /* only type verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ SN76489(config.replace(), "sn1", MASTER_CLOCK/12).add_route(ALL_OUTPUTS, "mono", 1.0); /* only type verified on pcb */
- MCFG_DEVICE_REPLACE("sn2", SN76489, MASTER_CLOCK/6) /* only type verified on pcb */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ SN76489(config.replace(), "sn2", MASTER_CLOCK/6).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
#endif
/***************************************************************************
diff --git a/src/mame/drivers/shisen.cpp b/src/mame/drivers/shisen.cpp
index 75dd64846d7..e4e91e6e2ea 100644
--- a/src/mame/drivers/shisen.cpp
+++ b/src/mame/drivers/shisen.cpp
@@ -213,32 +213,32 @@ GFXDECODE_END
-MACHINE_CONFIG_START(shisen_state::shisen)
-
+void shisen_state::shisen(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 6000000) /* 6 MHz ? */
- MCFG_DEVICE_PROGRAM_MAP(shisen_map)
- MCFG_DEVICE_IO_MAP(shisen_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", shisen_state, irq0_line_hold)
-
- MCFG_DEVICE_ADD("soundcpu", Z80, 3579645)
- MCFG_DEVICE_PROGRAM_MAP(shisen_sound_map)
- MCFG_DEVICE_IO_MAP(shisen_sound_io_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(shisen_state, nmi_line_pulse, 128*55) /* clocked by V1? (Vigilante) */
+ Z80(config, m_maincpu, 6000000); /* 6 MHz ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &shisen_state::shisen_map);
+ m_maincpu->set_addrmap(AS_IO, &shisen_state::shisen_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(shisen_state::irq0_line_hold));
+
+ z80_device &soundcpu(Z80(config, "soundcpu", 3579645));
+ soundcpu.set_addrmap(AS_PROGRAM, &shisen_state::shisen_sound_map);
+ soundcpu.set_addrmap(AS_IO, &shisen_state::shisen_sound_io_map);
+ soundcpu.set_periodic_int(FUNC(shisen_state::nmi_line_pulse), attotime::from_hz(128*55)); /* clocked by V1? (Vigilante) */
/* IRQs are generated by main Z80 and YM2151 */
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("soundirq", rst_neg_buffer_device, inta_cb)
+ soundcpu.set_irq_acknowledge_callback("soundirq", FUNC(rst_neg_buffer_device::inta_cb));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(55)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(shisen_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(55);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(0*8, 64*8-1, 0*8, 32*8-1);
+ screen.set_screen_update(FUNC(shisen_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_shisen);
- MCFG_PALETTE_ADD("palette", 256)
+ PALETTE(config, m_palette).set_entries(256);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -250,7 +250,7 @@ MACHINE_CONFIG_START(shisen_state::shisen)
RST_NEG_BUFFER(config, "soundirq", 0).int_callback().set_inputline("soundcpu", 0);
- MCFG_DEVICE_ADD("m72", IREM_M72_AUDIO)
+ IREM_M72_AUDIO(config, m_audio);
ym2151_device &ymsnd(YM2151(config, "ymsnd", 3579545));
ymsnd.irq_handler().set("soundirq", FUNC(rst_neg_buffer_device::rst28_w));
@@ -261,7 +261,7 @@ MACHINE_CONFIG_START(shisen_state::shisen)
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/shootaway2.cpp b/src/mame/drivers/shootaway2.cpp
index 327e25ef62b..69cc2c03424 100644
--- a/src/mame/drivers/shootaway2.cpp
+++ b/src/mame/drivers/shootaway2.cpp
@@ -81,24 +81,24 @@ void m74_state::sub_map(address_map &map)
static INPUT_PORTS_START( m74 )
INPUT_PORTS_END
-MACHINE_CONFIG_START(m74_state::m74)
- MCFG_DEVICE_ADD("maincpu", M37450, XTAL(8'000'000)) /* C68 @ 8.0MHz - main CPU */
- MCFG_DEVICE_PROGRAM_MAP(c68_map)
+void m74_state::m74(machine_config &config)
+{
+ M37450(config, m_maincpu, XTAL(8'000'000)); /* C68 @ 8.0MHz - main CPU */
+ m_maincpu->set_addrmap(AS_PROGRAM, &m74_state::c68_map);
- MCFG_DEVICE_ADD("subcpu", TMPZ84C011, XTAL(12'000'000) / 3) /* Z84C011 @ 4 MHz - sub CPU */
- MCFG_DEVICE_PROGRAM_MAP(sub_map)
+ TMPZ84C011(config, m_subcpu, XTAL(12'000'000) / 3); /* Z84C011 @ 4 MHz - sub CPU */
+ m_subcpu->set_addrmap(AS_PROGRAM, &m74_state::sub_map);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_UPDATE_DRIVER(m74_state, screen_update)
- MCFG_SCREEN_SIZE(320, 240)
- MCFG_SCREEN_VISIBLE_AREA(0, 319, 0, 239)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ screen.set_screen_update(FUNC(m74_state::screen_update));
+ screen.set_size(320, 240);
+ screen.set_visarea(0, 319, 0, 239);
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(1'000'000), okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", XTAL(1'000'000), okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
ROM_START(shootaw2)
ROM_REGION(0x20000, "maincpu", 0) /* C68 / M37450 program ROM */
diff --git a/src/mame/drivers/shootout.cpp b/src/mame/drivers/shootout.cpp
index dae50734ea4..32193741630 100644
--- a/src/mame/drivers/shootout.cpp
+++ b/src/mame/drivers/shootout.cpp
@@ -276,23 +276,21 @@ void shootout_state::machine_reset ()
m_ccnt_old_val = 0x40;
}
-MACHINE_CONFIG_START(shootout_state::shootout)
-
+void shootout_state::shootout(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", DECO_222, XTAL(12'000'000) / 6) // 2 MHz?
- MCFG_DEVICE_PROGRAM_MAP(shootout_map)
+ DECO_222(config, m_maincpu, XTAL(12'000'000) / 6); // 2 MHz?
+ m_maincpu->set_addrmap(AS_PROGRAM, &shootout_state::shootout_map);
- MCFG_DEVICE_ADD("audiocpu", M6502, XTAL(12'000'000) / 8) // 1.5 MHz
- MCFG_DEVICE_PROGRAM_MAP(shootout_sound_map)
+ M6502(config, m_audiocpu, XTAL(12'000'000) / 8); // 1.5 MHz
+ m_audiocpu->set_addrmap(AS_PROGRAM, &shootout_state::shootout_sound_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-
- // Guessed parameters based on the 12 MHz XTAL, but they seem resonable (TODO: Real PCB measurements)
- MCFG_SCREEN_RAW_PARAMS (XTAL(12'000'000) / 2, 384, 0, 256, 262, 8, 248)
-
- MCFG_SCREEN_UPDATE_DRIVER(shootout_state, screen_update_shootout)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ // Guessed parameters based on the 12 MHz XTAL, but they seem reasonable (TODO: Real PCB measurements)
+ screen.set_raw(XTAL(12'000'000) / 2, 384, 0, 256, 262, 8, 248);
+ screen.set_screen_update(FUNC(shootout_state::screen_update_shootout));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_shootout);
PALETTE(config, m_palette, FUNC(shootout_state::shootout_palette), 256);
@@ -305,23 +303,21 @@ MACHINE_CONFIG_START(shootout_state::shootout)
ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000) / 8)); // 1.5 MHz
ymsnd.irq_handler().set_inputline(m_audiocpu, M6502_IRQ_LINE);
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.00);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(shootout_state::shootouj)
+void shootout_state::shootouj(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, XTAL(12'000'000) / 6) // 2 MHz? (Assuming the same XTAL as DE-0219 pcb)
- MCFG_DEVICE_PROGRAM_MAP(shootouj_map)
+ M6502(config, m_maincpu, XTAL(12'000'000) / 6); // 2 MHz? (Assuming the same XTAL as DE-0219 pcb)
+ m_maincpu->set_addrmap(AS_PROGRAM, &shootout_state::shootouj_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
-
- // Guessed parameters based on the 12 MHz XTAL, but they seem resonable (TODO: Real PCB measurements)
- MCFG_SCREEN_RAW_PARAMS (XTAL(12'000'000) / 2, 384, 0, 256, 262, 8, 248)
-
- MCFG_SCREEN_UPDATE_DRIVER(shootout_state, screen_update_shootouj)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ // Guessed parameters based on the 12 MHz XTAL, but they seem reasonable (TODO: Real PCB measurements)
+ screen.set_raw (XTAL(12'000'000) / 2, 384, 0, 256, 262, 8, 248);
+ screen.set_screen_update(FUNC(shootout_state::screen_update_shootouj));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_shootout);
PALETTE(config, m_palette, FUNC(shootout_state::shootout_palette), 256);
@@ -336,15 +332,15 @@ MACHINE_CONFIG_START(shootout_state::shootouj)
ymsnd.port_a_write_callback().set(FUNC(shootout_state::bankswitch_w));
ymsnd.port_b_write_callback().set(FUNC(shootout_state::flipscreen_w));
ymsnd.add_route(ALL_OUTPUTS, "mono", 1.00);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(shootout_state::shootouk)
+void shootout_state::shootouk(machine_config &config)
+{
shootouj(config);
/* the Korean 'bootleg' has the usual DECO222 style encryption */
- config.device_remove("maincpu");
- MCFG_DEVICE_ADD("maincpu", DECO_222, XTAL(12'000'000) / 6) // 2 MHz? (Assuming the same XTAL as DE-0219 pcb)
- MCFG_DEVICE_PROGRAM_MAP(shootouj_map)
-MACHINE_CONFIG_END
+ DECO_222(config.replace(), m_maincpu, XTAL(12'000'000) / 6); // 2 MHz? (Assuming the same XTAL as DE-0219 pcb)
+ m_maincpu->set_addrmap(AS_PROGRAM, &shootout_state::shootouj_map);
+}
diff --git a/src/mame/drivers/shougi.cpp b/src/mame/drivers/shougi.cpp
index 08014c47354..51928319502 100644
--- a/src/mame/drivers/shougi.cpp
+++ b/src/mame/drivers/shougi.cpp
@@ -370,25 +370,25 @@ INTERRUPT_GEN_MEMBER(shougi_state::vblank_nmi)
}
-MACHINE_CONFIG_START(shougi_state::shougi)
-
+void shougi_state::shougi(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(10'000'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(main_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", shougi_state, vblank_nmi)
+ Z80(config, m_maincpu, XTAL(10'000'000)/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &shougi_state::main_map);
+ m_maincpu->set_vblank_int("screen", FUNC(shougi_state::vblank_nmi));
- MCFG_DEVICE_ADD("sub", Z80, XTAL(10'000'000)/4)
- MCFG_DEVICE_PROGRAM_MAP(sub_map)
- MCFG_DEVICE_IO_MAP(readport_sub)
+ Z80(config, m_subcpu, XTAL(10'000'000)/4);
+ m_subcpu->set_addrmap(AS_PROGRAM, &shougi_state::sub_map);
+ m_subcpu->set_addrmap(AS_IO, &shougi_state::readport_sub);
- MCFG_DEVICE_ADD("alpha_8201", ALPHA_8201, XTAL(10'000'000)/4/8)
+ ALPHA_8201(config, m_alpha_8201, XTAL(10'000'000)/4/8);
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<0>().set_nop(); // 0: sharedram = sub, 1: sharedram = main (TODO!)
mainlatch.q_out_cb<1>().set(FUNC(shougi_state::nmi_enable_w));
mainlatch.q_out_cb<2>().set_nop(); // ?
- mainlatch.q_out_cb<3>().set("alpha_8201", FUNC(alpha_8201_device::mcu_start_w)); // start/halt ALPHA-8201
- mainlatch.q_out_cb<4>().set("alpha_8201", FUNC(alpha_8201_device::bus_dir_w)).invert(); // ALPHA-8201 shared RAM bus direction: 0: mcu, 1: maincpu
+ mainlatch.q_out_cb<3>().set(m_alpha_8201, FUNC(alpha_8201_device::mcu_start_w)); // start/halt ALPHA-8201
+ mainlatch.q_out_cb<4>().set(m_alpha_8201, FUNC(alpha_8201_device::bus_dir_w)).invert(); // ALPHA-8201 shared RAM bus direction: 0: mcu, 1: maincpu
mainlatch.q_out_cb<7>().set_nop(); // nothing? connected to +5v via resistor
config.m_perfect_cpu_quantum = subtag("maincpu");
@@ -396,13 +396,13 @@ MACHINE_CONFIG_START(shougi_state::shougi)
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 0x10); // assuming it's the same as champbas
/* 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, 255, 0, 255)
- MCFG_SCREEN_UPDATE_DRIVER(shougi_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(256, 256);
+ screen.set_visarea(0, 255, 0, 255);
+ screen.set_screen_update(FUNC(shougi_state::screen_update));
+ screen.set_palette("palette");
PALETTE(config, "palette", FUNC(shougi_state::shougi_palette), 32);
@@ -410,7 +410,7 @@ MACHINE_CONFIG_START(shougi_state::shougi)
SPEAKER(config, "mono").front_center();
AY8910(config, "aysnd", XTAL(10'000'000)/8).add_route(ALL_OUTPUTS, "mono", 0.30);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/shtzone.cpp b/src/mame/drivers/shtzone.cpp
index 9b6df3aa13c..c4f01def3cc 100644
--- a/src/mame/drivers/shtzone.cpp
+++ b/src/mame/drivers/shtzone.cpp
@@ -100,27 +100,26 @@ uint32_t shtzone_state::screen_update_shtzone(screen_device &screen, bitmap_ind1
}
-MACHINE_CONFIG_START(shtzone_state::shtzone)
-
+void shtzone_state::shtzone(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("timercpu", Z80,10738000/4)
- MCFG_DEVICE_PROGRAM_MAP(shtzone_map)
+ z80_device &timercpu(Z80(config, "timercpu", 10738000/4));
+ timercpu.set_addrmap(AS_PROGRAM, &shtzone_state::shtzone_map);
/* + SMS CPU */
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(shtzone_state, screen_update_shtzone)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_PALETTE_ADD("palette", 0x100)
-
-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(256, 256);
+ screen.set_visarea(0, 256-1, 0, 256-1);
+ screen.set_screen_update(FUNC(shtzone_state::screen_update_shtzone));
+ screen.set_palette("palette");
+
+ PALETTE(config, "palette").set_entries(0x100);
+}
ROM_START( shtzone )
diff --git a/src/mame/drivers/shuuz.cpp b/src/mame/drivers/shuuz.cpp
index 459a67d7551..c89f3e5e5b1 100644
--- a/src/mame/drivers/shuuz.cpp
+++ b/src/mame/drivers/shuuz.cpp
@@ -233,11 +233,11 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(shuuz_state::shuuz)
-
+void shuuz_state::shuuz(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, &shuuz_state::main_map);
EEPROM_2816(config, "eeprom").lock_after_write(true);
@@ -252,20 +252,19 @@ MACHINE_CONFIG_START(shuuz_state::shuuz)
TILEMAP(config, "vad:playfield", m_gfxdecode, 2, 8, 8, TILEMAP_SCAN_COLS, 64, 64).set_info_callback(DEVICE_SELF_OWNER, FUNC(shuuz_state::get_playfield_tile_info));
ATARI_MOTION_OBJECTS(config, "vad:mob", 0, m_screen, shuuz_state::s_mob_config).set_gfxdecode(m_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(shuuz_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
+ m_screen->set_raw(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240);
+ m_screen->set_screen_update(FUNC(shuuz_state::screen_update));
+ m_screen->set_palette("palette");
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("oki", OKIM6295, ATARI_CLOCK_14MHz/16, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", ATARI_CLOCK_14MHz/16, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
diff --git a/src/mame/drivers/sigmab52.cpp b/src/mame/drivers/sigmab52.cpp
index 85355aec66a..be2c9b164b4 100644
--- a/src/mame/drivers/sigmab52.cpp
+++ b/src/mame/drivers/sigmab52.cpp
@@ -575,14 +575,14 @@ void sigmab52_state::machine_reset()
* Machine Drivers *
*************************/
-MACHINE_CONFIG_START(sigmab52_state::jwildb52)
-
+void sigmab52_state::jwildb52(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", MC6809, XTAL(8'000'000))
- MCFG_DEVICE_PROGRAM_MAP(jwildb52_map)
+ MC6809(config, m_maincpu, XTAL(8'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab52_state::jwildb52_map);
- MCFG_DEVICE_ADD("audiocpu", MC6809, XTAL(8'000'000))
- MCFG_DEVICE_PROGRAM_MAP(sound_prog_map)
+ MC6809(config, m_audiocpu, XTAL(8'000'000));
+ m_audiocpu->set_addrmap(AS_PROGRAM, &sigmab52_state::sound_prog_map);
ptm6840_device &ptm1(PTM6840(config, "6840ptm_1", XTAL(8'000'000) / 8)); // FIXME
ptm1.irq_callback().set_inputline("maincpu", M6809_IRQ_LINE);
@@ -592,27 +592,25 @@ MACHINE_CONFIG_START(sigmab52_state::jwildb52)
NVRAM(config, "nvram", nvram_device::DEFAULT_NONE);
- 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, 544-1, 0, 436-1)
- MCFG_SCREEN_UPDATE_DEVICE("hd63484", hd63484_device, update_screen)
- 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(1024, 1024);
+ screen.set_visarea(0, 544-1, 0, 436-1);
+ screen.set_screen_update("hd63484", FUNC(hd63484_device::update_screen));
+ screen.set_palette(m_palette);
HD63484(config, "hd63484", XTAL(8'000'000)).set_addrmap(0, &sigmab52_state::jwildb52_hd63484_map);
- MCFG_PALETTE_ADD("palette", 16)
+ PALETTE(config, m_palette).set_entries(16);
/* sound hardware */
SPEAKER(config, "mono").front_center();
GENERIC_LATCH_8(config, "soundlatch");
- MCFG_DEVICE_ADD("ymsnd", YM3812, XTAL(3'579'545))
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
-
-MACHINE_CONFIG_END
+ YM3812(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 1.0);
+}
/*************************
diff --git a/src/mame/drivers/sigmab98.cpp b/src/mame/drivers/sigmab98.cpp
index 3f943a88cc4..d42c03ae818 100644
--- a/src/mame/drivers/sigmab98.cpp
+++ b/src/mame/drivers/sigmab98.cpp
@@ -2841,11 +2841,12 @@ INTERRUPT_GEN_MEMBER(sigmab98_state::sigmab98_vblank_interrupt)
device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x5a);
}
-MACHINE_CONFIG_START(sigmab98_state::sigmab98)
- MCFG_DEVICE_ADD("maincpu", Z80, 10000000) // !! TAXAN KY-80, clock @X1? !!
- MCFG_DEVICE_PROGRAM_MAP(gegege_mem_map)
- MCFG_DEVICE_IO_MAP(gegege_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sigmab98_state, sigmab98_vblank_interrupt)
+void sigmab98_state::sigmab98(machine_config &config)
+{
+ Z80(config, m_maincpu, 10000000); // !! TAXAN KY-80, clock @X1? !!
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::gegege_mem_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::gegege_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(sigmab98_state::sigmab98_vblank_interrupt));
MCFG_MACHINE_RESET_OVERRIDE(sigmab98_state, sigmab98)
@@ -2855,13 +2856,13 @@ MACHINE_CONFIG_START(sigmab98_state::sigmab98)
TICKET_DISPENSER(config, m_hopper, attotime::from_msec(200), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW );
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) // ?
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) // game reads vblank state
- MCFG_SCREEN_SIZE(0x140, 0x100)
- MCFG_SCREEN_VISIBLE_AREA(0,0x140-1, 0,0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(sigmab98_state, screen_update_sigmab98)
- 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 */); // game reads vblank state
+ m_screen->set_size(0x140, 0x100);
+ m_screen->set_visarea(0,0x140-1, 0,0xf0-1);
+ m_screen->set_screen_update(FUNC(sigmab98_state::screen_update_sigmab98));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sigmab98);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x1000 + 1);
@@ -2873,33 +2874,36 @@ MACHINE_CONFIG_START(sigmab98_state::sigmab98)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("ymz", YMZ280B, 16934400) // clock @X2?
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ ymz280b_device &ymz(YMZ280B(config, "ymz", 16934400)); // clock @X2?
+ ymz.add_route(0, "lspeaker", 1.0);
+ ymz.add_route(1, "rspeaker", 1.0);
+}
-MACHINE_CONFIG_START(sigmab98_state::dodghero)
+void sigmab98_state::dodghero(machine_config &config)
+{
sigmab98(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP( dodghero_mem_map )
- MCFG_DEVICE_IO_MAP( dodghero_io_map )
-MACHINE_CONFIG_END
-MACHINE_CONFIG_START(sigmab98_state::gegege)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::dodghero_mem_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::dodghero_io_map);
+}
+
+void sigmab98_state::gegege(machine_config &config)
+{
sigmab98(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP( gegege_mem_map )
- MCFG_DEVICE_IO_MAP( gegege_io_map )
-MACHINE_CONFIG_END
-MACHINE_CONFIG_START(sigmab98_state::dashhero)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::gegege_mem_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::gegege_io_map);
+}
+
+void sigmab98_state::dashhero(machine_config &config)
+{
sigmab98(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP( gegege_mem_map )
- MCFG_DEVICE_IO_MAP( dashhero_io_map )
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::gegege_mem_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::dashhero_io_map);
config.device_remove("nvram"); // FIXME: does not survive between sessions otherwise
-MACHINE_CONFIG_END
+}
/***************************************************************************
@@ -2924,10 +2928,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(lufykzku_state::lufykzku_irq)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector); // this needs to be called often or the state of the door is not read at boot (at least 5 times before bb9 is called)
}
-MACHINE_CONFIG_START(lufykzku_state::lufykzku)
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(20'000'000) / 2) // !! TAXAN KY-80, clock @X1? !!
- MCFG_DEVICE_PROGRAM_MAP(lufykzku_mem_map)
- MCFG_DEVICE_IO_MAP(lufykzku_io_map)
+void lufykzku_state::lufykzku(machine_config &config)
+{
+ Z80(config, m_maincpu, XTAL(20'000'000) / 2); // !! TAXAN KY-80, clock @X1? !!
+ m_maincpu->set_addrmap(AS_PROGRAM, &lufykzku_state::lufykzku_mem_map);
+ m_maincpu->set_addrmap(AS_IO, &lufykzku_state::lufykzku_io_map);
TIMER(config, "scantimer").configure_scanline(FUNC(lufykzku_state::lufykzku_irq), "screen", 0, 1);
MCFG_MACHINE_RESET_OVERRIDE(lufykzku_state, lufykzku)
@@ -2935,7 +2940,7 @@ MACHINE_CONFIG_START(lufykzku_state::lufykzku)
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // battery backed RAM
// No EEPROM
- MCFG_DEVICE_ADD("watchdog_mb3773", MB3773, 0)
+ MB3773(config, m_watchdog, 0);
TICKET_DISPENSER(config, m_hopper, attotime::from_msec(200), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW );
// 2 x 8-bit parallel/serial converters
@@ -2948,13 +2953,13 @@ MACHINE_CONFIG_START(lufykzku_state::lufykzku)
m_dsw_shifter[1]->qh_callback().set(FUNC(lufykzku_state::dsw_w));
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) // ?
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) // game reads vblank state
- MCFG_SCREEN_SIZE(0x140, 0x100)
- MCFG_SCREEN_VISIBLE_AREA(0,0x140-1, 0,0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(sigmab98_state, screen_update_sigmab98)
- 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 */); // game reads vblank state
+ m_screen->set_size(0x140, 0x100);
+ m_screen->set_visarea(0,0x140-1, 0,0xf0-1);
+ m_screen->set_screen_update(FUNC(sigmab98_state::screen_update_sigmab98));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_lufykzku);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x1000 + 1);
@@ -2965,10 +2970,10 @@ MACHINE_CONFIG_START(lufykzku_state::lufykzku)
// sound hardware
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("oki", OKIM9810, XTAL(4'096'000))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
-MACHINE_CONFIG_END
+ okim9810_device &oki(OKIM9810(config, "oki", XTAL(4'096'000)));
+ oki.add_route(0, "lspeaker", 0.80);
+ oki.add_route(1, "rspeaker", 0.80);
+}
/***************************************************************************
@@ -2994,10 +2999,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(sigmab98_state::sammymdl_irq)
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, m_timer1_vector);
}
-MACHINE_CONFIG_START(sigmab98_state::sammymdl)
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(20'000'000) / 2) // !! KL5C80A120FP @ 10MHz? (actually 4 times faster than Z80) !!
- MCFG_DEVICE_PROGRAM_MAP( animalc_map )
- MCFG_DEVICE_IO_MAP( animalc_io )
+void sigmab98_state::sammymdl(machine_config &config)
+{
+ Z80(config, m_maincpu, XTAL(20'000'000) / 2); // !! KL5C80A120FP @ 10MHz? (actually 4 times faster than Z80) !!
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::animalc_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::animalc_io);
+
TIMER(config, "scantimer").configure_scanline(FUNC(sigmab98_state::sammymdl_irq), "screen", 0, 1);
MCFG_MACHINE_RESET_OVERRIDE(sigmab98_state, sammymdl )
@@ -3010,14 +3017,14 @@ MACHINE_CONFIG_START(sigmab98_state::sammymdl)
WATCHDOG_TIMER(config, "watchdog");
// video hardware
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60) // ?
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) // game reads vblank state
- MCFG_SCREEN_SIZE(0x140, 0x100)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0, 0xf0-1)
- MCFG_SCREEN_UPDATE_DRIVER(sigmab98_state, screen_update_sigmab98)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, sigmab98_state, screen_vblank_sammymdl))
- 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 */); // game reads vblank state
+ m_screen->set_size(0x140, 0x100);
+ m_screen->set_visarea(0, 0x140-1, 0, 0xf0-1);
+ m_screen->set_screen_update(FUNC(sigmab98_state::screen_update_sigmab98));
+ m_screen->screen_vblank().set(FUNC(sigmab98_state::screen_vblank_sammymdl));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_sigmab98);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x1000 + 1);
@@ -3029,59 +3036,64 @@ MACHINE_CONFIG_START(sigmab98_state::sammymdl)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("oki", OKIM9810, XTAL(4'096'000))
- MCFG_SOUND_ROUTE(0, "lspeaker", 0.80)
- MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
-MACHINE_CONFIG_END
+ okim9810_device &oki(OKIM9810(config, "oki", XTAL(4'096'000)));
+ oki.add_route(0, "lspeaker", 0.80);
+ oki.add_route(1, "rspeaker", 0.80);
+}
-MACHINE_CONFIG_START(sigmab98_state::animalc)
+void sigmab98_state::animalc(machine_config &config)
+{
sammymdl(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP( animalc_map )
- MCFG_DEVICE_IO_MAP( animalc_io )
-MACHINE_CONFIG_END
-MACHINE_CONFIG_START(sigmab98_state::gocowboy)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::animalc_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::animalc_io);
+}
+
+void sigmab98_state::gocowboy(machine_config &config)
+{
sammymdl(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP( gocowboy_map )
- MCFG_DEVICE_IO_MAP( gocowboy_io )
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::gocowboy_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::gocowboy_io);
config.device_remove("hopper");
TICKET_DISPENSER(config, m_hopper_small, attotime::from_msec(1000), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW );
TICKET_DISPENSER(config, m_hopper_large, attotime::from_msec(1000), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW );
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(sigmab98_state::haekaka)
+void sigmab98_state::haekaka(machine_config &config)
+{
sammymdl(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP( haekaka_map )
- MCFG_DEVICE_IO_MAP( haekaka_io )
-MACHINE_CONFIG_END
-MACHINE_CONFIG_START(sigmab98_state::itazuram)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::haekaka_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::haekaka_io);
+}
+
+void sigmab98_state::itazuram(machine_config &config)
+{
sammymdl(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP( itazuram_map )
- MCFG_DEVICE_IO_MAP( itazuram_io )
-MACHINE_CONFIG_END
-MACHINE_CONFIG_START(sigmab98_state::pyenaget)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::itazuram_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::itazuram_io);
+}
+
+void sigmab98_state::pyenaget(machine_config &config)
+{
sammymdl(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP( haekaka_map )
- MCFG_DEVICE_IO_MAP( pyenaget_io )
-MACHINE_CONFIG_END
-MACHINE_CONFIG_START(sigmab98_state::tdoboon)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::haekaka_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::pyenaget_io);
+}
+
+void sigmab98_state::tdoboon(machine_config &config)
+{
sammymdl(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP( tdoboon_map )
- MCFG_DEVICE_IO_MAP( tdoboon_io )
- MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_VISIBLE_AREA(0,0x140-1, 0+4,0xf0+4-1)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &sigmab98_state::tdoboon_map);
+ m_maincpu->set_addrmap(AS_IO, &sigmab98_state::tdoboon_io);
+
+ m_screen->set_visarea(0,0x140-1, 0+4,0xf0+4-1);
+}
/***************************************************************************
diff --git a/src/mame/drivers/silkroad.cpp b/src/mame/drivers/silkroad.cpp
index 7b5979491d5..f050c3c146f 100644
--- a/src/mame/drivers/silkroad.cpp
+++ b/src/mame/drivers/silkroad.cpp
@@ -280,21 +280,21 @@ void silkroad_state::machine_start()
m_okibank->configure_entries(0, 4, memregion("oki1")->base() + 0x20000, 0x20000);
}
-MACHINE_CONFIG_START(silkroad_state::silkroad)
-
+void silkroad_state::silkroad(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68EC020, XTAL(32'000'000)/2) /* 16MHz */
- MCFG_DEVICE_PROGRAM_MAP(cpu_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", silkroad_state, irq4_line_hold)
+ M68EC020(config, m_maincpu, XTAL(32'000'000)/2); /* 16MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &silkroad_state::cpu_map);
+ m_maincpu->set_vblank_int("screen", FUNC(silkroad_state::irq4_line_hold));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(6*8+2, 64*8-1-(10*8)-2, 2*8, 32*8-1-(2*8))
- MCFG_SCREEN_UPDATE_DRIVER(silkroad_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 32*8);
+ screen.set_visarea(6*8+2, 64*8-1-(10*8)-2, 2*8, 32*8-1-(2*8));
+ screen.set_screen_update(FUNC(silkroad_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_silkroad);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x2000).set_membits(16);
@@ -305,15 +305,15 @@ MACHINE_CONFIG_START(silkroad_state::silkroad)
YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "lspeaker", 1.0).add_route(1, "rspeaker", 1.0);
- MCFG_DEVICE_ADD("oki1", OKIM6295, XTAL(32'000'000)/32, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified (was 1056000)
- MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.45)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.45)
+ okim6295_device &oki1(OKIM6295(config, "oki1", XTAL(32'000'000)/32, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified (was 1056000)
+ oki1.set_addrmap(0, &silkroad_state::oki_map);
+ oki1.add_route(ALL_OUTPUTS, "lspeaker", 0.45);
+ oki1.add_route(ALL_OUTPUTS, "rspeaker", 0.45);
- MCFG_DEVICE_ADD("oki2", OKIM6295, XTAL(32'000'000)/16, okim6295_device::PIN7_HIGH) // clock frequency & pin 7 not verified (was 2112000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.45)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.45)
-MACHINE_CONFIG_END
+ okim6295_device &oki2(OKIM6295(config, "oki2", XTAL(32'000'000)/16, okim6295_device::PIN7_HIGH)); // clock frequency & pin 7 not verified (was 2112000)
+ oki2.add_route(ALL_OUTPUTS, "lspeaker", 0.45);
+ oki2.add_route(ALL_OUTPUTS, "rspeaker", 0.45);
+}
/***************************************************************************
diff --git a/src/mame/drivers/silvmil.cpp b/src/mame/drivers/silvmil.cpp
index 576a483555f..6b3ff2be93e 100644
--- a/src/mame/drivers/silvmil.cpp
+++ b/src/mame/drivers/silvmil.cpp
@@ -407,25 +407,25 @@ void silvmil_state::silvmil_sound_map(address_map &map)
}
-MACHINE_CONFIG_START(silvmil_state::silvmil)
-
+void silvmil_state::silvmil(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M68000, XTAL(12'000'000)) /* Verified */
- MCFG_DEVICE_PROGRAM_MAP(silvmil_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", silvmil_state, irq6_line_hold)
+ M68000(config, m_maincpu, XTAL(12'000'000)); /* Verified */
+ m_maincpu->set_addrmap(AS_PROGRAM, &silvmil_state::silvmil_map);
+ m_maincpu->set_vblank_int("screen", FUNC(silvmil_state::irq6_line_hold));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(4'096'000)) /* Verified */
- MCFG_DEVICE_PROGRAM_MAP(silvmil_sound_map)
+ z80_device &audiocpu(Z80(config, "audiocpu", XTAL(4'096'000))); /* Verified */
+ audiocpu.set_addrmap(AS_PROGRAM, &silvmil_state::silvmil_sound_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(64*8, 64*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(silvmil_state, screen_update_silvmil)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(64*8, 64*8);
+ screen.set_visarea(0, 40*8-1, 0, 30*8-1);
+ screen.set_screen_update(FUNC(silvmil_state::screen_update_silvmil));
+ screen.set_palette("palette");
PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x300);
GFXDECODE(config, m_gfxdecode, "palette", gfx_silvmil);
@@ -444,22 +444,18 @@ MACHINE_CONFIG_START(silvmil_state::silvmil)
ymsnd.irq_handler().set_inputline("audiocpu", 0);
ymsnd.add_route(ALL_OUTPUTS, "mono", 0.25);
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(4'096'000)/4, okim6295_device::PIN7_HIGH) /* Verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki", XTAL(4'096'000)/4, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 0.25); /* Verified */
+}
-MACHINE_CONFIG_START(silvmil_state::puzzlove)
+void silvmil_state::puzzlove(machine_config &config)
+{
silvmil(config);
- config.device_remove("audiocpu");
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(4'000'000)) /* Verified */
- MCFG_DEVICE_PROGRAM_MAP(silvmil_sound_map)
+ subdevice<z80_device>("audiocpu")->set_clock(XTAL(4'000'000)); /* Verified */
m_sprgen->set_bootleg_type(1);
- config.device_remove("oki");
- MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(4'000'000)/4, okim6295_device::PIN7_HIGH) /* Verified */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
-MACHINE_CONFIG_END
+ subdevice<okim6295_device>("oki")->set_clock(XTAL(4'000'000)/4); /* Verified */
+}
void silvmil_state::puzzlovek(machine_config &config)
{
diff --git a/src/mame/drivers/simpl156.cpp b/src/mame/drivers/simpl156.cpp
index 04c1613a538..a203d88f76d 100644
--- a/src/mame/drivers/simpl156.cpp
+++ b/src/mame/drivers/simpl156.cpp
@@ -401,23 +401,23 @@ DECOSPR_PRIORITY_CB_MEMBER(simpl156_state::pri_callback)
}
-MACHINE_CONFIG_START(simpl156_state::chainrec)
-
+void simpl156_state::chainrec(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", ARM, 28000000 /* /4 */) /*DE156*/ /* 7.000 MHz */ /* measured at 7.. seems to need 28? */
- MCFG_DEVICE_PROGRAM_MAP(chainrec_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", simpl156_state, simpl156_vbl_interrupt)
+ ARM(config, m_maincpu, 28000000 /* /4 */); /*DE156*/ /* 7.000 MHz */ /* measured at 7.. seems to need 28? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &simpl156_state::chainrec_map);
+ m_maincpu->set_vblank_int("screen", FUNC(simpl156_state::simpl156_vbl_interrupt));
EEPROM_93C46_16BIT(config, "eeprom"); // 93C45
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(58)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(800))
- 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(simpl156_state, screen_update_simpl156)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(58);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(800));
+ 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(simpl156_state::screen_update_simpl156));
+ screen.set_palette(m_palette);
PALETTE(config, m_palette);
m_palette->set_format(palette_device::xBGR_555, 4096);
@@ -449,50 +449,48 @@ MACHINE_CONFIG_START(simpl156_state::chainrec)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("okisfx", OKIM6295, 32220000/32, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.6)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.6)
+ okim6295_device &okisfx(OKIM6295(config, "okisfx", 32220000/32, okim6295_device::PIN7_HIGH));
+ okisfx.add_route(ALL_OUTPUTS, "lspeaker", 0.6);
+ okisfx.add_route(ALL_OUTPUTS, "rspeaker", 0.6);
- MCFG_DEVICE_ADD("okimusic", OKIM6295, 32220000/16, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2)
-MACHINE_CONFIG_END
+ OKIM6295(config, m_okimusic, 32220000/16, okim6295_device::PIN7_HIGH);
+ m_okimusic->add_route(ALL_OUTPUTS, "lspeaker", 0.2);
+ m_okimusic->add_route(ALL_OUTPUTS, "rspeaker", 0.2);
+}
-MACHINE_CONFIG_START(simpl156_state::magdrop)
+void simpl156_state::magdrop(machine_config &config)
+{
chainrec(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(magdrop_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &simpl156_state::magdrop_map);
+}
-MACHINE_CONFIG_START(simpl156_state::magdropp)
+void simpl156_state::magdropp(machine_config &config)
+{
chainrec(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(magdropp_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &simpl156_state::magdropp_map);
+}
-MACHINE_CONFIG_START(simpl156_state::joemacr)
+void simpl156_state::joemacr(machine_config &config)
+{
chainrec(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(joemacr_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &simpl156_state::joemacr_map);
+}
-MACHINE_CONFIG_START(simpl156_state::mitchell156)
+void simpl156_state::mitchell156(machine_config &config)
+{
chainrec(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(mitchell156_map)
+ m_maincpu->set_addrmap(AS_PROGRAM, &simpl156_state::mitchell156_map);
- MCFG_DEVICE_REPLACE("okimusic", OKIM6295, 32220000/32, okim6295_device::PIN7_HIGH)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.2)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.2)
-MACHINE_CONFIG_END
+ m_okimusic->set_clock(32220000/32);
+}
/*
diff --git a/src/mame/drivers/simple_st0016.cpp b/src/mame/drivers/simple_st0016.cpp
index 7b8a06ad2eb..877226f41a8 100644
--- a/src/mame/drivers/simple_st0016.cpp
+++ b/src/mame/drivers/simple_st0016.cpp
@@ -467,41 +467,45 @@ uint32_t st0016_state::screen_update_st0016(screen_device &screen, bitmap_ind16
}
-MACHINE_CONFIG_START(st0016_state::st0016)
+void st0016_state::st0016(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",ST0016_CPU,8000000) /* 8 MHz ? */
- MCFG_DEVICE_PROGRAM_MAP(st0016_mem)
- MCFG_DEVICE_IO_MAP(st0016_io)
+ ST0016_CPU(config, m_maincpu, 8000000); /* 8 MHz ? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &st0016_state::st0016_mem);
+ m_maincpu->set_addrmap(AS_IO, &st0016_state::st0016_io);
+
TIMER(config, "scantimer").configure_scanline(FUNC(st0016_state::st0016_int), "screen", 0, 1);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(48*8, 48*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 0*8, 48*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(st0016_state, screen_update_st0016)
- MCFG_SCREEN_PALETTE("maincpu: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(48*8, 48*8);
+ m_screen->set_visarea(0*8, 48*8-1, 0*8, 48*8-1);
+ m_screen->set_screen_update(FUNC(st0016_state::screen_update_st0016));
+ m_screen->set_palette("maincpu:palette");
// MCFG_VIDEO_START_OVERRIDE(st0016_state,st0016)
+}
-MACHINE_CONFIG_END
-
-MACHINE_CONFIG_START(st0016_state::mayjinsn)
+void st0016_state::mayjinsn(machine_config &config)
+{
st0016(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(st0016_m2_io)
- MCFG_DEVICE_ADD("sub", V810, 10000000)//25 Mhz ?
- MCFG_DEVICE_PROGRAM_MAP(v810_mem)
+
+ m_maincpu->set_addrmap(AS_IO, &st0016_state::st0016_m2_io);
+
+ V810(config, m_subcpu, 10000000); //25 Mhz ?
+ m_subcpu->set_addrmap(AS_PROGRAM, &st0016_state::v810_mem);
+
config.m_minimum_quantum = attotime::from_hz(60);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(st0016_state::renju)
+void st0016_state::renju(machine_config &config)
+{
st0016(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(renju_mem)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &st0016_state::renju_mem);
+}
/*************************************
*
diff --git a/src/mame/drivers/sk1.cpp b/src/mame/drivers/sk1.cpp
index bdb91ff66e7..1ad5581e705 100644
--- a/src/mame/drivers/sk1.cpp
+++ b/src/mame/drivers/sk1.cpp
@@ -89,10 +89,11 @@ void sk1_state::sk1_memory(address_map &map)
}
-MACHINE_CONFIG_START(sk1_state::sk1)
+void sk1_state::sk1(machine_config &config)
+{
// just to attach the memory map to something until I can work out what the CPU core is
ADDRESS_MAP_BANK(config, "dummy").set_map(&sk1_state::sk1_memory).set_data_width(8).set_addr_width(16);
-MACHINE_CONFIG_END
+}
INPUT_PORTS_START(sk1)
diff --git a/src/mame/drivers/skimaxx.cpp b/src/mame/drivers/skimaxx.cpp
index ffeeafa3866..f5b619d8da7 100644
--- a/src/mame/drivers/skimaxx.cpp
+++ b/src/mame/drivers/skimaxx.cpp
@@ -502,13 +502,14 @@ void skimaxx_state::machine_reset()
*
*************************************/
-MACHINE_CONFIG_START(skimaxx_state::skimaxx)
- MCFG_DEVICE_ADD("maincpu", M68EC030, XTAL(40'000'000))
- MCFG_DEVICE_PROGRAM_MAP(m68030_1_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", skimaxx_state, irq3_line_hold) // 1,3,7 are identical, rest is RTE
+void skimaxx_state::skimaxx(machine_config &config)
+{
+ M68EC030(config, m_maincpu, XTAL(40'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &skimaxx_state::m68030_1_map);
+ m_maincpu->set_vblank_int("screen", FUNC(skimaxx_state::irq3_line_hold)); // 1,3,7 are identical, rest is RTE
- MCFG_DEVICE_ADD("subcpu", M68EC030, XTAL(40'000'000))
- MCFG_DEVICE_PROGRAM_MAP(m68030_2_map)
+ M68EC030(config, m_subcpu, XTAL(40'000'000));
+ m_subcpu->set_addrmap(AS_PROGRAM, &skimaxx_state::m68030_2_map);
/* video hardware */
@@ -522,14 +523,14 @@ MACHINE_CONFIG_START(skimaxx_state::skimaxx)
m_tms->set_shiftreg_in_callback(FUNC(skimaxx_state::to_shiftreg));
m_tms->set_shiftreg_out_callback(FUNC(skimaxx_state::from_shiftreg));
- MCFG_SCREEN_ADD("screen", RASTER)
-// MCFG_SCREEN_RAW_PARAMS(40000000/4, 156*4, 0, 100*4, 328, 0, 300) // TODO - Wrong but TMS overrides it anyway
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(0x400, 0x100)
- MCFG_SCREEN_VISIBLE_AREA(0, 0x280-1, 0, 0xf0-1)
- MCFG_SCREEN_UPDATE_DEVICE("tms", tms34010_device, tms340x0_ind16)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+// screen.set_raw(40000000/4, 156*4, 0, 100*4, 328, 0, 300); // TODO - Wrong but TMS overrides it anyway
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ screen.set_size(0x400, 0x100);
+ screen.set_visarea(0, 0x280-1, 0, 0xf0-1);
+ screen.set_screen_update("tms", FUNC(tms34010_device::tms340x0_ind16));
+ screen.set_palette("palette");
// GFXDECODE(config, "gfxdecode", "palette", gfx_skimaxx);
@@ -539,18 +540,14 @@ MACHINE_CONFIG_START(skimaxx_state::skimaxx)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("oki1", OKIM6295, XTAL(4'000'000), okim6295_device::PIN7_LOW) // ?
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ OKIM6295(config, "oki1", XTAL(4'000'000), okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // ?
- MCFG_DEVICE_ADD("oki2", OKIM6295, XTAL(4'000'000)/2, okim6295_device::PIN7_HIGH) // ?
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+ OKIM6295(config, "oki2", XTAL(4'000'000)/2, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "lspeaker", 1.0); // ?
- MCFG_DEVICE_ADD("oki3", OKIM6295, XTAL(4'000'000), okim6295_device::PIN7_LOW) // ?
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+ OKIM6295(config, "oki3", XTAL(4'000'000), okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // ?
- MCFG_DEVICE_ADD("oki4", OKIM6295, XTAL(4'000'000)/2, okim6295_device::PIN7_HIGH) // ?
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
+ OKIM6295(config, "oki4", XTAL(4'000'000)/2, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "rspeaker", 1.0); // ?
+}
/*************************************
diff --git a/src/mame/drivers/skullxbo.cpp b/src/mame/drivers/skullxbo.cpp
index 22c179b0ad8..7dd479a6eac 100644
--- a/src/mame/drivers/skullxbo.cpp
+++ b/src/mame/drivers/skullxbo.cpp
@@ -226,11 +226,11 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(skullxbo_state::skullxbo)
-
+void skullxbo_state::skullxbo(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, &skullxbo_state::main_map);
TIMER(config, m_scanline_timer).configure_generic(FUNC(skullxbo_state::scanline_timer));
@@ -242,20 +242,20 @@ MACHINE_CONFIG_START(skullxbo_state::skullxbo)
GFXDECODE(config, m_gfxdecode, "palette", gfx_skullxbo);
PALETTE(config, "palette").set_format(palette_device::IRGB_1555, 2048);
- MCFG_TILEMAP_ADD_STANDARD("playfield", "gfxdecode", 2, skullxbo_state, get_playfield_tile_info, 16,8, SCAN_COLS, 64,64)
- MCFG_TILEMAP_ADD_STANDARD_TRANSPEN("alpha", "gfxdecode", 2, skullxbo_state, get_alpha_tile_info, 16,8, SCAN_ROWS, 64,32, 0)
+ TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 16,8, TILEMAP_SCAN_COLS, 64,64).set_info_callback(FUNC(skullxbo_state::get_playfield_tile_info));
+ TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 16,8, TILEMAP_SCAN_ROWS, 64,32, 0).set_info_callback(FUNC(skullxbo_state::get_alpha_tile_info));
ATARI_MOTION_OBJECTS(config, m_mob, 0, m_screen, skullxbo_state::s_mob_config);
m_mob->set_gfxdecode(m_gfxdecode);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
/* note: these parameters are from published specs, not derived */
/* the board uses an SOS-2 chip to generate video signals */
- MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240)
- MCFG_SCREEN_UPDATE_DRIVER(skullxbo_state, screen_update_skullxbo)
- MCFG_SCREEN_PALETTE("palette")
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, skullxbo_state, video_int_write_line))
+ m_screen->set_raw(ATARI_CLOCK_14MHz, 456*2, 0, 336*2, 262, 0, 240);
+ m_screen->set_screen_update(FUNC(skullxbo_state::screen_update_skullxbo));
+ m_screen->set_palette("palette");
+ m_screen->screen_vblank().set(FUNC(skullxbo_state::video_int_write_line));
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -264,7 +264,7 @@ MACHINE_CONFIG_START(skullxbo_state::skullxbo)
m_jsa->main_int_cb().set_inputline(m_maincpu, M68K_IRQ_4);
m_jsa->test_read_cb().set_ioport("FF5802").bit(7);
m_jsa->add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/skyarmy.cpp b/src/mame/drivers/skyarmy.cpp
index c16ee02e5f4..f70919933f7 100644
--- a/src/mame/drivers/skyarmy.cpp
+++ b/src/mame/drivers/skyarmy.cpp
@@ -320,13 +320,13 @@ static GFXDECODE_START( gfx_skyarmy )
GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0, 8 )
GFXDECODE_END
-MACHINE_CONFIG_START(skyarmy_state::skyarmy)
-
- MCFG_DEVICE_ADD("maincpu", Z80,4000000)
- MCFG_DEVICE_PROGRAM_MAP(skyarmy_map)
- MCFG_DEVICE_IO_MAP(skyarmy_io_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", skyarmy_state, irq0_line_hold)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(skyarmy_state, nmi_source, 650) /* Hz */
+void skyarmy_state::skyarmy(machine_config &config)
+{
+ Z80(config, m_maincpu, 4000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &skyarmy_state::skyarmy_map);
+ m_maincpu->set_addrmap(AS_IO, &skyarmy_state::skyarmy_io_map);
+ m_maincpu->set_vblank_int("screen", FUNC(skyarmy_state::irq0_line_hold));
+ m_maincpu->set_periodic_int(FUNC(skyarmy_state::nmi_source), attotime::from_hz(650)); /* Hz */
ls259_device &latch(LS259(config, "latch")); // 11C
latch.q_out_cb<0>().set(FUNC(skyarmy_state::coin_counter_w));
@@ -336,13 +336,13 @@ MACHINE_CONFIG_START(skyarmy_state::skyarmy)
latch.q_out_cb<7>().set_nop(); // video RAM buffering?
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(32*8,32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8,32*8-1,1*8,31*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(skyarmy_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,31*8-1);
+ screen.set_screen_update(FUNC(skyarmy_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_skyarmy);
PALETTE(config, m_palette, FUNC(skyarmy_state::skyarmy_palette), 32);
@@ -351,7 +351,7 @@ MACHINE_CONFIG_START(skyarmy_state::skyarmy)
SPEAKER(config, "mono").front_center();
AY8910(config, "ay0", 2500000).add_route(ALL_OUTPUTS, "mono", 0.15);
AY8910(config, "ay1", 2500000).add_route(ALL_OUTPUTS, "mono", 0.15);
-MACHINE_CONFIG_END
+}
ROM_START( skyarmy )
diff --git a/src/mame/drivers/skydiver.cpp b/src/mame/drivers/skydiver.cpp
index 88e0e1bc391..2d0cb744059 100644
--- a/src/mame/drivers/skydiver.cpp
+++ b/src/mame/drivers/skydiver.cpp
@@ -335,12 +335,12 @@ GFXDECODE_END
*
*************************************/
-MACHINE_CONFIG_START(skydiver_state::skydiver)
-
+void skydiver_state::skydiver(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6800, 12.096_MHz_XTAL / 16) /* ???? */
- MCFG_DEVICE_PROGRAM_MAP(skydiver_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(skydiver_state, interrupt, 5*60)
+ M6800(config, m_maincpu, 12.096_MHz_XTAL / 16); /* ???? */
+ m_maincpu->set_addrmap(AS_PROGRAM, &skydiver_state::skydiver_map);
+ m_maincpu->set_periodic_int(FUNC(skydiver_state::interrupt), attotime::from_hz(5*60));
WATCHDOG_TIMER(config, m_watchdog).set_vblank_count("screen", 8); // 128V clocks the same as VBLANK
@@ -372,10 +372,10 @@ MACHINE_CONFIG_START(skydiver_state::skydiver)
latch3.q_out_cb<7>().set("discrete", FUNC(discrete_device::write_line<SKYDIVER_NOISE_RST>));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(12.096_MHz_XTAL / 2, 384, 0, 256, 262, 0, 224)
- MCFG_SCREEN_UPDATE_DRIVER(skydiver_state, screen_update)
- MCFG_SCREEN_PALETTE(m_palette)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_raw(12.096_MHz_XTAL / 2, 384, 0, 256, 262, 0, 224);
+ screen.set_screen_update(FUNC(skydiver_state::screen_update));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_skydiver);
PALETTE(config, m_palette, FUNC(skydiver_state::skydiver_palette), ARRAY_LENGTH(colortable_source));
@@ -384,7 +384,7 @@ MACHINE_CONFIG_START(skydiver_state::skydiver)
SPEAKER(config, "mono").front_center();
DISCRETE(config, m_discrete, skydiver_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
diff --git a/src/mame/drivers/skyfox.cpp b/src/mame/drivers/skyfox.cpp
index d54509276fb..52124948780 100644
--- a/src/mame/drivers/skyfox.cpp
+++ b/src/mame/drivers/skyfox.cpp
@@ -222,24 +222,24 @@ void skyfox_state::machine_reset()
m_bg_ctrl = 0;
}
-MACHINE_CONFIG_START(skyfox_state::skyfox)
-
+void skyfox_state::skyfox(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(8'000'000)/2) /* Verified at 4MHz */
- MCFG_DEVICE_PROGRAM_MAP(skyfox_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", skyfox_state, skyfox_interrupt)
+ Z80(config, m_maincpu, XTAL(8'000'000)/2); /* Verified at 4MHz */
+ m_maincpu->set_addrmap(AS_PROGRAM, &skyfox_state::skyfox_map);
+ m_maincpu->set_vblank_int("screen", FUNC(skyfox_state::skyfox_interrupt));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(14'318'181)/8) /* Verified at 1.789772MHz */
- MCFG_DEVICE_PROGRAM_MAP(skyfox_sound_map)
+ Z80(config, m_audiocpu, XTAL(14'318'181)/8); /* Verified at 1.789772MHz */
+ m_audiocpu->set_addrmap(AS_PROGRAM, &skyfox_state::skyfox_sound_map);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(62.65)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0+0x60, 320-1+0x60, 0+16, 256-1-16) // from $30*2 to $CC*2+8
- MCFG_SCREEN_UPDATE_DRIVER(skyfox_state, screen_update_skyfox)
- MCFG_SCREEN_PALETTE(m_palette)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(62.65);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */);
+ m_screen->set_size(512, 256);
+ m_screen->set_visarea(0+0x60, 320-1+0x60, 0+16, 256-1-16); // from $30*2 to $CC*2+8
+ m_screen->set_screen_update(FUNC(skyfox_state::screen_update_skyfox));
+ m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_skyfox);
PALETTE(config, m_palette, FUNC(skyfox_state::skyfox_palette), 256+256); // 256 static colors (+256 for the background??)
@@ -249,12 +249,10 @@ MACHINE_CONFIG_START(skyfox_state::skyfox)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("ym1", YM2203, XTAL(14'318'181)/8) /* Verified at 1.789772MHz */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
+ YM2203(config, "ym1", XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "mono", 0.80); /* Verified at 1.789772MHz */
- MCFG_DEVICE_ADD("ym2", YM2203, XTAL(14'318'181)/8) /* Verified at 1.789772MHz */
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
-MACHINE_CONFIG_END
+ YM2203(config, "ym2", XTAL(14'318'181)/8).add_route(ALL_OUTPUTS, "mono", 0.80); /* Verified at 1.789772MHz */
+}
diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp
index 1cf7408a14d..3ef552923fb 100644
--- a/src/mame/drivers/skylncr.cpp
+++ b/src/mame/drivers/skylncr.cpp
@@ -1645,13 +1645,13 @@ INTERRUPT_GEN_MEMBER(skylncr_state::skylncr_vblank_interrupt)
* Machine Driver *
*************************************/
-MACHINE_CONFIG_START(skylncr_state::skylncr)
-
+void skylncr_state::skylncr(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK/4)
- MCFG_DEVICE_PROGRAM_MAP(mem_map_skylncr)
- MCFG_DEVICE_IO_MAP(io_map_skylncr)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", skylncr_state, skylncr_vblank_interrupt)
+ Z80(config, m_maincpu, MASTER_CLOCK/4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &skylncr_state::mem_map_skylncr);
+ m_maincpu->set_addrmap(AS_IO, &skylncr_state::io_map_skylncr);
+ m_maincpu->set_vblank_int("screen", FUNC(skylncr_state::skylncr_vblank_interrupt));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -1669,13 +1669,13 @@ MACHINE_CONFIG_START(skylncr_state::skylncr)
TICKET_DISPENSER(config, m_hopper, attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(512, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
- MCFG_SCREEN_UPDATE_DRIVER(skylncr_state, screen_update_skylncr)
- MCFG_SCREEN_PALETTE("palette")
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(512, 256);
+ screen.set_visarea(0, 512-1, 0, 256-1);
+ screen.set_screen_update(FUNC(skylncr_state::screen_update_skylncr));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_skylncr);
PALETTE(config, m_palette).set_entries(0x200);
@@ -1694,15 +1694,15 @@ MACHINE_CONFIG_START(skylncr_state::skylncr)
aysnd.port_a_read_callback().set_ioport("DSW3");
aysnd.port_b_read_callback().set_ioport("DSW4");
aysnd.add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(skylncr_state::mbutrfly)
+void skylncr_state::mbutrfly(machine_config &config)
+{
skylncr(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(io_map_mbutrfly)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &skylncr_state::io_map_mbutrfly);
+}
void skylncr_state::neraidou(machine_config &config)
@@ -1721,15 +1721,15 @@ void skylncr_state::sstar97(machine_config &config)
}
-MACHINE_CONFIG_START(skylncr_state::bdream97)
+void skylncr_state::bdream97(machine_config &config)
+{
skylncr(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_OPCODES_MAP(bdream97_opcode_map)
+ m_maincpu->set_addrmap(AS_OPCODES, &skylncr_state::bdream97_opcode_map);
m_gfxdecode->set_info(gfx_bdream97);
-MACHINE_CONFIG_END
+}
/**********************************
diff --git a/src/mame/drivers/skyraid.cpp b/src/mame/drivers/skyraid.cpp
index fddeeac6964..d04de7654ea 100644
--- a/src/mame/drivers/skyraid.cpp
+++ b/src/mame/drivers/skyraid.cpp
@@ -222,23 +222,23 @@ static GFXDECODE_START( gfx_skyraid )
GFXDECODE_END
-MACHINE_CONFIG_START(skyraid_state::skyraid)
-
+void skyraid_state::skyraid(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6502, 12096000 / 12)
- MCFG_DEVICE_PROGRAM_MAP(skyraid_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", skyraid_state, irq0_line_hold)
+ M6502(config, m_maincpu, 12096000 / 12);
+ m_maincpu->set_addrmap(AS_PROGRAM, &skyraid_state::skyraid_map);
+ m_maincpu->set_vblank_int("screen", FUNC(skyraid_state::irq0_line_hold));
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 4);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(22 * 1000000 / 15750))
- MCFG_SCREEN_SIZE(512, 240)
- MCFG_SCREEN_VISIBLE_AREA(0, 511, 0, 239)
- MCFG_SCREEN_UPDATE_DRIVER(skyraid_state, screen_update_skyraid)
- 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(22 * 1000000 / 15750));
+ screen.set_size(512, 240);
+ screen.set_visarea(0, 511, 0, 239);
+ screen.set_screen_update(FUNC(skyraid_state::screen_update_skyraid));
+ screen.set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_skyraid);
@@ -248,7 +248,7 @@ MACHINE_CONFIG_START(skyraid_state::skyraid)
SPEAKER(config, "mono").front_center();
DISCRETE(config, m_discrete, skyraid_discrete).add_route(ALL_OUTPUTS, "mono", 1.0);
-MACHINE_CONFIG_END
+}
ROM_START( skyraid )
diff --git a/src/mame/drivers/slapfght.cpp b/src/mame/drivers/slapfght.cpp
index 2e015beae0e..b9815e7d36e 100644
--- a/src/mame/drivers/slapfght.cpp
+++ b/src/mame/drivers/slapfght.cpp
@@ -889,12 +889,12 @@ GFXDECODE_END
***************************************************************************/
-MACHINE_CONFIG_START(slapfght_state::perfrman)
-
+void slapfght_state::perfrman(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(16'000'000)/4) // 4MHz? XTAL is known, divider is guessed
- MCFG_DEVICE_PROGRAM_MAP(perfrman_map)
- MCFG_DEVICE_IO_MAP(io_map_nomcu)
+ Z80(config, m_maincpu, XTAL(16'000'000)/4); // 4MHz? XTAL is known, divider is guessed
+ m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::perfrman_map);
+ m_maincpu->set_addrmap(AS_IO, &slapfght_state::io_map_nomcu);
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<0>().set(FUNC(slapfght_state::sound_reset_w));
@@ -902,9 +902,9 @@ MACHINE_CONFIG_START(slapfght_state::perfrman)
mainlatch.q_out_cb<3>().set(FUNC(slapfght_state::irq_enable_w));
mainlatch.q_out_cb<6>().set(FUNC(slapfght_state::palette_bank_w));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(16'000'000)/8) // 2MHz? XTAL is known, divider is guessed
- MCFG_DEVICE_PROGRAM_MAP(perfrman_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(slapfght_state, sound_nmi, 240) // music speed, verified
+ Z80(config, m_audiocpu, XTAL(16'000'000)/8); // 2MHz? XTAL is known, divider is guessed
+ m_audiocpu->set_addrmap(AS_PROGRAM, &slapfght_state::perfrman_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(slapfght_state::sound_nmi), attotime::from_hz(240)); // music speed, verified
config.m_perfect_cpu_quantum = subtag("maincpu");
@@ -937,24 +937,24 @@ MACHINE_CONFIG_START(slapfght_state::perfrman)
ay2.port_a_read_callback().set_ioport("DSW1");
ay2.port_b_read_callback().set_ioport("DSW2");
ay2.add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
-
+}
-MACHINE_CONFIG_START(slapfght_state::tigerh)
+void slapfght_state::tigerh(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, XTAL(36'000'000)/6) // 6MHz
- MCFG_DEVICE_PROGRAM_MAP(tigerh_map_mcu)
- MCFG_DEVICE_IO_MAP(io_map_mcu)
+ Z80(config, m_maincpu, XTAL(36'000'000)/6); // 6MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::tigerh_map_mcu);
+ m_maincpu->set_addrmap(AS_IO, &slapfght_state::io_map_mcu);
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<0>().set(FUNC(slapfght_state::sound_reset_w));
mainlatch.q_out_cb<1>().set(FUNC(slapfght_state::flipscreen_w));
mainlatch.q_out_cb<3>().set(FUNC(slapfght_state::irq_enable_w));
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(36'000'000)/12) // 3MHz
- MCFG_DEVICE_PROGRAM_MAP(tigerh_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(slapfght_state, sound_nmi, 360) // music speed, verified with pcb recording
+ Z80(config, m_audiocpu, XTAL(36'000'000)/12); // 3MHz
+ m_audiocpu->set_addrmap(AS_PROGRAM, &slapfght_state::tigerh_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(slapfght_state::sound_nmi), attotime::from_hz(360)); // music speed, verified with pcb recording
TAITO68705_MCU_TIGER(config, m_bmcu, 36_MHz_XTAL/12); // 3MHz
@@ -989,34 +989,34 @@ MACHINE_CONFIG_START(slapfght_state::tigerh)
ay2.port_a_read_callback().set_ioport("DSW1");
ay2.port_b_read_callback().set_ioport("DSW2");
ay2.add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(slapfght_state::tigerhb1)
+void slapfght_state::tigerhb1(machine_config &config)
+{
tigerh(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(tigerhb1_map)
- MCFG_DEVICE_IO_MAP(io_map_nomcu)
+ m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::tigerhb1_map);
+ m_maincpu->set_addrmap(AS_IO, &slapfght_state::io_map_nomcu);
config.device_remove("bmcu");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(slapfght_state::tigerhb2)
+void slapfght_state::tigerhb2(machine_config &config)
+{
tigerhb1(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(tigerhb2_map)
-MACHINE_CONFIG_END
-
+ m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::tigerhb2_map);
+}
-MACHINE_CONFIG_START(slapfght_state::slapfigh)
+void slapfght_state::slapfigh(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, XTAL(36'000'000)/6) // 6MHz
- MCFG_DEVICE_PROGRAM_MAP(slapfigh_map_mcu)
- MCFG_DEVICE_IO_MAP(io_map_mcu)
+ Z80(config, m_maincpu, XTAL(36'000'000)/6); // 6MHz
+ m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::slapfigh_map_mcu);
+ m_maincpu->set_addrmap(AS_IO, &slapfght_state::io_map_mcu);
ls259_device &mainlatch(LS259(config, "mainlatch"));
mainlatch.q_out_cb<0>().set(FUNC(slapfght_state::sound_reset_w));
@@ -1024,9 +1024,9 @@ MACHINE_CONFIG_START(slapfght_state::slapfigh)
mainlatch.q_out_cb<3>().set(FUNC(slapfght_state::irq_enable_w));
mainlatch.q_out_cb<4>().set_membank("bank1");
- MCFG_DEVICE_ADD("audiocpu", Z80, XTAL(36'000'000)/12) // 3MHz
- MCFG_DEVICE_PROGRAM_MAP(tigerh_sound_map)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(slapfght_state, sound_nmi, 180)
+ Z80(config, m_audiocpu, XTAL(36'000'000)/12); // 3MHz
+ m_audiocpu->set_addrmap(AS_PROGRAM, &slapfght_state::tigerh_sound_map);
+ m_audiocpu->set_periodic_int(FUNC(slapfght_state::sound_nmi), attotime::from_hz(180));
TAITO68705_MCU(config, m_bmcu, 36_MHz_XTAL/12); // 3MHz
m_bmcu->aux_strobe_cb().set(FUNC(slapfght_state::scroll_from_mcu_w));
@@ -1062,43 +1062,43 @@ MACHINE_CONFIG_START(slapfght_state::slapfigh)
ay2.port_a_read_callback().set_ioport("DSW1");
ay2.port_b_read_callback().set_ioport("DSW2");
ay2.add_route(ALL_OUTPUTS, "mono", 0.25);
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(slapfght_state::slapfighb1)
+void slapfght_state::slapfighb1(machine_config &config)
+{
slapfigh(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(slapfighb1_map)
- MCFG_DEVICE_IO_MAP(io_map_nomcu)
+ m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::slapfighb1_map);
+ m_maincpu->set_addrmap(AS_IO, &slapfght_state::io_map_nomcu);
config.device_remove("bmcu");
-MACHINE_CONFIG_END
+}
-MACHINE_CONFIG_START(slapfght_state::slapfighb2)
+void slapfght_state::slapfighb2(machine_config &config)
+{
slapfighb1(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(slapfighb2_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::slapfighb2_map);
+}
-MACHINE_CONFIG_START(slapfght_state::getstarb1)
+void slapfght_state::getstarb1(machine_config &config)
+{
slapfighb1(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_IO_MAP(getstarb1_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_IO, &slapfght_state::getstarb1_io_map);
+}
-MACHINE_CONFIG_START(slapfght_state::getstarb2)
+void slapfght_state::getstarb2(machine_config &config)
+{
slapfighb1(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(getstar_map)
- MCFG_DEVICE_IO_MAP(getstarb2_io_map)
-MACHINE_CONFIG_END
+ m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::getstar_map);
+ m_maincpu->set_addrmap(AS_IO, &slapfght_state::getstarb2_io_map);
+}
diff --git a/src/mame/drivers/slc1.cpp b/src/mame/drivers/slc1.cpp
index 9d02c12419c..235bc858446 100644
--- a/src/mame/drivers/slc1.cpp
+++ b/src/mame/drivers/slc1.cpp
@@ -267,20 +267,20 @@ INPUT_PORTS_END
***************************************************************************/
-MACHINE_CONFIG_START(slc1_state::slc1)
+void slc1_state::slc1(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, 2500000)
- MCFG_DEVICE_PROGRAM_MAP(mem_map)
- MCFG_DEVICE_IO_MAP(io_map)
+ Z80(config, m_maincpu, 2500000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &slc1_state::mem_map);
+ m_maincpu->set_addrmap(AS_IO, &slc1_state::io_map);
/* video hardware */
config.set_default_layout(layout_slc1);
/* 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);
+}
/***************************************************************************
diff --git a/src/mame/drivers/sleic.cpp b/src/mame/drivers/sleic.cpp
index 92681d38aba..35775bad8bd 100644
--- a/src/mame/drivers/sleic.cpp
+++ b/src/mame/drivers/sleic.cpp
@@ -67,11 +67,12 @@ void sleic_state::init_sleic()
{
}
-MACHINE_CONFIG_START(sleic_state::sleic)
+void sleic_state::sleic(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", I8088, 8000000)
- MCFG_DEVICE_PROGRAM_MAP(sleic_map)
-MACHINE_CONFIG_END
+ I8088(config, m_maincpu, 8000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sleic_state::sleic_map);
+}
/*-------------------------------------------------------------------
/ Bike Race (1992)
diff --git a/src/mame/drivers/slicer.cpp b/src/mame/drivers/slicer.cpp
index 1a6c9c0c14a..47e5762fdaf 100644
--- a/src/mame/drivers/slicer.cpp
+++ b/src/mame/drivers/slicer.cpp
@@ -98,10 +98,11 @@ static void slicer_floppies(device_slot_interface &device)
device.option_add("8dsdd", FLOPPY_8_DSDD);
}
-MACHINE_CONFIG_START(slicer_state::slicer)
- MCFG_DEVICE_ADD("maincpu", I80186, 16_MHz_XTAL / 2)
- MCFG_DEVICE_PROGRAM_MAP(slicer_map)
- MCFG_DEVICE_IO_MAP(slicer_io)
+void slicer_state::slicer(machine_config &config)
+{
+ i80186_cpu_device &maincpu(I80186(config, "maincpu", 16_MHz_XTAL / 2));
+ maincpu.set_addrmap(AS_PROGRAM, &slicer_state::slicer_map);
+ maincpu.set_addrmap(AS_IO, &slicer_state::slicer_io);
scn2681_device &duart(SCN2681(config, "duart", 3.6864_MHz_XTAL));
duart.irq_cb().set("maincpu", FUNC(i80186_cpu_device::int0_w));
@@ -144,7 +145,7 @@ MACHINE_CONFIG_START(slicer_state::slicer)
m_sasi->set_output_latch(sasi_data_out);
INPUT_BUFFER(config, "sasi_data_in");
INPUT_BUFFER(config, "sasi_ctrl_in");
-MACHINE_CONFIG_END
+}
ROM_START( slicer )
ROM_REGION(0x8001, "bios", 0)
diff --git a/src/mame/drivers/sliver.cpp b/src/mame/drivers/sliver.cpp
index 377798306a6..6b40485c904 100644
--- a/src/mame/drivers/sliver.cpp
+++ b/src/mame/drivers/sliver.cpp
@@ -516,10 +516,12 @@ TIMER_DEVICE_CALLBACK_MEMBER ( sliver_state::obj_irq_cb )
m_maincpu->set_input_line(3, HOLD_LINE);
}
-MACHINE_CONFIG_START(sliver_state::sliver)
- MCFG_DEVICE_ADD("maincpu", M68000, 12000000)
- MCFG_DEVICE_PROGRAM_MAP(sliver_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sliver_state, irq4_line_hold)
+void sliver_state::sliver(machine_config &config)
+{
+ M68000(config, m_maincpu, 12000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sliver_state::sliver_map);
+ m_maincpu->set_vblank_int("screen", FUNC(sliver_state::irq4_line_hold));
+
TIMER(config, "obj_actel").configure_periodic(FUNC(sliver_state::obj_irq_cb), attotime::from_hz(60)); /* unknown clock, causes "obj actel ready error" without this */
// irq 2 valid but not used?
@@ -528,14 +530,14 @@ MACHINE_CONFIG_START(sliver_state::sliver)
m_audiocpu->set_addrmap(AS_IO, &sliver_state::soundmem_io);
m_audiocpu->port_out_cb<1>().set(FUNC(sliver_state::oki_setbank));
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
- MCFG_SCREEN_SIZE(64*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(0*8, 384-1-16, 0*8, 240-1)
- MCFG_SCREEN_UPDATE_DRIVER(sliver_state, screen_update)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(60);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500));
+ m_screen->set_size(64*8, 32*8);
+ m_screen->set_visarea(0*8, 384-1-16, 0*8, 240-1);
+ m_screen->set_screen_update(FUNC(sliver_state::screen_update));
- MCFG_PALETTE_ADD("palette", 0x100)
+ PALETTE(config, "palette").set_entries(0x100);
ramdac_device &ramdac(RAMDAC(config, "ramdac", 0, "palette"));
ramdac.set_addrmap(0, &sliver_state::ramdac_map);
@@ -544,11 +546,11 @@ MACHINE_CONFIG_START(sliver_state::sliver)
GENERIC_LATCH_8(config, m_soundlatch);
- MCFG_DEVICE_ADD("oki", OKIM6295, 1000000, okim6295_device::PIN7_HIGH)
- MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.6)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.6)
-MACHINE_CONFIG_END
+ okim6295_device &oki(OKIM6295(config, "oki", 1000000, okim6295_device::PIN7_HIGH));
+ oki.set_addrmap(0, &sliver_state::oki_map);
+ oki.add_route(ALL_OUTPUTS, "lspeaker", 0.6);
+ oki.add_route(ALL_OUTPUTS, "rspeaker", 0.6);
+}
ROM_START( sliver )
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
diff --git a/src/mame/drivers/slotcarn.cpp b/src/mame/drivers/slotcarn.cpp
index 7b8b171df1d..989ce132421 100644
--- a/src/mame/drivers/slotcarn.cpp
+++ b/src/mame/drivers/slotcarn.cpp
@@ -543,12 +543,12 @@ void slotcarn_state::machine_start()
* Machine Driver *
***********************************/
-MACHINE_CONFIG_START(slotcarn_state::slotcarn)
-
+void slotcarn_state::slotcarn(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK) // 2.5 Mhz?
- MCFG_DEVICE_PROGRAM_MAP(slotcarn_map)
- MCFG_DEVICE_IO_MAP(spielbud_io_map)
+ Z80(config, m_maincpu, CPU_CLOCK); // 2.5 Mhz?
+ m_maincpu->set_addrmap(AS_PROGRAM, &slotcarn_state::slotcarn_map);
+ m_maincpu->set_addrmap(AS_IO, &slotcarn_state::spielbud_io_map);
i8255_device &ppi0(I8255A(config, "ppi8255_0"));
ppi0.in_pa_callback().set_ioport("IN0");
@@ -563,9 +563,9 @@ MACHINE_CONFIG_START(slotcarn_state::slotcarn)
ppi2.in_pb_callback().set_ioport("IN4");
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 512, 0, 512, 256, 0, 256) /* temporary, CRTC will configure screen */
- MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update)
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(PIXEL_CLOCK, 512, 0, 512, 256, 0, 256); /* temporary, CRTC will configure screen */
+ m_screen->set_screen_update("crtc", FUNC(mc6845_device::screen_update));
mc6845_device &crtc(MC6845(config, "crtc", CRTC_CLOCK));
crtc.set_screen(m_screen);
@@ -577,7 +577,7 @@ MACHINE_CONFIG_START(slotcarn_state::slotcarn)
crtc.out_vsync_callback().set_inputline(m_maincpu, 0);
GFXDECODE(config, "gfxdecode", "palette", gfx_slotcarn);
- MCFG_PALETTE_ADD("palette", 0x400)
+ PALETTE(config, "palette").set_entries(0x400);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -585,7 +585,7 @@ MACHINE_CONFIG_START(slotcarn_state::slotcarn)
ay8910_device &aysnd(AY8910(config, "aysnd", SND_CLOCK));
aysnd.port_b_read_callback().set_ioport("DSW2");
aysnd.add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
/******************************
diff --git a/src/mame/drivers/sm1800.cpp b/src/mame/drivers/sm1800.cpp
index 90a03fab9c3..5567f5bbbae 100644
--- a/src/mame/drivers/sm1800.cpp
+++ b/src/mame/drivers/sm1800.cpp
@@ -160,21 +160,22 @@ static GFXDECODE_START( gfx_sm1800 )
GFXDECODE_END
-MACHINE_CONFIG_START(sm1800_state::sm1800)
+void sm1800_state::sm1800(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8080, XTAL(2'000'000))
- MCFG_DEVICE_PROGRAM_MAP(sm1800_mem)
- MCFG_DEVICE_IO_MAP(sm1800_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", sm1800_state, sm1800_vblank_interrupt)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(sm1800_state,sm1800_irq_callback)
+ I8080(config, m_maincpu, XTAL(2'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &sm1800_state::sm1800_mem);
+ m_maincpu->set_addrmap(AS_IO, &sm1800_state::sm1800_io);
+ m_maincpu->set_vblank_int("screen", FUNC(sm1800_state::sm1800_vblank_interrupt));
+ m_maincpu->set_irq_acknowledge_callback(FUNC(sm1800_state::sm1800_irq_callback));
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_UPDATE_DEVICE("i8275", i8275_device, screen_update)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
- MCFG_SCREEN_SIZE(640, 480)
- MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_screen_update("i8275", FUNC(i8275_device::screen_update));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
+ screen.set_size(640, 480);
+ screen.set_visarea(0, 640-1, 0, 480-1);
PALETTE(config, m_palette, FUNC(sm1800_state::sm1800_palette), 3);
GFXDECODE(config, "gfxdecode", m_palette, gfx_sm1800);
@@ -190,8 +191,8 @@ MACHINE_CONFIG_START(sm1800_state::sm1800)
m_crtc->set_character_width(8);
m_crtc->set_display_callback(FUNC(sm1800_state::crtc_display_pixels), this);
- MCFG_DEVICE_ADD("i8251", I8251, 0)
-MACHINE_CONFIG_END
+ I8251(config, m_uart, 0);
+}
/* ROM definition */
ROM_START( sm1800 )
diff --git a/src/mame/drivers/sm7238.cpp b/src/mame/drivers/sm7238.cpp
index 356964f7c9f..4c99418ccf4 100644
--- a/src/mame/drivers/sm7238.cpp
+++ b/src/mame/drivers/sm7238.cpp
@@ -360,21 +360,22 @@ void sm7238_state::sm7238_palette(palette_device &palette) const
palette.set_pen_color(2, 0x00, 0xff, 0x00); // highlight
}
-MACHINE_CONFIG_START(sm7238_state::sm7238)
- MCFG_DEVICE_ADD("maincpu", I8080, 16.5888_MHz_XTAL/9)
- MCFG_DEVICE_PROGRAM_MAP(sm7238_mem)
- MCFG_DEVICE_IO_MAP(sm7238_io)
- MCFG_DEVICE_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb)
+void sm7238_state::sm7238(machine_config &config)
+{
+ I8080(config, m_maincpu, 16.5888_MHz_XTAL/9);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sm7238_state::sm7238_mem);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sm7238_state::sm7238_io);
+ m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
ADDRESS_MAP_BANK(config, "videobank").set_map(&sm7238_state::videobank_map).set_options(ENDIANNESS_LITTLE, 8, 32, 0x2000);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_RAW_PARAMS(20.625_MHz_XTAL, KSM_TOTAL_HORZ, 0, KSM_DISP_HORZ, KSM_TOTAL_VERT, 0, KSM_DISP_VERT);
- MCFG_SCREEN_UPDATE_DRIVER(sm7238_state, screen_update)
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(m_pic8259, pic8259_device, ir2_w))
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_raw(20.625_MHz_XTAL, KSM_TOTAL_HORZ, 0, KSM_DISP_HORZ, KSM_TOTAL_VERT, 0, KSM_DISP_VERT);
+ m_screen->set_screen_update(FUNC(sm7238_state::screen_update));
+ m_screen->screen_vblank().set(m_pic8259, FUNC(pic8259_device::ir2_w));
+ m_screen->set_palette("palette");
PALETTE(config, "palette", FUNC(sm7238_state::sm7238_palette), 3);
GFXDECODE(config, "gfxdecode", "palette", gfx_sm7238);
@@ -427,7 +428,7 @@ MACHINE_CONFIG_START(sm7238_state::sm7238)
prtr.rxd_handler().set(m_i8251prn, FUNC(i8251_device::write_rxd));
prtr.cts_handler().set(m_i8251prn, FUNC(i8251_device::write_cts));
prtr.dsr_handler().set(m_i8251prn, FUNC(i8251_device::write_dsr));
-MACHINE_CONFIG_END
+}
ROM_START( sm7238 )
ROM_REGION(0xa000, "maincpu", ROMREGION_ERASE00)
diff --git a/src/mame/drivers/smc777.cpp b/src/mame/drivers/smc777.cpp
index da0440ad89c..442c694bc6e 100644
--- a/src/mame/drivers/smc777.cpp
+++ b/src/mame/drivers/smc777.cpp
@@ -1110,19 +1110,19 @@ static void smc777_floppies(device_slot_interface &device)
MACHINE_CONFIG_START(smc777_state::smc777)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",Z80, MASTER_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(smc777_mem)
- MCFG_DEVICE_IO_MAP(smc777_io)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", smc777_state, vblank_irq)
+ Z80(config, m_maincpu, MASTER_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &smc777_state::smc777_mem);
+ m_maincpu->set_addrmap(AS_IO, &smc777_state::smc777_io);
+ m_maincpu->set_vblank_int("screen", FUNC(smc777_state::vblank_irq));
/* 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(0x400, 400)
- MCFG_SCREEN_VISIBLE_AREA(0, 660-1, 0, 220-1) //normal 640 x 200 + 20 pixels for border color
- MCFG_SCREEN_UPDATE_DRIVER(smc777_state, screen_update_smc777)
- 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(0x400, 400);
+ m_screen->set_visarea(0, 660-1, 0, 220-1); //normal 640 x 200 + 20 pixels for border color
+ m_screen->set_screen_update(FUNC(smc777_state::screen_update_smc777));
+ m_screen->set_palette(m_palette);
PALETTE(config, m_palette, FUNC(smc777_state::smc777_palette), 0x20); // 16 + 8 colors (SMC-777 + SMC-70) + 8 empty entries (SMC-70)
@@ -1148,8 +1148,7 @@ MACHINE_CONFIG_START(smc777_state::smc777)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("sn1", SN76489A, MASTER_CLOCK) // unknown clock / divider
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
+ SN76489A(config, "sn1", MASTER_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.50); // unknown clock / divider
BEEP(config, m_beeper, 300); // TODO: correct frequency
m_beeper->add_route(ALL_OUTPUTS, "mono", 0.50);
diff --git a/src/mame/drivers/spbactn.cpp b/src/mame/drivers/spbactn.cpp
index d6ba0827234..e231e4e5225 100644
--- a/src/mame/drivers/spbactn.cpp
+++ b/src/mame/drivers/spbactn.cpp
@@ -422,7 +422,7 @@ void spbactn_state::spbactn(machine_config &config)
// actual blanking frequencies unknown, but should be close to NTSC
m_screen->set_raw(XTAL(22'656'000) / 2, 720, 0, 512, 262, 16, 240);
#else
- // MCFG_SCREEN_RAW_PARAMS breaks sprites; keeping this in for now
+ // set_raw breaks sprites; keeping this in for now
m_screen->set_refresh_hz(60);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
m_screen->set_size(64*8, 32*8);