mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-26 02:04:18 +00:00
7e195a3562
* osPfsIsPlug.c and osContSetCh.c OK * update * __osPfsGetStatus.c OK * removed unused asm * Updated all libultra controller files to use new structs instead of the temporary structs. Added os_pfs.h * controller updates * fixed header guard * Made suggested changes * guLookAt.c OK * commit * __osPfsSelectBank.c OK * osPfsDeleteFile.c OK * pfsreadwritefile.c OK * osPfsFreeBlocks.c OK * cleaned up ospfsfreeblocks * started pfsinitpak.c * pfsallocatefile.c OK * contpfs.c decompiled with 1 non matching * osPfsFindFile.c OK * pfsinitpak.c decompiled. one non-matching * Actually fixed merge conflict * sins.c OK * cosf.c sinf.c and sins.c OK * moved osAfterPreNMI to its own file. Renamed code_801031F0 to contquery.c * pfschecker.c OK * final update and rename * Removed makefile testing thing that i accidentally added * Made suggested changes
121 lines
5.6 KiB
ArmAsm
121 lines
5.6 KiB
ArmAsm
glabel __osGetId
|
|
/* B79BE4 80102A44 27BDFF90 */ addiu $sp, $sp, -0x70
|
|
/* B79BE8 80102A48 AFBF001C */ sw $ra, 0x1c($sp)
|
|
/* B79BEC 80102A4C AFB10018 */ sw $s1, 0x18($sp)
|
|
/* B79BF0 80102A50 AFB00014 */ sw $s0, 0x14($sp)
|
|
/* B79BF4 80102A54 908E0065 */ lbu $t6, 0x65($a0)
|
|
/* B79BF8 80102A58 00808025 */ move $s0, $a0
|
|
/* B79BFC 80102A5C 51C00008 */ beql $t6, $zero, .L80102A80
|
|
/* B79C00 80102A60 8E040004 */ lw $a0, 4($s0)
|
|
/* B79C04 80102A64 0C041320 */ jal __osPfsSelectBank
|
|
/* B79C08 80102A68 00002825 */ move $a1, $zero
|
|
/* B79C0C 80102A6C 50400004 */ beql $v0, $zero, .L80102A80
|
|
/* B79C10 80102A70 8E040004 */ lw $a0, 4($s0)
|
|
/* B79C14 80102A74 1000005A */ b .L80102BE0
|
|
/* B79C18 80102A78 8FBF001C */ lw $ra, 0x1c($sp)
|
|
/* B79C1C 80102A7C 8E040004 */ lw $a0, 4($s0)
|
|
.L80102A80:
|
|
/* B79C20 80102A80 8E050008 */ lw $a1, 8($s0)
|
|
/* B79C24 80102A84 24060001 */ li $a2, 1
|
|
/* B79C28 80102A88 0C0417D0 */ jal __osContRamRead
|
|
/* B79C2C 80102A8C 27A7004C */ addiu $a3, $sp, 0x4c
|
|
/* B79C30 80102A90 10400003 */ beqz $v0, .L80102AA0
|
|
/* B79C34 80102A94 27A4004C */ addiu $a0, $sp, 0x4c
|
|
/* B79C38 80102A98 10000051 */ b .L80102BE0
|
|
/* B79C3C 80102A9C 8FBF001C */ lw $ra, 0x1c($sp)
|
|
.L80102AA0:
|
|
/* B79C40 80102AA0 27A5006E */ addiu $a1, $sp, 0x6e
|
|
/* B79C44 80102AA4 0C040925 */ jal __osIdCheckSum
|
|
/* B79C48 80102AA8 27A6006C */ addiu $a2, $sp, 0x6c
|
|
/* B79C4C 80102AAC 97AF006E */ lhu $t7, 0x6e($sp)
|
|
/* B79C50 80102AB0 97B80068 */ lhu $t8, 0x68($sp)
|
|
/* B79C54 80102AB4 27A5004C */ addiu $a1, $sp, 0x4c
|
|
/* B79C58 80102AB8 00A08825 */ move $s1, $a1
|
|
/* B79C5C 80102ABC 15F80004 */ bne $t7, $t8, .L80102AD0
|
|
/* B79C60 80102AC0 97B9006C */ lhu $t9, 0x6c($sp)
|
|
/* B79C64 80102AC4 97A9006A */ lhu $t1, 0x6a($sp)
|
|
/* B79C68 80102AC8 53290015 */ beql $t9, $t1, .L80102B20
|
|
/* B79C6C 80102ACC 962A0018 */ lhu $t2, 0x18($s1)
|
|
.L80102AD0:
|
|
/* B79C70 80102AD0 0C040A38 */ jal __osCheckPackId
|
|
/* B79C74 80102AD4 02002025 */ move $a0, $s0
|
|
/* B79C78 80102AD8 2401000A */ li $at, 10
|
|
/* B79C7C 80102ADC 1441000B */ bne $v0, $at, .L80102B0C
|
|
/* B79C80 80102AE0 00401825 */ move $v1, $v0
|
|
/* B79C84 80102AE4 02002025 */ move $a0, $s0
|
|
/* B79C88 80102AE8 27A5004C */ addiu $a1, $sp, 0x4c
|
|
/* B79C8C 80102AEC 0C040964 */ jal __osRepairPackId
|
|
/* B79C90 80102AF0 27A60028 */ addiu $a2, $sp, 0x28
|
|
/* B79C94 80102AF4 10400003 */ beqz $v0, .L80102B04
|
|
/* B79C98 80102AF8 00000000 */ nop
|
|
/* B79C9C 80102AFC 10000038 */ b .L80102BE0
|
|
/* B79CA0 80102B00 8FBF001C */ lw $ra, 0x1c($sp)
|
|
.L80102B04:
|
|
/* B79CA4 80102B04 10000005 */ b .L80102B1C
|
|
/* B79CA8 80102B08 27B10028 */ addiu $s1, $sp, 0x28
|
|
.L80102B0C:
|
|
/* B79CAC 80102B0C 50400004 */ beql $v0, $zero, .L80102B20
|
|
/* B79CB0 80102B10 962A0018 */ lhu $t2, 0x18($s1)
|
|
/* B79CB4 80102B14 10000031 */ b .L80102BDC
|
|
/* B79CB8 80102B18 00601025 */ move $v0, $v1
|
|
.L80102B1C:
|
|
/* B79CBC 80102B1C 962A0018 */ lhu $t2, 0x18($s1)
|
|
.L80102B20:
|
|
/* B79CC0 80102B20 02002025 */ move $a0, $s0
|
|
/* B79CC4 80102B24 02202825 */ move $a1, $s1
|
|
/* B79CC8 80102B28 314B0001 */ andi $t3, $t2, 1
|
|
/* B79CCC 80102B2C 5560000D */ bnezl $t3, .L80102B64
|
|
/* B79CD0 80102B30 02202025 */ move $a0, $s1
|
|
/* B79CD4 80102B34 0C040964 */ jal __osRepairPackId
|
|
/* B79CD8 80102B38 27A60028 */ addiu $a2, $sp, 0x28
|
|
/* B79CDC 80102B3C 10400003 */ beqz $v0, .L80102B4C
|
|
/* B79CE0 80102B40 97AC0040 */ lhu $t4, 0x40($sp)
|
|
/* B79CE4 80102B44 10000026 */ b .L80102BE0
|
|
/* B79CE8 80102B48 8FBF001C */ lw $ra, 0x1c($sp)
|
|
.L80102B4C:
|
|
/* B79CEC 80102B4C 318D0001 */ andi $t5, $t4, 1
|
|
/* B79CF0 80102B50 15A00003 */ bnez $t5, .L80102B60
|
|
/* B79CF4 80102B54 27B10028 */ addiu $s1, $sp, 0x28
|
|
/* B79CF8 80102B58 10000020 */ b .L80102BDC
|
|
/* B79CFC 80102B5C 2402000B */ li $v0, 11
|
|
.L80102B60:
|
|
/* B79D00 80102B60 02202025 */ move $a0, $s1
|
|
.L80102B64:
|
|
/* B79D04 80102B64 2605000C */ addiu $a1, $s0, 0xc
|
|
/* B79D08 80102B68 0C001BC4 */ jal bcopy
|
|
/* B79D0C 80102B6C 24060020 */ li $a2, 32
|
|
/* B79D10 80102B70 922E001B */ lbu $t6, 0x1b($s1)
|
|
/* B79D14 80102B74 24090010 */ li $t1, 16
|
|
/* B79D18 80102B78 240A0008 */ li $t2, 8
|
|
/* B79D1C 80102B7C AE0E004C */ sw $t6, 0x4c($s0)
|
|
/* B79D20 80102B80 922F001A */ lbu $t7, 0x1a($s1)
|
|
/* B79D24 80102B84 AE090050 */ sw $t1, 0x50($s0)
|
|
/* B79D28 80102B88 AE0A0054 */ sw $t2, 0x54($s0)
|
|
/* B79D2C 80102B8C 31E200FF */ andi $v0, $t7, 0xff
|
|
/* B79D30 80102B90 000218C0 */ sll $v1, $v0, 3
|
|
/* B79D34 80102B94 0002C040 */ sll $t8, $v0, 1
|
|
/* B79D38 80102B98 24680008 */ addiu $t0, $v1, 8
|
|
/* B79D3C 80102B9C 27190003 */ addiu $t9, $t8, 3
|
|
/* B79D40 80102BA0 01035821 */ addu $t3, $t0, $v1
|
|
/* B79D44 80102BA4 AE190060 */ sw $t9, 0x60($s0)
|
|
/* B79D48 80102BA8 AE080058 */ sw $t0, 0x58($s0)
|
|
/* B79D4C 80102BAC AE0B005C */ sw $t3, 0x5c($s0)
|
|
/* B79D50 80102BB0 8E040004 */ lw $a0, 4($s0)
|
|
/* B79D54 80102BB4 8E050008 */ lw $a1, 8($s0)
|
|
/* B79D58 80102BB8 24060007 */ li $a2, 7
|
|
/* B79D5C 80102BBC 2607002C */ addiu $a3, $s0, 0x2c
|
|
/* B79D60 80102BC0 0C0417D0 */ jal __osContRamRead
|
|
/* B79D64 80102BC4 A20F0064 */ sb $t7, 0x64($s0)
|
|
/* B79D68 80102BC8 50400004 */ beql $v0, $zero, .L80102BDC
|
|
/* B79D6C 80102BCC 00001025 */ move $v0, $zero
|
|
/* B79D70 80102BD0 10000003 */ b .L80102BE0
|
|
/* B79D74 80102BD4 8FBF001C */ lw $ra, 0x1c($sp)
|
|
/* B79D78 80102BD8 00001025 */ move $v0, $zero
|
|
.L80102BDC:
|
|
/* B79D7C 80102BDC 8FBF001C */ lw $ra, 0x1c($sp)
|
|
.L80102BE0:
|
|
/* B79D80 80102BE0 8FB00014 */ lw $s0, 0x14($sp)
|
|
/* B79D84 80102BE4 8FB10018 */ lw $s1, 0x18($sp)
|
|
/* B79D88 80102BE8 03E00008 */ jr $ra
|
|
/* B79D8C 80102BEC 27BD0070 */ addiu $sp, $sp, 0x70
|
|
|