summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/firefox.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/drivers/firefox.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/drivers/firefox.c')
-rw-r--r--src/mame/drivers/firefox.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c
index c77f3040631..0f9a29efcdc 100644
--- a/src/mame/drivers/firefox.c
+++ b/src/mame/drivers/firefox.c
@@ -96,6 +96,8 @@ public:
DECLARE_WRITE8_MEMBER(riot_porta_w);
DECLARE_WRITE_LINE_MEMBER(riot_irq);
TILE_GET_INFO_MEMBER(bgtile_get_info);
+ virtual void machine_start();
+ virtual void video_start();
};
@@ -204,12 +206,11 @@ WRITE8_MEMBER(firefox_state::tileram_w)
}
-static VIDEO_START( firefox )
+void firefox_state::video_start()
{
- firefox_state *state = machine.driver_data<firefox_state>();
- state->m_bgtiles = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(firefox_state::bgtile_get_info),state), TILEMAP_SCAN_ROWS, 8,8, 64,64);
- state->m_bgtiles->set_transparent_pen(0);
- state->m_bgtiles->set_scrolldy(machine.primary_screen->visible_area().min_y, 0);
+ m_bgtiles = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(firefox_state::bgtile_get_info),this), TILEMAP_SCAN_ROWS, 8,8, 64,64);
+ m_bgtiles->set_transparent_pen(0);
+ m_bgtiles->set_scrolldy(machine().primary_screen->visible_area().min_y, 0);
}
@@ -481,17 +482,16 @@ static void firq_gen(running_machine &machine, phillips_22vp931_device &laserdis
}
-static MACHINE_START( firefox )
+void firefox_state::machine_start()
{
- firefox_state *state = machine.driver_data<firefox_state>();
- state->membank("bank1")->configure_entries(0, 32, state->memregion("maincpu")->base() + 0x10000, 0x1000);
- state->m_nvram_1c = machine.device<x2212_device>("nvram_1c");
- state->m_nvram_1d = machine.device<x2212_device>("nvram_1d");
+ membank("bank1")->configure_entries(0, 32, memregion("maincpu")->base() + 0x10000, 0x1000);
+ m_nvram_1c = machine().device<x2212_device>("nvram_1c");
+ m_nvram_1d = machine().device<x2212_device>("nvram_1d");
- state->m_laserdisc->set_data_ready_callback(phillips_22vp931_device::data_ready_delegate(FUNC(firq_gen), &machine));
+ m_laserdisc->set_data_ready_callback(phillips_22vp931_device::data_ready_delegate(FUNC(firq_gen), &machine()));
- state->m_control_num = 0;
- state->m_sprite_bank = 0;
+ m_control_num = 0;
+ m_sprite_bank = 0;
}
@@ -708,14 +708,12 @@ static MACHINE_CONFIG_START( firefox, firefox_state )
MCFG_QUANTUM_TIME(attotime::from_hz(60000))
- MCFG_MACHINE_START(firefox)
MCFG_WATCHDOG_TIME_INIT(attotime::from_hz((double)MASTER_XTAL/8/16/16/16/16))
/* video hardware */
MCFG_GFXDECODE(firefox)
MCFG_PALETTE_LENGTH(512)
- MCFG_VIDEO_START(firefox)
MCFG_LASERDISC_22VP931_ADD("laserdisc")
MCFG_LASERDISC_OVERLAY_STATIC(64*8, 525, firefox)