diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2020-05-01 14:14:58 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2020-05-01 14:14:58 -0400 |
commit | 1531e217c7d80aaaeb551a08966a99db6fc55225 (patch) | |
tree | 2e36e7a0f63a66c44512b417faa0ba1eb5fbe655 | |
parent | 150ec9cba3a4bf7624d2cdbc338b2849bde4decf (diff) | |
parent | e370125c3e2e34936152768c40bd932b88690baa (diff) |
Merge branch 'master' of github.com:martmists/pokediamond into pikalax_work
-rw-r--r-- | arm9/asm/OS_protectionRegion.s | 22 | ||||
-rw-r--r-- | arm9/lib/include/OS.h (renamed from arm9/lib/include/os.h) | 8 | ||||
-rw-r--r-- | arm9/lib/include/OS_alloc.h (renamed from arm9/lib/include/os_alloc.h) | 2 | ||||
-rw-r--r-- | arm9/lib/include/OS_arena.h (renamed from arm9/lib/include/os_arena.h) | 0 | ||||
-rw-r--r-- | arm9/lib/include/OS_protectionRegion.h (renamed from arm9/lib/include/os_protectionRegion.h) | 1 | ||||
-rw-r--r-- | arm9/lib/include/OS_system.h (renamed from arm9/lib/include/os_system.h) | 0 | ||||
-rw-r--r-- | arm9/lib/include/nitro.h | 2 | ||||
-rw-r--r-- | arm9/lib/src/OS_alloc.c | 4 | ||||
-rw-r--r-- | arm9/lib/src/OS_arena.c | 4 | ||||
-rw-r--r-- | arm9/lib/src/OS_protectionRegion.c | 27 |
10 files changed, 38 insertions, 32 deletions
diff --git a/arm9/asm/OS_protectionRegion.s b/arm9/asm/OS_protectionRegion.s deleted file mode 100644 index 31bf52bd..00000000 --- a/arm9/asm/OS_protectionRegion.s +++ /dev/null @@ -1,22 +0,0 @@ - .include "asm/macros.inc" - .include "global.inc" - - .text - - arm_func_start OS_SetDPermissionsForProtectionRegion -OS_SetDPermissionsForProtectionRegion: ; 0x020CC9D8 - mrc p15, 0x0, r2, c5, c0, 0x2 - bic r2, r2, r0 - orr r2, r2, r1 - mcr p15, 0x0, r2, c5, c0, 0x2 - bx lr - - arm_func_start OS_SetProtectionRegion1 -OS_SetProtectionRegion1: ; 0x020CC9EC - mcr p15, 0x0, r0, c6, c1, 0x0 - bx lr - - arm_func_start OS_SetProtectionRegion2 -OS_SetProtectionRegion2: ; 0x020CC9F4 - mcr p15, 0x0, r0, c6, c2, 0x0 - bx lr diff --git a/arm9/lib/include/os.h b/arm9/lib/include/OS.h index 591d8db0..b152dfb8 100644 --- a/arm9/lib/include/os.h +++ b/arm9/lib/include/OS.h @@ -7,10 +7,10 @@ #include "types.h" #include "consts.h" -#include "os_protectionRegion.h" -#include "os_arena.h" -#include "os_alloc.h" -#include "os_system.h" +#include "OS_protectionRegion.h" +#include "OS_arena.h" +#include "OS_alloc.h" +#include "OS_system.h" void OS_Init(); diff --git a/arm9/lib/include/os_alloc.h b/arm9/lib/include/OS_alloc.h index 1c4b6122..08fb3224 100644 --- a/arm9/lib/include/os_alloc.h +++ b/arm9/lib/include/OS_alloc.h @@ -6,7 +6,7 @@ #define POKEDIAMOND_OS_ALLOC_H #include "types.h" -#include "os_arena.h" +#include "OS_arena.h" typedef int OSHeapHandle; diff --git a/arm9/lib/include/os_arena.h b/arm9/lib/include/OS_arena.h index f1893a3d..f1893a3d 100644 --- a/arm9/lib/include/os_arena.h +++ b/arm9/lib/include/OS_arena.h diff --git a/arm9/lib/include/os_protectionRegion.h b/arm9/lib/include/OS_protectionRegion.h index 7b212934..8e25420a 100644 --- a/arm9/lib/include/os_protectionRegion.h +++ b/arm9/lib/include/OS_protectionRegion.h @@ -8,6 +8,7 @@ #include "types.h" #include "consts.h" +void OS_SetDPermissionsForProtectionRegion(register u32 setMask, register u32 flags); void OS_SetProtectionRegion1(u32 param); void OS_SetProtectionRegion2(u32 param); diff --git a/arm9/lib/include/os_system.h b/arm9/lib/include/OS_system.h index c7f121bd..c7f121bd 100644 --- a/arm9/lib/include/os_system.h +++ b/arm9/lib/include/OS_system.h diff --git a/arm9/lib/include/nitro.h b/arm9/lib/include/nitro.h index 8cf603f5..8d875653 100644 --- a/arm9/lib/include/nitro.h +++ b/arm9/lib/include/nitro.h @@ -8,7 +8,7 @@ extern "C" { // Include all nitro files #include "types.h" #include "consts.h" -#include "os.h" +#include "OS.h" #include "mmap.h" #ifdef __cplusplus diff --git a/arm9/lib/src/OS_alloc.c b/arm9/lib/src/OS_alloc.c index 242c5571..e883656e 100644 --- a/arm9/lib/src/OS_alloc.c +++ b/arm9/lib/src/OS_alloc.c @@ -2,9 +2,9 @@ // Created by mart on 4/23/20.
//
#include "function_target.h"
-#include "os_alloc.h"
+#include "OS_alloc.h"
#include "consts.h"
-#include "os_system.h"
+#include "OS_system.h"
void* OSiHeapInfo[OS_ARENA_MAX];
diff --git a/arm9/lib/src/OS_arena.c b/arm9/lib/src/OS_arena.c index 58b338f1..eb04e60b 100644 --- a/arm9/lib/src/OS_arena.c +++ b/arm9/lib/src/OS_arena.c @@ -3,8 +3,8 @@ //
#include "function_target.h"
#include "consts.h"
-#include "os_arena.h"
-#include "os_protectionRegion.h"
+#include "OS_arena.h"
+#include "OS_protectionRegion.h"
extern u32 OS_GetConsoleType();
extern BOOL OSi_MainExArenaEnabled;
diff --git a/arm9/lib/src/OS_protectionRegion.c b/arm9/lib/src/OS_protectionRegion.c new file mode 100644 index 00000000..4d6cf974 --- /dev/null +++ b/arm9/lib/src/OS_protectionRegion.c @@ -0,0 +1,27 @@ +// +// Created by red031000 on 2020-04-24. +// + +#include "function_target.h" +#include "OS_protectionRegion.h" + +ARM_FUNC asm void OS_SetDPermissionsForProtectionRegion(register u32 setMask, register u32 flags) +{ + mrc p15, 0x0, r2, c5, c0, 0x2 + bic r2, r2, r0 + orr r2, r2, r1 + mcr p15, 0x0, r2, c5, c0, 0x2 + bx lr +} + +ARM_FUNC asm void OS_SetProtectionRegion1(u32 param) +{ + mcr p15, 0x0, r0, c6, c1, 0x0 + bx lr +} + +ARM_FUNC asm void OS_SetProtectionRegion2(u32 param) +{ + mcr p15, 0x0, r0, c6, c2, 0x0 + bx lr +} |