CPU: Reads should happen slightly earlier within a CPU cycle compared to writes
Fixes Rendering Ranger R2 freeze on stage start
This commit is contained in:
parent
03848580a5
commit
6032728699
1 changed files with 3 additions and 1 deletions
|
@ -216,7 +216,7 @@ void MemoryManager::Exec()
|
||||||
|
|
||||||
uint8_t MemoryManager::Read(uint32_t addr, MemoryOperationType type)
|
uint8_t MemoryManager::Read(uint32_t addr, MemoryOperationType type)
|
||||||
{
|
{
|
||||||
IncrementMasterClock();
|
IncrementMasterClockValue(_cpuSpeed - 4);
|
||||||
|
|
||||||
uint8_t value;
|
uint8_t value;
|
||||||
if(_handlers[addr >> 12]) {
|
if(_handlers[addr >> 12]) {
|
||||||
|
@ -228,6 +228,8 @@ uint8_t MemoryManager::Read(uint32_t addr, MemoryOperationType type)
|
||||||
MessageManager::Log("[Debug] Read - missing handler: $" + HexUtilities::ToHex(addr));
|
MessageManager::Log("[Debug] Read - missing handler: $" + HexUtilities::ToHex(addr));
|
||||||
}
|
}
|
||||||
_console->ProcessCpuRead(addr, value, type);
|
_console->ProcessCpuRead(addr, value, type);
|
||||||
|
|
||||||
|
IncrementMasterClockValue<4>();
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue