Mercurial > repos > blastem
diff vdp.c @ 454:e9b6fe443bf2
Fix per-column scrolling bug
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 02 Sep 2013 01:02:18 -0700 |
parents | b491df8bdbc0 |
children | c49ecf575784 788ba843a731 |
line wrap: on
line diff
--- a/vdp.c Mon Sep 02 00:20:56 2013 -0700 +++ b/vdp.c Mon Sep 02 01:02:18 2013 -0700 @@ -619,7 +619,7 @@ vscroll <<= 1; vscroll |= 1; } - vscroll &= (context->vsram[(context->regs[REG_MODE_3] & BIT_VSCROLL ? column : 0) + vsram_off] + line); + vscroll &= (context->vsram[(context->regs[REG_MODE_3] & BIT_VSCROLL ? (column-2)&63 : 0) + vsram_off] + line); context->v_offset = vscroll & v_offset_mask; //printf("%s | line %d, vsram: %d, vscroll: %d, v_offset: %d\n",(vsram_off ? "B" : "A"), line, context->vsram[context->regs[REG_MODE_3] & 0x4 ? column : 0], vscroll, context->v_offset); vscroll >>= vscroll_shift;