From 887bd89668e248f907664908dd7da14bed8deef0 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Thu, 23 Jun 2022 05:45: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);