diff options
Diffstat (limited to 'src/mame')
2216 files changed, 14567 insertions, 14421 deletions
diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c index 4aaa35aab84..7b0d663716c 100644 --- a/src/mame/drivers/1942.c +++ b/src/mame/drivers/1942.c @@ -274,7 +274,7 @@ static MACHINE_CONFIG_START( 1942, _1942_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(1942) + MCFG_SCREEN_UPDATE_DRIVER(_1942_state, screen_update_1942) /* sound hardware */ diff --git a/src/mame/drivers/1943.c b/src/mame/drivers/1943.c index 48e7a38c0ca..f4a1f0f70ec 100644 --- a/src/mame/drivers/1943.c +++ b/src/mame/drivers/1943.c @@ -270,7 +270,7 @@ static MACHINE_CONFIG_START( 1943, _1943_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(1943) + MCFG_SCREEN_UPDATE_DRIVER(_1943_state, screen_update_1943) MCFG_GFXDECODE(1943) MCFG_PALETTE_LENGTH(32*4+16*16+16*16+16*16) diff --git a/src/mame/drivers/1945kiii.c b/src/mame/drivers/1945kiii.c index 7f5f0562737..6bfb4734df5 100644 --- a/src/mame/drivers/1945kiii.c +++ b/src/mame/drivers/1945kiii.c @@ -77,6 +77,7 @@ public: TILE_GET_INFO_MEMBER(get_k3_bg_tile_info); virtual void machine_start(); virtual void video_start(); + UINT32 screen_update_k3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -123,10 +124,9 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const } } -static SCREEN_UPDATE_IND16(k3) +UINT32 k3_state::screen_update_k3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - k3_state *state = screen.machine().driver_data<k3_state>(); - state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); + m_bg_tilemap->draw(bitmap, cliprect, 0, 0); draw_sprites(screen.machine(), bitmap, cliprect); return 0; } @@ -267,7 +267,7 @@ static MACHINE_CONFIG_START( k3, k3_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 64*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_STATIC(k3) + MCFG_SCREEN_UPDATE_DRIVER(k3_state, screen_update_k3) MCFG_PALETTE_LENGTH(0x800) diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c index dd3d35f38ee..f1a50371e72 100644 --- a/src/mame/drivers/2mindril.c +++ b/src/mame/drivers/2mindril.c @@ -63,7 +63,6 @@ public: DECLARE_DRIVER_INIT(drill); DECLARE_MACHINE_START(drill); DECLARE_MACHINE_RESET(drill); - }; @@ -458,8 +457,8 @@ static MACHINE_CONFIG_START( drill, _2mindril_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* inaccurate, same as Taito F3? (needs screen raw params anyway) */ MCFG_SCREEN_SIZE(40*8+48*2, 32*8) MCFG_SCREEN_VISIBLE_AREA(46, 40*8-1 + 46, 24, 24+224-1) - MCFG_SCREEN_UPDATE_STATIC(f3) - MCFG_SCREEN_VBLANK_STATIC(f3) + MCFG_SCREEN_UPDATE_DRIVER(_2mindril_state, screen_update_f3) + MCFG_SCREEN_VBLANK_DRIVER(_2mindril_state, screen_eof_f3) MCFG_PALETTE_LENGTH(0x2000) diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c index 8f07a266ef3..83badf7bae5 100644 --- a/src/mame/drivers/39in1.c +++ b/src/mame/drivers/39in1.c @@ -74,6 +74,7 @@ public: DECLARE_READ32_MEMBER(prot_cheater_r); DECLARE_DRIVER_INIT(39in1); virtual void machine_start(); + UINT32 screen_update_39in1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; @@ -1517,18 +1518,17 @@ static INPUT_PORTS_START( 39in1 ) PORT_SERVICE_NO_TOGGLE( 0x80000000, IP_ACTIVE_LOW ) INPUT_PORTS_END -static SCREEN_UPDATE_RGB32( 39in1 ) +UINT32 _39in1_state::screen_update_39in1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - _39in1_state *state = screen.machine().driver_data<_39in1_state>(); int x = 0; int y = 0; - for(y = 0; y <= (state->m_lcd_regs.lccr2 & PXA255_LCCR2_LPP); y++) + for(y = 0; y <= (m_lcd_regs.lccr2 & PXA255_LCCR2_LPP); y++) { UINT32 *d = &bitmap.pix32(y); - for(x = 0; x <= (state->m_lcd_regs.lccr1 & PXA255_LCCR1_PPL); x++) + for(x = 0; x <= (m_lcd_regs.lccr1 & PXA255_LCCR1_PPL); x++) { - d[x] = state->m_pxa255_lcd_palette[state->m_pxa255_lcd_framebuffer[y*((state->m_lcd_regs.lccr1 & PXA255_LCCR1_PPL) + 1) + x]]; + d[x] = m_pxa255_lcd_palette[m_pxa255_lcd_framebuffer[y*((m_lcd_regs.lccr1 & PXA255_LCCR1_PPL) + 1) + x]]; } } return 0; @@ -1600,7 +1600,7 @@ static MACHINE_CONFIG_START( 39in1, _39in1_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(1024, 1024) MCFG_SCREEN_VISIBLE_AREA(0, 295, 0, 479) - MCFG_SCREEN_UPDATE_STATIC(39in1) + MCFG_SCREEN_UPDATE_DRIVER(_39in1_state, screen_update_39in1) MCFG_PALETTE_LENGTH(256) diff --git a/src/mame/drivers/3do.c b/src/mame/drivers/3do.c index b3e9653b783..73555d1311c 100644 --- a/src/mame/drivers/3do.c +++ b/src/mame/drivers/3do.c @@ -165,7 +165,7 @@ static MACHINE_CONFIG_START( 3do, _3do_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS( X2_CLOCK_NTSC / 2, 1592, 254, 1534, 263, 22, 262 ) - MCFG_SCREEN_UPDATE_STATIC( _3do ) + MCFG_SCREEN_UPDATE_DRIVER(_3do_state, screen_update__3do) MCFG_CDROM_ADD( "cdrom", _3do_cdrom) MACHINE_CONFIG_END @@ -179,7 +179,7 @@ static MACHINE_CONFIG_START( 3do_pal, _3do_state ) MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_UPDATE_STATIC( _3do ) + MCFG_SCREEN_UPDATE_DRIVER(_3do_state, screen_update__3do) MCFG_SCREEN_SIZE( 640, 625 ) MCFG_SCREEN_VISIBLE_AREA( 0, 639, 0, 479 ) MCFG_SCREEN_REFRESH_RATE( 50 ) diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c index 4fd0156e6ca..6f7d5026d53 100644 --- a/src/mame/drivers/40love.c +++ b/src/mame/drivers/40love.c @@ -1080,7 +1080,7 @@ static MACHINE_CONFIG_START( 40love, fortyl_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(128,128+255, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(fortyl) + MCFG_SCREEN_UPDATE_DRIVER(fortyl_state, screen_update_fortyl) MCFG_GFXDECODE(40love) MCFG_PALETTE_LENGTH(1024) @@ -1135,7 +1135,7 @@ static MACHINE_CONFIG_START( undoukai, fortyl_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(128,128+255, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(fortyl) + MCFG_SCREEN_UPDATE_DRIVER(fortyl_state, screen_update_fortyl) MCFG_GFXDECODE(40love) MCFG_PALETTE_LENGTH(1024) diff --git a/src/mame/drivers/4enraya.c b/src/mame/drivers/4enraya.c index 5266657d61f..f37c19c75ed 100644 --- a/src/mame/drivers/4enraya.c +++ b/src/mame/drivers/4enraya.c @@ -330,7 +330,7 @@ static MACHINE_CONFIG_START( 4enraya, _4enraya_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(4enraya) + MCFG_SCREEN_UPDATE_DRIVER(_4enraya_state, screen_update_4enraya) MCFG_GFXDECODE(4enraya) diff --git a/src/mame/drivers/4roses.c b/src/mame/drivers/4roses.c index d2656839b80..79b4205400e 100644 --- a/src/mame/drivers/4roses.c +++ b/src/mame/drivers/4roses.c @@ -396,7 +396,7 @@ static MACHINE_CONFIG_START( 4roses, _4roses_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE((124+1)*4, (30+1)*8) /* guess. taken from funworld games */ MCFG_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 29*8-1) /* guess. taken from funworld games */ - MCFG_SCREEN_UPDATE_STATIC(funworld) + MCFG_SCREEN_UPDATE_DRIVER(_4roses_state, screen_update_funworld) MCFG_GFXDECODE(4roses) diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c index 9620e9510c7..17c4e32e0a9 100644 --- a/src/mame/drivers/5clown.c +++ b/src/mame/drivers/5clown.c @@ -486,6 +486,7 @@ public: TILE_GET_INFO_MEMBER(get_fclown_tile_info); virtual void video_start(); virtual void palette_init(); + UINT32 screen_update_fclown(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -537,10 +538,9 @@ void _5clown_state::video_start() } -static SCREEN_UPDATE_IND16( fclown ) +UINT32 _5clown_state::screen_update_fclown(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - _5clown_state *state = screen.machine().driver_data<_5clown_state>(); - state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); + m_bg_tilemap->draw(bitmap, cliprect, 0, 0); return 0; } @@ -1081,7 +1081,7 @@ static MACHINE_CONFIG_START( fclown, _5clown_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE((39+1)*8, (31+1)*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(fclown) + MCFG_SCREEN_UPDATE_DRIVER(_5clown_state, screen_update_fclown) MCFG_GFXDECODE(fclown) MCFG_PALETTE_LENGTH(256) diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c index 1b2804669d2..41f805af587 100644 --- a/src/mame/drivers/8080bw.c +++ b/src/mame/drivers/8080bw.c @@ -396,7 +396,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( invadpt2, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(invadpt2) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invadpt2) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -572,7 +572,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( cosmo, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(cosmo) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_cosmo) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -802,7 +802,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( lrescue, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(invadpt2) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invadpt2) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -954,7 +954,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( rollingc, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(rollingc) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_rollingc) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -1072,7 +1072,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( schaser, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(schaser) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_schaser) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -1141,7 +1141,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( schasercv, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(schasercv) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_schasercv) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -1222,7 +1222,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( sflush, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(sflush) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_sflush) MACHINE_CONFIG_END @@ -1329,7 +1329,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( lupin3, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(indianbt) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_indianbt) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -1349,7 +1349,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( lupin3a, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(lupin3) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_lupin3) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -1469,7 +1469,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( polaris, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(polaris) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_polaris) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -1592,7 +1592,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( ballbomb, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(ballbomb) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_ballbomb) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -1763,7 +1763,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( indianbt, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(indianbt) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_indianbt) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -1837,7 +1837,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( steelwkr, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(invadpt2) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invadpt2) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -1972,7 +1972,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( shuttlei, mw8080bw_root, _8080bw_state ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 24*8-1) - MCFG_SCREEN_UPDATE_STATIC(shuttlei) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_shuttlei) /* sound hardware */ MCFG_FRAGMENT_ADD(invaders_samples_audio) @@ -2153,7 +2153,7 @@ MACHINE_CONFIG_DERIVED_CLASS( vortex, mw8080bw_root, _8080bw_state ) /* video hardware */ // TODO: replace with modified invaders color renderer code allowing midscanline color writes MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(invaders) + MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invaders) /* add shifter */ MCFG_MB14241_ADD("mb14241") diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c index a054de42e2d..4f6f87bcdbb 100644 --- a/src/mame/drivers/88games.c +++ b/src/mame/drivers/88games.c @@ -386,7 +386,7 @@ static MACHINE_CONFIG_START( 88games, _88games_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_UPDATE_STATIC(88games) + MCFG_SCREEN_UPDATE_DRIVER(_88games_state, screen_update_88games) MCFG_PALETTE_LENGTH(2048) diff --git a/src/mame/drivers/ace.c b/src/mame/drivers/ace.c index 7bdef149339..3c0bf68debc 100644 --- a/src/mame/drivers/ace.c +++ b/src/mame/drivers/ace.c @@ -68,6 +68,7 @@ public: virtual void machine_reset(); virtual void video_start(); virtual void palette_init(); + UINT32 screen_update_ace(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -91,9 +92,8 @@ void aceal_state::video_start() machine().gfx[4]->set_source(m_scoreram); } -static SCREEN_UPDATE_IND16( ace ) +UINT32 aceal_state::screen_update_ace(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - aceal_state *state = screen.machine().driver_data<aceal_state>(); int offs; /* first of all, fill the screen with the background color */ @@ -103,19 +103,19 @@ static SCREEN_UPDATE_IND16( ace ) 0, 0, 0, 0, - state->m_objpos[0], state->m_objpos[1]); + m_objpos[0], m_objpos[1]); drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[2], 0, 0, 0, 0, - state->m_objpos[2], state->m_objpos[3]); + m_objpos[2], m_objpos[3]); drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[3], 0, 0, 0, 0, - state->m_objpos[4], state->m_objpos[5]); + m_objpos[4], m_objpos[5]); for (offs = 0; offs < 8; offs++) { @@ -359,7 +359,7 @@ static MACHINE_CONFIG_START( ace, aceal_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(4*8, 32*8-1, 2*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(ace) + MCFG_SCREEN_UPDATE_DRIVER(aceal_state, screen_update_ace) MCFG_GFXDECODE(ace) MCFG_PALETTE_LENGTH(2) diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c index 8100daef70b..e65674e952b 100644 --- a/src/mame/drivers/acefruit.c +++ b/src/mame/drivers/acefruit.c @@ -39,6 +39,7 @@ public: DECLARE_DRIVER_INIT(sidewndr); virtual void video_start(); virtual void palette_init(); + UINT32 screen_update_acefruit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -89,9 +90,8 @@ static INTERRUPT_GEN( acefruit_vblank ) state->m_refresh_timer->adjust( attotime::zero ); } -static SCREEN_UPDATE_IND16( acefruit ) +UINT32 acefruit_state::screen_update_acefruit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - acefruit_state *state = screen.machine().driver_data<acefruit_state>(); int startrow = cliprect.min_y / 8; int endrow = cliprect.max_y / 8; int row; @@ -106,8 +106,8 @@ static SCREEN_UPDATE_IND16( acefruit ) for( col = 0; col < 32; col++ ) { int tile_index = ( col * 32 ) + row; - int code = state->m_videoram[ tile_index ]; - int color = state->m_colorram[ tile_index ]; + int code = m_videoram[ tile_index ]; + int color = m_colorram[ tile_index ]; if( color < 0x4 ) { @@ -123,7 +123,7 @@ static SCREEN_UPDATE_IND16( acefruit ) for( x = 0; x < 16; x++ ) { - int sprite = ( state->m_spriteram[ ( spriteindex / 64 ) % 6 ] & 0xf ) ^ 0xf; + int sprite = ( m_spriteram[ ( spriteindex / 64 ) % 6 ] & 0xf ) ^ 0xf; const UINT8 *gfxdata = gfx->get_data(sprite); for( y = 0; y < 8; y++ ) @@ -592,7 +592,7 @@ static MACHINE_CONFIG_START( acefruit, acefruit_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(512, 256) MCFG_SCREEN_VISIBLE_AREA(0, 511, 0, 255) - MCFG_SCREEN_UPDATE_STATIC(acefruit) + MCFG_SCREEN_UPDATE_DRIVER(acefruit_state, screen_update_acefruit) MCFG_PALETTE_LENGTH(16) diff --git a/src/mame/drivers/acommand.c b/src/mame/drivers/acommand.c index 610644229c3..6ceaee97c7b 100644 --- a/src/mame/drivers/acommand.c +++ b/src/mame/drivers/acommand.c @@ -92,6 +92,7 @@ public: TILE_GET_INFO_MEMBER(ac_get_bg_tile_info); TILE_GET_INFO_MEMBER(ac_get_tx_tile_info); virtual void video_start(); + UINT32 screen_update_acommand(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -249,21 +250,20 @@ static void draw_led(bitmap_ind16 &bitmap, int x, int y,UINT8 value) } -static SCREEN_UPDATE_IND16( acommand ) +UINT32 acommand_state::screen_update_acommand(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - acommand_state *state = screen.machine().driver_data<acommand_state>(); - state->m_bg_tilemap->draw(bitmap, cliprect, 0,0); + m_bg_tilemap->draw(bitmap, cliprect, 0,0); draw_sprites(screen.machine(),bitmap,cliprect,0,0); - state->m_tx_tilemap->draw(bitmap, cliprect, 0,0); + m_tx_tilemap->draw(bitmap, cliprect, 0,0); /*Order might be wrong,but these for sure are the led numbers tested*/ - draw_led(bitmap, 0, 20, (state->m_led0 & 0x0f00) >> 8); - draw_led(bitmap, 6, 20, (state->m_led0 & 0x00f0) >> 4); - draw_led(bitmap, 12, 20, (state->m_led0 & 0x000f)); + draw_led(bitmap, 0, 20, (m_led0 & 0x0f00) >> 8); + draw_led(bitmap, 6, 20, (m_led0 & 0x00f0) >> 4); + draw_led(bitmap, 12, 20, (m_led0 & 0x000f)); - draw_led(bitmap, 256-18,20,(state->m_led0 & 0xf000) >> 12); - draw_led(bitmap, 256-12,20,(state->m_led1 & 0xf0) >> 4); - draw_led(bitmap, 256-6,20, (state->m_led1 & 0xf)); + draw_led(bitmap, 256-18,20,(m_led0 & 0xf000) >> 12); + draw_led(bitmap, 256-12,20,(m_led1 & 0xf0) >> 4); + draw_led(bitmap, 256-6,20, (m_led1 & 0xf)); return 0; } @@ -609,7 +609,7 @@ static MACHINE_CONFIG_START( acommand, acommand_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(acommand) + MCFG_SCREEN_UPDATE_DRIVER(acommand_state, screen_update_acommand) MCFG_GFXDECODE(acommand) MCFG_PALETTE_LENGTH(0x4000) diff --git a/src/mame/drivers/actfancr.c b/src/mame/drivers/actfancr.c index 8abb946a694..ff35a1b2935 100644 --- a/src/mame/drivers/actfancr.c +++ b/src/mame/drivers/actfancr.c @@ -337,7 +337,7 @@ static MACHINE_CONFIG_START( actfancr, actfancr_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) - MCFG_SCREEN_UPDATE_STATIC(actfancr) + MCFG_SCREEN_UPDATE_DRIVER(actfancr_state, screen_update_actfancr) MCFG_GFXDECODE(actfan) MCFG_PALETTE_LENGTH(768) @@ -387,7 +387,7 @@ static MACHINE_CONFIG_START( triothep, actfancr_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) - MCFG_SCREEN_UPDATE_STATIC(actfancr) + MCFG_SCREEN_UPDATE_DRIVER(actfancr_state, screen_update_actfancr) MCFG_GFXDECODE(triothep) MCFG_PALETTE_LENGTH(768) diff --git a/src/mame/drivers/adp.c b/src/mame/drivers/adp.c index 5fa12f6cbf9..806149d9d4f 100644 --- a/src/mame/drivers/adp.c +++ b/src/mame/drivers/adp.c @@ -183,6 +183,7 @@ public: DECLARE_MACHINE_START(skattv); DECLARE_MACHINE_RESET(skattv); DECLARE_PALETTE_INIT(adp); + UINT32 screen_update_adp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -203,24 +204,22 @@ UINT32 adp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con #if 0 -static SCREEN_UPDATE_IND16( adp ) +UINT32 adp_state::screen_update_adp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - adp_state *state = screen.machine().driver_data<adp_state>(); - state->m_h63484->update_screen(bitmap, cliprect); + m_h63484->update_screen(bitmap, cliprect); #if 0 - adp_state *state = screen.machine().driver_data<adp_state>(); int x, y, b, src; - b = ((hd63484_regs_r(state->m_hd63484, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(state->m_hd63484, 0xce/2, 0xffff); + b = ((hd63484_regs_r(m_hd63484, 0xcc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(m_hd63484, 0xce/2, 0xffff); for (y = 0;y < 280;y++) { - for (x = 0 ; x < (hd63484_regs_r(state->m_hd63484, 0xca/2, 0xffff) & 0x0fff) * 4 ; x += 4) + for (x = 0 ; x < (hd63484_regs_r(m_hd63484, 0xca/2, 0xffff) & 0x0fff) * 4 ; x += 4) { b &= (HD63484_RAM_SIZE - 1); - src = hd63484_ram_r(state->m_hd63484, b, 0xffff); + src = hd63484_ram_r(m_hd63484, b, 0xffff); bitmap.pix16(y, x ) = ((src & 0x000f) >> 0) << 0; bitmap.pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0; bitmap.pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0; @@ -229,24 +228,24 @@ static SCREEN_UPDATE_IND16( adp ) } } if (!screen.machine().input().code_pressed(KEYCODE_O)) // debug: toggle window - if ((hd63484_regs_r(state->m_hd63484, 0x06/2, 0xffff) & 0x0300) == 0x0300) + if ((hd63484_regs_r(m_hd63484, 0x06/2, 0xffff) & 0x0300) == 0x0300) { - int sy = (hd63484_regs_r(state->m_hd63484, 0x94/2, 0xffff) & 0x0fff) - (hd63484_regs_r(state->m_hd63484, 0x88/2, 0xffff) >> 8); - int h = hd63484_regs_r(state->m_hd63484, 0x96/2, 0xffff) & 0x0fff; - int sx = ((hd63484_regs_r(state->m_hd63484, 0x92/2, 0xffff) >> 8) - (hd63484_regs_r(state->m_hd63484, 0x84/2, 0xffff) >> 8)) * 2 * 2; - int w = (hd63484_regs_r(state->m_hd63484, 0x92/2, 0xffff) & 0xff) * 2; + int sy = (hd63484_regs_r(m_hd63484, 0x94/2, 0xffff) & 0x0fff) - (hd63484_regs_r(m_hd63484, 0x88/2, 0xffff) >> 8); + int h = hd63484_regs_r(m_hd63484, 0x96/2, 0xffff) & 0x0fff; + int sx = ((hd63484_regs_r(m_hd63484, 0x92/2, 0xffff) >> 8) - (hd63484_regs_r(m_hd63484, 0x84/2, 0xffff) >> 8)) * 2 * 2; + int w = (hd63484_regs_r(m_hd63484, 0x92/2, 0xffff) & 0xff) * 2; if (sx < 0) sx = 0; // not sure about this (shangha2 title screen) - b = (((hd63484_regs_r(state->m_hd63484, 0xdc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(state->m_hd63484, 0xde/2, 0xffff)); + b = (((hd63484_regs_r(m_hd63484, 0xdc/2, 0xffff) & 0x000f) << 16) + hd63484_regs_r(m_hd63484, 0xde/2, 0xffff)); for (y = sy ; y <= sy + h && y < 280 ; y++) { - for (x = 0 ; x < (hd63484_regs_r(state->m_hd63484, 0xca/2, 0xffff) & 0x0fff) * 4 ; x += 4) + for (x = 0 ; x < (hd63484_regs_r(m_hd63484, 0xca/2, 0xffff) & 0x0fff) * 4 ; x += 4) { b &= (HD63484_RAM_SIZE - 1); - src = hd63484_ram_r(state->m_hd63484, b, 0xffff); + src = hd63484_ram_r(m_hd63484, b, 0xffff); - if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(state->m_hd63484, 0xca/2, 0xffff) & 0x0fff) * 4) + if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(m_hd63484, 0xca/2, 0xffff) & 0x0fff) * 4) { bitmap.pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0; bitmap.pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0; diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c index 03453cfd449..c7922e411e8 100644 --- a/src/mame/drivers/aeroboto.c +++ b/src/mame/drivers/aeroboto.c @@ -265,7 +265,7 @@ static MACHINE_CONFIG_START( formatz, aeroboto_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 31*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(aeroboto) + MCFG_SCREEN_UPDATE_DRIVER(aeroboto_state, screen_update_aeroboto) MCFG_GFXDECODE(aeroboto) diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c index 7bb74c18671..23cf346dbba 100644 --- a/src/mame/drivers/aerofgt.c +++ b/src/mame/drivers/aerofgt.c @@ -1343,7 +1343,7 @@ static MACHINE_CONFIG_START( pspikes, aerofgt_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8+4, 44*8+4-1, 0*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(pspikes) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_pspikes) MCFG_GFXDECODE(pspikes) MCFG_PALETTE_LENGTH(2048) @@ -1379,7 +1379,7 @@ static MACHINE_CONFIG_START( spikes91, aerofgt_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 320-1, 0*8+4, 224+4-1) - MCFG_SCREEN_UPDATE_STATIC(spikes91) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_spikes91) MCFG_GFXDECODE(spikes91) MCFG_PALETTE_LENGTH(2048) @@ -1411,7 +1411,7 @@ static MACHINE_CONFIG_START( pspikesb, aerofgt_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8+4, 44*8+4-1, 0*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(pspikesb) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_pspikesb) MCFG_GFXDECODE(pspikesb) MCFG_PALETTE_LENGTH(2048) @@ -1441,7 +1441,7 @@ static MACHINE_CONFIG_START( pspikesc, aerofgt_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8+4, 44*8+4-1, 0*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(pspikes) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_pspikes) MCFG_GFXDECODE(pspikes) MCFG_PALETTE_LENGTH(2048) @@ -1476,7 +1476,7 @@ static MACHINE_CONFIG_START( karatblz, aerofgt_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(1*8, 45*8-1, 0*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(karatblz) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_karatblz) MCFG_GFXDECODE(turbofrc) MCFG_PALETTE_LENGTH(1024) @@ -1515,7 +1515,7 @@ static MACHINE_CONFIG_START( spinlbrk, aerofgt_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(1*8, 45*8-1, 0*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(spinlbrk) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_spinlbrk) MCFG_GFXDECODE(turbofrc) MCFG_PALETTE_LENGTH(1024) @@ -1554,7 +1554,7 @@ static MACHINE_CONFIG_START( turbofrc, aerofgt_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 44*8-1, 0*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(turbofrc) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_turbofrc) MCFG_GFXDECODE(turbofrc) MCFG_PALETTE_LENGTH(1024) @@ -1594,7 +1594,7 @@ static MACHINE_CONFIG_START( aerofgtb, aerofgt_state ) /* wrong but improves sprite-background synchronization */ MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8+12, 40*8-1+12, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_STATIC(turbofrc) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_turbofrc) MCFG_GFXDECODE(aerofgtb) MCFG_PALETTE_LENGTH(1024) @@ -1634,7 +1634,7 @@ static MACHINE_CONFIG_START( aerofgt, aerofgt_state ) /* wrong but improves sprite-background synchronization */ MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_STATIC(aerofgt) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_aerofgt) MCFG_GFXDECODE(aerofgt) MCFG_PALETTE_LENGTH(1024) @@ -1672,7 +1672,7 @@ static MACHINE_CONFIG_START( aerfboot, aerofgt_state ) /* wrong but improves sprite-background synchronization */ MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8+12, 40*8-1+12, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_STATIC(aerfboot) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_aerfboot) MCFG_GFXDECODE(aerfboot) MCFG_PALETTE_LENGTH(1024) @@ -1703,7 +1703,7 @@ static MACHINE_CONFIG_START( aerfboo2, aerofgt_state ) /* wrong but improves sprite-background synchronization */ MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8+12, 40*8-1+12, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_STATIC(aerfboo2) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_aerfboo2) MCFG_GFXDECODE(aerfboo2) MCFG_PALETTE_LENGTH(1024) @@ -1736,7 +1736,7 @@ static MACHINE_CONFIG_START( wbbc97, aerofgt_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 64*8) MCFG_SCREEN_VISIBLE_AREA(0*8+14, 44*8-1+4, 0*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(wbbc97) + MCFG_SCREEN_UPDATE_DRIVER(aerofgt_state, screen_update_wbbc97) MCFG_GFXDECODE(wbbc97) MCFG_PALETTE_LENGTH(2048) diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c index 6932b2a06ab..0d14e3b4965 100644 --- a/src/mame/drivers/airbustr.c +++ b/src/mame/drivers/airbustr.c @@ -647,8 +647,8 @@ static MACHINE_CONFIG_START( airbustr, airbustr_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(airbustr) - MCFG_SCREEN_VBLANK_STATIC(airbustr) + MCFG_SCREEN_UPDATE_DRIVER(airbustr_state, screen_update_airbustr) + MCFG_SCREEN_VBLANK_DRIVER(airbustr_state, screen_eof_airbustr) MCFG_GFXDECODE(airbustr) MCFG_PALETTE_LENGTH(768) diff --git a/src/mame/drivers/ajax.c b/src/mame/drivers/ajax.c index 54360ba3260..2f7e61d8ebc 100644 --- a/src/mame/drivers/ajax.c +++ b/src/mame/drivers/ajax.c @@ -229,7 +229,7 @@ static MACHINE_CONFIG_START( ajax, ajax_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_UPDATE_STATIC(ajax) + MCFG_SCREEN_UPDATE_DRIVER(ajax_state, screen_update_ajax) MCFG_PALETTE_LENGTH(2048) diff --git a/src/mame/drivers/albazc.c b/src/mame/drivers/albazc.c index e79e9c8da27..7eae69ccf9e 100644 --- a/src/mame/drivers/albazc.c +++ b/src/mame/drivers/albazc.c @@ -34,6 +34,7 @@ public: DECLARE_WRITE8_MEMBER(albazc_vregs_w); virtual void video_start(); virtual void palette_init(); + UINT32 screen_update_hanaroku(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -87,7 +88,7 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const } } -static SCREEN_UPDATE_IND16(hanaroku) +UINT32 albazc_state::screen_update_hanaroku(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { bitmap.fill(0x1f0, cliprect); // ??? draw_sprites(screen.machine(), bitmap, cliprect); @@ -278,7 +279,7 @@ static MACHINE_CONFIG_START( hanaroku, albazc_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 64*8) MCFG_SCREEN_VISIBLE_AREA(0, 48*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(hanaroku) + MCFG_SCREEN_UPDATE_DRIVER(albazc_state, screen_update_hanaroku) MCFG_GFXDECODE(hanaroku) MCFG_PALETTE_LENGTH(0x200) diff --git a/src/mame/drivers/albazg.c b/src/mame/drivers/albazg.c index 8680b0a3f7f..ac7c64a0631 100644 --- a/src/mame/drivers/albazg.c +++ b/src/mame/drivers/albazg.c @@ -76,6 +76,7 @@ public: virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); + UINT32 screen_update_yumefuda(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; TILE_GET_INFO_MEMBER(albazg_state::y_get_bg_tile_info) @@ -96,10 +97,9 @@ void albazg_state::video_start() m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(albazg_state::y_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); } -static SCREEN_UPDATE_IND16( yumefuda ) +UINT32 albazg_state::screen_update_yumefuda(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - albazg_state *state = screen.machine().driver_data<albazg_state>(); - state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0); + m_bg_tilemap->draw(bitmap, cliprect, 0, 0); return 0; } @@ -395,7 +395,7 @@ static MACHINE_CONFIG_START( yumefuda, albazg_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC( yumefuda ) + MCFG_SCREEN_UPDATE_DRIVER(albazg_state, screen_update_yumefuda) MCFG_MC6845_ADD("crtc", H46505, MASTER_CLOCK/16, mc6845_intf) /* hand tuned to get ~60 fps */ diff --git a/src/mame/drivers/aleck64.c b/src/mame/drivers/aleck64.c index 14f78825e2e..f3bb67e5d38 100644 --- a/src/mame/drivers/aleck64.c +++ b/src/mame/drivers/aleck64.c @@ -817,7 +817,7 @@ static MACHINE_CONFIG_START( aleck64, n64_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(640, 525) MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 239) - MCFG_SCREEN_UPDATE_STATIC(n64) + MCFG_SCREEN_UPDATE_DRIVER(n64_state, screen_update_n64) MCFG_PALETTE_LENGTH(0x1000) diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c index 97472725efc..e06c45c0c38 100644 --- a/src/mame/drivers/alg.c +++ b/src/mame/drivers/alg.c @@ -447,7 +447,7 @@ static MACHINE_CONFIG_START( alg_r1, alg_state ) MCFG_NVRAM_ADD_0FILL("nvram") MCFG_LASERDISC_LDP1450_ADD("laserdisc") - MCFG_LASERDISC_OVERLAY_STATIC(512*2, 262, amiga) + MCFG_LASERDISC_OVERLAY_DRIVER(512*2, 262, amiga_state, screen_update_amiga) MCFG_LASERDISC_OVERLAY_CLIP((129-8)*2, (449+8-1)*2, 44-8, 244+8-1) /* video hardware */ diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c index 2474b5e2c22..50a11a7f01d 100644 --- a/src/mame/drivers/aliens.c +++ b/src/mame/drivers/aliens.c @@ -270,7 +270,7 @@ static MACHINE_CONFIG_START( aliens, aliens_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_UPDATE_STATIC(aliens) + MCFG_SCREEN_UPDATE_DRIVER(aliens_state, screen_update_aliens) MCFG_PALETTE_LENGTH(512) diff --git a/src/mame/drivers/alpha68k.c b/src/mame/drivers/alpha68k.c index b44ce979eb5..5068f4b9e6d 100644 --- a/src/mame/drivers/alpha68k.c +++ b/src/mame/drivers/alpha68k.c @@ -1978,7 +1978,7 @@ static MACHINE_CONFIG_START( sstingry, alpha68k_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(sstingry) + MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_sstingry) MCFG_GFXDECODE(sstingry) MCFG_PALETTE_LENGTH(256 + 1) @@ -2023,7 +2023,7 @@ static MACHINE_CONFIG_START( kyros, alpha68k_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(kyros) + MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_kyros) MCFG_GFXDECODE(kyros) MCFG_PALETTE_LENGTH(256 + 1) @@ -2068,7 +2068,7 @@ static MACHINE_CONFIG_START( jongbou, alpha68k_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(kyros) + MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_kyros) MCFG_GFXDECODE(jongbou) MCFG_PALETTE_LENGTH(256 + 1) @@ -2102,7 +2102,7 @@ static MACHINE_CONFIG_START( alpha68k_I, alpha68k_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(alpha68k_I) + MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_I) MCFG_GFXDECODE(paddle) @@ -2146,7 +2146,7 @@ static MACHINE_CONFIG_START( alpha68k_II, alpha68k_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(alpha68k_II) + MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_II) MCFG_GFXDECODE(alpha68k_II) MCFG_PALETTE_LENGTH(2048) @@ -2195,7 +2195,7 @@ static MACHINE_CONFIG_START( alpha68k_II_gm, alpha68k_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(alpha68k_II) + MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_II) MCFG_GFXDECODE(alpha68k_II) MCFG_PALETTE_LENGTH(2048) @@ -2238,7 +2238,7 @@ static MACHINE_CONFIG_START( alpha68k_V, alpha68k_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(alpha68k_V) + MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_V) MCFG_GFXDECODE(alpha68k_V) MCFG_PALETTE_LENGTH(4096) @@ -2280,7 +2280,7 @@ static MACHINE_CONFIG_START( alpha68k_V_sb, alpha68k_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(alpha68k_V_sb) + MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_V_sb) MCFG_GFXDECODE(alpha68k_V) MCFG_PALETTE_LENGTH(4096) @@ -2321,7 +2321,7 @@ static MACHINE_CONFIG_START( tnextspc, alpha68k_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(alpha68k_I) + MCFG_SCREEN_UPDATE_DRIVER(alpha68k_state, screen_update_alpha68k_I) MCFG_GFXDECODE(tnextspc) diff --git a/src/mame/drivers/amaticmg.c b/src/mame/drivers/amaticmg.c index f20f73dfc8e..fed5a063276 100644 --- a/src/mame/drivers/amaticmg.c +++ b/src/mame/drivers/amaticmg.c @@ -452,6 +452,8 @@ public: virtual void video_start(); virtual void palette_init(); DECLARE_PALETTE_INIT(amaticmg2); + UINT32 screen_update_amaticmg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + UINT32 screen_update_amaticmg2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -463,9 +465,8 @@ void amaticmg_state::video_start() { } -static SCREEN_UPDATE_IND16( amaticmg ) +UINT32 amaticmg_state::screen_update_amaticmg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - amaticmg_state *state = screen.machine().driver_data<amaticmg_state>(); gfx_element *gfx = screen.machine().gfx[0]; int y,x; int count = 0; @@ -474,12 +475,12 @@ static SCREEN_UPDATE_IND16( amaticmg ) { for (x=0;x<96;x++) { - UINT16 tile = state->m_vram[count]; + UINT16 tile = m_vram[count]; UINT8 color; - tile += ((state->m_attr[count]&0x0f)<<8); + tile += ((m_attr[count]&0x0f)<<8); /* TODO: this looks so out of place ... */ - color = (state->m_attr[count]&0xf0)>>3; + color = (m_attr[count]&0xf0)>>3; drawgfx_opaque(bitmap,cliprect,gfx,tile,color,0,0,x*4,y*8); count++; @@ -489,9 +490,8 @@ static SCREEN_UPDATE_IND16( amaticmg ) return 0; } -static SCREEN_UPDATE_IND16( amaticmg2 ) +UINT32 amaticmg_state::screen_update_amaticmg2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - amaticmg_state *state = screen.machine().driver_data<amaticmg_state>(); gfx_element *gfx = screen.machine().gfx[0]; int y,x; int count = 16; @@ -500,10 +500,10 @@ static SCREEN_UPDATE_IND16( amaticmg2 ) { for (x=0;x<96;x++) { - UINT16 tile = state->m_vram[count]; + UINT16 tile = m_vram[count]; UINT8 color; - tile += ((state->m_attr[count]&0xff)<<8); + tile += ((m_attr[count]&0xff)<<8); color = 0; drawgfx_opaque(bitmap,cliprect,gfx,tile,color,0,0,x*4,y*8); @@ -881,7 +881,7 @@ static MACHINE_CONFIG_START( amaticmg, amaticmg_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(512, 256) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1) - MCFG_SCREEN_UPDATE_STATIC(amaticmg) + MCFG_SCREEN_UPDATE_DRIVER(amaticmg_state, screen_update_amaticmg) MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf) @@ -919,7 +919,7 @@ static MACHINE_CONFIG_DERIVED( amaticmg2, amaticmg ) MCFG_CPU_VBLANK_INT("screen", amaticmg2_irq) MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(amaticmg2) + MCFG_SCREEN_UPDATE_DRIVER(amaticmg_state, screen_update_amaticmg2) MCFG_GFXDECODE(amaticmg2) MCFG_PALETTE_INIT_OVERRIDE(amaticmg_state,amaticmg2) diff --git a/src/mame/drivers/ambush.c b/src/mame/drivers/ambush.c index ff17cb4fc6e..c8f655547ac 100644 --- a/src/mame/drivers/ambush.c +++ b/src/mame/drivers/ambush.c @@ -240,7 +240,7 @@ static MACHINE_CONFIG_START( ambush, ambush_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-3) /* The -3 makes the cocktail mode perfect */ - MCFG_SCREEN_UPDATE_STATIC(ambush) + MCFG_SCREEN_UPDATE_DRIVER(ambush_state, screen_update_ambush) MCFG_GFXDECODE(ambush) MCFG_PALETTE_LENGTH(256) diff --git a/src/mame/drivers/ampoker2.c b/src/mame/drivers/ampoker2.c index 3722ebcd6d0..a999d65a87a 100644 --- a/src/mame/drivers/ampoker2.c +++ b/src/mame/drivers/ampoker2.c @@ -1182,7 +1182,7 @@ static MACHINE_CONFIG_START( ampoker2, ampoker2_state ) */ MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(20*8, 56*8-1, 2*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(ampoker2) + MCFG_SCREEN_UPDATE_DRIVER(ampoker2_state, screen_update_ampoker2) MCFG_GFXDECODE(ampoker2) MCFG_PALETTE_LENGTH(512) diff --git a/src/mame/drivers/amspdwy.c b/src/mame/drivers/amspdwy.c index be07180e7b4..0301cd17ae5 100644 --- a/src/mame/drivers/amspdwy.c +++ b/src/mame/drivers/amspdwy.c @@ -288,7 +288,7 @@ static MACHINE_CONFIG_START( amspdwy, amspdwy_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(256, 256) MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0+16, 256-16-1) - MCFG_SCREEN_UPDATE_STATIC(amspdwy) + MCFG_SCREEN_UPDATE_DRIVER(amspdwy_state, screen_update_amspdwy) MCFG_GFXDECODE(amspdwy) MCFG_PALETTE_LENGTH(32) diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c index 68b0f6ec85d..736f2e78b2d 100644 --- a/src/mame/drivers/angelkds.c +++ b/src/mame/drivers/angelkds.c @@ -617,7 +617,7 @@ static MACHINE_CONFIG_START( angelkds, angelkds_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) - MCFG_SCREEN_UPDATE_STATIC(angelkds) + MCFG_SCREEN_UPDATE_DRIVER(angelkds_state, screen_update_angelkds) MCFG_GFXDECODE(angelkds) MCFG_PALETTE_LENGTH(0x100) diff --git a/src/mame/drivers/appoooh.c b/src/mame/drivers/appoooh.c index 5aeb41b0982..77f3c3c05cc 100644 --- a/src/mame/drivers/appoooh.c +++ b/src/mame/drivers/appoooh.c @@ -475,7 +475,7 @@ static MACHINE_CONFIG_DERIVED( appoooh, appoooh_common ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(appoooh) + MCFG_SCREEN_UPDATE_DRIVER(appoooh_state, screen_update_appoooh) MCFG_GFXDECODE(appoooh) MCFG_PALETTE_LENGTH(32*8+32*8) @@ -493,7 +493,7 @@ static MACHINE_CONFIG_DERIVED( robowres, appoooh_common ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(robowres) + MCFG_SCREEN_UPDATE_DRIVER(appoooh_state, screen_update_robowres) MCFG_GFXDECODE(robowres) MCFG_PALETTE_LENGTH(32*8+32*8) diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c index 7b222739b16..0bec20ed5be 100644 --- a/src/mame/drivers/aquarium.c +++ b/src/mame/drivers/aquarium.c @@ -331,7 +331,7 @@ static MACHINE_CONFIG_START( aquarium, aquarium_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 64*8) MCFG_SCREEN_VISIBLE_AREA(2*8, 42*8-1, 2*8, 34*8-1) - MCFG_SCREEN_UPDATE_STATIC(aquarium) + MCFG_SCREEN_UPDATE_DRIVER(aquarium_state, screen_update_aquarium) MCFG_GFXDECODE(aquarium) MCFG_PALETTE_LENGTH(0x1000/2) diff --git a/src/mame/drivers/arabian.c b/src/mame/drivers/arabian.c index 5ceab530ee3..9ad4875559a 100644 --- a/src/mame/drivers/arabian.c +++ b/src/mame/drivers/arabian.c @@ -374,7 +374,7 @@ static MACHINE_CONFIG_START( arabian, arabian_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(256, 256) MCFG_SCREEN_VISIBLE_AREA(0, 255, 11, 244) - MCFG_SCREEN_UPDATE_STATIC(arabian) + MCFG_SCREEN_UPDATE_DRIVER(arabian_state, screen_update_arabian) MCFG_PALETTE_LENGTH(256*32) diff --git a/src/mame/drivers/arcadecl.c b/src/mame/drivers/arcadecl.c index ac026539275..633042de663 100644 --- a/src/mame/drivers/arcadecl.c +++ b/src/mame/drivers/arcadecl.c @@ -343,7 +343,7 @@ static MACHINE_CONFIG_START( arcadecl, arcadecl_state ) /* note: these parameters are from published specs, not derived */ /* the board uses an SOS-2 chip to generate video signals */ MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 456, 0+12, 336+12, 262, 0, 240) - MCFG_SCREEN_UPDATE_STATIC(arcadecl) + MCFG_SCREEN_UPDATE_DRIVER(arcadecl_state, screen_update_arcadecl) MCFG_VIDEO_START_OVERRIDE(arcadecl_state,arcadecl) diff --git a/src/mame/drivers/arcadia.c b/src/mame/drivers/arcadia.c index 46060a6b935..4912e4ab055 100644 --- a/src/mame/drivers/arcadia.c +++ b/src/mame/drivers/arcadia.c @@ -325,7 +325,7 @@ static MACHINE_CONFIG_START( arcadia, arcadia_amiga_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(512*2, 262) MCFG_SCREEN_VISIBLE_AREA((129-8)*2, (449+8-1)*2, 44-8, 244+8-1) - MCFG_SCREEN_UPDATE_STATIC(amiga) + MCFG_SCREEN_UPDATE_DRIVER(amiga_state, screen_update_amiga) MCFG_PALETTE_LENGTH(4096) MCFG_PALETTE_INIT_OVERRIDE(arcadia_amiga_state,amiga) diff --git a/src/mame/drivers/argus.c b/src/mame/drivers/argus.c index 98bc279163f..0d9d2b4e8fb 100644 --- a/src/mame/drivers/argus.c +++ b/src/mame/drivers/argus.c @@ -559,7 +559,7 @@ static MACHINE_CONFIG_START( argus, argus_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0) /* This value is referred to psychic5 driver */) MCFG_SCREEN_SIZE(32*16, 32*16) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(argus) + MCFG_SCREEN_UPDATE_DRIVER(argus_state, screen_update_argus) MCFG_GFXDECODE(argus) MCFG_PALETTE_LENGTH(896) @@ -603,7 +603,7 @@ static MACHINE_CONFIG_START( valtric, argus_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0) /* This value is referred to psychic5 driver */) MCFG_SCREEN_SIZE(32*16, 32*16) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(valtric) + MCFG_SCREEN_UPDATE_DRIVER(argus_state, screen_update_valtric) MCFG_GFXDECODE(valtric) MCFG_PALETTE_LENGTH(768) @@ -647,7 +647,7 @@ static MACHINE_CONFIG_START( butasan, argus_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0) /* This value is taken from psychic5 driver */) MCFG_SCREEN_SIZE(32*16, 32*16) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) - MCFG_SCREEN_UPDATE_STATIC(butasan) + MCFG_SCREEN_UPDATE_DRIVER(argus_state, screen_update_butasan) MCFG_GFXDECODE(butasan) MCFG_PALETTE_LENGTH(768) diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c index 60721f6d406..d31bbdd52ec 100644 --- a/src/mame/drivers/aristmk4.c +++ b/src/mame/drivers/aristmk4.c @@ -321,6 +321,7 @@ public: virtual void video_start(); virtual void palette_init(); DECLARE_PALETTE_INIT(lions); + UINT32 screen_update_aristmk4(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; /* Partial Cashcade protocol */ @@ -370,9 +371,8 @@ INLINE void uBackgroundColour(running_machine &machine) } } -static SCREEN_UPDATE_IND16(aristmk4) +UINT32 aristmk4_state::screen_update_aristmk4(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - aristmk4_state *state = screen.machine().driver_data<aristmk4_state>(); gfx_element *gfx = screen.machine().gfx[0]; int x,y; int count = 0; @@ -386,14 +386,14 @@ static SCREEN_UPDATE_IND16(aristmk4) { for (x=38;x--;) { - color = ((state->m_mkiv_vram[count]) & 0xe0) >> 5; - tile = (state->m_mkiv_vram[count+1]|state->m_mkiv_vram[count]<<8) & 0x3ff; - bgtile = (state->m_mkiv_vram[count+1]|state->m_mkiv_vram[count]<<8) & 0xff; // first 256 tiles + color = ((m_mkiv_vram[count]) & 0xe0) >> 5; + tile = (m_mkiv_vram[count+1]|m_mkiv_vram[count]<<8) & 0x3ff; + bgtile = (m_mkiv_vram[count+1]|m_mkiv_vram[count]<<8) & 0xff; // first 256 tiles uBackgroundColour(screen.machine()); // read sw7 gfx->decode(bgtile); // force the machine to update only the first 256 tiles. // as we only update the background, not the entire display. - flipx = ((state->m_mkiv_vram[count]) & 0x04); - flipy = ((state->m_mkiv_vram[count]) & 0x08); + flipx = ((m_mkiv_vram[count]) & 0x04); + flipy = ((m_mkiv_vram[count]) & 0x08); drawgfx_opaque(bitmap,cliprect,gfx,tile,color,flipx,flipy,(38-x-1)<<3,(27-y-1)<<3); count+=2; } @@ -1699,7 +1699,7 @@ static MACHINE_CONFIG_START( aristmk4, aristmk4_state ) MCFG_GFXDECODE(aristmk4) MCFG_PALETTE_LENGTH(512) - MCFG_SCREEN_UPDATE_STATIC(aristmk4) + MCFG_SCREEN_UPDATE_DRIVER(aristmk4_state, screen_update_aristmk4) MCFG_I8255A_ADD( "ppi8255_0", ppi8255_intf ) MCFG_VIA6522_ADD("via6522_0", 0, via_interface) /* 1 MHz.(only 1 or 2 MHz.are valid) */ diff --git a/src/mame/drivers/aristmk6.c b/src/mame/drivers/aristmk6.c index adeccbdf856..196d25b8163 100644 --- a/src/mame/drivers/aristmk6.c +++ b/src/mame/drivers/aristmk6.c @@ -18,6 +18,7 @@ public: UINT8 m_type; DECLARE_READ64_MEMBER(test_r); virtual void video_start(); + UINT32 screen_update_aristmk6(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; @@ -25,51 +26,50 @@ void aristmk6_state::video_start() { } -SCREEN_UPDATE_RGB32(aristmk6) +UINT32 aristmk6_state::screen_update_aristmk6(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - aristmk6_state *state = screen.machine().driver_data<aristmk6_state>(); int x,y,count; - const UINT8 *blit_ram = state->memregion("maincpu")->base(); + const UINT8 *blit_ram = memregion("maincpu")->base(); if(screen.machine().input().code_pressed(KEYCODE_Z)) - state->m_test_x++; + m_test_x++; if(screen.machine().input().code_pressed(KEYCODE_X)) - state->m_test_x--; + m_test_x--; if(screen.machine().input().code_pressed(KEYCODE_A)) - state->m_test_y++; + m_test_y++; if(screen.machine().input().code_pressed(KEYCODE_S)) - state->m_test_y--; + m_test_y--; if(screen.machine().input().code_pressed(KEYCODE_Q)) - state->m_start_offs+=0x2000; + m_start_offs+=0x2000; if(screen.machine().input().code_pressed(KEYCODE_W)) - state->m_start_offs-=0x2000; + m_start_offs-=0x2000; if(screen.machine().input().code_pressed(KEYCODE_E)) - state->m_start_offs++; + m_start_offs++; if(screen.machine().input().code_pressed(KEYCODE_R)) - state->m_start_offs--; + m_start_offs--; if(screen.machine().input().code_pressed_once(KEYCODE_L)) - state->m_type^=1; + m_type^=1; - popmessage("%d %d %04x %d",state->m_test_x,state->m_test_y,state->m_start_offs,state->m_type); + popmessage("%d %d %04x %d",m_test_x,m_test_y,m_start_offs,m_type); bitmap.fill(get_black_pen(screen.machine()), cliprect); - count = (state->m_start_offs); + count = (m_start_offs); - for(y=0;y<state->m_test_y;y++) + for(y=0;y<m_test_y;y++) { - for(x=0;x<state->m_test_x;x++) + for(x=0;x<m_test_x;x++) { - if(state->m_type) + if(m_type) { UINT16 vram; int r,g,b; @@ -143,7 +143,7 @@ static MACHINE_CONFIG_START( aristmk6, aristmk6_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) - MCFG_SCREEN_UPDATE_STATIC(aristmk6) + MCFG_SCREEN_UPDATE_DRIVER(aristmk6_state, screen_update_aristmk6) MCFG_PALETTE_LENGTH(0x1000) diff --git a/src/mame/drivers/arkanoid.c b/src/mame/drivers/arkanoid.c index 773f5a06a52..488a277edf1 100644 --- a/src/mame/drivers/arkanoid.c +++ b/src/mame/drivers/arkanoid.c @@ -1036,7 +1036,7 @@ static MACHINE_CONFIG_START( arkanoid, arkanoid_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(arkanoid) + MCFG_SCREEN_UPDATE_DRIVER(arkanoid_state, screen_update_arkanoid) MCFG_GFXDECODE(arkanoid) MCFG_PALETTE_LENGTH(512) @@ -1069,7 +1069,7 @@ static MACHINE_CONFIG_START( hexa, arkanoid_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_STATIC(hexa) + MCFG_SCREEN_UPDATE_DRIVER(arkanoid_state, screen_update_hexa) MCFG_GFXDECODE(hexa) MCFG_PALETTE_LENGTH(256) diff --git a/src/mame/drivers/armedf.c b/src/mame/drivers/armedf.c index 6d69a25fb7f..adc126d88e5 100644 --- a/src/mame/drivers/armedf.c +++ b/src/mame/drivers/armedf.c @@ -1197,7 +1197,7 @@ static MACHINE_CONFIG_START( terraf, armedf_state ) MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 ) MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf) - MCFG_SCREEN_UPDATE_STATIC(armedf) + MCFG_SCREEN_UPDATE_DRIVER(armedf_state, screen_update_armedf) MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising) MCFG_GFXDECODE(armedf) @@ -1246,7 +1246,7 @@ static MACHINE_CONFIG_START( terrafb, armedf_state ) MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 ) MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf) - MCFG_SCREEN_UPDATE_STATIC(armedf) + MCFG_SCREEN_UPDATE_DRIVER(armedf_state, screen_update_armedf) MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising) MCFG_GFXDECODE(armedf) @@ -1290,7 +1290,7 @@ static MACHINE_CONFIG_START( kozure, armedf_state ) MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 ) // 320 x 240, trusted MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf) - MCFG_SCREEN_UPDATE_STATIC(armedf) + MCFG_SCREEN_UPDATE_DRIVER(armedf_state, screen_update_armedf) MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising) MCFG_GFXDECODE(armedf) @@ -1334,7 +1334,7 @@ static MACHINE_CONFIG_START( armedf, armedf_state ) MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 ) MCFG_VIDEO_START_OVERRIDE(armedf_state,armedf) - MCFG_SCREEN_UPDATE_STATIC(armedf) + MCFG_SCREEN_UPDATE_DRIVER(armedf_state, screen_update_armedf) MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising) MCFG_GFXDECODE(armedf) @@ -1378,7 +1378,7 @@ static MACHINE_CONFIG_START( cclimbr2, armedf_state ) MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf) - MCFG_SCREEN_UPDATE_STATIC(armedf) + MCFG_SCREEN_UPDATE_DRIVER(armedf_state, screen_update_armedf) MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising) MCFG_GFXDECODE(armedf) @@ -1422,7 +1422,7 @@ static MACHINE_CONFIG_START( legion, armedf_state ) MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf) - MCFG_SCREEN_UPDATE_STATIC(armedf) + MCFG_SCREEN_UPDATE_DRIVER(armedf_state, screen_update_armedf) MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising) MCFG_GFXDECODE(armedf) @@ -1466,7 +1466,7 @@ static MACHINE_CONFIG_START( legiono, armedf_state ) MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) MCFG_VIDEO_START_OVERRIDE(armedf_state,terraf) - MCFG_SCREEN_UPDATE_STATIC(armedf) + MCFG_SCREEN_UPDATE_DRIVER(armedf_state, screen_update_armedf) MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising) MCFG_GFXDECODE(armedf) @@ -1523,7 +1523,7 @@ static MACHINE_CONFIG_START( bigfghtr, bigfghtr_state ) MCFG_SCREEN_VISIBLE_AREA(12*8, (64-12)*8-1, 1*8, 31*8-1 ) MCFG_VIDEO_START_OVERRIDE(armedf_state,armedf) - MCFG_SCREEN_UPDATE_STATIC(armedf) + MCFG_SCREEN_UPDATE_DRIVER(armedf_state, screen_update_armedf) MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram16_device, vblank_copy_rising) MCFG_GFXDECODE(armedf) diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c index 6bed7ee151e..15467971f7b 100644 --- a/src/mame/drivers/ashnojoe.c +++ b/src/mame/drivers/ashnojoe.c @@ -364,7 +364,7 @@ static MACHINE_CONFIG_START( ashnojoe, ashnojoe_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(512, 512) MCFG_SCREEN_VISIBLE_AREA(14*8, 50*8-1, 3*8, 29*8-1) - MCFG_SCREEN_UPDATE_STATIC(ashnojoe) + MCFG_SCREEN_UPDATE_DRIVER(ashnojoe_state, screen_update_ashnojoe) MCFG_GFXDECODE(ashnojoe) MCFG_PALETTE_LENGTH(0x1000/2) diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c index 2ef76f54fdb..c329451a059 100644 --- a/src/mame/drivers/asterix.c +++ b/src/mame/drivers/asterix.c @@ -307,7 +307,7 @@ static MACHINE_CONFIG_START( asterix, asterix_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_UPDATE_STATIC(asterix) + MCFG_SCREEN_UPDATE_DRIVER(asterix_state, screen_update_asterix) MCFG_PALETTE_LENGTH(2048) diff --git a/src/mame/drivers/astinvad.c b/src/mame/drivers/astinvad.c index c01646523f0..f74835e4a43 100644 --- a/src/mame/drivers/astinvad.c +++ b/src/mame/drivers/astinvad.c @@ -81,6 +81,8 @@ public: DECLARE_MACHINE_START(spaceint); DECLARE_MACHINE_RESET(spaceint); DECLARE_VIDEO_START(spaceint); + UINT32 screen_update_astinvad(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + UINT32 screen_update_spaceint(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; @@ -167,36 +169,34 @@ static void plot_byte( running_machine &machine, bitmap_rgb32 &bitmap, UINT8 y, } -static SCREEN_UPDATE_RGB32( astinvad ) +UINT32 astinvad_state::screen_update_astinvad(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - astinvad_state *state = screen.machine().driver_data<astinvad_state>(); - const UINT8 *color_prom = state->memregion("proms")->base(); - UINT8 yoffs = state->m_flip_yoffs & state->m_screen_flip; + const UINT8 *color_prom = memregion("proms")->base(); + UINT8 yoffs = m_flip_yoffs & m_screen_flip; int x, y; /* render the visible pixels */ for (y = cliprect.min_y; y <= cliprect.max_y; y++) for (x = cliprect.min_x & ~7; x <= cliprect.max_x; x += 8) { - UINT8 color = color_prom[((y & 0xf8) << 2) | (x >> 3)] >> (state->m_screen_flip ? 0 : 4); - UINT8 data = state->m_videoram[(((y ^ state->m_screen_flip) + yoffs) << 5) | ((x ^ state->m_screen_flip) >> 3)]; - plot_byte(screen.machine(), bitmap, y, x, data, state->m_screen_red ? 1 : color); + UINT8 color = color_prom[((y & 0xf8) << 2) | (x >> 3)] >> (m_screen_flip ? 0 : 4); + UINT8 data = m_videoram[(((y ^ m_screen_flip) + yoffs) << 5) | ((x ^ m_screen_flip) >> 3)]; + plot_byte(screen.machine(), bitmap, y, x, data, m_screen_red ? 1 : color); } return 0; } -static SCREEN_UPDATE_RGB32( spaceint ) +UINT32 astinvad_state::screen_update_spaceint(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - astinvad_state *state = screen.machine().driver_data<astinvad_state>(); - const UINT8 *color_prom = state->memregion("proms")->base(); + const UINT8 *color_prom = memregion("proms")->base(); int offs; - for (offs = 0; offs < state->m_videoram.bytes(); offs++) + for (offs = 0; offs < m_videoram.bytes(); offs++) { - UINT8 data = state->m_videoram[offs]; - UINT8 color = state->m_colorram[offs]; + UINT8 data = m_videoram[offs]; + UINT8 color = m_colorram[offs]; UINT8 y = ~offs; UINT8 x = offs >> 8 << 3; @@ -601,7 +601,7 @@ static MACHINE_CONFIG_START( kamikaze, astinvad_state ) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK, 320, 0, 256, 256, 32, 256) - MCFG_SCREEN_UPDATE_STATIC(astinvad) + MCFG_SCREEN_UPDATE_DRIVER(astinvad_state, screen_update_astinvad) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -637,7 +637,7 @@ static MACHINE_CONFIG_START( spaceint, astinvad_state ) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_UPDATE_STATIC(spaceint) + MCFG_SCREEN_UPDATE_DRIVER(astinvad_state, screen_update_spaceint) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c index 074995f8b10..9e404c1fae2 100644 --- a/src/mame/drivers/astrocde.c +++ b/src/mame/drivers/astrocde.c @@ -1298,7 +1298,7 @@ static MACHINE_CONFIG_START( astrocade_base, astrocde_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(ASTROCADE_CLOCK, 455, 0, 352, 262, 0, 240) MCFG_SCREEN_DEFAULT_POSITION(1.1, 0.0, 1.18, -0.018) /* clip out borders */ - MCFG_SCREEN_UPDATE_STATIC(astrocde) + MCFG_SCREEN_UPDATE_DRIVER(astrocde_state, screen_update_astrocde) MACHINE_CONFIG_END @@ -1315,7 +1315,7 @@ static MACHINE_CONFIG_DERIVED( astrocade_16color_base, astrocade_base ) MCFG_VIDEO_START_OVERRIDE(astrocde_state,profpac) MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(profpac) + MCFG_SCREEN_UPDATE_DRIVER(astrocde_state, screen_update_profpac) MACHINE_CONFIG_END diff --git a/src/mame/drivers/astrocorp.c b/src/mame/drivers/astrocorp.c index d4c724cf22e..84198b42790 100644 --- a/src/mame/drivers/astrocorp.c +++ b/src/mame/drivers/astrocorp.c @@ -64,6 +64,7 @@ public: DECLARE_DRIVER_INIT(showhanc); DECLARE_DRIVER_INIT(showhand); DECLARE_VIDEO_START(astrocorp); + UINT32 screen_update_astrocorp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; /*************************************************************************** @@ -150,12 +151,11 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const } } -static SCREEN_UPDATE_IND16(astrocorp) +UINT32 astrocorp_state::screen_update_astrocorp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - astrocorp_state *state = screen.machine().driver_data<astrocorp_state>(); - if (state->m_screen_enable & 1) - copybitmap(bitmap, state->m_bitmap, 0,0,0,0, cliprect); + if (m_screen_enable & 1) + copybitmap(bitmap, m_bitmap, 0,0,0,0, cliprect); else bitmap.fill(get_black_pen(screen.machine()), cliprect); @@ -487,7 +487,7 @@ static MACHINE_CONFIG_START( showhand, astrocorp_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(320, 240) MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 240-1) - MCFG_SCREEN_UPDATE_STATIC(astrocorp) + MCFG_SCREEN_UPDATE_DRIVER(astrocorp_state, screen_update_astrocorp) MCFG_GFXDECODE(astrocorp) MCFG_PALETTE_LENGTH(0x100) @@ -538,7 +538,7 @@ static MACHINE_CONFIG_START( skilldrp, astrocorp_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(0x200, 0x100) MCFG_SCREEN_VISIBLE_AREA(0, 0x200-1, 0, 0xf0-1) - MCFG_SCREEN_UPDATE_STATIC(astrocorp) + MCFG_SCREEN_UPDATE_DRIVER(astrocorp_state, screen_update_astrocorp) MCFG_GFXDECODE(astrocorp) MCFG_PALETTE_LENGTH(0x100) diff --git a/src/mame/drivers/astrof.c b/src/mame/drivers/astrof.c index 7039cec625a..07d09b1e736 100644 --- a/src/mame/drivers/astrof.c +++ b/src/mame/drivers/astrof.c @@ -413,7 +413,7 @@ static void video_update_common( running_machine &machine, bitmap_rgb32 &bitmap, } -static SCREEN_UPDATE_RGB32( astrof ) +UINT32 astrof_state::screen_update_astrof(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { pen_t pens[ASTROF_NUM_PENS]; @@ -425,7 +425,7 @@ static SCREEN_UPDATE_RGB32( astrof ) } -static SCREEN_UPDATE_RGB32( tomahawk ) +UINT32 astrof_state::screen_update_tomahawk(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { pen_t pens[TOMAHAWK_NUM_PENS]; @@ -962,7 +962,7 @@ static MACHINE_CONFIG_DERIVED( astrof, base ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(astrof) + MCFG_SCREEN_UPDATE_DRIVER(astrof_state, screen_update_astrof) /* audio hardware */ MCFG_FRAGMENT_ADD(astrof_audio) @@ -988,7 +988,7 @@ static MACHINE_CONFIG_DERIVED( spfghmk2, base ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(astrof) + MCFG_SCREEN_UPDATE_DRIVER(astrof_state, screen_update_astrof) /* audio hardware */ MCFG_FRAGMENT_ADD(spfghmk2_audio) @@ -1005,7 +1005,7 @@ static MACHINE_CONFIG_DERIVED( tomahawk, base ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(tomahawk) + MCFG_SCREEN_UPDATE_DRIVER(astrof_state, screen_update_tomahawk) /* audio hardware */ MCFG_FRAGMENT_ADD(tomahawk_audio) diff --git a/src/mame/drivers/asuka.c b/src/mame/drivers/asuka.c index e4aca9360e0..ae6f37a6c38 100644 --- a/src/mame/drivers/asuka.c +++ b/src/mame/drivers/asuka.c @@ -870,13 +870,12 @@ void asuka_state::machine_reset() memset(m_cval, 0, 26); } -static SCREEN_VBLANK( asuka ) +void asuka_state::screen_eof_asuka(screen_device &screen, bool state) { // rising edge - if (vblank_on) + if (state) { - asuka_state *state = screen.machine().driver_data<asuka_state>(); - pc090oj_eof_callback(state->m_pc090oj); + pc090oj_eof_callback(m_pc090oj); } } @@ -911,8 +910,8 @@ static MACHINE_CONFIG_START( bonzeadv, asuka_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(40*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 3*8, 31*8-1) - MCFG_SCREEN_UPDATE_STATIC(bonzeadv) - MCFG_SCREEN_VBLANK_STATIC(asuka) + MCFG_SCREEN_UPDATE_DRIVER(asuka_state, screen_update_bonzeadv) + MCFG_SCREEN_VBLANK_DRIVER(asuka_state, screen_eof_asuka) MCFG_GFXDECODE(asuka) MCFG_PALETTE_LENGTH(4096) @@ -954,8 +953,8 @@ static MACHINE_CONFIG_START( asuka, asuka_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(40*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(asuka) - MCFG_SCREEN_VBLANK_STATIC(asuka) + MCFG_SCREEN_UPDATE_DRIVER(asuka_state, screen_update_asuka) + MCFG_SCREEN_VBLANK_DRIVER(asuka_state, screen_eof_asuka) MCFG_GFXDECODE(asuka) MCFG_PALETTE_LENGTH(4096) @@ -1004,8 +1003,8 @@ static MACHINE_CONFIG_START( cadash, asuka_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(40*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(bonzeadv) - MCFG_SCREEN_VBLANK_STATIC(asuka) + MCFG_SCREEN_UPDATE_DRIVER(asuka_state, screen_update_bonzeadv) + MCFG_SCREEN_VBLANK_DRIVER(asuka_state, screen_eof_asuka) MCFG_GFXDECODE(asuka) MCFG_PALETTE_LENGTH(4096) @@ -1046,8 +1045,8 @@ static MACHINE_CONFIG_START( mofflott, asuka_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(40*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(asuka) - MCFG_SCREEN_VBLANK_STATIC(asuka) + MCFG_SCREEN_UPDATE_DRIVER(asuka_state, screen_update_asuka) + MCFG_SCREEN_VBLANK_DRIVER(asuka_state, screen_eof_asuka) MCFG_GFXDECODE(asuka) MCFG_PALETTE_LENGTH(4096) /* only Mofflott uses full palette space */ @@ -1092,8 +1091,8 @@ static MACHINE_CONFIG_START( galmedes, asuka_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(40*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(asuka) - MCFG_SCREEN_VBLANK_STATIC(asuka) + MCFG_SCREEN_UPDATE_DRIVER(asuka_state, screen_update_asuka) + MCFG_SCREEN_VBLANK_DRIVER(asuka_state, screen_eof_asuka) MCFG_GFXDECODE(asuka) MCFG_PALETTE_LENGTH(4096) /* only Mofflott uses full palette space */ @@ -1134,8 +1133,8 @@ static MACHINE_CONFIG_START( eto, asuka_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(40*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(asuka) - MCFG_SCREEN_VBLANK_STATIC(asuka) + MCFG_SCREEN_UPDATE_DRIVER(asuka_state, screen_update_asuka) + MCFG_SCREEN_VBLANK_DRIVER(asuka_state, screen_eof_asuka) MCFG_GFXDECODE(asuka) MCFG_PALETTE_LENGTH(4096) diff --git a/src/mame/drivers/atarifb.c b/src/mame/drivers/atarifb.c index b59119ce99b..335c2460b34 100644 --- a/src/mame/drivers/atarifb.c +++ b/src/mame/drivers/atarifb.c @@ -564,7 +564,7 @@ static MACHINE_CONFIG_START( atarifb, atarifb_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2037) /* 16.3ms * 1/8 = 2037.5. Is it 1/8th or 3/32nds? (1528?) */) MCFG_SCREEN_SIZE(38*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 38*8-1, 1*8, 31*8-1) - MCFG_SCREEN_UPDATE_STATIC(atarifb) + MCFG_SCREEN_UPDATE_DRIVER(atarifb_state, screen_update_atarifb) MCFG_GFXDECODE(atarifb) MCFG_PALETTE_LENGTH(12) @@ -595,7 +595,7 @@ static MACHINE_CONFIG_DERIVED( abaseb, atarifb ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") - MCFG_SCREEN_UPDATE_STATIC(abaseb) + MCFG_SCREEN_UPDATE_DRIVER(atarifb_state, screen_update_abaseb) /* sound hardware */ MCFG_SOUND_REPLACE("discrete", DISCRETE, 0) @@ -613,7 +613,7 @@ static MACHINE_CONFIG_DERIVED( soccer, atarifb ) /* video hardware */ MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VISIBLE_AREA(0*8, 38*8-1, 2*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(soccer) + MCFG_SCREEN_UPDATE_DRIVER(atarifb_state, screen_update_soccer) MCFG_GFXDECODE(soccer) MACHINE_CONFIG_END diff --git a/src/mame/drivers/atarig1.c b/src/mame/drivers/atarig1.c index 09618e0f558..1c2281f0212 100644 --- a/src/mame/drivers/atarig1.c +++ b/src/mame/drivers/atarig1.c @@ -463,8 +463,8 @@ static MACHINE_CONFIG_START( atarig1, atarig1_state ) MCFG_SCREEN_ADD("screen", RASTER) /* note: these parameters are from published specs, not derived */ MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240) - MCFG_SCREEN_UPDATE_STATIC(atarig1) - MCFG_SCREEN_VBLANK_STATIC(atarig1) + MCFG_SCREEN_UPDATE_DRIVER(atarig1_state, screen_update_atarig1) + MCFG_SCREEN_VBLANK_DRIVER(atarig1_state, screen_eof_atarig1) MCFG_VIDEO_START_OVERRIDE(atarig1_state,atarig1) diff --git a/src/mame/drivers/atarig42.c b/src/mame/drivers/atarig42.c index fc2d3b16c80..12d9f12eb5a 100644 --- a/src/mame/drivers/atarig42.c +++ b/src/mame/drivers/atarig42.c @@ -569,8 +569,8 @@ static MACHINE_CONFIG_START( atarig42, atarig42_state ) /* note: these parameters are from published specs, not derived */ /* the board uses an SOS chip to generate video signals */ MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240) - MCFG_SCREEN_UPDATE_STATIC(atarig42) - MCFG_SCREEN_VBLANK_STATIC(atarig42) + MCFG_SCREEN_UPDATE_DRIVER(atarig42_state, screen_update_atarig42) + MCFG_SCREEN_VBLANK_DRIVER(atarig42_state, screen_eof_atarig42) MCFG_VIDEO_START_OVERRIDE(atarig42_state,atarig42) diff --git a/src/mame/drivers/atarigt.c b/src/mame/drivers/atarigt.c index f2b70528324..e4869b338e8 100644 --- a/src/mame/drivers/atarigt.c +++ b/src/mame/drivers/atarigt.c @@ -826,8 +826,8 @@ static MACHINE_CONFIG_START( atarigt, atarigt_state ) /* note: these parameters are from published specs, not derived */ /* the board uses a pair of GALs to determine H and V parameters */ MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240) - MCFG_SCREEN_UPDATE_STATIC(atarigt) - MCFG_SCREEN_VBLANK_STATIC(atarigt) + MCFG_SCREEN_UPDATE_DRIVER(atarigt_state, screen_update_atarigt) + MCFG_SCREEN_VBLANK_DRIVER(atarigt_state, screen_eof_atarigt) MCFG_VIDEO_START_OVERRIDE(atarigt_state,atarigt) diff --git a/src/mame/drivers/atarigx2.c b/src/mame/drivers/atarigx2.c index 326dea91a2c..8f93e26edbd 100644 --- a/src/mame/drivers/atarigx2.c +++ b/src/mame/drivers/atarigx2.c @@ -1446,8 +1446,8 @@ static MACHINE_CONFIG_START( atarigx2, atarigx2_state ) /* note: these parameters are from published specs, not derived */ /* the board uses a pair of GALs to determine H and V parameters */ MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240) - MCFG_SCREEN_UPDATE_STATIC(atarigx2) - MCFG_SCREEN_VBLANK_STATIC(atarigx2) + MCFG_SCREEN_UPDATE_DRIVER(atarigx2_state, screen_update_atarigx2) + MCFG_SCREEN_VBLANK_DRIVER(atarigx2_state, screen_eof_atarigx2) MCFG_VIDEO_START_OVERRIDE(atarigx2_state,atarigx2) diff --git a/src/mame/drivers/atarisy1.c b/src/mame/drivers/atarisy1.c index d3f9ad222d4..ada267edfc7 100644 --- a/src/mame/drivers/atarisy1.c +++ b/src/mame/drivers/atarisy1.c @@ -785,7 +785,7 @@ static MACHINE_CONFIG_START( atarisy1, atarisy1_state ) /* note: these parameters are from published specs, not derived */ /* video timing comes from an 82S163 (H) and an 82S129 (V) */ MCFG_SCREEN_RAW_PARAMS(ATARI_CLOCK_14MHz/2, 456, 0, 336, 262, 0, 240) - MCFG_SCREEN_UPDATE_STATIC(atarisy1) + MCFG_SCREEN_UPDATE_DRIVER(atarisy1_state, screen_update_atarisy1) MCFG_VIDEO_START_OVERRIDE(atarisy1_state,atarisy1) diff --git a/src/mame/drivers/atarisy2.c b/src/mame/drivers/atarisy2.c index d7e33dadbdb..dd03234c812 100644 --- a/src/mame/drivers/atarisy2.c +++ b/src/mame/drivers/atarisy2.c @@ -1279,7 +1279,7 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(VIDEO_CLOCK/2, 640, 0, 512, 416, 0, 384) - MCFG_SCREEN_UPDATE_STATIC(atarisy2) + MCFG_SCREEN_UPDATE_DRIVER(atarisy2_state, screen_update_atarisy2) MCFG_VIDEO_START_OVERRIDE(atarisy2_state,atarisy2) diff --git a/src/mame/drivers/atarisy4.c b/src/mame/drivers/atarisy4.c index 353939fecd4..af85a7cb49e 100644 --- a/src/mame/drivers/atarisy4.c +++ b/src/mame/drivers/atarisy4.c @@ -58,6 +58,7 @@ public: virtual void video_start(); virtual void video_reset(); DECLARE_MACHINE_RESET(airrace); + UINT32 screen_update_atarisy4(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; @@ -155,9 +156,8 @@ void atarisy4_state::video_reset() gpu.vblank_wait = 0; } -static SCREEN_UPDATE_RGB32( atarisy4 ) +UINT32 atarisy4_state::screen_update_atarisy4(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - atarisy4_state *state = screen.machine().driver_data<atarisy4_state>(); int y; UINT32 offset = 0; @@ -174,7 +174,7 @@ static SCREEN_UPDATE_RGB32( atarisy4 ) for (y = cliprect.min_y; y <= cliprect.max_y; ++y) { - UINT16 *src = &state->m_screen_ram[(offset + (4096 * y)) / 2]; + UINT16 *src = &m_screen_ram[(offset + (4096 * y)) / 2]; UINT32 *dest = &bitmap.pix32(y, cliprect.min_x); int x; @@ -740,7 +740,7 @@ static MACHINE_CONFIG_START( atarisy4, atarisy4_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(32000000/2, 660, 0, 512, 404, 0, 384) MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) - MCFG_SCREEN_UPDATE_STATIC(atarisy4) + MCFG_SCREEN_UPDATE_DRIVER(atarisy4_state, screen_update_atarisy4) MCFG_PALETTE_LENGTH(256) MACHINE_CONFIG_END diff --git a/src/mame/drivers/atetris.c b/src/mame/drivers/atetris.c index 23309f483e7..6ec79b58832 100644 --- a/src/mame/drivers/atetris.c +++ b/src/mame/drivers/atetris.c @@ -354,7 +354,7 @@ static MACHINE_CONFIG_START( atetris, atetris_state ) /* note: these parameters are from published specs, not derived */ /* the board uses an SOS-2 chip to generate video signals */ MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 456, 0, 336, 262, 0, 240) - MCFG_SCREEN_UPDATE_STATIC(atetris) + MCFG_SCREEN_UPDATE_DRIVER(atetris_state, screen_update_atetris) /* sound hardware */ @@ -386,7 +386,7 @@ static MACHINE_CONFIG_START( atetrisb2, atetris_state ) /* note: these parameters are from published specs, not derived */ /* the board uses an SOS-2 chip to generate video signals */ MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 456, 0, 336, 262, 0, 240) - MCFG_SCREEN_UPDATE_STATIC(atetris) + MCFG_SCREEN_UPDATE_DRIVER(atetris_state, screen_update_atetris) /* sound hardware */ diff --git a/src/mame/drivers/atlantis.c b/src/mame/drivers/atlantis.c index 9f2ee47543a..5ae2fa314eb 100644 --- a/src/mame/drivers/atlantis.c +++ b/src/mame/drivers/atlantis.c @@ -48,6 +48,7 @@ public: DECLARE_DRIVER_INIT(mwskins); virtual void machine_start(); virtual void machine_reset(); + UINT32 screen_update_mwskins(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -85,7 +86,7 @@ void atlantis_state::machine_reset() * *************************************/ -static SCREEN_UPDATE_IND16( mwskins ) +UINT32 atlantis_state::screen_update_mwskins(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return 0; } @@ -166,7 +167,7 @@ static MACHINE_CONFIG_START( mwskins, atlantis_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(320, 240) MCFG_SCREEN_VISIBLE_AREA(0, 319, 0, 239) - MCFG_SCREEN_UPDATE_STATIC(mwskins) + MCFG_SCREEN_UPDATE_DRIVER(atlantis_state, screen_update_mwskins) MCFG_PALETTE_INIT(BBBBB_GGGGG_RRRRR) MCFG_PALETTE_LENGTH(32768) diff --git a/src/mame/drivers/atvtrack.c b/src/mame/drivers/atvtrack.c index 144907e50b7..76dc617eaf4 100644 --- a/src/mame/drivers/atvtrack.c +++ b/src/mame/drivers/atvtrack.c @@ -85,6 +85,7 @@ public: virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); + UINT32 screen_update_atvtrack(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); }; static void logbinary(UINT32 data,int high=31,int low=0) @@ -318,7 +319,7 @@ void atvtrack_state::video_start() { } -SCREEN_UPDATE_RGB32(atvtrack) +UINT32 atvtrack_state::screen_update_atvtrack(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return 0; } @@ -401,7 +402,7 @@ static MACHINE_CONFIG_START( atvtrack, atvtrack_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) - MCFG_SCREEN_UPDATE_STATIC(atvtrack) + MCFG_SCREEN_UPDATE_DRIVER(atvtrack_state, screen_update_atvtrack) MCFG_PALETTE_LENGTH(0x1000) diff --git a/src/mame/drivers/avalnche.c b/src/mame/drivers/avalnche.c index 635b8b7c1af..8a0eecc22c4 100644 --- a/src/mame/drivers/avalnche.c +++ b/src/mame/drivers/avalnche.c @@ -44,24 +44,23 @@ * *************************************/ -static SCREEN_UPDATE_RGB32( avalnche ) +UINT32 avalnche_state::screen_update_avalnche(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - avalnche_state *state = screen.machine().driver_data<avalnche_state>(); offs_t offs; - for (offs = 0; offs < state->m_videoram.bytes(); offs++) + for (offs = 0; offs < m_videoram.bytes(); offs++) { int i; UINT8 x = offs << 3; int y = offs >> 5; - UINT8 data = state->m_videoram[offs]; + UINT8 data = m_videoram[offs]; for (i = 0; i < 8; i++) { pen_t pen; - if (state->m_avalance_video_inverted) + if (m_avalance_video_inverted) pen = (data & 0x80) ? RGB_WHITE : RGB_BLACK; else pen = (data & 0x80) ? RGB_BLACK : RGB_WHITE; @@ -258,7 +257,7 @@ static MACHINE_CONFIG_START( avalnche, avalnche_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 32*8-1) - MCFG_SCREEN_UPDATE_STATIC(avalnche) + MCFG_SCREEN_UPDATE_DRIVER(avalnche_state, screen_update_avalnche) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mame/drivers/avt.c b/src/mame/drivers/avt.c index 477a6c82b65..08fe2374178 100644 --- a/src/mame/drivers/avt.c +++ b/src/mame/drivers/avt.c @@ -444,15 +444,16 @@ public: TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void video_start(); virtual void palette_init(); + UINT32 screen_update_avt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; #define mc6845_h_char_total (state->m_crtc_vreg[0]) -#define mc684 |