summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/cave.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/cave.cpp')
-rw-r--r--src/mame/drivers/cave.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp
index c1777ce8237..0fd48df444a 100644
--- a/src/mame/drivers/cave.cpp
+++ b/src/mame/drivers/cave.cpp
@@ -2062,7 +2062,7 @@ GFXDECODE_END
***************************************************************************/
-void cave_state::machine_start_cave()
+MACHINE_START_MEMBER(cave_state,cave)
{
m_vblank_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cave_state::cave_vblank_end), this));
@@ -2077,7 +2077,7 @@ void cave_state::machine_start_cave()
save_item(NAME(m_agallet_vblank_irq));
}
-void cave_state::machine_reset_cave()
+MACHINE_RESET_MEMBER(cave_state,cave)
{
std::fill(std::begin(m_soundbuf_data), std::end(m_soundbuf_data), 0);
m_soundbuf_wptr = 0;
@@ -2101,8 +2101,8 @@ MACHINE_CONFIG_START(cave_state::dfeveron)
MCFG_DEVICE_PROGRAM_MAP(dfeveron_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2119,7 +2119,7 @@ MACHINE_CONFIG_START(cave_state::dfeveron)
MCFG_PALETTE_ADD("palette", 0x8000) /* $8000 palette entries for consistency with the other games */
MCFG_PALETTE_INIT_OWNER(cave_state,dfeveron)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_2_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_2_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2142,8 +2142,8 @@ MACHINE_CONFIG_START(cave_state::ddonpach)
MCFG_DEVICE_PROGRAM_MAP(ddonpach_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2160,7 +2160,7 @@ MACHINE_CONFIG_START(cave_state::ddonpach)
MCFG_PALETTE_ADD("palette", 0x8000 + 0x40*16) // $400 extra entries for layers 1&2
MCFG_PALETTE_INIT_OWNER(cave_state,ddonpach)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2182,8 +2182,8 @@ MACHINE_CONFIG_START(cave_state::donpachi)
MCFG_DEVICE_PROGRAM_MAP(donpachi_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2200,7 +2200,7 @@ MACHINE_CONFIG_START(cave_state::donpachi)
MCFG_PALETTE_ADD("palette", 0x8000) /* $8000 palette entries for consistency with the other games */
MCFG_PALETTE_INIT_OWNER(cave_state,dfeveron)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2229,8 +2229,8 @@ MACHINE_CONFIG_START(cave_state::esprade)
MCFG_DEVICE_PROGRAM_MAP(esprade_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2247,7 +2247,7 @@ MACHINE_CONFIG_START(cave_state::esprade)
MCFG_PALETTE_ADD("palette", 0x8000)
MCFG_PALETTE_INIT_OWNER(cave_state,cave)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2269,8 +2269,8 @@ MACHINE_CONFIG_START(cave_state::gaia)
MCFG_DEVICE_PROGRAM_MAP(gaia_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2288,7 +2288,7 @@ MACHINE_CONFIG_START(cave_state::gaia)
MCFG_PALETTE_ADD("palette", 0x8000)
MCFG_PALETTE_INIT_OWNER(cave_state,cave)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2310,8 +2310,8 @@ MACHINE_CONFIG_START(cave_state::guwange)
MCFG_DEVICE_PROGRAM_MAP(guwange_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2328,7 +2328,7 @@ MACHINE_CONFIG_START(cave_state::guwange)
MCFG_PALETTE_ADD("palette", 0x8000)
MCFG_PALETTE_INIT_OWNER(cave_state,cave)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2353,8 +2353,8 @@ MACHINE_CONFIG_START(cave_state::hotdogst)
MCFG_DEVICE_PROGRAM_MAP(hotdogst_sound_map)
MCFG_DEVICE_IO_MAP(hotdogst_sound_portmap)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2371,7 +2371,7 @@ MACHINE_CONFIG_START(cave_state::hotdogst)
MCFG_PALETTE_ADD("palette", 0x8000) /* $8000 palette entries for consistency with the other games */
MCFG_PALETTE_INIT_OWNER(cave_state,dfeveron)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2403,8 +2403,8 @@ MACHINE_CONFIG_START(cave_state::korokoro)
MCFG_DEVICE_PROGRAM_MAP(korokoro_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_8BIT_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2421,7 +2421,7 @@ MACHINE_CONFIG_START(cave_state::korokoro)
MCFG_PALETTE_ADD("palette", 0x8000) /* $8000 palette entries for consistency with the other games */
MCFG_PALETTE_INIT_OWNER(cave_state,korokoro)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2456,8 +2456,8 @@ MACHINE_CONFIG_START(cave_state::mazinger)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2474,7 +2474,7 @@ MACHINE_CONFIG_START(cave_state::mazinger)
MCFG_PALETTE_ADD("palette", 0x8000) /* $8000 palette entries for consistency with the other games */
MCFG_PALETTE_INIT_OWNER(cave_state,mazinger)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_2_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_2_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2513,8 +2513,8 @@ MACHINE_CONFIG_START(cave_state::metmqstr)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this)); /* start with the watchdog armed */
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) /* start with the watchdog armed */
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2531,7 +2531,7 @@ MACHINE_CONFIG_START(cave_state::metmqstr)
MCFG_PALETTE_ADD("palette", 0x8000) /* $8000 palette entries for consistency with the other games */
MCFG_PALETTE_INIT_OWNER(cave_state,dfeveron)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2569,8 +2569,8 @@ MACHINE_CONFIG_START(cave_state::pacslot)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_EEPROM_SERIAL_ENABLE_STREAMING()
@@ -2589,7 +2589,7 @@ MACHINE_CONFIG_START(cave_state::pacslot)
MCFG_PALETTE_ADD("palette", 0x8000)
MCFG_PALETTE_INIT_OWNER(cave_state,cave)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -2629,8 +2629,8 @@ MACHINE_CONFIG_START(cave_state::ppsatan)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(1)) /* a guess, and certainly wrong */
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_lev2", cave_state, timer_lev2_cb, attotime::from_hz(60))
@@ -2665,7 +2665,7 @@ MACHINE_CONFIG_START(cave_state::ppsatan)
MCFG_PALETTE_INIT_OWNER(cave_state,ppsatan)
MCFG_DEFAULT_LAYOUT(layout_ppsatan)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -2694,8 +2694,8 @@ MACHINE_CONFIG_START(cave_state::pwrinst2)
MCFG_DEVICE_PROGRAM_MAP(pwrinst2_sound_map)
MCFG_DEVICE_IO_MAP(pwrinst2_sound_portmap)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2712,7 +2712,7 @@ MACHINE_CONFIG_START(cave_state::pwrinst2)
MCFG_PALETTE_ADD("palette", 0x8000+0x2800)
MCFG_PALETTE_INIT_OWNER(cave_state,pwrinst2)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_4_layers, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_4_layers)
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2748,11 +2748,11 @@ TIMER_DEVICE_CALLBACK_MEMBER( cave_state::sailormn_startup )
m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
-void cave_state::machine_reset_sailormn()
+MACHINE_RESET_MEMBER(cave_state,sailormn)
{
timer_device *startup = machine().device<timer_device>("startup");
startup->adjust(attotime::from_usec(1000), 0, attotime::zero);
- machine_reset_cave();
+ MACHINE_RESET_CALL_MEMBER(cave);
}
MACHINE_CONFIG_START(cave_state::sailormn)
@@ -2771,8 +2771,8 @@ MACHINE_CONFIG_START(cave_state::sailormn)
// MCFG_QUANTUM_TIME(attotime::from_hz(600))
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_sailormn, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,sailormn)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2789,7 +2789,7 @@ MACHINE_CONFIG_START(cave_state::sailormn)
MCFG_PALETTE_ADD("palette", 0x8000) /* $8000 palette entries for consistency with the other games */
MCFG_PALETTE_INIT_OWNER(cave_state,sailormn) // 4 bit sprites, 6 bit tiles
- set_video_start_cb(config, driver_callback_delegate(&video_start_sailormn_3_layers, this)); /* Layer 2 has 1 banked ROM */
+ MCFG_VIDEO_START_OVERRIDE(cave_state,sailormn_3_layers) /* Layer 2 has 1 banked ROM */
/* sound hardware */
SPEAKER(config, "mono").front_center();
@@ -2829,8 +2829,8 @@ MACHINE_CONFIG_START(cave_state::tekkencw)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_EEPROM_SERIAL_ENABLE_STREAMING()
@@ -2849,7 +2849,7 @@ MACHINE_CONFIG_START(cave_state::tekkencw)
MCFG_PALETTE_ADD("palette", 0x8000)
MCFG_PALETTE_INIT_OWNER(cave_state,cave)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -2885,8 +2885,8 @@ MACHINE_CONFIG_START(cave_state::tjumpman)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
- set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
+ MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_EEPROM_SERIAL_ENABLE_STREAMING()
@@ -2905,7 +2905,7 @@ MACHINE_CONFIG_START(cave_state::tjumpman)
MCFG_PALETTE_ADD("palette", 0x8000)
MCFG_PALETTE_INIT_OWNER(cave_state,cave)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer)
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();
@@ -2930,7 +2930,7 @@ MACHINE_CONFIG_START(cave_state::uopoko)
MCFG_DEVICE_PROGRAM_MAP(uopoko_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
- set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this));
+ MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@@ -2947,7 +2947,7 @@ MACHINE_CONFIG_START(cave_state::uopoko)
MCFG_PALETTE_ADD("palette", 0x8000)
MCFG_PALETTE_INIT_OWNER(cave_state,cave)
- set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this));
+ MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer)
/* sound hardware */
SPEAKER(config, "mono").front_center();