Clearing memory on boot

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@505 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY 2008-09-13 00:41:31 +00:00
parent 7a68316c61
commit daabc11592
2 changed files with 7 additions and 3 deletions

View File

@ -109,6 +109,8 @@ void CBoot::EmulatedBIOS(bool _bDebug)
UReg_MSR& m_MSR = ((UReg_MSR&)PowerPC::ppcState.msr);
m_MSR.FP = 1;
Memory::Clear();
//TODO: Game iso info to 0x80000000 according to yagcd - or does apploader do this?
Memory::Write_U32(0x4c000064, 0x80000300); // write default DFI Handler: rfi

View File

@ -581,11 +581,13 @@ bool Shutdown()
void Clear()
{
if (m_pRAM)
memset(m_pRAM,0,RAM_SIZE);
memset(m_pRAM, 0, RAM_SIZE);
if (m_pL1Cache)
memset(m_pL1Cache,0,L1_CACHE_SIZE);
memset(m_pL1Cache, 0, L1_CACHE_SIZE);
if (m_pEFB)
memset(m_pEFB,0,EFB_SIZE);
memset(m_pEFB, 0, EFB_SIZE);
if (Core::GetStartupParameter().bWii && m_pEXRAM)
memset(m_pEXRAM, 0, EXRAM_SIZE);
}