From 8db9f3bd9d2a47bfc4a2096cde9a31a0720052fe Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 1 Nov 2020 13:28:31 -0800 Subject: Multiplying by zero and shifting by zero are very different. Fixes regression in Overdrive 2 --- vdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdp.c b/vdp.c index b4c0448..86c4d54 100644 --- a/vdp.c +++ b/vdp.c @@ -1160,7 +1160,7 @@ static void read_map_scroll(uint16_t column, uint16_t vsram_off, uint32_t line, 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; -- cgit v1.2.3