mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 17:54:15 +00:00
Decomp and matching in fault.c and game.c (#265)
* Match Fault_WaitForInputImpl. * Decomp Fault_AddAddrConvClient, similar issues as Fault_AddClient. * Decomp Fault_WaitForButtonCombo, regalloc issues. * Rename func_800D59F8 to Fault_WalkStack. * Decomp Fault_DrawStackTrace. * Decomp Fault_WalkStack. * Decomp Fault_LogStackTrace. * Match Fault_ThreadEntry. * Improve Fault_DrawMemDump matching. * Improve code consistency in fault.c. * Match GameState_Update. * Match GameState_Realloc. * Match GameState_DrawInputDisplay. * Trivial cleanup of sBtnChars.
This commit is contained in:
parent
24ab14f748
commit
e29442f1a9
14 changed files with 340 additions and 1342 deletions
|
@ -1,117 +0,0 @@
|
|||
.rdata
|
||||
glabel D_801472D0
|
||||
.asciz "SP PC (VPC)"
|
||||
.balign 4
|
||||
glabel D_801472E8
|
||||
.asciz "%08x %08x"
|
||||
.balign 4
|
||||
glabel D_801472F4
|
||||
.asciz " -> %08x"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel Fault_DrawStackTrace
|
||||
/* B4CD28 800D5B88 3C0FFFFA */ lui $t7, (0xFFFA5A5A >> 16) # lui $t7, 0xfffa
|
||||
/* B4CD2C 800D5B8C 03A0C025 */ move $t8, $sp
|
||||
/* B4CD30 800D5B90 27BDFF90 */ addiu $sp, $sp, -0x70
|
||||
/* B4CD34 800D5B94 35EF5A5A */ ori $t7, (0xFFFA5A5A & 0xFFFF) # ori $t7, $t7, 0x5a5a
|
||||
.L800D5B98:
|
||||
/* B4CD38 800D5B98 2718FFF8 */ addiu $t8, $t8, -8
|
||||
/* B4CD3C 800D5B9C AF0F0000 */ sw $t7, ($t8)
|
||||
/* B4CD40 800D5BA0 171DFFFD */ bne $t8, $sp, .L800D5B98
|
||||
/* B4CD44 800D5BA4 AF0F0004 */ sw $t7, 4($t8)
|
||||
/* B4CD48 800D5BA8 AFB50034 */ sw $s5, 0x34($sp)
|
||||
/* B4CD4C 800D5BAC AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* B4CD50 800D5BB0 00808025 */ move $s0, $a0
|
||||
/* B4CD54 800D5BB4 00C0A825 */ move $s5, $a2
|
||||
/* B4CD58 800D5BB8 AFBF0044 */ sw $ra, 0x44($sp)
|
||||
/* B4CD5C 800D5BBC AFBE0040 */ sw $fp, 0x40($sp)
|
||||
/* B4CD60 800D5BC0 AFB7003C */ sw $s7, 0x3c($sp)
|
||||
/* B4CD64 800D5BC4 AFB60038 */ sw $s6, 0x38($sp)
|
||||
/* B4CD68 800D5BC8 AFB40030 */ sw $s4, 0x30($sp)
|
||||
/* B4CD6C 800D5BCC AFB3002C */ sw $s3, 0x2c($sp)
|
||||
/* B4CD70 800D5BD0 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* B4CD74 800D5BD4 AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* B4CD78 800D5BD8 AFA50074 */ sw $a1, 0x74($sp)
|
||||
/* B4CD7C 800D5BDC AFA7007C */ sw $a3, 0x7c($sp)
|
||||
/* B4CD80 800D5BE0 8E0F00F4 */ lw $t7, 0xf4($s0)
|
||||
/* B4CD84 800D5BE4 3C068014 */ lui $a2, %hi(D_801472D0) # $a2, 0x8014
|
||||
/* B4CD88 800D5BE8 24C672D0 */ addiu $a2, %lo(D_801472D0) # addiu $a2, $a2, 0x72d0
|
||||
/* B4CD8C 800D5BEC AFAF0068 */ sw $t7, 0x68($sp)
|
||||
/* B4CD90 800D5BF0 8E090104 */ lw $t1, 0x104($s0)
|
||||
/* B4CD94 800D5BF4 8FA40074 */ lw $a0, 0x74($sp)
|
||||
/* B4CD98 800D5BF8 02A02825 */ move $a1, $s5
|
||||
/* B4CD9C 800D5BFC AFA90064 */ sw $t1, 0x64($sp)
|
||||
/* B4CDA0 800D5C00 8E0A011C */ lw $t2, 0x11c($s0)
|
||||
/* B4CDA4 800D5C04 0C035C26 */ jal FaultDrawer_DrawText
|
||||
/* B4CDA8 800D5C08 AFAA0060 */ sw $t2, 0x60($sp)
|
||||
/* B4CDAC 800D5C0C 8FBE007C */ lw $fp, 0x7c($sp)
|
||||
/* B4CDB0 800D5C10 24020001 */ li $v0, 1
|
||||
/* B4CDB4 800D5C14 8FAB0064 */ lw $t3, 0x64($sp)
|
||||
/* B4CDB8 800D5C18 2BC10002 */ slti $at, $fp, 2
|
||||
/* B4CDBC 800D5C1C 5420002F */ bnezl $at, .L800D5CDC
|
||||
/* B4CDC0 800D5C20 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
/* B4CDC4 800D5C24 15600003 */ bnez $t3, .L800D5C34
|
||||
/* B4CDC8 800D5C28 8FAC0068 */ lw $t4, 0x68($sp)
|
||||
/* B4CDCC 800D5C2C 5180002B */ beql $t4, $zero, .L800D5CDC
|
||||
/* B4CDD0 800D5C30 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L800D5C34:
|
||||
/* B4CDD4 800D5C34 8FB20060 */ lw $s2, 0x60($sp)
|
||||
/* B4CDD8 800D5C38 3C138000 */ lui $s3, %hi(__osCleanupThread) # $s3, 0x8000
|
||||
/* B4CDDC 800D5C3C 267342F0 */ addiu $s3, %lo(__osCleanupThread) # addiu $s3, $s3, 0x42f0
|
||||
/* B4CDE0 800D5C40 12530025 */ beq $s2, $s3, .L800D5CD8
|
||||
/* B4CDE4 800D5C44 000280C0 */ sll $s0, $v0, 3
|
||||
/* B4CDE8 800D5C48 02158821 */ addu $s1, $s0, $s5
|
||||
/* B4CDEC 800D5C4C 3C158014 */ lui $s5, %hi(D_801472E8) # $s5, 0x8014
|
||||
/* B4CDF0 800D5C50 3C168014 */ lui $s6, %hi(D_801472F4) # $s6, 0x8014
|
||||
/* B4CDF4 800D5C54 26D672F4 */ addiu $s6, %lo(D_801472F4) # addiu $s6, $s6, 0x72f4
|
||||
/* B4CDF8 800D5C58 26B572E8 */ addiu $s5, %lo(D_801472E8) # addiu $s5, $s5, 0x72e8
|
||||
/* B4CDFC 800D5C5C 001EA0C0 */ sll $s4, $fp, 3
|
||||
/* B4CE00 800D5C60 27B70068 */ addiu $s7, $sp, 0x68
|
||||
/* B4CE04 800D5C64 8FA40074 */ lw $a0, 0x74($sp)
|
||||
.L800D5C68:
|
||||
/* B4CE08 800D5C68 02202825 */ move $a1, $s1
|
||||
/* B4CE0C 800D5C6C 02A03025 */ move $a2, $s5
|
||||
/* B4CE10 800D5C70 8FA70068 */ lw $a3, 0x68($sp)
|
||||
/* B4CE14 800D5C74 0C035C26 */ jal FaultDrawer_DrawText
|
||||
/* B4CE18 800D5C78 AFB20010 */ sw $s2, 0x10($sp)
|
||||
/* B4CE1C 800D5C7C 0C035162 */ jal Fault_ConvertAddress
|
||||
/* B4CE20 800D5C80 8FA40060 */ lw $a0, 0x60($sp)
|
||||
/* B4CE24 800D5C84 10400003 */ beqz $v0, .L800D5C94
|
||||
/* B4CE28 800D5C88 00402825 */ move $a1, $v0
|
||||
/* B4CE2C 800D5C8C 0C035C12 */ jal FaultDrawer_Printf
|
||||
/* B4CE30 800D5C90 02C02025 */ move $a0, $s6
|
||||
.L800D5C94:
|
||||
/* B4CE34 800D5C94 02E02025 */ move $a0, $s7
|
||||
/* B4CE38 800D5C98 27A50060 */ addiu $a1, $sp, 0x60
|
||||
/* B4CE3C 800D5C9C 0C03567E */ jal func_800D59F8
|
||||
/* B4CE40 800D5CA0 27A60064 */ addiu $a2, $sp, 0x64
|
||||
/* B4CE44 800D5CA4 26100008 */ addiu $s0, $s0, 8
|
||||
/* B4CE48 800D5CA8 0214082A */ slt $at, $s0, $s4
|
||||
/* B4CE4C 800D5CAC 1020000A */ beqz $at, .L800D5CD8
|
||||
/* B4CE50 800D5CB0 26310008 */ addiu $s1, $s1, 8
|
||||
/* B4CE54 800D5CB4 8FAD0064 */ lw $t5, 0x64($sp)
|
||||
/* B4CE58 800D5CB8 8FAE0068 */ lw $t6, 0x68($sp)
|
||||
/* B4CE5C 800D5CBC 8FB20060 */ lw $s2, 0x60($sp)
|
||||
/* B4CE60 800D5CC0 15A00003 */ bnez $t5, .L800D5CD0
|
||||
/* B4CE64 800D5CC4 00000000 */ nop
|
||||
/* B4CE68 800D5CC8 51C00004 */ beql $t6, $zero, .L800D5CDC
|
||||
/* B4CE6C 800D5CCC 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L800D5CD0:
|
||||
/* B4CE70 800D5CD0 5653FFE5 */ bnel $s2, $s3, .L800D5C68
|
||||
/* B4CE74 800D5CD4 8FA40074 */ lw $a0, 0x74($sp)
|
||||
.L800D5CD8:
|
||||
/* B4CE78 800D5CD8 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L800D5CDC:
|
||||
/* B4CE7C 800D5CDC 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* B4CE80 800D5CE0 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* B4CE84 800D5CE4 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* B4CE88 800D5CE8 8FB3002C */ lw $s3, 0x2c($sp)
|
||||
/* B4CE8C 800D5CEC 8FB40030 */ lw $s4, 0x30($sp)
|
||||
/* B4CE90 800D5CF0 8FB50034 */ lw $s5, 0x34($sp)
|
||||
/* B4CE94 800D5CF4 8FB60038 */ lw $s6, 0x38($sp)
|
||||
/* B4CE98 800D5CF8 8FB7003C */ lw $s7, 0x3c($sp)
|
||||
/* B4CE9C 800D5CFC 8FBE0040 */ lw $fp, 0x40($sp)
|
||||
/* B4CEA0 800D5D00 03E00008 */ jr $ra
|
||||
/* B4CEA4 800D5D04 27BD0070 */ addiu $sp, $sp, 0x70
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
.rdata
|
||||
glabel D_80147300
|
||||
.asciz "STACK TRACE\nSP PC (VPC)\n"
|
||||
.balign 4
|
||||
glabel D_80147328
|
||||
.asciz "%08x %08x"
|
||||
.balign 4
|
||||
glabel D_80147334
|
||||
.asciz " -> %08x"
|
||||
.balign 4
|
||||
glabel D_80147340
|
||||
.asciz "\n"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel Fault_LogStackTrace
|
||||
/* B4CEA8 800D5D08 3C08FFFA */ lui $t0, (0xFFFA5A5A >> 16) # lui $t0, 0xfffa
|
||||
/* B4CEAC 800D5D0C 03A04825 */ move $t1, $sp
|
||||
/* B4CEB0 800D5D10 27BDFFA0 */ addiu $sp, $sp, -0x60
|
||||
/* B4CEB4 800D5D14 35085A5A */ ori $t0, (0xFFFA5A5A & 0xFFFF) # ori $t0, $t0, 0x5a5a
|
||||
.L800D5D18:
|
||||
/* B4CEB8 800D5D18 2529FFF8 */ addiu $t1, $t1, -8
|
||||
/* B4CEBC 800D5D1C AD280000 */ sw $t0, ($t1)
|
||||
/* B4CEC0 800D5D20 153DFFFD */ bne $t1, $sp, .L800D5D18
|
||||
/* B4CEC4 800D5D24 AD280004 */ sw $t0, 4($t1)
|
||||
/* B4CEC8 800D5D28 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* B4CECC 800D5D2C AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* B4CED0 800D5D30 AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* B4CED4 800D5D34 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* B4CED8 800D5D38 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* B4CEDC 800D5D3C AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B4CEE0 800D5D40 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B4CEE4 800D5D44 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B4CEE8 800D5D48 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B4CEEC 800D5D4C AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B4CEF0 800D5D50 00803025 */ move $a2, $a0
|
||||
/* B4CEF4 800D5D54 AFA50064 */ sw $a1, 0x64($sp)
|
||||
/* B4CEF8 800D5D58 8CCF00F4 */ lw $t7, 0xf4($a2)
|
||||
/* B4CEFC 800D5D5C 3C048014 */ lui $a0, %hi(D_80147300) # $a0, 0x8014
|
||||
/* B4CF00 800D5D60 24847300 */ addiu $a0, %lo(D_80147300) # addiu $a0, $a0, 0x7300
|
||||
/* B4CF04 800D5D64 AFAF0058 */ sw $t7, 0x58($sp)
|
||||
/* B4CF08 800D5D68 8CC90104 */ lw $t1, 0x104($a2)
|
||||
/* B4CF0C 800D5D6C AFA90054 */ sw $t1, 0x54($sp)
|
||||
/* B4CF10 800D5D70 8CCA011C */ lw $t2, 0x11c($a2)
|
||||
/* B4CF14 800D5D74 0C00084C */ jal osSyncPrintf
|
||||
/* B4CF18 800D5D78 AFAA0050 */ sw $t2, 0x50($sp)
|
||||
/* B4CF1C 800D5D7C 8FAB0064 */ lw $t3, 0x64($sp)
|
||||
/* B4CF20 800D5D80 24100001 */ li $s0, 1
|
||||
/* B4CF24 800D5D84 8FAC0054 */ lw $t4, 0x54($sp)
|
||||
/* B4CF28 800D5D88 29610002 */ slti $at, $t3, 2
|
||||
/* B4CF2C 800D5D8C 5420002F */ bnezl $at, .L800D5E4C
|
||||
/* B4CF30 800D5D90 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* B4CF34 800D5D94 15800003 */ bnez $t4, .L800D5DA4
|
||||
/* B4CF38 800D5D98 8FAD0058 */ lw $t5, 0x58($sp)
|
||||
/* B4CF3C 800D5D9C 51A0002B */ beql $t5, $zero, .L800D5E4C
|
||||
/* B4CF40 800D5DA0 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L800D5DA4:
|
||||
/* B4CF44 800D5DA4 8FB10050 */ lw $s1, 0x50($sp)
|
||||
/* B4CF48 800D5DA8 3C1E8000 */ lui $fp, %hi(__osCleanupThread) # $fp, 0x8000
|
||||
/* B4CF4C 800D5DAC 27DE42F0 */ addiu $fp, %lo(__osCleanupThread) # addiu $fp, $fp, 0x42f0
|
||||
/* B4CF50 800D5DB0 123E0025 */ beq $s1, $fp, .L800D5E48
|
||||
/* B4CF54 800D5DB4 27B70054 */ addiu $s7, $sp, 0x54
|
||||
/* B4CF58 800D5DB8 3C148014 */ lui $s4, %hi(D_80147340) # $s4, 0x8014
|
||||
/* B4CF5C 800D5DBC 3C138014 */ lui $s3, %hi(D_80147334) # $s3, 0x8014
|
||||
/* B4CF60 800D5DC0 3C128014 */ lui $s2, %hi(D_80147328) # $s2, 0x8014
|
||||
/* B4CF64 800D5DC4 26527328 */ addiu $s2, %lo(D_80147328) # addiu $s2, $s2, 0x7328
|
||||
/* B4CF68 800D5DC8 26737334 */ addiu $s3, %lo(D_80147334) # addiu $s3, $s3, 0x7334
|
||||
/* B4CF6C 800D5DCC 26947340 */ addiu $s4, %lo(D_80147340) # addiu $s4, $s4, 0x7340
|
||||
/* B4CF70 800D5DD0 27B60050 */ addiu $s6, $sp, 0x50
|
||||
/* B4CF74 800D5DD4 27B50058 */ addiu $s5, $sp, 0x58
|
||||
/* B4CF78 800D5DD8 02402025 */ move $a0, $s2
|
||||
.L800D5DDC:
|
||||
/* B4CF7C 800D5DDC 8FA50058 */ lw $a1, 0x58($sp)
|
||||
/* B4CF80 800D5DE0 0C00084C */ jal osSyncPrintf
|
||||
/* B4CF84 800D5DE4 02203025 */ move $a2, $s1
|
||||
/* B4CF88 800D5DE8 0C035162 */ jal Fault_ConvertAddress
|
||||
/* B4CF8C 800D5DEC 8FA40050 */ lw $a0, 0x50($sp)
|
||||
/* B4CF90 800D5DF0 10400003 */ beqz $v0, .L800D5E00
|
||||
/* B4CF94 800D5DF4 00402825 */ move $a1, $v0
|
||||
/* B4CF98 800D5DF8 0C00084C */ jal osSyncPrintf
|
||||
/* B4CF9C 800D5DFC 02602025 */ move $a0, $s3
|
||||
.L800D5E00:
|
||||
/* B4CFA0 800D5E00 0C00084C */ jal osSyncPrintf
|
||||
/* B4CFA4 800D5E04 02802025 */ move $a0, $s4
|
||||
/* B4CFA8 800D5E08 02A02025 */ move $a0, $s5
|
||||
/* B4CFAC 800D5E0C 02C02825 */ move $a1, $s6
|
||||
/* B4CFB0 800D5E10 0C03567E */ jal func_800D59F8
|
||||
/* B4CFB4 800D5E14 02E03025 */ move $a2, $s7
|
||||
/* B4CFB8 800D5E18 8FAE0064 */ lw $t6, 0x64($sp)
|
||||
/* B4CFBC 800D5E1C 26100001 */ addiu $s0, $s0, 1
|
||||
/* B4CFC0 800D5E20 8FAF0054 */ lw $t7, 0x54($sp)
|
||||
/* B4CFC4 800D5E24 020E082A */ slt $at, $s0, $t6
|
||||
/* B4CFC8 800D5E28 10200007 */ beqz $at, .L800D5E48
|
||||
/* B4CFCC 800D5E2C 8FB80058 */ lw $t8, 0x58($sp)
|
||||
/* B4CFD0 800D5E30 15E00003 */ bnez $t7, .L800D5E40
|
||||
/* B4CFD4 800D5E34 8FB10050 */ lw $s1, 0x50($sp)
|
||||
/* B4CFD8 800D5E38 53000004 */ beql $t8, $zero, .L800D5E4C
|
||||
/* B4CFDC 800D5E3C 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L800D5E40:
|
||||
/* B4CFE0 800D5E40 563EFFE6 */ bnel $s1, $fp, .L800D5DDC
|
||||
/* B4CFE4 800D5E44 02402025 */ move $a0, $s2
|
||||
.L800D5E48:
|
||||
/* B4CFE8 800D5E48 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L800D5E4C:
|
||||
/* B4CFEC 800D5E4C 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B4CFF0 800D5E50 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B4CFF4 800D5E54 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B4CFF8 800D5E58 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B4CFFC 800D5E5C 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B4D000 800D5E60 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* B4D004 800D5E64 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* B4D008 800D5E68 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* B4D00C 800D5E6C 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* B4D010 800D5E70 03E00008 */ jr $ra
|
||||
/* B4D014 800D5E74 27BD0060 */ addiu $sp, $sp, 0x60
|
||||
|
|
@ -1,265 +0,0 @@
|
|||
.rdata
|
||||
glabel D_80147368
|
||||
.asciz "フォルトマネージャ:OS_EVENT_CPU_BREAKを受信しました\n"
|
||||
.balign 4
|
||||
glabel D_801473A0
|
||||
.asciz "フォルトマネージャ:OS_EVENT_FAULTを受信しました\n"
|
||||
.balign 4
|
||||
glabel D_801473D4
|
||||
.asciz "フォルトマネージャ:不明なメッセージを受信しました\n"
|
||||
.balign 4
|
||||
glabel D_80147408
|
||||
.asciz "__osGetCurrFaultedThread()=%08x\n"
|
||||
.balign 4
|
||||
glabel D_8014742C
|
||||
.asciz "FindFaultedThread()=%08x\n"
|
||||
.balign 4
|
||||
glabel D_80147448
|
||||
.asciz "STACK TRACE"
|
||||
.balign 4
|
||||
glabel D_80147454
|
||||
.asciz " CONGRATURATIONS! "
|
||||
.balign 4
|
||||
glabel D_80147470
|
||||
.asciz "All Pages are displayed."
|
||||
.balign 4
|
||||
glabel D_8014748C
|
||||
.asciz " THANK YOU! "
|
||||
.balign 4
|
||||
glabel D_801474A8
|
||||
.asciz " You are great debugger!"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel Fault_ThreadEntry
|
||||
/* B4D270 800D60D0 3C0AFFFA */ lui $t2, (0xFFFA5A5A >> 16) # lui $t2, 0xfffa
|
||||
/* B4D274 800D60D4 03A05825 */ move $t3, $sp
|
||||
/* B4D278 800D60D8 27BDFFA8 */ addiu $sp, $sp, -0x58
|
||||
/* B4D27C 800D60DC 354A5A5A */ ori $t2, (0xFFFA5A5A & 0xFFFF) # ori $t2, $t2, 0x5a5a
|
||||
.L800D60E0:
|
||||
/* B4D280 800D60E0 256BFFF8 */ addiu $t3, $t3, -8
|
||||
/* B4D284 800D60E4 AD6A0000 */ sw $t2, ($t3)
|
||||
/* B4D288 800D60E8 157DFFFD */ bne $t3, $sp, .L800D60E0
|
||||
/* B4D28C 800D60EC AD6A0004 */ sw $t2, 4($t3)
|
||||
/* B4D290 800D60F0 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B4D294 800D60F4 3C118017 */ lui $s1, %hi(sFaultStructPtr) # $s1, 0x8017
|
||||
/* B4D298 800D60F8 2631A800 */ addiu $s1, %lo(sFaultStructPtr) # addiu $s1, $s1, -0x5800
|
||||
/* B4D29C 800D60FC AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* B4D2A0 800D6100 AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* B4D2A4 800D6104 AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* B4D2A8 800D6108 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* B4D2AC 800D610C AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* B4D2B0 800D6110 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B4D2B4 800D6114 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B4D2B8 800D6118 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B4D2BC 800D611C AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B4D2C0 800D6120 AFA40058 */ sw $a0, 0x58($sp)
|
||||
/* B4D2C4 800D6124 8E250000 */ lw $a1, ($s1)
|
||||
/* B4D2C8 800D6128 2404000A */ li $a0, 10
|
||||
/* B4D2CC 800D612C 24060001 */ li $a2, 1
|
||||
/* B4D2D0 800D6130 0C001488 */ jal osSetEventMesg
|
||||
/* B4D2D4 800D6134 24A507B0 */ addiu $a1, $a1, 0x7b0
|
||||
/* B4D2D8 800D6138 8E250000 */ lw $a1, ($s1)
|
||||
/* B4D2DC 800D613C 2404000C */ li $a0, 12
|
||||
/* B4D2E0 800D6140 24060002 */ li $a2, 2
|
||||
/* B4D2E4 800D6144 0C001488 */ jal osSetEventMesg
|
||||
/* B4D2E8 800D6148 24A507B0 */ addiu $a1, $a1, 0x7b0
|
||||
/* B4D2EC 800D614C 3C178014 */ lui $s7, %hi(D_8014742C) # $s7, 0x8014
|
||||
/* B4D2F0 800D6150 3C168014 */ lui $s6, %hi(D_80147408) # $s6, 0x8014
|
||||
/* B4D2F4 800D6154 3C158014 */ lui $s5, %hi(D_80147368) # $s5, 0x8014
|
||||
/* B4D2F8 800D6158 26B57368 */ addiu $s5, %lo(D_80147368) # addiu $s5, $s5, 0x7368
|
||||
/* B4D2FC 800D615C 26D67408 */ addiu $s6, %lo(D_80147408) # addiu $s6, $s6, 0x7408
|
||||
/* B4D300 800D6160 26F7742C */ addiu $s7, %lo(D_8014742C) # addiu $s7, $s7, 0x742c
|
||||
/* B4D304 800D6164 241E0002 */ li $fp, 2
|
||||
/* B4D308 800D6168 24140001 */ li $s4, 1
|
||||
/* B4D30C 800D616C 27B30054 */ addiu $s3, $sp, 0x54
|
||||
/* B4D310 800D6170 24120001 */ li $s2, 1
|
||||
/* B4D314 800D6174 8E240000 */ lw $a0, ($s1)
|
||||
.L800D6178:
|
||||
/* B4D318 800D6178 02602825 */ move $a1, $s3
|
||||
/* B4D31C 800D617C 24060001 */ li $a2, 1
|
||||
/* B4D320 800D6180 0C000CA0 */ jal osRecvMesg
|
||||
/* B4D324 800D6184 248407B0 */ addiu $a0, $a0, 0x7b0
|
||||
/* B4D328 800D6188 8FA30054 */ lw $v1, 0x54($sp)
|
||||
/* B4D32C 800D618C 14740007 */ bne $v1, $s4, .L800D61AC
|
||||
/* B4D330 800D6190 00000000 */ nop
|
||||
/* B4D334 800D6194 8E2E0000 */ lw $t6, ($s1)
|
||||
/* B4D338 800D6198 02A02025 */ move $a0, $s5
|
||||
/* B4D33C 800D619C 0C00084C */ jal osSyncPrintf
|
||||
/* B4D340 800D61A0 A1D207CD */ sb $s2, 0x7cd($t6)
|
||||
/* B4D344 800D61A4 10000016 */ b .L800D6200
|
||||
/* B4D348 800D61A8 00000000 */ nop
|
||||
.L800D61AC:
|
||||
/* B4D34C 800D61AC 147E0009 */ bne $v1, $fp, .L800D61D4
|
||||
/* B4D350 800D61B0 24010003 */ li $at, 3
|
||||
/* B4D354 800D61B4 8E380000 */ lw $t8, ($s1)
|
||||
/* B4D358 800D61B8 240F0002 */ li $t7, 2
|
||||
/* B4D35C 800D61BC 3C048014 */ lui $a0, %hi(D_801473A0) # $a0, 0x8014
|
||||
/* B4D360 800D61C0 248473A0 */ addiu $a0, %lo(D_801473A0) # addiu $a0, $a0, 0x73a0
|
||||
/* B4D364 800D61C4 0C00084C */ jal osSyncPrintf
|
||||
/* B4D368 800D61C8 A30F07CD */ sb $t7, 0x7cd($t8)
|
||||
/* B4D36C 800D61CC 1000000C */ b .L800D6200
|
||||
/* B4D370 800D61D0 00000000 */ nop
|
||||
.L800D61D4:
|
||||
/* B4D374 800D61D4 14610005 */ bne $v1, $at, .L800D61EC
|
||||
/* B4D378 800D61D8 24190003 */ li $t9, 3
|
||||
/* B4D37C 800D61DC 0C035825 */ jal Fault_UpdatePad
|
||||
/* B4D380 800D61E0 00008025 */ move $s0, $zero
|
||||
/* B4D384 800D61E4 10000014 */ b .L800D6238
|
||||
/* B4D388 800D61E8 00000000 */ nop
|
||||
.L800D61EC:
|
||||
/* B4D38C 800D61EC 8E280000 */ lw $t0, ($s1)
|
||||
/* B4D390 800D61F0 3C048014 */ lui $a0, %hi(D_801473D4) # $a0, 0x8014
|
||||
/* B4D394 800D61F4 248473D4 */ addiu $a0, %lo(D_801473D4) # addiu $a0, $a0, 0x73d4
|
||||
/* B4D398 800D61F8 0C00084C */ jal osSyncPrintf
|
||||
/* B4D39C 800D61FC A11907CD */ sb $t9, 0x7cd($t0)
|
||||
.L800D6200:
|
||||
/* B4D3A0 800D6200 0C041930 */ jal __osGetCurrFaultedThread
|
||||
/* B4D3A4 800D6204 00000000 */ nop
|
||||
/* B4D3A8 800D6208 00408025 */ move $s0, $v0
|
||||
/* B4D3AC 800D620C 02C02025 */ move $a0, $s6
|
||||
/* B4D3B0 800D6210 0C00084C */ jal osSyncPrintf
|
||||
/* B4D3B4 800D6214 00402825 */ move $a1, $v0
|
||||
/* B4D3B8 800D6218 16000007 */ bnez $s0, .L800D6238
|
||||
/* B4D3BC 800D621C 00000000 */ nop
|
||||
/* B4D3C0 800D6220 0C0354A9 */ jal Fault_FindFaultedThread
|
||||
/* B4D3C4 800D6224 00000000 */ nop
|
||||
/* B4D3C8 800D6228 00408025 */ move $s0, $v0
|
||||
/* B4D3CC 800D622C 02E02025 */ move $a0, $s7
|
||||
/* B4D3D0 800D6230 0C00084C */ jal osSyncPrintf
|
||||
/* B4D3D4 800D6234 00402825 */ move $a1, $v0
|
||||
.L800D6238:
|
||||
/* B4D3D8 800D6238 5200FFCF */ beql $s0, $zero, .L800D6178
|
||||
/* B4D3DC 800D623C 8E240000 */ lw $a0, ($s1)
|
||||
/* B4D3E0 800D6240 0C001EA0 */ jal __osGetFpcCsr
|
||||
/* B4D3E4 800D6244 00000000 */ nop
|
||||
/* B4D3E8 800D6248 2401F07F */ li $at, -3969
|
||||
/* B4D3EC 800D624C 0C001E9C */ jal __osSetFpcCsr
|
||||
/* B4D3F0 800D6250 00412024 */ and $a0, $v0, $at
|
||||
/* B4D3F4 800D6254 8E290000 */ lw $t1, ($s1)
|
||||
/* B4D3F8 800D6258 AD3007D0 */ sw $s0, 0x7d0($t1)
|
||||
/* B4D3FC 800D625C 8E2A0000 */ lw $t2, ($s1)
|
||||
/* B4D400 800D6260 914B07CE */ lbu $t3, 0x7ce($t2)
|
||||
/* B4D404 800D6264 15600007 */ bnez $t3, .L800D6284
|
||||
/* B4D408 800D6268 00000000 */ nop
|
||||
.L800D626C:
|
||||
/* B4D40C 800D626C 0C03518F */ jal Fault_Sleep
|
||||
/* B4D410 800D6270 240403E8 */ li $a0, 1000
|
||||
/* B4D414 800D6274 8E2C0000 */ lw $t4, ($s1)
|
||||
/* B4D418 800D6278 918D07CE */ lbu $t5, 0x7ce($t4)
|
||||
/* B4D41C 800D627C 11A0FFFB */ beqz $t5, .L800D626C
|
||||
/* B4D420 800D6280 00000000 */ nop
|
||||
.L800D6284:
|
||||
/* B4D424 800D6284 0C03518F */ jal Fault_Sleep
|
||||
/* B4D428 800D6288 240401F4 */ li $a0, 500
|
||||
/* B4D42C 800D628C 0C0357BD */ jal Fault_CommitFB
|
||||
/* B4D430 800D6290 00000000 */ nop
|
||||
/* B4D434 800D6294 8E2E0000 */ lw $t6, ($s1)
|
||||
/* B4D438 800D6298 91CF07CF */ lbu $t7, 0x7cf($t6)
|
||||
/* B4D43C 800D629C 11E00005 */ beqz $t7, .L800D62B4
|
||||
/* B4D440 800D62A0 00000000 */ nop
|
||||
/* B4D444 800D62A4 0C0354CB */ jal Fault_Wait5Seconds
|
||||
/* B4D448 800D62A8 00000000 */ nop
|
||||
/* B4D44C 800D62AC 10000006 */ b .L800D62C8
|
||||
/* B4D450 800D62B0 8E380000 */ lw $t8, ($s1)
|
||||
.L800D62B4:
|
||||
/* B4D454 800D62B4 0C035268 */ jal Fault_DrawCornerRec
|
||||
/* B4D458 800D62B8 3404F801 */ li $a0, 63489
|
||||
/* B4D45C 800D62BC 0C0354EF */ jal Fault_WaitForButtonCombo
|
||||
/* B4D460 800D62C0 00000000 */ nop
|
||||
/* B4D464 800D62C4 8E380000 */ lw $t8, ($s1)
|
||||
.L800D62C8:
|
||||
/* B4D468 800D62C8 3404FFFF */ li $a0, 65535
|
||||
/* B4D46C 800D62CC 0C035AD7 */ jal FaultDrawer_SetForeColor
|
||||
/* B4D470 800D62D0 A31207CF */ sb $s2, 0x7cf($t8)
|
||||
/* B4D474 800D62D4 0C035AE9 */ jal FaultDrawer_SetBackColor
|
||||
/* B4D478 800D62D8 00002025 */ move $a0, $zero
|
||||
.L800D62DC:
|
||||
/* B4D47C 800D62DC 0C035323 */ jal Fault_PrintThreadContext
|
||||
/* B4D480 800D62E0 02002025 */ move $a0, $s0
|
||||
/* B4D484 800D62E4 0C0353EA */ jal Fault_LogThreadContext
|
||||
/* B4D488 800D62E8 02002025 */ move $a0, $s0
|
||||
/* B4D48C 800D62EC 0C035213 */ jal Fault_WaitForInput
|
||||
/* B4D490 800D62F0 00000000 */ nop
|
||||
/* B4D494 800D62F4 0C03523E */ jal Fault_FillScreenBlack
|
||||
/* B4D498 800D62F8 00000000 */ nop
|
||||
/* B4D49C 800D62FC 3C068014 */ lui $a2, %hi(D_80147448) # $a2, 0x8014
|
||||
/* B4D4A0 800D6300 24C67448 */ addiu $a2, %lo(D_80147448) # addiu $a2, $a2, 0x7448
|
||||
/* B4D4A4 800D6304 24040078 */ li $a0, 120
|
||||
/* B4D4A8 800D6308 0C035C26 */ jal FaultDrawer_DrawText
|
||||
/* B4D4AC 800D630C 24050010 */ li $a1, 16
|
||||
/* B4D4B0 800D6310 02002025 */ move $a0, $s0
|
||||
/* B4D4B4 800D6314 24050024 */ li $a1, 36
|
||||
/* B4D4B8 800D6318 24060018 */ li $a2, 24
|
||||
/* B4D4BC 800D631C 0C0356E2 */ jal Fault_DrawStackTrace
|
||||
/* B4D4C0 800D6320 24070016 */ li $a3, 22
|
||||
/* B4D4C4 800D6324 02002025 */ move $a0, $s0
|
||||
/* B4D4C8 800D6328 0C035742 */ jal Fault_LogStackTrace
|
||||
/* B4D4CC 800D632C 24050032 */ li $a1, 50
|
||||
/* B4D4D0 800D6330 0C035213 */ jal Fault_WaitForInput
|
||||
/* B4D4D4 800D6334 00000000 */ nop
|
||||
/* B4D4D8 800D6338 0C0357ED */ jal Fault_ProcessClients
|
||||
/* B4D4DC 800D633C 00000000 */ nop
|
||||
/* B4D4E0 800D6340 8E04011C */ lw $a0, 0x11c($s0)
|
||||
/* B4D4E4 800D6344 8E0500F4 */ lw $a1, 0xf4($s0)
|
||||
/* B4D4E8 800D6348 00003025 */ move $a2, $zero
|
||||
/* B4D4EC 800D634C 00003825 */ move $a3, $zero
|
||||
/* B4D4F0 800D6350 0C0355FD */ jal Fault_DrawMemDump
|
||||
/* B4D4F4 800D6354 2484FF00 */ addiu $a0, $a0, -0x100
|
||||
/* B4D4F8 800D6358 0C035253 */ jal Fault_FillScreenRed
|
||||
/* B4D4FC 800D635C 00000000 */ nop
|
||||
/* B4D500 800D6360 3C068014 */ lui $a2, %hi(D_80147454) # $a2, 0x8014
|
||||
/* B4D504 800D6364 24C67454 */ addiu $a2, %lo(D_80147454) # addiu $a2, $a2, 0x7454
|
||||
/* B4D508 800D6368 24040040 */ li $a0, 64
|
||||
/* B4D50C 800D636C 0C035C26 */ jal FaultDrawer_DrawText
|
||||
/* B4D510 800D6370 24050050 */ li $a1, 80
|
||||
/* B4D514 800D6374 3C068014 */ lui $a2, %hi(D_80147470) # $a2, 0x8014
|
||||
/* B4D518 800D6378 24C67470 */ addiu $a2, %lo(D_80147470) # addiu $a2, $a2, 0x7470
|
||||
/* B4D51C 800D637C 24040040 */ li $a0, 64
|
||||
/* B4D520 800D6380 0C035C26 */ jal FaultDrawer_DrawText
|
||||
/* B4D524 800D6384 2405005A */ li $a1, 90
|
||||
/* B4D528 800D6388 3C068014 */ lui $a2, %hi(D_8014748C) # $a2, 0x8014
|
||||
/* B4D52C 800D638C 24C6748C */ addiu $a2, %lo(D_8014748C) # addiu $a2, $a2, 0x748c
|
||||
/* B4D530 800D6390 24040040 */ li $a0, 64
|
||||
/* B4D534 800D6394 0C035C26 */ jal FaultDrawer_DrawText
|
||||
/* B4D538 800D6398 24050064 */ li $a1, 100
|
||||
/* B4D53C 800D639C 3C068014 */ lui $a2, %hi(D_801474A8) # $a2, 0x8014
|
||||
/* B4D540 800D63A0 24C674A8 */ addiu $a2, %lo(D_801474A8) # addiu $a2, $a2, 0x74a8
|
||||
/* B4D544 800D63A4 24040040 */ li $a0, 64
|
||||
/* B4D548 800D63A8 0C035C26 */ jal FaultDrawer_DrawText
|
||||
/* B4D54C 800D63AC 2405006E */ li $a1, 110
|
||||
/* B4D550 800D63B0 0C035213 */ jal Fault_WaitForInput
|
||||
/* B4D554 800D63B4 00000000 */ nop
|
||||
/* B4D558 800D63B8 8E390000 */ lw $t9, ($s1)
|
||||
/* B4D55C 800D63BC 932207CC */ lbu $v0, 0x7cc($t9)
|
||||
/* B4D560 800D63C0 1040FFC6 */ beqz $v0, .L800D62DC
|
||||
/* B4D564 800D63C4 00000000 */ nop
|
||||
/* B4D568 800D63C8 14400003 */ bnez $v0, .L800D63D8
|
||||
/* B4D56C 800D63CC 00000000 */ nop
|
||||
.L800D63D0:
|
||||
/* B4D570 800D63D0 1040FFFF */ beqz $v0, .L800D63D0
|
||||
/* B4D574 800D63D4 00000000 */ nop
|
||||
.L800D63D8:
|
||||
/* B4D578 800D63D8 0C03579E */ jal Fault_ResumeThread
|
||||
/* B4D57C 800D63DC 02002025 */ move $a0, $s0
|
||||
/* B4D580 800D63E0 1000FF65 */ b .L800D6178
|
||||
/* B4D584 800D63E4 8E240000 */ lw $a0, ($s1)
|
||||
/* B4D588 800D63E8 00000000 */ nop
|
||||
/* B4D58C 800D63EC 00000000 */ nop
|
||||
/* B4D590 800D63F0 00000000 */ nop
|
||||
/* B4D594 800D63F4 00000000 */ nop
|
||||
/* B4D598 800D63F8 00000000 */ nop
|
||||
/* B4D59C 800D63FC 00000000 */ nop
|
||||
/* B4D5A0 800D6400 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* B4D5A4 800D6404 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B4D5A8 800D6408 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B4D5AC 800D640C 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B4D5B0 800D6410 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B4D5B4 800D6414 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B4D5B8 800D6418 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* B4D5BC 800D641C 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* B4D5C0 800D6420 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* B4D5C4 800D6424 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* B4D5C8 800D6428 03E00008 */ jr $ra
|
||||
/* B4D5CC 800D642C 27BD0058 */ addiu $sp, $sp, 0x58
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
glabel Fault_WaitForInputImpl
|
||||
/* B4B8A0 800D4700 3C09FFFA */ lui $t1, (0xFFFA5A5A >> 16) # lui $t1, 0xfffa
|
||||
/* B4B8A4 800D4704 03A05025 */ move $t2, $sp
|
||||
/* B4B8A8 800D4708 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* B4B8AC 800D470C 35295A5A */ ori $t1, (0xFFFA5A5A & 0xFFFF) # ori $t1, $t1, 0x5a5a
|
||||
.L800D4710:
|
||||
/* B4B8B0 800D4710 254AFFF8 */ addiu $t2, $t2, -8
|
||||
/* B4B8B4 800D4714 AD490000 */ sw $t1, ($t2)
|
||||
/* B4B8B8 800D4718 155DFFFD */ bne $t2, $sp, .L800D4710
|
||||
/* B4B8BC 800D471C AD490004 */ sw $t1, 4($t2)
|
||||
/* B4B8C0 800D4720 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B4B8C4 800D4724 3C128017 */ lui $s2, %hi(sFaultStructPtr) # $s2, 0x8017
|
||||
/* B4B8C8 800D4728 2652A800 */ addiu $s2, %lo(sFaultStructPtr) # addiu $s2, $s2, -0x5800
|
||||
/* B4B8CC 800D472C AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* B4B8D0 800D4730 AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* B4B8D4 800D4734 AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* B4B8D8 800D4738 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* B4B8DC 800D473C AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* B4B8E0 800D4740 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B4B8E4 800D4744 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B4B8E8 800D4748 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B4B8EC 800D474C AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B4B8F0 800D4750 8E4E0000 */ lw $t6, ($s2)
|
||||
/* B4B8F4 800D4754 24110258 */ li $s1, 600
|
||||
/* B4B8F8 800D4758 241E0400 */ li $fp, 1024
|
||||
/* B4B8FC 800D475C 25CF07E4 */ addiu $t7, $t6, 0x7e4
|
||||
/* B4B900 800D4760 AFAF0044 */ sw $t7, 0x44($sp)
|
||||
/* B4B904 800D4764 24170800 */ li $s7, 2048
|
||||
/* B4B908 800D4768 24160200 */ li $s6, 512
|
||||
/* B4B90C 800D476C 24150100 */ li $s5, 256
|
||||
/* B4B910 800D4770 34148000 */ li $s4, 32768
|
||||
/* B4B914 800D4774 24130020 */ li $s3, 32
|
||||
.L800D4778:
|
||||
/* B4B918 800D4778 0C03518F */ jal Fault_Sleep
|
||||
/* B4B91C 800D477C 24040010 */ li $a0, 16
|
||||
/* B4B920 800D4780 0C0351AD */ jal Fault_UpdatePadImpl
|
||||
/* B4B924 800D4784 00000000 */ nop
|
||||
/* B4B928 800D4788 8FB80044 */ lw $t8, 0x44($sp)
|
||||
/* B4B92C 800D478C 9710000C */ lhu $s0, 0xc($t8)
|
||||
/* B4B930 800D4790 56130006 */ bnel $s0, $s3, .L800D47AC
|
||||
/* B4B934 800D4794 8E590000 */ lw $t9, ($s2)
|
||||
/* B4B938 800D4798 8E420000 */ lw $v0, ($s2)
|
||||
/* B4B93C 800D479C 904307CF */ lbu $v1, 0x7cf($v0)
|
||||
/* B4B940 800D47A0 2C630001 */ sltiu $v1, $v1, 1
|
||||
/* B4B944 800D47A4 A04307CF */ sb $v1, 0x7cf($v0)
|
||||
/* B4B948 800D47A8 8E590000 */ lw $t9, ($s2)
|
||||
.L800D47AC:
|
||||
/* B4B94C 800D47AC 2A230001 */ slti $v1, $s1, 1
|
||||
/* B4B950 800D47B0 932807CF */ lbu $t0, 0x7cf($t9)
|
||||
/* B4B954 800D47B4 11000005 */ beqz $t0, .L800D47CC
|
||||
/* B4B958 800D47B8 00000000 */ nop
|
||||
/* B4B95C 800D47BC 1060FFEE */ beqz $v1, .L800D4778
|
||||
/* B4B960 800D47C0 2631FFFF */ addiu $s1, $s1, -1
|
||||
/* B4B964 800D47C4 10000015 */ b .L800D481C
|
||||
/* B4B968 800D47C8 00001025 */ move $v0, $zero
|
||||
.L800D47CC:
|
||||
/* B4B96C 800D47CC 12140003 */ beq $s0, $s4, .L800D47DC
|
||||
/* B4B970 800D47D0 00000000 */ nop
|
||||
/* B4B974 800D47D4 16150003 */ bne $s0, $s5, .L800D47E4
|
||||
/* B4B978 800D47D8 00000000 */ nop
|
||||
.L800D47DC:
|
||||
/* B4B97C 800D47DC 1000000F */ b .L800D481C
|
||||
/* B4B980 800D47E0 00001025 */ move $v0, $zero
|
||||
.L800D47E4:
|
||||
/* B4B984 800D47E4 16160003 */ bne $s0, $s6, .L800D47F4
|
||||
/* B4B988 800D47E8 00000000 */ nop
|
||||
/* B4B98C 800D47EC 1000000B */ b .L800D481C
|
||||
/* B4B990 800D47F0 24020001 */ li $v0, 1
|
||||
.L800D47F4:
|
||||
/* B4B994 800D47F4 16170003 */ bne $s0, $s7, .L800D4804
|
||||
/* B4B998 800D47F8 00000000 */ nop
|
||||
/* B4B99C 800D47FC 0C0359DC */ jal FaultDrawer_SetOsSyncPrintfEnabled
|
||||
/* B4B9A0 800D4800 24040001 */ li $a0, 1
|
||||
.L800D4804:
|
||||
/* B4B9A4 800D4804 161EFFDC */ bne $s0, $fp, .L800D4778
|
||||
/* B4B9A8 800D4808 00000000 */ nop
|
||||
/* B4B9AC 800D480C 0C0359DC */ jal FaultDrawer_SetOsSyncPrintfEnabled
|
||||
/* B4B9B0 800D4810 00002025 */ move $a0, $zero
|
||||
/* B4B9B4 800D4814 1000FFD8 */ b .L800D4778
|
||||
/* B4B9B8 800D4818 00000000 */ nop
|
||||
.L800D481C:
|
||||
/* B4B9BC 800D481C 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* B4B9C0 800D4820 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B4B9C4 800D4824 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B4B9C8 800D4828 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B4B9CC 800D482C 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B4B9D0 800D4830 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B4B9D4 800D4834 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* B4B9D8 800D4838 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* B4B9DC 800D483C 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* B4B9E0 800D4840 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* B4B9E4 800D4844 03E00008 */ jr $ra
|
||||
/* B4B9E8 800D4848 27BD0048 */ addiu $sp, $sp, 0x48
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
glabel func_800D59F8
|
||||
/* B4CB98 800D59F8 3C0FFFFA */ lui $t7, (0xFFFA5A5A >> 16) # lui $t7, 0xfffa
|
||||
/* B4CB9C 800D59FC 03A0C825 */ move $t9, $sp
|
||||
/* B4CBA0 800D5A00 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* B4CBA4 800D5A04 35EF5A5A */ ori $t7, (0xFFFA5A5A & 0xFFFF) # ori $t7, $t7, 0x5a5a
|
||||
.L800D5A08:
|
||||
/* B4CBA8 800D5A08 2739FFF8 */ addiu $t9, $t9, -8
|
||||
/* B4CBAC 800D5A0C AF2F0000 */ sw $t7, ($t9)
|
||||
/* B4CBB0 800D5A10 173DFFFD */ bne $t9, $sp, .L800D5A08
|
||||
/* B4CBB4 800D5A14 AF2F0004 */ sw $t7, 4($t9)
|
||||
/* B4CBB8 800D5A18 AFB30014 */ sw $s3, 0x14($sp)
|
||||
/* B4CBBC 800D5A1C AFB20010 */ sw $s2, 0x10($sp)
|
||||
/* B4CBC0 800D5A20 AFB1000C */ sw $s1, 0xc($sp)
|
||||
/* B4CBC4 800D5A24 AFB00008 */ sw $s0, 8($sp)
|
||||
/* B4CBC8 800D5A28 8C820000 */ lw $v0, ($a0)
|
||||
/* B4CBCC 800D5A2C 8CA30000 */ lw $v1, ($a1)
|
||||
/* B4CBD0 800D5A30 8CC70000 */ lw $a3, ($a2)
|
||||
/* B4CBD4 800D5A34 304E0003 */ andi $t6, $v0, 3
|
||||
/* B4CBD8 800D5A38 15C0000E */ bnez $t6, .L800D5A74
|
||||
/* B4CBDC 800D5A3C 3C080001 */ lui $t0, 1
|
||||
/* B4CBE0 800D5A40 3C098000 */ lui $t1, 0x8000
|
||||
/* B4CBE4 800D5A44 0049082B */ sltu $at, $v0, $t1
|
||||
/* B4CBE8 800D5A48 1420000A */ bnez $at, .L800D5A74
|
||||
/* B4CBEC 800D5A4C 3C0CA000 */ lui $t4, 0xa000
|
||||
/* B4CBF0 800D5A50 004C082B */ sltu $at, $v0, $t4
|
||||
/* B4CBF4 800D5A54 10200007 */ beqz $at, .L800D5A74
|
||||
/* B4CBF8 800D5A58 30EF0003 */ andi $t7, $a3, 3
|
||||
/* B4CBFC 800D5A5C 15E00005 */ bnez $t7, .L800D5A74
|
||||
/* B4CC00 800D5A60 00E9082B */ sltu $at, $a3, $t1
|
||||
/* B4CC04 800D5A64 14200003 */ bnez $at, .L800D5A74
|
||||
/* B4CC08 800D5A68 00EC082B */ sltu $at, $a3, $t4
|
||||
/* B4CC0C 800D5A6C 14200005 */ bnez $at, .L800D5A84
|
||||
/* B4CC10 800D5A70 30780003 */ andi $t8, $v1, 3
|
||||
.L800D5A74:
|
||||
/* B4CC14 800D5A74 AC800000 */ sw $zero, ($a0)
|
||||
/* B4CC18 800D5A78 ACA00000 */ sw $zero, ($a1)
|
||||
/* B4CC1C 800D5A7C 1000003C */ b .L800D5B70
|
||||
/* B4CC20 800D5A80 ACC00000 */ sw $zero, ($a2)
|
||||
.L800D5A84:
|
||||
/* B4CC24 800D5A84 17000005 */ bnez $t8, .L800D5A9C
|
||||
/* B4CC28 800D5A88 0069082B */ sltu $at, $v1, $t1
|
||||
/* B4CC2C 800D5A8C 14200003 */ bnez $at, .L800D5A9C
|
||||
/* B4CC30 800D5A90 006C082B */ sltu $at, $v1, $t4
|
||||
/* B4CC34 800D5A94 14200003 */ bnez $at, .L800D5AA4
|
||||
/* B4CC38 800D5A98 00004825 */ move $t1, $zero
|
||||
.L800D5A9C:
|
||||
/* B4CC3C 800D5A9C 10000034 */ b .L800D5B70
|
||||
/* B4CC40 800D5AA0 ACA70000 */ sw $a3, ($a1)
|
||||
.L800D5AA4:
|
||||
/* B4CC44 800D5AA4 3C134200 */ lui $s3, (0x42000018 >> 16) # lui $s3, 0x4200
|
||||
/* B4CC48 800D5AA8 3C1003E0 */ lui $s0, (0x03E00008 >> 16) # lui $s0, 0x3e0
|
||||
/* B4CC4C 800D5AAC 36100008 */ ori $s0, (0x03E00008 & 0xFFFF) # ori $s0, $s0, 8
|
||||
/* B4CC50 800D5AB0 36730018 */ ori $s3, (0x42000018 & 0xFFFF) # ori $s3, $s3, 0x18
|
||||
/* B4CC54 800D5AB4 241227BD */ li $s2, 10173
|
||||
/* B4CC58 800D5AB8 24110002 */ li $s1, 2
|
||||
/* B4CC5C 800D5ABC 340D8FBF */ li $t5, 36799
|
||||
.L800D5AC0:
|
||||
/* B4CC60 800D5AC0 006CC825 */ or $t9, $v1, $t4
|
||||
/* B4CC64 800D5AC4 8F2A0000 */ lw $t2, ($t9)
|
||||
/* B4CC68 800D5AC8 000A5C02 */ srl $t3, $t2, 0x10
|
||||
/* B4CC6C 800D5ACC 316BFFFF */ andi $t3, $t3, 0xffff
|
||||
/* B4CC70 800D5AD0 15AB0006 */ bne $t5, $t3, .L800D5AEC
|
||||
/* B4CC74 800D5AD4 000A7C00 */ sll $t7, $t2, 0x10
|
||||
/* B4CC78 800D5AD8 000FC403 */ sra $t8, $t7, 0x10
|
||||
/* B4CC7C 800D5ADC 0058C821 */ addu $t9, $v0, $t8
|
||||
/* B4CC80 800D5AE0 032C7025 */ or $t6, $t9, $t4
|
||||
/* B4CC84 800D5AE4 1000000C */ b .L800D5B18
|
||||
/* B4CC88 800D5AE8 8DC70000 */ lw $a3, ($t6)
|
||||
.L800D5AEC:
|
||||
/* B4CC8C 800D5AEC 164B0004 */ bne $s2, $t3, .L800D5B00
|
||||
/* B4CC90 800D5AF0 000AC400 */ sll $t8, $t2, 0x10
|
||||
/* B4CC94 800D5AF4 0018CC03 */ sra $t9, $t8, 0x10
|
||||
/* B4CC98 800D5AF8 10000007 */ b .L800D5B18
|
||||
/* B4CC9C 800D5AFC 00591021 */ addu $v0, $v0, $t9
|
||||
.L800D5B00:
|
||||
/* B4CCA0 800D5B00 15530005 */ bne $t2, $s3, .L800D5B18
|
||||
/* B4CCA4 800D5B04 00000000 */ nop
|
||||
/* B4CCA8 800D5B08 00001025 */ move $v0, $zero
|
||||
/* B4CCAC 800D5B0C 00001825 */ move $v1, $zero
|
||||
/* B4CCB0 800D5B10 10000014 */ b .L800D5B64
|
||||
/* B4CCB4 800D5B14 00003825 */ move $a3, $zero
|
||||
.L800D5B18:
|
||||
/* B4CCB8 800D5B18 15300003 */ bne $t1, $s0, .L800D5B28
|
||||
/* B4CCBC 800D5B1C 00097682 */ srl $t6, $t1, 0x1a
|
||||
/* B4CCC0 800D5B20 10000010 */ b .L800D5B64
|
||||
/* B4CCC4 800D5B24 00E01825 */ move $v1, $a3
|
||||
.L800D5B28:
|
||||
/* B4CCC8 800D5B28 162E0006 */ bne $s1, $t6, .L800D5B44
|
||||
/* B4CCCC 800D5B2C 00037F02 */ srl $t7, $v1, 0x1c
|
||||
/* B4CCD0 800D5B30 0009C980 */ sll $t9, $t1, 6
|
||||
/* B4CCD4 800D5B34 00197102 */ srl $t6, $t9, 4
|
||||
/* B4CCD8 800D5B38 000FC700 */ sll $t8, $t7, 0x1c
|
||||
/* B4CCDC 800D5B3C 10000009 */ b .L800D5B64
|
||||
/* B4CCE0 800D5B40 030E1825 */ or $v1, $t8, $t6
|
||||
.L800D5B44:
|
||||
/* B4CCE4 800D5B44 01404825 */ move $t1, $t2
|
||||
/* B4CCE8 800D5B48 11000003 */ beqz $t0, .L800D5B58
|
||||
/* B4CCEC 800D5B4C 24630004 */ addiu $v1, $v1, 4
|
||||
/* B4CCF0 800D5B50 1000FFDB */ b .L800D5AC0
|
||||
/* B4CCF4 800D5B54 2508FFFF */ addiu $t0, $t0, -1
|
||||
.L800D5B58:
|
||||
/* B4CCF8 800D5B58 00001025 */ move $v0, $zero
|
||||
/* B4CCFC 800D5B5C 00001825 */ move $v1, $zero
|
||||
/* B4CD00 800D5B60 00003825 */ move $a3, $zero
|
||||
.L800D5B64:
|
||||
/* B4CD04 800D5B64 AC820000 */ sw $v0, ($a0)
|
||||
/* B4CD08 800D5B68 ACA30000 */ sw $v1, ($a1)
|
||||
/* B4CD0C 800D5B6C ACC70000 */ sw $a3, ($a2)
|
||||
.L800D5B70:
|
||||
/* B4CD10 800D5B70 8FB00008 */ lw $s0, 8($sp)
|
||||
/* B4CD14 800D5B74 8FB1000C */ lw $s1, 0xc($sp)
|
||||
/* B4CD18 800D5B78 8FB20010 */ lw $s2, 0x10($sp)
|
||||
/* B4CD1C 800D5B7C 8FB30014 */ lw $s3, 0x14($sp)
|
||||
/* B4CD20 800D5B80 03E00008 */ jr $ra
|
||||
/* B4CD24 800D5B84 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
glabel pad_800D3F10
|
||||
/* B4B0B0 800D3F10 00000000 */ nop
|
||||
/* B4B0B4 800D3F14 00000000 */ nop
|
||||
/* B4B0B8 800D3F18 00000000 */ nop
|
||||
/* B4B0BC 800D3F1C 00000000 */ nop
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
.rdata
|
||||
|
||||
glabel D_80144D30
|
||||
.incbin "baserom.z64", 0xBBBED0, 0x20
|
||||
|
||||
.text
|
||||
glabel GameState_DrawInputDisplay
|
||||
/* B3B6F8 800C4558 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* B3B6FC 800C455C AFB30014 */ sw $s3, 0x14($sp)
|
||||
/* B3B700 800C4560 AFB20010 */ sw $s2, 0x10($sp)
|
||||
/* B3B704 800C4564 AFB1000C */ sw $s1, 0xc($sp)
|
||||
/* B3B708 800C4568 AFB00008 */ sw $s0, 8($sp)
|
||||
/* B3B70C 800C456C AFA40018 */ sw $a0, 0x18($sp)
|
||||
/* B3B710 800C4570 8CA20000 */ lw $v0, ($a1)
|
||||
/* B3B714 800C4574 3087FFFF */ andi $a3, $a0, 0xffff
|
||||
/* B3B718 800C4578 3C03E700 */ lui $v1, 0xe700
|
||||
/* B3B71C 800C457C 00402025 */ move $a0, $v0
|
||||
/* B3B720 800C4580 AC830000 */ sw $v1, ($a0)
|
||||
/* B3B724 800C4584 AC800004 */ sw $zero, 4($a0)
|
||||
/* B3B728 800C4588 24420008 */ addiu $v0, $v0, 8
|
||||
/* B3B72C 800C458C 00402025 */ move $a0, $v0
|
||||
/* B3B730 800C4590 3C0EEF30 */ lui $t6, 0xef30
|
||||
/* B3B734 800C4594 AC8E0000 */ sw $t6, ($a0)
|
||||
/* B3B738 800C4598 AC800004 */ sw $zero, 4($a0)
|
||||
/* B3B73C 800C459C 3C128014 */ lui $s2, %hi(D_80144D30) # $s2, 0x8014
|
||||
/* B3B740 800C45A0 24420008 */ addiu $v0, $v0, 8
|
||||
/* B3B744 800C45A4 26524D30 */ addiu $s2, %lo(D_80144D30) # addiu $s2, $s2, 0x4d30
|
||||
/* B3B748 800C45A8 00002025 */ move $a0, $zero
|
||||
/* B3B74C 800C45AC 3C10F700 */ lui $s0, 0xf700
|
||||
/* B3B750 800C45B0 3C11F600 */ lui $s1, 0xf600
|
||||
/* B3B754 800C45B4 24130010 */ li $s3, 16
|
||||
/* B3B758 800C45B8 240A0001 */ li $t2, 1
|
||||
/* B3B75C 800C45BC 240B0002 */ li $t3, 2
|
||||
.L800C45C0:
|
||||
/* B3B760 800C45C0 240F0001 */ li $t7, 1
|
||||
/* B3B764 800C45C4 008FC004 */ sllv $t8, $t7, $a0
|
||||
/* B3B768 800C45C8 00F8C824 */ and $t9, $a3, $t8
|
||||
/* B3B76C 800C45CC 1320001C */ beqz $t9, .L800C4640
|
||||
/* B3B770 800C45D0 00047040 */ sll $t6, $a0, 1
|
||||
/* B3B774 800C45D4 00403025 */ move $a2, $v0
|
||||
/* B3B778 800C45D8 ACD00000 */ sw $s0, ($a2)
|
||||
/* B3B77C 800C45DC 024E4021 */ addu $t0, $s2, $t6
|
||||
/* B3B780 800C45E0 95090000 */ lhu $t1, ($t0)
|
||||
/* B3B784 800C45E4 000A6080 */ sll $t4, $t2, 2
|
||||
/* B3B788 800C45E8 258C00E1 */ addiu $t4, $t4, 0xe1
|
||||
/* B3B78C 800C45EC 00097C00 */ sll $t7, $t1, 0x10
|
||||
/* B3B790 800C45F0 319903FF */ andi $t9, $t4, 0x3ff
|
||||
/* B3B794 800C45F4 012FC025 */ or $t8, $t1, $t7
|
||||
/* B3B798 800C45F8 00046880 */ sll $t5, $a0, 2
|
||||
/* B3B79C 800C45FC 00197380 */ sll $t6, $t9, 0xe
|
||||
/* B3B7A0 800C4600 25AD00E2 */ addiu $t5, $t5, 0xe2
|
||||
/* B3B7A4 800C4604 ACD80004 */ sw $t8, 4($a2)
|
||||
/* B3B7A8 800C4608 24420008 */ addiu $v0, $v0, 8
|
||||
/* B3B7AC 800C460C 01D17825 */ or $t7, $t6, $s1
|
||||
/* B3B7B0 800C4610 00403025 */ move $a2, $v0
|
||||
/* B3B7B4 800C4614 31B903FF */ andi $t9, $t5, 0x3ff
|
||||
/* B3B7B8 800C4618 00197380 */ sll $t6, $t9, 0xe
|
||||
/* B3B7BC 800C461C 35F8037C */ ori $t8, $t7, 0x37c
|
||||
/* B3B7C0 800C4620 35CF0370 */ ori $t7, $t6, 0x370
|
||||
/* B3B7C4 800C4624 ACCF0004 */ sw $t7, 4($a2)
|
||||
/* B3B7C8 800C4628 ACD80000 */ sw $t8, ($a2)
|
||||
/* B3B7CC 800C462C 24420008 */ addiu $v0, $v0, 8
|
||||
/* B3B7D0 800C4630 00403025 */ move $a2, $v0
|
||||
/* B3B7D4 800C4634 ACC30000 */ sw $v1, ($a2)
|
||||
/* B3B7D8 800C4638 ACC00004 */ sw $zero, 4($a2)
|
||||
/* B3B7DC 800C463C 24420008 */ addiu $v0, $v0, 8
|
||||
.L800C4640:
|
||||
/* B3B7E0 800C4640 24180001 */ li $t8, 1
|
||||
/* B3B7E4 800C4644 0158C804 */ sllv $t9, $t8, $t2
|
||||
/* B3B7E8 800C4648 00F97024 */ and $t6, $a3, $t9
|
||||
/* B3B7EC 800C464C 11C0001C */ beqz $t6, .L800C46C0
|
||||
/* B3B7F0 800C4650 00403025 */ move $a2, $v0
|
||||
/* B3B7F4 800C4654 00047840 */ sll $t7, $a0, 1
|
||||
/* B3B7F8 800C4658 024FC021 */ addu $t8, $s2, $t7
|
||||
/* B3B7FC 800C465C ACD00000 */ sw $s0, ($a2)
|
||||
/* B3B800 800C4660 97080002 */ lhu $t0, 2($t8)
|
||||
/* B3B804 800C4664 000B4880 */ sll $t1, $t3, 2
|
||||
/* B3B808 800C4668 252900E1 */ addiu $t1, $t1, 0xe1
|
||||
/* B3B80C 800C466C 0008CC00 */ sll $t9, $t0, 0x10
|
||||
/* B3B810 800C4670 312F03FF */ andi $t7, $t1, 0x3ff
|
||||
/* B3B814 800C4674 01197025 */ or $t6, $t0, $t9
|
||||
/* B3B818 800C4678 000FC380 */ sll $t8, $t7, 0xe
|
||||
/* B3B81C 800C467C 000A6080 */ sll $t4, $t2, 2
|
||||
/* B3B820 800C4680 258C00E2 */ addiu $t4, $t4, 0xe2
|
||||
/* B3B824 800C4684 0311C825 */ or $t9, $t8, $s1
|
||||
/* B3B828 800C4688 ACCE0004 */ sw $t6, 4($a2)
|
||||
/* B3B82C 800C468C 24420008 */ addiu $v0, $v0, 8
|
||||
/* B3B830 800C4690 00403025 */ move $a2, $v0
|
||||
/* B3B834 800C4694 318F03FF */ andi $t7, $t4, 0x3ff
|
||||
/* B3B838 800C4698 000FC380 */ sll $t8, $t7, 0xe
|
||||
/* B3B83C 800C469C 372E037C */ ori $t6, $t9, 0x37c
|
||||
/* B3B840 800C46A0 37190370 */ ori $t9, $t8, 0x370
|
||||
/* B3B844 800C46A4 ACD90004 */ sw $t9, 4($a2)
|
||||
/* B3B848 800C46A8 ACCE0000 */ sw $t6, ($a2)
|
||||
/* B3B84C 800C46AC 24420008 */ addiu $v0, $v0, 8
|
||||
/* B3B850 800C46B0 00403025 */ move $a2, $v0
|
||||
/* B3B854 800C46B4 ACC30000 */ sw $v1, ($a2)
|
||||
/* B3B858 800C46B8 ACC00004 */ sw $zero, 4($a2)
|
||||
/* B3B85C 800C46BC 24420008 */ addiu $v0, $v0, 8
|
||||
.L800C46C0:
|
||||
/* B3B860 800C46C0 01602025 */ move $a0, $t3
|
||||
/* B3B864 800C46C4 254A0002 */ addiu $t2, $t2, 2
|
||||
/* B3B868 800C46C8 1573FFBD */ bne $t3, $s3, .L800C45C0
|
||||
/* B3B86C 800C46CC 256B0002 */ addiu $t3, $t3, 2
|
||||
/* B3B870 800C46D0 ACA20000 */ sw $v0, ($a1)
|
||||
/* B3B874 800C46D4 8FB30014 */ lw $s3, 0x14($sp)
|
||||
/* B3B878 800C46D8 8FB20010 */ lw $s2, 0x10($sp)
|
||||
/* B3B87C 800C46DC 8FB1000C */ lw $s1, 0xc($sp)
|
||||
/* B3B880 800C46E0 8FB00008 */ lw $s0, 8($sp)
|
||||
/* B3B884 800C46E4 03E00008 */ jr $ra
|
||||
/* B3B888 800C46E8 27BD0018 */ addiu $sp, $sp, 0x18
|
|
@ -1,143 +0,0 @@
|
|||
.rdata
|
||||
glabel D_80144E28
|
||||
.asciz "ハイラル一時解放!!\n"
|
||||
# EUC-JP: ハイラル一時解放!! | Hyal temporary release!
|
||||
.balign 4
|
||||
|
||||
glabel D_80144E3C
|
||||
.asciz "%c"
|
||||
.balign 4
|
||||
|
||||
glabel D_80144E40
|
||||
.asciz "\x1b[31m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80144E48
|
||||
.asciz "メモリが足りません。ハイラルサイズを可能な最大値に変更します\n"
|
||||
# EUC-JP: メモリが足りません。ハイラルサイズを可能な最大値に変更します | Not enough memory. Change Hyrule size to maximum possible
|
||||
.balign 4
|
||||
|
||||
glabel D_80144E88
|
||||
.asciz "(hyral=%08x max=%08x free=%08x alloc=%08x)\n"
|
||||
.balign 4
|
||||
|
||||
glabel D_80144EB4
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80144EB8
|
||||
.asciz "ハイラル再確保 サイズ=%u バイト\n"
|
||||
# EUC-JP: ハイラル再確保 サイズ=%u バイト | Hyal re-allocation size =%u bytes
|
||||
.balign 4
|
||||
|
||||
glabel D_80144EDC
|
||||
.asciz "../game.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_80144EE8
|
||||
.asciz "ハイラル再確保成功\n"
|
||||
# EUC-JP: ハイラル再確保成功 | Successful Hyal Reacquisition
|
||||
.balign 4
|
||||
|
||||
glabel D_80144EFC
|
||||
.asciz "ハイラル再確保失敗\n"
|
||||
# EUC-JP: ハイラル再確保失敗 | Hyal reacquisition failure
|
||||
.balign 4
|
||||
|
||||
glabel D_80144F10
|
||||
.asciz "../game.c"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel GameState_Realloc
|
||||
/* B3C0C0 800C4F20 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* B3C0C4 800C4F24 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* B3C0C8 800C4F28 AFA50044 */ sw $a1, 0x44($sp)
|
||||
/* B3C0CC 800C4F2C 8C8E0078 */ lw $t6, 0x78($a0)
|
||||
/* B3C0D0 800C4F30 00803025 */ move $a2, $a0
|
||||
/* B3C0D4 800C4F34 24840074 */ addiu $a0, $a0, 0x74
|
||||
/* B3C0D8 800C4F38 AFA40020 */ sw $a0, 0x20($sp)
|
||||
/* B3C0DC 800C4F3C AFA60040 */ sw $a2, 0x40($sp)
|
||||
/* B3C0E0 800C4F40 0C030EFE */ jal THA_Dt
|
||||
/* B3C0E4 800C4F44 AFAE0028 */ sw $t6, 0x28($sp)
|
||||
/* B3C0E8 800C4F48 8FA60040 */ lw $a2, 0x40($sp)
|
||||
/* B3C0EC 800C4F4C 8FA50028 */ lw $a1, 0x28($sp)
|
||||
/* B3C0F0 800C4F50 24C40084 */ addiu $a0, $a2, 0x84
|
||||
/* B3C0F4 800C4F54 0C0315C9 */ jal GameAlloc_Free
|
||||
/* B3C0F8 800C4F58 AFA40024 */ sw $a0, 0x24($sp)
|
||||
/* B3C0FC 800C4F5C 3C048014 */ lui $a0, %hi(D_80144E28) # $a0, 0x8014
|
||||
/* B3C100 800C4F60 0C00084C */ jal osSyncPrintf
|
||||
/* B3C104 800C4F64 24844E28 */ addiu $a0, %lo(D_80144E28) # addiu $a0, $a0, 0x4e28
|
||||
/* B3C108 800C4F68 27A40034 */ addiu $a0, $sp, 0x34
|
||||
/* B3C10C 800C4F6C 27A50030 */ addiu $a1, $sp, 0x30
|
||||
/* B3C110 800C4F70 0C03F622 */ jal SystemArena_GetSizes
|
||||
/* B3C114 800C4F74 27A6002C */ addiu $a2, $sp, 0x2c
|
||||
/* B3C118 800C4F78 8FB80034 */ lw $t8, 0x34($sp)
|
||||
/* B3C11C 800C4F7C 8FAF0044 */ lw $t7, 0x44($sp)
|
||||
/* B3C120 800C4F80 3C048014 */ lui $a0, %hi(D_80144E3C) # $a0, 0x8014
|
||||
/* B3C124 800C4F84 2719FFF0 */ addiu $t9, $t8, -0x10
|
||||
/* B3C128 800C4F88 032F082B */ sltu $at, $t9, $t7
|
||||
/* B3C12C 800C4F8C 10200017 */ beqz $at, .L800C4FEC
|
||||
/* B3C130 800C4F90 24844E3C */ addiu $a0, %lo(D_80144E3C) # addiu $a0, $a0, 0x4e3c
|
||||
/* B3C134 800C4F94 0C00084C */ jal osSyncPrintf
|
||||
/* B3C138 800C4F98 24050007 */ li $a1, 7
|
||||
/* B3C13C 800C4F9C 3C048014 */ lui $a0, %hi(D_80144E40) # $a0, 0x8014
|
||||
/* B3C140 800C4FA0 0C00084C */ jal osSyncPrintf
|
||||
/* B3C144 800C4FA4 24844E40 */ addiu $a0, %lo(D_80144E40) # addiu $a0, $a0, 0x4e40
|
||||
/* B3C148 800C4FA8 3C048014 */ lui $a0, %hi(D_80144E48) # $a0, 0x8014
|
||||
/* B3C14C 800C4FAC 0C00084C */ jal osSyncPrintf
|
||||
/* B3C150 800C4FB0 24844E48 */ addiu $a0, %lo(D_80144E48) # addiu $a0, $a0, 0x4e48
|
||||
/* B3C154 800C4FB4 8FA8002C */ lw $t0, 0x2c($sp)
|
||||
/* B3C158 800C4FB8 3C048014 */ lui $a0, %hi(D_80144E88) # $a0, 0x8014
|
||||
/* B3C15C 800C4FBC 24844E88 */ addiu $a0, %lo(D_80144E88) # addiu $a0, $a0, 0x4e88
|
||||
/* B3C160 800C4FC0 8FA50044 */ lw $a1, 0x44($sp)
|
||||
/* B3C164 800C4FC4 8FA60034 */ lw $a2, 0x34($sp)
|
||||
/* B3C168 800C4FC8 8FA70030 */ lw $a3, 0x30($sp)
|
||||
/* B3C16C 800C4FCC 0C00084C */ jal osSyncPrintf
|
||||
/* B3C170 800C4FD0 AFA80010 */ sw $t0, 0x10($sp)
|
||||
/* B3C174 800C4FD4 3C048014 */ lui $a0, %hi(D_80144EB4) # $a0, 0x8014
|
||||
/* B3C178 800C4FD8 0C00084C */ jal osSyncPrintf
|
||||
/* B3C17C 800C4FDC 24844EB4 */ addiu $a0, %lo(D_80144EB4) # addiu $a0, $a0, 0x4eb4
|
||||
/* B3C180 800C4FE0 8FA90034 */ lw $t1, 0x34($sp)
|
||||
/* B3C184 800C4FE4 252AFFF0 */ addiu $t2, $t1, -0x10
|
||||
/* B3C188 800C4FE8 AFAA0044 */ sw $t2, 0x44($sp)
|
||||
.L800C4FEC:
|
||||
/* B3C18C 800C4FEC 3C048014 */ lui $a0, %hi(D_80144EB8) # $a0, 0x8014
|
||||
/* B3C190 800C4FF0 24844EB8 */ addiu $a0, %lo(D_80144EB8) # addiu $a0, $a0, 0x4eb8
|
||||
/* B3C194 800C4FF4 0C00084C */ jal osSyncPrintf
|
||||
/* B3C198 800C4FF8 8FA50044 */ lw $a1, 0x44($sp)
|
||||
/* B3C19C 800C4FFC 3C068014 */ lui $a2, %hi(D_80144EDC) # $a2, 0x8014
|
||||
/* B3C1A0 800C5000 24C64EDC */ addiu $a2, %lo(D_80144EDC) # addiu $a2, $a2, 0x4edc
|
||||
/* B3C1A4 800C5004 8FA40024 */ lw $a0, 0x24($sp)
|
||||
/* B3C1A8 800C5008 8FA50044 */ lw $a1, 0x44($sp)
|
||||
/* B3C1AC 800C500C 0C03158F */ jal GameAlloc_MallocDebug
|
||||
/* B3C1B0 800C5010 24070409 */ li $a3, 1033
|
||||
/* B3C1B4 800C5014 10400009 */ beqz $v0, .L800C503C
|
||||
/* B3C1B8 800C5018 00402825 */ move $a1, $v0
|
||||
/* B3C1BC 800C501C 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B3C1C0 800C5020 0C030EF5 */ jal THA_Ct
|
||||
/* B3C1C4 800C5024 8FA60044 */ lw $a2, 0x44($sp)
|
||||
/* B3C1C8 800C5028 3C048014 */ lui $a0, %hi(D_80144EE8) # $a0, 0x8014
|
||||
/* B3C1CC 800C502C 0C00084C */ jal osSyncPrintf
|
||||
/* B3C1D0 800C5030 24844EE8 */ addiu $a0, %lo(D_80144EE8) # addiu $a0, $a0, 0x4ee8
|
||||
/* B3C1D4 800C5034 1000000F */ b .L800C5074
|
||||
/* B3C1D8 800C5038 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L800C503C:
|
||||
/* B3C1DC 800C503C 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B3C1E0 800C5040 00002825 */ move $a1, $zero
|
||||
/* B3C1E4 800C5044 0C030EF5 */ jal THA_Ct
|
||||
/* B3C1E8 800C5048 00003025 */ move $a2, $zero
|
||||
/* B3C1EC 800C504C 3C048014 */ lui $a0, %hi(D_80144EFC) # $a0, 0x8014
|
||||
/* B3C1F0 800C5050 0C00084C */ jal osSyncPrintf
|
||||
/* B3C1F4 800C5054 24844EFC */ addiu $a0, %lo(D_80144EFC) # addiu $a0, $a0, 0x4efc
|
||||
/* B3C1F8 800C5058 0C03F616 */ jal SystemArena_Display
|
||||
/* B3C1FC 800C505C 00000000 */ nop
|
||||
/* B3C200 800C5060 3C048014 */ lui $a0, %hi(D_80144F10) # $a0, 0x8014
|
||||
/* B3C204 800C5064 24844F10 */ addiu $a0, %lo(D_80144F10) # addiu $a0, $a0, 0x4f10
|
||||
/* B3C208 800C5068 0C0359C3 */ jal Fault_AddHungupAndCrash
|
||||
/* B3C20C 800C506C 24050414 */ li $a1, 1044
|
||||
/* B3C210 800C5070 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L800C5074:
|
||||
/* B3C214 800C5074 27BD0040 */ addiu $sp, $sp, 0x40
|
||||
/* B3C218 800C5078 03E00008 */ jr $ra
|
||||
/* B3C21C 800C507C 00000000 */ nop
|
|
@ -1,266 +0,0 @@
|
|||
.late_rodata
|
||||
glabel D_801450E8
|
||||
.float 0.833
|
||||
|
||||
.text
|
||||
glabel GameState_Update
|
||||
/* B3BC68 800C4AC8 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* B3BC6C 800C4ACC AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B3BC70 800C4AD0 AFA40020 */ sw $a0, 0x20($sp)
|
||||
/* B3BC74 800C4AD4 8C860000 */ lw $a2, ($a0)
|
||||
/* B3BC78 800C4AD8 00C02025 */ move $a0, $a2
|
||||
/* B3BC7C 800C4ADC 0C031233 */ jal GameState_SetFrameBuffer
|
||||
/* B3BC80 800C4AE0 AFA6001C */ sw $a2, 0x1c($sp)
|
||||
/* B3BC84 800C4AE4 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B3BC88 800C4AE8 8C990004 */ lw $t9, 4($a0)
|
||||
/* B3BC8C 800C4AEC 0320F809 */ jalr $t9
|
||||
/* B3BC90 800C4AF0 00000000 */ nop
|
||||
/* B3BC94 800C4AF4 0C0310D1 */ jal func_800C4344
|
||||
/* B3BC98 800C4AF8 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B3BC9C 800C4AFC 3C078016 */ lui $a3, %hi(gGameInfo) # $a3, 0x8016
|
||||
/* B3BCA0 800C4B00 24E7FA90 */ addiu $a3, %lo(gGameInfo) # addiu $a3, $a3, -0x570
|
||||
/* B3BCA4 800C4B04 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BCA8 800C4B08 24040001 */ li $a0, 1
|
||||
/* B3BCAC 800C4B0C 8FA6001C */ lw $a2, 0x1c($sp)
|
||||
/* B3BCB0 800C4B10 84430152 */ lh $v1, 0x152($v0)
|
||||
/* B3BCB4 800C4B14 1483002D */ bne $a0, $v1, .L800C4BCC
|
||||
/* B3BCB8 800C4B18 28610002 */ slti $at, $v1, 2
|
||||
/* B3BCBC 800C4B1C 84430134 */ lh $v1, 0x134($v0)
|
||||
/* B3BCC0 800C4B20 3C0F8001 */ lui $t7, %hi(gViConfigMode) # $t7, 0x8001
|
||||
/* B3BCC4 800C4B24 25EF3910 */ addiu $t7, %lo(gViConfigMode) # addiu $t7, $t7, 0x3910
|
||||
/* B3BCC8 800C4B28 04610010 */ bgez $v1, .L800C4B6C
|
||||
/* B3BCCC 800C4B2C 3C188001 */ lui $t8, %hi(gViConfigFeatures) # $t8, 0x8001
|
||||
/* B3BCD0 800C4B30 A4400134 */ sh $zero, 0x134($v0)
|
||||
/* B3BCD4 800C4B34 ACCF0284 */ sw $t7, 0x284($a2)
|
||||
/* B3BCD8 800C4B38 8F18943C */ lw $t8, %lo(gViConfigFeatures)($t8)
|
||||
/* B3BCDC 800C4B3C 3C018001 */ lui $at, %hi(gViConfigXScale)
|
||||
/* B3BCE0 800C4B40 24050002 */ li $a1, 2
|
||||
/* B3BCE4 800C4B44 ACD802E4 */ sw $t8, 0x2e4($a2)
|
||||
/* B3BCE8 800C4B48 C4249440 */ lwc1 $f4, %lo(gViConfigXScale)($at)
|
||||
/* B3BCEC 800C4B4C 3C018001 */ lui $at, %hi(gViConfigYScale)
|
||||
/* B3BCF0 800C4B50 E4C402F4 */ swc1 $f4, 0x2f4($a2)
|
||||
/* B3BCF4 800C4B54 C4269444 */ lwc1 $f6, %lo(gViConfigYScale)($at)
|
||||
/* B3BCF8 800C4B58 3C013F80 */ li $at, 0x3F800000 # 0.000000
|
||||
/* B3BCFC 800C4B5C 44810000 */ mtc1 $at, $f0
|
||||
/* B3BD00 800C4B60 E4C602F8 */ swc1 $f6, 0x2f8($a2)
|
||||
/* B3BD04 800C4B64 1000006D */ b .L800C4D1C
|
||||
/* B3BD08 800C4B68 8CE20000 */ lw $v0, ($a3)
|
||||
.L800C4B6C:
|
||||
/* B3BD0C 800C4B6C 18600013 */ blez $v1, .L800C4BBC
|
||||
/* B3BD10 800C4B70 3C048016 */ lui $a0, %hi(D_80166528) # $a0, 0x8016
|
||||
/* B3BD14 800C4B74 8FA50020 */ lw $a1, 0x20($sp)
|
||||
/* B3BD18 800C4B78 24846528 */ addiu $a0, %lo(D_80166528) # addiu $a0, $a0, 0x6528
|
||||
/* B3BD1C 800C4B7C AFA6001C */ sw $a2, 0x1c($sp)
|
||||
/* B3BD20 800C4B80 0C02B2BE */ jal func_800ACAF8
|
||||
/* B3BD24 800C4B84 24A50014 */ addiu $a1, $a1, 0x14
|
||||
/* B3BD28 800C4B88 8FA6001C */ lw $a2, 0x1c($sp)
|
||||
/* B3BD2C 800C4B8C 3C038016 */ lui $v1, %hi(D_80166528) # $v1, 0x8016
|
||||
/* B3BD30 800C4B90 24636528 */ addiu $v1, %lo(D_80166528) # addiu $v1, $v1, 0x6528
|
||||
/* B3BD34 800C4B94 3C013F80 */ li $at, 0x3F800000 # 0.000000
|
||||
/* B3BD38 800C4B98 44810000 */ mtc1 $at, $f0
|
||||
/* B3BD3C 800C4B9C ACC30284 */ sw $v1, 0x284($a2)
|
||||
/* B3BD40 800C4BA0 8C690080 */ lw $t1, 0x80($v1)
|
||||
/* B3BD44 800C4BA4 3C078016 */ lui $a3, %hi(gGameInfo) # $a3, 0x8016
|
||||
/* B3BD48 800C4BA8 24E7FA90 */ addiu $a3, %lo(gGameInfo) # addiu $a3, $a3, -0x570
|
||||
/* B3BD4C 800C4BAC E4C002F4 */ swc1 $f0, 0x2f4($a2)
|
||||
/* B3BD50 800C4BB0 E4C002F8 */ swc1 $f0, 0x2f8($a2)
|
||||
/* B3BD54 800C4BB4 ACC902E4 */ sw $t1, 0x2e4($a2)
|
||||
/* B3BD58 800C4BB8 8CE20000 */ lw $v0, ($a3)
|
||||
.L800C4BBC:
|
||||
/* B3BD5C 800C4BBC 3C013F80 */ li $at, 0x3F800000 # 0.000000
|
||||
/* B3BD60 800C4BC0 44810000 */ mtc1 $at, $f0
|
||||
/* B3BD64 800C4BC4 10000055 */ b .L800C4D1C
|
||||
/* B3BD68 800C4BC8 24050002 */ li $a1, 2
|
||||
.L800C4BCC:
|
||||
/* B3BD6C 800C4BCC 1420004F */ bnez $at, .L800C4D0C
|
||||
/* B3BD70 800C4BD0 24050002 */ li $a1, 2
|
||||
/* B3BD74 800C4BD4 3C0A8001 */ lui $t2, %hi(gViConfigMode) # $t2, 0x8001
|
||||
/* B3BD78 800C4BD8 254A3910 */ addiu $t2, %lo(gViConfigMode) # addiu $t2, $t2, 0x3910
|
||||
/* B3BD7C 800C4BDC ACCA0284 */ sw $t2, 0x284($a2)
|
||||
/* B3BD80 800C4BE0 3C0B8001 */ lui $t3, %hi(gViConfigFeatures) # $t3, 0x8001
|
||||
/* B3BD84 800C4BE4 8D6B943C */ lw $t3, %lo(gViConfigFeatures)($t3)
|
||||
/* B3BD88 800C4BE8 3C018001 */ lui $at, %hi(gViConfigXScale)
|
||||
/* B3BD8C 800C4BEC 3C198001 */ lui $t9, %hi(osViModeMpalLan1) # $t9, 0x8001
|
||||
/* B3BD90 800C4BF0 ACCB02E4 */ sw $t3, 0x2e4($a2)
|
||||
/* B3BD94 800C4BF4 C4289440 */ lwc1 $f8, %lo(gViConfigXScale)($at)
|
||||
/* B3BD98 800C4BF8 3C018001 */ lui $at, %hi(gViConfigYScale)
|
||||
/* B3BD9C 800C4BFC 3C188001 */ lui $t8, %hi(osViModePalLan1) # $t8, 0x8001
|
||||
/* B3BDA0 800C4C00 E4C802F4 */ swc1 $f8, 0x2f4($a2)
|
||||
/* B3BDA4 800C4C04 C42A9444 */ lwc1 $f10, %lo(gViConfigYScale)($at)
|
||||
/* B3BDA8 800C4C08 24010006 */ li $at, 6
|
||||
/* B3BDAC 800C4C0C 3C0A8001 */ lui $t2, %hi(osViModeFpalLan1) # $t2, 0x8001
|
||||
/* B3BDB0 800C4C10 E4CA02F8 */ swc1 $f10, 0x2f8($a2)
|
||||
/* B3BDB4 800C4C14 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BDB8 800C4C18 24050002 */ li $a1, 2
|
||||
/* B3BDBC 800C4C1C 3C0D8001 */ lui $t5, %hi(osViModeNtscLan1) # $t5, 0x8001
|
||||
/* B3BDC0 800C4C20 84430152 */ lh $v1, 0x152($v0)
|
||||
/* B3BDC4 800C4C24 2739AE50 */ addiu $t9, %lo(osViModeMpalLan1) # addiu $t9, $t9, -0x51b0
|
||||
/* B3BDC8 800C4C28 2718ACA0 */ addiu $t8, %lo(osViModePalLan1) # addiu $t8, $t8, -0x5360
|
||||
/* B3BDCC 800C4C2C 10610006 */ beq $v1, $at, .L800C4C48
|
||||
/* B3BDD0 800C4C30 254AAF20 */ addiu $t2, %lo(osViModeFpalLan1) # addiu $t2, $t2, -0x50e0
|
||||
/* B3BDD4 800C4C34 14A3000C */ bne $a1, $v1, .L800C4C68
|
||||
/* B3BDD8 800C4C38 3C088000 */ lui $t0, %hi(osTvType) # $t0, 0x8000
|
||||
/* B3BDDC 800C4C3C 25080300 */ addiu $t0, %lo(osTvType) # addiu $t0, $t0, 0x300
|
||||
/* B3BDE0 800C4C40 8D0C0000 */ lw $t4, ($t0)
|
||||
/* B3BDE4 800C4C44 148C0008 */ bne $a0, $t4, .L800C4C68
|
||||
.L800C4C48:
|
||||
/* B3BDE8 800C4C48 3C013F80 */ li $at, 0x3F800000 # 0.000000
|
||||
/* B3BDEC 800C4C4C 44810000 */ mtc1 $at, $f0
|
||||
/* B3BDF0 800C4C50 25ADAE00 */ addiu $t5, %lo(osViModeNtscLan1) # addiu $t5, $t5, -0x5200
|
||||
/* B3BDF4 800C4C54 ACCD0284 */ sw $t5, 0x284($a2)
|
||||
/* B3BDF8 800C4C58 E4C002F8 */ swc1 $f0, 0x2f8($a2)
|
||||
/* B3BDFC 800C4C5C 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BE00 800C4C60 24050002 */ li $a1, 2
|
||||
/* B3BE04 800C4C64 84430152 */ lh $v1, 0x152($v0)
|
||||
.L800C4C68:
|
||||
/* B3BE08 800C4C68 3C013F80 */ li $at, 0x3F800000 # 0.000000
|
||||
/* B3BE0C 800C4C6C 44810000 */ mtc1 $at, $f0
|
||||
/* B3BE10 800C4C70 3C088000 */ lui $t0, %hi(osTvType) # $t0, 0x8000
|
||||
/* B3BE14 800C4C74 24010005 */ li $at, 5
|
||||
/* B3BE18 800C4C78 10610006 */ beq $v1, $at, .L800C4C94
|
||||
/* B3BE1C 800C4C7C 25080300 */ addiu $t0, %lo(osTvType) # addiu $t0, $t0, 0x300
|
||||
/* B3BE20 800C4C80 54A30009 */ bnel $a1, $v1, .L800C4CA8
|
||||
/* B3BE24 800C4C84 24010004 */ li $at, 4
|
||||
/* B3BE28 800C4C88 8D0E0000 */ lw $t6, ($t0)
|
||||
/* B3BE2C 800C4C8C 54AE0006 */ bnel $a1, $t6, .L800C4CA8
|
||||
/* B3BE30 800C4C90 24010004 */ li $at, 4
|
||||
.L800C4C94:
|
||||
/* B3BE34 800C4C94 ACD90284 */ sw $t9, 0x284($a2)
|
||||
/* B3BE38 800C4C98 E4C002F8 */ swc1 $f0, 0x2f8($a2)
|
||||
/* B3BE3C 800C4C9C 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BE40 800C4CA0 84430152 */ lh $v1, 0x152($v0)
|
||||
/* B3BE44 800C4CA4 24010004 */ li $at, 4
|
||||
.L800C4CA8:
|
||||
/* B3BE48 800C4CA8 50610007 */ beql $v1, $at, .L800C4CC8
|
||||
/* B3BE4C 800C4CAC ACD80284 */ sw $t8, 0x284($a2)
|
||||
/* B3BE50 800C4CB0 54A30009 */ bnel $a1, $v1, .L800C4CD8
|
||||
/* B3BE54 800C4CB4 24010003 */ li $at, 3
|
||||
/* B3BE58 800C4CB8 8D0F0000 */ lw $t7, ($t0)
|
||||
/* B3BE5C 800C4CBC 55E00006 */ bnezl $t7, .L800C4CD8
|
||||
/* B3BE60 800C4CC0 24010003 */ li $at, 3
|
||||
/* B3BE64 800C4CC4 ACD80284 */ sw $t8, 0x284($a2)
|
||||
.L800C4CC8:
|
||||
/* B3BE68 800C4CC8 E4C002F8 */ swc1 $f0, 0x2f8($a2)
|
||||
/* B3BE6C 800C4CCC 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BE70 800C4CD0 84430152 */ lh $v1, 0x152($v0)
|
||||
/* B3BE74 800C4CD4 24010003 */ li $at, 3
|
||||
.L800C4CD8:
|
||||
/* B3BE78 800C4CD8 50610007 */ beql $v1, $at, .L800C4CF8
|
||||
/* B3BE7C 800C4CDC ACCA0284 */ sw $t2, 0x284($a2)
|
||||
/* B3BE80 800C4CE0 54A3000F */ bnel $a1, $v1, .L800C4D20
|
||||
/* B3BE84 800C4CE4 844B1074 */ lh $t3, 0x1074($v0)
|
||||
/* B3BE88 800C4CE8 8D090000 */ lw $t1, ($t0)
|
||||
/* B3BE8C 800C4CEC 5520000C */ bnezl $t1, .L800C4D20
|
||||
/* B3BE90 800C4CF0 844B1074 */ lh $t3, 0x1074($v0)
|
||||
/* B3BE94 800C4CF4 ACCA0284 */ sw $t2, 0x284($a2)
|
||||
.L800C4CF8:
|
||||
/* B3BE98 800C4CF8 3C018014 */ lui $at, %hi(D_801450E8)
|
||||
/* B3BE9C 800C4CFC C43050E8 */ lwc1 $f16, %lo(D_801450E8)($at)
|
||||
/* B3BEA0 800C4D00 E4D002F8 */ swc1 $f16, 0x2f8($a2)
|
||||
/* B3BEA4 800C4D04 10000005 */ b .L800C4D1C
|
||||
/* B3BEA8 800C4D08 8CE20000 */ lw $v0, ($a3)
|
||||
.L800C4D0C:
|
||||
/* B3BEAC 800C4D0C 3C013F80 */ li $at, 0x3F800000 # 0.000000
|
||||
/* B3BEB0 800C4D10 ACC00284 */ sw $zero, 0x284($a2)
|
||||
/* B3BEB4 800C4D14 44810000 */ mtc1 $at, $f0
|
||||
/* B3BEB8 800C4D18 8CE20000 */ lw $v0, ($a3)
|
||||
.L800C4D1C:
|
||||
/* B3BEBC 800C4D1C 844B1074 */ lh $t3, 0x1074($v0)
|
||||
.L800C4D20:
|
||||
/* B3BEC0 800C4D20 24030015 */ li $v1, 21
|
||||
/* B3BEC4 800C4D24 546B0046 */ bnel $v1, $t3, .L800C4E40
|
||||
/* B3BEC8 800C4D28 84490190 */ lh $t1, 0x190($v0)
|
||||
/* B3BECC 800C4D2C 844C1092 */ lh $t4, 0x1092($v0)
|
||||
/* B3BED0 800C4D30 24090030 */ li $t1, 48
|
||||
/* B3BED4 800C4D34 506C000F */ beql $v1, $t4, .L800C4D74
|
||||
/* B3BED8 800C4D38 84431078 */ lh $v1, 0x1078($v0)
|
||||
/* B3BEDC 800C4D3C A4431092 */ sh $v1, 0x1092($v0)
|
||||
/* B3BEE0 800C4D40 8CED0000 */ lw $t5, ($a3)
|
||||
/* B3BEE4 800C4D44 3C048001 */ lui $a0, %hi(gViConfigAdditionalScanLines) # $a0, 0x8001
|
||||
/* B3BEE8 800C4D48 24849438 */ addiu $a0, %lo(gViConfigAdditionalScanLines) # addiu $a0, $a0, -0x6bc8
|
||||
/* B3BEEC 800C4D4C A5A01076 */ sh $zero, 0x1076($t5)
|
||||
/* B3BEF0 800C4D50 8CF90000 */ lw $t9, ($a3)
|
||||
/* B3BEF4 800C4D54 908E0000 */ lbu $t6, ($a0)
|
||||
/* B3BEF8 800C4D58 A72E1078 */ sh $t6, 0x1078($t9)
|
||||
/* B3BEFC 800C4D5C 8CEF0000 */ lw $t7, ($a3)
|
||||
/* B3BF00 800C4D60 A5E0107A */ sh $zero, 0x107a($t7)
|
||||
/* B3BF04 800C4D64 8CF80000 */ lw $t8, ($a3)
|
||||
/* B3BF08 800C4D68 A700107C */ sh $zero, 0x107c($t8)
|
||||
/* B3BF0C 800C4D6C 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BF10 800C4D70 84431078 */ lh $v1, 0x1078($v0)
|
||||
.L800C4D74:
|
||||
/* B3BF14 800C4D74 3C048001 */ lui $a0, %hi(gViConfigAdditionalScanLines)
|
||||
/* B3BF18 800C4D78 24849438 */ addiu $a0, %lo(gViConfigAdditionalScanLines) # addiu $a0, $a0, -0x6bc8
|
||||
/* B3BF1C 800C4D7C 04630005 */ bgezl $v1, .L800C4D94
|
||||
/* B3BF20 800C4D80 28610031 */ slti $at, $v1, 0x31
|
||||
/* B3BF24 800C4D84 A4401078 */ sh $zero, 0x1078($v0)
|
||||
/* B3BF28 800C4D88 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BF2C 800C4D8C 84431078 */ lh $v1, 0x1078($v0)
|
||||
/* B3BF30 800C4D90 28610031 */ slti $at, $v1, 0x31
|
||||
.L800C4D94:
|
||||
/* B3BF34 800C4D94 54200005 */ bnezl $at, .L800C4DAC
|
||||
/* B3BF38 800C4D98 844A107A */ lh $t2, 0x107a($v0)
|
||||
/* B3BF3C 800C4D9C A4491078 */ sh $t1, 0x1078($v0)
|
||||
/* B3BF40 800C4DA0 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BF44 800C4DA4 84431078 */ lh $v1, 0x1078($v0)
|
||||
/* B3BF48 800C4DA8 844A107A */ lh $t2, 0x107a($v0)
|
||||
.L800C4DAC:
|
||||
/* B3BF4C 800C4DAC 55430006 */ bnel $t2, $v1, .L800C4DC8
|
||||
/* B3BF50 800C4DB0 A443107A */ sh $v1, 0x107a($v0)
|
||||
/* B3BF54 800C4DB4 844B107C */ lh $t3, 0x107c($v0)
|
||||
/* B3BF58 800C4DB8 844C1076 */ lh $t4, 0x1076($v0)
|
||||
/* B3BF5C 800C4DBC 516C0020 */ beql $t3, $t4, .L800C4E40
|
||||
/* B3BF60 800C4DC0 84490190 */ lh $t1, 0x190($v0)
|
||||
/* B3BF64 800C4DC4 A443107A */ sh $v1, 0x107a($v0)
|
||||
.L800C4DC8:
|
||||
/* B3BF68 800C4DC8 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BF6C 800C4DCC 3C014370 */ li $at, 0x43700000 # 0.000000
|
||||
/* B3BF70 800C4DD0 844D1076 */ lh $t5, 0x1076($v0)
|
||||
/* B3BF74 800C4DD4 A44D107C */ sh $t5, 0x107c($v0)
|
||||
/* B3BF78 800C4DD8 8CE20000 */ lw $v0, ($a3)
|
||||
/* B3BF7C 800C4DDC 844E1078 */ lh $t6, 0x1078($v0)
|
||||
/* B3BF80 800C4DE0 A08E0000 */ sb $t6, ($a0)
|
||||
/* B3BF84 800C4DE4 84591076 */ lh $t9, 0x1076($v0)
|
||||
/* B3BF88 800C4DE8 31CF00FF */ andi $t7, $t6, 0xff
|
||||
/* B3BF8C 800C4DEC 1720000E */ bnez $t9, .L800C4E28
|
||||
/* B3BF90 800C4DF0 00000000 */ nop
|
||||
/* B3BF94 800C4DF4 448F9000 */ mtc1 $t7, $f18
|
||||
/* B3BF98 800C4DF8 44810000 */ mtc1 $at, $f0
|
||||
/* B3BF9C 800C4DFC 05E10005 */ bgez $t7, .L800C4E14
|
||||
/* B3BFA0 800C4E00 46809120 */ cvt.s.w $f4, $f18
|
||||
/* B3BFA4 800C4E04 3C014F80 */ li $at, 0x4F800000 # 0.000000
|
||||
/* B3BFA8 800C4E08 44813000 */ mtc1 $at, $f6
|
||||
/* B3BFAC 800C4E0C 00000000 */ nop
|
||||
/* B3BFB0 800C4E10 46062100 */ add.s $f4, $f4, $f6
|
||||
.L800C4E14:
|
||||
/* B3BFB4 800C4E14 46002200 */ add.s $f8, $f4, $f0
|
||||
/* B3BFB8 800C4E18 3C018001 */ lui $at, %hi(gViConfigYScale)
|
||||
/* B3BFBC 800C4E1C 46080283 */ div.s $f10, $f0, $f8
|
||||
/* B3BFC0 800C4E20 10000003 */ b .L800C4E30
|
||||
/* B3BFC4 800C4E24 E42A9444 */ swc1 $f10, %lo(gViConfigYScale)($at)
|
||||
.L800C4E28:
|
||||
/* B3BFC8 800C4E28 3C018001 */ lui $at, %hi(gViConfigYScale)
|
||||
/* B3BFCC 800C4E2C E4209444 */ swc1 $f0, %lo(gViConfigYScale)($at)
|
||||
.L800C4E30:
|
||||
/* B3BFD0 800C4E30 24180001 */ li $t8, 1
|
||||
/* B3BFD4 800C4E34 3C018001 */ lui $at, %hi(D_80009430) # $at, 0x8001
|
||||
/* B3BFD8 800C4E38 A0389430 */ sb $t8, %lo(D_80009430)($at)
|
||||
/* B3BFDC 800C4E3C 84490190 */ lh $t1, 0x190($v0)
|
||||
.L800C4E40:
|
||||
/* B3BFE0 800C4E40 50A90008 */ beql $a1, $t1, .L800C4E64
|
||||
/* B3BFE4 800C4E44 8FA20020 */ lw $v0, 0x20($sp)
|
||||
/* B3BFE8 800C4E48 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B3BFEC 800C4E4C 00C02825 */ move $a1, $a2
|
||||
/* B3BFF0 800C4E50 0C0311BB */ jal GameState_Draw
|
||||
/* B3BFF4 800C4E54 AFA6001C */ sw $a2, 0x1c($sp)
|
||||
/* B3BFF8 800C4E58 0C03127D */ jal func_800C49F4
|
||||
/* B3BFFC 800C4E5C 8FA4001C */ lw $a0, 0x1c($sp)
|
||||
/* B3C000 800C4E60 8FA20020 */ lw $v0, 0x20($sp)
|
||||
.L800C4E64:
|
||||
/* B3C004 800C4E64 8C4A009C */ lw $t2, 0x9c($v0)
|
||||
/* B3C008 800C4E68 254B0001 */ addiu $t3, $t2, 1
|
||||
/* B3C00C 800C4E6C AC4B009C */ sw $t3, 0x9c($v0)
|
||||
/* B3C010 800C4E70 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B3C014 800C4E74 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* B3C018 800C4E78 03E00008 */ jr $ra
|
||||
/* B3C01C 800C4E7C 00000000 */ nop
|
|
@ -1835,9 +1835,9 @@ void Fault_Wait5Seconds();
|
|||
void Fault_WaitForButtonCombo();
|
||||
void Fault_DrawMemDumpPage(const char*, u32*, u32);
|
||||
void Fault_DrawMemDump(u32, u32, u32, u32);
|
||||
// ? func_800D59F8(?);
|
||||
void Fault_DrawStackTrace(OSThread*, s32, s32, u32);
|
||||
void Fault_LogStackTrace(OSThread*, u32);
|
||||
void Fault_WalkStack(u32* spPtr, u32* pcPtr, u32 *raPtr);
|
||||
void Fault_DrawStackTrace(OSThread* thread, s32 x, s32 y, s32 height);
|
||||
void Fault_LogStackTrace(OSThread* thread, s32 height);
|
||||
void Fault_ResumeThread(OSThread*);
|
||||
void Fault_CommitFB();
|
||||
void Fault_ProcessClients();
|
||||
|
|
|
@ -84,7 +84,7 @@ extern u8 osAppNmiBuffer[];
|
|||
|
||||
extern u8 D_80009320[];
|
||||
extern u8 D_800093F0[];
|
||||
extern u8 D_80009430;
|
||||
extern s8 D_80009430;
|
||||
extern u32 D_80009460;
|
||||
extern u32 gDmaMgrDmaBuffSize;
|
||||
extern volatile u8 gViConfigUseDefault;
|
||||
|
|
|
@ -10,7 +10,7 @@ OSMesgQueue gPiMgrCmdQ;
|
|||
OSViMode gViConfigMode;
|
||||
u8 D_80013960;
|
||||
|
||||
u8 D_80009430 = 1;
|
||||
s8 D_80009430 = 1;
|
||||
u8 volatile gViConfigUseDefault = 1;
|
||||
u8 gViConfigAdditionalScanLines = 0;
|
||||
u32 gViConfigFeatures = OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF;
|
||||
|
|
373
src/code/fault.c
373
src/code/fault.c
|
@ -1,5 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <ultra64/controller.h>
|
||||
#include <ultra64/hardware.h>
|
||||
#include <global.h>
|
||||
#include <alloca.h>
|
||||
#include <vt.h>
|
||||
|
@ -39,19 +40,17 @@ extern char sFaultStack[0x600];
|
|||
extern StackEntry sFaultThreadInfo;
|
||||
extern FaultThreadStruct gFaultStruct;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/pad_800D3F10.s")
|
||||
|
||||
void Fault_SleepImpl(u32 duration) {
|
||||
u64 value = (duration * OS_CPU_COUNTER) / 1000ull;
|
||||
Sleep_Cycles(value);
|
||||
}
|
||||
|
||||
void Fault_ClientProcessThread(FaultClientContext* ctx) {
|
||||
if (ctx->callback) {
|
||||
if (ctx->callback != 0) {
|
||||
ctx->ret = ctx->callback(ctx->param0, ctx->param1);
|
||||
}
|
||||
|
||||
if (ctx->queue) {
|
||||
if (ctx->queue != NULL) {
|
||||
osSendMesg(ctx->queue, ctx->msg, 1);
|
||||
}
|
||||
}
|
||||
|
@ -115,14 +114,13 @@ u32 Fault_ProcessClient(u32 callback, u32 param0, u32 param1) {
|
|||
// minor ordering differences
|
||||
void Fault_AddClient(FaultClient* client, void* callback, void* param0, void* param1) {
|
||||
OSIntMask mask;
|
||||
u32 alreadyExists;
|
||||
u32 alreadyExists = false;
|
||||
FaultClient* iter;
|
||||
|
||||
alreadyExists = false;
|
||||
mask = osSetIntMask(1);
|
||||
|
||||
iter = sFaultStructPtr->clients;
|
||||
while (iter) {
|
||||
while (iter != NULL) {
|
||||
if (iter == client) {
|
||||
alreadyExists = true;
|
||||
goto end;
|
||||
|
@ -158,9 +156,9 @@ void Fault_RemoveClient(FaultClient* client) {
|
|||
|
||||
mask = osSetIntMask(1);
|
||||
|
||||
while (iter) {
|
||||
while (iter != NULL) {
|
||||
if (iter == client) {
|
||||
if (lastIter) {
|
||||
if (lastIter != NULL) {
|
||||
lastIter->next = client->next;
|
||||
} else {
|
||||
sFaultStructPtr->clients = client;
|
||||
|
@ -184,7 +182,38 @@ void Fault_RemoveClient(FaultClient* client) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// minor ordering differences
|
||||
void Fault_AddAddrConvClient(FaultAddrConvClient* client, void* callback, void* param) {
|
||||
FaultAddrConvClient* iter;
|
||||
u32 alreadyExists = false;
|
||||
OSIntMask mask;
|
||||
|
||||
mask = osSetIntMask(1);
|
||||
|
||||
iter = sFaultStructPtr->addrConvClients;
|
||||
while (iter != NULL) {
|
||||
if (iter == client) {
|
||||
alreadyExists = true;
|
||||
goto end;
|
||||
}
|
||||
iter = iter->next;
|
||||
}
|
||||
|
||||
client->callback = callback;
|
||||
client->param = param;
|
||||
client->next = sFaultStructPtr->addrConvClients;
|
||||
sFaultStructPtr->addrConvClients = client;
|
||||
|
||||
end:
|
||||
osSetIntMask(mask);
|
||||
if (alreadyExists) {
|
||||
osSyncPrintf(VT_COL(RED, WHITE) "fault_AddressConverterAddClient: %08x は既にリスト中にある\n" VT_RST, client);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_AddAddrConvClient.s")
|
||||
#endif
|
||||
|
||||
void Fault_RemoveAddrConvClient(FaultAddrConvClient* client) {
|
||||
FaultAddrConvClient* iter;
|
||||
|
@ -198,13 +227,13 @@ void Fault_RemoveAddrConvClient(FaultAddrConvClient* client) {
|
|||
|
||||
mask = osSetIntMask(1);
|
||||
|
||||
while (iter) {
|
||||
while (iter != NULL) {
|
||||
if (iter == client) {
|
||||
if (lastIter) {
|
||||
if (lastIter != NULL) {
|
||||
lastIter->next = client->next;
|
||||
} else {
|
||||
sFaultStructPtr->addrConvClients = client;
|
||||
if (sFaultStructPtr->addrConvClients) {
|
||||
if (sFaultStructPtr->addrConvClients != NULL) {
|
||||
sFaultStructPtr->addrConvClients = client->next;
|
||||
} else {
|
||||
listIsEmpty = 1;
|
||||
|
@ -229,12 +258,12 @@ u32 Fault_ConvertAddress(FaultAddrConvClient* client) {
|
|||
u32 ret;
|
||||
FaultAddrConvClient* iter = sFaultStructPtr->addrConvClients;
|
||||
|
||||
while (iter) {
|
||||
if (iter->callback) {
|
||||
while (iter != NULL) {
|
||||
if (iter->callback != 0) {
|
||||
ret = Fault_ProcessClient(iter->callback, client, iter->param);
|
||||
if (ret == -1) {
|
||||
Fault_RemoveAddrConvClient(iter);
|
||||
} else if (ret) {
|
||||
} else if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -257,56 +286,44 @@ void Fault_UpdatePadImpl() {
|
|||
sFaultStructPtr->padCallback(&sFaultStructPtr->padInput);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// ordering differences and possibly regalloc
|
||||
u32 Fault_WaitForInputImpl() {
|
||||
u16 kDown;
|
||||
u32 exitDebugger;
|
||||
s32 count = 600;
|
||||
Input* curInput = &sFaultStructPtr->padInput;
|
||||
s32 count = 600;
|
||||
u32 kDown;
|
||||
|
||||
while (true) {
|
||||
while (true) {
|
||||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
|
||||
kDown = curInput->press.in.button;
|
||||
|
||||
if (kDown == 0x20) {
|
||||
if (kDown == L_TRIG) {
|
||||
sFaultStructPtr->faultActive = !sFaultStructPtr->faultActive;
|
||||
}
|
||||
|
||||
if (!sFaultStructPtr->faultActive) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (sFaultStructPtr->faultActive) {
|
||||
if (count-- < 1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (kDown == 0x8000 || kDown == 0x100) {
|
||||
} else {
|
||||
if (kDown == A_BUTTON || kDown == R_JPAD) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (kDown == 0x200) {
|
||||
if (kDown == L_JPAD) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (kDown == 0x800) {
|
||||
if (kDown == U_JPAD) {
|
||||
FaultDrawer_SetOsSyncPrintfEnabled(true);
|
||||
}
|
||||
|
||||
if (kDown == 0x400) {
|
||||
if (kDown == D_JPAD) {
|
||||
FaultDrawer_SetOsSyncPrintfEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_WaitForInputImpl.s")
|
||||
#endif
|
||||
|
||||
void Fault_WaitForInput() {
|
||||
sFaultIsWaitingForInput = 1;
|
||||
|
@ -519,7 +536,155 @@ void Fault_Wait5Seconds(void) {
|
|||
sFaultStructPtr->faultActive = true;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc differences
|
||||
void Fault_WaitForButtonCombo() {
|
||||
Input* curInput = &sFaultStructPtr->padInput;
|
||||
Input** curInputPtr = &curInput;
|
||||
s32 state;
|
||||
u32 s1;
|
||||
u32 s2;
|
||||
u32 kDown;
|
||||
u32 kCur;
|
||||
|
||||
osSyncPrintf(
|
||||
VT_FGCOL(WHITE) "KeyWaitB (LRZ " VT_FGCOL(WHITE) "上" VT_FGCOL(YELLOW) "下 " VT_FGCOL(YELLOW) "上" VT_FGCOL(WHITE) "下 " VT_FGCOL(WHITE) "左" VT_FGCOL(
|
||||
YELLOW) "左 " VT_FGCOL(YELLOW) "右" VT_FGCOL(WHITE) "右 " VT_FGCOL(GREEN) "B" VT_FGCOL(BLUE) "A" VT_FGCOL(RED) "START" VT_FGCOL(WHITE)
|
||||
VT_RST "\n");
|
||||
osSyncPrintf(VT_FGCOL(WHITE) "KeyWaitB'(LR左" VT_FGCOL(YELLOW) "右 +" VT_FGCOL(RED) "START" VT_FGCOL(
|
||||
WHITE) ")" VT_RST "\n");
|
||||
|
||||
FaultDrawer_SetForeColor(0xFFFF);
|
||||
FaultDrawer_SetBackColor(1);
|
||||
|
||||
state = 0;
|
||||
s1 = 0;
|
||||
s2 = 1;
|
||||
|
||||
while (state != 11) {
|
||||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
|
||||
kDown = curInput->press.in.button;
|
||||
kCur = curInput->cur.in.button;
|
||||
|
||||
if (kCur == 0) {
|
||||
if (s1 == s2) {
|
||||
s1 = 0;
|
||||
}
|
||||
} else if (kDown != 0) {
|
||||
if (s1 == s2) {
|
||||
state = 0;
|
||||
}
|
||||
|
||||
switch (state) {
|
||||
case 0:
|
||||
if (kCur == (Z_TRIG | L_TRIG | R_TRIG) && kDown == Z_TRIG) {
|
||||
state = s2;
|
||||
s1 = s2;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (kDown == U_JPAD) {
|
||||
state = 2;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (kDown == D_CBUTTONS) {
|
||||
state = 3;
|
||||
s1 = s2;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (kDown == U_CBUTTONS) {
|
||||
state = 4;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (kDown == D_JPAD) {
|
||||
state = 5;
|
||||
s1 = s2;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (kDown == L_JPAD) {
|
||||
state = 6;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (kDown == L_CBUTTONS) {
|
||||
state = 7;
|
||||
s1 = s2;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (kDown == R_CBUTTONS) {
|
||||
state = 8;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (kDown == R_JPAD) {
|
||||
state = 9;
|
||||
s1 = s2;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (kDown == (A_BUTTON | B_BUTTON)) {
|
||||
state = 10;
|
||||
} else if (kDown == A_BUTTON) {
|
||||
state = 0x5B;
|
||||
} else if (kDown == B_BUTTON) {
|
||||
state = 0x5C;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 0x5B:
|
||||
if (kDown == B_BUTTON) {
|
||||
state = 10;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 0x5C:
|
||||
if (kDown == A_BUTTON) {
|
||||
state = 10;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if (kDown == START_BUTTON) {
|
||||
state = 11;
|
||||
} else {
|
||||
state = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
osWritebackDCacheAll();
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_WaitForButtonCombo.s")
|
||||
#endif
|
||||
|
||||
void Fault_DrawMemDumpPage(const char* title, u32* addr, u32 param_3) {
|
||||
u32* alignedAddr;
|
||||
|
@ -555,15 +720,15 @@ void Fault_DrawMemDumpPage(const char* title, u32* addr, u32 param_3) {
|
|||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// saved register and stack usage differences
|
||||
// possibly some minor ordering and regalloc differences
|
||||
// regalloc differences
|
||||
void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
||||
Input* curInput = &sFaultStructPtr->padInput;
|
||||
u32 addr = pc;
|
||||
s32 count;
|
||||
s32 off;
|
||||
u32 count;
|
||||
u32 off;
|
||||
|
||||
while (true) {
|
||||
do {
|
||||
count = 0;
|
||||
if (addr < 0x80000000) {
|
||||
addr = 0x80000000;
|
||||
}
|
||||
|
@ -593,11 +758,7 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
|||
Fault_UpdatePadImpl();
|
||||
} while (curInput->press.in.button == 0);
|
||||
|
||||
if (CHECK_PAD(curInput->press, START_BUTTON)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CHECK_PAD(curInput->cur, A_BUTTON)) {
|
||||
if (CHECK_PAD(curInput->press, START_BUTTON) || CHECK_PAD(curInput->cur, A_BUTTON)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -626,10 +787,7 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
|||
if (CHECK_PAD(curInput->cur, R_CBUTTONS)) {
|
||||
addr = unk1;
|
||||
}
|
||||
if (CHECK_PAD(curInput->cur, L_TRIG)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (!CHECK_PAD(curInput->cur, L_TRIG));
|
||||
|
||||
sFaultStructPtr->faultActive = true;
|
||||
}
|
||||
|
@ -637,11 +795,106 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
|||
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_DrawMemDump.s")
|
||||
#endif
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/func_800D59F8.s")
|
||||
void Fault_WalkStack(u32* spPtr, u32* pcPtr, u32* raPtr) {
|
||||
u32 sp = *spPtr;
|
||||
u32 pc = *pcPtr;
|
||||
u32 ra = *raPtr;
|
||||
s32 count = 0x10000;
|
||||
u32 lastOpc;
|
||||
u32 opc;
|
||||
u16 opcHi;
|
||||
s16 opcLo;
|
||||
u32 imm;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_DrawStackTrace.s")
|
||||
if (sp & 3 || sp < 0x80000000 || sp >= 0xA0000000 || ra & 3 || ra < 0x80000000 || ra >= 0xA0000000) {
|
||||
*spPtr = 0;
|
||||
*pcPtr = 0;
|
||||
*raPtr = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_LogStackTrace.s")
|
||||
if (pc & 3 || pc < 0x80000000 || pc >= 0xA0000000) {
|
||||
*pcPtr = ra;
|
||||
return;
|
||||
}
|
||||
|
||||
lastOpc = 0;
|
||||
while (true) {
|
||||
opc = HW_REG(pc, u32);
|
||||
opcHi = opc >> 16;
|
||||
opcLo = opc & 0xFFFF;
|
||||
imm = opcLo;
|
||||
if (opcHi == 0x8FBF) {
|
||||
ra = HW_REG(sp + imm, u32);
|
||||
} else if (opcHi == 0x27BD) {
|
||||
sp += imm;
|
||||
} else if (opc == 0x42000018) {
|
||||
sp = 0;
|
||||
pc = 0;
|
||||
ra = 0;
|
||||
goto end;
|
||||
}
|
||||
if (lastOpc == 0x3E00008) {
|
||||
pc = ra;
|
||||
goto end;
|
||||
} else if (lastOpc >> 26 == 2) {
|
||||
pc = pc >> 28 << 28 | lastOpc << 6 >> 4;
|
||||
goto end;
|
||||
}
|
||||
lastOpc = opc;
|
||||
pc += 4;
|
||||
if (count == 0) {
|
||||
break;
|
||||
}
|
||||
count--;
|
||||
}
|
||||
sp = 0;
|
||||
pc = 0;
|
||||
ra = 0;
|
||||
|
||||
end:
|
||||
*spPtr = sp;
|
||||
*pcPtr = pc;
|
||||
*raPtr = ra;
|
||||
}
|
||||
|
||||
void Fault_DrawStackTrace(OSThread* thread, s32 x, s32 y, s32 height) {
|
||||
s32 line;
|
||||
u32 sp = thread->context.sp;
|
||||
u32 ra = thread->context.ra;
|
||||
u32 pc = thread->context.pc;
|
||||
u32 addr;
|
||||
|
||||
FaultDrawer_DrawText(x, y, "SP PC (VPC)");
|
||||
for (line = 1; line < height && (ra != 0 || sp != 0) && pc != (u32)__osCleanupThread; line++) {
|
||||
FaultDrawer_DrawText(x, y + line * 8, "%08x %08x", sp, pc);
|
||||
addr = Fault_ConvertAddress(pc);
|
||||
if (addr != 0) {
|
||||
FaultDrawer_Printf(" -> %08x", addr);
|
||||
}
|
||||
Fault_WalkStack(&sp, &pc, &ra);
|
||||
}
|
||||
}
|
||||
|
||||
void Fault_LogStackTrace(OSThread* thread, s32 height) {
|
||||
s32 line;
|
||||
u32 sp = thread->context.sp;
|
||||
u32 ra = thread->context.ra;
|
||||
u32 pc = thread->context.pc;
|
||||
u32 addr;
|
||||
u32 pad;
|
||||
|
||||
osSyncPrintf("STACK TRACE\nSP PC (VPC)\n");
|
||||
for (line = 1; line < height && (ra != 0 || sp != 0) && pc != (u32)__osCleanupThread; line++) {
|
||||
osSyncPrintf("%08x %08x", sp, pc);
|
||||
addr = Fault_ConvertAddress(pc);
|
||||
if (addr != 0) {
|
||||
osSyncPrintf(" -> %08x", addr);
|
||||
}
|
||||
osSyncPrintf("\n");
|
||||
Fault_WalkStack(&sp, &pc, &ra);
|
||||
}
|
||||
}
|
||||
|
||||
void Fault_ResumeThread(OSThread* t) {
|
||||
t->context.cause = 0;
|
||||
|
@ -677,8 +930,8 @@ void Fault_ProcessClients(void) {
|
|||
FaultClient* iter = sFaultStructPtr->clients;
|
||||
s32 idx = 0;
|
||||
|
||||
while (iter) {
|
||||
if (iter->callback) {
|
||||
while (iter != NULL) {
|
||||
if (iter->callback != 0) {
|
||||
Fault_FillScreenBlack();
|
||||
FaultDrawer_SetCharPad(-2, 0);
|
||||
FaultDrawer_Printf("\x1a"
|
||||
|
@ -699,11 +952,10 @@ void Fault_UpdatePad() {
|
|||
Fault_UpdatePadImpl();
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// saved register and stack usage differences
|
||||
void Fault_ThreadEntry(void* arg) {
|
||||
OSThread* faultedThread;
|
||||
OSMesg msg;
|
||||
OSThread* faultedThread;
|
||||
u32 pad;
|
||||
|
||||
osSetEventMesg(OS_EVENT_CPU_BREAK, &sFaultStructPtr->queue, 1);
|
||||
osSetEventMesg(OS_EVENT_FAULT, &sFaultStructPtr->queue, 2);
|
||||
|
@ -781,9 +1033,6 @@ void Fault_ThreadEntry(void* arg) {
|
|||
Fault_ResumeThread(faultedThread);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_ThreadEntry.s")
|
||||
#endif
|
||||
|
||||
void Fault_SetFB(void* fb, u16 w, u16 h) {
|
||||
sFaultStructPtr->fb = fb;
|
||||
|
|
|
@ -15,11 +15,9 @@ VisMono sMonoColors;
|
|||
unk_80166528 D_80166528;
|
||||
FaultClient sGameFaultClient;
|
||||
u16 sLastButtonPressed;
|
||||
char sBtnChars[] = {
|
||||
'A', 'B', 'Z', 'S', 'u', 'l', 'd', 'r', '*', '+', 'L', 'R', 'u', 'd', 'l', 'r', '\0',
|
||||
};
|
||||
|
||||
void GameState_FaultPrint(void) {
|
||||
static char sBtnChars[] = "ABZSuldr*+LRudlr";
|
||||
s32 i;
|
||||
|
||||
osSyncPrintf("last_button=%04x\n", sLastButtonPressed);
|
||||
|
@ -116,8 +114,6 @@ void func_800C4344(GameState* gameState) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc differences
|
||||
void GameState_DrawInputDisplay(u16 input, Gfx** gfx) {
|
||||
static const u16 sInpDispBtnColors[] = {
|
||||
GPACK_RGBA5551(255, 255, 0, 1), GPACK_RGBA5551(255, 255, 0, 1), GPACK_RGBA5551(255, 255, 0, 1),
|
||||
|
@ -138,19 +134,16 @@ void GameState_DrawInputDisplay(u16 input, Gfx** gfx) {
|
|||
|
||||
for (i = 0; i < 16; i++) {
|
||||
j = i;
|
||||
k = i + 1;
|
||||
if (input & (1 << i)) {
|
||||
gDPSetFillColor(gfxP++, (sInpDispBtnColors[i] << 0x10) | sInpDispBtnColors[i]);
|
||||
k = i + 1;
|
||||
gDPFillRectangle(gfxP++, (j * 4) + 226, 220, (k * 4) + 225, 223);
|
||||
gDPPipeSync(gfxP++);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
*gfx = gfxP;
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/game/GameState_DrawInputDisplay.s")
|
||||
#endif
|
||||
|
||||
void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
|
||||
Gfx* newDList;
|
||||
|
@ -246,8 +239,6 @@ void GameState_ReqPadData(GameState* gameState) {
|
|||
PadMgr_RequestPadData(&gPadMgr, &gameState->input, 1);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc differences and additional redundant instructions
|
||||
void GameState_Update(GameState* gameState) {
|
||||
GraphicsContext* gfxCtx = gameState->gfxCtx;
|
||||
|
||||
|
@ -257,7 +248,7 @@ void GameState_Update(GameState* gameState) {
|
|||
|
||||
func_800C4344(gameState);
|
||||
|
||||
if (SREG(63) == 1) {
|
||||
if (SREG(63) == 1u) {
|
||||
if (SREG(48) < 0) {
|
||||
SREG(48) = 0;
|
||||
gfxCtx->viMode = &gViConfigMode;
|
||||
|
@ -276,22 +267,22 @@ void GameState_Update(GameState* gameState) {
|
|||
gfxCtx->viFeatures = gViConfigFeatures;
|
||||
gfxCtx->xScale = gViConfigXScale;
|
||||
gfxCtx->yScale = gViConfigYScale;
|
||||
if (SREG(63) == 6 || (SREG(63) == 2 && osTvType == 1)) {
|
||||
if (SREG(63) == 6 || (SREG(63) == 2u && osTvType == 1)) {
|
||||
gfxCtx->viMode = &osViModeNtscLan1;
|
||||
gfxCtx->yScale = 1.0f;
|
||||
}
|
||||
|
||||
if (SREG(63) == 5 || (SREG(63) == 2 && osTvType == 2)) {
|
||||
if (SREG(63) == 5 || (SREG(63) == 2u && osTvType == 2)) {
|
||||
gfxCtx->viMode = &osViModeMpalLan1;
|
||||
gfxCtx->yScale = 1.0f;
|
||||
}
|
||||
|
||||
if (SREG(63) == 4 || (SREG(63) == 2 && osTvType == 0)) {
|
||||
if (SREG(63) == 4 || (SREG(63) == 2u && osTvType == 0)) {
|
||||
gfxCtx->viMode = &osViModePalLan1;
|
||||
gfxCtx->yScale = 1.0f;
|
||||
}
|
||||
|
||||
if (SREG(63) == 3 || (SREG(63) == 2 && osTvType == 0)) {
|
||||
if (SREG(63) == 3 || (SREG(63) == 2u && osTvType == 0)) {
|
||||
gfxCtx->viMode = &osViModeFpalLan1;
|
||||
gfxCtx->yScale = 0.833f;
|
||||
}
|
||||
|
@ -324,16 +315,13 @@ void GameState_Update(GameState* gameState) {
|
|||
}
|
||||
}
|
||||
|
||||
if (R_PAUSE_MENU_MODE != 2) {
|
||||
if (R_PAUSE_MENU_MODE != 2u) {
|
||||
GameState_Draw(gameState, gfxCtx);
|
||||
func_800C49F4(gfxCtx);
|
||||
}
|
||||
|
||||
gameState->frames++;
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/game/GameState_Update.s")
|
||||
#endif
|
||||
|
||||
void GameState_InitArena(GameState* gameState, size_t size) {
|
||||
void* arena;
|
||||
|
@ -353,10 +341,8 @@ void GameState_InitArena(GameState* gameState, size_t size) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// stack
|
||||
void GameState_Realloc(GameState* gameState, size_t size) {
|
||||
s32 pad;
|
||||
GameAlloc* alloc = &gameState->alloc;
|
||||
void* gameArena;
|
||||
u32 systemMaxFree;
|
||||
u32 systemFree;
|
||||
|
@ -365,7 +351,7 @@ void GameState_Realloc(GameState* gameState, size_t size) {
|
|||
|
||||
thaBufp = gameState->tha.bufp;
|
||||
THA_Dt(&gameState->tha);
|
||||
GameAlloc_Free(&gameState->alloc, thaBufp);
|
||||
GameAlloc_Free(alloc, thaBufp);
|
||||
// Hyrule temporarily released !!
|
||||
osSyncPrintf("ハイラル一時解放!!\n");
|
||||
SystemArena_GetSizes(&systemMaxFree, &systemFree, &systemAlloc);
|
||||
|
@ -382,7 +368,7 @@ void GameState_Realloc(GameState* gameState, size_t size) {
|
|||
|
||||
// Hyral reallocate size =% u bytes
|
||||
osSyncPrintf("ハイラル再確保 サイズ=%u バイト\n", size);
|
||||
gameArena = GameAlloc_MallocDebug(&gameState->alloc, size, "../game.c", 1033);
|
||||
gameArena = GameAlloc_MallocDebug(alloc, size, "../game.c", 1033);
|
||||
if (gameArena != NULL) {
|
||||
THA_Ct(&gameState->tha, gameArena, size);
|
||||
// Successful reacquisition of Hyrule
|
||||
|
@ -395,9 +381,6 @@ void GameState_Realloc(GameState* gameState, size_t size) {
|
|||
Fault_AddHungupAndCrash("../game.c", 1044);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/game/GameState_Realloc.s")
|
||||
#endif
|
||||
|
||||
void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx) {
|
||||
u64 startTime;
|
||||
|
|
Loading…
Reference in a new issue