diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-12-21 20:05:07 -0600 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2014-12-21 20:05:07 -0600 |
| commit | e423939c9f0d60e346be42b19e1a3e613f852fae (patch) | |
| tree | 75c927efe7c0abc21946039249a4e3570a192735 /Source/Core | |
| parent | 9ec4a64c54c4d6aeb445723919f98abc9f93f36e (diff) | |
| parent | e7a49ae5f36d63be0e30664e94c4bb4c6892d240 (diff) | |
Merge pull request #1754 from FioraAeterna/mmulogspam
Eliminate some spammy log messages in MMU mode
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/HW/Memmap.cpp | 14 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/PPCAnalyst.cpp | 7 |
2 files changed, 9 insertions, 12 deletions
diff --git a/Source/Core/Core/HW/Memmap.cpp b/Source/Core/Core/HW/Memmap.cpp index 186ad67dd5..df1be370fb 100644 --- a/Source/Core/Core/HW/Memmap.cpp +++ b/Source/Core/Core/HW/Memmap.cpp @@ -237,16 +237,10 @@ void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength) void ClearCacheLine(const u32 _Address) { - u8* ptr = GetPointer(_Address); - if (ptr != nullptr) - { - memset(ptr, 0, 32); - } - else - { - for (u32 i = 0; i < 32; i += 8) - Write_U64(0, _Address + i); - } + // FIXME: does this do the right thing if dcbz is run on hardware memory, e.g. + // the FIFO? Do games even do that? Probably not, but we should try to be correct... + for (u32 i = 0; i < 32; i += 8) + Write_U64(0, _Address + i); } void DMA_LCToMemory(const u32 _MemAddr, const u32 _CacheAddr, const u32 _iNumBlocks) diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp index 5827b99845..1064e6af2e 100644 --- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp @@ -646,7 +646,8 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock *block, CodeBuffer *buffer, u32 return address; } - if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU && (address & JIT_ICACHE_VMEM_BIT)) + bool virtualAddr = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU && (address & JIT_ICACHE_VMEM_BIT); + if (virtualAddr) { if (!Memory::TranslateAddress(address, Memory::FLAG_NO_EXCEPTION)) { @@ -789,7 +790,9 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock *block, CodeBuffer *buffer, u32 else { // ISI exception or other critical memory exception occured (game over) - ERROR_LOG(DYNA_REC, "Instruction hex was 0!"); + // We can continue on in MMU mode though, so don't spam this error in that case. + if (!virtualAddr) + ERROR_LOG(DYNA_REC, "Instruction hex was 0!"); break; } } |
