This commit is contained in:
Donkey Kong 2024-03-24 04:59:55 +10:30
parent f1c4f37c52
commit ce43badf1b
17 changed files with 270 additions and 40 deletions

View File

@ -1447,6 +1447,13 @@ typedef struct {
s32 unk3C;
} CharacterChange8Array;
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
} CharacterChange250;
typedef struct {
u8 does_player_exist; // bitfield? 0x00
u8 unk1;
@ -1472,7 +1479,7 @@ typedef struct {
f32 look_at_up_y; // 0x244
f32 look_at_up_z; // 0x248;
s32 unk24C;
u8 pad_unknown2[0x270 - 0x250];
CharacterChange250 unk250[2];
s16 unk270; // Used, related to map chunk "deload" value
s16 unk272; // Used, related to map chunk "deload" value
s16 unk274; // Used, related to map chunk "deload" value

View File

@ -66,6 +66,7 @@ extern Gfx **D_1000090;
extern Gfx **D_1000118;
extern Mtx D_2000080;
extern Mtx D_20000C0;
extern Mtx D_2000100;
extern Mtx D_2000180;
extern Mtx D_2000200;

View File

@ -3246,7 +3246,7 @@ us,asm,func_global_asm_806CA0E8,204,yes
us,asm,func_global_asm_8064B3F8,180,no
us,asm,func_global_asm_8067A864,164,yes
us,asm,func_global_asm_80676A0C,100,yes
us,asm,func_global_asm_80686CF8,328,no
us,asm,func_global_asm_80686CF8,328,yes
us,asm,func_global_asm_806A664C,1896,no
us,asm,func_global_asm_806BC1AC,48,yes
us,asm,func_global_asm_806D8070,56,yes

1 version section function length matching
3246 us asm func_global_asm_8064B3F8 180 no
3247 us asm func_global_asm_8067A864 164 yes
3248 us asm func_global_asm_80676A0C 100 yes
3249 us asm func_global_asm_80686CF8 328 no yes
3250 us asm func_global_asm_806A664C 1896 no
3251 us asm func_global_asm_806BC1AC 48 yes
3252 us asm func_global_asm_806D8070 56 yes

View File

@ -3246,7 +3246,7 @@ us,asm,func_global_asm_806CA0E8,204,yes
us,asm,func_global_asm_8064B3F8,180,no
us,asm,func_global_asm_8067A864,164,yes
us,asm,func_global_asm_80676A0C,100,yes
us,asm,func_global_asm_80686CF8,328,no
us,asm,func_global_asm_80686CF8,328,yes
us,asm,func_global_asm_806A664C,1896,no
us,asm,func_global_asm_806BC1AC,48,yes
us,asm,func_global_asm_806D8070,56,yes

1 version section function length matching
3246 us asm func_global_asm_8064B3F8 180 no
3247 us asm func_global_asm_8067A864 164 yes
3248 us asm func_global_asm_80676A0C 100 yes
3249 us asm func_global_asm_80686CF8 328 no yes
3250 us asm func_global_asm_806A664C 1896 no
3251 us asm func_global_asm_806BC1AC 48 yes
3252 us asm func_global_asm_806D8070 56 yes

View File

@ -17,7 +17,7 @@
<text x="38.5" y="14">global_asm</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="111.5" y="15" fill="#010101" fill-opacity=".3">35.9785%</text>
<text x="110.5" y="14">35.9785%</text>
<text x="111.5" y="15" fill="#010101" fill-opacity=".3">36.0051%</text>
<text x="110.5" y="14">36.0051%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h132v20H0z"/>
<path fill="#c08b00" d="M132 0h67v20H132z"/>
<path fill="#c08c00" d="M132 0h67v20H132z"/>
<path fill="url(#b)" d="M0 0h199v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@ -17,7 +17,7 @@
<text x="66.0" y="14">Donkey Kong 64 (US)</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">36.3213%</text>
<text x="165.5" y="14">36.3213%</text>
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">36.3412%</text>
<text x="165.5" y="14">36.3412%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -92,6 +92,7 @@ typedef struct {
void func_global_asm_8072AB74(s32, f32, f32, s32, f32);
s32 func_boss_80024568(Struct8002450C*, u8, f32, f32, f32);
// TODO: Close, just gotta figure out sp48 and D_boss_8003598C
#pragma GLOBAL_ASM("asm/nonmatchings/boss/code_0/func_boss_80024000.s")
/*
@ -102,7 +103,6 @@ typedef struct {
extern s32 D_global_asm_8071FFA0;
extern Struct80024000 D_boss_8003598C[];
// TODO: Close, just gotta figure out sp48 and D_boss_8003598C
void func_boss_80024000(void) {
Struct80024000 sp48[6];
s16 i;

View File

@ -247,9 +247,25 @@ void func_global_asm_807002AC(u16 *arg0, s16 **arg1, f32 arg2) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1025E0/func_global_asm_8070033C.s")
// Displaylist stuff
// Displaylist stuff, close
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1025E0/func_global_asm_8070068C.s")
/*
Gfx *func_global_asm_8070068C(Gfx *dl) {
gSPMatrix(dl++, &D_2000100, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPViewport(dl++, osVirtualToPhysical(&character_change_array->unk250[D_global_asm_807444FC]));
gDPSetScissor(
dl++,
G_SC_NON_INTERLACE,
character_change_array->unk272,
character_change_array->unk270,
character_change_array->unk276,
character_change_array->unk274
);
return dl;
}
*/
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_1025E0/func_global_asm_807007B8.s")

View File

@ -222,9 +222,42 @@ u8 func_global_asm_80710174(Struct8071006C_arg0 *arg0) {
return (arg0->unkC > 240.0f || arg0->unkB1 < 0xA);
}
// Need arg0 struct
// TODO: close, float thing needs to be broken up I think
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_807102AC.s")
extern f64 D_global_asm_8075E4E8;
extern f32 D_global_asm_807FD9EC;
/*
u8 func_global_asm_807102AC(Struct8071006C_arg0 *arg0) {
s32 var_v1;
u8 temp_v0;
f64 temp;
func_global_asm_8070FA58(arg0);
arg0->unk4 += (func_global_asm_80612794(arg0->unk20) * arg0->unk28);
func_global_asm_8070FC40(arg0);
arg0->unk8 = arg0->unk4;
temp_v0 = arg0->unkB0;
arg0->unk20 += 0x32;
arg0->unkB0 = temp_v0 + 1;
arg0->unkC += (((10.0f - (((1.0 / (arg0->unk10 * 3.0)) * 8.0) - 10.0f)) + 10.0f) * D_global_asm_8075E4E8);
if (temp_v0 >= 0x6F) {
if (arg0->unkB1 >= 0xA) {
arg0->unkB1 -= 0xA;
}
}
var_v1 = 0;
if (D_global_asm_807FD9EC < arg0->unkC) {
var_v1 = 1;
}
if (var_v1 == 0) {
var_v1 = arg0->unkB1 < 0xA;
}
return var_v1;
}
*/
// regalloc
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_global_asm_807103E0.s")

View File

@ -1787,8 +1787,45 @@ void func_global_asm_80647508(s32 arg0, s16 arg1, s32 arg2, s32 arg3) {
func_global_asm_80714CC0(&D_global_asm_8071FFA0, 1.5f, sp30, sp2C - 70, sp28);
}
// Close
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_42630/func_global_asm_80647610.s")
extern s32 D_global_asm_80720DE0; // TODO: Datatype
/*
void func_global_asm_80647610(s32 **arg0, s32 arg1, s16 arg2, s16 arg3) {
s32 sp2C;
s32 sp28;
s32 sp24;
Struct807F5FD4_unk0 *temp_v0_2;
s32 *temp_v0;
s32 *var_v1;
s32 var_a1;
var_v1 = *arg0;
if (var_v1 == NULL) {
temp_v0 = malloc(4);
*arg0 = temp_v0;
*temp_v0 = 0;
var_v1 = *arg0;
}
var_a1 = *var_v1 + 1;
*var_v1 = var_a1;
if (arg3 == var_a1) {
*var_v1 = 0;
var_a1 = 0;
}
temp_v0_2 = &D_global_asm_807F5FD4->unk0[arg2][var_a1];
sp2C = temp_v0_2->unk0;
sp28 = temp_v0_2->unk4;
sp24 = temp_v0_2->unk8;
func_global_asm_80714998(2);
func_global_asm_807149B8(1);
func_global_asm_807149C8(0xFF, 0xFF, 0xFF, 0xC8);
func_global_asm_80714CC0(&D_global_asm_80720DE0, 1.0f, sp2C, sp28 + 0xA, sp24);
}
*/
extern f32 D_global_asm_8074816C;
typedef struct {

View File

@ -145,6 +145,51 @@ void *func_global_asm_806022DC(s32 *arg0) {
// Libultra stuff osRecvMesg, alUnlink, alLink
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_6710/func_global_asm_80602314.s")
/*
extern OSMesgQueue D_807704A8;
extern u32 D_global_asm_807452C0;
extern u32 D_global_asm_807452C4;
extern ? D_global_asm_80770188;
void func_global_asm_80602314(void) {
void *sp40;
ALLink *temp_v0;
ALLink *var_s0_2;
u32 var_s0;
sp40 = NULL;
var_s0 = 0;
if (D_global_asm_807452C4 != 0) {
do {
osRecvMesg(&D_807704A8, &sp40, 0);
var_s0 += 1;
} while (var_s0 < D_global_asm_807452C4);
}
var_s0_2 = D_global_asm_80770188.unk4;
if (var_s0_2 != NULL) {
do {
temp_v0 = var_s0_2->next;
if ((var_s0_2->unkC + 1) < D_global_asm_807452C0) {
if (var_s0_2 == D_global_asm_80770188.unk4) {
D_global_asm_80770188.unk4 = temp_v0;
}
alUnlink(var_s0_2);
if (D_global_asm_80770188.unk8 != NULL) {
alLink(var_s0_2, D_global_asm_80770188.unk8);
} else {
D_global_asm_80770188.unk8 = var_s0_2;
var_s0_2->next = NULL;
var_s0_2->prev = NULL;
}
}
var_s0_2 = temp_v0;
} while (temp_v0 != NULL);
}
D_global_asm_807452C4 = 0;
D_global_asm_807452C0 += 1;
}
*/
u8 func_global_asm_80602430(s16 arg0) {
return ((D_global_asm_80745658[arg0] & 6) >> 1);
}

View File

@ -935,10 +935,12 @@ typedef struct {
s16 unkC;
s16 unkE;
s16 unk10;
s16 unk12;
s16 unk14;
} Struct8066893C;
s32 func_global_asm_8066893C(Struct8066893C*);
void func_global_asm_806689F0(s32, void*, s32);
void func_global_asm_806689F0(s32, Struct8066893C*, s32);
void func_global_asm_806685E0(Struct806685E0_arg0 *arg0, f32 arg1) {
Struct807F94C0 *var_v0;
@ -1040,8 +1042,59 @@ s32 func_global_asm_8066893C(Struct8066893C *arg0) {
}
}
// Matrix?
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_699B0/func_global_asm_806689F0.s")
void func_global_asm_80666AF8(s32 arg0, f32 arg1, f32 arg2, f32 arg3, u8 arg4, u8 arg5, u8 arg6);
/*
void func_global_asm_806689F0(s32 arg0, Struct8066893C *arg1, s32 arg2) {
f32 sp5C;
f32 sp58;
f32 sp54;
f32 sp50;
f32 sp4C;
f32 sp48;
f32 sp44;
f32 sp40;
f32 sp3C;
f32 sp34;
f32 sp30;
f32 temp_f10;
f32 temp_f16;
f32 temp_f16_2;
f32 temp_f18;
f32 temp_f4;
f32 temp_f4_2;
f32 temp_f6;
f32 temp_f8;
f32 temp_f8_2;
temp_f16 = arg1->unk4 - arg1->unk0;
sp54 = temp_f16;
temp_f6 = arg1->unkA - arg1->unk6;
sp58 = temp_f6;
temp_f8 = arg1->unk10 - arg1->unkC;
sp5C = temp_f8;
temp_f4 = arg1->unk2 - arg1->unk0;
sp48 = temp_f4;
temp_f10 = arg1->unk8 - arg1->unk6;
sp4C = temp_f10;
sp30 = temp_f16;
sp34 = temp_f4;
temp_f18 = arg1->unkE - arg1->unkC;
sp50 = temp_f18;
temp_f16_2 = (temp_f6 * temp_f18) - (temp_f10 * temp_f8);
sp34 = temp_f6;
sp3C = temp_f16_2;
temp_f8_2 = (temp_f8 * temp_f4) - (temp_f18 * sp30);
sp40 = temp_f8_2;
temp_f4_2 = (sp30 * temp_f10) - (temp_f4 * temp_f6);
sp44 = temp_f4_2;
func_global_asm_80666AF8(arg0, temp_f16_2, temp_f8_2, temp_f4_2, arg1->unk14, arg2, 0);
}
*/
// TODO: Any more cleanup possible?
s32 func_global_asm_80668B28(Struct8066893C *arg0, s32 arg1, s32 arg2) {
s32 temp_a3;
@ -1249,8 +1302,6 @@ void func_global_asm_806696A0(Actor *arg0, s16 arg1, Struct806696A0 *arg2) {
// close
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_699B0/func_global_asm_80669830.s")
void func_global_asm_80666AF8(s32 arg0, f32 arg1, f32 arg2, f32 arg3, u8 arg4, u8 arg5, u8 arg6);
/*
void func_global_asm_80669830(s32 arg0, Struct80669830 *arg1, u8 arg2) {
f32 sp30[4][4];
@ -1451,6 +1502,7 @@ void func_global_asm_8066A584(s32 arg0, f32 arg1) {
}
}
// Matrix stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_699B0/func_global_asm_8066A64C.s")
// Matrix stuff

View File

@ -39,7 +39,7 @@ void func_global_asm_806136B4();
// Note: The pointer can be to any one of the above 10 structs, maybe more
void func_global_asm_8070DA74(Actor*);
// regalloc
// regalloc, close
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_global_asm_80677D80.s")
typedef struct {
@ -55,15 +55,15 @@ typedef struct {
s32 unk8;
} Struct807FB7B0;
extern Struct807FB630 D_global_asm_807FB630[];
extern Struct807FB7B0 D_global_asm_807FB7B0[];
extern s16 D_global_asm_807FBB30;
extern s16 D_global_asm_807FBB32;
extern s32 D_global_asm_807FBB38;
extern s32 *D_global_asm_807FBB50;
extern void *D_global_asm_807FBB54;
extern void *D_global_asm_807FBB58;
extern void *D_global_asm_807FBB5C;
extern Struct807FB630 D_807FB630[];
extern Struct807FB7B0 D_807FB7B0[];
extern s16 D_807FBB30;
extern s16 D_807FBB32;
extern s32 D_807FBB38;
extern s32 *D_807FBB50;
extern void *D_807FBB54;
extern void *D_807FBB58;
extern void *D_807FBB5C;
extern s16 D_global_asm_807FBFD8;
/*
@ -71,28 +71,28 @@ void func_global_asm_80677D80(void) {
u16 i;
for (i = 0; i < 0x20; i++) {
D_global_asm_807FB630[i].unk0 = 0;
D_global_asm_807FB630[i].unk2 = 0;
D_global_asm_807FB630[i].unk4 = 0;
D_807FB630[i].unk0 = 0;
D_807FB630[i].unk2 = 0;
D_807FB630[i].unk4 = 0;
}
D_global_asm_807FBB30 = 0;
D_807FBB30 = 0;
for (i = 0; i < 0x20; i++) {
D_global_asm_807FB7B0[i].unk0 = 0xFFFF;
D_global_asm_807FB7B0[i].unk4 = 0;
D_global_asm_807FB7B0[i].unk8 = 0;
D_807FB7B0[i].unk0 = 0xFFFF;
D_807FB7B0[i].unk4 = 0;
D_807FB7B0[i].unk8 = 0;
}
D_global_asm_807FBB32 = 0;
D_global_asm_807FBB50 = getPointerTableFile(0xD, 0, 1, 1);
D_global_asm_807FBB54 = (u8*)D_global_asm_807FBB50 + D_global_asm_807FBB50[3];
D_global_asm_807FBB58 = (u8*)D_global_asm_807FBB50 + D_global_asm_807FBB50[2];
D_global_asm_807FBB5C = (u8*)D_global_asm_807FBB50 + D_global_asm_807FBB50[1];
D_807FBB32 = 0;
D_807FBB50 = getPointerTableFile(0xD, 0, 1, 1);
D_807FBB54 = (u8*)D_807FBB50 + D_807FBB50[3];
D_807FBB58 = (u8*)D_807FBB50 + D_807FBB50[2];
D_807FBB5C = (u8*)D_807FBB50 + D_807FBB50[1];
for (i = 0; i < 0x40; i++) {
D_global_asm_807FB930[i].unk0 = NULL;
D_global_asm_807FB930[i].unk4 = 0;
}
D_global_asm_807FBB34 = 0;
func_global_asm_8067AE58();
D_global_asm_807FBB38 = 0;
D_807FBB38 = 0;
D_global_asm_807FBE09 = 0;
D_global_asm_807FBFD8 = 0;
current_player = NULL;

View File

@ -570,8 +570,19 @@ void func_global_asm_8068696C(Actor *arg0) {
// rodata
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_89250/func_global_asm_80686A5C.s")
// rodata
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_89250/func_global_asm_80686CF8.s")
extern s32 D_global_asm_8074E880[];
void func_global_asm_80686CF8(Actor *arg0) {
s32 i;
for (i = 0; i < 0x1E; i++) {
func_global_asm_807149B8(1);
func_global_asm_807149FC(1);
func_global_asm_8071498C(func_global_asm_8071EA24);
func_global_asm_8071496C(i / 7);
func_global_asm_80714CC0(D_global_asm_8074E880[i % 3], 1.4f, arg0->x_position, arg0->y_position + 10.0f, arg0->z_position);
}
}
void func_global_asm_80686E40(f32 arg0, f32 arg1, f32 arg2, s32 arg3) {
s32 i;

View File

@ -53,6 +53,7 @@ void func_global_asm_80699914(void) {
// Huge, lots of ActorAnimationState stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_9DD70/func_global_asm_80699958.s")
// doable
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_9DD70/func_global_asm_8069A614.s")
// TODO: Needs some more shape on D_global_asm_807FBB70.unk0

View File

@ -801,7 +801,7 @@ void func_global_asm_806E9B3C(void) {
}
}
// regalloc
// close, regalloc
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_EBBE0/func_global_asm_806E9BA8.s")
/*

View File

@ -245,6 +245,33 @@ void *func_multiplayer_800245B0(Gfx *dl, s16 *arg1, s32 arg2, s32 arg3, s32 arg4
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_80025264.s")
Gfx *func_multiplayer_800249D8(Gfx *); // extern
Gfx *func_multiplayer_80024CA4(Gfx *); // extern
extern s16 D_global_asm_80744490;
extern s16 D_global_asm_80744494;
/*
Gfx *func_multiplayer_80025264(Gfx *dl) {
s32 temp_t0;
temp_t0 = (D_global_asm_807552E4.unk8 >= 2);
gDPPipeSync(dl++);
gDPSetScissor(dl++, G_SC_NON_INTERLACE, 0, 0, D_global_asm_80744490, D_global_asm_80744494);
if (!(global_properties_bitfield & 3)) {
if (D_global_asm_807552E4.unk0 == 0) {
if ((D_global_asm_807552E4.unk8 == 1) || (temp_t0)) {
dl = func_multiplayer_800249D8(dl);
}
} else if ((D_global_asm_807552E4.unk8 == 1) || (temp_t0)) {
dl = func_multiplayer_80024CA4(dl);
}
}
return dl;
}
*/
// close
#pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_80025378.s")