summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Roberto Zandona <robertoz@mamedev.org>2008-04-07 07:02:23 +0000
committer Roberto Zandona <robertoz@mamedev.org>2008-04-07 07:02:23 +0000
commit99103d073696c88edfa04cf15dde8ea86be49409 (patch)
treea61a683650fe5629bbc14806d6980a790c35e907
parent5b36289ee7104fc937c3922e6b7f77b70adcebc2 (diff)
for aerfboot:
1) sprite offset are now correct 2) split spriteram in two parts 3) identified last sprite for the two parts 4) promoted to "working" (no sound) for pallavol: 1) fix for sprite's y-coordinate 2) implement lookup table for convert sprite code in the real code 3) change the name to "1991 Spikes (Italian bootleg) (see the snapshot) 4) fix scroll 5) fix offset
-rw-r--r--src/mame/drivers/aerofgt.c27
-rw-r--r--src/mame/mamedriv.c2
-rw-r--r--src/mame/video/aerofgt.c117
3 files changed, 119 insertions, 27 deletions
diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c
index 4b9a1606498..eb6553d925d 100644
--- a/src/mame/drivers/aerofgt.c
+++ b/src/mame/drivers/aerofgt.c
@@ -92,6 +92,7 @@ VIDEO_START( spinlbrk );
VIDEO_START( turbofrc );
VIDEO_UPDATE( pspikes );
VIDEO_UPDATE( pspikesb );
+VIDEO_UPDATE( spikes91 );
VIDEO_UPDATE( karatblz );
VIDEO_UPDATE( spinlbrk );
VIDEO_UPDATE( turbofrc );
@@ -192,7 +193,7 @@ static ADDRESS_MAP_START( pspikesb_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0xfff008, 0xfff009) AM_WRITE(pspikesb_oki_banking_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( pallavol_map, ADDRESS_SPACE_PROGRAM, 16 )
+static ADDRESS_MAP_START( spikes91_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x03ffff) AM_ROM
AM_RANGE(0x100000, 0x10ffff) AM_RAM /* work RAM */
AM_RANGE(0x200000, 0x203fff) AM_RAM AM_BASE(&aerofgt_spriteram1) AM_SIZE(&aerofgt_spriteram1_size)
@@ -1149,7 +1150,7 @@ static const gfx_layout aerofgt_spritelayout =
128*8
};
-static const gfx_layout pallavol_spritelayout =
+static const gfx_layout spikes91_spritelayout =
{
16,16,
RGN_FRAC(1,4),
@@ -1202,9 +1203,9 @@ static GFXDECODE_START( pspikesb )
GFXDECODE_ENTRY( REGION_GFX2, 0, pspikesb_spritelayout, 1024, 64 ) /* colors 1024-2047 in 4 banks */
GFXDECODE_END
-static GFXDECODE_START( pallavol )
+static GFXDECODE_START( spikes91 )
GFXDECODE_ENTRY( REGION_GFX1, 0, pspikesb_charlayout, 0, 64 ) /* colors 0-1023 in 8 banks */
- GFXDECODE_ENTRY( REGION_GFX2, 0, pallavol_spritelayout, 1024, 64 ) /* colors 1024-2047 in 4 banks */
+ GFXDECODE_ENTRY( REGION_GFX2, 0, spikes91_spritelayout, 1024, 64 ) /* colors 1024-2047 in 4 banks */
GFXDECODE_END
@@ -1298,11 +1299,11 @@ static MACHINE_DRIVER_START( pspikes )
MDRV_SOUND_ROUTE(2, "right", 1.0)
MACHINE_DRIVER_END
-static MACHINE_DRIVER_START( pallavol )
+static MACHINE_DRIVER_START( spikes91 )
/* basic machine hardware */
MDRV_CPU_ADD(M68000,20000000/2) /* 10 MHz (?) */
- MDRV_CPU_PROGRAM_MAP(pallavol_map,0)
+ MDRV_CPU_PROGRAM_MAP(spikes91_map,0)
MDRV_CPU_VBLANK_INT("main", irq1_line_hold)/* all irq vectors are the same */
/* + Z80 for sound */
@@ -1314,11 +1315,11 @@ static MACHINE_DRIVER_START( pallavol )
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_SIZE(64*8, 32*8)
MDRV_SCREEN_VISIBLE_AREA(0*8+4, 44*8+4-1, 0*8, 30*8-1)
- MDRV_GFXDECODE(pallavol)
+ MDRV_GFXDECODE(spikes91)
MDRV_PALETTE_LENGTH(2048)
MDRV_VIDEO_START(pspikes)
- MDRV_VIDEO_UPDATE(pspikesb)
+ MDRV_VIDEO_UPDATE(spikes91)
/* sound hardware */
/* the sound hardware is completely different on this:
@@ -1762,7 +1763,7 @@ ROM_END
/*
-Pallavolo (Italian Power Spikes bootleg)
+1991 Spikes (Italian bootleg)
Anno 1991
Produttore
@@ -1810,7 +1811,7 @@ original game
*/
-ROM_START( pallavol )
+ROM_START( spikes91 )
ROM_REGION( 0x40000, REGION_CPU1, 0 ) /* 68000 code */
ROM_LOAD16_BYTE( "7.ic2", 0x00001, 0x20000, CRC(41e38d7e) SHA1(d0c226a8b61a2311c781ed5747d78b8dbddbc7ef) )
ROM_LOAD16_BYTE( "8.ic3", 0x00000, 0x20000, CRC(9c488daa) SHA1(8336fec855786c6cc6a836d86b74e130d60013b7) )
@@ -1827,7 +1828,7 @@ ROM_START( pallavol )
ROM_LOAD( "13.ic120", 0x80000, 0x40000, CRC(89213a8c) SHA1(8524d5c14669d9b03f1fe050c4318d4111bc8ef7) )
ROM_LOAD( "14.ic121", 0xc0000, 0x40000, CRC(468cbf5b) SHA1(60fbc2771e40f8de51a51891b8ddcc14e2b1e52c) )
- ROM_REGION( 0x020000, REGION_USER1, 0 ) /* ??? Unknown, interleaved - near sprite roms, lookup tables? */
+ ROM_REGION( 0x020000, REGION_USER1, 0 ) /* lookup tables for the sprites */
ROM_LOAD( "10.ic104", 0x00000, 0x10000, CRC(769ade77) SHA1(9cb581d02592c69f37d4b5a902d3515f40915ec4) )
ROM_LOAD( "9.ic103", 0x10000, 0x10000, CRC(201cb748) SHA1(f78d384e4e9c5996a278f76fb4d5f28812a27de5) )
@@ -2335,7 +2336,7 @@ GAME( 1991, pspikes, 0, pspikes, pspikes, 0, ROT0, "Video System Co.
GAME( 1991, pspikesk, pspikes, pspikes, pspikes, 0, ROT0, "Video System Co.", "Power Spikes (Korea)", GAME_NO_COCKTAIL )
GAME( 1991, svolly91, pspikes, pspikes, pspikes, 0, ROT0, "Video System Co.", "Super Volley '91 (Japan)", GAME_NO_COCKTAIL )
GAME( 1991, pspikesb, pspikes, pspikesb, pspikesb, 0, ROT0, "bootleg", "Power Spikes (bootleg)", GAME_NO_COCKTAIL )
-GAME( 1991, pallavol, pspikes, pallavol, pspikes, 0, ROT0, "bootleg", "Pallavolo (Italian Power Spikes bootleg)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_NO_COCKTAIL )
+GAME( 1991, spikes91, pspikes, spikes91, pspikes, 0, ROT0, "bootleg", "1991 Spikes (Italian bootleg)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_NO_COCKTAIL )
GAME( 1991, pspikesc, pspikes, pspikesc, pspikesc, 0, ROT0, "bootleg", "Power Spikes (China)", GAME_NO_COCKTAIL | GAME_IMPERFECT_SOUND )
GAME( 1991, karatblz, 0, karatblz, karatblz, 0, ROT0, "Video System Co.", "Karate Blazers (World?)", GAME_NO_COCKTAIL )
GAME( 1991, karatblu, karatblz, karatblz, karatblz, 0, ROT0, "Video System Co.", "Karate Blazers (US)", GAME_NO_COCKTAIL )
@@ -2345,5 +2346,5 @@ GAME( 1992, aerofgt, 0, aerofgt, aerofgt, 0, ROT270, "Video System Co.
GAME( 1992, aerofgtb, aerofgt, aerofgtb, aerofgtb, 0, ROT270, "Video System Co.", "Aero Fighters (Turbo Force hardware set 1)", GAME_NO_COCKTAIL )
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)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_NOT_WORKING )
+GAME( 1992, aerfboot, aerofgt, aerfboot, aerofgtb, 0, ROT270, "bootleg", "Aero Fighters (bootleg)", GAME_NO_COCKTAIL | GAME_NO_SOUND )
GAME( 1997, wbbc97, 0, wbbc97, wbbc97, 0, ROT0, "Comad", "Beach Festival World Championship 1997", GAME_NO_COCKTAIL )
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index 3ece7cb22b5..67b5950fbba 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -6433,7 +6433,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
DRIVER( pspikesk ) /* (c) 1991 Video System Co. (Korea) */
DRIVER( svolly91 ) /* (c) 1991 Video System Co. (Japan) */
DRIVER( pspikesb ) /* bootleg */
- DRIVER( pallavol ) /* bootleg */
+ DRIVER( spikes91 ) /* bootleg */
DRIVER( pspikesc ) /* bootleg */
DRIVER( karatblz ) /* (c) 1991 Video System Co. */
DRIVER( karatblu ) /* (c) 1991 Video System Co. (US) */
diff --git a/src/mame/video/aerofgt.c b/src/mame/video/aerofgt.c
index 66141411bd5..cb965b3b462 100644
--- a/src/mame/video/aerofgt.c
+++ b/src/mame/video/aerofgt.c
@@ -476,20 +476,63 @@ static void pspikesb_draw_sprites(running_machine *machine, bitmap_t *bitmap,con
}
}
+static void spikes91_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
+{
+ int i;
+ UINT8 *lookup;
+ lookup = memory_region(REGION_USER1);
+ spritepalettebank = 1;
+
+ for (i = aerofgt_spriteram3_size/2 - 4 ; i >= 4 ; i -= 4)
+ {
+ int xpos,ypos,color,flipx,flipy,code,realcode;
+
+ code = aerofgt_spriteram3[i + 0] & 0x1fff;
+
+ if (!code) continue;
+
+ xpos = (aerofgt_spriteram3[i + 2] & 0x01ff) - 16;
+ ypos = 256 - (aerofgt_spriteram3[i + 1] & 0x00ff) - 26;
+ flipy = 0;
+ flipx = aerofgt_spriteram3[i + 3] & 0x8000;
+ color = ((aerofgt_spriteram3[i + 3] & 0x00f0) >> 4);
+
+ // look-up table
+ // RZ notes:
+ // in game it's necessary an or with 0x2000;
+ // probably a bit switch the table
+ // almost sure no line swap in the look-up table
+
+ code |= 0x2000;
+ realcode = (lookup[code] << 8) + lookup[0x10000 + code];
+
+ drawgfx(bitmap,machine->gfx[sprite_gfx],
+ realcode,
+ color,
+ flipx,flipy,
+ xpos,ypos,
+ cliprect,TRANSPARENCY_PEN,15);
+
+ /* wrap around y */
+ drawgfx(bitmap,machine->gfx[sprite_gfx],
+ realcode,
+ color,
+ flipx,flipy,
+ xpos,ypos + 512,
+ cliprect,TRANSPARENCY_PEN,15);
+ }
+}
+
static void aerfboot_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
{
- int attr_start;//,base,first;
-// int notdraw = 0;
+ int attr_start,last;
-// base = chip * 0x0200;
-// first = 4 * aerofgt_spriteram3[0x1fe + base];
+ last = ((aerofgt_rasterram[0x404/2] << 5) - 0x8000) / 2;
- for (attr_start = aerofgt_spriteram3_size/2 - 4 /* - 16 */;attr_start >= 0;attr_start -= 4)
+ for (attr_start = aerofgt_spriteram3_size / 2 - 4 ; attr_start >= last ; attr_start -= 4)
{
int code;
int ox,oy,sx,sy,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 };
ox = aerofgt_spriteram3[attr_start + 1] & 0x01ff;
oy = aerofgt_spriteram3[attr_start + 0] & 0x01ff;
@@ -500,22 +543,54 @@ static void aerfboot_draw_sprites(running_machine *machine, bitmap_t *bitmap,con
zoomx = (aerofgt_spriteram3[attr_start + 1] & 0xf000) >> 12;
zoomy = (aerofgt_spriteram3[attr_start + 0] & 0xf000) >> 12;
pri = aerofgt_spriteram3[attr_start + 2] & 0x0010;
-// code = aerofgt_spriteram3[attr_start + 3] & 0x3fff;
code = aerofgt_spriteram3[attr_start + 3] & 0x1fff;
-// if ((!(aerofgt_spriteram3[attr_start + 0])) & (!(aerofgt_spriteram3[attr_start + 1])) &
-// (!(aerofgt_spriteram3[attr_start + 2])) & (!(aerofgt_spriteram3[attr_start + 3]))) notdraw = 1;
+ if (!(aerofgt_spriteram3[attr_start + 2] & 0x0040)) code |= 0x2000;
+
+ zoomx = 32 + zoomx;
+ zoomy = 32 + zoomy;
+
+ sy = ((oy + 16 - 1) & 0x1ff) - 16;
+
+ sx = ((ox + 16 + 3) & 0x1ff) - 16;
+
+ pdrawgfxzoom(bitmap,machine->gfx[sprite_gfx + (code >= 0x1000 ? 0 : 1)],
+ code,
+ color,
+ flipx,flipy,
+ sx,sy,
+ cliprect,TRANSPARENCY_PEN,15,
+ zoomx << 11,zoomy << 11,
+ pri ? 0 : 0x2);
+
+ }
+
+ last = ((aerofgt_rasterram[0x402/2] << 5) - 0x8000) / 2;
-// if (notdraw) continue;
+ for (attr_start = ((aerofgt_spriteram3_size / 2) / 2) - 4 ; attr_start >= last ; attr_start -= 4)
+ {
+ int code;
+ int ox,oy,sx,sy,zoomx,zoomy,flipx,flipy,color,pri;
+
+ ox = aerofgt_spriteram3[attr_start + 1] & 0x01ff;
+ oy = aerofgt_spriteram3[attr_start + 0] & 0x01ff;
+ flipx = aerofgt_spriteram3[attr_start + 2] & 0x0800;
+ flipy = aerofgt_spriteram3[attr_start + 2] & 0x8000;
+ color = aerofgt_spriteram3[attr_start + 2] & 0x000f;
+
+ zoomx = (aerofgt_spriteram3[attr_start + 1] & 0xf000) >> 12;
+ zoomy = (aerofgt_spriteram3[attr_start + 0] & 0xf000) >> 12;
+ pri = aerofgt_spriteram3[attr_start + 2] & 0x0010;
+ code = aerofgt_spriteram3[attr_start + 3] & 0x1fff;
if (!(aerofgt_spriteram3[attr_start + 2] & 0x0040)) code |= 0x2000;
zoomx = 32 + zoomx;
zoomy = 32 + zoomy;
- sy = ((oy + 16) & 0x1ff) - 16;
+ sy = ((oy + 16 - 1) & 0x1ff) - 16;
- sx = ((ox + 16) & 0x1ff) - 16;
+ sx = ((ox + 16 + 3) & 0x1ff) - 16;
pdrawgfxzoom(bitmap,machine->gfx[sprite_gfx + (code >= 0x1000 ? 0 : 1)],
code,
@@ -582,6 +657,22 @@ VIDEO_UPDATE( pspikesb )
return 0;
}
+VIDEO_UPDATE( spikes91 )
+{
+ int i,scrolly;
+
+ tilemap_set_scroll_rows(bg1_tilemap,256);
+ scrolly = bg1scrolly;
+
+ for (i = 0;i < 256;i++)
+ tilemap_set_scrollx(bg1_tilemap,(i + scrolly) & 0xff,aerofgt_rasterram[i+0x01f0/2]+0x96+0x16);
+ tilemap_set_scrolly(bg1_tilemap,0,scrolly);
+
+ tilemap_draw(bitmap,cliprect,bg1_tilemap,0,0);
+ spikes91_draw_sprites(screen->machine,bitmap,cliprect);
+ return 0;
+}
+
VIDEO_UPDATE( karatblz )
{
tilemap_set_scrollx(bg1_tilemap,0,bg1scrollx-8);