From b02b9930473ebdde980e73403dae58a2c4516349 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 1 Mar 2018 10:15:22 -0800 Subject: [PATCH] GB: Cancel IRQs if interrupt is unasserted before dispatch (fixes #1000, #1003) --- src/gb/gb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gb/gb.c b/src/gb/gb.c index dd99b2bac..4d404e83c 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -612,6 +612,7 @@ void GBDetectModel(struct GB* gb) { void GBUpdateIRQs(struct GB* gb) { int irqs = gb->memory.ie & gb->memory.io[REG_IF]; if (!irqs) { + gb->cpu->irqPending = false; return; } gb->cpu->halted = false;