PPU: background rendering

This commit is contained in:
Andrew Glaze
2024-08-20 23:36:04 -04:00
parent be170bf750
commit f9efe23b0b
5 changed files with 15 additions and 8 deletions

View File

@@ -157,9 +157,10 @@ class CPU {
func run(onCycle: @escaping () -> (), onComplete: @escaping () -> ()) {
let opcodes = OPCODES_MAP
while true {
if let _nmi = bus.pollNMI() {
if bus.pollNMI() != nil {
print(programCounter)
interrupt(.NMI)
print(programCounter)
}
processOpcodes(onCycle: onCycle, opcodes: opcodes) {
onComplete()

View File

@@ -9,7 +9,7 @@ func dumpCpuState(_ cpu: CPU) -> String {
{
let (addr, _) = cpu.getAbsoluteAddress(opcode.mode, addr: cpu.programCounter + 1)
return (addr, cpu.memRead(addr))
return (addr, 0)//cpu.memRead(addr))
}()
}