diff --git a/CHANGES b/CHANGES index 7b44a0886..c4e584f1f 100644 --- a/CHANGES +++ b/CHANGES @@ -42,6 +42,7 @@ Bugfixes: - GB Video: Initialize LCDC in renderer - GBA I/O: Mask off WAITCNT bits that cannot be written - GB Memory: Fix HDMA5 value after DMA completes + - GB Video: Hblank IRQs should mask LYC=LY IRQs Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers diff --git a/src/gb/video.c b/src/gb/video.c index 3a638baa6..ddcda0450 100644 --- a/src/gb/video.c +++ b/src/gb/video.c @@ -138,7 +138,7 @@ int32_t GBVideoProcessEvents(struct GBVideo* video, int32_t cycles) { callbacks->videoFrameEnded(callbacks->context); } } - if (GBRegisterSTATIsLYCIRQ(video->stat) && lyc == video->ly) { + if (!GBRegisterSTATIsHblankIRQ(video->stat) && GBRegisterSTATIsLYCIRQ(video->stat) && lyc == video->ly) { video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT); } GBUpdateIRQs(video->p);