diff options
Diffstat (limited to 'src/mame/drivers/mw8080bw.c')
-rw-r--r-- | src/mame/drivers/mw8080bw.c | 99 |
1 files changed, 45 insertions, 54 deletions
diff --git a/src/mame/drivers/mw8080bw.c b/src/mame/drivers/mw8080bw.c index 7343b8fd116..e4fdd78df28 100644 --- a/src/mame/drivers/mw8080bw.c +++ b/src/mame/drivers/mw8080bw.c @@ -225,8 +225,8 @@ MACHINE_CONFIG_START( mw8080bw_root, mw8080bw_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",I8080,MW8080BW_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_MACHINE_START(mw8080bw) - MCFG_MACHINE_RESET(mw8080bw) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,mw8080bw) + MCFG_MACHINE_RESET_OVERRIDE(mw8080bw_state,mw8080bw) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -881,21 +881,20 @@ static TIMER_CALLBACK( maze_tone_timing_timer_callback ) } -static MACHINE_START( maze ) +MACHINE_START_MEMBER(mw8080bw_state,maze) { - mw8080bw_state *state = machine.driver_data<mw8080bw_state>(); /* create astable timer for IC B1 */ - machine.scheduler().timer_pulse(MAZE_555_B1_PERIOD, FUNC(maze_tone_timing_timer_callback)); + machine().scheduler().timer_pulse(MAZE_555_B1_PERIOD, FUNC(maze_tone_timing_timer_callback)); /* initialize state of Tone Timing FF, IC C1 */ - state->m_maze_tone_timing_state = 0; + m_maze_tone_timing_state = 0; /* setup for save states */ - state->save_item(NAME(state->m_maze_tone_timing_state)); - machine.save().register_postload(save_prepost_delegate(FUNC(maze_update_discrete), &machine)); + save_item(NAME(m_maze_tone_timing_state)); + machine().save().register_postload(save_prepost_delegate(FUNC(maze_update_discrete), &machine())); - MACHINE_START_CALL(mw8080bw); + MACHINE_START_CALL_MEMBER(mw8080bw); } @@ -958,7 +957,7 @@ static MACHINE_CONFIG_DERIVED( maze, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(maze_io_map) - MCFG_MACHINE_START(maze) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,maze) MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(RES_K(270), CAP_U(10))) /* 2.97s */ /* audio hardware */ @@ -974,14 +973,13 @@ MACHINE_CONFIG_END * *************************************/ -static MACHINE_START( boothill ) +MACHINE_START_MEMBER(mw8080bw_state,boothill) { - mw8080bw_state *state = machine.driver_data<mw8080bw_state>(); /* setup for save states */ - state->save_item(NAME(state->m_rev_shift_res)); + save_item(NAME(m_rev_shift_res)); - MACHINE_START_CALL(mw8080bw); + MACHINE_START_CALL_MEMBER(mw8080bw); } @@ -1050,7 +1048,7 @@ static MACHINE_CONFIG_DERIVED( boothill, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(boothill_io_map) - MCFG_MACHINE_START(boothill) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,boothill) MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_MONOSTABLE(RES_K(270), CAP_U(10))) /* 2.97s */ /* add shifter */ @@ -1175,14 +1173,13 @@ MACHINE_CONFIG_END #define DESERTGU_DIP_SW_0_1_SET_2_TAG ("DIPSW01SET2") -static MACHINE_START( desertgu ) +MACHINE_START_MEMBER(mw8080bw_state,desertgu) { - mw8080bw_state *state = machine.driver_data<mw8080bw_state>(); /* setup for save states */ - state->save_item(NAME(state->m_desertgun_controller_select)); + save_item(NAME(m_desertgun_controller_select)); - MACHINE_START_CALL(mw8080bw); + MACHINE_START_CALL_MEMBER(mw8080bw); } @@ -1283,7 +1280,7 @@ static MACHINE_CONFIG_DERIVED( desertgu, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(desertgu_io_map) - MCFG_MACHINE_START(desertgu) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,desertgu) MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) /* add shifter */ @@ -1501,14 +1498,13 @@ MACHINE_CONFIG_END * *************************************/ -static MACHINE_START( gmissile ) +MACHINE_START_MEMBER(mw8080bw_state,gmissile) { - mw8080bw_state *state = machine.driver_data<mw8080bw_state>(); /* setup for save states */ - state->save_item(NAME(state->m_rev_shift_res)); + save_item(NAME(m_rev_shift_res)); - MACHINE_START_CALL(mw8080bw); + MACHINE_START_CALL_MEMBER(mw8080bw); } @@ -1578,7 +1574,7 @@ static MACHINE_CONFIG_DERIVED( gmissile, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(gmissile_io_map) - MCFG_MACHINE_START(gmissile) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,gmissile) MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) /* add shifter */ @@ -1597,14 +1593,13 @@ MACHINE_CONFIG_END * *************************************/ -static MACHINE_START( m4 ) +MACHINE_START_MEMBER(mw8080bw_state,m4) { - mw8080bw_state *state = machine.driver_data<mw8080bw_state>(); /* setup for save states */ - state->save_item(NAME(state->m_rev_shift_res)); + save_item(NAME(m_rev_shift_res)); - MACHINE_START_CALL(mw8080bw); + MACHINE_START_CALL_MEMBER(mw8080bw); } @@ -1672,7 +1667,7 @@ static MACHINE_CONFIG_DERIVED( m4, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(m4_io_map) - MCFG_MACHINE_START(m4) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,m4) MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) /* add shifter */ @@ -1695,14 +1690,13 @@ MACHINE_CONFIG_END #define CLOWNS_CONTROLLER_P2_TAG ("CONTP2") -static MACHINE_START( clowns ) +MACHINE_START_MEMBER(mw8080bw_state,clowns) { - mw8080bw_state *state = machine.driver_data<mw8080bw_state>(); /* setup for save states */ - state->save_item(NAME(state->m_clowns_controller_select)); + save_item(NAME(m_clowns_controller_select)); - MACHINE_START_CALL(mw8080bw); + MACHINE_START_CALL_MEMBER(mw8080bw); } @@ -1841,7 +1835,7 @@ static MACHINE_CONFIG_DERIVED( clowns, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(clowns_io_map) - MCFG_MACHINE_START(clowns) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,clowns) MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) /* add shifter */ @@ -1935,7 +1929,7 @@ static MACHINE_CONFIG_DERIVED( spacwalk, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(spacwalk_io_map) - MCFG_MACHINE_START(clowns) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,clowns) MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) /* add shifter */ @@ -2130,17 +2124,16 @@ static TIMER_DEVICE_CALLBACK( spcenctr_strobe_timer_callback ) } -static MACHINE_START( spcenctr ) +MACHINE_START_MEMBER(mw8080bw_state,spcenctr) { - mw8080bw_state *state = machine.driver_data<mw8080bw_state>(); /* setup for save states */ - state->save_item(NAME(state->m_spcenctr_strobe_state)); - state->save_item(NAME(state->m_spcenctr_trench_width)); - state->save_item(NAME(state->m_spcenctr_trench_center)); - state->save_item(NAME(state->m_spcenctr_trench_slope)); + save_item(NAME(m_spcenctr_strobe_state)); + save_item(NAME(m_spcenctr_trench_width)); + save_item(NAME(m_spcenctr_trench_center)); + save_item(NAME(m_spcenctr_trench_slope)); - MACHINE_START_CALL(mw8080bw); + MACHINE_START_CALL_MEMBER(mw8080bw); } #if 0 @@ -2263,7 +2256,7 @@ static MACHINE_CONFIG_DERIVED( spcenctr, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(spcenctr_io_map) - MCFG_MACHINE_START(spcenctr) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,spcenctr) MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) /* timers */ @@ -2292,14 +2285,13 @@ MACHINE_CONFIG_END *************************************/ -static MACHINE_START( phantom2 ) +MACHINE_START_MEMBER(mw8080bw_state,phantom2) { - mw8080bw_state *state = machine.driver_data<mw8080bw_state>(); /* setup for save states */ - state->save_item(NAME(state->m_phantom2_cloud_counter)); + save_item(NAME(m_phantom2_cloud_counter)); - MACHINE_START_CALL(mw8080bw); + MACHINE_START_CALL_MEMBER(mw8080bw); } @@ -2359,7 +2351,7 @@ static MACHINE_CONFIG_DERIVED( phantom2, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(phantom2_io_map) - MCFG_MACHINE_START(phantom2) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,phantom2) MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) /* video hardware */ @@ -2516,14 +2508,13 @@ MACHINE_CONFIG_END * *************************************/ -static MACHINE_START( invaders ) +MACHINE_START_MEMBER(mw8080bw_state,invaders) { - mw8080bw_state *state = machine.driver_data<mw8080bw_state>(); /* setup for save states */ - state->save_item(NAME(state->m_invaders_flip_screen)); + save_item(NAME(m_invaders_flip_screen)); - MACHINE_START_CALL(mw8080bw); + MACHINE_START_CALL_MEMBER(mw8080bw); } @@ -2709,7 +2700,7 @@ MACHINE_CONFIG_DERIVED( invaders, mw8080bw_root ) /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_IO_MAP(invaders_io_map) - MCFG_MACHINE_START(invaders) + MCFG_MACHINE_START_OVERRIDE(mw8080bw_state,invaders) MCFG_WATCHDOG_TIME_INIT(255 * attotime::from_hz(MW8080BW_60HZ)) /* video hardware */ |