From b4a36c0ef9d6563b9b247c697c250bc2633f39f1 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 15 May 2016 16:22:45 -0700 Subject: Fix bug in vflip implementation when in double resolution interlace mode --- vdp.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 1b3007a..2f87edf 100644 --- a/vdp.c +++ b/vdp.c @@ -826,20 +826,18 @@ void read_map_scroll_b(uint16_t column, uint32_t line, vdp_context * context) void render_map(uint16_t col, uint8_t * tmp_buf, uint8_t offset, vdp_context * context) { uint16_t address; - uint8_t shift, add; + uint16_t vflip_base; if (context->double_res) { address = ((col & 0x3FF) << 6); - shift = 1; - add = context->framebuf != context->oddbuf ? 1 : 0; + vflip_base = 60; } else { address = ((col & 0x7FF) << 5); - shift = 0; - add = 0; + vflip_base = 28; } if (col & MAP_BIT_V_FLIP) { - address += 28 - 4 * context->v_offset/*((context->v_offset << shift) + add)*/; + address += vflip_base - 4 * context->v_offset; } else { - address += 4 * context->v_offset/*((context->v_offset << shift) + add)*/; + address += 4 * context->v_offset; } uint16_t pal_priority = (col >> 9) & 0x70; int32_t dir; -- cgit v1.2.3