mirror of
https://github.com/n64decomp/mk64
synced 2026-08-04 08:58:41 -04:00
@@ -0,0 +1,327 @@
|
||||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_800BDE50(void *arg0, s32 arg1) {
|
||||
f32 temp_f0;
|
||||
s32 temp_a2;
|
||||
u32 temp_v0_2;
|
||||
void *temp_v0;
|
||||
void *temp_v1;
|
||||
f32 phi_f0;
|
||||
void *phi_a3;
|
||||
s32 phi_a2;
|
||||
|
||||
phi_a3 = arg0;
|
||||
phi_a2 = 0;
|
||||
if (((arg0->unk0 << 9) < 0) || (arg1 != 0)) {
|
||||
temp_v0 = arg0->unk44;
|
||||
temp_f0 = arg0->unk24 * arg0->unk20 * temp_v0->unk2C;
|
||||
phi_f0 = temp_f0;
|
||||
if (((temp_v0->unk0 * 4) < 0) && ((arg0->unk3 & 0x20) != 0)) {
|
||||
phi_f0 = temp_v0->unk24 * temp_f0;
|
||||
}
|
||||
arg0->unk2C = phi_f0 * phi_f0;
|
||||
}
|
||||
if (arg0->unk0 & 0x200000) {
|
||||
arg0->unk28 = arg0->unk9 * arg0->unkA;
|
||||
}
|
||||
do {
|
||||
temp_v1 = phi_a3->unk48;
|
||||
temp_a2 = phi_a2 + 4;
|
||||
phi_a2 = temp_a2;
|
||||
if (temp_v1 != 0) {
|
||||
temp_v0_2 = temp_v1->unk0;
|
||||
if (((temp_v0_2 >> 0x1F) != 0) && (temp_v1->unk40 != 0)) {
|
||||
if (temp_v0_2 & 0x4000000) {
|
||||
temp_v1->unk30 = temp_v1->unk24 * arg0->unk30;
|
||||
temp_v1->unk2C = temp_v1->unk28 * arg0->unk2C;
|
||||
temp_v1->unk0 = temp_v1->unk0 & 0xFFFB;
|
||||
temp_v1->unk6 = (arg0->unk28 + (temp_v1->unk5 * (0x80 - arg0->unkA))) >> 7;
|
||||
} else {
|
||||
if (arg0->unk1 < 0) {
|
||||
temp_v1->unk30 = temp_v1->unk24 * arg0->unk30;
|
||||
}
|
||||
if (((arg0->unk0 << 9) < 0) || (arg1 != 0)) {
|
||||
temp_v1->unk2C = temp_v1->unk28 * arg0->unk2C;
|
||||
}
|
||||
if (arg0->unk0 & 0x200000) {
|
||||
temp_v1->unk6 = (arg0->unk28 + (temp_v1->unk5 * (0x80 - arg0->unkA))) >> 7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
phi_a3 += 4;
|
||||
} while (temp_a2 != 0x10);
|
||||
arg0->unk1 = 0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BDE50.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BDE50(s32, u32); // extern
|
||||
? func_800BEF2C(void *); // extern
|
||||
extern ? D_803B5EF0;
|
||||
|
||||
void func_800BDFF8(void *arg0) {
|
||||
s32 temp_a0;
|
||||
s32 temp_s0;
|
||||
u16 temp_t1;
|
||||
void *phi_s1;
|
||||
s32 phi_s0;
|
||||
|
||||
if (arg0->unk10 != 0) {
|
||||
arg0->unk18 = arg0->unk18 + arg0->unk1C;
|
||||
arg0->unk0 = arg0->unk0 | 4;
|
||||
if (arg0->unk18 > 1.0f) {
|
||||
arg0->unk18 = 1.0f;
|
||||
}
|
||||
if (arg0->unk18 < 0.0f) {
|
||||
arg0->unk18 = 0.0f;
|
||||
}
|
||||
temp_t1 = arg0->unk10 - 1;
|
||||
arg0->unk10 = temp_t1;
|
||||
if (((temp_t1 & 0xFFFF) == 0) && (arg0->unk1 == 2)) {
|
||||
func_800BEF2C(arg0);
|
||||
return;
|
||||
}
|
||||
goto block_8;
|
||||
}
|
||||
block_8:
|
||||
phi_s1 = arg0;
|
||||
phi_s0 = 0;
|
||||
if (arg0->unk0 & 0x4000000) {
|
||||
arg0->unk2C = arg0->unk18 * arg0->unk28;
|
||||
}
|
||||
do {
|
||||
temp_a0 = phi_s1->unk30;
|
||||
if (((&D_803B5EF0 != temp_a0) == 1) && ((*temp_a0 >> 0x1F) == 1)) {
|
||||
func_800BDE50(temp_a0, (arg0->unk0 << 5) >> 0x1F);
|
||||
}
|
||||
temp_s0 = phi_s0 + 4;
|
||||
phi_s1 += 4;
|
||||
phi_s0 = temp_s0;
|
||||
} while (temp_s0 != 0x40);
|
||||
arg0->unk0 = arg0->unk0 & 0xFFFB;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BDFF8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern ? gPitchBendFrequencyScale;
|
||||
|
||||
f32 func_800BE158(void *arg0) {
|
||||
u32 temp_v0;
|
||||
u32 phi_v0;
|
||||
|
||||
arg0->unk4 = arg0->unk4 + arg0->unk8;
|
||||
temp_v0 = arg0->unk4;
|
||||
phi_v0 = temp_v0;
|
||||
if (temp_v0 >= 0x80) {
|
||||
phi_v0 = 0x7F;
|
||||
}
|
||||
return ((*(&gPitchBendFrequencyScale + 0x200 + (phi_v0 * 4)) - 1.0f) * arg0->unkC) + 1.0f;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BE158.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s16 func_800BE22C(void *arg0) {
|
||||
s32 temp_t3;
|
||||
u32 temp_t9;
|
||||
|
||||
temp_t9 = arg0->unk4 + arg0->unk10;
|
||||
temp_t3 = ((temp_t9 >> 0xA) & 0x3F) * 2;
|
||||
arg0->unk4 = temp_t9;
|
||||
return *(arg0->unk8 + temp_t3) >> 8;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BE22C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 func_800BE22C(u16); // extern
|
||||
extern ? gPitchBendFrequencyScale;
|
||||
|
||||
f32 func_800BE270(void *arg0, u16 arg1) {
|
||||
f32 temp_f0;
|
||||
f32 temp_f0_2;
|
||||
u16 temp_v0;
|
||||
u16 temp_v0_2;
|
||||
u16 temp_v0_3;
|
||||
u16 temp_v0_4;
|
||||
u16 temp_v0_5;
|
||||
void *temp_v1;
|
||||
u16 phi_a1;
|
||||
|
||||
temp_v0 = arg0->unk1A;
|
||||
phi_a1 = arg1;
|
||||
if (temp_v0 != 0) {
|
||||
arg0->unk1A = temp_v0 - 1;
|
||||
return 1.0f;
|
||||
}
|
||||
temp_v0_2 = arg0->unk18;
|
||||
if (temp_v0_2 != 0) {
|
||||
if (temp_v0_2 == 1) {
|
||||
arg0->unkC = arg0->unk0->unk12;
|
||||
} else {
|
||||
temp_f0 = arg0->unkC;
|
||||
arg0->unkC = temp_f0 + ((arg0->unk0->unk12 - temp_f0) / temp_v0_2);
|
||||
}
|
||||
arg0->unk18 = arg0->unk18 - 1;
|
||||
} else {
|
||||
temp_v1 = arg0->unk0;
|
||||
if (arg0->unkC != temp_v1->unk12) {
|
||||
temp_v0_3 = temp_v1->unk16;
|
||||
arg0->unk18 = temp_v0_3;
|
||||
if (temp_v0_3 == 0) {
|
||||
arg0->unkC = temp_v1->unk12;
|
||||
}
|
||||
}
|
||||
}
|
||||
temp_v0_4 = arg0->unk16;
|
||||
if (temp_v0_4 != 0) {
|
||||
phi_a1 = temp_v0_4;
|
||||
if (temp_v0_4 == 1) {
|
||||
arg0->unk10 = arg0->unk0->unk10;
|
||||
} else {
|
||||
temp_f0_2 = arg0->unk10;
|
||||
arg0->unk10 = temp_f0_2 + ((arg0->unk0->unk10 - temp_f0_2) / temp_v0_4);
|
||||
}
|
||||
arg0->unk16 = arg0->unk16 - 1;
|
||||
} else if (arg0->unk10 != arg0->unk0->unk10) {
|
||||
temp_v0_5 = arg0->unk0->unk14;
|
||||
arg0->unk16 = temp_v0_5;
|
||||
if (temp_v0_5 == 0) {
|
||||
arg0->unk10 = arg0->unk0->unk10;
|
||||
}
|
||||
}
|
||||
if (arg0->unkC == 0.0f) {
|
||||
return 1.0f;
|
||||
}
|
||||
return ((*(&gPitchBendFrequencyScale + 0x200 + (func_800BE22C(phi_a1) * 4)) - 1.0f) * (arg0->unkC * 0.00024414062f)) + 1.0f;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BE270.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
f32 func_800BE158(void *, void *); // extern
|
||||
f32 func_800BE270(void *, void *); // extern
|
||||
|
||||
void func_800BE468(void *arg0) {
|
||||
void *temp_a0;
|
||||
void *temp_a1;
|
||||
void *phi_a1;
|
||||
|
||||
temp_a1 = arg0;
|
||||
temp_a0 = arg0 + 0x7C;
|
||||
phi_a1 = temp_a1;
|
||||
if (arg0->unk7C != 0) {
|
||||
arg0 = temp_a1;
|
||||
arg0->unk38 = func_800BE158(temp_a0, temp_a1);
|
||||
phi_a1 = arg0;
|
||||
}
|
||||
if ((phi_a1->unkA0 != 0) && (phi_a1->unk44 != -1)) {
|
||||
arg0 = phi_a1;
|
||||
arg0->unk3C = func_800BE270(phi_a1 + 0x8C, phi_a1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BE468.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern ? gWaveSamples;
|
||||
|
||||
void func_800BE4D4(void *arg0) {
|
||||
u16 temp_v0;
|
||||
u16 temp_v0_2;
|
||||
void *temp_a1;
|
||||
void *temp_a1_2;
|
||||
void *temp_t6;
|
||||
void *temp_t9;
|
||||
void *temp_v0_3;
|
||||
void *temp_v1;
|
||||
void *temp_v1_2;
|
||||
void *phi_a1;
|
||||
void *phi_v1;
|
||||
|
||||
arg0->unkA0 = 1;
|
||||
arg0->unk90 = 0;
|
||||
arg0->unk3C = 1.0f;
|
||||
arg0->unk38 = 1.0f;
|
||||
temp_v1 = arg0 + 0x8C;
|
||||
arg0->unk94 = *(&gWaveSamples + 8);
|
||||
temp_t9 = arg0->unk44->unk4C;
|
||||
arg0->unk8C = temp_t9;
|
||||
temp_v0 = temp_t9->unk16;
|
||||
arg0->unkA4 = temp_v0;
|
||||
phi_v1 = temp_v1;
|
||||
if (temp_v0 == 0) {
|
||||
temp_v1_2 = arg0 + 0x8C;
|
||||
temp_a1 = temp_v1_2->unk0;
|
||||
temp_v1_2->unkC = temp_a1->unk12;
|
||||
phi_a1 = temp_a1;
|
||||
phi_v1 = temp_v1_2;
|
||||
} else {
|
||||
temp_a1_2 = temp_v1->unk0;
|
||||
temp_v1->unkC = temp_a1_2->unkE;
|
||||
phi_a1 = temp_a1_2;
|
||||
}
|
||||
temp_v0_2 = phi_a1->unk14;
|
||||
phi_v1->unk16 = temp_v0_2;
|
||||
if (temp_v0_2 == 0) {
|
||||
phi_v1->unk10 = phi_a1->unk10;
|
||||
} else {
|
||||
phi_v1->unk10 = phi_a1->unkC;
|
||||
}
|
||||
temp_v0_3 = arg0 + 0x30;
|
||||
phi_v1->unk1A = phi_a1->unk18;
|
||||
temp_t6 = temp_v0_3->unk14;
|
||||
temp_v0_3->unk4C = temp_t6->unk8;
|
||||
temp_v0_3->unk50 = temp_t6->unkC;
|
||||
temp_v0_3->unk54 = temp_t6->unk10;
|
||||
temp_v0_3->unk58 = temp_t6->unk14;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BE4D4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_800BE5BC(void *arg0, s32 arg1, ? arg2) {
|
||||
arg0->unk0 = 0;
|
||||
arg0->unk1 = 0;
|
||||
arg0->unk4 = 0;
|
||||
arg0->unk20 = arg1;
|
||||
arg0->unk8 = 0.0f;
|
||||
arg0->unk14 = 0.0f;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BE5BC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
/*
|
||||
Failed to decompile function func_800BE5E0:
|
||||
|
||||
Unable to determine jump table for jr instruction at func_800BE5E0.s line 11.
|
||||
|
||||
There must be a read of a variable in the same block as
|
||||
the instruction, which has a name starting with "jtbl"/"jpt_".
|
||||
*/
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/effects/func_800BE5E0.s")
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
+1087
File diff suppressed because it is too large
Load Diff
+1190
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,433 @@
|
||||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 func_800B70EC(s32, s32 *, s32, s16); // extern
|
||||
s32 func_800BA00C(); // extern
|
||||
? func_800BAC04(); // extern
|
||||
? func_800CBCB0(void *); // extern
|
||||
extern OSMesgQueue *D_800EA3A8;
|
||||
extern OSMesgQueue *D_800EA3AC;
|
||||
extern OSMesgQueue *D_800EA3B0;
|
||||
extern OSMesgQueue *D_800EA3B4;
|
||||
extern s32 D_800EA484;
|
||||
extern u8 D_803B0500;
|
||||
extern u8 D_803B0501;
|
||||
extern OSMesgQueue D_803B6008;
|
||||
extern ? D_803B7088;
|
||||
extern s32 D_803B70B8;
|
||||
extern s32 D_803B70BC;
|
||||
extern s32 D_803B70C0;
|
||||
extern s32 D_803B70C4;
|
||||
extern ? D_803B70C8;
|
||||
extern s32 D_803B70D0;
|
||||
extern void *D_803B70D4;
|
||||
extern ? D_803B70D8;
|
||||
extern ? D_803B7180;
|
||||
extern ? D_803B718C;
|
||||
extern s32 D_803B7194;
|
||||
extern ? aspMainDataEnd;
|
||||
extern ? aspMainDataStart;
|
||||
extern ? aspMainTextStart;
|
||||
extern ? rspbootTextEnd;
|
||||
extern ? rspbootTextStart;
|
||||
|
||||
void *create_next_audio_frame_task(void) {
|
||||
u32 sp74;
|
||||
s32 sp70;
|
||||
s32 sp60;
|
||||
void *sp58;
|
||||
void *sp54;
|
||||
s32 *sp40;
|
||||
s16 *temp_s1_3;
|
||||
s16 temp_a0;
|
||||
s16 temp_v0_2;
|
||||
s16 temp_v1;
|
||||
s32 *temp_a3;
|
||||
s32 temp_hi;
|
||||
s32 temp_s0;
|
||||
s32 temp_s0_2;
|
||||
s32 temp_s0_3;
|
||||
s32 temp_s0_4;
|
||||
s32 temp_s1;
|
||||
s32 temp_s1_2;
|
||||
s32 temp_t3;
|
||||
s32 temp_t5;
|
||||
s32 temp_v0;
|
||||
void *temp_v1_2;
|
||||
s32 phi_s0;
|
||||
s32 phi_s1;
|
||||
s32 phi_s0_2;
|
||||
s32 phi_s0_3;
|
||||
s32 phi_s1_2;
|
||||
s32 phi_s1_3;
|
||||
|
||||
D_803B70B8 = D_803B70B8 + 1;
|
||||
if ((D_803B70B8 % D_803B7088.unk0) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
osSendMesg(D_800EA3A8, D_803B70B8, 0);
|
||||
temp_t3 = D_803B70C4 + 1;
|
||||
temp_t5 = temp_t3 % 3;
|
||||
temp_hi = (temp_t5 + 1) % 3;
|
||||
D_803B70C4 = temp_t3;
|
||||
D_803B70C0 = D_803B70C0 ^ 1;
|
||||
D_803B70C4 = temp_t5;
|
||||
sp74 = osAiGetLength() >> 2;
|
||||
temp_v1 = *(&D_803B718C + (temp_hi * 2));
|
||||
if (temp_v1 != 0) {
|
||||
osAiSetNextBuffer(*(&D_803B7180 + (temp_hi * 4)), temp_v1 * 4);
|
||||
}
|
||||
temp_s1 = D_803B70BC;
|
||||
phi_s0 = 0;
|
||||
phi_s1 = temp_s1;
|
||||
phi_s0_2 = 0;
|
||||
phi_s0_3 = 0;
|
||||
phi_s1_3 = temp_s1;
|
||||
if (temp_s1 > 0) {
|
||||
do {
|
||||
phi_s1_2 = phi_s1_3;
|
||||
if (osRecvMesg(&D_803B6008, NULL, 0) == 0) {
|
||||
phi_s1_2 = phi_s1_3 - 1;
|
||||
}
|
||||
temp_s0 = phi_s0 + 1;
|
||||
phi_s0 = temp_s0;
|
||||
phi_s1 = phi_s1_2;
|
||||
phi_s1_3 = phi_s1_2;
|
||||
} while (temp_s0 < D_803B70BC);
|
||||
}
|
||||
if ((phi_s1 != 0) && (phi_s1 > 0)) {
|
||||
do {
|
||||
osRecvMesg(&D_803B6008, NULL, 1);
|
||||
temp_s0_2 = phi_s0_2 + 1;
|
||||
phi_s0_2 = temp_s0_2;
|
||||
} while (temp_s0_2 != phi_s1);
|
||||
}
|
||||
temp_s1_2 = D_803B6008.validCount;
|
||||
if ((temp_s1_2 != 0) && (temp_s1_2 > 0)) {
|
||||
do {
|
||||
osRecvMesg(&D_803B6008, NULL, 0);
|
||||
temp_s0_3 = phi_s0_3 + 1;
|
||||
phi_s0_3 = temp_s0_3;
|
||||
} while (temp_s0_3 != temp_s1_2);
|
||||
}
|
||||
D_803B70BC = 0;
|
||||
func_800BAC04();
|
||||
if (osRecvMesg(D_800EA3B0, &sp58, 0) != -1) {
|
||||
D_803B0501 = sp58;
|
||||
D_803B0500 = 5;
|
||||
}
|
||||
if ((D_803B0500 != 0) && (func_800BA00C() == 0)) {
|
||||
if (D_803B0500 == 0) {
|
||||
osSendMesg(D_800EA3B4, D_803B0501, 0);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
temp_v0 = D_803B70C0;
|
||||
D_803B70D4 = (temp_v0 * 0x50) + &D_803B70D8;
|
||||
temp_s0_4 = D_803B70C4;
|
||||
temp_a3 = (temp_s0_4 * 4) + &D_803B7180;
|
||||
D_803B70D0 = *(&D_803B70C8 + (temp_v0 * 4));
|
||||
sp60 = *temp_a3;
|
||||
temp_s1_3 = (temp_s0_4 * 2) + &D_803B718C;
|
||||
*temp_s1_3 = (((D_803B7088.unk6 - sp74) + 0x40) & 0xFFF0) + 0x10;
|
||||
temp_a0 = D_803B7088.unkA;
|
||||
if (*temp_s1_3 < temp_a0) {
|
||||
*temp_s1_3 = temp_a0;
|
||||
}
|
||||
temp_v0_2 = D_803B7088.unk8;
|
||||
if (temp_v0_2 < *temp_s1_3) {
|
||||
*temp_s1_3 = temp_v0_2;
|
||||
}
|
||||
sp40 = temp_a3;
|
||||
if (osRecvMesg(D_800EA3AC, &sp54, 0) != -1) {
|
||||
func_800CBCB0(sp54);
|
||||
}
|
||||
D_803B70D0 = func_800B70EC(D_803B70D0, &sp70, sp60, *temp_s1_3);
|
||||
D_803B7194 = osGetCount() * (D_803B7194 + D_803B70B8);
|
||||
D_803B7194 = *(*sp40 + ((D_803B70B8 & 0xFF) * 2)) + D_803B7194;
|
||||
D_803B70D4->unk40 = 0;
|
||||
D_803B70D4->unk44 = 0;
|
||||
temp_v1_2 = D_803B70D4;
|
||||
temp_v1_2->unk0 = 2;
|
||||
temp_v1_2->unk4 = 0;
|
||||
temp_v1_2->unk8 = &rspbootTextStart;
|
||||
temp_v1_2->unkC = &rspbootTextEnd - &rspbootTextStart;
|
||||
temp_v1_2->unk10 = &aspMainTextStart;
|
||||
temp_v1_2->unk18 = &aspMainDataStart;
|
||||
temp_v1_2->unk14 = 0x1000;
|
||||
temp_v1_2->unk1C = ((&aspMainDataEnd - &aspMainDataStart) >> 3) * 8;
|
||||
temp_v1_2->unk20 = 0;
|
||||
temp_v1_2->unk24 = 0;
|
||||
temp_v1_2->unk28 = 0;
|
||||
temp_v1_2->unk2C = 0;
|
||||
temp_v1_2->unk30 = *(&D_803B70C8 + (D_803B70C0 * 4));
|
||||
temp_v1_2->unk38 = 0;
|
||||
temp_v1_2->unk3C = 0;
|
||||
temp_v1_2->unk34 = sp70 * 8;
|
||||
if (D_800EA484 < sp70) {
|
||||
D_800EA484 = sp70;
|
||||
}
|
||||
return D_803B70D4;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/create_next_audio_frame_task.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BB388(u8, u8, u8, void *); // extern
|
||||
? func_800BBDDC(u8, ?, void *); // extern
|
||||
? func_800BBEF0(u8, u8, u8, void *); // extern
|
||||
? func_800BEF2C(u32 *, s32, void *); // extern
|
||||
? func_800CBA08(u8, s32, void *); // extern
|
||||
? func_800CBA64(u8, s32); // extern
|
||||
extern u8 D_803B1510;
|
||||
extern u8 D_803B1658;
|
||||
extern u8 D_803B17A0;
|
||||
extern u8 D_803B18E8;
|
||||
extern s8 D_803B70B6;
|
||||
|
||||
void func_800CB818(void *arg0) {
|
||||
s32 temp_a1;
|
||||
u32 *temp_a0;
|
||||
u8 temp_a0_2;
|
||||
u8 temp_a1_2;
|
||||
u8 temp_a2;
|
||||
u8 temp_v0;
|
||||
u8 temp_v0_2;
|
||||
void *temp_a3;
|
||||
|
||||
temp_v0 = arg0->unk0;
|
||||
temp_a3 = arg0;
|
||||
if (temp_v0 != 0x81) {
|
||||
if (temp_v0 != 0x82) {
|
||||
if (temp_v0 != 0x83) {
|
||||
if (temp_v0 != 0x88) {
|
||||
if (temp_v0 != 0xF0) {
|
||||
if (temp_v0 != 0xF1) {
|
||||
if (temp_v0 != 0xF2) {
|
||||
if (temp_v0 != 0xF3) {
|
||||
return;
|
||||
}
|
||||
func_800BB388(temp_a3->unk1, temp_a3->unk2, temp_a3->unk3, temp_a3);
|
||||
// Duplicate return node #19. Try simplifying control flow for better match
|
||||
return;
|
||||
}
|
||||
D_803B1510 = (D_803B1510 & 0xFFDF) | 4;
|
||||
D_803B1658 = (D_803B1658 & 0xFFDF) | 4;
|
||||
D_803B17A0 = (D_803B17A0 & 0xFFDF) | 4;
|
||||
D_803B18E8 = (D_803B18E8 & 0xFFDF) | 4;
|
||||
return;
|
||||
}
|
||||
D_803B1510 = D_803B1510 | 0x24;
|
||||
D_803B1658 = D_803B1658 | 0x24;
|
||||
D_803B17A0 = D_803B17A0 | 0x24;
|
||||
D_803B18E8 = D_803B18E8 | 0x24;
|
||||
return;
|
||||
}
|
||||
D_803B70B6 = temp_a3->unk4;
|
||||
return;
|
||||
}
|
||||
goto block_10;
|
||||
}
|
||||
temp_v0_2 = temp_a3->unk1;
|
||||
temp_a0 = (temp_v0_2 * 0x148) + &D_803B1510;
|
||||
if ((*temp_a0 >> 0x1F) != 0) {
|
||||
temp_a1 = temp_a3->unk4;
|
||||
if (temp_a1 == 0) {
|
||||
func_800BEF2C(temp_a0, temp_a1, temp_a3);
|
||||
return;
|
||||
}
|
||||
func_800CBA08(temp_v0_2, temp_a1, temp_a3);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
block_10:
|
||||
temp_a0_2 = temp_a3->unk1;
|
||||
temp_a1_2 = temp_a3->unk2;
|
||||
temp_a2 = temp_a3->unk3;
|
||||
arg0 = temp_a3;
|
||||
func_800BBEF0(temp_a0_2, temp_a1_2, temp_a2, temp_a3);
|
||||
func_800CBA64(arg0->unk1, arg0->unk4);
|
||||
return;
|
||||
}
|
||||
func_800BBDDC(temp_a3->unk2, 3, temp_a3);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CB818.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern ? D_803B1510;
|
||||
|
||||
void func_800CBA08(s32 arg0, s16 arg1) {
|
||||
? sp-10;
|
||||
void *temp_v0;
|
||||
s16 phi_a1;
|
||||
|
||||
phi_a1 = arg1;
|
||||
if (arg1 == 0) {
|
||||
phi_a1 = 1;
|
||||
}
|
||||
temp_v0 = (arg0 * 0x148) + &D_803B1510;
|
||||
temp_v0->unk1 = 2;
|
||||
temp_v0->unk10 = phi_a1;
|
||||
temp_v0->unk1C = -(temp_v0->unk18 / phi_a1);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBA08.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern ? D_803B1510;
|
||||
|
||||
void func_800CBA64(s32 arg0, s16 arg1) {
|
||||
? sp-10;
|
||||
void *temp_v0;
|
||||
|
||||
if (arg1 != 0) {
|
||||
temp_v0 = (arg0 * 0x148) + &D_803B1510;
|
||||
temp_v0->unk1 = 1;
|
||||
temp_v0->unk12 = arg1;
|
||||
temp_v0->unk10 = arg1;
|
||||
temp_v0->unk18 = 0.0f;
|
||||
temp_v0->unk1C = 0.0f;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBA64.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern s8 D_800EA3A0;
|
||||
extern s8 D_800EA3A4;
|
||||
extern OSMesgQueue *D_800EA3A8;
|
||||
extern OSMesgQueue *D_800EA3AC;
|
||||
extern OSMesgQueue *D_800EA3B0;
|
||||
extern OSMesgQueue *D_800EA3B4;
|
||||
extern void *D_80194020;
|
||||
extern void *D_80194028;
|
||||
extern void *D_80194038;
|
||||
extern void *D_8019403C;
|
||||
|
||||
void func_800CBAB4(void) {
|
||||
D_800EA3A0 = 0;
|
||||
D_800EA3A4 = 0;
|
||||
osCreateMesgQueue(D_800EA3A8, &D_80194020, 1);
|
||||
osCreateMesgQueue(D_800EA3AC, &D_80194028, 4);
|
||||
osCreateMesgQueue(D_800EA3B0, &D_80194038, 1);
|
||||
osCreateMesgQueue(D_800EA3B4, &D_8019403C, 1);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBAB4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern u8 D_800EA3A0;
|
||||
extern ? D_80193820;
|
||||
|
||||
void func_800CBB48(s32 arg0, s32 *arg1) {
|
||||
void *temp_v0;
|
||||
|
||||
temp_v0 = (D_800EA3A0 * 8) + &D_80193820;
|
||||
temp_v0->unk0 = arg0;
|
||||
temp_v0->unk4 = *arg1;
|
||||
D_800EA3A0 = D_800EA3A0 + 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBB48.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800CBB48(? *); // extern
|
||||
|
||||
void func_800CBB88(? arg1) {
|
||||
func_800CBB48(&arg1);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBB88.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800CBB48(? *); // extern
|
||||
|
||||
void func_800CBBB8(? arg1) {
|
||||
func_800CBB48(&arg1);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBBB8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800CBB48(s32 *); // extern
|
||||
|
||||
void func_800CBBE8(s32 arg1) {
|
||||
s32 sp34;
|
||||
|
||||
sp34 = arg1 << 0x18;
|
||||
func_800CBB48(&sp34);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBBE8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern u8 D_800EA3A0;
|
||||
extern u8 D_800EA3A4;
|
||||
extern OSMesgQueue *D_800EA3AC;
|
||||
extern s32 D_800EA4A4;
|
||||
|
||||
void func_800CBC24(void) {
|
||||
s32 temp_t6;
|
||||
u8 temp_v0;
|
||||
u8 temp_v1;
|
||||
|
||||
temp_v1 = D_800EA3A4;
|
||||
temp_v0 = D_800EA3A0;
|
||||
temp_t6 = ((temp_v0 - temp_v1) + 0x100) & 0xFF;
|
||||
if (D_800EA4A4 < temp_t6) {
|
||||
D_800EA4A4 = temp_t6;
|
||||
}
|
||||
osSendMesg(D_800EA3AC, ((temp_v1 & 0xFF) << 8) | (temp_v0 & 0xFF), 0);
|
||||
D_800EA3A4 = D_800EA3A0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBC24.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
/*
|
||||
Failed to decompile function func_800CBCB0:
|
||||
|
||||
Unable to determine jump table for jr instruction at func_800CBCB0.s line 116.
|
||||
|
||||
There must be a read of a variable in the same block as
|
||||
the instruction, which has a name starting with "jtbl"/"jpt_".
|
||||
*/
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBCB0.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
/*
|
||||
Failed to decompile function func_800CBF48:
|
||||
|
||||
Last instruction is missing a delay slot:
|
||||
jr $ra
|
||||
*/
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/port_eu/func_800CBF48.s")
|
||||
#endif
|
||||
@@ -0,0 +1,807 @@
|
||||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BD318(void *, void *, s32); // extern
|
||||
|
||||
void func_800BE8F0(void *arg0) {
|
||||
s32 temp_a0;
|
||||
u8 temp_t0;
|
||||
u8 temp_t2;
|
||||
u8 temp_t4;
|
||||
u8 temp_t6;
|
||||
u8 temp_t8;
|
||||
u8 temp_t8_2;
|
||||
void *temp_v1;
|
||||
void *phi_v1;
|
||||
s32 phi_a0;
|
||||
|
||||
temp_t8 = arg0->unk0 & 0xFF7F;
|
||||
temp_t0 = temp_t8 & 0xBF;
|
||||
arg0->unk0 = temp_t8;
|
||||
temp_t2 = temp_t0 & 0xDF;
|
||||
arg0->unk0 = temp_t0;
|
||||
temp_t4 = temp_t2 & 0xEF;
|
||||
arg0->unk0 = temp_t2;
|
||||
temp_t6 = temp_t4 & 0xF7;
|
||||
arg0->unk0 = temp_t4;
|
||||
temp_t8_2 = temp_t6 & 0xFB;
|
||||
arg0->unk0 = temp_t6;
|
||||
arg0->unk0 = temp_t8_2;
|
||||
arg0->unk10 = 0x800;
|
||||
arg0->unkC = 0x800;
|
||||
arg0->unk1E = 0;
|
||||
arg0->unk0 = temp_t8_2 & 0xFD;
|
||||
arg0->unk8 = 0;
|
||||
arg0->unk1 = 0xFF;
|
||||
arg0->unk78 = 0;
|
||||
arg0->unk9 = 0x40;
|
||||
arg0->unkA = 0x80;
|
||||
arg0->unk38 = 0;
|
||||
arg0->unk7 = 0;
|
||||
arg0->unk4 = 0;
|
||||
arg0->unk5 = 3;
|
||||
arg0->unk1A = 0;
|
||||
arg0->unk80 = gDefaultEnvelope;
|
||||
arg0->unk7C = 0x20;
|
||||
arg0->unk7D = 0;
|
||||
arg0->unk12 = 0;
|
||||
arg0->unkE = 0;
|
||||
arg0->unk14 = 0;
|
||||
arg0->unk16 = 0;
|
||||
arg0->unk18 = 0;
|
||||
arg0->unk24 = 1.0f;
|
||||
arg0->unk20 = 1.0f;
|
||||
arg0->unk30 = 1.0f;
|
||||
phi_v1 = arg0;
|
||||
phi_a0 = 0;
|
||||
do {
|
||||
temp_a0 = phi_a0 + 4;
|
||||
phi_v1->unk59 = -1;
|
||||
phi_v1->unk5A = -1;
|
||||
phi_v1->unk5B = -1;
|
||||
temp_v1 = phi_v1 + 4;
|
||||
temp_v1->unk54 = -1;
|
||||
phi_v1 = temp_v1;
|
||||
phi_a0 = temp_a0;
|
||||
} while (temp_a0 != 8);
|
||||
arg0->unk0 = arg0->unk0 & 0xFFFE;
|
||||
func_800BD318(arg0 + 0x84, arg0, 8);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BE8F0.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BD120(s32, void *, s32); // extern
|
||||
s32 func_800BF044(? *, void *, s32); // extern
|
||||
extern ? D_803B5FB8;
|
||||
|
||||
? func_800BEA10(void *arg0, s32 arg1) {
|
||||
void *sp1C;
|
||||
s32 temp_a3;
|
||||
s32 temp_t7;
|
||||
s32 temp_v0;
|
||||
u8 temp_t0;
|
||||
u8 temp_t1;
|
||||
u8 temp_t5;
|
||||
u8 temp_t7_2;
|
||||
void *temp_a2;
|
||||
void *temp_v1;
|
||||
|
||||
temp_t7 = arg1 * 4;
|
||||
temp_a2 = arg0 + temp_t7;
|
||||
temp_a3 = temp_a2->unk48;
|
||||
if (temp_a3 == 0) {
|
||||
sp1C = temp_a2;
|
||||
temp_v0 = func_800BF044(&D_803B5FB8, temp_a2, temp_a3);
|
||||
temp_a2->unk48 = temp_v0;
|
||||
if (temp_v0 == 0) {
|
||||
temp_a2->unk48 = 0;
|
||||
return -1;
|
||||
}
|
||||
goto block_4;
|
||||
}
|
||||
sp1C = temp_a2;
|
||||
func_800BD120(temp_a3, temp_a2, temp_a3);
|
||||
block_4:
|
||||
temp_v1 = (arg0 + temp_t7)->unk48;
|
||||
temp_v1->unk4C = arg0;
|
||||
temp_t5 = temp_v1->unk0 | 0x80;
|
||||
temp_t7_2 = temp_t5 & 0xDF;
|
||||
temp_t0 = temp_t7_2 & 0xEF;
|
||||
temp_v1->unk18 = arg0->unk7C;
|
||||
temp_v1->unk0 = temp_t5;
|
||||
temp_v1->unk1C = arg0->unk80;
|
||||
temp_t1 = temp_t0 & 0xBF;
|
||||
temp_v1->unk0 = temp_t7_2;
|
||||
temp_v1->unk0 = temp_t0;
|
||||
temp_v1->unk0 = temp_t1;
|
||||
temp_v1->unk18 = 0;
|
||||
temp_v1->unk0 = temp_t1 & 0xFD;
|
||||
temp_v1->unk8 = 0;
|
||||
temp_v1->unk68 = 0;
|
||||
temp_v1->unk2 = 0;
|
||||
temp_v1->unk3 = 0x80;
|
||||
temp_v1->unk5 = 0x40;
|
||||
temp_v1->unk22 = 0;
|
||||
temp_v1->unk38 = 0;
|
||||
temp_v1->unk3A = 0;
|
||||
temp_v1->unk3C = 0;
|
||||
temp_v1->unk40 = 0;
|
||||
temp_v1->unk44 = 0;
|
||||
temp_v1->unk1 = 0xFF;
|
||||
temp_v1->unk28 = 0.0f;
|
||||
temp_v1->unk24 = 1.0f;
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEA10.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BD120(); // extern
|
||||
|
||||
void func_800BEB18(u8 *arg0) {
|
||||
u8 temp_t0;
|
||||
u8 temp_t9;
|
||||
|
||||
if (arg0 != 0) {
|
||||
func_800BD120();
|
||||
temp_t9 = *arg0 & 0xFF7F;
|
||||
temp_t0 = temp_t9 | 0x40;
|
||||
*arg0 = temp_t9;
|
||||
*arg0 = temp_t0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEB18.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BEB18(s32); // extern
|
||||
? func_800BF004(? *, s32, s32); // extern
|
||||
extern ? D_803B5FB8;
|
||||
|
||||
void func_800BEB54(s32 arg0, s32 arg1) {
|
||||
s32 sp1C;
|
||||
void *sp18;
|
||||
s32 temp_a2;
|
||||
void *temp_v0;
|
||||
|
||||
temp_v0 = arg0 + (arg1 * 4);
|
||||
temp_a2 = temp_v0->unk48;
|
||||
if (temp_a2 != 0) {
|
||||
sp18 = temp_v0;
|
||||
sp1C = temp_a2;
|
||||
func_800BF004(&D_803B5FB8, temp_a2 + 0x6C, temp_a2);
|
||||
func_800BEB18(sp1C);
|
||||
temp_v0->unk48 = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEB54.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BD418(s32); // extern
|
||||
? func_800BEB54(u8 *, s32); // extern
|
||||
|
||||
void func_800BEBA4(u8 *arg0) {
|
||||
s32 temp_s0;
|
||||
u8 temp_t9;
|
||||
s32 phi_s0;
|
||||
|
||||
phi_s0 = 0;
|
||||
do {
|
||||
func_800BEB54(arg0, phi_s0);
|
||||
temp_s0 = phi_s0 + 1;
|
||||
phi_s0 = temp_s0;
|
||||
} while (temp_s0 != 4);
|
||||
func_800BD418(arg0 + 0x84);
|
||||
temp_t9 = *arg0 & 0xFF7F;
|
||||
*arg0 = temp_t9;
|
||||
*arg0 = temp_t9 | 0x40;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEBA4.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
extern ? D_803B1A30;
|
||||
extern ? D_803B3EF0;
|
||||
extern ? D_803B5EF0;
|
||||
|
||||
? *func_800BEC10(void) {
|
||||
? *temp_v1;
|
||||
? *phi_v1;
|
||||
|
||||
phi_v1 = &D_803B1A30;
|
||||
loop_1:
|
||||
if (phi_v1->unk44 == 0) {
|
||||
return phi_v1;
|
||||
}
|
||||
if (phi_v1->unk108 == 0) {
|
||||
return phi_v1 + 0xC4;
|
||||
}
|
||||
if (phi_v1->unk1CC == 0) {
|
||||
return phi_v1 + 0x188;
|
||||
}
|
||||
if (phi_v1->unk290 == 0) {
|
||||
return phi_v1 + 0x24C;
|
||||
}
|
||||
temp_v1 = phi_v1 + 0x310;
|
||||
phi_v1 = temp_v1;
|
||||
if (temp_v1 == &D_803B3EF0) {
|
||||
return &D_803B5EF0;
|
||||
}
|
||||
goto loop_1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEC10.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BE8F0(s32); // extern
|
||||
? func_800BEBA4(s32, s32); // extern
|
||||
s32 func_800BEC10(); // extern
|
||||
extern ? D_803B5EF0;
|
||||
extern s32 D_803B7198;
|
||||
|
||||
void func_800BEC8C(void *arg0, s32 arg1) {
|
||||
s32 temp_s0;
|
||||
s32 temp_s3;
|
||||
s32 temp_v0;
|
||||
void *temp_s2;
|
||||
s32 phi_a1;
|
||||
s32 phi_s3;
|
||||
|
||||
phi_a1 = arg1 & 0xFFFF;
|
||||
phi_s3 = 0;
|
||||
do {
|
||||
if ((phi_a1 & 1) != 0) {
|
||||
temp_s2 = arg0 + (phi_s3 * 4);
|
||||
temp_s0 = temp_s2->unk30;
|
||||
if (((temp_s0 != &D_803B5EF0) == 1) && (arg0 == temp_s0->unk44)) {
|
||||
func_800BEBA4(temp_s0, phi_a1);
|
||||
temp_s0->unk44 = 0;
|
||||
}
|
||||
temp_v0 = func_800BEC10();
|
||||
if (temp_v0 == &D_803B5EF0) {
|
||||
D_803B7198 = phi_s3 + 0x10000;
|
||||
temp_s2->unk30 = temp_v0;
|
||||
} else {
|
||||
func_800BE8F0(temp_v0);
|
||||
temp_s2->unk30 = temp_v0;
|
||||
temp_v0->unk44 = arg0;
|
||||
temp_v0->unk6 = arg0->unk5;
|
||||
temp_v0->unk3 = arg0->unk3;
|
||||
temp_v0->unk2 = arg0->unk2;
|
||||
}
|
||||
}
|
||||
temp_s3 = phi_s3 + 1;
|
||||
phi_a1 = (phi_a1 >> 1) & 0xFFFF;
|
||||
phi_s3 = temp_s3;
|
||||
} while (temp_s3 != 0x10);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEC8C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BEBA4(s32, s32); // extern
|
||||
extern ? D_803B5EF0;
|
||||
|
||||
void func_800BEDB8(s32 arg0, s32 arg1) {
|
||||
s32 temp_s0;
|
||||
s32 temp_s1;
|
||||
void *temp_s3;
|
||||
s32 phi_a1;
|
||||
s32 phi_s1;
|
||||
|
||||
phi_a1 = arg1 & 0xFFFF;
|
||||
phi_s1 = 0;
|
||||
do {
|
||||
if ((phi_a1 & 1) != 0) {
|
||||
temp_s3 = arg0 + (phi_s1 * 4);
|
||||
temp_s0 = temp_s3->unk30;
|
||||
if ((temp_s0 != &D_803B5EF0) == 1) {
|
||||
if (arg0 == temp_s0->unk44) {
|
||||
func_800BEBA4(temp_s0, phi_a1);
|
||||
temp_s0->unk44 = 0;
|
||||
}
|
||||
temp_s3->unk30 = &D_803B5EF0;
|
||||
}
|
||||
}
|
||||
temp_s1 = phi_s1 + 1;
|
||||
phi_a1 = (phi_a1 >> 1) & 0xFFFF;
|
||||
phi_s1 = temp_s1;
|
||||
} while (temp_s1 != 0x10);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEDB8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BEB54(void *, s32); // extern
|
||||
extern ? D_803B5EF0;
|
||||
|
||||
void func_800BEE88(s32 arg0, s32 arg1, s32 arg2) {
|
||||
s32 temp_s0;
|
||||
u8 temp_t4;
|
||||
void *temp_s2;
|
||||
void *phi_s1;
|
||||
s32 phi_s0;
|
||||
|
||||
temp_s2 = (arg0 + ((arg1 & 0xFF) * 4))->unk30;
|
||||
phi_s0 = 0;
|
||||
if (temp_s2 != &D_803B5EF0) {
|
||||
temp_s2->unk78 = 0;
|
||||
temp_s2->unk60 = arg2;
|
||||
temp_t4 = temp_s2->unk0 | 0x80;
|
||||
temp_s2->unk0 = temp_t4;
|
||||
temp_s2->unk0 = temp_t4 & 0xBF;
|
||||
temp_s2->unk1A = 0;
|
||||
phi_s1 = temp_s2;
|
||||
do {
|
||||
if (phi_s1->unk48 != 0) {
|
||||
func_800BEB54(temp_s2, phi_s0);
|
||||
}
|
||||
temp_s0 = phi_s0 + 1;
|
||||
phi_s1 += 4;
|
||||
phi_s0 = temp_s0;
|
||||
} while (temp_s0 != 4);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEE88.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BD418(s32); // extern
|
||||
? func_800BEDB8(?); // extern
|
||||
extern ? D_803AFE18;
|
||||
extern ? D_803B03C0;
|
||||
extern ? D_803B0400;
|
||||
|
||||
void func_800BEF2C(void *arg0) {
|
||||
u8 *temp_v0;
|
||||
u8 *temp_v1_2;
|
||||
u8 temp_a0;
|
||||
u8 temp_t0;
|
||||
u8 temp_t9;
|
||||
u8 temp_v1;
|
||||
|
||||
func_800BEDB8(0xFFFF);
|
||||
func_800BD418(arg0 + 0x94);
|
||||
temp_t9 = arg0->unk0 | 0x40;
|
||||
temp_t0 = temp_t9 & 0x7F;
|
||||
arg0->unk0 = temp_t9;
|
||||
arg0->unk0 = temp_t0;
|
||||
temp_v0 = arg0->unk4 + &D_803B0400;
|
||||
temp_v1 = *temp_v0;
|
||||
if ((temp_v1 >= 2) && (temp_v1 != 5)) {
|
||||
*temp_v0 = 3;
|
||||
}
|
||||
temp_v1_2 = arg0->unk5 + &D_803B03C0;
|
||||
temp_a0 = *temp_v1_2;
|
||||
if ((temp_a0 >= 2) && (temp_a0 != 5)) {
|
||||
*temp_v1_2 = 4;
|
||||
}
|
||||
if (arg0->unk5 == D_803AFE18.unk1B2) {
|
||||
D_803AFE18.unk194 = 1;
|
||||
return;
|
||||
}
|
||||
if (arg0->unk5 == D_803AFE18.unk1BE) {
|
||||
D_803AFE18.unk194 = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BEF2C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_800BF004(void *arg0, void *arg1) {
|
||||
if (arg1->unk0 == 0) {
|
||||
arg0->unk0->unk4 = arg1;
|
||||
arg1->unk4 = arg0;
|
||||
arg1->unk0 = arg0->unk0;
|
||||
arg0->unk0 = arg1;
|
||||
arg0->unk8 = arg0->unk8 + 1;
|
||||
arg1->unkC = arg0->unkC;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF004.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s32 func_800BF044(void *arg0) {
|
||||
void *temp_v1;
|
||||
|
||||
temp_v1 = arg0->unk0;
|
||||
if (temp_v1 == arg0) {
|
||||
return 0;
|
||||
}
|
||||
temp_v1->unk0->unk4 = arg0;
|
||||
arg0->unk0 = temp_v1->unk0;
|
||||
temp_v1->unk0 = NULL;
|
||||
arg0->unk8 = arg0->unk8 - 1;
|
||||
return temp_v1->unk8;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF044.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BF004(? *, ? *); // extern
|
||||
extern ? D_803B3EF0;
|
||||
extern ? D_803B3F5C;
|
||||
extern ? D_803B5F5C;
|
||||
extern ? D_803B5FB8;
|
||||
|
||||
void func_800BF084(void) {
|
||||
? *temp_s1;
|
||||
? *phi_s0;
|
||||
? *phi_s1;
|
||||
|
||||
D_803B5FB8.unk0 = &D_803B5FB8;
|
||||
D_803B5FB8.unk4 = &D_803B5FB8;
|
||||
D_803B5FB8.unk8 = 0;
|
||||
D_803B5FB8.unkC = 0;
|
||||
phi_s0 = &D_803B3EF0;
|
||||
phi_s1 = &D_803B3F5C;
|
||||
do {
|
||||
phi_s0->unk74 = phi_s0;
|
||||
phi_s0->unk6C = 0;
|
||||
func_800BF004(&D_803B5FB8, phi_s1);
|
||||
temp_s1 = phi_s1 + 0x80;
|
||||
phi_s0 += 0x80;
|
||||
phi_s1 = temp_s1;
|
||||
} while (temp_s1 != &D_803B5F5C);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF084.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
u8 func_800BF108(u8 **arg0) {
|
||||
u8 *temp_a1;
|
||||
u8 temp_v0;
|
||||
|
||||
temp_a1 = *arg0;
|
||||
temp_v0 = *temp_a1;
|
||||
*arg0 = temp_a1 + 1;
|
||||
return temp_v0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF108.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s16 func_800BF11C(u8 **arg0) {
|
||||
u8 *temp_a1;
|
||||
u8 *temp_t9;
|
||||
u8 temp_v1;
|
||||
|
||||
temp_a1 = *arg0;
|
||||
temp_v1 = *temp_a1;
|
||||
temp_t9 = temp_a1 + 1;
|
||||
*arg0 = temp_t9;
|
||||
*arg0 = temp_t9 + 1;
|
||||
return *temp_t9 | (temp_v1 << 8);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF11C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
u8 func_800BF14C(u8 **arg0) {
|
||||
u8 *temp_t6;
|
||||
u8 *temp_v0;
|
||||
u8 temp_v1;
|
||||
u8 phi_v1;
|
||||
|
||||
temp_v0 = *arg0;
|
||||
temp_v1 = *temp_v0;
|
||||
temp_t6 = temp_v0 + 1;
|
||||
*arg0 = temp_t6;
|
||||
phi_v1 = temp_v1;
|
||||
if ((temp_v1 & 0x80) != 0) {
|
||||
*arg0 = temp_t6 + 1;
|
||||
phi_v1 = (*temp_t6 | ((temp_v1 << 8) & 0x7F00)) & 0xFFFF;
|
||||
}
|
||||
return phi_v1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF14C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
/*
|
||||
Failed to decompile function func_800BF190:
|
||||
|
||||
Unable to determine jump table for jr instruction at func_800BF190.s line 611.
|
||||
|
||||
There must be a read of a variable in the same block as
|
||||
the instruction, which has a name starting with "jtbl"/"jpt_".
|
||||
*/
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BF190.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void *func_800BC948(u8, u8); // extern
|
||||
|
||||
s32 func_800BFC68(void *arg0, u8 arg1, void **arg2, void *arg3) {
|
||||
void *temp_v0;
|
||||
|
||||
temp_v0 = func_800BC948(arg0->unk6, arg1);
|
||||
if (temp_v0 == 0) {
|
||||
*arg2 = NULL;
|
||||
return 0;
|
||||
}
|
||||
arg3->unk4 = temp_v0->unk4;
|
||||
arg3->unk0 = temp_v0->unk3;
|
||||
*arg2 = temp_v0;
|
||||
return (arg1 + 1) & 0xFF;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFC68.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
s16 func_800BFC68(s32, void *, void *); // extern
|
||||
|
||||
void func_800BFCD8(u8 *arg0, s32 arg1) {
|
||||
s16 temp_v0;
|
||||
s32 temp_t6;
|
||||
|
||||
temp_t6 = arg1 & 0xFF;
|
||||
if (temp_t6 >= 0x80) {
|
||||
arg0->unk1C = temp_t6;
|
||||
arg0->unk40 = 0;
|
||||
goto block_6;
|
||||
}
|
||||
if (temp_t6 == 0x7F) {
|
||||
arg0->unk1C = 0;
|
||||
arg0->unk40 = 1;
|
||||
goto block_6;
|
||||
}
|
||||
temp_v0 = func_800BFC68(temp_t6, arg0 + 0x40, arg0 + 0x7C);
|
||||
arg0->unk1C = temp_v0;
|
||||
if (temp_v0 == 0) {
|
||||
arg0->unk0 = arg0->unk0 & 0xFFF7;
|
||||
return;
|
||||
}
|
||||
block_6:
|
||||
arg0->unk0 = arg0->unk0 | 8;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFCD8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_800BFD6C(void *arg0, s32 arg1) {
|
||||
arg0->unk24 = (arg1 & 0xFF) / 127.0f;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFD6C.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
/*
|
||||
Failed to decompile function func_800BFD90:
|
||||
|
||||
Unable to determine jump table for jr instruction at func_800BFD90.s line 639.
|
||||
|
||||
There must be a read of a variable in the same block as
|
||||
the instruction, which has a name starting with "jtbl"/"jpt_".
|
||||
*/
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800BFD90.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
/*
|
||||
Failed to decompile function func_800C08CC:
|
||||
|
||||
Unable to determine jump table for jr instruction at func_800C08CC.s line 530.
|
||||
|
||||
There must be a read of a variable in the same block as
|
||||
the instruction, which has a name starting with "jtbl"/"jpt_".
|
||||
*/
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800C08CC.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BCBC4(); // extern
|
||||
? func_800BDFF8(u32 *); // extern
|
||||
? func_800C08CC(u32 *); // extern
|
||||
extern u32 D_803B1510;
|
||||
extern ? D_803B1A30;
|
||||
|
||||
void func_800C1138(s32 arg0) {
|
||||
u32 *temp_s0;
|
||||
u32 *phi_s0;
|
||||
|
||||
phi_s0 = &D_803B1510;
|
||||
do {
|
||||
if ((*phi_s0 >> 0x1F) == 1) {
|
||||
func_800C08CC(phi_s0);
|
||||
func_800BDFF8(phi_s0);
|
||||
}
|
||||
temp_s0 = phi_s0 + 0x148;
|
||||
phi_s0 = temp_s0;
|
||||
} while (temp_s0 != &D_803B1A30);
|
||||
func_800BCBC4();
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800C1138.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BEF2C(void *); // extern
|
||||
extern ? D_803B1510;
|
||||
extern ? gDefaultShortNoteDurationTable;
|
||||
extern ? gDefaultShortNoteVelocityTable;
|
||||
|
||||
void func_800C11B0(s32 arg0) {
|
||||
void *sp18;
|
||||
void *temp_a0;
|
||||
|
||||
temp_a0 = (arg0 * 0x148) + &D_803B1510;
|
||||
sp18 = temp_a0;
|
||||
func_800BEF2C(temp_a0);
|
||||
temp_a0->unkE = 0;
|
||||
temp_a0->unk1 = 1;
|
||||
temp_a0->unk10 = 0;
|
||||
temp_a0->unk12 = 0;
|
||||
temp_a0->unkA = 0;
|
||||
temp_a0->unk8 = 0x1680;
|
||||
temp_a0->unkC = 0;
|
||||
temp_a0->unk2 = 0;
|
||||
temp_a0->unk8C = &gDefaultShortNoteVelocityTable;
|
||||
temp_a0->unk90 = &gDefaultShortNoteDurationTable;
|
||||
temp_a0->unk18 = 1.0f;
|
||||
temp_a0->unk28 = 1.0f;
|
||||
temp_a0->unk1C = 0.0f;
|
||||
temp_a0->unk20 = 0.0f;
|
||||
temp_a0->unk24 = 0.5f;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800C11B0.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
? func_800BD318(? *); // extern
|
||||
? func_800BF084(s32, ? *, u32, u8 *); // extern
|
||||
? func_800C11B0(s32); // extern
|
||||
extern ? D_803B1510;
|
||||
extern ? D_803B15A4;
|
||||
extern ? D_803B1A30;
|
||||
extern u8 D_803B3EF0;
|
||||
extern ? D_803B5EF0;
|
||||
|
||||
void func_800C125C(void) {
|
||||
? *temp_a1;
|
||||
? *temp_v1;
|
||||
? *temp_v1_2;
|
||||
s32 temp_s3;
|
||||
s32 temp_v0;
|
||||
s32 temp_v0_3;
|
||||
u32 temp_a2;
|
||||
u8 *temp_v0_2;
|
||||
u8 temp_t4;
|
||||
u8 temp_t6;
|
||||
u8 temp_t8;
|
||||
? *phi_a1;
|
||||
? *phi_v1;
|
||||
s32 phi_v0;
|
||||
? *phi_a2;
|
||||
u8 *phi_v0_2;
|
||||
? *phi_v1_2;
|
||||
s32 phi_v0_3;
|
||||
? *phi_s1;
|
||||
? *phi_s5;
|
||||
s32 phi_s3;
|
||||
? *phi_s4;
|
||||
|
||||
phi_a1 = &D_803B1A30;
|
||||
phi_a2 = &D_803B1A30;
|
||||
do {
|
||||
phi_a1->unk44 = 0;
|
||||
phi_a1->unk0 = phi_a1->unk0 & 0xFF7F;
|
||||
phi_v1 = phi_a2;
|
||||
phi_v0 = 0;
|
||||
phi_v0_3 = 0;
|
||||
loop_2:
|
||||
temp_v0 = phi_v0 + 4;
|
||||
phi_v1->unk4C = 0;
|
||||
phi_v1->unk50 = 0;
|
||||
phi_v1->unk54 = 0;
|
||||
temp_v1 = phi_v1 + 0x10;
|
||||
temp_v1->unk38 = 0;
|
||||
phi_v1 = temp_v1;
|
||||
phi_v0 = temp_v0;
|
||||
if (temp_v0 != 0x40) {
|
||||
goto loop_2;
|
||||
}
|
||||
temp_a2 = phi_a2 + 0xC4;
|
||||
temp_a1 = phi_a1 + 0xC4;
|
||||
phi_a1 = temp_a1;
|
||||
phi_a2 = temp_a2;
|
||||
} while (temp_a2 < &D_803B3EF0);
|
||||
func_800BF084(0x40, temp_a1, temp_a2, &D_803B3EF0);
|
||||
phi_v0_2 = &D_803B3EF0;
|
||||
do {
|
||||
temp_v0_2 = phi_v0_2 + 0x80;
|
||||
temp_v0_2->unk-34 = 0;
|
||||
temp_v0_2->unk-80 = *phi_v0_2 & 0xFF7F;
|
||||
phi_v0_2 = temp_v0_2;
|
||||
} while (temp_v0_2 < &D_803B5EF0);
|
||||
phi_s1 = &D_803B1510;
|
||||
phi_s5 = &D_803B15A4;
|
||||
phi_s3 = 0;
|
||||
phi_s4 = &D_803B1510;
|
||||
do {
|
||||
phi_v1_2 = phi_s4;
|
||||
loop_8:
|
||||
temp_v0_3 = phi_v0_3 + 4;
|
||||
phi_v1_2->unk34 = &D_803B5EF0;
|
||||
phi_v1_2->unk38 = &D_803B5EF0;
|
||||
phi_v1_2->unk3C = &D_803B5EF0;
|
||||
temp_v1_2 = phi_v1_2 + 0x10;
|
||||
temp_v1_2->unk20 = &D_803B5EF0;
|
||||
phi_v1_2 = temp_v1_2;
|
||||
phi_v0_3 = temp_v0_3;
|
||||
if (temp_v0_3 != 0x10) {
|
||||
goto loop_8;
|
||||
}
|
||||
phi_s1->unk7 = -1;
|
||||
phi_s1->unk3 = 0xE0;
|
||||
temp_t4 = phi_s1->unk0 & 0xFF7F;
|
||||
temp_t6 = temp_t4 & 0xDF;
|
||||
phi_s1->unk0 = temp_t4;
|
||||
temp_t8 = temp_t6 & 0xF7;
|
||||
phi_s1->unk0 = temp_t6;
|
||||
phi_s1->unk0 = temp_t8;
|
||||
phi_s1->unk0 = temp_t8 & 0xEF;
|
||||
func_800BD318(phi_s5);
|
||||
func_800C11B0(phi_s3);
|
||||
temp_s3 = phi_s3 + 1;
|
||||
phi_s1 += 0x148;
|
||||
phi_s5 += 0x148;
|
||||
phi_s3 = temp_s3;
|
||||
phi_s4 += 0x148;
|
||||
} while (temp_s3 != 4);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/audio/seqplayer/func_800C125C.s")
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
-197
@@ -1,197 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include "synthesis.h"
|
||||
//#include "heap.h"
|
||||
//#include "data.h"
|
||||
//#include "load.h"
|
||||
//#include "seqplayer.h"
|
||||
#include "internal.h"
|
||||
//#include "external.h"
|
||||
|
||||
|
||||
#define DMEM_ADDR_TEMP 0x0
|
||||
#define DMEM_ADDR_RESAMPLED 0x20
|
||||
#define DMEM_ADDR_RESAMPLED2 0x160
|
||||
#define DMEM_ADDR_UNCOMPRESSED_NOTE 0x180
|
||||
#define DMEM_ADDR_NOTE_PAN_TEMP 0x200
|
||||
#define DMEM_ADDR_STEREO_STRONG_TEMP_DRY 0x200
|
||||
#define DMEM_ADDR_STEREO_STRONG_TEMP_WET 0x340
|
||||
#define DMEM_ADDR_COMPRESSED_ADPCM_DATA 0x3f0
|
||||
#define DMEM_ADDR_LEFT_CH 0x4c0
|
||||
#define DMEM_ADDR_RIGHT_CH 0x600
|
||||
#define DMEM_ADDR_WET_LEFT_CH 0x740
|
||||
#define DMEM_ADDR_WET_RIGHT_CH 0x880
|
||||
|
||||
#define aSetLoadBufferPair(pkt, c, off) \
|
||||
aSetBuffer(pkt, 0, c + DMEM_ADDR_WET_LEFT_CH, 0, DEFAULT_LEN_1CH - c); \
|
||||
aLoadBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.left + (off))); \
|
||||
aSetBuffer(pkt, 0, c + DMEM_ADDR_WET_RIGHT_CH, 0, DEFAULT_LEN_1CH - c); \
|
||||
aLoadBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.right + (off)))
|
||||
|
||||
#define aSetSaveBufferPair(pkt, c, d, off) \
|
||||
aSetBuffer(pkt, 0, 0, c + DMEM_ADDR_WET_LEFT_CH, d); \
|
||||
aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.left + (off))); \
|
||||
aSetBuffer(pkt, 0, 0, c + DMEM_ADDR_WET_RIGHT_CH, d); \
|
||||
aSaveBuffer(pkt, VIRTUAL_TO_PHYSICAL2(gSynthesisReverb.ringBuffer.right + (off)));
|
||||
|
||||
#define ALIGN(val, amnt) (((val) + (1 << amnt) - 1) & ~((1 << amnt) - 1))
|
||||
|
||||
struct VolumeChange {
|
||||
u16 sourceLeft;
|
||||
u16 sourceRight;
|
||||
u16 targetLeft;
|
||||
u16 targetRight;
|
||||
};
|
||||
|
||||
u64 *synthesis_do_one_audio_update(s16 *aiBuf, s32 bufLen, u64 *cmd, s32 updateIndex);
|
||||
u64 *synthesis_process_note(struct Note *note, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s16 *aiBuf, s32 bufLen, u64 *cmd);
|
||||
u64 *load_wave_samples(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamplesToLoad);
|
||||
u64 *final_resample(u64 *cmd, struct NoteSynthesisState *synthesisState, s32 count, u16 pitch, u16 dmemIn, u32 flags);
|
||||
u64 *process_envelope(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *synthesisState, s32 nSamples, u16 inBuf, s32 headsetPanSettings, u32 flags);
|
||||
u64 *note_apply_headset_pan_effects(u64 *cmd, struct NoteSubEu *noteSubEu, struct NoteSynthesisState *note, s32 bufLen, s32 flags, s32 leftRight);
|
||||
|
||||
struct SynthesisReverb gSynthesisReverbs[4];
|
||||
u8 sAudioSynthesisPad[0x10];
|
||||
s16 gVolume;
|
||||
s8 gUseReverb;
|
||||
s8 gNumSynthesisReverbs;
|
||||
struct NoteSubEu *gNoteSubsEu;
|
||||
|
||||
extern struct Note *D_803B7088;
|
||||
extern s32 D_803B70B0;
|
||||
|
||||
f32 gLeftVolRampings[3][1024];
|
||||
f32 gRightVolRampings[3][1024];
|
||||
f32 *gCurrentLeftVolRamping; // Points to any of the three left buffers above
|
||||
f32 *gCurrentRightVolRamping; // Points to any of the three right buffers above
|
||||
|
||||
u8 audioString1[] = "pitch %x: delaybytes %d : olddelay %d\n";
|
||||
u8 audioString2[] = "cont %x: delaybytes %d : olddelay %d\n";
|
||||
|
||||
// Equivalent functionality as the US/JP version,
|
||||
// just that the reverb structure is chosen from an array with index
|
||||
void prepare_reverb_ring_buffer(s32 chunkLen, u32 updateIndex, s32 reverbIndex) {
|
||||
struct ReverbRingBufferItem *item;
|
||||
struct SynthesisReverb *reverb = &gSynthesisReverbs[reverbIndex];
|
||||
s32 srcPos;
|
||||
s32 dstPos;
|
||||
s32 nSamples;
|
||||
s32 excessiveSamples;
|
||||
s32 UNUSED pad[3];
|
||||
if (reverb->downsampleRate != 1) {
|
||||
if (reverb->framesLeftToIgnore == 0) {
|
||||
// Now that the RSP has finished, downsample the samples produced two frames ago by skipping
|
||||
// samples.
|
||||
item = &reverb->items[reverb->curFrame][updateIndex];
|
||||
|
||||
// Touches both left and right since they are adjacent in memory
|
||||
osInvalDCache(item->toDownsampleLeft, 0x300);
|
||||
|
||||
for (srcPos = 0, dstPos = 0; dstPos < item->lengthA / 2;
|
||||
srcPos += reverb->downsampleRate, dstPos++) {
|
||||
reverb->ringBuffer.left[item->startPos + dstPos] =
|
||||
item->toDownsampleLeft[srcPos];
|
||||
reverb->ringBuffer.right[item->startPos + dstPos] =
|
||||
item->toDownsampleRight[srcPos];
|
||||
}
|
||||
for (dstPos = 0; dstPos < item->lengthB / 2; srcPos += reverb->downsampleRate, dstPos++) {
|
||||
reverb->ringBuffer.left[dstPos] = item->toDownsampleLeft[srcPos];
|
||||
reverb->ringBuffer.right[dstPos] = item->toDownsampleRight[srcPos];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
item = &reverb->items[reverb->curFrame][updateIndex];
|
||||
nSamples = chunkLen / reverb->downsampleRate;
|
||||
excessiveSamples = (nSamples + reverb->nextRingBufferPos) - reverb->bufSizePerChannel;
|
||||
if (excessiveSamples < 0) {
|
||||
// There is space in the ring buffer before it wraps around
|
||||
item->lengthA = nSamples * 2;
|
||||
item->lengthB = 0;
|
||||
item->startPos = (s32) reverb->nextRingBufferPos;
|
||||
reverb->nextRingBufferPos += nSamples;
|
||||
} else {
|
||||
// Ring buffer wrapped around
|
||||
item->lengthA = (nSamples - excessiveSamples) * 2;
|
||||
item->lengthB = excessiveSamples * 2;
|
||||
item->startPos = reverb->nextRingBufferPos;
|
||||
reverb->nextRingBufferPos = excessiveSamples;
|
||||
}
|
||||
// These fields are never read later
|
||||
item->numSamplesAfterDownsampling = nSamples;
|
||||
item->chunkLen = chunkLen;
|
||||
}
|
||||
/* sm64
|
||||
u64 *synthesis_load_reverb_ring_buffer(u64 *cmd, u16 addr, u16 srcOffset, s32 len, s32 reverbIndex) {
|
||||
aSetBuffer(cmd++, 0, addr, 0, len&0xFF<<0x10);
|
||||
aLoadBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(&gSynthesisReverbs[reverbIndex].ringBuffer.left[srcOffset]));
|
||||
|
||||
aSetBuffer(cmd++, 0, addr + DEFAULT_LEN_1CH, 0, len&0xFF<<0x10);
|
||||
aLoadBuffer(cmd++, VIRTUAL_TO_PHYSICAL2(&gSynthesisReverbs[reverbIndex].ringBuffer.right[srcOffset]));
|
||||
|
||||
return cmd;
|
||||
}
|
||||
*/
|
||||
/* mk64
|
||||
void *synthesis_load_reverb_ring_buffer(void *arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
|
||||
s32 temp_t0;
|
||||
s32 temp_t2;
|
||||
void *temp_t1;
|
||||
void *temp_t3;
|
||||
|
||||
temp_t0 = (((arg3 >> 4) & 0xFF) << 0x10) | 0x14000000;
|
||||
arg0->unk0 = (s32) (temp_t0 | (arg1 & 0xFFFF));
|
||||
temp_t1 = (arg4 * 0x108) + &gSynthesisReverbs;
|
||||
temp_t2 = (arg2 & 0xFFFF) * 2;
|
||||
arg0->unk4 = (s32) (temp_t1->unk18 + temp_t2 + 0x80000000);
|
||||
temp_t3 = arg0 + 8;
|
||||
temp_t3->unk0 = (s32) (temp_t0 | ((arg1 + 0x180) & 0xFFFF));
|
||||
temp_t3->unk4 = (s32) (temp_t1->unk1C + temp_t2 + 0x80000000);
|
||||
return temp_t3 + 8;
|
||||
}
|
||||
*/
|
||||
// includes 2 funcs
|
||||
GLOBAL_ASM("asm/non_matchings/audio/wip.s")
|
||||
|
||||
/* sm64
|
||||
void synthesis_load_note_subs_eu(s32 updateIndex) {
|
||||
struct NoteSubEu *src;
|
||||
struct NoteSubEu *dest;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < D_803B70B0; i++) {
|
||||
src = &D_803B7088[i].noteSubEu;
|
||||
dest = &gNoteSubsEu[D_803B70B0 * updateIndex + i];
|
||||
if (src->enabled) {
|
||||
*dest = *src;
|
||||
src->needsInit = FALSE;
|
||||
} else {
|
||||
dest->enabled = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
// mk64 m2c (with minor edits) struct access appears quite different.
|
||||
void func_800B6FB4(s32 arg0, s32 arg1) {
|
||||
s32 *dest;
|
||||
s32 temp_v0;
|
||||
s32 temp_v0_2;
|
||||
s32 phi_v0;
|
||||
|
||||
temp_v0 = arg0 + 1;
|
||||
if (i = 0; temp_v0 < (s32) D_803B7088.unkC; i++) {
|
||||
phi_v0 = temp_v0;
|
||||
|
||||
for(i = 0; temp_v0_2 < (s32) D_803B7088.unkC; i++) {
|
||||
dest = &gNoteSubsEu[D_803B70B0 * phi_v0 + (arg1 * 0x10)];
|
||||
if ((*dest * 2) >= 0) {
|
||||
temp_v0_2 = phi_v0 + 1;
|
||||
*dest = (s8) ((u8) *dest & 0xFF7F);
|
||||
phi_v0 = temp_v0_2;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/audio/synthesis.s")
|
||||
Reference in New Issue
Block a user