aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ARM.cpp1
-rw-r--r--src/CP15.cpp2
-rw-r--r--src/NDS.cpp4
3 files changed, 6 insertions, 1 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp
index dd0be6a..50ef8fd 100644
--- a/src/ARM.cpp
+++ b/src/ARM.cpp
@@ -124,7 +124,6 @@ void ARMv5::Reset()
GetMemRegion = NDS::ARM9GetMemRegion;
}
- CP15Reset();
ARM::Reset();
}
diff --git a/src/CP15.cpp b/src/CP15.cpp
index 5b5f935..77244f2 100644
--- a/src/CP15.cpp
+++ b/src/CP15.cpp
@@ -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++)
diff --git a/src/NDS.cpp b/src/NDS.cpp
index 3de9c1f..0bde139 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -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;