From a6495428870f9e00f30c35132159593186094c28 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Mon, 14 Jan 2013 02:13:14 -0800 Subject: Small fix to bg drawing that yields the proper res for direct color DMA --- vdp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 9d922dd..a88e57d 100644 --- a/vdp.c +++ b/vdp.c @@ -929,16 +929,16 @@ void check_render_bg(vdp_context * context, int32_t line) if (context->latched_mode & BIT_H40) { linecyc /= 16; if (linecyc >= 50 && linecyc < 210) { - uint32_t x = ((linecyc-50)&(~0x1))*2; + uint32_t x = (linecyc-50)*2; start = context->framebuf + line * 320 + x; - end = start + 4; + end = start + 2; } } else { linecyc /= 20; if (linecyc >= 43 && linecyc < 171) { - uint32_t x = ((linecyc-48)&(~0x1))*2; + uint32_t x = (linecyc-43)*2; start = context->framebuf + line * 256 + x; - end = start + 4; + end = start + 2; } } uint16_t color = context->cram[context->regs[REG_BG_COLOR] & 0x3F]; -- cgit v1.2.3