- [FIX] la capa Window es mostrava sempre

- [FIX] L'interrupció LYC=LY no funcionava correctament
- [FIX] els vectors de les interrupcions estaven mal: tots duien a l'interrupcio VBLANK
This commit is contained in:
2025-01-26 22:12:33 +01:00
parent 59feaf274f
commit 7f5760d826
2 changed files with 7 additions and 7 deletions

View File

@@ -176,7 +176,7 @@ namespace gbscreen
void fill_line_buffer_win(uint8_t LY)
{
const uint8_t LCDC = mem::readMem(0xff40);
if ((LCDC & 0x21) == 0) return;
if ((LCDC & 0x21) != 0x21) return;
const uint8_t WY = mem::readMem(0xff4a);
if (LY<WY) return;
const uint8_t WX = mem::readMem(0xff4b);
@@ -341,8 +341,8 @@ namespace gbscreen
}
if (LY==LYC)
{
STAT = (STAT & 0xFB) | 0x40;
if (STAT&0x04) stat_interrupt = true;
STAT = (STAT & 0xFB) | 0x04;
if (STAT&0x40) stat_interrupt = true;
}
else
{