From 564f1dcb3965ea0fe5294b69acfc94e0fee32de9 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Wed, 20 May 2020 19:54:27 +0300 Subject: [PATCH] bugfix: Properly handle VCOUNT interrupt edge case for line 227. fixes #97 Former-commit-id: 6e1cd347e82edfd6eca2b89e6e2a86e68e39d580 Former-commit-id: e9aeb8cc4dd503cfb3da4552e5618de5e982039b --- rustboyadvance-core/src/gpu/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rustboyadvance-core/src/gpu/mod.rs b/rustboyadvance-core/src/gpu/mod.rs index 4f1e5fd..be0c762 100644 --- a/rustboyadvance-core/src/gpu/mod.rs +++ b/rustboyadvance-core/src/gpu/mod.rs @@ -496,9 +496,8 @@ impl Gpu { }; } VBlankHBlank => { - self.update_vcount(self.vcount + 1, irqs); - if self.vcount < DISPLAY_HEIGHT + VBLANK_LINES - 1 { + self.update_vcount(self.vcount + 1, irqs); self.dispstat.set_hblank_flag(false); self.cycles_left_for_current_state = CYCLES_HDRAW; self.state = VBlankHDraw;