Rambo-1: Temporary fix for IRQs until a better model is found
See: http://forums.nesdev.com/viewtopic.php?f=9&t=19565
This commit is contained in:
parent
5b0c208984
commit
4f3f58c067
2 changed files with 3 additions and 2 deletions
|
@ -23,6 +23,7 @@ public:
|
||||||
Stream(_lastCycle, _cyclesDown);
|
Stream(_lastCycle, _cyclesDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<uint8_t minDelay = 10>
|
||||||
A12StateChange UpdateVramAddress(uint16_t addr, uint32_t frameCycle)
|
A12StateChange UpdateVramAddress(uint16_t addr, uint32_t frameCycle)
|
||||||
{
|
{
|
||||||
A12StateChange result = A12StateChange::None;
|
A12StateChange result = A12StateChange::None;
|
||||||
|
@ -42,7 +43,7 @@ public:
|
||||||
result = A12StateChange::Fall;
|
result = A12StateChange::Fall;
|
||||||
}
|
}
|
||||||
} else if(addr & 0x1000) {
|
} else if(addr & 0x1000) {
|
||||||
if(_cyclesDown > 10) {
|
if(_cyclesDown > minDelay) {
|
||||||
result = A12StateChange::Rise;
|
result = A12StateChange::Rise;
|
||||||
}
|
}
|
||||||
_cyclesDown = 0;
|
_cyclesDown = 0;
|
||||||
|
|
|
@ -157,7 +157,7 @@ public:
|
||||||
virtual void NotifyVRAMAddressChange(uint16_t addr) override
|
virtual void NotifyVRAMAddressChange(uint16_t addr) override
|
||||||
{
|
{
|
||||||
if(!_irqCycleMode) {
|
if(!_irqCycleMode) {
|
||||||
if(_a12Watcher.UpdateVramAddress(addr, _console->GetPpu()->GetFrameCycle()) == A12StateChange::Rise) {
|
if(_a12Watcher.UpdateVramAddress<30>(addr, _console->GetPpu()->GetFrameCycle()) == A12StateChange::Rise) {
|
||||||
ClockIrqCounter(Rambo1::PpuIrqDelay);
|
ClockIrqCounter(Rambo1::PpuIrqDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue