Skip to content

Commit

Permalink
NES: Tweak behavior of halt/dummy reads during DMA
Browse files Browse the repository at this point in the history
These halt/dummy reads shouldn't trigger the DMA issues - only actual DMA reads should
  • Loading branch information
SourMesen committed Nov 15, 2023
1 parent a764fc8 commit 10aa708
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/NES/NesCpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void NesCpu::ProcessPendingDma(uint16_t readAddress)
assert(_needHalt || _needDummyRead);
processCycle();
if(!skipDummyReads) {
ProcessDmaRead(readAddress, prevReadAddress, enableInternalRegReads, isNesBehavior);
_memoryManager->Read(readAddress, MemoryOperationType::DummyRead);
}
EndCpuCycle(true);
}
Expand All @@ -426,7 +426,7 @@ void NesCpu::ProcessPendingDma(uint16_t readAddress)
//Align to read cycle before starting sprite DMA (or align to perform DMC read)
processCycle();
if(!skipDummyReads) {
ProcessDmaRead(readAddress, prevReadAddress, enableInternalRegReads, isNesBehavior);
_memoryManager->Read(readAddress, MemoryOperationType::DummyRead);
}
EndCpuCycle(true);
}
Expand Down

0 comments on commit 10aa708

Please sign in to comment.