mirror of
https://github.com/holub/mame
synced 2025-06-05 12:26:35 +03:00
some changes for aerfboo2:
- fix bg1 and bg2 offset - fix sprites - promoted to "working" (NO SOUND)
This commit is contained in:
parent
b35c15fef5
commit
968dae7b1b
@ -99,6 +99,7 @@ VIDEO_UPDATE( spinlbrk );
|
||||
VIDEO_UPDATE( turbofrc );
|
||||
VIDEO_UPDATE( aerofgt );
|
||||
VIDEO_UPDATE( aerfboot );
|
||||
VIDEO_UPDATE( aerfboo2 );
|
||||
VIDEO_START( wbbc97 );
|
||||
VIDEO_UPDATE( wbbc97 );
|
||||
|
||||
@ -362,7 +363,7 @@ static ADDRESS_MAP_START( aerfboo2_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x0e0000, 0x0e3fff) AM_RAM AM_BASE(&aerofgt_spriteram1) AM_SIZE(&aerofgt_spriteram1_size)
|
||||
AM_RANGE(0x0e4000, 0x0e7fff) AM_RAM AM_BASE(&aerofgt_spriteram2) AM_SIZE(&aerofgt_spriteram2_size)
|
||||
AM_RANGE(0x0f8000, 0x0fbfff) AM_RAM /* work RAM */
|
||||
AM_RANGE(0x0fc000, 0x0fc7ff) AM_RAM //AM_BASE(&aerofgt_spriteram3) AM_SIZE(&aerofgt_spriteram3_size)
|
||||
AM_RANGE(0x0fc000, 0x0fc7ff) AM_RAM AM_BASE(&aerofgt_spriteram3) AM_SIZE(&aerofgt_spriteram3_size)
|
||||
AM_RANGE(0x0fd000, 0x0fd7ff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16)
|
||||
AM_RANGE(0x0fe000, 0x0fe001) AM_READ(input_port_0_word_r)
|
||||
AM_RANGE(0x0fe002, 0x0fe003) AM_READ(input_port_1_word_r)
|
||||
@ -373,11 +374,10 @@ static ADDRESS_MAP_START( aerfboo2_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x0fe006, 0x0fe007) AM_WRITE(aerofgt_bg2scrolly_w)
|
||||
AM_RANGE(0x0fe008, 0x0fe00b) AM_WRITE(turbofrc_gfxbank_w)
|
||||
AM_RANGE(0x0fe010, 0x0fe011) AM_WRITENOP
|
||||
// AM_RANGE(0x0fe012, 0x0fe013) AM_WRITE(aerfboot_soundlatch_w)
|
||||
// AM_RANGE(0x0fe012, 0x0fe013) AM_WRITE(aerfboot_soundlatch_w)
|
||||
AM_RANGE(0x0fe400, 0x0fe401) AM_WRITENOP
|
||||
AM_RANGE(0x0fe402, 0x0fe403) AM_WRITENOP
|
||||
AM_RANGE(0x0ff000, 0x0fffff) AM_RAM AM_BASE(&aerofgt_rasterram) /* used only for the scroll registers */
|
||||
AM_RANGE(0x108000, 0x10bfff) AM_RAM AM_BASE(&aerofgt_spriteram3) AM_SIZE(&aerofgt_spriteram3_size)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( wbbc97_map, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
@ -1687,7 +1687,7 @@ static MACHINE_DRIVER_START( aerfboo2 )
|
||||
MDRV_PALETTE_LENGTH(1024)
|
||||
|
||||
MDRV_VIDEO_START(turbofrc)
|
||||
MDRV_VIDEO_UPDATE(aerfboot)
|
||||
MDRV_VIDEO_UPDATE(aerfboo2)
|
||||
|
||||
/* sound hardware */
|
||||
MDRV_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -2459,5 +2459,5 @@ GAME( 1992, aerofgtb, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.
|
||||
GAME( 1992, aerofgtc, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.", "Aero Fighters (Turbo Force hardware set 2)", GAME_NO_COCKTAIL )
|
||||
GAME( 1992, sonicwi, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.", "Sonic Wings (Japan)", GAME_NO_COCKTAIL )
|
||||
GAME( 1992, aerfboot, aerofgt, aerfboot, aerofgtb, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 1)", GAME_NO_COCKTAIL | GAME_NO_SOUND )
|
||||
GAME( 1992, aerfboo2, aerofgt, aerfboo2, aerofgtb, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 2)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_NOT_WORKING)
|
||||
GAME( 1992, aerfboo2, aerofgt, aerfboo2, aerofgtb, 0, ROT270, "bootleg", "Aero Fighters (bootleg set 2)", GAME_NO_COCKTAIL | GAME_NO_SOUND )
|
||||
GAME( 1997, wbbc97, 0, wbbc97, wbbc97, 0, ROT0, "Comad", "Beach Festival World Championship 1997", GAME_NO_COCKTAIL )
|
||||
|
@ -447,6 +447,82 @@ static void turbofrc_draw_sprites(running_machine *machine, bitmap_t *bitmap,con
|
||||
}
|
||||
}
|
||||
|
||||
static void aerfboo2_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,int chip,int chip_disabled_pri)
|
||||
{
|
||||
int attr_start,base,first;
|
||||
|
||||
base = chip * 0x0200;
|
||||
// first = 4 * aerofgt_spriteram3[0x1fe + base];
|
||||
first = 0;
|
||||
|
||||
for (attr_start = base + 0x0200-4;attr_start >= first + base;attr_start -= 4)
|
||||
{
|
||||
int map_start;
|
||||
int ox,oy,x,y,xsize,ysize,zoomx,zoomy,flipx,flipy,color,pri;
|
||||
// some other drivers still use this wrong table, they have to be upgraded
|
||||
// int zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 };
|
||||
|
||||
if (!(aerofgt_spriteram3[attr_start + 2] & 0x0080)) continue;
|
||||
pri = aerofgt_spriteram3[attr_start + 2] & 0x0010;
|
||||
if ( chip_disabled_pri & !pri) continue;
|
||||
if (!chip_disabled_pri & (pri>>4)) continue;
|
||||
ox = aerofgt_spriteram3[attr_start + 1] & 0x01ff;
|
||||
xsize = (aerofgt_spriteram3[attr_start + 2] & 0x0700) >> 8;
|
||||
zoomx = (aerofgt_spriteram3[attr_start + 1] & 0xf000) >> 12;
|
||||
oy = aerofgt_spriteram3[attr_start + 0] & 0x01ff;
|
||||
ysize = (aerofgt_spriteram3[attr_start + 2] & 0x7000) >> 12;
|
||||
zoomy = (aerofgt_spriteram3[attr_start + 0] & 0xf000) >> 12;
|
||||
flipx = aerofgt_spriteram3[attr_start + 2] & 0x0800;
|
||||
flipy = aerofgt_spriteram3[attr_start + 2] & 0x8000;
|
||||
color = (aerofgt_spriteram3[attr_start + 2] & 0x000f) + 16 * spritepalettebank;
|
||||
|
||||
map_start = aerofgt_spriteram3[attr_start + 3];
|
||||
|
||||
// aerofgt has this adjustment, but doing it here would break turbo force title screen
|
||||
// ox += (xsize*zoomx+2)/4;
|
||||
// oy += (ysize*zoomy+2)/4;
|
||||
|
||||
zoomx = 32 - zoomx;
|
||||
zoomy = 32 - zoomy;
|
||||
|
||||
for (y = 0;y <= ysize;y++)
|
||||
{
|
||||
int sx,sy;
|
||||
|
||||
if (flipy) sy = ((oy + zoomy * (ysize - y)/2 + 16) & 0x1ff) - 16;
|
||||
else sy = ((oy + zoomy * y / 2 + 16) & 0x1ff) - 16;
|
||||
|
||||
for (x = 0;x <= xsize;x++)
|
||||
{
|
||||
int code;
|
||||
|
||||
if (flipx) sx = ((ox + zoomx * (xsize - x) / 2 + 16) & 0x1ff) - 16;
|
||||
else sx = ((ox + zoomx * x / 2 + 16) & 0x1ff) - 16;
|
||||
|
||||
if (chip == 0)
|
||||
code = aerofgt_spriteram1[map_start % (aerofgt_spriteram1_size/2)];
|
||||
else
|
||||
code = aerofgt_spriteram2[map_start % (aerofgt_spriteram2_size/2)];
|
||||
|
||||
pdrawgfxzoom(bitmap,machine->gfx[sprite_gfx + chip],
|
||||
code,
|
||||
color,
|
||||
flipx,flipy,
|
||||
sx,sy,
|
||||
cliprect,TRANSPARENCY_PEN,15,
|
||||
zoomx << 11, zoomy << 11,
|
||||
pri ? 0 : 2);
|
||||
map_start++;
|
||||
}
|
||||
|
||||
if (xsize == 2) map_start += 1;
|
||||
if (xsize == 4) map_start += 3;
|
||||
if (xsize == 5) map_start += 2;
|
||||
if (xsize == 6) map_start += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void pspikesb_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
|
||||
{
|
||||
int i;
|
||||
@ -789,6 +865,32 @@ VIDEO_UPDATE( aerfboot )
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIDEO_UPDATE( aerfboo2 )
|
||||
{
|
||||
int i,scrolly;
|
||||
|
||||
tilemap_set_scroll_rows(bg1_tilemap,512);
|
||||
scrolly = bg1scrolly+2;
|
||||
for (i = 0;i < 256;i++)
|
||||
// tilemap_set_scrollx(bg1_tilemap,(i + scrolly) & 0x1ff,aerofgt_rasterram[i]-11);
|
||||
tilemap_set_scrollx(bg1_tilemap,(i + scrolly) & 0x1ff,aerofgt_rasterram[7]-11);
|
||||
tilemap_set_scrolly(bg1_tilemap,0,scrolly);
|
||||
tilemap_set_scrollx(bg2_tilemap,0,bg2scrollx-7);
|
||||
tilemap_set_scrolly(bg2_tilemap,0,bg2scrolly+2);
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
|
||||
tilemap_draw(bitmap,cliprect,bg1_tilemap,0,0);
|
||||
tilemap_draw(bitmap,cliprect,bg2_tilemap,0,1);
|
||||
|
||||
/* we use the priority buffer so sprites are drawn front to back */
|
||||
aerfboo2_draw_sprites(screen->machine,bitmap,cliprect,1,-1); //ship
|
||||
aerfboo2_draw_sprites(screen->machine,bitmap,cliprect,1, 0); //intro
|
||||
aerfboo2_draw_sprites(screen->machine,bitmap,cliprect,0,-1); //enemy
|
||||
aerfboo2_draw_sprites(screen->machine,bitmap,cliprect,0, 0); //enemy
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIDEO_UPDATE( wbbc97 )
|
||||
{
|
||||
int i,scrolly;
|
||||
|
Loading…
Reference in New Issue
Block a user