This commit is contained in:
Lior Halphon 2019-06-08 14:35:52 +03:00
parent bb7fa95426
commit 0da2930109
2 changed files with 2 additions and 5 deletions

View File

@ -1529,7 +1529,7 @@ static bool lcd(GB_gameboy_t *gb, char *arguments, char *modifiers, const debugg
}
GB_log(gb, "LCDC:\n");
GB_log(gb, " LCD enabled: %s\n",(gb->io_registers[GB_IO_LCDC] & 128)? "Enabled" : "Disabled");
GB_log(gb, " %s: %s\n", GB_is_cgb(gb)? (gb->cgb_mode? "Sprite priority flags" : "Background and Window") : "Background",
GB_log(gb, " %s: %s\n", (gb->cgb_mode? "Sprite priority flags" : "Background and Window"),
(gb->io_registers[GB_IO_LCDC] & 1)? "Enabled" : "Disabled");
GB_log(gb, " Objects: %s\n", (gb->io_registers[GB_IO_LCDC] & 2)? "Enabled" : "Disabled");
GB_log(gb, " Object size: %s\n", (gb->io_registers[GB_IO_LCDC] & 4)? "8x16" : "8x8");

View File

@ -112,7 +112,7 @@ typedef struct __attribute__((packed)) {
static bool window_enabled(GB_gameboy_t *gb)
{
if ((gb->io_registers[GB_IO_LCDC] & 0x1) == 0) {
if (!gb->cgb_mode && GB_is_cgb(gb)) {
if (!gb->cgb_mode) {
return false;
}
}
@ -376,9 +376,6 @@ static void render_pixel_if_possible(GB_gameboy_t *gb)
bg_enabled = false;
}
}
if (!GB_is_cgb(gb) && gb->in_window) {
bg_enabled = true;
}
{
uint8_t pixel = bg_enabled? fifo_item->pixel : 0;