Mercurial > repos > blastem
diff vdp.c @ 291:eea3b118940d
Make sure all rendering operations mask CRAM with 0xEEE before using it
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 06 May 2013 00:57:56 -0700 |
parents | 9d10669f2579 |
children | e5e8b48ad157 |
line wrap: on
line diff
--- a/vdp.c Mon May 06 00:54:58 2013 -0700 +++ b/vdp.c Mon May 06 00:57:56 2013 -0700 @@ -607,7 +607,7 @@ pixel = context->regs[REG_BG_COLOR] & 0x3F; src = FBUF_SRC_BG; } - *dst = context->cram[pixel & 0x3F] | ((pixel & BUF_BIT_PRIORITY) ? FBUF_BIT_PRIORITY : 0) | src; + *dst = (context->cram[pixel & 0x3F] & 0xEEE) | ((pixel & BUF_BIT_PRIORITY) ? FBUF_BIT_PRIORITY : 0) | src; } } } else { @@ -1011,7 +1011,7 @@ end = start + 2; } } - uint16_t color = context->cram[context->regs[REG_BG_COLOR] & 0x3F]; + uint16_t color = (context->cram[context->regs[REG_BG_COLOR] & 0x3F] & 0xEEE); while (start != end) { *start = color; ++start;