diff options
Diffstat (limited to 'src/mame/drivers/fuukifg3.cpp')
-rw-r--r-- | src/mame/drivers/fuukifg3.cpp | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/src/mame/drivers/fuukifg3.cpp b/src/mame/drivers/fuukifg3.cpp index 8f0a6ee5e85..3100b376249 100644 --- a/src/mame/drivers/fuukifg3.cpp +++ b/src/mame/drivers/fuukifg3.cpp @@ -529,29 +529,27 @@ void fuuki32_state::machine_reset() m_raster_interrupt_timer->adjust(m_screen->time_until_pos(0, visarea.max_x + 1)); } - -MACHINE_CONFIG_START(fuuki32_state::fuuki32) - +void fuuki32_state::fuuki32(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", M68EC020, CPU_CLOCK) /* 20MHz verified */ - MCFG_DEVICE_PROGRAM_MAP(fuuki32_map) + M68EC020(config, m_maincpu, CPU_CLOCK); /* 20MHz verified */ + m_maincpu->set_addrmap(AS_PROGRAM, &fuuki32_state::fuuki32_map); - MCFG_DEVICE_ADD("soundcpu", Z80, SOUND_CPU_CLOCK) /* 6MHz verified */ - MCFG_DEVICE_PROGRAM_MAP(fuuki32_sound_map) - MCFG_DEVICE_IO_MAP(fuuki32_sound_io_map) + z80_device &soundcpu(Z80(config, "soundcpu", SOUND_CPU_CLOCK)); /* 6MHz verified */ + soundcpu.set_addrmap(AS_PROGRAM, &fuuki32_state::fuuki32_sound_map); + soundcpu.set_addrmap(AS_IO, &fuuki32_state::fuuki32_sound_io_map); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_SIZE(64 * 8, 32 * 8) - MCFG_SCREEN_VISIBLE_AREA(0, 40 * 8 - 1, 0, 30 * 8 - 1) - MCFG_SCREEN_UPDATE_DRIVER(fuuki32_state, screen_update) - MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, fuuki32_state, screen_vblank)) - MCFG_SCREEN_PALETTE("palette") - - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_fuuki32) - MCFG_PALETTE_ADD("palette", 0x4000 / 2) - MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_refresh_hz(60); + m_screen->set_size(64 * 8, 32 * 8); + m_screen->set_visarea(0, 40 * 8 - 1, 0, 30 * 8 - 1); + m_screen->set_screen_update(FUNC(fuuki32_state::screen_update)); + m_screen->screen_vblank().set(FUNC(fuuki32_state::screen_vblank)); + m_screen->set_palette(m_palette); + + GFXDECODE(config, m_gfxdecode, m_palette, gfx_fuuki32); + PALETTE(config, m_palette, 0x4000 / 2).set_format(PALETTE_FORMAT_xRRRRRGGGGGBBBBB); FUUKI_VIDEO(config, m_fuukivid, 0); m_fuukivid->set_gfxdecode_tag(m_gfxdecode); @@ -560,15 +558,15 @@ MACHINE_CONFIG_START(fuuki32_state::fuuki32) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - MCFG_DEVICE_ADD("ymf", YMF278B, YMF278B_STD_CLOCK) // 33.8688MHz - MCFG_YMF278B_IRQ_HANDLER(INPUTLINE("soundcpu", 0)) - MCFG_SOUND_ROUTE(0, "lspeaker", 0.50) - MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) - MCFG_SOUND_ROUTE(2, "lspeaker", 0.40) - MCFG_SOUND_ROUTE(3, "rspeaker", 0.40) - MCFG_SOUND_ROUTE(4, "lspeaker", 0.40) - MCFG_SOUND_ROUTE(5, "rspeaker", 0.40) -MACHINE_CONFIG_END + ymf278b_device &ymf(YMF278B(config, "ymf", YMF278B_STD_CLOCK)); // 33.8688MHz + ymf.irq_handler().set_inputline("soundcpu", 0); + ymf.add_route(0, "lspeaker", 0.50); + ymf.add_route(1, "rspeaker", 0.50); + ymf.add_route(2, "lspeaker", 0.40); + ymf.add_route(3, "rspeaker", 0.40); + ymf.add_route(4, "lspeaker", 0.40); + ymf.add_route(5, "rspeaker", 0.40); +} /*************************************************************************** |