mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-18 03:59:14 +01:00
Panic on invalid reads/writes for non-mmu games.
Previously it would fall through to the mmu code path, and raise a dsi exception, which it would never check for, so it would continue executing code silently.
This commit is contained in:
parent
96e92d33b7
commit
1963717855
@ -18,6 +18,7 @@
|
|||||||
#include "Common/Atomic.h"
|
#include "Common/Atomic.h"
|
||||||
#include "Common/Common.h"
|
#include "Common/Common.h"
|
||||||
|
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/HW/GPFifo.h"
|
#include "Core/HW/GPFifo.h"
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
@ -119,7 +120,7 @@ inline void ReadFromHardware(T &_var, const u32 em_address, const u32 effective_
|
|||||||
// fake VMEM
|
// fake VMEM
|
||||||
_var = bswap((*(const T*)&m_pFakeVMEM[em_address & FAKEVMEM_MASK]));
|
_var = bswap((*(const T*)&m_pFakeVMEM[em_address & FAKEVMEM_MASK]));
|
||||||
}
|
}
|
||||||
else
|
else if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
|
||||||
{
|
{
|
||||||
// MMU
|
// MMU
|
||||||
u32 tlb_addr = TranslateAddress(em_address, flag);
|
u32 tlb_addr = TranslateAddress(em_address, flag);
|
||||||
@ -135,6 +136,10 @@ inline void ReadFromHardware(T &_var, const u32 em_address, const u32 effective_
|
|||||||
_var = bswap((*(const T*)&m_pRAM[tlb_addr & RAM_MASK]));
|
_var = bswap((*(const T*)&m_pRAM[tlb_addr & RAM_MASK]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PanicAlertT("Invalid Read at 0x%08x, PC = 0x%08x ", em_address, PC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -204,7 +209,7 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address,
|
|||||||
// fake VMEM
|
// fake VMEM
|
||||||
*(T*)&m_pFakeVMEM[em_address & FAKEVMEM_MASK] = bswap(data);
|
*(T*)&m_pFakeVMEM[em_address & FAKEVMEM_MASK] = bswap(data);
|
||||||
}
|
}
|
||||||
else
|
else if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
|
||||||
{
|
{
|
||||||
// MMU
|
// MMU
|
||||||
u32 tlb_addr = TranslateAddress(em_address, flag);
|
u32 tlb_addr = TranslateAddress(em_address, flag);
|
||||||
@ -220,6 +225,10 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address,
|
|||||||
*(T*)&m_pRAM[tlb_addr & RAM_MASK] = bswap(data);
|
*(T*)&m_pRAM[tlb_addr & RAM_MASK] = bswap(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PanicAlertT("Invalid Write to 0x%08x, PC = 0x%08x ", em_address, PC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// =====================
|
// =====================
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user