diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-01-14 02:13:14 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-01-14 02:13:14 -0800 |
commit | a6495428870f9e00f30c35132159593186094c28 (patch) | |
tree | d021e738165409f21782b6b4131994863a39c408 | |
parent | ed8a193aa7d7af337408d912e87fd4d53b57edbc (diff) |
Small fix to bg drawing that yields the proper res for direct color DMA
-rw-r--r-- | vdp.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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]; |