- [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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user