diff options
Diffstat (limited to 'src/mame/drivers/quizpun2.c')
-rw-r--r-- | src/mame/drivers/quizpun2.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/mame/drivers/quizpun2.c b/src/mame/drivers/quizpun2.c index 38bfebfcf10..6d0ce580939 100644 --- a/src/mame/drivers/quizpun2.c +++ b/src/mame/drivers/quizpun2.c @@ -110,6 +110,8 @@ public: DECLARE_WRITE8_MEMBER(quizpun2_soundlatch_w); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); + virtual void machine_reset(); + virtual void video_start(); }; @@ -144,14 +146,13 @@ WRITE8_MEMBER(quizpun2_state::fg_ram_w) m_fg_tmap->mark_tile_dirty(offset/4); } -static VIDEO_START(quizpun2) +void quizpun2_state::video_start() { - quizpun2_state *state = machine.driver_data<quizpun2_state>(); - state->m_bg_tmap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(quizpun2_state::get_bg_tile_info),state), TILEMAP_SCAN_ROWS,8,16,0x20,0x20); - state->m_fg_tmap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(quizpun2_state::get_fg_tile_info),state), TILEMAP_SCAN_ROWS,8,16,0x20,0x20); + m_bg_tmap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(quizpun2_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS,8,16,0x20,0x20); + m_fg_tmap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(quizpun2_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS,8,16,0x20,0x20); - state->m_bg_tmap->set_transparent_pen(0); - state->m_fg_tmap->set_transparent_pen(0); + m_bg_tmap->set_transparent_pen(0); + m_fg_tmap->set_transparent_pen(0); } static SCREEN_UPDATE_IND16(quizpun2) @@ -189,10 +190,9 @@ bitmap.fill(get_black_pen(screen.machine()), cliprect); ***************************************************************************/ -static MACHINE_RESET( quizpun2 ) +void quizpun2_state::machine_reset() { - quizpun2_state *state = machine.driver_data<quizpun2_state>(); - struct prot_t &prot = state->m_prot; + struct prot_t &prot = m_prot; prot.state = STATE_IDLE; prot.wait_param = 0; prot.param = 0; @@ -496,7 +496,6 @@ static MACHINE_CONFIG_START( quizpun2, quizpun2_state ) MCFG_CPU_VBLANK_INT("screen", irq0_line_hold) // NMI generated by main CPU - MCFG_MACHINE_RESET( quizpun2 ) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -509,7 +508,6 @@ static MACHINE_CONFIG_START( quizpun2, quizpun2_state ) MCFG_GFXDECODE(quizpun2) MCFG_PALETTE_LENGTH(0x200) - MCFG_VIDEO_START(quizpun2) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") |