diff --git a/Core/A12Watcher.h b/Core/A12Watcher.h index 82140a9b..10ac93ac 100644 --- a/Core/A12Watcher.h +++ b/Core/A12Watcher.h @@ -23,6 +23,7 @@ public: Stream(_lastCycle, _cyclesDown); } + template A12StateChange UpdateVramAddress(uint16_t addr, uint32_t frameCycle) { A12StateChange result = A12StateChange::None; @@ -42,7 +43,7 @@ public: result = A12StateChange::Fall; } } else if(addr & 0x1000) { - if(_cyclesDown > 10) { + if(_cyclesDown > minDelay) { result = A12StateChange::Rise; } _cyclesDown = 0; diff --git a/Core/Rambo1.h b/Core/Rambo1.h index 01e910f6..a24c053e 100644 --- a/Core/Rambo1.h +++ b/Core/Rambo1.h @@ -157,7 +157,7 @@ public: virtual void NotifyVRAMAddressChange(uint16_t addr) override { if(!_irqCycleMode) { - if(_a12Watcher.UpdateVramAddress(addr, _console->GetPpu()->GetFrameCycle()) == A12StateChange::Rise) { + if(_a12Watcher.UpdateVramAddress<30>(addr, _console->GetPpu()->GetFrameCycle()) == A12StateChange::Rise) { ClockIrqCounter(Rambo1::PpuIrqDelay); } }