diff options
author | MooglyGuy <therealmogminer@gmail.com> | 2018-05-16 09:37:54 +0200 |
---|---|---|
committer | mooglyguy <therealmogminer@gmail.com> | 2018-05-16 11:58:08 +0200 |
commit | c83e2a853d4e1643fcc85b68ada3c6f7f33adea4 (patch) | |
tree | 39b249e1a0a9b2056e9815d0a284fd483338362c /src/mame/drivers/cave.cpp | |
parent | 2242ff00893a83a113150609bd525f098d632e8d (diff) |
- Removed MACHINE/SOUND/VIDEO _START/_RESET macros. This has the side effect of making machine-config overrides of these much
uglier, but this is intended to discourage ongoing use, and will be gradually eliminated.
Diffstat (limited to 'src/mame/drivers/cave.cpp')
-rw-r--r-- | src/mame/drivers/cave.cpp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp index 0fd48df444a..c1777ce8237 100644 --- a/src/mame/drivers/cave.cpp +++ b/src/mame/drivers/cave.cpp @@ -2062,7 +2062,7 @@ GFXDECODE_END ***************************************************************************/ -MACHINE_START_MEMBER(cave_state,cave) +void cave_state::machine_start_cave() { m_vblank_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cave_state::cave_vblank_end), this)); @@ -2077,7 +2077,7 @@ MACHINE_START_MEMBER(cave_state,cave) save_item(NAME(m_agallet_vblank_irq)); } -MACHINE_RESET_MEMBER(cave_state,cave) +void cave_state::machine_reset_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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_2_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_2_layers, this)); /* 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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this)); /* 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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this)); /* 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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this)); /* 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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this)); /* 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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this)); /* 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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this)); /* 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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this)); /* 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 */ - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_2_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_2_layers, this)); /* 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 */ - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) /* start with the watchdog armed */ + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this)); /* 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 */ - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this)); /* 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 */ - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_3_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_3_layers, this)); /* 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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_4_layers) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_4_layers, this)); /* 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); } -MACHINE_RESET_MEMBER(cave_state,sailormn) +void cave_state::machine_reset_sailormn() { timer_device *startup = machine().device<timer_device>("startup"); startup->adjust(attotime::from_usec(1000), 0, attotime::zero); - MACHINE_RESET_CALL_MEMBER(cave); + machine_reset_cave(); } MACHINE_CONFIG_START(cave_state::sailormn) @@ -2771,8 +2771,8 @@ MACHINE_CONFIG_START(cave_state::sailormn) // MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,sailormn) + 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_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 - MCFG_VIDEO_START_OVERRIDE(cave_state,sailormn_3_layers) /* Layer 2 has 1 banked ROM */ + set_video_start_cb(config, driver_callback_delegate(&video_start_sailormn_3_layers, this)); /* 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 */ - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this)); /* 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 */ - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) - MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) + 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_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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this)); /* 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) - MCFG_MACHINE_START_OVERRIDE(cave_state,cave) + set_machine_start_cb(config, driver_callback_delegate(&machine_start_cave, this)); 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) - MCFG_VIDEO_START_OVERRIDE(cave_state,cave_1_layer) + set_video_start_cb(config, driver_callback_delegate(&video_start_cave_1_layer, this)); /* sound hardware */ SPEAKER(config, "mono").front_center(); |