PPU: impl scrolling

This commit is contained in:
Andrew Glaze
2024-08-23 23:36:25 -04:00
parent af3be8d93d
commit 9f12bb2ba0
5 changed files with 119 additions and 35 deletions

View File

@@ -23,8 +23,11 @@ class Bus {
func tick(_ cycles: UInt8) {
self.cycles += Int(cycles)
let newFrame = self.ppu.tick(cycles * 3)
if newFrame {
let nmiBefore = ppu.nmiInterrupt != nil
_ = self.ppu.tick(cycles * 3)
let nmiAfter = ppu.nmiInterrupt != nil
if !nmiBefore && nmiAfter {
gameloopCallback(ppu)
}