mirror of
https://github.com/holub/mame
synced 2025-07-05 01:48:29 +03:00
Video System 13/10/12 cleanups and preparation for further function merging. From Haze (nw)
This commit is contained in:
parent
c96a987479
commit
211ce49fc2
@ -1484,6 +1484,7 @@ static MACHINE_CONFIG_START( karatblz, aerofgt_state )
|
|||||||
MCFG_PALETTE_LENGTH(1024)
|
MCFG_PALETTE_LENGTH(1024)
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
||||||
|
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz)
|
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz)
|
||||||
|
|
||||||
@ -1525,6 +1526,7 @@ static MACHINE_CONFIG_START( spinlbrk, aerofgt_state )
|
|||||||
MCFG_PALETTE_LENGTH(1024)
|
MCFG_PALETTE_LENGTH(1024)
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
||||||
|
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,spinlbrk)
|
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,spinlbrk)
|
||||||
|
|
||||||
@ -1566,6 +1568,7 @@ static MACHINE_CONFIG_START( turbofrc, aerofgt_state )
|
|||||||
MCFG_PALETTE_LENGTH(1024)
|
MCFG_PALETTE_LENGTH(1024)
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
||||||
|
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
|
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
|
||||||
|
|
||||||
@ -1608,6 +1611,7 @@ static MACHINE_CONFIG_START( aerofgtb, aerofgt_state )
|
|||||||
MCFG_PALETTE_LENGTH(1024)
|
MCFG_PALETTE_LENGTH(1024)
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
||||||
|
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
|
MCFG_VIDEO_START_OVERRIDE(aerofgt_state,turbofrc)
|
||||||
|
|
||||||
|
@ -477,6 +477,7 @@ static MACHINE_CONFIG_START( f1gp, f1gp_state )
|
|||||||
MCFG_PALETTE_LENGTH(2048)
|
MCFG_PALETTE_LENGTH(2048)
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
MCFG_DEVICE_ADD("vsystem_spr_old", VSYSTEM_SPR2, 0)
|
||||||
|
MCFG_DEVICE_ADD("vsystem_spr_ol2", VSYSTEM_SPR2, 0)
|
||||||
|
|
||||||
MCFG_VIDEO_START_OVERRIDE(f1gp_state,f1gp)
|
MCFG_VIDEO_START_OVERRIDE(f1gp_state,f1gp)
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ static ADDRESS_MAP_START( inufuku_map, AS_PROGRAM, 16, inufuku_state )
|
|||||||
|
|
||||||
AM_RANGE(0x780000, 0x780013) AM_WRITE(inufuku_palettereg_w) // bg & text palettebank register
|
AM_RANGE(0x780000, 0x780013) AM_WRITE(inufuku_palettereg_w) // bg & text palettebank register
|
||||||
AM_RANGE(0x7a0000, 0x7a0023) AM_WRITE(inufuku_scrollreg_w) // bg & text scroll register
|
AM_RANGE(0x7a0000, 0x7a0023) AM_WRITE(inufuku_scrollreg_w) // bg & text scroll register
|
||||||
AM_RANGE(0x7e0000, 0x7e0001) AM_WRITENOP // ?
|
// AM_RANGE(0x7e0000, 0x7e0001) AM_WRITENOP // ?
|
||||||
|
|
||||||
AM_RANGE(0x800000, 0xbfffff) AM_ROM // data rom
|
AM_RANGE(0x800000, 0xbfffff) AM_ROM // data rom
|
||||||
AM_RANGE(0xfd0000, 0xfdffff) AM_RAM // work ram
|
AM_RANGE(0xfd0000, 0xfdffff) AM_RAM // work ram
|
||||||
@ -390,11 +390,13 @@ static MACHINE_CONFIG_START( inufuku, inufuku_state )
|
|||||||
MCFG_SCREEN_REFRESH_RATE(60)
|
MCFG_SCREEN_REFRESH_RATE(60)
|
||||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2300))
|
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2300))
|
||||||
MCFG_SCREEN_SIZE(2048, 256)
|
MCFG_SCREEN_SIZE(2048, 256)
|
||||||
MCFG_SCREEN_VISIBLE_AREA(0, 319-1, 1, 224-1)
|
MCFG_SCREEN_VISIBLE_AREA(0, 319, 0, 223)
|
||||||
MCFG_SCREEN_UPDATE_DRIVER(inufuku_state, screen_update_inufuku)
|
MCFG_SCREEN_UPDATE_DRIVER(inufuku_state, screen_update_inufuku)
|
||||||
MCFG_SCREEN_VBLANK_DRIVER(inufuku_state, screen_eof_inufuku)
|
MCFG_SCREEN_VBLANK_DRIVER(inufuku_state, screen_eof_inufuku)
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0)
|
MCFG_DEVICE_ADD("vsystem_spr", VSYSTEM_SPR, 0)
|
||||||
|
vsystem_spr_device::set_offsets(*device, 0,1); // reference videos confirm at least the +1 against tilemaps in 3on3dunk (the highscore header text and black box are meant to be 1 pixel misaligned, although there is currently a priority bug there too)
|
||||||
|
vsystem_spr_device::set_pdraw(*device, true);
|
||||||
|
|
||||||
MCFG_GFXDECODE(inufuku)
|
MCFG_GFXDECODE(inufuku)
|
||||||
MCFG_PALETTE_LENGTH(4096)
|
MCFG_PALETTE_LENGTH(4096)
|
||||||
@ -488,4 +490,4 @@ ROM_END
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
GAME( 1998, inufuku, 0, inufuku, inufuku, driver_device, 0, ROT0, "Video System Co.", "Quiz & Variety Sukusuku Inufuku (Japan)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
GAME( 1998, inufuku, 0, inufuku, inufuku, driver_device, 0, ROT0, "Video System Co.", "Quiz & Variety Sukusuku Inufuku (Japan)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
||||||
GAME( 1996, 3on3dunk, 0, _3on3dunk, inufuku, driver_device, 0, ROT0, "Video System Co.", "3 On 3 Dunk Madness (US, prototype? 1997/02/04)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
GAME( 1996, 3on3dunk, 0, _3on3dunk, inufuku, driver_device, 0, ROT0, "Video System Co.", "3 On 3 Dunk Madness (US, prototype? 1997/02/04)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS ) // tilemap priority is wrong in places (basketball before explosion in attract, highscores)
|
||||||
|
@ -15,7 +15,8 @@ public:
|
|||||||
m_spriteram3(*this, "spriteram3"),
|
m_spriteram3(*this, "spriteram3"),
|
||||||
m_tx_tilemap_ram(*this, "tx_tilemap_ram"),
|
m_tx_tilemap_ram(*this, "tx_tilemap_ram"),
|
||||||
m_spr(*this, "vsystem_spr"),
|
m_spr(*this, "vsystem_spr"),
|
||||||
m_spr_old(*this, "vsystem_spr_old")
|
m_spr_old(*this, "vsystem_spr_old"),
|
||||||
|
m_spr_old2(*this, "vsystem_spr_ol2")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
@ -32,6 +33,7 @@ public:
|
|||||||
/* devices referenced above */
|
/* devices referenced above */
|
||||||
optional_device<vsystem_spr_device> m_spr; // only the aerofgt parent uses this chip
|
optional_device<vsystem_spr_device> m_spr; // only the aerofgt parent uses this chip
|
||||||
optional_device<vsystem_spr2_device> m_spr_old; // every other (non-bootleg) uses this
|
optional_device<vsystem_spr2_device> m_spr_old; // every other (non-bootleg) uses this
|
||||||
|
optional_device<vsystem_spr2_device> m_spr_old2; // or a pair of them..
|
||||||
|
|
||||||
|
|
||||||
/* video-related */
|
/* video-related */
|
||||||
|
@ -19,6 +19,7 @@ public:
|
|||||||
m_fgregs(*this, "fgregs"),
|
m_fgregs(*this, "fgregs"),
|
||||||
m_rozregs(*this, "rozregs"),
|
m_rozregs(*this, "rozregs"),
|
||||||
m_spr_old(*this, "vsystem_spr_old"),
|
m_spr_old(*this, "vsystem_spr_old"),
|
||||||
|
m_spr_old2(*this, "vsystem_spr_ol2"),
|
||||||
m_spr(*this, "vsystem_spr")
|
m_spr(*this, "vsystem_spr")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@ -38,6 +39,7 @@ public:
|
|||||||
|
|
||||||
/* devices referenced above */
|
/* devices referenced above */
|
||||||
optional_device<vsystem_spr2_device> m_spr_old; // f1gp
|
optional_device<vsystem_spr2_device> m_spr_old; // f1gp
|
||||||
|
optional_device<vsystem_spr2_device> m_spr_old2; // f1gp
|
||||||
optional_device<vsystem_spr_device> m_spr; // f1gp2
|
optional_device<vsystem_spr_device> m_spr; // f1gp2
|
||||||
|
|
||||||
|
|
||||||
|
@ -290,8 +290,8 @@ UINT32 aerofgt_state::screen_update_pspikes(screen_device &screen, bitmap_ind16
|
|||||||
machine().priority_bitmap.fill(0, cliprect);
|
machine().priority_bitmap.fill(0, cliprect);
|
||||||
|
|
||||||
m_bg1_tilemap->draw(bitmap, cliprect, 0, 0);
|
m_bg1_tilemap->draw(bitmap, cliprect, 0, 0);
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, -1);
|
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, -1);
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, 0);
|
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,10 +309,11 @@ UINT32 aerofgt_state::screen_update_karatblz(screen_device &screen, bitmap_ind16
|
|||||||
m_bg2_tilemap->draw(bitmap, cliprect, 0, 0);
|
m_bg2_tilemap->draw(bitmap, cliprect, 0, 0);
|
||||||
|
|
||||||
/* we use the priority buffer so sprites are drawn front to back */
|
/* we use the priority buffer so sprites are drawn front to back */
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 1, -1);
|
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, -1);
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 1, 0);
|
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, 0);
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, -1);
|
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, 0);
|
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, -1);
|
||||||
|
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,10 +335,11 @@ UINT32 aerofgt_state::screen_update_spinlbrk(screen_device &screen, bitmap_ind16
|
|||||||
m_bg2_tilemap->draw(bitmap, cliprect, 0, 1);
|
m_bg2_tilemap->draw(bitmap, cliprect, 0, 1);
|
||||||
|
|
||||||
/* we use the priority buffer so sprites are drawn front to back */
|
/* we use the priority buffer so sprites are drawn front to back */
|
||||||
m_spr_old->spinlbrk_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, 0);
|
m_spr_old->spinlbrk_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, 0);
|
||||||
m_spr_old->spinlbrk_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, -1);
|
m_spr_old->spinlbrk_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, -1);
|
||||||
m_spr_old->spinlbrk_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 1, 0);
|
|
||||||
m_spr_old->spinlbrk_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 1, -1);
|
m_spr_old2->spinlbrk_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, 0);
|
||||||
|
m_spr_old2->spinlbrk_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, -1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,10 +362,11 @@ UINT32 aerofgt_state::screen_update_turbofrc(screen_device &screen, bitmap_ind16
|
|||||||
m_bg2_tilemap->draw(bitmap, cliprect, 0, 1);
|
m_bg2_tilemap->draw(bitmap, cliprect, 0, 1);
|
||||||
|
|
||||||
/* we use the priority buffer so sprites are drawn front to back */
|
/* we use the priority buffer so sprites are drawn front to back */
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 1, -1); //ship
|
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, -1); //enemy
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 1, 0); //intro
|
m_spr_old2->turbofrc_draw_sprites(m_spriteram3+0x200,m_spriteram3.bytes()/2,m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx+1,m_spritepalettebank, machine(), bitmap, cliprect, 0); //enemy
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, -1); //enemy
|
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, 0); //enemy
|
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, -1); //ship
|
||||||
|
m_spr_old->turbofrc_draw_sprites(m_spriteram3+0x000,m_spriteram3.bytes()/2,m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx+0,m_spritepalettebank, machine(), bitmap, cliprect, 0); //intro
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -830,7 +833,7 @@ UINT32 aerofgt_state::screen_update_wbbc97(screen_device &screen, bitmap_rgb32 &
|
|||||||
m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
m_bg1_tilemap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, -1);
|
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, -1);
|
||||||
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_spriteram2,m_spriteram2.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0, 0);
|
m_spr_old->turbofrc_draw_sprites(m_spriteram3,m_spriteram3.bytes(),m_spriteram1,m_spriteram1.bytes(),m_sprite_gfx,m_spritepalettebank, machine(), bitmap, cliprect, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -176,13 +176,13 @@ UINT32 f1gp_state::screen_update_f1gp(screen_device &screen, bitmap_ind16 &bitma
|
|||||||
/* quick kludge for "continue" screen priority */
|
/* quick kludge for "continue" screen priority */
|
||||||
if (m_gfxctrl == 0x00)
|
if (m_gfxctrl == 0x00)
|
||||||
{
|
{
|
||||||
m_spr_old->f1gp_draw_sprites(m_spr1vram, m_spr2vram, m_spr1cgram,m_spr1cgram.bytes(), m_spr2cgram, m_spr2cgram.bytes(), machine(), bitmap, cliprect, 0, 0x02);
|
m_spr_old->f1gp_draw_sprites(1, m_spr1vram, m_spr1cgram ,m_spr1cgram.bytes(), machine(), bitmap, cliprect, 0x02);
|
||||||
m_spr_old->f1gp_draw_sprites(m_spr1vram, m_spr2vram, m_spr1cgram,m_spr1cgram.bytes(), m_spr2cgram, m_spr2cgram.bytes(), machine(), bitmap, cliprect, 1, 0x02);
|
m_spr_old2->f1gp_draw_sprites(2, m_spr2vram, m_spr2cgram, m_spr2cgram.bytes(), machine(), bitmap, cliprect, 0x02);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_spr_old->f1gp_draw_sprites(m_spr1vram, m_spr2vram, m_spr1cgram,m_spr1cgram.bytes(), m_spr2cgram, m_spr2cgram.bytes(), machine(), bitmap, cliprect, 0, 0x00);
|
m_spr_old->f1gp_draw_sprites(1, m_spr1vram, m_spr1cgram, m_spr1cgram.bytes(), machine(), bitmap, cliprect, 0x00);
|
||||||
m_spr_old->f1gp_draw_sprites(m_spr1vram, m_spr2vram, m_spr1cgram,m_spr1cgram.bytes(), m_spr2cgram, m_spr2cgram.bytes(), machine(), bitmap, cliprect, 1, 0x02);
|
m_spr_old2->f1gp_draw_sprites(2, m_spr2vram, m_spr2cgram, m_spr2cgram.bytes(), machine(), bitmap, cliprect, 0x02);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -109,12 +109,27 @@ const device_type VSYSTEM_SPR = &device_creator<vsystem_spr_device>;
|
|||||||
vsystem_spr_device::vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
vsystem_spr_device::vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||||
: device_t(mconfig, VSYSTEM_SPR, "vsystem_spr_device", tag, owner, clock)
|
: device_t(mconfig, VSYSTEM_SPR, "vsystem_spr_device", tag, owner, clock)
|
||||||
{
|
{
|
||||||
m_CG10103.transpen = 15;
|
m_transpen = 15;
|
||||||
m_CG10103.pal_base = 0;
|
m_pal_base = 0;
|
||||||
|
m_xoffs = 0;
|
||||||
|
m_yoffs = 0;
|
||||||
|
m_pdraw = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
void vsystem_spr_device::set_offsets(device_t &device, int xoffs, int yoffs)
|
||||||
|
{
|
||||||
|
vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device);
|
||||||
|
dev.m_xoffs = xoffs;
|
||||||
|
dev.m_yoffs = yoffs;
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
void vsystem_spr_device::set_pdraw(device_t &device, bool pdraw)
|
||||||
|
{
|
||||||
|
vsystem_spr_device &dev = downcast<vsystem_spr_device &>(device);
|
||||||
|
dev.m_pdraw = pdraw;
|
||||||
|
}
|
||||||
|
|
||||||
void vsystem_spr_device::device_start()
|
void vsystem_spr_device::device_start()
|
||||||
{
|
{
|
||||||
@ -171,6 +186,22 @@ void vsystem_spr_device::get_sprite_attributes(UINT16* ram)
|
|||||||
void vsystem_spr_device::common_sprite_drawgfx(int gfxrgn, UINT16* spriteram2, UINT16* spriteram3, vsystem_spr_tile_indirection_callback tilecb, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
void vsystem_spr_device::common_sprite_drawgfx(int gfxrgn, UINT16* spriteram2, UINT16* spriteram3, vsystem_spr_tile_indirection_callback tilecb, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
gfx_element *gfx = machine.gfx[gfxrgn];
|
gfx_element *gfx = machine.gfx[gfxrgn];
|
||||||
|
int priority_mask = 0x00;
|
||||||
|
|
||||||
|
curr_sprite.oy += m_yoffs;
|
||||||
|
curr_sprite.ox += m_xoffs;
|
||||||
|
|
||||||
|
if (m_pdraw)
|
||||||
|
{
|
||||||
|
switch (curr_sprite.pri)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case 0: priority_mask = 0x00; break;
|
||||||
|
case 3: priority_mask = 0xfe; break;
|
||||||
|
case 2: priority_mask = 0xfc; break;
|
||||||
|
case 1: priority_mask = 0xf0; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
curr_sprite.zoomx = 32 - curr_sprite.zoomx;
|
curr_sprite.zoomx = 32 - curr_sprite.zoomx;
|
||||||
curr_sprite.zoomy = 32 - curr_sprite.zoomy;
|
curr_sprite.zoomy = 32 - curr_sprite.zoomy;
|
||||||
@ -192,10 +223,20 @@ void vsystem_spr_device::common_sprite_drawgfx(int gfxrgn, UINT16* spriteram2, U
|
|||||||
while (xcnt != xend)
|
while (xcnt != xend)
|
||||||
{
|
{
|
||||||
int startno = tilecb(curr_sprite.map++, spriteram2, spriteram3);
|
int startno = tilecb(curr_sprite.map++, spriteram2, spriteram3);
|
||||||
drawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_CG10103.pal_base, curr_sprite.flipx, curr_sprite.flipy, curr_sprite.ox + xcnt * curr_sprite.zoomx/2, curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, m_CG10103.transpen);
|
if (m_pdraw)
|
||||||
drawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_CG10103.pal_base, curr_sprite.flipx, curr_sprite.flipy, -0x200+curr_sprite.ox + xcnt * curr_sprite.zoomx/2, curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, m_CG10103.transpen);
|
{
|
||||||
drawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_CG10103.pal_base, curr_sprite.flipx, curr_sprite.flipy, curr_sprite.ox + xcnt * curr_sprite.zoomx/2, -0x200+curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, m_CG10103.transpen);
|
pdrawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_pal_base, curr_sprite.flipx, curr_sprite.flipy, curr_sprite.ox + xcnt * curr_sprite.zoomx/2, curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,priority_mask, m_transpen);
|
||||||
drawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_CG10103.pal_base, curr_sprite.flipx, curr_sprite.flipy, -0x200+curr_sprite.ox + xcnt * curr_sprite.zoomx/2, -0x200+curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, m_CG10103.transpen);
|
pdrawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_pal_base, curr_sprite.flipx, curr_sprite.flipy, -0x200+curr_sprite.ox + xcnt * curr_sprite.zoomx/2, curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,priority_mask, m_transpen);
|
||||||
|
pdrawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_pal_base, curr_sprite.flipx, curr_sprite.flipy, curr_sprite.ox + xcnt * curr_sprite.zoomx/2, -0x200+curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,priority_mask, m_transpen);
|
||||||
|
pdrawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_pal_base, curr_sprite.flipx, curr_sprite.flipy, -0x200+curr_sprite.ox + xcnt * curr_sprite.zoomx/2, -0x200+curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,priority_mask, m_transpen);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
drawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_pal_base, curr_sprite.flipx, curr_sprite.flipy, curr_sprite.ox + xcnt * curr_sprite.zoomx/2, curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, m_transpen);
|
||||||
|
drawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_pal_base, curr_sprite.flipx, curr_sprite.flipy, -0x200+curr_sprite.ox + xcnt * curr_sprite.zoomx/2, curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, m_transpen);
|
||||||
|
drawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_pal_base, curr_sprite.flipx, curr_sprite.flipy, curr_sprite.ox + xcnt * curr_sprite.zoomx/2, -0x200+curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, m_transpen);
|
||||||
|
drawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_pal_base, curr_sprite.flipx, curr_sprite.flipy, -0x200+curr_sprite.ox + xcnt * curr_sprite.zoomx/2, -0x200+curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, m_transpen);
|
||||||
|
}
|
||||||
xcnt+=xinc;
|
xcnt+=xinc;
|
||||||
}
|
}
|
||||||
ycnt+=yinc;
|
ycnt+=yinc;
|
||||||
@ -203,51 +244,6 @@ void vsystem_spr_device::common_sprite_drawgfx(int gfxrgn, UINT16* spriteram2, U
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// same as above but for pdrawgfx implementations
|
|
||||||
void vsystem_spr_device::common_sprite_pdrawgfx(int gfxrgn, UINT16* spriteram2, UINT16* spriteram3, vsystem_spr_tile_indirection_callback tilecb, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
|
||||||
{
|
|
||||||
gfx_element *gfx = machine.gfx[gfxrgn];
|
|
||||||
int priority_mask;
|
|
||||||
|
|
||||||
switch (curr_sprite.pri)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
case 0: priority_mask = 0x00; break;
|
|
||||||
case 3: priority_mask = 0xfe; break;
|
|
||||||
case 2: priority_mask = 0xfc; break;
|
|
||||||
case 1: priority_mask = 0xf0; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
curr_sprite.zoomx = 32 - curr_sprite.zoomx;
|
|
||||||
curr_sprite.zoomy = 32 - curr_sprite.zoomy;
|
|
||||||
|
|
||||||
int ystart, yend, yinc;
|
|
||||||
|
|
||||||
if (!curr_sprite.flipy) { ystart = 0; yend = curr_sprite.ysize+1; yinc = 1; }
|
|
||||||
else { ystart = curr_sprite.ysize; yend = -1; yinc = -1; }
|
|
||||||
|
|
||||||
int ycnt = ystart;
|
|
||||||
while (ycnt != yend)
|
|
||||||
{
|
|
||||||
int xstart, xend, xinc;
|
|
||||||
|
|
||||||
if (!curr_sprite.flipx) { xstart = 0; xend = curr_sprite.xsize+1; xinc = 1; }
|
|
||||||
else { xstart = curr_sprite.xsize; xend = -1; xinc = -1; }
|
|
||||||
|
|
||||||
int xcnt = xstart;
|
|
||||||
while (xcnt != xend)
|
|
||||||
{
|
|
||||||
int startno = tilecb(curr_sprite.map++, spriteram2, spriteram3);
|
|
||||||
pdrawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_CG10103.pal_base, curr_sprite.flipx, curr_sprite.flipy, curr_sprite.ox + xcnt * curr_sprite.zoomx/2, curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,priority_mask, m_CG10103.transpen);
|
|
||||||
pdrawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_CG10103.pal_base, curr_sprite.flipx, curr_sprite.flipy, -0x200+curr_sprite.ox + xcnt * curr_sprite.zoomx/2, curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,priority_mask, m_CG10103.transpen);
|
|
||||||
pdrawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_CG10103.pal_base, curr_sprite.flipx, curr_sprite.flipy, curr_sprite.ox + xcnt * curr_sprite.zoomx/2, -0x200+curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,priority_mask, m_CG10103.transpen);
|
|
||||||
pdrawgfxzoom_transpen(bitmap, cliprect, gfx, startno, curr_sprite.color + m_CG10103.pal_base, curr_sprite.flipx, curr_sprite.flipy, -0x200+curr_sprite.ox + xcnt * curr_sprite.zoomx/2, -0x200+curr_sprite.oy + ycnt * curr_sprite.zoomy/2, curr_sprite.zoomx << 11, curr_sprite.zoomy << 11, machine.priority_bitmap,priority_mask, m_CG10103.transpen);
|
|
||||||
xcnt+=xinc;
|
|
||||||
}
|
|
||||||
ycnt+=yinc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void vsystem_spr_device::draw_sprites_inufuku( UINT16* spriteram, int spriteram_bytes, UINT16* spriteram2, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
|
void vsystem_spr_device::draw_sprites_inufuku( UINT16* spriteram, int spriteram_bytes, UINT16* spriteram2, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||||
@ -271,10 +267,9 @@ void vsystem_spr_device::draw_sprites_inufuku( UINT16* spriteram, int spriteram_
|
|||||||
|
|
||||||
get_sprite_attributes(&spriteram[attr_start]);
|
get_sprite_attributes(&spriteram[attr_start]);
|
||||||
|
|
||||||
// curr_sprite.oy += 1;
|
|
||||||
curr_sprite.map &= 0x7fff;
|
curr_sprite.map &= 0x7fff;
|
||||||
|
|
||||||
common_sprite_pdrawgfx(2, spriteram2, NULL, inufuku_tile_callback, machine, bitmap, cliprect);
|
common_sprite_drawgfx(2, spriteram2, NULL, inufuku_tile_callback, machine, bitmap, cliprect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -412,7 +407,7 @@ void vsystem_spr_device::CG10103_draw_sprite(running_machine &machine, bitmap_in
|
|||||||
if (curr_sprite.pri != drawpri)
|
if (curr_sprite.pri != drawpri)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
common_sprite_drawgfx(m_CG10103.gfx_region, NULL, NULL, gstriker_tile_callback, machine, bitmap, cliprect);
|
common_sprite_drawgfx(m_gfx_region, NULL, NULL, gstriker_tile_callback, machine, bitmap, cliprect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -421,7 +416,7 @@ void vsystem_spr_device::CG10103_draw(running_machine &machine, int numchip, bit
|
|||||||
UINT16* splist;
|
UINT16* splist;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
splist = m_CG10103.vram;
|
splist = m_vram;
|
||||||
|
|
||||||
// Parse the sorting list
|
// Parse the sorting list
|
||||||
for (i=0;i<0x400;i++)
|
for (i=0;i<0x400;i++)
|
||||||
@ -438,7 +433,7 @@ void vsystem_spr_device::CG10103_draw(running_machine &machine, int numchip, bit
|
|||||||
int num = cmd & 0x3FF;
|
int num = cmd & 0x3FF;
|
||||||
|
|
||||||
// Draw the sprite
|
// Draw the sprite
|
||||||
CG10103_draw_sprite(machine, screen, cliprect, m_CG10103.vram + num*4, pri);
|
CG10103_draw_sprite(machine, screen, cliprect, m_vram + num*4, pri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -447,20 +442,20 @@ void vsystem_spr_device::CG10103_draw(running_machine &machine, int numchip, bit
|
|||||||
|
|
||||||
void vsystem_spr_device::CG10103_set_pal_base(int pal_base)
|
void vsystem_spr_device::CG10103_set_pal_base(int pal_base)
|
||||||
{
|
{
|
||||||
m_CG10103.pal_base = pal_base;
|
m_pal_base = pal_base;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vsystem_spr_device::CG10103_set_gfx_region(int gfx_region)
|
void vsystem_spr_device::CG10103_set_gfx_region(int gfx_region)
|
||||||
{
|
{
|
||||||
m_CG10103.gfx_region = gfx_region;
|
m_gfx_region = gfx_region;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vsystem_spr_device::CG10103_set_transpen(int transpen)
|
void vsystem_spr_device::CG10103_set_transpen(int transpen)
|
||||||
{
|
{
|
||||||
m_CG10103.transpen = transpen;
|
m_transpen = transpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vsystem_spr_device::CG10103_set_ram(UINT16* vram)
|
void vsystem_spr_device::CG10103_set_ram(UINT16* vram)
|
||||||
{
|
{
|
||||||
m_CG10103.vram = vram;
|
m_vram = vram;
|
||||||
}
|
}
|
||||||
|
@ -3,16 +3,6 @@
|
|||||||
|
|
||||||
/*** CG10103 **********************************************/
|
/*** CG10103 **********************************************/
|
||||||
|
|
||||||
|
|
||||||
struct tCG10103
|
|
||||||
{
|
|
||||||
UINT16* vram;
|
|
||||||
UINT16 pal_base;
|
|
||||||
UINT8 gfx_region;
|
|
||||||
UINT8 transpen;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef UINT32 (*vsystem_spr_tile_indirection_callback)(UINT32 code, UINT16* lookupram1, UINT16* lookupram2);
|
typedef UINT32 (*vsystem_spr_tile_indirection_callback)(UINT32 code, UINT16* lookupram1, UINT16* lookupram2);
|
||||||
|
|
||||||
class vsystem_spr_device : public device_t
|
class vsystem_spr_device : public device_t
|
||||||
@ -20,7 +10,18 @@ class vsystem_spr_device : public device_t
|
|||||||
public:
|
public:
|
||||||
vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
vsystem_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
|
|
||||||
tCG10103 m_CG10103;
|
static void set_offsets(device_t &device, int xoffs, int yoffs);
|
||||||
|
static void set_pdraw(device_t &device, bool pdraw);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int m_xoffs, m_yoffs;
|
||||||
|
bool m_pdraw;
|
||||||
|
|
||||||
|
UINT16* m_vram;
|
||||||
|
UINT16 m_pal_base;
|
||||||
|
UINT8 m_gfx_region;
|
||||||
|
UINT8 m_transpen;
|
||||||
|
|
||||||
struct vsystem_sprite_attributes
|
struct vsystem_sprite_attributes
|
||||||
{
|
{
|
||||||
@ -39,7 +40,6 @@ public:
|
|||||||
|
|
||||||
void get_sprite_attributes(UINT16* ram);
|
void get_sprite_attributes(UINT16* ram);
|
||||||
void common_sprite_drawgfx(int gfxrgn, UINT16* spriteram2, UINT16* spriteram3, vsystem_spr_tile_indirection_callback tilecb, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void common_sprite_drawgfx(int gfxrgn, UINT16* spriteram2, UINT16* spriteram3, vsystem_spr_tile_indirection_callback tilecb, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void common_sprite_pdrawgfx(int gfxrgn, UINT16* spriteram2, UINT16* spriteram3, vsystem_spr_tile_indirection_callback tilecb, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
|
||||||
|
|
||||||
void draw_sprites_inufuku( UINT16* spriteram, int spriteram_bytes, UINT16* spriteram2, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites_inufuku( UINT16* spriteram, int spriteram_bytes, UINT16* spriteram2, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
void draw_sprites_suprslam( UINT16* spriteram, int spriteram_bytes, UINT16* spriteram2, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites_suprslam( UINT16* spriteram, int spriteram_bytes, UINT16* spriteram2, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
|
@ -69,10 +69,10 @@ int vsystem_spr2_device::get_sprite_attributes(UINT16* ram)
|
|||||||
|
|
||||||
|
|
||||||
template<class _BitmapClass>
|
template<class _BitmapClass>
|
||||||
void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
|
void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip_disabled_pri )
|
||||||
{
|
{
|
||||||
int attr_start, base, first;
|
int attr_start, base, first;
|
||||||
base = chip * 0x0200;
|
base = 0;//chip * 0x0200;
|
||||||
first = 4 * spriteram3[0x1fe + base];
|
first = 4 * spriteram3[0x1fe + base];
|
||||||
|
|
||||||
for (attr_start = base + 0x0200 - 8; attr_start >= first + base; attr_start -= 4)
|
for (attr_start = base + 0x0200 - 8; attr_start >= first + base; attr_start -= 4)
|
||||||
@ -121,12 +121,9 @@ void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int
|
|||||||
else
|
else
|
||||||
sx = ((curr_sprite.ox + curr_sprite.zoomx * x / 2 + 16) & 0x1ff) - 16;
|
sx = ((curr_sprite.ox + curr_sprite.zoomx * x / 2 + 16) & 0x1ff) - 16;
|
||||||
|
|
||||||
if (chip == 0)
|
curr = spriteram1[curr_sprite.map % (spriteram1_bytes/2)];
|
||||||
curr = spriteram1[curr_sprite.map % (spriteram1_bytes/2)];
|
|
||||||
else
|
|
||||||
curr = spriteram2[curr_sprite.map % (spriteram2_bytes/2)];
|
|
||||||
|
|
||||||
pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[sprite_gfx + chip],
|
pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[sprite_gfx],
|
||||||
curr,
|
curr,
|
||||||
curr_sprite.color,
|
curr_sprite.color,
|
||||||
curr_sprite.flipx,curr_sprite.flipy,
|
curr_sprite.flipx,curr_sprite.flipy,
|
||||||
@ -144,18 +141,18 @@ void vsystem_spr2_device::turbofrc_draw_sprites_common( UINT16* spriteram3, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
|
void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip_disabled_pri )
|
||||||
{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spriteram1, spriteram1_bytes, spriteram2, spriteram2_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip, chip_disabled_pri ); }
|
{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spriteram1, spriteram1_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip_disabled_pri ); }
|
||||||
|
|
||||||
void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
|
void vsystem_spr2_device::turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip_disabled_pri )
|
||||||
{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spriteram1, spriteram1_bytes, spriteram2, spriteram2_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip, chip_disabled_pri ); }
|
{ turbofrc_draw_sprites_common( spriteram3, spriteram3_bytes, spriteram1, spriteram1_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip_disabled_pri ); }
|
||||||
|
|
||||||
|
|
||||||
template<class _BitmapClass>
|
template<class _BitmapClass>
|
||||||
void vsystem_spr2_device::spinlbrk_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
|
void vsystem_spr2_device::spinlbrk_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip_disabled_pri )
|
||||||
{
|
{
|
||||||
int attr_start, base, first;
|
int attr_start, base, first;
|
||||||
base = chip * 0x0200;
|
base = 0;//chip * 0x0200;
|
||||||
first = 4 * spriteram3[0x1fe + base];
|
first = 4 * spriteram3[0x1fe + base];
|
||||||
|
|
||||||
for (attr_start = base + 0x0200-8; attr_start >= first + base; attr_start -= 4)
|
for (attr_start = base + 0x0200-8; attr_start >= first + base; attr_start -= 4)
|
||||||
@ -202,12 +199,9 @@ void vsystem_spr2_device::spinlbrk_draw_sprites_common( UINT16* spriteram3, int
|
|||||||
else
|
else
|
||||||
sx = ((curr_sprite.ox + curr_sprite.zoomx * x / 2 + 16) & 0x1ff) - 16;
|
sx = ((curr_sprite.ox + curr_sprite.zoomx * x / 2 + 16) & 0x1ff) - 16;
|
||||||
|
|
||||||
if (chip == 0)
|
curr = spriteram1[curr_sprite.map % (spriteram1_bytes/2)];
|
||||||
curr = spriteram1[curr_sprite.map % (spriteram1_bytes/2)];
|
|
||||||
else
|
|
||||||
curr = spriteram2[curr_sprite.map % (spriteram2_bytes/2)];
|
|
||||||
|
|
||||||
pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[sprite_gfx + chip],
|
pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[sprite_gfx],
|
||||||
curr,
|
curr,
|
||||||
curr_sprite.color,
|
curr_sprite.color,
|
||||||
curr_sprite.flipx,curr_sprite.flipy,
|
curr_sprite.flipx,curr_sprite.flipy,
|
||||||
@ -225,11 +219,11 @@ void vsystem_spr2_device::spinlbrk_draw_sprites_common( UINT16* spriteram3, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vsystem_spr2_device::spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
|
void vsystem_spr2_device::spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip_disabled_pri )
|
||||||
{ spinlbrk_draw_sprites_common( spriteram3, spriteram3_bytes, spriteram1, spriteram1_bytes, spriteram2, spriteram2_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip, chip_disabled_pri ); }
|
{ spinlbrk_draw_sprites_common( spriteram3, spriteram3_bytes, spriteram1, spriteram1_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip_disabled_pri ); }
|
||||||
|
|
||||||
void vsystem_spr2_device::spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri )
|
void vsystem_spr2_device::spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip_disabled_pri )
|
||||||
{ spinlbrk_draw_sprites_common( spriteram3, spriteram3_bytes, spriteram1, spriteram1_bytes, spriteram2, spriteram2_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip, chip_disabled_pri ); }
|
{ spinlbrk_draw_sprites_common( spriteram3, spriteram3_bytes, spriteram1, spriteram1_bytes, sprite_gfx, spritepalettebank, machine, bitmap, cliprect, chip_disabled_pri ); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -343,10 +337,10 @@ void vsystem_spr2_device::welltris_draw_sprites( UINT16* spriteram, int spritepa
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void vsystem_spr2_device::f1gp_draw_sprites( UINT16* spr1vram, UINT16* spr2vram, UINT16* spr1cgram, int spr1cgram_bytes, UINT16* spr2cgram, int spr2cgram_bytes, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip, int primask )
|
void vsystem_spr2_device::f1gp_draw_sprites( int gfxrgn, UINT16* sprvram, UINT16* sprcgram, int sprcgram_bytes, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int primask )
|
||||||
{
|
{
|
||||||
int attr_start, first;
|
int attr_start, first;
|
||||||
UINT16 *spram = chip ? spr2vram : spr1vram;
|
UINT16 *spram = sprvram;
|
||||||
|
|
||||||
first = 4 * spram[0x1fe];
|
first = 4 * spram[0x1fe];
|
||||||
|
|
||||||
@ -378,12 +372,9 @@ void vsystem_spr2_device::f1gp_draw_sprites( UINT16* spr1vram, UINT16* spr2vram,
|
|||||||
if (curr_sprite.flipx) sx = ((curr_sprite.ox + curr_sprite.zoomx * (curr_sprite.xsize - x) + 16) & 0x1ff) - 16;
|
if (curr_sprite.flipx) sx = ((curr_sprite.ox + curr_sprite.zoomx * (curr_sprite.xsize - x) + 16) & 0x1ff) - 16;
|
||||||
else sx = ((curr_sprite.ox + curr_sprite.zoomx * x + 16) & 0x1ff) - 16;
|
else sx = ((curr_sprite.ox + curr_sprite.zoomx * x + 16) & 0x1ff) - 16;
|
||||||
|
|
||||||
if (chip == 0)
|
curr = sprcgram[curr_sprite.map % (sprcgram_bytes / 2)];
|
||||||
curr = spr1cgram[curr_sprite.map % (spr1cgram_bytes / 2)];
|
|
||||||
else
|
|
||||||
curr = spr2cgram[curr_sprite.map % (spr2cgram_bytes / 2)];
|
|
||||||
|
|
||||||
pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[1 + chip],
|
pdrawgfxzoom_transpen(bitmap,cliprect,machine.gfx[gfxrgn],
|
||||||
curr,
|
curr,
|
||||||
curr_sprite.color,
|
curr_sprite.color,
|
||||||
curr_sprite.flipx,curr_sprite.flipy,
|
curr_sprite.flipx,curr_sprite.flipy,
|
||||||
|
@ -25,20 +25,20 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
template<class _BitmapClass>
|
template<class _BitmapClass>
|
||||||
void turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri );
|
void turbofrc_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip_disabled_pri );
|
||||||
|
|
||||||
void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri );
|
void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip_disabled_pri );
|
||||||
void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri );
|
void turbofrc_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip_disabled_pri );
|
||||||
|
|
||||||
template<class _BitmapClass>
|
template<class _BitmapClass>
|
||||||
void spinlbrk_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri );
|
void spinlbrk_draw_sprites_common( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, int chip_disabled_pri );
|
||||||
|
|
||||||
void spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri );
|
void spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip_disabled_pri );
|
||||||
void spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, UINT16* spriteram2, int spriteram2_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip, int chip_disabled_pri );
|
void spinlbrk_draw_sprites( UINT16* spriteram3, int spriteram3_bytes, UINT16* spriteram1, int spriteram1_bytes, int sprite_gfx, int spritepalettebank, running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int chip_disabled_pri );
|
||||||
|
|
||||||
|
|
||||||
void welltris_draw_sprites( UINT16* spriteram, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect);
|
void welltris_draw_sprites( UINT16* spriteram, int spritepalettebank, running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||||
void f1gp_draw_sprites( UINT16* spr1vram, UINT16* spr2vram, UINT16* spr1cgram, int spr1cgram_bytes, UINT16* spr2cgram, int spr2cgram_bytes, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int chip, int primask );
|
void f1gp_draw_sprites( int gfxrgn, UINT16* sprvram, UINT16* sprcgram, int sprcgram_bytes, running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int primask );
|
||||||
void draw_sprites_pipedrm( UINT8* spriteram, int spriteram_bytes, int flipscreen, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int draw_priority );
|
void draw_sprites_pipedrm( UINT8* spriteram, int spriteram_bytes, int flipscreen, screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int draw_priority );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user