summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/coinmstr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/coinmstr.cpp')
-rw-r--r--src/mame/drivers/coinmstr.cpp71
1 files changed, 35 insertions, 36 deletions
diff --git a/src/mame/drivers/coinmstr.cpp b/src/mame/drivers/coinmstr.cpp
index 5abd1acc21e..69ad7079b9f 100644
--- a/src/mame/drivers/coinmstr.cpp
+++ b/src/mame/drivers/coinmstr.cpp
@@ -1255,11 +1255,10 @@ uint32_t coinmstr_state::screen_update_coinmstr(screen_device &screen, bitmap_in
}
-void coinmstr_state::coinmstr(machine_config &config)
-{
- Z80(config, m_maincpu, CPU_CLOCK); // 7 MHz.
- m_maincpu->set_addrmap(AS_PROGRAM, &coinmstr_state::coinmstr_map);
- m_maincpu->set_vblank_int("screen", FUNC(coinmstr_state::irq0_line_hold));
+MACHINE_CONFIG_START(coinmstr_state::coinmstr)
+ MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK) // 7 MHz.
+ MCFG_DEVICE_PROGRAM_MAP(coinmstr_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", coinmstr_state, irq0_line_hold)
pia6821_device &pia0(PIA6821(config, "pia0", 0));
pia0.readpa_handler().set_ioport("PIA0.A");
@@ -1274,16 +1273,16 @@ void coinmstr_state::coinmstr(machine_config &config)
pia2.readpb_handler().set_ioport("PIA2.B");
/* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(60);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
- screen.set_size(64*8, 64*8);
- screen.set_visarea(0*8, 46*8-1, 0*8, 32*8-1);
- screen.set_screen_update(FUNC(coinmstr_state::screen_update_coinmstr));
- screen.set_palette(m_palette);
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
+ MCFG_SCREEN_SIZE(64*8, 64*8)
+ MCFG_SCREEN_VISIBLE_AREA(0*8, 46*8-1, 0*8, 32*8-1)
+ MCFG_SCREEN_UPDATE_DRIVER(coinmstr_state, screen_update_coinmstr)
+ MCFG_SCREEN_PALETTE("palette")
- GFXDECODE(config, m_gfxdecode, m_palette, gfx_coinmstr);
- PALETTE(config, m_palette).set_entries(46*32*4);
+ MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_coinmstr)
+ MCFG_PALETTE_ADD("palette", 46*32*4)
h46505_device &crtc(H46505(config, "crtc", 14000000 / 16));
crtc.set_screen("screen");
@@ -1296,39 +1295,39 @@ void coinmstr_state::coinmstr(machine_config &config)
ay8910_device &aysnd(AY8910(config, "aysnd", SND_CLOCK));
aysnd.port_a_read_callback().set_ioport("DSW1");
aysnd.add_route(ALL_OUTPUTS, "mono", 0.25);
-}
+MACHINE_CONFIG_END
-void coinmstr_state::quizmstr(machine_config &config)
-{
+MACHINE_CONFIG_START(coinmstr_state::quizmstr)
coinmstr(config);
- m_maincpu->set_addrmap(AS_IO, &coinmstr_state::quizmstr_io_map);
-}
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_IO_MAP(quizmstr_io_map)
+MACHINE_CONFIG_END
-void coinmstr_state::trailblz(machine_config &config)
-{
+MACHINE_CONFIG_START(coinmstr_state::trailblz)
coinmstr(config);
- m_maincpu->set_addrmap(AS_IO, &coinmstr_state::trailblz_io_map);
-}
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_IO_MAP(trailblz_io_map)
+MACHINE_CONFIG_END
-void coinmstr_state::supnudg2(machine_config &config)
-{
+MACHINE_CONFIG_START(coinmstr_state::supnudg2)
coinmstr(config);
- m_maincpu->set_addrmap(AS_IO, &coinmstr_state::supnudg2_io_map);
-}
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_IO_MAP(supnudg2_io_map)
+MACHINE_CONFIG_END
-void coinmstr_state::pokeroul(machine_config &config)
-{
+MACHINE_CONFIG_START(coinmstr_state::pokeroul)
coinmstr(config);
- m_maincpu->set_addrmap(AS_IO, &coinmstr_state::pokeroul_io_map);
-}
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_IO_MAP(pokeroul_io_map)
+MACHINE_CONFIG_END
-void coinmstr_state::jpcoin(machine_config &config)
-{
+MACHINE_CONFIG_START(coinmstr_state::jpcoin)
coinmstr(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &coinmstr_state::jpcoin_map);
- m_maincpu->set_addrmap(AS_IO, &coinmstr_state::jpcoin_io_map);
+ MCFG_DEVICE_MODIFY("maincpu")
+ MCFG_DEVICE_PROGRAM_MAP(jpcoin_map)
+ MCFG_DEVICE_IO_MAP(jpcoin_io_map)
// NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-}
+MACHINE_CONFIG_END
/*