mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Identified __osGetActiveQueue, and updated some code to reflect that
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
glabel func_800B71B0
|
||||
/* 0B7DB0 800B71B0 27BDF7B8 */ addiu $sp, $sp, -0x848
|
||||
/* 0B7DB4 800B71B4 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 0B7DB8 800B71B8 0C03491C */ jal func_800D2470
|
||||
/* 0B7DB8 800B71B8 0C03491C */ jal __osGetActiveQueue
|
||||
/* 0B7DBC 800B71BC 00000000 */ nop
|
||||
/* 0B7DC0 800B71C0 8C4E0004 */ lw $t6, 4($v0)
|
||||
/* 0B7DC4 800B71C4 2404FFFF */ li $a0, -1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
glabel func_800D2470
|
||||
glabel __osGetActiveQueue
|
||||
/* 0D3070 800D2470 3C02800E */ lui $v0, %hi(__osActiveQueue) # $v0, 0x800e
|
||||
/* 0D3074 800D2474 03E00008 */ jr $ra
|
||||
/* 0D3078 800D2478 8C42488C */ lw $v0, %lo(__osActiveQueue)($v0)
|
||||
|
||||
@@ -5,7 +5,15 @@
|
||||
#include "macros.h"
|
||||
#include "libultra_internal.h"
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
//Only fails because it doesn't generate a NOP after this. Maybe -01?
|
||||
extern OSThread *__osActiveQueue;
|
||||
OSThread *__osGetActiveQueue(void) {
|
||||
return __osActiveQueue;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/func_800D2470.s")
|
||||
#endif
|
||||
|
||||
#define PI_Q_BUF_LEN 1
|
||||
extern u32 __osPiAccessQueueEnabled;//__osPiAccessQueueEnabled
|
||||
|
||||
+12
-15
@@ -144,27 +144,24 @@ GLOBAL_ASM("asm/non_matchings/thread0_epc/thread0.s")
|
||||
#endif
|
||||
|
||||
void func_800B70D0(void) {
|
||||
unk800D2470 *node = func_800D2470(); //Might be epcInfo?
|
||||
while(node->unk4 != -1) {
|
||||
if (node->unk4 == 0) {
|
||||
node->unk118 &= 0xFFFF00FE;
|
||||
node->unk118 |= 0x6C01;
|
||||
return;
|
||||
OSThread *node = __osGetActiveQueue();
|
||||
while(node->priority != -1) {
|
||||
if (node->priority == 0) {
|
||||
node->context.sr &= 0xFFFF00FE;
|
||||
node->context.sr |= 0x6C01;
|
||||
break;
|
||||
}
|
||||
node = node->next;
|
||||
node = node->tlnext;
|
||||
}
|
||||
}
|
||||
|
||||
void func_800B7144(void) {
|
||||
s32 temp_v0_2;
|
||||
s32 phi_v0;
|
||||
s32 phi_return;
|
||||
unk800D2470 *node = func_800D2470();
|
||||
while (node->unk4 != -1) {
|
||||
if ((node->unk4 > 0) && (node->unk4 < 0x80)) {
|
||||
osStopThread(&node->thread);
|
||||
OSThread *node = __osGetActiveQueue();
|
||||
while (node->priority != -1) {
|
||||
if ((node->priority > 0) && (node->priority < 128)) {
|
||||
osStopThread(&node->next);
|
||||
}
|
||||
node = node->next;
|
||||
node = node->tlnext;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user