changeset 2013:dcdad92f84a4

Multiplying by zero and shifting by zero are very different. Fixes regression in Overdrive 2
author Michael Pavone <pavone@retrodev.com>
date Sun, 01 Nov 2020 13:28:31 -0800
parents b05295c2ad04
children 9ca255be938d
files vdp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vdp.c	Sun Nov 01 12:35:58 2020 -0800
+++ b/vdp.c	Sun Nov 01 13:28:31 2020 -0800
@@ -1160,7 +1160,7 @@
 	vscroll >>= vscroll_shift;
 	//TODO: Verify the behavior for a setting of 2
 	static const uint16_t hscroll_masks[] = {0x1F, 0x3F, 0x1F, 0x7F};
-	static const uint16_t v_shifts[] = {6, 7, 0, 8};
+	static const uint16_t v_shifts[] = {6, 7, 16, 8};
 	uint16_t hscroll_mask = hscroll_masks[context->regs[REG_SCROLL] & 0x3];
 	uint16_t v_shift = v_shifts[context->regs[REG_SCROLL] & 0x3];
 	uint16_t hscroll, offset;