summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Roberto Zandona <robertoz@mamedev.org>2010-09-11 20:42:29 +0000
committer Roberto Zandona <robertoz@mamedev.org>2010-09-11 20:42:29 +0000
commitb5dd4c8a76736c35aaa763c12486cb258ba1134d (patch)
tree25d9d97c95743bee7244f0cd90a20270a9184d0f
parentbb7657c8d38d9dfcd363ecff638fa8a5e48ad1e0 (diff)
ssv: implemented y offset for tilemaps 2-8 (removed kludge for all games axcept eaglshot)
-rw-r--r--src/mame/video/ssv.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/mame/video/ssv.c b/src/mame/video/ssv.c
index e27e0f21ab1..7c5eb03e92f 100644
--- a/src/mame/video/ssv.c
+++ b/src/mame/video/ssv.c
@@ -291,10 +291,12 @@ VIDEO_START( gdfs )
---- ba98 ---- ---- ? 0101 for all games
---- ---- -6-- ---- y tilemap inversion?
---- ---- ---4 ---- x tilemap inversion?
- 1c0076-77 -e-- ---- ---- ---- global/local spites coordinates
+ 1c0076-77 -e-- ---- ---- ---- global/local sprites coordinates
+ ---- ---- -6-- ---- shadow (2bits - 4bits)
1c0078-79 ---- ---- ---- ---- ?
1c007a-7b ---- ---- ---- ---- ?
-
+ ---- -a-- ---- ---- left-right up-down inversion
+
1c0060-7f:
drifto94: 0000 0025 00cd 01c6 - 0001 0013 0101 0106
@@ -759,19 +761,20 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
{
int attr, code, color, num, sprite;
int sx, x, xoffs, flipx, xnum, xstart, xend, xinc, sprites_offsx;
- int sy, y, yoffs, flipy, ynum, ystart, yend, yinc, sprites_offsy;
+ int sy, y, yoffs, flipy, ynum, ystart, yend, yinc, sprites_offsy, tilemaps_offsy;
int mode,global_depth,global_xnum,global_ynum;
- mode = s1[ 0 ];
- sprite = s1[ 1 ];
- xoffs = s1[ 2 ];
- yoffs = s1[ 3 ];
+ mode = s1[ 0 ];
+ sprite = s1[ 1 ];
+ xoffs = s1[ 2 ];
+ yoffs = s1[ 3 ];
/* Last sprite */
if (sprite & 0x8000) break;
/* Single-sprite address */
- s2 = &spriteram16[ (sprite & 0x7fff) * 4 ];
+ s2 = &spriteram16[ (sprite & 0x7fff) * 4 ];
+ tilemaps_offsy = ((s2[3] & 0x1ff) - (s2[3] & 0x200));
/* Every single sprite is offset by x & yoffs, and additionally
by one of the 8 x & y offsets in the 1c0040-1c005f area */
@@ -818,17 +821,19 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
scroll = s2[ 0 ]; // scroll index
- switch( ssv_scroll[0x7a/2] )
+ if (ssv_scroll[0x76/2] & 0x1000)
+ sy -= 0x20; // kludge for eaglshot
+ else
{
- case 0x4940: sy += 0x60; break; // srmp4
- case 0x5940: sy -= 0x20; break; // drifto94, dynagear, eaglshot, keithlcy, mslider, stmblade
- case 0x5950: sy += 0xdf; break; // gdfs
- case 0x7940: sy -= 0x10; break; // ultrax, twineag2
+ if (ssv_scroll[0x7a/2] & 0x0800)
+ {
+ if (ssv_scroll[0x7a/2] & 0x1000) // drifto94, dynagear, keithlcy, mslider, stmblade, gdfs, ultrax, twineag2
+ sy -= tilemaps_offsy;
+ else // srmp4
+ sy += tilemaps_offsy;
+ }
}
-// sx += xoffs;
-// sy += yoffs;
-
if ((mode & 0x001f) != 0)
draw_row(machine, bitmap, cliprect, sx, sy, scroll);
}