1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-14 05:19:36 +00:00
oot/asm/non_matchings/code/pfsinitpak/osPfsInitPak.s

145 lines
6.7 KiB
ArmAsm
Raw Normal View History

2020-06-07 23:38:33 +00:00
glabel osPfsInitPak
2020-03-17 04:31:30 +00:00
/* B7C0E0 80104F40 27BDFF90 */ addiu $sp, $sp, -0x70
/* B7C0E4 80104F44 AFBF001C */ sw $ra, 0x1c($sp)
/* B7C0E8 80104F48 AFB00018 */ sw $s0, 0x18($sp)
/* B7C0EC 80104F4C 00A08025 */ move $s0, $a1
/* B7C0F0 80104F50 AFA40070 */ sw $a0, 0x70($sp)
/* B7C0F4 80104F54 0C0402E8 */ jal __osSiGetAccess
/* B7C0F8 80104F58 AFA60078 */ sw $a2, 0x78($sp)
/* B7C0FC 80104F5C 8FA40070 */ lw $a0, 0x70($sp)
/* B7C100 80104F60 0C040644 */ jal __osPfsGetStatus
2020-03-17 04:31:30 +00:00
/* B7C104 80104F64 8FA50078 */ lw $a1, 0x78($sp)
/* B7C108 80104F68 0C0402F9 */ jal __osSiRelAccess
/* B7C10C 80104F6C AFA2006C */ sw $v0, 0x6c($sp)
/* B7C110 80104F70 8FA3006C */ lw $v1, 0x6c($sp)
/* B7C114 80104F74 8FAE0070 */ lw $t6, 0x70($sp)
/* B7C118 80104F78 02002025 */ move $a0, $s0
/* B7C11C 80104F7C 50600004 */ beql $v1, $zero, .L80104F90
/* B7C120 80104F80 AE0E0004 */ sw $t6, 4($s0)
/* B7C124 80104F84 1000006B */ b .L80105134
/* B7C128 80104F88 00601025 */ move $v0, $v1
/* B7C12C 80104F8C AE0E0004 */ sw $t6, 4($s0)
.L80104F90:
/* B7C130 80104F90 8FAF0078 */ lw $t7, 0x78($sp)
/* B7C134 80104F94 AE000000 */ sw $zero, ($s0)
/* B7C138 80104F98 0C041452 */ jal __osPfsCheckRamArea
2020-03-17 04:31:30 +00:00
/* B7C13C 80104F9C AE0F0008 */ sw $t7, 8($s0)
/* B7C140 80104FA0 10400003 */ beqz $v0, .L80104FB0
/* B7C144 80104FA4 02002025 */ move $a0, $s0
/* B7C148 80104FA8 10000063 */ b .L80105138
/* B7C14C 80104FAC 8FBF001C */ lw $ra, 0x1c($sp)
.L80104FB0:
/* B7C150 80104FB0 0C041320 */ jal __osPfsSelectBank
2020-03-17 04:31:30 +00:00
/* B7C154 80104FB4 00002825 */ move $a1, $zero
/* B7C158 80104FB8 10400003 */ beqz $v0, .L80104FC8
/* B7C15C 80104FBC 24060001 */ li $a2, 1
/* B7C160 80104FC0 1000005D */ b .L80105138
/* B7C164 80104FC4 8FBF001C */ lw $ra, 0x1c($sp)
.L80104FC8:
/* B7C168 80104FC8 8E040004 */ lw $a0, 4($s0)
/* B7C16C 80104FCC 8E050008 */ lw $a1, 8($s0)
/* B7C170 80104FD0 0C0417D0 */ jal __osContRamRead
2020-03-17 04:31:30 +00:00
/* B7C174 80104FD4 27A70048 */ addiu $a3, $sp, 0x48
/* B7C178 80104FD8 10400003 */ beqz $v0, .L80104FE8
/* B7C17C 80104FDC 27A40048 */ addiu $a0, $sp, 0x48
/* B7C180 80104FE0 10000055 */ b .L80105138
/* B7C184 80104FE4 8FBF001C */ lw $ra, 0x1c($sp)
.L80104FE8:
/* B7C188 80104FE8 27A5006A */ addiu $a1, $sp, 0x6a
/* B7C18C 80104FEC 0C040925 */ jal __osIdCheckSum
2020-03-17 04:31:30 +00:00
/* B7C190 80104FF0 27A60068 */ addiu $a2, $sp, 0x68
/* B7C194 80104FF4 97B8006A */ lhu $t8, 0x6a($sp)
/* B7C198 80104FF8 97B90064 */ lhu $t9, 0x64($sp)
/* B7C19C 80104FFC 27A50048 */ addiu $a1, $sp, 0x48
/* B7C1A0 80105000 AFA50044 */ sw $a1, 0x44($sp)
/* B7C1A4 80105004 17190004 */ bne $t8, $t9, .L80105018
/* B7C1A8 80105008 97A90068 */ lhu $t1, 0x68($sp)
/* B7C1AC 8010500C 97AA0066 */ lhu $t2, 0x66($sp)
/* B7C1B0 80105010 512A000A */ beql $t1, $t2, .L8010503C
/* B7C1B4 80105014 97AD0060 */ lhu $t5, 0x60($sp)
.L80105018:
/* B7C1B8 80105018 0C040A38 */ jal __osCheckPackId
2020-03-17 04:31:30 +00:00
/* B7C1BC 8010501C 02002025 */ move $a0, $s0
/* B7C1C0 80105020 50400006 */ beql $v0, $zero, .L8010503C
/* B7C1C4 80105024 97AD0060 */ lhu $t5, 0x60($sp)
/* B7C1C8 80105028 8E0B0000 */ lw $t3, ($s0)
/* B7C1CC 8010502C 356C0004 */ ori $t4, $t3, 4
/* B7C1D0 80105030 10000040 */ b .L80105134
/* B7C1D4 80105034 AE0C0000 */ sw $t4, ($s0)
/* B7C1D8 80105038 97AD0060 */ lhu $t5, 0x60($sp)
.L8010503C:
/* B7C1DC 8010503C 27A50048 */ addiu $a1, $sp, 0x48
/* B7C1E0 80105040 02002025 */ move $a0, $s0
/* B7C1E4 80105044 31AE0001 */ andi $t6, $t5, 1
/* B7C1E8 80105048 55C00016 */ bnezl $t6, .L801050A4
/* B7C1EC 8010504C 8FA40044 */ lw $a0, 0x44($sp)
/* B7C1F0 80105050 0C040964 */ jal __osRepairPackId
2020-03-17 04:31:30 +00:00
/* B7C1F4 80105054 27A60020 */ addiu $a2, $sp, 0x20
/* B7C1F8 80105058 10400009 */ beqz $v0, .L80105080
/* B7C1FC 8010505C 00401825 */ move $v1, $v0
/* B7C200 80105060 2401000A */ li $at, 10
/* B7C204 80105064 14410004 */ bne $v0, $at, .L80105078
/* B7C208 80105068 00000000 */ nop
/* B7C20C 8010506C 8E0F0000 */ lw $t7, ($s0)
/* B7C210 80105070 35F80004 */ ori $t8, $t7, 4
/* B7C214 80105074 AE180000 */ sw $t8, ($s0)
.L80105078:
/* B7C218 80105078 1000002E */ b .L80105134
/* B7C21C 8010507C 00601025 */ move $v0, $v1
.L80105080:
/* B7C220 80105080 97A90038 */ lhu $t1, 0x38($sp)
/* B7C224 80105084 27B90020 */ addiu $t9, $sp, 0x20
/* B7C228 80105088 AFB90044 */ sw $t9, 0x44($sp)
/* B7C22C 8010508C 312A0001 */ andi $t2, $t1, 1
/* B7C230 80105090 55400004 */ bnezl $t2, .L801050A4
/* B7C234 80105094 8FA40044 */ lw $a0, 0x44($sp)
/* B7C238 80105098 10000026 */ b .L80105134
/* B7C23C 8010509C 2402000B */ li $v0, 11
/* B7C240 801050A0 8FA40044 */ lw $a0, 0x44($sp)
.L801050A4:
/* B7C244 801050A4 2605000C */ addiu $a1, $s0, 0xc
/* B7C248 801050A8 0C001BC4 */ jal bcopy
/* B7C24C 801050AC 24060020 */ li $a2, 32
/* B7C250 801050B0 8FAB0044 */ lw $t3, 0x44($sp)
/* B7C254 801050B4 24190010 */ li $t9, 16
/* B7C258 801050B8 24090008 */ li $t1, 8
/* B7C25C 801050BC 916C001B */ lbu $t4, 0x1b($t3)
/* B7C260 801050C0 8E040004 */ lw $a0, 4($s0)
/* B7C264 801050C4 8E050008 */ lw $a1, 8($s0)
/* B7C268 801050C8 AE0C004C */ sw $t4, 0x4c($s0)
/* B7C26C 801050CC 8FAD0044 */ lw $t5, 0x44($sp)
/* B7C270 801050D0 24060007 */ li $a2, 7
/* B7C274 801050D4 2607002C */ addiu $a3, $s0, 0x2c
/* B7C278 801050D8 91AE001A */ lbu $t6, 0x1a($t5)
/* B7C27C 801050DC AE190050 */ sw $t9, 0x50($s0)
/* B7C280 801050E0 AE090054 */ sw $t1, 0x54($s0)
/* B7C284 801050E4 31C200FF */ andi $v0, $t6, 0xff
/* B7C288 801050E8 000218C0 */ sll $v1, $v0, 3
/* B7C28C 801050EC 00027840 */ sll $t7, $v0, 1
/* B7C290 801050F0 24680008 */ addiu $t0, $v1, 8
/* B7C294 801050F4 25F80003 */ addiu $t8, $t7, 3
/* B7C298 801050F8 01035021 */ addu $t2, $t0, $v1
/* B7C29C 801050FC AE180060 */ sw $t8, 0x60($s0)
/* B7C2A0 80105100 AE080058 */ sw $t0, 0x58($s0)
/* B7C2A4 80105104 AE0A005C */ sw $t2, 0x5c($s0)
/* B7C2A8 80105108 0C0417D0 */ jal __osContRamRead
2020-03-17 04:31:30 +00:00
/* B7C2AC 8010510C A20E0064 */ sb $t6, 0x64($s0)
/* B7C2B0 80105110 10400003 */ beqz $v0, .L80105120
/* B7C2B4 80105114 00000000 */ nop
/* B7C2B8 80105118 10000007 */ b .L80105138
/* B7C2BC 8010511C 8FBF001C */ lw $ra, 0x1c($sp)
.L80105120:
/* B7C2C0 80105120 0C041494 */ jal osPfsChecker
2020-03-17 04:31:30 +00:00
/* B7C2C4 80105124 02002025 */ move $a0, $s0
/* B7C2C8 80105128 8E0B0000 */ lw $t3, ($s0)
/* B7C2CC 8010512C 356C0001 */ ori $t4, $t3, 1
/* B7C2D0 80105130 AE0C0000 */ sw $t4, ($s0)
.L80105134:
/* B7C2D4 80105134 8FBF001C */ lw $ra, 0x1c($sp)
.L80105138:
/* B7C2D8 80105138 8FB00018 */ lw $s0, 0x18($sp)
/* B7C2DC 8010513C 27BD0070 */ addiu $sp, $sp, 0x70
/* B7C2E0 80105140 03E00008 */ jr $ra
/* B7C2E4 80105144 00000000 */ nop