From 437d581f120e762a70a254f5eae030e4eae87679 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Mon, 2 Sep 2013 01:02:18 -0700 Subject: Fix per-column scrolling bug --- vdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 76aea0d..35b0acb 100644 --- a/vdp.c +++ b/vdp.c @@ -619,7 +619,7 @@ void read_map_scroll(uint16_t column, uint16_t vsram_off, uint32_t line, uint16_ 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; -- cgit v1.2.3