summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/megatech.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/megatech.c')
-rw-r--r--src/mame/drivers/megatech.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/mame/drivers/megatech.c b/src/mame/drivers/megatech.c
index 0ade696422c..f44842a954b 100644
--- a/src/mame/drivers/megatech.c
+++ b/src/mame/drivers/megatech.c
@@ -446,22 +446,21 @@ VIDEO_START_MEMBER(mtech_state,mtnew)
}
//attotime::never
-static SCREEN_UPDATE_RGB32(mtnew)
+UINT32 mtech_state::screen_update_mtnew(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- mtech_state *state = screen.machine().driver_data<mtech_state>();
/* if we're running an sms game then use the SMS update.. maybe this should be moved to the megadrive emulation core as compatibility mode is a feature of the chip */
- if (!state->m_current_game_is_sms)
+ if (!m_current_game_is_sms)
SCREEN_UPDATE32_CALL(megadriv);
else
SCREEN_UPDATE32_CALL(megatech_md_sms);
return 0;
}
-static SCREEN_VBLANK(mtnew)
+void mtech_state::screen_eof_mtnew(screen_device &screen, bool state)
{
- mtech_state *state = screen.machine().driver_data<mtech_state>();
- if (!state->m_current_game_is_sms)
+ bool vblank_on = state;
+ if (!m_current_game_is_sms)
SCREEN_VBLANK_CALL(megadriv);
else
SCREEN_VBLANK_CALL(megatech_md_sms);
@@ -476,10 +475,9 @@ MACHINE_RESET_MEMBER(mtech_state,mtnew)
megatech_select_game(machine(), 0);
}
-static SCREEN_UPDATE_RGB32( megatech_menu )
+UINT32 mtech_state::screen_update_megatech_menu(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- mtech_state *state = screen.machine().driver_data<mtech_state>();
- state->m_vdp1->screen_update(screen,bitmap,cliprect);
+ m_vdp1->screen_update(screen,bitmap,cliprect);
return 0;
}
@@ -522,7 +520,7 @@ static MACHINE_CONFIG_START( megatech, mtech_state )
MCFG_SCREEN_RAW_PARAMS(XTAL_10_738635MHz/2, \
SEGA315_5124_WIDTH , SEGA315_5124_LBORDER_START + SEGA315_5124_LBORDER_WIDTH, SEGA315_5124_LBORDER_START + SEGA315_5124_LBORDER_WIDTH + 256, \
SEGA315_5124_HEIGHT_NTSC, SEGA315_5124_TBORDER_START + SEGA315_5124_NTSC_224_TBORDER_HEIGHT, SEGA315_5124_TBORDER_START + SEGA315_5124_NTSC_224_TBORDER_HEIGHT + 224)
- MCFG_SCREEN_UPDATE_STATIC( megatech_menu ) /* Combines and copies a bitmap */
+ MCFG_SCREEN_UPDATE_DRIVER(mtech_state, screen_update_megatech_menu)
MCFG_PALETTE_LENGTH(SEGA315_5124_PALETTE_SIZE)
MCFG_PALETTE_INIT(sega315_5124)
@@ -531,8 +529,8 @@ static MACHINE_CONFIG_START( megatech, mtech_state )
MCFG_SCREEN_MODIFY("megadriv")
- MCFG_SCREEN_UPDATE_STATIC(mtnew)
- MCFG_SCREEN_VBLANK_STATIC(mtnew)
+ MCFG_SCREEN_UPDATE_DRIVER(mtech_state, screen_update_mtnew)
+ MCFG_SCREEN_VBLANK_DRIVER(mtech_state, screen_eof_mtnew)
/* sound hardware */
MCFG_SOUND_ADD("sn2", SN76496, MASTER_CLOCK/15)