# HG changeset patch # User Michael Pavone # Date 1604266111 28800 # Node ID dcdad92f84a4e81b0dabc6583f2228bfca4cf473 # Parent b05295c2ad04d79aacfdb177ccd5891be6f62a88 Multiplying by zero and shifting by zero are very different. Fixes regression in Overdrive 2 diff -r b05295c2ad04 -r dcdad92f84a4 vdp.c --- 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;