summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/irobot.c
diff options
context:
space:
mode:
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
commit219e664785890f52079bae7e74543920d638796a (patch)
tree774d1ab1e7d87ae4d2c1ef335dcef24a28a7d7e8 /src/mame/machine/irobot.c
parentaf9a5e817d3eefdda79e801056b29167ecbcdef9 (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/machine/irobot.c')
-rw-r--r--src/mame/machine/irobot.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/mame/machine/irobot.c b/src/mame/machine/irobot.c
index f39632a6035..9bb6ce73608 100644
--- a/src/mame/machine/irobot.c
+++ b/src/mame/machine/irobot.c
@@ -167,31 +167,30 @@ static TIMER_CALLBACK( scanline_callback )
machine.scheduler().timer_set(machine.primary_screen->time_until_pos(scanline), FUNC(scanline_callback), scanline);
}
-MACHINE_RESET( irobot )
+void irobot_state::machine_reset()
{
- irobot_state *state = machine.driver_data<irobot_state>();
- UINT8 *MB = state->memregion("mathbox")->base();
+ UINT8 *MB = memregion("mathbox")->base();
/* initialize the memory regions */
- state->m_mbROM = MB + 0x00000;
- state->m_mbRAM = MB + 0x0c000;
- state->m_comRAM[0] = MB + 0x0e000;
- state->m_comRAM[1] = MB + 0x0f000;
+ m_mbROM = MB + 0x00000;
+ m_mbRAM = MB + 0x0c000;
+ m_comRAM[0] = MB + 0x0e000;
+ m_comRAM[1] = MB + 0x0f000;
- state->m_irvg_vblank=0;
- state->m_irvg_running = 0;
- state->m_irvg_timer = machine.device<timer_device>("irvg_timer");
- state->m_irmb_running = 0;
- state->m_irmb_timer = machine.device<timer_device>("irmb_timer");
+ m_irvg_vblank=0;
+ m_irvg_running = 0;
+ m_irvg_timer = machine().device<timer_device>("irvg_timer");
+ m_irmb_running = 0;
+ m_irmb_timer = machine().device<timer_device>("irmb_timer");
/* set an initial timer to go off on scanline 0 */
- machine.scheduler().timer_set(machine.primary_screen->time_until_pos(0), FUNC(scanline_callback));
+ machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), FUNC(scanline_callback));
- state->irobot_rom_banksel_w(*machine.device("maincpu")->memory().space(AS_PROGRAM),0,0);
- state->irobot_out0_w(*machine.device("maincpu")->memory().space(AS_PROGRAM),0,0);
- state->m_combase = state->m_comRAM[0];
- state->m_combase_mb = state->m_comRAM[1];
- state->m_outx = 0;
+ irobot_rom_banksel_w(*machine().device("maincpu")->memory().space(AS_PROGRAM),0,0);
+ irobot_out0_w(*machine().device("maincpu")->memory().space(AS_PROGRAM),0,0);
+ m_combase = m_comRAM[0];
+ m_combase_mb = m_comRAM[1];
+ m_outx = 0;
}
WRITE8_MEMBER(irobot_state::irobot_control_w)