summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2020-11-01 13:28:31 -0800
committerMichael Pavone <pavone@retrodev.com>2020-11-01 13:28:31 -0800
commit8db9f3bd9d2a47bfc4a2096cde9a31a0720052fe (patch)
treedaff3d8dae9c9f1f3cfcded4465ca16201abedee
parentec05a9a8d6a47ef124245940d62df8ed35b7247c (diff)
Multiplying by zero and shifting by zero are very different. Fixes regression in Overdrive 2
-rw-r--r--vdp.c2
1 files changed, 1 insertions, 1 deletions
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;