mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 20:42:41 +01:00
more audio
This commit is contained in:
parent
01c44ede86
commit
9f8b44e7c9
@ -1,20 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80053888
|
||||
/* 2EC88 80053888 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 2EC8C 8005388C AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 2EC90 80053890 90820045 */ lbu $v0, 0x45($a0)
|
||||
/* 2EC94 80053894 10400008 */ beqz $v0, .L800538B8
|
||||
/* 2EC98 80053898 24020001 */ addiu $v0, $zero, 1
|
||||
/* 2EC9C 8005389C AC80001C */ sw $zero, 0x1c($a0)
|
||||
/* 2ECA0 800538A0 A0820042 */ sb $v0, 0x42($a0)
|
||||
/* 2ECA4 800538A4 A0800043 */ sb $zero, 0x43($a0)
|
||||
/* 2ECA8 800538A8 30A400FF */ andi $a0, $a1, 0xff
|
||||
/* 2ECAC 800538AC 0000282D */ daddu $a1, $zero, $zero
|
||||
/* 2ECB0 800538B0 0C015DBB */ jal func_800576EC
|
||||
/* 2ECB4 800538B4 240600B8 */ addiu $a2, $zero, 0xb8
|
||||
.L800538B8:
|
||||
/* 2ECB8 800538B8 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 2ECBC 800538BC 03E00008 */ jr $ra
|
||||
/* 2ECC0 800538C0 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,17 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_800538C4
|
||||
/* 2ECC4 800538C4 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 2ECC8 800538C8 24020001 */ addiu $v0, $zero, 1
|
||||
/* 2ECCC 800538CC AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 2ECD0 800538D0 AC80001C */ sw $zero, 0x1c($a0)
|
||||
/* 2ECD4 800538D4 A0820042 */ sb $v0, 0x42($a0)
|
||||
/* 2ECD8 800538D8 A0800043 */ sb $zero, 0x43($a0)
|
||||
/* 2ECDC 800538DC 30A400FF */ andi $a0, $a1, 0xff
|
||||
/* 2ECE0 800538E0 0000282D */ daddu $a1, $zero, $zero
|
||||
/* 2ECE4 800538E4 0C015DBB */ jal func_800576EC
|
||||
/* 2ECE8 800538E8 240600B8 */ addiu $a2, $zero, 0xb8
|
||||
/* 2ECEC 800538EC 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 2ECF0 800538F0 03E00008 */ jr $ra
|
||||
/* 2ECF4 800538F4 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,16 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80053A98
|
||||
/* 2EE98 80053A98 30A5FFFF */ andi $a1, $a1, 0xffff
|
||||
/* 2EE9C 80053A9C 00A60018 */ mult $a1, $a2
|
||||
/* 2EEA0 80053AA0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 2EEA4 80053AA4 308400FF */ andi $a0, $a0, 0xff
|
||||
/* 2EEA8 80053AA8 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 2EEAC 80053AAC 00001012 */ mflo $v0
|
||||
/* 2EEB0 80053AB0 00022BC2 */ srl $a1, $v0, 0xf
|
||||
/* 2EEB4 80053AB4 0C015B5E */ jal func_80056D78
|
||||
/* 2EEB8 80053AB8 30A5FFFF */ andi $a1, $a1, 0xffff
|
||||
/* 2EEBC 80053ABC 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 2EEC0 80053AC0 03E00008 */ jr $ra
|
||||
/* 2EEC4 80053AC4 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,48 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80053B04
|
||||
/* 2EF04 80053B04 3C020001 */ lui $v0, 1
|
||||
/* 2EF08 80053B08 344285A6 */ ori $v0, $v0, 0x85a6
|
||||
/* 2EF0C 80053B0C 24A3FF06 */ addiu $v1, $a1, -0xfa
|
||||
/* 2EF10 80053B10 0043102B */ sltu $v0, $v0, $v1
|
||||
/* 2EF14 80053B14 14400021 */ bnez $v0, .L80053B9C
|
||||
/* 2EF18 80053B18 0080382D */ daddu $a3, $a0, $zero
|
||||
/* 2EF1C 80053B1C 3C03B65C */ lui $v1, 0xb65c
|
||||
/* 2EF20 80053B20 34636D59 */ ori $v1, $v1, 0x6d59
|
||||
/* 2EF24 80053B24 00051140 */ sll $v0, $a1, 5
|
||||
/* 2EF28 80053B28 00451023 */ subu $v0, $v0, $a1
|
||||
/* 2EF2C 80053B2C 00021080 */ sll $v0, $v0, 2
|
||||
/* 2EF30 80053B30 00451021 */ addu $v0, $v0, $a1
|
||||
/* 2EF34 80053B34 000210C0 */ sll $v0, $v0, 3
|
||||
/* 2EF38 80053B38 00430018 */ mult $v0, $v1
|
||||
/* 2EF3C 80053B3C 00001810 */ mfhi $v1
|
||||
/* 2EF40 80053B40 00622021 */ addu $a0, $v1, $v0
|
||||
/* 2EF44 80053B44 00042303 */ sra $a0, $a0, 0xc
|
||||
/* 2EF48 80053B48 000217C3 */ sra $v0, $v0, 0x1f
|
||||
/* 2EF4C 80053B4C 00822023 */ subu $a0, $a0, $v0
|
||||
/* 2EF50 80053B50 8CE20010 */ lw $v0, 0x10($a3)
|
||||
/* 2EF54 80053B54 00061C00 */ sll $v1, $a2, 0x10
|
||||
/* 2EF58 80053B58 00621823 */ subu $v1, $v1, $v0
|
||||
/* 2EF5C 80053B5C 00041400 */ sll $v0, $a0, 0x10
|
||||
/* 2EF60 80053B60 00021403 */ sra $v0, $v0, 0x10
|
||||
/* 2EF64 80053B64 14400002 */ bnez $v0, .L80053B70
|
||||
/* 2EF68 80053B68 0062001A */ div $zero, $v1, $v0
|
||||
/* 2EF6C 80053B6C 0007000D */ break 7
|
||||
.L80053B70:
|
||||
/* 2EF70 80053B70 2401FFFF */ addiu $at, $zero, -1
|
||||
/* 2EF74 80053B74 14410004 */ bne $v0, $at, .L80053B88
|
||||
/* 2EF78 80053B78 3C018000 */ lui $at, 0x8000
|
||||
/* 2EF7C 80053B7C 14610002 */ bne $v1, $at, .L80053B88
|
||||
/* 2EF80 80053B80 00000000 */ nop
|
||||
/* 2EF84 80053B84 0006000D */ break 6
|
||||
.L80053B88:
|
||||
/* 2EF88 80053B88 00001812 */ mflo $v1
|
||||
/* 2EF8C 80053B8C A4E60018 */ sh $a2, 0x18($a3)
|
||||
/* 2EF90 80053B90 A4E4001A */ sh $a0, 0x1a($a3)
|
||||
/* 2EF94 80053B94 03E00008 */ jr $ra
|
||||
/* 2EF98 80053B98 ACE30014 */ sw $v1, 0x14($a3)
|
||||
.L80053B9C:
|
||||
/* 2EF9C 80053B9C A4E0001A */ sh $zero, 0x1a($a3)
|
||||
/* 2EFA0 80053BA0 03E00008 */ jr $ra
|
||||
/* 2EFA4 80053BA4 ACE00014 */ sw $zero, 0x14($a3)
|
@ -1,21 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80053BA8
|
||||
/* 2EFA8 80053BA8 9482001A */ lhu $v0, 0x1a($a0)
|
||||
/* 2EFAC 80053BAC 2442FFFF */ addiu $v0, $v0, -1
|
||||
/* 2EFB0 80053BB0 A482001A */ sh $v0, 0x1a($a0)
|
||||
/* 2EFB4 80053BB4 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 2EFB8 80053BB8 10400006 */ beqz $v0, .L80053BD4
|
||||
/* 2EFBC 80053BBC 00000000 */ nop
|
||||
/* 2EFC0 80053BC0 8C820010 */ lw $v0, 0x10($a0)
|
||||
/* 2EFC4 80053BC4 8C830014 */ lw $v1, 0x14($a0)
|
||||
/* 2EFC8 80053BC8 00431021 */ addu $v0, $v0, $v1
|
||||
/* 2EFCC 80053BCC 03E00008 */ jr $ra
|
||||
/* 2EFD0 80053BD0 AC820010 */ sw $v0, 0x10($a0)
|
||||
.L80053BD4:
|
||||
/* 2EFD4 80053BD4 84820018 */ lh $v0, 0x18($a0)
|
||||
/* 2EFD8 80053BD8 AC800014 */ sw $zero, 0x14($a0)
|
||||
/* 2EFDC 80053BDC 00021400 */ sll $v0, $v0, 0x10
|
||||
/* 2EFE0 80053BE0 03E00008 */ jr $ra
|
||||
/* 2EFE4 80053BE4 AC820010 */ sw $v0, 0x10($a0)
|
@ -1,18 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80054C4C
|
||||
/* 3004C 80054C4C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 30050 80054C50 00051080 */ sll $v0, $a1, 2
|
||||
/* 30054 80054C54 3C03800A */ lui $v1, %hi(D_8009A5C0)
|
||||
/* 30058 80054C58 8C63A5C0 */ lw $v1, %lo(D_8009A5C0)($v1)
|
||||
/* 3005C 80054C5C 00A0302D */ daddu $a2, $a1, $zero
|
||||
/* 30060 80054C60 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 30064 80054C64 00621821 */ addu $v1, $v1, $v0
|
||||
/* 30068 80054C68 8C651310 */ lw $a1, 0x1310($v1)
|
||||
/* 3006C 80054C6C 0C0151F2 */ jal al_LoadBank
|
||||
/* 30070 80054C70 24070001 */ addiu $a3, $zero, 1
|
||||
/* 30074 80054C74 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 30078 80054C78 0000102D */ daddu $v0, $zero, $zero
|
||||
/* 3007C 80054C7C 03E00008 */ jr $ra
|
||||
/* 30080 80054C80 27BD0018 */ addiu $sp, $sp, 0x18
|
26
src/audio.h
26
src/audio.h
@ -5,15 +5,6 @@
|
||||
|
||||
#undef alHeapAlloc
|
||||
|
||||
// Probably some libultra audio thing
|
||||
typedef struct UnkStructFor80053A18 {
|
||||
/* 0x00 */ UNK_TYPE unk_00;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ char unk_08[2];
|
||||
/* 0x0A */ u16 unk_0A;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
} UnkStructFor80053A18; // size unknown
|
||||
|
||||
typedef struct UnkAl1 {
|
||||
/* 0x00 */ s16 unk_00;
|
||||
/* 0x02 */ char unk_02[2];
|
||||
@ -68,7 +59,7 @@ typedef struct UnkAlA9C {
|
||||
/* 0x018 */ s32 unk_18;
|
||||
/* 0x01C */ s32 unk_1C;
|
||||
/* 0x020 */ char unk_20[0xC];
|
||||
/* 0x02C */ s32 unk_2C;
|
||||
/* 0x02C */ s32* unk_2C;
|
||||
/* 0x030 */ char unk_30[0x6];
|
||||
/* 0x036 */ s16 unk_36;
|
||||
/* 0x038 */ char unk_38[0xE];
|
||||
@ -92,7 +83,7 @@ typedef struct UnkAl48 {
|
||||
/* 0x42 */ s8 unk_42;
|
||||
/* 0x43 */ s8 unk_43;
|
||||
/* 0x44 */ s8 unk_44;
|
||||
/* 0x45 */ s8 unk_45;
|
||||
/* 0x45 */ u8 unk_45;
|
||||
/* 0x46 */ char unk_46[2];
|
||||
} UnkAl48; // size = 0x48
|
||||
|
||||
@ -225,6 +216,15 @@ typedef struct UnkAl834 {
|
||||
/* 0x10 */ char unk_10[0x824];
|
||||
} UnkAl834;
|
||||
|
||||
// Probably some libultra audio thing
|
||||
typedef struct UnkStructFor80053A18 {
|
||||
/* 0x00 */ UNK_TYPE unk_00;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ char unk_08[2];
|
||||
/* 0x0A */ u16 unk_0A;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
} UnkStructFor80053A18; // size unknown
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ char unk_000[8];
|
||||
/* 0x008 */ s32 unk_008;
|
||||
@ -261,8 +261,10 @@ void func_80053654(UnkAl19E0*);
|
||||
void func_80053A18(UnkStructFor80053A18* arg0);
|
||||
void func_80053A28(s32);
|
||||
void func_80053A98(s16 arg0, s32 arg1, s32 arg2);
|
||||
void func_80053BA8(s32);
|
||||
void func_80053BA8(UnkAl1*);
|
||||
void func_8005610C(void);
|
||||
void func_80056D78(u8, u16);
|
||||
void func_800576EC(u8, s32, s32);
|
||||
|
||||
void al_LoadINIT(UnkAl19E0*, s32, ALHeap*);
|
||||
s32 al_CopyFileTableEntry(u16 arg0, s32 arg1, s32* arg2);
|
||||
|
@ -277,9 +277,21 @@ void func_800535C0(void) {
|
||||
|
||||
INCLUDE_ASM(void, "code_2e230_len_2190", func_80053654, UnkAl19E0* arg0);
|
||||
|
||||
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053888);
|
||||
void func_80053888(UnkAl48* arg0, s32 arg1) { // type may be wrong but it seems good
|
||||
if (arg0->unk_45 != 0) {
|
||||
arg0->unk_1C = 0;
|
||||
arg0->unk_42 = 1;
|
||||
arg0->unk_43 = 0;
|
||||
func_800576EC(arg1, 0, 0xB8);
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_2e230_len_2190", func_800538C4);
|
||||
void func_800538C4(UnkAl48* arg0, s32 arg1) { // type may be wrong but it seems good
|
||||
arg0->unk_1C = 0;
|
||||
arg0->unk_42 = 1;
|
||||
arg0->unk_43 = 0;
|
||||
func_800576EC(arg1, 0, 0xB8);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_2e230_len_2190", func_800538F8);
|
||||
|
||||
@ -293,7 +305,9 @@ void func_80053A18(UnkStructFor80053A18* arg0) {
|
||||
|
||||
INCLUDE_ASM(void, "code_2e230_len_2190", func_80053A28, s32 arg0);
|
||||
|
||||
INCLUDE_ASM(void, "code_2e230_len_2190", func_80053A98, s16 arg0, s32 arg1, s32 arg2);
|
||||
void func_80053A98(s16 arg0, s32 arg1, s32 arg2) {
|
||||
func_80056D78(arg0, (u32) ((u16)arg1 * arg2) >> 15);
|
||||
}
|
||||
|
||||
void func_80053AC8(UnkAl1* arg0) {
|
||||
if (arg0->unk_0A == 0) {
|
||||
@ -310,9 +324,33 @@ void func_80053AEC(UnkAl1* arg0, s16 arg1) {
|
||||
arg0->unk_14 = 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053B04);
|
||||
void func_80053B04(UnkAl1 *arg0, u32 arg1, s16 arg2) {
|
||||
s16 temp_a0;
|
||||
s32 temp_v1;
|
||||
|
||||
INCLUDE_ASM(void, "code_2e230_len_2190", func_80053BA8, s32 arg0);
|
||||
if (arg1 - 250 <= 99750) {
|
||||
temp_a0 = (s32)(arg1 * 1000) / 5750;
|
||||
temp_v1 = (arg2 << 16) - arg0->unk_10;
|
||||
|
||||
arg0->unk_18 = arg2;
|
||||
arg0->unk_1A = temp_a0;
|
||||
arg0->unk_14 = temp_v1 / temp_a0;
|
||||
} else {
|
||||
arg0->unk_1A = 0;
|
||||
arg0->unk_14 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80053BA8(UnkAl1 *arg0) {
|
||||
arg0->unk_1A--;
|
||||
|
||||
if (arg0->unk_1A != 0) {
|
||||
arg0->unk_10 += arg0->unk_14;
|
||||
} else {
|
||||
arg0->unk_14 = 0;
|
||||
arg0->unk_10 = arg0->unk_18 << 16;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053BE8);
|
||||
|
||||
@ -364,7 +402,10 @@ INCLUDE_ASM(s32, "code_2e230_len_2190", func_800549F8);
|
||||
|
||||
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054AA0);
|
||||
|
||||
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054C4C);
|
||||
s32 func_80054C4C(s32 arg0, s32 arg1) {
|
||||
al_LoadBank(arg0, D_8009A5C0->unk_1310[arg1], arg1, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054C84);
|
||||
|
||||
|
@ -166,7 +166,7 @@ INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80056D50);
|
||||
|
||||
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80056D5C);
|
||||
|
||||
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80056D78);
|
||||
INCLUDE_ASM(void, "code_303c0_len_3e10", func_80056D78, u8 arg0, u16 arg1);
|
||||
|
||||
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80056DA4);
|
||||
|
||||
@ -190,7 +190,7 @@ INCLUDE_ASM(s32, "code_303c0_len_3e10", func_8005736C);
|
||||
|
||||
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80057548);
|
||||
|
||||
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_800576EC);
|
||||
INCLUDE_ASM(void, "code_303c0_len_3e10", func_800576EC, u8 arg0, s32 arg1, s32 arg2);
|
||||
|
||||
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80057874);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user