mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-18 21:05:55 +00:00
Fix various non matching issues and introduce #ifdef NON_EQUIVALENT instead of #if 0 (#207)
This commit is contained in:
parent
031d946db7
commit
06fc61c83d
18 changed files with 297 additions and 1307 deletions
|
@ -1,255 +0,0 @@
|
|||
.rdata
|
||||
glabel D_80145AF0
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145AF8
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B0C
|
||||
.asciz "認識しました"
|
||||
# EUC-JP: 認識しました | Recognized
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B1C
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B20
|
||||
.asciz "../padmgr.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B2C
|
||||
.asciz "this->Key_switch[i] = %d\n"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B48
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B50
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B64
|
||||
.asciz "オーバーランエラーが発生"
|
||||
# EUC-JP: オーバーランエラーが発生 | Overrun error occurred
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B80
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B84
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145B8C
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_80145BA0
|
||||
.asciz "応答しません"
|
||||
# EUC-JP: 応答しません | Do not respond?
|
||||
.balign 4
|
||||
|
||||
glabel D_80145BB0
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145BB4
|
||||
.asciz "../padmgr.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145BC0
|
||||
.asciz "padnow1->errno = %x\n"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145BD8
|
||||
.asciz "../padmgr.c"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel PadMgr_ProcessInputs
|
||||
/* B3EB14 800C7974 27BDFFB0 */ addiu $sp, $sp, -0x50
|
||||
/* B3EB18 800C7978 AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* B3EB1C 800C797C AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B3EB20 800C7980 0080A025 */ move $s4, $a0
|
||||
/* B3EB24 800C7984 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B3EB28 800C7988 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B3EB2C 800C798C AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B3EB30 800C7990 0C031CEF */ jal PadMgr_LockPadData
|
||||
/* B3EB34 800C7994 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B3EB38 800C7998 928E02A9 */ lbu $t6, 0x2a9($s4)
|
||||
/* B3EB3C 800C799C 26900230 */ addiu $s0, $s4, 0x230
|
||||
/* B3EB40 800C79A0 26930290 */ addiu $s3, $s4, 0x290
|
||||
/* B3EB44 800C79A4 19C00091 */ blez $t6, .L800C7BEC
|
||||
/* B3EB48 800C79A8 00009025 */ move $s2, $zero
|
||||
.L800C79AC:
|
||||
/* B3EB4C 800C79AC 8A180000 */ lwl $t8, ($s0)
|
||||
/* B3EB50 800C79B0 9A180003 */ lwr $t8, 3($s0)
|
||||
/* B3EB54 800C79B4 26030006 */ addiu $v1, $s0, 6
|
||||
/* B3EB58 800C79B8 24010004 */ li $at, 4
|
||||
/* B3EB5C 800C79BC A8780000 */ swl $t8, ($v1)
|
||||
/* B3EB60 800C79C0 B8780003 */ swr $t8, 3($v1)
|
||||
/* B3EB64 800C79C4 96180004 */ lhu $t8, 4($s0)
|
||||
/* B3EB68 800C79C8 A4780004 */ sh $t8, 4($v1)
|
||||
/* B3EB6C 800C79CC 92620004 */ lbu $v0, 4($s3)
|
||||
/* B3EB70 800C79D0 50400008 */ beql $v0, $zero, .L800C79F4
|
||||
/* B3EB74 800C79D4 8A680000 */ lwl $t0, ($s3)
|
||||
/* B3EB78 800C79D8 1041001F */ beq $v0, $at, .L800C7A58
|
||||
/* B3EB7C 800C79DC 24010008 */ li $at, 8
|
||||
/* B3EB80 800C79E0 1041003D */ beq $v0, $at, .L800C7AD8
|
||||
/* B3EB84 800C79E4 3C048014 */ lui $a0, %hi(D_80145BB4) # $a0, 0x8014
|
||||
/* B3EB88 800C79E8 10000056 */ b .L800C7B44
|
||||
/* B3EB8C 800C79EC 24845BB4 */ addiu $a0, %lo(D_80145BB4) # addiu $a0, $a0, 0x5bb4
|
||||
/* B3EB90 800C79F0 8A680000 */ lwl $t0, ($s3)
|
||||
.L800C79F4:
|
||||
/* B3EB94 800C79F4 9A680003 */ lwr $t0, 3($s3)
|
||||
/* B3EB98 800C79F8 02921021 */ addu $v0, $s4, $s2
|
||||
/* B3EB9C 800C79FC 3C048014 */ lui $a0, %hi(D_80145AF0) # $a0, 0x8014
|
||||
/* B3EBA0 800C7A00 AA080000 */ swl $t0, ($s0)
|
||||
/* B3EBA4 800C7A04 BA080003 */ swr $t0, 3($s0)
|
||||
/* B3EBA8 800C7A08 96680004 */ lhu $t0, 4($s3)
|
||||
/* B3EBAC 800C7A0C 240A0001 */ li $t2, 1
|
||||
/* B3EBB0 800C7A10 24845AF0 */ addiu $a0, %lo(D_80145AF0) # addiu $a0, $a0, 0x5af0
|
||||
/* B3EBB4 800C7A14 A6080004 */ sh $t0, 4($s0)
|
||||
/* B3EBB8 800C7A18 904902AA */ lbu $t1, 0x2aa($v0)
|
||||
/* B3EBBC 800C7A1C 1520000C */ bnez $t1, .L800C7A50
|
||||
/* B3EBC0 800C7A20 00000000 */ nop
|
||||
/* B3EBC4 800C7A24 0C00084C */ jal osSyncPrintf
|
||||
/* B3EBC8 800C7A28 A04A02AA */ sb $t2, 0x2aa($v0)
|
||||
/* B3EBCC 800C7A2C 3C048014 */ lui $a0, %hi(D_80145AF8) # $a0, 0x8014
|
||||
/* B3EBD0 800C7A30 3C068014 */ lui $a2, %hi(D_80145B0C) # $a2, 0x8014
|
||||
/* B3EBD4 800C7A34 24C65B0C */ addiu $a2, %lo(D_80145B0C) # addiu $a2, $a2, 0x5b0c
|
||||
/* B3EBD8 800C7A38 24845AF8 */ addiu $a0, %lo(D_80145AF8) # addiu $a0, $a0, 0x5af8
|
||||
/* B3EBDC 800C7A3C 0C00084C */ jal osSyncPrintf
|
||||
/* B3EBE0 800C7A40 26450001 */ addiu $a1, $s2, 1
|
||||
/* B3EBE4 800C7A44 3C048014 */ lui $a0, %hi(D_80145B1C) # $a0, 0x8014
|
||||
/* B3EBE8 800C7A48 0C00084C */ jal osSyncPrintf
|
||||
/* B3EBEC 800C7A4C 24845B1C */ addiu $a0, %lo(D_80145B1C) # addiu $a0, $a0, 0x5b1c
|
||||
.L800C7A50:
|
||||
/* B3EBF0 800C7A50 10000047 */ b .L800C7B70
|
||||
/* B3EBF4 800C7A54 26510001 */ addiu $s1, $s2, 1
|
||||
.L800C7A58:
|
||||
/* B3EBF8 800C7A58 886C0000 */ lwl $t4, ($v1)
|
||||
/* B3EBFC 800C7A5C 986C0003 */ lwr $t4, 3($v1)
|
||||
/* B3EC00 800C7A60 02921021 */ addu $v0, $s4, $s2
|
||||
/* B3EC04 800C7A64 3C048014 */ lui $a0, %hi(D_80145B20) # $a0, 0x8014
|
||||
/* B3EC08 800C7A68 AA0C0000 */ swl $t4, ($s0)
|
||||
/* B3EC0C 800C7A6C BA0C0003 */ swr $t4, 3($s0)
|
||||
/* B3EC10 800C7A70 946C0004 */ lhu $t4, 4($v1)
|
||||
/* B3EC14 800C7A74 24845B20 */ addiu $a0, %lo(D_80145B20) # addiu $a0, $a0, 0x5b20
|
||||
/* B3EC18 800C7A78 2405017C */ li $a1, 380
|
||||
/* B3EC1C 800C7A7C A60C0004 */ sh $t4, 4($s0)
|
||||
/* B3EC20 800C7A80 0C000B84 */ jal LogUtils_LogThreadId
|
||||
/* B3EC24 800C7A84 AFA20034 */ sw $v0, 0x34($sp)
|
||||
/* B3EC28 800C7A88 8FA20034 */ lw $v0, 0x34($sp)
|
||||
/* B3EC2C 800C7A8C 3C048014 */ lui $a0, %hi(D_80145B2C) # $a0, 0x8014
|
||||
/* B3EC30 800C7A90 24845B2C */ addiu $a0, %lo(D_80145B2C) # addiu $a0, $a0, 0x5b2c
|
||||
/* B3EC34 800C7A94 0C00084C */ jal osSyncPrintf
|
||||
/* B3EC38 800C7A98 904502AA */ lbu $a1, 0x2aa($v0)
|
||||
/* B3EC3C 800C7A9C 3C048014 */ lui $a0, %hi(D_80145B48) # $a0, 0x8014
|
||||
/* B3EC40 800C7AA0 0C00084C */ jal osSyncPrintf
|
||||
/* B3EC44 800C7AA4 24845B48 */ addiu $a0, %lo(D_80145B48) # addiu $a0, $a0, 0x5b48
|
||||
/* B3EC48 800C7AA8 3C048014 */ lui $a0, %hi(D_80145B50) # $a0, 0x8014
|
||||
/* B3EC4C 800C7AAC 26510001 */ addiu $s1, $s2, 1
|
||||
/* B3EC50 800C7AB0 3C068014 */ lui $a2, %hi(D_80145B64) # $a2, 0x8014
|
||||
/* B3EC54 800C7AB4 24C65B64 */ addiu $a2, %lo(D_80145B64) # addiu $a2, $a2, 0x5b64
|
||||
/* B3EC58 800C7AB8 02202825 */ move $a1, $s1
|
||||
/* B3EC5C 800C7ABC 0C00084C */ jal osSyncPrintf
|
||||
/* B3EC60 800C7AC0 24845B50 */ addiu $a0, %lo(D_80145B50) # addiu $a0, $a0, 0x5b50
|
||||
/* B3EC64 800C7AC4 3C048014 */ lui $a0, %hi(D_80145B80) # $a0, 0x8014
|
||||
/* B3EC68 800C7AC8 0C00084C */ jal osSyncPrintf
|
||||
/* B3EC6C 800C7ACC 24845B80 */ addiu $a0, %lo(D_80145B80) # addiu $a0, $a0, 0x5b80
|
||||
/* B3EC70 800C7AD0 10000028 */ b .L800C7B74
|
||||
/* B3EC74 800C7AD4 96030006 */ lhu $v1, 6($s0)
|
||||
.L800C7AD8:
|
||||
/* B3EC78 800C7AD8 A6000000 */ sh $zero, ($s0)
|
||||
/* B3EC7C 800C7ADC A2000002 */ sb $zero, 2($s0)
|
||||
/* B3EC80 800C7AE0 A2000003 */ sb $zero, 3($s0)
|
||||
/* B3EC84 800C7AE4 926D0004 */ lbu $t5, 4($s3)
|
||||
/* B3EC88 800C7AE8 02921021 */ addu $v0, $s4, $s2
|
||||
/* B3EC8C 800C7AEC 3C048014 */ lui $a0, %hi(D_80145B84) # $a0, 0x8014
|
||||
/* B3EC90 800C7AF0 A20D0004 */ sb $t5, 4($s0)
|
||||
/* B3EC94 800C7AF4 904E02AA */ lbu $t6, 0x2aa($v0)
|
||||
/* B3EC98 800C7AF8 240F00FF */ li $t7, 255
|
||||
/* B3EC9C 800C7AFC 24845B84 */ addiu $a0, %lo(D_80145B84) # addiu $a0, $a0, 0x5b84
|
||||
/* B3ECA0 800C7B00 11C0000E */ beqz $t6, .L800C7B3C
|
||||
/* B3ECA4 800C7B04 00000000 */ nop
|
||||
/* B3ECA8 800C7B08 A04002AA */ sb $zero, 0x2aa($v0)
|
||||
/* B3ECAC 800C7B0C A04002AE */ sb $zero, 0x2ae($v0)
|
||||
/* B3ECB0 800C7B10 0C00084C */ jal osSyncPrintf
|
||||
/* B3ECB4 800C7B14 A04F02B6 */ sb $t7, 0x2b6($v0)
|
||||
/* B3ECB8 800C7B18 3C048014 */ lui $a0, %hi(D_80145B8C) # $a0, 0x8014
|
||||
/* B3ECBC 800C7B1C 3C068014 */ lui $a2, %hi(D_80145BA0) # $a2, 0x8014
|
||||
/* B3ECC0 800C7B20 24C65BA0 */ addiu $a2, %lo(D_80145BA0) # addiu $a2, $a2, 0x5ba0
|
||||
/* B3ECC4 800C7B24 24845B8C */ addiu $a0, %lo(D_80145B8C) # addiu $a0, $a0, 0x5b8c
|
||||
/* B3ECC8 800C7B28 0C00084C */ jal osSyncPrintf
|
||||
/* B3ECCC 800C7B2C 26450001 */ addiu $a1, $s2, 1
|
||||
/* B3ECD0 800C7B30 3C048014 */ lui $a0, %hi(D_80145BB0) # $a0, 0x8014
|
||||
/* B3ECD4 800C7B34 0C00084C */ jal osSyncPrintf
|
||||
/* B3ECD8 800C7B38 24845BB0 */ addiu $a0, %lo(D_80145BB0) # addiu $a0, $a0, 0x5bb0
|
||||
.L800C7B3C:
|
||||
/* B3ECDC 800C7B3C 1000000C */ b .L800C7B70
|
||||
/* B3ECE0 800C7B40 26510001 */ addiu $s1, $s2, 1
|
||||
.L800C7B44:
|
||||
/* B3ECE4 800C7B44 0C000B84 */ jal LogUtils_LogThreadId
|
||||
/* B3ECE8 800C7B48 2405018C */ li $a1, 396
|
||||
/* B3ECEC 800C7B4C 3C048014 */ lui $a0, %hi(D_80145BC0) # $a0, 0x8014
|
||||
/* B3ECF0 800C7B50 24845BC0 */ addiu $a0, %lo(D_80145BC0) # addiu $a0, $a0, 0x5bc0
|
||||
/* B3ECF4 800C7B54 0C00084C */ jal osSyncPrintf
|
||||
/* B3ECF8 800C7B58 92650004 */ lbu $a1, 4($s3)
|
||||
/* B3ECFC 800C7B5C 3C048014 */ lui $a0, %hi(D_80145BD8) # $a0, 0x8014
|
||||
/* B3ED00 800C7B60 24845BD8 */ addiu $a0, %lo(D_80145BD8) # addiu $a0, $a0, 0x5bd8
|
||||
/* B3ED04 800C7B64 0C0359C3 */ jal Fault_AddHungupAndCrash
|
||||
/* B3ED08 800C7B68 2405018D */ li $a1, 397
|
||||
/* B3ED0C 800C7B6C 26510001 */ addiu $s1, $s2, 1
|
||||
.L800C7B70:
|
||||
/* B3ED10 800C7B70 96030006 */ lhu $v1, 6($s0)
|
||||
.L800C7B74:
|
||||
/* B3ED14 800C7B74 96050000 */ lhu $a1, ($s0)
|
||||
/* B3ED18 800C7B78 9618000C */ lhu $t8, 0xc($s0)
|
||||
/* B3ED1C 800C7B7C 960A0012 */ lhu $t2, 0x12($s0)
|
||||
/* B3ED20 800C7B80 00651026 */ xor $v0, $v1, $a1
|
||||
/* B3ED24 800C7B84 00436024 */ and $t4, $v0, $v1
|
||||
/* B3ED28 800C7B88 00454024 */ and $t0, $v0, $a1
|
||||
/* B3ED2C 800C7B8C 03084825 */ or $t1, $t8, $t0
|
||||
/* B3ED30 800C7B90 014C6825 */ or $t5, $t2, $t4
|
||||
/* B3ED34 800C7B94 A609000C */ sh $t1, 0xc($s0)
|
||||
/* B3ED38 800C7B98 A60D0012 */ sh $t5, 0x12($s0)
|
||||
/* B3ED3C 800C7B9C 0C03F31B */ jal PadUtils_UpdateRelXY
|
||||
/* B3ED40 800C7BA0 02002025 */ move $a0, $s0
|
||||
/* B3ED44 800C7BA4 820E0002 */ lb $t6, 2($s0)
|
||||
/* B3ED48 800C7BA8 820F0008 */ lb $t7, 8($s0)
|
||||
/* B3ED4C 800C7BAC 820A0003 */ lb $t2, 3($s0)
|
||||
/* B3ED50 800C7BB0 820C0009 */ lb $t4, 9($s0)
|
||||
/* B3ED54 800C7BB4 8209000E */ lb $t1, 0xe($s0)
|
||||
/* B3ED58 800C7BB8 8219000F */ lb $t9, 0xf($s0)
|
||||
/* B3ED5C 800C7BBC 01CF4023 */ subu $t0, $t6, $t7
|
||||
/* B3ED60 800C7BC0 014C7823 */ subu $t7, $t2, $t4
|
||||
/* B3ED64 800C7BC4 01285821 */ addu $t3, $t1, $t0
|
||||
/* B3ED68 800C7BC8 032FC021 */ addu $t8, $t9, $t7
|
||||
/* B3ED6C 800C7BCC A20B000E */ sb $t3, 0xe($s0)
|
||||
/* B3ED70 800C7BD0 A218000F */ sb $t8, 0xf($s0)
|
||||
/* B3ED74 800C7BD4 928902A9 */ lbu $t1, 0x2a9($s4)
|
||||
/* B3ED78 800C7BD8 02209025 */ move $s2, $s1
|
||||
/* B3ED7C 800C7BDC 26100018 */ addiu $s0, $s0, 0x18
|
||||
/* B3ED80 800C7BE0 0229082A */ slt $at, $s1, $t1
|
||||
/* B3ED84 800C7BE4 1420FF71 */ bnez $at, .L800C79AC
|
||||
/* B3ED88 800C7BE8 26730006 */ addiu $s3, $s3, 6
|
||||
.L800C7BEC:
|
||||
/* B3ED8C 800C7BEC 0C031CF9 */ jal PadMgr_UnlockPadData
|
||||
/* B3ED90 800C7BF0 02802025 */ move $a0, $s4
|
||||
/* B3ED94 800C7BF4 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* B3ED98 800C7BF8 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B3ED9C 800C7BFC 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B3EDA0 800C7C00 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B3EDA4 800C7C04 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B3EDA8 800C7C08 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B3EDAC 800C7C0C 03E00008 */ jr $ra
|
||||
/* B3EDB0 800C7C10 27BD0050 */ addiu $sp, $sp, 0x50
|
|
@ -1,98 +0,0 @@
|
|||
glabel PadMgr_RequestPadData
|
||||
/* B3EFA8 800C7E08 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* B3EFAC 800C7E0C AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* B3EFB0 800C7E10 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B3EFB4 800C7E14 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B3EFB8 800C7E18 00A09825 */ move $s3, $a1
|
||||
/* B3EFBC 800C7E1C 00C0A025 */ move $s4, $a2
|
||||
/* B3EFC0 800C7E20 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B3EFC4 800C7E24 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B3EFC8 800C7E28 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B3EFCC 800C7E2C 0C031CEF */ jal PadMgr_LockPadData
|
||||
/* B3EFD0 800C7E30 AFA40030 */ sw $a0, 0x30($sp)
|
||||
/* B3EFD4 800C7E34 8FB10030 */ lw $s1, 0x30($sp)
|
||||
/* B3EFD8 800C7E38 02608025 */ move $s0, $s3
|
||||
/* B3EFDC 800C7E3C 24130004 */ li $s3, 4
|
||||
/* B3EFE0 800C7E40 00009025 */ move $s2, $zero
|
||||
/* B3EFE4 800C7E44 26310230 */ addiu $s1, $s1, 0x230
|
||||
.L800C7E48:
|
||||
/* B3EFE8 800C7E48 5280001F */ beql $s4, $zero, .L800C7EC8
|
||||
/* B3EFEC 800C7E4C 8A190000 */ lwl $t9, ($s0)
|
||||
/* B3EFF0 800C7E50 8A2F0000 */ lwl $t7, ($s1)
|
||||
/* B3EFF4 800C7E54 9A2F0003 */ lwr $t7, 3($s1)
|
||||
/* B3EFF8 800C7E58 AA0F0000 */ swl $t7, ($s0)
|
||||
/* B3EFFC 800C7E5C BA0F0003 */ swr $t7, 3($s0)
|
||||
/* B3F000 800C7E60 8A2E0004 */ lwl $t6, 4($s1)
|
||||
/* B3F004 800C7E64 9A2E0007 */ lwr $t6, 7($s1)
|
||||
/* B3F008 800C7E68 AA0E0004 */ swl $t6, 4($s0)
|
||||
/* B3F00C 800C7E6C BA0E0007 */ swr $t6, 7($s0)
|
||||
/* B3F010 800C7E70 8A2F0008 */ lwl $t7, 8($s1)
|
||||
/* B3F014 800C7E74 9A2F000B */ lwr $t7, 0xb($s1)
|
||||
/* B3F018 800C7E78 AA0F0008 */ swl $t7, 8($s0)
|
||||
/* B3F01C 800C7E7C BA0F000B */ swr $t7, 0xb($s0)
|
||||
/* B3F020 800C7E80 8A2E000C */ lwl $t6, 0xc($s1)
|
||||
/* B3F024 800C7E84 9A2E000F */ lwr $t6, 0xf($s1)
|
||||
/* B3F028 800C7E88 AA0E000C */ swl $t6, 0xc($s0)
|
||||
/* B3F02C 800C7E8C BA0E000F */ swr $t6, 0xf($s0)
|
||||
/* B3F030 800C7E90 8A2F0010 */ lwl $t7, 0x10($s1)
|
||||
/* B3F034 800C7E94 9A2F0013 */ lwr $t7, 0x13($s1)
|
||||
/* B3F038 800C7E98 AA0F0010 */ swl $t7, 0x10($s0)
|
||||
/* B3F03C 800C7E9C BA0F0013 */ swr $t7, 0x13($s0)
|
||||
/* B3F040 800C7EA0 8A2E0014 */ lwl $t6, 0x14($s1)
|
||||
/* B3F044 800C7EA4 9A2E0017 */ lwr $t6, 0x17($s1)
|
||||
/* B3F048 800C7EA8 AA0E0014 */ swl $t6, 0x14($s0)
|
||||
/* B3F04C 800C7EAC BA0E0017 */ swr $t6, 0x17($s0)
|
||||
/* B3F050 800C7EB0 A620000C */ sh $zero, 0xc($s1)
|
||||
/* B3F054 800C7EB4 A220000E */ sb $zero, 0xe($s1)
|
||||
/* B3F058 800C7EB8 A220000F */ sb $zero, 0xf($s1)
|
||||
/* B3F05C 800C7EBC 10000022 */ b .L800C7F48
|
||||
/* B3F060 800C7EC0 A6200012 */ sh $zero, 0x12($s1)
|
||||
/* B3F064 800C7EC4 8A190000 */ lwl $t9, ($s0)
|
||||
.L800C7EC8:
|
||||
/* B3F068 800C7EC8 9A190003 */ lwr $t9, 3($s0)
|
||||
/* B3F06C 800C7ECC 02002025 */ move $a0, $s0
|
||||
/* B3F070 800C7ED0 AA190006 */ swl $t9, 6($s0)
|
||||
/* B3F074 800C7ED4 BA190009 */ swr $t9, 9($s0)
|
||||
/* B3F078 800C7ED8 96190004 */ lhu $t9, 4($s0)
|
||||
/* B3F07C 800C7EDC 96030006 */ lhu $v1, 6($s0)
|
||||
/* B3F080 800C7EE0 A619000A */ sh $t9, 0xa($s0)
|
||||
/* B3F084 800C7EE4 8A290000 */ lwl $t1, ($s1)
|
||||
/* B3F088 800C7EE8 9A290003 */ lwr $t1, 3($s1)
|
||||
/* B3F08C 800C7EEC AA090000 */ swl $t1, ($s0)
|
||||
/* B3F090 800C7EF0 BA090003 */ swr $t1, 3($s0)
|
||||
/* B3F094 800C7EF4 96050000 */ lhu $a1, ($s0)
|
||||
/* B3F098 800C7EF8 96290004 */ lhu $t1, 4($s1)
|
||||
/* B3F09C 800C7EFC 00651026 */ xor $v0, $v1, $a1
|
||||
/* B3F0A0 800C7F00 00625824 */ and $t3, $v1, $v0
|
||||
/* B3F0A4 800C7F04 00A25024 */ and $t2, $a1, $v0
|
||||
/* B3F0A8 800C7F08 A60A000C */ sh $t2, 0xc($s0)
|
||||
/* B3F0AC 800C7F0C A60B0012 */ sh $t3, 0x12($s0)
|
||||
/* B3F0B0 800C7F10 0C03F31B */ jal PadUtils_UpdateRelXY
|
||||
/* B3F0B4 800C7F14 A6090004 */ sh $t1, 4($s0)
|
||||
/* B3F0B8 800C7F18 820C0002 */ lb $t4, 2($s0)
|
||||
/* B3F0BC 800C7F1C 820D0008 */ lb $t5, 8($s0)
|
||||
/* B3F0C0 800C7F20 82090003 */ lb $t1, 3($s0)
|
||||
/* B3F0C4 800C7F24 820A0009 */ lb $t2, 9($s0)
|
||||
/* B3F0C8 800C7F28 8219000E */ lb $t9, 0xe($s0)
|
||||
/* B3F0CC 800C7F2C 820E000F */ lb $t6, 0xf($s0)
|
||||
/* B3F0D0 800C7F30 018DC023 */ subu $t8, $t4, $t5
|
||||
/* B3F0D4 800C7F34 012A6823 */ subu $t5, $t1, $t2
|
||||
/* B3F0D8 800C7F38 03384021 */ addu $t0, $t9, $t8
|
||||
/* B3F0DC 800C7F3C 01CD7821 */ addu $t7, $t6, $t5
|
||||
/* B3F0E0 800C7F40 A208000E */ sb $t0, 0xe($s0)
|
||||
/* B3F0E4 800C7F44 A20F000F */ sb $t7, 0xf($s0)
|
||||
.L800C7F48:
|
||||
/* B3F0E8 800C7F48 26520001 */ addiu $s2, $s2, 1
|
||||
/* B3F0EC 800C7F4C 26310018 */ addiu $s1, $s1, 0x18
|
||||
/* B3F0F0 800C7F50 1653FFBD */ bne $s2, $s3, .L800C7E48
|
||||
/* B3F0F4 800C7F54 26100018 */ addiu $s0, $s0, 0x18
|
||||
/* B3F0F8 800C7F58 0C031CF9 */ jal PadMgr_UnlockPadData
|
||||
/* B3F0FC 800C7F5C 8FA40030 */ lw $a0, 0x30($sp)
|
||||
/* B3F100 800C7F60 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* B3F104 800C7F64 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B3F108 800C7F68 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B3F10C 800C7F6C 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B3F110 800C7F70 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B3F114 800C7F74 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B3F118 800C7F78 03E00008 */ jr $ra
|
||||
/* B3F11C 800C7F7C 27BD0030 */ addiu $sp, $sp, 0x30
|
|
@ -1,425 +0,0 @@
|
|||
.rdata
|
||||
glabel D_80145894
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_8014589C
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_801458B0
|
||||
.asciz "振動パック ぶるぶるぶるぶる"
|
||||
# EUC-JP: 振動パック ぶるぶるぶるぶる | Vibration pack jumble jumble?
|
||||
.balign 4
|
||||
|
||||
glabel D_801458CC
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_801458D0
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_801458D8
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_801458EC
|
||||
.asciz "振動パックで通信エラーが発生しました"
|
||||
# EUC-JP: 振動パックで通信エラーが発生しました | A communication error has occurred with the vibraton pack
|
||||
.balign 4
|
||||
|
||||
glabel D_80145914
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145918
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145920
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_80145934
|
||||
.asciz "振動パック 停止"
|
||||
# EUC-JP: 振動パック 停止 | Stop vibration pack
|
||||
.balign 4
|
||||
|
||||
glabel D_80145944
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145948
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145950
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_80145964
|
||||
.asciz "振動パックで通信エラーが発生しました"
|
||||
# EUC-JP: 振動パックで通信エラーが発生しました | A communication error has occurred with the vibration pack
|
||||
.balign 4
|
||||
|
||||
glabel D_8014598C
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145990
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145998
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_801459AC
|
||||
.asciz "振動パックが抜かれたようです"
|
||||
# EUC-JP: 振動パックが抜かれたようです | Vibration pack seems to be pulled out
|
||||
.balign 4
|
||||
|
||||
glabel D_801459CC
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_801459D0
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_801459D8
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_801459EC
|
||||
.asciz "振動パックではないコントローラパックが抜かれたようです"
|
||||
# EUC-JP: 振動パックではないコントローラパックが抜かれたようです | It seems that a controller pack that is not a vibration pack was pulled out
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A24
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A28
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A30
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A44
|
||||
.asciz "振動パックを認識しました"
|
||||
# EUC-JP: 振動パックを認識しました | Recognized vibration pack
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A60
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A64
|
||||
.asciz "../padmgr.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A70
|
||||
.asciz "++errcnt = %d\n"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A80
|
||||
.asciz "\x1b[33m"
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A88
|
||||
.asciz "padmgr: %dコン: %s\n"
|
||||
# EUC-JP: コン | 'Con'?
|
||||
.balign 4
|
||||
|
||||
glabel D_80145A9C
|
||||
.asciz "コントローラパックの通信エラー"
|
||||
# EUC-JP: コントローラパックの通信エラー | Controller pack communication error
|
||||
.balign 4
|
||||
|
||||
glabel D_80145ABC
|
||||
.asciz "\x1b[m"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
glabel PadMgr_RumbleControl
|
||||
/* B3E5AC 800C740C 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* B3E5B0 800C7410 AFBF0034 */ sw $ra, 0x34($sp)
|
||||
/* B3E5B4 800C7414 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B3E5B8 800C7418 0080A025 */ move $s4, $a0
|
||||
/* B3E5BC 800C741C AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* B3E5C0 800C7420 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* B3E5C4 800C7424 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B3E5C8 800C7428 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B3E5CC 800C742C AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B3E5D0 800C7430 0C031C94 */ jal PadMgr_LockSerialMesgQueue
|
||||
/* B3E5D4 800C7434 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B3E5D8 800C7438 AFA2003C */ sw $v0, 0x3c($sp)
|
||||
/* B3E5DC 800C743C 0000A825 */ move $s5, $zero
|
||||
/* B3E5E0 800C7440 00009825 */ move $s3, $zero
|
||||
/* B3E5E4 800C7444 02808825 */ move $s1, $s4
|
||||
/* B3E5E8 800C7448 24160001 */ li $s6, 1
|
||||
.L800C744C:
|
||||
/* B3E5EC 800C744C 922E02AA */ lbu $t6, 0x2aa($s1)
|
||||
/* B3E5F0 800C7450 00137880 */ sll $t7, $s3, 2
|
||||
/* B3E5F4 800C7454 028FC021 */ addu $t8, $s4, $t7
|
||||
/* B3E5F8 800C7458 51C00087 */ beql $t6, $zero, .L800C7678
|
||||
/* B3E5FC 800C745C 26730001 */ addiu $s3, $s3, 1
|
||||
/* B3E600 800C7460 93190002 */ lbu $t9, 2($t8)
|
||||
/* B3E604 800C7464 33280001 */ andi $t0, $t9, 1
|
||||
/* B3E608 800C7468 51000064 */ beql $t0, $zero, .L800C75FC
|
||||
/* B3E60C 800C746C 922202AE */ lbu $v0, 0x2ae($s1)
|
||||
/* B3E610 800C7470 922902AE */ lbu $t1, 0x2ae($s1)
|
||||
/* B3E614 800C7474 56C90080 */ bnel $s6, $t1, .L800C7678
|
||||
/* B3E618 800C7478 26730001 */ addiu $s3, $s3, 1
|
||||
/* B3E61C 800C747C 922A02B2 */ lbu $t2, 0x2b2($s1)
|
||||
/* B3E620 800C7480 51400030 */ beql $t2, $zero, .L800C7544
|
||||
/* B3E624 800C7484 922E02B6 */ lbu $t6, 0x2b6($s1)
|
||||
/* B3E628 800C7488 922B02B6 */ lbu $t3, 0x2b6($s1)
|
||||
/* B3E62C 800C748C 00136080 */ sll $t4, $s3, 2
|
||||
/* B3E630 800C7490 01936023 */ subu $t4, $t4, $s3
|
||||
/* B3E634 800C7494 29610003 */ slti $at, $t3, 3
|
||||
/* B3E638 800C7498 10200076 */ beqz $at, .L800C7674
|
||||
/* B3E63C 800C749C 000C6080 */ sll $t4, $t4, 2
|
||||
/* B3E640 800C74A0 01936021 */ addu $t4, $t4, $s3
|
||||
/* B3E644 800C74A4 000C60C0 */ sll $t4, $t4, 3
|
||||
/* B3E648 800C74A8 028C9021 */ addu $s2, $s4, $t4
|
||||
/* B3E64C 800C74AC 3C048014 */ lui $a0, %hi(D_80145894) # $a0, 0x8014
|
||||
/* B3E650 800C74B0 24845894 */ addiu $a0, %lo(D_80145894) # addiu $a0, $a0, 0x5894
|
||||
/* B3E654 800C74B4 265202BC */ addiu $s2, $s2, 0x2bc
|
||||
/* B3E658 800C74B8 0C00084C */ jal osSyncPrintf
|
||||
/* B3E65C 800C74BC 24150001 */ li $s5, 1
|
||||
/* B3E660 800C74C0 3C048014 */ lui $a0, %hi(D_8014589C) # $a0, 0x8014
|
||||
/* B3E664 800C74C4 26700001 */ addiu $s0, $s3, 1
|
||||
/* B3E668 800C74C8 3C068014 */ lui $a2, %hi(D_801458B0) # $a2, 0x8014
|
||||
/* B3E66C 800C74CC 24C658B0 */ addiu $a2, %lo(D_801458B0) # addiu $a2, $a2, 0x58b0
|
||||
/* B3E670 800C74D0 02002825 */ move $a1, $s0
|
||||
/* B3E674 800C74D4 0C00084C */ jal osSyncPrintf
|
||||
/* B3E678 800C74D8 2484589C */ addiu $a0, %lo(D_8014589C) # addiu $a0, $a0, 0x589c
|
||||
/* B3E67C 800C74DC 3C048014 */ lui $a0, %hi(D_801458CC) # $a0, 0x8014
|
||||
/* B3E680 800C74E0 0C00084C */ jal osSyncPrintf
|
||||
/* B3E684 800C74E4 248458CC */ addiu $a0, %lo(D_801458CC) # addiu $a0, $a0, 0x58cc
|
||||
/* B3E688 800C74E8 02402025 */ move $a0, $s2
|
||||
/* B3E68C 800C74EC 0C0401E0 */ jal osSetRumble
|
||||
/* B3E690 800C74F0 02C02825 */ move $a1, $s6
|
||||
/* B3E694 800C74F4 10400010 */ beqz $v0, .L800C7538
|
||||
/* B3E698 800C74F8 240D0003 */ li $t5, 3
|
||||
/* B3E69C 800C74FC 3C048014 */ lui $a0, %hi(D_801458D0) # $a0, 0x8014
|
||||
/* B3E6A0 800C7500 A22002AE */ sb $zero, 0x2ae($s1)
|
||||
/* B3E6A4 800C7504 0C00084C */ jal osSyncPrintf
|
||||
/* B3E6A8 800C7508 248458D0 */ addiu $a0, %lo(D_801458D0) # addiu $a0, $a0, 0x58d0
|
||||
/* B3E6AC 800C750C 3C048014 */ lui $a0, %hi(D_801458D8) # $a0, 0x8014
|
||||
/* B3E6B0 800C7510 3C068014 */ lui $a2, %hi(D_801458EC) # $a2, 0x8014
|
||||
/* B3E6B4 800C7514 24C658EC */ addiu $a2, %lo(D_801458EC) # addiu $a2, $a2, 0x58ec
|
||||
/* B3E6B8 800C7518 248458D8 */ addiu $a0, %lo(D_801458D8) # addiu $a0, $a0, 0x58d8
|
||||
/* B3E6BC 800C751C 0C00084C */ jal osSyncPrintf
|
||||
/* B3E6C0 800C7520 02002825 */ move $a1, $s0
|
||||
/* B3E6C4 800C7524 3C048014 */ lui $a0, %hi(D_80145914) # $a0, 0x8014
|
||||
/* B3E6C8 800C7528 0C00084C */ jal osSyncPrintf
|
||||
/* B3E6CC 800C752C 24845914 */ addiu $a0, %lo(D_80145914) # addiu $a0, $a0, 0x5914
|
||||
/* B3E6D0 800C7530 10000051 */ b .L800C7678
|
||||
/* B3E6D4 800C7534 26730001 */ addiu $s3, $s3, 1
|
||||
.L800C7538:
|
||||
/* B3E6D8 800C7538 1000004E */ b .L800C7674
|
||||
/* B3E6DC 800C753C A22D02B6 */ sb $t5, 0x2b6($s1)
|
||||
/* B3E6E0 800C7540 922E02B6 */ lbu $t6, 0x2b6($s1)
|
||||
.L800C7544:
|
||||
/* B3E6E4 800C7544 00137880 */ sll $t7, $s3, 2
|
||||
/* B3E6E8 800C7548 01F37823 */ subu $t7, $t7, $s3
|
||||
/* B3E6EC 800C754C 11C00049 */ beqz $t6, .L800C7674
|
||||
/* B3E6F0 800C7550 000F7880 */ sll $t7, $t7, 2
|
||||
/* B3E6F4 800C7554 01F37821 */ addu $t7, $t7, $s3
|
||||
/* B3E6F8 800C7558 000F78C0 */ sll $t7, $t7, 3
|
||||
/* B3E6FC 800C755C 028F9021 */ addu $s2, $s4, $t7
|
||||
/* B3E700 800C7560 3C048014 */ lui $a0, %hi(D_80145918) # $a0, 0x8014
|
||||
/* B3E704 800C7564 24845918 */ addiu $a0, %lo(D_80145918) # addiu $a0, $a0, 0x5918
|
||||
/* B3E708 800C7568 265202BC */ addiu $s2, $s2, 0x2bc
|
||||
/* B3E70C 800C756C 0C00084C */ jal osSyncPrintf
|
||||
/* B3E710 800C7570 24150001 */ li $s5, 1
|
||||
/* B3E714 800C7574 3C048014 */ lui $a0, %hi(D_80145920) # $a0, 0x8014
|
||||
/* B3E718 800C7578 26700001 */ addiu $s0, $s3, 1
|
||||
/* B3E71C 800C757C 3C068014 */ lui $a2, %hi(D_80145934) # $a2, 0x8014
|
||||
/* B3E720 800C7580 24C65934 */ addiu $a2, %lo(D_80145934) # addiu $a2, $a2, 0x5934
|
||||
/* B3E724 800C7584 02002825 */ move $a1, $s0
|
||||
/* B3E728 800C7588 0C00084C */ jal osSyncPrintf
|
||||
/* B3E72C 800C758C 24845920 */ addiu $a0, %lo(D_80145920) # addiu $a0, $a0, 0x5920
|
||||
/* B3E730 800C7590 3C048014 */ lui $a0, %hi(D_80145944) # $a0, 0x8014
|
||||
/* B3E734 800C7594 0C00084C */ jal osSyncPrintf
|
||||
/* B3E738 800C7598 24845944 */ addiu $a0, %lo(D_80145944) # addiu $a0, $a0, 0x5944
|
||||
/* B3E73C 800C759C 02402025 */ move $a0, $s2
|
||||
/* B3E740 800C75A0 0C0401E0 */ jal osSetRumble
|
||||
/* B3E744 800C75A4 00002825 */ move $a1, $zero
|
||||
/* B3E748 800C75A8 1040000F */ beqz $v0, .L800C75E8
|
||||
/* B3E74C 800C75AC 3C048014 */ lui $a0, %hi(D_80145948) # $a0, 0x8014
|
||||
/* B3E750 800C75B0 A22002AE */ sb $zero, 0x2ae($s1)
|
||||
/* B3E754 800C75B4 0C00084C */ jal osSyncPrintf
|
||||
/* B3E758 800C75B8 24845948 */ addiu $a0, %lo(D_80145948) # addiu $a0, $a0, 0x5948
|
||||
/* B3E75C 800C75BC 3C048014 */ lui $a0, %hi(D_80145950) # $a0, 0x8014
|
||||
/* B3E760 800C75C0 3C068014 */ lui $a2, %hi(D_80145964) # $a2, 0x8014
|
||||
/* B3E764 800C75C4 24C65964 */ addiu $a2, %lo(D_80145964) # addiu $a2, $a2, 0x5964
|
||||
/* B3E768 800C75C8 24845950 */ addiu $a0, %lo(D_80145950) # addiu $a0, $a0, 0x5950
|
||||
/* B3E76C 800C75CC 0C00084C */ jal osSyncPrintf
|
||||
/* B3E770 800C75D0 02002825 */ move $a1, $s0
|
||||
/* B3E774 800C75D4 3C048014 */ lui $a0, %hi(D_8014598C) # $a0, 0x8014
|
||||
/* B3E778 800C75D8 0C00084C */ jal osSyncPrintf
|
||||
/* B3E77C 800C75DC 2484598C */ addiu $a0, %lo(D_8014598C) # addiu $a0, $a0, 0x598c
|
||||
/* B3E780 800C75E0 10000025 */ b .L800C7678
|
||||
/* B3E784 800C75E4 26730001 */ addiu $s3, $s3, 1
|
||||
.L800C75E8:
|
||||
/* B3E788 800C75E8 923802B6 */ lbu $t8, 0x2b6($s1)
|
||||
/* B3E78C 800C75EC 2719FFFF */ addiu $t9, $t8, -1
|
||||
/* B3E790 800C75F0 10000020 */ b .L800C7674
|
||||
/* B3E794 800C75F4 A23902B6 */ sb $t9, 0x2b6($s1)
|
||||
/* B3E798 800C75F8 922202AE */ lbu $v0, 0x2ae($s1)
|
||||
.L800C75FC:
|
||||
/* B3E79C 800C75FC 5040001E */ beql $v0, $zero, .L800C7678
|
||||
/* B3E7A0 800C7600 26730001 */ addiu $s3, $s3, 1
|
||||
/* B3E7A4 800C7604 16C2000F */ bne $s6, $v0, .L800C7644
|
||||
/* B3E7A8 800C7608 3C048014 */ lui $a0, %hi(D_801459D0)
|
||||
/* B3E7AC 800C760C 3C048014 */ lui $a0, %hi(D_80145990) # $a0, 0x8014
|
||||
/* B3E7B0 800C7610 0C00084C */ jal osSyncPrintf
|
||||
/* B3E7B4 800C7614 24845990 */ addiu $a0, %lo(D_80145990) # addiu $a0, $a0, 0x5990
|
||||
/* B3E7B8 800C7618 3C048014 */ lui $a0, %hi(D_80145998) # $a0, 0x8014
|
||||
/* B3E7BC 800C761C 3C068014 */ lui $a2, %hi(D_801459AC) # $a2, 0x8014
|
||||
/* B3E7C0 800C7620 24C659AC */ addiu $a2, %lo(D_801459AC) # addiu $a2, $a2, 0x59ac
|
||||
/* B3E7C4 800C7624 24845998 */ addiu $a0, %lo(D_80145998) # addiu $a0, $a0, 0x5998
|
||||
/* B3E7C8 800C7628 0C00084C */ jal osSyncPrintf
|
||||
/* B3E7CC 800C762C 26650001 */ addiu $a1, $s3, 1
|
||||
/* B3E7D0 800C7630 3C048014 */ lui $a0, %hi(D_801459CC) # $a0, 0x8014
|
||||
/* B3E7D4 800C7634 0C00084C */ jal osSyncPrintf
|
||||
/* B3E7D8 800C7638 248459CC */ addiu $a0, %lo(D_801459CC) # addiu $a0, $a0, 0x59cc
|
||||
/* B3E7DC 800C763C 1000000D */ b .L800C7674
|
||||
/* B3E7E0 800C7640 A22002AE */ sb $zero, 0x2ae($s1)
|
||||
.L800C7644:
|
||||
/* B3E7E4 800C7644 0C00084C */ jal osSyncPrintf
|
||||
/* B3E7E8 800C7648 248459D0 */ addiu $a0, %lo(D_801459D0)
|
||||
/* B3E7EC 800C764C 3C048014 */ lui $a0, %hi(D_801459D8) # $a0, 0x8014
|
||||
/* B3E7F0 800C7650 3C068014 */ lui $a2, %hi(D_801459EC) # $a2, 0x8014
|
||||
/* B3E7F4 800C7654 24C659EC */ addiu $a2, %lo(D_801459EC) # addiu $a2, $a2, 0x59ec
|
||||
/* B3E7F8 800C7658 248459D8 */ addiu $a0, %lo(D_801459D8) # addiu $a0, $a0, 0x59d8
|
||||
/* B3E7FC 800C765C 0C00084C */ jal osSyncPrintf
|
||||
/* B3E800 800C7660 26650001 */ addiu $a1, $s3, 1
|
||||
/* B3E804 800C7664 3C048014 */ lui $a0, %hi(D_80145A24) # $a0, 0x8014
|
||||
/* B3E808 800C7668 0C00084C */ jal osSyncPrintf
|
||||
/* B3E80C 800C766C 24845A24 */ addiu $a0, %lo(D_80145A24) # addiu $a0, $a0, 0x5a24
|
||||
/* B3E810 800C7670 A22002AE */ sb $zero, 0x2ae($s1)
|
||||
.L800C7674:
|
||||
/* B3E814 800C7674 26730001 */ addiu $s3, $s3, 1
|
||||
.L800C7678:
|
||||
/* B3E818 800C7678 2A610004 */ slti $at, $s3, 4
|
||||
/* B3E81C 800C767C 1420FF73 */ bnez $at, .L800C744C
|
||||
/* B3E820 800C7680 26310001 */ addiu $s1, $s1, 1
|
||||
/* B3E824 800C7684 16A00052 */ bnez $s5, .L800C77D0
|
||||
/* B3E828 800C7688 3C028017 */ lui $v0, %hi(D_8016A4F0) # $v0, 0x8017
|
||||
/* B3E82C 800C768C 8C42A4F0 */ lw $v0, %lo(D_8016A4F0)($v0)
|
||||
/* B3E830 800C7690 30420003 */ andi $v0, $v0, 3
|
||||
/* B3E834 800C7694 02821821 */ addu $v1, $s4, $v0
|
||||
/* B3E838 800C7698 906802AA */ lbu $t0, 0x2aa($v1)
|
||||
/* B3E83C 800C769C 00024880 */ sll $t1, $v0, 2
|
||||
/* B3E840 800C76A0 00409825 */ move $s3, $v0
|
||||
/* B3E844 800C76A4 1100004A */ beqz $t0, .L800C77D0
|
||||
/* B3E848 800C76A8 02895021 */ addu $t2, $s4, $t1
|
||||
/* B3E84C 800C76AC 914B0002 */ lbu $t3, 2($t2)
|
||||
/* B3E850 800C76B0 316C0001 */ andi $t4, $t3, 1
|
||||
/* B3E854 800C76B4 11800046 */ beqz $t4, .L800C77D0
|
||||
/* B3E858 800C76B8 00000000 */ nop
|
||||
/* B3E85C 800C76BC 906D02AE */ lbu $t5, 0x2ae($v1)
|
||||
/* B3E860 800C76C0 00027080 */ sll $t6, $v0, 2
|
||||
/* B3E864 800C76C4 01C27023 */ subu $t6, $t6, $v0
|
||||
/* B3E868 800C76C8 12CD0041 */ beq $s6, $t5, .L800C77D0
|
||||
/* B3E86C 800C76CC 8FA4003C */ lw $a0, 0x3c($sp)
|
||||
/* B3E870 800C76D0 000E7080 */ sll $t6, $t6, 2
|
||||
/* B3E874 800C76D4 01C27021 */ addu $t6, $t6, $v0
|
||||
/* B3E878 800C76D8 000E70C0 */ sll $t6, $t6, 3
|
||||
/* B3E87C 800C76DC 028E9021 */ addu $s2, $s4, $t6
|
||||
/* B3E880 800C76E0 265202BC */ addiu $s2, $s2, 0x2bc
|
||||
/* B3E884 800C76E4 02402825 */ move $a1, $s2
|
||||
/* B3E888 800C76E8 0C04027D */ jal osProbeRumblePak
|
||||
/* B3E88C 800C76EC 00403025 */ move $a2, $v0
|
||||
/* B3E890 800C76F0 14400018 */ bnez $v0, .L800C7754
|
||||
/* B3E894 800C76F4 2401000B */ li $at, 11
|
||||
/* B3E898 800C76F8 240F0001 */ li $t7, 1
|
||||
/* B3E89C 800C76FC 0293C021 */ addu $t8, $s4, $s3
|
||||
/* B3E8A0 800C7700 A30F02AE */ sb $t7, 0x2ae($t8)
|
||||
/* B3E8A4 800C7704 02402025 */ move $a0, $s2
|
||||
/* B3E8A8 800C7708 0C0401E0 */ jal osSetRumble
|
||||
/* B3E8AC 800C770C 24050001 */ li $a1, 1
|
||||
/* B3E8B0 800C7710 02402025 */ move $a0, $s2
|
||||
/* B3E8B4 800C7714 0C0401E0 */ jal osSetRumble
|
||||
/* B3E8B8 800C7718 00002825 */ move $a1, $zero
|
||||
/* B3E8BC 800C771C 3C048014 */ lui $a0, %hi(D_80145A28) # $a0, 0x8014
|
||||
/* B3E8C0 800C7720 0C00084C */ jal osSyncPrintf
|
||||
/* B3E8C4 800C7724 24845A28 */ addiu $a0, %lo(D_80145A28) # addiu $a0, $a0, 0x5a28
|
||||
/* B3E8C8 800C7728 3C048014 */ lui $a0, %hi(D_80145A30) # $a0, 0x8014
|
||||
/* B3E8CC 800C772C 3C068014 */ lui $a2, %hi(D_80145A44) # $a2, 0x8014
|
||||
/* B3E8D0 800C7730 24C65A44 */ addiu $a2, %lo(D_80145A44) # addiu $a2, $a2, 0x5a44
|
||||
/* B3E8D4 800C7734 24845A30 */ addiu $a0, %lo(D_80145A30) # addiu $a0, $a0, 0x5a30
|
||||
/* B3E8D8 800C7738 0C00084C */ jal osSyncPrintf
|
||||
/* B3E8DC 800C773C 26650001 */ addiu $a1, $s3, 1
|
||||
/* B3E8E0 800C7740 3C048014 */ lui $a0, %hi(D_80145A60) # $a0, 0x8014
|
||||
/* B3E8E4 800C7744 0C00084C */ jal osSyncPrintf
|
||||
/* B3E8E8 800C7748 24845A60 */ addiu $a0, %lo(D_80145A60) # addiu $a0, $a0, 0x5a60
|
||||
/* B3E8EC 800C774C 10000020 */ b .L800C77D0
|
||||
/* B3E8F0 800C7750 00000000 */ nop
|
||||
.L800C7754:
|
||||
/* B3E8F4 800C7754 14410004 */ bne $v0, $at, .L800C7768
|
||||
/* B3E8F8 800C7758 24190002 */ li $t9, 2
|
||||
/* B3E8FC 800C775C 02934021 */ addu $t0, $s4, $s3
|
||||
/* B3E900 800C7760 1000001B */ b .L800C77D0
|
||||
/* B3E904 800C7764 A11902AE */ sb $t9, 0x2ae($t0)
|
||||
.L800C7768:
|
||||
/* B3E908 800C7768 24010004 */ li $at, 4
|
||||
/* B3E90C 800C776C 14410018 */ bne $v0, $at, .L800C77D0
|
||||
/* B3E910 800C7770 3C048014 */ lui $a0, %hi(D_80145A64) # $a0, 0x8014
|
||||
/* B3E914 800C7774 24845A64 */ addiu $a0, %lo(D_80145A64) # addiu $a0, $a0, 0x5a64
|
||||
/* B3E918 800C7778 0C000B84 */ jal LogUtils_LogThreadId
|
||||
/* B3E91C 800C777C 2405011A */ li $a1, 282
|
||||
/* B3E920 800C7780 3C058013 */ lui $a1, %hi(D_8012D284) # $a1, 0x8013
|
||||
/* B3E924 800C7784 8CA5D284 */ lw $a1, %lo(D_8012D284)($a1)
|
||||
/* B3E928 800C7788 3C048014 */ lui $a0, %hi(D_80145A70) # $a0, 0x8014
|
||||
/* B3E92C 800C778C 3C018013 */ lui $at, %hi(D_8012D284) # $at, 0x8013
|
||||
/* B3E930 800C7790 24A50001 */ addiu $a1, $a1, 1
|
||||
/* B3E934 800C7794 AC25D284 */ sw $a1, %lo(D_8012D284)($at)
|
||||
/* B3E938 800C7798 0C00084C */ jal osSyncPrintf
|
||||
/* B3E93C 800C779C 24845A70 */ addiu $a0, %lo(D_80145A70) # addiu $a0, $a0, 0x5a70
|
||||
/* B3E940 800C77A0 3C048014 */ lui $a0, %hi(D_80145A80) # $a0, 0x8014
|
||||
/* B3E944 800C77A4 0C00084C */ jal osSyncPrintf
|
||||
/* B3E948 800C77A8 24845A80 */ addiu $a0, %lo(D_80145A80) # addiu $a0, $a0, 0x5a80
|
||||
/* B3E94C 800C77AC 3C048014 */ lui $a0, %hi(D_80145A88) # $a0, 0x8014
|
||||
/* B3E950 800C77B0 3C068014 */ lui $a2, %hi(D_80145A9C) # $a2, 0x8014
|
||||
/* B3E954 800C77B4 24C65A9C */ addiu $a2, %lo(D_80145A9C) # addiu $a2, $a2, 0x5a9c
|
||||
/* B3E958 800C77B8 24845A88 */ addiu $a0, %lo(D_80145A88) # addiu $a0, $a0, 0x5a88
|
||||
/* B3E95C 800C77BC 0C00084C */ jal osSyncPrintf
|
||||
/* B3E960 800C77C0 26650001 */ addiu $a1, $s3, 1
|
||||
/* B3E964 800C77C4 3C048014 */ lui $a0, %hi(D_80145ABC) # $a0, 0x8014
|
||||
/* B3E968 800C77C8 0C00084C */ jal osSyncPrintf
|
||||
/* B3E96C 800C77CC 24845ABC */ addiu $a0, %lo(D_80145ABC) # addiu $a0, $a0, 0x5abc
|
||||
.L800C77D0:
|
||||
/* B3E970 800C77D0 3C098017 */ lui $t1, %hi(D_8016A4F0) # $t1, 0x8017
|
||||
/* B3E974 800C77D4 8D29A4F0 */ lw $t1, %lo(D_8016A4F0)($t1)
|
||||
/* B3E978 800C77D8 3C018017 */ lui $at, %hi(D_8016A4F0) # $at, 0x8017
|
||||
/* B3E97C 800C77DC 02802025 */ move $a0, $s4
|
||||
/* B3E980 800C77E0 252A0001 */ addiu $t2, $t1, 1
|
||||
/* B3E984 800C77E4 AC2AA4F0 */ sw $t2, %lo(D_8016A4F0)($at)
|
||||
/* B3E988 800C77E8 0C031CBF */ jal PadMgr_UnlockSerialMesgQueue
|
||||
/* B3E98C 800C77EC 8FA5003C */ lw $a1, 0x3c($sp)
|
||||
/* B3E990 800C77F0 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
/* B3E994 800C77F4 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B3E998 800C77F8 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B3E99C 800C77FC 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B3E9A0 800C7800 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B3E9A4 800C7804 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B3E9A8 800C7808 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* B3E9AC 800C780C 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* B3E9B0 800C7810 03E00008 */ jr $ra
|
||||
/* B3E9B4 800C7814 27BD0048 */ addiu $sp, $sp, 0x48
|
|
@ -1,66 +0,0 @@
|
|||
glabel func_8008ECAC
|
||||
/* B05E4C 8008ECAC 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* B05E50 8008ECB0 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B05E54 8008ECB4 AFA40018 */ sw $a0, 0x18($sp)
|
||||
/* B05E58 8008ECB8 90AE0444 */ lbu $t6, 0x444($a1)
|
||||
/* B05E5C 8008ECBC 24010056 */ li $at, 86
|
||||
/* B05E60 8008ECC0 00A03025 */ move $a2, $a1
|
||||
/* B05E64 8008ECC4 11C10031 */ beq $t6, $at, .L8008ED8C
|
||||
/* B05E68 8008ECC8 3C028016 */ lui $v0, %hi(gSaveContext) # $v0, 0x8016
|
||||
/* B05E6C 8008ECCC 3C038012 */ lui $v1, %hi(gEquipMasks) # $v1, 0x8012
|
||||
/* B05E70 8008ECD0 246371A0 */ addiu $v1, %lo(gEquipMasks) # addiu $v1, $v1, 0x71a0
|
||||
/* B05E74 8008ECD4 2442E660 */ addiu $v0, %lo(gSaveContext) # addiu $v0, $v0, -0x19a0
|
||||
/* B05E78 8008ECD8 3C048012 */ lui $a0, %hi(gEquipShifts) # $a0, 0x8012
|
||||
/* B05E7C 8008ECDC 944F0070 */ lhu $t7, 0x70($v0)
|
||||
/* B05E80 8008ECE0 94780002 */ lhu $t8, 2($v1)
|
||||
/* B05E84 8008ECE4 248471F0 */ addiu $a0, %lo(gEquipShifts) # addiu $a0, $a0, 0x71f0
|
||||
/* B05E88 8008ECE8 90880001 */ lbu $t0, 1($a0)
|
||||
/* B05E8C 8008ECEC 01F8C824 */ and $t9, $t7, $t8
|
||||
/* B05E90 8008ECF0 240500FF */ li $a1, 255
|
||||
/* B05E94 8008ECF4 01194807 */ srav $t1, $t9, $t0
|
||||
/* B05E98 8008ECF8 A0C9014E */ sb $t1, 0x14e($a2)
|
||||
/* B05E9C 8008ECFC 944A0070 */ lhu $t2, 0x70($v0)
|
||||
/* B05EA0 8008ED00 946B0004 */ lhu $t3, 4($v1)
|
||||
/* B05EA4 8008ED04 908D0002 */ lbu $t5, 2($a0)
|
||||
/* B05EA8 8008ED08 014B6024 */ and $t4, $t2, $t3
|
||||
/* B05EAC 8008ED0C 01AC7007 */ srav $t6, $t4, $t5
|
||||
/* B05EB0 8008ED10 25CFFFFF */ addiu $t7, $t6, -1
|
||||
/* B05EB4 8008ED14 A0CF014C */ sb $t7, 0x14c($a2)
|
||||
/* B05EB8 8008ED18 94790006 */ lhu $t9, 6($v1)
|
||||
/* B05EBC 8008ED1C 94580070 */ lhu $t8, 0x70($v0)
|
||||
/* B05EC0 8008ED20 90890003 */ lbu $t1, 3($a0)
|
||||
/* B05EC4 8008ED24 00C02025 */ move $a0, $a2
|
||||
/* B05EC8 8008ED28 03194024 */ and $t0, $t8, $t9
|
||||
/* B05ECC 8008ED2C 01285007 */ srav $t2, $t0, $t1
|
||||
/* B05ED0 8008ED30 254BFFFF */ addiu $t3, $t2, -1
|
||||
/* B05ED4 8008ED34 A0CB014F */ sb $t3, 0x14f($a2)
|
||||
/* B05ED8 8008ED38 904C13E2 */ lbu $t4, 0x13e2($v0)
|
||||
/* B05EDC 8008ED3C 54AC0004 */ bnel $a1, $t4, .L8008ED50
|
||||
/* B05EE0 8008ED40 90430068 */ lbu $v1, 0x68($v0)
|
||||
/* B05EE4 8008ED44 10000008 */ b .L8008ED68
|
||||
/* B05EE8 8008ED48 A0C5014D */ sb $a1, 0x14d($a2)
|
||||
/* B05EEC 8008ED4C 90430068 */ lbu $v1, 0x68($v0)
|
||||
.L8008ED50:
|
||||
/* B05EF0 8008ED50 24010055 */ li $at, 85
|
||||
/* B05EF4 8008ED54 14610003 */ bne $v1, $at, .L8008ED64
|
||||
/* B05EF8 8008ED58 00601025 */ move $v0, $v1
|
||||
/* B05EFC 8008ED5C 10000001 */ b .L8008ED64
|
||||
/* B05F00 8008ED60 2402003D */ li $v0, 61
|
||||
.L8008ED64:
|
||||
/* B05F04 8008ED64 A0C2014D */ sb $v0, 0x14d($a2)
|
||||
.L8008ED68:
|
||||
/* B05F08 8008ED68 80C50151 */ lb $a1, 0x151($a2)
|
||||
/* B05F0C 8008ED6C 0C023A7E */ jal func_8008E9F8
|
||||
/* B05F10 8008ED70 AFA6001C */ sw $a2, 0x1c($sp)
|
||||
/* B05F14 8008ED74 8FA4001C */ lw $a0, 0x1c($sp)
|
||||
/* B05F18 8008ED78 0C023B01 */ jal func_8008EC04
|
||||
/* B05F1C 8008ED7C 00402825 */ move $a1, $v0
|
||||
/* B05F20 8008ED80 8FA5001C */ lw $a1, 0x1c($sp)
|
||||
/* B05F24 8008ED84 0C0239D4 */ jal func_8008E750
|
||||
/* B05F28 8008ED88 8FA40018 */ lw $a0, 0x18($sp)
|
||||
.L8008ED8C:
|
||||
/* B05F2C 8008ED8C 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B05F30 8008ED90 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* B05F34 8008ED94 03E00008 */ jr $ra
|
||||
/* B05F38 8008ED98 00000000 */ nop
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
.rdata
|
||||
glabel D_8013E798
|
||||
.asciz "../z_player_lib.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_8013E7AC
|
||||
.asciz "../z_player_lib.c"
|
||||
.balign 4
|
||||
|
||||
.late_rodata
|
||||
glabel D_8013E92C
|
||||
.float 3.3
|
||||
|
||||
glabel D_8013E930
|
||||
.float 0.2
|
||||
|
||||
.text
|
||||
glabel func_800907E4
|
||||
/* B07984 800907E4 27BDFFB0 */ addiu $sp, $sp, -0x50
|
||||
/* B07988 800907E8 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* B0798C 800907EC AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B07990 800907F0 AFA40050 */ sw $a0, 0x50($sp)
|
||||
/* B07994 800907F4 AFA60058 */ sw $a2, 0x58($sp)
|
||||
/* B07998 800907F8 AFA7005C */ sw $a3, 0x5c($sp)
|
||||
/* B0799C 800907FC 80AE0693 */ lb $t6, 0x693($a1)
|
||||
/* B079A0 80090800 00A08025 */ move $s0, $a1
|
||||
/* B079A4 80090804 3C014160 */ li $at, 0x41600000 # 0.000000
|
||||
/* B079A8 80090808 11C00005 */ beqz $t6, .L80090820
|
||||
/* B079AC 8009080C 27A40038 */ addiu $a0, $sp, 0x38
|
||||
/* B079B0 80090810 3C0140C0 */ li $at, 0x40C00000 # 0.000000
|
||||
/* B079B4 80090814 44812000 */ mtc1 $at, $f4
|
||||
/* B079B8 80090818 10000004 */ b .L8009082C
|
||||
/* B079BC 8009081C E7A4004C */ swc1 $f4, 0x4c($sp)
|
||||
.L80090820:
|
||||
/* B079C0 80090820 44813000 */ mtc1 $at, $f6
|
||||
/* B079C4 80090824 00000000 */ nop
|
||||
/* B079C8 80090828 E7A6004C */ swc1 $f6, 0x4c($sp)
|
||||
.L8009082C:
|
||||
/* B079CC 8009082C 8FAF0050 */ lw $t7, 0x50($sp)
|
||||
/* B079D0 80090830 3C068014 */ lui $a2, %hi(D_8013E798) # $a2, 0x8014
|
||||
/* B079D4 80090834 24C6E798 */ addiu $a2, %lo(D_8013E798) # addiu $a2, $a2, -0x1868
|
||||
/* B079D8 80090838 8DE50000 */ lw $a1, ($t7)
|
||||
/* B079DC 8009083C 24070961 */ li $a3, 2401
|
||||
/* B079E0 80090840 0C031AB1 */ jal Graph_OpenDisps
|
||||
/* B079E4 80090844 AFA50048 */ sw $a1, 0x48($sp)
|
||||
/* B079E8 80090848 8E1801B0 */ lw $t8, 0x1b0($s0)
|
||||
/* B079EC 8009084C 3C018000 */ lui $at, 0x8000
|
||||
/* B079F0 80090850 8FA80048 */ lw $t0, 0x48($sp)
|
||||
/* B079F4 80090854 0301C821 */ addu $t9, $t8, $at
|
||||
/* B079F8 80090858 3C018016 */ lui $at, %hi(gSegments+0x18) # $at, 0x8016
|
||||
/* B079FC 8009085C AC396FC0 */ sw $t9, %lo(gSegments+0x18)($at)
|
||||
/* B07A00 80090860 8D0302C0 */ lw $v1, 0x2c0($t0)
|
||||
/* B07A04 80090864 3C04DB06 */ lui $a0, (0xDB060018 >> 16) # lui $a0, 0xdb06
|
||||
/* B07A08 80090868 34840018 */ ori $a0, (0xDB060018 & 0xFFFF) # ori $a0, $a0, 0x18
|
||||
/* B07A0C 8009086C 24690008 */ addiu $t1, $v1, 8
|
||||
/* B07A10 80090870 AD0902C0 */ sw $t1, 0x2c0($t0)
|
||||
/* B07A14 80090874 AC640000 */ sw $a0, ($v1)
|
||||
/* B07A18 80090878 8E0A01B0 */ lw $t2, 0x1b0($s0)
|
||||
/* B07A1C 8009087C AC6A0004 */ sw $t2, 4($v1)
|
||||
/* B07A20 80090880 8D0302D0 */ lw $v1, 0x2d0($t0)
|
||||
/* B07A24 80090884 246B0008 */ addiu $t3, $v1, 8
|
||||
/* B07A28 80090888 AD0B02D0 */ sw $t3, 0x2d0($t0)
|
||||
/* B07A2C 8009088C AC640000 */ sw $a0, ($v1)
|
||||
/* B07A30 80090890 8E0C01B0 */ lw $t4, 0x1b0($s0)
|
||||
/* B07A34 80090894 AC6C0004 */ sw $t4, 4($v1)
|
||||
/* B07A38 80090898 0C01DE1C */ jal Math_Sins
|
||||
/* B07A3C 8009089C 860400B6 */ lh $a0, 0xb6($s0)
|
||||
/* B07A40 800908A0 E7A00028 */ swc1 $f0, 0x28($sp)
|
||||
/* B07A44 800908A4 0C01DE0D */ jal Math_Coss
|
||||
/* B07A48 800908A8 860400B6 */ lh $a0, 0xb6($s0)
|
||||
/* B07A4C 800908AC 3C0D8016 */ lui $t5, %hi(gGameInfo) # $t5, 0x8016
|
||||
/* B07A50 800908B0 8DADFA90 */ lw $t5, %lo(gGameInfo)($t5)
|
||||
/* B07A54 800908B4 3C018014 */ lui $at, %hi(D_8013E92C)
|
||||
/* B07A58 800908B8 C422E92C */ lwc1 $f2, %lo(D_8013E92C)($at)
|
||||
/* B07A5C 800908BC C7A80028 */ lwc1 $f8, 0x28($sp)
|
||||
/* B07A60 800908C0 85AE0788 */ lh $t6, 0x788($t5)
|
||||
/* B07A64 800908C4 8FA20058 */ lw $v0, 0x58($sp)
|
||||
/* B07A68 800908C8 46024282 */ mul.s $f10, $f8, $f2
|
||||
/* B07A6C 800908CC 448E3000 */ mtc1 $t6, $f6
|
||||
/* B07A70 800908D0 C4500000 */ lwc1 $f16, ($v0)
|
||||
/* B07A74 800908D4 3C014120 */ li $at, 0x41200000 # 0.000000
|
||||
/* B07A78 800908D8 C7A4004C */ lwc1 $f4, 0x4c($sp)
|
||||
/* B07A7C 800908DC C4520004 */ lwc1 $f18, 4($v0)
|
||||
/* B07A80 800908E0 46803220 */ cvt.s.w $f8, $f6
|
||||
/* B07A84 800908E4 C4460008 */ lwc1 $f6, 8($v0)
|
||||
/* B07A88 800908E8 00003825 */ move $a3, $zero
|
||||
/* B07A8C 800908EC 46105300 */ add.s $f12, $f10, $f16
|
||||
/* B07A90 800908F0 44815000 */ mtc1 $at, $f10
|
||||
/* B07A94 800908F4 46049380 */ add.s $f14, $f18, $f4
|
||||
/* B07A98 800908F8 460A4403 */ div.s $f16, $f8, $f10
|
||||
/* B07A9C 800908FC 46101480 */ add.s $f18, $f2, $f16
|
||||
/* B07AA0 80090900 46120102 */ mul.s $f4, $f0, $f18
|
||||
/* B07AA4 80090904 46062200 */ add.s $f8, $f4, $f6
|
||||
/* B07AA8 80090908 44064000 */ mfc1 $a2, $f8
|
||||
/* B07AAC 8009090C 0C034261 */ jal Matrix_Translate
|
||||
/* B07AB0 80090910 00000000 */ nop
|
||||
/* B07AB4 80090914 8FAF0050 */ lw $t7, 0x50($sp)
|
||||
/* B07AB8 80090918 3C050001 */ lui $a1, 1
|
||||
/* B07ABC 8009091C 00002025 */ move $a0, $zero
|
||||
/* B07AC0 80090920 00AF2821 */ addu $a1, $a1, $t7
|
||||
/* B07AC4 80090924 8CA51DE4 */ lw $a1, 0x1de4($a1)
|
||||
/* B07AC8 80090928 00003025 */ move $a2, $zero
|
||||
/* B07ACC 8009092C 24070001 */ li $a3, 1
|
||||
/* B07AD0 80090930 00A00821 */ addu $at, $a1, $zero
|
||||
/* B07AD4 80090934 00052940 */ sll $a1, $a1, 5
|
||||
/* B07AD8 80090938 00A12823 */ subu $a1, $a1, $at
|
||||
/* B07ADC 8009093C 00052880 */ sll $a1, $a1, 2
|
||||
/* B07AE0 80090940 00A12821 */ addu $a1, $a1, $at
|
||||
/* B07AE4 80090944 000528C0 */ sll $a1, $a1, 3
|
||||
/* B07AE8 80090948 00052C00 */ sll $a1, $a1, 0x10
|
||||
/* B07AEC 8009094C 0C034421 */ jal Matrix_RotateRPY
|
||||
/* B07AF0 80090950 00052C03 */ sra $a1, $a1, 0x10
|
||||
/* B07AF4 80090954 3C018014 */ lui $at, %hi(D_8013E930)
|
||||
/* B07AF8 80090958 C42CE930 */ lwc1 $f12, %lo(D_8013E930)($at)
|
||||
/* B07AFC 8009095C 24070001 */ li $a3, 1
|
||||
/* B07B00 80090960 44066000 */ mfc1 $a2, $f12
|
||||
/* B07B04 80090964 0C0342A3 */ jal Matrix_Scale
|
||||
/* B07B08 80090968 46006386 */ mov.s $f14, $f12
|
||||
/* B07B0C 8009096C 8FA5005C */ lw $a1, 0x5c($sp)
|
||||
/* B07B10 80090970 8FA40050 */ lw $a0, 0x50($sp)
|
||||
/* B07B14 80090974 24A5FFFF */ addiu $a1, $a1, -1
|
||||
/* B07B18 80090978 00052C00 */ sll $a1, $a1, 0x10
|
||||
/* B07B1C 8009097C 0C01A528 */ jal func_800694A0
|
||||
/* B07B20 80090980 00052C03 */ sra $a1, $a1, 0x10
|
||||
/* B07B24 80090984 8FB80050 */ lw $t8, 0x50($sp)
|
||||
/* B07B28 80090988 3C068014 */ lui $a2, %hi(D_8013E7AC) # $a2, 0x8014
|
||||
/* B07B2C 8009098C 24C6E7AC */ addiu $a2, %lo(D_8013E7AC) # addiu $a2, $a2, -0x1854
|
||||
/* B07B30 80090990 27A40038 */ addiu $a0, $sp, 0x38
|
||||
/* B07B34 80090994 24070975 */ li $a3, 2421
|
||||
/* B07B38 80090998 0C031AD5 */ jal Graph_CloseDisps
|
||||
/* B07B3C 8009099C 8F050000 */ lw $a1, ($t8)
|
||||
/* B07B40 800909A0 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* B07B44 800909A4 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B07B48 800909A8 27BD0050 */ addiu $sp, $sp, 0x50
|
||||
/* B07B4C 800909AC 03E00008 */ jr $ra
|
||||
/* B07B50 800909B0 00000000 */ nop
|
||||
|
|
@ -1635,7 +1635,7 @@ void PadMgr_HandlePreNMI(PadMgr* padmgr);
|
|||
// This function must remain commented out, because it is called incorrectly in
|
||||
// fault.c (actual bug in game), and the compiler notices and won't compile it
|
||||
// void PadMgr_RequestPadData(PadMgr* padmgr, Input* inputs, s32 mode);
|
||||
void PadMgr_Init(PadMgr* padmgr, OSMesgQueue* siIntMsgQ, UNK_TYPE arg2, OSId id, OSPri priority, void* stack);
|
||||
void PadMgr_Init(PadMgr* padmgr, OSMesgQueue* siIntMsgQ, IrqMgr* irqMgr, OSId id, OSPri priority, void* stack);
|
||||
void Sched_SwapFrameBuffer(CfbInfo* cfbInfo);
|
||||
void func_800C84E4(SchedContext* sc, CfbInfo* cfbInfo);
|
||||
void Sched_HandleReset(SchedContext* sc);
|
||||
|
|
|
@ -45,17 +45,20 @@
|
|||
#define CHECK_QUEST_ITEM(item) (gBitFlags[item] & gSaveContext.questItems)
|
||||
|
||||
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
|
||||
(curState)->init = newInit; \
|
||||
(curState)->size = sizeof(newStruct);
|
||||
(curState)->init = newInit; \
|
||||
(curState)->size = sizeof(newStruct);
|
||||
|
||||
#define LOG(exp, value, format, file, line) \
|
||||
LogUtils_LogThreadId(file, line); \
|
||||
osSyncPrintf(exp " = " format "\n", value);
|
||||
#define LOG(exp, value, format, file, line) \
|
||||
do { \
|
||||
LogUtils_LogThreadId(file, line); \
|
||||
osSyncPrintf(exp " = " format "\n", value); \
|
||||
} while (0)
|
||||
|
||||
#define LOG_STRING(string, file, line) LOG(#string, string, "%s", file, line)
|
||||
#define LOG_ADDRESS(exp, value, file, line) LOG(exp, value, "%08x", file, line)
|
||||
#define LOG_TIME(exp, value, file, line) LOG(exp, value, "%lld", file, line)
|
||||
#define LOG_NUM(exp, value, file, line) LOG(exp, value, "%d", file, line)
|
||||
#define LOG_HEX(exp, value, file, line) LOG(exp, value, "%x", file, line)
|
||||
|
||||
/*
|
||||
* `x` vertex x
|
||||
|
@ -67,7 +70,7 @@
|
|||
* `cgny` green component of color vertex, or y component of normal vertex
|
||||
* `cbnz` blue component of color vertex, or z component of normal vertex
|
||||
* `a` alpha
|
||||
*/
|
||||
*/
|
||||
#define VTX(x,y,z,s,t,crnx,cgny,cbnz,a) { { { x, y, z }, 0, { s, t }, { crnx, cgny, cbnz, a } } }
|
||||
|
||||
#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }
|
||||
|
|
|
@ -327,35 +327,6 @@ typedef struct
|
|||
*/
|
||||
} Input; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ OSContStatus pad_status[4];
|
||||
/* 0x0010 */ OSMesg msgbuf1[1];
|
||||
/* 0x0014 */ OSMesg msgbuf2[1];
|
||||
/* 0x0018 */ OSMesg msgbuf3[4];
|
||||
/* 0x0028 */ OSMesgQueue queue1;
|
||||
/* 0x0040 */ OSMesgQueue queue2;
|
||||
/* 0x0058 */ OSMesgQueue queue3;
|
||||
/* 0x0070 */ UNK_TYPE unk_70;
|
||||
/* 0x0074 */ UNK_TYPE unk_74;
|
||||
/* 0x0078 */ UNK_TYPE unk_78;
|
||||
/* 0x007C */ UNK_TYPE unk_7C;
|
||||
/* 0x0080 */ OSThread thread;
|
||||
/* 0x0230 */ Input inputs[4]; // 0x18 each = 0x60 total
|
||||
/* 0x0290 */ PadState pads[4]; // 0x6 each = 0x18 total
|
||||
/* 0x02A8 */ volatile u8 validCtrlrsMask;
|
||||
/* 0x02A9 */ s8 ncontrollers;
|
||||
/* 0x02AA */ u8 ctrlrIsConnected[4]; // "Key_switch" originally
|
||||
/* 0x02AE */ u8 pakType[4]; // 1 if rumble pack, 2 if mempak?
|
||||
/* 0x02B2 */ volatile u8 rumbleEnable[4];
|
||||
/* 0x02B6 */ u8 rumbleCounter[4]; // not clear exact meaning
|
||||
/* 0x02BC */ unk_controller_t unk_controller[4];
|
||||
/* 0x045C */ volatile u8 rumbleOffFrames;
|
||||
/* 0x045D */ volatile u8 rumbleOnFrames;
|
||||
/* 0x045E */ u8 preNMIShutdown;
|
||||
/* 0x0460 */ void (*retraceCallback)(void* padmgr, u32 unk464);
|
||||
/* 0x0464 */ u32 retraceCallbackValue;
|
||||
} PadMgr; // size = 0x468
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ s32 topY; // uly (upper left y)
|
||||
/* 0x0004 */ s32 bottomY; // lry (lower right y)
|
||||
|
@ -363,14 +334,13 @@ typedef struct {
|
|||
/* 0x000C */ s32 rightX; // lrx (lower right x)
|
||||
} Viewport; // size = 0x10
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ s32 magic; // string literal "VIEW" / 0x56494557
|
||||
/* 0x0004 */ GraphicsContext* gfxCtx;
|
||||
/* 0x0008 */ Viewport viewport;
|
||||
/* 0x0018 */ f32 fovy; // vertical field of view in degrees
|
||||
/* 0x001C */ f32 zNear; // distance to near clipping plane
|
||||
/* 0x0020 */ f32 zFar; // distance to far clipping plane
|
||||
/* 0x001C */ f32 zNear; // distance to near clipping plane
|
||||
/* 0x0020 */ f32 zFar; // distance to far clipping plane
|
||||
/* 0x0024 */ f32 scale; // scale for matrix elements
|
||||
/* 0x0028 */ Vec3f eye;
|
||||
/* 0x0034 */ Vec3f unk_34;
|
||||
|
@ -1569,6 +1539,33 @@ typedef struct {
|
|||
/* 0x278 */ OSTime retraceTime;
|
||||
} IrqMgr; // size = 0x280
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ OSContStatus padStatus[4];
|
||||
/* 0x0010 */ OSMesg serialMsgBuf[1];
|
||||
/* 0x0014 */ OSMesg lockMsgBuf[1];
|
||||
/* 0x0018 */ OSMesg interruptMsgBuf[4];
|
||||
/* 0x0028 */ OSMesgQueue serialMsgQ;
|
||||
/* 0x0040 */ OSMesgQueue lockMsgQ;
|
||||
/* 0x0058 */ OSMesgQueue interruptMsgQ;
|
||||
/* 0x0070 */ IrqMgrClient irqClient;
|
||||
/* 0x0078 */ IrqMgr* irqMgr;
|
||||
/* 0x0080 */ OSThread thread;
|
||||
/* 0x0230 */ Input inputs[4];
|
||||
/* 0x0290 */ PadState pads[4];
|
||||
/* 0x02A8 */ volatile u8 validCtrlrsMask;
|
||||
/* 0x02A9 */ u8 ncontrollers;
|
||||
/* 0x02AA */ u8 ctrlrIsConnected[4]; // "Key_switch" originally
|
||||
/* 0x02AE */ u8 pakType[4]; // 1 if rumble pack, 2 if mempak?
|
||||
/* 0x02B2 */ volatile u8 rumbleEnable[4];
|
||||
/* 0x02B6 */ u8 rumbleCounter[4]; // not clear exact meaning
|
||||
/* 0x02BC */ unk_controller_t unk_controller[4];
|
||||
/* 0x045C */ volatile u8 rumbleOffFrames;
|
||||
/* 0x045D */ volatile u8 rumbleOnFrames;
|
||||
/* 0x045E */ u8 preNMIShutdown;
|
||||
/* 0x0460 */ void (*retraceCallback)(void* padmgr, u32 unk464);
|
||||
/* 0x0464 */ u32 retraceCallbackValue;
|
||||
} PadMgr; // size = 0x468
|
||||
|
||||
// == Previously sched.h
|
||||
|
||||
#define OS_SC_NEEDS_RDP 0x0001
|
||||
|
|
|
@ -292,9 +292,9 @@ s32 func_800E7744(s32 instrument, s32 bankId, s32 instId, UnkInstrument* arg3) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// This code is SM64 PAL's version with changes made to build here (and a couple legitimate changes made in the function).
|
||||
// This function needs massive work, hence why it is not set for NON_MATCHING
|
||||
#ifdef NON_EQUIVALENT
|
||||
// This code is SM64 PAL's version with changes made to build here (and a couple legitimate changes made in the
|
||||
// function). This function needs massive work, hence why it is not set for NON_MATCHING
|
||||
void Audio_SeqChanLayerDecayRelease(SequenceChannelLayer* seqLayer, s32 target) {
|
||||
Note* note;
|
||||
NoteAttributes* attributes;
|
||||
|
@ -302,7 +302,7 @@ void Audio_SeqChanLayerDecayRelease(SequenceChannelLayer* seqLayer, s32 target)
|
|||
if (seqLayer == NO_LAYER) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
seqLayer->unusedEu0b8 = 0;
|
||||
|
||||
if (seqLayer->note == NULL) {
|
||||
|
@ -317,7 +317,8 @@ void Audio_SeqChanLayerDecayRelease(SequenceChannelLayer* seqLayer, s32 target)
|
|||
}
|
||||
|
||||
if (note->playbackState.parentLayer != seqLayer) {
|
||||
if (note->playbackState.parentLayer == NO_LAYER && note->playbackState.wantedParentLayer == NO_LAYER && note->playbackState.prevParentLayer == seqLayer && target != 6) {
|
||||
if (note->playbackState.parentLayer == NO_LAYER && note->playbackState.wantedParentLayer == NO_LAYER &&
|
||||
note->playbackState.prevParentLayer == seqLayer && target != 6) {
|
||||
note->playbackState.adsr.fadeOutVel = gAudioContext.gAudioBufferParameters.updatesPerFrameInv;
|
||||
note->playbackState.adsr.adsrAction.action |= 0x10;
|
||||
}
|
||||
|
@ -341,11 +342,14 @@ void Audio_SeqChanLayerDecayRelease(SequenceChannelLayer* seqLayer, s32 target)
|
|||
} else {
|
||||
note->playbackState.adsr.adsrAction.action |= 0x20;
|
||||
if (seqLayer->adsr.releaseRate == 0) {
|
||||
note->playbackState.adsr.fadeOutVel = seqLayer->seqChannel->adsr.releaseRate * gAudioContext.gAudioBufferParameters.unkUpdatesPerFrameScaled;
|
||||
note->playbackState.adsr.fadeOutVel = seqLayer->seqChannel->adsr.releaseRate *
|
||||
gAudioContext.gAudioBufferParameters.unkUpdatesPerFrameScaled;
|
||||
} else {
|
||||
note->playbackState.adsr.fadeOutVel = seqLayer->adsr.releaseRate * gAudioContext.gAudioBufferParameters.unkUpdatesPerFrameScaled;
|
||||
note->playbackState.adsr.fadeOutVel =
|
||||
seqLayer->adsr.releaseRate * gAudioContext.gAudioBufferParameters.unkUpdatesPerFrameScaled;
|
||||
}
|
||||
note->playbackState.adsr.sustain = ((f32) (s32) (seqLayer->seqChannel->adsr.sustain) * note->playbackState.adsr.current) / 256.0f;
|
||||
note->playbackState.adsr.sustain =
|
||||
((f32)(s32)(seqLayer->seqChannel->adsr.sustain) * note->playbackState.adsr.current) / 256.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,33 +117,31 @@ void func_800C4344(GameState* gameState) {
|
|||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Regalloc mostly
|
||||
// regalloc differences
|
||||
void GameState_DrawInputDisplay(u16 input, Gfx** gfx) {
|
||||
static const u16 sInpDispBtnColors[] = {
|
||||
GPACK_RGBA5551(31, 31, 0, 1), GPACK_RGBA5551(31, 31, 0, 1), GPACK_RGBA5551(31, 31, 0, 1),
|
||||
GPACK_RGBA5551(31, 31, 0, 1), GPACK_RGBA5551(15, 15, 15, 1), GPACK_RGBA5551(15, 15, 15, 1),
|
||||
GPACK_RGBA5551(31, 0, 31, 1), GPACK_RGBA5551(0, 31, 31, 1), GPACK_RGBA5551(15, 15, 15, 1),
|
||||
GPACK_RGBA5551(15, 15, 15, 1), GPACK_RGBA5551(15, 15, 15, 1), GPACK_RGBA5551(15, 15, 15, 1),
|
||||
GPACK_RGBA5551(31, 0, 0, 1), GPACK_RGBA5551(15, 15, 15, 1), GPACK_RGBA5551(0, 31, 15, 1),
|
||||
GPACK_RGBA5551(0, 0, 31, 1),
|
||||
GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1), GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1), GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1),
|
||||
GPACK_RGBA5551(0xFF, 0xFF, 0x00, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1),
|
||||
GPACK_RGBA5551(0x00, 0xFF, 0xFF, 1), GPACK_RGBA5551(0xFF, 0x00, 0xFF, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1),
|
||||
GPACK_RGBA5551(0x78, 0x78, 0x78, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1),
|
||||
GPACK_RGBA5551(0xFF, 0x00, 0x00, 1), GPACK_RGBA5551(0x78, 0x78, 0x78, 1), GPACK_RGBA5551(0x00, 0xFF, 0x00, 1),
|
||||
GPACK_RGBA5551(0x00, 0x00, 0xFF, 1),
|
||||
};
|
||||
s32 i, j;
|
||||
s32 lrx, lry, ulx, uly;
|
||||
s32 i, j, k;
|
||||
Gfx* gfxP = *gfx;
|
||||
|
||||
gDPPipeSync(gfxP++);
|
||||
gDPSetOtherMode(gfxP++,
|
||||
G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
|
||||
G_TD_CLAMP | G_TP_NONE | G_CYC_FILL | G_PM_NPRIMITIVE,
|
||||
G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2);
|
||||
|
||||
for (i = 0, j = 1; i < 0x10; i++, j++) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
j = i;
|
||||
k = i + 1;
|
||||
if (input & (1 << i)) {
|
||||
gDPSetFillColor(gfxP++, (sInpDispBtnColors[i] << 0x10) | sInpDispBtnColors[i]);
|
||||
ulx = i * 4 + 226;
|
||||
uly = 220;
|
||||
lrx = j * 4 + 225;
|
||||
lry = 223;
|
||||
gDPFillRectangle(gfxP++, ulx, uly, lrx, lry);
|
||||
gDPFillRectangle(gfxP++, (j * 4) + 226, 220, (k * 4) + 225, 223);
|
||||
gDPPipeSync(gfxP++);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -221,7 +221,8 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
|
|||
task->dram_stack = gGfxSPTaskStack;
|
||||
task->dram_stack_size = sizeof(gGfxSPTaskStack);
|
||||
task->output_buff = gGfxSPTaskOutputBuffer;
|
||||
task->output_buff_size = gGfxSPTaskYieldBuffer; //! @bug (?) should be sizeof(gGfxSPTaskYieldBuffer), probably a typo
|
||||
task->output_buff_size =
|
||||
gGfxSPTaskYieldBuffer; //! @bug (?) should be sizeof(gGfxSPTaskYieldBuffer), probably a typo
|
||||
task->data_ptr = gfxCtx->workBuffer;
|
||||
|
||||
Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 828);
|
||||
|
|
|
@ -8,78 +8,80 @@
|
|||
s32 D_8012D280 = 1;
|
||||
|
||||
OSMesgQueue* PadMgr_LockSerialMesgQueue(PadMgr* padmgr) {
|
||||
OSMesgQueue* ctrlrqueue = NULL;
|
||||
OSMesgQueue* ctrlrQ = NULL;
|
||||
|
||||
if (D_8012D280 > 2) {
|
||||
// EUC-JP: ロック待ち | Waiting for lock
|
||||
// "serialMsgQ Waiting for lock"
|
||||
osSyncPrintf("%2d %d serialMsgQロック待ち %08x %08x %08x\n", osGetThreadId(NULL),
|
||||
padmgr->queue1.validCount, padmgr, &padmgr->queue1, &ctrlrqueue);
|
||||
padmgr->serialMsgQ.validCount, padmgr, &padmgr->serialMsgQ, &ctrlrQ);
|
||||
}
|
||||
|
||||
osRecvMesg(&padmgr->queue1, &ctrlrqueue, OS_MESG_BLOCK);
|
||||
osRecvMesg(&padmgr->serialMsgQ, &ctrlrQ, OS_MESG_BLOCK);
|
||||
|
||||
if (D_8012D280 > 2) {
|
||||
// EUC-JP: をロックしました | Locked
|
||||
// "serialMsgQ Locked"
|
||||
osSyncPrintf("%2d %d serialMsgQをロックしました %08x\n", osGetThreadId(NULL),
|
||||
padmgr->queue1.validCount, ctrlrqueue);
|
||||
padmgr->serialMsgQ.validCount, ctrlrQ);
|
||||
}
|
||||
|
||||
return ctrlrqueue;
|
||||
return ctrlrQ;
|
||||
}
|
||||
|
||||
void PadMgr_UnlockSerialMesgQueue(PadMgr* padmgr, OSMesgQueue* ctrlrqueue) {
|
||||
void PadMgr_UnlockSerialMesgQueue(PadMgr* padmgr, OSMesgQueue* ctrlrQ) {
|
||||
if (D_8012D280 > 2) {
|
||||
// EUC-JP: ロック解除します | Unlock
|
||||
// "serialMsgQ Unlock"
|
||||
osSyncPrintf("%2d %d serialMsgQロック解除します %08x %08x %08x\n", osGetThreadId(NULL),
|
||||
padmgr->queue1.validCount, padmgr, &padmgr->queue1, ctrlrqueue);
|
||||
padmgr->serialMsgQ.validCount, padmgr, &padmgr->serialMsgQ, ctrlrQ);
|
||||
}
|
||||
|
||||
osSendMesg(&padmgr->queue1, ctrlrqueue, OS_MESG_BLOCK);
|
||||
osSendMesg(&padmgr->serialMsgQ, ctrlrQ, OS_MESG_BLOCK);
|
||||
|
||||
if (D_8012D280 > 2) {
|
||||
// EUC-JP: ロック解除しました | Unlocked
|
||||
// "serialMsgQ Unlocked"
|
||||
osSyncPrintf("%2d %d serialMsgQロック解除しました %08x %08x %08x\n", osGetThreadId(NULL),
|
||||
padmgr->queue1.validCount, padmgr, &padmgr->queue1, ctrlrqueue);
|
||||
padmgr->serialMsgQ.validCount, padmgr, &padmgr->serialMsgQ, ctrlrQ);
|
||||
}
|
||||
}
|
||||
|
||||
void PadMgr_LockPadData(PadMgr* padmgr) {
|
||||
osRecvMesg(&padmgr->queue2, NULL, OS_MESG_BLOCK);
|
||||
osRecvMesg(&padmgr->lockMsgQ, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
void PadMgr_UnlockPadData(PadMgr* padmgr) {
|
||||
osSendMesg(&padmgr->queue2, NULL, OS_MESG_BLOCK);
|
||||
osSendMesg(&padmgr->lockMsgQ, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc and minor ordering differences
|
||||
void PadMgr_RumbleControl(PadMgr* padmgr) {
|
||||
static u32 errcnt = 0;
|
||||
static u32 D_8016A4F0;
|
||||
static u32 frame;
|
||||
s32 temp;
|
||||
s32 triedRumbleComm;
|
||||
OSMesgQueue* ctrlrqueue;
|
||||
s32 ctrlr;
|
||||
OSMesgQueue* ctrlrQ;
|
||||
s32 var4;
|
||||
s32 i;
|
||||
|
||||
temp = 1;
|
||||
ctrlrqueue = PadMgr_LockSerialMesgQueue(padmgr);
|
||||
ctrlrQ = PadMgr_LockSerialMesgQueue(padmgr);
|
||||
triedRumbleComm = 0;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (padmgr->ctrlrIsConnected[i] != 0) {
|
||||
if (padmgr->pad_status[i].status & 1) {
|
||||
if (padmgr->ctrlrIsConnected[i]) {
|
||||
if (padmgr->padStatus[i].status & 1) {
|
||||
if (padmgr->pakType[i] == temp) {
|
||||
if (padmgr->rumbleEnable[i] != 0) {
|
||||
if (padmgr->rumbleCounter[i] < 3) {
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// clang-format off
|
||||
if (1) {} osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// clang-format on
|
||||
|
||||
// "Vibration pack jumble jumble"?
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パック ぶるぶるぶるぶる");
|
||||
osSyncPrintf(VT_RST);
|
||||
|
||||
if (osSetRumble(&padmgr->unk_controller[i], temp) != 0) {
|
||||
padmgr->pakType[i] = 0;
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// "A communication error has occurred with the vibraton pack"
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パックで通信エラーが発生しました");
|
||||
osSyncPrintf(VT_RST);
|
||||
} else {
|
||||
|
@ -90,13 +92,18 @@ void PadMgr_RumbleControl(PadMgr* padmgr) {
|
|||
}
|
||||
} else {
|
||||
if (padmgr->rumbleCounter[i] != 0) {
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// clang-format off
|
||||
if (1) {} osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// clang-format on
|
||||
|
||||
// "Stop vibration pack"
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パック 停止");
|
||||
osSyncPrintf(VT_RST);
|
||||
|
||||
if (osSetRumble(&padmgr->unk_controller[i], 0) != 0) {
|
||||
padmgr->pakType[i] = 0;
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// "A communication error has occurred with the vibration pack"
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パックで通信エラーが発生しました");
|
||||
osSyncPrintf(VT_RST);
|
||||
} else {
|
||||
|
@ -111,11 +118,13 @@ void PadMgr_RumbleControl(PadMgr* padmgr) {
|
|||
if (padmgr->pakType[i] != 0) {
|
||||
if (padmgr->pakType[i] == 1) {
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// "It seems that a vibration pack was pulled out"
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パックが抜かれたようです");
|
||||
osSyncPrintf(VT_RST);
|
||||
padmgr->pakType[i] = 0;
|
||||
} else {
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// "It seems that a controller pack that is not a vibration pack was pulled out"
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1,
|
||||
"振動パックではないコントローラパックが抜かれたようです");
|
||||
osSyncPrintf(VT_RST);
|
||||
|
@ -127,52 +136,46 @@ void PadMgr_RumbleControl(PadMgr* padmgr) {
|
|||
}
|
||||
|
||||
if (!triedRumbleComm) {
|
||||
ctrlr = D_8016A4F0 % 4;
|
||||
i = frame % 4;
|
||||
|
||||
if ((padmgr->ctrlrIsConnected[ctrlr] != 0) && (padmgr->pad_status[ctrlr].status & 1) &&
|
||||
(padmgr->pakType[ctrlr] != 1)) {
|
||||
var4 = osProbeRumblePak(ctrlrqueue, &padmgr->unk_controller[ctrlr], ctrlr);
|
||||
if (padmgr->ctrlrIsConnected[i] && (padmgr->padStatus[i].status & 1) && (padmgr->pakType[i] != 1)) {
|
||||
var4 = osProbeRumblePak(ctrlrQ, &padmgr->unk_controller[i], i);
|
||||
|
||||
if (var4 == 0) {
|
||||
padmgr->pakType[ctrlr] = 1;
|
||||
osSetRumble(&padmgr->unk_controller[ctrlr], 1);
|
||||
osSetRumble(&padmgr->unk_controller[ctrlr], 0);
|
||||
padmgr->pakType[i] = 1;
|
||||
osSetRumble(&padmgr->unk_controller[i], 1);
|
||||
osSetRumble(&padmgr->unk_controller[i], 0);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", ctrlr + 1, "振動パックを認識しました");
|
||||
// "Recognized vibration pack"
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パックを認識しました");
|
||||
osSyncPrintf(VT_RST);
|
||||
} else if (var4 == 11) {
|
||||
padmgr->pakType[ctrlr] = 2;
|
||||
padmgr->pakType[i] = 2;
|
||||
} else if (var4 == 4) {
|
||||
LOG_NUM("++errcnt", ++errcnt, "../padmgr.c", 282);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", ctrlr + 1, "コントローラパックの通信エラー");
|
||||
// "Controller pack communication error"
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "コントローラパックの通信エラー");
|
||||
osSyncPrintf(VT_RST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
D_8016A4F0++;
|
||||
PadMgr_UnlockSerialMesgQueue(padmgr, ctrlrqueue);
|
||||
frame++;
|
||||
PadMgr_UnlockSerialMesgQueue(padmgr, ctrlrQ);
|
||||
}
|
||||
#else
|
||||
u32 D_8012D284 = 0; // errcnt
|
||||
u32 D_8016A4F0;
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/padmgr/PadMgr_RumbleControl.s")
|
||||
#endif
|
||||
|
||||
// func_800A2300 in 1.0
|
||||
void PadMgr_RumbleStop(PadMgr* padmgr) {
|
||||
s32 i;
|
||||
OSMesgQueue* ctrlrqueue;
|
||||
OSMesgQueue* ctrlrQ;
|
||||
|
||||
ctrlrqueue = PadMgr_LockSerialMesgQueue(padmgr);
|
||||
ctrlrQ = PadMgr_LockSerialMesgQueue(padmgr);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (osProbeRumblePak(ctrlrqueue, &padmgr->unk_controller[i], i) == 0) {
|
||||
if (osProbeRumblePak(ctrlrQ, &padmgr->unk_controller[i], i) == 0) {
|
||||
if ((gFaultStruct.msgId == 0) && (padmgr->rumbleOnFrames != 0)) {
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// EUC-JP: コン | 'Con'? , EUC-JP: 振動パック 停止 | Stop vibration pack
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パック 停止");
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パック 停止"); // "Stop vibration pack"
|
||||
osSyncPrintf(VT_RST);
|
||||
}
|
||||
|
||||
|
@ -180,7 +183,7 @@ void PadMgr_RumbleStop(PadMgr* padmgr) {
|
|||
}
|
||||
}
|
||||
|
||||
PadMgr_UnlockSerialMesgQueue(padmgr, ctrlrqueue);
|
||||
PadMgr_UnlockSerialMesgQueue(padmgr, ctrlrQ);
|
||||
}
|
||||
|
||||
void PadMgr_RumbleReset(PadMgr* padmgr) {
|
||||
|
@ -189,102 +192,85 @@ void PadMgr_RumbleReset(PadMgr* padmgr) {
|
|||
|
||||
void PadMgr_RumbleSetSingle(PadMgr* padmgr, u32 ctrlr, u32 rumble) {
|
||||
padmgr->rumbleEnable[ctrlr] = rumble;
|
||||
padmgr->rumbleOnFrames = 0xF0;
|
||||
padmgr->rumbleOnFrames = 240;
|
||||
}
|
||||
|
||||
// 800A23CC in 1.0
|
||||
void PadMgr_RumbleSet(PadMgr* padmgr, u8* ctrlrRumbles) {
|
||||
s32 i;
|
||||
for (i = 0; i < 4; ++i) {
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
padmgr->rumbleEnable[i] = ctrlrRumbles[i];
|
||||
}
|
||||
padmgr->rumbleOnFrames = 0xF0;
|
||||
|
||||
padmgr->rumbleOnFrames = 240;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void PadMgr_ProcessInputs(PadMgr* padmgr) {
|
||||
/*
|
||||
void *sp34;
|
||||
s32 temp_s1;
|
||||
s32 temp_v0_5;
|
||||
u16 temp_a1;
|
||||
u16 temp_v1_2;
|
||||
u8 temp_v0;
|
||||
void *temp_v0_2;
|
||||
void *temp_v0_3;
|
||||
void *temp_v0_4;
|
||||
void *temp_v1;
|
||||
void *phi_s0;
|
||||
void *phi_s3;
|
||||
s32 phi_s2;
|
||||
s32 phi_s1;
|
||||
*/
|
||||
Input* input;
|
||||
PadState* padnow1; //name from debug string
|
||||
s32 i;
|
||||
Input* input;
|
||||
PadState* padnow1; // original name
|
||||
s32 buttonDiff;
|
||||
|
||||
PadMgr_LockPadData(padmgr);
|
||||
input = padmgr->inputs; //s0
|
||||
padnow1 = padmgr->pads; //s3
|
||||
for(i=0; i<padmgr->ncontrollers; ++i, ++input, ++padnow1){
|
||||
input->prev.in = input->cur.in;
|
||||
input->prev.status = input->cur.status;
|
||||
temp_v0 = phi_s3->unk4;
|
||||
switch(padnow1->errno){
|
||||
case 0:
|
||||
input->cur.in = padnow1->input;
|
||||
input->cur.status = padnow1->status;
|
||||
if (padmgr->ctrlrIsConnected[i] == 0) {
|
||||
padmgr->ctrlrIsConnected[i] = 1;
|
||||
osSyncPrintf(&D_80145AF0); //"\x1b[33m"
|
||||
osSyncPrintf(&D_80145AF8, phi_s2 + 1, &D_80145B0C); //"padmgr: %dCon: %s\n" : "Recognized"
|
||||
osSyncPrintf(&D_80145B1C); //"\x1b[m"
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
input->cur.in = input->prev.in;
|
||||
input->cur.status = input->prev.status;
|
||||
LogUtils_LogThreadId(&D_80145B20, 0x17c); //"../padmgr.c"
|
||||
osSyncPrintf(&D_80145B2C, padmgr->ctrlrIsConnected[i]); //"this->ctrlrIsConnected[i] = %d\n"
|
||||
osSyncPrintf(&D_80145B48); //"\x1b[33m"
|
||||
osSyncPrintf(&D_80145B50, temp_s1, &D_80145B64); //"padmgr: %dCon: %s\n" : "Overrun error occurred"
|
||||
osSyncPrintf(&D_80145B80); //"\x1b[m"
|
||||
break;
|
||||
case 8:
|
||||
input->cur.in.button = 0;
|
||||
input->cur.in.x = 0;
|
||||
input->cur.in.y = 0;
|
||||
temp_v0_2 = arg0 + phi_s2;
|
||||
input->cur.errno = padnow1->errno;
|
||||
if (temp_v0_2->ctrlrIsConnected != 0){
|
||||
temp_v0_2->ctrlrIsConnected = 0;
|
||||
temp_v0_2->pakType = 0;
|
||||
temp_v0_2->rumbleCounter = 0xff;
|
||||
osSyncPrintf(&D_80145B84); //"\x1b[33m"
|
||||
osSyncPrintf(&D_80145B8C, phi_s2 + 1, &D_80145BA0); //"padmgr: %dCon: %s\n" : "Do not respond"
|
||||
osSyncPrintf(&D_80145BB0); //"\x1b[m"
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LogUtils_LogThreadId(&D_80145BB4, 0x18c); //"../padmgr.c"
|
||||
osSyncPrintf(&D_80145BC0, padnow1->errno); //"padnow1->errno = %x\n"
|
||||
Fault_AddHungupAndCrash(&D_80145BD8, 0x18d); //"../padmgr.c"
|
||||
|
||||
input = &padmgr->inputs[0];
|
||||
padnow1 = &padmgr->pads[0];
|
||||
|
||||
for (i = 0; i < padmgr->ncontrollers; i++, input++, padnow1++) {
|
||||
input->prev = input->cur;
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
switch (padnow1->errno) {
|
||||
case 0:
|
||||
input->cur = *padnow1;
|
||||
if (!padmgr->ctrlrIsConnected[i]) {
|
||||
padmgr->ctrlrIsConnected[i] = true;
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "認識しました"); // "Recognized"
|
||||
osSyncPrintf(VT_RST);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
input->cur = input->prev;
|
||||
LOG_NUM("this->Key_switch[i]", padmgr->ctrlrIsConnected[i], "../padmgr.c", 380);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "オーバーランエラーが発生"); // "Overrun error occurred"
|
||||
osSyncPrintf(VT_RST);
|
||||
break;
|
||||
case 8:
|
||||
input->cur.in.button = 0;
|
||||
input->cur.in.x = 0;
|
||||
input->cur.in.y = 0;
|
||||
input->cur.errno = padnow1->errno;
|
||||
if (padmgr->ctrlrIsConnected[i]) {
|
||||
padmgr->ctrlrIsConnected[i] = false;
|
||||
padmgr->pakType[i] = 0;
|
||||
padmgr->rumbleCounter[i] = 0xFF;
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "応答しません"); // "Do not respond"?
|
||||
osSyncPrintf(VT_RST);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG_HEX("padnow1->errno", padnow1->errno, "../padmgr.c", 396);
|
||||
Fault_AddHungupAndCrash("../padmgr.c", 397);
|
||||
}
|
||||
input->press.in.button = input->cur.in.button & (input->prev.in.button ^ input->cur.in.button);
|
||||
input->rel.in.button = input->prev.in.button & (input->prev.in.button ^ input->cur.in.button);
|
||||
|
||||
buttonDiff = input->prev.in.button ^ input->cur.in.button;
|
||||
input->press.in.button |= (u16)(buttonDiff & input->cur.in.button);
|
||||
input->rel.in.button |= (u16)(buttonDiff & input->prev.in.button);
|
||||
PadUtils_UpdateRelXY(input);
|
||||
input->press.in.x = (input->cur.in.x - input->prev.in.x) + input->press.in.x;
|
||||
input->press.in.y = (input->cur.in.y - input->prev.in.y) + input->press.in.y;
|
||||
input->press.in.x += (s8)(input->cur.in.x - input->prev.in.x);
|
||||
input->press.in.y += (s8)(input->cur.in.y - input->prev.in.y);
|
||||
}
|
||||
PadMgr_UnlockPadData(arg0);
|
||||
|
||||
PadMgr_UnlockPadData(padmgr);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/padmgr/PadMgr_ProcessInputs.s")
|
||||
#endif
|
||||
|
||||
void PadMgr_HandleRetraceMsg(PadMgr* padmgr) {
|
||||
OSMesgQueue* queue; // s1
|
||||
u32 i;
|
||||
s32 i;
|
||||
OSMesgQueue* queue;
|
||||
u32 mask;
|
||||
|
||||
queue = PadMgr_LockSerialMesgQueue(padmgr);
|
||||
|
@ -293,25 +279,24 @@ void PadMgr_HandleRetraceMsg(PadMgr* padmgr) {
|
|||
padmgr->retraceCallback(padmgr, padmgr->retraceCallbackValue);
|
||||
}
|
||||
osRecvMesg(queue, NULL, OS_MESG_BLOCK);
|
||||
osContGetReadData(&padmgr->pads[0]);
|
||||
osContGetReadData(padmgr->pads);
|
||||
if (padmgr->preNMIShutdown) {
|
||||
bzero(&padmgr->pads[0], 0x18);
|
||||
bzero(padmgr->pads, sizeof(padmgr->pads));
|
||||
}
|
||||
PadMgr_ProcessInputs(padmgr);
|
||||
osContStartQuery(queue);
|
||||
osRecvMesg(queue, NULL, OS_MESG_BLOCK);
|
||||
osContGetQuery(padmgr);
|
||||
osContGetQuery(padmgr->padStatus);
|
||||
PadMgr_UnlockSerialMesgQueue(padmgr, queue);
|
||||
|
||||
mask = 0;
|
||||
for (i = 0; i - 4 != 0; ++i) {
|
||||
if (padmgr->pad_status[i].errno == 0) {
|
||||
if (padmgr->pad_status[i].type - 5 == 0) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (padmgr->padStatus[i].errno == 0) {
|
||||
if (padmgr->padStatus[i].type == 5) {
|
||||
mask |= 1 << i;
|
||||
} else {
|
||||
LogUtils_LogThreadId("../padmgr.c", 0x1ca);
|
||||
osSyncPrintf("this->pad_status[i].type = %x\n", padmgr->pad_status[i].type);
|
||||
// EUC-JP: 知らない種類のコントローラが接続されています | An unknown type of controller is connected
|
||||
LOG_HEX("this->pad_status[i].type", padmgr->padStatus[i].type, "../padmgr.c", 458);
|
||||
// "An unknown type of controller is connected"
|
||||
osSyncPrintf("知らない種類のコントローラが接続されています\n");
|
||||
}
|
||||
}
|
||||
|
@ -333,63 +318,59 @@ void PadMgr_HandleRetraceMsg(PadMgr* padmgr) {
|
|||
|
||||
void PadMgr_HandlePreNMI(PadMgr* padmgr) {
|
||||
osSyncPrintf("padmgr_HandlePreNMI()\n");
|
||||
padmgr->preNMIShutdown = 1;
|
||||
padmgr->preNMIShutdown = true;
|
||||
PadMgr_RumbleReset(padmgr);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Regalloc differences
|
||||
void PadMgr_RequestPadData(PadMgr* padmgr, Input* inputs, s32 mode) {
|
||||
u32 i;
|
||||
Input* pmInputs;
|
||||
Input* newin;
|
||||
s32 i;
|
||||
Input* ogInput;
|
||||
Input* newInput;
|
||||
s32 buttonDiff;
|
||||
|
||||
PadMgr_LockPadData(padmgr);
|
||||
pmInputs = padmgr->inputs;
|
||||
newin = inputs;
|
||||
for (i = 0; i < 4; ++i) {
|
||||
if (mode) {
|
||||
*newin = *pmInputs;
|
||||
pmInputs->press.in.button = 0;
|
||||
pmInputs->press.in.x = 0;
|
||||
pmInputs->press.in.y = 0;
|
||||
pmInputs->rel.in.button = 0;
|
||||
|
||||
ogInput = &padmgr->inputs[0];
|
||||
newInput = &inputs[0];
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (mode != 0) {
|
||||
*newInput = *ogInput;
|
||||
ogInput->press.in.button = 0;
|
||||
ogInput->press.in.x = 0;
|
||||
ogInput->press.in.y = 0;
|
||||
ogInput->rel.in.button = 0;
|
||||
} else {
|
||||
// Correct instructions, wrong regalloc
|
||||
newin->prev = newin->cur;
|
||||
newin->cur = pmInputs->cur;
|
||||
newin->press.in.button = newin->cur.in.button & (newin->prev.in.button ^ newin->cur.in.button);
|
||||
newin->rel.in.button = newin->prev.in.button & (newin->prev.in.button ^ newin->cur.in.button);
|
||||
PadUtils_UpdateRelXY(newin);
|
||||
newin->press.in.x = (newin->cur.in.x - newin->prev.in.x) + newin->press.in.x;
|
||||
newin->press.in.y = (newin->cur.in.y - newin->prev.in.y) + newin->press.in.y;
|
||||
newInput->prev = newInput->cur;
|
||||
newInput->cur = ogInput->cur;
|
||||
buttonDiff = newInput->prev.in.button ^ newInput->cur.in.button;
|
||||
newInput->press.in.button = newInput->cur.in.button & buttonDiff;
|
||||
newInput->rel.in.button = newInput->prev.in.button & buttonDiff;
|
||||
PadUtils_UpdateRelXY(newInput);
|
||||
newInput->press.in.x += (s8)(newInput->cur.in.x - newInput->prev.in.x);
|
||||
newInput->press.in.y += (s8)(newInput->cur.in.y - newInput->prev.in.y);
|
||||
}
|
||||
++pmInputs;
|
||||
++newin;
|
||||
ogInput++;
|
||||
newInput++;
|
||||
}
|
||||
|
||||
PadMgr_UnlockPadData(padmgr);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/padmgr/PadMgr_RequestPadData.s")
|
||||
#endif
|
||||
|
||||
// 800A2918 in 1.0
|
||||
void PadMgr_MainProc(PadMgr* padmgr) {
|
||||
s16* mesg;
|
||||
void PadMgr_ThreadEntry(PadMgr* padmgr) {
|
||||
s16* mesg = NULL;
|
||||
s32 exit;
|
||||
|
||||
mesg = NULL;
|
||||
// EUC-JP: コントローラスレッド実行開始 | Start of controller thread execution
|
||||
// "Controller thread execution start"
|
||||
osSyncPrintf("コントローラスレッド実行開始\n");
|
||||
exit = 0;
|
||||
|
||||
exit = false;
|
||||
while (!exit) {
|
||||
if ((D_8012D280 > 2) && (padmgr->queue3.validCount == 0)) {
|
||||
// EUC-JP: コントローラスレッドイベント待ち | Waiting for controller thread event
|
||||
if ((D_8012D280 > 2) && (padmgr->interruptMsgQ.validCount == 0)) {
|
||||
// "Waiting for controller thread event"
|
||||
osSyncPrintf("コントローラスレッドイベント待ち %lld\n", OS_CYCLES_TO_USEC(osGetTime()));
|
||||
}
|
||||
|
||||
osRecvMesg(&padmgr->queue3, &mesg, OS_MESG_BLOCK);
|
||||
osRecvMesg(&padmgr->interruptMsgQ, &mesg, OS_MESG_BLOCK);
|
||||
LogUtils_CheckNullPointer("msg", mesg, "../padmgr.c", 563);
|
||||
|
||||
switch (*mesg) {
|
||||
|
@ -409,34 +390,35 @@ void PadMgr_MainProc(PadMgr* padmgr) {
|
|||
PadMgr_HandlePreNMI(padmgr);
|
||||
break;
|
||||
case OS_SC_NMI_MSG:
|
||||
exit = 1;
|
||||
exit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
IrqMgr_RemoveClient(padmgr->unk_78, &padmgr->unk_70);
|
||||
// EUC-JP: コントローラスレッド実行終了 | Controller thread execution end
|
||||
IrqMgr_RemoveClient(padmgr->irqMgr, &padmgr->irqClient);
|
||||
|
||||
// "Controller thread execution end"
|
||||
osSyncPrintf("コントローラスレッド実行終了\n");
|
||||
}
|
||||
|
||||
// func_800A2A14 in 1.0
|
||||
void PadMgr_Init(PadMgr* padmgr, OSMesgQueue* siIntMsgQ, UNK_TYPE arg2, OSId id, OSPri priority, void* stack) {
|
||||
// EUC-JP: パッドマネージャ作成 | Create pad manager
|
||||
void PadMgr_Init(PadMgr* padmgr, OSMesgQueue* siIntMsgQ, IrqMgr* irqMgr, OSId id, OSPri priority, void* stack) {
|
||||
// "Pad Manager creation"
|
||||
osSyncPrintf("パッドマネージャ作成 padmgr_Create()\n");
|
||||
bzero(padmgr, sizeof(PadMgr));
|
||||
padmgr->unk_78 = arg2;
|
||||
|
||||
osCreateMesgQueue(&padmgr->queue3, padmgr->msgbuf3, 4);
|
||||
IrqMgr_AddClient(padmgr->unk_78, &padmgr->unk_70, &padmgr->queue3);
|
||||
osCreateMesgQueue(&padmgr->queue1, padmgr->msgbuf1, 1);
|
||||
bzero(padmgr, sizeof(PadMgr));
|
||||
padmgr->irqMgr = irqMgr;
|
||||
|
||||
osCreateMesgQueue(&padmgr->interruptMsgQ, padmgr->interruptMsgBuf, 4);
|
||||
IrqMgr_AddClient(padmgr->irqMgr, &padmgr->irqClient, &padmgr->interruptMsgQ);
|
||||
osCreateMesgQueue(&padmgr->serialMsgQ, padmgr->serialMsgBuf, 1);
|
||||
PadMgr_UnlockSerialMesgQueue(padmgr, siIntMsgQ);
|
||||
osCreateMesgQueue(&padmgr->queue2, padmgr->msgbuf2, 1);
|
||||
osCreateMesgQueue(&padmgr->lockMsgQ, padmgr->lockMsgBuf, 1);
|
||||
PadMgr_UnlockPadData(padmgr);
|
||||
func_800FCD40(siIntMsgQ, &padmgr->validCtrlrsMask, padmgr);
|
||||
|
||||
padmgr->ncontrollers = 4;
|
||||
func_80104D00(padmgr->ncontrollers);
|
||||
|
||||
osCreateThread(&padmgr->thread, id, PadMgr_MainProc, padmgr, stack, priority);
|
||||
osCreateThread(&padmgr->thread, id, PadMgr_ThreadEntry, padmgr, stack, priority);
|
||||
osStartThread(&padmgr->thread);
|
||||
}
|
||||
|
|
|
@ -3120,10 +3120,10 @@ void func_80062E14(GlobalContext* globalCtx, Vec3f* v, Vec3f* arg2) {
|
|||
Audio_PlaySoundGeneral(NA_SE_IT_REFLECTION_WOOD, arg2, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
|
||||
#if 0 // NON_MATCHING
|
||||
#ifdef NON_EQUIVALENT
|
||||
// Incomplete, possibly not using the same logic
|
||||
s32 func_80062ECC(f32 actor_ac_98_10, f32 actor_ac_98_12, f32 arg2, Vec3f* ac_actor_pos, Vec3f* at_actor_pos, Vec3f* arg5, Vec3f* arg6,
|
||||
Vec3f* arg7) {
|
||||
s32 func_80062ECC(f32 actor_ac_98_10, f32 actor_ac_98_12, f32 arg2, Vec3f* ac_actor_pos, Vec3f* at_actor_pos,
|
||||
Vec3f* arg5, Vec3f* arg6, Vec3f* arg7) {
|
||||
// arg5 = SP + 0xA8, unk input
|
||||
// arg6 = SP + 0x90, unk output
|
||||
// arg7 = SP + 0x84, unk output2
|
||||
|
@ -3161,7 +3161,7 @@ s32 func_80062ECC(f32 actor_ac_98_10, f32 actor_ac_98_12, f32 arg2, Vec3f* ac_ac
|
|||
|
||||
phi_v0 = 0;
|
||||
// ada12c: bc1f 0xada138 ~>
|
||||
if (0.0f < delta_a3_a4_sp6C.y) {
|
||||
if (0.0f < delta_a3_a4_sp6C.y) {
|
||||
phi_v0 = 1;
|
||||
}
|
||||
// ada138: beqzl v0,0xada188 ~>
|
||||
|
@ -3172,27 +3172,28 @@ s32 func_80062ECC(f32 actor_ac_98_10, f32 actor_ac_98_12, f32 arg2, Vec3f* ac_ac
|
|||
}
|
||||
|
||||
phi_v1 = 0;
|
||||
if (0.0f < delta_a3_a5_sp60.y) { //ada19c: bc1f 0xada1a8 ~>
|
||||
if (0.0f < delta_a3_a5_sp60.y) { // ada19c: bc1f 0xada1a8 ~>
|
||||
phi_v1 = 1;
|
||||
}
|
||||
//ada1a8: beqzl v1,0xada1f4 ~>
|
||||
// ada1a8: beqzl v1,0xada1f4 ~>
|
||||
if (phi_v1 && delta_a3_a5_sp60.y < actor_ac_98_12) {
|
||||
if (sqrtf(SQ(delta_a3_a5_sp60.x) + SQ(delta_a3_a5_sp60.z)) < actor_ac_98_10) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
//ada1f4
|
||||
// ada1f4
|
||||
sp38 = SQ(delta_a3_a4_sp6C.x) + SQ(delta_a3_a4_sp6C.z) - SQ(actor_ac_98_10); // temp_f12;
|
||||
temp_f2 = SQ(delta_a4_a5_sp54.x) + SQ(delta_a4_a5_sp54.z);
|
||||
if (!(fabsf(temp_f2) < 0.008f)) { // ada23c: bc1t 0xada2f0 ~>
|
||||
temp_f14 = (delta_a4_a5_sp54.x + delta_a4_a5_sp54.x) * delta_a3_a4_sp6C.x + (delta_a4_a5_sp54.z + delta_a4_a5_sp54.z) * delta_a3_a4_sp6C.z;
|
||||
temp_f14 = (delta_a4_a5_sp54.x + delta_a4_a5_sp54.x) * delta_a3_a4_sp6C.x +
|
||||
(delta_a4_a5_sp54.z + delta_a4_a5_sp54.z) * delta_a3_a4_sp6C.z;
|
||||
temp_f0 = SQ(temp_f14);
|
||||
temp_f12 = (4.0f * temp_f2) * sp38;
|
||||
if (temp_f0 < temp_f12) { // ada280: bc1f 0xada290 ~>
|
||||
return 0;
|
||||
}
|
||||
//ada290
|
||||
// ada290
|
||||
temp_f16_2 = temp_f0 - temp_f12;
|
||||
temp_f0 = sqrtf(temp_f16_2);
|
||||
if (0.0f < temp_f16_2) {
|
||||
|
@ -3208,33 +3209,34 @@ s32 func_80062ECC(f32 actor_ac_98_10, f32 actor_ac_98_12, f32 arg2, Vec3f* ac_ac
|
|||
sp4C = (-temp_f14 - temp_f0) / (temp_f2 + temp_f2);
|
||||
}
|
||||
} else { // 0xada2f0
|
||||
temp_f14 = ((delta_a4_a5_sp54.x + delta_a4_a5_sp54.x) * delta_a3_a4_sp6C.x) + ((delta_a4_a5_sp54.z + delta_a4_a5_sp54.z) * delta_a3_a4_sp6C.z);
|
||||
temp_f14 = ((delta_a4_a5_sp54.x + delta_a4_a5_sp54.x) * delta_a3_a4_sp6C.x) +
|
||||
((delta_a4_a5_sp54.z + delta_a4_a5_sp54.z) * delta_a3_a4_sp6C.z);
|
||||
if (!(fabsf(temp_f14) < 0.008f)) { // ada324
|
||||
phi_v0 = 0;
|
||||
sp50 = -sp38 / temp_f14;
|
||||
phi_v1 = 1;
|
||||
} // ada340: b 0xada468
|
||||
else {
|
||||
if (sp38 <= 0.0f) { // ada358: bc1f 0xada460
|
||||
if (sp38 <= 0.0f) { // ada358: bc1f 0xada460
|
||||
phi_a0 = phi_v0;
|
||||
if (phi_v0 != 0) // ada360: beqz v0,0xada388 ~>
|
||||
{
|
||||
phi_a0 = 0;
|
||||
//ada37C
|
||||
phi_a0 = 0;
|
||||
// ada37C
|
||||
if (delta_a3_a4_sp6C.y < actor_ac_98_12) {
|
||||
phi_a0 = 1;
|
||||
}
|
||||
}
|
||||
phi_a1 = phi_a0;
|
||||
//ada38C
|
||||
// ada38C
|
||||
phi_a0 = phi_v1;
|
||||
if (phi_v1 != 0) {
|
||||
phi_a0 = 0;
|
||||
phi_a0 = 0;
|
||||
if (delta_a3_a5_sp60.y < actor_ac_98_12) {
|
||||
phi_a0 = 1;
|
||||
phi_a0 = 1;
|
||||
}
|
||||
}
|
||||
if (phi_a1) { // ada3b4
|
||||
if (phi_a1) { // ada3b4
|
||||
if (phi_a0) { // ada3bc
|
||||
*arg6 = delta_a3_a4_sp6C;
|
||||
*arg7 = delta_a3_a5_sp60;
|
||||
|
@ -3252,7 +3254,7 @@ s32 func_80062ECC(f32 actor_ac_98_10, f32 actor_ac_98_12, f32 arg2, Vec3f* ac_ac
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
//ada460
|
||||
// ada460
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -3263,10 +3265,10 @@ s32 func_80062ECC(f32 actor_ac_98_10, f32 actor_ac_98_12, f32 arg2, Vec3f* ac_ac
|
|||
}
|
||||
} else { // ada4a4
|
||||
phi_a1 = 0;
|
||||
if (sp50 < 0.0f) { //ada4ac
|
||||
if (sp50 < 0.0f) { // ada4ac
|
||||
phi_a1 = 1;
|
||||
}
|
||||
//ada4b8
|
||||
// ada4b8
|
||||
phi_a0 = phi_a1;
|
||||
if (phi_a1 == 0) {
|
||||
phi_a1 = 0;
|
||||
|
@ -3274,7 +3276,7 @@ s32 func_80062ECC(f32 actor_ac_98_10, f32 actor_ac_98_12, f32 arg2, Vec3f* ac_ac
|
|||
phi_a1 = 1;
|
||||
}
|
||||
}
|
||||
//ada4dc
|
||||
// ada4dc
|
||||
phi_a2 = 0;
|
||||
if (sp4C < 0.0f) {
|
||||
phi_a2 = 1;
|
||||
|
@ -3339,7 +3341,7 @@ s32 func_80062ECC(f32 actor_ac_98_10, f32 actor_ac_98_12, f32 arg2, Vec3f* ac_ac
|
|||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/func_80062ECC.s")
|
||||
#endif // NON_MATCHING
|
||||
#endif
|
||||
|
||||
s32 func_800635D0(s32 arg0) {
|
||||
s32 result;
|
||||
|
|
|
@ -100,29 +100,29 @@ void func_801109B0(GlobalContext* globalCtx) {
|
|||
|
||||
if (gSaveContext.equips.buttonItems[0] < 0xF0) {
|
||||
DmaMgr_SendRequest1(interfaceCtx->icon_itemSegment,
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[0] * 0x80, 0x1000,
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[0] * 0x1000, 0x1000,
|
||||
"../z_construct.c", 198);
|
||||
} else if (gSaveContext.equips.buttonItems[0] != 0xFF) {
|
||||
DmaMgr_SendRequest1(interfaceCtx->icon_itemSegment,
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[0] * 0x80, 0x1000,
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[0] * 0x1000, 0x1000,
|
||||
"../z_construct.c", 203);
|
||||
}
|
||||
|
||||
if (gSaveContext.equips.buttonItems[1] < 0xF0) {
|
||||
DmaMgr_SendRequest1((void*)((u32)interfaceCtx->icon_itemSegment + 0x1000),
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[1] * 0x80, 0x1000,
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[1] * 0x1000, 0x1000,
|
||||
"../z_construct.c", 209);
|
||||
}
|
||||
|
||||
if (gSaveContext.equips.buttonItems[2] < 0xF0) {
|
||||
DmaMgr_SendRequest1((void*)((u32)interfaceCtx->icon_itemSegment + 0x2000),
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[2] * 0x80, 0x1000,
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[2] * 0x1000, 0x1000,
|
||||
"../z_construct.c", 214);
|
||||
}
|
||||
|
||||
if (gSaveContext.equips.buttonItems[3] < 0xF0) {
|
||||
DmaMgr_SendRequest1((void*)((u32)interfaceCtx->icon_itemSegment + 0x3000),
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[3] * 0x80, 0x1000,
|
||||
_icon_item_staticSegmentRomStart + gSaveContext.equips.buttonItems[3] * 0x1000, 0x1000,
|
||||
"../z_construct.c", 219);
|
||||
}
|
||||
|
||||
|
|
|
@ -2775,9 +2775,9 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
|
|||
// Start Button Texture, Color & Label
|
||||
gDPPipeSync(gfxCtx->overlay.p++);
|
||||
gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0x78, 0x78, 0x78, interfaceCtx->startAlpha);
|
||||
gSPTextureRectangle(gfxCtx->overlay.p++, sStartButtonLeftPos[gSaveContext.language] << 2, 156,
|
||||
(sStartButtonLeftPos[gSaveContext.language] + 22) << 2, 68, G_TX_RENDERTILE, 0, 0, 1462,
|
||||
1462);
|
||||
gSPTextureRectangle(gfxCtx->overlay.p++, sStartButtonLeftPos[gSaveContext.language] << 2, 68,
|
||||
(sStartButtonLeftPos[gSaveContext.language] + 22) << 2, 156, G_TX_RENDERTILE, 0, 0,
|
||||
1462, 1462);
|
||||
gDPPipeSync(gfxCtx->overlay.p++);
|
||||
gDPSetPrimColor(gfxCtx->overlay.p++, 0, 0, 0xFF, 0xFF, 0xFF, interfaceCtx->startAlpha);
|
||||
gDPSetEnvColor(gfxCtx->overlay.p++, 0x00, 0x00, 0x00, 0x00);
|
||||
|
@ -2795,14 +2795,14 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
|
|||
gDPSetTile(gfxCtx->overlay.p++, G_IM_FMT_IA, G_IM_SIZ_4b, 3, 0, G_TX_RENDERTILE, 0,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOLOD);
|
||||
gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 48, 16);
|
||||
gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 188, 60);
|
||||
|
||||
temp = R_START_LABEL_DD(gSaveContext.language) / 100.0f;
|
||||
gSPTextureRectangle(gfxCtx->overlay.p++, R_START_LABEL_X(gSaveContext.language) << 2,
|
||||
R_START_LABEL_Y(gSaveContext.language) << 2,
|
||||
(R_START_LABEL_X(gSaveContext.language) + (s16)(16 / temp)) << 2,
|
||||
(R_START_LABEL_Y(gSaveContext.language) + (s16)(48 / temp)) << 2, G_TX_RENDERTILE, 0, 0,
|
||||
(s16)(1024 / temp), (s16)(1024 / temp));
|
||||
(R_START_LABEL_X(gSaveContext.language) + (s16)(16.0f / temp)) << 2,
|
||||
(R_START_LABEL_Y(gSaveContext.language) + (s16)(48.0f / temp)) << 2, G_TX_RENDERTILE, 0,
|
||||
0, (s16)(1024.0f / temp), (s16)(1024.0f / temp));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2844,8 +2844,8 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
|
|||
G_TX_NOLOD);
|
||||
gDPSetTileSize(gfxCtx->overlay.p++, G_TX_RENDERTILE, 0, 0, 124, 28);
|
||||
|
||||
gSPTextureRectangle(gfxCtx->overlay.p++, R_C_UP_ICON_X << 2, R_C_UP_ICON_Y << 2, (R_C_UP_ICON_X + 8) << 2,
|
||||
(R_C_UP_ICON_Y + 32) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024);
|
||||
gSPTextureRectangle(gfxCtx->overlay.p++, R_C_UP_ICON_X << 2, R_C_UP_ICON_Y << 2, (R_C_UP_ICON_X + 32) << 2,
|
||||
(R_C_UP_ICON_Y + 8) << 2, G_TX_RENDERTILE, 0, 0, 1024, 1024);
|
||||
}
|
||||
|
||||
sCUpTimer--;
|
||||
|
@ -3310,7 +3310,7 @@ void Interface_Draw(GlobalContext* globalCtx) {
|
|||
R_B_LABEL_DD = 1024.0f / (WREG(37 + gSaveContext.language) / 100.0f);
|
||||
gSPTextureRectangle(gfxCtx->overlay.p++, R_B_LABEL_X(gSaveContext.language) << 2,
|
||||
R_B_LABEL_Y(gSaveContext.language) << 2, (R_B_LABEL_X(gSaveContext.language) + 48) << 2,
|
||||
R_B_LABEL_Y(gSaveContext.language) << 2, G_TX_RENDERTILE, 0, 0, R_B_LABEL_DD,
|
||||
(R_B_LABEL_Y(gSaveContext.language) + 16) << 2, G_TX_RENDERTILE, 0, 0, R_B_LABEL_DD,
|
||||
R_B_LABEL_DD);
|
||||
}
|
||||
|
||||
|
|
|
@ -1365,7 +1365,7 @@ void Gameplay_Main(GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 4583)
|
||||
LOG_NUM("1", 1, "../z_play.c", 4583);
|
||||
}
|
||||
|
||||
Gameplay_Draw(globalCtx);
|
||||
|
|
|
@ -128,20 +128,17 @@ s32 func_8008E9F8(Player* player, s32 arg1) {
|
|||
#ifdef NON_MATCHING
|
||||
// Regalloc only
|
||||
void func_8008EA40(Player* player) {
|
||||
s8 temp;
|
||||
|
||||
if ((s32)(player->stateFlags1 << 9) < 0) {
|
||||
temp = player->unk_154;
|
||||
if ((temp < 0) || (player->heldItemActionParam == temp)) {
|
||||
if (player->stateFlags1 & 0x400000) {
|
||||
if ((player->unk_154 < 0) || (player->heldItemActionParam == player->unk_154)) {
|
||||
if (func_8008F1A0(player) == 0 && func_8008E9D0(player) == 0) {
|
||||
player->unk_15D = 0xA;
|
||||
player->unk_160 = gSaveContext.linkAge + D_80125F40[10];
|
||||
player->unk_160 = gSaveContext.linkAge + &D_80125F40[10];
|
||||
if (player->unk_15E == 0x12) {
|
||||
player->unk_15E = 0x10;
|
||||
} else if (player->unk_15E == 0x13) {
|
||||
player->unk_15E = 0x11;
|
||||
}
|
||||
player->unk_168 = gSaveContext.linkAge + D_80125F40[player->unk_15E];
|
||||
player->unk_168 = gSaveContext.linkAge + &D_80125F40[player->unk_15E];
|
||||
player->unk_15B = 2;
|
||||
player->unk_154 = -1;
|
||||
}
|
||||
|
@ -158,10 +155,10 @@ void func_8008EB2C(Player* player, s32 arg1) {
|
|||
player->unk_15C = D_80125C98[(arg1 * 5) + 1];
|
||||
player->unk_15D = D_80125C98[(arg1 * 5) + 2];
|
||||
player->unk_15E = D_80125C98[(arg1 * 5) + 3];
|
||||
player->unk_164 = gSaveContext.linkAge + D_80125F40[D_80125C98[(arg1 * 5) + 1]];
|
||||
player->unk_160 = gSaveContext.linkAge + D_80125F40[D_80125C98[(arg1 * 5) + 2]];
|
||||
player->unk_168 = gSaveContext.linkAge + D_80125F40[D_80125C98[(arg1 * 5) + 3]];
|
||||
player->unk_16C = gSaveContext.linkAge + D_80125F40[D_80125C98[(arg1 * 5) + 4]];
|
||||
player->unk_164 = gSaveContext.linkAge + &D_80125F40[D_80125C98[(arg1 * 5) + 1]];
|
||||
player->unk_160 = gSaveContext.linkAge + &D_80125F40[D_80125C98[(arg1 * 5) + 2]];
|
||||
player->unk_168 = gSaveContext.linkAge + &D_80125F40[D_80125C98[(arg1 * 5) + 3]];
|
||||
player->unk_16C = gSaveContext.linkAge + &D_80125F40[D_80125C98[(arg1 * 5) + 4]];
|
||||
func_8008EA40(player);
|
||||
}
|
||||
#else
|
||||
|
@ -187,32 +184,30 @@ void func_8008EC70(Player* player) {
|
|||
player->unk_6AD = 0;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Regalloc, ITEM_NONE immediate not reused
|
||||
void func_8008ECAC(GlobalContext* globalCtx, Player* player) {
|
||||
s32 phi_v0;
|
||||
s32 sword;
|
||||
|
||||
if (player->action != 0x56) {
|
||||
player->currentShield = ((gSaveContext.equips.equipment & gEquipMasks[1]) >> gEquipShifts[1]);
|
||||
player->currentTunic = (((gSaveContext.equips.equipment & gEquipMasks[2]) >> gEquipShifts[2]) - 1);
|
||||
player->currentBoots = (((gSaveContext.equips.equipment & gEquipMasks[3]) >> gEquipShifts[3]) - 1);
|
||||
player->currentShield = CUR_EQUIP_VALUE(EQUIP_SHIELD);
|
||||
player->currentTunic = CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1;
|
||||
player->currentBoots = CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1;
|
||||
|
||||
if (gSaveContext.buttonStatus[EQUIP_SWORD] == ITEM_NONE) {
|
||||
player->currentSword = ITEM_NONE;
|
||||
sword = ITEM_NONE;
|
||||
player->currentSword = sword;
|
||||
} else {
|
||||
if (gSaveContext.equips.buttonItems[EQUIP_SWORD] == ITEM_SWORD_KNIFE) {
|
||||
phi_v0 = ITEM_SWORD_BGS;
|
||||
sword = ITEM_SWORD_BGS;
|
||||
} else {
|
||||
phi_v0 = gSaveContext.equips.buttonItems[EQUIP_SWORD];
|
||||
sword = gSaveContext.equips.buttonItems[EQUIP_SWORD];
|
||||
}
|
||||
player->currentSword = phi_v0;
|
||||
player->currentSword = sword;
|
||||
}
|
||||
|
||||
func_8008EC04(player, func_8008E9F8(player, player->heldItemActionParam));
|
||||
func_8008E750(globalCtx, player);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_8008ECAC.s")
|
||||
#endif
|
||||
|
||||
void func_8008ED9C(GlobalContext* globalCtx, Player* player, s32 item, s32 arg2) {
|
||||
Inventory_UpdateBottleItem(globalCtx, item, player->heldItemCButtonIdx);
|
||||
|
@ -509,14 +504,10 @@ void func_800906D4(GlobalContext* globalCtx, Player* player, ColliderTrisItemDim
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Regalloc, single stack difference
|
||||
void func_800907E4(GlobalContext* globalCtx, Player* player, Vec3f* arg2, s32 arg3) {
|
||||
f32 sp4C;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* dispRefs[4];
|
||||
s32 temp_at;
|
||||
f32 sp28;
|
||||
|
||||
sp4C = (player->exchangeItemId != 0) ? 6.0f : 14.0f;
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
|
@ -526,19 +517,13 @@ void func_800907E4(GlobalContext* globalCtx, Player* player, Vec3f* arg2, s32 ar
|
|||
gSPSegment(gfxCtx->polyOpa.p++, 0x06, player->getItemModel);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x06, player->getItemModel);
|
||||
|
||||
sp28 = Math_Sins(player->actor.shape.rot.y);
|
||||
Matrix_Translate((sp28 * 3.299999952316284f) + arg2->x, arg2->y + sp4C,
|
||||
(Math_Coss(player->actor.shape.rot.y) * (3.299999952316284f + (IREG(90) / 10.0f))) + arg2->z,
|
||||
MTXMODE_NEW);
|
||||
temp_at = globalCtx->gameplayFrames;
|
||||
Matrix_RotateZYX(0.0f, ((((globalCtx->gameplayFrames << 5) - temp_at) * 4) + temp_at) * 8, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.20000000298023224f, 0.20000000298023224f, 0.20000000298023224f, MTXMODE_APPLY);
|
||||
Matrix_Translate(arg2->x + (Math_Sins(player->actor.shape.rot.y) * 3.3f), arg2->y + sp4C,
|
||||
arg2->z + ((3.3f + (IREG(90) / 10.0f)) * Math_Coss(player->actor.shape.rot.y)), MTXMODE_NEW);
|
||||
Matrix_RotateRPY(0, globalCtx->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
func_800694A0(globalCtx, arg3 - 1);
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_player_lib.c", 0x975);
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_player_lib/func_800907E4.s")
|
||||
#endif
|
||||
|
||||
void func_800909B4(GlobalContext* globalCtx, Player* player) {
|
||||
if ((player->unk_170 == 0) || !osRecvMesg(&player->unk_194, NULL, OS_MESG_NOBLOCK)) {
|
||||
|
|
|
@ -514,7 +514,6 @@ void SkelAnime_AnimateFrame(AnimationHeader* animationSeg, s32 currentFrame, s32
|
|||
|
||||
for (i = 0; i < limbCount; i++, dst++, index++) {
|
||||
if ((dst == NULL) || (index == NULL) || (frameRotationValueTable == NULL) || (rotationValueTable == NULL)) {
|
||||
if (1) {} // Necessary to match.
|
||||
LOG_ADDRESS("out", dst, "../z_skelanime.c", 1392);
|
||||
LOG_ADDRESS("ref_tbl", index, "../z_skelanime.c", 1393);
|
||||
LOG_ADDRESS("frame_tbl", frameRotationValueTable, "../z_skelanime.c", 1394);
|
||||
|
|
Loading…
Add table
Reference in a new issue