diff --git a/asm/non_matchings/unknown_001050/func_80000450.s b/asm/non_matchings/unknown_001050/func_80000450.s index b68be390..ac1fb332 100644 --- a/asm/non_matchings/unknown_001050/func_80000450.s +++ b/asm/non_matchings/unknown_001050/func_80000450.s @@ -3,7 +3,7 @@ glabel func_80000450 /* 001054 80000454 AFA40098 */ sw $a0, 0x98($sp) /* 001058 80000458 AFBF002C */ sw $ra, 0x2c($sp) /* 00105C 8000045C AFB10024 */ sw $s1, 0x24($sp) -/* 001060 80000460 3C048011 */ lui $a0, %hi(D_80115CE8) # $a0, 0x8011 +/* 001060 80000460 3C048011 */ lui $a0, %hi(gALHeap) # $a0, 0x8011 /* 001064 80000464 3C05800F */ lui $a1, %hi(D_800EBF60) # $a1, 0x800f /* 001068 80000468 3C060002 */ lui $a2, (0x00029D88 >> 16) # lui $a2, 2 /* 00106C 8000046C AFB20028 */ sw $s2, 0x28($sp) @@ -11,8 +11,8 @@ glabel func_80000450 /* 001074 80000474 00008825 */ move $s1, $zero /* 001078 80000478 34C69D88 */ ori $a2, (0x00029D88 & 0xFFFF) # ori $a2, $a2, 0x9d88 /* 00107C 8000047C 24A5BF60 */ addiu $a1, %lo(D_800EBF60) # addiu $a1, $a1, -0x40a0 -/* 001080 80000480 0C031D58 */ jal func_800C7560 -/* 001084 80000484 24845CE8 */ addiu $a0, %lo(D_80115CE8) # addiu $a0, $a0, 0x5ce8 +/* 001080 80000480 0C031D58 */ jal alHeapInit +/* 001084 80000484 24845CE8 */ addiu $a0, %lo(gALHeap) # addiu $a0, $a0, 0x5ce8 /* 001088 80000488 0C01DB16 */ jal func_80076C58 /* 00108C 8000048C 24040026 */ li $a0, 38 /* 001090 80000490 8C4E0008 */ lw $t6, 8($v0) @@ -105,10 +105,10 @@ glabel func_80000450 /* 0011EC 800005EC 8E040000 */ lw $a0, ($s0) /* 0011F0 800005F0 0C031DA9 */ jal alBnkfNew /* 0011F4 800005F4 00402825 */ move $a1, $v0 -/* 0011F8 800005F8 3C068011 */ lui $a2, %hi(D_80115CE8) # $a2, 0x8011 +/* 0011F8 800005F8 3C068011 */ lui $a2, %hi(gALHeap) # $a2, 0x8011 /* 0011FC 800005FC 24090004 */ li $t1, 4 /* 001200 80000600 AFA90010 */ sw $t1, 0x10($sp) -/* 001204 80000604 24C65CE8 */ addiu $a2, %lo(D_80115CE8) # addiu $a2, $a2, 0x5ce8 +/* 001204 80000604 24C65CE8 */ addiu $a2, %lo(gALHeap) # addiu $a2, $a2, 0x5ce8 /* 001208 80000608 00002025 */ move $a0, $zero /* 00120C 8000060C 00002825 */ move $a1, $zero /* 001210 80000610 0C031DFC */ jal alHeapDBAlloc @@ -192,12 +192,12 @@ glabel func_80000450 /* 00133C 8000073C 1420FFE4 */ bnez $at, .L800006D0 /* 001340 80000740 24E70008 */ addiu $a3, $a3, 8 .L80000744: -/* 001344 80000744 3C098011 */ lui $t1, %hi(D_80115CE8) # $t1, 0x8011 +/* 001344 80000744 3C098011 */ lui $t1, %hi(gALHeap) # $t1, 0x8011 /* 001348 80000748 240E0028 */ li $t6, 40 /* 00134C 8000074C 240F0060 */ li $t7, 96 /* 001350 80000750 24180006 */ li $t8, 6 /* 001354 80000754 24190002 */ li $t9, 2 -/* 001358 80000758 25295CE8 */ addiu $t1, %lo(D_80115CE8) # addiu $t1, $t1, 0x5ce8 +/* 001358 80000758 25295CE8 */ addiu $t1, %lo(gALHeap) # addiu $t1, $t1, 0x5ce8 /* 00135C 8000075C 8FA60098 */ lw $a2, 0x98($sp) /* 001360 80000760 AFAD0070 */ sw $t5, 0x70($sp) /* 001364 80000764 AFAE0074 */ sw $t6, 0x74($sp) @@ -213,8 +213,8 @@ glabel func_80000450 /* 00138C 8000078C 24040018 */ li $a0, 24 /* 001390 80000790 0C000889 */ jal func_80002224 /* 001394 80000794 24050078 */ li $a1, 120 -/* 001398 80000798 3C03800E */ lui $v1, %hi(D_800DC630) # $v1, 0x800e -/* 00139C 8000079C 2463C630 */ addiu $v1, %lo(D_800DC630) # addiu $v1, $v1, -0x39d0 +/* 001398 80000798 3C03800E */ lui $v1, %hi(gMusicPlayer) # $v1, 0x800e +/* 00139C 8000079C 2463C630 */ addiu $v1, %lo(gMusicPlayer) # addiu $v1, $v1, -0x39d0 /* 0013A0 800007A0 AC620000 */ sw $v0, ($v1) /* 0013A4 800007A4 00402025 */ move $a0, $v0 /* 0013A8 800007A8 0C002C04 */ jal func_8000B010 @@ -222,9 +222,9 @@ glabel func_80000450 /* 0013B0 800007B0 24040010 */ li $a0, 16 /* 0013B4 800007B4 0C000889 */ jal func_80002224 /* 0013B8 800007B8 24050032 */ li $a1, 50 -/* 0013BC 800007BC 3C01800E */ lui $at, %hi(D_800DC634) # $at, 0x800e +/* 0013BC 800007BC 3C01800E */ lui $at, %hi(gSndFxPlayer) # $at, 0x800e /* 0013C0 800007C0 3C0500FF */ lui $a1, (0x00FFFFFF >> 16) # lui $a1, 0xff -/* 0013C4 800007C4 AC22C634 */ sw $v0, %lo(D_800DC634)($at) +/* 0013C4 800007C4 AC22C634 */ sw $v0, %lo(gSndFxPlayer)($at) /* 0013C8 800007C8 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff /* 0013CC 800007CC 0C01C327 */ jal func_80070C9C /* 0013D0 800007D0 02202025 */ move $a0, $s1 @@ -234,13 +234,13 @@ glabel func_80000450 /* 0013E0 800007E0 34A5FFFF */ ori $a1, (0x00FFFFFF & 0xFFFF) # ori $a1, $a1, 0xffff /* 0013E4 800007E4 0C01C327 */ jal func_80070C9C /* 0013E8 800007E8 02202025 */ move $a0, $s1 -/* 0013EC 800007EC 3C0E8011 */ lui $t6, %hi(D_80115CE8) # $t6, 0x8011 +/* 0013EC 800007EC 3C0E8011 */ lui $t6, %hi(gALHeap) # $t6, 0x8011 /* 0013F0 800007F0 3C018011 */ lui $at, %hi(D_80115D00) # $at, 0x8011 /* 0013F4 800007F4 240A0096 */ li $t2, 150 /* 0013F8 800007F8 240B0020 */ li $t3, 32 /* 0013FC 800007FC 240C0010 */ li $t4, 16 /* 001400 80000800 240D0001 */ li $t5, 1 -/* 001404 80000804 25CE5CE8 */ addiu $t6, %lo(D_80115CE8) # addiu $t6, $t6, 0x5ce8 +/* 001404 80000804 25CE5CE8 */ addiu $t6, %lo(gALHeap) # addiu $t6, $t6, 0x5ce8 /* 001408 80000808 AC225D00 */ sw $v0, %lo(D_80115D00)($at) /* 00140C 8000080C AFAA0050 */ sw $t2, 0x50($sp) /* 001410 80000810 AFAB004C */ sw $t3, 0x4c($sp) diff --git a/asm/non_matchings/unknown_001050/func_80000890.s b/asm/non_matchings/unknown_001050/func_80000890.s index 76d55235..30bb6194 100644 --- a/asm/non_matchings/unknown_001050/func_80000890.s +++ b/asm/non_matchings/unknown_001050/func_80000890.s @@ -15,7 +15,7 @@ glabel func_80000890 /* 0014C4 800008C4 24190100 */ li $t9, 256 /* 0014C8 800008C8 3C01800E */ lui $at, %hi(D_800DC66C) # $at, 0x800e /* 0014CC 800008CC 9084C638 */ lbu $a0, %lo(D_800DC638)($a0) -/* 0014D0 800008D0 0C000664 */ jal func_80001990 +/* 0014D0 800008D0 0C000664 */ jal musicSetRelativeVolume /* 0014D4 800008D4 AC39C66C */ sw $t9, %lo(D_800DC66C)($at) /* 0014D8 800008D8 3C05800E */ lui $a1, %hi(D_800DC66C) # $a1, 0x800e /* 0014DC 800008DC 8CA5C66C */ lw $a1, %lo(D_800DC66C)($a1) diff --git a/asm/non_matchings/unknown_001050/func_80000D00.s b/asm/non_matchings/unknown_001050/func_80000D00.s index 21e4a28d..5eecacc0 100644 --- a/asm/non_matchings/unknown_001050/func_80000D00.s +++ b/asm/non_matchings/unknown_001050/func_80000D00.s @@ -43,7 +43,7 @@ glabel func_80000D00 .L80000DA4: /* 0019A4 80000DA4 3C04800E */ lui $a0, %hi(D_800DC638) # $a0, 0x800e /* 0019A8 80000DA8 9084C638 */ lbu $a0, %lo(D_800DC638)($a0) -/* 0019AC 80000DAC 0C000664 */ jal func_80001990 +/* 0019AC 80000DAC 0C000664 */ jal musicSetRelativeVolume /* 0019B0 80000DB0 00000000 */ nop /* 0019B4 80000DB4 10000023 */ b .L80000E44 /* 0019B8 80000DB8 00000000 */ nop @@ -81,7 +81,7 @@ glabel func_80000D00 .L80000E34: /* 001A34 80000E34 3C04800E */ lui $a0, %hi(D_800DC638) # $a0, 0x800e /* 001A38 80000E38 9084C638 */ lbu $a0, %lo(D_800DC638)($a0) -/* 001A3C 80000E3C 0C000664 */ jal func_80001990 +/* 001A3C 80000E3C 0C000664 */ jal musicSetRelativeVolume /* 001A40 80000E40 00000000 */ nop .L80000E44: /* 001A44 80000E44 3C13800E */ lui $s3, %hi(D_800DC658) # $s3, 0x800e @@ -136,8 +136,8 @@ glabel func_80000D00 /* 001AF4 80000EF4 1420FFDE */ bnez $at, .L80000E70 /* 001AF8 80000EF8 00000000 */ nop .L80000EFC: -/* 001AFC 80000EFC 3C10800E */ lui $s0, %hi(D_800DC630) # $s0, 0x800e -/* 001B00 80000F00 2610C630 */ addiu $s0, %lo(D_800DC630) # addiu $s0, $s0, -0x39d0 +/* 001AFC 80000EFC 3C10800E */ lui $s0, %hi(gMusicPlayer) # $s0, 0x800e +/* 001B00 80000F00 2610C630 */ addiu $s0, %lo(gMusicPlayer) # addiu $s0, $s0, -0x39d0 /* 001B04 80000F04 3C058011 */ lui $a1, %hi(D_80115CFC) # $a1, 0x8011 /* 001B08 80000F08 8CA55CFC */ lw $a1, %lo(D_80115CFC)($a1) /* 001B0C 80000F0C 8E040000 */ lw $a0, ($s0) @@ -146,10 +146,10 @@ glabel func_80000D00 /* 001B18 80000F18 24E75D88 */ addiu $a3, %lo(D_80115D88) # addiu $a3, $a3, 0x5d88 /* 001B1C 80000F1C 0C0008CB */ jal func_8000232C /* 001B20 80000F20 24C6C65C */ addiu $a2, %lo(D_800DC65C) # addiu $a2, $a2, -0x39a4 -/* 001B24 80000F24 3C04800E */ lui $a0, %hi(D_800DC634) # $a0, 0x800e +/* 001B24 80000F24 3C04800E */ lui $a0, %hi(gSndFxPlayer) # $a0, 0x800e /* 001B28 80000F28 3C058011 */ lui $a1, %hi(D_80115D00) # $a1, 0x8011 /* 001B2C 80000F2C 8CA55D00 */ lw $a1, %lo(D_80115D00)($a1) -/* 001B30 80000F30 8C84C634 */ lw $a0, %lo(D_800DC634)($a0) +/* 001B30 80000F30 8C84C634 */ lw $a0, %lo(gSndFxPlayer)($a0) /* 001B34 80000F34 3C06800E */ lui $a2, %hi(D_800DC660) # $a2, 0x800e /* 001B38 80000F38 3C078011 */ lui $a3, %hi(D_80115E80) # $a3, 0x8011 /* 001B3C 80000F3C 24E75E80 */ addiu $a3, %lo(D_80115E80) # addiu $a3, $a3, 0x5e80 @@ -167,7 +167,7 @@ glabel func_80000D00 /* 001B6C 80000F6C 00000000 */ nop /* 001B70 80000F70 11200013 */ beqz $t1, .L80000FC0 /* 001B74 80000F74 8FBF002C */ lw $ra, 0x2c($sp) -/* 001B78 80000F78 0C031E24 */ jal func_800C7890 +/* 001B78 80000F78 0C031E24 */ jal alCSPGetTempo /* 001B7C 80000F7C 00000000 */ nop /* 001B80 80000F80 3C0A0393 */ lui $t2, (0x03938700 >> 16) # lui $t2, 0x393 /* 001B84 80000F84 354A8700 */ ori $t2, (0x03938700 & 0xFFFF) # ori $t2, $t2, 0x8700 diff --git a/asm/non_matchings/unknown_001050/func_80001074.s b/asm/non_matchings/unknown_001050/func_80001074.s deleted file mode 100644 index 076d6bd8..00000000 --- a/asm/non_matchings/unknown_001050/func_80001074.s +++ /dev/null @@ -1,47 +0,0 @@ -glabel func_80001074 -/* 001C74 80001074 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 001C78 80001078 3C0F800E */ lui $t7, %hi(D_800DC65C) # $t7, 0x800e -/* 001C7C 8000107C 91EFC65C */ lbu $t7, %lo(D_800DC65C)($t7) -/* 001C80 80001080 AFA40028 */ sw $a0, 0x28($sp) -/* 001C84 80001084 308EFFFF */ andi $t6, $a0, 0xffff -/* 001C88 80001088 01C02025 */ move $a0, $t6 -/* 001C8C 8000108C AFBF0024 */ sw $ra, 0x24($sp) -/* 001C90 80001090 AFB20020 */ sw $s2, 0x20($sp) -/* 001C94 80001094 AFB1001C */ sw $s1, 0x1c($sp) -/* 001C98 80001098 11E00004 */ beqz $t7, .L800010AC -/* 001C9C 8000109C AFB00018 */ sw $s0, 0x18($sp) -/* 001CA0 800010A0 3C018011 */ lui $at, %hi(D_80115F7C) # $at, 0x8011 -/* 001CA4 800010A4 10000015 */ b .L800010FC -/* 001CA8 800010A8 AC2E5F7C */ sw $t6, %lo(D_80115F7C)($at) -.L800010AC: -/* 001CAC 800010AC 3C18800E */ lui $t8, %hi(D_800DC630) # $t8, 0x800e -/* 001CB0 800010B0 8F18C630 */ lw $t8, %lo(D_800DC630)($t8) -/* 001CB4 800010B4 00008025 */ move $s0, $zero -/* 001CB8 800010B8 00808825 */ move $s1, $a0 -/* 001CBC 800010BC 24120010 */ li $s2, 16 -/* 001CC0 800010C0 A7040030 */ sh $a0, 0x30($t8) -/* 001CC4 800010C4 24190001 */ li $t9, 1 -.L800010C8: -/* 001CC8 800010C8 02194004 */ sllv $t0, $t9, $s0 -/* 001CCC 800010CC 02284824 */ and $t1, $s1, $t0 -/* 001CD0 800010D0 11200005 */ beqz $t1, .L800010E8 -/* 001CD4 800010D4 00000000 */ nop -/* 001CD8 800010D8 0C00045C */ jal func_80001170 -/* 001CDC 800010DC 320400FF */ andi $a0, $s0, 0xff -/* 001CE0 800010E0 10000004 */ b .L800010F4 -/* 001CE4 800010E4 26100001 */ addiu $s0, $s0, 1 -.L800010E8: -/* 001CE8 800010E8 0C000445 */ jal func_80001114 -/* 001CEC 800010EC 320400FF */ andi $a0, $s0, 0xff -/* 001CF0 800010F0 26100001 */ addiu $s0, $s0, 1 -.L800010F4: -/* 001CF4 800010F4 1612FFF4 */ bne $s0, $s2, .L800010C8 -/* 001CF8 800010F8 24190001 */ li $t9, 1 -.L800010FC: -/* 001CFC 800010FC 8FBF0024 */ lw $ra, 0x24($sp) -/* 001D00 80001100 8FB00018 */ lw $s0, 0x18($sp) -/* 001D04 80001104 8FB1001C */ lw $s1, 0x1c($sp) -/* 001D08 80001108 8FB20020 */ lw $s2, 0x20($sp) -/* 001D0C 8000110C 03E00008 */ jr $ra -/* 001D10 80001110 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/unknown_001050/func_800012E8.s b/asm/non_matchings/unknown_001050/func_800012E8.s deleted file mode 100644 index 09c3eb65..00000000 --- a/asm/non_matchings/unknown_001050/func_800012E8.s +++ /dev/null @@ -1,131 +0,0 @@ -glabel func_800012E8 -/* 001EE8 800012E8 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 001EEC 800012EC 3C0E800E */ lui $t6, %hi(D_800DC648) # $t6, 0x800e -/* 001EF0 800012F0 8DCEC648 */ lw $t6, %lo(D_800DC648)($t6) -/* 001EF4 800012F4 AFBF0024 */ sw $ra, 0x24($sp) -/* 001EF8 800012F8 AFB20020 */ sw $s2, 0x20($sp) -/* 001EFC 800012FC AFB1001C */ sw $s1, 0x1c($sp) -/* 001F00 80001300 15C0000F */ bnez $t6, .L80001340 -/* 001F04 80001304 AFB00018 */ sw $s0, 0x18($sp) -/* 001F08 80001308 00008025 */ move $s0, $zero -/* 001F0C 8000130C 24120010 */ li $s2, 16 -/* 001F10 80001310 321100FF */ andi $s1, $s0, 0xff -.L80001314: -/* 001F14 80001314 0C00045C */ jal func_80001170 -/* 001F18 80001318 322400FF */ andi $a0, $s1, 0xff -/* 001F1C 8000131C 322400FF */ andi $a0, $s1, 0xff -/* 001F20 80001320 0C00049A */ jal func_80001268 -/* 001F24 80001324 2405007F */ li $a1, 127 -/* 001F28 80001328 322400FF */ andi $a0, $s1, 0xff -/* 001F2C 8000132C 0C00047A */ jal func_800011E8 -/* 001F30 80001330 2405007F */ li $a1, 127 -/* 001F34 80001334 26100001 */ addiu $s0, $s0, 1 -/* 001F38 80001338 1612FFF6 */ bne $s0, $s2, .L80001314 -/* 001F3C 8000133C 321100FF */ andi $s1, $s0, 0xff -.L80001340: -/* 001F40 80001340 8FBF0024 */ lw $ra, 0x24($sp) -/* 001F44 80001344 8FB00018 */ lw $s0, 0x18($sp) -/* 001F48 80001348 8FB1001C */ lw $s1, 0x1c($sp) -/* 001F4C 8000134C 8FB20020 */ lw $s2, 0x20($sp) -/* 001F50 80001350 03E00008 */ jr $ra -/* 001F54 80001354 27BD0028 */ addiu $sp, $sp, 0x28 - -/* 001F58 80001358 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 001F5C 8000135C 308700FF */ andi $a3, $a0, 0xff -/* 001F60 80001360 24010064 */ li $at, 100 -/* 001F64 80001364 AFBF0014 */ sw $ra, 0x14($sp) -/* 001F68 80001368 AFA40020 */ sw $a0, 0x20($sp) -/* 001F6C 8000136C AFA50024 */ sw $a1, 0x24($sp) -/* 001F70 80001370 10E10013 */ beq $a3, $at, .L800013C0 -/* 001F74 80001374 AFA60028 */ sw $a2, 0x28($sp) -/* 001F78 80001378 3C04800E */ lui $a0, %hi(D_800DC630) # $a0, 0x800e -/* 001F7C 8000137C 8C84C630 */ lw $a0, %lo(D_800DC630)($a0) -/* 001F80 80001380 30E500FF */ andi $a1, $a3, 0xff -/* 001F84 80001384 0C031E68 */ jal func_800C79A0 -/* 001F88 80001388 A3A70023 */ sb $a3, 0x23($sp) -/* 001F8C 8000138C 8FAE0028 */ lw $t6, 0x28($sp) -/* 001F90 80001390 93A70023 */ lbu $a3, 0x23($sp) -/* 001F94 80001394 004E1821 */ addu $v1, $v0, $t6 -/* 001F98 80001398 306F00FF */ andi $t7, $v1, 0xff -/* 001F9C 8000139C 29E10080 */ slti $at, $t7, 0x80 -/* 001FA0 800013A0 14200002 */ bnez $at, .L800013AC -/* 001FA4 800013A4 306600FF */ andi $a2, $v1, 0xff -/* 001FA8 800013A8 2406007F */ li $a2, 127 -.L800013AC: -/* 001FAC 800013AC 3C04800E */ lui $a0, %hi(D_800DC630) # $a0, 0x800e -/* 001FB0 800013B0 8C84C630 */ lw $a0, %lo(D_800DC630)($a0) -/* 001FB4 800013B4 30E500FF */ andi $a1, $a3, 0xff -/* 001FB8 800013B8 0C031E50 */ jal func_800C7940 -/* 001FBC 800013BC A3A6001F */ sb $a2, 0x1f($sp) -.L800013C0: -/* 001FC0 800013C0 93B80027 */ lbu $t8, 0x27($sp) -/* 001FC4 800013C4 24010064 */ li $at, 100 -/* 001FC8 800013C8 13010014 */ beq $t8, $at, .L8000141C -/* 001FCC 800013CC 3C04800E */ lui $a0, %hi(D_800DC630) # $a0, 0x800e -/* 001FD0 800013D0 8C84C630 */ lw $a0, %lo(D_800DC630)($a0) -/* 001FD4 800013D4 0C031E68 */ jal func_800C79A0 -/* 001FD8 800013D8 03002825 */ move $a1, $t8 -/* 001FDC 800013DC 8FB90028 */ lw $t9, 0x28($sp) -/* 001FE0 800013E0 93A50027 */ lbu $a1, 0x27($sp) -/* 001FE4 800013E4 0322082A */ slt $at, $t9, $v0 -/* 001FE8 800013E8 10200005 */ beqz $at, .L80001400 -/* 001FEC 800013EC 3C04800E */ lui $a0, %hi(D_800DC630) # $a0, 0x800e -/* 001FF0 800013F0 00593023 */ subu $a2, $v0, $t9 -/* 001FF4 800013F4 30C800FF */ andi $t0, $a2, 0xff -/* 001FF8 800013F8 10000002 */ b .L80001404 -/* 001FFC 800013FC 01003025 */ move $a2, $t0 -.L80001400: -/* 002000 80001400 00003025 */ move $a2, $zero -.L80001404: -/* 002004 80001404 8C84C630 */ lw $a0, %lo(D_800DC630)($a0) -/* 002008 80001408 0C031E50 */ jal func_800C7940 -/* 00200C 8000140C A3A6001E */ sb $a2, 0x1e($sp) -/* 002010 80001410 93A2001E */ lbu $v0, 0x1e($sp) -/* 002014 80001414 10000007 */ b .L80001434 -/* 002018 80001418 8FBF0014 */ lw $ra, 0x14($sp) -.L8000141C: -/* 00201C 8000141C 93A9001F */ lbu $t1, 0x1f($sp) -/* 002020 80001420 240A007F */ li $t2, 127 -/* 002024 80001424 01491023 */ subu $v0, $t2, $t1 -/* 002028 80001428 304B00FF */ andi $t3, $v0, 0xff -/* 00202C 8000142C 01601025 */ move $v0, $t3 -/* 002030 80001430 8FBF0014 */ lw $ra, 0x14($sp) -.L80001434: -/* 002034 80001434 27BD0020 */ addiu $sp, $sp, 0x20 -/* 002038 80001438 03E00008 */ jr $ra -/* 00203C 8000143C 00000000 */ nop - -/* 002040 80001440 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 002044 80001444 AFB30020 */ sw $s3, 0x20($sp) -/* 002048 80001448 3C13800E */ lui $s3, %hi(D_800DC630) # $s3, 0x800e -/* 00204C 8000144C 2673C630 */ addiu $s3, %lo(D_800DC630) # addiu $s3, $s3, -0x39d0 -/* 002050 80001450 AFB10018 */ sw $s1, 0x18($sp) -/* 002054 80001454 8E710000 */ lw $s1, ($s3) -/* 002058 80001458 AFBF0024 */ sw $ra, 0x24($sp) -/* 00205C 8000145C AFB2001C */ sw $s2, 0x1c($sp) -/* 002060 80001460 AFB00014 */ sw $s0, 0x14($sp) -/* 002064 80001464 922E0034 */ lbu $t6, 0x34($s1) -/* 002068 80001468 00008025 */ move $s0, $zero -/* 00206C 8000146C 19C0000C */ blez $t6, .L800014A0 -/* 002070 80001470 00809025 */ move $s2, $a0 -/* 002074 80001474 02202025 */ move $a0, $s1 -.L80001478: -/* 002078 80001478 0C031E70 */ jal func_800C79C0 -/* 00207C 8000147C 320500FF */ andi $a1, $s0, 0xff -/* 002080 80001480 A2420000 */ sb $v0, ($s2) -/* 002084 80001484 8E710000 */ lw $s1, ($s3) -/* 002088 80001488 26100001 */ addiu $s0, $s0, 1 -/* 00208C 8000148C 922F0034 */ lbu $t7, 0x34($s1) -/* 002090 80001490 26520001 */ addiu $s2, $s2, 1 -/* 002094 80001494 020F082A */ slt $at, $s0, $t7 -/* 002098 80001498 1420FFF7 */ bnez $at, .L80001478 -/* 00209C 8000149C 02202025 */ move $a0, $s1 -.L800014A0: -/* 0020A0 800014A0 8FBF0024 */ lw $ra, 0x24($sp) -/* 0020A4 800014A4 8FB00014 */ lw $s0, 0x14($sp) -/* 0020A8 800014A8 8FB10018 */ lw $s1, 0x18($sp) -/* 0020AC 800014AC 8FB2001C */ lw $s2, 0x1c($sp) -/* 0020B0 800014B0 8FB30020 */ lw $s3, 0x20($sp) -/* 0020B4 800014B4 03E00008 */ jr $ra -/* 0020B8 800014B8 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/unknown_001050/func_80001358.s b/asm/non_matchings/unknown_001050/func_80001358.s new file mode 100644 index 00000000..abc91200 --- /dev/null +++ b/asm/non_matchings/unknown_001050/func_80001358.s @@ -0,0 +1,65 @@ +glabel func_80001358 +/* 001F58 80001358 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 001F5C 8000135C 308700FF */ andi $a3, $a0, 0xff +/* 001F60 80001360 24010064 */ li $at, 100 +/* 001F64 80001364 AFBF0014 */ sw $ra, 0x14($sp) +/* 001F68 80001368 AFA40020 */ sw $a0, 0x20($sp) +/* 001F6C 8000136C AFA50024 */ sw $a1, 0x24($sp) +/* 001F70 80001370 10E10013 */ beq $a3, $at, .L800013C0 +/* 001F74 80001374 AFA60028 */ sw $a2, 0x28($sp) +/* 001F78 80001378 3C04800E */ lui $a0, %hi(gMusicPlayer) # $a0, 0x800e +/* 001F7C 8000137C 8C84C630 */ lw $a0, %lo(gMusicPlayer)($a0) +/* 001F80 80001380 30E500FF */ andi $a1, $a3, 0xff +/* 001F84 80001384 0C031E68 */ jal alCSPGetChlVol +/* 001F88 80001388 A3A70023 */ sb $a3, 0x23($sp) +/* 001F8C 8000138C 8FAE0028 */ lw $t6, 0x28($sp) +/* 001F90 80001390 93A70023 */ lbu $a3, 0x23($sp) +/* 001F94 80001394 004E1821 */ addu $v1, $v0, $t6 +/* 001F98 80001398 306F00FF */ andi $t7, $v1, 0xff +/* 001F9C 8000139C 29E10080 */ slti $at, $t7, 0x80 +/* 001FA0 800013A0 14200002 */ bnez $at, .L800013AC +/* 001FA4 800013A4 306600FF */ andi $a2, $v1, 0xff +/* 001FA8 800013A8 2406007F */ li $a2, 127 +.L800013AC: +/* 001FAC 800013AC 3C04800E */ lui $a0, %hi(gMusicPlayer) # $a0, 0x800e +/* 001FB0 800013B0 8C84C630 */ lw $a0, %lo(gMusicPlayer)($a0) +/* 001FB4 800013B4 30E500FF */ andi $a1, $a3, 0xff +/* 001FB8 800013B8 0C031E50 */ jal alCSPSetChlVol +/* 001FBC 800013BC A3A6001F */ sb $a2, 0x1f($sp) +.L800013C0: +/* 001FC0 800013C0 93B80027 */ lbu $t8, 0x27($sp) +/* 001FC4 800013C4 24010064 */ li $at, 100 +/* 001FC8 800013C8 13010014 */ beq $t8, $at, .L8000141C +/* 001FCC 800013CC 3C04800E */ lui $a0, %hi(gMusicPlayer) # $a0, 0x800e +/* 001FD0 800013D0 8C84C630 */ lw $a0, %lo(gMusicPlayer)($a0) +/* 001FD4 800013D4 0C031E68 */ jal alCSPGetChlVol +/* 001FD8 800013D8 03002825 */ move $a1, $t8 +/* 001FDC 800013DC 8FB90028 */ lw $t9, 0x28($sp) +/* 001FE0 800013E0 93A50027 */ lbu $a1, 0x27($sp) +/* 001FE4 800013E4 0322082A */ slt $at, $t9, $v0 +/* 001FE8 800013E8 10200005 */ beqz $at, .L80001400 +/* 001FEC 800013EC 3C04800E */ lui $a0, %hi(gMusicPlayer) # $a0, 0x800e +/* 001FF0 800013F0 00593023 */ subu $a2, $v0, $t9 +/* 001FF4 800013F4 30C800FF */ andi $t0, $a2, 0xff +/* 001FF8 800013F8 10000002 */ b .L80001404 +/* 001FFC 800013FC 01003025 */ move $a2, $t0 +.L80001400: +/* 002000 80001400 00003025 */ move $a2, $zero +.L80001404: +/* 002004 80001404 8C84C630 */ lw $a0, %lo(gMusicPlayer)($a0) +/* 002008 80001408 0C031E50 */ jal alCSPSetChlVol +/* 00200C 8000140C A3A6001E */ sb $a2, 0x1e($sp) +/* 002010 80001410 93A2001E */ lbu $v0, 0x1e($sp) +/* 002014 80001414 10000007 */ b .L80001434 +/* 002018 80001418 8FBF0014 */ lw $ra, 0x14($sp) +.L8000141C: +/* 00201C 8000141C 93A9001F */ lbu $t1, 0x1f($sp) +/* 002020 80001420 240A007F */ li $t2, 127 +/* 002024 80001424 01491023 */ subu $v0, $t2, $t1 +/* 002028 80001428 304B00FF */ andi $t3, $v0, 0xff +/* 00202C 8000142C 01601025 */ move $v0, $t3 +/* 002030 80001430 8FBF0014 */ lw $ra, 0x14($sp) +.L80001434: +/* 002034 80001434 27BD0020 */ addiu $sp, $sp, 0x20 +/* 002038 80001438 03E00008 */ jr $ra +/* 00203C 8000143C 00000000 */ nop diff --git a/asm/non_matchings/unknown_001050/func_80001784.s b/asm/non_matchings/unknown_001050/func_80001784.s deleted file mode 100644 index 416b5b52..00000000 --- a/asm/non_matchings/unknown_001050/func_80001784.s +++ /dev/null @@ -1,23 +0,0 @@ -glabel func_80001784 -/* 002384 80001784 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 002388 80001788 AFBF0014 */ sw $ra, 0x14($sp) -/* 00238C 8000178C 0C000702 */ jal func_80001C08 -/* 002390 80001790 AFA40018 */ sw $a0, 0x18($sp) -/* 002394 80001794 1440000B */ bnez $v0, .L800017C4 -/* 002398 80001798 3C05800E */ lui $a1, %hi(D_800DC634) # $a1, 0x800e -/* 00239C 8000179C 93AE001B */ lbu $t6, 0x1b($sp) -/* 0023A0 800017A0 3C028011 */ lui $v0, %hi(D_80115D05) # $v0, 0x8011 -/* 0023A4 800017A4 24425D05 */ addiu $v0, %lo(D_80115D05) # addiu $v0, $v0, 0x5d05 -/* 0023A8 800017A8 A04E0000 */ sb $t6, ($v0) -/* 0023AC 800017AC 8CA5C634 */ lw $a1, %lo(D_800DC634)($a1) -/* 0023B0 800017B0 0C0008AF */ jal func_800022BC -/* 0023B4 800017B4 31C400FF */ andi $a0, $t6, 0xff -/* 0023B8 800017B8 240F0001 */ li $t7, 1 -/* 0023BC 800017BC 3C018011 */ lui $at, %hi(D_80115D41) # $at, 0x8011 -/* 0023C0 800017C0 A02F5D41 */ sb $t7, %lo(D_80115D41)($at) -.L800017C4: -/* 0023C4 800017C4 8FBF0014 */ lw $ra, 0x14($sp) -/* 0023C8 800017C8 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0023CC 800017CC 03E00008 */ jr $ra -/* 0023D0 800017D0 00000000 */ nop - diff --git a/asm/non_matchings/unknown_001050/func_80001844.s b/asm/non_matchings/unknown_001050/func_80001844.s deleted file mode 100644 index 49ef15b9..00000000 --- a/asm/non_matchings/unknown_001050/func_80001844.s +++ /dev/null @@ -1,47 +0,0 @@ -glabel func_80001844 -/* 002444 80001844 3C0E800E */ lui $t6, %hi(D_800DC648) # $t6, 0x800e -/* 002448 80001848 8DCEC648 */ lw $t6, %lo(D_800DC648)($t6) -/* 00244C 8000184C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 002450 80001850 15C00005 */ bnez $t6, .L80001868 -/* 002454 80001854 AFBF0014 */ sw $ra, 0x14($sp) -/* 002458 80001858 3C04800E */ lui $a0, %hi(D_800DC630) # $a0, 0x800e -/* 00245C 8000185C 8C84C630 */ lw $a0, %lo(D_800DC630)($a0) -/* 002460 80001860 0C00095C */ jal func_80002570 -/* 002464 80001864 00000000 */ nop -.L80001868: -/* 002468 80001868 8FBF0014 */ lw $ra, 0x14($sp) -/* 00246C 8000186C 27BD0018 */ addiu $sp, $sp, 0x18 -/* 002470 80001870 03E00008 */ jr $ra -/* 002474 80001874 00000000 */ nop - -/* 002478 80001878 3C02800E */ lui $v0, %hi(D_800DC640) # $v0, 0x800e -/* 00247C 8000187C 2442C640 */ addiu $v0, %lo(D_800DC640) # addiu $v0, $v0, -0x39c0 -/* 002480 80001880 904F0000 */ lbu $t7, ($v0) -/* 002484 80001884 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 002488 80001888 308E00FF */ andi $t6, $a0, 0xff -/* 00248C 8000188C AFBF0014 */ sw $ra, 0x14($sp) -/* 002490 80001890 11EE000B */ beq $t7, $t6, .L800018C0 -/* 002494 80001894 AFA40018 */ sw $a0, 0x18($sp) -/* 002498 80001898 11C00007 */ beqz $t6, .L800018B8 -/* 00249C 8000189C A04E0000 */ sb $t6, ($v0) -/* 0024A0 800018A0 3C048011 */ lui $a0, %hi(D_80115D04) # $a0, 0x8011 -/* 0024A4 800018A4 90845D04 */ lbu $a0, %lo(D_80115D04)($a0) -/* 0024A8 800018A8 0C0002CD */ jal func_80000B34 -/* 0024AC 800018AC 00000000 */ nop -/* 0024B0 800018B0 10000004 */ b .L800018C4 -/* 0024B4 800018B4 8FBF0014 */ lw $ra, 0x14($sp) -.L800018B8: -/* 0024B8 800018B8 0C000611 */ jal func_80001844 -/* 0024BC 800018BC 00000000 */ nop -.L800018C0: -/* 0024C0 800018C0 8FBF0014 */ lw $ra, 0x14($sp) -.L800018C4: -/* 0024C4 800018C4 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0024C8 800018C8 03E00008 */ jr $ra -/* 0024CC 800018CC 00000000 */ nop - -/* 0024D0 800018D0 3C02800E */ lui $v0, %hi(D_800DC640) # $v0, 0x800e -/* 0024D4 800018D4 9042C640 */ lbu $v0, %lo(D_800DC640)($v0) -/* 0024D8 800018D8 03E00008 */ jr $ra -/* 0024DC 800018DC 00000000 */ nop - diff --git a/asm/non_matchings/unknown_001050/func_80001A3C.s b/asm/non_matchings/unknown_001050/func_80001A3C.s index d9b7a9d0..7482d87a 100644 --- a/asm/non_matchings/unknown_001050/func_80001A3C.s +++ b/asm/non_matchings/unknown_001050/func_80001A3C.s @@ -6,8 +6,8 @@ glabel func_80001A3C /* 00264C 80001A4C 00803025 */ move $a2, $a0 /* 002650 80001A50 24060100 */ li $a2, 256 .L80001A54: -/* 002654 80001A54 3C02800E */ lui $v0, %hi(D_800DC654) # $v0, 0x800e -/* 002658 80001A58 2442C654 */ addiu $v0, %lo(D_800DC654) # addiu $v0, $v0, -0x39ac +/* 002654 80001A54 3C02800E */ lui $v0, %hi(musicVolumeSliderPercentage) # $v0, 0x800e +/* 002658 80001A58 2442C654 */ addiu $v0, %lo(musicVolumeSliderPercentage) # addiu $v0, $v0, -0x39ac /* 00265C 80001A5C AC460000 */ sw $a2, ($v0) /* 002660 80001A60 3C0E800E */ lui $t6, %hi(D_800DC638) # $t6, 0x800e /* 002664 80001A64 91CEC638 */ lbu $t6, %lo(D_800DC638)($t6) @@ -17,9 +17,9 @@ glabel func_80001A3C /* 002674 80001A74 3C01800E */ lui $at, %hi(D_800DC650) # $at, 0x800e /* 002678 80001A78 C428C650 */ lwc1 $f8, %lo(D_800DC650)($at) /* 00267C 80001A7C 44995000 */ mtc1 $t9, $f10 -/* 002680 80001A80 3C04800E */ lui $a0, %hi(D_800DC630) # $a0, 0x800e +/* 002680 80001A80 3C04800E */ lui $a0, %hi(gMusicPlayer) # $a0, 0x800e /* 002684 80001A84 46805420 */ cvt.s.w $f16, $f10 -/* 002688 80001A88 8C84C630 */ lw $a0, %lo(D_800DC630)($a0) +/* 002688 80001A88 8C84C630 */ lw $a0, %lo(gMusicPlayer)($a0) /* 00268C 80001A8C 0000C012 */ mflo $t8 /* 002690 80001A90 44982000 */ mtc1 $t8, $f4 /* 002694 80001A94 00000000 */ nop @@ -38,7 +38,7 @@ glabel func_80001A3C /* 0026C8 80001AC8 44C8F800 */ ctc1 $t0, $31 /* 0026CC 80001ACC 00054A03 */ sra $t1, $a1, 8 /* 0026D0 80001AD0 00095400 */ sll $t2, $t1, 0x10 -/* 0026D4 80001AD4 0C031E14 */ jal func_800C7850 +/* 0026D4 80001AD4 0C031E14 */ jal alCSPSetVol /* 0026D8 80001AD8 000A2C03 */ sra $a1, $t2, 0x10 /* 0026DC 80001ADC 8FBF0014 */ lw $ra, 0x14($sp) /* 0026E0 80001AE0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/unknown_001050/func_80001B58.s b/asm/non_matchings/unknown_001050/func_80001B58.s deleted file mode 100644 index bf985e23..00000000 --- a/asm/non_matchings/unknown_001050/func_80001B58.s +++ /dev/null @@ -1,29 +0,0 @@ -glabel func_80001B58 -/* 002758 80001B58 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 00275C 80001B5C AFB2001C */ sw $s2, 0x1c($sp) -/* 002760 80001B60 AFB30020 */ sw $s3, 0x20($sp) -/* 002764 80001B64 AFB10018 */ sw $s1, 0x18($sp) -/* 002768 80001B68 AFB00014 */ sw $s0, 0x14($sp) -/* 00276C 80001B6C 3C12800E */ lui $s2, %hi(D_800DC634) # $s2, 0x800e -/* 002770 80001B70 309100FF */ andi $s1, $a0, 0xff -/* 002774 80001B74 AFBF0024 */ sw $ra, 0x24($sp) -/* 002778 80001B78 AFA40028 */ sw $a0, 0x28($sp) -/* 00277C 80001B7C 2652C634 */ addiu $s2, %lo(D_800DC634) # addiu $s2, $s2, -0x39cc -/* 002780 80001B80 00008025 */ move $s0, $zero -/* 002784 80001B84 24130010 */ li $s3, 16 -.L80001B88: -/* 002788 80001B88 8E440000 */ lw $a0, ($s2) -/* 00278C 80001B8C 320500FF */ andi $a1, $s0, 0xff -/* 002790 80001B90 0C031E38 */ jal func_800C78E0 -/* 002794 80001B94 322600FF */ andi $a2, $s1, 0xff -/* 002798 80001B98 26100001 */ addiu $s0, $s0, 1 -/* 00279C 80001B9C 1613FFFA */ bne $s0, $s3, .L80001B88 -/* 0027A0 80001BA0 00000000 */ nop -/* 0027A4 80001BA4 8FBF0024 */ lw $ra, 0x24($sp) -/* 0027A8 80001BA8 8FB00014 */ lw $s0, 0x14($sp) -/* 0027AC 80001BAC 8FB10018 */ lw $s1, 0x18($sp) -/* 0027B0 80001BB0 8FB2001C */ lw $s2, 0x1c($sp) -/* 0027B4 80001BB4 8FB30020 */ lw $s3, 0x20($sp) -/* 0027B8 80001BB8 03E00008 */ jr $ra -/* 0027BC 80001BBC 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/unknown_001050/func_80001BC0.s b/asm/non_matchings/unknown_001050/func_80001BC0.s index a15fdcfe..226515e4 100644 --- a/asm/non_matchings/unknown_001050/func_80001BC0.s +++ b/asm/non_matchings/unknown_001050/func_80001BC0.s @@ -7,10 +7,10 @@ glabel func_80001BC0 /* 0027D4 80001BD4 00803025 */ move $a2, $a0 /* 0027D8 80001BD8 A02EC644 */ sb $t6, %lo(D_800DC644)($at) /* 0027DC 80001BDC A0460000 */ sb $a2, ($v0) -/* 0027E0 80001BE0 3C05800E */ lui $a1, %hi(D_800DC634) # $a1, 0x800e +/* 0027E0 80001BE0 3C05800E */ lui $a1, %hi(gSndFxPlayer) # $a1, 0x800e /* 0027E4 80001BE4 AFBF0014 */ sw $ra, 0x14($sp) /* 0027E8 80001BE8 AFA40018 */ sw $a0, 0x18($sp) -/* 0027EC 80001BEC 8CA5C634 */ lw $a1, %lo(D_800DC634)($a1) +/* 0027EC 80001BEC 8CA5C634 */ lw $a1, %lo(gSndFxPlayer)($a1) /* 0027F0 80001BF0 0C0008AF */ jal func_800022BC /* 0027F4 80001BF4 30C400FF */ andi $a0, $a2, 0xff /* 0027F8 80001BF8 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/asm/non_matchings/unknown_001050/func_80001C08.s b/asm/non_matchings/unknown_001050/func_80001C08.s deleted file mode 100644 index 2c949cc6..00000000 --- a/asm/non_matchings/unknown_001050/func_80001C08.s +++ /dev/null @@ -1,50 +0,0 @@ -glabel func_80001C08 -/* 002808 80001C08 3C038011 */ lui $v1, %hi(D_80115D05) # $v1, 0x8011 -/* 00280C 80001C0C 90635D05 */ lbu $v1, %lo(D_80115D05)($v1) -/* 002810 80001C10 3C0E800E */ lui $t6, %hi(D_800DC644) # $t6, 0x800e -/* 002814 80001C14 1060000D */ beqz $v1, .L80001C4C -/* 002818 80001C18 00001025 */ move $v0, $zero -/* 00281C 80001C1C 91CEC644 */ lbu $t6, %lo(D_800DC644)($t6) -/* 002820 80001C20 3C0F800E */ lui $t7, %hi(D_800DC634) # $t7, 0x800e -/* 002824 80001C24 11C00009 */ beqz $t6, .L80001C4C -/* 002828 80001C28 00000000 */ nop -/* 00282C 80001C2C 8DEFC634 */ lw $t7, %lo(D_800DC634)($t7) -/* 002830 80001C30 24010001 */ li $at, 1 -/* 002834 80001C34 8DF8002C */ lw $t8, 0x2c($t7) -/* 002838 80001C38 00000000 */ nop -/* 00283C 80001C3C 17010003 */ bne $t8, $at, .L80001C4C -/* 002840 80001C40 00000000 */ nop -/* 002844 80001C44 03E00008 */ jr $ra -/* 002848 80001C48 00601025 */ move $v0, $v1 - -.L80001C4C: -/* 00284C 80001C4C 3C01800E */ lui $at, %hi(D_800DC644) # $at, 0x800e -/* 002850 80001C50 A020C644 */ sb $zero, %lo(D_800DC644)($at) -/* 002854 80001C54 03E00008 */ jr $ra -/* 002858 80001C58 00000000 */ nop - -/* 00285C 80001C5C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 002860 80001C60 AFB1001C */ sw $s1, 0x1c($sp) -/* 002864 80001C64 00048A00 */ sll $s1, $a0, 8 -/* 002868 80001C68 AFB20020 */ sw $s2, 0x20($sp) -/* 00286C 80001C6C AFB00018 */ sw $s0, 0x18($sp) -/* 002870 80001C70 322FFFFF */ andi $t7, $s1, 0xffff -/* 002874 80001C74 AFBF0024 */ sw $ra, 0x24($sp) -/* 002878 80001C78 AFA40028 */ sw $a0, 0x28($sp) -/* 00287C 80001C7C 01E08825 */ move $s1, $t7 -/* 002880 80001C80 00008025 */ move $s0, $zero -/* 002884 80001C84 24120040 */ li $s2, 64 -/* 002888 80001C88 320400FF */ andi $a0, $s0, 0xff -.L80001C8C: -/* 00288C 80001C8C 0C001298 */ jal func_80004A60 -/* 002890 80001C90 3225FFFF */ andi $a1, $s1, 0xffff -/* 002894 80001C94 26100001 */ addiu $s0, $s0, 1 -/* 002898 80001C98 1612FFFC */ bne $s0, $s2, .L80001C8C -/* 00289C 80001C9C 320400FF */ andi $a0, $s0, 0xff -/* 0028A0 80001CA0 8FBF0024 */ lw $ra, 0x24($sp) -/* 0028A4 80001CA4 8FB00018 */ lw $s0, 0x18($sp) -/* 0028A8 80001CA8 8FB1001C */ lw $s1, 0x1c($sp) -/* 0028AC 80001CAC 8FB20020 */ lw $s2, 0x20($sp) -/* 0028B0 80001CB0 03E00008 */ jr $ra -/* 0028B4 80001CB4 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/unknown_001050/func_80001EA8.s b/asm/non_matchings/unknown_001050/func_80001EA8.s deleted file mode 100644 index dad4aee7..00000000 --- a/asm/non_matchings/unknown_001050/func_80001EA8.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_80001EA8 -/* 002AA8 80001EA8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 002AAC 80001EAC AFA5001C */ sw $a1, 0x1c($sp) -/* 002AB0 80001EB0 8FA50028 */ lw $a1, 0x28($sp) -/* 002AB4 80001EB4 AFA40018 */ sw $a0, 0x18($sp) -/* 002AB8 80001EB8 308EFFFF */ andi $t6, $a0, 0xffff -/* 002ABC 80001EBC 01C02025 */ move $a0, $t6 -/* 002AC0 80001EC0 AFBF0014 */ sw $ra, 0x14($sp) -/* 002AC4 80001EC4 AFA60020 */ sw $a2, 0x20($sp) -/* 002AC8 80001EC8 14A00003 */ bnez $a1, .L80001ED8 -/* 002ACC 80001ECC AFA70024 */ sw $a3, 0x24($sp) -/* 002AD0 80001ED0 3C058011 */ lui $a1, %hi(D_80115F84) # $a1, 0x8011 -/* 002AD4 80001ED4 24A55F84 */ addiu $a1, %lo(D_80115F84) # addiu $a1, $a1, 0x5f84 -.L80001ED8: -/* 002AD8 80001ED8 0C000741 */ jal func_80001D04 -/* 002ADC 80001EDC AFA50028 */ sw $a1, 0x28($sp) -/* 002AE0 80001EE0 8FA50028 */ lw $a1, 0x28($sp) -/* 002AE4 80001EE4 8FA60020 */ lw $a2, 0x20($sp) -/* 002AE8 80001EE8 8CA40000 */ lw $a0, ($a1) -/* 002AEC 80001EEC 8FA5001C */ lw $a1, 0x1c($sp) -/* 002AF0 80001EF0 10800005 */ beqz $a0, .L80001F08 -/* 002AF4 80001EF4 8FBF0014 */ lw $ra, 0x14($sp) -/* 002AF8 80001EF8 8FA70024 */ lw $a3, 0x24($sp) -/* 002AFC 80001EFC 0C0026DF */ jal func_80009B7C -/* 002B00 80001F00 00000000 */ nop -/* 002B04 80001F04 8FBF0014 */ lw $ra, 0x14($sp) -.L80001F08: -/* 002B08 80001F08 27BD0018 */ addiu $sp, $sp, 0x18 -/* 002B0C 80001F0C 03E00008 */ jr $ra -/* 002B10 80001F10 00000000 */ nop - diff --git a/asm/non_matchings/unknown_001050/func_80001F14.s b/asm/non_matchings/unknown_001050/func_80001F14.s deleted file mode 100644 index a19ea164..00000000 --- a/asm/non_matchings/unknown_001050/func_80001F14.s +++ /dev/null @@ -1,48 +0,0 @@ -glabel func_80001F14 -/* 002B14 80001F14 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 002B18 80001F18 308EFFFF */ andi $t6, $a0, 0xffff -/* 002B1C 80001F1C AFBF0014 */ sw $ra, 0x14($sp) -/* 002B20 80001F20 AFA40020 */ sw $a0, 0x20($sp) -/* 002B24 80001F24 19C00009 */ blez $t6, .L80001F4C -/* 002B28 80001F28 00A03025 */ move $a2, $a1 -/* 002B2C 80001F2C AFAE001C */ sw $t6, 0x1c($sp) -/* 002B30 80001F30 0C00083A */ jal func_800020E8 -/* 002B34 80001F34 AFA50024 */ sw $a1, 0x24($sp) -/* 002B38 80001F38 8FA3001C */ lw $v1, 0x1c($sp) -/* 002B3C 80001F3C 8FA60024 */ lw $a2, 0x24($sp) -/* 002B40 80001F40 0043082A */ slt $at, $v0, $v1 -/* 002B44 80001F44 10200005 */ beqz $at, .L80001F5C -/* 002B48 80001F48 00000000 */ nop -.L80001F4C: -/* 002B4C 80001F4C 10C00017 */ beqz $a2, .L80001FAC -/* 002B50 80001F50 8FBF0014 */ lw $ra, 0x14($sp) -/* 002B54 80001F54 10000014 */ b .L80001FA8 -/* 002B58 80001F58 ACC00000 */ sw $zero, ($a2) -.L80001F5C: -/* 002B5C 80001F5C 10C0000A */ beqz $a2, .L80001F88 -/* 002B60 80001F60 3C198011 */ lui $t9, %hi(D_80115D14) # $t9, 0x8011 -/* 002B64 80001F64 3C0F8011 */ lui $t7, %hi(D_80115D14) # $t7, 0x8011 -/* 002B68 80001F68 8DEF5D14 */ lw $t7, %lo(D_80115D14)($t7) -/* 002B6C 80001F6C 00032C00 */ sll $a1, $v1, 0x10 -/* 002B70 80001F70 0005C403 */ sra $t8, $a1, 0x10 -/* 002B74 80001F74 8DE40004 */ lw $a0, 4($t7) -/* 002B78 80001F78 0C00118E */ jal func_80004638 -/* 002B7C 80001F7C 03002825 */ move $a1, $t8 -/* 002B80 80001F80 1000000A */ b .L80001FAC -/* 002B84 80001F84 8FBF0014 */ lw $ra, 0x14($sp) -.L80001F88: -/* 002B88 80001F88 8F395D14 */ lw $t9, %lo(D_80115D14)($t9) -/* 002B8C 80001F8C 00032C00 */ sll $a1, $v1, 0x10 -/* 002B90 80001F90 00054403 */ sra $t0, $a1, 0x10 -/* 002B94 80001F94 3C068011 */ lui $a2, %hi(D_80115F88) # $a2, 0x8011 -/* 002B98 80001F98 8F240004 */ lw $a0, 4($t9) -/* 002B9C 80001F9C 24C65F88 */ addiu $a2, %lo(D_80115F88) # addiu $a2, $a2, 0x5f88 -/* 002BA0 80001FA0 0C00118E */ jal func_80004638 -/* 002BA4 80001FA4 01002825 */ move $a1, $t0 -.L80001FA8: -/* 002BA8 80001FA8 8FBF0014 */ lw $ra, 0x14($sp) -.L80001FAC: -/* 002BAC 80001FAC 27BD0020 */ addiu $sp, $sp, 0x20 -/* 002BB0 80001FB0 03E00008 */ jr $ra -/* 002BB4 80001FB4 00000000 */ nop - diff --git a/asm/non_matchings/unknown_001050/func_800021B0.s b/asm/non_matchings/unknown_001050/func_800021B0.s deleted file mode 100644 index d907063a..00000000 --- a/asm/non_matchings/unknown_001050/func_800021B0.s +++ /dev/null @@ -1,34 +0,0 @@ -glabel func_800021B0 -/* 002DB0 800021B0 308EFFFF */ andi $t6, $a0, 0xffff -/* 002DB4 800021B4 AFA40000 */ sw $a0, ($sp) -/* 002DB8 800021B8 19C0000D */ blez $t6, .L800021F0 -/* 002DBC 800021BC 01C01825 */ move $v1, $t6 -/* 002DC0 800021C0 3C0F8011 */ lui $t7, %hi(D_80115D14) # $t7, 0x8011 -/* 002DC4 800021C4 8DEF5D14 */ lw $t7, %lo(D_80115D14)($t7) -/* 002DC8 800021C8 00034080 */ sll $t0, $v1, 2 -/* 002DCC 800021CC 8DF80004 */ lw $t8, 4($t7) -/* 002DD0 800021D0 00000000 */ nop -/* 002DD4 800021D4 8F04000C */ lw $a0, 0xc($t8) -/* 002DD8 800021D8 00000000 */ nop -/* 002DDC 800021DC 8499000E */ lh $t9, 0xe($a0) -/* 002DE0 800021E0 00884821 */ addu $t1, $a0, $t0 -/* 002DE4 800021E4 032E082A */ slt $at, $t9, $t6 -/* 002DE8 800021E8 10200003 */ beqz $at, .L800021F8 -/* 002DEC 800021EC 00000000 */ nop -.L800021F0: -/* 002DF0 800021F0 03E00008 */ jr $ra -/* 002DF4 800021F4 00001025 */ move $v0, $zero - -.L800021F8: -/* 002DF8 800021F8 8D2A000C */ lw $t2, 0xc($t1) -/* 002DFC 800021FC 00000000 */ nop -/* 002E00 80002200 8D4B0000 */ lw $t3, ($t2) -/* 002E04 80002204 00000000 */ nop -/* 002E08 80002208 8D620004 */ lw $v0, 4($t3) -/* 002E0C 8000220C 00000000 */ nop -/* 002E10 80002210 244C0001 */ addiu $t4, $v0, 1 -/* 002E14 80002214 2D8C0001 */ sltiu $t4, $t4, 1 -/* 002E18 80002218 318200FF */ andi $v0, $t4, 0xff -/* 002E1C 8000221C 03E00008 */ jr $ra -/* 002E20 80002220 00000000 */ nop - diff --git a/asm/non_matchings/unknown_001050/func_80002224.s b/asm/non_matchings/unknown_001050/func_80002224.s index 6d36b73a..9056dcc3 100644 --- a/asm/non_matchings/unknown_001050/func_80002224.s +++ b/asm/non_matchings/unknown_001050/func_80002224.s @@ -1,7 +1,7 @@ glabel func_80002224 /* 002E24 80002224 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 002E28 80002228 3C068011 */ lui $a2, %hi(D_80115CE8) # $a2, 0x8011 -/* 002E2C 8000222C 24C65CE8 */ addiu $a2, %lo(D_80115CE8) # addiu $a2, $a2, 0x5ce8 +/* 002E28 80002228 3C068011 */ lui $a2, %hi(gALHeap) # $a2, 0x8011 +/* 002E2C 8000222C 24C65CE8 */ addiu $a2, %lo(gALHeap) # addiu $a2, $a2, 0x5ce8 /* 002E30 80002230 AFBF001C */ sw $ra, 0x1c($sp) /* 002E34 80002234 AFA40048 */ sw $a0, 0x48($sp) /* 002E38 80002238 AFA5004C */ sw $a1, 0x4c($sp) diff --git a/asm/non_matchings/unknown_001050/func_8000232C.s b/asm/non_matchings/unknown_001050/func_8000232C.s index 4fbceaba..bde3359a 100644 --- a/asm/non_matchings/unknown_001050/func_8000232C.s +++ b/asm/non_matchings/unknown_001050/func_8000232C.s @@ -8,7 +8,7 @@ glabel func_8000232C /* 002F44 80002344 00808025 */ move $s0, $a0 /* 002F48 80002348 00A08825 */ move $s1, $a1 /* 002F4C 8000234C 00E09025 */ move $s2, $a3 -/* 002F50 80002350 0C031E94 */ jal func_800C7A50 +/* 002F50 80002350 0C031E94 */ jal alCSPGetState /* 002F54 80002354 00C09825 */ move $s3, $a2 /* 002F58 80002358 1440007F */ bnez $v0, .L80002558 /* 002F5C 8000235C 8FBF0024 */ lw $ra, 0x24($sp) @@ -41,8 +41,8 @@ glabel func_8000232C /* 002FC8 800023C8 02402825 */ move $a1, $s2 /* 002FCC 800023CC 0C032168 */ jal alCSPPlay /* 002FD0 800023D0 02002025 */ move $a0, $s0 -/* 002FD4 800023D4 3C0C800E */ lui $t4, %hi(D_800DC630) # $t4, 0x800e -/* 002FD8 800023D8 8D8CC630 */ lw $t4, %lo(D_800DC630)($t4) +/* 002FD4 800023D4 3C0C800E */ lui $t4, %hi(gMusicPlayer) # $t4, 0x800e +/* 002FD8 800023D8 8D8CC630 */ lw $t4, %lo(gMusicPlayer)($t4) /* 002FDC 800023DC 00000000 */ nop /* 002FE0 800023E0 160C0041 */ bne $s0, $t4, .L800024E8 /* 002FE4 800023E4 00000000 */ nop @@ -55,7 +55,7 @@ glabel func_8000232C /* 003000 80002400 00007812 */ mflo $t7 /* 003004 80002404 01AFC021 */ addu $t8, $t5, $t7 /* 003008 80002408 93040000 */ lbu $a0, ($t8) -/* 00300C 8000240C 0C000664 */ jal func_80001990 +/* 00300C 8000240C 0C000664 */ jal musicSetRelativeVolume /* 003010 80002410 00000000 */ nop /* 003014 80002414 92790000 */ lbu $t9, ($s3) /* 003018 80002418 8E020000 */ lw $v0, ($s0) @@ -68,7 +68,7 @@ glabel func_8000232C /* 003034 80002434 00000000 */ nop /* 003038 80002438 10800007 */ beqz $a0, .L80002458 /* 00303C 8000243C 00000000 */ nop -/* 003040 80002440 0C00054D */ jal func_80001534 +/* 003040 80002440 0C00054D */ jal musicSetTempo /* 003044 80002444 00000000 */ nop /* 003048 80002448 3C028011 */ lui $v0, %hi(D_80115D1C) # $v0, 0x8011 /* 00304C 8000244C 8C425D1C */ lw $v0, %lo(D_80115D1C)($v0) @@ -125,7 +125,7 @@ glabel func_8000232C /* 003100 80002500 00006012 */ mflo $t4 /* 003104 80002504 014C7021 */ addu $t6, $t2, $t4 /* 003108 80002508 91C40000 */ lbu $a0, ($t6) -/* 00310C 8000250C 0C0006C3 */ jal func_80001B0C +/* 00310C 8000250C 0C0006C3 */ jal sfxSetRelativeVolume /* 003110 80002510 00000000 */ nop /* 003114 80002514 92630000 */ lbu $v1, ($s3) /* 003118 80002518 8E0D0000 */ lw $t5, ($s0) @@ -136,7 +136,7 @@ glabel func_8000232C /* 00312C 8000252C 00000000 */ nop /* 003130 80002530 10800005 */ beqz $a0, .L80002548 /* 003134 80002534 00000000 */ nop -/* 003138 80002538 0C0005F5 */ jal func_800017D4 +/* 003138 80002538 0C0005F5 */ jal sfxSetTempo /* 00313C 8000253C 00000000 */ nop /* 003140 80002540 92630000 */ lbu $v1, ($s3) /* 003144 80002544 00000000 */ nop diff --git a/asm/non_matchings/unknown_001050/func_80002570.s b/asm/non_matchings/unknown_001050/func_80002570.s deleted file mode 100644 index 354d93ad..00000000 --- a/asm/non_matchings/unknown_001050/func_80002570.s +++ /dev/null @@ -1,43 +0,0 @@ -glabel func_80002570 -/* 003170 80002570 3C0E800E */ lui $t6, %hi(D_800DC630) # $t6, 0x800e -/* 003174 80002574 8DCEC630 */ lw $t6, %lo(D_800DC630)($t6) -/* 003178 80002578 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 00317C 8000257C 148E000F */ bne $a0, $t6, .L800025BC -/* 003180 80002580 AFBF0014 */ sw $ra, 0x14($sp) -/* 003184 80002584 3C0F8011 */ lui $t7, %hi(D_80115D40) # $t7, 0x8011 -/* 003188 80002588 91EF5D40 */ lbu $t7, %lo(D_80115D40)($t7) -/* 00318C 8000258C 00000000 */ nop -/* 003190 80002590 11E0000A */ beqz $t7, .L800025BC -/* 003194 80002594 00000000 */ nop -/* 003198 80002598 0C032174 */ jal alCSPStop -/* 00319C 8000259C 00000000 */ nop -/* 0031A0 800025A0 3C018011 */ lui $at, %hi(D_80115D40) # $at, 0x8011 -/* 0031A4 800025A4 A0205D40 */ sb $zero, %lo(D_80115D40)($at) -/* 0031A8 800025A8 3C018011 */ lui $at, %hi(D_80115D04) # $at, 0x8011 -/* 0031AC 800025AC A0205D04 */ sb $zero, %lo(D_80115D04)($at) -/* 0031B0 800025B0 3C01800E */ lui $at, %hi(D_800DC65C) # $at, 0x800e -/* 0031B4 800025B4 10000010 */ b .L800025F8 -/* 0031B8 800025B8 A020C65C */ sb $zero, %lo(D_800DC65C)($at) -.L800025BC: -/* 0031BC 800025BC 3C18800E */ lui $t8, %hi(D_800DC634) # $t8, 0x800e -/* 0031C0 800025C0 8F18C634 */ lw $t8, %lo(D_800DC634)($t8) -/* 0031C4 800025C4 3C198011 */ lui $t9, %hi(D_80115D41) # $t9, 0x8011 -/* 0031C8 800025C8 1498000C */ bne $a0, $t8, .L800025FC -/* 0031CC 800025CC 8FBF0014 */ lw $ra, 0x14($sp) -/* 0031D0 800025D0 93395D41 */ lbu $t9, %lo(D_80115D41)($t9) -/* 0031D4 800025D4 00000000 */ nop -/* 0031D8 800025D8 13200008 */ beqz $t9, .L800025FC -/* 0031DC 800025DC 8FBF0014 */ lw $ra, 0x14($sp) -/* 0031E0 800025E0 0C032174 */ jal alCSPStop -/* 0031E4 800025E4 00000000 */ nop -/* 0031E8 800025E8 3C018011 */ lui $at, %hi(D_80115D41) # $at, 0x8011 -/* 0031EC 800025EC A0205D41 */ sb $zero, %lo(D_80115D41)($at) -/* 0031F0 800025F0 3C01800E */ lui $at, %hi(D_800DC660) # $at, 0x800e -/* 0031F4 800025F4 A020C660 */ sb $zero, %lo(D_800DC660)($at) -.L800025F8: -/* 0031F8 800025F8 8FBF0014 */ lw $ra, 0x14($sp) -.L800025FC: -/* 0031FC 800025FC 27BD0018 */ addiu $sp, $sp, 0x18 -/* 003200 80002600 03E00008 */ jr $ra -/* 003204 80002604 00000000 */ nop - diff --git a/asm/non_matchings/unknown_001050/func_80001990.s b/asm/non_matchings/unknown_001050/musicSetRelativeVolume.s similarity index 83% rename from asm/non_matchings/unknown_001050/func_80001990.s rename to asm/non_matchings/unknown_001050/musicSetRelativeVolume.s index 4fba9a03..752be705 100644 --- a/asm/non_matchings/unknown_001050/func_80001990.s +++ b/asm/non_matchings/unknown_001050/musicSetRelativeVolume.s @@ -1,10 +1,10 @@ -glabel func_80001990 +glabel musicSetRelativeVolume /* 002590 80001990 3C02800E */ lui $v0, %hi(D_800DC638) # $v0, 0x800e /* 002594 80001994 2442C638 */ addiu $v0, %lo(D_800DC638) # addiu $v0, $v0, -0x39c8 /* 002598 80001998 00803025 */ move $a2, $a0 /* 00259C 8000199C A0460000 */ sb $a2, ($v0) -/* 0025A0 800019A0 3C0F800E */ lui $t7, %hi(D_800DC654) # $t7, 0x800e -/* 0025A4 800019A4 8DEFC654 */ lw $t7, %lo(D_800DC654)($t7) +/* 0025A0 800019A0 3C0F800E */ lui $t7, %hi(musicVolumeSliderPercentage) # $t7, 0x800e +/* 0025A4 800019A4 8DEFC654 */ lw $t7, %lo(musicVolumeSliderPercentage)($t7) /* 0025A8 800019A8 30CE00FF */ andi $t6, $a2, 0xff /* 0025AC 800019AC 01CF0019 */ multu $t6, $t7 /* 0025B0 800019B0 3C19800E */ lui $t9, %hi(D_800DC66C) # $t9, 0x800e @@ -15,9 +15,9 @@ glabel func_80001990 /* 0025C4 800019C4 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0025C8 800019C8 46805420 */ cvt.s.w $f16, $f10 /* 0025CC 800019CC AFA40018 */ sw $a0, 0x18($sp) -/* 0025D0 800019D0 3C04800E */ lui $a0, %hi(D_800DC630) # $a0, 0x800e +/* 0025D0 800019D0 3C04800E */ lui $a0, %hi(gMusicPlayer) # $a0, 0x800e /* 0025D4 800019D4 AFBF0014 */ sw $ra, 0x14($sp) -/* 0025D8 800019D8 8C84C630 */ lw $a0, %lo(D_800DC630)($a0) +/* 0025D8 800019D8 8C84C630 */ lw $a0, %lo(gMusicPlayer)($a0) /* 0025DC 800019DC 0000C012 */ mflo $t8 /* 0025E0 800019E0 44982000 */ mtc1 $t8, $f4 /* 0025E4 800019E4 00000000 */ nop @@ -36,7 +36,7 @@ glabel func_80001990 /* 002618 80001A18 44C8F800 */ ctc1 $t0, $31 /* 00261C 80001A1C 00054A03 */ sra $t1, $a1, 8 /* 002620 80001A20 00095400 */ sll $t2, $t1, 0x10 -/* 002624 80001A24 0C031E14 */ jal func_800C7850 +/* 002624 80001A24 0C031E14 */ jal alCSPSetVol /* 002628 80001A28 000A2C03 */ sra $a1, $t2, 0x10 /* 00262C 80001A2C 8FBF0014 */ lw $ra, 0x14($sp) /* 002630 80001A30 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/unknown_001050/func_80001534.s b/asm/non_matchings/unknown_001050/musicSetTempo.s similarity index 87% rename from asm/non_matchings/unknown_001050/func_80001534.s rename to asm/non_matchings/unknown_001050/musicSetTempo.s index 30748bd8..f1c15839 100644 --- a/asm/non_matchings/unknown_001050/func_80001534.s +++ b/asm/non_matchings/unknown_001050/musicSetTempo.s @@ -1,4 +1,4 @@ -glabel func_80001534 +glabel musicSetTempo /* 002134 80001534 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 002138 80001538 AFBF0014 */ sw $ra, 0x14($sp) /* 00213C 8000153C 1080001A */ beqz $a0, .L800015A8 @@ -10,8 +10,8 @@ glabel func_80001534 /* 002154 80001554 3C01800E */ lui $at, %hi(D_800E49DC) # $at, 0x800e /* 002158 80001558 46082283 */ div.s $f10, $f4, $f8 /* 00215C 8000155C C43049DC */ lwc1 $f16, %lo(D_800E49DC)($at) -/* 002160 80001560 3C04800E */ lui $a0, %hi(D_800DC630) # $a0, 0x800e -/* 002164 80001564 8C84C630 */ lw $a0, %lo(D_800DC630)($a0) +/* 002160 80001560 3C04800E */ lui $a0, %hi(gMusicPlayer) # $a0, 0x800e +/* 002164 80001564 8C84C630 */ lw $a0, %lo(gMusicPlayer)($a0) /* 002168 80001568 AFA60018 */ sw $a2, 0x18($sp) /* 00216C 8000156C 46105482 */ mul.s $f18, $f10, $f16 /* 002170 80001570 444EF800 */ cfc1 $t6, $31 @@ -23,7 +23,7 @@ glabel func_80001534 /* 002188 80001588 460091A4 */ cvt.w.s $f6, $f18 /* 00218C 8000158C 44053000 */ mfc1 $a1, $f6 /* 002190 80001590 44CEF800 */ ctc1 $t6, $31 -/* 002194 80001594 0C031E78 */ jal func_800C79E0 +/* 002194 80001594 0C031E78 */ jal alCSPSetTempo /* 002198 80001598 00000000 */ nop /* 00219C 8000159C 8FA60018 */ lw $a2, 0x18($sp) /* 0021A0 800015A0 3C018011 */ lui $at, %hi(D_80115D30) # $at, 0x8011 diff --git a/asm/non_matchings/unknown_001050/func_800017D4.s b/asm/non_matchings/unknown_001050/sfxSetTempo.s similarity index 85% rename from asm/non_matchings/unknown_001050/func_800017D4.s rename to asm/non_matchings/unknown_001050/sfxSetTempo.s index 968b715a..1dc142b4 100644 --- a/asm/non_matchings/unknown_001050/func_800017D4.s +++ b/asm/non_matchings/unknown_001050/sfxSetTempo.s @@ -1,4 +1,4 @@ -glabel func_800017D4 +glabel sfxSetTempo /* 0023D4 800017D4 00803025 */ move $a2, $a0 /* 0023D8 800017D8 44863000 */ mtc1 $a2, $f6 /* 0023DC 800017DC 3C013F80 */ li $at, 0x3F800000 # 1.000000 @@ -8,9 +8,9 @@ glabel func_800017D4 /* 0023EC 800017EC 46082283 */ div.s $f10, $f4, $f8 /* 0023F0 800017F0 C43049EC */ lwc1 $f16, %lo(D_800E49EC)($at) /* 0023F4 800017F4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0023F8 800017F8 3C04800E */ lui $a0, %hi(D_800DC634) # $a0, 0x800e +/* 0023F8 800017F8 3C04800E */ lui $a0, %hi(gSndFxPlayer) # $a0, 0x800e /* 0023FC 800017FC AFBF0014 */ sw $ra, 0x14($sp) -/* 002400 80001800 8C84C634 */ lw $a0, %lo(D_800DC634)($a0) +/* 002400 80001800 8C84C634 */ lw $a0, %lo(gSndFxPlayer)($a0) /* 002404 80001804 46105482 */ mul.s $f18, $f10, $f16 /* 002408 80001808 444EF800 */ cfc1 $t6, $31 /* 00240C 8000180C 00000000 */ nop @@ -21,7 +21,7 @@ glabel func_800017D4 /* 002420 80001820 460091A4 */ cvt.w.s $f6, $f18 /* 002424 80001824 44053000 */ mfc1 $a1, $f6 /* 002428 80001828 44CEF800 */ ctc1 $t6, $31 -/* 00242C 8000182C 0C031E78 */ jal func_800C79E0 +/* 00242C 8000182C 0C031E78 */ jal alCSPSetTempo /* 002430 80001830 00000000 */ nop /* 002434 80001834 8FBF0014 */ lw $ra, 0x14($sp) /* 002438 80001838 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/non_matchings/unknown_005740/func_80008438.s b/asm/non_matchings/unknown_005740/func_80008438.s index c68772ba..a4cb6510 100644 --- a/asm/non_matchings/unknown_005740/func_80008438.s +++ b/asm/non_matchings/unknown_005740/func_80008438.s @@ -817,10 +817,10 @@ glabel func_80008438 /* 009C20 80009020 00000000 */ nop .L80009024: /* 009C24 80009024 93A4024F */ lbu $a0, 0x24f($sp) -/* 009C28 80009028 0C0006C3 */ jal func_80001B0C +/* 009C28 80009028 0C0006C3 */ jal sfxSetRelativeVolume /* 009C2C 8000902C 00000000 */ nop /* 009C30 80009030 93A4024B */ lbu $a0, 0x24b($sp) -/* 009C34 80009034 0C0006D6 */ jal func_80001B58 +/* 009C34 80009034 0C0006D6 */ jal sfxSetPan /* 009C38 80009038 00000000 */ nop /* 009C3C 8000903C 10000004 */ b .L80009050 /* 009C40 80009040 8FA5026C */ lw $a1, 0x26c($sp) diff --git a/asm/non_matchings/unknown_00BC20/func_80018CE0.s b/asm/non_matchings/unknown_00BC20/func_80018CE0.s index c96a7917..2096ca95 100644 --- a/asm/non_matchings/unknown_00BC20/func_80018CE0.s +++ b/asm/non_matchings/unknown_00BC20/func_80018CE0.s @@ -170,7 +170,7 @@ glabel func_80018CE0 /* 019B60 80018F60 320400FF */ andi $a0, $s0, 0xff /* 019B64 80018F64 18400007 */ blez $v0, .L80018F84 /* 019B68 80018F68 00000000 */ nop -/* 019B6C 80018F6C 0C000453 */ jal func_8000114C +/* 019B6C 80018F6C 0C000453 */ jal musicGetChnlActive /* 019B70 80018F70 02202025 */ move $a0, $s1 /* 019B74 80018F74 14400003 */ bnez $v0, .L80018F84 /* 019B78 80018F78 320400FF */ andi $a0, $s0, 0xff @@ -339,7 +339,7 @@ glabel func_80018CE0 /* 019DEC 800191EC 00000000 */ nop /* 019DF0 800191F0 45000011 */ bc1f .L80019238 /* 019DF4 800191F4 8FAA00F4 */ lw $t2, 0xf4($sp) -/* 019DF8 800191F8 0C000417 */ jal func_8000105C +/* 019DF8 800191F8 0C000417 */ jal musicGetChanMask /* 019DFC 800191FC 00000000 */ nop /* 019E00 80019200 96280000 */ lhu $t0, ($s1) /* 019E04 80019204 00000000 */ nop diff --git a/asm/non_matchings/unknown_032760/func_80039330.s b/asm/non_matchings/unknown_032760/func_80039330.s index c94b646c..eae07092 100644 --- a/asm/non_matchings/unknown_032760/func_80039330.s +++ b/asm/non_matchings/unknown_032760/func_80039330.s @@ -1478,13 +1478,13 @@ glabel func_80039330 /* 03B4EC 8003A8EC 2404000F */ li $a0, 15 /* 03B4F0 8003A8F0 93A50057 */ lbu $a1, 0x57($sp) /* 03B4F4 8003A8F4 2404000A */ li $a0, 10 -/* 03B4F8 8003A8F8 0C00046A */ jal func_800011A8 +/* 03B4F8 8003A8F8 0C00046A */ jal musicSetChlPan /* 03B4FC 8003A8FC AFA5003C */ sw $a1, 0x3c($sp) /* 03B500 8003A900 93A5003F */ lbu $a1, 0x3f($sp) -/* 03B504 8003A904 0C00046A */ jal func_800011A8 +/* 03B504 8003A904 0C00046A */ jal musicSetChlPan /* 03B508 8003A908 2404000B */ li $a0, 11 /* 03B50C 8003A90C 93A5003F */ lbu $a1, 0x3f($sp) -/* 03B510 8003A910 0C00046A */ jal func_800011A8 +/* 03B510 8003A910 0C00046A */ jal musicSetChlPan /* 03B514 8003A914 2404000F */ li $a0, 15 /* 03B518 8003A918 0C00045C */ jal func_80001170 /* 03B51C 8003A91C 2404000A */ li $a0, 10 @@ -1551,7 +1551,7 @@ glabel func_80039330 .L8003A9FC: /* 03B5FC 8003A9FC 10600016 */ beqz $v1, .L8003AA58 /* 03B600 8003AA00 00000000 */ nop -/* 03B604 8003AA04 0C000417 */ jal func_8000105C +/* 03B604 8003AA04 0C000417 */ jal musicGetChanMask /* 03B608 8003AA08 00000000 */ nop /* 03B60C 8003AA0C 2401BFFF */ li $at, -16385 /* 03B610 8003AA10 0041C824 */ and $t9, $v0, $at @@ -1577,7 +1577,7 @@ glabel func_80039330 /* 03B65C 8003AA5C 10000024 */ b .L8003AAF0 /* 03B660 8003AA60 AE200030 */ sw $zero, 0x30($s1) .L8003AA64: -/* 03B664 8003AA64 0C000417 */ jal func_8000105C +/* 03B664 8003AA64 0C000417 */ jal musicGetChanMask /* 03B668 8003AA68 00000000 */ nop /* 03B66C 8003AA6C 2401BFFF */ li $at, -16385 /* 03B670 8003AA70 00417024 */ and $t6, $v0, $at @@ -1616,7 +1616,7 @@ glabel func_80039330 /* 03B6E8 8003AAE8 AE20002C */ sw $zero, 0x2c($s1) /* 03B6EC 8003AAEC AE200030 */ sw $zero, 0x30($s1) .L8003AAF0: -/* 03B6F0 8003AAF0 0C000417 */ jal func_8000105C +/* 03B6F0 8003AAF0 0C000417 */ jal musicGetChanMask /* 03B6F4 8003AAF4 00000000 */ nop /* 03B6F8 8003AAF8 304FBFFF */ andi $t7, $v0, 0xbfff /* 03B6FC 8003AAFC A62F0028 */ sh $t7, 0x28($s1) diff --git a/asm/non_matchings/unknown_080500/MenuAudioOptionsLoop.s b/asm/non_matchings/unknown_080500/MenuAudioOptionsLoop.s index 5f60ebad..ce919b4e 100644 --- a/asm/non_matchings/unknown_080500/MenuAudioOptionsLoop.s +++ b/asm/non_matchings/unknown_080500/MenuAudioOptionsLoop.s @@ -244,7 +244,7 @@ glabel MenuAudioOptionsLoop .L80084FE0: /* 085BE0 80084FE0 0C00068F */ jal func_80001A3C /* 085BE4 80084FE4 00402025 */ move $a0, $v0 -/* 085BE8 80084FE8 0C000572 */ jal func_800015C8 +/* 085BE8 80084FE8 0C000572 */ jal musicIsPlaying /* 085BEC 80084FEC 00000000 */ nop /* 085BF0 80084FF0 14400043 */ bnez $v0, .L80085100 /* 085BF4 80084FF4 3C0D8012 */ lui $t5, %hi(D_801263D8) # $t5, 0x8012 diff --git a/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s b/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s index fcb82727..5d0fff27 100644 --- a/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s +++ b/asm/non_matchings/unknown_080500/MenuTitleScreenLoop.s @@ -295,7 +295,7 @@ glabel MenuTitleScreenLoop /* 084A34 80083E34 44048000 */ mfc1 $a0, $f16 /* 084A38 80083E38 44CBF800 */ ctc1 $t3, $31 /* 084A3C 80083E3C 308C00FF */ andi $t4, $a0, 0xff -/* 084A40 80083E40 0C000664 */ jal func_80001990 +/* 084A40 80083E40 0C000664 */ jal musicSetRelativeVolume /* 084A44 80083E44 01802025 */ move $a0, $t4 /* 084A48 80083E48 3C038012 */ lui $v1, %hi(D_8012686C) # $v1, 0x8012 /* 084A4C 80083E4C 1000002F */ b .L80083F0C @@ -310,7 +310,7 @@ glabel MenuTitleScreenLoop /* 084A6C 80083E6C 8C84F760 */ lw $a0, %lo(D_800DF760)($a0) /* 084A70 80083E70 00000000 */ nop /* 084A74 80083E74 00046843 */ sra $t5, $a0, 1 -/* 084A78 80083E78 0C000664 */ jal func_80001990 +/* 084A78 80083E78 0C000664 */ jal musicSetRelativeVolume /* 084A7C 80083E7C 31A400FF */ andi $a0, $t5, 0xff /* 084A80 80083E80 3C038012 */ lui $v1, %hi(D_8012686C) # $v1, 0x8012 /* 084A84 80083E84 10000021 */ b .L80083F0C @@ -338,14 +338,14 @@ glabel MenuTitleScreenLoop /* 084AD8 80083ED8 44043000 */ mfc1 $a0, $f6 /* 084ADC 80083EDC 44D8F800 */ ctc1 $t8, $31 /* 084AE0 80083EE0 309900FF */ andi $t9, $a0, 0xff -/* 084AE4 80083EE4 0C000664 */ jal func_80001990 +/* 084AE4 80083EE4 0C000664 */ jal musicSetRelativeVolume /* 084AE8 80083EE8 03202025 */ move $a0, $t9 /* 084AEC 80083EEC 3C038012 */ lui $v1, %hi(D_8012686C) # $v1, 0x8012 /* 084AF0 80083EF0 10000006 */ b .L80083F0C /* 084AF4 80083EF4 2463686C */ addiu $v1, %lo(D_8012686C) # addiu $v1, $v1, 0x686c .L80083EF8: /* 084AF8 80083EF8 9084F763 */ lbu $a0, %lo(D_800DF763)($a0) -/* 084AFC 80083EFC 0C000664 */ jal func_80001990 +/* 084AFC 80083EFC 0C000664 */ jal musicSetRelativeVolume /* 084B00 80083F00 00000000 */ nop /* 084B04 80083F04 3C038012 */ lui $v1, %hi(D_8012686C) # $v1, 0x8012 /* 084B08 80083F08 2463686C */ addiu $v1, %lo(D_8012686C) # addiu $v1, $v1, 0x686c diff --git a/asm/non_matchings/unknown_080500/MenuTrackSelectInit.s b/asm/non_matchings/unknown_080500/MenuTrackSelectInit.s index dc84f12f..29c3d245 100644 --- a/asm/non_matchings/unknown_080500/MenuTrackSelectInit.s +++ b/asm/non_matchings/unknown_080500/MenuTrackSelectInit.s @@ -532,7 +532,7 @@ glabel MenuTrackSelectInit /* 08FB98 8008EF98 0C0002CD */ jal func_80000B34 /* 08FB9C 8008EF9C 24040018 */ li $a0, 24 /* 08FBA0 8008EFA0 92040003 */ lbu $a0, 3($s0) -/* 08FBA4 8008EFA4 0C000664 */ jal func_80001990 +/* 08FBA4 8008EFA4 0C000664 */ jal musicSetRelativeVolume /* 08FBA8 8008EFA8 00000000 */ nop /* 08FBAC 8008EFAC 0C0002C6 */ jal func_80000B18 /* 08FBB0 8008EFB0 00000000 */ nop diff --git a/asm/non_matchings/unknown_080500/MenuTrackSelectLoop.s b/asm/non_matchings/unknown_080500/MenuTrackSelectLoop.s index be3564c9..5f69e73c 100644 --- a/asm/non_matchings/unknown_080500/MenuTrackSelectLoop.s +++ b/asm/non_matchings/unknown_080500/MenuTrackSelectLoop.s @@ -81,7 +81,7 @@ glabel MenuTrackSelectLoop /* 08FF5C 8008F35C 8FAF0020 */ lw $t7, 0x20($sp) /* 08FF60 8008F360 04410005 */ bgez $v0, .L8008F378 /* 08FF64 8008F364 000FC040 */ sll $t8, $t7, 1 -/* 08FF68 8008F368 0C000664 */ jal func_80001990 +/* 08FF68 8008F368 0C000664 */ jal musicSetRelativeVolume /* 08FF6C 8008F36C 00002025 */ move $a0, $zero /* 08FF70 8008F370 1000000A */ b .L8008F39C /* 08FF74 8008F374 00000000 */ nop @@ -94,7 +94,7 @@ glabel MenuTrackSelectLoop /* 08FF8C 8008F38C 24020050 */ li $v0, 80 /* 08FF90 8008F390 AC620000 */ sw $v0, ($v1) .L8008F394: -/* 08FF94 8008F394 0C000664 */ jal func_80001990 +/* 08FF94 8008F394 0C000664 */ jal musicSetRelativeVolume /* 08FF98 8008F398 304400FF */ andi $a0, $v0, 0xff .L8008F39C: /* 08FF9C 8008F39C 3C028012 */ lui $v0, %hi(D_801267D0) # $v0, 0x8012 diff --git a/asm/non_matchings/unknown_09F8F0/func_800A277C.s b/asm/non_matchings/unknown_09F8F0/func_800A277C.s index 19876e23..b8356939 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A277C.s +++ b/asm/non_matchings/unknown_09F8F0/func_800A277C.s @@ -96,7 +96,7 @@ glabel func_800A277C /* 0A34EC 800A28EC 8FA900A8 */ lw $t1, 0xa8($sp) /* 0A34F0 800A28F0 14400006 */ bnez $v0, .L800A290C /* 0A34F4 800A28F4 240E0010 */ li $t6, 16 -/* 0A34F8 800A28F8 0C000572 */ jal func_800015C8 +/* 0A34F8 800A28F8 0C000572 */ jal musicIsPlaying /* 0A34FC 800A28FC AFA900A8 */ sw $t1, 0xa8($sp) /* 0A3500 800A2900 8FA900A8 */ lw $t1, 0xa8($sp) /* 0A3504 800A2904 14400003 */ bnez $v0, .L800A2914 diff --git a/asm/non_matchings/unknown_0C8160/func_800C7560.s b/asm/non_matchings/unknown_0C8160/alHeapInit.s similarity index 97% rename from asm/non_matchings/unknown_0C8160/func_800C7560.s rename to asm/non_matchings/unknown_0C8160/alHeapInit.s index 0ec5b151..e015a1df 100644 --- a/asm/non_matchings/unknown_0C8160/func_800C7560.s +++ b/asm/non_matchings/unknown_0C8160/alHeapInit.s @@ -1,4 +1,4 @@ -glabel func_800C7560 +glabel alHeapInit /* 0C8160 800C7560 24030010 */ li $v1, 16 /* 0C8164 800C7564 30AE000F */ andi $t6, $a1, 0xf /* 0C8168 800C7568 006E1023 */ subu $v0, $v1, $t6 diff --git a/asm/non_matchings/unknown_0C8450/func_800C7850.s b/asm/non_matchings/unknown_0C8450/alCSPSetVol.s similarity index 97% rename from asm/non_matchings/unknown_0C8450/func_800C7850.s rename to asm/non_matchings/unknown_0C8450/alCSPSetVol.s index 1f063fa9..7a96d6b3 100644 --- a/asm/non_matchings/unknown_0C8450/func_800C7850.s +++ b/asm/non_matchings/unknown_0C8450/alCSPSetVol.s @@ -1,4 +1,4 @@ -glabel func_800C7850 +glabel alCSPSetVol /* 0C8450 800C7850 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0C8454 800C7854 AFBF0014 */ sw $ra, 0x14($sp) /* 0C8458 800C7858 AFA5002C */ sw $a1, 0x2c($sp) diff --git a/data/dkr.data.s b/data/dkr.data.s index 277a6d90..30c6b654 100644 --- a/data/dkr.data.s +++ b/data/dkr.data.s @@ -6,10 +6,10 @@ .balign 4 .endm -glabel D_800DC630 +glabel gMusicPlayer .word 0x00000000 -glabel D_800DC634 +glabel gSndFxPlayer .word 0x00000000 glabel D_800DC638 @@ -33,7 +33,7 @@ glabel D_800DC64C glabel D_800DC650 .word 0x3F800000 -glabel D_800DC654 +glabel musicVolumeSliderPercentage .word 0x00000100 glabel D_800DC658 diff --git a/include/PR/libaudio.h b/include/PR/libaudio.h index af270d30..80bc3186 100644 --- a/include/PR/libaudio.h +++ b/include/PR/libaudio.h @@ -642,6 +642,7 @@ typedef struct { u8 maxChannels; /* max MIDI channels to support (16)*/ u8 debugFlags; /* control which error get reported */ ALHeap *heap; /* ptr to initialized heap */ + u8 unknown_0x10; void *initOsc; void *updateOsc; void *stopOsc; diff --git a/lib/asm/non_matchings/unknown_0C8490/func_800C7890.s b/lib/asm/non_matchings/unknown_0C8490/alCSPGetTempo.s similarity index 97% rename from lib/asm/non_matchings/unknown_0C8490/func_800C7890.s rename to lib/asm/non_matchings/unknown_0C8490/alCSPGetTempo.s index 49fb346a..eb51383d 100644 --- a/lib/asm/non_matchings/unknown_0C8490/func_800C7890.s +++ b/lib/asm/non_matchings/unknown_0C8490/alCSPGetTempo.s @@ -1,4 +1,4 @@ -glabel func_800C7890 +glabel alCSPGetTempo /* 0C8490 800C7890 8C830018 */ lw $v1, 0x18($a0) /* 0C8494 800C7894 54600004 */ bnezl $v1, .L800C78A8 /* 0C8498 800C7898 8C8E0024 */ lw $t6, 0x24($a0) diff --git a/lib/asm/non_matchings/unknown_0C84E0/func_800C78E0.s b/lib/asm/non_matchings/unknown_0C84E0/alCSPSetChlPan.s similarity index 98% rename from lib/asm/non_matchings/unknown_0C84E0/func_800C78E0.s rename to lib/asm/non_matchings/unknown_0C84E0/alCSPSetChlPan.s index 4e57faf0..d7d592c3 100644 --- a/lib/asm/non_matchings/unknown_0C84E0/func_800C78E0.s +++ b/lib/asm/non_matchings/unknown_0C84E0/alCSPSetChlPan.s @@ -1,4 +1,4 @@ -glabel func_800C78E0 +glabel alCSPSetChlPan /* 0C84E0 800C78E0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0C84E4 800C78E4 00A03825 */ move $a3, $a1 /* 0C84E8 800C78E8 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/lib/asm/non_matchings/unknown_0C8540/func_800C7940.s b/lib/asm/non_matchings/unknown_0C8540/alCSPSetChlVol.s similarity index 98% rename from lib/asm/non_matchings/unknown_0C8540/func_800C7940.s rename to lib/asm/non_matchings/unknown_0C8540/alCSPSetChlVol.s index f67fd550..d6b948fe 100644 --- a/lib/asm/non_matchings/unknown_0C8540/func_800C7940.s +++ b/lib/asm/non_matchings/unknown_0C8540/alCSPSetChlVol.s @@ -1,4 +1,4 @@ -glabel func_800C7940 +glabel alCSPSetChlVol /* 0C8540 800C7940 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0C8544 800C7944 00A03825 */ move $a3, $a1 /* 0C8548 800C7948 AFBF0014 */ sw $ra, 0x14($sp) diff --git a/lib/asm/non_matchings/unknown_0C85A0/func_800C79A0.s b/lib/asm/non_matchings/unknown_0C85A0/alCSPGetChlVol.s similarity index 94% rename from lib/asm/non_matchings/unknown_0C85A0/func_800C79A0.s rename to lib/asm/non_matchings/unknown_0C85A0/alCSPGetChlVol.s index 91e4b6ab..fdfbd684 100644 --- a/lib/asm/non_matchings/unknown_0C85A0/func_800C79A0.s +++ b/lib/asm/non_matchings/unknown_0C85A0/alCSPGetChlVol.s @@ -1,4 +1,4 @@ -glabel func_800C79A0 +glabel alCSPGetChlVol /* 0C85A0 800C79A0 AFA50004 */ sw $a1, 4($sp) /* 0C85A4 800C79A4 8C8F0060 */ lw $t7, 0x60($a0) /* 0C85A8 800C79A8 30AE00FF */ andi $t6, $a1, 0xff diff --git a/lib/asm/non_matchings/unknown_0C85C0/func_800C79C0.s b/lib/asm/non_matchings/unknown_0C85C0/alSeqpGetChlFXMix.s similarity index 94% rename from lib/asm/non_matchings/unknown_0C85C0/func_800C79C0.s rename to lib/asm/non_matchings/unknown_0C85C0/alSeqpGetChlFXMix.s index e3fbf4e9..c53c163d 100644 --- a/lib/asm/non_matchings/unknown_0C85C0/func_800C79C0.s +++ b/lib/asm/non_matchings/unknown_0C85C0/alSeqpGetChlFXMix.s @@ -1,4 +1,4 @@ -glabel func_800C79C0 +glabel alSeqpGetChlFXMix /* 0C85C0 800C79C0 AFA50004 */ sw $a1, 4($sp) /* 0C85C4 800C79C4 8C8F0060 */ lw $t7, 0x60($a0) /* 0C85C8 800C79C8 30AE00FF */ andi $t6, $a1, 0xff diff --git a/lib/asm/non_matchings/unknown_0C85E0/func_800C79E0.s b/lib/asm/non_matchings/unknown_0C85E0/alCSPSetTempo.s similarity index 98% rename from lib/asm/non_matchings/unknown_0C85E0/func_800C79E0.s rename to lib/asm/non_matchings/unknown_0C85E0/alCSPSetTempo.s index 10d39d4e..da3eca0a 100644 --- a/lib/asm/non_matchings/unknown_0C85E0/func_800C79E0.s +++ b/lib/asm/non_matchings/unknown_0C85E0/alCSPSetTempo.s @@ -1,4 +1,4 @@ -glabel func_800C79E0 +glabel alCSPSetTempo /* 0C85E0 800C79E0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 0C85E4 800C79E4 3C0100FF */ lui $at, 0xff /* 0C85E8 800C79E8 00A1C824 */ and $t9, $a1, $at diff --git a/lib/asm/non_matchings/unknown_0C8650/func_800C7A50.s b/lib/asm/non_matchings/unknown_0C8650/alCSPGetState.s similarity index 89% rename from lib/asm/non_matchings/unknown_0C8650/func_800C7A50.s rename to lib/asm/non_matchings/unknown_0C8650/alCSPGetState.s index 00100093..e4f55901 100644 --- a/lib/asm/non_matchings/unknown_0C8650/func_800C7A50.s +++ b/lib/asm/non_matchings/unknown_0C8650/alCSPGetState.s @@ -1,4 +1,4 @@ -glabel func_800C7A50 +glabel alCSPGetState /* 0C8650 800C7A50 03E00008 */ jr $ra /* 0C8654 800C7A54 8C82002C */ lw $v0, 0x2c($a0) diff --git a/lib/src/unknown_0C8490.c b/lib/src/unknown_0C8490.c index 84465784..8928019a 100644 --- a/lib/src/unknown_0C8490.c +++ b/lib/src/unknown_0C8490.c @@ -4,5 +4,5 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C8490/func_800C7890.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C8490/alCSPGetTempo.s") GLOBAL_ASM("lib/asm/non_matchings/unknown_0C8490/osGetCount.s") diff --git a/lib/src/unknown_0C84E0.c b/lib/src/unknown_0C84E0.c index d1458b75..39c89eae 100644 --- a/lib/src/unknown_0C84E0.c +++ b/lib/src/unknown_0C84E0.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C84E0/func_800C78E0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C84E0/alCSPSetChlPan.s") diff --git a/lib/src/unknown_0C8540.c b/lib/src/unknown_0C8540.c index 2d05a43f..19202b31 100644 --- a/lib/src/unknown_0C8540.c +++ b/lib/src/unknown_0C8540.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C8540/func_800C7940.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C8540/alCSPSetChlVol.s") diff --git a/lib/src/unknown_0C85A0.c b/lib/src/unknown_0C85A0.c index c794fe8b..6487e03b 100644 --- a/lib/src/unknown_0C85A0.c +++ b/lib/src/unknown_0C85A0.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C85A0/func_800C79A0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C85A0/alCSPGetChlVol.s") diff --git a/lib/src/unknown_0C85C0.c b/lib/src/unknown_0C85C0.c index 5b7e2e47..325344aa 100644 --- a/lib/src/unknown_0C85C0.c +++ b/lib/src/unknown_0C85C0.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C85C0/func_800C79C0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C85C0/alSeqpGetChlFXMix.s") diff --git a/lib/src/unknown_0C85E0.c b/lib/src/unknown_0C85E0.c index d9fb0081..dcc79cfd 100644 --- a/lib/src/unknown_0C85E0.c +++ b/lib/src/unknown_0C85E0.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C85E0/func_800C79E0.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C85E0/alCSPSetTempo.s") diff --git a/lib/src/unknown_0C8650.c b/lib/src/unknown_0C8650.c index 0867e066..1bd9afe7 100644 --- a/lib/src/unknown_0C8650.c +++ b/lib/src/unknown_0C8650.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("lib/asm/non_matchings/unknown_0C8650/func_800C7A50.s") +GLOBAL_ASM("lib/asm/non_matchings/unknown_0C8650/alCSPGetState.s") diff --git a/src/unknown_001050.c b/src/unknown_001050.c index 196ace28..9560e2e9 100644 --- a/src/unknown_001050.c +++ b/src/unknown_001050.c @@ -4,6 +4,9 @@ #include "types.h" #include "macros.h" +#include "audio_internal.h" + + /* Size: 0x08 bytes */ typedef struct unk80115D48 { /* 0x00 */ u16 unk0; @@ -18,20 +21,25 @@ typedef struct unk800DC630 { u16 unk30; } unk800DC630; -extern unk800DC630* D_800DC630; -extern unk800DC630* D_800DC634; +extern ALCSPlayer* gMusicPlayer; +extern ALCSPlayer* gSndFxPlayer; extern u8 D_800DC638; extern u8 D_800DC63C; extern u8 D_800DC640; +extern u8 D_800DC644; extern s32 D_800DC648; extern s32 D_800DC64C; extern f32 D_800DC650; -extern s32 D_800DC654; +extern s32 musicVolumeSliderPercentage; extern s32 D_800DC658; +extern u8 D_800DC65C; extern u8 D_800DC660; extern u8 D_800DC670; +extern u8 D_800EBF60; +extern ALHeap gALHeap; + /* Unknown size */ typedef struct unk80115CF8 { u8 pad0[2]; @@ -42,24 +50,11 @@ extern unk80115CF8 *D_80115CF8; extern u8 D_80115D04; extern u8 D_80115D05; -extern s32 D_80115D08; +extern s32 musicTempo; -typedef struct unk80115D14_4_C { - u8 pad0[0xE]; - u16 unkE; -} unk80115D14_4_C; +extern ALBankFile *D_80115D10; -typedef struct unk80115D14_4 { - u8 pad0[0xC]; - unk80115D14_4_C* unkC; -} unk80115D14_4; - -typedef struct unk80115D14 { - u8 pad0[4]; - unk80115D14_4* unk4; -} unk80115D14; - -extern unk80115D14 *D_80115D14; +extern ALBankFile *D_80115D14; /* Size: 0x0A bytes */ typedef struct unk80115D18 { @@ -88,12 +83,32 @@ extern s32 D_80115D3C; extern u8 D_80115D40; extern u8 D_80115D41; extern unk80115D48 D_80115D48[8]; +extern ALCSeq D_80115D88; +extern ALCSeq D_80115E80; +extern s8 D_80115F78; extern s8 D_80115F79; extern s32 D_80115F7C; +extern u32 D_80115F84; +extern u32 D_80115F88; +#if 1 GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80000450.s") +#else +void func_80000450(void){ + u32 *tmp; + ALBankFile *tmp2; + alHeapInit(&gALHeap, &D_800EBF60, 0x00029D88); + tmp = func_80076C58(38); + D_80115D14 = (ALBankFile*) func_80070C9C(tmp[2] - tmp[1], 0x00FFFFFF); + func_80076E68(39, D_80115D14, tmp[1], tmp[2] - tmp[1]); + alBnkfNew(D_80115D14, func_80076EE8(39, tmp[2])); +} + +#endif + GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80000890.s") +void func_80004A60(u8, u16); void func_80000968(s32 arg0) { switch(arg0) { case 1: @@ -101,8 +116,8 @@ void func_80000968(s32 arg0) { func_80004A60(1, 0x7FFF); func_80004A60(2, 0); func_80004A60(4, 0); - func_800C7850(D_800DC630, (s16) (D_800DC638 * D_800DC654 >> 2)); - func_800C7850(D_800DC634, 0); + alCSPSetVol(gMusicPlayer, (s16) (D_800DC638 * musicVolumeSliderPercentage >> 2)); + alCSPSetVol(gSndFxPlayer, 0); break; case 2: func_80004A60(0, 0); @@ -121,8 +136,8 @@ void func_80000968(s32 arg0) { func_80004A60(1, 0x7FFF); func_80004A60(2, 0x7FFF); func_80004A60(4, 0x7FFF); - func_800C7850(D_800DC630, (s16) (D_800DC638 * D_800DC654)); - func_800C7850(D_800DC634, (s16) (sfxVolumeSliderPercentage() * D_800DC63C)); + alCSPSetVol(gMusicPlayer, (s16) (D_800DC638 * musicVolumeSliderPercentage)); + alCSPSetVol(gSndFxPlayer, (s16) (sfxVolumeSliderPercentage() * D_800DC63C)); break; } D_80115F79 = arg0; @@ -136,27 +151,27 @@ void func_80000B28(void) { D_800DC648 = 0; } -void func_800022BC(u8, unk800DC630*); +void func_800022BC(u8, ALCSPlayer*); void func_80000B34(u8 arg0) { - if (D_800DC648 == 0 && D_800DC654 != 0) { + if (D_800DC648 == 0 && musicVolumeSliderPercentage != 0) { D_80115D04 = arg0; D_800DC638 = 0x7F; if (D_800DC640 != 0) { - func_800022BC(D_80115D04, D_800DC630); + func_800022BC(D_80115D04, gMusicPlayer); } - D_80115D08 = func_800C7890(D_800DC630); + musicTempo = alCSPGetTempo(gMusicPlayer); D_800DC64C = osGetCount(); D_80115D40 = 1; D_80115F7C = -1; } } -void func_8000B010(unk800DC630* arg0, u8 arg1); +void func_8000B010(ALCSPlayer* arg0, u8 arg1); void func_80000BE0(u8 arg0) { if (D_800DC670 == 0) { - func_8000B010(D_800DC630, arg0); + func_8000B010(gMusicPlayer, arg0); } } @@ -169,12 +184,12 @@ void func_80000C2C(void) { } void func_80000C38(u8 arg0) { - func_8000B010(D_800DC634, arg0); + func_8000B010(gSndFxPlayer, arg0); } /* Unused? */ void func_80000C68(u8 arg0) { - func_80063A90(D_800DC630, arg0); + func_80063A90(gMusicPlayer, arg0); } void func_80000C98(s32 arg0) { @@ -186,7 +201,7 @@ void func_80000CBC(void) { D_80115D38 = 0; D_80115D3C = 0; D_800DC650 = 1.0f; - func_80001990(D_800DC638); + musicSetRelativeVolume(D_800DC638); } GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80000D00.s") @@ -204,107 +219,206 @@ void func_80001050(void) { D_800DC658 = 0; } -u16 func_8000105C(void) { - return D_800DC630->unk30; +u16 musicGetChanMask(void) { + return gMusicPlayer->chanMask; } +void func_80001114(u8 arg0); +void func_80001170(u8 arg0); -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001074.s") + +void func_80001074(u16 arg0){ + u32 s0; + if(D_800DC65C){ + D_80115F7C = arg0; + } + else{ + gMusicPlayer->chanMask = arg0; + for(s0 = 0; s0 != 16; s0++){ + if(arg0 & (1 << s0)){ + func_80001170(s0); + } + else{ + func_80001114(s0); + } + + } + + } + return; +} void func_80001114(u8 arg0) { if (arg0 < 0x10) { - func_80063AF0(D_800DC630, arg0); + func_80063AF0(gMusicPlayer, arg0); } } -s32 func_8000114C(s32 arg0) { - return (D_800DC630->unk30 & (1 << arg0)) == 0; +s32 musicGetChnlActive(s32 arg0) { + return (gMusicPlayer->chanMask & (1 << arg0)) == 0; } void func_80001170(u8 arg0) { if (arg0 < 0x10) { - func_80063B44(D_800DC630, arg0); + func_80063B44(gMusicPlayer, arg0); } } -s32 func_800C78E0(unk800DC630*, u8 arg1, u8 arg2); +s32 alCSPSetChlPan(ALCSPlayer*, u8 chan, ALPan pan); -void func_800011A8(u8 arg0, u8 arg1) { - if (arg0 < 0x10) { - func_800C78E0(D_800DC630, arg0, arg1); +void musicSetChlPan(u8 chan, ALPan pan) { + if (chan < 0x10) { + alCSPSetChlPan(gMusicPlayer, chan, pan); } } -void func_800C7940(unk800DC630*, u8 arg1, u8 arg2); +void alCSPSetChlVol(ALCSPlayer*, u8 chan, u8 vol); -void func_800011E8(u8 arg0, u8 arg1) { - if (arg0 < 0x10) { - func_800C7940(D_800DC630, arg0, arg1); +void musicSetChlVol(u8 chan, u8 vol) { + if (chan < 0x10) { + alCSPSetChlVol(gMusicPlayer, chan, vol); } } -s32 func_800C79A0(unk800DC630*, u8 arg1); +s32 alCSPGetChlVol(ALCSPlayer*, u8 arg1); /* Unused?*/ s32 func_80001228(u8 arg0) { if (arg0 >= 0x10) { return 0; } else { - return func_800C79A0(D_800DC630, arg0); + return alCSPGetChlVol(gMusicPlayer, arg0); } } -s32 func_80063BA0(unk800DC630*, u8 arg1, u8 arg2); +s32 func_80063BA0(ALCSPlayer*, u8 arg1, u8 arg2); void func_80001268(u8 arg0, u8 arg1) { if (arg0 < 0x10) { - func_80063BA0(D_800DC630, arg0, arg1); + func_80063BA0(gMusicPlayer, arg0, arg1); } } -s32 func_80063C00(unk800DC630*, u8 arg1); +s32 func_80063C00(ALCSPlayer*, u8 arg1); s32 func_800012A8(u8 arg0) { if (arg0 >= 0x10) { return 0; } - return func_80063C00(D_800DC630, arg0); + return func_80063C00(gMusicPlayer, arg0); } -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_800012E8.s") +void func_800012E8(void){ + u32 s0; + if(!D_800DC648){ + for(s0 = 0; s0<16; s0++){ + func_80001170( s0 ); + func_80001268( s0, 127 ); + musicSetChlVol( s0, 127 ); + } + } + return; +} + +#if 1 +GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001358.s") +#else +void func_80001358(u32 arg0, u32 arg1, u32 arg2){ + u8 updatedVol; + //u8 fadeIn_chan = arg0; + if(!(arg0 == 100)){ + updatedVol = arg2 + alCSPGetChlVol(gMusicPlayer,arg0); + if(updatedVol < 0){ + updatedVol = 127; + } + alCSPSetChlVol(gMusicPlayer,arg0, updatedVol); + } + if(arg1 != 100){ + updatedVol = alCSPGetChlVol(gMusicPlayer,arg1) - arg2; + if(updatedVol < 0){ + updatedVol = 0; + } + alCSPSetChlVol(gMusicPlayer,arg1, updatedVol); + } + return; +} +#endif + +u8 alSeqpGetChlFXMix(ALCSPlayer*, u8); + +void func_80001440(u8 *arg0){ + s32 s0 = 0; + if(gMusicPlayer->maxChannels > 0){ + do{ + arg0[s0] = alSeqpGetChlFXMix(gMusicPlayer, s0); + s0++; + }while(s0 < gMusicPlayer->maxChannels); + } + return; +} s16 func_800015B8(void); void func_800014BC(f32 arg0) { - func_80001534((s32)((f32)(u32)(func_800015B8() & 0xFF) * arg0)); + musicSetTempo((s32)((f32)(u32)(func_800015B8() & 0xFF) * arg0)); } -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001534.s") +GLOBAL_ASM("asm/non_matchings/unknown_001050/musicSetTempo.s") s16 func_800015B8(void) { return D_80115D30; } -u8 func_800015C8(void) { - return (func_800C7A50(D_800DC630) == 1); +u8 musicIsPlaying(void) { + return (alCSPGetState(gMusicPlayer) == AL_PLAYING); } GLOBAL_ASM("asm/non_matchings/unknown_001050/func_800015F8.s") -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001784.s") -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_800017D4.s") -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001844.s") +u32 func_80001C08(void); -void func_80002570(unk800DC630* arg0); +void func_80001784(u8 a0){ + if(!func_80001C08()){ + func_800022BC(D_80115D05 = a0, gSndFxPlayer); + D_80115D41 = 1; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_001050/sfxSetTempo.s") + +void func_80002570(ALCSPlayer* arg0); + +void func_80001844(void){ + if(!D_800DC648){ + func_80002570(gMusicPlayer); + } + return; +} + + +void func_80001878(u8 arg0) { + if (arg0 != D_800DC640) { + D_800DC640 = arg0; + if (arg0) { + func_80000B34(D_80115D04); + } else { + func_80001844(); + } + } +} + +u8 func_800018D0(void){ + return D_800DC640; +} void func_800018E0(void) { if (func_80001C08() == 0) { D_80115D05 = 0; - func_80002570(D_800DC634); + func_80002570(gSndFxPlayer); } } u8 func_80001918(void) { - if (D_80115D04 != 0 && D_800DC630->unk2C == 1) { + if (D_80115D04 != 0 && gMusicPlayer->state == AL_PLAYING) { return D_80115D04; } return 0; @@ -324,27 +438,50 @@ u8 func_80001980(void) { return D_80115D05; } -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001990.s") +extern f32 D_800DC66C; +GLOBAL_ASM("asm/non_matchings/unknown_001050/musicSetRelativeVolume.s") GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001A3C.s") u8 func_80001AEC(void) { return D_800DC638; } -s32 musicVolumeSliderPercentage(void) { - return D_800DC654; +s32 musicGetVolSliderPercentage(void) { + return musicVolumeSliderPercentage; } -void func_80001B0C(u8 arg0) { +void sfxSetRelativeVolume(u8 arg0) { D_800DC63C = arg0; - func_800C7850(D_800DC634, (s16) (sfxVolumeSliderPercentage() * D_800DC63C)); + alCSPSetVol(gSndFxPlayer, (s16) (sfxVolumeSliderPercentage() * D_800DC63C)); +} + +void sfxSetPan(ALPan pan){ + u32 iChan; + for(iChan = 0; iChan < 16; iChan++){ + alCSPSetChlPan(gSndFxPlayer, iChan, pan); + } + return; } -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001B58.s") GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001BC0.s") -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001C08.s") + +u32 func_80001C08(void){ + if(D_80115D05 && D_800DC644 && (gSndFxPlayer->state == AL_PLAYING) ){ + return D_80115D05; + } + D_800DC644 = 0; + return 0; +} + +void func_80001C5C(u16 arg0){ + u32 s0; + for(s0 = 0; s0<64; s0++){ + func_80004A60(s0, arg0 << 8); + } +} + u16 func_80001CB8(u16 arg0) { if (D_80115D20 < arg0) { @@ -352,14 +489,48 @@ u16 func_80001CB8(u16 arg0) { } return D_80115D18[arg0].unk6; } - +void func_80001D04(u16, void*); GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001D04.s") -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001EA8.s") -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001F14.s") + + +typedef struct unknown_struct_80001EA8_s{ + u32 unk00; + u32 unk04; + u32 unk08; +}unknown_struct_80001EA8; + +void func_80001EA8(u16 arg0, unknown_struct_80001EA8 arg1, u32* arg2){ + if(arg2 == NULL){ + arg2 = &D_80115F84; + } + func_80001D04(arg0, arg2); + if(*arg2){ + func_80009B7C(*arg2, arg1.unk00, arg1.unk04, arg1.unk08); + } +} + +u16 func_800020E8(void); + +void func_80001F14(u16 arg0, u32 *arg1){ + if(arg0 <= 0 || func_800020E8() < arg0){ + if(arg1){ + *arg1 = 0; + } + } + else{ + if(arg1){ + func_80004638(D_80115D14->bankArray[0], (s16) arg0, arg1); + }else{ + func_80004638(D_80115D14->bankArray[0], (s16) arg0, &D_80115F88); + } + } +} + + GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80001FB8.s") u16 func_800020E8(void) { - return D_80115D14->unk4->unkC->unkE; + return D_80115D14->bankArray[0]->instArray[0]->soundCount; } u8 func_80002110(void) { @@ -391,13 +562,48 @@ void func_8000216C(unk80115D1C **arg0, s32 *arg1, s32 *arg2) { } } -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_800021B0.s") -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80002224.s") +u8 func_800021B0(u16 arg0){ + if(arg0 <= 0 || D_80115D14->bankArray[0]->instArray[0]->soundCount < arg0){ + return 0; + } + return ((u32)(1+ D_80115D14->bankArray[0]->instArray[0]->soundArray[arg0-1]->envelope->decayTime) == 0); +} -void func_800022BC(u8 arg0, unk800DC630* arg1) { + +#if 0 +GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80002224.s") +#else +extern void alCSPNew(ALCSPlayer *seqp, ALSeqpConfig *config); +extern void alCSPSetBank(ALCSPlayer *seqp, ALBank *b); + +ALCSPlayer *func_80002224(s32 _max_voices, s32 _max_events){ + ALCSPlayer* cseqp; + ALSeqpConfig config; + + config.maxVoices = _max_voices; + config.maxEvents = _max_events; + config.unknown_0x10 = _max_voices; //this member doesn't exist in other versions of ALSeqpConfig + config.maxChannels = 16; + config.heap = &gALHeap; + config.initOsc = NULL; + config.updateOsc = NULL; + config.stopOsc = NULL; + + + cseqp = (ALCSPlayer *) alHeapDBAlloc(NULL, 0, &gALHeap, 1, 128); + alCSPNew(cseqp, &config); + alCSPSetBank(cseqp, D_80115D10->bankArray[0]); + ((u8*) cseqp)[0x36]= 0x7F; //this member doesn't exist in ALCSPlayer + return cseqp; +} +#endif + + + +void func_800022BC(u8 arg0, ALCSPlayer* arg1) { func_80002570(arg1); if (arg0 < D_80115CF8->unk2) { - if (arg1 == D_800DC630) { + if (arg1 == gMusicPlayer) { D_800DC65C = arg0; return; } @@ -406,8 +612,41 @@ void func_800022BC(u8 arg0, unk800DC630* arg1) { } +extern u32 D_80115D0C; +#if 1 GLOBAL_ASM("asm/non_matchings/unknown_001050/func_8000232C.s") -GLOBAL_ASM("asm/non_matchings/unknown_001050/func_80002570.s") +#else +func_8000232C(ALCSPlayer* seqp, u8* ptr, u8* arg2, ALCSeq* seq){ + if(alCSPGetState(seqp) == AL_STOPPED && *arg2){ + func_80076E68(39, ptr, + ((u32*)(((*arg2) << 3) + D_80115CF8))[1]-func_80076EE8(39,0), + *((u32*)(((*arg2) << 3) + D_80115D0C))); + alCSeqNew(seq, ptr); + alCSPSetSeq(seqp, seq); + alCSPPlay(seqp); + if(seqp == gMusicPlayer){ + musicSetRelativeVolume(*((u8*)((*arg2)*3 + D_80115D1C->unk0))); + }else{ + + } + } +} +#endif + +void func_80002570(ALCSPlayer* seqp){ + if(gMusicPlayer == seqp && D_80115D40 != 0){ + alCSPStop(seqp); + D_80115D40 = 0; + D_80115D04 = 0; + D_800DC65C = 0; + } + else if(gSndFxPlayer == seqp && D_80115D41 != 0){ + alCSPStop(seqp); + D_80115D41 = 0; + D_800DC660 = 0; + } + return; +} void func_8006492C(u8 arg0); diff --git a/src/unknown_003260.c b/src/unknown_003260.c index df405f20..922de1ed 100644 --- a/src/unknown_003260.c +++ b/src/unknown_003260.c @@ -3,6 +3,11 @@ #include "types.h" #include "macros.h" +#include "audio_internal.h" +#include "libultra_internal.h" + +extern void D_80002A98(void*); +extern u32 D_80003008; /* Unknown Size */ typedef struct unk800DC6BC { @@ -13,10 +18,36 @@ typedef struct unk800DC6BC { extern unk800DC6BC* D_800DC6BC; extern s32 D_800DC6C0; +extern s32 D_80115F90; +extern ALHeap* D_80115F94; +extern OSThread D_80115FB0; +extern OSMesgQueue D_80116160; +extern OSMesg D_80116178; +extern OSMesgQueue D_80116198; +extern OSMesg D_801161B0; +extern s32 D_80119230; +extern OSMesgQueue D_80119AF0; +extern OSMesg D_80119B08; +extern f32 D_80126170; -extern s32* D_80115FB0; - +#if 1 GLOBAL_ASM("asm/non_matchings/unknown_003260/func_80002660.s") +#else + void func_80002660(ALSynConfig* c, OSPri p, s32 arg2){ + D_80115F90 = arg2; + D_80115F94 = c->heap; + c->dmaproc = &D_80003008; + c->outputRate = func_800C8600(22050); + + alHeapDBAlloc(0,0, c->heap, 1, 120); + + osCreateMesgQueue(&D_80116198, &D_801161B0, 8); + osCreateMesgQueue(&D_80116160, &D_80116178, 8); + osCreateMesgQueue(&D_80119AF0, &D_80119B08, 50); + + osCreateThread(&D_80115FB0, 4, &D_80002A98, NULL, &D_80119230, p); + } +#endif void func_80002A50(void) { osStartThread(&D_80115FB0); @@ -64,8 +95,8 @@ GLOBAL_ASM("asm/non_matchings/unknown_003260/func_80004384.s") GLOBAL_ASM("asm/non_matchings/unknown_003260/func_80004520.s") GLOBAL_ASM("asm/non_matchings/unknown_003260/func_80004604.s") -void func_80004638(s32 arg0, s16 arg1, s32 arg2) { - func_80004668(arg0, arg1, 0, arg2); +void func_80004638(ALBank* bnk, s16 arg1, s32 arg2) { + func_80004668(bnk, arg1, 0, arg2); } GLOBAL_ASM("asm/non_matchings/unknown_003260/func_80004668.s") diff --git a/src/unknown_064800.c b/src/unknown_064800.c index 6661d043..45a5a1ab 100644 --- a/src/unknown_064800.c +++ b/src/unknown_064800.c @@ -3,7 +3,7 @@ #include "types.h" #include "macros.h" - +#include "audio_internal.h" /* Size: 0x14 bytes */ typedef struct unk80063C00 { u32 unk00; @@ -24,4 +24,5 @@ typedef struct unk80063C00_2 { u8 func_80063C00(unk80063C00_2 *arg0, u8 arg1) { return arg0->unk60[arg1].unk10; + //return seqp->chanState[chan].unk10??? } diff --git a/src/unknown_080500.c b/src/unknown_080500.c index 59407a65..086fadc9 100644 --- a/src/unknown_080500.c +++ b/src/unknown_080500.c @@ -542,7 +542,7 @@ void MenuAudioOptionsInit(void) { func_8008E4B0(); func_800C01D8(&D_800DF77C); func_8007FFEC(2); - D_800DFAC4 = musicVolumeSliderPercentage(); + D_800DFAC4 = musicGetVolSliderPercentage(); D_800DFAC0 = sfxVolumeSliderPercentage(); if (gActiveMagicCodes & 0x40) { // Check if "JUKEBOX" cheat is active D_800DFA3C.unk6C = D_801269E0; diff --git a/src/unknown_0C8160.c b/src/unknown_0C8160.c index 35076021..068f6348 100644 --- a/src/unknown_0C8160.c +++ b/src/unknown_0C8160.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("asm/non_matchings/unknown_0C8160/func_800C7560.s") +GLOBAL_ASM("asm/non_matchings/unknown_0C8160/alHeapInit.s") diff --git a/src/unknown_0C8450.c b/src/unknown_0C8450.c index 5fb0d0a5..4b93212a 100644 --- a/src/unknown_0C8450.c +++ b/src/unknown_0C8450.c @@ -4,4 +4,4 @@ #include "types.h" #include "macros.h" -GLOBAL_ASM("asm/non_matchings/unknown_0C8450/func_800C7850.s") +GLOBAL_ASM("asm/non_matchings/unknown_0C8450/alCSPSetVol.s") diff --git a/undefined_syms.txt b/undefined_syms.txt index ed24fccb..74988c59 100755 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -71,8 +71,8 @@ D_800D84C0 = 0x800D84C0; D_800D8590 = 0x800D8590; D_800D9790 = 0x800D9790; D_800DA970 = 0x800DA970; -D_800DC630 = 0x800DC630; -D_800DC634 = 0x800DC634; +gMusicPlayer = 0x800DC630; +gSndFxPlayer = 0x800DC634; D_800DC638 = 0x800DC638; D_800DC63C = 0x800DC63C; D_800DC640 = 0x800DC640; @@ -80,7 +80,7 @@ D_800DC644 = 0x800DC644; D_800DC648 = 0x800DC648; D_800DC64C = 0x800DC64C; D_800DC650 = 0x800DC650; -D_800DC654 = 0x800DC654; +musicVolumeSliderPercentage = 0x800DC654; D_800DC658 = 0x800DC658; D_800DC65C = 0x800DC65C; D_800DC660 = 0x800DC660; @@ -1716,13 +1716,13 @@ D_800E98D0 = 0x800E98D0; D_800EA3A0 = 0x800EA3A0; D_800EABA0 = 0x800EABA0; D_800EBF60 = 0x800EBF60; -D_80115CE8 = 0x80115CE8; +gALHeap = 0x80115CE8; D_80115CF8 = 0x80115CF8; D_80115CFC = 0x80115CFC; D_80115D00 = 0x80115D00; D_80115D04 = 0x80115D04; D_80115D05 = 0x80115D05; -D_80115D08 = 0x80115D08; +musicTempo = 0x80115D08; D_80115D0C = 0x80115D0C; D_80115D10 = 0x80115D10; D_80115D14 = 0x80115D14;