From 020aafd156ac2839ee105f9c143655c3231e7f5c Mon Sep 17 00:00:00 2001 From: Matthew Berry Date: Mon, 14 Mar 2022 17:25:45 -0700 Subject: [PATCH] reset vblank flag at line 227 --- src/crab/gba/ppu.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crab/gba/ppu.cr b/src/crab/gba/ppu.cr index 8e6ecd1..c4d7116 100644 --- a/src/crab/gba/ppu.cr +++ b/src/crab/gba/ppu.cr @@ -62,7 +62,7 @@ module GBA @vcount = (@vcount + 1) % 228 @dispstat.vcounter = @vcount == @dispstat.vcount_setting @gba.interrupts.reg_if.vcounter = true if @dispstat.vcounter_irq_enable && @dispstat.vcounter - if @vcount == 0 + if @vcount == 227 @dispstat.vblank = false elsif @vcount == 160 @dispstat.vblank = true