Import bss for audio and elsewhere (#416)

This commit is contained in:
MegaMech
2023-09-12 19:43:54 -06:00
committed by GitHub
parent f20221fab6
commit 4ee09e005f
29 changed files with 333 additions and 513 deletions
+11 -11
View File
@@ -1,22 +1,22 @@
.include "macros.inc"
.section .bss
.skip 96
glabel D_80162E70
.skip 64
glabel D_80162EB0
.skip 2
#glabel D_80162E70
#.skip 64
glabel D_80162EB2
.skip 6
#glabel D_80162EB0
#.skip 2
glabel D_80162EB8
.skip 80
#glabel D_80162EB2
#.skip 6
glabel D_80162F08
.skip 8
#glabel D_80162EB8
#.skip 80
#glabel D_80162F08 # fake ptr
#.skip 8
glabel D_80162F10
.skip 64
-82
View File
@@ -1,82 +0,0 @@
.include "macros.inc"
.section .bss
glabel D_8018E840
.skip 16
glabel D_8018E850
.skip 4
glabel D_8018E854
.skip 4
glabel D_8018E858
.skip 4
glabel D_8018E85C
.skip 4
glabel gTextColor
.skip 8
glabel gControllerPak1FileHandle
.skip 104
glabel gControllerPak2FileHandle
.skip 104
glabel D_8018E938
.skip 508
glabel D_8018EB34
.skip 4
glabel D_8018EB38
.skip 64
glabel gControllerPak1NumFilesUsed
.skip 4
glabel gControllerPak1MaxWriteableFiles
.skip 4
glabel gControllerPak1NumPagesFree
.skip 4
glabel gControllerPak1FileNote
.skip 4
glabel gControllerPak2FileNote
.skip 8
# SaveData
glabel gSaveData
.skip 512
glabel D_8018ED90
.skip 1
glabel D_8018ED91
.skip 3
glabel D_8018ED94
.skip 4
glabel D_8018ED98
.skip 4
glabel D_8018ED9C
.skip 4
glabel D_8018EDA0
.skip 4
glabel D_8018EDA4
.skip 4
glabel D_8018EDA8
.skip 4
glabel D_8018EDAC
.skip 4
+1 -43
View File
@@ -2,48 +2,6 @@
.section .bss
glabel D_8018EF10
.skip 8
glabel D_8018EF18
.skip 192
glabel D_8018EFD8
.skip 3000
glabel D_8018FB90
.skip 1
glabel D_8018FB91
.skip 7
glabel D_8018FB98
.skip 16
glabel D_8018FBA8
.skip 48
glabel D_8018FBD8
.skip 48
glabel D_8018FC08
.skip 8
glabel D_8018FC10
.skip 16
glabel sSoundRequests
.skip 6144
glabel sSoundBanks
.skip 5760
glabel sSoundBankUsedListBack
.skip 8
glabel sSoundBankFreeListFront
.skip 8
glabel sNumSoundsInBank
.skip 8
@@ -53,7 +11,7 @@ glabel D_80192AB8
glabel D_80192C38
.skip 4
glabel sSoundBankDisabled
glabel sSoundBankDisabled # 0x80192C3C
.skip 12
glabel D_80192C48
-177
View File
@@ -1,177 +0,0 @@
.include "macros.inc"
.section .bss
# Audio
glabel gSequencePlayers
.skip 148
glabel D_803B15A4
.skip 180
glabel D_803B1658
.skip 328
glabel D_803B17A0
.skip 48
glabel D_803B17D0
.skip 280
glabel D_803B18E8
.skip 328
# End of gSequencePlayers
glabel gSequenceChannels
.skip 9408
glabel gSequenceLayers
.skip 8192
glabel gSequenceChannelNone
.skip 108
glabel D_803B5F5C
.skip 92
glabel gLayerFreeList
.skip 16
glabel gNoteFreeLists
.skip 64
glabel gCurrAudioFrameDmaQueue
.skip 24
glabel gCurrAudioFrameDmaMesgBufs
.skip 256
glabel gCurrAudioFrameDmaIoMesgBufs
.skip 1536
glabel D_803B6720
.skip 24
glabel D_803B6738
.skip 8
glabel D_803B6740
.skip 24
glabel sSampleDmas
.skip 1792
glabel gSampleDmaNumListItems
.skip 4
glabel sSampleDmaListSize1
.skip 4
glabel D_803B6E60
.skip 8
glabel sSampleDmaReuseQueue1
.skip 256
glabel sSampleDmaReuseQueue2
.skip 256
glabel sSampleDmaReuseQueueTail1
.skip 1
glabel sSampleDmaReuseQueueTail2
.skip 1
glabel sSampleDmaReuseQueueHead1
.skip 1
glabel sSampleDmaReuseQueueHead2
.skip 1
glabel D_803B706C
.skip 4
glabel D_803B7070
.skip 4
glabel D_803B7074
.skip 4
glabel gAlBankSets
.skip 4
glabel D_803B707C
.skip 4
glabel gCtlEntries
.skip 8
glabel gAudioBufferParameters
.skip 32
glabel D_803B70A8
.skip 4
glabel D_803B70AC
.skip 4
glabel gMaxSimultaneousNotes
.skip 4
glabel D_803B70B4
.skip 2
glabel gAudioLibSoundMode
.skip 2
glabel D_803B70B8
.skip 4
glabel gCurrAudioFrameDmaCount
.skip 4
glabel D_803B70C0
.skip 4
glabel D_803B70C4
.skip 4
glabel D_803B70C8
.skip 8
glabel D_803B70D0
.skip 4
glabel D_803B70D4
.skip 4
glabel D_803B70D8
.skip 160
glabel D_803B7178
.skip 4
glabel D_803B717C
.skip 4
glabel D_803B7180
.skip 12
glabel D_803B718C
.skip 6
glabel D_803B7192
.skip 2
glabel gAudioRandom
.skip 4
glabel gAudioErrorFlags
.skip 8
glabel D_803B71A0
.skip 16
glabel D_803B71B0
+2 -2
View File
@@ -13,7 +13,7 @@ glabel func_800C29B4
/* 0C35E0 800C29E0 0C032EEE */ jal func_800CBBB8
/* 0C35E4 800C29E4 03012025 */ or $a0, $t8, $at
/* 0C35E8 800C29E8 93C90033 */ lbu $t1, 0x33($fp)
/* 0C35EC 800C29EC 3C018019 */ lui $at, %hi(D_80193318) # 0x8019
/* 0C35EC 800C29EC 3C018019 */ lui $at, %hi(D_801930D0+0x248) # 0x8019
/* 0C35F0 800C29F0 3408FFFF */ li $t0, 65535
/* 0C35F4 800C29F4 000950C0 */ sll $t2, $t1, 3
/* 0C35F8 800C29F8 01495021 */ addu $t2, $t2, $t1
@@ -23,7 +23,7 @@ glabel func_800C29B4
/* 0C3608 800C2A08 01495023 */ subu $t2, $t2, $t1
/* 0C360C 800C2A0C 000A5080 */ sll $t2, $t2, 2
/* 0C3610 800C2A10 002A0821 */ addu $at, $at, $t2
/* 0C3614 800C2A14 A4283318 */ sh $t0, %lo(D_80193318)($at) # 0x3318($at)
/* 0C3614 800C2A14 A4283318 */ sh $t0, %lo(D_801930D0+0x248)($at) # 0x3318($at)
/* 0C3618 800C2A18 8FDF002C */ lw $ra, 0x2c($fp)
/* 0C361C 800C2A1C 03C0E825 */ move $sp, $fp
/* 0C3620 800C2A20 8FDE0028 */ lw $fp, 0x28($fp)
+2 -2
View File
@@ -24,9 +24,9 @@ glabel func_800C3508
/* 0C415C 800C355C 00084080 */ sll $t0, $t0, 2
/* 0C4160 800C3560 01044023 */ subu $t0, $t0, $a0
/* 0C4164 800C3564 00084080 */ sll $t0, $t0, 2
/* 0C4168 800C3568 3C028019 */ lui $v0, %hi(D_80193318) # 0x8019
/* 0C4168 800C3568 3C028019 */ lui $v0, %hi(D_801930D0+0x248) # 0x8019
/* 0C416C 800C356C 00481021 */ addu $v0, $v0, $t0
/* 0C4170 800C3570 94423318 */ lhu $v0, %lo(D_80193318)($v0) # 0x3318($v0)
/* 0C4170 800C3570 94423318 */ lhu $v0, %lo(D_801930D0+0x248)($v0) # 0x3318($v0)
.L800C3574:
/* 0C4174 800C3574 03E00008 */ jr $ra
/* 0C4178 800C3578 25BD0010 */ addiu $sp, $t5, 0x10
+2 -2
View File
@@ -43,7 +43,7 @@ glabel func_800C4FE4
/* 0C5C84 800C5084 014B6021 */ addu $t4, $t2, $t3
/* 0C5C88 800C5088 91910004 */ lbu $s1, 4($t4)
/* 0C5C8C 800C508C 00137100 */ sll $t6, $s3, 4
/* 0C5C90 800C5090 3C04803B */ lui $a0, %hi(D_803B17D0) # 0x803b
/* 0C5C90 800C5090 3C04803B */ lui $a0, %hi(gSequencePlayers+0x2C0) # 0x803b
/* 0C5C94 800C5094 12210063 */ beq $s1, $at, .L800C5224
/* 0C5C98 800C5098 01D37023 */ subu $t6, $t6, $s3
/* 0C5C9C 800C509C 00117880 */ sll $t7, $s1, 2
@@ -60,7 +60,7 @@ glabel func_800C4FE4
/* 0C5CC8 800C50C8 008D2021 */ addu $a0, $a0, $t5
/* 0C5CCC 800C50CC 24010002 */ li $at, 2
/* 0C5CD0 800C50D0 1441002D */ bne $v0, $at, .L800C5188
/* 0C5CD4 800C50D4 8C8417D0 */ lw $a0, %lo(D_803B17D0)($a0) # 0x17d0($a0)
/* 0C5CD4 800C50D4 8C8417D0 */ lw $a0, %lo(gSequencePlayers+0x2C0)($a0) # 0x17d0($a0)
/* 0C5CD8 800C50D8 8E080024 */ lw $t0, 0x24($s0)
/* 0C5CDC 800C50DC A206002C */ sb $a2, 0x2c($s0)
/* 0C5CE0 800C50E0 326400FF */ andi $a0, $s3, 0xff
+2 -2
View File
@@ -85,11 +85,11 @@ glabel func_800CA730
/* 0CB474 800CA874 1500003A */ bnez $t0, .L800CA960
/* 0CB478 800CA878 00000000 */ nop
/* 0CB47C 800CA87C 9129FC08 */ lbu $t1, %lo(D_8018FC08)($t1)
/* 0CB480 800CA880 3C0A803B */ lui $t2, %hi(D_803B1658) # $t2, 0x803b
/* 0CB480 800CA880 3C0A803B */ lui $t2, %hi(gSequencePlayers+0x148) # $t2, 0x803b
/* 0CB484 800CA884 3C041101 */ lui $a0, 0x1101
/* 0CB488 800CA888 11200030 */ beqz $t1, .L800CA94C
/* 0CB48C 800CA88C 00000000 */ nop
/* 0CB490 800CA890 8D4A1658 */ lw $t2, %lo(D_803B1658)($t2)
/* 0CB490 800CA890 8D4A1658 */ lw $t2, %lo(gSequencePlayers+0x148)($t2)
/* 0CB494 800CA894 24040001 */ li $a0, 1
/* 0CB498 800CA898 000A5FC2 */ srl $t3, $t2, 0x1f
/* 0CB49C 800CA89C 1560000B */ bnez $t3, .L800CA8CC
+24 -24
View File
@@ -17,10 +17,10 @@ glabel func_800CB818
/* 0CC454 800CB854 10410033 */ beq $v0, $at, .L800CB924
/* 0CC458 800CB858 240100F1 */ li $at, 241
/* 0CC45C 800CB85C 10410035 */ beq $v0, $at, .L800CB934
/* 0CC460 800CB860 3C03803B */ lui $v1, %hi(D_803B1658) # 0x803b
/* 0CC460 800CB860 3C03803B */ lui $v1, %hi(gSequencePlayers+0x148) # 0x803b
/* 0CC464 800CB864 240100F2 */ li $at, 242
/* 0CC468 800CB868 10410046 */ beq $v0, $at, .L800CB984
/* 0CC46C 800CB86C 3C03803B */ lui $v1, %hi(D_803B1658) # $v1, 0x803b
/* 0CC46C 800CB86C 3C03803B */ lui $v1, %hi(gSequencePlayers+0x148) # $v1, 0x803b
/* 0CC470 800CB870 240100F3 */ li $at, 243
/* 0CC474 800CB874 5041005C */ beql $v0, $at, .L800CB9E8
/* 0CC478 800CB878 90E40001 */ lbu $a0, 1($a3)
@@ -78,49 +78,49 @@ glabel func_800CB818
.L800CB934:
/* 0CC534 800CB934 3C02803B */ lui $v0, %hi(gSequencePlayers) # $v0, 0x803b
/* 0CC538 800CB938 904B1510 */ lbu $t3, %lo(gSequencePlayers)($v0)
/* 0CC53C 800CB93C 90681658 */ lbu $t0, %lo(D_803B1658)($v1)
/* 0CC540 800CB940 3C04803B */ lui $a0, %hi(D_803B17A0) # $a0, 0x803b
/* 0CC544 800CB944 3C05803B */ lui $a1, %hi(D_803B18E8) # $a1, 0x803b
/* 0CC548 800CB948 90AA18E8 */ lbu $t2, %lo(D_803B18E8)($a1)
/* 0CC54C 800CB94C 908E17A0 */ lbu $t6, %lo(D_803B17A0)($a0)
/* 0CC53C 800CB93C 90681658 */ lbu $t0, %lo(gSequencePlayers+0x148)($v1)
/* 0CC540 800CB940 3C04803B */ lui $a0, %hi(gSequencePlayers+0x290) # $a0, 0x803b
/* 0CC544 800CB944 3C05803B */ lui $a1, %hi(gSequencePlayers+0x3D8) # $a1, 0x803b
/* 0CC548 800CB948 90AA18E8 */ lbu $t2, %lo(gSequencePlayers+0x3D8)($a1)
/* 0CC54C 800CB94C 908E17A0 */ lbu $t6, %lo(gSequencePlayers+0x290)($a0)
/* 0CC550 800CB950 3C01803B */ lui $at, %hi(gSequencePlayers) # $at, 0x803b
/* 0CC554 800CB954 35620024 */ ori $v0, $t3, 0x24
/* 0CC558 800CB958 A0221510 */ sb $v0, %lo(gSequencePlayers)($at)
/* 0CC55C 800CB95C 3C01803B */ lui $at, %hi(D_803B1658) # $at, 0x803b
/* 0CC55C 800CB95C 3C01803B */ lui $at, %hi(gSequencePlayers+0x148) # $at, 0x803b
/* 0CC560 800CB960 35030024 */ ori $v1, $t0, 0x24
/* 0CC564 800CB964 A0231658 */ sb $v1, %lo(D_803B1658)($at)
/* 0CC568 800CB968 3C01803B */ lui $at, %hi(D_803B17A0) # $at, 0x803b
/* 0CC564 800CB964 A0231658 */ sb $v1, %lo(gSequencePlayers+0x148)($at)
/* 0CC568 800CB968 3C01803B */ lui $at, %hi(gSequencePlayers+0x290) # $at, 0x803b
/* 0CC56C 800CB96C 35D80024 */ ori $t8, $t6, 0x24
/* 0CC570 800CB970 A03817A0 */ sb $t8, %lo(D_803B17A0)($at)
/* 0CC574 800CB974 3C01803B */ lui $at, %hi(D_803B18E8) # $at, 0x803b
/* 0CC570 800CB970 A03817A0 */ sb $t8, %lo(gSequencePlayers+0x290)($at)
/* 0CC574 800CB974 3C01803B */ lui $at, %hi(gSequencePlayers+0x3D8) # $at, 0x803b
/* 0CC578 800CB978 354C0024 */ ori $t4, $t2, 0x24
/* 0CC57C 800CB97C 1000001D */ b .L800CB9F4
/* 0CC580 800CB980 A02C18E8 */ sb $t4, %lo(D_803B18E8)($at)
/* 0CC580 800CB980 A02C18E8 */ sb $t4, %lo(gSequencePlayers+0x3D8)($at)
.L800CB984:
/* 0CC584 800CB984 3C02803B */ lui $v0, %hi(gSequencePlayers) # $v0, 0x803b
/* 0CC588 800CB988 90421510 */ lbu $v0, %lo(gSequencePlayers)($v0)
/* 0CC58C 800CB98C 90631658 */ lbu $v1, %lo(D_803B1658)($v1)
/* 0CC590 800CB990 3C04803B */ lui $a0, %hi(D_803B17A0) # $a0, 0x803b
/* 0CC594 800CB994 908417A0 */ lbu $a0, %lo(D_803B17A0)($a0)
/* 0CC598 800CB998 3C05803B */ lui $a1, %hi(D_803B18E8) # $a1, 0x803b
/* 0CC58C 800CB98C 90631658 */ lbu $v1, %lo(gSequencePlayers+0x148)($v1)
/* 0CC590 800CB990 3C04803B */ lui $a0, %hi(gSequencePlayers+0x290) # $a0, 0x803b
/* 0CC594 800CB994 908417A0 */ lbu $a0, %lo(gSequencePlayers+0x290)($a0)
/* 0CC598 800CB998 3C05803B */ lui $a1, %hi(gSequencePlayers+0x3D8) # $a1, 0x803b
/* 0CC59C 800CB99C 304FFFDF */ andi $t7, $v0, 0xffdf
/* 0CC5A0 800CB9A0 90A518E8 */ lbu $a1, %lo(D_803B18E8)($a1)
/* 0CC5A0 800CB9A0 90A518E8 */ lbu $a1, %lo(gSequencePlayers+0x3D8)($a1)
/* 0CC5A4 800CB9A4 3C01803B */ lui $at, %hi(gSequencePlayers) # $at, 0x803b
/* 0CC5A8 800CB9A8 35E20004 */ ori $v0, $t7, 4
/* 0CC5AC 800CB9AC A0221510 */ sb $v0, %lo(gSequencePlayers)($at)
/* 0CC5B0 800CB9B0 306AFFDF */ andi $t2, $v1, 0xffdf
/* 0CC5B4 800CB9B4 35430004 */ ori $v1, $t2, 4
/* 0CC5B8 800CB9B8 3C01803B */ lui $at, %hi(D_803B1658) # $at, 0x803b
/* 0CC5BC 800CB9BC A0231658 */ sb $v1, %lo(D_803B1658)($at)
/* 0CC5B8 800CB9B8 3C01803B */ lui $at, %hi(gSequencePlayers+0x148) # $at, 0x803b
/* 0CC5BC 800CB9BC A0231658 */ sb $v1, %lo(gSequencePlayers+0x148)($at)
/* 0CC5C0 800CB9C0 308FFFDF */ andi $t7, $a0, 0xffdf
/* 0CC5C4 800CB9C4 35F90004 */ ori $t9, $t7, 4
/* 0CC5C8 800CB9C8 3C01803B */ lui $at, %hi(D_803B17A0) # $at, 0x803b
/* 0CC5CC 800CB9CC A03917A0 */ sb $t9, %lo(D_803B17A0)($at)
/* 0CC5C8 800CB9C8 3C01803B */ lui $at, %hi(gSequencePlayers+0x290) # $at, 0x803b
/* 0CC5CC 800CB9CC A03917A0 */ sb $t9, %lo(gSequencePlayers+0x290)($at)
/* 0CC5D0 800CB9D0 30AAFFDF */ andi $t2, $a1, 0xffdf
/* 0CC5D4 800CB9D4 354C0004 */ ori $t4, $t2, 4
/* 0CC5D8 800CB9D8 3C01803B */ lui $at, %hi(D_803B18E8) # $at, 0x803b
/* 0CC5D8 800CB9D8 3C01803B */ lui $at, %hi(gSequencePlayers+0x3D8) # $at, 0x803b
/* 0CC5DC 800CB9DC 10000005 */ b .L800CB9F4
/* 0CC5E0 800CB9E0 A02C18E8 */ sb $t4, %lo(D_803B18E8)($at)
/* 0CC5E0 800CB9E0 A02C18E8 */ sb $t4, %lo(gSequencePlayers+0x3D8)($at)
/* 0CC5E4 800CB9E4 90E40001 */ lbu $a0, 1($a3)
.L800CB9E8:
/* 0CC5E8 800CB9E8 90E50002 */ lbu $a1, 2($a3)
@@ -1,25 +0,0 @@
glabel func_80011A5C
/* 01265C 80011A5C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 012660 80011A60 AFB20020 */ sw $s2, 0x20($sp)
/* 012664 80011A64 AFB1001C */ sw $s1, 0x1c($sp)
/* 012668 80011A68 AFB00018 */ sw $s0, 0x18($sp)
/* 01266C 80011A6C 3C108016 */ lui $s0, %hi(D_80162EB8) # $s0, 0x8016
/* 012670 80011A70 3C11800E */ lui $s1, %hi(D_800DC720)
/* 012674 80011A74 3C128016 */ lui $s2, %hi(D_80162F08) # $s2, 0x8016
/* 012678 80011A78 AFBF0024 */ sw $ra, 0x24($sp)
/* 01267C 80011A7C 26522F08 */ addiu $s2, %lo(D_80162F08) # addiu $s2, $s2, 0x2f08
/* 012680 80011A80 2631C720 */ addiu $s1, %lo(D_800DC720) # addiu $s1, $s1, -0x38e0
/* 012684 80011A84 26102EB8 */ addiu $s0, %lo(D_80162EB8) # addiu $s0, $s0, 0x2eb8
.L80011A88:
/* 012688 80011A88 0C026455 */ jal segmented_to_virtual_dupe_2
/* 01268C 80011A8C 8E240000 */ lw $a0, ($s1)
/* 012690 80011A90 26100004 */ addiu $s0, $s0, 4
/* 012694 80011A94 26310004 */ addiu $s1, $s1, 4
/* 012698 80011A98 1612FFFB */ bne $s0, $s2, .L80011A88
/* 01269C 80011A9C AE02FFFC */ sw $v0, -4($s0)
/* 0126A0 80011AA0 8FBF0024 */ lw $ra, 0x24($sp)
/* 0126A4 80011AA4 8FB00018 */ lw $s0, 0x18($sp)
/* 0126A8 80011AA8 8FB1001C */ lw $s1, 0x1c($sp)
/* 0126AC 80011AAC 8FB20020 */ lw $s2, 0x20($sp)
/* 0126B0 80011AB0 03E00008 */ jr $ra
/* 0126B4 80011AB4 27BD0028 */ addiu $sp, $sp, 0x28
@@ -167,8 +167,8 @@ glabel add_8018D9E0_entry
/* 09F370 8009E770 00000000 */ nop
glabel L8009E774
/* 09F374 8009E774 44802000 */ mtc1 $zero, $f4
/* 09F378 8009E778 3C018019 */ lui $at, %hi(D_8018ED94) # $at, 0x8019
/* 09F37C 8009E77C AC20ED94 */ sw $zero, %lo(D_8018ED94)($at)
/* 09F378 8009E778 3C018019 */ lui $at, %hi(s8018ED94) # $at, 0x8019
/* 09F37C 8009E77C AC20ED94 */ sw $zero, %lo(s8018ED94)($at)
/* 09F380 8009E780 3C01800F */ lui $at, %hi(D_800E8530) # $at, 0x800f
/* 09F384 8009E784 E4248530 */ swc1 $f4, %lo(D_800E8530)($at)
/* 09F388 8009E788 3C014040 */ li $at, 0x40400000 # 3.000000
@@ -71,18 +71,18 @@ glabel func_800A0B80
/* 0A1884 800A0C84 24C60001 */ addiu $a2, $a2, 1
/* 0A1888 800A0C88 82C20000 */ lb $v0, ($s6)
.L800A0C8C:
/* 0A188C 800A0C8C 3C0D8019 */ lui $t5, %hi(D_8018EB34) # 0x8019
/* 0A188C 800A0C8C 3C0D8019 */ lui $t5, %hi(pfsState+0x1FC) # 0x8019
/* 0A1890 800A0C90 8EEB0010 */ lw $t3, 0x10($s7)
/* 0A1894 800A0C94 00026080 */ sll $t4, $v0, 2
/* 0A1898 800A0C98 01AC6821 */ addu $t5, $t5, $t4
/* 0A189C 800A0C9C 8DADEB34 */ lw $t5, %lo(D_8018EB34)($t5) # -0x14cc($t5)
/* 0A189C 800A0C9C 8DADEB34 */ lw $t5, %lo(pfsState+0x1FC)($t5) # -0x14cc($t5)
/* 0A18A0 800A0CA0 01719021 */ addu $s2, $t3, $s1
/* 0A18A4 800A0CA4 26520001 */ addiu $s2, $s2, 1
/* 0A18A8 800A0CA8 15A0003B */ bnez $t5, .L800A0D98
/* 0A18AC 800A0CAC 2406004F */ li $a2, 79
/* 0A18B0 800A0CB0 00027140 */ sll $t6, $v0, 5
/* 0A18B4 800A0CB4 3C188019 */ lui $t8, %hi(D_8018E938) # $t8, 0x8019
/* 0A18B8 800A0CB8 2718E938 */ addiu $t8, %lo(D_8018E938) # addiu $t8, $t8, -0x16c8
/* 0A18B4 800A0CB4 3C188019 */ lui $t8, %hi(pfsState) # $t8, 0x8019
/* 0A18B8 800A0CB8 2718E938 */ addiu $t8, %lo(pfsState) # addiu $t8, $t8, -0x16c8
/* 0A18BC 800A0CBC 25CFFFE0 */ addiu $t7, $t6, -0x20
/* 0A18C0 800A0CC0 01F8A021 */ addu $s4, $t7, $t8
/* 0A18C4 800A0CC4 2684000E */ addiu $a0, $s4, 0xe
@@ -199,8 +199,8 @@ glabel func_800A7A4C
/* 0A8770 800A7B70 03200008 */ jr $t9
/* 0A8774 800A7B74 00000000 */ nop
glabel L800A7B78
/* 0A8778 800A7B78 3C028019 */ lui $v0, %hi(D_8018ED94) # $v0, 0x8019
/* 0A877C 800A7B7C 8C42ED94 */ lw $v0, %lo(D_8018ED94)($v0)
/* 0A8778 800A7B78 3C028019 */ lui $v0, %hi(s8018ED94) # $v0, 0x8019
/* 0A877C 800A7B7C 8C42ED94 */ lw $v0, %lo(s8018ED94)($v0)
/* 0A8780 800A7B80 28410050 */ slti $at, $v0, 0x50
/* 0A8784 800A7B84 10200004 */ beqz $at, .L800A7B98
/* 0A8788 800A7B88 3C014040 */ li $at, 0x40400000 # 3.000000
@@ -265,8 +265,8 @@ glabel L800A7B78
/* 0A8860 800A7C60 24480001 */ addiu $t0, $v0, 1
/* 0A8864 800A7C64 46105481 */ sub.s $f18, $f10, $f16
/* 0A8868 800A7C68 E432EDCC */ swc1 $f18, %lo(D_8018EDCC)($at)
/* 0A886C 800A7C6C 3C018019 */ lui $at, %hi(D_8018ED94) # $at, 0x8019
/* 0A8870 800A7C70 AC28ED94 */ sw $t0, %lo(D_8018ED94)($at)
/* 0A886C 800A7C6C 3C018019 */ lui $at, %hi(s8018ED94) # $at, 0x8019
/* 0A8870 800A7C70 AC28ED94 */ sw $t0, %lo(s8018ED94)($at)
/* 0A8874 800A7C74 3C01C3B4 */ li $at, 0xC3B40000 # -360.000000
/* 0A8878 800A7C78 44812000 */ mtc1 $at, $f4
/* 0A887C 800A7C7C 3C0143B4 */ li $at, 0x43B40000 # 360.000000
-1
View File
@@ -12,7 +12,6 @@ extern s8 gCharacterIdByGPOverallRank[8]; // D_8018D9D0
extern s8 gCharacterGridSelections[4]; // D_8018EDE4
extern s8 gCharacterSelections[4]; // D_800E86A8
extern s8 gControllerPakMenuSelection; // D_8018EDF0
extern s32 gControllerPak1NumPagesFree; // D_8018EB80
extern s8 gControllerPakSelectedTableRow; // D_800E86C0
extern f32 gCourseCompletionPercentByPlayerId[8]; // D_801644D0
extern f32 gCourseCompletionPercentByRank[8]; // D_80162FD8
+3 -2
View File
@@ -340,12 +340,12 @@ SECTIONS
BUILD_DIR/src/crash_screen.o(.bss);
BUILD_DIR/src/code_80004740.o(.bss);
BUILD_DIR/src/staff_ghosts.o(.bss);
BUILD_DIR/src/code_80005FD0.jp.o(.bss);
BUILD_DIR/asm/bss_80005FD0.o(.bss);
BUILD_DIR/asm/bss_MainSeg.o(.bss);
BUILD_DIR/src/camera.o(.bss);
BUILD_DIR/asm/bss_8001C4D0.o(.bss);
BUILD_DIR/src/code_80091750.jp.o(.bss);
BUILD_DIR/asm/bss_8001C4D0_1.o(.bss);
BUILD_DIR/src/code_800AF9B0.o(.bss);
BUILD_DIR/src/menus.o(.bss);
#if DEBUG
@@ -353,6 +353,7 @@ SECTIONS
BUILD_DIR/src/debug/debug.o(.bss);
BUILD_DIR/src/os/sprintf.o(.bss);
#endif
BUILD_DIR/src/audio/external.o(.bss);
BUILD_DIR/asm/bss_main_audio.o(.bss);
BUILD_DIR/src/audio/port_eu.o(.bss);
BUILD_DIR/src/os/osInitialize.o(.bss);
@@ -412,7 +413,7 @@ SECTIONS
BUILD_DIR/src/framebuffers.o(.bss*);
BUILD_DIR/src/audio/synthesis.o(.bss*);
BUILD_DIR/asm/bss_audio.o(.bss*);
BUILD_DIR/asm/bss_sptask_audio.o(.bss);
BUILD_DIR/src/audio/load.o(.bss);
. = ALIGN(0x8);
}
END_NOLOAD(code_8028DF00)
+87 -22
View File
@@ -9,12 +9,79 @@
#include "audio/data.h"
#include <sounds.h>
#include "port_eu.h"
#include "code_80091750.h"
/** bss
s8 D_8018EF10;
*/
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
} UnkStruct8018EF18;
UnkStruct8018EF18 D_8018EF18[12]; // probably wrong
struct Unk_8018EFD8 D_8018EFD8[50];
u8 D_8018FB90;
u8 D_8018FB91;
Camera *D_8018FB98[4]; // Is this real?
Vec3f D_8018FBA8[4];
Vec3f D_8018FBD8[4];
u8 D_8018FC08;
s32 D_8018FC10[4]; // probably wrong.
struct Unk_8018FC20 sSoundRequests[0x100];
struct Unk_80191420 sSoundBanks[SOUND_BANK_COUNT][20];
u8 sSoundBankUsedListBack[SOUND_BANK_COUNT];
u8 sSoundBankFreeListFront[SOUND_BANK_COUNT];
extern u8 sNumSoundsInBank[SOUND_BANK_COUNT];
extern u8 sSoundBankDisabled[];
extern u8 D_801930D0[];
extern u8 D_80192C38;
// Warning: D_801930D0 appears to be an array of struct.
// D_80193318 has been treated as a fake pr in the assembly.
// This may not be correct.
/** Could not figure out these structs.
u8 D_80192AB8[384]; // probably wrong.
struct UnkStruct_80192C38 {
u8 unk0;
//u8 unk1[3];
u8 sSoundBankDisabled[16];
};
struct UnkStruct_80192C38 D_80192C38;
//u8 D_80192C38;
//s32 a;
//u8 sSoundBankDisabled[15]; // 0x80192C3C
typedef struct {
f32 unk0;
f32 unk4;
f32 unk8;
f32 unkC;
} UnkStruct_80192C48; // size 0x10
UnkStruct_80192C48 D_80192C48;
typedef struct {
u8 unk0[9];
} UnkStruct_80192CA8; // size 0xA
UnkStruct_80192CA8 D_80192CA8[3];
u8 D_80192CC6[10]; // unconfirmed
u32 D_80192CD0[256];
typedef struct {
u8 unk0[0x24C];
} UnkStruct_801930D0;
UnkStruct_801930D0 D_801930D0[3];
//UnkStruct_801930D0 D_80193318[2]; // Likely fake var. Probably apart of 801930D0.
*/
// Requires void in the argument list to match properly.
void func_800C13F0(void) {
@@ -690,11 +757,11 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C284C.s")
#ifdef MIPS_TO_C
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-14-2023
extern ? D_80193318;
//extern ? D_80193318;
void func_800C29B4(u8 arg0, s32 arg1) {
func_800CBBB8((arg0 << 0x10) | 0x83000000, arg1 & 0xFFFF);
*(&D_80193318 + (arg0 * 0x24C)) = 0xFFFF;
*(&D_801930D0 + (arg0 * 0x24C)) = 0xFFFF;
}
#else
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C29B4.s")
@@ -1080,7 +1147,7 @@ void func_800C3478(void) {
#ifdef MIPS_TO_C
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-14-2023
extern ? D_80193318;
//extern ? D_80193318;
u16 func_800C3508(s32 player) {
s32 temp_t6;
@@ -1090,7 +1157,7 @@ u16 func_800C3508(s32 player) {
if (((u32) gSequencePlayers[temp_t6] >> 0x1F) == 0) {
return 0xFFFFU;
}
return *(&D_80193318 + (temp_t6 * 0x24C));
return *(&D_801930D0 + (temp_t6 * 0x24C));
}
#else
GLOBAL_ASM("asm/non_matchings/audio/external/func_800C3508.s")
@@ -1166,7 +1233,7 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C36C4.s")
#ifdef MIPS_TO_C
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-14-2023
extern ? D_801930D0;
//extern ? D_801930D0;
void func_800C3724(void) {
f32 temp_f2;
@@ -1527,7 +1594,7 @@ void func_800C4084(u16 bankMask) {
}
extern u16 D_800EA1C4;
extern u8 D_801930D0[];
//extern u8 D_801930D0[];
void func_800C40F0(u8 arg0) {
D_800EA1C4 &= ((1 << (arg0)) ^ (u16) -1);
@@ -2090,8 +2157,7 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C4888.s")
? func_800C19D0(s32, s32, u8); /* extern */
? func_800C473C(s32, s32); /* extern */
extern ? D_80192AB8;
extern u8 D_80192C38;
extern ? D_801930D0;
//extern ? D_801930D0;
extern ? D_803B17D0;
static ? D_800EA188; /* unable to generate initializer */
u8 D_800EA1C0 = 0;
@@ -2120,27 +2186,28 @@ void func_800C4FE4(s32 arg0) {
temp_s0 = (temp_s3 * 0x3C0) + (temp_s1 * 0x30) + sSoundBanks;
temp_v0 = temp_s0->unk28;
if (temp_v0 == 2) {
temp_s0->unk2C = (u8) D_80192C38;
temp_s0->unk2C = (u8) D_80192C38.unk0;
if (temp_s0->unk24 & 0x80000) {
D_800EA1C4 |= 1 << D_80192C38;
D_800EA1C4 |= 1 << D_80192C38.unk0;
D_801930D0.unk12 = 1;
D_801930D0.unk10 = 0x28;
}
func_800C19D0(temp_s3 & 0xFF, temp_s1 & 0xFF, D_80192C38);
func_800CBBE8((D_80192C38 << 8) | 0x06020000, 1);
func_800CBBE8((D_80192C38 << 8) | 0x06020000 | 4, (s8) temp_s0->unk24);
func_800CBBE8((D_80192C38.unk0 << 8) | 0x06020000, 1);
func_800CBBE8((D_80192C38.unk0 << 8) | 0x06020000 | 4, (s8) temp_s0->unk24);
temp_s0->unk28 = 4U;
var_v1_2 = &D_800EA188 + ((D_800EA1C0 * 6) + temp_s3);
goto block_11;
}
if ((*(&D_803B17D0 + (D_80192C38 * 4)))->unk5F == 0x80) {
func_800CBBE8(((D_80192C38 & 0xFF) << 8) | 0x06020000 | 7, 0);
// gSequencePlayers + 0x2C0 gSequencePlayers[1].channels
if ((*(&D_803B17D0 + (D_80192C38.unk0 * 4)))->unk5F == 0x80) {
func_800CBBE8(((D_80192C38.unk0 & 0xFF) << 8) | 0x06020000 | 7, 0);
func_800C473C(temp_s3 & 0xFF, temp_s1 & 0xFF);
var_v1_2 = &D_800EA188 + ((D_800EA1C0 * 6) + temp_s3);
goto block_11;
}
if (temp_v0 == 3) {
func_800C19D0(temp_s3 & 0xFF, temp_s1 & 0xFF, D_80192C38);
func_800C19D0(temp_s3 & 0xFF, temp_s1 & 0xFF, D_80192C38.unk0);
temp_s0->unk28 = 4U;
var_v1_2 = &D_800EA188 + ((D_800EA1C0 * 6) + temp_s3);
block_11:
@@ -2150,7 +2217,7 @@ block_11:
temp_t7 = (var_s4 + 1) & 0xFF;
temp_at = temp_t7 < (s32) var_v1;
var_s4 = temp_t7;
D_80192C38 += 1;
D_80192C38.unk0 += 1;
} while (temp_at != 0);
}
}
@@ -2395,14 +2462,13 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C5968.s")
#endif
extern s8 D_80192C38;
extern s32 D_803B17D0;
void func_800C59C4(void) {
u8 i;
if (D_803B17D0 != (u32) &gSequenceChannelNone) {
if (gSequencePlayers[2].channels[0] != &gSequenceChannelNone) {
D_80192C38 = 0;
for(i = 0; i < 6; i++) {
func_800C4888(i);
@@ -3070,7 +3136,6 @@ void func_800C70A8(u8 playerId) {
#ifdef MIPS_TO_C
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-09-2023
extern s8 D_801657E5;
extern u8 D_8018ED90;
s32 D_800E9E74[4] = { 0, 0, 0, 0 };
static ? D_800E9E94; /* unable to generate initializer */
static s32 D_800E9EA4[4] = { 0, 0, 0, 0 };
@@ -4105,7 +4170,6 @@ void func_800CA59C(u8 playerId) {
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-09-2023
s32 func_800C357C(?); /* extern */
? func_800C3608(?, ?, u8); /* extern */
extern u32 D_803B1658;
struct Unk_800E9F7C D_800E9F7C[4]; /* unable to generate initializer */
u8 D_800EA0EC[1] = { 0 };
u8 D_800EA104 = 0;
@@ -4139,6 +4203,7 @@ void func_800CA730(u8 playerId) {
func_800C9018(playerId & 0xFF, 0x0100FF2C);
} else if ((D_800EA10C->unk0 == 0) && (D_800EA10C->unk1 == 0)) {
if (D_8018FC08 != 0) {
// gSequencePlayers+0x148
if (((u32) D_803B1658 >> 0x1F) == 0) {
func_800C3608(1, 5, playerId);
func_800C8EAC(D_800EA15C);
-1
View File
@@ -242,7 +242,6 @@ extern struct Unk_80191420 sSoundBanks[SOUND_BANK_COUNT][20];
extern u8 sSoundBankUsedListBack[SOUND_BANK_COUNT];
extern u8 sSoundBankFreeListFront[SOUND_BANK_COUNT];
extern u8 sNumSoundsInBank[SOUND_BANK_COUNT];
extern u8 sSoundBankDisabled[12]; // size??
extern u8 sNumProcessedSoundRequests;
extern u8 sSoundRequestCount;
extern struct Unk_8018FC20 sSoundRequests[0x100];
+60 -8
View File
@@ -17,6 +17,66 @@ struct SharedDma {
/*0xE*/ u8 ttl; // duration after which the DMA can be discarded
}; // size = 0x10
//struct Note *gNotes; // 0x803B1508
struct SequencePlayer gSequencePlayers[SEQUENCE_PLAYERS];
struct SequenceChannel gSequenceChannels[SEQUENCE_CHANNELS];
struct SequenceChannelLayer gSequenceLayers[SEQUENCE_LAYERS];
struct SequenceChannel gSequenceChannelNone;
// D_803B5F5C
struct AudioListItem gLayerFreeList;
struct NotePool gNoteFreeLists;
OSMesgQueue gCurrAudioFrameDmaQueue;
OSMesg gCurrAudioFrameDmaMesgBufs[AUDIO_FRAME_DMA_QUEUE_SIZE];
OSIoMesg gCurrAudioFrameDmaIoMesgBufs[AUDIO_FRAME_DMA_QUEUE_SIZE];
OSMesgQueue D_803B6720;
OSMesg D_803B6738;
OSIoMesg D_803B6740;
struct SharedDma sSampleDmas[0x70];
u32 gSampleDmaNumListItems;
u32 sSampleDmaListSize1;
s32 D_803B6E60;
s32 load_bss_pad;
u8 sSampleDmaReuseQueue1[256]; // sSampleDmaReuseQueue1
u8 sSampleDmaReuseQueue2[256]; // sSampleDmaReuseQueue2
u8 sSampleDmaReuseQueueTail1; // sSampleDmaReuseQueueTail1
u8 sSampleDmaReuseQueueTail2; // sSampleDmaReuseQueueTail2
u8 sSampleDmaReuseQueueHead1; // sSampleDmaReuseQueueHead1
u8 sSampleDmaReuseQueueHead2; // sSampleDmaReuseQueueHead2
s32 D_803B706C;
s32 D_803B7070;
s32 D_803B7074;
u8 *gAlBankSets;
u16 D_803B707C;
struct CtlEntry *gCtlEntries;
struct AudioBufferParametersEU gAudioBufferParameters;
u32 D_803B70A8;
s32 D_803B70AC;
s32 gMaxSimultaneousNotes;
s16 D_803B70B4;
s8 gAudioLibSoundMode;
s32 D_803B70B8; // According to sm64 this is s8 not s32
s32 gCurrAudioFrameDmaCount; // file split around here?
s32 D_803B70C0;
s32 D_803B70C4;
s32 D_803B70C8[2]; // probably wrong
s32 D_803B70D0;
struct SPTask *D_803B70D4; // gAudioTask?
struct SPTask D_803B70D8[2]; // gAudioTasks?
f32 D_803B7178;
s32 D_803B717C;
void *D_803B7180[3]; // unconfirmed, osAiSetNextBuffer vaddr
u32 D_803B718C; // osAiSetNextBuffer nbytes
s16 load_bss_pad3;
u16 D_803B7192; // unconfirmed
u32 gAudioRandom;
s32 gAudioErrorFlags;
u32 D_803B71A0[4]; // unconfirmed
u8 D_803B71B0[4]; // unconfirmed
extern OSMesgQueue D_803B6720;
extern OSIoMesg D_803B6740;
@@ -24,17 +84,10 @@ extern OSMesgQueue gCurrAudioFrameDmaQueue; // gCurrAudioFrameDmaQueue
extern OSMesg gCurrAudioFrameDmaMesgBufs[AUDIO_FRAME_DMA_QUEUE_SIZE]; // gCurrAudioFrameDmaMesgBufs
extern OSIoMesg gCurrAudioFrameDmaIoMesgBufs[AUDIO_FRAME_DMA_QUEUE_SIZE]; // gCurrAudioFrameDmaIoMesgBufs
extern struct SharedDma sSampleDmas[0x60]; // sSampleDmas
extern u32 gSampleDmaNumListItems; // gSampleDmaNumListItems
extern u32 sSampleDmaListSize1; // sSampleDmaListSize1
extern s32 D_803B6E60; // sUnused80226B40
extern u8 sSampleDmaReuseQueue1[256]; // sSampleDmaReuseQueue1
extern u8 sSampleDmaReuseQueue2[256]; // sSampleDmaReuseQueue2
extern u8 sSampleDmaReuseQueueTail1; // sSampleDmaReuseQueueTail1
extern u8 sSampleDmaReuseQueueTail2; // sSampleDmaReuseQueueTail2
extern u8 sSampleDmaReuseQueueHead1; // sSampleDmaReuseQueueHead1
extern u8 sSampleDmaReuseQueueHead2; // sSampleDmaReuseQueueHead2
/**
* Given that (almost) all of these are format strings, it is highly likely
@@ -1019,7 +1072,6 @@ GLOBAL_ASM("asm/non_matchings/audio/load/func_800BBF44.s")
extern s8 D_803B0500;
extern s8 D_803B0501;
extern OSMesgQueue D_803B6720;
extern void *D_803B6738;
extern s32 *D_803B706C;
extern s32 *D_803B7070;
extern s32 *D_803B7074;
+8 -12
View File
@@ -53,7 +53,6 @@ extern s32 D_803B70C0;
extern s32 D_803B70C4;
extern ? D_803B70C8;
extern s32 D_803B70D0;
extern void *D_803B70D4;
extern ? D_803B70D8;
extern ? D_803B7180;
extern ? D_803B718C;
@@ -187,9 +186,6 @@ GLOBAL_ASM("asm/non_matchings/audio/port_eu/create_next_audio_frame_task.s")
#ifdef MIPS_TO_C
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-14-2023
? func_800BBDDC(u8, ?); /* extern */
extern u8 D_803B1658;
extern u8 D_803B17A0;
extern u8 D_803B18E8;
void func_800CB818(void *arg0) {
s32 temp_a1;
@@ -224,16 +220,16 @@ void func_800CB818(void *arg0) {
gAudioLibSoundMode = (s8) arg0->unk4;
return;
case 0xF1:
*gSequencePlayers |= 0x24;
D_803B1658 |= 0x24;
D_803B17A0 |= 0x24;
D_803B18E8 |= 0x24;
gSequencePlayers[0] |= 0x24;
gSequencePlayers[1] |= 0x24;
gSequencePlayers[2] |= 0x24;
gSequencePlayers[3] |= 0x24;
return;
case 0xF2:
*gSequencePlayers = (*gSequencePlayers & 0xFFDF) | 4;
D_803B1658 = (D_803B1658 & 0xFFDF) | 4;
D_803B17A0 = (D_803B17A0 & 0xFFDF) | 4;
D_803B18E8 = (D_803B18E8 & 0xFFDF) | 4;
gSequencePlayers[0] = (gSequencePlayers[0] & 0xFFDF) | 4;
gSequencePlayers[1] = (gSequencePlayers[1] & 0xFFDF) | 4;
gSequencePlayers[2] = (gSequencePlayers[2] & 0xFFDF) | 4;
gSequencePlayers[3] = (gSequencePlayers[3] & 0xFFDF) | 4;
return;
case 0xF3:
func_800BB388((s32) arg0->unk1, (s32) arg0->unk2, (s32) arg0->unk3);
+13 -24
View File
@@ -19,10 +19,17 @@
#include "code_80057C60.h"
#include "bomb_kart.h"
#include "courses/all_course_data.h"
#include "common_textures.h"
extern UnkCommonTextureStruct0 *D_800DC720[];
//Collision D_80162E70;
//s16 D_80162EB0; LIkely a float.
s32 unk_code_80005FD0_pad[24];
Collision D_80162E70;
s16 D_80162EB0; // Possibly a float.
s16 D_80162EB2; // possibly [3]
s16 code_80005FD0_pad[2];
uintptr_t *D_80162EB8[20];
// Strings, presented by google translate!
@@ -5340,30 +5347,12 @@ s32 func_8001168C(s16 *arg0, void *arg1, s32 arg2) {
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001168C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void *segmented_to_virtual_dupe_2(void*); // extern
extern s32 D_800DC720;
extern ? D_80162EB8;
extern ? D_80162F08;
void func_80011A5C(void) {
? *temp_s0;
s32 *phi_s1;
? *phi_s0;
phi_s1 = &D_800DC720;
phi_s0 = &D_80162EB8;
do {
temp_s0 = phi_s0 + 4;
temp_s0->unk-4 = segmented_to_virtual_dupe_2(*phi_s1);
phi_s1 += 4;
phi_s0 = temp_s0;
} while (temp_s0 != &D_80162F08);
s32 i;
for (i = 0; i < 20; i++) {
D_80162EB8[i] = segmented_to_virtual_dupe_2(D_800DC720[i]);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011A5C.s")
#endif
void func_80011AB8(s32 index) {
D_801632B8[index] = 0;
+78 -26
View File
@@ -36,6 +36,38 @@ s32 code_80091750_pad_2[2];
s8 D_8018E838[4]; // Import to C was required for matching.
s32 D_8018E83C;
s32 D_8018E840[4]; // This may all be one big array.
s32 D_8018E850[2]; // This is probably incorrect. Fix after decomping code.
s32 D_8018E858[2];
s8 gTextColor;
s32 D_8018E864_pad;
OSPfs gControllerPak1FileHandle;
OSPfs gControllerPak2FileHandle;
OSPfsState pfsState[16];
s32 pfsError[16]; // 0 = Ok, anything else = error.
s32 gControllerPak1NumFilesUsed;
s32 gControllerPak1MaxWriteableFiles;
s32 gControllerPak1NumPagesFree;
s32 gControllerPak1FileNote;
s32 gControllerPak2FileNote;
s32 code_80091750_bss_pad2;
SaveData gSaveData;
u8 D_8018ED90;
u8 D_8018ED91;
s32 s8018ED94;
f32 D_8018ED98; // Rotation
f32 D_8018ED9C; // Rotation
f32 D_8018EDA0; // Rotation
f32 D_8018EDA4;
f32 D_8018EDA8;
f32 D_8018EDAC;
Unk_D_800E70A0 D_800E70A0[] = {
{ 0x3d, 0x11, 0x00, 0x00 },
{ 0x15, 0x3e, 0x00, 0x00 },
@@ -1552,7 +1584,7 @@ s32 func_80091D74(void) {
}
for (i = 0; i < 16; i++) {
D_8018EB38[i] = osPfsFileState(&gControllerPak1FileHandle, i, D_8018E938 + i);
pfsError[i] = osPfsFileState(&gControllerPak1FileHandle, i, pfsState + i);
}
if (osPfsFreeBlocks(&gControllerPak1FileHandle, &gControllerPak1NumPagesFree)) {
@@ -1688,6 +1720,7 @@ void func_80092290(s32 arg0, s32 *arg1, s32 *arg2) {
s32 temp_t8_2;
s32 temp_t9;
void *temp_a2;
s32 i;
if ((arg0 >= 4) && (arg0 < 6)) {
temp_t8 = *arg2 + 0x10;
@@ -1698,8 +1731,10 @@ void func_80092290(s32 arg0, s32 *arg1, s32 *arg2) {
}
var_s0 = D_800E84C0;
temp_s4 = (((arg0 * 4) + (((s32) gGlobalTimer % 2) * 2)) - 6) * 0x10;
do {
temp_v0 = segmented_to_virtual_dupe_2(*var_s0);
for (i = 0; i < 12; i++) {
temp_v0 = (Vtx *) segmented_to_virtual_dupe_2(D_800E84C0[i]);
temp_a0 = *arg2;
temp_a2 = temp_v0 + temp_s4;
temp_a1 = 0x100 - temp_a0;
@@ -1719,7 +1754,30 @@ void func_80092290(s32 arg0, s32 *arg1, s32 *arg2) {
temp_a2->unk1D = (s8) temp_t9;
temp_a2->unk1E = (s8) temp_t7;
temp_a2->unk1F = (s8) temp_t8_2;
} while (var_s0 != D_800E84CC);
}
//do {
// temp_v0 = segmented_to_virtual_dupe_2(*var_s0);
// temp_a0 = *arg2;
// temp_a2 = temp_v0 + temp_s4;
// temp_a1 = 0x100 - temp_a0;
// var_s0 += 4;
// temp_t0 = (*arg1 * 2) + 2;
// temp_v1 = &temp_v0[temp_t0];
// temp_v1_2 = &temp_v0[(temp_t0 % 6) + 2];
// temp_t6 = (s32) ((temp_a1 * temp_v1->v.cn[0]) + (temp_a0 * temp_v1_2->v.cn[0])) / 256;
// temp_a2->unkC = (s8) temp_t6;
// temp_t9 = (s32) ((temp_a1 * temp_v1->v.cn[1]) + (temp_a0 * temp_v1_2->v.cn[1])) / 256;
// temp_a2->unkD = (s8) temp_t9;
// temp_t7 = (s32) ((temp_a1 * temp_v1->v.cn[2]) + (temp_a0 * temp_v1_2->v.cn[2])) / 256;
// temp_a2->unkE = (s8) temp_t7;
// temp_t8_2 = (s32) ((temp_a1 * temp_v1->v.cn[3]) + (temp_a0 * temp_v1_2->v.cn[3])) / 256;
// temp_a2->unkF = (s8) temp_t8_2;
// temp_a2->unk1C = (s8) temp_t6;
// temp_a2->unk1D = (s8) temp_t9;
// temp_a2->unk1E = (s8) temp_t7;
// temp_a2->unk1F = (s8) temp_t8_2;
//} while (var_s0 != D_800E84CC);
}
}
#else
@@ -2451,7 +2509,7 @@ void func_80093F10(void) {
gSPDisplayList(gDisplayListHead++, D_02007F18);
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, 320, 240);
func_80092290(4, D_8018E850, D_8018E858);
func_80092290(5, (s32 *) &D_8018E854, (s32 *) &D_8018E85C);
func_80092290(5, (s32 *) &D_8018E850[1], (s32 *) &D_8018E858[1]);
func_8009C918();
func_80099A70();
func_80099E54();
@@ -2471,7 +2529,7 @@ void func_800940EC(s32 arg0) {
D_80164AF0++;
gSPDisplayList(gDisplayListHead++, D_02007F18);
func_80092290(4, D_8018E850, D_8018E858);
func_80092290(5, (s32 *) &D_8018E854, (s32 *) &D_8018E85C);
func_80092290(5, (s32 *) &D_8018E850[1], (s32 *) &D_8018E858[1]);
func_80092148();
func_80099A70();
func_80099E54();
@@ -2567,7 +2625,7 @@ void func_80094A64(Mtx *arg0) {
gSPDisplayList(gDisplayListHead++, D_02007650);
func_80094C60();
func_80092290(4, &D_8018E850, &D_8018E858);
func_80092290(5, &D_8018E854, &D_8018E85C);
func_80092290(5, &D_8018E850[1], &D_8018E858[1]);
func_80099A70();
func_8009C918();
switch (gMenuSelection) {
@@ -7282,8 +7340,6 @@ s32 func_8009A478(void *, s32); /* extern */
s32 func_800B5218(); /* extern */
extern ? D_801640F4;
extern u32 D_8018CA78;
extern s8 D_8018ED90;
extern s32 D_8018ED94;
u64 gTexture7ED50C[0x32];
void add_8018D9E0_entry(s32 type, s32 column, s32 row, s8 priority) {
@@ -7346,7 +7402,7 @@ loop_3:
var_ra->type = type;
switch (type) { /* irregular */
case 0xFA:
D_8018ED94 = 0;
s8018ED94 = 0;
D_800E8530 = 0.0f;
D_800E8534 = 3.0f;
D_8018EDC0 = 0x000009C4;
@@ -8422,7 +8478,7 @@ void func_800A0AD0(UNUSED struct_8018D9E0_entry *arg0) {
#ifdef MIPS_TO_C
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023
extern ? D_8018EB34;
//extern ? D_8018EB34;
void func_800A0B80(struct_8018D9E0_entry *arg0) {
? *temp_s4;
@@ -8458,8 +8514,12 @@ void func_800A0B80(struct_8018D9E0_entry *arg0) {
}
temp_v0_2 = *var_s6;
temp_s2 = arg0->row + temp_s1 + 1;
// Note this appears to actually be the very end of pfsState
// Perhaps 8018E938[temp_v0_2].game_name[15].
// It must be a fake ptr.
if (*(&D_8018EB34 + (temp_v0_2 * 4)) == 0) {
temp_s4 = &D_8018E938[temp_v0_2].unk-20;
temp_s4 = &pfsState[temp_v0_2].unk-20;
temp_s1_2 = func_800A095C(temp_s4 + 0xE, 0x00000010, 0x0000004F, temp_s2) * 8;
if (temp_s4->unkA != 0) {
func_800A08D8(0x3CU, temp_s1_2 + 0x4F, temp_s2);
@@ -10191,13 +10251,7 @@ void func_800A638C(struct_8018D9E0_entry *arg0) {
#ifdef MIPS_TO_C
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023
? guMtxCatL(Mtx *, Mtx *, Mtx *); /* extern */
extern f32 D_8018ED98;
extern f32 D_8018ED9C;
extern f32 D_8018EDA0;
extern f32 D_8018EDA4;
extern f32 D_8018EDA8;
extern f32 D_8018EDAC;
// ? guMtxCatL(Mtx *, Mtx *, Mtx *); /* extern */
void func_800A66A8(struct_8018D9E0_entry *arg0, s16 *arg1) {
Gfx *temp_v0;
@@ -10608,7 +10662,6 @@ void func_800A79F4(s32 arg0, char *arg1) {
? func_800AC458(struct_8018D9E0_entry *); /* extern */
? func_800ACF40(struct_8018D9E0_entry *); /* extern */
? func_800AEF14(struct_8018D9E0_entry *); /* extern */
extern s32 D_8018ED94;
void func_800A7A4C(s32 arg0) {
f32 temp_f18;
@@ -10639,22 +10692,22 @@ block_7:
if (var_v1 != 0) {
switch (temp_v0) { /* switch 8; irregular */
case 0xFA: /* switch 8 */
if (D_8018ED94 < 0x50) {
if (s8018ED94 < 0x50) {
D_800E8534 = 3.0f;
} else if (D_8018ED94 < 0x5A) {
} else if (s8018ED94 < 0x5A) {
temp_f0 = (f64) D_800E8530;
if (temp_f0 < 1.0) {
D_800E8530 = (f32) (temp_f0 + 0.1);
}
D_800E8534 = (f32) ((f64) D_800E8534 + 0.1);
} else if (D_8018ED94 < 0xA0) {
} else if (s8018ED94 < 0xA0) {
D_800E8534 = (f32) ((f64) D_800E8534 + 0.1);
} else if (D_8018ED94 < 0x190) {
} else if (s8018ED94 < 0x190) {
D_800E8534 = (f32) ((f64) D_800E8534 + 0.3);
}
temp_f18 = D_8018EDCC - D_800E8534;
D_8018EDCC = temp_f18;
D_8018ED94 += 1;
s8018ED94 += 1;
if (temp_f18 < -360.0f) {
D_8018EDCC = temp_f18 + 360.0f;
}
@@ -14108,7 +14161,6 @@ void func_800AEEE8(struct_8018D9E0_entry *arg0) {
}
extern u32 D_8018CA78;
extern s8 D_8018ED90;
void func_800AEF14(s32* arg0) {
if (D_8018CAE0 != 0) {
+6 -1
View File
@@ -355,7 +355,8 @@ extern Gfx *D_8018E75C; // D_8018E75C
extern s32 gNumD_8018E768Entries; // D_8018E760
extern struct_8018E768_entry D_8018E768[D_8018E768_SIZE]; // D_8018E768
extern s8 gTextColor; // D_8018E860
extern s8 D_8018ED91;
extern u8 D_8018ED90;
extern u8 D_8018ED91;
extern s8 D_8018E838[];
extern s32 D_8018E840[];
extern s32 D_8018E850[];
@@ -527,4 +528,8 @@ extern Unk_D_800E70A0 D_800E8540[][4];
extern Unk_D_800E70A0 D_800E85C0[][4];
extern Unk_D_800E70A0 D_800E8600[][4];
extern s32 gControllerPak1NumPagesFree;
extern s32 gControllerPak1FileNote;
extern s32 gControllerPak2FileNote;
#endif
-1
View File
@@ -11,7 +11,6 @@ void func_800B0004(void);
/* This is where I'd put my static data, if I had any */
extern s32 gCCSelection; // D_800DC538 in main.c
extern s32 gModeSelection; // D_800DC53C
extern s32 D_800DC540;
extern s16 gCurrentCourseId; // D_800DC5A0
extern s32 gIsMirrorMode; // D_800DC5F4
+2 -4
View File
@@ -105,12 +105,10 @@ extern s32 D_80162DE0;
extern s32 D_80162DFC;
extern OSPfs gControllerPak1FileHandle;
extern OSPfs gControllerPak2FileHandle;
extern OSPfsState D_8018E938[];
extern s32 D_8018EB38[16];
extern OSPfsState pfsState[16];
extern s32 pfsError[16];
extern s32 gControllerPak1NumFilesUsed;
extern s32 gControllerPak1MaxWriteableFiles;
extern s32 gControllerPak1FileNote; // osPfs file_no receiver/out param
extern s32 gControllerPak2FileNote;
extern s8 D_8018EDE5;
extern s8 D_8018EDE6;
extern s8 D_8018EDE7;
+1 -1
View File
@@ -1410,7 +1410,7 @@ void func_802AE434(Vtx *vtx1, Vtx *vtx2, Vtx *vtx3, s8 surfaceType, u16 sectionI
s16 y3;
s16 z3;
/* Unused variables places around doubles for dramatic effect */
/* Unused variables placed around doubles for dramatic effect */
UNUSED s32 pad2[7];
f64 crossProductX;
+2
View File
@@ -98,6 +98,8 @@ extern UNUSED Player *gPlayerFourCopy;
extern u16 D_80152308;
extern s32 gModeSelection;
extern u16 *gPhysicalFramebuffers[];
extern OSIoMesg gDmaIoMesg;
extern OSMesg gMainReceivedMesg;
+3 -3
View File
@@ -906,7 +906,7 @@ void controller_pak_menu_act(struct Controller* controller, UNUSED u16 arg1) {
case CONTROLLER_PAK_MENU_TABLE_GAME_DATA:
if ((buttonAndStickPress & 0x9000) != 0) {
selectedTableRow = D_800E86C4[gControllerPakSelectedTableRow + 2] - 1;
if (D_8018EB38[selectedTableRow] == 0) {
if (pfsError[selectedTableRow] == 0) {
gControllerPakMenuSelection = CONTROLLER_PAK_MENU_QUIT;
play_sound2(SOUND_MENU_SELECT);
return;
@@ -981,14 +981,14 @@ void controller_pak_menu_act(struct Controller* controller, UNUSED u16 arg1) {
return;
case CONTROLLER_PAK_MENU_ERASING:
selectedTableRow = D_800E86C4[gControllerPakSelectedTableRow + 2] - 1;
osPfsState = &D_8018E938[selectedTableRow];
osPfsState = &pfsState[selectedTableRow];
switch (osPfsDeleteFile(&gControllerPak1FileHandle, osPfsState->company_code, osPfsState->game_code, (u8 *)&osPfsState->game_name, (u8 *)&osPfsState->ext_name)) {
default:
gControllerPakMenuSelection = CONTROLLER_PAK_MENU_ERASE_ERROR_NOT_ERASED;
return;
case 0:
D_8018EB38[selectedTableRow] = -1;
pfsError[selectedTableRow] = -1;
gControllerPak1NumPagesFree += (((osPfsState->file_size + 0xFF) >> 8) & 0xFF);
gControllerPakMenuSelection = CONTROLLER_PAK_MENU_TABLE_GAME_DATA;
return;
+15 -15
View File
@@ -41,41 +41,41 @@ s32 func_80290C20(Camera *camera) {
return 0;
}
void parse_course_displaylists(uintptr_t arg0) {
s32 segment = SEGMENT_NUMBER2(arg0);
s32 offset = SEGMENT_OFFSET(arg0);
TrackSections *data = (TrackSections *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
void parse_course_displaylists(uintptr_t addr) {
s32 segment = SEGMENT_NUMBER2(addr);
s32 offset = SEGMENT_OFFSET(addr);
TrackSections *section = (TrackSections *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
while(data->addr != 0) {
if (data->flags & 0x8000) {
while(section->addr != 0) {
if (section->flags & 0x8000) {
D_8015F59C = 1;
} else {
D_8015F59C = 0;
}
if (data->flags & 0x2000) {
if (section->flags & 0x2000) {
D_8015F5A0 = 1;
} else {
D_8015F5A0 = 0;
}
if (data->flags & 0x4000) {
if (section->flags & 0x4000) {
D_8015F5A4 = 1;
} else {
D_8015F5A4 = 0;
}
find_and_set_vertex_data(data->addr, data->surfaceType, data->sectionId);
data++;
find_and_set_vertex_data(section->addr, section->surfaceType, section->sectionId);
section++;
}
}
extern u16 D_80152300[];
void load_surface_map(uintptr_t arg0, struct UnkStruct_800DC5EC *arg1) {
void load_surface_map(uintptr_t addr, struct UnkStruct_800DC5EC *arg1) {
Player *temp_t1 = arg1->player;
Camera *temp_a2 = arg1->camera;
u32 segment = SEGMENT_NUMBER2(arg0);
u32 offset = SEGMENT_OFFSET(arg0);
u32 segment = SEGMENT_NUMBER2(addr);
u32 offset = SEGMENT_OFFSET(addr);
// todo: Should be Gfx*
s32 *addr = (s32 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
s32 *gfx = (s32 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
s16 var_a3;
s16 temp_v1;
s16 sp1E;
@@ -178,7 +178,7 @@ void load_surface_map(uintptr_t arg0, struct UnkStruct_800DC5EC *arg1) {
}
arg1->pathCounter = temp_v1;
temp_v1 = ((temp_v1 - 1) * 4) + var_a3;
gSPDisplayList(gDisplayListHead++, addr[temp_v1]);
gSPDisplayList(gDisplayListHead++, gfx[temp_v1]);
}
void func_80291198(void) {
+1 -12
View File
@@ -4,6 +4,7 @@
#include <common_structs.h>
#include <defines.h>
#include <functions.h>
#include "main.h"
#include "code_800029B0.h"
#include "framebuffers.h"
#include "code_800B45E0.h"
@@ -60,21 +61,9 @@ u32 *D_800DC714 = (u32 *) &D_802BFB80[1][1][3];
extern u8 _kart_texturesSegmentRomStart;
extern s16 gCurrentCourseId;
extern s32 gModeSelection;
extern s32 gActiveScreenMode;
extern s32 gLapCountByPlayerId[];
extern s32 D_8018CA78;
extern Player *gPlayerOne;
extern Player* gPlayerTwo;
extern Player *gPlayerThree;
extern struct Controller *gControllerSix;
extern struct Controller *gControllerSeven;
extern struct Controller *gControllerEight;
extern struct Controller *gControllerOne;
extern StaffGhost *d_mario_raceway_staff_ghost;
extern StaffGhost *d_royal_raceway_staff_ghost;
extern StaffGhost *d_luigi_raceway_staff_ghost;