summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2018-04-20 05:10:39 +0200
committer angelosa <salese_corp_ltd@email.it>2018-04-20 05:10:39 +0200
commitf61049755c082bdcfcf1ac8f5d5f1bdd2651b511 (patch)
tree2edcd0c6ddf6fae37d95af6541afbfcb8f2361f0
parent75ef9f3412fe58ed3ac21a9111e76391bd8c60e8 (diff)
stvvdp2.cpp: fix RBG0 cache map range, fixes Head On graphics update in Sega Memorial Collection 1 [Angelo Salese]
-rw-r--r--src/devices/video/stvvdp2.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/devices/video/stvvdp2.cpp b/src/devices/video/stvvdp2.cpp
index 82046b250c6..d6849470b92 100644
--- a/src/devices/video/stvvdp2.cpp
+++ b/src/devices/video/stvvdp2.cpp
@@ -4194,12 +4194,18 @@ void saturn_state::stv_vdp2_draw_basic_tilemap(bitmap_rgb32 &bitmap, const recta
// store map information
stv_vdp2_layer_data_placement.map_offset_min = 0x7fffffff;
stv_vdp2_layer_data_placement.map_offset_max = 0x00000000;
+
for (i = 0; i < stv2_current_tilemap.map_count; i++)
{
+ uint32_t max_base;
+
if ( base[i] < stv_vdp2_layer_data_placement.map_offset_min )
stv_vdp2_layer_data_placement.map_offset_min = base[i];
- if ( base[i] > stv_vdp2_layer_data_placement.map_offset_max )
- stv_vdp2_layer_data_placement.map_offset_max = base[i];
+
+ // Head On in Sega Memorial Collection 1 cares (uses RBG0 with all map regs equal to 0x20)
+ max_base = (base[i] + plsize_bytes/4);
+ if ( max_base > stv_vdp2_layer_data_placement.map_offset_max )
+ stv_vdp2_layer_data_placement.map_offset_max = max_base;
}