diff options
author | Arisotura <thetotalworm@gmail.com> | 2021-10-28 21:24:39 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2021-10-28 21:24:39 +0200 |
commit | 43daa1c7d25043eb4e9eb13e6d2df58f1d0400f6 (patch) | |
tree | b42fe5c263bca1e4713fc9a944f74c9a3544b1d9 /src | |
parent | e121953c9a42e853dc71f08e1e342ecd1e2c8753 (diff) |
blarg
Diffstat (limited to 'src')
-rw-r--r-- | src/ARM.cpp | 12 | ||||
-rw-r--r-- | src/ARM.h | 4 | ||||
-rw-r--r-- | src/DSi.cpp | 48 |
3 files changed, 33 insertions, 31 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp index 1abdbdd..9b114f2 100644 --- a/src/ARM.cpp +++ b/src/ARM.cpp @@ -83,6 +83,8 @@ ARMv5::ARMv5() : ARM(0) #ifndef JIT_ENABLED DTCM = new u8[DTCMPhysicalSize]; #endif + + PU_Map = PU_PrivMap; } ARMv4::ARMv4() : ARM(1) @@ -162,7 +164,7 @@ void ARMv5::Reset() GetMemRegion = NDS::ARM9GetMemRegion; } - //PU_Map = PU_PrivMap; + PU_Map = PU_PrivMap; ARM::Reset(); } @@ -239,10 +241,10 @@ void ARM::DoSavestate(Savestate* file) SetupCodeMem(R[15]); // should fix it ((ARMv5*)this)->RegionCodeCycles = ((ARMv5*)this)->MemTimings[R[15] >> 12][0]; - /*if ((CPSR & 0x1F) == 0x10) + if ((CPSR & 0x1F) == 0x10) ((ARMv5*)this)->PU_Map = ((ARMv5*)this)->PU_UserMap; else - ((ARMv5*)this)->PU_Map = ((ARMv5*)this)->PU_PrivMap;*/ + ((ARMv5*)this)->PU_Map = ((ARMv5*)this)->PU_PrivMap; } else { @@ -501,10 +503,10 @@ void ARM::UpdateMode(u32 oldmode, u32 newmode, bool phony) if ((!phony) && (Num == 0)) { - /*if ((newmode & 0x1F) == 0x10) + if ((newmode & 0x1F) == 0x10) ((ARMv5*)this)->PU_Map = ((ARMv5*)this)->PU_UserMap; else - ((ARMv5*)this)->PU_Map = ((ARMv5*)this)->PU_PrivMap;*/ + ((ARMv5*)this)->PU_Map = ((ARMv5*)this)->PU_PrivMap; } } @@ -293,8 +293,8 @@ public: u8 PU_UserMap[0x100000]; // games operate under system mode, generally - #define PU_Map PU_PrivMap - //u8* PU_Map; + //#define PU_Map PU_PrivMap + u8* PU_Map; // code/16N/32N/32S u8 MemTimings[0x100000][4]; diff --git a/src/DSi.cpp b/src/DSi.cpp index eb702d0..7560578 100644 --- a/src/DSi.cpp +++ b/src/DSi.cpp @@ -500,30 +500,30 @@ void SetupDirectBoot() SPI_Firmware::SetupDirectBoot(true); - ARM9->CP15Write(0x100, 0x00056078); - ARM9->CP15Write(0x200, 0x0000004A); - ARM9->CP15Write(0x201, 0x0000004A); - ARM9->CP15Write(0x300, 0x0000000A); - ARM9->CP15Write(0x502, 0x15111011); - ARM9->CP15Write(0x503, 0x05101011); - ARM9->CP15Write(0x600, 0x04000033); - ARM9->CP15Write(0x601, 0x04000033); - ARM9->CP15Write(0x610, 0x02000031); - ARM9->CP15Write(0x611, 0x02000031); - ARM9->CP15Write(0x620, 0x00000000); - ARM9->CP15Write(0x621, 0x00000000); - ARM9->CP15Write(0x630, 0x08000033); - ARM9->CP15Write(0x631, 0x08000033); - ARM9->CP15Write(0x640, 0x0E00001B); - ARM9->CP15Write(0x641, 0x0E00001B); - ARM9->CP15Write(0x650, 0x00000000); - ARM9->CP15Write(0x651, 0x00000000); - ARM9->CP15Write(0x660, 0xFFFF001D); - ARM9->CP15Write(0x661, 0xFFFF001D); - ARM9->CP15Write(0x670, 0x02FFC01B); - ARM9->CP15Write(0x671, 0x02FFC01B); - ARM9->CP15Write(0x910, 0x0E00000A); - ARM9->CP15Write(0x911, 0x00000020); + NDS::ARM9->CP15Write(0x100, 0x00056078); + NDS::ARM9->CP15Write(0x200, 0x0000004A); + NDS::ARM9->CP15Write(0x201, 0x0000004A); + NDS::ARM9->CP15Write(0x300, 0x0000000A); + NDS::ARM9->CP15Write(0x502, 0x15111011); + NDS::ARM9->CP15Write(0x503, 0x05101011); + NDS::ARM9->CP15Write(0x600, 0x04000033); + NDS::ARM9->CP15Write(0x601, 0x04000033); + NDS::ARM9->CP15Write(0x610, 0x02000031); + NDS::ARM9->CP15Write(0x611, 0x02000031); + NDS::ARM9->CP15Write(0x620, 0x00000000); + NDS::ARM9->CP15Write(0x621, 0x00000000); + NDS::ARM9->CP15Write(0x630, 0x08000033); + NDS::ARM9->CP15Write(0x631, 0x08000033); + NDS::ARM9->CP15Write(0x640, 0x0E00001B); + NDS::ARM9->CP15Write(0x641, 0x0E00001B); + NDS::ARM9->CP15Write(0x650, 0x00000000); + NDS::ARM9->CP15Write(0x651, 0x00000000); + NDS::ARM9->CP15Write(0x660, 0xFFFF001D); + NDS::ARM9->CP15Write(0x661, 0xFFFF001D); + NDS::ARM9->CP15Write(0x670, 0x02FFC01B); + NDS::ARM9->CP15Write(0x671, 0x02FFC01B); + NDS::ARM9->CP15Write(0x910, 0x0E00000A); + NDS::ARM9->CP15Write(0x911, 0x00000020); } void SoftReset() |