diff options
| author | Fiora <fioraaeterna@gmail.com> | 2014-10-21 05:55:56 -0700 |
|---|---|---|
| committer | Fiora <fioraaeterna@gmail.com> | 2014-10-21 05:55:56 -0700 |
| commit | f4fa8d0b832fff4dd0fe2bb208fdfbf82aa79866 (patch) | |
| tree | 75cde0006044f4a97111af5dcdfe5a2f6ea5d846 | |
| parent | 080883ad9e5c2d1961ded65042aea544161c2d4a (diff) | |
MMU: allow page-table loads/stores if MMU is off
Fixes regressions in some games that apparently required this to work, but
don't really require full MMU emulation (e.g. with exceptions and all).
| -rw-r--r-- | Source/Core/Core/HW/MemmapFunctions.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Source/Core/Core/HW/MemmapFunctions.cpp b/Source/Core/Core/HW/MemmapFunctions.cpp index 1287f1e948..93d5e020de 100644 --- a/Source/Core/Core/HW/MemmapFunctions.cpp +++ b/Source/Core/Core/HW/MemmapFunctions.cpp @@ -122,7 +122,7 @@ inline void ReadFromHardware(T &_var, const u32 em_address, const u32 effective_ // fake VMEM _var = bswap((*(const T*)&m_pFakeVMEM[em_address & FAKEVMEM_MASK])); } - else if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU) + else { // MMU // Handle loads that cross page boundaries (ewwww) @@ -145,7 +145,10 @@ inline void ReadFromHardware(T &_var, const u32 em_address, const u32 effective_ { if (flag == FLAG_READ) { - GenerateDSIException(addr, false); + if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU) + PanicAlertT("Invalid Read at 0x%08x, PC = 0x%08x ", em_address, PC); + else + GenerateDSIException(addr, false); break; } } @@ -171,7 +174,10 @@ inline void ReadFromHardware(T &_var, const u32 em_address, const u32 effective_ { if (flag == FLAG_READ) { - GenerateDSIException(em_address, false); + if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU) + PanicAlertT("Invalid Read at 0x%08x, PC = 0x%08x ", em_address, PC); + else + GenerateDSIException(em_address, false); } } else @@ -187,10 +193,6 @@ inline void ReadFromHardware(T &_var, const u32 em_address, const u32 effective_ } } } - else - { - PanicAlertT("Invalid Read at 0x%08x, PC = 0x%08x ", em_address, PC); - } } @@ -260,7 +262,7 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address, // fake VMEM *(T*)&m_pFakeVMEM[em_address & FAKEVMEM_MASK] = bswap(data); } - else if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU) + else { // MMU // Handle stores that cross page boundaries (ewwww) @@ -276,7 +278,10 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address, { if (flag == FLAG_WRITE) { - GenerateDSIException(addr, true); + if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU) + PanicAlertT("Invalid Write to 0x%08x, PC = 0x%08x ", em_address, PC); + else + GenerateDSIException(addr, true); break; } } @@ -302,7 +307,10 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address, { if (flag == FLAG_WRITE) { - GenerateDSIException(em_address, true); + if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU) + PanicAlertT("Invalid Write to 0x%08x, PC = 0x%08x ", em_address, PC); + else + GenerateDSIException(em_address, true); } } else @@ -318,10 +326,6 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address, } } } - else - { - PanicAlertT("Invalid Write to 0x%08x, PC = 0x%08x ", em_address, PC); - } } // ===================== |
