summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/xavix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/xavix.cpp')
-rw-r--r--src/mame/video/xavix.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mame/video/xavix.cpp b/src/mame/video/xavix.cpp
index 4e4187ce6ca..08dca3a2527 100644
--- a/src/mame/video/xavix.cpp
+++ b/src/mame/video/xavix.cpp
@@ -603,6 +603,11 @@ void xavix_state::draw_tile_line(screen_device &screen, bitmap_ind16 &bitmap, co
if ((ypos >= cliprect.min_y && ypos <= cliprect.max_y))
{
+ // if bpp>4 then ignore unaligned palette selects bits based on bpp
+ // ttv_lotr uses 5bpp graphics (so 32 colour alignment) but sets palette 0xf (a 16 colour boundary) when it expects palette 0xe
+ if (bpp>4)
+ pal &= (0xf<<(bpp-4));
+
int bits_per_tileline = drawwidth * bpp;
// set the address here so we can increment in bits in the draw function
@@ -744,7 +749,8 @@ uint32_t xavix_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
dat |= (get_next_bit() << i);
}
- yposptr[x] = dat + 0x100;
+ if (x < cliprect.max_x)
+ yposptr[x] = dat + 0x100;
}
}