summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-01-14 02:13:14 -0800
committerMike Pavone <pavone@retrodev.com>2013-01-14 02:13:14 -0800
commita6495428870f9e00f30c35132159593186094c28 (patch)
treed021e738165409f21782b6b4131994863a39c408
parented8a193aa7d7af337408d912e87fd4d53b57edbc (diff)
Small fix to bg drawing that yields the proper res for direct color DMA
-rw-r--r--vdp.c8
1 files changed, 4 insertions, 4 deletions
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];