diff --git a/asm/non_matchings/unknown_061D30/__CSPHandleMetaMsg.s b/asm/non_matchings/unknown_061D30/__CSPHandleMetaMsg.s deleted file mode 100644 index 2f55586a..00000000 --- a/asm/non_matchings/unknown_061D30/__CSPHandleMetaMsg.s +++ /dev/null @@ -1,114 +0,0 @@ -glabel __CSPHandleMetaMsg -/* 0643EC 800637EC 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 0643F0 800637F0 AFBF0034 */ sw $ra, 0x34($sp) -/* 0643F4 800637F4 AFB60030 */ sw $s6, 0x30($sp) -/* 0643F8 800637F8 AFB5002C */ sw $s5, 0x2c($sp) -/* 0643FC 800637FC AFB40028 */ sw $s4, 0x28($sp) -/* 064400 80063800 AFB30024 */ sw $s3, 0x24($sp) -/* 064404 80063804 AFB20020 */ sw $s2, 0x20($sp) -/* 064408 80063808 AFB1001C */ sw $s1, 0x1c($sp) -/* 06440C 8006380C AFB00018 */ sw $s0, 0x18($sp) -/* 064410 80063810 90AE0008 */ lbu $t6, 8($a1) -/* 064414 80063814 240100FF */ li $at, 255 -/* 064418 80063818 0080A825 */ move $s5, $a0 -/* 06441C 8006381C 00009025 */ move $s2, $zero -/* 064420 80063820 15C1004E */ bne $t6, $at, .L8006395C -/* 064424 80063824 00009825 */ move $s3, $zero -/* 064428 80063828 90AF0009 */ lbu $t7, 9($a1) -/* 06442C 8006382C 24010051 */ li $at, 81 -/* 064430 80063830 15E1004A */ bne $t7, $at, .L8006395C -/* 064434 80063834 24A20004 */ addiu $v0, $a1, 4 -/* 064438 80063838 90580007 */ lbu $t8, 7($v0) -/* 06443C 8006383C 90480008 */ lbu $t0, 8($v0) -/* 064440 80063840 904B0009 */ lbu $t3, 9($v0) -/* 064444 80063844 0018CC00 */ sll $t9, $t8, 0x10 -/* 064448 80063848 00084A00 */ sll $t1, $t0, 8 -/* 06444C 8006384C 03295025 */ or $t2, $t9, $t1 -/* 064450 80063850 014B1825 */ or $v1, $t2, $t3 -/* 064454 80063854 44832000 */ mtc1 $v1, $f4 -/* 064458 80063858 8C960024 */ lw $s6, 0x24($a0) -/* 06445C 8006385C 46802120 */ cvt.s.w $f4, $f4 -/* 064460 80063860 44052000 */ mfc1 $a1, $f4 -/* 064464 80063864 0C018E8D */ jal __setUsptFromTempo -/* 064468 80063868 00000000 */ nop -/* 06446C 8006386C 8EB00050 */ lw $s0, 0x50($s5) -/* 064470 80063870 00000000 */ nop -/* 064474 80063874 1200001D */ beqz $s0, .L800638EC -/* 064478 80063878 00000000 */ nop -/* 06447C 8006387C 24140015 */ li $s4, 21 -.L80063880: -/* 064480 80063880 8E0C0008 */ lw $t4, 8($s0) -/* 064484 80063884 860D000C */ lh $t5, 0xc($s0) -/* 064488 80063888 8E110000 */ lw $s1, ($s0) -/* 06448C 8006388C 168D0015 */ bne $s4, $t5, .L800638E4 -/* 064490 80063890 024C9021 */ addu $s2, $s2, $t4 -/* 064494 80063894 0C0321D8 */ jal alUnlink -/* 064498 80063898 02002025 */ move $a0, $s0 -/* 06449C 8006389C 12600006 */ beqz $s3, .L800638B8 -/* 0644A0 800638A0 00000000 */ nop -/* 0644A4 800638A4 02002025 */ move $a0, $s0 -/* 0644A8 800638A8 0C0321E4 */ jal alLink -/* 0644AC 800638AC 02602825 */ move $a1, $s3 -/* 0644B0 800638B0 10000004 */ b .L800638C4 -/* 0644B4 800638B4 00000000 */ nop -.L800638B8: -/* 0644B8 800638B8 AE000000 */ sw $zero, ($s0) -/* 0644BC 800638BC AE000004 */ sw $zero, 4($s0) -/* 0644C0 800638C0 02009825 */ move $s3, $s0 -.L800638C4: -/* 0644C4 800638C4 12200006 */ beqz $s1, .L800638E0 -/* 0644C8 800638C8 02401825 */ move $v1, $s2 -/* 0644CC 800638CC 8E020008 */ lw $v0, 8($s0) -/* 0644D0 800638D0 8E2E0008 */ lw $t6, 8($s1) -/* 0644D4 800638D4 02429023 */ subu $s2, $s2, $v0 -/* 0644D8 800638D8 01C27821 */ addu $t7, $t6, $v0 -/* 0644DC 800638DC AE2F0008 */ sw $t7, 8($s1) -.L800638E0: -/* 0644E0 800638E0 AE030008 */ sw $v1, 8($s0) -.L800638E4: -/* 0644E4 800638E4 1620FFE6 */ bnez $s1, .L80063880 -/* 0644E8 800638E8 02208025 */ move $s0, $s1 -.L800638EC: -/* 0644EC 800638EC 1260001B */ beqz $s3, .L8006395C -/* 0644F0 800638F0 02608025 */ move $s0, $s3 -/* 0644F4 800638F4 26B20048 */ addiu $s2, $s5, 0x48 -.L800638F8: -/* 0644F8 800638F8 8E180008 */ lw $t8, 8($s0) -/* 0644FC 800638FC 8EA80024 */ lw $t0, 0x24($s5) -/* 064500 80063900 0316001A */ div $zero, $t8, $s6 -/* 064504 80063904 8E110000 */ lw $s1, ($s0) -/* 064508 80063908 16C00002 */ bnez $s6, .L80063914 -/* 06450C 8006390C 00000000 */ nop -/* 064510 80063910 0007000D */ break 7 -.L80063914: -/* 064514 80063914 2401FFFF */ li $at, -1 -/* 064518 80063918 16C10004 */ bne $s6, $at, .L8006392C -/* 06451C 8006391C 3C018000 */ lui $at, 0x8000 -/* 064520 80063920 17010002 */ bne $t8, $at, .L8006392C -/* 064524 80063924 00000000 */ nop -/* 064528 80063928 0006000D */ break 6 -.L8006392C: -/* 06452C 8006392C 02402025 */ move $a0, $s2 -/* 064530 80063930 02002825 */ move $a1, $s0 -/* 064534 80063934 00001012 */ mflo $v0 -/* 064538 80063938 00000000 */ nop -/* 06453C 8006393C 00000000 */ nop -/* 064540 80063940 01020019 */ multu $t0, $v0 -/* 064544 80063944 0000C812 */ mflo $t9 -/* 064548 80063948 AE190008 */ sw $t9, 8($s0) -/* 06454C 8006394C 0C018E61 */ jal __CSPRepostEvent -/* 064550 80063950 00000000 */ nop -/* 064554 80063954 1620FFE8 */ bnez $s1, .L800638F8 -/* 064558 80063958 02208025 */ move $s0, $s1 -.L8006395C: -/* 06455C 8006395C 8FBF0034 */ lw $ra, 0x34($sp) -/* 064560 80063960 8FB00018 */ lw $s0, 0x18($sp) -/* 064564 80063964 8FB1001C */ lw $s1, 0x1c($sp) -/* 064568 80063968 8FB20020 */ lw $s2, 0x20($sp) -/* 06456C 8006396C 8FB30024 */ lw $s3, 0x24($sp) -/* 064570 80063970 8FB40028 */ lw $s4, 0x28($sp) -/* 064574 80063974 8FB5002C */ lw $s5, 0x2c($sp) -/* 064578 80063978 8FB60030 */ lw $s6, 0x30($sp) -/* 06457C 8006397C 03E00008 */ jr $ra -/* 064580 80063980 27BD0038 */ addiu $sp, $sp, 0x38 - diff --git a/asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s b/asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s deleted file mode 100644 index b87cc7dc..00000000 --- a/asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s +++ /dev/null @@ -1,63 +0,0 @@ -.late_rodata -glabel jpt_800E6C90 -.word L80062A90, L80062AF0, L80062AA8, L80062AC0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AF0, L80062AE8, L80062AE8, L80062AE8 - -.text -glabel __CSPHandleNextSeqEvent -/* 06363C 80062A3C 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 063640 80062A40 AFBF001C */ sw $ra, 0x1c($sp) -/* 063644 80062A44 AFB00018 */ sw $s0, 0x18($sp) -/* 063648 80062A48 8C860018 */ lw $a2, 0x18($a0) -/* 06364C 80062A4C 00808025 */ move $s0, $a0 -/* 063650 80062A50 10C00027 */ beqz $a2, .L80062AF0 -/* 063654 80062A54 27A50028 */ addiu $a1, $sp, 0x28 -/* 063658 80062A58 0C031F41 */ jal __alCSeqGetTrackEvent -/* 06365C 80062A5C 00C02025 */ move $a0, $a2 -/* 063660 80062A60 87AE0028 */ lh $t6, 0x28($sp) -/* 063664 80062A64 27A50028 */ addiu $a1, $sp, 0x28 -/* 063668 80062A68 25CFFFFF */ addiu $t7, $t6, -1 -/* 06366C 80062A6C 2DE10014 */ sltiu $at, $t7, 0x14 -/* 063670 80062A70 1020001F */ beqz $at, .L80062AF0 -/* 063674 80062A74 000F7880 */ sll $t7, $t7, 2 -/* 063678 80062A78 3C01800E */ lui $at, %hi(jpt_800E6C90) # $at, 0x800e -/* 06367C 80062A7C 002F0821 */ addu $at, $at, $t7 -/* 063680 80062A80 8C2F6C90 */ lw $t7, %lo(jpt_800E6C90)($at) -/* 063684 80062A84 00000000 */ nop -/* 063688 80062A88 01E00008 */ jr $t7 -/* 06368C 80062A8C 00000000 */ nop -glabel L80062A90 -/* 063690 80062A90 0C018AC0 */ jal __CSPHandleMIDIMsg -/* 063694 80062A94 02002025 */ move $a0, $s0 -/* 063698 80062A98 0C018A73 */ jal __CSPPostNextSeqEvent -/* 06369C 80062A9C 02002025 */ move $a0, $s0 -/* 0636A0 80062AA0 10000014 */ b .L80062AF4 -/* 0636A4 80062AA4 8FBF001C */ lw $ra, 0x1c($sp) -glabel L80062AA8 -/* 0636A8 80062AA8 0C018DFB */ jal __CSPHandleMetaMsg -/* 0636AC 80062AAC 02002025 */ move $a0, $s0 -/* 0636B0 80062AB0 0C018A73 */ jal __CSPPostNextSeqEvent -/* 0636B4 80062AB4 02002025 */ move $a0, $s0 -/* 0636B8 80062AB8 1000000E */ b .L80062AF4 -/* 0636BC 80062ABC 8FBF001C */ lw $ra, 0x1c($sp) -glabel L80062AC0 -/* 0636C0 80062AC0 24180002 */ li $t8, 2 -/* 0636C4 80062AC4 AE18002C */ sw $t8, 0x2c($s0) -/* 0636C8 80062AC8 24190010 */ li $t9, 16 -/* 0636CC 80062ACC 3C067FFF */ lui $a2, (0x7FFFFFFF >> 16) # lui $a2, 0x7fff -/* 0636D0 80062AD0 A7B90028 */ sh $t9, 0x28($sp) -/* 0636D4 80062AD4 34C6FFFF */ ori $a2, (0x7FFFFFFF & 0xFFFF) # ori $a2, $a2, 0xffff -/* 0636D8 80062AD8 0C03246B */ jal alEvtqPostEvent -/* 0636DC 80062ADC 26040048 */ addiu $a0, $s0, 0x48 -/* 0636E0 80062AE0 10000004 */ b .L80062AF4 -/* 0636E4 80062AE4 8FBF001C */ lw $ra, 0x1c($sp) -glabel L80062AE8 -/* 0636E8 80062AE8 0C018A73 */ jal __CSPPostNextSeqEvent -/* 0636EC 80062AEC 02002025 */ move $a0, $s0 -.L80062AF0: -glabel L80062AF0 -/* 0636F0 80062AF0 8FBF001C */ lw $ra, 0x1c($sp) -.L80062AF4: -/* 0636F4 80062AF4 8FB00018 */ lw $s0, 0x18($sp) -/* 0636F8 80062AF8 03E00008 */ jr $ra -/* 0636FC 80062AFC 27BD0038 */ addiu $sp, $sp, 0x38 - diff --git a/asm/non_matchings/unknown_061D30/__CSPPostNextSeqEvent.s b/asm/non_matchings/unknown_061D30/__CSPPostNextSeqEvent.s deleted file mode 100644 index d1b7c5cd..00000000 --- a/asm/non_matchings/unknown_061D30/__CSPPostNextSeqEvent.s +++ /dev/null @@ -1,32 +0,0 @@ -glabel __CSPPostNextSeqEvent -/* 0635CC 800629CC 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 0635D0 800629D0 AFBF0014 */ sw $ra, 0x14($sp) -/* 0635D4 800629D4 8C8E002C */ lw $t6, 0x2c($a0) -/* 0635D8 800629D8 24010001 */ li $at, 1 -/* 0635DC 800629DC 15C10013 */ bne $t6, $at, .L80062A2C -/* 0635E0 800629E0 00803825 */ move $a3, $a0 -/* 0635E4 800629E4 8C840018 */ lw $a0, 0x18($a0) -/* 0635E8 800629E8 27A5001C */ addiu $a1, $sp, 0x1c -/* 0635EC 800629EC 10800010 */ beqz $a0, .L80062A30 -/* 0635F0 800629F0 8FBF0014 */ lw $ra, 0x14($sp) -/* 0635F4 800629F4 0C0320FB */ jal __alCSeqNextDelta -/* 0635F8 800629F8 AFA70030 */ sw $a3, 0x30($sp) -/* 0635FC 800629FC 8FA70030 */ lw $a3, 0x30($sp) -/* 063600 80062A00 1040000B */ beqz $v0, .L80062A30 -/* 063604 80062A04 8FBF0014 */ lw $ra, 0x14($sp) -/* 063608 80062A08 A7A00020 */ sh $zero, 0x20($sp) -/* 06360C 80062A0C 8CEF0024 */ lw $t7, 0x24($a3) -/* 063610 80062A10 8FB8001C */ lw $t8, 0x1c($sp) -/* 063614 80062A14 24E40048 */ addiu $a0, $a3, 0x48 -/* 063618 80062A18 01F80019 */ multu $t7, $t8 -/* 06361C 80062A1C 27A50020 */ addiu $a1, $sp, 0x20 -/* 063620 80062A20 00003012 */ mflo $a2 -/* 063624 80062A24 0C03246B */ jal alEvtqPostEvent -/* 063628 80062A28 00000000 */ nop -.L80062A2C: -/* 06362C 80062A2C 8FBF0014 */ lw $ra, 0x14($sp) -.L80062A30: -/* 063630 80062A30 27BD0030 */ addiu $sp, $sp, 0x30 -/* 063634 80062A34 03E00008 */ jr $ra -/* 063638 80062A38 00000000 */ nop - diff --git a/asm/non_matchings/unknown_061D30/__CSPRepostEvent.s b/asm/non_matchings/unknown_061D30/__CSPRepostEvent.s deleted file mode 100644 index e8889da6..00000000 --- a/asm/non_matchings/unknown_061D30/__CSPRepostEvent.s +++ /dev/null @@ -1,51 +0,0 @@ -glabel __CSPRepostEvent -/* 064584 80063984 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 064588 80063988 AFBF0014 */ sw $ra, 0x14($sp) -/* 06458C 8006398C AFA40020 */ sw $a0, 0x20($sp) -/* 064590 80063990 24040001 */ li $a0, 1 -/* 064594 80063994 0C03268C */ jal osSetIntMask -/* 064598 80063998 AFA50024 */ sw $a1, 0x24($sp) -/* 06459C 8006399C 8FA30020 */ lw $v1, 0x20($sp) -/* 0645A0 800639A0 8FA70024 */ lw $a3, 0x24($sp) -/* 0645A4 800639A4 2401FFF8 */ li $at, -8 -/* 0645A8 800639A8 AFA2001C */ sw $v0, 0x1c($sp) -/* 0645AC 800639AC 1061001A */ beq $v1, $at, .L80063A18 -/* 0645B0 800639B0 24650008 */ addiu $a1, $v1, 8 -.L800639B4: -/* 0645B4 800639B4 8CA40000 */ lw $a0, ($a1) -/* 0645B8 800639B8 00000000 */ nop -/* 0645BC 800639BC 14800005 */ bnez $a0, .L800639D4 -/* 0645C0 800639C0 00000000 */ nop -/* 0645C4 800639C4 0C0321E4 */ jal alLink -/* 0645C8 800639C8 00E02025 */ move $a0, $a3 -/* 0645CC 800639CC 10000013 */ b .L80063A1C -/* 0645D0 800639D0 8FA4001C */ lw $a0, 0x1c($sp) -.L800639D4: -/* 0645D4 800639D4 8CE20008 */ lw $v0, 8($a3) -/* 0645D8 800639D8 8C830008 */ lw $v1, 8($a0) -/* 0645DC 800639DC 00000000 */ nop -/* 0645E0 800639E0 0043082A */ slt $at, $v0, $v1 -/* 0645E4 800639E4 10200007 */ beqz $at, .L80063A04 -/* 0645E8 800639E8 00437823 */ subu $t7, $v0, $v1 -/* 0645EC 800639EC 00627023 */ subu $t6, $v1, $v0 -/* 0645F0 800639F0 AC8E0008 */ sw $t6, 8($a0) -/* 0645F4 800639F4 0C0321E4 */ jal alLink -/* 0645F8 800639F8 00E02025 */ move $a0, $a3 -/* 0645FC 800639FC 10000007 */ b .L80063A1C -/* 064600 80063A00 8FA4001C */ lw $a0, 0x1c($sp) -.L80063A04: -/* 064604 80063A04 ACEF0008 */ sw $t7, 8($a3) -/* 064608 80063A08 8CA50000 */ lw $a1, ($a1) -/* 06460C 80063A0C 00000000 */ nop -/* 064610 80063A10 14A0FFE8 */ bnez $a1, .L800639B4 -/* 064614 80063A14 00000000 */ nop -.L80063A18: -/* 064618 80063A18 8FA4001C */ lw $a0, 0x1c($sp) -.L80063A1C: -/* 06461C 80063A1C 0C03268C */ jal osSetIntMask -/* 064620 80063A20 00000000 */ nop -/* 064624 80063A24 8FBF0014 */ lw $ra, 0x14($sp) -/* 064628 80063A28 27BD0020 */ addiu $sp, $sp, 0x20 -/* 06462C 80063A2C 03E00008 */ jr $ra -/* 064630 80063A30 00000000 */ nop - diff --git a/asm/non_matchings/unknown_061D30/__setUsptFromTempo.s b/asm/non_matchings/unknown_061D30/__setUsptFromTempo.s deleted file mode 100644 index b4612597..00000000 --- a/asm/non_matchings/unknown_061D30/__setUsptFromTempo.s +++ /dev/null @@ -1,28 +0,0 @@ -glabel __setUsptFromTempo -/* 064634 80063A34 8C820018 */ lw $v0, 0x18($a0) -/* 064638 80063A38 44856000 */ mtc1 $a1, $f12 -/* 06463C 80063A3C 1040000F */ beqz $v0, .L80063A7C -/* 064640 80063A40 241801E8 */ li $t8, 488 -/* 064644 80063A44 C4440008 */ lwc1 $f4, 8($v0) -/* 064648 80063A48 00000000 */ nop -/* 06464C 80063A4C 46046182 */ mul.s $f6, $f12, $f4 -/* 064650 80063A50 444EF800 */ cfc1 $t6, $31 -/* 064654 80063A54 00000000 */ nop -/* 064658 80063A58 35C10003 */ ori $at, $t6, 3 -/* 06465C 80063A5C 38210002 */ xori $at, $at, 2 -/* 064660 80063A60 44C1F800 */ ctc1 $at, $31 -/* 064664 80063A64 00000000 */ nop -/* 064668 80063A68 46003224 */ cvt.w.s $f8, $f6 -/* 06466C 80063A6C 440F4000 */ mfc1 $t7, $f8 -/* 064670 80063A70 44CEF800 */ ctc1 $t6, $31 -/* 064674 80063A74 03E00008 */ jr $ra -/* 064678 80063A78 AC8F0024 */ sw $t7, 0x24($a0) - -.L80063A7C: -/* 06467C 80063A7C AC980024 */ sw $t8, 0x24($a0) -/* 064680 80063A80 03E00008 */ jr $ra -/* 064684 80063A84 00000000 */ nop - -/* 064688 80063A88 00000000 */ nop -/* 06468C 80063A8C 00000000 */ nop - diff --git a/asm/non_matchings/unknown_0646F0/func_80063AF0.s b/asm/non_matchings/unknown_0646F0/func_80063AF0.s deleted file mode 100644 index a8255199..00000000 --- a/asm/non_matchings/unknown_0646F0/func_80063AF0.s +++ /dev/null @@ -1,23 +0,0 @@ -glabel func_80063AF0 -/* 0646F0 80063AF0 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 0646F4 80063AF4 AFBF0014 */ sw $ra, 0x14($sp) -/* 0646F8 80063AF8 AFA40028 */ sw $a0, 0x28($sp) -/* 0646FC 80063AFC AFA5002C */ sw $a1, 0x2c($sp) -/* 064700 80063B00 00A03825 */ move $a3, $a1 -/* 064704 80063B04 240E0002 */ li $t6, 2 -/* 064708 80063B08 240F00B0 */ li $t7, 176 -/* 06470C 80063B0C 2418006A */ li $t8, 106 -/* 064710 80063B10 A7AE0018 */ sh $t6, 0x18($sp) -/* 064714 80063B14 AFA0001C */ sw $zero, 0x1c($sp) -/* 064718 80063B18 A3AF0020 */ sb $t7, 0x20($sp) -/* 06471C 80063B1C A3B80021 */ sb $t8, 0x21($sp) -/* 064720 80063B20 A3A70022 */ sb $a3, 0x22($sp) -/* 064724 80063B24 27A50018 */ addiu $a1, $sp, 0x18 -/* 064728 80063B28 24840048 */ addiu $a0, $a0, 0x48 -/* 06472C 80063B2C 0C03246B */ jal alEvtqPostEvent -/* 064730 80063B30 00003025 */ move $a2, $zero -/* 064734 80063B34 8FBF0014 */ lw $ra, 0x14($sp) -/* 064738 80063B38 27BD0028 */ addiu $sp, $sp, 0x28 -/* 06473C 80063B3C 03E00008 */ jr $ra -/* 064740 80063B40 00000000 */ nop - diff --git a/asm/non_matchings/unknown_0646F0/func_80063B44.s b/asm/non_matchings/unknown_0646F0/func_80063B44.s deleted file mode 100644 index 325278a1..00000000 --- a/asm/non_matchings/unknown_0646F0/func_80063B44.s +++ /dev/null @@ -1,26 +0,0 @@ -glabel func_80063B44 -/* 064744 80063B44 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 064748 80063B48 AFBF0014 */ sw $ra, 0x14($sp) -/* 06474C 80063B4C AFA40028 */ sw $a0, 0x28($sp) -/* 064750 80063B50 AFA5002C */ sw $a1, 0x2c($sp) -/* 064754 80063B54 00A03825 */ move $a3, $a1 -/* 064758 80063B58 240E0002 */ li $t6, 2 -/* 06475C 80063B5C 240F00B0 */ li $t7, 176 -/* 064760 80063B60 2418006C */ li $t8, 108 -/* 064764 80063B64 A7AE0018 */ sh $t6, 0x18($sp) -/* 064768 80063B68 AFA0001C */ sw $zero, 0x1c($sp) -/* 06476C 80063B6C A3AF0020 */ sb $t7, 0x20($sp) -/* 064770 80063B70 A3B80021 */ sb $t8, 0x21($sp) -/* 064774 80063B74 A3A70022 */ sb $a3, 0x22($sp) -/* 064778 80063B78 27A50018 */ addiu $a1, $sp, 0x18 -/* 06477C 80063B7C 24840048 */ addiu $a0, $a0, 0x48 -/* 064780 80063B80 0C03246B */ jal alEvtqPostEvent -/* 064784 80063B84 00003025 */ move $a2, $zero -/* 064788 80063B88 8FBF0014 */ lw $ra, 0x14($sp) -/* 06478C 80063B8C 27BD0028 */ addiu $sp, $sp, 0x28 -/* 064790 80063B90 03E00008 */ jr $ra -/* 064794 80063B94 00000000 */ nop - -/* 064798 80063B98 00000000 */ nop -/* 06479C 80063B9C 00000000 */ nop - diff --git a/asm/non_matchings/unknown_064830/init_lpfilter.s b/asm/non_matchings/unknown_064830/init_lpfilter.s deleted file mode 100644 index 432f8fc0..00000000 --- a/asm/non_matchings/unknown_064830/init_lpfilter.s +++ /dev/null @@ -1,51 +0,0 @@ -glabel init_lpfilter -/* 065550 80064950 84820000 */ lh $v0, ($a0) -/* 065554 80064954 24194000 */ li $t9, 16384 -/* 065558 80064958 00027380 */ sll $t6, $v0, 0xe -/* 06555C 8006495C 000E1BC3 */ sra $v1, $t6, 0xf -/* 065560 80064960 00037C00 */ sll $t7, $v1, 0x10 -/* 065564 80064964 000F1C03 */ sra $v1, $t7, 0x10 -/* 065568 80064968 03234023 */ subu $t0, $t9, $v1 -/* 06556C 8006496C 24090001 */ li $t1, 1 -/* 065570 80064970 A4880002 */ sh $t0, 2($a0) -/* 065574 80064974 AC89002C */ sw $t1, 0x2c($a0) -/* 065578 80064978 00002825 */ move $a1, $zero -/* 06557C 8006497C 00803025 */ move $a2, $a0 -.L80064980: -/* 065580 80064980 24A50001 */ addiu $a1, $a1, 1 -/* 065584 80064984 28A10008 */ slti $at, $a1, 8 -/* 065588 80064988 24C60002 */ addiu $a2, $a2, 2 -/* 06558C 8006498C 1420FFFC */ bnez $at, .L80064980 -/* 065590 80064990 A4C00006 */ sh $zero, 6($a2) -/* 065594 80064994 44832000 */ mtc1 $v1, $f4 -/* 065598 80064998 3C0140D0 */ li $at, 0x40D00000 # 6.500000 -/* 06559C 8006499C 468021A1 */ cvt.d.w $f6, $f4 -/* 0655A0 800649A0 44816800 */ mtc1 $at, $f13 -/* 0655A4 800649A4 44806000 */ mtc1 $zero, $f12 -/* 0655A8 800649A8 24A50001 */ addiu $a1, $a1, 1 -/* 0655AC 800649AC 462C3083 */ div.d $f2, $f6, $f12 -/* 0655B0 800649B0 28A10010 */ slti $at, $a1, 0x10 -/* 0655B4 800649B4 A4C30008 */ sh $v1, 8($a2) -/* 0655B8 800649B8 24C60002 */ addiu $a2, $a2, 2 -/* 0655BC 800649BC 10200010 */ beqz $at, .L80064A00 -/* 0655C0 800649C0 46201006 */ mov.d $f0, $f2 -.L800649C4: -/* 0655C4 800649C4 46220002 */ mul.d $f0, $f0, $f2 -/* 0655C8 800649C8 24A50001 */ addiu $a1, $a1, 1 -/* 0655CC 800649CC 24C60002 */ addiu $a2, $a2, 2 -/* 0655D0 800649D0 462C0202 */ mul.d $f8, $f0, $f12 -/* 0655D4 800649D4 444AF800 */ cfc1 $t2, $31 -/* 0655D8 800649D8 00000000 */ nop -/* 0655DC 800649DC 35410003 */ ori $at, $t2, 3 -/* 0655E0 800649E0 38210002 */ xori $at, $at, 2 -/* 0655E4 800649E4 44C1F800 */ ctc1 $at, $31 -/* 0655E8 800649E8 28A10010 */ slti $at, $a1, 0x10 -/* 0655EC 800649EC 462042A4 */ cvt.w.d $f10, $f8 -/* 0655F0 800649F0 440B5000 */ mfc1 $t3, $f10 -/* 0655F4 800649F4 44CAF800 */ ctc1 $t2, $31 -/* 0655F8 800649F8 1420FFF2 */ bnez $at, .L800649C4 -/* 0655FC 800649FC A4CB0006 */ sh $t3, 6($a2) -.L80064A00: -/* 065600 80064A00 03E00008 */ jr $ra -/* 065604 80064A04 00000000 */ nop - diff --git a/include/PR/libaudio.h b/include/PR/libaudio.h index 9439df2e..6fb448cc 100644 --- a/include/PR/libaudio.h +++ b/include/PR/libaudio.h @@ -704,6 +704,7 @@ typedef struct { ALOscInit initOsc; ALOscUpdate updateOsc; ALOscStop stopOsc; + s32 unk7C; } ALCSPlayer; /* Maintain backwards compatibility with old routine names. */ diff --git a/asm/non_matchings/unknown_064830/alFxNew.s b/lib/asm/non_matchings/alFxNew/alFxNew.s similarity index 93% rename from asm/non_matchings/unknown_064830/alFxNew.s rename to lib/asm/non_matchings/alFxNew/alFxNew.s index 6f9b7480..9351ec84 100644 --- a/asm/non_matchings/unknown_064830/alFxNew.s +++ b/lib/asm/non_matchings/alFxNew/alFxNew.s @@ -48,11 +48,11 @@ glabel alFxNew /* 06569C 80064A9C AED80028 */ sw $t8, 0x28($s6) /* 0656A0 80064AA0 0050C821 */ addu $t9, $v0, $s0 /* 0656A4 80064AA4 9328001C */ lbu $t0, 0x1c($t9) -/* 0656A8 80064AA8 3C13800E */ lui $s3, %hi(D_800DD028) # $s3, 0x800e +/* 0656A8 80064AA8 3C13800E */ lui $s3, %hi(NULL_PARAMS) # $s3, 0x800e /* 0656AC 80064AAC 2509FFFF */ addiu $t1, $t0, -1 /* 0656B0 80064AB0 2D210006 */ sltiu $at, $t1, 6 /* 0656B4 80064AB4 1020001C */ beqz $at, .L80064B28 -/* 0656B8 80064AB8 2673D028 */ addiu $s3, %lo(D_800DD028) # addiu $s3, $s3, -0x2fd8 +/* 0656B8 80064AB8 2673D028 */ addiu $s3, %lo(NULL_PARAMS) # addiu $s3, $s3, -0x2fd8 /* 0656BC 80064ABC 00094880 */ sll $t1, $t1, 2 /* 0656C0 80064AC0 3C01800E */ lui $at, %hi(jpt_800E6EA0) # $at, 0x800e /* 0656C4 80064AC4 00290821 */ addu $at, $at, $t1 @@ -61,25 +61,25 @@ glabel alFxNew /* 0656D0 80064AD0 01200008 */ jr $t1 /* 0656D4 80064AD4 00000000 */ nop glabel L80064AD8 -/* 0656D8 80064AD8 3C13800E */ lui $s3, %hi(D_800DCEC0) # $s3, 0x800e +/* 0656D8 80064AD8 3C13800E */ lui $s3, %hi(SMALLROOM_PARAMS) # $s3, 0x800e /* 0656DC 80064ADC 10000012 */ b .L80064B28 -/* 0656E0 80064AE0 2673CEC0 */ addiu $s3, %lo(D_800DCEC0) # addiu $s3, $s3, -0x3140 +/* 0656E0 80064AE0 2673CEC0 */ addiu $s3, %lo(SMALLROOM_PARAMS) # addiu $s3, $s3, -0x3140 glabel L80064AE4 -/* 0656E4 80064AE4 3C13800E */ lui $s3, %hi(D_800DCF28) # $s3, 0x800e +/* 0656E4 80064AE4 3C13800E */ lui $s3, %hi(BIGROOM_PARAMS) # $s3, 0x800e /* 0656E8 80064AE8 1000000F */ b .L80064B28 -/* 0656EC 80064AEC 2673CF28 */ addiu $s3, %lo(D_800DCF28) # addiu $s3, $s3, -0x30d8 +/* 0656EC 80064AEC 2673CF28 */ addiu $s3, %lo(BIGROOM_PARAMS) # addiu $s3, $s3, -0x30d8 glabel L80064AF0 -/* 0656F0 80064AF0 3C13800E */ lui $s3, %hi(D_800DCFB0) # $s3, 0x800e +/* 0656F0 80064AF0 3C13800E */ lui $s3, %hi(ECHO_PARAMS) # $s3, 0x800e /* 0656F4 80064AF4 1000000C */ b .L80064B28 -/* 0656F8 80064AF8 2673CFB0 */ addiu $s3, %lo(D_800DCFB0) # addiu $s3, $s3, -0x3050 +/* 0656F8 80064AF8 2673CFB0 */ addiu $s3, %lo(ECHO_PARAMS) # addiu $s3, $s3, -0x3050 glabel L80064AFC -/* 0656FC 80064AFC 3C13800E */ lui $s3, %hi(D_800DCFD8) # $s3, 0x800e +/* 0656FC 80064AFC 3C13800E */ lui $s3, %hi(CHORUS_PARAMS) # $s3, 0x800e /* 065700 80064B00 10000009 */ b .L80064B28 -/* 065704 80064B04 2673CFD8 */ addiu $s3, %lo(D_800DCFD8) # addiu $s3, $s3, -0x3028 +/* 065704 80064B04 2673CFD8 */ addiu $s3, %lo(CHORUS_PARAMS) # addiu $s3, $s3, -0x3028 glabel L80064B08 -/* 065708 80064B08 3C13800E */ lui $s3, %hi(D_800DD000) # $s3, 0x800e +/* 065708 80064B08 3C13800E */ lui $s3, %hi(FLANGE_PARAMS) # $s3, 0x800e /* 06570C 80064B0C 10000006 */ b .L80064B28 -/* 065710 80064B10 2673D000 */ addiu $s3, %lo(D_800DD000) # addiu $s3, $s3, -0x3000 +/* 065710 80064B10 2673D000 */ addiu $s3, %lo(FLANGE_PARAMS) # addiu $s3, $s3, -0x3000 glabel L80064B14 /* 065714 80064B14 00105080 */ sll $t2, $s0, 2 /* 065718 80064B18 004A5821 */ addu $t3, $v0, $t2 diff --git a/asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s b/lib/asm/non_matchings/csplayer/__CSPHandleMIDIMsg.s similarity index 100% rename from asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s rename to lib/asm/non_matchings/csplayer/__CSPHandleMIDIMsg.s diff --git a/asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s b/lib/asm/non_matchings/csplayer/__CSPVoiceHandler.s similarity index 100% rename from asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s rename to lib/asm/non_matchings/csplayer/__CSPVoiceHandler.s diff --git a/asm/non_matchings/unknown_061D30/alCSPNew.s b/lib/asm/non_matchings/csplayer/alCSPNew.s similarity index 100% rename from asm/non_matchings/unknown_061D30/alCSPNew.s rename to lib/asm/non_matchings/csplayer/alCSPNew.s diff --git a/asm/non_matchings/unknown_064830/_doModFunc.s b/lib/asm/non_matchings/reverb/_doModFunc.s similarity index 100% rename from asm/non_matchings/unknown_064830/_doModFunc.s rename to lib/asm/non_matchings/reverb/_doModFunc.s diff --git a/asm/non_matchings/unknown_064830/_loadOutputBuffer.s b/lib/asm/non_matchings/reverb/_loadOutputBuffer.s similarity index 100% rename from asm/non_matchings/unknown_064830/_loadOutputBuffer.s rename to lib/asm/non_matchings/reverb/_loadOutputBuffer.s diff --git a/asm/non_matchings/unknown_064830/alFxParamHdl.s b/lib/asm/non_matchings/reverb/alFxParamHdl.s similarity index 100% rename from asm/non_matchings/unknown_064830/alFxParamHdl.s rename to lib/asm/non_matchings/reverb/alFxParamHdl.s diff --git a/asm/non_matchings/unknown_064830/alFxPull.s b/lib/asm/non_matchings/reverb/alFxPull.s similarity index 100% rename from asm/non_matchings/unknown_064830/alFxPull.s rename to lib/asm/non_matchings/reverb/alFxPull.s diff --git a/asm/non_matchings/unknown_064830/func_8006492C.s b/lib/asm/non_matchings/reverb/func_8006492C.s similarity index 100% rename from asm/non_matchings/unknown_064830/func_8006492C.s rename to lib/asm/non_matchings/reverb/func_8006492C.s diff --git a/src/unknown_065550.c b/lib/src/mips1/al/alFxNew.c similarity index 54% rename from src/unknown_065550.c rename to lib/src/mips1/al/alFxNew.c index a098f86e..f8a204e0 100644 --- a/src/unknown_065550.c +++ b/lib/src/mips1/al/alFxNew.c @@ -6,86 +6,68 @@ #include "libultra_internal.h" #include "audio_internal.h" +/* + * WARNING: THE FOLLOWING CONSTANT MUST BE KEPT IN SYNC + * WITH SCALING IN MICROCODE!!! + */ #define SCALE 16384 -/************ .data ************/ +/* + * the following arrays contain default parameters for + * a few hopefully useful effects. + */ +#define ms *(((s32)((f32)44.1))&~0x7) -// TODO: Figure out what this actually is. -s32 D_800DCEC0[26] = { - 0x00000003, 0x00000FA0, - 0x00000000, 0x00000870, - 0x00002666, 0xFFFFD99A, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x000002F8, 0x000005F0, - 0x00000CCC, 0xFFFFF334, - 0x00003FFF, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000960, - 0x00001388, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00005000 +s32 SMALLROOM_PARAMS[26] = { + /* sections length */ + 3, 100 ms, + /* chorus chorus filter + input output fbcoef ffcoef gain rate depth coef */ + 0, 54 ms, 9830, -9830, 0, 0, 0, 0, + 19 ms, 38 ms, 3276, -3276, 0x3fff, 0, 0, 0, + 0, 60 ms, 5000, 0, 0, 0, 0, 0x5000 }; -// TODO: Figure out what this actually is. -s32 D_800DCF28[34] = { - 0x00000004, 0x00000FA0, - 0x00000000, 0x00000A50, - 0x00002666, 0xFFFFD99A, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x00000370, 0x00000870, - 0x00000CCC, 0xFFFFF334, - 0x00003FFF, 0x00000000, - 0x00000000, 0x00000000, - 0x00000A50, 0x00000E38, - 0x00000CCC, 0xFFFFF334, - 0x00003FFF, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000EB0, - 0x00001F40, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00005000 +s32 BIGROOM_PARAMS[34] = { + /* sections length */ + 4, 100 ms, + /* chorus chorus filter + input output fbcoef ffcoef gain rate depth coef */ + 0, 66 ms, 9830, -9830, 0, 0, 0, 0, + 22 ms, 54 ms, 3276, -3276, 0x3fff, 0, 0, 0, + 66 ms, 91 ms, 3276, -3276, 0x3fff, 0, 0, 0, + 0, 94 ms, 8000, 0, 0, 0, 0, 0x5000 }; -// TODO: Figure out what this actually is. -s32 D_800DCFB0[10] = { - 0x00000001, 0x00001F40, - 0x00000000, 0x00001BF8, - 0x00002EE0, 0x00000000, - 0x00007FFF, 0x00000000, - 0x00000000, 0x00000000 +s32 ECHO_PARAMS[10] = { + /* sections length */ + 1, 200 ms, + /* chorus chorus filter + input output fbcoef ffcoef gain rate depth coef */ + 0, 179 ms, 12000, 0, 0x7fff, 0, 0, 0 }; -// TODO: Figure out what this actually is. -s32 D_800DCFD8[10] = { - 0x00000001, 0x00000320, - 0x00000000, 0x000000C8, - 0x00004000, 0x00000000, - 0x00007FFF, 0x00001DB0, - 0x000002BC, 0x00000000 +s32 CHORUS_PARAMS[10] = { + /* sections length */ + 1, 20 ms, + /* chorus chorus filter + input output fbcoef ffcoef gain rate depth coef */ + 0, 5 ms, 0x4000, 0, 0x7fff, 7600, 700, 0 }; -// TODO: Figure out what this actually is. -s32 D_800DD000[10] = { - 0x00000001, 0x00000320, - 0x00000000, 0x000000C8, - 0x00000000, 0x00005FFF, - 0x00007FFF, 0x0000017C, - 0x000001F4, 0x00000000 +s32 FLANGE_PARAMS[10] = { + /* sections length */ + 1, 20 ms, + /* chorus chorus filter + input output fbcoef ffcoef gain rate depth coef */ + 0, 5 ms, 0, 0x5fff, 0x7fff, 380, 500, 0 }; -// TODO: Figure out what this actually is. -s32 D_800DD028[10] = { - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, 0x00000000 +s32 NULL_PARAMS[10] = { + 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 }; -/*******************************/ - extern s32 alAuxBusPull; extern s32 alAuxBusParam; extern s32 alEnvMixerPull; @@ -122,7 +104,7 @@ void init_lpfilter(ALLowPass *lp) } } -GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxNew.s") +GLOBAL_ASM("lib/asm/non_matchings/alFxNew/alFxNew.s") void alEnvmixerNew(ALEnvMixer* e, s32 arg1) { alFilterNew(e, &alEnvMixerPull, &alEnvmixerParam, 4); diff --git a/lib/src/mips1/al/csplayer.c b/lib/src/mips1/al/csplayer.c new file mode 100644 index 00000000..b57c3d0a --- /dev/null +++ b/lib/src/mips1/al/csplayer.c @@ -0,0 +1,175 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80062290 */ + +#include "PR/os_exception.h" +#include "types.h" +#include "macros.h" +#include "audio_internal.h" +#include "seqp.h" + +/************ .rodata ************/ + +const char D_800E6C20[] = "CSP: oh oh \n"; + +/*********************************/ + +void __CSPPostNextSeqEvent(ALCSPlayer *seqp); +void __CSPHandleNextSeqEvent(ALCSPlayer *seqp); +void __CSPHandleMetaMsg(ALCSPlayer *seqp, ALEvent *event); +void __CSPRepostEvent(ALEventQueue *evtq, ALEventListItem *item); +void __setUsptFromTempo(ALCSPlayer *seqp, f32 tempo); + +GLOBAL_ASM("lib/asm/non_matchings/csplayer/alCSPNew.s") +GLOBAL_ASM("lib/asm/non_matchings/csplayer/__CSPVoiceHandler.s") + +void __CSPPostNextSeqEvent(ALCSPlayer *seqp) +{ + ALEvent evt; + s32 deltaTicks; + + if (seqp->state != AL_PLAYING || seqp->target == NULL) + return; + + /* Get the next event time in ticks. */ + /* If false is returned, then there is no next delta (ie. end of sequence reached). */ + if (!__alCSeqNextDelta(seqp->target, &deltaTicks)) + return; + + evt.type = AL_SEQ_REF_EVT; + alEvtqPostEvent(&seqp->evtq, &evt, deltaTicks * seqp->uspt); +} + +void __CSPHandleNextSeqEvent(ALCSPlayer *seqp) +{ + ALEvent evt; + + if (seqp->target == NULL) + return; + + __alCSeqGetTrackEvent(seqp->target, &evt); + + switch (evt.type) + { + case AL_SEQ_MIDI_EVT: + __CSPHandleMIDIMsg(seqp, &evt); + __CSPPostNextSeqEvent(seqp); + break; + + case AL_TEMPO_EVT: + __CSPHandleMetaMsg(seqp, &evt); + __CSPPostNextSeqEvent(seqp); + break; + + case AL_SEQ_END_EVT: + seqp->state = AL_STOPPING; + evt.type = AL_SEQP_STOP_EVT; + alEvtqPostEvent(&seqp->evtq, &evt, AL_EVTQ_END); + break; + + case AL_TRACK_END: + case AL_CSP_LOOPSTART: + case AL_CSP_LOOPEND: + __CSPPostNextSeqEvent(seqp); + break; + } +} + +GLOBAL_ASM("lib/asm/non_matchings/csplayer/__CSPHandleMIDIMsg.s") + +void __CSPHandleMetaMsg(ALCSPlayer *seqp, ALEvent *event) +{ + ALTempoEvent *tevt = &event->msg.tempo; + ALEvent evt; + s32 tempo; + s32 oldUspt; + u32 ticks; + ALMicroTime tempDelta,curDelta = 0; + ALEventListItem *thisNode,*nextNode,*firstTemp = 0; + + + if (event->msg.tempo.status == AL_MIDI_Meta) + { + if (event->msg.tempo.type == AL_MIDI_META_TEMPO) + { + oldUspt = seqp->uspt; + tempo = (tevt->byte1 << 16) | (tevt->byte2 << 8) | (tevt->byte3 << 0); + __setUsptFromTempo (seqp, (f32)tempo); /* sct 1/8/96 */ + + thisNode = (ALEventListItem*)seqp->evtq.allocList.next; + while(thisNode) + { + curDelta += thisNode->delta; + nextNode = (ALEventListItem*)thisNode->node.next; + if(thisNode->evt.type == AL_CSP_NOTEOFF_EVT) + { + alUnlink((ALLink*)thisNode); + + if(firstTemp) + alLink((ALLink*)thisNode,(ALLink*)firstTemp); + else + { + thisNode->node.next = 0; + thisNode->node.prev = 0; + firstTemp = thisNode; + } + tempDelta = curDelta; /* record the current delta */ + if(nextNode) /* don't do this if no nextNode */ + { + curDelta -= thisNode->delta; /* subtract out this delta */ + nextNode->delta += thisNode->delta; /* add it to next event */ + } + thisNode->delta = tempDelta; /* set this event delta from current */ + } + thisNode = nextNode; + } + + thisNode = firstTemp; + while(thisNode) + { + nextNode = (ALEventListItem*)thisNode->node.next; + ticks = thisNode->delta/oldUspt; + thisNode->delta = ticks * seqp->uspt; + __CSPRepostEvent(&seqp->evtq,thisNode); + thisNode = nextNode; + } + } + } +} + +void __CSPRepostEvent(ALEventQueue *evtq, ALEventListItem *item) +{ + OSIntMask mask; + ALLink *node; + ALEventListItem *nextItem; + + mask = osSetIntMask(OS_IM_NONE); + + for (node = &evtq->allocList; node != 0; node = node->next) + { + if (!node->next) /* end of the list */ + { + alLink((ALLink *)item, node); + break; + } + else + { + nextItem = (ALEventListItem *)node->next; + if (item->delta < nextItem->delta) + { + nextItem->delta -= item->delta; + alLink((ALLink *)item, node); + break; + } + item->delta -= nextItem->delta; + } + } + osSetIntMask(mask); +} + +void __setUsptFromTempo(ALCSPlayer *seqp, f32 tempo) +{ + if (seqp->target) + seqp->uspt = (s32)((f32)tempo * seqp->target->qnpt); + else + seqp->uspt = 488; /* This is the initial value set by alSeqpNew. */ +} diff --git a/src/unknown_064830.c b/lib/src/mips1/al/reverb.c similarity index 91% rename from src/unknown_064830.c rename to lib/src/mips1/al/reverb.c index 9ac418ef..7efd720f 100644 --- a/src/unknown_064830.c +++ b/lib/src/mips1/al/reverb.c @@ -1,8 +1,6 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80063C30 */ -#include "unknown_064830.h" - #include "types.h" #include "macros.h" #include "libultra_internal.h" @@ -17,7 +15,7 @@ s32 D_800DCEBC = 0x20; // Currently unknown, might be a different type. /*******************************/ -GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxPull.s") +GLOBAL_ASM("lib/asm/non_matchings/reverb/alFxPull.s") s32 alFxParam(void* filter, s32 paramID, void* param) { if (paramID == 1) { @@ -26,8 +24,8 @@ s32 alFxParam(void* filter, s32 paramID, void* param) { return 0; } -GLOBAL_ASM("asm/non_matchings/unknown_064830/alFxParamHdl.s") -GLOBAL_ASM("asm/non_matchings/unknown_064830/_loadOutputBuffer.s") +GLOBAL_ASM("lib/asm/non_matchings/reverb/alFxParamHdl.s") +GLOBAL_ASM("lib/asm/non_matchings/reverb/_loadOutputBuffer.s") /* * This routine is for loading data from the delay line buff. If the @@ -133,5 +131,5 @@ Acmd *_filterBuffer(ALLowPass *lp, s32 buff, s32 count, Acmd *p) return ptr; } -GLOBAL_ASM("asm/non_matchings/unknown_064830/_doModFunc.s") -GLOBAL_ASM("asm/non_matchings/unknown_064830/func_8006492C.s") +GLOBAL_ASM("lib/asm/non_matchings/reverb/_doModFunc.s") +GLOBAL_ASM("lib/asm/non_matchings/reverb/func_8006492C.s") diff --git a/lib/src/mips1/al/seqp.h b/lib/src/mips1/al/seqp.h new file mode 100644 index 00000000..c9ab02ba --- /dev/null +++ b/lib/src/mips1/al/seqp.h @@ -0,0 +1,37 @@ + + +#define KILL_TIME 50000 /* 50 ms */ + +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif + +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + +ALVoiceState *__mapVoice(ALSeqPlayer *, u8, u8, u8); +void __unmapVoice(ALSeqPlayer *seqp, ALVoice *voice); +char __voiceNeedsNoteKill(ALSeqPlayer *seqp, ALVoice *voice, ALMicroTime killTime); /* sct 1/5/96 */ + +ALVoiceState *__lookupVoice(ALSeqPlayer *, u8, u8); +ALSound *__lookupSound(ALSeqPlayer *, u8, u8, u8); +ALSound *__lookupSoundQuick(ALSeqPlayer *, u8, u8, u8); + +s16 __vsVol(ALVoiceState *voice, ALSeqPlayer *seqp); +ALMicroTime __vsDelta(ALVoiceState *voice, ALMicroTime t); +ALPan __vsPan(ALVoiceState *voice, ALSeqPlayer *seqp); + +void __initFromBank(ALSeqPlayer *seqp, ALBank *b); +void __initChanState(ALSeqPlayer *seqp); +void __resetPerfChanState(ALSeqPlayer *seqp, s32 chan); +void __setInstChanState(ALSeqPlayer *seqp, ALInstrument *inst, s32 chan); + +void __seqpPrintVoices(ALSeqPlayer *); +void __seqpReleaseVoice(ALSeqPlayer *seqp, ALVoice *voice, + ALMicroTime deltaTime); + +void __seqpStopOsc(ALSeqPlayer *seqp, ALVoiceState *vs); + +void __postNextSeqEvent(ALSeqPlayer *seqp); /* sct 11/7/95 */ + diff --git a/src/unknown_064690.c b/lib/src/mips1/al/unknown_064690.c similarity index 95% rename from src/unknown_064690.c rename to lib/src/mips1/al/unknown_064690.c index b5e3a0f9..f7fcb336 100644 --- a/src/unknown_064690.c +++ b/lib/src/mips1/al/unknown_064690.c @@ -1,8 +1,6 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80063A90 */ -#include "unknown_064690.h" - #include "types.h" #include "macros.h" diff --git a/lib/src/mips1/al/unknown_0646F0.c b/lib/src/mips1/al/unknown_0646F0.c new file mode 100644 index 00000000..6c354c2c --- /dev/null +++ b/lib/src/mips1/al/unknown_0646F0.c @@ -0,0 +1,38 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80063AF0 */ + +#include "types.h" +#include "macros.h" +#include "audio_internal.h" + +/* Size: 0x0C bytes */ +typedef struct unk80063AF0 { + s16 unk0; + s16 unk2; + s32 unk4; + u8 unk8; + u8 unk9; + u8 unkA; +} unk80063AF0; + +void func_80063AF0(u32 arg0, u8 arg1) { + s32 unusedVariable; + unk80063AF0 unknownStruct; + unknownStruct.unk0 = 2; + unknownStruct.unk4 = 0; + unknownStruct.unk8 = 0xB0; + unknownStruct.unk9 = 0x6A; + unknownStruct.unkA = arg1; + alEvtqPostEvent(arg0 + 0x48, &unknownStruct, 0); +} + +void func_80063B44(u32 arg0, u8 arg1) { + s32 unusedVariable; + unk80063AF0 unknownStruct; + unknownStruct.unk0 = 2; + unknownStruct.unk4 = 0; + unknownStruct.unk8 = 0xB0; + unknownStruct.unk9 = 0x6C; + unknownStruct.unkA = arg1; + alEvtqPostEvent(arg0 + 0x48, &unknownStruct, 0); +} diff --git a/src/unknown_0647A0.c b/lib/src/mips1/al/unknown_0647A0.c similarity index 95% rename from src/unknown_0647A0.c rename to lib/src/mips1/al/unknown_0647A0.c index 76c8aa95..aba14871 100644 --- a/src/unknown_0647A0.c +++ b/lib/src/mips1/al/unknown_0647A0.c @@ -1,10 +1,9 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80063BA0 */ -#include "unknown_0647A0.h" - #include "types.h" #include "macros.h" +#include "audio_internal.h" /* Size: 0x0C bytes */ typedef struct unk80063BA0 { diff --git a/src/unknown_064800.c b/lib/src/mips1/al/unknown_064800.c similarity index 95% rename from src/unknown_064800.c rename to lib/src/mips1/al/unknown_064800.c index 78a630af..45a5a1ab 100644 --- a/src/unknown_064800.c +++ b/lib/src/mips1/al/unknown_064800.c @@ -1,8 +1,6 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80063C00 */ -#include "unknown_064800.h" - #include "types.h" #include "macros.h" #include "audio_internal.h" diff --git a/src/unknown_060450.c b/src/unknown_060450.c index 4a3d97fd..51c46c4f 100644 --- a/src/unknown_060450.c +++ b/src/unknown_060450.c @@ -67,6 +67,8 @@ void func_8005F850(void) { D_8011D63C = load_asset_section_from_rom(ASSET_OBJECT_ANIMATIONS_TABLE); D_8011D644 = allocate_from_main_pool_safe(0xC00, COLOR_TAG_GREEN); D_8011D640 = 0; + + // Anti-tamper check. checksum = 0; for (i = 0; i < D_800DCEA4; i++) { checksum += *(u8*)(((s32)&func_80024D54) + i); diff --git a/src/unknown_061D30.c b/src/unknown_061D30.c deleted file mode 100644 index eb172ba6..00000000 --- a/src/unknown_061D30.c +++ /dev/null @@ -1,22 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x80062290 */ - -#include "unknown_061D30.h" - -#include "types.h" -#include "macros.h" - -/************ .rodata ************/ - -const char D_800E6C20[] = "CSP: oh oh \n"; - -/*********************************/ - -GLOBAL_ASM("asm/non_matchings/unknown_061D30/alCSPNew.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPVoiceHandler.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPPostNextSeqEvent.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPHandleNextSeqEvent.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPHandleMIDIMsg.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPHandleMetaMsg.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/__CSPRepostEvent.s") -GLOBAL_ASM("asm/non_matchings/unknown_061D30/__setUsptFromTempo.s") diff --git a/src/unknown_061D30.h b/src/unknown_061D30.h deleted file mode 100644 index 935df3f2..00000000 --- a/src/unknown_061D30.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _UNKNOWN_061D30_H_ -#define _UNKNOWN_061D30_H_ - -#endif \ No newline at end of file diff --git a/src/unknown_064690.h b/src/unknown_064690.h deleted file mode 100644 index 0477abc7..00000000 --- a/src/unknown_064690.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _UNKNOWN_064690_H_ -#define _UNKNOWN_064690_H_ - -#endif \ No newline at end of file diff --git a/src/unknown_0646F0.c b/src/unknown_0646F0.c deleted file mode 100644 index cc9fe5a1..00000000 --- a/src/unknown_0646F0.c +++ /dev/null @@ -1,10 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x80063AF0 */ - -#include "unknown_0646F0.h" - -#include "types.h" -#include "macros.h" - -GLOBAL_ASM("asm/non_matchings/unknown_0646F0/func_80063AF0.s") -GLOBAL_ASM("asm/non_matchings/unknown_0646F0/func_80063B44.s") diff --git a/src/unknown_0646F0.h b/src/unknown_0646F0.h deleted file mode 100644 index 98b804d7..00000000 --- a/src/unknown_0646F0.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _UNKNOWN_0646F0_H_ -#define _UNKNOWN_0646F0_H_ - -#endif \ No newline at end of file diff --git a/src/unknown_0647A0.h b/src/unknown_0647A0.h deleted file mode 100644 index 612b7f25..00000000 --- a/src/unknown_0647A0.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _UNKNOWN_0647A0_H_ -#define _UNKNOWN_0647A0_H_ - -#endif \ No newline at end of file diff --git a/src/unknown_064800.h b/src/unknown_064800.h deleted file mode 100644 index 96e628b1..00000000 --- a/src/unknown_064800.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _UNKNOWN_064800_H_ -#define _UNKNOWN_064800_H_ - -#endif \ No newline at end of file diff --git a/src/unknown_064830.h b/src/unknown_064830.h deleted file mode 100644 index 8fc2ba1d..00000000 --- a/src/unknown_064830.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _UNKNOWN_064830_H_ -#define _UNKNOWN_064830_H_ - -#include "types.h" - -extern s8 D_800DCEB0; -extern s32 D_800DCEB4; -extern s32 D_800DCEB8; -extern s32 D_800DCEBC; - -// TODO: Figure out what this actually is. -extern s32 D_800DCEC0[26]; - -// TODO: Figure out what this actually is. -extern s32 D_800DCF28[34]; - -// TODO: Figure out what this actually is. -extern s32 D_800DCFB0[10]; - -// TODO: Figure out what this actually is. -extern s32 D_800DCFD8[10]; - -// TODO: Figure out what this actually is. -extern s32 D_800DD000[10]; - -// TODO: Figure out what this actually is. -extern s32 D_800DD028[10]; - -#endif \ No newline at end of file