From 016c84875919e71413e13583f0f94a3dbeb22dca Mon Sep 17 00:00:00 2001 From: EpochFlame Date: Sun, 17 Sep 2023 13:25:49 -0400 Subject: [PATCH] link THPAudio.c slightly different from MKDD's instance --- .vscode/settings.json | 3 +- asm/Dolphin/thp/THPAudio.s | 320 --------------------- configure.py | 2 +- docs/recommended_todo.md | 10 +- include/THP/THPAudio.h | 38 +++ include/THP/THPAudioDecode.h | 2 +- src/Dolphin/thp/Makefile | 3 +- src/Dolphin/thp/THPAudio.c | 489 ++++++++++---------------------- src/sysGCU/pikmin2THPPlayer.cpp | 3 +- tools/progress.csv | 2 + 10 files changed, 195 insertions(+), 677 deletions(-) delete mode 100644 asm/Dolphin/thp/THPAudio.s create mode 100644 include/THP/THPAudio.h diff --git a/.vscode/settings.json b/.vscode/settings.json index 802530beb..cb4c148d4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,6 +26,7 @@ "thpaudiodecode.h": "c", "thpdraw.h": "c", "thpplayer.h": "c", - "thpvideodecode.h": "c" + "thpvideodecode.h": "c", + "thpaudio.h": "c" } } \ No newline at end of file diff --git a/asm/Dolphin/thp/THPAudio.s b/asm/Dolphin/thp/THPAudio.s deleted file mode 100644 index a627cedc7..000000000 --- a/asm/Dolphin/thp/THPAudio.s +++ /dev/null @@ -1,320 +0,0 @@ -.include "macros.inc" - -.section .text, "ax" # 0x800056C0 - 0x80472F00 -.fn THPAudioDecode, global -/* 800FE6B0 000FB5F0 7C 08 02 A6 */ mflr r0 -/* 800FE6B4 000FB5F4 28 03 00 00 */ cmplwi r3, 0 -/* 800FE6B8 000FB5F8 90 01 00 04 */ stw r0, 4(r1) -/* 800FE6BC 000FB5FC 94 21 FF A8 */ stwu r1, -0x58(r1) -/* 800FE6C0 000FB600 BE A1 00 2C */ stmw r21, 0x2c(r1) -/* 800FE6C4 000FB604 3B E4 00 00 */ addi r31, r4, 0 -/* 800FE6C8 000FB608 41 82 00 0C */ beq .L_800FE6D4 -/* 800FE6CC 000FB60C 28 1F 00 00 */ cmplwi r31, 0 -/* 800FE6D0 000FB610 40 82 00 0C */ bne .L_800FE6DC -.L_800FE6D4: -/* 800FE6D4 000FB614 38 60 00 00 */ li r3, 0 -/* 800FE6D8 000FB618 48 00 03 74 */ b .L_800FEA4C -.L_800FE6DC: -/* 800FE6DC 000FB61C 80 1F 00 00 */ lwz r0, 0(r31) -/* 800FE6E0 000FB620 2C 05 00 01 */ cmpwi r5, 1 -/* 800FE6E4 000FB624 38 9F 00 50 */ addi r4, r31, 0x50 -/* 800FE6E8 000FB628 7E DF 02 14 */ add r22, r31, r0 -/* 800FE6EC 000FB62C 3A D6 00 50 */ addi r22, r22, 0x50 -/* 800FE6F0 000FB630 40 82 00 1C */ bne .L_800FE70C -/* 800FE6F4 000FB634 80 1F 00 04 */ lwz r0, 4(r31) -/* 800FE6F8 000FB638 3B 83 00 00 */ addi r28, r3, 0 -/* 800FE6FC 000FB63C 3A E0 00 01 */ li r23, 1 -/* 800FE700 000FB640 54 00 08 3C */ slwi r0, r0, 1 -/* 800FE704 000FB644 7F A3 02 14 */ add r29, r3, r0 -/* 800FE708 000FB648 48 00 00 10 */ b .L_800FE718 -.L_800FE70C: -/* 800FE70C 000FB64C 3B 83 00 00 */ addi r28, r3, 0 -/* 800FE710 000FB650 3B A3 00 02 */ addi r29, r3, 2 -/* 800FE714 000FB654 3A E0 00 02 */ li r23, 2 -.L_800FE718: -/* 800FE718 000FB658 80 1F 00 00 */ lwz r0, 0(r31) -/* 800FE71C 000FB65C 28 00 00 00 */ cmplwi r0, 0 -/* 800FE720 000FB660 40 82 01 18 */ bne .L_800FE838 -/* 800FE724 000FB664 38 61 00 14 */ addi r3, r1, 0x14 -/* 800FE728 000FB668 48 00 03 C9 */ bl __THPAudioInitialize -/* 800FE72C 000FB66C 3C 60 00 01 */ lis r3, 0x00008000@ha -/* 800FE730 000FB670 AA DF 00 48 */ lha r22, 0x48(r31) -/* 800FE734 000FB674 3F 20 80 00 */ lis r25, 0x7FFFFFFF@ha -/* 800FE738 000FB678 AA BF 00 4A */ lha r21, 0x4a(r31) -/* 800FE73C 000FB67C 56 FE 08 3C */ slwi r30, r23, 1 -/* 800FE740 000FB680 3B 63 80 00 */ addi r27, r3, 0x00008000@l -/* 800FE744 000FB684 3B 59 FF FF */ addi r26, r25, 0x7FFFFFFF@l -/* 800FE748 000FB688 3A E0 00 00 */ li r23, 0 -/* 800FE74C 000FB68C 48 00 00 DC */ b .L_800FE828 -.L_800FE750: -/* 800FE750 000FB690 38 61 00 14 */ addi r3, r1, 0x14 -/* 800FE754 000FB694 48 00 03 0D */ bl __THPAudioGetNewSample -/* 800FE758 000FB698 88 A1 00 1C */ lbz r5, 0x1c(r1) -/* 800FE75C 000FB69C 7E A6 07 34 */ extsh r6, r21 -/* 800FE760 000FB6A0 88 01 00 1D */ lbz r0, 0x1d(r1) -/* 800FE764 000FB6A4 7E C4 07 34 */ extsh r4, r22 -/* 800FE768 000FB6A8 54 A5 10 3A */ slwi r5, r5, 2 -/* 800FE76C 000FB6AC 7C BF 2A 14 */ add r5, r31, r5 -/* 800FE770 000FB6B0 A8 E5 00 0A */ lha r7, 0xa(r5) -/* 800FE774 000FB6B4 7C 60 00 30 */ slw r0, r3, r0 -/* 800FE778 000FB6B8 A8 65 00 08 */ lha r3, 8(r5) -/* 800FE77C 000FB6BC 54 05 58 28 */ slwi r5, r0, 0xb -/* 800FE780 000FB6C0 7C C7 31 D6 */ mullw r6, r7, r6 -/* 800FE784 000FB6C4 7C 83 21 D6 */ mullw r4, r3, r4 -/* 800FE788 000FB6C8 7C C3 FE 70 */ srawi r3, r6, 0x1f -/* 800FE78C 000FB6CC 7C 80 FE 70 */ srawi r0, r4, 0x1f -/* 800FE790 000FB6D0 7C 86 20 14 */ addc r4, r6, r4 -/* 800FE794 000FB6D4 7C 63 01 14 */ adde r3, r3, r0 -/* 800FE798 000FB6D8 7C A0 FE 70 */ srawi r0, r5, 0x1f -/* 800FE79C 000FB6DC 7C 84 28 14 */ addc r4, r4, r5 -/* 800FE7A0 000FB6E0 7C 63 01 14 */ adde r3, r3, r0 -/* 800FE7A4 000FB6E4 38 A0 00 05 */ li r5, 5 -/* 800FE7A8 000FB6E8 4B FC 39 45 */ bl __shl2i -/* 800FE7AC 000FB6EC 38 00 00 00 */ li r0, 0 -/* 800FE7B0 000FB6F0 7C 84 D8 14 */ addc r4, r4, r27 -/* 800FE7B4 000FB6F4 7C 63 01 14 */ adde r3, r3, r0 -/* 800FE7B8 000FB6F8 6C 06 80 00 */ xoris r6, r0, 0x8000 -/* 800FE7BC 000FB6FC 6C 65 80 00 */ xoris r5, r3, 0x8000 -/* 800FE7C0 000FB700 7C 04 D0 10 */ subfc r0, r4, r26 -/* 800FE7C4 000FB704 7C A5 31 10 */ subfe r5, r5, r6 -/* 800FE7C8 000FB708 7C A6 31 10 */ subfe r5, r6, r6 -/* 800FE7CC 000FB70C 7C A5 00 D1 */ neg. r5, r5 -/* 800FE7D0 000FB710 41 82 00 0C */ beq .L_800FE7DC -/* 800FE7D4 000FB714 38 99 FF FF */ addi r4, r25, -1 -/* 800FE7D8 000FB718 38 60 00 00 */ li r3, 0 -.L_800FE7DC: -/* 800FE7DC 000FB71C 38 00 FF FF */ li r0, -1 -/* 800FE7E0 000FB720 6C 05 80 00 */ xoris r5, r0, 0x8000 -/* 800FE7E4 000FB724 6C 66 80 00 */ xoris r6, r3, 0x8000 -/* 800FE7E8 000FB728 7C 19 20 10 */ subfc r0, r25, r4 -/* 800FE7EC 000FB72C 7C A5 31 10 */ subfe r5, r5, r6 -/* 800FE7F0 000FB730 7C A6 31 10 */ subfe r5, r6, r6 -/* 800FE7F4 000FB734 7C A5 00 D1 */ neg. r5, r5 -/* 800FE7F8 000FB738 41 82 00 0C */ beq .L_800FE804 -/* 800FE7FC 000FB73C 3C 80 80 00 */ lis r4, 0x8000 -/* 800FE800 000FB740 38 60 FF FF */ li r3, -1 -.L_800FE804: -/* 800FE804 000FB744 38 A0 00 10 */ li r5, 0x10 -/* 800FE808 000FB748 4B FC 39 2D */ bl __shr2i -/* 800FE80C 000FB74C B0 9D 00 00 */ sth r4, 0(r29) -/* 800FE810 000FB750 7E D5 B3 78 */ mr r21, r22 -/* 800FE814 000FB754 3A C4 00 00 */ addi r22, r4, 0 -/* 800FE818 000FB758 B0 9C 00 00 */ sth r4, 0(r28) -/* 800FE81C 000FB75C 7F BD F2 14 */ add r29, r29, r30 -/* 800FE820 000FB760 7F 9C F2 14 */ add r28, r28, r30 -/* 800FE824 000FB764 3A F7 00 01 */ addi r23, r23, 1 -.L_800FE828: -/* 800FE828 000FB768 80 1F 00 04 */ lwz r0, 4(r31) -/* 800FE82C 000FB76C 7C 17 00 40 */ cmplw r23, r0 -/* 800FE830 000FB770 41 80 FF 20 */ blt .L_800FE750 -/* 800FE834 000FB774 48 00 02 14 */ b .L_800FEA48 -.L_800FE838: -/* 800FE838 000FB778 38 61 00 14 */ addi r3, r1, 0x14 -/* 800FE83C 000FB77C 48 00 02 B5 */ bl __THPAudioInitialize -/* 800FE840 000FB780 3C 60 00 01 */ lis r3, 0x00008000@ha -/* 800FE844 000FB784 AB 1F 00 48 */ lha r24, 0x48(r31) -/* 800FE848 000FB788 3F 40 80 00 */ lis r26, 0x7FFFFFFF@ha -/* 800FE84C 000FB78C AA BF 00 4A */ lha r21, 0x4a(r31) -/* 800FE850 000FB790 56 FE 08 3C */ slwi r30, r23, 1 -/* 800FE854 000FB794 3B 23 80 00 */ addi r25, r3, 0x00008000@l -/* 800FE858 000FB798 3B 7A FF FF */ addi r27, r26, 0x7FFFFFFF@l -/* 800FE85C 000FB79C 3A E0 00 00 */ li r23, 0 -/* 800FE860 000FB7A0 48 00 00 D4 */ b .L_800FE934 -.L_800FE864: -/* 800FE864 000FB7A4 38 61 00 14 */ addi r3, r1, 0x14 -/* 800FE868 000FB7A8 48 00 01 F9 */ bl __THPAudioGetNewSample -/* 800FE86C 000FB7AC 88 A1 00 1C */ lbz r5, 0x1c(r1) -/* 800FE870 000FB7B0 7E A6 07 34 */ extsh r6, r21 -/* 800FE874 000FB7B4 88 01 00 1D */ lbz r0, 0x1d(r1) -/* 800FE878 000FB7B8 7F 04 07 34 */ extsh r4, r24 -/* 800FE87C 000FB7BC 54 A5 10 3A */ slwi r5, r5, 2 -/* 800FE880 000FB7C0 7C BF 2A 14 */ add r5, r31, r5 -/* 800FE884 000FB7C4 A8 E5 00 0A */ lha r7, 0xa(r5) -/* 800FE888 000FB7C8 7C 60 00 30 */ slw r0, r3, r0 -/* 800FE88C 000FB7CC A8 65 00 08 */ lha r3, 8(r5) -/* 800FE890 000FB7D0 54 05 58 28 */ slwi r5, r0, 0xb -/* 800FE894 000FB7D4 7C C7 31 D6 */ mullw r6, r7, r6 -/* 800FE898 000FB7D8 7C 83 21 D6 */ mullw r4, r3, r4 -/* 800FE89C 000FB7DC 7C C3 FE 70 */ srawi r3, r6, 0x1f -/* 800FE8A0 000FB7E0 7C 80 FE 70 */ srawi r0, r4, 0x1f -/* 800FE8A4 000FB7E4 7C 86 20 14 */ addc r4, r6, r4 -/* 800FE8A8 000FB7E8 7C 63 01 14 */ adde r3, r3, r0 -/* 800FE8AC 000FB7EC 7C A0 FE 70 */ srawi r0, r5, 0x1f -/* 800FE8B0 000FB7F0 7C 84 28 14 */ addc r4, r4, r5 -/* 800FE8B4 000FB7F4 7C 63 01 14 */ adde r3, r3, r0 -/* 800FE8B8 000FB7F8 38 A0 00 05 */ li r5, 5 -/* 800FE8BC 000FB7FC 4B FC 38 31 */ bl __shl2i -/* 800FE8C0 000FB800 38 E0 00 00 */ li r7, 0 -/* 800FE8C4 000FB804 7C 84 C8 14 */ addc r4, r4, r25 -/* 800FE8C8 000FB808 7C 63 39 14 */ adde r3, r3, r7 -/* 800FE8CC 000FB80C 6C E6 80 00 */ xoris r6, r7, 0x8000 -/* 800FE8D0 000FB810 6C 65 80 00 */ xoris r5, r3, 0x8000 -/* 800FE8D4 000FB814 7C 04 D8 10 */ subfc r0, r4, r27 -/* 800FE8D8 000FB818 7C A5 31 10 */ subfe r5, r5, r6 -/* 800FE8DC 000FB81C 7C A6 31 10 */ subfe r5, r6, r6 -/* 800FE8E0 000FB820 7C A5 00 D1 */ neg. r5, r5 -/* 800FE8E4 000FB824 41 82 00 0C */ beq .L_800FE8F0 -/* 800FE8E8 000FB828 38 9A FF FF */ addi r4, r26, -1 -/* 800FE8EC 000FB82C 38 67 00 00 */ addi r3, r7, 0 -.L_800FE8F0: -/* 800FE8F0 000FB830 38 E0 FF FF */ li r7, -1 -/* 800FE8F4 000FB834 6C 66 80 00 */ xoris r6, r3, 0x8000 -/* 800FE8F8 000FB838 6C E5 80 00 */ xoris r5, r7, 0x8000 -/* 800FE8FC 000FB83C 7C 1A 20 10 */ subfc r0, r26, r4 -/* 800FE900 000FB840 7C A5 31 10 */ subfe r5, r5, r6 -/* 800FE904 000FB844 7C A6 31 10 */ subfe r5, r6, r6 -/* 800FE908 000FB848 7C A5 00 D1 */ neg. r5, r5 -/* 800FE90C 000FB84C 41 82 00 0C */ beq .L_800FE918 -/* 800FE910 000FB850 3C 80 80 00 */ lis r4, 0x8000 -/* 800FE914 000FB854 38 67 00 00 */ addi r3, r7, 0 -.L_800FE918: -/* 800FE918 000FB858 38 A0 00 10 */ li r5, 0x10 -/* 800FE91C 000FB85C 4B FC 38 19 */ bl __shr2i -/* 800FE920 000FB860 B0 9D 00 00 */ sth r4, 0(r29) -/* 800FE924 000FB864 3A B8 00 00 */ addi r21, r24, 0 -/* 800FE928 000FB868 3B 04 00 00 */ addi r24, r4, 0 -/* 800FE92C 000FB86C 7F BD F2 14 */ add r29, r29, r30 -/* 800FE930 000FB870 3A F7 00 01 */ addi r23, r23, 1 -.L_800FE934: -/* 800FE934 000FB874 80 1F 00 04 */ lwz r0, 4(r31) -/* 800FE938 000FB878 7C 17 00 40 */ cmplw r23, r0 -/* 800FE93C 000FB87C 41 80 FF 28 */ blt .L_800FE864 -/* 800FE940 000FB880 38 61 00 14 */ addi r3, r1, 0x14 -/* 800FE944 000FB884 38 96 00 00 */ addi r4, r22, 0 -/* 800FE948 000FB888 48 00 01 A9 */ bl __THPAudioInitialize -/* 800FE94C 000FB88C 3C 60 00 01 */ lis r3, 0x00008000@ha -/* 800FE950 000FB890 AB 3F 00 4C */ lha r25, 0x4c(r31) -/* 800FE954 000FB894 3F A0 80 00 */ lis r29, 0x7FFFFFFF@ha -/* 800FE958 000FB898 AA DF 00 4E */ lha r22, 0x4e(r31) -/* 800FE95C 000FB89C 3B 43 80 00 */ addi r26, r3, 0x00008000@l -/* 800FE960 000FB8A0 3B 7D FF FF */ addi r27, r29, 0x7FFFFFFF@l -/* 800FE964 000FB8A4 3B 00 00 00 */ li r24, 0 -/* 800FE968 000FB8A8 48 00 00 D4 */ b .L_800FEA3C -.L_800FE96C: -/* 800FE96C 000FB8AC 38 61 00 14 */ addi r3, r1, 0x14 -/* 800FE970 000FB8B0 48 00 00 F1 */ bl __THPAudioGetNewSample -/* 800FE974 000FB8B4 88 A1 00 1C */ lbz r5, 0x1c(r1) -/* 800FE978 000FB8B8 7E C6 07 34 */ extsh r6, r22 -/* 800FE97C 000FB8BC 88 01 00 1D */ lbz r0, 0x1d(r1) -/* 800FE980 000FB8C0 7F 24 07 34 */ extsh r4, r25 -/* 800FE984 000FB8C4 54 A5 10 3A */ slwi r5, r5, 2 -/* 800FE988 000FB8C8 7C BF 2A 14 */ add r5, r31, r5 -/* 800FE98C 000FB8CC A8 E5 00 2A */ lha r7, 0x2a(r5) -/* 800FE990 000FB8D0 7C 60 00 30 */ slw r0, r3, r0 -/* 800FE994 000FB8D4 A8 65 00 28 */ lha r3, 0x28(r5) -/* 800FE998 000FB8D8 54 05 58 28 */ slwi r5, r0, 0xb -/* 800FE99C 000FB8DC 7C C7 31 D6 */ mullw r6, r7, r6 -/* 800FE9A0 000FB8E0 7C 83 21 D6 */ mullw r4, r3, r4 -/* 800FE9A4 000FB8E4 7C C3 FE 70 */ srawi r3, r6, 0x1f -/* 800FE9A8 000FB8E8 7C 80 FE 70 */ srawi r0, r4, 0x1f -/* 800FE9AC 000FB8EC 7C 86 20 14 */ addc r4, r6, r4 -/* 800FE9B0 000FB8F0 7C 63 01 14 */ adde r3, r3, r0 -/* 800FE9B4 000FB8F4 7C A0 FE 70 */ srawi r0, r5, 0x1f -/* 800FE9B8 000FB8F8 7C 84 28 14 */ addc r4, r4, r5 -/* 800FE9BC 000FB8FC 7C 63 01 14 */ adde r3, r3, r0 -/* 800FE9C0 000FB900 38 A0 00 05 */ li r5, 5 -/* 800FE9C4 000FB904 4B FC 37 29 */ bl __shl2i -/* 800FE9C8 000FB908 38 E0 00 00 */ li r7, 0 -/* 800FE9CC 000FB90C 7C 84 D0 14 */ addc r4, r4, r26 -/* 800FE9D0 000FB910 7C 63 39 14 */ adde r3, r3, r7 -/* 800FE9D4 000FB914 6C E6 80 00 */ xoris r6, r7, 0x8000 -/* 800FE9D8 000FB918 6C 65 80 00 */ xoris r5, r3, 0x8000 -/* 800FE9DC 000FB91C 7C 04 D8 10 */ subfc r0, r4, r27 -/* 800FE9E0 000FB920 7C A5 31 10 */ subfe r5, r5, r6 -/* 800FE9E4 000FB924 7C A6 31 10 */ subfe r5, r6, r6 -/* 800FE9E8 000FB928 7C A5 00 D1 */ neg. r5, r5 -/* 800FE9EC 000FB92C 41 82 00 0C */ beq .L_800FE9F8 -/* 800FE9F0 000FB930 38 9D FF FF */ addi r4, r29, -1 -/* 800FE9F4 000FB934 38 67 00 00 */ addi r3, r7, 0 -.L_800FE9F8: -/* 800FE9F8 000FB938 38 E0 FF FF */ li r7, -1 -/* 800FE9FC 000FB93C 6C 66 80 00 */ xoris r6, r3, 0x8000 -/* 800FEA00 000FB940 6C E5 80 00 */ xoris r5, r7, 0x8000 -/* 800FEA04 000FB944 7C 1D 20 10 */ subfc r0, r29, r4 -/* 800FEA08 000FB948 7C A5 31 10 */ subfe r5, r5, r6 -/* 800FEA0C 000FB94C 7C A6 31 10 */ subfe r5, r6, r6 -/* 800FEA10 000FB950 7C A5 00 D1 */ neg. r5, r5 -/* 800FEA14 000FB954 41 82 00 0C */ beq .L_800FEA20 -/* 800FEA18 000FB958 3C 80 80 00 */ lis r4, 0x8000 -/* 800FEA1C 000FB95C 38 67 00 00 */ addi r3, r7, 0 -.L_800FEA20: -/* 800FEA20 000FB960 38 A0 00 10 */ li r5, 0x10 -/* 800FEA24 000FB964 4B FC 37 11 */ bl __shr2i -/* 800FEA28 000FB968 B0 9C 00 00 */ sth r4, 0(r28) -/* 800FEA2C 000FB96C 3A D9 00 00 */ addi r22, r25, 0 -/* 800FEA30 000FB970 3B 24 00 00 */ addi r25, r4, 0 -/* 800FEA34 000FB974 7F 9C F2 14 */ add r28, r28, r30 -/* 800FEA38 000FB978 3B 18 00 01 */ addi r24, r24, 1 -.L_800FEA3C: -/* 800FEA3C 000FB97C 80 1F 00 04 */ lwz r0, 4(r31) -/* 800FEA40 000FB980 7C 18 00 40 */ cmplw r24, r0 -/* 800FEA44 000FB984 41 80 FF 28 */ blt .L_800FE96C -.L_800FEA48: -/* 800FEA48 000FB988 80 7F 00 04 */ lwz r3, 4(r31) -.L_800FEA4C: -/* 800FEA4C 000FB98C BA A1 00 2C */ lmw r21, 0x2c(r1) -/* 800FEA50 000FB990 80 01 00 5C */ lwz r0, 0x5c(r1) -/* 800FEA54 000FB994 38 21 00 58 */ addi r1, r1, 0x58 -/* 800FEA58 000FB998 7C 08 03 A6 */ mtlr r0 -/* 800FEA5C 000FB99C 4E 80 00 20 */ blr -.endfn THPAudioDecode - -.fn __THPAudioGetNewSample, local -/* 800FEA60 000FB9A0 80 03 00 04 */ lwz r0, 4(r3) -/* 800FEA64 000FB9A4 54 00 07 3F */ clrlwi. r0, r0, 0x1c -/* 800FEA68 000FB9A8 40 82 00 3C */ bne .L_800FEAA4 -/* 800FEA6C 000FB9AC 80 83 00 00 */ lwz r4, 0(r3) -/* 800FEA70 000FB9B0 88 04 00 00 */ lbz r0, 0(r4) -/* 800FEA74 000FB9B4 54 00 E7 7E */ rlwinm r0, r0, 0x1c, 0x1d, 0x1f -/* 800FEA78 000FB9B8 98 03 00 08 */ stb r0, 8(r3) -/* 800FEA7C 000FB9BC 80 83 00 00 */ lwz r4, 0(r3) -/* 800FEA80 000FB9C0 88 04 00 00 */ lbz r0, 0(r4) -/* 800FEA84 000FB9C4 54 00 07 3E */ clrlwi r0, r0, 0x1c -/* 800FEA88 000FB9C8 98 03 00 09 */ stb r0, 9(r3) -/* 800FEA8C 000FB9CC 80 83 00 00 */ lwz r4, 0(r3) -/* 800FEA90 000FB9D0 38 04 00 01 */ addi r0, r4, 1 -/* 800FEA94 000FB9D4 90 03 00 00 */ stw r0, 0(r3) -/* 800FEA98 000FB9D8 80 83 00 04 */ lwz r4, 4(r3) -/* 800FEA9C 000FB9DC 38 04 00 02 */ addi r0, r4, 2 -/* 800FEAA0 000FB9E0 90 03 00 04 */ stw r0, 4(r3) -.L_800FEAA4: -/* 800FEAA4 000FB9E4 80 03 00 04 */ lwz r0, 4(r3) -/* 800FEAA8 000FB9E8 54 00 07 FF */ clrlwi. r0, r0, 0x1f -/* 800FEAAC 000FB9EC 41 82 00 20 */ beq .L_800FEACC -/* 800FEAB0 000FB9F0 80 A3 00 00 */ lwz r5, 0(r3) -/* 800FEAB4 000FB9F4 88 85 00 00 */ lbz r4, 0(r5) -/* 800FEAB8 000FB9F8 38 05 00 01 */ addi r0, r5, 1 -/* 800FEABC 000FB9FC 90 03 00 00 */ stw r0, 0(r3) -/* 800FEAC0 000FBA00 54 80 E0 06 */ slwi r0, r4, 0x1c -/* 800FEAC4 000FBA04 7C 05 E6 70 */ srawi r5, r0, 0x1c -/* 800FEAC8 000FBA08 48 00 00 14 */ b .L_800FEADC -.L_800FEACC: -/* 800FEACC 000FBA0C 80 83 00 00 */ lwz r4, 0(r3) -/* 800FEAD0 000FBA10 88 04 00 00 */ lbz r0, 0(r4) -/* 800FEAD4 000FBA14 54 00 C0 06 */ rlwinm r0, r0, 0x18, 0, 3 -/* 800FEAD8 000FBA18 7C 05 E6 70 */ srawi r5, r0, 0x1c -.L_800FEADC: -/* 800FEADC 000FBA1C 80 83 00 04 */ lwz r4, 4(r3) -/* 800FEAE0 000FBA20 38 04 00 01 */ addi r0, r4, 1 -/* 800FEAE4 000FBA24 90 03 00 04 */ stw r0, 4(r3) -/* 800FEAE8 000FBA28 7C A3 2B 78 */ mr r3, r5 -/* 800FEAEC 000FBA2C 4E 80 00 20 */ blr -.endfn __THPAudioGetNewSample - -.fn __THPAudioInitialize, local -/* 800FEAF0 000FBA30 90 83 00 00 */ stw r4, 0(r3) -/* 800FEAF4 000FBA34 38 00 00 02 */ li r0, 2 -/* 800FEAF8 000FBA38 90 03 00 04 */ stw r0, 4(r3) -/* 800FEAFC 000FBA3C 80 83 00 00 */ lwz r4, 0(r3) -/* 800FEB00 000FBA40 88 04 00 00 */ lbz r0, 0(r4) -/* 800FEB04 000FBA44 54 00 E7 7E */ rlwinm r0, r0, 0x1c, 0x1d, 0x1f -/* 800FEB08 000FBA48 98 03 00 08 */ stb r0, 8(r3) -/* 800FEB0C 000FBA4C 80 83 00 00 */ lwz r4, 0(r3) -/* 800FEB10 000FBA50 88 04 00 00 */ lbz r0, 0(r4) -/* 800FEB14 000FBA54 54 00 07 3E */ clrlwi r0, r0, 0x1c -/* 800FEB18 000FBA58 98 03 00 09 */ stb r0, 9(r3) -/* 800FEB1C 000FBA5C 80 83 00 00 */ lwz r4, 0(r3) -/* 800FEB20 000FBA60 38 04 00 01 */ addi r0, r4, 1 -/* 800FEB24 000FBA64 90 03 00 00 */ stw r0, 0(r3) -/* 800FEB28 000FBA68 4E 80 00 20 */ blr -.endfn __THPAudioInitialize diff --git a/configure.py b/configure.py index 41084bf7d..2d52cd2c3 100755 --- a/configure.py +++ b/configure.py @@ -804,7 +804,7 @@ "host": False, "objects": [ "Dolphin/thp/THPDec", - "Dolphin/thp/THPAudio", + ["Dolphin/thp/THPAudio", True], ], }, { diff --git a/docs/recommended_todo.md b/docs/recommended_todo.md index ca96d6332..75aca0029 100644 --- a/docs/recommended_todo.md +++ b/docs/recommended_todo.md @@ -21,11 +21,11 @@ | ---- | ---- | ---- | ---- | | TRK_MINNOW_DOLPHIN/targsupp.c | 326 | gx/GXDisplayList.c | 647 | | Runtime/__init_cpp_exceptions.cpp | 684 | Runtime/global_destructor_chain.c | 965 | -| mtx/mtxvec.c | 3122 | TRK_MINNOW_DOLPHIN/mslsupp.c | 4555 | -| TRK_MINNOW_DOLPHIN/CircleBuffer.c | 4715 | TRK_MINNOW_DOLPHIN/serpoll.c | 4793 | -| TRK_MINNOW_DOLPHIN/mpc_7xx_603e.c | 5554 | mtx/mtx44.c | 5987 | -| os/OSReboot.c | 6397 | gx/GXGeometry.c | 6983 | -| thp/THPAudio.c | 7974 | TRK_MINNOW_DOLPHIN/dolphin_trk_glue.c | 10320 | +| mtx/mtxvec.c | 3122 | thp/THPAudio.c | 3671 | +| TRK_MINNOW_DOLPHIN/mslsupp.c | 4555 | TRK_MINNOW_DOLPHIN/CircleBuffer.c | 4715 | +| TRK_MINNOW_DOLPHIN/serpoll.c | 4793 | TRK_MINNOW_DOLPHIN/mpc_7xx_603e.c | 5554 | +| mtx/mtx44.c | 5987 | os/OSReboot.c | 6397 | +| gx/GXGeometry.c | 6983 | TRK_MINNOW_DOLPHIN/dolphin_trk_glue.c | 10320 | | exi/EXIUart.c | 10329 | TRK_MINNOW_DOLPHIN/dolphin_trk.c | 11230 | | TRK_MINNOW_DOLPHIN/support.c | 12046 | gx/GXTransform.c | 12379 | | gx/GXLight.c | 14151 | gx/GXTev.c | 14624 | diff --git a/include/THP/THPAudio.h b/include/THP/THPAudio.h new file mode 100644 index 000000000..6027e4b94 --- /dev/null +++ b/include/THP/THPAudio.h @@ -0,0 +1,38 @@ +#ifndef _THP_THPAUDIO_H +#define _THP_THPAUDIO_H + +#include "Dolphin/os.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct THPAudioRecordHeader { + u32 offsetNextChannel; + u32 sampleSize; + s16 lCoef[8][2]; + s16 rCoef[8][2]; + s16 lYn1; + s16 lYn2; + s16 rYn1; + s16 rYn2; +} THPAudioRecordHeader; + +typedef struct THPAudioDecodeInfo { + u8* encodeData; + u32 offsetNibbles; + u8 predictor; + u8 scale; + s16 yn1; + s16 yn2; +} THPAudioDecodeInfo; + +u32 THPAudioDecode(s16* audioBuffer, u8* audioFrame, s32 flag); +static s32 __THPAudioGetNewSample(THPAudioDecodeInfo* info); +static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/THP/THPAudioDecode.h b/include/THP/THPAudioDecode.h index 84394dcbe..3ac2aeaff 100644 --- a/include/THP/THPAudioDecode.h +++ b/include/THP/THPAudioDecode.h @@ -2,6 +2,7 @@ #define _THP_THPAUDIODECODE_H #include "Dolphin/os.h" +#include "THP/THPAudio.h" static void* AudioDecoderForOnMemory(void* bufPtr); static void* AudioDecoder(void* _); @@ -10,7 +11,6 @@ static void AudioDecode(THPReadBuffer* readBuffer); #ifdef __cplusplus extern "C" { #endif -int THPAudioDecode(s16* buffer, u8* frame, s32 flags); // TODO: determine args and name properly BOOL CreateAudioDecodeThread(OSPriority prio, void* param); void AudioDecodeThreadStart(); diff --git a/src/Dolphin/thp/Makefile b/src/Dolphin/thp/Makefile index a51945982..37e1e0d6d 100644 --- a/src/Dolphin/thp/Makefile +++ b/src/Dolphin/thp/Makefile @@ -1,8 +1,9 @@ THP_FILES:=\ $(BUILD_DIR)/asm/Dolphin/thp/THPDec.o\ - $(BUILD_DIR)/asm/Dolphin/thp/THPAudio.o\ + $(BUILD_DIR)/src/Dolphin/thp/THPAudio.o\ $(THP_FILES): CFLAGS += -common off +$(THP_FILES): MWCC_VERSION := 1.2.5n DEPENDS += $(THP_FILES:.o=.d) diff --git a/src/Dolphin/thp/THPAudio.c b/src/Dolphin/thp/THPAudio.c index c96576db7..e3cd3b66b 100644 --- a/src/Dolphin/thp/THPAudio.c +++ b/src/Dolphin/thp/THPAudio.c @@ -1,291 +1,128 @@ - +#include "THP/THPAudio.h" /* * --INFO-- * Address: 800FE6B0 * Size: 0003B0 */ -void THPAudioDecode(void) +u32 THPAudioDecode(s16* audioBuffer, u8* audioFrame, s32 flag) { - /* - .loc_0x0: - mflr r0 - cmplwi r3, 0 - stw r0, 0x4(r1) - stwu r1, -0x58(r1) - stmw r21, 0x2C(r1) - addi r31, r4, 0 - beq- .loc_0x24 - cmplwi r31, 0 - bne- .loc_0x2C - - .loc_0x24: - li r3, 0 - b .loc_0x39C - - .loc_0x2C: - lwz r0, 0x0(r31) - cmpwi r5, 0x1 - addi r4, r31, 0x50 - add r22, r31, r0 - addi r22, r22, 0x50 - bne- .loc_0x5C - lwz r0, 0x4(r31) - addi r28, r3, 0 - li r23, 0x1 - rlwinm r0,r0,1,0,30 - add r29, r3, r0 - b .loc_0x68 - - .loc_0x5C: - addi r28, r3, 0 - addi r29, r3, 0x2 - li r23, 0x2 - - .loc_0x68: - lwz r0, 0x0(r31) - cmplwi r0, 0 - bne- .loc_0x188 - addi r3, r1, 0x14 - bl 0x3C8 - lis r3, 0x1 - lha r22, 0x48(r31) - lis r25, 0x8000 - lha r21, 0x4A(r31) - rlwinm r30,r23,1,0,30 - subi r27, r3, 0x8000 - subi r26, r25, 0x1 - li r23, 0 - b .loc_0x178 - - .loc_0xA0: - addi r3, r1, 0x14 - bl .loc_0x3B0 - lbz r5, 0x1C(r1) - extsh r6, r21 - lbz r0, 0x1D(r1) - extsh r4, r22 - rlwinm r5,r5,2,0,29 - add r5, r31, r5 - lha r7, 0xA(r5) - slw r0, r3, r0 - lha r3, 0x8(r5) - rlwinm r5,r0,11,0,20 - mullw r6, r7, r6 - mullw r4, r3, r4 - srawi r3, r6, 0x1F - srawi r0, r4, 0x1F - addc r4, r6, r4 - adde r3, r3, r0 - srawi r0, r5, 0x1F - addc r4, r4, r5 - adde r3, r3, r0 - li r5, 0x5 - bl -0x3C6BC - li r0, 0 - addc r4, r4, r27 - adde r3, r3, r0 - xoris r6, r0, 0x8000 - xoris r5, r3, 0x8000 - subc r0, r26, r4 - subfe r5, r5, r6 - subfe r5, r6, r6 - neg. r5, r5 - beq- .loc_0x12C - subi r4, r25, 0x1 - li r3, 0 - - .loc_0x12C: - li r0, -0x1 - xoris r5, r0, 0x8000 - xoris r6, r3, 0x8000 - subc r0, r4, r25 - subfe r5, r5, r6 - subfe r5, r6, r6 - neg. r5, r5 - beq- .loc_0x154 - lis r4, 0x8000 - li r3, -0x1 - - .loc_0x154: - li r5, 0x10 - bl -0x3C6D4 - sth r4, 0x0(r29) - mr r21, r22 - addi r22, r4, 0 - sth r4, 0x0(r28) - add r29, r29, r30 - add r28, r28, r30 - addi r23, r23, 0x1 - - .loc_0x178: - lwz r0, 0x4(r31) - cmplw r23, r0 - blt+ .loc_0xA0 - b .loc_0x398 - - .loc_0x188: - addi r3, r1, 0x14 - bl 0x2B4 - lis r3, 0x1 - lha r24, 0x48(r31) - lis r26, 0x8000 - lha r21, 0x4A(r31) - rlwinm r30,r23,1,0,30 - subi r25, r3, 0x8000 - subi r27, r26, 0x1 - li r23, 0 - b .loc_0x284 - - .loc_0x1B4: - addi r3, r1, 0x14 - bl .loc_0x3B0 - lbz r5, 0x1C(r1) - extsh r6, r21 - lbz r0, 0x1D(r1) - extsh r4, r24 - rlwinm r5,r5,2,0,29 - add r5, r31, r5 - lha r7, 0xA(r5) - slw r0, r3, r0 - lha r3, 0x8(r5) - rlwinm r5,r0,11,0,20 - mullw r6, r7, r6 - mullw r4, r3, r4 - srawi r3, r6, 0x1F - srawi r0, r4, 0x1F - addc r4, r6, r4 - adde r3, r3, r0 - srawi r0, r5, 0x1F - addc r4, r4, r5 - adde r3, r3, r0 - li r5, 0x5 - bl -0x3C7D0 - li r7, 0 - addc r4, r4, r25 - adde r3, r3, r7 - xoris r6, r7, 0x8000 - xoris r5, r3, 0x8000 - subc r0, r27, r4 - subfe r5, r5, r6 - subfe r5, r6, r6 - neg. r5, r5 - beq- .loc_0x240 - subi r4, r26, 0x1 - addi r3, r7, 0 - - .loc_0x240: - li r7, -0x1 - xoris r6, r3, 0x8000 - xoris r5, r7, 0x8000 - subc r0, r4, r26 - subfe r5, r5, r6 - subfe r5, r6, r6 - neg. r5, r5 - beq- .loc_0x268 - lis r4, 0x8000 - addi r3, r7, 0 - - .loc_0x268: - li r5, 0x10 - bl -0x3C7E8 - sth r4, 0x0(r29) - addi r21, r24, 0 - addi r24, r4, 0 - add r29, r29, r30 - addi r23, r23, 0x1 - - .loc_0x284: - lwz r0, 0x4(r31) - cmplw r23, r0 - blt+ .loc_0x1B4 - addi r3, r1, 0x14 - addi r4, r22, 0 - bl 0x1A8 - lis r3, 0x1 - lha r25, 0x4C(r31) - lis r29, 0x8000 - lha r22, 0x4E(r31) - subi r26, r3, 0x8000 - subi r27, r29, 0x1 - li r24, 0 - b .loc_0x38C - - .loc_0x2BC: - addi r3, r1, 0x14 - bl .loc_0x3B0 - lbz r5, 0x1C(r1) - extsh r6, r22 - lbz r0, 0x1D(r1) - extsh r4, r25 - rlwinm r5,r5,2,0,29 - add r5, r31, r5 - lha r7, 0x2A(r5) - slw r0, r3, r0 - lha r3, 0x28(r5) - rlwinm r5,r0,11,0,20 - mullw r6, r7, r6 - mullw r4, r3, r4 - srawi r3, r6, 0x1F - srawi r0, r4, 0x1F - addc r4, r6, r4 - adde r3, r3, r0 - srawi r0, r5, 0x1F - addc r4, r4, r5 - adde r3, r3, r0 - li r5, 0x5 - bl -0x3C8D8 - li r7, 0 - addc r4, r4, r26 - adde r3, r3, r7 - xoris r6, r7, 0x8000 - xoris r5, r3, 0x8000 - subc r0, r27, r4 - subfe r5, r5, r6 - subfe r5, r6, r6 - neg. r5, r5 - beq- .loc_0x348 - subi r4, r29, 0x1 - addi r3, r7, 0 - - .loc_0x348: - li r7, -0x1 - xoris r6, r3, 0x8000 - xoris r5, r7, 0x8000 - subc r0, r4, r29 - subfe r5, r5, r6 - subfe r5, r6, r6 - neg. r5, r5 - beq- .loc_0x370 - lis r4, 0x8000 - addi r3, r7, 0 - - .loc_0x370: - li r5, 0x10 - bl -0x3C8F0 - sth r4, 0x0(r28) - addi r22, r25, 0 - addi r25, r4, 0 - add r28, r28, r30 - addi r24, r24, 0x1 - - .loc_0x38C: - lwz r0, 0x4(r31) - cmplw r24, r0 - blt+ .loc_0x2BC - - .loc_0x398: - lwz r3, 0x4(r31) - - .loc_0x39C: - lmw r21, 0x2C(r1) - lwz r0, 0x5C(r1) - addi r1, r1, 0x58 - mtlr r0 - blr - - .loc_0x3B0: - */ + THPAudioRecordHeader* header; + THPAudioDecodeInfo decInfo; + u8 *left, *right; + s16 *decLeftPtr, *decRightPtr; + s16 yn1, yn2; + s32 i; + s32 step; + s32 sample; + s64 yn; + + if (audioBuffer == NULL || audioFrame == NULL) { + return 0; + } + + header = (THPAudioRecordHeader*)audioFrame; + left = audioFrame + sizeof(THPAudioRecordHeader); + right = left + header->offsetNextChannel; + + if (flag == 1) { + decRightPtr = audioBuffer; + decLeftPtr = audioBuffer + header->sampleSize; + step = 1; + } else { + decRightPtr = audioBuffer; + decLeftPtr = audioBuffer + 1; + step = 2; + } + + if (header->offsetNextChannel == 0) { + __THPAudioInitialize(&decInfo, left); + + yn1 = header->lYn1; + yn2 = header->lYn2; + + for (i = 0; i < header->sampleSize; i++) { + sample = __THPAudioGetNewSample(&decInfo); + yn = header->lCoef[decInfo.predictor][1] * yn2; + yn += header->lCoef[decInfo.predictor][0] * yn1; + yn += (sample << decInfo.scale) << 11; + yn <<= 5; + + yn += 0x8000; + + if (yn > 2147483647LL) { + yn = 2147483647LL; + } + + if (yn < -2147483648LL) { + yn = -2147483648LL; + } + + *decLeftPtr = (s16)(yn >> 16); + decLeftPtr += step; + *decRightPtr = (s16)(yn >> 16); + decRightPtr += step; + yn2 = yn1; + yn1 = (s16)(yn >> 16); + } + } else { + __THPAudioInitialize(&decInfo, left); + + yn1 = header->lYn1; + yn2 = header->lYn2; + + for (i = 0; i < header->sampleSize; i++) { + sample = __THPAudioGetNewSample(&decInfo); + yn = header->lCoef[decInfo.predictor][1] * yn2; + yn += header->lCoef[decInfo.predictor][0] * yn1; + yn += (sample << decInfo.scale) << 11; + yn <<= 5; + yn += 0x8000; + + if (yn > 2147483647LL) { + yn = 2147483647LL; + } + + if (yn < -2147483648LL) { + yn = -2147483648LL; + } + + *decLeftPtr = (s16)(yn >> 16); + decLeftPtr += step; + yn2 = yn1; + yn1 = (s16)(yn >> 16); + } + + __THPAudioInitialize(&decInfo, right); + + yn1 = header->rYn1; + yn2 = header->rYn2; + + for (i = 0; i < header->sampleSize; i++) { + sample = __THPAudioGetNewSample(&decInfo); + yn = header->rCoef[decInfo.predictor][1] * yn2; + yn += header->rCoef[decInfo.predictor][0] * yn1; + yn += (sample << decInfo.scale) << 11; + yn <<= 5; + + yn += 0x8000; + + if (yn > 2147483647LL) { + yn = 2147483647LL; + } + + if (yn < -2147483648LL) { + yn = -2147483648LL; + } + + *decRightPtr = (s16)(yn >> 16); + decRightPtr += step; + yn2 = yn1; + yn1 = (s16)(yn >> 16); + } + } + + return header->sampleSize; } /* @@ -293,53 +130,26 @@ void THPAudioDecode(void) * Address: 800FEA60 * Size: 000090 */ -void __THPAudioGetNewSample(void) +static s32 __THPAudioGetNewSample(THPAudioDecodeInfo* info) { - /* - .loc_0x0: - lwz r0, 0x4(r3) - rlwinm. r0,r0,0,28,31 - bne- .loc_0x44 - lwz r4, 0x0(r3) - lbz r0, 0x0(r4) - rlwinm r0,r0,28,29,31 - stb r0, 0x8(r3) - lwz r4, 0x0(r3) - lbz r0, 0x0(r4) - rlwinm r0,r0,0,28,31 - stb r0, 0x9(r3) - lwz r4, 0x0(r3) - addi r0, r4, 0x1 - stw r0, 0x0(r3) - lwz r4, 0x4(r3) - addi r0, r4, 0x2 - stw r0, 0x4(r3) - - .loc_0x44: - lwz r0, 0x4(r3) - rlwinm. r0,r0,0,31,31 - beq- .loc_0x6C - lwz r5, 0x0(r3) - lbz r4, 0x0(r5) - addi r0, r5, 0x1 - stw r0, 0x0(r3) - rlwinm r0,r4,28,0,3 - srawi r5, r0, 0x1C - b .loc_0x7C - - .loc_0x6C: - lwz r4, 0x0(r3) - lbz r0, 0x0(r4) - rlwinm r0,r0,24,0,3 - srawi r5, r0, 0x1C - - .loc_0x7C: - lwz r4, 0x4(r3) - addi r0, r4, 0x1 - stw r0, 0x4(r3) - mr r3, r5 - blr - */ + s32 sample; + + if (!(info->offsetNibbles & 0x0f)) { + info->predictor = (u8)((*(info->encodeData) & 0x70) >> 4); + info->scale = (u8)((*(info->encodeData) & 0xF)); + info->encodeData++; + info->offsetNibbles += 2; + } + + if (info->offsetNibbles & 0x1) { + sample = (s32)((*(info->encodeData) & 0xF) << 28) >> 28; + info->encodeData++; + } else { + sample = (s32)((*(info->encodeData) & 0xF0) << 24) >> 28; + } + + info->offsetNibbles++; + return sample; } /* @@ -347,24 +157,11 @@ void __THPAudioGetNewSample(void) * Address: 800FEAF0 * Size: 00003C */ -void __THPAudioInitialize(void) +static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr) { - /* - .loc_0x0: - stw r4, 0x0(r3) - li r0, 0x2 - stw r0, 0x4(r3) - lwz r4, 0x0(r3) - lbz r0, 0x0(r4) - rlwinm r0,r0,28,29,31 - stb r0, 0x8(r3) - lwz r4, 0x0(r3) - lbz r0, 0x0(r4) - rlwinm r0,r0,0,28,31 - stb r0, 0x9(r3) - lwz r4, 0x0(r3) - addi r0, r4, 0x1 - stw r0, 0x0(r3) - blr - */ + info->encodeData = ptr; + info->offsetNibbles = 2; + info->predictor = (u8)((*(info->encodeData) & 0x70) >> 4); + info->scale = (u8)((*(info->encodeData) & 0xF)); + info->encodeData++; } diff --git a/src/sysGCU/pikmin2THPPlayer.cpp b/src/sysGCU/pikmin2THPPlayer.cpp index e503ecb61..ee5683859 100644 --- a/src/sysGCU/pikmin2THPPlayer.cpp +++ b/src/sysGCU/pikmin2THPPlayer.cpp @@ -126,7 +126,6 @@ void THPPlayer::load() #elif VERNUM == 2 // usa JUT_PANICLINE(247, "THPPlayerInit failure."); #endif - } sys->dvdLoadUseCallBack(&mThreadCommand, &_C8); @@ -258,7 +257,7 @@ void THPPlayer::init(JKRHeap* heap) #elif VERNUM == 2 // usa P2ASSERTLINE(407, !mHeap); #endif - + JKRHeap* currHeap = JKRGetCurrentHeap(); heap = (!heap) ? currHeap : heap; heap->becomeCurrentHeap(); diff --git a/tools/progress.csv b/tools/progress.csv index 11d23dcd9..1f3fa99c1 100644 --- a/tools/progress.csv +++ b/tools/progress.csv @@ -555,3 +555,5 @@ You have 2671 out of 10000 Pokos and 81 out of 201 treasures.",2023-09-17 01:27: You have 2678 out of 10000 Pokos and 81 out of 201 treasures.",2023-09-17 01:41:05.177314 2683,1248364,0.26832965347419974,81,290183,0.40707099330018964," You have 2683 out of 10000 Pokos and 81 out of 201 treasures.",2023-09-17 16:38:44.901349 +2685,1249512,0.2685764103833932,81,290183,0.40707099330018964," +You have 2685 out of 10000 Pokos and 81 out of 201 treasures.",2023-09-17 13:25:30.678228