From 0fd8a13a93bcef754fbf64ad6506c96228b69a16 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:12:52 -0300 Subject: [PATCH] fix: don't start HDMA in vblank --- src/ppu.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ppu.zig b/src/ppu.zig index c89f5a1..725142a 100644 --- a/src/ppu.zig +++ b/src/ppu.zig @@ -569,7 +569,9 @@ pub const Ppu = struct { } // See if HBlank DMA is present and not enabled - pollBlankingDma(&cpu.bus, .HBlank); + + if (!self.dispstat.vblank.read()) + pollBlankingDma(&cpu.bus, .HBlank); self.dispstat.hblank.set(); self.sched.push(.HBlank, 68 * 4 -| late);