diff options
author | Determinant <ted.sybil@gmail.com> | 2017-11-17 00:30:28 -0500 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2017-11-17 00:30:28 -0500 |
commit | 0157d11bfc1f0cb01815f75bbf80635f71910b4c (patch) | |
tree | bc8743ed76030ae932917ab85165913cb09e3950 /src/main.rs | |
parent | 35061de86daee3ed46f4a6ba14983672424dce56 (diff) |
pass the vbl nmi timing test
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 2b66c55..45bece5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -274,13 +274,11 @@ fn main() { let mut cpu = mos6502::CPU::new(memory::CPUMemory::new(&mut ppu, &mapper, Some(&p1ctl), None)); let ptr = &mut cpu as *mut mos6502::CPU; cpu.mem.init(ptr); - loop { cpu.step(); while cpu.cycle > 0 { - if ppu.tick() || ppu.tick() || ppu.tick() { - cpu.trigger_nmi(); + cpu.trigger_delayed_nmi() } cpu.cycle -= 1; } |