summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/skyfox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/skyfox.cpp')
-rw-r--r--src/mame/drivers/skyfox.cpp36
1 files changed, 17 insertions, 19 deletions
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 */
+}