diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2012-09-13 11:15:32 +0000 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2012-09-13 11:15:32 +0000 |
commit | 219e664785890f52079bae7e74543920d638796a (patch) | |
tree | 774d1ab1e7d87ae4d2c1ef335dcef24a28a7d7e8 /src/mame/drivers/gauntlet.c | |
parent | af9a5e817d3eefdda79e801056b29167ecbcdef9 (diff) |
Massive change, MACHINE_START\RESET, VIDEO_START\RESET and PALETTE_INIT changed to be members of state classes (no whatsnew)
Diffstat (limited to 'src/mame/drivers/gauntlet.c')
-rw-r--r-- | src/mame/drivers/gauntlet.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/mame/drivers/gauntlet.c b/src/mame/drivers/gauntlet.c index 2a10c5ff472..597c7e13ec6 100644 --- a/src/mame/drivers/gauntlet.c +++ b/src/mame/drivers/gauntlet.c @@ -155,26 +155,24 @@ static void scanline_update(screen_device &screen, int scanline) } -static MACHINE_START( gauntlet ) +MACHINE_START_MEMBER(gauntlet_state,gauntlet) { - gauntlet_state *state = machine.driver_data<gauntlet_state>(); - atarigen_init(machine); + atarigen_init(machine()); - state->save_item(NAME(state->m_sound_reset_val)); + save_item(NAME(m_sound_reset_val)); } -static MACHINE_RESET( gauntlet ) +MACHINE_RESET_MEMBER(gauntlet_state,gauntlet) { - gauntlet_state *state = machine.driver_data<gauntlet_state>(); - state->m_sound_reset_val = 1; + m_sound_reset_val = 1; - atarigen_eeprom_reset(state); - atarigen_slapstic_reset(state); - atarigen_interrupt_reset(state, update_interrupts); - atarigen_scanline_timer_reset(*machine.primary_screen, scanline_update, 32); - atarigen_sound_io_reset(machine.device("audiocpu")); + atarigen_eeprom_reset(this); + atarigen_slapstic_reset(this); + atarigen_interrupt_reset(this, update_interrupts); + atarigen_scanline_timer_reset(*machine().primary_screen, scanline_update, 32); + atarigen_sound_io_reset(machine().device("audiocpu")); } @@ -521,8 +519,8 @@ static MACHINE_CONFIG_START( gauntlet, gauntlet_state ) MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_MACHINE_START(gauntlet) - MCFG_MACHINE_RESET(gauntlet) + MCFG_MACHINE_START_OVERRIDE(gauntlet_state,gauntlet) + MCFG_MACHINE_RESET_OVERRIDE(gauntlet_state,gauntlet) MCFG_NVRAM_ADD_1FILL("eeprom") /* video hardware */ @@ -536,7 +534,7 @@ static MACHINE_CONFIG_START( gauntlet, gauntlet_state ) MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240) MCFG_SCREEN_UPDATE_STATIC(gauntlet) - MCFG_VIDEO_START(gauntlet) + MCFG_VIDEO_START_OVERRIDE(gauntlet_state,gauntlet) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |