# HG changeset patch # User Mike Pavone # Date 1358158394 28800 # Node ID 4cb8a3891e264d58d2a6f9a2a7ba820cb05f736a # Parent 806c3b7a6f2a47a0b4a26c53a802e5c628328f24 Small fix to bg drawing that yields the proper res for direct color DMA diff -r 806c3b7a6f2a -r 4cb8a3891e26 vdp.c --- a/vdp.c Mon Jan 14 02:03:35 2013 -0800 +++ b/vdp.c Mon Jan 14 02:13:14 2013 -0800 @@ -929,16 +929,16 @@ 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];