Split more files, and move them around. Also found and matched osDpGetStatus

This commit is contained in:
Ryan Myers
2021-09-27 13:56:23 -04:00
parent 2dd55180a4
commit 33b949126b
11 changed files with 115 additions and 33 deletions
@@ -1,7 +0,0 @@
glabel func_800D18D0
/* 0D24D0 800D18D0 3C0EA410 */ lui $t6, 0xa410
/* 0D24D4 800D18D4 03E00008 */ jr $ra
/* 0D24D8 800D18D8 8DC2000C */ lw $v0, 0xc($t6)
/* 0D24DC 800D18DC 00000000 */ nop
+7
View File
@@ -0,0 +1,7 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D7470 */
#include "macros.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/lldiv.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/ldiv.s")
+69
View File
@@ -0,0 +1,69 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800CE730 */
#include "types.h"
#include "macros.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_rshift.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_rem.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_div.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_lshift.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_div.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_mul.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_divremi.s")
/*
unsigned long long __ull_rshift(unsigned long long a0, unsigned long long a1)
{
return a0 >> a1;
}
unsigned long long __ull_rem(unsigned long long a0, unsigned long long a1)
{
return a0 % a1;
}
unsigned long long __ull_div(unsigned long long a0, unsigned long long a1)
{
return a0 / a1;
}
unsigned long long __ll_lshift(unsigned long long a0, unsigned long long a1)
{
return a0 << a1;
}
long long __ll_rem(unsigned long long a0, long long a1)
{
return a0 % a1;
}
long long __ll_div(long long a0, long long a1)
{
return a0 / a1;
}
unsigned long long __ll_mul(unsigned long long a0, unsigned long long a1)
{
return a0 * a1;
}
void __ull_divremi(unsigned long long *div, unsigned long long *rem, unsigned long long a2, unsigned short a3)
{
*div = a2 / a3;
*rem = a2 % a3;
}
long long __ll_mod(long long a0, long long a1)
{
long long tmp = a0 % a1;
if ((tmp < 0 && a1 > 0) || (tmp > 0 && a1 < 0))
{
tmp += a1;
}
return tmp;
}
long long __ll_rshift(long long a0, long long a1)
{
return a0 >> a1;
}
*/
+8
View File
@@ -0,0 +1,8 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D69A0 */
#include "macros.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Genld.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Ldtob.s")
+7
View File
@@ -0,0 +1,7 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D6700 */
#include "macros.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Litob.s")
+8
View File
@@ -0,0 +1,8 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800D7460 */
#include "macros.h"
//Unlikely to ever be able to be decompiled
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSetCompare.s")
@@ -3,5 +3,8 @@
#include "types.h"
#include "macros.h"
#include "libultra_internal.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D24D0/func_800D18D0.s")
u32 osDpGetStatus(){
return IO_READ(DPC_STATUS_REG);
}
+10
View File
@@ -0,0 +1,10 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800CED20 */
#include "types.h"
#include "macros.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/func_800CED20.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__osPfsGetStatus.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__osPfsGetNextPage.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/osPfsReadWriteFile.s")
@@ -36,9 +36,3 @@ void osYieldThread(void){
}*/
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/osDestroyThread.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Litob.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Genld.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/_Ldtob.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/__osSetCompare.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/lldiv.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D3020/ldiv.s")
-17
View File
@@ -1,17 +0,0 @@
/* The comment below is needed for this file to be picked up by generate_ld */
/* RAM_POS: 0x800CE730 */
#include "types.h"
#include "macros.h"
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_rshift.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_rem.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_div.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_lshift.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_div.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ll_mul.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__ull_divremi.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/func_800CED20.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__osPfsGetStatus.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/__osPfsGetNextPage.s")
GLOBAL_ASM("lib/asm/non_matchings/unknown_0CF330/osPfsReadWriteFile.s")
+2 -2
View File
@@ -184,9 +184,9 @@ s32 func_80077A54(void) {
void func_80077AAC(void *bufPtr, s32 arg1, s32 arg2) {
osWritebackDCacheAll();
while (func_800D18D0() & 0x100) {}
while (osDpGetStatus() & DPC_CLR_CMD_CTR) {}
osDpSetNextBuffer(bufPtr, arg1);
while (func_800D18D0() & 0x100) {}
while (osDpGetStatus() & DPC_CLR_CMD_CTR) {}
}
//Probable red, green, blue