changeset 1290:aa1a8eb5bb2b

Change handling of invalid scroll plane sizes. Fixes title and high score screens in The Incredible Hulk
author Michael Pavone <pavone@retrodev.com>
date Sun, 19 Mar 2017 12:54:20 -0700
parents 6ad59a62e656
children f17fe0d00626
files vdp.c
diffstat 1 files changed, 3 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/vdp.c	Sun Mar 19 11:17:40 2017 -0700
+++ b/vdp.c	Sun Mar 19 12:54:20 2017 -0700
@@ -998,23 +998,8 @@
 		}
 		context->flags &= ~FLAG_WINDOW;
 	}
-	uint16_t vscroll;
-	switch(context->regs[REG_SCROLL] & 0x30)
-	{
-	case 0:
-		vscroll = 0xFF;
-		break;
-	case 0x10:
-		vscroll = 0x1FF;
-		break;
-	case 0x20:
-		//TODO: Verify this behavior
-		vscroll = 0;
-		break;
-	case 0x30:
-		vscroll = 0x3FF;
-		break;
-	}
+	//TODO: Verify behavior for 0x20 case
+	uint16_t vscroll = 0xFF | (context->regs[REG_SCROLL] & 0x30) << 4;
 	if (context->double_res) {
 		vscroll <<= 1;
 		vscroll |= 1;
@@ -1057,7 +1042,7 @@
 		break;
 	case 0x2:
 		//TODO: Verify this behavior
-		hscroll_mask = 0;
+		hscroll_mask = 0x5F;
 		v_mul = 0;
 		break;
 	case 0x3: