diff options
Diffstat (limited to 'src/mame/drivers/lsasquad.cpp')
-rw-r--r-- | src/mame/drivers/lsasquad.cpp | 92 |
1 files changed, 47 insertions, 45 deletions
diff --git a/src/mame/drivers/lsasquad.cpp b/src/mame/drivers/lsasquad.cpp index 08436c78a2d..b75ad9fb27e 100644 --- a/src/mame/drivers/lsasquad.cpp +++ b/src/mame/drivers/lsasquad.cpp @@ -555,20 +555,20 @@ MACHINE_RESET_MEMBER(lsasquad_state,lsasquad) } /* Note: lsasquad clock values are not verified */ -void lsasquad_state::lsasquad(machine_config &config) -{ +MACHINE_CONFIG_START(lsasquad_state::lsasquad) + /* basic machine hardware */ - Z80(config, m_maincpu, MASTER_CLOCK / 4); - m_maincpu->set_addrmap(AS_PROGRAM, &lsasquad_state::lsasquad_map); - m_maincpu->set_vblank_int("screen", FUNC(lsasquad_state::irq0_line_hold)); + MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK / 4) + MCFG_DEVICE_PROGRAM_MAP(lsasquad_map) + MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lsasquad_state, irq0_line_hold) - Z80(config, m_audiocpu, MASTER_CLOCK / 8); - m_audiocpu->set_addrmap(AS_PROGRAM, &lsasquad_state::lsasquad_sound_map); + MCFG_DEVICE_ADD("audiocpu", Z80, MASTER_CLOCK / 8) + MCFG_DEVICE_PROGRAM_MAP(lsasquad_sound_map) /* IRQs are triggered by the YM2203 */ - TAITO68705_MCU(config, m_bmcu, MASTER_CLOCK / 8); + MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, MASTER_CLOCK / 8) - config.m_minimum_quantum = attotime::from_hz(30000); /* 500 CPU slices per frame - a high value to ensure proper */ + MCFG_QUANTUM_TIME(attotime::from_hz(30000)) /* 500 CPU slices per frame - an high value to ensure proper */ /* synchronization of the CPUs */ /* main<->sound synchronization depends on this */ @@ -578,20 +578,21 @@ void lsasquad_state::lsasquad(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>)); - INPUT_MERGER_ALL_HIGH(config, "soundnmi").output_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); + MCFG_INPUT_MERGER_ALL_HIGH("soundnmi") + MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI)) GENERIC_LATCH_8(config, m_soundlatch2); /* 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(32*8, 32*8); - screen.set_visarea(0, 32*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(lsasquad_state::screen_update_lsasquad)); - screen.set_palette(m_palette); - - GFXDECODE(config, m_gfxdecode, m_palette, gfx_lsasquad); + 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, 32*8-1, 2*8, 30*8-1) + MCFG_SCREEN_UPDATE_DRIVER(lsasquad_state, screen_update_lsasquad) + MCFG_SCREEN_PALETTE(m_palette) + + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_lsasquad) PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512); /* sound hardware */ @@ -607,33 +608,33 @@ void lsasquad_state::lsasquad(machine_config &config) ymsnd.add_route(1, "mono", 0.12); ymsnd.add_route(2, "mono", 0.12); ymsnd.add_route(3, "mono", 0.63); -} +MACHINE_CONFIG_END -void lsasquad_state::storming(machine_config &config) -{ +MACHINE_CONFIG_START(lsasquad_state::storming) lsasquad(config); - m_maincpu->set_addrmap(AS_PROGRAM, &lsasquad_state::storming_map); + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(storming_map) - config.device_remove("bmcu"); + MCFG_DEVICE_REMOVE("bmcu") AY8910(config.replace(), "aysnd", MASTER_CLOCK / 8).add_route(ALL_OUTPUTS, "mono", 0.12); // AY-3-8910A -} +MACHINE_CONFIG_END + +MACHINE_CONFIG_START(lsasquad_state::daikaiju) -void lsasquad_state::daikaiju(machine_config &config) -{ /* basic machine hardware */ - Z80(config, m_maincpu, MASTER_CLOCK / 4); - m_maincpu->set_addrmap(AS_PROGRAM, &lsasquad_state::daikaiju_map); - m_maincpu->set_vblank_int("screen", FUNC(lsasquad_state::irq0_line_hold)); + MCFG_DEVICE_ADD("maincpu", Z80, MASTER_CLOCK / 4) + MCFG_DEVICE_PROGRAM_MAP(daikaiju_map) + MCFG_DEVICE_VBLANK_INT_DRIVER("screen", lsasquad_state, irq0_line_hold) - Z80(config, m_audiocpu, MASTER_CLOCK / 8); - m_audiocpu->set_addrmap(AS_PROGRAM, &lsasquad_state::daikaiju_sound_map); + MCFG_DEVICE_ADD("audiocpu", Z80, MASTER_CLOCK / 8) + MCFG_DEVICE_PROGRAM_MAP(daikaiju_sound_map) /* IRQs are triggered by the YM2203 */ - TAITO68705_MCU(config, m_bmcu, MASTER_CLOCK / 8); + MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU, MASTER_CLOCK / 8) - config.m_minimum_quantum = attotime::from_hz(30000); /* 500 CPU slices per frame - a high value to ensure proper */ + MCFG_QUANTUM_TIME(attotime::from_hz(30000)) /* 500 CPU slices per frame - an high value to ensure proper */ /* synchronization of the CPUs */ /* main<->sound synchronization depends on this */ @@ -643,18 +644,19 @@ void lsasquad_state::daikaiju(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>)); - INPUT_MERGER_ALL_HIGH(config, "soundnmi").output_handler().set_inputline(m_audiocpu, INPUT_LINE_NMI); + MCFG_INPUT_MERGER_ALL_HIGH("soundnmi") + MCFG_INPUT_MERGER_OUTPUT_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI)) /* 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(32*8, 32*8); - screen.set_visarea(0, 32*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(lsasquad_state::screen_update_daikaiju)); - screen.set_palette(m_palette); - - GFXDECODE(config, m_gfxdecode, m_palette, gfx_lsasquad); + 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, 32*8-1, 2*8, 30*8-1) + MCFG_SCREEN_UPDATE_DRIVER(lsasquad_state, screen_update_daikaiju) + MCFG_SCREEN_PALETTE(m_palette) + + MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_lsasquad) PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 512); /* sound hardware */ @@ -670,7 +672,7 @@ void lsasquad_state::daikaiju(machine_config &config) ymsnd.add_route(1, "mono", 0.12); ymsnd.add_route(2, "mono", 0.12); ymsnd.add_route(3, "mono", 0.63); -} +MACHINE_CONFIG_END /*************************************************************************** |