fix uninitialised memory mapping

This commit is contained in:
RSDuck 2019-07-21 23:56:24 +02:00 committed by RSDuck
parent d74b15eecc
commit 00cd9af033
3 changed files with 6 additions and 1 deletions

View File

@ -124,7 +124,6 @@ void ARMv5::Reset()
GetMemRegion = NDS::ARM9GetMemRegion;
}
CP15Reset();
ARM::Reset();
}

View File

@ -258,9 +258,11 @@ void ARMv5::UpdatePURegions(bool update_all)
void ARMv5::UpdateRegionTimings(u32 addrstart, u32 addrend)
{
printf("initialising region timings %x %x\n", addrstart, addrend);
addrstart >>= 12;
addrend >>= 12;
if (addrend == 0xFFFFF) addrend++;
for (u32 i = addrstart; i < addrend; i++)

View File

@ -501,6 +501,10 @@ void Reset()
ARM9ClockShift = 1;
MainRAMMask = 0x3FFFFF;
}
// has to be called before InitTimings
// otherwise some PU settings are completely
// unitialised on the first run
ARM9->CP15Reset();
ARM9Timestamp = 0; ARM9Target = 0;
ARM7Timestamp = 0; ARM7Target = 0;