Split and Decompile Code_800AF9B0 (#228)

* change return type of func_8000546C

* try to fix submodules

* update asm_processor for new ASM directives

* split code_800AF8B0 into 3 files; move rodata into files/asm

* move rodata into code_800AF9B0 asm funcs

* decomp func_800AF9E4

* match 800AFF58

* merge in master (renamed code_800AF9B0.c to menus.c)

* revert menus.c back to code_800AF9B0.c

* add bss to code_800AF9B0

* rename code_800B0350.c to menus.c

* remove unused ALIGN macros
This commit is contained in:
tehzz 2022-06-22 22:21:29 -04:00 committed by GitHub
parent 9ac748b0d0
commit 132db50245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 4428 additions and 3267 deletions

2
.gitmodules vendored
View File

@ -1,4 +1,4 @@
[submodule "asm-differ"] [submodule "tools/asm-differ"]
path = tools/asm-differ path = tools/asm-differ
url = https://github.com/simonlindholm/asm-differ url = https://github.com/simonlindholm/asm-differ
[submodule "tools/decomp-permuter"] [submodule "tools/decomp-permuter"]

View File

@ -2003,264 +2003,3 @@ glabel D_8018EDA8
glabel D_8018EDAC glabel D_8018EDAC
.skip 4 .skip 4
glabel D_8018EDB0
.skip 2
glabel D_8018EDB2
.skip 2
glabel D_8018EDB4
.skip 4
glabel D_8018EDB8
.skip 4
glabel D_8018EDBC
.skip 4
glabel D_8018EDC0
.skip 4
glabel D_8018EDC4
.skip 4
glabel D_8018EDC8
.skip 4
glabel D_8018EDCC
.skip 4
glabel D_8018EDD0
.skip 4
glabel D_8018EDD4
.skip 4
glabel D_8018EDD8
.skip 4
glabel D_8018EDDC
.skip 4
glabel D_8018EDE0
.skip 4
glabel gCharacterGridSelections # 0x8018EDE4
.skip 1
glabel D_8018EDE5
.skip 1
glabel D_8018EDE6
.skip 1
glabel D_8018EDE7
.skip 1
glabel D_8018EDE8
.skip 1
glabel D_8018EDE9
.skip 1
glabel D_8018EDEA
.skip 1
glabel D_8018EDEB
.skip 1
glabel D_8018EDEC
.skip 1
glabel gMainMenuSelectionDepth
.skip 1
glabel D_8018EDEE
.skip 1
glabel gDebugMenuSelection
.skip 1
glabel gControllerPakMenuSelection # 0x8018EDF0
.skip 1
glabel D_8018EDF1
.skip 1
glabel gSoundMode
.skip 1
glabel D_8018EDF3
.skip 1
glabel D_8018EDF4
.skip 1
glabel D_8018EDF5
.skip 1
glabel D_8018EDF6
.skip 1
glabel gTimeTrialDataCourseIndex
.skip 1
glabel gCourseRecordsMenuSelection
.skip 1
glabel D_8018EDF9
.skip 1
glabel gDebugGotoScene
.skip 1
glabel D_8018EDFB
.skip 1
glabel D_8018EDFC
.skip 4
glabel gMenuTimingCounter
.skip 4
glabel D_8018EE04
.skip 4
glabel D_8018EE08
.skip 1
glabel gCupSelection # 0x8018EE09
.skip 1
glabel D_8018EE0A
.skip 1
glabel gCupCourseSelection # 0x8018EE0B
.skip 1
glabel D_8018EE0C
.skip 4
glabel D_8018EE10
.skip 4
glabel D_8018EE14
.skip 1
glabel D_8018EE15
.skip 1
glabel D_8018EE16
.skip 126
glabel D_8018EE94
.skip 1
glabel D_8018EE95
.skip 123
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 D_8018FC20
.skip 6144
glabel D_80191420
.skip 36
glabel D_80191444
.skip 5724
glabel D_80192AA0
.skip 8
glabel D_80192AA8
.skip 8
glabel D_80192AB0
.skip 8
glabel D_80192AB8
.skip 384
glabel D_80192C38
.skip 4
glabel D_80192C3C
.skip 12
glabel D_80192C48
.skip 96
glabel D_80192CA8
.skip 30
glabel D_80192CC6
.skip 10
glabel D_80192CD0
.skip 1024
glabel D_801930D0
.skip 584
glabel D_80193318
.skip 1192
glabel D_801937C0
.skip 24
glabel D_801937D8
.skip 24
glabel D_801937F0
.skip 24
glabel D_80193808
.skip 24
glabel D_80193820
.skip 2048
glabel D_80194020
.skip 8
glabel D_80194028
.skip 16
glabel D_80194038
.skip 4
glabel D_8019403C
.skip 4
glabel D_80194040
.skip 16

249
asm/bss_8018EDC0.s Normal file
View File

@ -0,0 +1,249 @@
.include "macros.inc"
.section .bss
glabel D_8018EDC0
.skip 4
glabel D_8018EDC4
.skip 4
glabel D_8018EDC8
.skip 4
glabel D_8018EDCC
.skip 4
glabel D_8018EDD0
.skip 4
glabel D_8018EDD4
.skip 4
glabel D_8018EDD8
.skip 4
glabel D_8018EDDC
.skip 4
glabel D_8018EDE0
.skip 4
glabel gCharacterGridSelections # 0x8018EDE4
.skip 1
glabel D_8018EDE5
.skip 1
glabel D_8018EDE6
.skip 1
glabel D_8018EDE7
.skip 1
glabel D_8018EDE8
.skip 1
glabel D_8018EDE9
.skip 1
glabel D_8018EDEA
.skip 1
glabel D_8018EDEB
.skip 1
glabel D_8018EDEC
.skip 1
glabel gMainMenuSelectionDepth
.skip 1
glabel D_8018EDEE
.skip 1
glabel gDebugMenuSelection
.skip 1
glabel gControllerPakMenuSelection # 0x8018EDF0
.skip 1
glabel D_8018EDF1
.skip 1
glabel gSoundMode
.skip 1
glabel D_8018EDF3
.skip 1
glabel D_8018EDF4
.skip 1
glabel D_8018EDF5
.skip 1
glabel D_8018EDF6
.skip 1
glabel gTimeTrialDataCourseIndex
.skip 1
glabel gCourseRecordsMenuSelection
.skip 1
glabel D_8018EDF9
.skip 1
glabel gDebugGotoScene
.skip 1
glabel D_8018EDFB
.skip 1
glabel D_8018EDFC
.skip 4
glabel gMenuTimingCounter
.skip 4
glabel D_8018EE04
.skip 4
glabel D_8018EE08
.skip 1
glabel gCupSelection # 0x8018EE09
.skip 1
glabel D_8018EE0A
.skip 1
glabel gCupCourseSelection # 0x8018EE0B
.skip 1
glabel D_8018EE0C
.skip 4
glabel D_8018EE10
.skip 4
glabel D_8018EE14
.skip 1
glabel D_8018EE15
.skip 1
glabel D_8018EE16
.skip 126
glabel D_8018EE94
.skip 1
glabel D_8018EE95
.skip 123
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 D_8018FC20
.skip 6144
glabel D_80191420
.skip 36
glabel D_80191444
.skip 5724
glabel D_80192AA0
.skip 8
glabel D_80192AA8
.skip 8
glabel D_80192AB0
.skip 8
glabel D_80192AB8
.skip 384
glabel D_80192C38
.skip 4
glabel D_80192C3C
.skip 12
glabel D_80192C48
.skip 96
glabel D_80192CA8
.skip 30
glabel D_80192CC6
.skip 10
glabel D_80192CD0
.skip 1024
glabel D_801930D0
.skip 584
glabel D_80193318
.skip 1192
glabel D_801937C0
.skip 24
glabel D_801937D8
.skip 24
glabel D_801937F0
.skip 24
glabel D_80193808
.skip 24
glabel D_80193820
.skip 2048
glabel D_80194020
.skip 8
glabel D_80194028
.skip 16
glabel D_80194038
.skip 4
glabel D_8019403C
.skip 4
glabel D_80194040
.skip 16

View File

@ -40,11 +40,11 @@ glabel L800A9EBC
/* 0AAAE0 800A9EE0 8C830004 */ lw $v1, 4($a0) /* 0AAAE0 800A9EE0 8C830004 */ lw $v1, 4($a0)
/* 0AAAE4 800A9EE4 00C23021 */ addu $a2, $a2, $v0 /* 0AAAE4 800A9EE4 00C23021 */ addu $a2, $a2, $v0
/* 0AAAE8 800A9EE8 80C686AB */ lb $a2, %lo(gGameModeRowSelectionForNumPlayers)($a2) # -0x7955($a2) /* 0AAAE8 800A9EE8 80C686AB */ lb $a2, %lo(gGameModeRowSelectionForNumPlayers)($a2) # -0x7955($a2)
/* 0AAAEC 800A9EEC 00025080 */ sll $t2, $v0, 2 /* 0AAAEC 800A9EEC 00025080 */ sll $t2, $v0, 2 # playerCount * 4
/* 0AAAF0 800A9EF0 01425023 */ subu $t2, $t2, $v0 /* 0AAAF0 800A9EF0 01425023 */ subu $t2, $t2, $v0 # playerCount * 3
/* 0AAAF4 800A9EF4 000A5080 */ sll $t2, $t2, 2 /* 0AAAF4 800A9EF4 000A5080 */ sll $t2, $t2, 2 # playerCount * 12
/* 0AAAF8 800A9EF8 00065880 */ sll $t3, $a2, 2 /* 0AAAF8 800A9EF8 00065880 */ sll $t3, $a2, 2
/* 0AAAFC 800A9EFC 014B6021 */ addu $t4, $t2, $t3 /* 0AAAFC 800A9EFC 014B6021 */ addu $t4, $t2, $t3 # a2 * 4 + playerCount * 12
/* 0AAB00 800A9F00 3C05800F */ lui $a1, %hi(gGameModeFromNumPlayersAndRowSelection) # 0x800f /* 0AAB00 800A9F00 3C05800F */ lui $a1, %hi(gGameModeFromNumPlayersAndRowSelection) # 0x800f
/* 0AAB04 800A9F04 00AC2821 */ addu $a1, $a1, $t4 /* 0AAB04 800A9F04 00AC2821 */ addu $a1, $a1, $t4
/* 0AAB08 800A9F08 8FA70020 */ lw $a3, 0x20($sp) /* 0AAB08 800A9F08 8FA70020 */ lw $a3, 0x20($sp)

View File

@ -1,170 +0,0 @@
glabel func_800AF9E4
/* 0B05E4 800AF9E4 00C70019 */ multu $a2, $a3
/* 0B05E8 800AF9E8 27BDFFF0 */ addiu $sp, $sp, -0x10
/* 0B05EC 800AF9EC AFB00004 */ sw $s0, 4($sp)
/* 0B05F0 800AF9F0 00E08025 */ move $s0, $a3
/* 0B05F4 800AF9F4 AFB2000C */ sw $s2, 0xc($sp)
/* 0B05F8 800AF9F8 AFB10008 */ sw $s1, 8($sp)
/* 0B05FC 800AF9FC AFA60018 */ sw $a2, 0x18($sp)
/* 0B0600 800AFA00 3C01800F */ lui $at, %hi(D_800F2B30) # $at, 0x800f
/* 0B0604 800AFA04 00A08825 */ move $s1, $a1
/* 0B0608 800AFA08 C4202B30 */ lwc1 $f0, %lo(D_800F2B30)($at)
/* 0B060C 800AFA0C 00004012 */ mflo $t0
/* 0B0610 800AFA10 8FA6002C */ lw $a2, 0x2c($sp)
/* 0B0614 800AFA14 24120004 */ li $s2, 4
/* 0B0618 800AFA18 8FA70028 */ lw $a3, 0x28($sp)
/* 0B061C 800AFA1C 87AB0026 */ lh $t3, 0x26($sp)
/* 0B0620 800AFA20 87AA0022 */ lh $t2, 0x22($sp)
/* 0B0624 800AFA24 00001025 */ move $v0, $zero
/* 0B0628 800AFA28 240D00FF */ li $t5, 255
/* 0B062C 800AFA2C 240C0078 */ li $t4, 120
/* 0B0630 800AFA30 00027900 */ sll $t7, $v0, 4
.L800AFA34:
/* 0B0634 800AFA34 008F1821 */ addu $v1, $a0, $t7
/* 0B0638 800AFA38 04410004 */ bgez $v0, .L800AFA4C
/* 0B063C 800AFA3C 30450001 */ andi $a1, $v0, 1
/* 0B0640 800AFA40 10A00002 */ beqz $a1, .L800AFA4C
/* 0B0644 800AFA44 00000000 */ nop
/* 0B0648 800AFA48 24A5FFFE */ addiu $a1, $a1, -2
.L800AFA4C:
/* 0B064C 800AFA4C 00A60019 */ multu $a1, $a2
/* 0B0650 800AFA50 26290001 */ addiu $t1, $s1, 1
/* 0B0654 800AFA54 0000C012 */ mflo $t8
/* 0B0658 800AFA58 0307C821 */ addu $t9, $t8, $a3
/* 0B065C 800AFA5C 272EFE08 */ addiu $t6, $t9, -0x1f8
/* 0B0660 800AFA60 A46E0000 */ sh $t6, ($v1)
/* 0B0664 800AFA64 04410003 */ bgez $v0, .L800AFA74
/* 0B0668 800AFA68 00027843 */ sra $t7, $v0, 1
/* 0B066C 800AFA6C 24410001 */ addiu $at, $v0, 1
/* 0B0670 800AFA70 00017843 */ sra $t7, $at, 1
.L800AFA74:
/* 0B0674 800AFA74 15E00004 */ bnez $t7, .L800AFA88
/* 0B0678 800AFA78 24420001 */ addiu $v0, $v0, 1
/* 0B067C 800AFA7C 2518FE5C */ addiu $t8, $t0, -0x1a4
/* 0B0680 800AFA80 10000004 */ b .L800AFA94
/* 0B0684 800AFA84 A4780002 */ sh $t8, 2($v1)
.L800AFA88:
/* 0B0688 800AFA88 0110C821 */ addu $t9, $t0, $s0
/* 0B068C 800AFA8C 272EFE5C */ addiu $t6, $t9, -0x1a4
/* 0B0690 800AFA90 A46E0002 */ sh $t6, 2($v1)
.L800AFA94:
/* 0B0694 800AFA94 14A00010 */ bnez $a1, .L800AFAD8
/* 0B0698 800AFA98 00000000 */ nop
/* 0B069C 800AFA9C 02310019 */ multu $s1, $s1
/* 0B06A0 800AFAA0 846F0002 */ lh $t7, 2($v1)
/* 0B06A4 800AFAA4 448F2000 */ mtc1 $t7, $f4
/* 0B06A8 800AFAA8 00000000 */ nop
/* 0B06AC 800AFAAC 468021A0 */ cvt.s.w $f6, $f4
/* 0B06B0 800AFAB0 0000C012 */ mflo $t8
/* 0B06B4 800AFAB4 44984000 */ mtc1 $t8, $f8
/* 0B06B8 800AFAB8 00000000 */ nop
/* 0B06BC 800AFABC 468042A0 */ cvt.s.w $f10, $f8
/* 0B06C0 800AFAC0 46005402 */ mul.s $f16, $f10, $f0
/* 0B06C4 800AFAC4 46103480 */ add.s $f18, $f6, $f16
/* 0B06C8 800AFAC8 4600910D */ trunc.w.s $f4, $f18
/* 0B06CC 800AFACC 440E2000 */ mfc1 $t6, $f4
/* 0B06D0 800AFAD0 10000010 */ b .L800AFB14
/* 0B06D4 800AFAD4 A46E0002 */ sh $t6, 2($v1)
.L800AFAD8:
/* 0B06D8 800AFAD8 01290019 */ multu $t1, $t1
/* 0B06DC 800AFADC 846F0002 */ lh $t7, 2($v1)
/* 0B06E0 800AFAE0 448F4000 */ mtc1 $t7, $f8
/* 0B06E4 800AFAE4 00000000 */ nop
/* 0B06E8 800AFAE8 468042A0 */ cvt.s.w $f10, $f8
/* 0B06EC 800AFAEC 0000C012 */ mflo $t8
/* 0B06F0 800AFAF0 44983000 */ mtc1 $t8, $f6
/* 0B06F4 800AFAF4 00000000 */ nop
/* 0B06F8 800AFAF8 46803420 */ cvt.s.w $f16, $f6
/* 0B06FC 800AFAFC 46008482 */ mul.s $f18, $f16, $f0
/* 0B0700 800AFB00 46125100 */ add.s $f4, $f10, $f18
/* 0B0704 800AFB04 4600220D */ trunc.w.s $f8, $f4
/* 0B0708 800AFB08 440E4000 */ mfc1 $t6, $f8
/* 0B070C 800AFB0C 00000000 */ nop
/* 0B0710 800AFB10 A46E0002 */ sh $t6, 2($v1)
.L800AFB14:
/* 0B0714 800AFB14 A060000C */ sb $zero, 0xc($v1)
/* 0B0718 800AFB18 A060000D */ sb $zero, 0xd($v1)
/* 0B071C 800AFB1C A06C000E */ sb $t4, 0xe($v1)
/* 0B0720 800AFB20 14A00003 */ bnez $a1, .L800AFB30
/* 0B0724 800AFB24 A06D000F */ sb $t5, 0xf($v1)
/* 0B0728 800AFB28 10000002 */ b .L800AFB34
/* 0B072C 800AFB2C A46A0004 */ sh $t2, 4($v1)
.L800AFB30:
/* 0B0730 800AFB30 A46B0004 */ sh $t3, 4($v1)
.L800AFB34:
/* 0B0734 800AFB34 5452FFBF */ bnel $v0, $s2, .L800AFA34
/* 0B0738 800AFB38 00027900 */ sll $t7, $v0, 4
/* 0B073C 800AFB3C 06210003 */ bgez $s1, .L800AFB4C
/* 0B0740 800AFB40 00117843 */ sra $t7, $s1, 1
/* 0B0744 800AFB44 26210001 */ addiu $at, $s1, 1
/* 0B0748 800AFB48 00017843 */ sra $t7, $at, 1
.L800AFB4C:
/* 0B074C 800AFB4C 8FB80018 */ lw $t8, 0x18($sp)
/* 0B0750 800AFB50 3C0C8015 */ lui $t4, %hi(gDisplayListHead) # $t4, 0x8015
/* 0B0754 800AFB54 258C0298 */ addiu $t4, %lo(gDisplayListHead) # addiu $t4, $t4, 0x298
/* 0B0758 800AFB58 07010003 */ bgez $t8, .L800AFB68
/* 0B075C 800AFB5C 0018C843 */ sra $t9, $t8, 1
/* 0B0760 800AFB60 27010001 */ addiu $at, $t8, 1
/* 0B0764 800AFB64 0001C843 */ sra $t9, $at, 1
.L800AFB68:
/* 0B0768 800AFB68 01F97021 */ addu $t6, $t7, $t9
/* 0B076C 800AFB6C 31D80001 */ andi $t8, $t6, 1
/* 0B0770 800AFB70 17000005 */ bnez $t8, .L800AFB88
/* 0B0774 800AFB74 3C0DBF00 */ lui $t5, 0xbf00
/* 0B0778 800AFB78 00001025 */ move $v0, $zero
/* 0B077C 800AFB7C 00001825 */ move $v1, $zero
/* 0B0780 800AFB80 10000004 */ b .L800AFB94
/* 0B0784 800AFB84 00002825 */ move $a1, $zero
.L800AFB88:
/* 0B0788 800AFB88 240200FF */ li $v0, 255
/* 0B078C 800AFB8C 240300FF */ li $v1, 255
/* 0B0790 800AFB90 240500FF */ li $a1, 255
.L800AFB94:
/* 0B0794 800AFB94 8D870000 */ lw $a3, ($t4)
/* 0B0798 800AFB98 3C19FA00 */ lui $t9, 0xfa00
/* 0B079C 800AFB9C 0005C600 */ sll $t8, $a1, 0x18
/* 0B07A0 800AFBA0 24EF0008 */ addiu $t7, $a3, 8
/* 0B07A4 800AFBA4 AD8F0000 */ sw $t7, ($t4)
/* 0B07A8 800AFBA8 306F00FF */ andi $t7, $v1, 0xff
/* 0B07AC 800AFBAC ACF90000 */ sw $t9, ($a3)
/* 0B07B0 800AFBB0 000FCC00 */ sll $t9, $t7, 0x10
/* 0B07B4 800AFBB4 03197025 */ or $t6, $t8, $t9
/* 0B07B8 800AFBB8 304F00FF */ andi $t7, $v0, 0xff
/* 0B07BC 800AFBBC 000FC200 */ sll $t8, $t7, 8
/* 0B07C0 800AFBC0 01D8C825 */ or $t9, $t6, $t8
/* 0B07C4 800AFBC4 372F00FF */ ori $t7, $t9, 0xff
/* 0B07C8 800AFBC8 ACEF0004 */ sw $t7, 4($a3)
/* 0B07CC 800AFBCC 8D870000 */ lw $a3, ($t4)
/* 0B07D0 800AFBD0 3C18E700 */ lui $t8, 0xe700
/* 0B07D4 800AFBD4 3C0F0400 */ lui $t7, (0x0400103F >> 16) # lui $t7, 0x400
/* 0B07D8 800AFBD8 24EE0008 */ addiu $t6, $a3, 8
/* 0B07DC 800AFBDC AD8E0000 */ sw $t6, ($t4)
/* 0B07E0 800AFBE0 ACE00004 */ sw $zero, 4($a3)
/* 0B07E4 800AFBE4 ACF80000 */ sw $t8, ($a3)
/* 0B07E8 800AFBE8 8D870000 */ lw $a3, ($t4)
/* 0B07EC 800AFBEC 3C018000 */ lui $at, 0x8000
/* 0B07F0 800AFBF0 00817021 */ addu $t6, $a0, $at
/* 0B07F4 800AFBF4 24F90008 */ addiu $t9, $a3, 8
/* 0B07F8 800AFBF8 AD990000 */ sw $t9, ($t4)
/* 0B07FC 800AFBFC 35EF103F */ ori $t7, (0x0400103F & 0xFFFF) # ori $t7, $t7, 0x103f
/* 0B0800 800AFC00 ACEF0000 */ sw $t7, ($a3)
/* 0B0804 800AFC04 ACEE0004 */ sw $t6, 4($a3)
/* 0B0808 800AFC08 8D870000 */ lw $a3, ($t4)
/* 0B080C 800AFC0C 3C190002 */ lui $t9, (0x00020400 >> 16) # lui $t9, 2
/* 0B0810 800AFC10 37390400 */ ori $t9, (0x00020400 & 0xFFFF) # ori $t9, $t9, 0x400
/* 0B0814 800AFC14 24F80008 */ addiu $t8, $a3, 8
/* 0B0818 800AFC18 AD980000 */ sw $t8, ($t4)
/* 0B081C 800AFC1C ACF90004 */ sw $t9, 4($a3)
/* 0B0820 800AFC20 ACED0000 */ sw $t5, ($a3)
/* 0B0824 800AFC24 8D870000 */ lw $a3, ($t4)
/* 0B0828 800AFC28 3C0E0006 */ lui $t6, (0x00060402 >> 16) # lui $t6, 6
/* 0B082C 800AFC2C 35CE0402 */ ori $t6, (0x00060402 & 0xFFFF) # ori $t6, $t6, 0x402
/* 0B0830 800AFC30 24EF0008 */ addiu $t7, $a3, 8
/* 0B0834 800AFC34 AD8F0000 */ sw $t7, ($t4)
/* 0B0838 800AFC38 ACEE0004 */ sw $t6, 4($a3)
/* 0B083C 800AFC3C ACED0000 */ sw $t5, ($a3)
/* 0B0840 800AFC40 8FB2000C */ lw $s2, 0xc($sp)
/* 0B0844 800AFC44 8FB10008 */ lw $s1, 8($sp)
/* 0B0848 800AFC48 8FB00004 */ lw $s0, 4($sp)
/* 0B084C 800AFC4C 03E00008 */ jr $ra
/* 0B0850 800AFC50 27BD0010 */ addiu $sp, $sp, 0x10

View File

@ -1,3 +1,11 @@
.section .late_rodata
glabel D_800F2B38
.double 0.001
glabel D_800F2B40
.float 0.001
.section .text
glabel func_800AFC54 glabel func_800AFC54
/* 0B0854 800AFC54 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 0B0854 800AFC54 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 0B0858 800AFC58 AFBF0014 */ sw $ra, 0x14($sp) /* 0B0858 800AFC58 AFBF0014 */ sw $ra, 0x14($sp)

View File

@ -1,46 +0,0 @@
glabel func_800AFF58
/* 0B0B58 800AFF58 27BDFF08 */ addiu $sp, $sp, -0xf8
/* 0B0B5C 800AFF5C AFB3002C */ sw $s3, 0x2c($sp)
/* 0B0B60 800AFF60 AFB20028 */ sw $s2, 0x28($sp)
/* 0B0B64 800AFF64 AFB10024 */ sw $s1, 0x24($sp)
/* 0B0B68 800AFF68 AFB00020 */ sw $s0, 0x20($sp)
/* 0B0B6C 800AFF6C 00809825 */ move $s3, $a0
/* 0B0B70 800AFF70 AFBF0034 */ sw $ra, 0x34($sp)
/* 0B0B74 800AFF74 AFB40030 */ sw $s4, 0x30($sp)
/* 0B0B78 800AFF78 27B00088 */ addiu $s0, $sp, 0x88
/* 0B0B7C 800AFF7C 00008825 */ move $s1, $zero
/* 0B0B80 800AFF80 27B20040 */ addiu $s2, $sp, 0x40
.L800AFF84:
/* 0B0B84 800AFF84 00117100 */ sll $t6, $s1, 4
/* 0B0B88 800AFF88 01D32021 */ addu $a0, $t6, $s3
/* 0B0B8C 800AFF8C 24050001 */ li $a1, 1
/* 0B0B90 800AFF90 24060002 */ li $a2, 2
/* 0B0B94 800AFF94 00003825 */ move $a3, $zero
/* 0B0B98 800AFF98 0C02BF15 */ jal func_800AFC54
/* 0B0B9C 800AFF9C AFB20010 */ sw $s2, 0x10($sp)
/* 0B0BA0 800AFFA0 26520006 */ addiu $s2, $s2, 6
/* 0B0BA4 800AFFA4 0250082B */ sltu $at, $s2, $s0
/* 0B0BA8 800AFFA8 1420FFF6 */ bnez $at, .L800AFF84
/* 0B0BAC 800AFFAC 26310004 */ addiu $s1, $s1, 4
/* 0B0BB0 800AFFB0 00008025 */ move $s0, $zero
/* 0B0BB4 800AFFB4 00008825 */ move $s1, $zero
/* 0B0BB8 800AFFB8 2414000C */ li $s4, 12
/* 0B0BBC 800AFFBC 27B20040 */ addiu $s2, $sp, 0x40
.L800AFFC0:
/* 0B0BC0 800AFFC0 00117900 */ sll $t7, $s1, 4
/* 0B0BC4 800AFFC4 01F32021 */ addu $a0, $t7, $s3
/* 0B0BC8 800AFFC8 02402825 */ move $a1, $s2
/* 0B0BCC 800AFFCC 02003025 */ move $a2, $s0
/* 0B0BD0 800AFFD0 0C02BF80 */ jal func_800AFE00
/* 0B0BD4 800AFFD4 2407000B */ li $a3, 11
/* 0B0BD8 800AFFD8 26100001 */ addiu $s0, $s0, 1
/* 0B0BDC 800AFFDC 1614FFF8 */ bne $s0, $s4, .L800AFFC0
/* 0B0BE0 800AFFE0 26310004 */ addiu $s1, $s1, 4
/* 0B0BE4 800AFFE4 8FBF0034 */ lw $ra, 0x34($sp)
/* 0B0BE8 800AFFE8 8FB00020 */ lw $s0, 0x20($sp)
/* 0B0BEC 800AFFEC 8FB10024 */ lw $s1, 0x24($sp)
/* 0B0BF0 800AFFF0 8FB20028 */ lw $s2, 0x28($sp)
/* 0B0BF4 800AFFF4 8FB3002C */ lw $s3, 0x2c($sp)
/* 0B0BF8 800AFFF8 8FB40030 */ lw $s4, 0x30($sp)
/* 0B0BFC 800AFFFC 03E00008 */ jr $ra
/* 0B0C00 800B0000 27BD00F8 */ addiu $sp, $sp, 0xf8

View File

@ -1,3 +1,8 @@
.section .late_rodata
glabel D_800F2B44
.float 0.18
.section .text
glabel func_800B0004 glabel func_800B0004
/* 0B0C04 800B0004 27BDFF40 */ addiu $sp, $sp, -0xc0 /* 0B0C04 800B0004 27BDFF40 */ addiu $sp, $sp, -0xc0
/* 0B0C08 800B0008 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 /* 0B0C08 800B0008 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015

View File

@ -1,3 +1,11 @@
.section .late_rodata
glabel jpt_800F2C20
.word L800B04B8, L800B04D0, L800B04E8, L800B0500
.word L800B0510, L800B043C, L800B0454, L800B046C
.word L800B0484, L800B049C, L800B04B8, L800B04D0
.word L800B04E8, L800B0500
.section .text
glabel func_800B0350 glabel func_800B0350
/* 0B0F50 800B0350 3C0E800F */ lui $t6, %hi(D_800E86A4) # $t6, 0x800f /* 0B0F50 800B0350 3C0E800F */ lui $t6, %hi(D_800E86A4) # $t6, 0x800f
/* 0B0F54 800B0354 8DCE86A4 */ lw $t6, %lo(D_800E86A4)($t6) /* 0B0F54 800B0354 8DCE86A4 */ lw $t6, %lo(D_800E86A4)($t6)

View File

@ -1,3 +1,57 @@
.section .late_rodata
glabel jpt_800F2C58
.word L800B05E0, L800B05E0
.word L800B05E0, L800B05E0, L800B13A0, L800B13A0
.word L800B13A0, L800B13A0, L800B13A0, L800B0AF4
.word L800B0AF4, L800B0C88, L800B13A0, L800B13A0
.word L800B13A0, L800B13A0, L800B13A0, L800B13A0
.word L800B13A0, L800B0CAC, L800B0CAC, L800B1020
.word L800B1020, L800B1020, L800B1020, L800B13A0
.word L800B13A0, L800B13A0, L800B13A0, L800B0E5C
.word L800B0E5C, L800B1020, L800B1020, L800B13A0
.word L800B1020, L800B1044, L800B1044, L800B11C8
.word L800B11FC, L800B1020, L800B13A0, L800B13A0
.word L800B13A0, L800B13A0, L800B1020, L800B1020
.word L800B13A0, L800B13A0, L800B13A0, L800B1318
.word L800B134C
.word 0x00000000
glabel D_800F2D28
.double 4.2
glabel D_800F2D30
.double 4.2
glabel jpt_800F2D38 # jump table
.word L800B0948, L800B096C, L800B0980, L800B09C0
.word L800B09C0, L800B09A0
glabel D_800F2D50
.double 4.2
glabel D_800F2D58
.double 4.2
glabel D_800F2D60
.double 4.2
glabel D_800F2D68
.double 4.2
glabel D_800F2D70
.double 4.2
glabel D_800F2D78
.double 4.2
glabel D_800F2D80
.double 4.2
glabel D_800F2D88
.double 4.2
.section .text
glabel func_800B053C glabel func_800B053C
/* 0B113C 800B053C 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 0B113C 800B053C 27BDFFC0 */ addiu $sp, $sp, -0x40
/* 0B1140 800B0540 AFBF001C */ sw $ra, 0x1c($sp) /* 0B1140 800B0540 AFBF001C */ sw $ra, 0x1c($sp)

View File

@ -1,3 +1,20 @@
.section .late_rodata
glabel D_800F2D90
.double 4.2
glabel D_800F2D98
.double 4.2
glabel D_800F2DA0
.double 4.2
glabel D_800F2DA8
.double 4.2
glabel D_800F2DB0
.double 4.2
.section .text
glabel func_800B15AC glabel func_800B15AC
/* 0B21AC 800B15AC 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0B21AC 800B15AC 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 0B21B0 800B15B0 AFBF0014 */ sw $ra, 0x14($sp) /* 0B21B0 800B15B0 AFBF0014 */ sw $ra, 0x14($sp)

View File

@ -1,3 +1,10 @@
.section .late_rodata
glabel jpt_800F2DB8
.word L800B1CE8, L800B1D34, L800B1F78, L800B1F2C
.word L800B1D84, L800B1FE8, L800B1FF4, L800B20D4
.word L800B20D4, L800B20D4
.section .text
glabel func_800B1C90 glabel func_800B1C90
/* 0B2890 800B1C90 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 0B2890 800B1C90 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 0B2894 800B1C94 AFBF001C */ sw $ra, 0x1c($sp) /* 0B2894 800B1C94 AFBF001C */ sw $ra, 0x1c($sp)

View File

@ -1,3 +1,10 @@
.section .late_rodata
glabel jpt_800F2DE0
.word L800B2178, L800B21CC
.word L800B2240, L800B231C, L800B2414, L800B24DC
.word L800B2604
.section .text
glabel func_800B20F4 glabel func_800B20F4
/* 0B2CF4 800B20F4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0B2CF4 800B20F4 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 0B2CF8 800B20F8 240E0001 */ li $t6, 1 /* 0B2CF8 800B20F8 240E0001 */ li $t6, 1

View File

@ -1,3 +1,11 @@
.section .late_rodata
glabel jpt_800F2DFC
.word L800B2A6C, L800B3468, L800B3468, L800B2AA4
.word L800B2D30, L800B2F70, L800B32B4
.word L800B32B4, L800B2F70
.section .text
glabel func_800B29D8 glabel func_800B29D8
/* 0B35D8 800B29D8 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0B35D8 800B29D8 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 0B35DC 800B29DC AFBF0014 */ sw $ra, 0x14($sp) /* 0B35DC 800B29DC AFBF0014 */ sw $ra, 0x14($sp)
@ -236,11 +244,11 @@ glabel L800B2D30
/* 0B3940 800B2D40 8042EDF3 */ lb $v0, %lo(D_8018EDF3)($v0) /* 0B3940 800B2D40 8042EDF3 */ lb $v0, %lo(D_8018EDF3)($v0)
/* 0B3944 800B2D44 3C09800F */ lui $t1, %hi(D_800E86AC) # $t1, 0x800f /* 0B3944 800B2D44 3C09800F */ lui $t1, %hi(D_800E86AC) # $t1, 0x800f
/* 0B3948 800B2D48 252986AC */ addiu $t1, %lo(D_800E86AC) # addiu $t1, $t1, -0x7954 /* 0B3948 800B2D48 252986AC */ addiu $t1, %lo(D_800E86AC) # addiu $t1, $t1, -0x7954
/* 0B394C 800B2D4C 3C19800F */ lui $t9, %hi(D_800F2B5F) # 0x800f /* 0B394C 800B2D4C 3C19800F */ lui $t9, %hi((D_800F2B58 + 7)) # 0x800f
/* 0B3950 800B2D50 0322C821 */ addu $t9, $t9, $v0 /* 0B3950 800B2D50 0322C821 */ addu $t9, $t9, $v0
/* 0B3954 800B2D54 00491821 */ addu $v1, $v0, $t1 /* 0B3954 800B2D54 00491821 */ addu $v1, $v0, $t1
/* 0B3958 800B2D58 8064FFFF */ lb $a0, -1($v1) /* 0B3958 800B2D58 8064FFFF */ lb $a0, -1($v1)
/* 0B395C 800B2D5C 83392B5F */ lb $t9, %lo(D_800F2B5F)($t9) # 0x2b5f($t9) /* 0B395C 800B2D5C 83392B5F */ lb $t9, %lo((D_800F2B58 + 7))($t9) # 0x2b5f($t9)
/* 0B3960 800B2D60 248B0001 */ addiu $t3, $a0, 1 /* 0B3960 800B2D60 248B0001 */ addiu $t3, $a0, 1
/* 0B3964 800B2D64 0099082A */ slt $at, $a0, $t9 /* 0B3964 800B2D64 0099082A */ slt $at, $a0, $t9
/* 0B3968 800B2D68 5020000B */ beql $at, $zero, .L800B2D98 /* 0B3968 800B2D68 5020000B */ beql $at, $zero, .L800B2D98
@ -464,14 +472,14 @@ glabel L800B2F70
/* 0B3C94 800B3094 3C028019 */ lui $v0, %hi(D_8018EDF3) # $v0, 0x8019 /* 0B3C94 800B3094 3C028019 */ lui $v0, %hi(D_8018EDF3) # $v0, 0x8019
/* 0B3C98 800B3098 8042EDF3 */ lb $v0, %lo(D_8018EDF3)($v0) /* 0B3C98 800B3098 8042EDF3 */ lb $v0, %lo(D_8018EDF3)($v0)
/* 0B3C9C 800B309C 3C04800F */ lui $a0, %hi(gGameModeRowSelectionForNumPlayers) # 0x800f /* 0B3C9C 800B309C 3C04800F */ lui $a0, %hi(gGameModeRowSelectionForNumPlayers) # 0x800f
/* 0B3CA0 800B30A0 3C09800F */ lui $t1, %hi(D_800F2B6D) # 0x800f /* 0B3CA0 800B30A0 3C09800F */ lui $t1, %hi((D_800F2B60 + 0xD)) # 0x800f
/* 0B3CA4 800B30A4 00822021 */ addu $a0, $a0, $v0 /* 0B3CA4 800B30A4 00822021 */ addu $a0, $a0, $v0
/* 0B3CA8 800B30A8 808486AB */ lb $a0, %lo(gGameModeRowSelectionForNumPlayers)($a0) # -0x7955($a0) /* 0B3CA8 800B30A8 808486AB */ lb $a0, %lo(gGameModeRowSelectionForNumPlayers)($a0) # -0x7955($a0)
/* 0B3CAC 800B30AC 00027080 */ sll $t6, $v0, 2 /* 0B3CAC 800B30AC 00027080 */ sll $t6, $v0, 2
/* 0B3CB0 800B30B0 01C27023 */ subu $t6, $t6, $v0 /* 0B3CB0 800B30B0 01C27023 */ subu $t6, $t6, $v0
/* 0B3CB4 800B30B4 01C4C821 */ addu $t9, $t6, $a0 /* 0B3CB4 800B30B4 01C4C821 */ addu $t9, $t6, $a0
/* 0B3CB8 800B30B8 01394821 */ addu $t1, $t1, $t9 /* 0B3CB8 800B30B8 01394821 */ addu $t1, $t1, $t9
/* 0B3CBC 800B30BC 81292B6D */ lb $t1, %lo(D_800F2B6D)($t1) # 0x2b6d($t1) /* 0B3CBC 800B30BC 81292B6D */ lb $t1, %lo((D_800F2B60 + 0xD))($t1) # 0x2b6d($t1)
/* 0B3CC0 800B30C0 00A9082A */ slt $at, $a1, $t1 /* 0B3CC0 800B30C0 00A9082A */ slt $at, $a1, $t1
/* 0B3CC4 800B30C4 10200012 */ beqz $at, .L800B3110 /* 0B3CC4 800B30C4 10200012 */ beqz $at, .L800B3110
/* 0B3CC8 800B30C8 00000000 */ nop /* 0B3CC8 800B30C8 00000000 */ nop
@ -481,14 +489,14 @@ glabel L800B2F70
/* 0B3CD4 800B30D4 3C028019 */ lui $v0, %hi(D_8018EDF3) # $v0, 0x8019 /* 0B3CD4 800B30D4 3C028019 */ lui $v0, %hi(D_8018EDF3) # $v0, 0x8019
/* 0B3CD8 800B30D8 8042EDF3 */ lb $v0, %lo(D_8018EDF3)($v0) /* 0B3CD8 800B30D8 8042EDF3 */ lb $v0, %lo(D_8018EDF3)($v0)
/* 0B3CDC 800B30DC 3C04800F */ lui $a0, %hi(gGameModeRowSelectionForNumPlayers) # 0x800f /* 0B3CDC 800B30DC 3C04800F */ lui $a0, %hi(gGameModeRowSelectionForNumPlayers) # 0x800f
/* 0B3CE0 800B30E0 3C0F800F */ lui $t7, %hi(D_800F2B61) # 0x800f /* 0B3CE0 800B30E0 3C0F800F */ lui $t7, %hi((D_800F2B60 + 1)) # 0x800f
/* 0B3CE4 800B30E4 00822021 */ addu $a0, $a0, $v0 /* 0B3CE4 800B30E4 00822021 */ addu $a0, $a0, $v0
/* 0B3CE8 800B30E8 808486AB */ lb $a0, %lo(gGameModeRowSelectionForNumPlayers)($a0) # -0x7955($a0) /* 0B3CE8 800B30E8 808486AB */ lb $a0, %lo(gGameModeRowSelectionForNumPlayers)($a0) # -0x7955($a0)
/* 0B3CEC 800B30EC 00025880 */ sll $t3, $v0, 2 /* 0B3CEC 800B30EC 00025880 */ sll $t3, $v0, 2
/* 0B3CF0 800B30F0 01625823 */ subu $t3, $t3, $v0 /* 0B3CF0 800B30F0 01625823 */ subu $t3, $t3, $v0
/* 0B3CF4 800B30F4 01645021 */ addu $t2, $t3, $a0 /* 0B3CF4 800B30F4 01645021 */ addu $t2, $t3, $a0
/* 0B3CF8 800B30F8 01EA7821 */ addu $t7, $t7, $t2 /* 0B3CF8 800B30F8 01EA7821 */ addu $t7, $t7, $t2
/* 0B3CFC 800B30FC 81EF2B61 */ lb $t7, %lo(D_800F2B61)($t7) # 0x2b61($t7) /* 0B3CFC 800B30FC 81EF2B61 */ lb $t7, %lo((D_800F2B60 + 1))($t7) # 0x2b61($t7)
/* 0B3D00 800B3100 00AF082A */ slt $at, $a1, $t7 /* 0B3D00 800B3100 00AF082A */ slt $at, $a1, $t7
/* 0B3D04 800B3104 10200002 */ beqz $at, .L800B3110 /* 0B3D04 800B3104 10200002 */ beqz $at, .L800B3110
/* 0B3D08 800B3108 00000000 */ nop /* 0B3D08 800B3108 00000000 */ nop

View File

@ -88,7 +88,7 @@ glabel func_800B3554
/* 0B4298 800B3698 00693821 */ addu $a3, $v1, $t1 /* 0B4298 800B3698 00693821 */ addu $a3, $v1, $t1
/* 0B429C 800B369C 80EB0000 */ lb $t3, ($a3) /* 0B429C 800B369C 80EB0000 */ lb $t3, ($a3)
/* 0B42A0 800B36A0 240C0001 */ li $t4, 1 /* 0B42A0 800B36A0 240C0001 */ li $t4, 1
/* 0B42A4 800B36A4 3C05800F */ lui $a1, %hi(D_800F2BAB) # 0x800f /* 0B42A4 800B36A4 3C05800F */ lui $a1, %hi((D_800F2BAC - 1)) # 0x800f
/* 0B42A8 800B36A8 55600013 */ bnel $t3, $zero, .L800B36F8 /* 0B42A8 800B36A8 55600013 */ bnel $t3, $zero, .L800B36F8
/* 0B42AC 800B36AC 00002025 */ move $a0, $zero /* 0B42AC 800B36AC 00002025 */ move $a0, $zero
/* 0B42B0 800B36B0 8FAD0028 */ lw $t5, 0x28($sp) /* 0B42B0 800B36B0 8FAD0028 */ lw $t5, 0x28($sp)
@ -98,7 +98,7 @@ glabel func_800B3554
/* 0B42C0 800B36C0 3421800E */ ori $at, (0x2900800E & 0xFFFF) # ori $at, $at, 0x800e /* 0B42C0 800B36C0 3421800E */ ori $at, (0x2900800E & 0xFFFF) # ori $at, $at, 0x800e
/* 0B42C4 800B36C4 AFA70020 */ sw $a3, 0x20($sp) /* 0B42C4 800B36C4 AFA70020 */ sw $a3, 0x20($sp)
/* 0B42C8 800B36C8 00AE2821 */ addu $a1, $a1, $t6 /* 0B42C8 800B36C8 00AE2821 */ addu $a1, $a1, $t6
/* 0B42CC 800B36CC 80A52BAB */ lb $a1, %lo(D_800F2BAB)($a1) # 0x2bab($a1) /* 0B42CC 800B36CC 80A52BAB */ lb $a1, %lo((D_800F2BAC - 1))($a1) # 0x2bab($a1)
/* 0B42D0 800B36D0 AFA6002C */ sw $a2, 0x2c($sp) /* 0B42D0 800B36D0 AFA6002C */ sw $a2, 0x2c($sp)
/* 0B42D4 800B36D4 93A40047 */ lbu $a0, 0x47($sp) /* 0B42D4 800B36D4 93A40047 */ lbu $a0, 0x47($sp)
/* 0B42D8 800B36D8 00057900 */ sll $t7, $a1, 4 /* 0B42D8 800B36D8 00057900 */ sll $t7, $a1, 4
@ -407,10 +407,10 @@ glabel func_800B3554
/* 0B4720 800B3B20 8063EDE4 */ lb $v1, %lo(gCharacterGridSelections)($v1) # -0x121c($v1) /* 0B4720 800B3B20 8063EDE4 */ lb $v1, %lo(gCharacterGridSelections)($v1) # -0x121c($v1)
.L800B3B24: .L800B3B24:
/* 0B4724 800B3B24 10600007 */ beqz $v1, .L800B3B44 /* 0B4724 800B3B24 10600007 */ beqz $v1, .L800B3B44
/* 0B4728 800B3B28 3C0A800F */ lui $t2, %hi(D_800F2BAB) # 0x800f /* 0B4728 800B3B28 3C0A800F */ lui $t2, %hi((D_800F2BAC - 1)) # 0x800f
/* 0B472C 800B3B2C 97AB0046 */ lhu $t3, 0x46($sp) /* 0B472C 800B3B2C 97AB0046 */ lhu $t3, 0x46($sp)
/* 0B4730 800B3B30 01435021 */ addu $t2, $t2, $v1 /* 0B4730 800B3B30 01435021 */ addu $t2, $t2, $v1
/* 0B4734 800B3B34 814A2BAB */ lb $t2, %lo(D_800F2BAB)($t2) # 0x2bab($t2) /* 0B4734 800B3B34 814A2BAB */ lb $t2, %lo((D_800F2BAC - 1))($t2) # 0x2bab($t2)
/* 0B4738 800B3B38 3C01800F */ lui $at, %hi(gCharacterSelections) # 0x800f /* 0B4738 800B3B38 3C01800F */ lui $at, %hi(gCharacterSelections) # 0x800f
/* 0B473C 800B3B3C 002B0821 */ addu $at, $at, $t3 /* 0B473C 800B3B3C 002B0821 */ addu $at, $at, $t3
/* 0B4740 800B3B40 A02A86A8 */ sb $t2, %lo(gCharacterSelections)($at) # -0x7958($at) /* 0B4740 800B3B40 A02A86A8 */ sb $t2, %lo(gCharacterSelections)($at) # -0x7958($at)

View File

@ -1,3 +1,11 @@
.section .late_rodata
glabel jpt_800F2E20
.word L800B4070, L800B4100
.word L800B4230, L800B43B0, L800B4494, L800B4014
.word L800B4024, L800B4030, L800B4040, L800B4054
.word L800B4070, L800B4100, L800B4230, L800B43B0
.section .text
glabel func_800B3F74 glabel func_800B3F74
/* 0B4B74 800B3F74 24030001 */ li $v1, 1 /* 0B4B74 800B3F74 24030001 */ li $v1, 1
/* 0B4B78 800B3F78 3C018019 */ lui $at, %hi(gDebugMenuSelection) # $at, 0x8019 /* 0B4B78 800B3F78 3C018019 */ lui $at, %hi(gDebugMenuSelection) # $at, 0x8019
@ -83,7 +91,7 @@ glabel L800B4070
/* 0B4CA0 800B40A0 A020EDF7 */ sb $zero, %lo(gTimeTrialDataCourseIndex)($at) /* 0B4CA0 800B40A0 A020EDF7 */ sb $zero, %lo(gTimeTrialDataCourseIndex)($at)
/* 0B4CA4 800B40A4 80870000 */ lb $a3, ($a0) /* 0B4CA4 800B40A4 80870000 */ lb $a3, ($a0)
/* 0B4CA8 800B40A8 24080004 */ li $t0, 4 /* 0B4CA8 800B40A8 24080004 */ li $t0, 4
/* 0B4CAC 800B40AC 3C19800F */ lui $t9, %hi(D_800F2BDF) # 0x800f /* 0B4CAC 800B40AC 3C19800F */ lui $t9, %hi((D_800F2BDC + 3)) # 0x800f
/* 0B4CB0 800B40B0 1CE00003 */ bgtz $a3, .L800B40C0 /* 0B4CB0 800B40B0 1CE00003 */ bgtz $a3, .L800B40C0
/* 0B4CB4 800B40B4 00002825 */ move $a1, $zero /* 0B4CB4 800B40B4 00002825 */ move $a1, $zero
/* 0B4CB8 800B40B8 A0830000 */ sb $v1, ($a0) /* 0B4CB8 800B40B8 A0830000 */ sb $v1, ($a0)
@ -96,7 +104,7 @@ glabel L800B4070
/* 0B4CD0 800B40D0 80870000 */ lb $a3, ($a0) /* 0B4CD0 800B40D0 80870000 */ lb $a3, ($a0)
/* 0B4CD4 800B40D4 0327C821 */ addu $t9, $t9, $a3 /* 0B4CD4 800B40D4 0327C821 */ addu $t9, $t9, $a3
.L800B40D8: .L800B40D8:
/* 0B4CD8 800B40D8 83392BDF */ lb $t9, %lo(D_800F2BDF)($t9) # 0x2bdf($t9) /* 0B4CD8 800B40D8 83392BDF */ lb $t9, %lo((D_800F2BDC + 3))($t9) # 0x2bdf($t9)
/* 0B4CDC 800B40DC 3C018019 */ lui $at, %hi(D_8018EDF1) # $at, 0x8019 /* 0B4CDC 800B40DC 3C018019 */ lui $at, %hi(D_8018EDF1) # $at, 0x8019
/* 0B4CE0 800B40E0 00002025 */ move $a0, $zero /* 0B4CE0 800B40E0 00002025 */ move $a0, $zero
/* 0B4CE4 800B40E4 0C032802 */ jal func_800CA008 /* 0B4CE4 800B40E4 0C032802 */ jal func_800CA008

View File

@ -1,3 +1,17 @@
.section .rodata
glabel D_800F2BE8
.asciiz "ghost_kart=%d,"
.balign 4
glabel D_800F2BF8
.asciiz "pak1_ghost_kart=%d,"
.balign 4
glabel D_800F2C0C
.asciiz "pak2_ghost_kart=%d\n"
.balign 4
.section .text
glabel func_800B4560 glabel func_800B4560
/* 0B5160 800B4560 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0B5160 800B4560 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0B5164 800B4564 3C0E8019 */ lui $t6, %hi(D_8018D9C0) # $t6, 0x8019 /* 0B5164 800B4564 3C0E8019 */ lui $t6, %hi(D_8018D9C0) # $t6, 0x8019

View File

@ -33,6 +33,7 @@
#.word L80058E8C, L80058F38, L80058F38, L80058F38 #.word L80058E8C, L80058F38, L80058F38, L80058F38
#.word L80058EAC, L80058ECC, L80058EEC, L80058F0C #.word L80058EAC, L80058ECC, L80058EEC, L80058F0C
# start code_80057C60 .late_rodata
glabel D_800EE1E0 glabel D_800EE1E0
.float 0.6 .float 0.6
@ -485,6 +486,7 @@ glabel D_800EE948
glabel D_800EE94C glabel D_800EE94C
.float 1.6 .float 1.6
# start code_8006E9C0 .late_rodata
glabel jpt_800EE950 glabel jpt_800EE950
.word L8006F0E4, L8006F174, L8006F1AC, L8006F1E4 .word L8006F0E4, L8006F174, L8006F1AC, L8006F1E4
.word L8006F248, L8006F2A4, L8006F2FC, L8006F360 .word L8006F248, L8006F2A4, L8006F2FC, L8006F360
@ -570,6 +572,7 @@ glabel D_800EEA78
.float 0.7 .float 0.7
.word 0x00000000 .word 0x00000000
# start code_80071F00 .late_rodata
glabel D_800EEA80 glabel D_800EEA80
.float 0.15 .float 0.15
.word 0x00000000 .word 0x00000000
@ -4034,735 +4037,4 @@ glabel D_800F2B20
glabel D_800F2B28 glabel D_800F2B28
.double 0.4 .double 0.4
glabel D_800F2B30
.float -0.07
.word 0x00000000
glabel D_800F2B38
.double 0.001
glabel D_800F2B40
.float 0.001
glabel D_800F2B44
.float 0.18
.word 0x00000000, 0x00000000
glabel D_800F2B50
.word 0x00010203
.word 0x03000000
glabel D_800F2B58
.byte 0x01, 0x02, 0x02, 0x03, 0x04, 0x00, 0x00
glabel D_800F2B5F
.byte 0x00
glabel D_800F2B60
.byte 0x01
glabel D_800F2B61
.byte 0x02, 0x01, 0x01, 0x02, 0x01, 0x00, 0x02, 0x02, 0x00, 0x02, 0x00, 0x00
glabel D_800F2B6D
.byte 0x02, 0x00, 0x00
glabel gGameModeFromNumPlayersAndRowSelection
.byte 0x03, 0x01, 0x00, 0x03, 0x03, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02
.byte 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00
glabel D_800F2BAB
.byte 0x00, 0x00, 0x01, 0x06, 0x03
.byte 0x02, 0x04, 0x05, 0x07
glabel gCupCourseOrder
.hword 0x0008, 0x0009, 0x0006, 0x000b # mushroom cup: LR, MMF, KTB, KD
.hword 0x000a, 0x0005, 0x0001, 0x0000 # flower cup: TT, FS, CM, MR
.hword 0x000e, 0x000c, 0x0007, 0x0002 # star cup: WS, SL, RRy, BC
.hword 0x0012, 0x0004, 0x0003, 0x000d # special cup: DKJP, YV, BB, RRd
.hword 0x0013, 0x000f, 0x0011, 0x0010 # battle mode: BD, BF, DD, Sky
.byte 0x01, 0x00
.byte 0x00
glabel D_800F2BDF
.byte 0x00, 0x00, 0x01, 0x03, 0x04
glabel D_800F2BE4
.word 0x00010203
glabel D_800F2BE8
.asciiz "ghost_kart=%d,"
.balign 4
glabel D_800F2BF8
.asciiz "pak1_ghost_kart=%d,"
.balign 4
glabel D_800F2C0C
.asciiz "pak2_ghost_kart=%d\n"
.balign 4
glabel jpt_800F2C20
.word L800B04B8, L800B04D0, L800B04E8, L800B0500
.word L800B0510, L800B043C, L800B0454, L800B046C
.word L800B0484, L800B049C, L800B04B8, L800B04D0
.word L800B04E8, L800B0500
glabel jpt_800F2C58
.word L800B05E0, L800B05E0
.word L800B05E0, L800B05E0, L800B13A0, L800B13A0
.word L800B13A0, L800B13A0, L800B13A0, L800B0AF4
.word L800B0AF4, L800B0C88, L800B13A0, L800B13A0
.word L800B13A0, L800B13A0, L800B13A0, L800B13A0
.word L800B13A0, L800B0CAC, L800B0CAC, L800B1020
.word L800B1020, L800B1020, L800B1020, L800B13A0
.word L800B13A0, L800B13A0, L800B13A0, L800B0E5C
.word L800B0E5C, L800B1020, L800B1020, L800B13A0
.word L800B1020, L800B1044, L800B1044, L800B11C8
.word L800B11FC, L800B1020, L800B13A0, L800B13A0
.word L800B13A0, L800B13A0, L800B1020, L800B1020
.word L800B13A0, L800B13A0, L800B13A0, L800B1318
.word L800B134C
.word 0x00000000
glabel D_800F2D28
.double 4.2
glabel D_800F2D30
.double 4.2
glabel jpt_800F2D38 # jump table
.word L800B0948, L800B096C, L800B0980, L800B09C0
.word L800B09C0, L800B09A0
glabel D_800F2D50
.double 4.2
glabel D_800F2D58
.double 4.2
glabel D_800F2D60
.double 4.2
glabel D_800F2D68
.double 4.2
glabel D_800F2D70
.double 4.2
glabel D_800F2D78
.double 4.2
glabel D_800F2D80
.double 4.2
glabel D_800F2D88
.double 4.2
glabel D_800F2D90
.double 4.2
glabel D_800F2D98
.double 4.2
glabel D_800F2DA0
.double 4.2
glabel D_800F2DA8
.double 4.2
glabel D_800F2DB0
.double 4.2
glabel jpt_800F2DB8
.word L800B1CE8, L800B1D34, L800B1F78, L800B1F2C
.word L800B1D84, L800B1FE8, L800B1FF4, L800B20D4
.word L800B20D4, L800B20D4
glabel jpt_800F2DE0
.word L800B2178, L800B21CC
.word L800B2240, L800B231C, L800B2414, L800B24DC
.word L800B2604
glabel jpt_800F2DFC
.word L800B2A6C, L800B3468, L800B3468, L800B2AA4
.word L800B2D30, L800B2F70, L800B32B4
.word L800B32B4, L800B2F70
glabel jpt_800F2E20
.word L800B4070, L800B4100
.word L800B4230, L800B43B0, L800B4494, L800B4014
.word L800B4024, L800B4030, L800B4040, L800B4054
.word L800B4070, L800B4100, L800B4230, L800B43B0
.balign 16 .balign 16
glabel D_800F2E60
.byte 0xc0, 0x27, 0x09, 0x00
glabel D_800F2E64 # u8* game_name param to osPfsFindFile
.byte 0x26, 0x1a, 0x2b, 0x22, 0x28, 0x24, 0x1a, 0x2b, 0x2d, 0x16, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00
glabel D_800F2E74 # u8* ext_name param to osPfsFindFile
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
glabel D_800F2E80
.float 262159.0
glabel jpt_800F2E84
.word L800BA210, L800BA1E4, L800BA14C, L800BA094
.word L800BA050
glabel D_800F2E98
.float 0.001171875
glabel D_800F2E9C
.float 2880000.0
glabel D_800F2EA0
.float 20.0304203
glabel D_800F2EA4
.float 16.546
glabel D_800F2EA8
.float 16.713
.word 0x00000000
glabel D_800F2EB0
.float 0.707
glabel D_800F2EB4
.float 4095.999
glabel D_800F2EB8
.float 1.9999599
glabel D_800F2EBC
.float 3.9999199
glabel D_800F2EC0
.float 1.9999599
glabel D_800F2EC4
.float 1.0465
glabel D_800F2EC8
.float 0.52325
glabel D_800F2ECC
.float 0.26263
glabel D_800F2ED0
.float 0.13081
.word 0x00000000, 0x00000000, 0x00000000
glabel jpt_800F2EE0
.word L800BE60C, L800BE618, L800BE62C, L800BE638
.word L800BE794, L800BE864, L800BE7C4, L800BE7C4
.word L800BE844
glabel D_800F2F04
.float 32767.0
glabel D_800F2F08
.float 0.00001
.word 0x00000000
glabel jpt_800F2F10
.word L800BF3E8, L800BF600, L800BF600, L800BF380
.word L800BF348, L800BF600, L800BF600, L800BF3C8
.word L800BF308, L800BF600, L800BF600, L800BF2D0
glabel jpt_800F2F40
.word L800BF408, L800BF450, L800BF4B0, L800BF478
.word L800BF478, L800BF4C4, L800BF534, L800BF5BC
.word L800BF450, L800BF408, L800BF5C4, L800BF5F0
glabel D_800F2F70
.float 16129.0
glabel D_800F2F74
.float 16129.0
glabel D_800F2F78
.float 16129.0
glabel jpt_800F2F7C
.word L800BFA20, L800BFA28, L800BFA20, L800BFA28
.word L800BFA20
glabel jpt_800F2F90
.word L800C0124, L800C0078, L800C0140, L800C0150
.word L800C0094, L800C035C, L800C03B4, L800C03EC
.word L800C03EC, L800C0438, L800C0448, L800C03EC
.word L800BFE40, L800BFE40, L800BFE40, L800C0468
.word L800C048C, L800C049C, L800C01E8, L800C034C
.word L800BFE40, L800BFE40, L800C02B4, L800C0298
.word L800C0288, L800C026C, L800C0254, L800C0238
.word L800C021C, L800C01B4, L800C0160, L800C0184
.word L800C0304, L800C02D0, L800C0338, L800C04BC
.word L800C04AC, L800C0518, L800C0528, L800C0590
.word L800C0630, L800BFEC4, L800C00D0, L800C0608
.word L800BFE40, L800BFE40, L800C0640, L800C0068
.word L800C0040, L800BFFF8, L800BFFF8, L800BFFF8
.word L800BFFA0, L800BFF90, L800BFF48, L800BFF10
.word L800BFFA0, L800BFFA0, L800BFFA0, L800BFED4
.word L800BFEB4, L800C0880, L800BFE7C
glabel jpt_800F308C
.word L800C0684, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C07E4, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0814, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0830, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0858, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C06EC, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0708, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C06BC, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C06CC, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0714, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0760, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C077C
glabel jpt_800F3350
.word L800C0FF4, L800C0FE4, L800C0AE8, L800C0AE8
.word L800C0FD4, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0FC4, L800C0F98, L800C0F98, L800C0F88
.word L800C0F78, L800C0F4C, L800C0F30, L800C0F14
.word L800C0AE8, L800C0EE8, L800C0DD4, L800C0E50
.word L800C0D50, L800C0D50, L800C0D30, L800C0D2C
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0D1C, L800C0CF4, L800C0CAC, L800C0CAC
.word L800C0CAC, L800C0C54, L800C0AE8, L800C0C0C
.word L800C0BD4, L800C0C54, L800C0C54, L800C0C54
.word L800C0B90, L800C0AE8, L800C0AE8, L800C0AE8
glabel jpt_800F3430
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C1084, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C1090, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C1098, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C10A0, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8
.word 0x00000000, 0x00000000, 0x00000000
glabel D_800F35C0
.float 3.333333333
glabel jpt_800F35C4
.word L800C1A34, L800C1A34, L800C1A34, L800C1A34
.word L800C1AEC, L800C1A34
glabel D_800F35DC
.float 0.1
glabel D_800F35E0
.float 100000.0
glabel D_800F35E4
.float 100000.0
glabel D_800F35E8
.float 0.85
glabel jpt_800F35EC
.word L800C2A80, L800C2AB8, L800C2AD8, L800C2CDC
.word L800C2E40, L800C2F04, L800C3008, L800C3118
.word L800C3154, L800C31E4, L800C3218, L800C32B8
.word L800C32EC, L800C3430, L800C3390, L800C33E0
glabel jpt_800F362C
.word L800C3DEC, L800C3E10, L800C3E30, L800C3E70
.word L800C3E98, L800C3EBC, L800C3F04
glabel D_800F3648
.float 100000.0
glabel jpt_800F364C
.word L800C423C, L800C4268, L800C42A4, L800C42C8
.word L800C42FC, L800C4330
glabel D_800F3664
.float 100000.0
glabel D_800F3668
.float 100000.0
glabel D_800F366C
.float 4000000.0
glabel D_800F3670
.float 10000000000.0
glabel D_800F3674
.float 0.6
glabel D_800F3678
.float 0.4
glabel D_800F367C
.float 0.005000
glabel D_800F3680
.float 0.01
glabel D_800F3684
.float 12000.0
glabel D_800F3688
.float 0.03
glabel D_800F368C
.float 0.03
glabel D_800F3690
.float 0.4
glabel jpt_800F3694
.word L800C6544, L800C6618, L800C64E4, L800C65B8
.word L800C65B8, L800C65B8, L800C65B8, L800C65B8
.word L800C65B8, L800C65B8, L800C65B8, L800C65B8
.word L800C6544, L800C6544, L800C6618, L800C6618
.word L800C6544, L800C6618, L800C6618, L800C6618
.word L800C6618, L800C65B8, L800C65B8, L800C65B8
.word L800C6618, L800C6618, L800C6618, L800C6618
.word L800C65B8, L800C65B8, L800C65B8
glabel D_800F3710
.float 0.2
glabel D_800F3714
.float 3500.0
glabel D_800F3718
.float 3000.0
glabel D_800F371C
.float 0.4
glabel D_800F3720
.float 0.2
glabel D_800F3724
.float 0.06
glabel D_800F3728
.float 0.56
glabel D_800F372C
.float 0.9
glabel D_800F3730
.float 0.6
glabel D_800F3734
.float 13000.0
glabel D_800F3738
.float 0.95
glabel jpt_800F373C
.word L800C69C8, L800C6A0C, L800C6910, L800C6C74
.word L800C6CB8, L800C6CFC, L800C6D40, L800C6D84
.word L800C6DC8, L800C6E0C, L800C6E50, L800C6E94
.word L800C6FA4, L800C6E0C, L800C6A98, L800C6ADC
.word L800C6A50, L800C6958, L800C6990, L800C6B20
.word L800C7070, L800C6FA4, L800C6FE8, L800C702C
.word L800C6B64, L800C6BA8, L800C6BEC, L800C6C30
.word L800C6ED8, L800C6F1C, L800C6F60
glabel D_800F37B8
.float 3500.0
glabel jpt_800F37BC
.word L800C718C, L800C7198, L800C71B0, L800C71BC
.word L800C71A4, L800C71F4, L800C71F4, L800C71C8
.word L800C71F4, L800C71F4, L800C71F4, L800C71F4
.word L800C71EC, L800C71F4, L800C71D4, L800C71E0
glabel jpt_800F37FC
.word L800C7238, L800C7244, L800C725C, L800C7268
.word L800C7250, L800C7294, L800C7294, L800C7274
.word L800C7294, L800C7294, L800C7294, L800C7294
.word L800C7290, L800C7294, L800C7280, L800C7288
glabel jpt_800F383C
.word L800C72F8, L800C72B8, L800C742C, L800C73B8
.word L800C7378, L800C742C, L800C7338, L800C7428
.word L800C742C, L800C7418, L800C7420
glabel jpt_800F3868
.word L800C7494, L800C7454, L800C75C8, L800C7554
.word L800C7514, L800C75C8, L800C74D4, L800C75C4
.word L800C75C8, L800C75B4, L800C75BC
glabel D_800F3894
.float 0.7
glabel D_800F3898
.float 0.1
glabel D_800F389C
.float 0.03
glabel D_800F38A0
.float 0.16
glabel D_800F38A4
.float 0.15
glabel D_800F38A8
.float 0.03
glabel D_800F38AC
.float 0.012000
glabel D_800F38B0
.float 0.85
glabel D_800F38B4
.float 0.85
glabel jpt_800F38B8
.word L800C9560, L800C9560, L800C95BC, L800C9618
.word L800C9674, L800C96D0, L800C95BC, L800C96D0
glabel D_800F38D8
.float 0.35
glabel D_800F38DC
.float 2.800000
glabel D_800F38E0
.float 3844.0
glabel D_800F38E4
.float -0.8
glabel D_800F38E8
.float 1568.979614
glabel D_800F38EC
.float 1067.777832
glabel D_800F38F0
.float 2766.064941
glabel D_800F38F4
.float 0.6
glabel D_800F38F8
.float 3.200000
glabel D_800F38FC
.float 3844.0
glabel D_800F3900
.float -1.700000
glabel D_800F3904
.float 1478.461548
glabel D_800F3908
.float 784.489807
glabel D_800F390C
.float 12813.334961
glabel D_800F3910
.float 0.6
glabel D_800F3914
.float 2.800000
glabel D_800F3918
.float 3844.0
glabel D_800F391C
.float -0.6
glabel D_800F3920
.float 1747.272827
glabel D_800F3924
.float 1130.588257
glabel D_800F3928
.float 3844.000977
glabel D_800F392C
.float 0.2
glabel D_800F3930
.float 3844.0
glabel D_800F3934
.float -0.4
glabel D_800F3938
.float 2135.555664
glabel D_800F393C
.float 1601.666626
glabel D_800F3940
.float 3203.333008
glabel D_800F3944
.float 0.4
glabel D_800F3948
.float 2.400000
glabel D_800F394C
.float 3844.0
glabel D_800F3950
.float -0.8
glabel D_800F3954
.float 1922.0
glabel D_800F3958
.float 1201.250000
glabel D_800F395C
.float 4805.0
glabel jpt_800F3960
.word L800C9B3C, L800C9B3C, L800C9B68, L800C9B94
.word L800C9BC0, L800C9BEC, L800C9B68, L800C9BEC
glabel D_800F3980
.float 0.35
glabel D_800F3984
.float 1568.979614
glabel D_800F3988
.float 0.6
glabel D_800F398C
.float 1478.461548
glabel D_800F3990
.float 0.6
glabel D_800F3994
.float 1747.272827
glabel D_800F3998
.float 0.2
glabel D_800F399C
.float 2135.555664
glabel D_800F39A0
.float 0.4
glabel D_800F39A4
.float 1922.0
glabel D_800F39A8
.float 0.55
glabel D_800F39AC
.float 0.45
glabel D_800F39B0
.float 0.7
glabel D_800F39B4
.float 0.1
.balign 16
glabel jpt_800F39C0
.word L800CBE60, L800CBE78, L800CBE90, L800CBEA8
.word L800CBEC0, L800CBECC, L800CBF08, L800CBEEC
# guRotateF rodata
#glabel D_800F39E0
#.float 0.017453292
#.balign 16

564
data/rodata_audio.s Normal file
View File

@ -0,0 +1,564 @@
.include "macros.inc"
.section .rodata
# start audio data
# start heap.o
glabel D_800F2E80
.float 262159.0
glabel jpt_800F2E84
.word L800BA210, L800BA1E4, L800BA14C, L800BA094
.word L800BA050
glabel D_800F2E98
.float 0.001171875
glabel D_800F2E9C
.float 2880000.0
glabel D_800F2EA0
.float 20.0304203
glabel D_800F2EA4
.float 16.546
glabel D_800F2EA8
.float 16.713
.word 0x00000000
glabel D_800F2EB0
.float 0.707
glabel D_800F2EB4
.float 4095.999
glabel D_800F2EB8
.float 1.9999599
glabel D_800F2EBC
.float 3.9999199
glabel D_800F2EC0
.float 1.9999599
glabel D_800F2EC4
.float 1.0465
glabel D_800F2EC8
.float 0.52325
glabel D_800F2ECC
.float 0.26263
glabel D_800F2ED0
.float 0.13081
.word 0x00000000, 0x00000000, 0x00000000
# new file audio/effects.c
glabel jpt_800F2EE0
.word L800BE60C, L800BE618, L800BE62C, L800BE638
.word L800BE794, L800BE864, L800BE7C4, L800BE7C4
.word L800BE844
glabel D_800F2F04
.float 32767.0
glabel D_800F2F08
.float 0.00001
.word 0x00000000
glabel jpt_800F2F10
.word L800BF3E8, L800BF600, L800BF600, L800BF380
.word L800BF348, L800BF600, L800BF600, L800BF3C8
.word L800BF308, L800BF600, L800BF600, L800BF2D0
glabel jpt_800F2F40
.word L800BF408, L800BF450, L800BF4B0, L800BF478
.word L800BF478, L800BF4C4, L800BF534, L800BF5BC
.word L800BF450, L800BF408, L800BF5C4, L800BF5F0
glabel D_800F2F70
.float 16129.0
glabel D_800F2F74
.float 16129.0
glabel D_800F2F78
.float 16129.0
glabel jpt_800F2F7C
.word L800BFA20, L800BFA28, L800BFA20, L800BFA28
.word L800BFA20
glabel jpt_800F2F90
.word L800C0124, L800C0078, L800C0140, L800C0150
.word L800C0094, L800C035C, L800C03B4, L800C03EC
.word L800C03EC, L800C0438, L800C0448, L800C03EC
.word L800BFE40, L800BFE40, L800BFE40, L800C0468
.word L800C048C, L800C049C, L800C01E8, L800C034C
.word L800BFE40, L800BFE40, L800C02B4, L800C0298
.word L800C0288, L800C026C, L800C0254, L800C0238
.word L800C021C, L800C01B4, L800C0160, L800C0184
.word L800C0304, L800C02D0, L800C0338, L800C04BC
.word L800C04AC, L800C0518, L800C0528, L800C0590
.word L800C0630, L800BFEC4, L800C00D0, L800C0608
.word L800BFE40, L800BFE40, L800C0640, L800C0068
.word L800C0040, L800BFFF8, L800BFFF8, L800BFFF8
.word L800BFFA0, L800BFF90, L800BFF48, L800BFF10
.word L800BFFA0, L800BFFA0, L800BFFA0, L800BFED4
.word L800BFEB4, L800C0880, L800BFE7C
glabel jpt_800F308C
.word L800C0684, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C07E4, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0814, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0830, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0858, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C06EC, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0708, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C06BC, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C06CC, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0714, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C0760, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800BFE40, L800BFE40, L800BFE40, L800BFE40
.word L800C077C
glabel jpt_800F3350
.word L800C0FF4, L800C0FE4, L800C0AE8, L800C0AE8
.word L800C0FD4, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0FC4, L800C0F98, L800C0F98, L800C0F88
.word L800C0F78, L800C0F4C, L800C0F30, L800C0F14
.word L800C0AE8, L800C0EE8, L800C0DD4, L800C0E50
.word L800C0D50, L800C0D50, L800C0D30, L800C0D2C
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0D1C, L800C0CF4, L800C0CAC, L800C0CAC
.word L800C0CAC, L800C0C54, L800C0AE8, L800C0C0C
.word L800C0BD4, L800C0C54, L800C0C54, L800C0C54
.word L800C0B90, L800C0AE8, L800C0AE8, L800C0AE8
glabel jpt_800F3430
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C1084, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C1090, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C1098, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C10A0, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8, L800C0AE8, L800C0AE8, L800C0AE8
.word L800C0AE8
.word 0x00000000, 0x00000000, 0x00000000
glabel D_800F35C0
.float 3.333333333
glabel jpt_800F35C4
.word L800C1A34, L800C1A34, L800C1A34, L800C1A34
.word L800C1AEC, L800C1A34
glabel D_800F35DC
.float 0.1
glabel D_800F35E0
.float 100000.0
glabel D_800F35E4
.float 100000.0
glabel D_800F35E8
.float 0.85
glabel jpt_800F35EC
.word L800C2A80, L800C2AB8, L800C2AD8, L800C2CDC
.word L800C2E40, L800C2F04, L800C3008, L800C3118
.word L800C3154, L800C31E4, L800C3218, L800C32B8
.word L800C32EC, L800C3430, L800C3390, L800C33E0
glabel jpt_800F362C
.word L800C3DEC, L800C3E10, L800C3E30, L800C3E70
.word L800C3E98, L800C3EBC, L800C3F04
glabel D_800F3648
.float 100000.0
glabel jpt_800F364C
.word L800C423C, L800C4268, L800C42A4, L800C42C8
.word L800C42FC, L800C4330
glabel D_800F3664
.float 100000.0
glabel D_800F3668
.float 100000.0
glabel D_800F366C
.float 4000000.0
glabel D_800F3670
.float 10000000000.0
glabel D_800F3674
.float 0.6
glabel D_800F3678
.float 0.4
glabel D_800F367C
.float 0.005000
glabel D_800F3680
.float 0.01
glabel D_800F3684
.float 12000.0
glabel D_800F3688
.float 0.03
glabel D_800F368C
.float 0.03
glabel D_800F3690
.float 0.4
glabel jpt_800F3694
.word L800C6544, L800C6618, L800C64E4, L800C65B8
.word L800C65B8, L800C65B8, L800C65B8, L800C65B8
.word L800C65B8, L800C65B8, L800C65B8, L800C65B8
.word L800C6544, L800C6544, L800C6618, L800C6618
.word L800C6544, L800C6618, L800C6618, L800C6618
.word L800C6618, L800C65B8, L800C65B8, L800C65B8
.word L800C6618, L800C6618, L800C6618, L800C6618
.word L800C65B8, L800C65B8, L800C65B8
glabel D_800F3710
.float 0.2
glabel D_800F3714
.float 3500.0
glabel D_800F3718
.float 3000.0
glabel D_800F371C
.float 0.4
glabel D_800F3720
.float 0.2
glabel D_800F3724
.float 0.06
glabel D_800F3728
.float 0.56
glabel D_800F372C
.float 0.9
glabel D_800F3730
.float 0.6
glabel D_800F3734
.float 13000.0
glabel D_800F3738
.float 0.95
glabel jpt_800F373C
.word L800C69C8, L800C6A0C, L800C6910, L800C6C74
.word L800C6CB8, L800C6CFC, L800C6D40, L800C6D84
.word L800C6DC8, L800C6E0C, L800C6E50, L800C6E94
.word L800C6FA4, L800C6E0C, L800C6A98, L800C6ADC
.word L800C6A50, L800C6958, L800C6990, L800C6B20
.word L800C7070, L800C6FA4, L800C6FE8, L800C702C
.word L800C6B64, L800C6BA8, L800C6BEC, L800C6C30
.word L800C6ED8, L800C6F1C, L800C6F60
glabel D_800F37B8
.float 3500.0
glabel jpt_800F37BC
.word L800C718C, L800C7198, L800C71B0, L800C71BC
.word L800C71A4, L800C71F4, L800C71F4, L800C71C8
.word L800C71F4, L800C71F4, L800C71F4, L800C71F4
.word L800C71EC, L800C71F4, L800C71D4, L800C71E0
glabel jpt_800F37FC
.word L800C7238, L800C7244, L800C725C, L800C7268
.word L800C7250, L800C7294, L800C7294, L800C7274
.word L800C7294, L800C7294, L800C7294, L800C7294
.word L800C7290, L800C7294, L800C7280, L800C7288
glabel jpt_800F383C
.word L800C72F8, L800C72B8, L800C742C, L800C73B8
.word L800C7378, L800C742C, L800C7338, L800C7428
.word L800C742C, L800C7418, L800C7420
glabel jpt_800F3868
.word L800C7494, L800C7454, L800C75C8, L800C7554
.word L800C7514, L800C75C8, L800C74D4, L800C75C4
.word L800C75C8, L800C75B4, L800C75BC
glabel D_800F3894
.float 0.7
glabel D_800F3898
.float 0.1
glabel D_800F389C
.float 0.03
glabel D_800F38A0
.float 0.16
glabel D_800F38A4
.float 0.15
glabel D_800F38A8
.float 0.03
glabel D_800F38AC
.float 0.012000
glabel D_800F38B0
.float 0.85
glabel D_800F38B4
.float 0.85
glabel jpt_800F38B8
.word L800C9560, L800C9560, L800C95BC, L800C9618
.word L800C9674, L800C96D0, L800C95BC, L800C96D0
glabel D_800F38D8
.float 0.35
glabel D_800F38DC
.float 2.800000
glabel D_800F38E0
.float 3844.0
glabel D_800F38E4
.float -0.8
glabel D_800F38E8
.float 1568.979614
glabel D_800F38EC
.float 1067.777832
glabel D_800F38F0
.float 2766.064941
glabel D_800F38F4
.float 0.6
glabel D_800F38F8
.float 3.200000
glabel D_800F38FC
.float 3844.0
glabel D_800F3900
.float -1.700000
glabel D_800F3904
.float 1478.461548
glabel D_800F3908
.float 784.489807
glabel D_800F390C
.float 12813.334961
glabel D_800F3910
.float 0.6
glabel D_800F3914
.float 2.800000
glabel D_800F3918
.float 3844.0
glabel D_800F391C
.float -0.6
glabel D_800F3920
.float 1747.272827
glabel D_800F3924
.float 1130.588257
glabel D_800F3928
.float 3844.000977
glabel D_800F392C
.float 0.2
glabel D_800F3930
.float 3844.0
glabel D_800F3934
.float -0.4
glabel D_800F3938
.float 2135.555664
glabel D_800F393C
.float 1601.666626
glabel D_800F3940
.float 3203.333008
glabel D_800F3944
.float 0.4
glabel D_800F3948
.float 2.400000
glabel D_800F394C
.float 3844.0
glabel D_800F3950
.float -0.8
glabel D_800F3954
.float 1922.0
glabel D_800F3958
.float 1201.250000
glabel D_800F395C
.float 4805.0
glabel jpt_800F3960
.word L800C9B3C, L800C9B3C, L800C9B68, L800C9B94
.word L800C9BC0, L800C9BEC, L800C9B68, L800C9BEC
glabel D_800F3980
.float 0.35
glabel D_800F3984
.float 1568.979614
glabel D_800F3988
.float 0.6
glabel D_800F398C
.float 1478.461548
glabel D_800F3990
.float 0.6
glabel D_800F3994
.float 1747.272827
glabel D_800F3998
.float 0.2
glabel D_800F399C
.float 2135.555664
glabel D_800F39A0
.float 0.4
glabel D_800F39A4
.float 1922.0
glabel D_800F39A8
.float 0.55
glabel D_800F39AC
.float 0.45
glabel D_800F39B0
.float 0.7
glabel D_800F39B4
.float 0.1
.balign 16
glabel jpt_800F39C0
.word L800CBE60, L800CBE78, L800CBE90, L800CBEA8
.word L800CBEC0, L800CBECC, L800CBF08, L800CBEEC
# guRotateF rodata
#glabel D_800F39E0
#.float 0.017453292
#.balign 16

View File

@ -62,6 +62,6 @@
#define VIRTUAL_TO_PHYSICAL2(addr) ((u8 *)(addr) - 0x80000000U) #define VIRTUAL_TO_PHYSICAL2(addr) ((u8 *)(addr) - 0x80000000U)
// aligns an address to the next 16 bytes // aligns an address to the next 16 bytes
#define ALIGN16(x) (((x) + 0xF) & -0x10) #define ALIGN16(val) (((val) + 0xF) & ~0xF)
#endif #endif

View File

@ -18,7 +18,7 @@ extern f32 gCourseCompletionPercentByPlayerId[8]; // D_801644D0
extern f32 gCourseCompletionPercentByRank[8]; // D_80162FD8 extern f32 gCourseCompletionPercentByRank[8]; // D_80162FD8
extern s8 gCourseRecordsMenuSelection; // D_8018EDF8 extern s8 gCourseRecordsMenuSelection; // D_8018EDF8
extern f32 gCourseTimer; // D_800DC598 extern f32 gCourseTimer; // D_800DC598
extern s16 gCupCourseOrder[NUM_CUPS][NUM_COURSES_PER_CUP]; // D_800F2BB4 extern const s16 gCupCourseOrder[NUM_CUPS][NUM_COURSES_PER_CUP]; // D_800F2BB4
extern s8 gCupCourseSelection; // D_8018EE0B extern s8 gCupCourseSelection; // D_8018EE0B
extern char *gCupNames[]; // D_800E7500 extern char *gCupNames[]; // D_800E7500
extern s8 gCupSelection; // D_8018EE09 extern s8 gCupSelection; // D_8018EE09

View File

@ -87,7 +87,9 @@ SECTIONS
BUILD_DIR/src/code_80086E70.o(.text); BUILD_DIR/src/code_80086E70.o(.text);
BUILD_DIR/src/code_8008C1D0.o(.text); BUILD_DIR/src/code_8008C1D0.o(.text);
BUILD_DIR/src/code_80091750.o(.text); BUILD_DIR/src/code_80091750.o(.text);
BUILD_DIR/src/code_800AF9B0.o(.text);
BUILD_DIR/src/menus.o(.text); BUILD_DIR/src/menus.o(.text);
BUILD_DIR/src/code_800B45E0.o(.text);
BUILD_DIR/src/audio/synthesis.o(.text); BUILD_DIR/src/audio/synthesis.o(.text);
BUILD_DIR/src/audio/heap.o(.text); BUILD_DIR/src/audio/heap.o(.text);
BUILD_DIR/src/audio/load.o(.text); BUILD_DIR/src/audio/load.o(.text);
@ -253,6 +255,10 @@ SECTIONS
BUILD_DIR/data/data_0DD0A0_3_0_1.o(.rodata); BUILD_DIR/data/data_0DD0A0_3_0_1.o(.rodata);
BUILD_DIR/src/code_80057C60.o(.rodata); BUILD_DIR/src/code_80057C60.o(.rodata);
BUILD_DIR/data/data_0DD0A0_3_0.o(.rodata); BUILD_DIR/data/data_0DD0A0_3_0.o(.rodata);
BUILD_DIR/src/code_800AF9B0.o(.rodata);
BUILD_DIR/src/menus.o(.rodata);
BUILD_DIR/src/code_800B45E0.o(.rodata);
BUILD_DIR/data/rodata_audio.o(.rodata);
BUILD_DIR/src/os/guRotateF.o(.rodata); BUILD_DIR/src/os/guRotateF.o(.rodata);
BUILD_DIR/src/os/guPerspectiveF.o(.rodata); BUILD_DIR/src/os/guPerspectiveF.o(.rodata);
BUILD_DIR/data/data_0DD0A0_3_1.o(.rodata); BUILD_DIR/data/data_0DD0A0_3_1.o(.rodata);
@ -280,6 +286,8 @@ SECTIONS
BUILD_DIR/asm/bss_MainSeg.o(.bss); BUILD_DIR/asm/bss_MainSeg.o(.bss);
BUILD_DIR/src/camera.o(.bss); BUILD_DIR/src/camera.o(.bss);
BUILD_DIR/asm/bss_8001C4D0.o(.bss); BUILD_DIR/asm/bss_8001C4D0.o(.bss);
BUILD_DIR/src/code_800AF9B0.o(.bss);
BUILD_DIR/asm/bss_8018EDC0.o(.bss);
BUILD_DIR/src/os/osCreateViManager.o(.bss); BUILD_DIR/src/os/osCreateViManager.o(.bss);
BUILD_DIR/src/os/osCreatePiManager.o(.bss); BUILD_DIR/src/os/osCreatePiManager.o(.bss);
BUILD_DIR/src/os/osSetEventMesg.o(.bss); BUILD_DIR/src/os/osSetEventMesg.o(.bss);

View File

@ -74,7 +74,7 @@ mainSegFiles2 = [
"asm/non_matchings/code_80057C60", "asm/non_matchings/code_8006E9C0", "asm/non_matchings/code_80057C60", "asm/non_matchings/code_8006E9C0",
"asm/non_matchings/code_80071F00", "asm/non_matchings/code_80086E70", "asm/non_matchings/code_80071F00", "asm/non_matchings/code_80086E70",
"asm/non_matchings/code_8008C1D0", "asm/non_matchings/code_80091750", "asm/non_matchings/code_8008C1D0", "asm/non_matchings/code_80091750",
"asm/non_matchings/code_800AF9B0" "asm/non_matchings/menus"
] ]
seg2Files2 = [ seg2Files2 = [
"asm/non_matchings/code_8028DF00", "asm/non_matchings/code_80290C20", "asm/non_matchings/code_8028DF00", "asm/non_matchings/code_80290C20",

View File

@ -3,10 +3,13 @@
#include "common_structs.h" #include "common_structs.h"
void play_sound2(s32);
void func_800CA0A0(); void func_800CA0A0();
void func_800CA0B8(); void func_800CA0B8();
void func_800CA0CC(); void func_800CA0CC();
void func_800CA270(); void func_800CA270();
void func_800CA330(s32);
void func_800CA388(s32);
void func_800CB134(); void func_800CB134();
extern s8 D_800EA0F4; extern s8 D_800EA0F4;

View File

@ -47,7 +47,6 @@ extern u32 D_8015F730;
extern u32 D_8015F734; extern u32 D_8015F734;
extern u32 gPrevLoadedAddress; extern u32 gPrevLoadedAddress;
extern s32 D_80150120; extern s32 D_80150120;
extern s16 gCupCourseOrder[][4];
void func_800CA008(u8, u8); void func_800CA008(u8, u8);

View File

@ -6,6 +6,7 @@
/* Function Prototypes */ /* Function Prototypes */
s16 func_80005FD0(); s16 func_80005FD0();
void func_8001968C(void);
// math_util.c // math_util.c
u32 func_802B5224(); u32 func_802B5224();

View File

@ -1,15 +1,22 @@
#include <ultra64.h> #include <ultra64.h>
#include <macros.h> #include <macros.h>
#include <defines.h> #include <defines.h>
#include "code_80091750.h" #include "code_80091750.h"
#include "code_80005FD0.h"
#include "menus.h" #include "menus.h"
#include "code_800B45E0.h"
#include "code_80057C60.h"
#include "credits_01.h" #include "credits_01.h"
#include "data_segment2.h" #include "data_segment2.h"
#include "code_800AF9B0.h"
#include "variables.h" #include "variables.h"
// TODO: Move gGfxPool out of main.h // TODO: Move gGfxPool out of main.h
// Unfortunately that's not a small effort due to weird import structure in this project // Unfortunately that's not a small effort due to weird import structure in this project
#include "main.h" #include "main.h"
f64 exponent_by_squaring(f64 base, s32 exponent) { f64 exponent_by_squaring(f64 base, s32 exponent) {
s32 positive_exponent; s32 positive_exponent;
f64 result; f64 result;
@ -848,8 +855,8 @@ s32 char_to_glyph_index(char *character) {
GLOBAL_ASM("asm/non_matchings/code_80091750/char_to_glyph_index.s") GLOBAL_ASM("asm/non_matchings/code_80091750/char_to_glyph_index.s")
#endif #endif
s32 func_80092DF8(void) { s32 func_80092DF8(s8 *arg) {
return func_80092E1C() + 0x50; return func_80092E1C(arg) + 0x50;
} }
#ifdef MIPS_TO_C #ifdef MIPS_TO_C

View File

@ -68,7 +68,9 @@ void func_80092630();
void func_8009265C(); void func_8009265C();
void func_80092C80(); void func_80092C80();
s32 char_to_glyph_index(char*); s32 char_to_glyph_index(char*);
s32 func_80092DF8(); s32 func_80092DF8(s8 *);
s32 func_80092E1C(s8 *);
s32 func_80092EE4(s8 *);
s32 get_string_width(char*); s32 get_string_width(char*);
void set_text_color(s32); void set_text_color(s32);
void func_800930E4(s32, s32, s32*); void func_800930E4(s32, s32, s32*);
@ -113,6 +115,7 @@ void func_8009CA2C();
void func_8009CA6C(s32); void func_8009CA6C(s32);
void func_80099A94(MkTexture *, s32); void func_80099A94(MkTexture *, s32);
void func_80099AEC(); void func_80099AEC();
void func_8009E1E4(void);
void func_80099E54(); void func_80099E54();
void func_80099E60(MkTexture *, s32, s32); void func_80099E60(MkTexture *, s32, s32);
void func_80099EC4(); void func_80099EC4();

239
src/code_800AF9B0.c Normal file
View File

@ -0,0 +1,239 @@
#include <ultra64.h>
#include <macros.h>
#include <defines.h>
#include "global.h"
#include "code_800AF9B0.h"
#include "code_80091750.h"
#include "memory.h"
#include "main.h"
#include "math_util.h"
extern Light D_800E8680;
extern Light D_800E8688;
/* BSS */
s16 D_8018EDB0;
s16 D_8018EDB2;
s16 D_8018EDB4;
Vtx *D_8018EDB8;
Vtx *D_8018EDBC;
/* utils */
#define SQ(x) ((x) * (x))
void func_800AF9B0(void) {
D_8018EDB8 = (void *)func_802A7B70(480 * sizeof(Vtx));
D_8018EDBC = (void *)func_802A7B70(480 * sizeof(Vtx));
}
// could be a normal vertex, not a color...
void func_800AF9E4(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4, s16 arg5, s32 arg6, s32 arg7) {
s32 r, g, b;
s32 i;
for (i = 0; i < 4; i++) {
(arg0 + i)->v.ob[0] = ((i % 2) * arg7) + arg6 - 504;
if (i / 2 == 0) {
(arg0 + i)->v.ob[1] = (arg2 * arg3) - 420;
} else {
(arg0 + i)->v.ob[1] = (arg2 * arg3) + arg3 - 420;
}
if (i % 2 == 0) {
(arg0 + i)->v.ob[1] += (f32)SQ(arg1) * -0.07f;
} else {
(arg0 + i)->v.ob[1] += (f32)SQ(arg1 + 1) * -0.07f;
}
(arg0 + i)->v.cn[0] = 0;
(arg0 + i)->v.cn[1] = 0;
(arg0 + i)->v.cn[2] = 120;
(arg0 + i)->v.cn[3] = 255;
if (i % 2 == 0) {
(arg0 + i)->v.ob[2] = arg4;
} else {
(arg0 + i)->v.ob[2] = arg5;
}
}
if ((((arg1 / 2) + (arg2 / 2)) & 1) == 0) {
r = g = b = 0;
} else {
r = g = b = 255;
}
gDPSetPrimColor(gDisplayListHead++, 0, 0, r, g, b, 255);
gDPPipeSync(gDisplayListHead++);
gSPVertex(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(arg0), 4, 0);
gSP1Triangle(gDisplayListHead++, 1, 2, 0, 0);
gSP1Triangle(gDisplayListHead++, 3, 2, 1, 0);
}
void func_800AFC54(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4[3]);
#ifdef NON_MATCHING
// guess on Vtx type?
void func_800AFC54(Vtx *arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4[3]) {
Vtx *a1, *a2, *a3;
s32 saved1, saved2, saved3;
f32 res;
s32 a, b, c, d, e, f;
f32 f14, f16, f18;
a1 = &arg0[arg1];
a2 = &arg0[arg2];
a3 = &arg0[arg3];
saved1 = a2->v.ob[0];
saved2 = a2->v.ob[1];
saved3 = a2->v.ob[2];
a = saved2 - a1->v.ob[1];
e = saved3 - a1->v.ob[2];
d = a3->v.ob[1] - saved2;
b = a3->v.ob[2] - saved3;
f = a3->v.ob[0] - saved1;
c = saved1 - a1->v.ob[0];
f14 = ((a) * (b)) - ((e) * (d));
f16 = ((e) * (f)) - ((c) * (b));
f18 = ((c) * (d)) - ((a) * (f));
res = sqrtf(SQ(f14) + SQ(f16) + SQ(f18));
if (res < 0.001) {
res = 0.001;
}
arg4[0] = f14 * (f32)(1.0 / res) * 120.0f;
arg4[1] = f16 * (f32)(1.0 / res) * 120.0f;
arg4[2] = f18 * (f32)(1.0 / res) * 120.0f;
}
#else
GLOBAL_ASM("asm/non_matchings/menus/func_800AFC54.s")
#endif
void func_800AFE00(Vtx *arg0, s16 (*arg1)[3], s32 arg2, s32 arg3);
#ifdef MIPS_TO_C
// guessing on the Vtx kind again
void func_800AFE00(Vtx *arg0, s16 (*arg1)[3], s32 arg2, s32 arg3) {
s32 idx1; // v0
s32 idx2; // v0
s16 sp14[6];
Vtx *sec, *third, *fourth;
s32 i;
if (arg2 == 0) {
idx1 = 0;
} else {
idx1 = arg2 - 1;
}
if (arg2 == arg3) {
idx2 = arg3;
} else {
idx2 = arg2 + 1;
}
for (i = 0; i < 3; i++) {
sp14[i + 0] = (arg1[arg2][i] + arg1[idx1][i]) / 2;
sp14[i + 3] = (arg1[arg2][i] + arg1[idx2][i]) / 2;
// L800AFEB4
}
i = 0;
sec = arg0 + 1;
third = arg0 + 2;
fourth = arg0 + 3;
while (i != 480) {
(arg0 + i)->v.cn[0] = sp14[0];
(arg0 + i)->v.cn[1] = sp14[1];
(arg0 + i)->v.cn[2] = sp14[2];
(sec + i)->v.cn[0] = sp14[3];
(sec + i)->v.cn[1] = sp14[4];
(sec + i)->v.cn[2] = sp14[5];
(third + i)->v.cn[0] = sp14[0];
(third + i)->v.cn[1] = sp14[1];
(third + i)->v.cn[2] = sp14[2];
(fourth + i)->v.cn[0] = sp14[3];
(fourth + i)->v.cn[1] = sp14[4];
(fourth + i)->v.cn[2] = sp14[5];
i += 3 * sizeof(Vtx);
i++;i--;
}
}
#else
GLOBAL_ASM("asm/non_matchings/menus/func_800AFE00.s")
#endif
void func_800AFF58(Vtx *arg0) {
UNUSED u32 pad88[26];
s32 i, j;
s16 sp40[12][3];
for (i = 0, j = 0; i < ARRAY_COUNT(sp40); i++, j += 4) {
func_800AFC54(&arg0[j], 1, 2, 0, sp40[i]);
}
for (i = 0, j = 0; i < ARRAY_COUNT(sp40); i++, j += 4) {
func_800AFE00(&arg0[j], sp40, i, 11);
}
}
#ifdef NON_MATCHING
void func_800B0004(void) {
s32 i, j;
Vtx *spBC;
UNUSED u32 pad[0x10];
u32 sp64; // offset?
gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8688), LIGHT_1);
gSPLight(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_800E8680), LIGHT_2);
gSPNumLights(gDisplayListHead++, NUMLIGHTS_1);
gSPSetGeometryMode(gDisplayListHead++, G_SHADE | G_SHADING_SMOOTH);
gDPSetCombineLERP(gDisplayListHead++, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, SHADE, PRIMITIVE, 0, SHADE, 0, 0, 0, 0, SHADE);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
gSPSetGeometryMode(gDisplayListHead++, G_LIGHTING);
spBC = D_8018EDB4 % 2 ? (void *)D_8018EDB8 : (void *)D_8018EDBC;
D_8018EDB2 = 0x9C0;
for (i = 0, sp64 = 0; i < 10; i++, sp64 += 0x30) {
// L800B018C
for (j = 0; j < 12; j++) {
f32 res1, res2;
// L800B01A0
res1 = sins((u16)(D_8018EDB0 - (j * D_8018EDB2))) * 84.0f * (f32)j * 0.18f;
res2 = sins((u16)(D_8018EDB0 - ((j+1) * D_8018EDB2))) * 84.0f * (f32)(j+1) * 0.18f;
func_800AF9E4(
spBC + j + sp64,
j,
i,
84,
res1,
res2,
j * 84,
84
);
}
}
// will probably have to retype this function
func_800AFF58((void *)spBC);
D_8018EDB0 += D_8018EDB2;
D_8018EDB4 += 1;
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
gSPNumLights(gDisplayListHead++, NUMLIGHTS_1);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
}
#else
GLOBAL_ASM("asm/non_matchings/menus/func_800B0004.s")
#endif

22
src/code_800AF9B0.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef CODE_800AF9B0_H
#define CODE_800AF9B0_H
#include "common_structs.h"
#include <types.h>
/* Function Prototypes */
void func_800AF9B0(void);
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
extern s32 D_800E86A4;
extern s8 gDisplayedControllerPakTableRows[5]; // D_800E86C6
extern s32 D_800E86E4;
#endif /* CODE_800AF9B0_H */

1514
src/code_800B45E0.c Normal file

File diff suppressed because it is too large Load Diff

108
src/code_800B45E0.h Normal file
View File

@ -0,0 +1,108 @@
#ifndef CODE_800B045E0_H
#define CODE_800B045E0_H
#include "PR/os.h"
#include "common_structs.h"
#include <types.h>
union GrandPrixPointsUnion
{
u8 grandPrixPointsArray[4];
u8 grandPrixPointsMushroomCup;
};
/* Function Prototypes */
void func_800B45E0(s32);
void write_save_data_grand_prix_points_and_sound_mode();
void func_800B46D0();
void func_800B4728(s32);
void reset_save_data_grand_prix_points_and_sound_mode();
s32 func_800B4874(s32);
s32 func_800B639C(s32);
s32 compute_save_data_checksum_1();
s32 compute_save_data_checksum_2();
void func_800B4A10();
void func_800B4A9C(s32);
void validate_save_data(void);
s32 func_800B4E24(s32);
s32 func_800B4EB4(s32, s32);
s32 func_800B4F2C();
s32 func_800B4FB0(s32);
u8 func_800B54C0(s32, s32);
u8 func_800B54EC(s32, s32);
u8 func_800B5508(s32, s32, s32);
s32 func_800B5530(s32);
s32 func_800B555C();
s32 func_800B557C();
void func_800B559C(s32);
s32 func_800B578C(s32);
s32 func_800B5888(s32);
void update_save_data_backup();
s32 compute_save_data_checksum_backup_1(void);
s32 compute_save_data_checksum_backup_2(void);
s32 validate_save_data_checksum_backup();
s32 func_800B5B2C(s32);
s32 func_800B5F30();
s32 func_800B6014();
u8 func_800B60E8(s32);
s32 func_800B64EC(s32);
void func_800B6708(void);
u8 func_800B6828(s32);
u8 func_800B68F4(s32);
void func_800B69BC(s32);
s32 func_800B6A68();
/* data */
// these might not be in this file, but for now...
extern u32* D_800DC714;
extern u16 D_800E86F0;
extern s32 D_800E86F4;
extern s8 D_800E86F8;
extern struct_8018EE10_entry D_8018EE10[];
extern struct_8018EE10_entry *D_8018D9C0;
extern u8 D_8018ED16; // D_8018EB90.checksum[1]
extern u8 D_8018ED17; // D_8018EB90.checksum[2]
extern u8 D_8018ED4E; // D_8018EB90.onlyBestTimeTrialRecords[0].unknownBytes[6]
extern union GrandPrixPointsUnion D_8018ED10; // Direct reference to the grandPrixPoints section of save data
extern union GrandPrixPointsUnion D_8018ED88; // D_8018EB90.grandPrixPointsBackup[0]
extern s8 D_800E86FC;
extern const u8 D_800F2E60[];
extern const char D_800F2E64[];
extern const char D_800F2E74[];
extern OSMesgQueue gSIEventMesgQueue; // D_8014F0B8
extern u16 D_80162DD6;
extern s32 D_80162DE0;
extern s32 D_80162DFC;
extern OSPfs D_8018E868;
extern OSPfs D_8018E8D0;
extern OSPfsState D_8018E938[];
extern s32 D_8018EB38[16];
extern s32 D_8018EB78;
extern s32 D_8018EB7C;
extern s32 D_8018EB84;
extern s32 D_8018EB88;
extern SaveData D_8018EB90;
extern u8 D_8018ED11;
extern u8 D_8018ED12;
extern u8 D_8018ED13;
extern u8 gSaveDataSoundMode; // D_8018ED14
extern u8 D_8018ED89;
extern u8 D_8018ED8A;
extern u8 D_8018ED8B;
extern u8 D_8018ED8E; // D_8018EB90.checksumBackup[1]
extern u8 D_8018ED8F; // D_8018EB90.checksumBackup[2]
extern s8 D_8018EDE5;
extern s8 D_8018EDE6;
extern s8 D_8018EDE7;
extern u8 gSoundMode; // D_8018EDF2
extern s8 gTimeTrialDataCourseIndex; // D_8018EDF7
extern s8 gCourseRecordsMenuSelection; // D_8018EDF8
extern s32 gMenuTimingCounter; // D_8018EE00
extern s8 gCupSelection; // D_8018EE09
extern s8 gCupCourseSelection; // D_8018EE0B
#endif /* CODE_800B045E0_H */

View File

@ -58,6 +58,7 @@ void thread5_game_logic(s32);
void thread4_audio(s32); void thread4_audio(s32);
extern struct GfxPool *gGfxPool; extern struct GfxPool *gGfxPool;
extern Gfx *gDisplayListHead;
extern OSIoMesg gDmaIoMesg; extern OSIoMesg gDmaIoMesg;
extern OSMesg gMainReceivedMesg; extern OSMesg gMainReceivedMesg;

View File

@ -60,7 +60,7 @@ void move_segment_table_to_dmem(void) {
void func_802A7CF0(s32 start, s32 end) { void func_802A7CF0(s32 start, s32 end) {
start = ALIGN32(start); start = ALIGN16(start);
end &= ~0xF; end &= ~0xF;
D_8015F724 = (end - start) - 0x10; D_8015F724 = (end - start) - 0x10;
@ -70,7 +70,7 @@ void func_802A7CF0(s32 start, s32 end) {
s32 func_802A7D1C(s32 arg0) { s32 func_802A7D1C(s32 arg0) {
s32 addr; s32 addr;
arg0 = ALIGN32(arg0); arg0 = ALIGN16(arg0);
D_8015F724 -= arg0; D_8015F724 -= arg0;
addr = gPrevLoadedAddress; addr = gPrevLoadedAddress;
gPrevLoadedAddress += arg0; gPrevLoadedAddress += arg0;

View File

@ -34,8 +34,6 @@ struct AllocOnlyPool {
#define MEMORY_POOL_RIGHT 1 #define MEMORY_POOL_RIGHT 1
#define ALIGN4(val) (((val) + 0x3) & ~0x3) #define ALIGN4(val) (((val) + 0x3) & ~0x3)
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#define ALIGN32(val) (((val) + 0xF) & ~0xF)
s32 func_802A7B70(s32); s32 func_802A7B70(s32);
uintptr_t set_segment_base_addr(s32, void*); uintptr_t set_segment_base_addr(s32, void*);

File diff suppressed because it is too large Load Diff

View File

@ -4,17 +4,9 @@
#include "PR/os.h" #include "PR/os.h"
#include "common_structs.h" #include "common_structs.h"
#include <types.h> #include <types.h>
#include <defines.h>
union GrandPrixPointsUnion
{
u8 grandPrixPointsArray[4];
u8 grandPrixPointsMushroomCup;
};
/* Function Prototypes */ /* Function Prototypes */
void func_800AF9B0();
void func_800B0004();
void func_800B053C(struct Controller*, u16); void func_800B053C(struct Controller*, u16);
void func_800B13B0(struct Controller*, u16); void func_800B13B0(struct Controller*, u16);
void func_800B15AC(struct Controller*, u16); void func_800B15AC(struct Controller*, u16);
@ -25,131 +17,21 @@ void func_800B29D8(struct Controller*, u16);
s32 func_800B34E8(s32); s32 func_800B34E8(s32);
void func_800B3554(struct Controller*, u16); void func_800B3554(struct Controller*, u16);
void func_800B3B58(struct Controller*, u16); void func_800B3B58(struct Controller*, u16);
void func_800B44AC(); void func_800B44AC(void);
void func_800B44BC(); void func_800B44BC(void);
s32 func_800B4520(); s32 func_800B4520(void);
void func_800B45E0(s32);
void write_save_data_grand_prix_points_and_sound_mode();
void func_800B46D0();
void func_800B4728(s32);
void reset_save_data_grand_prix_points_and_sound_mode();
s32 func_800B4874(s32);
s32 func_800B639C(s32);
s32 compute_save_data_checksum_1();
s32 compute_save_data_checksum_2();
void func_800B4A10();
void func_800B4A9C(s32);
void validate_save_data(void);
s32 func_800B4E24(s32);
s32 func_800B4EB4(s32, s32);
s32 func_800B4F2C();
s32 func_800B4FB0(s32);
u8 func_800B54C0(s32, s32);
u8 func_800B54EC(s32, s32);
u8 func_800B5508(s32, s32, s32);
s32 func_800B5530(s32);
s32 func_800B555C();
s32 func_800B557C();
void func_800B559C(s32);
s32 func_800B578C(s32);
s32 func_800B5888(s32);
void update_save_data_backup();
s32 compute_save_data_checksum_backup_1(void);
s32 compute_save_data_checksum_backup_2(void);
s32 validate_save_data_checksum_backup();
s32 func_800B5B2C(s32);
s32 func_800B5F30();
s32 func_800B6014();
u8 func_800B60E8(s32);
u8 func_800B6828(s32);
u8 func_800B68F4(s32);
void func_800B69BC(s32);
s32 func_800B6A68();
// staff_ghosts.c /* data */
s32 func_800051C4(); // these might not be in this file, but for now...
void func_8000522C();
void func_80005AE8(Player*);
// audio/external.c
void play_sound2(s32);
void func_800CA330(s32);
void func_800CA388(s32);
// os
s32 osPfsInit(OSMesgQueue*, OSPfs*, s32);
// memory.c
u32 func_802A7B70(u16);
/* This is where I'd put my static data, if I had any */
extern u16 gEnableDebugMode; // D_800DC520
extern s32 gCCSelection; // D_800DC538
extern s32 gModeSelection; // D_800DC53C
extern s32 D_800DC540;
extern s16 gCurrentCourseId; // D_800DC5A0
extern s32 gIsMirrorMode; // D_800DC5F4
extern s16 gPlaceItemBoxes; // D_800DC638
extern u32* D_800DC714;
extern s8 gGameModeRowSelectionForNumPlayers[SELECTED_PLAYER_DEFINES_TOTAL]; // D_800E869B. 0-4 players, game type row selected for each player amoun
extern s8 gGameModeSubMenuRowSelectionForNumPlayers[SELECTED_PLAYER_DEFINES_TOTAL][MAX_NUM_MAIN_MENU_GAME_TYPES]; // D_800E869D. 0-4 players, 3 possible game types per player amouunt extern s8 gGameModeSubMenuRowSelectionForNumPlayers[SELECTED_PLAYER_DEFINES_TOTAL][MAX_NUM_MAIN_MENU_GAME_TYPES]; // D_800E869D. 0-4 players, 3 possible game types per player amouunt
extern s32 D_800E86A4; extern s8 gGameModeRowSelectionForNumPlayers[SELECTED_PLAYER_DEFINES_TOTAL]; // D_800E869B. 0-4 players, game type row selected for each player amoun
extern s8 gDisplayedControllerPakTableRows[5]; // D_800E86C6 extern const s32 gGameModeFromNumPlayersAndRowSelection[SELECTED_PLAYER_DEFINES_TOTAL][MAX_NUM_MAIN_MENU_GAME_TYPES]; // D_800F2B60. 0-4 players, 3 possible game types per player amount
extern s32 D_800E86E4; extern s16 gPlaceItemBoxes; // D_800DC638
extern u16 D_800E86F0;
extern s32 D_800E86F4;
extern s8 D_800E86F8;
extern s8 D_800E86FC;
extern s32 gGameModeFromNumPlayersAndRowSelection[SELECTED_PLAYER_DEFINES_TOTAL][MAX_NUM_MAIN_MENU_GAME_TYPES]; // D_800F2B60. 0-4 players, 3 possible game types per player amount
extern u8 D_800F2E60[];
extern u8 D_800F2E64;
extern u8 D_800F2E74;
extern OSMesgQueue gSIEventMesgQueue; // D_8014F0B8
extern u16 D_80162DD6;
extern s32 D_80162DE0;
extern s32 D_80162DFC;
extern struct_8018EE10_entry* D_8018D9C0;
extern s32 D_8018E7A8; extern s32 D_8018E7A8;
extern s8 D_8018E7B0; extern s8 D_8018E7B0;
extern OSPfs D_8018E868;
extern OSPfs D_8018E8D0;
extern OSPfsState D_8018E938[];
extern s32 D_8018EB38[16];
extern s32 D_8018EB78;
extern s32 D_8018EB7C;
extern s32 D_8018EB84;
extern s32 D_8018EB88;
extern SaveData D_8018EB90;
extern union GrandPrixPointsUnion D_8018ED10; // Direct reference to the grandPrixPoints section of save data
extern u8 D_8018ED11;
extern u8 D_8018ED12;
extern u8 D_8018ED13;
extern u8 gSaveDataSoundMode; // D_8018ED14
extern u8 D_8018ED16; // D_8018EB90.checksum[1]
extern u8 D_8018ED17; // D_8018EB90.checksum[2]
extern u8 D_8018ED4E; // D_8018EB90.onlyBestTimeTrialRecords[0].unknownBytes[6]
extern union GrandPrixPointsUnion D_8018ED88; // D_8018EB90.grandPrixPointsBackup[0]
extern u8 D_8018ED89;
extern u8 D_8018ED8A;
extern u8 D_8018ED8B;
extern u8 D_8018ED8E; // D_8018EB90.checksumBackup[1]
extern u8 D_8018ED8F; // D_8018EB90.checksumBackup[2]
extern u32 D_8018EDB8;
extern u32 D_8018EDBC;
extern s8 D_8018EDE5;
extern s8 D_8018EDE6;
extern s8 D_8018EDE7;
extern u8 gSoundMode; // D_8018EDF2
extern s8 D_8018EDF3; extern s8 D_8018EDF3;
extern s8 gTimeTrialDataCourseIndex; // D_8018EDF7
extern s8 gCourseRecordsMenuSelection; // D_8018EDF8
extern s8 D_8018EDFB; extern s8 D_8018EDFB;
extern s32 gMenuTimingCounter; // D_8018EE00
extern s8 gCupSelection; // D_8018EE09
extern s8 D_8018EE0A; extern s8 D_8018EE0A;
extern s8 gCupCourseSelection; // D_8018EE0B
extern struct_8018EE10_entry D_8018EE10[];
#endif // MENUS_H #endif /* MENUS_H */

12
src/staff_ghosts.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef STAFF_GHOSTS_H
#define STAFF_GHOSTS_H
#include "PR/os.h"
#include "common_structs.h"
#include <types.h>
s32 func_800051C4();
void func_8000522C();
void func_80005AE8(Player *);
#endif /* STAFF_GHOSTS_H */

3
tools/.gitignore vendored
View File

@ -4,3 +4,6 @@
/n64graphics /n64graphics
/tkmk00 /tkmk00
/extract_data_for_mio /extract_data_for_mio
__pycache__
*.pyc

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +1,114 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import sys import sys
import os from pathlib import Path
import shlex import shlex
import subprocess import subprocess
import tempfile import tempfile
import uuid
import asm_processor
dir_path = os.path.dirname(os.path.realpath(__file__)) # Boolean for debugging purposes
asm_processor = ['python3', os.path.join(dir_path, "asm-processor.py")] # Preprocessed files are temporary, set to True to keep a copy
prelude = os.path.join(dir_path, "prelude.inc") keep_preprocessed_files = False
dir_path = Path(__file__).resolve().parent
asm_prelude_path = dir_path / "prelude.inc"
all_args = sys.argv[1:] all_args = sys.argv[1:]
sep1 = all_args.index('--') sep0 = next(index for index, arg in enumerate(all_args) if not arg.startswith("-"))
sep2 = all_args.index('--', sep1+1) sep1 = all_args.index("--")
sep2 = all_args.index("--", sep1 + 1)
compiler = all_args[:sep1] asmproc_flags = all_args[:sep0]
compiler = all_args[sep0:sep1]
assembler = all_args[sep1+1:sep2] assembler_args = all_args[sep1 + 1 : sep2]
assembler_sh = ' '.join(shlex.quote(x) for x in assembler) assembler_sh = " ".join(shlex.quote(x) for x in assembler_args)
compile_args = all_args[sep2+1:]
in_file = compile_args[-1] compile_args = all_args[sep2 + 1 :]
out_ind = compile_args.index('-o')
out_file = compile_args[out_ind + 1] in_file = Path(compile_args[-1])
del compile_args[-1] del compile_args[-1]
out_ind = compile_args.index("-o")
out_file = Path(compile_args[out_ind + 1])
del compile_args[out_ind + 1] del compile_args[out_ind + 1]
del compile_args[out_ind] del compile_args[out_ind]
in_dir = os.path.split(os.path.realpath(in_file))[0]
opt_flags = [x for x in compile_args if x in ['-g', '-O2', '-framepointer']]
in_dir = in_file.resolve().parent
opt_flags = [
x for x in compile_args if x in {"-g3", "-g", "-O0", "-O1", "-O2", "-framepointer"}
]
if "-mips2" not in compile_args:
opt_flags.append("-mips1")
preprocessed_file = tempfile.NamedTemporaryFile(prefix='preprocessed', suffix='.c', delete=False) asmproc_flags += opt_flags + [str(in_file)]
subprocess.check_call(asm_processor + opt_flags + [in_file], stdout=preprocessed_file) # Drop .mdebug and .gptab sections from resulting binaries. This makes
subprocess.check_call(compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name]) # resulting .o files much smaller and speeds up builds, but loses line
subprocess.check_call(asm_processor + opt_flags + [in_file, '--post-process', out_file, '--assembler', assembler_sh, '--asm-prelude', prelude]) # number debug data.
# asmproc_flags += ["--drop-mdebug-gptab"]
# Convert encoding before compiling.
# asmproc_flags += ["--input-enc", "utf-8", "--output-enc", "euc-jp"]
with tempfile.TemporaryDirectory(prefix="asm_processor") as tmpdirname:
tmpdir_path = Path(tmpdirname)
preprocessed_filename = "preprocessed_" + uuid.uuid4().hex + ".c"
preprocessed_path = tmpdir_path / preprocessed_filename
with preprocessed_path.open("wb") as f:
functions, deps = asm_processor.run(asmproc_flags, outfile=f)
if keep_preprocessed_files:
import shutil
keep_output_dir = Path("./asm_processor_preprocessed")
keep_output_dir.mkdir(parents=True, exist_ok=True)
shutil.copy(
preprocessed_path,
keep_output_dir / (in_file.stem + "_" + preprocessed_filename),
)
compile_cmdline = (
compiler
+ compile_args
+ ["-I", str(in_dir), "-o", str(out_file), str(preprocessed_path)]
)
try:
subprocess.check_call(compile_cmdline)
except subprocess.CalledProcessError as e:
print("Failed to compile file " + str(in_file) + ". Command line:")
print()
print(" ".join(shlex.quote(x) for x in compile_cmdline))
print()
sys.exit(55)
asm_processor.run(
asmproc_flags
+ [
"--post-process",
str(out_file),
"--assembler",
assembler_sh,
"--asm-prelude",
str(asm_prelude_path),
],
functions=functions,
)
deps_file = out_file.with_suffix(".asmproc.d")
if deps:
with deps_file.open("w") as f:
f.write(str(out_file) + ": " + " \\\n ".join(deps) + "\n")
for dep in deps:
f.write("\n" + dep + ":\n")
else:
try:
deps_file.unlink()
except OSError:
pass

View File

@ -1,5 +1,43 @@
.set noat .set noat
.set noreorder .set noreorder
.set gp=64 .set gp=64
.include "macros.inc" .macro glabel label
.global \label
\label:
.endm
# Float register aliases (o32 ABI, odd ones are rarely used)
.set $fv0, $f0
.set $fv0f, $f1
.set $fv1, $f2
.set $fv1f, $f3
.set $ft0, $f4
.set $ft0f, $f5
.set $ft1, $f6
.set $ft1f, $f7
.set $ft2, $f8
.set $ft2f, $f9
.set $ft3, $f10
.set $ft3f, $f11
.set $fa0, $f12
.set $fa0f, $f13
.set $fa1, $f14
.set $fa1f, $f15
.set $ft4, $f16
.set $ft4f, $f17
.set $ft5, $f18
.set $ft5f, $f19
.set $fs0, $f20
.set $fs0f, $f21
.set $fs1, $f22
.set $fs1f, $f23
.set $fs2, $f24
.set $fs2f, $f25
.set $fs3, $f26
.set $fs3f, $f27
.set $fs4, $f28
.set $fs4f, $f29
.set $fs5, $f30
.set $fs5f, $f31