BaseMapper: Fixed missing CPU clocks in ProcessCpuClock
This commit is contained in:
parent
853ef92063
commit
17f814e47a
3 changed files with 9 additions and 4 deletions
|
@ -97,6 +97,8 @@ void CPU::Exec()
|
|||
|
||||
void CPU::IncCycleCount()
|
||||
{
|
||||
_memoryManager->ProcessCpuClock();
|
||||
|
||||
if(_dmcDmaRunning) {
|
||||
//CPU is being stalled by the DMC's DMA transfer
|
||||
_dmcCounter--;
|
||||
|
|
|
@ -97,6 +97,11 @@ uint8_t MemoryManager::DebugRead(uint16_t addr)
|
|||
return value;
|
||||
}
|
||||
|
||||
void MemoryManager::ProcessCpuClock()
|
||||
{
|
||||
_mapper->ProcessCpuClock();
|
||||
}
|
||||
|
||||
uint8_t MemoryManager::Read(uint16_t addr, MemoryOperationType operationType)
|
||||
{
|
||||
uint8_t value;
|
||||
|
@ -106,8 +111,6 @@ uint8_t MemoryManager::Read(uint16_t addr, MemoryOperationType operationType)
|
|||
value = ReadRegister(addr);
|
||||
}
|
||||
|
||||
_mapper->ProcessCpuClock();
|
||||
|
||||
CheatManager::ApplyRamCodes(addr, value);
|
||||
|
||||
Debugger::ProcessRamOperation(operationType, addr, value);
|
||||
|
@ -124,8 +127,6 @@ void MemoryManager::Write(uint16_t addr, uint8_t value)
|
|||
} else {
|
||||
WriteRegister(addr, value);
|
||||
}
|
||||
|
||||
_mapper->ProcessCpuClock();
|
||||
}
|
||||
|
||||
void MemoryManager::ProcessVramAccess(uint16_t &addr)
|
||||
|
|
|
@ -51,6 +51,8 @@ class MemoryManager: public Snapshotable
|
|||
|
||||
uint8_t* GetInternalRAM();
|
||||
|
||||
void ProcessCpuClock();
|
||||
|
||||
uint8_t Read(uint16_t addr, MemoryOperationType operationType = MemoryOperationType::Read);
|
||||
void Write(uint16_t addr, uint8_t value);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue