mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
c: osGetThreadPri
This commit is contained in:
@@ -172,12 +172,14 @@ ALL_ASSETS_BUILT := $(ANIMATIONS_BUILT) $(AUDIO_BUILT) $(BILLBOARDS_BUILT) $(BIN
|
||||
|
||||
$(BUILD_DIR)/lib/%.o: OPT_FLAGS := -O2
|
||||
$(BUILD_DIR)/lib/%.o: MIPSISET := -mips2
|
||||
$(BUILD_DIR)/lib/src/unknown_0C91A0.o : OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/unknown_0D29F0.o: OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/osGetThreadPri.o : OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/osSetTimer.o: OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/osTimer.o: OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/osViBlack.o: OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/osViSwapBuffer.o : OPT_FLAGS := -O1
|
||||
$(BUILD_DIR)/lib/src/unknown_0C91A0.o : OPT_FLAGS := -O1
|
||||
|
||||
|
||||
######################## Targets #############################
|
||||
|
||||
|
||||
+1
-1
@@ -9252,7 +9252,7 @@ glabel D_800E4878
|
||||
.word 0x02E6D354
|
||||
.word 0x00000000
|
||||
|
||||
glabel D_800E4880
|
||||
glabel __osThreadTail
|
||||
.word 0x00000000
|
||||
.word 0xFFFFFFFF
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
glabel osGetThreadPri
|
||||
/* 0D3140 800D2540 14800003 */ bnez $a0, .L800D2550
|
||||
/* 0D3144 800D2544 00000000 */ nop
|
||||
/* 0D3148 800D2548 3C04800E */ lui $a0, %hi(D_800E4890) # $a0, 0x800e
|
||||
/* 0D314C 800D254C 8C844890 */ lw $a0, %lo(D_800E4890)($a0)
|
||||
.L800D2550:
|
||||
/* 0D3150 800D2550 03E00008 */ jr $ra
|
||||
/* 0D3154 800D2554 8C820004 */ lw $v0, 4($a0)
|
||||
|
||||
/* 0D3158 800D2558 00000000 */ nop
|
||||
/* 0D315C 800D255C 00000000 */ nop
|
||||
@@ -0,0 +1,12 @@
|
||||
/* The comment below is needed for this file to be picked up by generate_ld */
|
||||
/* RAM_POS: 0x800D2540 */
|
||||
|
||||
#include "libultra_internal.h"
|
||||
|
||||
extern OSThread *D_800E4890; //__osRunningThread;
|
||||
OSPri osGetThreadPri(OSThread *thread)
|
||||
{
|
||||
if (thread == NULL)
|
||||
thread = D_800E4890;
|
||||
return thread->priority;
|
||||
}
|
||||
@@ -12,13 +12,12 @@ GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C8760.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C8790.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C87B4.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/func_800C87EC.s")
|
||||
//GLOBAL_ASM("lib/asm/non_matchings/unknown_0C91A0/osCreateMesgQueue.s")
|
||||
|
||||
extern OSThread D_800E4880;
|
||||
extern OSThread __osThreadTail;
|
||||
void osCreateMesgQueue(OSMesgQueue *mq, OSMesg *msg, s32 msgCount)
|
||||
{
|
||||
mq->mtqueue = (OSThread *)&D_800E4880;
|
||||
mq->fullqueue = (OSThread *)&D_800E4880;
|
||||
mq->mtqueue = (OSThread *)&__osThreadTail;
|
||||
mq->fullqueue = (OSThread *)&__osThreadTail;
|
||||
mq->validCount = 0;
|
||||
mq->first = 0;
|
||||
mq->msgCount = msgCount;
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "libultra_internal.h"
|
||||
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0C9B80/osPiStartDma.s")
|
||||
|
||||
@@ -4,39 +4,6 @@
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
|
||||
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D2470.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osPiCreateAccessQueue.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osGetThreadPri.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDisableInt.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osRestoreInt.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D25A0.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D2680.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D2760.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osViInit.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D2C60.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDequeueThread.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osExceptionPreamble.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osException.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/send_mesg.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osEnqueueAndYield.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osEnqueueThread.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osPopThread.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDispatchThread.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D35A0.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osProbeTLB.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D3670.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osJamMesg.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osPiGetCmdQueue.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D3820.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Putfld.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Printf.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSetSR.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osGetSR.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSetFpcCsr.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSiRawReadIo.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSiRawWriteIo.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osWritebackDCache.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osWritebackICache.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osMapTLBRdb.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osPiRawWriteIo.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D47F0.s")
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* The comment below is needed for this file to be picked up by generate_ld */
|
||||
/* RAM_POS: 0x800D2560 */
|
||||
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDisableInt.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osRestoreInt.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D25A0.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D2680.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D2760.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osViInit.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D2C60.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDequeueThread.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osExceptionPreamble.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osException.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/send_mesg.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osEnqueueAndYield.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osEnqueueThread.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osPopThread.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osDispatchThread.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/D_800D35A0.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osProbeTLB.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D3670.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osJamMesg.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osPiGetCmdQueue.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D3820.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Putfld.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Printf.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSetSR.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osGetSR.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSetFpcCsr.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSiRawReadIo.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSiRawWriteIo.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osWritebackDCache.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osWritebackICache.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osMapTLBRdb.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osPiRawWriteIo.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D47F0.s")
|
||||
+1
-1
@@ -785,7 +785,7 @@ D_800E4810 = 0x800E4810;
|
||||
D_800E4870 = 0x800E4870;
|
||||
D_800E4874 = 0x800E4874;
|
||||
D_800E4878 = 0x800E4878;
|
||||
D_800E4880 = 0x800E4880;
|
||||
__osThreadTail = 0x800E4880;
|
||||
D_800E4888 = 0x800E4888;
|
||||
D_800E488C = 0x800E488C;
|
||||
D_800E4890 = 0x800E4890;
|
||||
|
||||
Reference in New Issue
Block a user