diff options
Diffstat (limited to 'src/mame/drivers/egghunt.cpp')
-rw-r--r-- | src/mame/drivers/egghunt.cpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/mame/drivers/egghunt.cpp b/src/mame/drivers/egghunt.cpp index 29d48c6fe2e..41f67502fcb 100644 --- a/src/mame/drivers/egghunt.cpp +++ b/src/mame/drivers/egghunt.cpp @@ -428,28 +428,28 @@ void egghunt_state::machine_reset() m_vidram_bank = 0; } -void egghunt_state::egghunt(machine_config &config) -{ +MACHINE_CONFIG_START(egghunt_state::egghunt) + /* basic machine hardware */ - Z80(config, m_maincpu, 12000000/2); /* 6 MHz ?*/ - m_maincpu->set_addrmap(AS_PROGRAM, &egghunt_state::egghunt_map); - m_maincpu->set_addrmap(AS_IO, &egghunt_state::io_map); - m_maincpu->set_vblank_int("screen", FUNC(egghunt_state::irq0_line_hold)); // or 2 like mitchell.cpp? + MCFG_DEVICE_ADD("maincpu", Z80,12000000/2) /* 6 MHz ?*/ + MCFG_DEVICE_PROGRAM_MAP(egghunt_map) + MCFG_DEVICE_IO_MAP(io_map) + MCFG_DEVICE_VBLANK_INT_DRIVER("screen", egghunt_state, irq0_line_hold) // or 2 like mitchell.c? - Z80(config, m_audiocpu, 12000000/2); /* 6 MHz ?*/ - m_audiocpu->set_addrmap(AS_PROGRAM, &egghunt_state::sound_map); + MCFG_DEVICE_ADD("audiocpu", Z80,12000000/2) /* 6 MHz ?*/ + MCFG_DEVICE_PROGRAM_MAP(sound_map) /* 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, 32*8); - screen.set_visarea(8*8, 56*8-1, 1*8, 31*8-1); - screen.set_screen_update(FUNC(egghunt_state::screen_update_egghunt)); - 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, 32*8) + MCFG_SCREEN_VISIBLE_AREA(8*8, 56*8-1, 1*8, 31*8-1) + MCFG_SCREEN_UPDATE_DRIVER(egghunt_state, screen_update_egghunt) + MCFG_SCREEN_PALETTE(m_palette) - GFXDECODE(config, m_gfxdecode, m_palette, gfx_egghunt); + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_egghunt) PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 0x400); @@ -458,8 +458,9 @@ void egghunt_state::egghunt(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); - OKIM6295(config, m_oki, 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified -} + 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 ROM_START( egghunt ) ROM_REGION( 0x20000, "maincpu", 0 ) |