summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/tatsumi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/tatsumi.cpp')
-rw-r--r--src/mame/drivers/tatsumi.cpp123
1 files changed, 62 insertions, 61 deletions
diff --git a/src/mame/drivers/tatsumi.cpp b/src/mame/drivers/tatsumi.cpp
index 51aa5849fda..55d45161738 100644
--- a/src/mame/drivers/tatsumi.cpp
+++ b/src/mame/drivers/tatsumi.cpp
@@ -864,25 +864,25 @@ MACHINE_RESET_MEMBER(apache3_state,apache3)
}
-void apache3_state::apache3(machine_config &config)
-{
+MACHINE_CONFIG_START(apache3_state::apache3)
+
/* basic machine hardware */
- V30(config, m_maincpu, CLOCK_1 / 2);
- m_maincpu->set_addrmap(AS_PROGRAM, &apache3_state::apache3_v30_map);
- m_maincpu->set_vblank_int("screen", FUNC(tatsumi_state::v30_interrupt));
+ MCFG_DEVICE_ADD("maincpu", V30, CLOCK_1 / 2)
+ MCFG_DEVICE_PROGRAM_MAP(apache3_v30_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tatsumi_state, v30_interrupt)
- M68000(config, m_subcpu, CLOCK_2 / 4);
- m_subcpu->set_addrmap(AS_PROGRAM, &apache3_state::apache3_68000_map);
- m_subcpu->set_vblank_int("screen", FUNC(apache3_state::irq4_line_hold));
+ MCFG_DEVICE_ADD("sub", M68000, CLOCK_2 / 4)
+ MCFG_DEVICE_PROGRAM_MAP(apache3_68000_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", apache3_state, irq4_line_hold)
- V20(config, m_audiocpu, CLOCK_1 / 2);
- m_audiocpu->set_addrmap(AS_PROGRAM, &apache3_state::apache3_v20_map);
+ MCFG_DEVICE_ADD("audiocpu", V20, CLOCK_1 / 2)
+ MCFG_DEVICE_PROGRAM_MAP(apache3_v20_map)
- Z80(config, m_subcpu2, CLOCK_2 / 8);
- m_subcpu2->set_addrmap(AS_PROGRAM, &apache3_state::apache3_z80_map);
- m_subcpu2->set_vblank_int("screen", FUNC(apache3_state::irq0_line_hold));
+ MCFG_DEVICE_ADD("sub2", Z80, CLOCK_2 / 8)
+ MCFG_DEVICE_PROGRAM_MAP(apache3_z80_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", apache3_state, irq0_line_hold)
- config.m_minimum_quantum = attotime::from_hz(6000);
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
MCFG_MACHINE_RESET_OVERRIDE(apache3_state, apache3)
@@ -898,9 +898,9 @@ void apache3_state::apache3(machine_config &config)
I8255(config, "ppi");
/* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_raw(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240); // TODO: Hook up CRTC
- screen.set_screen_update(FUNC(apache3_state::screen_update_apache3));
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_RAW_PARAMS(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240) // TODO: Hook up CRTC
+ MCFG_SCREEN_UPDATE_DRIVER(apache3_state, screen_update_apache3)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_apache3);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024 + 4096); // 1024 real colours, and 4096 arranged as series of CLUTs
@@ -924,25 +924,25 @@ void apache3_state::apache3(machine_config &config)
m_ym2151->add_route(0, "lspeaker", 0.45);
m_ym2151->add_route(1, "rspeaker", 0.45);
- OKIM6295(config, m_oki, CLOCK_1 / 4 / 2, okim6295_device::PIN7_HIGH);
- m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.75);
- m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.75);
-}
+ MCFG_DEVICE_ADD("oki", OKIM6295, CLOCK_1 / 4 / 2, okim6295_device::PIN7_HIGH)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
+MACHINE_CONFIG_END
+
+MACHINE_CONFIG_START(roundup5_state::roundup5)
-void roundup5_state::roundup5(machine_config &config)
-{
/* basic machine hardware */
- V30(config, m_maincpu, CLOCK_1 / 2);
- m_maincpu->set_addrmap(AS_PROGRAM, &roundup5_state::roundup5_v30_map);
- m_maincpu->set_vblank_int("screen", FUNC(tatsumi_state::v30_interrupt));
+ MCFG_DEVICE_ADD("maincpu", V30, CLOCK_1 / 2)
+ MCFG_DEVICE_PROGRAM_MAP(roundup5_v30_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tatsumi_state, v30_interrupt)
- M68000(config, m_subcpu, CLOCK_2 / 4);
- m_subcpu->set_addrmap(AS_PROGRAM, &roundup5_state::roundup5_68000_map);
+ MCFG_DEVICE_ADD("sub", M68000, CLOCK_2 / 4)
+ MCFG_DEVICE_PROGRAM_MAP(roundup5_68000_map)
- Z80(config, m_audiocpu, CLOCK_1 / 4);
- m_audiocpu->set_addrmap(AS_PROGRAM, &roundup5_state::roundup5_z80_map);
+ MCFG_DEVICE_ADD("audiocpu", Z80, CLOCK_1 / 4)
+ MCFG_DEVICE_PROGRAM_MAP(roundup5_z80_map)
- config.m_minimum_quantum = attotime::from_hz(6000);
+ MCFG_QUANTUM_TIME(attotime::from_hz(6000))
i8255_device &ppi(I8255(config, "ppi"));
ppi.in_pa_callback().set_ioport("IN0");
@@ -950,9 +950,9 @@ void roundup5_state::roundup5(machine_config &config)
ppi.out_pc_callback().set(FUNC(roundup5_state::output_w));
/* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_raw(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240); // TODO: Hook up CRTC
- screen.set_screen_update(FUNC(roundup5_state::screen_update_roundup5));
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_RAW_PARAMS(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240) // TODO: Hook up CRTC
+ MCFG_SCREEN_UPDATE_DRIVER(roundup5_state, screen_update_roundup5)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_roundup5);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 1024 + 4096); // 1024 real colours, and 4096 arranged as series of CLUTs
@@ -969,10 +969,10 @@ void roundup5_state::roundup5(machine_config &config)
m_ym2151->add_route(0, "lspeaker", 0.45);
m_ym2151->add_route(1, "rspeaker", 0.45);
- OKIM6295(config, m_oki, CLOCK_1 / 4 / 2, okim6295_device::PIN7_HIGH);
- m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.75);
- m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.75);
-}
+ MCFG_DEVICE_ADD("oki", OKIM6295, CLOCK_1 / 4 / 2, okim6295_device::PIN7_HIGH)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
+MACHINE_CONFIG_END
void cyclwarr_state::machine_reset()
{
@@ -1000,22 +1000,22 @@ void cyclwarr_state::machine_reset()
m_road_color_bank = m_prev_road_bank = 0;
}
-void cyclwarr_state::cyclwarr(machine_config &config)
-{
+MACHINE_CONFIG_START(cyclwarr_state::cyclwarr)
+
/* basic machine hardware */
- M68000(config, m_maincpu, CLOCK_2 / 4);
- m_maincpu->set_addrmap(AS_PROGRAM, &cyclwarr_state::master_map);
- m_maincpu->set_vblank_int("screen", FUNC(cyclwarr_state::irq5_line_hold));
+ MCFG_DEVICE_ADD("maincpu", M68000, CLOCK_2 / 4)
+ MCFG_DEVICE_PROGRAM_MAP(master_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cyclwarr_state, irq5_line_hold)
- M68000(config, m_subcpu, CLOCK_2 / 4);
- m_subcpu->set_addrmap(AS_PROGRAM, &cyclwarr_state::slave_map);
- m_subcpu->set_vblank_int("screen", FUNC(cyclwarr_state::irq5_line_hold));
+ MCFG_DEVICE_ADD("sub", M68000, CLOCK_2 / 4)
+ MCFG_DEVICE_PROGRAM_MAP(slave_map)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cyclwarr_state, irq5_line_hold)
- Z80(config, m_audiocpu, CLOCK_1 / 4);
- m_audiocpu->set_addrmap(AS_PROGRAM, &cyclwarr_state::sound_map);
+ MCFG_DEVICE_ADD("audiocpu", Z80, CLOCK_1 / 4)
+ MCFG_DEVICE_PROGRAM_MAP(sound_map)
// saner sync value (avoids crashing after crediting)
- config.m_minimum_quantum = attotime::from_hz(CLOCK_2 / 1024);
+ MCFG_QUANTUM_TIME(attotime::from_hz(CLOCK_2 / 1024))
cxd1095_device &io1(CXD1095(config, "io1", 0));
io1.in_portb_cb().set_ioport("SERVICE");
@@ -1031,9 +1031,9 @@ void cyclwarr_state::cyclwarr(machine_config &config)
io2.out_porte_cb().set(FUNC(cyclwarr_state::cyclwarr_control_w));
/* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_raw(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240); // TODO: Hook up CRTC
- screen.set_screen_update(FUNC(cyclwarr_state::screen_update_cyclwarr));
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_RAW_PARAMS(CLOCK_2 / 8, 400, 0, 320, 272, 0, 240) // TODO: Hook up CRTC
+ MCFG_SCREEN_UPDATE_DRIVER(cyclwarr_state, screen_update_cyclwarr)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cyclwarr);
PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 8192 + 8192);
@@ -1052,24 +1052,25 @@ void cyclwarr_state::cyclwarr(machine_config &config)
m_ym2151->add_route(0, "lspeaker", 0.45);
m_ym2151->add_route(1, "rspeaker", 0.45);
- OKIM6295(config, m_oki, CLOCK_1 / 8, okim6295_device::PIN7_HIGH);
- m_oki->add_route(ALL_OUTPUTS, "lspeaker", 0.75);
- m_oki->add_route(ALL_OUTPUTS, "rspeaker", 0.75);
-}
+ MCFG_DEVICE_ADD("oki", OKIM6295, CLOCK_1 / 8, okim6295_device::PIN7_HIGH)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
+MACHINE_CONFIG_END
-void cyclwarr_state::bigfight(machine_config &config)
-{
+MACHINE_CONFIG_START(cyclwarr_state::bigfight)
cyclwarr(config);
// TODO: it's same video HW, we don't know how/where video registers are mapped
-// subdevice<screen_device>("screen")->set_screen_update(FUNC(cyclwarr_state::screen_update_bigfight));
+// MCFG_SCREEN_MODIFY("screen")
+// MCFG_SCREEN_UPDATE_DRIVER(cyclwarr_state, screen_update_bigfight)
MCFG_VIDEO_START_OVERRIDE(cyclwarr_state, bigfight)
/* sound hardware */
// TODO: 2MHz was too fast. Can the clock be software controlled?
- m_oki->set_clock(CLOCK_1 / 8 / 2);
-}
+ MCFG_DEVICE_MODIFY("oki")
+ MCFG_DEVICE_CLOCK(CLOCK_1 / 8 / 2)
+MACHINE_CONFIG_END
/***************************************************************************/