summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2009-07-19 22:36:56 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2009-07-19 22:36:56 +0000
commitef478440b0000696b2b0fe311e74fb42581737fa (patch)
tree885cb6620fd2b70ecc67dc2cca94a84d45959bda /src
parent273cb7af5047671573856e96004d218183bff85c (diff)
(MESS-specific) snes: fixed 16x16 tiles in 2bpp mode, fixes gfxs in many games, most notably Super Adventure Island.
Diffstat (limited to 'src')
-rw-r--r--src/mame/video/snes.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mame/video/snes.c b/src/mame/video/snes.c
index 291640f67f2..7fe9837d6dd 100644
--- a/src/mame/video/snes.c
+++ b/src/mame/video/snes.c
@@ -262,7 +262,7 @@ INLINE void snes_draw_tile_2(UINT8 screen, UINT8 layer, UINT16 tileaddr, INT16 x
for( ii = x; ii < (x + 8); ii++ )
{
- register UINT8 colour;
+ UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0);
@@ -353,7 +353,7 @@ INLINE void snes_draw_tile_4(UINT8 screen, UINT8 layer, UINT16 tileaddr, INT16 x
for( ii = x; ii < (x + 8); ii++ )
{
- register UINT8 colour;
+ UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0) |
@@ -450,7 +450,7 @@ INLINE void snes_draw_tile_8(UINT8 screen, UINT8 layer, UINT16 tileaddr, INT16 x
for( ii = x; ii < (x + 8); ii++ )
{
- register UINT8 colour;
+ UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0) |
@@ -549,7 +549,7 @@ INLINE void snes_draw_tile_object(UINT8 screen, UINT16 tileaddr, INT16 x, UINT8
for( ii = x; ii < (x + 8); ii++ )
{
- register UINT8 colour;
+ UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0) |
@@ -613,7 +613,7 @@ INLINE void snes_draw_tile_object_w(UINT8 screen, UINT16 tileaddr, INT16 x, UINT
x <<= 1;
for( ii = x; ii < (x + 16); ii += 2 )
{
- register UINT8 colour;
+ UINT8 colour;
if( flip )
{
colour = (plane[0] & mask ? 1 : 0) | (plane[1] & mask ? 2 : 0) |
@@ -705,7 +705,7 @@ static void snes_update_line_2(UINT8 screen, UINT8 layer, UINT16 curline )
/* Jump to base map address */
tmap = snes_ppu.layer[layer].map;
/* Offset vertically */
- tmap += table_vscroll[snes_ppu.layer[layer].map_size][vtilescroll >> 5];
+ tmap += table_vscroll[snes_ppu.layer[layer].map_size & 3][(vtilescroll >> 5) & 3];
/* Scroll vertically */
tmap += (vtilescroll & 0x1f) << 6;
/* Remember this position */
@@ -730,7 +730,7 @@ static void snes_update_line_2(UINT8 screen, UINT8 layer, UINT16 curline )
priority = table_bgd_pty[snes_ppu.mode > 1][layer][(snes_vram[tmap + ii + 1] & 0x20) >> 5];
pal = (snes_vram[tmap + ii + 1] & 0x1c); /* 8 palettes of 4 colours */
tile = (snes_vram[tmap + ii + 1] & 0x3) << 8;
- tile |= snes_vram[tmap + ii];
+ tile |= (snes_vram[tmap + ii] & 0xff);
/* Mode 0 palettes are layer specific */
if( snes_ppu.mode == 0 )
@@ -749,7 +749,7 @@ static void snes_update_line_2(UINT8 screen, UINT8 layer, UINT16 curline )
}
else
{
- tile += 32;
+ tile += 16;
}
}
tile_line = -tile_line + 7;
@@ -758,7 +758,7 @@ static void snes_update_line_2(UINT8 screen, UINT8 layer, UINT16 curline )
{
if( line > 7 )
{
- tile += 32;
+ tile += 16;
tile_line -= 8;
}
}
@@ -877,7 +877,7 @@ static void snes_update_line_2_hi(UINT8 screen, UINT8 layer, UINT16 curline )
}
else
{
- tile += 32;
+ tile += 16;
}
}
tile_line = -tile_line + 7;
@@ -886,7 +886,7 @@ static void snes_update_line_2_hi(UINT8 screen, UINT8 layer, UINT16 curline )
{
if( line > 7 )
{
- tile += 32;
+ tile += 16;
tile_line -= 8;
}
}
@@ -1276,7 +1276,7 @@ static void snes_update_line_mode7(UINT8 screen, UINT8 layer, UINT16 curline )
INT16 ma, mb, mc, md;
INT16 xc, yc, tx, ty, sx, sy, hs, vs, xpos, xdir;
UINT8 priority = 0;
- register UINT8 colour = 0;
+ UINT8 colour = 0;
#ifdef SNES_DBG_video
if( debug_options.bg_disabled[0] )