From 3f7567449d1bc1e5152db0c8db74ce80d8dd4deb Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Fri, 24 Sep 2021 08:28:15 -0400 Subject: [PATCH] Move and split out some OS fuinctions and a GU --- lib/src/gu/guPerspectiveF.c | 7 +++++++ lib/src/os/osInitialize.c | 13 +++++++++++++ lib/src/os/osSetThreadPri.c | 7 +++++++ lib/src/unknown_0CCF90.c | 9 --------- 4 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 lib/src/gu/guPerspectiveF.c create mode 100644 lib/src/os/osInitialize.c create mode 100644 lib/src/os/osSetThreadPri.c diff --git a/lib/src/gu/guPerspectiveF.c b/lib/src/gu/guPerspectiveF.c new file mode 100644 index 00000000..2e62c7a5 --- /dev/null +++ b/lib/src/gu/guPerspectiveF.c @@ -0,0 +1,7 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800CC920 */ + +#include "types.h" +#include "macros.h" + +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/guPerspectiveF.s") diff --git a/lib/src/os/osInitialize.c b/lib/src/os/osInitialize.c new file mode 100644 index 00000000..803e299f --- /dev/null +++ b/lib/src/os/osInitialize.c @@ -0,0 +1,13 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800CC5A0 */ + +#include "types.h" +#include "macros.h" +#include "ultra64.h" + +u64 osClockRate = OS_CLOCK_RATE; +u32 __osShutdown = 0; +u32 __OSGlobalIntMask = OS_IM_ALL; +s32 D_800E38B0 = 0; // 64DD flag? (Hints from SM64 code) + +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osInitialize.s") diff --git a/lib/src/os/osSetThreadPri.c b/lib/src/os/osSetThreadPri.c new file mode 100644 index 00000000..d4d52792 --- /dev/null +++ b/lib/src/os/osSetThreadPri.c @@ -0,0 +1,7 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x800CC840 */ + +#include "types.h" +#include "macros.h" + +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osSetThreadPri.s") diff --git a/lib/src/unknown_0CCF90.c b/lib/src/unknown_0CCF90.c index 1fd0ae18..aa773f38 100644 --- a/lib/src/unknown_0CCF90.c +++ b/lib/src/unknown_0CCF90.c @@ -9,12 +9,3 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alMainBusParam.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alMainBusPull.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alSaveParam.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/alSavePull.s") - -u64 osClockRate = OS_CLOCK_RATE; -u32 __osShutdown = 0; -u32 __OSGlobalIntMask = OS_IM_ALL; -s32 D_800E38B0 = 0; // 64DD flag? (Hints from SM64 code) - -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osInitialize.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/osSetThreadPri.s") -GLOBAL_ASM("lib/asm/non_matchings/unknown_0CCF90/guPerspectiveF.s")