Mercurial > repos > blastem
comparison 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 |
comparison
equal
deleted
inserted
replaced
290:171f97e70d85 | 291:eea3b118940d |
---|---|
605 src = FBUF_SRC_B; | 605 src = FBUF_SRC_B; |
606 } else { | 606 } else { |
607 pixel = context->regs[REG_BG_COLOR] & 0x3F; | 607 pixel = context->regs[REG_BG_COLOR] & 0x3F; |
608 src = FBUF_SRC_BG; | 608 src = FBUF_SRC_BG; |
609 } | 609 } |
610 *dst = context->cram[pixel & 0x3F] | ((pixel & BUF_BIT_PRIORITY) ? FBUF_BIT_PRIORITY : 0) | src; | 610 *dst = (context->cram[pixel & 0x3F] & 0xEEE) | ((pixel & BUF_BIT_PRIORITY) ? FBUF_BIT_PRIORITY : 0) | src; |
611 } | 611 } |
612 } | 612 } |
613 } else { | 613 } else { |
614 //dst = context->framebuf + line * 320; | 614 //dst = context->framebuf + line * 320; |
615 //sprite_buf = context->linebuf + col * 8; | 615 //sprite_buf = context->linebuf + col * 8; |
1009 uint32_t x = (linecyc-43)*2; | 1009 uint32_t x = (linecyc-43)*2; |
1010 start = context->framebuf + line * 320 + x; | 1010 start = context->framebuf + line * 320 + x; |
1011 end = start + 2; | 1011 end = start + 2; |
1012 } | 1012 } |
1013 } | 1013 } |
1014 uint16_t color = context->cram[context->regs[REG_BG_COLOR] & 0x3F]; | 1014 uint16_t color = (context->cram[context->regs[REG_BG_COLOR] & 0x3F] & 0xEEE); |
1015 while (start != end) { | 1015 while (start != end) { |
1016 *start = color; | 1016 *start = color; |
1017 ++start; | 1017 ++start; |
1018 } | 1018 } |
1019 } | 1019 } |