mirror of
https://github.com/Candygoblen123/SwiftNES.git
synced 2025-09-11 04:52:04 -05:00
PPU: impl scrolling
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user