diff --git a/src/ppu.c b/src/ppu.c index ed8ea5c..ee6c973 100644 --- a/src/ppu.c +++ b/src/ppu.c @@ -555,7 +555,8 @@ void draw_dot_ppu(ppu_t *ppu) { unsigned char bg_palette = bg_pa0 | (bg_pa1 << 1); unsigned char bg_color = bg_pt0 | (bg_pt1 << 1); - if (ppu->dot <= 7 && !(ppu->mask & PPU_MASK_SHOW_BG_LEFT)) { + if ((ppu->dot <= 7 && !(ppu->mask & PPU_MASK_SHOW_BG_LEFT)) || + !(ppu->mask & PPU_MASK_SHOW_BG)) { bg_color = 0; } @@ -573,7 +574,8 @@ void draw_dot_ppu(ppu_t *ppu) { bool sp_pt0 = ppu->sprite_shift[i * 2] & 0x100; bool sp_pt1 = ppu->sprite_shift[i * 2 + 1] & 0x100; unsigned char sp_color_tmp = sp_pt0 | (sp_pt1 << 1); - if (ppu->dot <= 7 && !(ppu->mask & PPU_MASK_SHOW_SPRITES_LEFT)) { + if ((ppu->dot <= 7 && !(ppu->mask & PPU_MASK_SHOW_SPRITES_LEFT)) || + !(ppu->mask & PPU_MASK_SHOW_SPRITES)) { sp_color_tmp = 0; }