comparison vdp.c @ 1913:2c742812bcbb

Fix regression at the very start of The Revenge of Shinobi
author Michael Pavone <pavone@retrodev.com>
date Wed, 01 Apr 2020 23:15:47 -0700
parents 2d462aa78349
children b91c35bce3e9
comparison
equal deleted inserted replaced
1912:00fb99805445 1913:2c742812bcbb
3498 bg_index = context->regs[REG_BG_COLOR] & 0x3F; 3498 bg_index = context->regs[REG_BG_COLOR] & 0x3F;
3499 bg_color = context->colors[bg_index]; 3499 bg_color = context->colors[bg_index];
3500 } else if (context->regs[REG_MODE_1] & BIT_MODE_4) { 3500 } else if (context->regs[REG_MODE_1] & BIT_MODE_4) {
3501 bg_index = 0x10 + (context->regs[REG_BG_COLOR] & 0xF); 3501 bg_index = 0x10 + (context->regs[REG_BG_COLOR] & 0xF);
3502 bg_color = context->colors[MODE4_OFFSET + bg_index]; 3502 bg_color = context->colors[MODE4_OFFSET + bg_index];
3503 } else {
3504 bg_color = render_map_color(0, 0, 0);
3503 } 3505 }
3504 if (context->done_composite) { 3506 if (context->done_composite) {
3505 uint8_t pixel = context->compositebuf[dst-context->output]; 3507 uint8_t pixel = context->compositebuf[dst-context->output];
3506 if (!(pixel & 0x3F | test_layer)) { 3508 if (!(pixel & 0x3F | test_layer)) {
3507 pixel = pixel & 0xC0 | bg_index; 3509 pixel = pixel & 0xC0 | bg_index;