mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-27 04:10:30 +00:00
Matched most remaining libultra files (#221)
* 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
This commit is contained in:
parent
e6ca2dfd70
commit
7e195a3562
1
Makefile
1
Makefile
@ -165,7 +165,6 @@ build/asm/%.o: asm/%.s
|
||||
|
||||
build/data/%.o: data/%.s
|
||||
iconv --from UTF-8 --to EUC-JP $^ | $(AS) $(ASFLAGS) -o $@
|
||||
|
||||
#build/assets/%.o: assets/%.s
|
||||
# $(AS) $(ASFLAGS) $^ -o $@
|
||||
# $(OBJCOPY) -O binary $@ $@.bin
|
||||
|
@ -1,131 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel osPfsFreeBlocks
|
||||
/* B771E0 80100040 27BDFEB0 */ addiu $sp, $sp, -0x150
|
||||
/* B771E4 80100044 AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* B771E8 80100048 AFB50028 */ sw $s5, 0x28($sp)
|
||||
/* B771EC 8010004C AFB40024 */ sw $s4, 0x24($sp)
|
||||
/* B771F0 80100050 AFB30020 */ sw $s3, 0x20($sp)
|
||||
/* B771F4 80100054 AFB2001C */ sw $s2, 0x1c($sp)
|
||||
/* B771F8 80100058 AFB10018 */ sw $s1, 0x18($sp)
|
||||
/* B771FC 8010005C AFB00014 */ sw $s0, 0x14($sp)
|
||||
/* B77200 80100060 AFA50154 */ sw $a1, 0x154($sp)
|
||||
/* B77204 80100064 8C8E0000 */ lw $t6, ($a0)
|
||||
/* B77208 80100068 0080A025 */ move $s4, $a0
|
||||
/* B7720C 8010006C 00008025 */ move $s0, $zero
|
||||
/* B77210 80100070 31CF0001 */ andi $t7, $t6, 1
|
||||
/* B77214 80100074 15E00003 */ bnez $t7, .L80100084
|
||||
/* B77218 80100078 00000000 */ nop
|
||||
/* B7721C 8010007C 1000004D */ b .L801001B4
|
||||
/* B77220 80100080 24020005 */ li $v0, 5
|
||||
.L80100084:
|
||||
/* B77224 80100084 0C040AFC */ jal func_80102BF0
|
||||
/* B77228 80100088 02802025 */ move $a0, $s4
|
||||
/* B7722C 8010008C 50400004 */ beql $v0, $zero, .L801000A0
|
||||
/* B77230 80100090 92980064 */ lbu $t8, 0x64($s4)
|
||||
/* B77234 80100094 10000048 */ b .L801001B8
|
||||
/* B77238 80100098 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* B7723C 8010009C 92980064 */ lbu $t8, 0x64($s4)
|
||||
.L801000A0:
|
||||
/* B77240 801000A0 00009825 */ move $s3, $zero
|
||||
/* B77244 801000A4 24150080 */ li $s5, 128
|
||||
/* B77248 801000A8 1B00003E */ blez $t8, .L801001A4
|
||||
/* B7724C 801000AC 27B20148 */ addiu $s2, $sp, 0x148
|
||||
/* B77250 801000B0 24110003 */ li $s1, 3
|
||||
.L801000B4:
|
||||
/* B77254 801000B4 02802025 */ move $a0, $s4
|
||||
/* B77258 801000B8 27A50048 */ addiu $a1, $sp, 0x48
|
||||
/* B7725C 801000BC 00003025 */ move $a2, $zero
|
||||
/* B77260 801000C0 0C040B31 */ jal func_80102CC4
|
||||
/* B77264 801000C4 326700FF */ andi $a3, $s3, 0xff
|
||||
/* B77268 801000C8 10400003 */ beqz $v0, .L801000D8
|
||||
/* B7726C 801000CC 00000000 */ nop
|
||||
/* B77270 801000D0 10000039 */ b .L801001B8
|
||||
/* B77274 801000D4 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
.L801000D8:
|
||||
/* B77278 801000D8 5A600004 */ blezl $s3, .L801000EC
|
||||
/* B7727C 801000DC 8E850060 */ lw $a1, 0x60($s4)
|
||||
/* B77280 801000E0 10000002 */ b .L801000EC
|
||||
/* B77284 801000E4 24050001 */ li $a1, 1
|
||||
/* B77288 801000E8 8E850060 */ lw $a1, 0x60($s4)
|
||||
.L801000EC:
|
||||
/* B7728C 801000EC 28A10080 */ slti $at, $a1, 0x80
|
||||
/* B77290 801000F0 10200026 */ beqz $at, .L8010018C
|
||||
/* B77294 801000F4 00A01825 */ move $v1, $a1
|
||||
/* B77298 801000F8 02A53023 */ subu $a2, $s5, $a1
|
||||
/* B7729C 801000FC 30D90003 */ andi $t9, $a2, 3
|
||||
/* B772A0 80100100 1320000C */ beqz $t9, .L80100134
|
||||
/* B772A4 80100104 03252021 */ addu $a0, $t9, $a1
|
||||
/* B772A8 80100108 00054040 */ sll $t0, $a1, 1
|
||||
/* B772AC 8010010C 27A90048 */ addiu $t1, $sp, 0x48
|
||||
/* B772B0 80100110 01091021 */ addu $v0, $t0, $t1
|
||||
.L80100114:
|
||||
/* B772B4 80100114 944A0000 */ lhu $t2, ($v0)
|
||||
/* B772B8 80100118 24630001 */ addiu $v1, $v1, 1
|
||||
/* B772BC 8010011C 162A0002 */ bne $s1, $t2, .L80100128
|
||||
/* B772C0 80100120 00000000 */ nop
|
||||
/* B772C4 80100124 26100001 */ addiu $s0, $s0, 1
|
||||
.L80100128:
|
||||
/* B772C8 80100128 1483FFFA */ bne $a0, $v1, .L80100114
|
||||
/* B772CC 8010012C 24420002 */ addiu $v0, $v0, 2
|
||||
/* B772D0 80100130 10750016 */ beq $v1, $s5, .L8010018C
|
||||
.L80100134:
|
||||
/* B772D4 80100134 00035840 */ sll $t3, $v1, 1
|
||||
/* B772D8 80100138 27AC0048 */ addiu $t4, $sp, 0x48
|
||||
/* B772DC 8010013C 016C1021 */ addu $v0, $t3, $t4
|
||||
/* B772E0 80100140 944D0000 */ lhu $t5, ($v0)
|
||||
.L80100144:
|
||||
/* B772E4 80100144 562D0003 */ bnel $s1, $t5, .L80100154
|
||||
/* B772E8 80100148 944E0002 */ lhu $t6, 2($v0)
|
||||
/* B772EC 8010014C 26100001 */ addiu $s0, $s0, 1
|
||||
/* B772F0 80100150 944E0002 */ lhu $t6, 2($v0)
|
||||
.L80100154:
|
||||
/* B772F4 80100154 562E0003 */ bnel $s1, $t6, .L80100164
|
||||
/* B772F8 80100158 944F0004 */ lhu $t7, 4($v0)
|
||||
/* B772FC 8010015C 26100001 */ addiu $s0, $s0, 1
|
||||
/* B77300 80100160 944F0004 */ lhu $t7, 4($v0)
|
||||
.L80100164:
|
||||
/* B77304 80100164 562F0003 */ bnel $s1, $t7, .L80100174
|
||||
/* B77308 80100168 94580006 */ lhu $t8, 6($v0)
|
||||
/* B7730C 8010016C 26100001 */ addiu $s0, $s0, 1
|
||||
/* B77310 80100170 94580006 */ lhu $t8, 6($v0)
|
||||
.L80100174:
|
||||
/* B77314 80100174 24420008 */ addiu $v0, $v0, 8
|
||||
/* B77318 80100178 16380002 */ bne $s1, $t8, .L80100184
|
||||
/* B7731C 8010017C 00000000 */ nop
|
||||
/* B77320 80100180 26100001 */ addiu $s0, $s0, 1
|
||||
.L80100184:
|
||||
/* B77324 80100184 5452FFEF */ bnel $v0, $s2, .L80100144
|
||||
/* B77328 80100188 944D0000 */ lhu $t5, ($v0)
|
||||
.L8010018C:
|
||||
/* B7732C 8010018C 92880064 */ lbu $t0, 0x64($s4)
|
||||
/* B77330 80100190 26730001 */ addiu $s3, $s3, 1
|
||||
/* B77334 80100194 327900FF */ andi $t9, $s3, 0xff
|
||||
/* B77338 80100198 0328082A */ slt $at, $t9, $t0
|
||||
/* B7733C 8010019C 1420FFC5 */ bnez $at, .L801000B4
|
||||
/* B77340 801001A0 03209825 */ move $s3, $t9
|
||||
.L801001A4:
|
||||
/* B77344 801001A4 8FAA0154 */ lw $t2, 0x154($sp)
|
||||
/* B77348 801001A8 00104A00 */ sll $t1, $s0, 8
|
||||
/* B7734C 801001AC 00001025 */ move $v0, $zero
|
||||
/* B77350 801001B0 AD490000 */ sw $t1, ($t2)
|
||||
.L801001B4:
|
||||
/* B77354 801001B4 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
.L801001B8:
|
||||
/* B77358 801001B8 8FB00014 */ lw $s0, 0x14($sp)
|
||||
/* B7735C 801001BC 8FB10018 */ lw $s1, 0x18($sp)
|
||||
/* B77360 801001C0 8FB2001C */ lw $s2, 0x1c($sp)
|
||||
/* B77364 801001C4 8FB30020 */ lw $s3, 0x20($sp)
|
||||
/* B77368 801001C8 8FB40024 */ lw $s4, 0x24($sp)
|
||||
/* B7736C 801001CC 8FB50028 */ lw $s5, 0x28($sp)
|
||||
/* B77370 801001D0 03E00008 */ jr $ra
|
||||
/* B77374 801001D4 27BD0150 */ addiu $sp, $sp, 0x150
|
@ -1,330 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel func_801014C0
|
||||
/* B78660 801014C0 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* B78664 801014C4 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* B78668 801014C8 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B7866C 801014CC AFA50024 */ sw $a1, 0x24($sp)
|
||||
/* B78670 801014D0 AFA60028 */ sw $a2, 0x28($sp)
|
||||
/* B78674 801014D4 90AF0000 */ lbu $t7, ($a1)
|
||||
/* B78678 801014D8 90E20000 */ lbu $v0, ($a3)
|
||||
/* B7867C 801014DC 00E08025 */ move $s0, $a3
|
||||
/* B78680 801014E0 00A07025 */ move $t6, $a1
|
||||
/* B78684 801014E4 104F000A */ beq $v0, $t7, .L80101510
|
||||
/* B78688 801014E8 00003025 */ move $a2, $zero
|
||||
/* B7868C 801014EC A0A20000 */ sb $v0, ($a1)
|
||||
/* B78690 801014F0 91C70000 */ lbu $a3, ($t6)
|
||||
/* B78694 801014F4 AFA40020 */ sw $a0, 0x20($sp)
|
||||
/* B78698 801014F8 0C040B31 */ jal func_80102CC4
|
||||
/* B7869C 801014FC 8FA50028 */ lw $a1, 0x28($sp)
|
||||
/* B786A0 80101500 10400003 */ beqz $v0, .L80101510
|
||||
/* B786A4 80101504 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B786A8 80101508 1000001E */ b .L80101584
|
||||
/* B786AC 8010150C 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L80101510:
|
||||
/* B786B0 80101510 92190001 */ lbu $t9, 1($s0)
|
||||
/* B786B4 80101514 8FB80028 */ lw $t8, 0x28($sp)
|
||||
/* B786B8 80101518 00194040 */ sll $t0, $t9, 1
|
||||
/* B786BC 8010151C 03084821 */ addu $t1, $t8, $t0
|
||||
/* B786C0 80101520 95210000 */ lhu $at, ($t1)
|
||||
/* B786C4 80101524 A6010000 */ sh $at, ($s0)
|
||||
/* B786C8 80101528 8C8C0060 */ lw $t4, 0x60($a0)
|
||||
/* B786CC 8010152C 3023FFFF */ andi $v1, $at, 0xffff
|
||||
/* B786D0 80101530 006C082A */ slt $at, $v1, $t4
|
||||
/* B786D4 80101534 5420000C */ bnezl $at, .L80101568
|
||||
/* B786D8 80101538 24010001 */ li $at, 1
|
||||
/* B786DC 8010153C 920D0000 */ lbu $t5, ($s0)
|
||||
/* B786E0 80101540 908F0064 */ lbu $t7, 0x64($a0)
|
||||
/* B786E4 80101544 01AF082A */ slt $at, $t5, $t7
|
||||
/* B786E8 80101548 50200007 */ beql $at, $zero, .L80101568
|
||||
/* B786EC 8010154C 24010001 */ li $at, 1
|
||||
/* B786F0 80101550 92020001 */ lbu $v0, 1($s0)
|
||||
/* B786F4 80101554 18400003 */ blez $v0, .L80101564
|
||||
/* B786F8 80101558 28410080 */ slti $at, $v0, 0x80
|
||||
/* B786FC 8010155C 14200008 */ bnez $at, .L80101580
|
||||
/* B78700 80101560 00001025 */ move $v0, $zero
|
||||
.L80101564:
|
||||
/* B78704 80101564 24010001 */ li $at, 1
|
||||
.L80101568:
|
||||
/* B78708 80101568 14610003 */ bne $v1, $at, .L80101578
|
||||
/* B7870C 8010156C 00000000 */ nop
|
||||
/* B78710 80101570 10000003 */ b .L80101580
|
||||
/* B78714 80101574 24020005 */ li $v0, 5
|
||||
.L80101578:
|
||||
/* B78718 80101578 10000001 */ b .L80101580
|
||||
/* B7871C 8010157C 24020003 */ li $v0, 3
|
||||
.L80101580:
|
||||
/* B78720 80101580 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L80101584:
|
||||
/* B78724 80101584 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B78728 80101588 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* B7872C 8010158C 03E00008 */ jr $ra
|
||||
/* B78730 80101590 00000000 */ nop
|
||||
|
||||
glabel osPfsReadWriteFile
|
||||
/* B78734 80101594 27BDFE90 */ addiu $sp, $sp, -0x170
|
||||
/* B78738 80101598 AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* B7873C 8010159C AFB30028 */ sw $s3, 0x28($sp)
|
||||
/* B78740 801015A0 AFB20024 */ sw $s2, 0x24($sp)
|
||||
/* B78744 801015A4 AFB10020 */ sw $s1, 0x20($sp)
|
||||
/* B78748 801015A8 AFB0001C */ sw $s0, 0x1c($sp)
|
||||
/* B7874C 801015AC AFA60178 */ sw $a2, 0x178($sp)
|
||||
/* B78750 801015B0 8C8E0050 */ lw $t6, 0x50($a0)
|
||||
/* B78754 801015B4 30D000FF */ andi $s0, $a2, 0xff
|
||||
/* B78758 801015B8 00E08825 */ move $s1, $a3
|
||||
/* B7875C 801015BC 00AE082A */ slt $at, $a1, $t6
|
||||
/* B78760 801015C0 10200003 */ beqz $at, .L801015D0
|
||||
/* B78764 801015C4 00809025 */ move $s2, $a0
|
||||
/* B78768 801015C8 04A10003 */ bgez $a1, .L801015D8
|
||||
/* B7876C 801015CC 8FA20180 */ lw $v0, 0x180($sp)
|
||||
.L801015D0:
|
||||
/* B78770 801015D0 100000C7 */ b .L801018F0
|
||||
/* B78774 801015D4 24020005 */ li $v0, 5
|
||||
.L801015D8:
|
||||
/* B78778 801015D8 18400003 */ blez $v0, .L801015E8
|
||||
/* B7877C 801015DC 304F001F */ andi $t7, $v0, 0x1f
|
||||
/* B78780 801015E0 11E00003 */ beqz $t7, .L801015F0
|
||||
/* B78784 801015E4 00000000 */ nop
|
||||
.L801015E8:
|
||||
/* B78788 801015E8 100000C1 */ b .L801018F0
|
||||
/* B7878C 801015EC 24020005 */ li $v0, 5
|
||||
.L801015F0:
|
||||
/* B78790 801015F0 06200003 */ bltz $s1, .L80101600
|
||||
/* B78794 801015F4 3238001F */ andi $t8, $s1, 0x1f
|
||||
/* B78798 801015F8 53000004 */ beql $t8, $zero, .L8010160C
|
||||
/* B7879C 801015FC 8E590000 */ lw $t9, ($s2)
|
||||
.L80101600:
|
||||
/* B787A0 80101600 100000BB */ b .L801018F0
|
||||
/* B787A4 80101604 24020005 */ li $v0, 5
|
||||
/* B787A8 80101608 8E590000 */ lw $t9, ($s2)
|
||||
.L8010160C:
|
||||
/* B787AC 8010160C 02402025 */ move $a0, $s2
|
||||
/* B787B0 80101610 33280001 */ andi $t0, $t9, 1
|
||||
/* B787B4 80101614 15000003 */ bnez $t0, .L80101624
|
||||
/* B787B8 80101618 00000000 */ nop
|
||||
/* B787BC 8010161C 100000B4 */ b .L801018F0
|
||||
/* B787C0 80101620 24020005 */ li $v0, 5
|
||||
.L80101624:
|
||||
/* B787C4 80101624 0C040AFC */ jal func_80102BF0
|
||||
/* B787C8 80101628 AFA50174 */ sw $a1, 0x174($sp)
|
||||
/* B787CC 8010162C 24010002 */ li $at, 2
|
||||
/* B787D0 80101630 54410004 */ bnel $v0, $at, .L80101644
|
||||
/* B787D4 80101634 92490065 */ lbu $t1, 0x65($s2)
|
||||
/* B787D8 80101638 100000AD */ b .L801018F0
|
||||
/* B787DC 8010163C 24020002 */ li $v0, 2
|
||||
/* B787E0 80101640 92490065 */ lbu $t1, 0x65($s2)
|
||||
.L80101644:
|
||||
/* B787E4 80101644 02402025 */ move $a0, $s2
|
||||
/* B787E8 80101648 51200008 */ beql $t1, $zero, .L8010166C
|
||||
/* B787EC 8010164C 8E4A005C */ lw $t2, 0x5c($s2)
|
||||
/* B787F0 80101650 0C041320 */ jal func_80104C80
|
||||
/* B787F4 80101654 00002825 */ move $a1, $zero
|
||||
/* B787F8 80101658 50400004 */ beql $v0, $zero, .L8010166C
|
||||
/* B787FC 8010165C 8E4A005C */ lw $t2, 0x5c($s2)
|
||||
/* B78800 80101660 100000A4 */ b .L801018F4
|
||||
/* B78804 80101664 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* B78808 80101668 8E4A005C */ lw $t2, 0x5c($s2)
|
||||
.L8010166C:
|
||||
/* B7880C 8010166C 8FAB0174 */ lw $t3, 0x174($sp)
|
||||
/* B78810 80101670 8E440004 */ lw $a0, 4($s2)
|
||||
/* B78814 80101674 8E450008 */ lw $a1, 8($s2)
|
||||
/* B78818 80101678 014B3021 */ addu $a2, $t2, $t3
|
||||
/* B7881C 8010167C 30CCFFFF */ andi $t4, $a2, 0xffff
|
||||
/* B78820 80101680 01803025 */ move $a2, $t4
|
||||
/* B78824 80101684 0C0417D0 */ jal osReadMempak
|
||||
/* B78828 80101688 27A7014C */ addiu $a3, $sp, 0x14c
|
||||
/* B7882C 8010168C 10400003 */ beqz $v0, .L8010169C
|
||||
/* B78830 80101690 97AD0150 */ lhu $t5, 0x150($sp)
|
||||
/* B78834 80101694 10000097 */ b .L801018F4
|
||||
/* B78838 80101698 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
.L8010169C:
|
||||
/* B7883C 8010169C 11A00003 */ beqz $t5, .L801016AC
|
||||
/* B78840 801016A0 8FAE014C */ lw $t6, 0x14c($sp)
|
||||
/* B78844 801016A4 15C00003 */ bnez $t6, .L801016B4
|
||||
/* B78848 801016A8 97AF0152 */ lhu $t7, 0x152($sp)
|
||||
.L801016AC:
|
||||
/* B7884C 801016AC 10000090 */ b .L801018F0
|
||||
/* B78850 801016B0 24020005 */ li $v0, 5
|
||||
.L801016B4:
|
||||
/* B78854 801016B4 8E580060 */ lw $t8, 0x60($s2)
|
||||
/* B78858 801016B8 93B90152 */ lbu $t9, 0x152($sp)
|
||||
/* B7885C 801016BC 97AA0152 */ lhu $t2, 0x152($sp)
|
||||
/* B78860 801016C0 01F8082A */ slt $at, $t7, $t8
|
||||
/* B78864 801016C4 5420000A */ bnezl $at, .L801016F0
|
||||
/* B78868 801016C8 24010001 */ li $at, 1
|
||||
/* B7886C 801016CC 92480064 */ lbu $t0, 0x64($s2)
|
||||
/* B78870 801016D0 93A90153 */ lbu $t1, 0x153($sp)
|
||||
/* B78874 801016D4 0328082A */ slt $at, $t9, $t0
|
||||
/* B78878 801016D8 50200005 */ beql $at, $zero, .L801016F0
|
||||
/* B7887C 801016DC 24010001 */ li $at, 1
|
||||
/* B78880 801016E0 19200002 */ blez $t1, .L801016EC
|
||||
/* B78884 801016E4 29210080 */ slti $at, $t1, 0x80
|
||||
/* B78888 801016E8 14200007 */ bnez $at, .L80101708
|
||||
.L801016EC:
|
||||
/* B7888C 801016EC 24010001 */ li $at, 1
|
||||
.L801016F0:
|
||||
/* B78890 801016F0 15410003 */ bne $t2, $at, .L80101700
|
||||
/* B78894 801016F4 00000000 */ nop
|
||||
/* B78898 801016F8 1000007D */ b .L801018F0
|
||||
/* B7889C 801016FC 24020005 */ li $v0, 5
|
||||
.L80101700:
|
||||
/* B788A0 80101700 1000007B */ b .L801018F0
|
||||
/* B788A4 80101704 24020003 */ li $v0, 3
|
||||
.L80101708:
|
||||
/* B788A8 80101708 16000007 */ bnez $s0, .L80101728
|
||||
/* B788AC 8010170C AFB00034 */ sw $s0, 0x34($sp)
|
||||
/* B788B0 80101710 93AC0154 */ lbu $t4, 0x154($sp)
|
||||
/* B788B4 80101714 318D0002 */ andi $t5, $t4, 2
|
||||
/* B788B8 80101718 55A00004 */ bnezl $t5, .L8010172C
|
||||
/* B788BC 8010171C 97AF0152 */ lhu $t7, 0x152($sp)
|
||||
/* B788C0 80101720 10000073 */ b .L801018F0
|
||||
/* B788C4 80101724 24020006 */ li $v0, 6
|
||||
.L80101728:
|
||||
/* B788C8 80101728 97AF0152 */ lhu $t7, 0x152($sp)
|
||||
.L8010172C:
|
||||
/* B788CC 8010172C 240E00FF */ li $t6, 255
|
||||
/* B788D0 80101730 A3AE003B */ sb $t6, 0x3b($sp)
|
||||
/* B788D4 80101734 06210003 */ bgez $s1, .L80101744
|
||||
/* B788D8 80101738 00111143 */ sra $v0, $s1, 5
|
||||
/* B788DC 8010173C 2621001F */ addiu $at, $s1, 0x1f
|
||||
/* B788E0 80101740 00011143 */ sra $v0, $at, 5
|
||||
.L80101744:
|
||||
/* B788E4 80101744 28410008 */ slti $at, $v0, 8
|
||||
/* B788E8 80101748 00408025 */ move $s0, $v0
|
||||
/* B788EC 8010174C 1420000D */ bnez $at, .L80101784
|
||||
/* B788F0 80101750 A7AF0048 */ sh $t7, 0x48($sp)
|
||||
/* B788F4 80101754 02402025 */ move $a0, $s2
|
||||
.L80101758:
|
||||
/* B788F8 80101758 27A5003B */ addiu $a1, $sp, 0x3b
|
||||
/* B788FC 8010175C 27A6004C */ addiu $a2, $sp, 0x4c
|
||||
/* B78900 80101760 0C040530 */ jal func_801014C0
|
||||
/* B78904 80101764 27A70048 */ addiu $a3, $sp, 0x48
|
||||
/* B78908 80101768 10400003 */ beqz $v0, .L80101778
|
||||
/* B7890C 8010176C 2610FFF8 */ addiu $s0, $s0, -8
|
||||
/* B78910 80101770 10000060 */ b .L801018F4
|
||||
/* B78914 80101774 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
.L80101778:
|
||||
/* B78918 80101778 2A010008 */ slti $at, $s0, 8
|
||||
/* B7891C 8010177C 5020FFF6 */ beql $at, $zero, .L80101758
|
||||
/* B78920 80101780 02402025 */ move $a0, $s2
|
||||
.L80101784:
|
||||
/* B78924 80101784 8FA20180 */ lw $v0, 0x180($sp)
|
||||
/* B78928 80101788 8FB10184 */ lw $s1, 0x184($sp)
|
||||
/* B7892C 8010178C 04410003 */ bgez $v0, .L8010179C
|
||||
/* B78930 80101790 0002C143 */ sra $t8, $v0, 5
|
||||
/* B78934 80101794 2441001F */ addiu $at, $v0, 0x1f
|
||||
/* B78938 80101798 0001C143 */ sra $t8, $at, 5
|
||||
.L8010179C:
|
||||
/* B7893C 8010179C 1B000031 */ blez $t8, .L80101864
|
||||
/* B78940 801017A0 03009825 */ move $s3, $t8
|
||||
.L801017A4:
|
||||
/* B78944 801017A4 24010008 */ li $at, 8
|
||||
/* B78948 801017A8 16010009 */ bne $s0, $at, .L801017D0
|
||||
/* B7894C 801017AC 02402025 */ move $a0, $s2
|
||||
/* B78950 801017B0 27A5003B */ addiu $a1, $sp, 0x3b
|
||||
/* B78954 801017B4 27A6004C */ addiu $a2, $sp, 0x4c
|
||||
/* B78958 801017B8 0C040530 */ jal func_801014C0
|
||||
/* B7895C 801017BC 27A70048 */ addiu $a3, $sp, 0x48
|
||||
/* B78960 801017C0 10400003 */ beqz $v0, .L801017D0
|
||||
/* B78964 801017C4 00008025 */ move $s0, $zero
|
||||
/* B78968 801017C8 1000004A */ b .L801018F4
|
||||
/* B7896C 801017CC 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
.L801017D0:
|
||||
/* B78970 801017D0 93B90048 */ lbu $t9, 0x48($sp)
|
||||
/* B78974 801017D4 92480065 */ lbu $t0, 0x65($s2)
|
||||
/* B78978 801017D8 02402025 */ move $a0, $s2
|
||||
/* B7897C 801017DC 53280008 */ beql $t9, $t0, .L80101800
|
||||
/* B78980 801017E0 93A90049 */ lbu $t1, 0x49($sp)
|
||||
/* B78984 801017E4 0C041320 */ jal func_80104C80
|
||||
/* B78988 801017E8 03202825 */ move $a1, $t9
|
||||
/* B7898C 801017EC 50400004 */ beql $v0, $zero, .L80101800
|
||||
/* B78990 801017F0 93A90049 */ lbu $t1, 0x49($sp)
|
||||
/* B78994 801017F4 1000003F */ b .L801018F4
|
||||
/* B78998 801017F8 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* B7899C 801017FC 93A90049 */ lbu $t1, 0x49($sp)
|
||||
.L80101800:
|
||||
/* B789A0 80101800 8FAC0034 */ lw $t4, 0x34($sp)
|
||||
/* B789A4 80101804 02203825 */ move $a3, $s1
|
||||
/* B789A8 80101808 000950C0 */ sll $t2, $t1, 3
|
||||
/* B789AC 8010180C 01503021 */ addu $a2, $t2, $s0
|
||||
/* B789B0 80101810 30CBFFFF */ andi $t3, $a2, 0xffff
|
||||
/* B789B4 80101814 15800007 */ bnez $t4, .L80101834
|
||||
/* B789B8 80101818 01603025 */ move $a2, $t3
|
||||
/* B789BC 8010181C 8E440004 */ lw $a0, 4($s2)
|
||||
/* B789C0 80101820 8E450008 */ lw $a1, 8($s2)
|
||||
/* B789C4 80101824 0C0417D0 */ jal osReadMempak
|
||||
/* B789C8 80101828 02203825 */ move $a3, $s1
|
||||
/* B789CC 8010182C 10000006 */ b .L80101848
|
||||
/* B789D0 80101830 00401825 */ move $v1, $v0
|
||||
.L80101834:
|
||||
/* B789D4 80101834 8E440004 */ lw $a0, 4($s2)
|
||||
/* B789D8 80101838 8E450008 */ lw $a1, 8($s2)
|
||||
/* B789DC 8010183C 0C04173C */ jal func_80105CF0
|
||||
/* B789E0 80101840 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B789E4 80101844 00401825 */ move $v1, $v0
|
||||
.L80101848:
|
||||
/* B789E8 80101848 10400003 */ beqz $v0, .L80101858
|
||||
/* B789EC 8010184C 26310020 */ addiu $s1, $s1, 0x20
|
||||
/* B789F0 80101850 10000027 */ b .L801018F0
|
||||
/* B789F4 80101854 00601025 */ move $v0, $v1
|
||||
.L80101858:
|
||||
/* B789F8 80101858 2673FFFF */ addiu $s3, $s3, -1
|
||||
/* B789FC 8010185C 1660FFD1 */ bnez $s3, .L801017A4
|
||||
/* B78A00 80101860 26100001 */ addiu $s0, $s0, 1
|
||||
.L80101864:
|
||||
/* B78A04 80101864 8FAD0034 */ lw $t5, 0x34($sp)
|
||||
/* B78A08 80101868 93A20154 */ lbu $v0, 0x154($sp)
|
||||
/* B78A0C 8010186C 24010001 */ li $at, 1
|
||||
/* B78A10 80101870 15A1001C */ bne $t5, $at, .L801018E4
|
||||
/* B78A14 80101874 304E0002 */ andi $t6, $v0, 2
|
||||
/* B78A18 80101878 15C0001A */ bnez $t6, .L801018E4
|
||||
/* B78A1C 8010187C 344F0002 */ ori $t7, $v0, 2
|
||||
/* B78A20 80101880 A3AF0154 */ sb $t7, 0x154($sp)
|
||||
/* B78A24 80101884 92580065 */ lbu $t8, 0x65($s2)
|
||||
/* B78A28 80101888 02402025 */ move $a0, $s2
|
||||
/* B78A2C 8010188C 53000008 */ beql $t8, $zero, .L801018B0
|
||||
/* B78A30 80101890 8E48005C */ lw $t0, 0x5c($s2)
|
||||
/* B78A34 80101894 0C041320 */ jal func_80104C80
|
||||
/* B78A38 80101898 00002825 */ move $a1, $zero
|
||||
/* B78A3C 8010189C 50400004 */ beql $v0, $zero, .L801018B0
|
||||
/* B78A40 801018A0 8E48005C */ lw $t0, 0x5c($s2)
|
||||
/* B78A44 801018A4 10000013 */ b .L801018F4
|
||||
/* B78A48 801018A8 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* B78A4C 801018AC 8E48005C */ lw $t0, 0x5c($s2)
|
||||
.L801018B0:
|
||||
/* B78A50 801018B0 8FB90174 */ lw $t9, 0x174($sp)
|
||||
/* B78A54 801018B4 8E440004 */ lw $a0, 4($s2)
|
||||
/* B78A58 801018B8 8E450008 */ lw $a1, 8($s2)
|
||||
/* B78A5C 801018BC 01193021 */ addu $a2, $t0, $t9
|
||||
/* B78A60 801018C0 30C9FFFF */ andi $t1, $a2, 0xffff
|
||||
/* B78A64 801018C4 01203025 */ move $a2, $t1
|
||||
/* B78A68 801018C8 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B78A6C 801018CC 0C04173C */ jal func_80105CF0
|
||||
/* B78A70 801018D0 27A7014C */ addiu $a3, $sp, 0x14c
|
||||
/* B78A74 801018D4 50400004 */ beql $v0, $zero, .L801018E8
|
||||
/* B78A78 801018D8 8E440004 */ lw $a0, 4($s2)
|
||||
/* B78A7C 801018DC 10000005 */ b .L801018F4
|
||||
/* B78A80 801018E0 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
.L801018E4:
|
||||
/* B78A84 801018E4 8E440004 */ lw $a0, 4($s2)
|
||||
.L801018E8:
|
||||
/* B78A88 801018E8 0C040644 */ jal __osPfsGetStatus
|
||||
/* B78A8C 801018EC 8E450008 */ lw $a1, 8($s2)
|
||||
.L801018F0:
|
||||
/* B78A90 801018F0 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
.L801018F4:
|
||||
/* B78A94 801018F4 8FB0001C */ lw $s0, 0x1c($sp)
|
||||
/* B78A98 801018F8 8FB10020 */ lw $s1, 0x20($sp)
|
||||
/* B78A9C 801018FC 8FB20024 */ lw $s2, 0x24($sp)
|
||||
/* B78AA0 80101900 8FB30028 */ lw $s3, 0x28($sp)
|
||||
/* B78AA4 80101904 03E00008 */ jr $ra
|
||||
/* B78AA8 80101908 27BD0170 */ addiu $sp, $sp, 0x170
|
@ -1,337 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel osPfsAllocateFile
|
||||
/* B79050 80101EB0 27BDFD68 */ addiu $sp, $sp, -0x298
|
||||
/* B79054 80101EB4 AFB70040 */ sw $s7, 0x40($sp)
|
||||
/* B79058 80101EB8 AFB6003C */ sw $s6, 0x3c($sp)
|
||||
/* B7905C 80101EBC AFB50038 */ sw $s5, 0x38($sp)
|
||||
/* B79060 80101EC0 AFB30030 */ sw $s3, 0x30($sp)
|
||||
/* B79064 80101EC4 AFA5029C */ sw $a1, 0x29c($sp)
|
||||
/* B79068 80101EC8 30AEFFFF */ andi $t6, $a1, 0xffff
|
||||
/* B7906C 80101ECC 01C02825 */ move $a1, $t6
|
||||
/* B79070 80101ED0 00809825 */ move $s3, $a0
|
||||
/* B79074 80101ED4 AFBF0044 */ sw $ra, 0x44($sp)
|
||||
/* B79078 80101ED8 AFB40034 */ sw $s4, 0x34($sp)
|
||||
/* B7907C 80101EDC AFB2002C */ sw $s2, 0x2c($sp)
|
||||
/* B79080 80101EE0 AFB10028 */ sw $s1, 0x28($sp)
|
||||
/* B79084 80101EE4 AFB00024 */ sw $s0, 0x24($sp)
|
||||
/* B79088 80101EE8 AFA702A4 */ sw $a3, 0x2a4($sp)
|
||||
/* B7908C 80101EEC 0000B025 */ move $s6, $zero
|
||||
/* B79090 80101EF0 0000B825 */ move $s7, $zero
|
||||
/* B79094 80101EF4 11C00003 */ beqz $t6, .L80101F04
|
||||
/* B79098 80101EF8 0000A825 */ move $s5, $zero
|
||||
/* B7909C 80101EFC 14C00003 */ bnez $a2, .L80101F0C
|
||||
/* B790A0 80101F00 8FB102AC */ lw $s1, 0x2ac($sp)
|
||||
.L80101F04:
|
||||
/* B790A4 80101F04 100000AC */ b .L801021B8
|
||||
/* B790A8 80101F08 24020005 */ li $v0, 5
|
||||
.L80101F0C:
|
||||
/* B790AC 80101F0C 263000FF */ addiu $s0, $s1, 0xff
|
||||
/* B790B0 80101F10 8FB802A8 */ lw $t8, 0x2a8($sp)
|
||||
/* B790B4 80101F14 8FB902B0 */ lw $t9, 0x2b0($sp)
|
||||
/* B790B8 80101F18 06010003 */ bgez $s0, .L80101F28
|
||||
/* B790BC 80101F1C 00107A03 */ sra $t7, $s0, 8
|
||||
/* B790C0 80101F20 260100FF */ addiu $at, $s0, 0xff
|
||||
/* B790C4 80101F24 00017A03 */ sra $t7, $at, 8
|
||||
.L80101F28:
|
||||
/* B790C8 80101F28 01E08025 */ move $s0, $t7
|
||||
/* B790CC 80101F2C 01E0A025 */ move $s4, $t7
|
||||
/* B790D0 80101F30 02602025 */ move $a0, $s3
|
||||
/* B790D4 80101F34 8FA702A4 */ lw $a3, 0x2a4($sp)
|
||||
/* B790D8 80101F38 A7A5029E */ sh $a1, 0x29e($sp)
|
||||
/* B790DC 80101F3C AFA602A0 */ sw $a2, 0x2a0($sp)
|
||||
/* B790E0 80101F40 AFB80010 */ sw $t8, 0x10($sp)
|
||||
/* B790E4 80101F44 0C040C04 */ jal osPfsFindFile
|
||||
/* B790E8 80101F48 AFB90014 */ sw $t9, 0x14($sp)
|
||||
/* B790EC 80101F4C 10400005 */ beqz $v0, .L80101F64
|
||||
/* B790F0 80101F50 24010005 */ li $at, 5
|
||||
/* B790F4 80101F54 50410004 */ beql $v0, $at, .L80101F68
|
||||
/* B790F8 80101F58 8FA802B0 */ lw $t0, 0x2b0($sp)
|
||||
/* B790FC 80101F5C 10000097 */ b .L801021BC
|
||||
/* B79100 80101F60 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L80101F64:
|
||||
/* B79104 80101F64 8FA802B0 */ lw $t0, 0x2b0($sp)
|
||||
.L80101F68:
|
||||
/* B79108 80101F68 2401FFFF */ li $at, -1
|
||||
/* B7910C 80101F6C 02602025 */ move $a0, $s3
|
||||
/* B79110 80101F70 8D090000 */ lw $t1, ($t0)
|
||||
/* B79114 80101F74 11210003 */ beq $t1, $at, .L80101F84
|
||||
/* B79118 80101F78 00000000 */ nop
|
||||
/* B7911C 80101F7C 1000008E */ b .L801021B8
|
||||
/* B79120 80101F80 24020009 */ li $v0, 9
|
||||
.L80101F84:
|
||||
/* B79124 80101F84 0C040010 */ jal osPfsFreeBlocks
|
||||
/* B79128 80101F88 27A50054 */ addiu $a1, $sp, 0x54
|
||||
/* B7912C 80101F8C 8FAA0054 */ lw $t2, 0x54($sp)
|
||||
/* B79130 80101F90 0151082A */ slt $at, $t2, $s1
|
||||
/* B79134 80101F94 10200003 */ beqz $at, .L80101FA4
|
||||
/* B79138 80101F98 00000000 */ nop
|
||||
/* B7913C 80101F9C 10000086 */ b .L801021B8
|
||||
/* B79140 80101FA0 24020007 */ li $v0, 7
|
||||
.L80101FA4:
|
||||
/* B79144 80101FA4 16000003 */ bnez $s0, .L80101FB4
|
||||
/* B79148 80101FA8 02602025 */ move $a0, $s3
|
||||
/* B7914C 80101FAC 10000082 */ b .L801021B8
|
||||
/* B79150 80101FB0 24020005 */ li $v0, 5
|
||||
.L80101FB4:
|
||||
/* B79154 80101FB4 8FAB02B0 */ lw $t3, 0x2b0($sp)
|
||||
/* B79158 80101FB8 00002825 */ move $a1, $zero
|
||||
/* B7915C 80101FBC 00003025 */ move $a2, $zero
|
||||
/* B79160 80101FC0 00003825 */ move $a3, $zero
|
||||
/* B79164 80101FC4 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B79168 80101FC8 0C040C04 */ jal osPfsFindFile
|
||||
/* B7916C 80101FCC AFAB0014 */ sw $t3, 0x14($sp)
|
||||
/* B79170 80101FD0 10400005 */ beqz $v0, .L80101FE8
|
||||
/* B79174 80101FD4 24010005 */ li $at, 5
|
||||
/* B79178 80101FD8 50410004 */ beql $v0, $at, .L80101FEC
|
||||
/* B7917C 80101FDC 8FAC02B0 */ lw $t4, 0x2b0($sp)
|
||||
/* B79180 80101FE0 10000076 */ b .L801021BC
|
||||
/* B79184 80101FE4 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L80101FE8:
|
||||
/* B79188 80101FE8 8FAC02B0 */ lw $t4, 0x2b0($sp)
|
||||
.L80101FEC:
|
||||
/* B7918C 80101FEC 2401FFFF */ li $at, -1
|
||||
/* B79190 80101FF0 8D8D0000 */ lw $t5, ($t4)
|
||||
/* B79194 80101FF4 55A10004 */ bnel $t5, $at, .L80102008
|
||||
/* B79198 80101FF8 926E0064 */ lbu $t6, 0x64($s3)
|
||||
/* B7919C 80101FFC 1000006E */ b .L801021B8
|
||||
/* B791A0 80102000 24020008 */ li $v0, 8
|
||||
/* B791A4 80102004 926E0064 */ lbu $t6, 0x64($s3)
|
||||
.L80102008:
|
||||
/* B791A8 80102008 00008025 */ move $s0, $zero
|
||||
/* B791AC 8010200C 27B20180 */ addiu $s2, $sp, 0x180
|
||||
/* B791B0 80102010 19C00049 */ blez $t6, .L80102138
|
||||
/* B791B4 80102014 27B10080 */ addiu $s1, $sp, 0x80
|
||||
.L80102018:
|
||||
/* B791B8 80102018 02602025 */ move $a0, $s3
|
||||
/* B791BC 8010201C 02402825 */ move $a1, $s2
|
||||
/* B791C0 80102020 00003025 */ move $a2, $zero
|
||||
/* B791C4 80102024 0C040B31 */ jal func_80102CC4
|
||||
/* B791C8 80102028 320700FF */ andi $a3, $s0, 0xff
|
||||
/* B791CC 8010202C 10400003 */ beqz $v0, .L8010203C
|
||||
/* B791D0 80102030 02602025 */ move $a0, $s3
|
||||
/* B791D4 80102034 10000061 */ b .L801021BC
|
||||
/* B791D8 80102038 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L8010203C:
|
||||
/* B791DC 8010203C 27AF0290 */ addiu $t7, $sp, 0x290
|
||||
/* B791E0 80102040 27B8028C */ addiu $t8, $sp, 0x28c
|
||||
/* B791E4 80102044 AFB80018 */ sw $t8, 0x18($sp)
|
||||
/* B791E8 80102048 AFAF0014 */ sw $t7, 0x14($sp)
|
||||
/* B791EC 8010204C 02402825 */ move $a1, $s2
|
||||
/* B791F0 80102050 02803025 */ move $a2, $s4
|
||||
/* B791F4 80102054 27A70294 */ addiu $a3, $sp, 0x294
|
||||
/* B791F8 80102058 0C040879 */ jal func_801021E4
|
||||
/* B791FC 8010205C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* B79200 80102060 10400003 */ beqz $v0, .L80102070
|
||||
/* B79204 80102064 8FA30294 */ lw $v1, 0x294($sp)
|
||||
/* B79208 80102068 10000054 */ b .L801021BC
|
||||
/* B7920C 8010206C 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L80102070:
|
||||
/* B79210 80102070 2401FFFF */ li $at, -1
|
||||
/* B79214 80102074 5061002B */ beql $v1, $at, .L80102124
|
||||
/* B79218 80102078 926B0064 */ lbu $t3, 0x64($s3)
|
||||
/* B7921C 8010207C 16A00004 */ bnez $s5, .L80102090
|
||||
/* B79220 80102080 0016C840 */ sll $t9, $s6, 1
|
||||
/* B79224 80102084 A3A30051 */ sb $v1, 0x51($sp)
|
||||
/* B79228 80102088 1000000D */ b .L801020C0
|
||||
/* B7922C 8010208C A3B00050 */ sb $s0, 0x50($sp)
|
||||
.L80102090:
|
||||
/* B79230 80102090 02391021 */ addu $v0, $s1, $t9
|
||||
/* B79234 80102094 A0500000 */ sb $s0, ($v0)
|
||||
/* B79238 80102098 A0430001 */ sb $v1, 1($v0)
|
||||
/* B7923C 8010209C 02602025 */ move $a0, $s3
|
||||
/* B79240 801020A0 02202825 */ move $a1, $s1
|
||||
/* B79244 801020A4 24060001 */ li $a2, 1
|
||||
/* B79248 801020A8 0C040B31 */ jal func_80102CC4
|
||||
/* B7924C 801020AC 32E700FF */ andi $a3, $s7, 0xff
|
||||
/* B79250 801020B0 50400004 */ beql $v0, $zero, .L801020C4
|
||||
/* B79254 801020B4 8FA80290 */ lw $t0, 0x290($sp)
|
||||
/* B79258 801020B8 10000040 */ b .L801021BC
|
||||
/* B7925C 801020BC 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L801020C0:
|
||||
/* B79260 801020C0 8FA80290 */ lw $t0, 0x290($sp)
|
||||
.L801020C4:
|
||||
/* B79264 801020C4 02402025 */ move $a0, $s2
|
||||
/* B79268 801020C8 02202825 */ move $a1, $s1
|
||||
/* B7926C 801020CC 0114082A */ slt $at, $t0, $s4
|
||||
/* B79270 801020D0 5020000A */ beql $at, $zero, .L801020FC
|
||||
/* B79274 801020D4 0000A025 */ move $s4, $zero
|
||||
/* B79278 801020D8 0C001BC4 */ jal bcopy
|
||||
/* B7927C 801020DC 24060100 */ li $a2, 256
|
||||
/* B79280 801020E0 8FA90290 */ lw $t1, 0x290($sp)
|
||||
/* B79284 801020E4 8FB6028C */ lw $s6, 0x28c($sp)
|
||||
/* B79288 801020E8 321700FF */ andi $s7, $s0, 0xff
|
||||
/* B7928C 801020EC 26B50001 */ addiu $s5, $s5, 1
|
||||
/* B79290 801020F0 1000000B */ b .L80102120
|
||||
/* B79294 801020F4 0289A023 */ subu $s4, $s4, $t1
|
||||
/* B79298 801020F8 0000A025 */ move $s4, $zero
|
||||
.L801020FC:
|
||||
/* B7929C 801020FC 02602025 */ move $a0, $s3
|
||||
/* B792A0 80102100 02402825 */ move $a1, $s2
|
||||
/* B792A4 80102104 24060001 */ li $a2, 1
|
||||
/* B792A8 80102108 0C040B31 */ jal func_80102CC4
|
||||
/* B792AC 8010210C 320700FF */ andi $a3, $s0, 0xff
|
||||
/* B792B0 80102110 10400009 */ beqz $v0, .L80102138
|
||||
/* B792B4 80102114 00000000 */ nop
|
||||
/* B792B8 80102118 10000028 */ b .L801021BC
|
||||
/* B792BC 8010211C 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L80102120:
|
||||
/* B792C0 80102120 926B0064 */ lbu $t3, 0x64($s3)
|
||||
.L80102124:
|
||||
/* B792C4 80102124 26100001 */ addiu $s0, $s0, 1
|
||||
/* B792C8 80102128 320A00FF */ andi $t2, $s0, 0xff
|
||||
/* B792CC 8010212C 014B082A */ slt $at, $t2, $t3
|
||||
/* B792D0 80102130 1420FFB9 */ bnez $at, .L80102018
|
||||
/* B792D4 80102134 01408025 */ move $s0, $t2
|
||||
.L80102138:
|
||||
/* B792D8 80102138 1E800004 */ bgtz $s4, .L8010214C
|
||||
/* B792DC 8010213C 8FA30294 */ lw $v1, 0x294($sp)
|
||||
/* B792E0 80102140 2401FFFF */ li $at, -1
|
||||
/* B792E4 80102144 14610003 */ bne $v1, $at, .L80102154
|
||||
/* B792E8 80102148 97AC0050 */ lhu $t4, 0x50($sp)
|
||||
.L8010214C:
|
||||
/* B792EC 8010214C 1000001A */ b .L801021B8
|
||||
/* B792F0 80102150 24020003 */ li $v0, 3
|
||||
.L80102154:
|
||||
/* B792F4 80102154 97AD029E */ lhu $t5, 0x29e($sp)
|
||||
/* B792F8 80102158 8FAE02A0 */ lw $t6, 0x2a0($sp)
|
||||
/* B792FC 8010215C A7AC0066 */ sh $t4, 0x66($sp)
|
||||
/* B79300 80102160 A7A0006A */ sh $zero, 0x6a($sp)
|
||||
/* B79304 80102164 8FA402A4 */ lw $a0, 0x2a4($sp)
|
||||
/* B79308 80102168 27A50070 */ addiu $a1, $sp, 0x70
|
||||
/* B7930C 8010216C 24060010 */ li $a2, 16
|
||||
/* B79310 80102170 A7AD0064 */ sh $t5, 0x64($sp)
|
||||
/* B79314 80102174 0C001BC4 */ jal bcopy
|
||||
/* B79318 80102178 AFAE0060 */ sw $t6, 0x60($sp)
|
||||
/* B7931C 8010217C 8FA402A8 */ lw $a0, 0x2a8($sp)
|
||||
/* B79320 80102180 27A5006C */ addiu $a1, $sp, 0x6c
|
||||
/* B79324 80102184 0C001BC4 */ jal bcopy
|
||||
/* B79328 80102188 24060004 */ li $a2, 4
|
||||
/* B7932C 8010218C 8FAF02B0 */ lw $t7, 0x2b0($sp)
|
||||
/* B79330 80102190 8E79005C */ lw $t9, 0x5c($s3)
|
||||
/* B79334 80102194 8E640004 */ lw $a0, 4($s3)
|
||||
/* B79338 80102198 8DF80000 */ lw $t8, ($t7)
|
||||
/* B7933C 8010219C 8E650008 */ lw $a1, 8($s3)
|
||||
/* B79340 801021A0 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B79344 801021A4 03193021 */ addu $a2, $t8, $t9
|
||||
/* B79348 801021A8 30C8FFFF */ andi $t0, $a2, 0xffff
|
||||
/* B7934C 801021AC 01003025 */ move $a2, $t0
|
||||
/* B79350 801021B0 0C04173C */ jal func_80105CF0
|
||||
/* B79354 801021B4 27A70060 */ addiu $a3, $sp, 0x60
|
||||
.L801021B8:
|
||||
/* B79358 801021B8 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L801021BC:
|
||||
/* B7935C 801021BC 8FB00024 */ lw $s0, 0x24($sp)
|
||||
/* B79360 801021C0 8FB10028 */ lw $s1, 0x28($sp)
|
||||
/* B79364 801021C4 8FB2002C */ lw $s2, 0x2c($sp)
|
||||
/* B79368 801021C8 8FB30030 */ lw $s3, 0x30($sp)
|
||||
/* B7936C 801021CC 8FB40034 */ lw $s4, 0x34($sp)
|
||||
/* B79370 801021D0 8FB50038 */ lw $s5, 0x38($sp)
|
||||
/* B79374 801021D4 8FB6003C */ lw $s6, 0x3c($sp)
|
||||
/* B79378 801021D8 8FB70040 */ lw $s7, 0x40($sp)
|
||||
/* B7937C 801021DC 03E00008 */ jr $ra
|
||||
/* B79380 801021E0 27BD0298 */ addiu $sp, $sp, 0x298
|
||||
|
||||
glabel func_801021E4
|
||||
/* B79384 801021E4 27BDFFF0 */ addiu $sp, $sp, -0x10
|
||||
/* B79388 801021E8 AFB00008 */ sw $s0, 8($sp)
|
||||
/* B7938C 801021EC 93B00023 */ lbu $s0, 0x23($sp)
|
||||
/* B79390 801021F0 AFB1000C */ sw $s1, 0xc($sp)
|
||||
/* B79394 801021F4 00C08825 */ move $s1, $a2
|
||||
/* B79398 801021F8 1A000003 */ blez $s0, .L80102208
|
||||
/* B7939C 801021FC 240B0080 */ li $t3, 128
|
||||
/* B793A0 80102200 10000002 */ b .L8010220C
|
||||
/* B793A4 80102204 24020001 */ li $v0, 1
|
||||
.L80102208:
|
||||
/* B793A8 80102208 8C820060 */ lw $v0, 0x60($a0)
|
||||
.L8010220C:
|
||||
/* B793AC 8010220C 28410080 */ slti $at, $v0, 0x80
|
||||
/* B793B0 80102210 1020000A */ beqz $at, .L8010223C
|
||||
/* B793B4 80102214 00401825 */ move $v1, $v0
|
||||
/* B793B8 80102218 00027040 */ sll $t6, $v0, 1
|
||||
/* B793BC 8010221C 00AE1021 */ addu $v0, $a1, $t6
|
||||
/* B793C0 80102220 240A0003 */ li $t2, 3
|
||||
.L80102224:
|
||||
/* B793C4 80102224 944F0000 */ lhu $t7, ($v0)
|
||||
/* B793C8 80102228 514F0005 */ beql $t2, $t7, .L80102240
|
||||
/* B793CC 8010222C 240B0080 */ li $t3, 128
|
||||
/* B793D0 80102230 24630001 */ addiu $v1, $v1, 1
|
||||
/* B793D4 80102234 146BFFFB */ bne $v1, $t3, .L80102224
|
||||
/* B793D8 80102238 24420002 */ addiu $v0, $v0, 2
|
||||
.L8010223C:
|
||||
/* B793DC 8010223C 240B0080 */ li $t3, 128
|
||||
.L80102240:
|
||||
/* B793E0 80102240 146B0005 */ bne $v1, $t3, .L80102258
|
||||
/* B793E4 80102244 240A0003 */ li $t2, 3
|
||||
/* B793E8 80102248 2418FFFF */ li $t8, -1
|
||||
/* B793EC 8010224C ACF80000 */ sw $t8, ($a3)
|
||||
/* B793F0 80102250 10000030 */ b .L80102314
|
||||
/* B793F4 80102254 00001025 */ move $v0, $zero
|
||||
.L80102258:
|
||||
/* B793F8 80102258 8FA60024 */ lw $a2, 0x24($sp)
|
||||
/* B793FC 8010225C 00602025 */ move $a0, $v1
|
||||
/* B79400 80102260 24190001 */ li $t9, 1
|
||||
/* B79404 80102264 00604025 */ move $t0, $v1
|
||||
/* B79408 80102268 2A210002 */ slti $at, $s1, 2
|
||||
/* B7940C 8010226C 24630001 */ addiu $v1, $v1, 1
|
||||
/* B79410 80102270 14200018 */ bnez $at, .L801022D4
|
||||
/* B79414 80102274 ACD90000 */ sw $t9, ($a2)
|
||||
/* B79418 80102278 28610080 */ slti $at, $v1, 0x80
|
||||
/* B7941C 8010227C 10200015 */ beqz $at, .L801022D4
|
||||
/* B79420 80102280 00036040 */ sll $t4, $v1, 1
|
||||
/* B79424 80102284 00AC1021 */ addu $v0, $a1, $t4
|
||||
/* B79428 80102288 944D0000 */ lhu $t5, ($v0)
|
||||
.L8010228C:
|
||||
/* B7942C 8010228C 00087040 */ sll $t6, $t0, 1
|
||||
/* B79430 80102290 00AE4821 */ addu $t1, $a1, $t6
|
||||
/* B79434 80102294 554D0008 */ bnel $t2, $t5, .L801022B8
|
||||
/* B79438 80102298 8CD90000 */ lw $t9, ($a2)
|
||||
/* B7943C 8010229C A1300000 */ sb $s0, ($t1)
|
||||
/* B79440 801022A0 A1230001 */ sb $v1, 1($t1)
|
||||
/* B79444 801022A4 8CCF0000 */ lw $t7, ($a2)
|
||||
/* B79448 801022A8 00604025 */ move $t0, $v1
|
||||
/* B7944C 801022AC 25F80001 */ addiu $t8, $t7, 1
|
||||
/* B79450 801022B0 ACD80000 */ sw $t8, ($a2)
|
||||
/* B79454 801022B4 8CD90000 */ lw $t9, ($a2)
|
||||
.L801022B8:
|
||||
/* B79458 801022B8 24630001 */ addiu $v1, $v1, 1
|
||||
/* B7945C 801022BC 24420002 */ addiu $v0, $v0, 2
|
||||
/* B79460 801022C0 0331082A */ slt $at, $t9, $s1
|
||||
/* B79464 801022C4 10200003 */ beqz $at, .L801022D4
|
||||
/* B79468 801022C8 28610080 */ slti $at, $v1, 0x80
|
||||
/* B7946C 801022CC 5420FFEF */ bnezl $at, .L8010228C
|
||||
/* B79470 801022D0 944D0000 */ lhu $t5, ($v0)
|
||||
.L801022D4:
|
||||
/* B79474 801022D4 146B0008 */ bne $v1, $t3, .L801022F8
|
||||
/* B79478 801022D8 ACE40000 */ sw $a0, ($a3)
|
||||
/* B7947C 801022DC 8CCC0000 */ lw $t4, ($a2)
|
||||
/* B79480 801022E0 8FAD0028 */ lw $t5, 0x28($sp)
|
||||
/* B79484 801022E4 0191082A */ slt $at, $t4, $s1
|
||||
/* B79488 801022E8 50200004 */ beql $at, $zero, .L801022FC
|
||||
/* B7948C 801022EC 00087840 */ sll $t7, $t0, 1
|
||||
/* B79490 801022F0 10000007 */ b .L80102310
|
||||
/* B79494 801022F4 ADA80000 */ sw $t0, ($t5)
|
||||
.L801022F8:
|
||||
/* B79498 801022F8 00087840 */ sll $t7, $t0, 1
|
||||
.L801022FC:
|
||||
/* B7949C 801022FC 00AFC021 */ addu $t8, $a1, $t7
|
||||
/* B794A0 80102300 240E0001 */ li $t6, 1
|
||||
/* B794A4 80102304 A70E0000 */ sh $t6, ($t8)
|
||||
/* B794A8 80102308 8FB90028 */ lw $t9, 0x28($sp)
|
||||
/* B794AC 8010230C AF200000 */ sw $zero, ($t9)
|
||||
.L80102310:
|
||||
/* B794B0 80102310 00001025 */ move $v0, $zero
|
||||
.L80102314:
|
||||
/* B794B4 80102314 8FB00008 */ lw $s0, 8($sp)
|
||||
/* B794B8 80102318 8FB1000C */ lw $s1, 0xc($sp)
|
||||
/* B794BC 8010231C 03E00008 */ jr $ra
|
||||
/* B794C0 80102320 27BD0010 */ addiu $sp, $sp, 0x10
|
@ -1,836 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel func_80102420
|
||||
/* B795C0 80102420 00001825 */ move $v1, $zero
|
||||
/* B795C4 80102424 00801025 */ move $v0, $a0
|
||||
/* B795C8 80102428 18A00016 */ blez $a1, .L80102484
|
||||
/* B795CC 8010242C 00003025 */ move $a2, $zero
|
||||
/* B795D0 80102430 30A70003 */ andi $a3, $a1, 3
|
||||
/* B795D4 80102434 10E00008 */ beqz $a3, .L80102458
|
||||
/* B795D8 80102438 00E02025 */ move $a0, $a3
|
||||
.L8010243C:
|
||||
/* B795DC 8010243C 904E0000 */ lbu $t6, ($v0)
|
||||
/* B795E0 80102440 24C60001 */ addiu $a2, $a2, 1
|
||||
/* B795E4 80102444 24420001 */ addiu $v0, $v0, 1
|
||||
/* B795E8 80102448 1486FFFC */ bne $a0, $a2, .L8010243C
|
||||
/* B795EC 8010244C 006E1821 */ addu $v1, $v1, $t6
|
||||
/* B795F0 80102450 50C5000D */ beql $a2, $a1, .L80102488
|
||||
/* B795F4 80102454 00601025 */ move $v0, $v1
|
||||
.L80102458:
|
||||
/* B795F8 80102458 904F0000 */ lbu $t7, ($v0)
|
||||
/* B795FC 8010245C 90580001 */ lbu $t8, 1($v0)
|
||||
/* B79600 80102460 90590002 */ lbu $t9, 2($v0)
|
||||
/* B79604 80102464 006F1821 */ addu $v1, $v1, $t7
|
||||
/* B79608 80102468 90480003 */ lbu $t0, 3($v0)
|
||||
/* B7960C 8010246C 00781821 */ addu $v1, $v1, $t8
|
||||
/* B79610 80102470 24C60004 */ addiu $a2, $a2, 4
|
||||
/* B79614 80102474 00791821 */ addu $v1, $v1, $t9
|
||||
/* B79618 80102478 24420004 */ addiu $v0, $v0, 4
|
||||
/* B7961C 8010247C 14C5FFF6 */ bne $a2, $a1, .L80102458
|
||||
/* B79620 80102480 00681821 */ addu $v1, $v1, $t0
|
||||
.L80102484:
|
||||
/* B79624 80102484 00601025 */ move $v0, $v1
|
||||
.L80102488:
|
||||
/* B79628 80102488 3049FFFF */ andi $t1, $v0, 0xffff
|
||||
/* B7962C 8010248C 03E00008 */ jr $ra
|
||||
/* B79630 80102490 01201025 */ move $v0, $t1
|
||||
|
||||
glabel func_80102494
|
||||
/* B79634 80102494 A4C00000 */ sh $zero, ($a2)
|
||||
/* B79638 80102498 A4A00000 */ sh $zero, ($a1)
|
||||
/* B7963C 8010249C 94820000 */ lhu $v0, ($a0)
|
||||
/* B79640 801024A0 24870004 */ addiu $a3, $a0, 4
|
||||
/* B79644 801024A4 24E90002 */ addiu $t1, $a3, 2
|
||||
/* B79648 801024A8 0002C021 */ addu $t8, $zero, $v0
|
||||
/* B7964C 801024AC A4B80000 */ sh $t8, ($a1)
|
||||
/* B79650 801024B0 94D90000 */ lhu $t9, ($a2)
|
||||
/* B79654 801024B4 00406827 */ not $t5, $v0
|
||||
/* B79658 801024B8 24EA0004 */ addiu $t2, $a3, 4
|
||||
/* B7965C 801024BC 032D7021 */ addu $t6, $t9, $t5
|
||||
/* B79660 801024C0 A4CE0000 */ sh $t6, ($a2)
|
||||
/* B79664 801024C4 94AF0000 */ lhu $t7, ($a1)
|
||||
/* B79668 801024C8 94820002 */ lhu $v0, 2($a0)
|
||||
/* B7966C 801024CC 2404001C */ li $a0, 28
|
||||
/* B79670 801024D0 24EB0006 */ addiu $t3, $a3, 6
|
||||
/* B79674 801024D4 01E2C021 */ addu $t8, $t7, $v0
|
||||
/* B79678 801024D8 A4B80000 */ sh $t8, ($a1)
|
||||
/* B7967C 801024DC 94D90000 */ lhu $t9, ($a2)
|
||||
/* B79680 801024E0 00406827 */ not $t5, $v0
|
||||
/* B79684 801024E4 24030004 */ li $v1, 4
|
||||
/* B79688 801024E8 032D7021 */ addu $t6, $t9, $t5
|
||||
/* B7968C 801024EC A4CE0000 */ sh $t6, ($a2)
|
||||
.L801024F0:
|
||||
/* B79690 801024F0 94E20000 */ lhu $v0, ($a3)
|
||||
/* B79694 801024F4 94AF0000 */ lhu $t7, ($a1)
|
||||
/* B79698 801024F8 24630008 */ addiu $v1, $v1, 8
|
||||
/* B7969C 801024FC 00406827 */ not $t5, $v0
|
||||
/* B796A0 80102500 01E2C021 */ addu $t8, $t7, $v0
|
||||
/* B796A4 80102504 A4B80000 */ sh $t8, ($a1)
|
||||
/* B796A8 80102508 94D90000 */ lhu $t9, ($a2)
|
||||
/* B796AC 8010250C 24E70008 */ addiu $a3, $a3, 8
|
||||
/* B796B0 80102510 25290008 */ addiu $t1, $t1, 8
|
||||
/* B796B4 80102514 032D7021 */ addu $t6, $t9, $t5
|
||||
/* B796B8 80102518 A4CE0000 */ sh $t6, ($a2)
|
||||
/* B796BC 8010251C 94AF0000 */ lhu $t7, ($a1)
|
||||
/* B796C0 80102520 9522FFF8 */ lhu $v0, -8($t1)
|
||||
/* B796C4 80102524 254A0008 */ addiu $t2, $t2, 8
|
||||
/* B796C8 80102528 256B0008 */ addiu $t3, $t3, 8
|
||||
/* B796CC 8010252C 01E2C021 */ addu $t8, $t7, $v0
|
||||
/* B796D0 80102530 A4B80000 */ sh $t8, ($a1)
|
||||
/* B796D4 80102534 94D90000 */ lhu $t9, ($a2)
|
||||
/* B796D8 80102538 00406827 */ not $t5, $v0
|
||||
/* B796DC 8010253C 032D7021 */ addu $t6, $t9, $t5
|
||||
/* B796E0 80102540 A4CE0000 */ sh $t6, ($a2)
|
||||
/* B796E4 80102544 94AF0000 */ lhu $t7, ($a1)
|
||||
/* B796E8 80102548 9542FFF8 */ lhu $v0, -8($t2)
|
||||
/* B796EC 8010254C 01E2C021 */ addu $t8, $t7, $v0
|
||||
/* B796F0 80102550 A4B80000 */ sh $t8, ($a1)
|
||||
/* B796F4 80102554 94D90000 */ lhu $t9, ($a2)
|
||||
/* B796F8 80102558 00406827 */ not $t5, $v0
|
||||
/* B796FC 8010255C 032D7021 */ addu $t6, $t9, $t5
|
||||
/* B79700 80102560 A4CE0000 */ sh $t6, ($a2)
|
||||
/* B79704 80102564 94AF0000 */ lhu $t7, ($a1)
|
||||
/* B79708 80102568 9562FFF8 */ lhu $v0, -8($t3)
|
||||
/* B7970C 8010256C 01E2C021 */ addu $t8, $t7, $v0
|
||||
/* B79710 80102570 A4B80000 */ sh $t8, ($a1)
|
||||
/* B79714 80102574 94D90000 */ lhu $t9, ($a2)
|
||||
/* B79718 80102578 00406827 */ not $t5, $v0
|
||||
/* B7971C 8010257C 032D7021 */ addu $t6, $t9, $t5
|
||||
/* B79720 80102580 1464FFDB */ bne $v1, $a0, .L801024F0
|
||||
/* B79724 80102584 A4CE0000 */ sh $t6, ($a2)
|
||||
/* B79728 80102588 03E00008 */ jr $ra
|
||||
/* B7972C 8010258C 00001025 */ move $v0, $zero
|
||||
|
||||
glabel func_80102590
|
||||
/* B79730 80102590 27BDFF60 */ addiu $sp, $sp, -0xa0
|
||||
/* B79734 80102594 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* B79738 80102598 AFB60038 */ sw $s6, 0x38($sp)
|
||||
/* B7973C 8010259C AFB50034 */ sw $s5, 0x34($sp)
|
||||
/* B79740 801025A0 AFB40030 */ sw $s4, 0x30($sp)
|
||||
/* B79744 801025A4 AFB3002C */ sw $s3, 0x2c($sp)
|
||||
/* B79748 801025A8 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* B7974C 801025AC AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* B79750 801025B0 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* B79754 801025B4 240EFFFF */ li $t6, -1
|
||||
/* B79758 801025B8 00809025 */ move $s2, $a0
|
||||
/* B7975C 801025BC 00C0A025 */ move $s4, $a2
|
||||
/* B79760 801025C0 00A0B025 */ move $s6, $a1
|
||||
/* B79764 801025C4 00009825 */ move $s3, $zero
|
||||
/* B79768 801025C8 0C001BA8 */ jal osGetCount
|
||||
/* B7976C 801025CC ACCE0000 */ sw $t6, ($a2)
|
||||
/* B79770 801025D0 AE820004 */ sw $v0, 4($s4)
|
||||
/* B79774 801025D4 8ED9000C */ lw $t9, 0xc($s6)
|
||||
/* B79778 801025D8 8ED80008 */ lw $t8, 8($s6)
|
||||
/* B7977C 801025DC 02402025 */ move $a0, $s2
|
||||
/* B79780 801025E0 AE99000C */ sw $t9, 0xc($s4)
|
||||
/* B79784 801025E4 AE980008 */ sw $t8, 8($s4)
|
||||
/* B79788 801025E8 8EC90014 */ lw $t1, 0x14($s6)
|
||||
/* B7978C 801025EC 8EC80010 */ lw $t0, 0x10($s6)
|
||||
/* B79790 801025F0 AE890014 */ sw $t1, 0x14($s4)
|
||||
/* B79794 801025F4 AE880010 */ sw $t0, 0x10($s4)
|
||||
/* B79798 801025F8 924F0065 */ lbu $t7, 0x65($s2)
|
||||
/* B7979C 801025FC 51E00008 */ beql $t7, $zero, .L80102620
|
||||
/* B797A0 80102600 27B1007C */ addiu $s1, $sp, 0x7c
|
||||
/* B797A4 80102604 0C041320 */ jal func_80104C80
|
||||
/* B797A8 80102608 00002825 */ move $a1, $zero
|
||||
/* B797AC 8010260C 50400004 */ beql $v0, $zero, .L80102620
|
||||
/* B797B0 80102610 27B1007C */ addiu $s1, $sp, 0x7c
|
||||
/* B797B4 80102614 100000A9 */ b .L801028BC
|
||||
/* B797B8 80102618 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* B797BC 8010261C 27B1007C */ addiu $s1, $sp, 0x7c
|
||||
.L80102620:
|
||||
/* B797C0 80102620 0220A825 */ move $s5, $s1
|
||||
/* B797C4 80102624 27B0009C */ addiu $s0, $sp, 0x9c
|
||||
/* B797C8 80102628 02402025 */ move $a0, $s2
|
||||
.L8010262C:
|
||||
/* B797CC 8010262C 0C041320 */ jal func_80104C80
|
||||
/* B797D0 80102630 326500FF */ andi $a1, $s3, 0xff
|
||||
/* B797D4 80102634 10400003 */ beqz $v0, .L80102644
|
||||
/* B797D8 80102638 00003025 */ move $a2, $zero
|
||||
/* B797DC 8010263C 1000009F */ b .L801028BC
|
||||
/* B797E0 80102640 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80102644:
|
||||
/* B797E4 80102644 8E440004 */ lw $a0, 4($s2)
|
||||
/* B797E8 80102648 8E450008 */ lw $a1, 8($s2)
|
||||
/* B797EC 8010264C 0C0417D0 */ jal osReadMempak
|
||||
/* B797F0 80102650 02A03825 */ move $a3, $s5
|
||||
/* B797F4 80102654 10400003 */ beqz $v0, .L80102664
|
||||
/* B797F8 80102658 366B0080 */ ori $t3, $s3, 0x80
|
||||
/* B797FC 8010265C 10000097 */ b .L801028BC
|
||||
/* B79800 80102660 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80102664:
|
||||
/* B79804 80102664 A3AB007C */ sb $t3, 0x7c($sp)
|
||||
/* B79808 80102668 27A2007D */ addiu $v0, $sp, 0x7d
|
||||
.L8010266C:
|
||||
/* B7980C 8010266C 904C0000 */ lbu $t4, ($v0)
|
||||
/* B79810 80102670 24420001 */ addiu $v0, $v0, 1
|
||||
/* B79814 80102674 0050082B */ sltu $at, $v0, $s0
|
||||
/* B79818 80102678 01806827 */ not $t5, $t4
|
||||
/* B7981C 8010267C 1420FFFB */ bnez $at, .L8010266C
|
||||
/* B79820 80102680 A04DFFFF */ sb $t5, -1($v0)
|
||||
/* B79824 80102684 8E440004 */ lw $a0, 4($s2)
|
||||
/* B79828 80102688 8E450008 */ lw $a1, 8($s2)
|
||||
/* B7982C 8010268C AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B79830 80102690 00003025 */ move $a2, $zero
|
||||
/* B79834 80102694 0C04173C */ jal func_80105CF0
|
||||
/* B79838 80102698 02A03825 */ move $a3, $s5
|
||||
/* B7983C 8010269C 10400003 */ beqz $v0, .L801026AC
|
||||
/* B79840 801026A0 00003025 */ move $a2, $zero
|
||||
/* B79844 801026A4 10000085 */ b .L801028BC
|
||||
/* B79848 801026A8 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L801026AC:
|
||||
/* B7984C 801026AC 8E440004 */ lw $a0, 4($s2)
|
||||
/* B79850 801026B0 8E450008 */ lw $a1, 8($s2)
|
||||
/* B79854 801026B4 0C0417D0 */ jal osReadMempak
|
||||
/* B79858 801026B8 27A7005C */ addiu $a3, $sp, 0x5c
|
||||
/* B7985C 801026BC 10400003 */ beqz $v0, .L801026CC
|
||||
/* B79860 801026C0 27A3005C */ addiu $v1, $sp, 0x5c
|
||||
/* B79864 801026C4 1000007D */ b .L801028BC
|
||||
/* B79868 801026C8 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L801026CC:
|
||||
/* B7986C 801026CC 27A2007C */ addiu $v0, $sp, 0x7c
|
||||
.L801026D0:
|
||||
/* B79870 801026D0 906E0000 */ lbu $t6, ($v1)
|
||||
/* B79874 801026D4 90580000 */ lbu $t8, ($v0)
|
||||
/* B79878 801026D8 55D80006 */ bnel $t6, $t8, .L801026F4
|
||||
/* B7987C 801026DC 27B9007C */ addiu $t9, $sp, 0x7c
|
||||
/* B79880 801026E0 24630001 */ addiu $v1, $v1, 1
|
||||
/* B79884 801026E4 0071082B */ sltu $at, $v1, $s1
|
||||
/* B79888 801026E8 1420FFF9 */ bnez $at, .L801026D0
|
||||
/* B7988C 801026EC 24420001 */ addiu $v0, $v0, 1
|
||||
/* B79890 801026F0 27B9007C */ addiu $t9, $sp, 0x7c
|
||||
.L801026F4:
|
||||
/* B79894 801026F4 14790018 */ bne $v1, $t9, .L80102758
|
||||
/* B79898 801026F8 02402025 */ move $a0, $s2
|
||||
/* B7989C 801026FC 5A600013 */ blezl $s3, .L8010274C
|
||||
/* B798A0 80102700 26730001 */ addiu $s3, $s3, 1
|
||||
/* B798A4 80102704 0C041320 */ jal func_80104C80
|
||||
/* B798A8 80102708 00002825 */ move $a1, $zero
|
||||
/* B798AC 8010270C 10400003 */ beqz $v0, .L8010271C
|
||||
/* B798B0 80102710 00003025 */ move $a2, $zero
|
||||
/* B798B4 80102714 10000069 */ b .L801028BC
|
||||
/* B798B8 80102718 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L8010271C:
|
||||
/* B798BC 8010271C 8E440004 */ lw $a0, 4($s2)
|
||||
/* B798C0 80102720 8E450008 */ lw $a1, 8($s2)
|
||||
/* B798C4 80102724 0C0417D0 */ jal osReadMempak
|
||||
/* B798C8 80102728 02A03825 */ move $a3, $s5
|
||||
/* B798CC 8010272C 10400003 */ beqz $v0, .L8010273C
|
||||
/* B798D0 80102730 93A8007C */ lbu $t0, 0x7c($sp)
|
||||
/* B798D4 80102734 10000061 */ b .L801028BC
|
||||
/* B798D8 80102738 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L8010273C:
|
||||
/* B798DC 8010273C 24010080 */ li $at, 128
|
||||
/* B798E0 80102740 55010006 */ bnel $t0, $at, .L8010275C
|
||||
/* B798E4 80102744 92490065 */ lbu $t1, 0x65($s2)
|
||||
/* B798E8 80102748 26730001 */ addiu $s3, $s3, 1
|
||||
.L8010274C:
|
||||
/* B798EC 8010274C 2A61003E */ slti $at, $s3, 0x3e
|
||||
/* B798F0 80102750 5420FFB6 */ bnezl $at, .L8010262C
|
||||
/* B798F4 80102754 02402025 */ move $a0, $s2
|
||||
.L80102758:
|
||||
/* B798F8 80102758 92490065 */ lbu $t1, 0x65($s2)
|
||||
.L8010275C:
|
||||
/* B798FC 8010275C 02402025 */ move $a0, $s2
|
||||
/* B79900 80102760 11200007 */ beqz $t1, .L80102780
|
||||
/* B79904 80102764 00000000 */ nop
|
||||
/* B79908 80102768 0C041320 */ jal func_80104C80
|
||||
/* B7990C 8010276C 00002825 */ move $a1, $zero
|
||||
/* B79910 80102770 10400003 */ beqz $v0, .L80102780
|
||||
/* B79914 80102774 00000000 */ nop
|
||||
/* B79918 80102778 10000050 */ b .L801028BC
|
||||
/* B7991C 8010277C 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80102780:
|
||||
/* B79920 80102780 1A600003 */ blez $s3, .L80102790
|
||||
/* B79924 80102784 02802025 */ move $a0, $s4
|
||||
/* B79928 80102788 10000002 */ b .L80102794
|
||||
/* B7992C 8010278C 24020001 */ li $v0, 1
|
||||
.L80102790:
|
||||
/* B79930 80102790 00001025 */ move $v0, $zero
|
||||
.L80102794:
|
||||
/* B79934 80102794 96CF0018 */ lhu $t7, 0x18($s6)
|
||||
/* B79938 80102798 A293001A */ sb $s3, 0x1a($s4)
|
||||
/* B7993C 8010279C 2685001C */ addiu $a1, $s4, 0x1c
|
||||
/* B79940 801027A0 31EAFFFE */ andi $t2, $t7, 0xfffe
|
||||
/* B79944 801027A4 01425825 */ or $t3, $t2, $v0
|
||||
/* B79948 801027A8 A68B0018 */ sh $t3, 0x18($s4)
|
||||
/* B7994C 801027AC 92CC001B */ lbu $t4, 0x1b($s6)
|
||||
/* B79950 801027B0 2686001E */ addiu $a2, $s4, 0x1e
|
||||
/* B79954 801027B4 0C040925 */ jal func_80102494
|
||||
/* B79958 801027B8 A28C001B */ sb $t4, 0x1b($s4)
|
||||
/* B7995C 801027BC 240D0001 */ li $t5, 1
|
||||
/* B79960 801027C0 240E0003 */ li $t6, 3
|
||||
/* B79964 801027C4 24180004 */ li $t8, 4
|
||||
/* B79968 801027C8 24190006 */ li $t9, 6
|
||||
/* B7996C 801027CC A7AD0048 */ sh $t5, 0x48($sp)
|
||||
/* B79970 801027D0 A7AE004A */ sh $t6, 0x4a($sp)
|
||||
/* B79974 801027D4 A7B8004C */ sh $t8, 0x4c($sp)
|
||||
/* B79978 801027D8 A7B9004E */ sh $t9, 0x4e($sp)
|
||||
/* B7997C 801027DC 27B00048 */ addiu $s0, $sp, 0x48
|
||||
/* B79980 801027E0 27B10050 */ addiu $s1, $sp, 0x50
|
||||
/* B79984 801027E4 8E440004 */ lw $a0, 4($s2)
|
||||
.L801027E8:
|
||||
/* B79988 801027E8 8E450008 */ lw $a1, 8($s2)
|
||||
/* B7998C 801027EC 96060000 */ lhu $a2, ($s0)
|
||||
/* B79990 801027F0 24080001 */ li $t0, 1
|
||||
/* B79994 801027F4 AFA80010 */ sw $t0, 0x10($sp)
|
||||
/* B79998 801027F8 0C04173C */ jal func_80105CF0
|
||||
/* B7999C 801027FC 02803825 */ move $a3, $s4
|
||||
/* B799A0 80102800 10400003 */ beqz $v0, .L80102810
|
||||
/* B799A4 80102804 26100002 */ addiu $s0, $s0, 2
|
||||
/* B799A8 80102808 1000002C */ b .L801028BC
|
||||
/* B799AC 8010280C 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80102810:
|
||||
/* B799B0 80102810 0211082B */ sltu $at, $s0, $s1
|
||||
/* B799B4 80102814 5420FFF4 */ bnezl $at, .L801027E8
|
||||
/* B799B8 80102818 8E440004 */ lw $a0, 4($s2)
|
||||
/* B799BC 8010281C 8E440004 */ lw $a0, 4($s2)
|
||||
/* B799C0 80102820 8E450008 */ lw $a1, 8($s2)
|
||||
/* B799C4 80102824 24060001 */ li $a2, 1
|
||||
/* B799C8 80102828 0C0417D0 */ jal osReadMempak
|
||||
/* B799CC 8010282C 02A03825 */ move $a3, $s5
|
||||
/* B799D0 80102830 10400003 */ beqz $v0, .L80102840
|
||||
/* B799D4 80102834 02801825 */ move $v1, $s4
|
||||
/* B799D8 80102838 10000020 */ b .L801028BC
|
||||
/* B799DC 8010283C 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80102840:
|
||||
/* B799E0 80102840 27A2007C */ addiu $v0, $sp, 0x7c
|
||||
/* B799E4 80102844 27A4009C */ addiu $a0, $sp, 0x9c
|
||||
.L80102848:
|
||||
/* B799E8 80102848 90490000 */ lbu $t1, ($v0)
|
||||
/* B799EC 8010284C 906F0000 */ lbu $t7, ($v1)
|
||||
/* B799F0 80102850 512F0004 */ beql $t1, $t7, .L80102864
|
||||
/* B799F4 80102854 904A0001 */ lbu $t2, 1($v0)
|
||||
/* B799F8 80102858 10000017 */ b .L801028B8
|
||||
/* B799FC 8010285C 2402000B */ li $v0, 11
|
||||
/* B79A00 80102860 904A0001 */ lbu $t2, 1($v0)
|
||||
.L80102864:
|
||||
/* B79A04 80102864 906B0001 */ lbu $t3, 1($v1)
|
||||
/* B79A08 80102868 514B0004 */ beql $t2, $t3, .L8010287C
|
||||
/* B79A0C 8010286C 904C0002 */ lbu $t4, 2($v0)
|
||||
/* B79A10 80102870 10000011 */ b .L801028B8
|
||||
/* B79A14 80102874 2402000B */ li $v0, 11
|
||||
/* B79A18 80102878 904C0002 */ lbu $t4, 2($v0)
|
||||
.L8010287C:
|
||||
/* B79A1C 8010287C 906D0002 */ lbu $t5, 2($v1)
|
||||
/* B79A20 80102880 518D0004 */ beql $t4, $t5, .L80102894
|
||||
/* B79A24 80102884 904E0003 */ lbu $t6, 3($v0)
|
||||
/* B79A28 80102888 1000000B */ b .L801028B8
|
||||
/* B79A2C 8010288C 2402000B */ li $v0, 11
|
||||
/* B79A30 80102890 904E0003 */ lbu $t6, 3($v0)
|
||||
.L80102894:
|
||||
/* B79A34 80102894 90780003 */ lbu $t8, 3($v1)
|
||||
/* B79A38 80102898 24420004 */ addiu $v0, $v0, 4
|
||||
/* B79A3C 8010289C 11D80003 */ beq $t6, $t8, .L801028AC
|
||||
/* B79A40 801028A0 00000000 */ nop
|
||||
/* B79A44 801028A4 10000004 */ b .L801028B8
|
||||
/* B79A48 801028A8 2402000B */ li $v0, 11
|
||||
.L801028AC:
|
||||
/* B79A4C 801028AC 1444FFE6 */ bne $v0, $a0, .L80102848
|
||||
/* B79A50 801028B0 24630004 */ addiu $v1, $v1, 4
|
||||
/* B79A54 801028B4 00001025 */ move $v0, $zero
|
||||
.L801028B8:
|
||||
/* B79A58 801028B8 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L801028BC:
|
||||
/* B79A5C 801028BC 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* B79A60 801028C0 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* B79A64 801028C4 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* B79A68 801028C8 8FB3002C */ lw $s3, 0x2c($sp)
|
||||
/* B79A6C 801028CC 8FB40030 */ lw $s4, 0x30($sp)
|
||||
/* B79A70 801028D0 8FB50034 */ lw $s5, 0x34($sp)
|
||||
/* B79A74 801028D4 8FB60038 */ lw $s6, 0x38($sp)
|
||||
/* B79A78 801028D8 03E00008 */ jr $ra
|
||||
/* B79A7C 801028DC 27BD00A0 */ addiu $sp, $sp, 0xa0
|
||||
|
||||
glabel func_801028E0
|
||||
/* B79A80 801028E0 27BDFFA0 */ addiu $sp, $sp, -0x60
|
||||
/* B79A84 801028E4 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* B79A88 801028E8 AFB60038 */ sw $s6, 0x38($sp)
|
||||
/* B79A8C 801028EC AFB50034 */ sw $s5, 0x34($sp)
|
||||
/* B79A90 801028F0 AFB40030 */ sw $s4, 0x30($sp)
|
||||
/* B79A94 801028F4 AFB3002C */ sw $s3, 0x2c($sp)
|
||||
/* B79A98 801028F8 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* B79A9C 801028FC AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* B79AA0 80102900 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* B79AA4 80102904 908E0065 */ lbu $t6, 0x65($a0)
|
||||
/* B79AA8 80102908 00A09025 */ move $s2, $a1
|
||||
/* B79AAC 8010290C 00809825 */ move $s3, $a0
|
||||
/* B79AB0 80102910 51C00008 */ beql $t6, $zero, .L80102934
|
||||
/* B79AB4 80102914 240F0001 */ li $t7, 1
|
||||
/* B79AB8 80102918 0C041320 */ jal func_80104C80
|
||||
/* B79ABC 8010291C 00002825 */ move $a1, $zero
|
||||
/* B79AC0 80102920 50400004 */ beql $v0, $zero, .L80102934
|
||||
/* B79AC4 80102924 240F0001 */ li $t7, 1
|
||||
/* B79AC8 80102928 1000003D */ b .L80102A20
|
||||
/* B79ACC 8010292C 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* B79AD0 80102930 240F0001 */ li $t7, 1
|
||||
.L80102934:
|
||||
/* B79AD4 80102934 24180003 */ li $t8, 3
|
||||
/* B79AD8 80102938 24190004 */ li $t9, 4
|
||||
/* B79ADC 8010293C 24080006 */ li $t0, 6
|
||||
/* B79AE0 80102940 A7AF0058 */ sh $t7, 0x58($sp)
|
||||
/* B79AE4 80102944 A7B8005A */ sh $t8, 0x5a($sp)
|
||||
/* B79AE8 80102948 A7B9005C */ sh $t9, 0x5c($sp)
|
||||
/* B79AEC 8010294C A7A8005E */ sh $t0, 0x5e($sp)
|
||||
/* B79AF0 80102950 24110001 */ li $s1, 1
|
||||
/* B79AF4 80102954 27B0005A */ addiu $s0, $sp, 0x5a
|
||||
/* B79AF8 80102958 27B60050 */ addiu $s6, $sp, 0x50
|
||||
/* B79AFC 8010295C 24150004 */ li $s5, 4
|
||||
/* B79B00 80102960 27B40052 */ addiu $s4, $sp, 0x52
|
||||
.L80102964:
|
||||
/* B79B04 80102964 8E640004 */ lw $a0, 4($s3)
|
||||
/* B79B08 80102968 8E650008 */ lw $a1, 8($s3)
|
||||
/* B79B0C 8010296C 96060000 */ lhu $a2, ($s0)
|
||||
/* B79B10 80102970 0C0417D0 */ jal osReadMempak
|
||||
/* B79B14 80102974 02403825 */ move $a3, $s2
|
||||
/* B79B18 80102978 10400003 */ beqz $v0, .L80102988
|
||||
/* B79B1C 8010297C 02402025 */ move $a0, $s2
|
||||
/* B79B20 80102980 10000027 */ b .L80102A20
|
||||
/* B79B24 80102984 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80102988:
|
||||
/* B79B28 80102988 02802825 */ move $a1, $s4
|
||||
/* B79B2C 8010298C 0C040925 */ jal func_80102494
|
||||
/* B79B30 80102990 02C03025 */ move $a2, $s6
|
||||
/* B79B34 80102994 97A90052 */ lhu $t1, 0x52($sp)
|
||||
/* B79B38 80102998 964A001C */ lhu $t2, 0x1c($s2)
|
||||
/* B79B3C 8010299C 97AB0050 */ lhu $t3, 0x50($sp)
|
||||
/* B79B40 801029A0 552A0005 */ bnel $t1, $t2, .L801029B8
|
||||
/* B79B44 801029A4 26310001 */ addiu $s1, $s1, 1
|
||||
/* B79B48 801029A8 964C001E */ lhu $t4, 0x1e($s2)
|
||||
/* B79B4C 801029AC 116C0004 */ beq $t3, $t4, .L801029C0
|
||||
/* B79B50 801029B0 00000000 */ nop
|
||||
/* B79B54 801029B4 26310001 */ addiu $s1, $s1, 1
|
||||
.L801029B8:
|
||||
/* B79B58 801029B8 1635FFEA */ bne $s1, $s5, .L80102964
|
||||
/* B79B5C 801029BC 26100002 */ addiu $s0, $s0, 2
|
||||
.L801029C0:
|
||||
/* B79B60 801029C0 16350003 */ bne $s1, $s5, .L801029D0
|
||||
/* B79B64 801029C4 00008025 */ move $s0, $zero
|
||||
/* B79B68 801029C8 10000014 */ b .L80102A1C
|
||||
/* B79B6C 801029CC 2402000A */ li $v0, 10
|
||||
.L801029D0:
|
||||
/* B79B70 801029D0 27B40058 */ addiu $s4, $sp, 0x58
|
||||
.L801029D4:
|
||||
/* B79B74 801029D4 1211000D */ beq $s0, $s1, .L80102A0C
|
||||
/* B79B78 801029D8 00106840 */ sll $t5, $s0, 1
|
||||
/* B79B7C 801029DC 028D7021 */ addu $t6, $s4, $t5
|
||||
/* B79B80 801029E0 95C60000 */ lhu $a2, ($t6)
|
||||
/* B79B84 801029E4 8E640004 */ lw $a0, 4($s3)
|
||||
/* B79B88 801029E8 8E650008 */ lw $a1, 8($s3)
|
||||
/* B79B8C 801029EC 240F0001 */ li $t7, 1
|
||||
/* B79B90 801029F0 AFAF0010 */ sw $t7, 0x10($sp)
|
||||
/* B79B94 801029F4 0C04173C */ jal func_80105CF0
|
||||
/* B79B98 801029F8 02403825 */ move $a3, $s2
|
||||
/* B79B9C 801029FC 50400004 */ beql $v0, $zero, .L80102A10
|
||||
/* B79BA0 80102A00 26100001 */ addiu $s0, $s0, 1
|
||||
/* B79BA4 80102A04 10000006 */ b .L80102A20
|
||||
/* B79BA8 80102A08 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80102A0C:
|
||||
/* B79BAC 80102A0C 26100001 */ addiu $s0, $s0, 1
|
||||
.L80102A10:
|
||||
/* B79BB0 80102A10 1615FFF0 */ bne $s0, $s5, .L801029D4
|
||||
/* B79BB4 80102A14 00000000 */ nop
|
||||
/* B79BB8 80102A18 00001025 */ move $v0, $zero
|
||||
.L80102A1C:
|
||||
/* B79BBC 80102A1C 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80102A20:
|
||||
/* B79BC0 80102A20 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* B79BC4 80102A24 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* B79BC8 80102A28 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* B79BCC 80102A2C 8FB3002C */ lw $s3, 0x2c($sp)
|
||||
/* B79BD0 80102A30 8FB40030 */ lw $s4, 0x30($sp)
|
||||
/* B79BD4 80102A34 8FB50034 */ lw $s5, 0x34($sp)
|
||||
/* B79BD8 80102A38 8FB60038 */ lw $s6, 0x38($sp)
|
||||
/* B79BDC 80102A3C 03E00008 */ jr $ra
|
||||
/* B79BE0 80102A40 27BD0060 */ addiu $sp, $sp, 0x60
|
||||
|
||||
glabel func_80102A44
|
||||
/* 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 func_80104C80
|
||||
/* 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 osReadMempak
|
||||
/* 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 func_80102494
|
||||
/* 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 func_801028E0
|
||||
/* 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 func_80102590
|
||||
/* 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 func_80102590
|
||||
/* 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 osReadMempak
|
||||
/* 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
|
||||
|
||||
glabel func_80102BF0
|
||||
/* B79D90 80102BF0 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* B79D94 80102BF4 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* B79D98 80102BF8 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B79D9C 80102BFC 908E0065 */ lbu $t6, 0x65($a0)
|
||||
/* B79DA0 80102C00 00808025 */ move $s0, $a0
|
||||
/* B79DA4 80102C04 51C0000F */ beql $t6, $zero, .L80102C44
|
||||
/* B79DA8 80102C08 8E040004 */ lw $a0, 4($s0)
|
||||
/* B79DAC 80102C0C 0C041320 */ jal func_80104C80
|
||||
/* B79DB0 80102C10 00002825 */ move $a1, $zero
|
||||
/* B79DB4 80102C14 24010002 */ li $at, 2
|
||||
/* B79DB8 80102C18 14410005 */ bne $v0, $at, .L80102C30
|
||||
/* B79DBC 80102C1C 00401825 */ move $v1, $v0
|
||||
/* B79DC0 80102C20 02002025 */ move $a0, $s0
|
||||
/* B79DC4 80102C24 0C041320 */ jal func_80104C80
|
||||
/* B79DC8 80102C28 00002825 */ move $a1, $zero
|
||||
/* B79DCC 80102C2C 00401825 */ move $v1, $v0
|
||||
.L80102C30:
|
||||
/* B79DD0 80102C30 50400004 */ beql $v0, $zero, .L80102C44
|
||||
/* B79DD4 80102C34 8E040004 */ lw $a0, 4($s0)
|
||||
/* B79DD8 80102C38 1000001D */ b .L80102CB0
|
||||
/* B79DDC 80102C3C 00601025 */ move $v0, $v1
|
||||
/* B79DE0 80102C40 8E040004 */ lw $a0, 4($s0)
|
||||
.L80102C44:
|
||||
/* B79DE4 80102C44 8E050008 */ lw $a1, 8($s0)
|
||||
/* B79DE8 80102C48 24060001 */ li $a2, 1
|
||||
/* B79DEC 80102C4C 0C0417D0 */ jal osReadMempak
|
||||
/* B79DF0 80102C50 27A70028 */ addiu $a3, $sp, 0x28
|
||||
/* B79DF4 80102C54 1040000D */ beqz $v0, .L80102C8C
|
||||
/* B79DF8 80102C58 24010002 */ li $at, 2
|
||||
/* B79DFC 80102C5C 10410003 */ beq $v0, $at, .L80102C6C
|
||||
/* B79E00 80102C60 24060001 */ li $a2, 1
|
||||
/* B79E04 80102C64 10000013 */ b .L80102CB4
|
||||
/* B79E08 80102C68 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L80102C6C:
|
||||
/* B79E0C 80102C6C 8E040004 */ lw $a0, 4($s0)
|
||||
/* B79E10 80102C70 8E050008 */ lw $a1, 8($s0)
|
||||
/* B79E14 80102C74 0C0417D0 */ jal osReadMempak
|
||||
/* B79E18 80102C78 27A70028 */ addiu $a3, $sp, 0x28
|
||||
/* B79E1C 80102C7C 50400004 */ beql $v0, $zero, .L80102C90
|
||||
/* B79E20 80102C80 2604000C */ addiu $a0, $s0, 0xc
|
||||
/* B79E24 80102C84 1000000B */ b .L80102CB4
|
||||
/* B79E28 80102C88 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L80102C8C:
|
||||
/* B79E2C 80102C8C 2604000C */ addiu $a0, $s0, 0xc
|
||||
.L80102C90:
|
||||
/* B79E30 80102C90 27A50028 */ addiu $a1, $sp, 0x28
|
||||
/* B79E34 80102C94 0C001A30 */ jal bcmp
|
||||
/* B79E38 80102C98 24060020 */ li $a2, 32
|
||||
/* B79E3C 80102C9C 50400004 */ beql $v0, $zero, .L80102CB0
|
||||
/* B79E40 80102CA0 00001025 */ move $v0, $zero
|
||||
/* B79E44 80102CA4 10000002 */ b .L80102CB0
|
||||
/* B79E48 80102CA8 24020002 */ li $v0, 2
|
||||
/* B79E4C 80102CAC 00001025 */ move $v0, $zero
|
||||
.L80102CB0:
|
||||
/* B79E50 80102CB0 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L80102CB4:
|
||||
/* B79E54 80102CB4 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B79E58 80102CB8 27BD0048 */ addiu $sp, $sp, 0x48
|
||||
/* B79E5C 80102CBC 03E00008 */ jr $ra
|
||||
/* B79E60 80102CC0 00000000 */ nop
|
||||
|
||||
glabel func_80102CC4
|
||||
/* B79E64 80102CC4 27BDFFA8 */ addiu $sp, $sp, -0x58
|
||||
/* B79E68 80102CC8 AFB40030 */ sw $s4, 0x30($sp)
|
||||
/* B79E6C 80102CCC 30D400FF */ andi $s4, $a2, 0xff
|
||||
/* B79E70 80102CD0 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* B79E74 80102CD4 00809025 */ move $s2, $a0
|
||||
/* B79E78 80102CD8 AFBF0034 */ sw $ra, 0x34($sp)
|
||||
/* B79E7C 80102CDC AFB3002C */ sw $s3, 0x2c($sp)
|
||||
/* B79E80 80102CE0 AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* B79E84 80102CE4 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* B79E88 80102CE8 AFA5005C */ sw $a1, 0x5c($sp)
|
||||
/* B79E8C 80102CEC AFA60060 */ sw $a2, 0x60($sp)
|
||||
/* B79E90 80102CF0 16800011 */ bnez $s4, .L80102D38
|
||||
/* B79E94 80102CF4 AFA70064 */ sw $a3, 0x64($sp)
|
||||
/* B79E98 80102CF8 3C0F8013 */ lui $t7, %hi(__osPfsInodeCacheBank) # $t7, 0x8013
|
||||
/* B79E9C 80102CFC 91EF4CF4 */ lbu $t7, %lo(__osPfsInodeCacheBank)($t7)
|
||||
/* B79EA0 80102D00 93B80067 */ lbu $t8, 0x67($sp)
|
||||
/* B79EA4 80102D04 3C198013 */ lui $t9, %hi(D_80134CF0) # $t9, 0x8013
|
||||
/* B79EA8 80102D08 55F8000C */ bnel $t7, $t8, .L80102D3C
|
||||
/* B79EAC 80102D0C 92490065 */ lbu $t1, 0x65($s2)
|
||||
/* B79EB0 80102D10 8F394CF0 */ lw $t9, %lo(D_80134CF0)($t9)
|
||||
/* B79EB4 80102D14 8C880008 */ lw $t0, 8($a0)
|
||||
/* B79EB8 80102D18 3C048017 */ lui $a0, %hi(D_80175860) # $a0, 0x8017
|
||||
/* B79EBC 80102D1C 24845860 */ addiu $a0, %lo(D_80175860) # addiu $a0, $a0, 0x5860
|
||||
/* B79EC0 80102D20 57280006 */ bnel $t9, $t0, .L80102D3C
|
||||
/* B79EC4 80102D24 92490065 */ lbu $t1, 0x65($s2)
|
||||
/* B79EC8 80102D28 0C001BC4 */ jal bcopy
|
||||
/* B79ECC 80102D2C 24060100 */ li $a2, 256
|
||||
/* B79ED0 80102D30 10000091 */ b .L80102F78
|
||||
/* B79ED4 80102D34 00001025 */ move $v0, $zero
|
||||
.L80102D38:
|
||||
/* B79ED8 80102D38 92490065 */ lbu $t1, 0x65($s2)
|
||||
.L80102D3C:
|
||||
/* B79EDC 80102D3C 02402025 */ move $a0, $s2
|
||||
/* B79EE0 80102D40 51200008 */ beql $t1, $zero, .L80102D64
|
||||
/* B79EE4 80102D44 93A30067 */ lbu $v1, 0x67($sp)
|
||||
/* B79EE8 80102D48 0C041320 */ jal func_80104C80
|
||||
/* B79EEC 80102D4C 00002825 */ move $a1, $zero
|
||||
/* B79EF0 80102D50 50400004 */ beql $v0, $zero, .L80102D64
|
||||
/* B79EF4 80102D54 93A30067 */ lbu $v1, 0x67($sp)
|
||||
/* B79EF8 80102D58 10000088 */ b .L80102F7C
|
||||
/* B79EFC 80102D5C 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
/* B79F00 80102D60 93A30067 */ lbu $v1, 0x67($sp)
|
||||
.L80102D64:
|
||||
/* B79F04 80102D64 24020001 */ li $v0, 1
|
||||
/* B79F08 80102D68 240A0001 */ li $t2, 1
|
||||
/* B79F0C 80102D6C 58600004 */ blezl $v1, .L80102D80
|
||||
/* B79F10 80102D70 8E4B0060 */ lw $t3, 0x60($s2)
|
||||
/* B79F14 80102D74 10000003 */ b .L80102D84
|
||||
/* B79F18 80102D78 AFAA0048 */ sw $t2, 0x48($sp)
|
||||
/* B79F1C 80102D7C 8E4B0060 */ lw $t3, 0x60($s2)
|
||||
.L80102D80:
|
||||
/* B79F20 80102D80 AFAB0048 */ sw $t3, 0x48($sp)
|
||||
.L80102D84:
|
||||
/* B79F24 80102D84 1454000C */ bne $v0, $s4, .L80102DB8
|
||||
/* B79F28 80102D88 8FAD0048 */ lw $t5, 0x48($sp)
|
||||
/* B79F2C 80102D8C 8FAC005C */ lw $t4, 0x5c($sp)
|
||||
/* B79F30 80102D90 000D2823 */ negu $a1, $t5
|
||||
/* B79F34 80102D94 00057840 */ sll $t7, $a1, 1
|
||||
/* B79F38 80102D98 000D7040 */ sll $t6, $t5, 1
|
||||
/* B79F3C 80102D9C 25E50100 */ addiu $a1, $t7, 0x100
|
||||
/* B79F40 80102DA0 AFA3003C */ sw $v1, 0x3c($sp)
|
||||
/* B79F44 80102DA4 0C040908 */ jal func_80102420
|
||||
/* B79F48 80102DA8 018E2021 */ addu $a0, $t4, $t6
|
||||
/* B79F4C 80102DAC 8FB8005C */ lw $t8, 0x5c($sp)
|
||||
/* B79F50 80102DB0 8FA3003C */ lw $v1, 0x3c($sp)
|
||||
/* B79F54 80102DB4 A3020001 */ sb $v0, 1($t8)
|
||||
.L80102DB8:
|
||||
/* B79F58 80102DB8 00008025 */ move $s0, $zero
|
||||
/* B79F5C 80102DBC 8FB1005C */ lw $s1, 0x5c($sp)
|
||||
/* B79F60 80102DC0 000398C0 */ sll $s3, $v1, 3
|
||||
.L80102DC4:
|
||||
/* B79F64 80102DC4 24020001 */ li $v0, 1
|
||||
/* B79F68 80102DC8 14540016 */ bne $v0, $s4, .L80102E24
|
||||
/* B79F6C 80102DCC 8E450008 */ lw $a1, 8($s2)
|
||||
/* B79F70 80102DD0 8E590054 */ lw $t9, 0x54($s2)
|
||||
/* B79F74 80102DD4 8E440004 */ lw $a0, 4($s2)
|
||||
/* B79F78 80102DD8 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B79F7C 80102DDC 03334021 */ addu $t0, $t9, $s3
|
||||
/* B79F80 80102DE0 01103021 */ addu $a2, $t0, $s0
|
||||
/* B79F84 80102DE4 30C9FFFF */ andi $t1, $a2, 0xffff
|
||||
/* B79F88 80102DE8 01203025 */ move $a2, $t1
|
||||
/* B79F8C 80102DEC 0C04173C */ jal func_80105CF0
|
||||
/* B79F90 80102DF0 02203825 */ move $a3, $s1
|
||||
/* B79F94 80102DF4 8E4A0058 */ lw $t2, 0x58($s2)
|
||||
/* B79F98 80102DF8 8E440004 */ lw $a0, 4($s2)
|
||||
/* B79F9C 80102DFC 8E450008 */ lw $a1, 8($s2)
|
||||
/* B79FA0 80102E00 01535821 */ addu $t3, $t2, $s3
|
||||
/* B79FA4 80102E04 01703021 */ addu $a2, $t3, $s0
|
||||
/* B79FA8 80102E08 30CCFFFF */ andi $t4, $a2, 0xffff
|
||||
/* B79FAC 80102E0C 01803025 */ move $a2, $t4
|
||||
/* B79FB0 80102E10 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B79FB4 80102E14 0C04173C */ jal func_80105CF0
|
||||
/* B79FB8 80102E18 02203825 */ move $a3, $s1
|
||||
/* B79FBC 80102E1C 1000000A */ b .L80102E48
|
||||
/* B79FC0 80102E20 00401825 */ move $v1, $v0
|
||||
.L80102E24:
|
||||
/* B79FC4 80102E24 8E4E0054 */ lw $t6, 0x54($s2)
|
||||
/* B79FC8 80102E28 8E440004 */ lw $a0, 4($s2)
|
||||
/* B79FCC 80102E2C 02203825 */ move $a3, $s1
|
||||
/* B79FD0 80102E30 01D36821 */ addu $t5, $t6, $s3
|
||||
/* B79FD4 80102E34 01B03021 */ addu $a2, $t5, $s0
|
||||
/* B79FD8 80102E38 30CFFFFF */ andi $t7, $a2, 0xffff
|
||||
/* B79FDC 80102E3C 0C0417D0 */ jal osReadMempak
|
||||
/* B79FE0 80102E40 01E03025 */ move $a2, $t7
|
||||
/* B79FE4 80102E44 00401825 */ move $v1, $v0
|
||||
.L80102E48:
|
||||
/* B79FE8 80102E48 10400003 */ beqz $v0, .L80102E58
|
||||
/* B79FEC 80102E4C 26100001 */ addiu $s0, $s0, 1
|
||||
/* B79FF0 80102E50 10000049 */ b .L80102F78
|
||||
/* B79FF4 80102E54 00601025 */ move $v0, $v1
|
||||
.L80102E58:
|
||||
/* B79FF8 80102E58 2A010008 */ slti $at, $s0, 8
|
||||
/* B79FFC 80102E5C 1420FFD9 */ bnez $at, .L80102DC4
|
||||
/* B7A000 80102E60 26310020 */ addiu $s1, $s1, 0x20
|
||||
/* B7A004 80102E64 16800038 */ bnez $s4, .L80102F48
|
||||
/* B7A008 80102E68 8FB90048 */ lw $t9, 0x48($sp)
|
||||
/* B7A00C 80102E6C 8FB8005C */ lw $t8, 0x5c($sp)
|
||||
/* B7A010 80102E70 00192823 */ negu $a1, $t9
|
||||
/* B7A014 80102E74 00054840 */ sll $t1, $a1, 1
|
||||
/* B7A018 80102E78 00194040 */ sll $t0, $t9, 1
|
||||
/* B7A01C 80102E7C 25250100 */ addiu $a1, $t1, 0x100
|
||||
/* B7A020 80102E80 0308A021 */ addu $s4, $t8, $t0
|
||||
/* B7A024 80102E84 02802025 */ move $a0, $s4
|
||||
/* B7A028 80102E88 0C040908 */ jal func_80102420
|
||||
/* B7A02C 80102E8C AFA5003C */ sw $a1, 0x3c($sp)
|
||||
/* B7A030 80102E90 8FAB005C */ lw $t3, 0x5c($sp)
|
||||
/* B7A034 80102E94 304A00FF */ andi $t2, $v0, 0xff
|
||||
/* B7A038 80102E98 00008025 */ move $s0, $zero
|
||||
/* B7A03C 80102E9C 916C0001 */ lbu $t4, 1($t3)
|
||||
/* B7A040 80102EA0 01608825 */ move $s1, $t3
|
||||
/* B7A044 80102EA4 514C0029 */ beql $t2, $t4, .L80102F4C
|
||||
/* B7A048 80102EA8 93AB0067 */ lbu $t3, 0x67($sp)
|
||||
.L80102EAC:
|
||||
/* B7A04C 80102EAC 8E4E0058 */ lw $t6, 0x58($s2)
|
||||
/* B7A050 80102EB0 8E440004 */ lw $a0, 4($s2)
|
||||
/* B7A054 80102EB4 8E450008 */ lw $a1, 8($s2)
|
||||
/* B7A058 80102EB8 01D36821 */ addu $t5, $t6, $s3
|
||||
/* B7A05C 80102EBC 01B03021 */ addu $a2, $t5, $s0
|
||||
/* B7A060 80102EC0 30CFFFFF */ andi $t7, $a2, 0xffff
|
||||
/* B7A064 80102EC4 01E03025 */ move $a2, $t7
|
||||
/* B7A068 80102EC8 0C0417D0 */ jal osReadMempak
|
||||
/* B7A06C 80102ECC 02203825 */ move $a3, $s1
|
||||
/* B7A070 80102ED0 26100001 */ addiu $s0, $s0, 1
|
||||
/* B7A074 80102ED4 2A010008 */ slti $at, $s0, 8
|
||||
/* B7A078 80102ED8 1420FFF4 */ bnez $at, .L80102EAC
|
||||
/* B7A07C 80102EDC 26310020 */ addiu $s1, $s1, 0x20
|
||||
/* B7A080 80102EE0 02802025 */ move $a0, $s4
|
||||
/* B7A084 80102EE4 0C040908 */ jal func_80102420
|
||||
/* B7A088 80102EE8 8FA5003C */ lw $a1, 0x3c($sp)
|
||||
/* B7A08C 80102EEC 8FA8005C */ lw $t0, 0x5c($sp)
|
||||
/* B7A090 80102EF0 305800FF */ andi $t8, $v0, 0xff
|
||||
/* B7A094 80102EF4 00008025 */ move $s0, $zero
|
||||
/* B7A098 80102EF8 91190001 */ lbu $t9, 1($t0)
|
||||
/* B7A09C 80102EFC 8FB1005C */ lw $s1, 0x5c($sp)
|
||||
/* B7A0A0 80102F00 13190003 */ beq $t8, $t9, .L80102F10
|
||||
/* B7A0A4 80102F04 00000000 */ nop
|
||||
/* B7A0A8 80102F08 1000001B */ b .L80102F78
|
||||
/* B7A0AC 80102F0C 24020003 */ li $v0, 3
|
||||
.L80102F10:
|
||||
/* B7A0B0 80102F10 8E490054 */ lw $t1, 0x54($s2)
|
||||
/* B7A0B4 80102F14 8E440004 */ lw $a0, 4($s2)
|
||||
/* B7A0B8 80102F18 8E450008 */ lw $a1, 8($s2)
|
||||
/* B7A0BC 80102F1C 01335021 */ addu $t2, $t1, $s3
|
||||
/* B7A0C0 80102F20 01503021 */ addu $a2, $t2, $s0
|
||||
/* B7A0C4 80102F24 30CCFFFF */ andi $t4, $a2, 0xffff
|
||||
/* B7A0C8 80102F28 01803025 */ move $a2, $t4
|
||||
/* B7A0CC 80102F2C AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B7A0D0 80102F30 0C04173C */ jal func_80105CF0
|
||||
/* B7A0D4 80102F34 02203825 */ move $a3, $s1
|
||||
/* B7A0D8 80102F38 26100001 */ addiu $s0, $s0, 1
|
||||
/* B7A0DC 80102F3C 24010008 */ li $at, 8
|
||||
/* B7A0E0 80102F40 1601FFF3 */ bne $s0, $at, .L80102F10
|
||||
/* B7A0E4 80102F44 26310020 */ addiu $s1, $s1, 0x20
|
||||
.L80102F48:
|
||||
/* B7A0E8 80102F48 93AB0067 */ lbu $t3, 0x67($sp)
|
||||
.L80102F4C:
|
||||
/* B7A0EC 80102F4C 3C018013 */ lui $at, %hi(__osPfsInodeCacheBank) # $at, 0x8013
|
||||
/* B7A0F0 80102F50 3C058017 */ lui $a1, %hi(D_80175860) # $a1, 0x8017
|
||||
/* B7A0F4 80102F54 24A55860 */ addiu $a1, %lo(D_80175860) # addiu $a1, $a1, 0x5860
|
||||
/* B7A0F8 80102F58 8FA4005C */ lw $a0, 0x5c($sp)
|
||||
/* B7A0FC 80102F5C 24060100 */ li $a2, 256
|
||||
/* B7A100 80102F60 0C001BC4 */ jal bcopy
|
||||
/* B7A104 80102F64 A02B4CF4 */ sb $t3, %lo(__osPfsInodeCacheBank)($at)
|
||||
/* B7A108 80102F68 8E4E0008 */ lw $t6, 8($s2)
|
||||
/* B7A10C 80102F6C 3C018013 */ lui $at, %hi(D_80134CF0) # $at, 0x8013
|
||||
/* B7A110 80102F70 00001025 */ move $v0, $zero
|
||||
/* B7A114 80102F74 AC2E4CF0 */ sw $t6, %lo(D_80134CF0)($at)
|
||||
.L80102F78:
|
||||
/* B7A118 80102F78 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
.L80102F7C:
|
||||
/* B7A11C 80102F7C 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* B7A120 80102F80 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* B7A124 80102F84 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* B7A128 80102F88 8FB3002C */ lw $s3, 0x2c($sp)
|
||||
/* B7A12C 80102F8C 8FB40030 */ lw $s4, 0x30($sp)
|
||||
/* B7A130 80102F90 03E00008 */ jr $ra
|
||||
/* B7A134 80102F94 27BD0058 */ addiu $sp, $sp, 0x58
|
@ -1,140 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel osPfsFindFile
|
||||
/* B7A1B0 80103010 27BDFF88 */ addiu $sp, $sp, -0x78
|
||||
/* B7A1B4 80103014 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* B7A1B8 80103018 AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* B7A1BC 8010301C AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* B7A1C0 80103020 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* B7A1C4 80103024 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* B7A1C8 80103028 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B7A1CC 8010302C AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B7A1D0 80103030 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B7A1D4 80103034 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B7A1D8 80103038 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B7A1DC 8010303C AFA5007C */ sw $a1, 0x7c($sp)
|
||||
/* B7A1E0 80103040 8C8E0000 */ lw $t6, ($a0)
|
||||
/* B7A1E4 80103044 00809025 */ move $s2, $a0
|
||||
/* B7A1E8 80103048 00E0A825 */ move $s5, $a3
|
||||
/* B7A1EC 8010304C 31CF0001 */ andi $t7, $t6, 1
|
||||
/* B7A1F0 80103050 30B7FFFF */ andi $s7, $a1, 0xffff
|
||||
/* B7A1F4 80103054 15E00003 */ bnez $t7, .L80103064
|
||||
/* B7A1F8 80103058 00C0F025 */ move $fp, $a2
|
||||
/* B7A1FC 8010305C 10000051 */ b .L801031A4
|
||||
/* B7A200 80103060 24020005 */ li $v0, 5
|
||||
.L80103064:
|
||||
/* B7A204 80103064 0C040AFC */ jal func_80102BF0
|
||||
/* B7A208 80103068 02402025 */ move $a0, $s2
|
||||
/* B7A20C 8010306C 50400004 */ beql $v0, $zero, .L80103080
|
||||
/* B7A210 80103070 8E580050 */ lw $t8, 0x50($s2)
|
||||
/* B7A214 80103074 1000004C */ b .L801031A8
|
||||
/* B7A218 80103078 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* B7A21C 8010307C 8E580050 */ lw $t8, 0x50($s2)
|
||||
.L80103080:
|
||||
/* B7A220 80103080 00009825 */ move $s3, $zero
|
||||
/* B7A224 80103084 27B60050 */ addiu $s6, $sp, 0x50
|
||||
/* B7A228 80103088 1B000042 */ blez $t8, .L80103194
|
||||
/* B7A22C 8010308C 8FB40088 */ lw $s4, 0x88($sp)
|
||||
/* B7A230 80103090 27B10060 */ addiu $s1, $sp, 0x60
|
||||
/* B7A234 80103094 27B00054 */ addiu $s0, $sp, 0x54
|
||||
/* B7A238 80103098 8E59005C */ lw $t9, 0x5c($s2)
|
||||
.L8010309C:
|
||||
/* B7A23C 8010309C 8E440004 */ lw $a0, 4($s2)
|
||||
/* B7A240 801030A0 8E450008 */ lw $a1, 8($s2)
|
||||
/* B7A244 801030A4 03333021 */ addu $a2, $t9, $s3
|
||||
/* B7A248 801030A8 30C8FFFF */ andi $t0, $a2, 0xffff
|
||||
/* B7A24C 801030AC 01003025 */ move $a2, $t0
|
||||
/* B7A250 801030B0 0C0417D0 */ jal osReadMempak
|
||||
/* B7A254 801030B4 02C03825 */ move $a3, $s6
|
||||
/* B7A258 801030B8 50400004 */ beql $v0, $zero, .L801030CC
|
||||
/* B7A25C 801030BC 8E440004 */ lw $a0, 4($s2)
|
||||
/* B7A260 801030C0 10000039 */ b .L801031A8
|
||||
/* B7A264 801030C4 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* B7A268 801030C8 8E440004 */ lw $a0, 4($s2)
|
||||
.L801030CC:
|
||||
/* B7A26C 801030CC 0C040644 */ jal __osPfsGetStatus
|
||||
/* B7A270 801030D0 8E450008 */ lw $a1, 8($s2)
|
||||
/* B7A274 801030D4 10400003 */ beqz $v0, .L801030E4
|
||||
/* B7A278 801030D8 00403025 */ move $a2, $v0
|
||||
/* B7A27C 801030DC 10000032 */ b .L801031A8
|
||||
/* B7A280 801030E0 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L801030E4:
|
||||
/* B7A284 801030E4 97A90054 */ lhu $t1, 0x54($sp)
|
||||
/* B7A288 801030E8 8FAA0050 */ lw $t2, 0x50($sp)
|
||||
/* B7A28C 801030EC 56E90025 */ bnel $s7, $t1, .L80103184
|
||||
/* B7A290 801030F0 8E580050 */ lw $t8, 0x50($s2)
|
||||
/* B7A294 801030F4 555E0023 */ bnel $t2, $fp, .L80103184
|
||||
/* B7A298 801030F8 8E580050 */ lw $t8, 0x50($s2)
|
||||
/* B7A29C 801030FC 12A0000C */ beqz $s5, .L80103130
|
||||
/* B7A2A0 80103100 00002025 */ move $a0, $zero
|
||||
/* B7A2A4 80103104 27A20050 */ addiu $v0, $sp, 0x50
|
||||
/* B7A2A8 80103108 02A01825 */ move $v1, $s5
|
||||
.L8010310C:
|
||||
/* B7A2AC 8010310C 904B0010 */ lbu $t3, 0x10($v0)
|
||||
/* B7A2B0 80103110 906C0000 */ lbu $t4, ($v1)
|
||||
/* B7A2B4 80103114 24420001 */ addiu $v0, $v0, 1
|
||||
/* B7A2B8 80103118 116C0003 */ beq $t3, $t4, .L80103128
|
||||
/* B7A2BC 8010311C 00000000 */ nop
|
||||
/* B7A2C0 80103120 10000003 */ b .L80103130
|
||||
/* B7A2C4 80103124 24040001 */ li $a0, 1
|
||||
.L80103128:
|
||||
/* B7A2C8 80103128 1451FFF8 */ bne $v0, $s1, .L8010310C
|
||||
/* B7A2CC 8010312C 24630001 */ addiu $v1, $v1, 1
|
||||
.L80103130:
|
||||
/* B7A2D0 80103130 1280000D */ beqz $s4, .L80103168
|
||||
/* B7A2D4 80103134 00000000 */ nop
|
||||
/* B7A2D8 80103138 1480000B */ bnez $a0, .L80103168
|
||||
/* B7A2DC 8010313C 27A20050 */ addiu $v0, $sp, 0x50
|
||||
/* B7A2E0 80103140 02801825 */ move $v1, $s4
|
||||
.L80103144:
|
||||
/* B7A2E4 80103144 904D000C */ lbu $t5, 0xc($v0)
|
||||
/* B7A2E8 80103148 906E0000 */ lbu $t6, ($v1)
|
||||
/* B7A2EC 8010314C 24420001 */ addiu $v0, $v0, 1
|
||||
/* B7A2F0 80103150 11AE0003 */ beq $t5, $t6, .L80103160
|
||||
/* B7A2F4 80103154 00000000 */ nop
|
||||
/* B7A2F8 80103158 10000003 */ b .L80103168
|
||||
/* B7A2FC 8010315C 24040001 */ li $a0, 1
|
||||
.L80103160:
|
||||
/* B7A300 80103160 1450FFF8 */ bne $v0, $s0, .L80103144
|
||||
/* B7A304 80103164 24630001 */ addiu $v1, $v1, 1
|
||||
.L80103168:
|
||||
/* B7A308 80103168 54800006 */ bnezl $a0, .L80103184
|
||||
/* B7A30C 8010316C 8E580050 */ lw $t8, 0x50($s2)
|
||||
/* B7A310 80103170 8FAF008C */ lw $t7, 0x8c($sp)
|
||||
/* B7A314 80103174 00C01025 */ move $v0, $a2
|
||||
/* B7A318 80103178 1000000A */ b .L801031A4
|
||||
/* B7A31C 8010317C ADF30000 */ sw $s3, ($t7)
|
||||
/* B7A320 80103180 8E580050 */ lw $t8, 0x50($s2)
|
||||
.L80103184:
|
||||
/* B7A324 80103184 26730001 */ addiu $s3, $s3, 1
|
||||
/* B7A328 80103188 0278082A */ slt $at, $s3, $t8
|
||||
/* B7A32C 8010318C 5420FFC3 */ bnezl $at, .L8010309C
|
||||
/* B7A330 80103190 8E59005C */ lw $t9, 0x5c($s2)
|
||||
.L80103194:
|
||||
/* B7A334 80103194 8FA8008C */ lw $t0, 0x8c($sp)
|
||||
/* B7A338 80103198 2419FFFF */ li $t9, -1
|
||||
/* B7A33C 8010319C 24020005 */ li $v0, 5
|
||||
/* B7A340 801031A0 AD190000 */ sw $t9, ($t0)
|
||||
.L801031A4:
|
||||
/* B7A344 801031A4 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L801031A8:
|
||||
/* B7A348 801031A8 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B7A34C 801031AC 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B7A350 801031B0 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B7A354 801031B4 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B7A358 801031B8 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B7A35C 801031BC 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* B7A360 801031C0 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* B7A364 801031C4 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* B7A368 801031C8 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* B7A36C 801031CC 03E00008 */ jr $ra
|
||||
/* B7A370 801031D0 27BD0078 */ addiu $sp, $sp, 0x78
|
@ -1,184 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel osPfsDeleteFile
|
||||
/* B7B380 801041E0 27BDFE90 */ addiu $sp, $sp, -0x170
|
||||
/* B7B384 801041E4 AFB20024 */ sw $s2, 0x24($sp)
|
||||
/* B7B388 801041E8 AFA50174 */ sw $a1, 0x174($sp)
|
||||
/* B7B38C 801041EC 30AEFFFF */ andi $t6, $a1, 0xffff
|
||||
/* B7B390 801041F0 01C02825 */ move $a1, $t6
|
||||
/* B7B394 801041F4 00809025 */ move $s2, $a0
|
||||
/* B7B398 801041F8 AFBF0034 */ sw $ra, 0x34($sp)
|
||||
/* B7B39C 801041FC AFB50030 */ sw $s5, 0x30($sp)
|
||||
/* B7B3A0 80104200 AFB4002C */ sw $s4, 0x2c($sp)
|
||||
/* B7B3A4 80104204 AFB30028 */ sw $s3, 0x28($sp)
|
||||
/* B7B3A8 80104208 AFB10020 */ sw $s1, 0x20($sp)
|
||||
/* B7B3AC 8010420C 11C00003 */ beqz $t6, .L8010421C
|
||||
/* B7B3B0 80104210 AFB0001C */ sw $s0, 0x1c($sp)
|
||||
/* B7B3B4 80104214 14C00003 */ bnez $a2, .L80104224
|
||||
/* B7B3B8 80104218 02402025 */ move $a0, $s2
|
||||
.L8010421C:
|
||||
/* B7B3BC 8010421C 1000005D */ b .L80104394
|
||||
/* B7B3C0 80104220 24020005 */ li $v0, 5
|
||||
.L80104224:
|
||||
/* B7B3C4 80104224 8FAF0180 */ lw $t7, 0x180($sp)
|
||||
/* B7B3C8 80104228 27B8016C */ addiu $t8, $sp, 0x16c
|
||||
/* B7B3CC 8010422C AFB80014 */ sw $t8, 0x14($sp)
|
||||
/* B7B3D0 80104230 0C040C04 */ jal osPfsFindFile
|
||||
/* B7B3D4 80104234 AFAF0010 */ sw $t7, 0x10($sp)
|
||||
/* B7B3D8 80104238 50400004 */ beql $v0, $zero, .L8010424C
|
||||
/* B7B3DC 8010423C 92590065 */ lbu $t9, 0x65($s2)
|
||||
/* B7B3E0 80104240 10000055 */ b .L80104398
|
||||
/* B7B3E4 80104244 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
/* B7B3E8 80104248 92590065 */ lbu $t9, 0x65($s2)
|
||||
.L8010424C:
|
||||
/* B7B3EC 8010424C 02402025 */ move $a0, $s2
|
||||
/* B7B3F0 80104250 53200008 */ beql $t9, $zero, .L80104274
|
||||
/* B7B3F4 80104254 8E48005C */ lw $t0, 0x5c($s2)
|
||||
/* B7B3F8 80104258 0C041320 */ jal func_80104C80
|
||||
/* B7B3FC 8010425C 00002825 */ move $a1, $zero
|
||||
/* B7B400 80104260 50400004 */ beql $v0, $zero, .L80104274
|
||||
/* B7B404 80104264 8E48005C */ lw $t0, 0x5c($s2)
|
||||
/* B7B408 80104268 1000004B */ b .L80104398
|
||||
/* B7B40C 8010426C 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
/* B7B410 80104270 8E48005C */ lw $t0, 0x5c($s2)
|
||||
.L80104274:
|
||||
/* B7B414 80104274 8FA9016C */ lw $t1, 0x16c($sp)
|
||||
/* B7B418 80104278 8E440004 */ lw $a0, 4($s2)
|
||||
/* B7B41C 8010427C 8E450008 */ lw $a1, 8($s2)
|
||||
/* B7B420 80104280 01093021 */ addu $a2, $t0, $t1
|
||||
/* B7B424 80104284 30CAFFFF */ andi $t2, $a2, 0xffff
|
||||
/* B7B428 80104288 01403025 */ move $a2, $t2
|
||||
/* B7B42C 8010428C 0C0417D0 */ jal osReadMempak
|
||||
/* B7B430 80104290 27A70048 */ addiu $a3, $sp, 0x48
|
||||
/* B7B434 80104294 10400003 */ beqz $v0, .L801042A4
|
||||
/* B7B438 80104298 93B0004E */ lbu $s0, 0x4e($sp)
|
||||
/* B7B43C 8010429C 1000003E */ b .L80104398
|
||||
/* B7B440 801042A0 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
.L801042A4:
|
||||
/* B7B444 801042A4 92420064 */ lbu $v0, 0x64($s2)
|
||||
/* B7B448 801042A8 93B3004F */ lbu $s3, 0x4f($sp)
|
||||
/* B7B44C 801042AC 24150001 */ li $s5, 1
|
||||
/* B7B450 801042B0 0202082A */ slt $at, $s0, $v0
|
||||
/* B7B454 801042B4 10200026 */ beqz $at, .L80104350
|
||||
/* B7B458 801042B8 27B40044 */ addiu $s4, $sp, 0x44
|
||||
/* B7B45C 801042BC 27B10068 */ addiu $s1, $sp, 0x68
|
||||
/* B7B460 801042C0 02402025 */ move $a0, $s2
|
||||
.L801042C4:
|
||||
/* B7B464 801042C4 02202825 */ move $a1, $s1
|
||||
/* B7B468 801042C8 00003025 */ move $a2, $zero
|
||||
/* B7B46C 801042CC 0C040B31 */ jal func_80102CC4
|
||||
/* B7B470 801042D0 320700FF */ andi $a3, $s0, 0xff
|
||||
/* B7B474 801042D4 10400003 */ beqz $v0, .L801042E4
|
||||
/* B7B478 801042D8 02402025 */ move $a0, $s2
|
||||
/* B7B47C 801042DC 1000002E */ b .L80104398
|
||||
/* B7B480 801042E0 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
.L801042E4:
|
||||
/* B7B484 801042E4 02202825 */ move $a1, $s1
|
||||
/* B7B488 801042E8 326600FF */ andi $a2, $s3, 0xff
|
||||
/* B7B48C 801042EC 320700FF */ andi $a3, $s0, 0xff
|
||||
/* B7B490 801042F0 0C0410EE */ jal func_801043B8
|
||||
/* B7B494 801042F4 AFB40010 */ sw $s4, 0x10($sp)
|
||||
/* B7B498 801042F8 10400003 */ beqz $v0, .L80104308
|
||||
/* B7B49C 801042FC 02402025 */ move $a0, $s2
|
||||
/* B7B4A0 80104300 10000025 */ b .L80104398
|
||||
/* B7B4A4 80104304 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
.L80104308:
|
||||
/* B7B4A8 80104308 02202825 */ move $a1, $s1
|
||||
/* B7B4AC 8010430C 24060001 */ li $a2, 1
|
||||
/* B7B4B0 80104310 0C040B31 */ jal func_80102CC4
|
||||
/* B7B4B4 80104314 320700FF */ andi $a3, $s0, 0xff
|
||||
/* B7B4B8 80104318 10400003 */ beqz $v0, .L80104328
|
||||
/* B7B4BC 8010431C 97AC0044 */ lhu $t4, 0x44($sp)
|
||||
/* B7B4C0 80104320 1000001D */ b .L80104398
|
||||
/* B7B4C4 80104324 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
.L80104328:
|
||||
/* B7B4C8 80104328 56AC0004 */ bnel $s5, $t4, .L8010433C
|
||||
/* B7B4CC 8010432C 92420064 */ lbu $v0, 0x64($s2)
|
||||
/* B7B4D0 80104330 10000007 */ b .L80104350
|
||||
/* B7B4D4 80104334 92420064 */ lbu $v0, 0x64($s2)
|
||||
/* B7B4D8 80104338 92420064 */ lbu $v0, 0x64($s2)
|
||||
.L8010433C:
|
||||
/* B7B4DC 8010433C 93B00044 */ lbu $s0, 0x44($sp)
|
||||
/* B7B4E0 80104340 93B30045 */ lbu $s3, 0x45($sp)
|
||||
/* B7B4E4 80104344 0202082A */ slt $at, $s0, $v0
|
||||
/* B7B4E8 80104348 5420FFDE */ bnezl $at, .L801042C4
|
||||
/* B7B4EC 8010434C 02402025 */ move $a0, $s2
|
||||
.L80104350:
|
||||
/* B7B4F0 80104350 0202082A */ slt $at, $s0, $v0
|
||||
/* B7B4F4 80104354 14200003 */ bnez $at, .L80104364
|
||||
/* B7B4F8 80104358 27A40048 */ addiu $a0, $sp, 0x48
|
||||
/* B7B4FC 8010435C 1000000D */ b .L80104394
|
||||
/* B7B500 80104360 24020003 */ li $v0, 3
|
||||
.L80104364:
|
||||
/* B7B504 80104364 0C001114 */ jal bzero
|
||||
/* B7B508 80104368 24050020 */ li $a1, 32
|
||||
/* B7B50C 8010436C 8E4D005C */ lw $t5, 0x5c($s2)
|
||||
/* B7B510 80104370 8FAE016C */ lw $t6, 0x16c($sp)
|
||||
/* B7B514 80104374 8E440004 */ lw $a0, 4($s2)
|
||||
/* B7B518 80104378 8E450008 */ lw $a1, 8($s2)
|
||||
/* B7B51C 8010437C 01AE3021 */ addu $a2, $t5, $t6
|
||||
/* B7B520 80104380 30CFFFFF */ andi $t7, $a2, 0xffff
|
||||
/* B7B524 80104384 01E03025 */ move $a2, $t7
|
||||
/* B7B528 80104388 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B7B52C 8010438C 0C04173C */ jal func_80105CF0
|
||||
/* B7B530 80104390 27A70048 */ addiu $a3, $sp, 0x48
|
||||
.L80104394:
|
||||
/* B7B534 80104394 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
.L80104398:
|
||||
/* B7B538 80104398 8FB0001C */ lw $s0, 0x1c($sp)
|
||||
/* B7B53C 8010439C 8FB10020 */ lw $s1, 0x20($sp)
|
||||
/* B7B540 801043A0 8FB20024 */ lw $s2, 0x24($sp)
|
||||
/* B7B544 801043A4 8FB30028 */ lw $s3, 0x28($sp)
|
||||
/* B7B548 801043A8 8FB4002C */ lw $s4, 0x2c($sp)
|
||||
/* B7B54C 801043AC 8FB50030 */ lw $s5, 0x30($sp)
|
||||
/* B7B550 801043B0 03E00008 */ jr $ra
|
||||
/* B7B554 801043B4 27BD0170 */ addiu $sp, $sp, 0x170
|
||||
|
||||
glabel func_801043B8
|
||||
/* B7B558 801043B8 27BDFFF0 */ addiu $sp, $sp, -0x10
|
||||
/* B7B55C 801043BC 30E200FF */ andi $v0, $a3, 0xff
|
||||
/* B7B560 801043C0 30CE00FF */ andi $t6, $a2, 0xff
|
||||
/* B7B564 801043C4 0002C200 */ sll $t8, $v0, 8
|
||||
/* B7B568 801043C8 AFA60018 */ sw $a2, 0x18($sp)
|
||||
/* B7B56C 801043CC AFA7001C */ sw $a3, 0x1c($sp)
|
||||
/* B7B570 801043D0 030EC821 */ addu $t9, $t8, $t6
|
||||
/* B7B574 801043D4 A7B9000C */ sh $t9, 0xc($sp)
|
||||
/* B7B578 801043D8 24070003 */ li $a3, 3
|
||||
/* B7B57C 801043DC 27A6000C */ addiu $a2, $sp, 0xc
|
||||
/* B7B580 801043E0 27A30008 */ addiu $v1, $sp, 8
|
||||
/* B7B584 801043E4 94C10000 */ lhu $at, ($a2)
|
||||
.L801043E8:
|
||||
/* B7B588 801043E8 A4610000 */ sh $at, ($v1)
|
||||
/* B7B58C 801043EC 93AB000D */ lbu $t3, 0xd($sp)
|
||||
/* B7B590 801043F0 000B6040 */ sll $t4, $t3, 1
|
||||
/* B7B594 801043F4 00AC6821 */ addu $t5, $a1, $t4
|
||||
/* B7B598 801043F8 95A10000 */ lhu $at, ($t5)
|
||||
/* B7B59C 801043FC A4C10000 */ sh $at, ($a2)
|
||||
/* B7B5A0 80104400 93B90009 */ lbu $t9, 9($sp)
|
||||
/* B7B5A4 80104404 00194840 */ sll $t1, $t9, 1
|
||||
/* B7B5A8 80104408 00A94021 */ addu $t0, $a1, $t1
|
||||
/* B7B5AC 8010440C A5070000 */ sh $a3, ($t0)
|
||||
/* B7B5B0 80104410 8C8B0060 */ lw $t3, 0x60($a0)
|
||||
/* B7B5B4 80104414 97AA000C */ lhu $t2, 0xc($sp)
|
||||
/* B7B5B8 80104418 93AC000C */ lbu $t4, 0xc($sp)
|
||||
/* B7B5BC 8010441C 014B082A */ slt $at, $t2, $t3
|
||||
/* B7B5C0 80104420 54200004 */ bnezl $at, .L80104434
|
||||
/* B7B5C4 80104424 8FAF0020 */ lw $t7, 0x20($sp)
|
||||
/* B7B5C8 80104428 504CFFEF */ beql $v0, $t4, .L801043E8
|
||||
/* B7B5CC 8010442C 94C10000 */ lhu $at, ($a2)
|
||||
/* B7B5D0 80104430 8FAF0020 */ lw $t7, 0x20($sp)
|
||||
.L80104434:
|
||||
/* B7B5D4 80104434 94C10000 */ lhu $at, ($a2)
|
||||
/* B7B5D8 80104438 27BD0010 */ addiu $sp, $sp, 0x10
|
||||
/* B7B5DC 8010443C 00001025 */ move $v0, $zero
|
||||
/* B7B5E0 80104440 03E00008 */ jr $ra
|
||||
/* B7B5E4 80104444 A5E10000 */ sh $at, ($t7)
|
@ -1,44 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel func_80104C80
|
||||
/* B7BE20 80104C80 27BDFFA8 */ addiu $sp, $sp, -0x58
|
||||
/* B7BE24 80104C84 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* B7BE28 80104C88 30B000FF */ andi $s0, $a1, 0xff
|
||||
/* B7BE2C 80104C8C AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* B7BE30 80104C90 AFA40058 */ sw $a0, 0x58($sp)
|
||||
/* B7BE34 80104C94 AFA5005C */ sw $a1, 0x5c($sp)
|
||||
/* B7BE38 80104C98 27A20038 */ addiu $v0, $sp, 0x38
|
||||
/* B7BE3C 80104C9C 27A30058 */ addiu $v1, $sp, 0x58
|
||||
.L80104CA0:
|
||||
/* B7BE40 80104CA0 24420004 */ addiu $v0, $v0, 4
|
||||
/* B7BE44 80104CA4 A050FFFD */ sb $s0, -3($v0)
|
||||
/* B7BE48 80104CA8 A050FFFE */ sb $s0, -2($v0)
|
||||
/* B7BE4C 80104CAC A050FFFF */ sb $s0, -1($v0)
|
||||
/* B7BE50 80104CB0 1443FFFB */ bne $v0, $v1, .L80104CA0
|
||||
/* B7BE54 80104CB4 A050FFFC */ sb $s0, -4($v0)
|
||||
/* B7BE58 80104CB8 8FAE0058 */ lw $t6, 0x58($sp)
|
||||
/* B7BE5C 80104CBC 24060400 */ li $a2, 1024
|
||||
/* B7BE60 80104CC0 27A70038 */ addiu $a3, $sp, 0x38
|
||||
/* B7BE64 80104CC4 8DC40004 */ lw $a0, 4($t6)
|
||||
/* B7BE68 80104CC8 8DC50008 */ lw $a1, 8($t6)
|
||||
/* B7BE6C 80104CCC 0C04173C */ jal func_80105CF0
|
||||
/* B7BE70 80104CD0 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B7BE74 80104CD4 14400003 */ bnez $v0, .L80104CE4
|
||||
/* B7BE78 80104CD8 00401825 */ move $v1, $v0
|
||||
/* B7BE7C 80104CDC 8FAF0058 */ lw $t7, 0x58($sp)
|
||||
/* B7BE80 80104CE0 A1F00065 */ sb $s0, 0x65($t7)
|
||||
.L80104CE4:
|
||||
/* B7BE84 80104CE4 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* B7BE88 80104CE8 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* B7BE8C 80104CEC 27BD0058 */ addiu $sp, $sp, 0x58
|
||||
/* B7BE90 80104CF0 03E00008 */ jr $ra
|
||||
/* B7BE94 80104CF4 00601025 */ move $v0, $v1
|
@ -37,7 +37,7 @@ glabel osPfsFileState
|
||||
/* B7BF58 80104DB8 10000058 */ b .L80104F1C
|
||||
/* B7BF5C 80104DBC 24020005 */ li $v0, 5
|
||||
.L80104DC0:
|
||||
/* B7BF60 80104DC0 0C040AFC */ jal func_80102BF0
|
||||
/* B7BF60 80104DC0 0C040AFC */ jal __osCheckId
|
||||
/* B7BF64 80104DC4 02602025 */ move $a0, $s3
|
||||
/* B7BF68 80104DC8 50400004 */ beql $v0, $zero, .L80104DDC
|
||||
/* B7BF6C 80104DCC 92790065 */ lbu $t9, 0x65($s3)
|
||||
@ -48,7 +48,7 @@ glabel osPfsFileState
|
||||
/* B7BF7C 80104DDC 02602025 */ move $a0, $s3
|
||||
/* B7BF80 80104DE0 53200008 */ beql $t9, $zero, .L80104E04
|
||||
/* B7BF84 80104DE4 8E68005C */ lw $t0, 0x5c($s3)
|
||||
/* B7BF88 80104DE8 0C041320 */ jal func_80104C80
|
||||
/* B7BF88 80104DE8 0C041320 */ jal __osPfsSelectBank
|
||||
/* B7BF8C 80104DEC 00002825 */ move $a1, $zero
|
||||
/* B7BF90 80104DF0 50400004 */ beql $v0, $zero, .L80104E04
|
||||
/* B7BF94 80104DF4 8E68005C */ lw $t0, 0x5c($s3)
|
||||
@ -61,7 +61,7 @@ glabel osPfsFileState
|
||||
/* B7BFAC 80104E0C 01103021 */ addu $a2, $t0, $s0
|
||||
/* B7BFB0 80104E10 30C9FFFF */ andi $t1, $a2, 0xffff
|
||||
/* B7BFB4 80104E14 01203025 */ move $a2, $t1
|
||||
/* B7BFB8 80104E18 0C0417D0 */ jal osReadMempak
|
||||
/* B7BFB8 80104E18 0C0417D0 */ jal __osContRamRead
|
||||
/* B7BFBC 80104E1C 27A70038 */ addiu $a3, $sp, 0x38
|
||||
/* B7BFC0 80104E20 10400003 */ beqz $v0, .L80104E30
|
||||
/* B7BFC4 80104E24 97AA003C */ lhu $t2, 0x3c($sp)
|
||||
@ -93,7 +93,7 @@ glabel osPfsFileState
|
||||
/* B7C01C 80104E7C 12190008 */ beq $s0, $t9, .L80104EA0
|
||||
/* B7C020 80104E80 00003025 */ move $a2, $zero
|
||||
/* B7C024 80104E84 03208025 */ move $s0, $t9
|
||||
/* B7C028 80104E88 0C040B31 */ jal func_80102CC4
|
||||
/* B7C028 80104E88 0C040B31 */ jal __osPfsRWInode
|
||||
/* B7C02C 80104E8C 332700FF */ andi $a3, $t9, 0xff
|
||||
/* B7C030 80104E90 50400004 */ beql $v0, $zero, .L80104EA4
|
||||
/* B7C034 80104E94 93A80035 */ lbu $t0, 0x35($sp)
|
||||
|
@ -1,719 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel func_80105250
|
||||
/* B7C3F0 80105250 27BDFB38 */ addiu $sp, $sp, -0x4c8
|
||||
/* B7C3F4 80105254 AFBF0044 */ sw $ra, 0x44($sp)
|
||||
/* B7C3F8 80105258 AFBE0040 */ sw $fp, 0x40($sp)
|
||||
/* B7C3FC 8010525C AFB3002C */ sw $s3, 0x2c($sp)
|
||||
/* B7C400 80105260 00809825 */ move $s3, $a0
|
||||
/* B7C404 80105264 AFB7003C */ sw $s7, 0x3c($sp)
|
||||
/* B7C408 80105268 AFB60038 */ sw $s6, 0x38($sp)
|
||||
/* B7C40C 8010526C AFB50034 */ sw $s5, 0x34($sp)
|
||||
/* B7C410 80105270 AFB40030 */ sw $s4, 0x30($sp)
|
||||
/* B7C414 80105274 AFB20028 */ sw $s2, 0x28($sp)
|
||||
/* B7C418 80105278 AFB10024 */ sw $s1, 0x24($sp)
|
||||
/* B7C41C 8010527C AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* B7C420 80105280 AFA00074 */ sw $zero, 0x74($sp)
|
||||
/* B7C424 80105284 0C040AFC */ jal func_80102BF0
|
||||
/* B7C428 80105288 241E00FE */ li $fp, 254
|
||||
/* B7C42C 8010528C 24010002 */ li $at, 2
|
||||
/* B7C430 80105290 14410004 */ bne $v0, $at, .L801052A4
|
||||
/* B7C434 80105294 0040B825 */ move $s7, $v0
|
||||
/* B7C438 80105298 0C040A91 */ jal func_80102A44
|
||||
/* B7C43C 8010529C 02602025 */ move $a0, $s3
|
||||
/* B7C440 801052A0 0040B825 */ move $s7, $v0
|
||||
.L801052A4:
|
||||
/* B7C444 801052A4 10400003 */ beqz $v0, .L801052B4
|
||||
/* B7C448 801052A8 02602025 */ move $a0, $s3
|
||||
/* B7C44C 801052AC 1000012A */ b .L80105758
|
||||
/* B7C450 801052B0 02E01025 */ move $v0, $s7
|
||||
.L801052B4:
|
||||
/* B7C454 801052B4 0C0415E2 */ jal func_80105788
|
||||
/* B7C458 801052B8 27A50078 */ addiu $a1, $sp, 0x78
|
||||
/* B7C45C 801052BC 50400004 */ beql $v0, $zero, .L801052D0
|
||||
/* B7C460 801052C0 8E620050 */ lw $v0, 0x50($s3)
|
||||
/* B7C464 801052C4 10000125 */ b .L8010575C
|
||||
/* B7C468 801052C8 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
/* B7C46C 801052CC 8E620050 */ lw $v0, 0x50($s3)
|
||||
.L801052D0:
|
||||
/* B7C470 801052D0 0000A025 */ move $s4, $zero
|
||||
/* B7C474 801052D4 27B502BC */ addiu $s5, $sp, 0x2bc
|
||||
/* B7C478 801052D8 18400082 */ blez $v0, .L801054E4
|
||||
/* B7C47C 801052DC 27B204BC */ addiu $s2, $sp, 0x4bc
|
||||
/* B7C480 801052E0 8E6E005C */ lw $t6, 0x5c($s3)
|
||||
.L801052E4:
|
||||
/* B7C484 801052E4 8E640004 */ lw $a0, 4($s3)
|
||||
/* B7C488 801052E8 8E650008 */ lw $a1, 8($s3)
|
||||
/* B7C48C 801052EC 01D43021 */ addu $a2, $t6, $s4
|
||||
/* B7C490 801052F0 30CFFFFF */ andi $t7, $a2, 0xffff
|
||||
/* B7C494 801052F4 01E03025 */ move $a2, $t7
|
||||
/* B7C498 801052F8 0C0417D0 */ jal osReadMempak
|
||||
/* B7C49C 801052FC 27A7029C */ addiu $a3, $sp, 0x29c
|
||||
/* B7C4A0 80105300 10400003 */ beqz $v0, .L80105310
|
||||
/* B7C4A4 80105304 0040B825 */ move $s7, $v0
|
||||
/* B7C4A8 80105308 10000114 */ b .L8010575C
|
||||
/* B7C4AC 8010530C 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L80105310:
|
||||
/* B7C4B0 80105310 97A202A0 */ lhu $v0, 0x2a0($sp)
|
||||
/* B7C4B4 80105314 8FB8029C */ lw $t8, 0x29c($sp)
|
||||
/* B7C4B8 80105318 14400003 */ bnez $v0, .L80105328
|
||||
/* B7C4BC 8010531C 00000000 */ nop
|
||||
/* B7C4C0 80105320 5300006B */ beql $t8, $zero, .L801054D0
|
||||
/* B7C4C4 80105324 8E620050 */ lw $v0, 0x50($s3)
|
||||
.L80105328:
|
||||
/* B7C4C8 80105328 10400003 */ beqz $v0, .L80105338
|
||||
/* B7C4CC 8010532C 8FB9029C */ lw $t9, 0x29c($sp)
|
||||
/* B7C4D0 80105330 17200003 */ bnez $t9, .L80105340
|
||||
/* B7C4D4 80105334 27A902A2 */ addiu $t1, $sp, 0x2a2
|
||||
.L80105338:
|
||||
/* B7C4D8 80105338 10000044 */ b .L8010544C
|
||||
/* B7C4DC 8010533C 2404FFFF */ li $a0, -1
|
||||
.L80105340:
|
||||
/* B7C4E0 80105340 95210000 */ lhu $at, ($t1)
|
||||
/* B7C4E4 80105344 00002025 */ move $a0, $zero
|
||||
/* B7C4E8 80105348 00008025 */ move $s0, $zero
|
||||
/* B7C4EC 8010534C A6410000 */ sh $at, ($s2)
|
||||
/* B7C4F0 80105350 8E6D0060 */ lw $t5, 0x60($s3)
|
||||
/* B7C4F4 80105354 97AC04BC */ lhu $t4, 0x4bc($sp)
|
||||
/* B7C4F8 80105358 241600FF */ li $s6, 255
|
||||
/* B7C4FC 8010535C 93AE04BC */ lbu $t6, 0x4bc($sp)
|
||||
/* B7C500 80105360 018D082A */ slt $at, $t4, $t5
|
||||
/* B7C504 80105364 14200039 */ bnez $at, .L8010544C
|
||||
/* B7C508 80105368 00000000 */ nop
|
||||
/* B7C50C 8010536C 926F0064 */ lbu $t7, 0x64($s3)
|
||||
/* B7C510 80105370 93B804BD */ lbu $t8, 0x4bd($sp)
|
||||
/* B7C514 80105374 01CF082A */ slt $at, $t6, $t7
|
||||
/* B7C518 80105378 10200034 */ beqz $at, .L8010544C
|
||||
/* B7C51C 8010537C 00000000 */ nop
|
||||
/* B7C520 80105380 1B000032 */ blez $t8, .L8010544C
|
||||
/* B7C524 80105384 2B010080 */ slti $at, $t8, 0x80
|
||||
/* B7C528 80105388 10200030 */ beqz $at, .L8010544C
|
||||
/* B7C52C 8010538C 02C08825 */ move $s1, $s6
|
||||
/* B7C530 80105390 93B904BC */ lbu $t9, 0x4bc($sp)
|
||||
.L80105394:
|
||||
/* B7C534 80105394 13310010 */ beq $t9, $s1, .L801053D8
|
||||
/* B7C538 80105398 0320B025 */ move $s6, $t9
|
||||
/* B7C53C 8010539C 133E0008 */ beq $t9, $fp, .L801053C0
|
||||
/* B7C540 801053A0 03208825 */ move $s1, $t9
|
||||
/* B7C544 801053A4 02602025 */ move $a0, $s3
|
||||
/* B7C548 801053A8 02A02825 */ move $a1, $s5
|
||||
/* B7C54C 801053AC 00003025 */ move $a2, $zero
|
||||
/* B7C550 801053B0 0C040B31 */ jal func_80102CC4
|
||||
/* B7C554 801053B4 332700FF */ andi $a3, $t9, 0xff
|
||||
/* B7C558 801053B8 0040B825 */ move $s7, $v0
|
||||
/* B7C55C 801053BC 32DE00FF */ andi $fp, $s6, 0xff
|
||||
.L801053C0:
|
||||
/* B7C560 801053C0 12E00005 */ beqz $s7, .L801053D8
|
||||
/* B7C564 801053C4 24010003 */ li $at, 3
|
||||
/* B7C568 801053C8 52E10004 */ beql $s7, $at, .L801053DC
|
||||
/* B7C56C 801053CC 96410000 */ lhu $at, ($s2)
|
||||
/* B7C570 801053D0 100000E1 */ b .L80105758
|
||||
/* B7C574 801053D4 02E01025 */ move $v0, $s7
|
||||
.L801053D8:
|
||||
/* B7C578 801053D8 96410000 */ lhu $at, ($s2)
|
||||
.L801053DC:
|
||||
/* B7C57C 801053DC 02602025 */ move $a0, $s3
|
||||
/* B7C580 801053E0 27A60078 */ addiu $a2, $sp, 0x78
|
||||
/* B7C584 801053E4 A7A10004 */ sh $at, 4($sp)
|
||||
/* B7C588 801053E8 0C041698 */ jal func_80105A60
|
||||
/* B7C58C 801053EC 8FA50004 */ lw $a1, 4($sp)
|
||||
/* B7C590 801053F0 00502023 */ subu $a0, $v0, $s0
|
||||
/* B7C594 801053F4 14800015 */ bnez $a0, .L8010544C
|
||||
/* B7C598 801053F8 93AB04BD */ lbu $t3, 0x4bd($sp)
|
||||
/* B7C59C 801053FC 000B6040 */ sll $t4, $t3, 1
|
||||
/* B7C5A0 80105400 02AC6821 */ addu $t5, $s5, $t4
|
||||
/* B7C5A4 80105404 95A10000 */ lhu $at, ($t5)
|
||||
/* B7C5A8 80105408 24100001 */ li $s0, 1
|
||||
/* B7C5AC 8010540C A6410000 */ sh $at, ($s2)
|
||||
/* B7C5B0 80105410 8E790060 */ lw $t9, 0x60($s3)
|
||||
/* B7C5B4 80105414 97B804BC */ lhu $t8, 0x4bc($sp)
|
||||
/* B7C5B8 80105418 93AB04BD */ lbu $t3, 0x4bd($sp)
|
||||
/* B7C5BC 8010541C 93AA04BC */ lbu $t2, 0x4bc($sp)
|
||||
/* B7C5C0 80105420 0319082A */ slt $at, $t8, $t9
|
||||
/* B7C5C4 80105424 14200009 */ bnez $at, .L8010544C
|
||||
/* B7C5C8 80105428 00000000 */ nop
|
||||
/* B7C5CC 8010542C 92690064 */ lbu $t1, 0x64($s3)
|
||||
/* B7C5D0 80105430 0149082A */ slt $at, $t2, $t1
|
||||
/* B7C5D4 80105434 10200005 */ beqz $at, .L8010544C
|
||||
/* B7C5D8 80105438 00000000 */ nop
|
||||
/* B7C5DC 8010543C 19600003 */ blez $t3, .L8010544C
|
||||
/* B7C5E0 80105440 29610080 */ slti $at, $t3, 0x80
|
||||
/* B7C5E4 80105444 5420FFD3 */ bnezl $at, .L80105394
|
||||
/* B7C5E8 80105448 93B904BC */ lbu $t9, 0x4bc($sp)
|
||||
.L8010544C:
|
||||
/* B7C5EC 8010544C 14800003 */ bnez $a0, .L8010545C
|
||||
/* B7C5F0 80105450 97AC04BC */ lhu $t4, 0x4bc($sp)
|
||||
/* B7C5F4 80105454 24010001 */ li $at, 1
|
||||
/* B7C5F8 80105458 1181001C */ beq $t4, $at, .L801054CC
|
||||
.L8010545C:
|
||||
/* B7C5FC 8010545C 27A4029C */ addiu $a0, $sp, 0x29c
|
||||
/* B7C600 80105460 0C001114 */ jal bzero
|
||||
/* B7C604 80105464 24050020 */ li $a1, 32
|
||||
/* B7C608 80105468 926E0065 */ lbu $t6, 0x65($s3)
|
||||
/* B7C60C 8010546C 02602025 */ move $a0, $s3
|
||||
/* B7C610 80105470 51C00008 */ beql $t6, $zero, .L80105494
|
||||
/* B7C614 80105474 8E6D005C */ lw $t5, 0x5c($s3)
|
||||
/* B7C618 80105478 0C041320 */ jal func_80104C80
|
||||
/* B7C61C 8010547C 00002825 */ move $a1, $zero
|
||||
/* B7C620 80105480 50400004 */ beql $v0, $zero, .L80105494
|
||||
/* B7C624 80105484 8E6D005C */ lw $t5, 0x5c($s3)
|
||||
/* B7C628 80105488 100000B4 */ b .L8010575C
|
||||
/* B7C62C 8010548C 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
/* B7C630 80105490 8E6D005C */ lw $t5, 0x5c($s3)
|
||||
.L80105494:
|
||||
/* B7C634 80105494 8E640004 */ lw $a0, 4($s3)
|
||||
/* B7C638 80105498 8E650008 */ lw $a1, 8($s3)
|
||||
/* B7C63C 8010549C 01B43021 */ addu $a2, $t5, $s4
|
||||
/* B7C640 801054A0 30CFFFFF */ andi $t7, $a2, 0xffff
|
||||
/* B7C644 801054A4 01E03025 */ move $a2, $t7
|
||||
/* B7C648 801054A8 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B7C64C 801054AC 0C04173C */ jal func_80105CF0
|
||||
/* B7C650 801054B0 27A7029C */ addiu $a3, $sp, 0x29c
|
||||
/* B7C654 801054B4 10400003 */ beqz $v0, .L801054C4
|
||||
/* B7C658 801054B8 8FB80074 */ lw $t8, 0x74($sp)
|
||||
/* B7C65C 801054BC 100000A7 */ b .L8010575C
|
||||
/* B7C660 801054C0 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L801054C4:
|
||||
/* B7C664 801054C4 27190001 */ addiu $t9, $t8, 1
|
||||
/* B7C668 801054C8 AFB90074 */ sw $t9, 0x74($sp)
|
||||
.L801054CC:
|
||||
/* B7C66C 801054CC 8E620050 */ lw $v0, 0x50($s3)
|
||||
.L801054D0:
|
||||
/* B7C670 801054D0 26940001 */ addiu $s4, $s4, 1
|
||||
/* B7C674 801054D4 0282082A */ slt $at, $s4, $v0
|
||||
/* B7C678 801054D8 5420FF82 */ bnezl $at, .L801052E4
|
||||
/* B7C67C 801054DC 8E6E005C */ lw $t6, 0x5c($s3)
|
||||
/* B7C680 801054E0 0000A025 */ move $s4, $zero
|
||||
.L801054E4:
|
||||
/* B7C684 801054E4 18400021 */ blez $v0, .L8010556C
|
||||
/* B7C688 801054E8 27B502BC */ addiu $s5, $sp, 0x2bc
|
||||
/* B7C68C 801054EC 8E6A005C */ lw $t2, 0x5c($s3)
|
||||
.L801054F0:
|
||||
/* B7C690 801054F0 8E640004 */ lw $a0, 4($s3)
|
||||
/* B7C694 801054F4 8E650008 */ lw $a1, 8($s3)
|
||||
/* B7C698 801054F8 01543021 */ addu $a2, $t2, $s4
|
||||
/* B7C69C 801054FC 30C9FFFF */ andi $t1, $a2, 0xffff
|
||||
/* B7C6A0 80105500 01203025 */ move $a2, $t1
|
||||
/* B7C6A4 80105504 0C0417D0 */ jal osReadMempak
|
||||
/* B7C6A8 80105508 27A7029C */ addiu $a3, $sp, 0x29c
|
||||
/* B7C6AC 8010550C 10400003 */ beqz $v0, .L8010551C
|
||||
/* B7C6B0 80105510 97AE02A0 */ lhu $t6, 0x2a0($sp)
|
||||
/* B7C6B4 80105514 10000091 */ b .L8010575C
|
||||
/* B7C6B8 80105518 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L8010551C:
|
||||
/* B7C6BC 8010551C 00145840 */ sll $t3, $s4, 1
|
||||
/* B7C6C0 80105520 27AC027C */ addiu $t4, $sp, 0x27c
|
||||
/* B7C6C4 80105524 11C0000B */ beqz $t6, .L80105554
|
||||
/* B7C6C8 80105528 016C2021 */ addu $a0, $t3, $t4
|
||||
/* B7C6CC 8010552C 8FAD029C */ lw $t5, 0x29c($sp)
|
||||
/* B7C6D0 80105530 97AF02A2 */ lhu $t7, 0x2a2($sp)
|
||||
/* B7C6D4 80105534 51A00008 */ beql $t5, $zero, .L80105558
|
||||
/* B7C6D8 80105538 A4800000 */ sh $zero, ($a0)
|
||||
/* B7C6DC 8010553C 96780062 */ lhu $t8, 0x62($s3)
|
||||
/* B7C6E0 80105540 01F8082A */ slt $at, $t7, $t8
|
||||
/* B7C6E4 80105544 54200004 */ bnezl $at, .L80105558
|
||||
/* B7C6E8 80105548 A4800000 */ sh $zero, ($a0)
|
||||
/* B7C6EC 8010554C 10000002 */ b .L80105558
|
||||
/* B7C6F0 80105550 A48F0000 */ sh $t7, ($a0)
|
||||
.L80105554:
|
||||
/* B7C6F4 80105554 A4800000 */ sh $zero, ($a0)
|
||||
.L80105558:
|
||||
/* B7C6F8 80105558 8E790050 */ lw $t9, 0x50($s3)
|
||||
/* B7C6FC 8010555C 26940001 */ addiu $s4, $s4, 1
|
||||
/* B7C700 80105560 0299082A */ slt $at, $s4, $t9
|
||||
/* B7C704 80105564 5420FFE2 */ bnezl $at, .L801054F0
|
||||
/* B7C708 80105568 8E6A005C */ lw $t2, 0x5c($s3)
|
||||
.L8010556C:
|
||||
/* B7C70C 8010556C 926A0064 */ lbu $t2, 0x64($s3)
|
||||
/* B7C710 80105570 0000B025 */ move $s6, $zero
|
||||
/* B7C714 80105574 241E0003 */ li $fp, 3
|
||||
/* B7C718 80105578 1940006B */ blez $t2, .L80105728
|
||||
/* B7C71C 8010557C 27B203BC */ addiu $s2, $sp, 0x3bc
|
||||
/* B7C720 80105580 27B00060 */ addiu $s0, $sp, 0x60
|
||||
.L80105584:
|
||||
/* B7C724 80105584 02602025 */ move $a0, $s3
|
||||
/* B7C728 80105588 02A02825 */ move $a1, $s5
|
||||
/* B7C72C 8010558C 00003025 */ move $a2, $zero
|
||||
/* B7C730 80105590 0C040B31 */ jal func_80102CC4
|
||||
/* B7C734 80105594 32C700FF */ andi $a3, $s6, 0xff
|
||||
/* B7C738 80105598 10400006 */ beqz $v0, .L801055B4
|
||||
/* B7C73C 8010559C 27A804BC */ addiu $t0, $sp, 0x4bc
|
||||
/* B7C740 801055A0 24010003 */ li $at, 3
|
||||
/* B7C744 801055A4 50410004 */ beql $v0, $at, .L801055B8
|
||||
/* B7C748 801055A8 02C08825 */ move $s1, $s6
|
||||
/* B7C74C 801055AC 1000006B */ b .L8010575C
|
||||
/* B7C750 801055B0 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L801055B4:
|
||||
/* B7C754 801055B4 02C08825 */ move $s1, $s6
|
||||
.L801055B8:
|
||||
/* B7C758 801055B8 1AC00003 */ blez $s6, .L801055C8
|
||||
/* B7C75C 801055BC 0000A025 */ move $s4, $zero
|
||||
/* B7C760 801055C0 10000002 */ b .L801055CC
|
||||
/* B7C764 801055C4 24050001 */ li $a1, 1
|
||||
.L801055C8:
|
||||
/* B7C768 801055C8 8E650060 */ lw $a1, 0x60($s3)
|
||||
.L801055CC:
|
||||
/* B7C76C 801055CC 18A0001C */ blez $a1, .L80105640
|
||||
/* B7C770 801055D0 30A70003 */ andi $a3, $a1, 3
|
||||
/* B7C774 801055D4 10E0000B */ beqz $a3, .L80105604
|
||||
/* B7C778 801055D8 00E02025 */ move $a0, $a3
|
||||
/* B7C77C 801055DC 00143040 */ sll $a2, $s4, 1
|
||||
/* B7C780 801055E0 02461821 */ addu $v1, $s2, $a2
|
||||
/* B7C784 801055E4 02A61021 */ addu $v0, $s5, $a2
|
||||
.L801055E8:
|
||||
/* B7C788 801055E8 94490000 */ lhu $t1, ($v0)
|
||||
/* B7C78C 801055EC 26940001 */ addiu $s4, $s4, 1
|
||||
/* B7C790 801055F0 24630002 */ addiu $v1, $v1, 2
|
||||
/* B7C794 801055F4 24420002 */ addiu $v0, $v0, 2
|
||||
/* B7C798 801055F8 1494FFFB */ bne $a0, $s4, .L801055E8
|
||||
/* B7C79C 801055FC A469FFFE */ sh $t1, -2($v1)
|
||||
/* B7C7A0 80105600 1285000F */ beq $s4, $a1, .L80105640
|
||||
.L80105604:
|
||||
/* B7C7A4 80105604 00143040 */ sll $a2, $s4, 1
|
||||
/* B7C7A8 80105608 02461821 */ addu $v1, $s2, $a2
|
||||
/* B7C7AC 8010560C 02A61021 */ addu $v0, $s5, $a2
|
||||
.L80105610:
|
||||
/* B7C7B0 80105610 944C0002 */ lhu $t4, 2($v0)
|
||||
/* B7C7B4 80105614 944E0004 */ lhu $t6, 4($v0)
|
||||
/* B7C7B8 80105618 944D0006 */ lhu $t5, 6($v0)
|
||||
/* B7C7BC 8010561C 944B0000 */ lhu $t3, ($v0)
|
||||
/* B7C7C0 80105620 26940004 */ addiu $s4, $s4, 4
|
||||
/* B7C7C4 80105624 24630008 */ addiu $v1, $v1, 8
|
||||
/* B7C7C8 80105628 24420008 */ addiu $v0, $v0, 8
|
||||
/* B7C7CC 8010562C A46CFFFA */ sh $t4, -6($v1)
|
||||
/* B7C7D0 80105630 A46EFFFC */ sh $t6, -4($v1)
|
||||
/* B7C7D4 80105634 A46DFFFE */ sh $t5, -2($v1)
|
||||
/* B7C7D8 80105638 1685FFF5 */ bne $s4, $a1, .L80105610
|
||||
/* B7C7DC 8010563C A46BFFF8 */ sh $t3, -8($v1)
|
||||
.L80105640:
|
||||
/* B7C7E0 80105640 2A810080 */ slti $at, $s4, 0x80
|
||||
/* B7C7E4 80105644 10200007 */ beqz $at, .L80105664
|
||||
/* B7C7E8 80105648 02402825 */ move $a1, $s2
|
||||
/* B7C7EC 8010564C 0014C040 */ sll $t8, $s4, 1
|
||||
/* B7C7F0 80105650 02581821 */ addu $v1, $s2, $t8
|
||||
.L80105654:
|
||||
/* B7C7F4 80105654 24630002 */ addiu $v1, $v1, 2
|
||||
/* B7C7F8 80105658 0068082B */ sltu $at, $v1, $t0
|
||||
/* B7C7FC 8010565C 1420FFFD */ bnez $at, .L80105654
|
||||
/* B7C800 80105660 A47EFFFE */ sh $fp, -2($v1)
|
||||
.L80105664:
|
||||
/* B7C804 80105664 8E6F0050 */ lw $t7, 0x50($s3)
|
||||
/* B7C808 80105668 0000A025 */ move $s4, $zero
|
||||
/* B7C80C 8010566C 24060001 */ li $a2, 1
|
||||
/* B7C810 80105670 19E00021 */ blez $t7, .L801056F8
|
||||
/* B7C814 80105674 32C700FF */ andi $a3, $s6, 0xff
|
||||
/* B7C818 80105678 27A4027C */ addiu $a0, $sp, 0x27c
|
||||
/* B7C81C 8010567C 90990000 */ lbu $t9, ($a0)
|
||||
.L80105680:
|
||||
/* B7C820 80105680 56390018 */ bnel $s1, $t9, .L801056E4
|
||||
/* B7C824 80105684 8E6E0050 */ lw $t6, 0x50($s3)
|
||||
/* B7C828 80105688 948A0000 */ lhu $t2, ($a0)
|
||||
/* B7C82C 8010568C 96690062 */ lhu $t1, 0x62($s3)
|
||||
/* B7C830 80105690 0149082A */ slt $at, $t2, $t1
|
||||
/* B7C834 80105694 54200013 */ bnezl $at, .L801056E4
|
||||
/* B7C838 80105698 8E6E0050 */ lw $t6, 0x50($s3)
|
||||
/* B7C83C 8010569C 90830001 */ lbu $v1, 1($a0)
|
||||
.L801056A0:
|
||||
/* B7C840 801056A0 00031040 */ sll $v0, $v1, 1
|
||||
/* B7C844 801056A4 02A25821 */ addu $t3, $s5, $v0
|
||||
/* B7C848 801056A8 95610000 */ lhu $at, ($t3)
|
||||
/* B7C84C 801056AC 02426821 */ addu $t5, $s2, $v0
|
||||
/* B7C850 801056B0 A6010000 */ sh $at, ($s0)
|
||||
/* B7C854 801056B4 A5A10000 */ sh $at, ($t5)
|
||||
/* B7C858 801056B8 96010000 */ lhu $at, ($s0)
|
||||
/* B7C85C 801056BC A4810000 */ sh $at, ($a0)
|
||||
/* B7C860 801056C0 90890000 */ lbu $t1, ($a0)
|
||||
/* B7C864 801056C4 56290007 */ bnel $s1, $t1, .L801056E4
|
||||
/* B7C868 801056C8 8E6E0050 */ lw $t6, 0x50($s3)
|
||||
/* B7C86C 801056CC 966B0062 */ lhu $t3, 0x62($s3)
|
||||
/* B7C870 801056D0 302CFFFF */ andi $t4, $at, 0xffff
|
||||
/* B7C874 801056D4 018B082A */ slt $at, $t4, $t3
|
||||
/* B7C878 801056D8 5020FFF1 */ beql $at, $zero, .L801056A0
|
||||
/* B7C87C 801056DC 90830001 */ lbu $v1, 1($a0)
|
||||
/* B7C880 801056E0 8E6E0050 */ lw $t6, 0x50($s3)
|
||||
.L801056E4:
|
||||
/* B7C884 801056E4 26940001 */ addiu $s4, $s4, 1
|
||||
/* B7C888 801056E8 24840002 */ addiu $a0, $a0, 2
|
||||
/* B7C88C 801056EC 028E082A */ slt $at, $s4, $t6
|
||||
/* B7C890 801056F0 5420FFE3 */ bnezl $at, .L80105680
|
||||
/* B7C894 801056F4 90990000 */ lbu $t9, ($a0)
|
||||
.L801056F8:
|
||||
/* B7C898 801056F8 0C040B31 */ jal func_80102CC4
|
||||
/* B7C89C 801056FC 02602025 */ move $a0, $s3
|
||||
/* B7C8A0 80105700 50400004 */ beql $v0, $zero, .L80105714
|
||||
/* B7C8A4 80105704 926D0064 */ lbu $t5, 0x64($s3)
|
||||
/* B7C8A8 80105708 10000014 */ b .L8010575C
|
||||
/* B7C8AC 8010570C 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
/* B7C8B0 80105710 926D0064 */ lbu $t5, 0x64($s3)
|
||||
.L80105714:
|
||||
/* B7C8B4 80105714 26D60001 */ addiu $s6, $s6, 1
|
||||
/* B7C8B8 80105718 32D800FF */ andi $t8, $s6, 0xff
|
||||
/* B7C8BC 8010571C 030D082A */ slt $at, $t8, $t5
|
||||
/* B7C8C0 80105720 1420FF98 */ bnez $at, .L80105584
|
||||
/* B7C8C4 80105724 0300B025 */ move $s6, $t8
|
||||
.L80105728:
|
||||
/* B7C8C8 80105728 8FAF0074 */ lw $t7, 0x74($sp)
|
||||
/* B7C8CC 8010572C 00001025 */ move $v0, $zero
|
||||
/* B7C8D0 80105730 51E00006 */ beql $t7, $zero, .L8010574C
|
||||
/* B7C8D4 80105734 8E690000 */ lw $t1, ($s3)
|
||||
/* B7C8D8 80105738 8E790000 */ lw $t9, ($s3)
|
||||
/* B7C8DC 8010573C 372A0002 */ ori $t2, $t9, 2
|
||||
/* B7C8E0 80105740 10000005 */ b .L80105758
|
||||
/* B7C8E4 80105744 AE6A0000 */ sw $t2, ($s3)
|
||||
/* B7C8E8 80105748 8E690000 */ lw $t1, ($s3)
|
||||
.L8010574C:
|
||||
/* B7C8EC 8010574C 2401FFFD */ li $at, -3
|
||||
/* B7C8F0 80105750 01216024 */ and $t4, $t1, $at
|
||||
/* B7C8F4 80105754 AE6C0000 */ sw $t4, ($s3)
|
||||
.L80105758:
|
||||
/* B7C8F8 80105758 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L8010575C:
|
||||
/* B7C8FC 8010575C 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* B7C900 80105760 8FB10024 */ lw $s1, 0x24($sp)
|
||||
/* B7C904 80105764 8FB20028 */ lw $s2, 0x28($sp)
|
||||
/* B7C908 80105768 8FB3002C */ lw $s3, 0x2c($sp)
|
||||
/* B7C90C 8010576C 8FB40030 */ lw $s4, 0x30($sp)
|
||||
/* B7C910 80105770 8FB50034 */ lw $s5, 0x34($sp)
|
||||
/* B7C914 80105774 8FB60038 */ lw $s6, 0x38($sp)
|
||||
/* B7C918 80105778 8FB7003C */ lw $s7, 0x3c($sp)
|
||||
/* B7C91C 8010577C 8FBE0040 */ lw $fp, 0x40($sp)
|
||||
/* B7C920 80105780 03E00008 */ jr $ra
|
||||
/* B7C924 80105784 27BD04C8 */ addiu $sp, $sp, 0x4c8
|
||||
|
||||
glabel func_80105788
|
||||
/* B7C928 80105788 27BDFE98 */ addiu $sp, $sp, -0x168
|
||||
/* B7C92C 8010578C AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B7C930 80105790 00809825 */ move $s3, $a0
|
||||
/* B7C934 80105794 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B7C938 80105798 00A0A025 */ move $s4, $a1
|
||||
/* B7C93C 8010579C AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* B7C940 801057A0 AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* B7C944 801057A4 AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* B7C948 801057A8 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* B7C94C 801057AC AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* B7C950 801057B0 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B7C954 801057B4 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B7C958 801057B8 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B7C95C 801057BC 24040100 */ li $a0, 256
|
||||
/* B7C960 801057C0 00001025 */ move $v0, $zero
|
||||
/* B7C964 801057C4 00A01825 */ move $v1, $a1
|
||||
.L801057C8:
|
||||
/* B7C968 801057C8 24420004 */ addiu $v0, $v0, 4
|
||||
/* B7C96C 801057CC A0600102 */ sb $zero, 0x102($v1)
|
||||
/* B7C970 801057D0 A0600103 */ sb $zero, 0x103($v1)
|
||||
/* B7C974 801057D4 A0600104 */ sb $zero, 0x104($v1)
|
||||
/* B7C978 801057D8 24630004 */ addiu $v1, $v1, 4
|
||||
/* B7C97C 801057DC 1444FFFA */ bne $v0, $a0, .L801057C8
|
||||
/* B7C980 801057E0 A06000FD */ sb $zero, 0xfd($v1)
|
||||
/* B7C984 801057E4 240E00FF */ li $t6, 255
|
||||
/* B7C988 801057E8 A28E0100 */ sb $t6, 0x100($s4)
|
||||
/* B7C98C 801057EC 926F0064 */ lbu $t7, 0x64($s3)
|
||||
/* B7C990 801057F0 0000B825 */ move $s7, $zero
|
||||
/* B7C994 801057F4 00008025 */ move $s0, $zero
|
||||
/* B7C998 801057F8 19E0008C */ blez $t7, .L80105A2C
|
||||
/* B7C99C 801057FC 241E0080 */ li $fp, 128
|
||||
/* B7C9A0 80105800 27B6015A */ addiu $s6, $sp, 0x15a
|
||||
/* B7C9A4 80105804 27B50058 */ addiu $s5, $sp, 0x58
|
||||
/* B7C9A8 80105808 27B20158 */ addiu $s2, $sp, 0x158
|
||||
.L8010580C:
|
||||
/* B7C9AC 8010580C 1A000003 */ blez $s0, .L8010581C
|
||||
/* B7C9B0 80105810 02602025 */ move $a0, $s3
|
||||
/* B7C9B4 80105814 10000002 */ b .L80105820
|
||||
/* B7C9B8 80105818 24110001 */ li $s1, 1
|
||||
.L8010581C:
|
||||
/* B7C9BC 8010581C 8E710060 */ lw $s1, 0x60($s3)
|
||||
.L80105820:
|
||||
/* B7C9C0 80105820 02A02825 */ move $a1, $s5
|
||||
/* B7C9C4 80105824 00003025 */ move $a2, $zero
|
||||
/* B7C9C8 80105828 0C040B31 */ jal func_80102CC4
|
||||
/* B7C9CC 8010582C 32E700FF */ andi $a3, $s7, 0xff
|
||||
/* B7C9D0 80105830 10400005 */ beqz $v0, .L80105848
|
||||
/* B7C9D4 80105834 24010003 */ li $at, 3
|
||||
/* B7C9D8 80105838 50410004 */ beql $v0, $at, .L8010584C
|
||||
/* B7C9DC 8010583C 2A210080 */ slti $at, $s1, 0x80
|
||||
/* B7C9E0 80105840 1000007C */ b .L80105A34
|
||||
/* B7C9E4 80105844 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80105848:
|
||||
/* B7C9E8 80105848 2A210080 */ slti $at, $s1, 0x80
|
||||
.L8010584C:
|
||||
/* B7C9EC 8010584C 10200071 */ beqz $at, .L80105A14
|
||||
/* B7C9F0 80105850 02201025 */ move $v0, $s1
|
||||
/* B7C9F4 80105854 03D11823 */ subu $v1, $fp, $s1
|
||||
/* B7C9F8 80105858 30780001 */ andi $t8, $v1, 1
|
||||
/* B7C9FC 8010585C 13000025 */ beqz $t8, .L801058F4
|
||||
/* B7CA00 80105860 0011C840 */ sll $t9, $s1, 1
|
||||
/* B7CA04 80105864 02B94021 */ addu $t0, $s5, $t9
|
||||
/* B7CA08 80105868 95010000 */ lhu $at, ($t0)
|
||||
/* B7CA0C 8010586C A6410000 */ sh $at, ($s2)
|
||||
/* B7CA10 80105870 8E6C0060 */ lw $t4, 0x60($s3)
|
||||
/* B7CA14 80105874 97AB0158 */ lhu $t3, 0x158($sp)
|
||||
/* B7CA18 80105878 93AD0158 */ lbu $t5, 0x158($sp)
|
||||
/* B7CA1C 8010587C 016C082A */ slt $at, $t3, $t4
|
||||
/* B7CA20 80105880 5420001B */ bnezl $at, .L801058F0
|
||||
/* B7CA24 80105884 26220001 */ addiu $v0, $s1, 1
|
||||
/* B7CA28 80105888 120D0018 */ beq $s0, $t5, .L801058EC
|
||||
/* B7CA2C 8010588C 93AE0159 */ lbu $t6, 0x159($sp)
|
||||
/* B7CA30 80105890 31CF007F */ andi $t7, $t6, 0x7f
|
||||
/* B7CA34 80105894 05E10003 */ bgez $t7, .L801058A4
|
||||
/* B7CA38 80105898 000FC083 */ sra $t8, $t7, 2
|
||||
/* B7CA3C 8010589C 25E10003 */ addiu $at, $t7, 3
|
||||
/* B7CA40 801058A0 0001C083 */ sra $t8, $at, 2
|
||||
.L801058A4:
|
||||
/* B7CA44 801058A4 05A10004 */ bgez $t5, .L801058B8
|
||||
/* B7CA48 801058A8 31B90007 */ andi $t9, $t5, 7
|
||||
/* B7CA4C 801058AC 13200002 */ beqz $t9, .L801058B8
|
||||
/* B7CA50 801058B0 00000000 */ nop
|
||||
/* B7CA54 801058B4 2739FFF8 */ addiu $t9, $t9, -8
|
||||
.L801058B8:
|
||||
/* B7CA58 801058B8 00194940 */ sll $t1, $t9, 5
|
||||
/* B7CA5C 801058BC 03091821 */ addu $v1, $t8, $t1
|
||||
/* B7CA60 801058C0 02831021 */ addu $v0, $s4, $v1
|
||||
/* B7CA64 801058C4 90480101 */ lbu $t0, 0x101($v0)
|
||||
/* B7CA68 801058C8 06010004 */ bgez $s0, .L801058DC
|
||||
/* B7CA6C 801058CC 320A0007 */ andi $t2, $s0, 7
|
||||
/* B7CA70 801058D0 11400002 */ beqz $t2, .L801058DC
|
||||
/* B7CA74 801058D4 00000000 */ nop
|
||||
/* B7CA78 801058D8 254AFFF8 */ addiu $t2, $t2, -8
|
||||
.L801058DC:
|
||||
/* B7CA7C 801058DC 240B0001 */ li $t3, 1
|
||||
/* B7CA80 801058E0 014B6004 */ sllv $t4, $t3, $t2
|
||||
/* B7CA84 801058E4 010C7025 */ or $t6, $t0, $t4
|
||||
/* B7CA88 801058E8 A04E0101 */ sb $t6, 0x101($v0)
|
||||
.L801058EC:
|
||||
/* B7CA8C 801058EC 26220001 */ addiu $v0, $s1, 1
|
||||
.L801058F0:
|
||||
/* B7CA90 801058F0 105E0048 */ beq $v0, $fp, .L80105A14
|
||||
.L801058F4:
|
||||
/* B7CA94 801058F4 00027840 */ sll $t7, $v0, 1
|
||||
/* B7CA98 801058F8 02AF2821 */ addu $a1, $s5, $t7
|
||||
/* B7CA9C 801058FC 24A40002 */ addiu $a0, $a1, 2
|
||||
.L80105900:
|
||||
/* B7CAA0 80105900 94A10000 */ lhu $at, ($a1)
|
||||
/* B7CAA4 80105904 A6410000 */ sh $at, ($s2)
|
||||
/* B7CAA8 80105908 8E690060 */ lw $t1, 0x60($s3)
|
||||
/* B7CAAC 8010590C 97B80158 */ lhu $t8, 0x158($sp)
|
||||
/* B7CAB0 80105910 93AB0158 */ lbu $t3, 0x158($sp)
|
||||
/* B7CAB4 80105914 0309082A */ slt $at, $t8, $t1
|
||||
/* B7CAB8 80105918 5420001B */ bnezl $at, .L80105988
|
||||
/* B7CABC 8010591C 94810000 */ lhu $at, ($a0)
|
||||
/* B7CAC0 80105920 120B0018 */ beq $s0, $t3, .L80105984
|
||||
/* B7CAC4 80105924 93AA0159 */ lbu $t2, 0x159($sp)
|
||||
/* B7CAC8 80105928 3148007F */ andi $t0, $t2, 0x7f
|
||||
/* B7CACC 8010592C 05010003 */ bgez $t0, .L8010593C
|
||||
/* B7CAD0 80105930 00086083 */ sra $t4, $t0, 2
|
||||
/* B7CAD4 80105934 25010003 */ addiu $at, $t0, 3
|
||||
/* B7CAD8 80105938 00016083 */ sra $t4, $at, 2
|
||||
.L8010593C:
|
||||
/* B7CADC 8010593C 05610004 */ bgez $t3, .L80105950
|
||||
/* B7CAE0 80105940 316E0007 */ andi $t6, $t3, 7
|
||||
/* B7CAE4 80105944 11C00002 */ beqz $t6, .L80105950
|
||||
/* B7CAE8 80105948 00000000 */ nop
|
||||
/* B7CAEC 8010594C 25CEFFF8 */ addiu $t6, $t6, -8
|
||||
.L80105950:
|
||||
/* B7CAF0 80105950 000E7940 */ sll $t7, $t6, 5
|
||||
/* B7CAF4 80105954 018F1821 */ addu $v1, $t4, $t7
|
||||
/* B7CAF8 80105958 02831021 */ addu $v0, $s4, $v1
|
||||
/* B7CAFC 8010595C 904D0101 */ lbu $t5, 0x101($v0)
|
||||
/* B7CB00 80105960 06010004 */ bgez $s0, .L80105974
|
||||
/* B7CB04 80105964 32190007 */ andi $t9, $s0, 7
|
||||
/* B7CB08 80105968 13200002 */ beqz $t9, .L80105974
|
||||
/* B7CB0C 8010596C 00000000 */ nop
|
||||
/* B7CB10 80105970 2739FFF8 */ addiu $t9, $t9, -8
|
||||
.L80105974:
|
||||
/* B7CB14 80105974 24180001 */ li $t8, 1
|
||||
/* B7CB18 80105978 03384804 */ sllv $t1, $t8, $t9
|
||||
/* B7CB1C 8010597C 01A95025 */ or $t2, $t5, $t1
|
||||
/* B7CB20 80105980 A04A0101 */ sb $t2, 0x101($v0)
|
||||
.L80105984:
|
||||
/* B7CB24 80105984 94810000 */ lhu $at, ($a0)
|
||||
.L80105988:
|
||||
/* B7CB28 80105988 24840004 */ addiu $a0, $a0, 4
|
||||
/* B7CB2C 8010598C A6410000 */ sh $at, ($s2)
|
||||
/* B7CB30 80105990 8E6C0060 */ lw $t4, 0x60($s3)
|
||||
/* B7CB34 80105994 97AE0158 */ lhu $t6, 0x158($sp)
|
||||
/* B7CB38 80105998 93AF0158 */ lbu $t7, 0x158($sp)
|
||||
/* B7CB3C 8010599C 01CC082A */ slt $at, $t6, $t4
|
||||
/* B7CB40 801059A0 1420001A */ bnez $at, .L80105A0C
|
||||
/* B7CB44 801059A4 00000000 */ nop
|
||||
/* B7CB48 801059A8 120F0018 */ beq $s0, $t7, .L80105A0C
|
||||
/* B7CB4C 801059AC 93B80159 */ lbu $t8, 0x159($sp)
|
||||
/* B7CB50 801059B0 3319007F */ andi $t9, $t8, 0x7f
|
||||
/* B7CB54 801059B4 07210003 */ bgez $t9, .L801059C4
|
||||
/* B7CB58 801059B8 00196883 */ sra $t5, $t9, 2
|
||||
/* B7CB5C 801059BC 27210003 */ addiu $at, $t9, 3
|
||||
/* B7CB60 801059C0 00016883 */ sra $t5, $at, 2
|
||||
.L801059C4:
|
||||
/* B7CB64 801059C4 05E10004 */ bgez $t7, .L801059D8
|
||||
/* B7CB68 801059C8 31E90007 */ andi $t1, $t7, 7
|
||||
/* B7CB6C 801059CC 11200002 */ beqz $t1, .L801059D8
|
||||
/* B7CB70 801059D0 00000000 */ nop
|
||||
/* B7CB74 801059D4 2529FFF8 */ addiu $t1, $t1, -8
|
||||
.L801059D8:
|
||||
/* B7CB78 801059D8 00095140 */ sll $t2, $t1, 5
|
||||
/* B7CB7C 801059DC 01AA1821 */ addu $v1, $t5, $t2
|
||||
/* B7CB80 801059E0 02831021 */ addu $v0, $s4, $v1
|
||||
/* B7CB84 801059E4 90480101 */ lbu $t0, 0x101($v0)
|
||||
/* B7CB88 801059E8 06010004 */ bgez $s0, .L801059FC
|
||||
/* B7CB8C 801059EC 320B0007 */ andi $t3, $s0, 7
|
||||
/* B7CB90 801059F0 11600002 */ beqz $t3, .L801059FC
|
||||
/* B7CB94 801059F4 00000000 */ nop
|
||||
/* B7CB98 801059F8 256BFFF8 */ addiu $t3, $t3, -8
|
||||
.L801059FC:
|
||||
/* B7CB9C 801059FC 240E0001 */ li $t6, 1
|
||||
/* B7CBA0 80105A00 016E6004 */ sllv $t4, $t6, $t3
|
||||
/* B7CBA4 80105A04 010CC025 */ or $t8, $t0, $t4
|
||||
/* B7CBA8 80105A08 A0580101 */ sb $t8, 0x101($v0)
|
||||
.L80105A0C:
|
||||
/* B7CBAC 80105A0C 1496FFBC */ bne $a0, $s6, .L80105900
|
||||
/* B7CBB0 80105A10 24A50004 */ addiu $a1, $a1, 4
|
||||
.L80105A14:
|
||||
/* B7CBB4 80105A14 926F0064 */ lbu $t7, 0x64($s3)
|
||||
/* B7CBB8 80105A18 26F70001 */ addiu $s7, $s7, 1
|
||||
/* B7CBBC 80105A1C 32F000FF */ andi $s0, $s7, 0xff
|
||||
/* B7CBC0 80105A20 020F082A */ slt $at, $s0, $t7
|
||||
/* B7CBC4 80105A24 1420FF79 */ bnez $at, .L8010580C
|
||||
/* B7CBC8 80105A28 0200B825 */ move $s7, $s0
|
||||
.L80105A2C:
|
||||
/* B7CBCC 80105A2C 00001025 */ move $v0, $zero
|
||||
/* B7CBD0 80105A30 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L80105A34:
|
||||
/* B7CBD4 80105A34 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B7CBD8 80105A38 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B7CBDC 80105A3C 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B7CBE0 80105A40 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B7CBE4 80105A44 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B7CBE8 80105A48 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* B7CBEC 80105A4C 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* B7CBF0 80105A50 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* B7CBF4 80105A54 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* B7CBF8 80105A58 03E00008 */ jr $ra
|
||||
/* B7CBFC 80105A5C 27BD0168 */ addiu $sp, $sp, 0x168
|
||||
|
||||
glabel func_80105A60
|
||||
/* B7CC00 80105A60 27BDFFC8 */ addiu $sp, $sp, -0x38
|
||||
/* B7CC04 80105A64 AFA5003C */ sw $a1, 0x3c($sp)
|
||||
/* B7CC08 80105A68 93B8003C */ lbu $t8, 0x3c($sp)
|
||||
/* B7CC0C 80105A6C AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B7CC10 80105A70 93AE003D */ lbu $t6, 0x3d($sp)
|
||||
/* B7CC14 80105A74 0080A025 */ move $s4, $a0
|
||||
/* B7CC18 80105A78 AFBF0034 */ sw $ra, 0x34($sp)
|
||||
/* B7CC1C 80105A7C AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* B7CC20 80105A80 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* B7CC24 80105A84 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B7CC28 80105A88 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B7CC2C 80105A8C AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B7CC30 80105A90 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B7CC34 80105A94 92890064 */ lbu $t1, 0x64($s4)
|
||||
/* B7CC38 80105A98 00C09825 */ move $s3, $a2
|
||||
/* B7CC3C 80105A9C 00008025 */ move $s0, $zero
|
||||
/* B7CC40 80105AA0 05C10003 */ bgez $t6, .L80105AB0
|
||||
/* B7CC44 80105AA4 000E7883 */ sra $t7, $t6, 2
|
||||
/* B7CC48 80105AA8 25C10003 */ addiu $at, $t6, 3
|
||||
/* B7CC4C 80105AAC 00017883 */ sra $t7, $at, 2
|
||||
.L80105AB0:
|
||||
/* B7CC50 80105AB0 07010004 */ bgez $t8, .L80105AC4
|
||||
/* B7CC54 80105AB4 33190007 */ andi $t9, $t8, 7
|
||||
/* B7CC58 80105AB8 13200002 */ beqz $t9, .L80105AC4
|
||||
/* B7CC5C 80105ABC 00000000 */ nop
|
||||
/* B7CC60 80105AC0 2739FFF8 */ addiu $t9, $t9, -8
|
||||
.L80105AC4:
|
||||
/* B7CC64 80105AC4 00194140 */ sll $t0, $t9, 5
|
||||
/* B7CC68 80105AC8 01E8B021 */ addu $s6, $t7, $t0
|
||||
/* B7CC6C 80105ACC 19200040 */ blez $t1, .L80105BD0
|
||||
/* B7CC70 80105AD0 00009025 */ move $s2, $zero
|
||||
/* B7CC74 80105AD4 00001025 */ move $v0, $zero
|
||||
/* B7CC78 80105AD8 24150003 */ li $s5, 3
|
||||
.L80105ADC:
|
||||
/* B7CC7C 80105ADC 18400003 */ blez $v0, .L80105AEC
|
||||
/* B7CC80 80105AE0 93AA003C */ lbu $t2, 0x3c($sp)
|
||||
/* B7CC84 80105AE4 10000002 */ b .L80105AF0
|
||||
/* B7CC88 80105AE8 24110001 */ li $s1, 1
|
||||
.L80105AEC:
|
||||
/* B7CC8C 80105AEC 8E910060 */ lw $s1, 0x60($s4)
|
||||
.L80105AF0:
|
||||
/* B7CC90 80105AF0 1142000C */ beq $t2, $v0, .L80105B24
|
||||
/* B7CC94 80105AF4 02765821 */ addu $t3, $s3, $s6
|
||||
/* B7CC98 80105AF8 916C0101 */ lbu $t4, 0x101($t3)
|
||||
/* B7CC9C 80105AFC 04410004 */ bgez $v0, .L80105B10
|
||||
/* B7CCA0 80105B00 304D0007 */ andi $t5, $v0, 7
|
||||
/* B7CCA4 80105B04 11A00002 */ beqz $t5, .L80105B10
|
||||
/* B7CCA8 80105B08 00000000 */ nop
|
||||
/* B7CCAC 80105B0C 25ADFFF8 */ addiu $t5, $t5, -8
|
||||
.L80105B10:
|
||||
/* B7CCB0 80105B10 240E0001 */ li $t6, 1
|
||||
/* B7CCB4 80105B14 01AEC004 */ sllv $t8, $t6, $t5
|
||||
/* B7CCB8 80105B18 0198C824 */ and $t9, $t4, $t8
|
||||
/* B7CCBC 80105B1C 53200027 */ beql $t9, $zero, .L80105BBC
|
||||
/* B7CCC0 80105B20 928B0064 */ lbu $t3, 0x64($s4)
|
||||
.L80105B24:
|
||||
/* B7CCC4 80105B24 926F0100 */ lbu $t7, 0x100($s3)
|
||||
/* B7CCC8 80105B28 02802025 */ move $a0, $s4
|
||||
/* B7CCCC 80105B2C 02602825 */ move $a1, $s3
|
||||
/* B7CCD0 80105B30 11E2000A */ beq $t7, $v0, .L80105B5C
|
||||
/* B7CCD4 80105B34 00003025 */ move $a2, $zero
|
||||
/* B7CCD8 80105B38 0C040B31 */ jal func_80102CC4
|
||||
/* B7CCDC 80105B3C 324700FF */ andi $a3, $s2, 0xff
|
||||
/* B7CCE0 80105B40 50400006 */ beql $v0, $zero, .L80105B5C
|
||||
/* B7CCE4 80105B44 A2720100 */ sb $s2, 0x100($s3)
|
||||
/* B7CCE8 80105B48 50550004 */ beql $v0, $s5, .L80105B5C
|
||||
/* B7CCEC 80105B4C A2720100 */ sb $s2, 0x100($s3)
|
||||
/* B7CCF0 80105B50 10000021 */ b .L80105BD8
|
||||
/* B7CCF4 80105B54 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
/* B7CCF8 80105B58 A2720100 */ sb $s2, 0x100($s3)
|
||||
.L80105B5C:
|
||||
/* B7CCFC 80105B5C 2A010002 */ slti $at, $s0, 2
|
||||
/* B7CD00 80105B60 10200010 */ beqz $at, .L80105BA4
|
||||
/* B7CD04 80105B64 2A210080 */ slti $at, $s1, 0x80
|
||||
/* B7CD08 80105B68 1020000E */ beqz $at, .L80105BA4
|
||||
/* B7CD0C 80105B6C 00111040 */ sll $v0, $s1, 1
|
||||
/* B7CD10 80105B70 02621821 */ addu $v1, $s3, $v0
|
||||
/* B7CD14 80105B74 97A8003C */ lhu $t0, 0x3c($sp)
|
||||
.L80105B78:
|
||||
/* B7CD18 80105B78 94690000 */ lhu $t1, ($v1)
|
||||
/* B7CD1C 80105B7C 24420002 */ addiu $v0, $v0, 2
|
||||
/* B7CD20 80105B80 55090003 */ bnel $t0, $t1, .L80105B90
|
||||
/* B7CD24 80105B84 2A010002 */ slti $at, $s0, 2
|
||||
/* B7CD28 80105B88 26100001 */ addiu $s0, $s0, 1
|
||||
/* B7CD2C 80105B8C 2A010002 */ slti $at, $s0, 2
|
||||
.L80105B90:
|
||||
/* B7CD30 80105B90 10200004 */ beqz $at, .L80105BA4
|
||||
/* B7CD34 80105B94 24630002 */ addiu $v1, $v1, 2
|
||||
/* B7CD38 80105B98 28410100 */ slti $at, $v0, 0x100
|
||||
/* B7CD3C 80105B9C 5420FFF6 */ bnezl $at, .L80105B78
|
||||
/* B7CD40 80105BA0 97A8003C */ lhu $t0, 0x3c($sp)
|
||||
.L80105BA4:
|
||||
/* B7CD44 80105BA4 2A010002 */ slti $at, $s0, 2
|
||||
/* B7CD48 80105BA8 54200004 */ bnezl $at, .L80105BBC
|
||||
/* B7CD4C 80105BAC 928B0064 */ lbu $t3, 0x64($s4)
|
||||
/* B7CD50 80105BB0 10000008 */ b .L80105BD4
|
||||
/* B7CD54 80105BB4 24020002 */ li $v0, 2
|
||||
/* B7CD58 80105BB8 928B0064 */ lbu $t3, 0x64($s4)
|
||||
.L80105BBC:
|
||||
/* B7CD5C 80105BBC 26520001 */ addiu $s2, $s2, 1
|
||||
/* B7CD60 80105BC0 324200FF */ andi $v0, $s2, 0xff
|
||||
/* B7CD64 80105BC4 004B082A */ slt $at, $v0, $t3
|
||||
/* B7CD68 80105BC8 1420FFC4 */ bnez $at, .L80105ADC
|
||||
/* B7CD6C 80105BCC 00409025 */ move $s2, $v0
|
||||
.L80105BD0:
|
||||
/* B7CD70 80105BD0 02001025 */ move $v0, $s0
|
||||
.L80105BD4:
|
||||
/* B7CD74 80105BD4 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
.L80105BD8:
|
||||
/* B7CD78 80105BD8 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B7CD7C 80105BDC 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B7CD80 80105BE0 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B7CD84 80105BE4 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B7CD88 80105BE8 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B7CD8C 80105BEC 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* B7CD90 80105BF0 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* B7CD94 80105BF4 03E00008 */ jr $ra
|
||||
/* B7CD98 80105BF8 27BD0038 */ addiu $sp, $sp, 0x38
|
@ -1,171 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel func_80105CF0
|
||||
/* B7CE90 80105CF0 27BDFF98 */ addiu $sp, $sp, -0x68
|
||||
/* B7CE94 80105CF4 8FAF0078 */ lw $t7, 0x78($sp)
|
||||
/* B7CE98 80105CF8 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* B7CE9C 80105CFC AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* B7CEA0 80105D00 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* B7CEA4 80105D04 AFA60070 */ sw $a2, 0x70($sp)
|
||||
/* B7CEA8 80105D08 30CEFFFF */ andi $t6, $a2, 0xffff
|
||||
/* B7CEAC 80105D0C 24010001 */ li $at, 1
|
||||
/* B7CEB0 80105D10 01C03025 */ move $a2, $t6
|
||||
/* B7CEB4 80105D14 00A08825 */ move $s1, $a1
|
||||
/* B7CEB8 80105D18 0080A825 */ move $s5, $a0
|
||||
/* B7CEBC 80105D1C AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* B7CEC0 80105D20 AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* B7CEC4 80105D24 AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* B7CEC8 80105D28 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* B7CECC 80105D2C AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* B7CED0 80105D30 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* B7CED4 80105D34 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* B7CED8 80105D38 AFA70074 */ sw $a3, 0x74($sp)
|
||||
/* B7CEDC 80105D3C 11E10008 */ beq $t7, $at, .L80105D60
|
||||
/* B7CEE0 80105D40 24140002 */ li $s4, 2
|
||||
/* B7CEE4 80105D44 29C10007 */ slti $at, $t6, 7
|
||||
/* B7CEE8 80105D48 50200006 */ beql $at, $zero, .L80105D64
|
||||
/* B7CEEC 80105D4C 00C08025 */ move $s0, $a2
|
||||
/* B7CEF0 80105D50 51C00004 */ beql $t6, $zero, .L80105D64
|
||||
/* B7CEF4 80105D54 00C08025 */ move $s0, $a2
|
||||
/* B7CEF8 80105D58 1000006C */ b .L80105F0C
|
||||
/* B7CEFC 80105D5C 00001025 */ move $v0, $zero
|
||||
.L80105D60:
|
||||
/* B7CF00 80105D60 00C08025 */ move $s0, $a2
|
||||
.L80105D64:
|
||||
/* B7CF04 80105D64 0C0402E8 */ jal __osSiGetAccess
|
||||
/* B7CF08 80105D68 A7A60072 */ sh $a2, 0x72($sp)
|
||||
/* B7CF0C 80105D6C 0010C0C3 */ sra $t8, $s0, 3
|
||||
/* B7CF10 80105D70 0010C940 */ sll $t9, $s0, 5
|
||||
/* B7CF14 80105D74 3C178013 */ lui $s7, %hi(__osPfsLastChannel) # $s7, 0x8013
|
||||
/* B7CF18 80105D78 3C168017 */ lui $s6, %hi(__osContLastPoll) # $s6, 0x8017
|
||||
/* B7CF1C 80105D7C 3C138017 */ lui $s3, %hi(pifMempakBuf) # $s3, 0x8017
|
||||
/* B7CF20 80105D80 26735960 */ addiu $s3, %lo(pifMempakBuf) # addiu $s3, $s3, 0x5960
|
||||
/* B7CF24 80105D84 26D65810 */ addiu $s6, %lo(__osContLastPoll) # addiu $s6, $s6, 0x5810
|
||||
/* B7CF28 80105D88 26F74D20 */ addiu $s7, %lo(__osPfsLastChannel) # addiu $s7, $s7, 0x4d20
|
||||
/* B7CF2C 80105D8C AFB90040 */ sw $t9, 0x40($sp)
|
||||
/* B7CF30 80105D90 AFB80044 */ sw $t8, 0x44($sp)
|
||||
/* B7CF34 80105D94 241E0003 */ li $fp, 3
|
||||
.L80105D98:
|
||||
/* B7CF38 80105D98 92C80000 */ lbu $t0, ($s6)
|
||||
/* B7CF3C 80105D9C 24010003 */ li $at, 3
|
||||
/* B7CF40 80105DA0 02608025 */ move $s0, $s3
|
||||
/* B7CF44 80105DA4 15010004 */ bne $t0, $at, .L80105DB8
|
||||
/* B7CF48 80105DA8 00001025 */ move $v0, $zero
|
||||
/* B7CF4C 80105DAC 8EE90000 */ lw $t1, ($s7)
|
||||
/* B7CF50 80105DB0 52290022 */ beql $s1, $t1, .L80105E3C
|
||||
/* B7CF54 80105DB4 02718021 */ addu $s0, $s3, $s1
|
||||
.L80105DB8:
|
||||
/* B7CF58 80105DB8 A2DE0000 */ sb $fp, ($s6)
|
||||
/* B7CF5C 80105DBC 1A200010 */ blez $s1, .L80105E00
|
||||
/* B7CF60 80105DC0 AEF10000 */ sw $s1, ($s7)
|
||||
/* B7CF64 80105DC4 32240003 */ andi $a0, $s1, 3
|
||||
/* B7CF68 80105DC8 10800006 */ beqz $a0, .L80105DE4
|
||||
/* B7CF6C 80105DCC 00801825 */ move $v1, $a0
|
||||
.L80105DD0:
|
||||
/* B7CF70 80105DD0 24420001 */ addiu $v0, $v0, 1
|
||||
/* B7CF74 80105DD4 A2000000 */ sb $zero, ($s0)
|
||||
/* B7CF78 80105DD8 1462FFFD */ bne $v1, $v0, .L80105DD0
|
||||
/* B7CF7C 80105DDC 26100001 */ addiu $s0, $s0, 1
|
||||
/* B7CF80 80105DE0 10510007 */ beq $v0, $s1, .L80105E00
|
||||
.L80105DE4:
|
||||
/* B7CF84 80105DE4 24420004 */ addiu $v0, $v0, 4
|
||||
/* B7CF88 80105DE8 A2000000 */ sb $zero, ($s0)
|
||||
/* B7CF8C 80105DEC A2000001 */ sb $zero, 1($s0)
|
||||
/* B7CF90 80105DF0 A2000002 */ sb $zero, 2($s0)
|
||||
/* B7CF94 80105DF4 A2000003 */ sb $zero, 3($s0)
|
||||
/* B7CF98 80105DF8 1451FFFA */ bne $v0, $s1, .L80105DE4
|
||||
/* B7CF9C 80105DFC 26100004 */ addiu $s0, $s0, 4
|
||||
.L80105E00:
|
||||
/* B7CFA0 80105E00 240A0001 */ li $t2, 1
|
||||
/* B7CFA4 80105E04 AE6A003C */ sw $t2, 0x3c($s3)
|
||||
/* B7CFA8 80105E08 240B00FF */ li $t3, 255
|
||||
/* B7CFAC 80105E0C 240C0023 */ li $t4, 35
|
||||
/* B7CFB0 80105E10 240D0001 */ li $t5, 1
|
||||
/* B7CFB4 80105E14 240E00FF */ li $t6, 255
|
||||
/* B7CFB8 80105E18 240F00FE */ li $t7, 254
|
||||
/* B7CFBC 80105E1C A20B0000 */ sb $t3, ($s0)
|
||||
/* B7CFC0 80105E20 A20C0001 */ sb $t4, 1($s0)
|
||||
/* B7CFC4 80105E24 A20D0002 */ sb $t5, 2($s0)
|
||||
/* B7CFC8 80105E28 A21E0003 */ sb $fp, 3($s0)
|
||||
/* B7CFCC 80105E2C A20E0026 */ sb $t6, 0x26($s0)
|
||||
/* B7CFD0 80105E30 10000002 */ b .L80105E3C
|
||||
/* B7CFD4 80105E34 A20F0027 */ sb $t7, 0x27($s0)
|
||||
/* B7CFD8 80105E38 02718021 */ addu $s0, $s3, $s1
|
||||
.L80105E3C:
|
||||
/* B7CFDC 80105E3C 8FB80044 */ lw $t8, 0x44($sp)
|
||||
/* B7CFE0 80105E40 A2180004 */ sb $t8, 4($s0)
|
||||
/* B7CFE4 80105E44 0C04185C */ jal osMempakAddrCRC
|
||||
/* B7CFE8 80105E48 97A40072 */ lhu $a0, 0x72($sp)
|
||||
/* B7CFEC 80105E4C 8FB90040 */ lw $t9, 0x40($sp)
|
||||
/* B7CFF0 80105E50 26050006 */ addiu $a1, $s0, 6
|
||||
/* B7CFF4 80105E54 24060020 */ li $a2, 32
|
||||
/* B7CFF8 80105E58 00594025 */ or $t0, $v0, $t9
|
||||
/* B7CFFC 80105E5C A2080005 */ sb $t0, 5($s0)
|
||||
/* B7D000 80105E60 0C001BC4 */ jal bcopy
|
||||
/* B7D004 80105E64 8FA40074 */ lw $a0, 0x74($sp)
|
||||
/* B7D008 80105E68 24040001 */ li $a0, 1
|
||||
/* B7D00C 80105E6C 0C0404FC */ jal __osSiRawStartDma /*(s32 dir, void *addr)*/
|
||||
/* B7D010 80105E70 02602825 */ move $a1, $s3
|
||||
/* B7D014 80105E74 0C041890 */ jal osMempakDataCRC
|
||||
/* B7D018 80105E78 8FA40074 */ lw $a0, 0x74($sp)
|
||||
/* B7D01C 80105E7C 305200FF */ andi $s2, $v0, 0xff
|
||||
/* B7D020 80105E80 02A02025 */ move $a0, $s5
|
||||
/* B7D024 80105E84 00002825 */ move $a1, $zero
|
||||
/* B7D028 80105E88 0C000CA0 */ jal osRecvMesg
|
||||
/* B7D02C 80105E8C 24060001 */ li $a2, 1
|
||||
/* B7D030 80105E90 00002025 */ move $a0, $zero
|
||||
/* B7D034 80105E94 0C0404FC */ jal __osSiRawStartDma /*(s32 dir, void *addr)*/
|
||||
/* B7D038 80105E98 02602825 */ move $a1, $s3
|
||||
/* B7D03C 80105E9C 02A02025 */ move $a0, $s5
|
||||
/* B7D040 80105EA0 00002825 */ move $a1, $zero
|
||||
/* B7D044 80105EA4 0C000CA0 */ jal osRecvMesg
|
||||
/* B7D048 80105EA8 24060001 */ li $a2, 1
|
||||
/* B7D04C 80105EAC 92030002 */ lbu $v1, 2($s0)
|
||||
/* B7D050 80105EB0 306900C0 */ andi $t1, $v1, 0xc0
|
||||
/* B7D054 80105EB4 00091903 */ sra $v1, $t1, 4
|
||||
/* B7D058 80105EB8 5460000C */ bnezl $v1, .L80105EEC
|
||||
/* B7D05C 80105EBC 24030001 */ li $v1, 1
|
||||
/* B7D060 80105EC0 920B0026 */ lbu $t3, 0x26($s0)
|
||||
/* B7D064 80105EC4 02A02025 */ move $a0, $s5
|
||||
/* B7D068 80105EC8 51720009 */ beql $t3, $s2, .L80105EF0
|
||||
/* B7D06C 80105ECC 24010004 */ li $at, 4
|
||||
/* B7D070 80105ED0 0C040644 */ jal __osPfsGetStatus
|
||||
/* B7D074 80105ED4 02202825 */ move $a1, $s1
|
||||
/* B7D078 80105ED8 14400009 */ bnez $v0, .L80105F00
|
||||
/* B7D07C 80105EDC 00401825 */ move $v1, $v0
|
||||
/* B7D080 80105EE0 10000002 */ b .L80105EEC
|
||||
/* B7D084 80105EE4 24030004 */ li $v1, 4
|
||||
/* B7D088 80105EE8 24030001 */ li $v1, 1
|
||||
.L80105EEC:
|
||||
/* B7D08C 80105EEC 24010004 */ li $at, 4
|
||||
.L80105EF0:
|
||||
/* B7D090 80105EF0 14610003 */ bne $v1, $at, .L80105F00
|
||||
/* B7D094 80105EF4 2A820000 */ slti $v0, $s4, 0
|
||||
/* B7D098 80105EF8 1040FFA7 */ beqz $v0, .L80105D98
|
||||
/* B7D09C 80105EFC 2694FFFF */ addiu $s4, $s4, -1
|
||||
.L80105F00:
|
||||
/* B7D0A0 80105F00 0C0402F9 */ jal __osSiRelAccess
|
||||
/* B7D0A4 80105F04 AFA30064 */ sw $v1, 0x64($sp)
|
||||
/* B7D0A8 80105F08 8FA20064 */ lw $v0, 0x64($sp)
|
||||
.L80105F0C:
|
||||
/* B7D0AC 80105F0C 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* B7D0B0 80105F10 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* B7D0B4 80105F14 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* B7D0B8 80105F18 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* B7D0BC 80105F1C 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* B7D0C0 80105F20 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* B7D0C4 80105F24 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* B7D0C8 80105F28 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* B7D0CC 80105F2C 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* B7D0D0 80105F30 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* B7D0D4 80105F34 03E00008 */ jr $ra
|
||||
/* B7D0D8 80105F38 27BD0068 */ addiu $sp, $sp, 0x68
|
121
asm/non_matchings/code/contpfs/__osGetId.s
Normal file
121
asm/non_matchings/code/contpfs/__osGetId.s
Normal file
@ -0,0 +1,121 @@
|
||||
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
|
||||
|
@ -1,117 +0,0 @@
|
||||
.late_rodata
|
||||
glabel D_8014B280
|
||||
.incbin "baserom.z64", 0xBC2420, 0x28
|
||||
|
||||
glabel D_8014B2A8
|
||||
.incbin "baserom.z64", 0xBC2448, 0x8 # .double 0.318309886183791
|
||||
|
||||
glabel D_8014B2B0
|
||||
.incbin "baserom.z64", 0xBC2450, 0x8 # Pi
|
||||
|
||||
glabel D_8014B2B8
|
||||
.incbin "baserom.z64", 0xBC2458, 0x8 # 3.17865095470564E-8
|
||||
|
||||
glabel D_8014B2C0
|
||||
.incbin "baserom.z64", 0xBC2460, 0x10 # Nothing?
|
||||
|
||||
glabel D_8014B2D0
|
||||
.incbin "baserom.z64", 0xBC2470, 0x10 # Called as a float, but contains a invalid number?
|
||||
|
||||
.text
|
||||
glabel cosf
|
||||
/* B7B7B0 80104610 E7AC0000 */ swc1 $f12, ($sp)
|
||||
/* B7B7B4 80104614 8FA20000 */ lw $v0, ($sp)
|
||||
/* B7B7B8 80104618 C7A60000 */ lwc1 $f6, ($sp)
|
||||
/* B7B7BC 8010461C C7AA0000 */ lwc1 $f10, ($sp)
|
||||
/* B7B7C0 80104620 00027583 */ sra $t6, $v0, 0x16
|
||||
/* B7B7C4 80104624 31CF01FF */ andi $t7, $t6, 0x1ff
|
||||
/* B7B7C8 80104628 29E10136 */ slti $at, $t7, 0x136
|
||||
/* B7B7CC 8010462C 50200049 */ beql $at, $zero, .L80104754
|
||||
/* B7B7D0 80104630 460A5032 */ c.eq.s $f10, $f10
|
||||
/* B7B7D4 80104634 44802000 */ mtc1 $zero, $f4
|
||||
/* B7B7D8 80104638 3C013FE0 */ li $at, 0x3FE00000 # 0.000000
|
||||
/* B7B7DC 8010463C 44819800 */ mtc1 $at, $f19
|
||||
/* B7B7E0 80104640 4606203C */ c.lt.s $f4, $f6
|
||||
/* B7B7E4 80104644 C7A00000 */ lwc1 $f0, ($sp)
|
||||
/* B7B7E8 80104648 3C018015 */ lui $at, %hi(D_8014B2A8)
|
||||
/* B7B7EC 8010464C 45020004 */ bc1fl .L80104660
|
||||
/* B7B7F0 80104650 46000007 */ neg.s $f0, $f0
|
||||
/* B7B7F4 80104654 10000002 */ b .L80104660
|
||||
/* B7B7F8 80104658 46003006 */ mov.s $f0, $f6
|
||||
/* B7B7FC 8010465C 46000007 */ neg.s $f0, $f0
|
||||
.L80104660:
|
||||
/* B7B800 80104660 D428B2A8 */ ldc1 $f8, %lo(D_8014B2A8)($at)
|
||||
/* B7B804 80104664 46000321 */ cvt.d.s $f12, $f0
|
||||
/* B7B808 80104668 44809000 */ mtc1 $zero, $f18
|
||||
/* B7B80C 8010466C 46286282 */ mul.d $f10, $f12, $f8
|
||||
/* B7B810 80104670 44802800 */ mtc1 $zero, $f5
|
||||
/* B7B814 80104674 44802000 */ mtc1 $zero, $f4
|
||||
/* B7B818 80104678 46325380 */ add.d $f14, $f10, $f18
|
||||
/* B7B81C 8010467C 462E203E */ c.le.d $f4, $f14
|
||||
/* B7B820 80104680 00000000 */ nop
|
||||
/* B7B824 80104684 45020007 */ bc1fl .L801046A4
|
||||
/* B7B828 80104688 46327281 */ sub.d $f10, $f14, $f18
|
||||
/* B7B82C 8010468C 46327180 */ add.d $f6, $f14, $f18
|
||||
/* B7B830 80104690 4620320D */ trunc.w.d $f8, $f6
|
||||
/* B7B834 80104694 44024000 */ mfc1 $v0, $f8
|
||||
/* B7B838 80104698 10000006 */ b .L801046B4
|
||||
/* B7B83C 8010469C 44823000 */ mtc1 $v0, $f6
|
||||
/* B7B840 801046A0 46327281 */ sub.d $f10, $f14, $f18
|
||||
.L801046A4:
|
||||
/* B7B844 801046A4 4620510D */ trunc.w.d $f4, $f10
|
||||
/* B7B848 801046A8 44022000 */ mfc1 $v0, $f4
|
||||
/* B7B84C 801046AC 00000000 */ nop
|
||||
/* B7B850 801046B0 44823000 */ mtc1 $v0, $f6
|
||||
.L801046B4:
|
||||
/* B7B854 801046B4 3C018015 */ lui $at, %hi(D_8014B2B0)
|
||||
/* B7B858 801046B8 D42AB2B0 */ ldc1 $f10, %lo(D_8014B2B0)($at)
|
||||
/* B7B85C 801046BC 46803221 */ cvt.d.w $f8, $f6
|
||||
/* B7B860 801046C0 3C018015 */ lui $at, %hi(D_8014B2B8)
|
||||
/* B7B864 801046C4 D426B2B8 */ ldc1 $f6, %lo(D_8014B2B8)($at)
|
||||
/* B7B868 801046C8 3C038015 */ lui $v1, %hi(D_8014B280) # $v1, 0x8015
|
||||
/* B7B86C 801046CC 2463B280 */ addiu $v1, %lo(D_8014B280) # addiu $v1, $v1, -0x4d80
|
||||
/* B7B870 801046D0 46324001 */ sub.d $f0, $f8, $f18
|
||||
/* B7B874 801046D4 30480001 */ andi $t0, $v0, 1
|
||||
/* B7B878 801046D8 462A0102 */ mul.d $f4, $f0, $f10
|
||||
/* B7B87C 801046DC D46A0020 */ ldc1 $f10, 0x20($v1)
|
||||
/* B7B880 801046E0 46260202 */ mul.d $f8, $f0, $f6
|
||||
/* B7B884 801046E4 D4660018 */ ldc1 $f6, 0x18($v1)
|
||||
/* B7B888 801046E8 46246081 */ sub.d $f2, $f12, $f4
|
||||
/* B7B88C 801046EC 46281081 */ sub.d $f2, $f2, $f8
|
||||
/* B7B890 801046F0 46221382 */ mul.d $f14, $f2, $f2
|
||||
/* B7B894 801046F4 00000000 */ nop
|
||||
/* B7B898 801046F8 462E5102 */ mul.d $f4, $f10, $f14
|
||||
/* B7B89C 801046FC 46262200 */ add.d $f8, $f4, $f6
|
||||
/* B7B8A0 80104700 D4640010 */ ldc1 $f4, 0x10($v1)
|
||||
/* B7B8A4 80104704 462E4282 */ mul.d $f10, $f8, $f14
|
||||
/* B7B8A8 80104708 46245180 */ add.d $f6, $f10, $f4
|
||||
/* B7B8AC 8010470C D46A0008 */ ldc1 $f10, 8($v1)
|
||||
/* B7B8B0 80104710 462E3202 */ mul.d $f8, $f6, $f14
|
||||
/* B7B8B4 80104714 15000007 */ bnez $t0, .L80104734
|
||||
/* B7B8B8 80104718 46285400 */ add.d $f16, $f10, $f8
|
||||
/* B7B8BC 8010471C 462E1102 */ mul.d $f4, $f2, $f14
|
||||
/* B7B8C0 80104720 00000000 */ nop
|
||||
/* B7B8C4 80104724 46302182 */ mul.d $f6, $f4, $f16
|
||||
/* B7B8C8 80104728 46223280 */ add.d $f10, $f6, $f2
|
||||
/* B7B8CC 8010472C 03E00008 */ jr $ra
|
||||
/* B7B8D0 80104730 46205020 */ cvt.s.d $f0, $f10
|
||||
.L80104734:
|
||||
/* B7B8D4 80104734 462E1202 */ mul.d $f8, $f2, $f14
|
||||
/* B7B8D8 80104738 00000000 */ nop
|
||||
/* B7B8DC 8010473C 46304102 */ mul.d $f4, $f8, $f16
|
||||
/* B7B8E0 80104740 46222180 */ add.d $f6, $f4, $f2
|
||||
/* B7B8E4 80104744 46203020 */ cvt.s.d $f0, $f6
|
||||
/* B7B8E8 80104748 03E00008 */ jr $ra
|
||||
/* B7B8EC 8010474C 46000007 */ neg.s $f0, $f0
|
||||
/* B7B8F0 80104750 460A5032 */ c.eq.s $f10, $f10
|
||||
.L80104754:
|
||||
/* B7B8F4 80104754 3C018015 */ lui $at, %hi(D_8014B2C0)
|
||||
/* B7B8F8 80104758 45010004 */ bc1t .L8010476C
|
||||
/* B7B8FC 8010475C 00000000 */ nop
|
||||
/* B7B900 80104760 3C018015 */ lui $at, %hi(D_8014B2D0)
|
||||
/* B7B904 80104764 03E00008 */ jr $ra
|
||||
/* B7B908 80104768 C420B2D0 */ lwc1 $f0, %lo(D_8014B2D0)($at)
|
||||
.L8010476C:
|
||||
/* B7B90C 8010476C C420B2C0 */ lwc1 $f0, %lo(D_8014B2C0)($at)
|
||||
/* B7B910 80104770 03E00008 */ jr $ra
|
||||
/* B7B914 80104774 00000000 */ nop
|
@ -1,30 +0,0 @@
|
||||
glabel guLookAt
|
||||
/* B78FD4 80101E34 27BDFF90 */ addiu $sp, $sp, -0x70
|
||||
/* B78FD8 80101E38 44856000 */ mtc1 $a1, $f12
|
||||
/* B78FDC 80101E3C 44867000 */ mtc1 $a2, $f14
|
||||
/* B78FE0 80101E40 C7A40080 */ lwc1 $f4, 0x80($sp)
|
||||
/* B78FE4 80101E44 C7A60084 */ lwc1 $f6, 0x84($sp)
|
||||
/* B78FE8 80101E48 C7A80088 */ lwc1 $f8, 0x88($sp)
|
||||
/* B78FEC 80101E4C C7AA008C */ lwc1 $f10, 0x8c($sp)
|
||||
/* B78FF0 80101E50 C7B00090 */ lwc1 $f16, 0x90($sp)
|
||||
/* B78FF4 80101E54 C7B20094 */ lwc1 $f18, 0x94($sp)
|
||||
/* B78FF8 80101E58 AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* B78FFC 80101E5C AFA40070 */ sw $a0, 0x70($sp)
|
||||
/* B79000 80101E60 44056000 */ mfc1 $a1, $f12
|
||||
/* B79004 80101E64 44067000 */ mfc1 $a2, $f14
|
||||
/* B79008 80101E68 AFA7007C */ sw $a3, 0x7c($sp)
|
||||
/* B7900C 80101E6C 27A40030 */ addiu $a0, $sp, 0x30
|
||||
/* B79010 80101E70 E7A40010 */ swc1 $f4, 0x10($sp)
|
||||
/* B79014 80101E74 E7A60014 */ swc1 $f6, 0x14($sp)
|
||||
/* B79018 80101E78 E7A80018 */ swc1 $f8, 0x18($sp)
|
||||
/* B7901C 80101E7C E7AA001C */ swc1 $f10, 0x1c($sp)
|
||||
/* B79020 80101E80 E7B00020 */ swc1 $f16, 0x20($sp)
|
||||
/* B79024 80101E84 0C0406E4 */ jal guLookAtF
|
||||
/* B79028 80101E88 E7B20024 */ swc1 $f18, 0x24($sp)
|
||||
/* B7902C 80101E8C 27A40030 */ addiu $a0, $sp, 0x30
|
||||
/* B79030 80101E90 0C041938 */ jal guMtxF2L
|
||||
/* B79034 80101E94 8FA50070 */ lw $a1, 0x70($sp)
|
||||
/* B79038 80101E98 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* B7903C 80101E9C 27BD0070 */ addiu $sp, $sp, 0x70
|
||||
/* B79040 80101EA0 03E00008 */ jr $ra
|
||||
/* B79044 80101EA4 00000000 */ nop
|
@ -1,170 +0,0 @@
|
||||
glabel guLookAtF
|
||||
/* B78D30 80101B90 27BDFF88 */ addiu $sp, $sp, -0x78
|
||||
/* B78D34 80101B94 AFBF0044 */ sw $ra, 0x44($sp)
|
||||
/* B78D38 80101B98 F7BE0038 */ sdc1 $f30, 0x38($sp)
|
||||
/* B78D3C 80101B9C F7BC0030 */ sdc1 $f28, 0x30($sp)
|
||||
/* B78D40 80101BA0 F7BA0028 */ sdc1 $f26, 0x28($sp)
|
||||
/* B78D44 80101BA4 F7B80020 */ sdc1 $f24, 0x20($sp)
|
||||
/* B78D48 80101BA8 F7B60018 */ sdc1 $f22, 0x18($sp)
|
||||
/* B78D4C 80101BAC F7B40010 */ sdc1 $f20, 0x10($sp)
|
||||
/* B78D50 80101BB0 AFA5007C */ sw $a1, 0x7c($sp)
|
||||
/* B78D54 80101BB4 AFA60080 */ sw $a2, 0x80($sp)
|
||||
/* B78D58 80101BB8 AFA70084 */ sw $a3, 0x84($sp)
|
||||
/* B78D5C 80101BBC 0C0406D0 */ jal guMtxIdentF
|
||||
/* B78D60 80101BC0 AFA40078 */ sw $a0, 0x78($sp)
|
||||
/* B78D64 80101BC4 C7A40088 */ lwc1 $f4, 0x88($sp)
|
||||
/* B78D68 80101BC8 C7A6007C */ lwc1 $f6, 0x7c($sp)
|
||||
/* B78D6C 80101BCC C7A8008C */ lwc1 $f8, 0x8c($sp)
|
||||
/* B78D70 80101BD0 C7AA0080 */ lwc1 $f10, 0x80($sp)
|
||||
/* B78D74 80101BD4 46062081 */ sub.s $f2, $f4, $f6
|
||||
/* B78D78 80101BD8 C7A60084 */ lwc1 $f6, 0x84($sp)
|
||||
/* B78D7C 80101BDC C7A40090 */ lwc1 $f4, 0x90($sp)
|
||||
/* B78D80 80101BE0 460A4301 */ sub.s $f12, $f8, $f10
|
||||
/* B78D84 80101BE4 46021202 */ mul.s $f8, $f2, $f2
|
||||
/* B78D88 80101BE8 3C01BFF0 */ li $at, 0xBFF00000 # 0.000000
|
||||
/* B78D8C 80101BEC 46062381 */ sub.s $f14, $f4, $f6
|
||||
/* B78D90 80101BF0 460C6282 */ mul.s $f10, $f12, $f12
|
||||
/* B78D94 80101BF4 44814800 */ mtc1 $at, $f9
|
||||
/* B78D98 80101BF8 3C013FF0 */ li $at, 0x3FF00000 # 0.000000
|
||||
/* B78D9C 80101BFC 460E7182 */ mul.s $f6, $f14, $f14
|
||||
/* B78DA0 80101C00 8FA40078 */ lw $a0, 0x78($sp)
|
||||
/* B78DA4 80101C04 460A4100 */ add.s $f4, $f8, $f10
|
||||
/* B78DA8 80101C08 44804000 */ mtc1 $zero, $f8
|
||||
/* B78DAC 80101C0C 46062000 */ add.s $f0, $f4, $f6
|
||||
/* B78DB0 80101C10 46000004 */ sqrt.s $f0, $f0
|
||||
/* B78DB4 80101C14 460002A1 */ cvt.d.s $f10, $f0
|
||||
/* B78DB8 80101C18 462A4103 */ div.d $f4, $f8, $f10
|
||||
/* B78DBC 80101C1C 46202420 */ cvt.s.d $f16, $f4
|
||||
/* B78DC0 80101C20 46101702 */ mul.s $f28, $f2, $f16
|
||||
/* B78DC4 80101C24 00000000 */ nop
|
||||
/* B78DC8 80101C28 46106182 */ mul.s $f6, $f12, $f16
|
||||
/* B78DCC 80101C2C 00000000 */ nop
|
||||
/* B78DD0 80101C30 46107282 */ mul.s $f10, $f14, $f16
|
||||
/* B78DD4 80101C34 E7A60054 */ swc1 $f6, 0x54($sp)
|
||||
/* B78DD8 80101C38 C7A60098 */ lwc1 $f6, 0x98($sp)
|
||||
/* B78DDC 80101C3C C7BE0054 */ lwc1 $f30, 0x54($sp)
|
||||
/* B78DE0 80101C40 E7AA0050 */ swc1 $f10, 0x50($sp)
|
||||
/* B78DE4 80101C44 C7A40050 */ lwc1 $f4, 0x50($sp)
|
||||
/* B78DE8 80101C48 46043282 */ mul.s $f10, $f6, $f4
|
||||
/* B78DEC 80101C4C C7A6009C */ lwc1 $f6, 0x9c($sp)
|
||||
/* B78DF0 80101C50 E7A40068 */ swc1 $f4, 0x68($sp)
|
||||
/* B78DF4 80101C54 C7B00068 */ lwc1 $f16, 0x68($sp)
|
||||
/* B78DF8 80101C58 461E3182 */ mul.s $f6, $f6, $f30
|
||||
/* B78DFC 80101C5C 46065281 */ sub.s $f10, $f10, $f6
|
||||
/* B78E00 80101C60 C7A60094 */ lwc1 $f6, 0x94($sp)
|
||||
/* B78E04 80101C64 E7AA004C */ swc1 $f10, 0x4c($sp)
|
||||
/* B78E08 80101C68 46043282 */ mul.s $f10, $f6, $f4
|
||||
/* B78E0C 80101C6C C7A6009C */ lwc1 $f6, 0x9c($sp)
|
||||
/* B78E10 80101C70 C7B6004C */ lwc1 $f22, 0x4c($sp)
|
||||
/* B78E14 80101C74 461C3102 */ mul.s $f4, $f6, $f28
|
||||
/* B78E18 80101C78 C7A6004C */ lwc1 $f6, 0x4c($sp)
|
||||
/* B78E1C 80101C7C 460A2601 */ sub.s $f24, $f4, $f10
|
||||
/* B78E20 80101C80 C7A40094 */ lwc1 $f4, 0x94($sp)
|
||||
/* B78E24 80101C84 461E2282 */ mul.s $f10, $f4, $f30
|
||||
/* B78E28 80101C88 C7A40098 */ lwc1 $f4, 0x98($sp)
|
||||
/* B78E2C 80101C8C E7B80050 */ swc1 $f24, 0x50($sp)
|
||||
/* B78E30 80101C90 461C2202 */ mul.s $f8, $f4, $f28
|
||||
/* B78E34 80101C94 46085681 */ sub.s $f26, $f10, $f8
|
||||
/* B78E38 80101C98 4618C282 */ mul.s $f10, $f24, $f24
|
||||
/* B78E3C 80101C9C C7A8004C */ lwc1 $f8, 0x4c($sp)
|
||||
/* B78E40 80101CA0 44815800 */ mtc1 $at, $f11
|
||||
/* B78E44 80101CA4 E7BA0058 */ swc1 $f26, 0x58($sp)
|
||||
/* B78E48 80101CA8 46064202 */ mul.s $f8, $f8, $f6
|
||||
/* B78E4C 80101CAC 460A4180 */ add.s $f6, $f8, $f10
|
||||
/* B78E50 80101CB0 461AD202 */ mul.s $f8, $f26, $f26
|
||||
/* B78E54 80101CB4 44805000 */ mtc1 $zero, $f10
|
||||
/* B78E58 80101CB8 46083000 */ add.s $f0, $f6, $f8
|
||||
/* B78E5C 80101CBC 46000004 */ sqrt.s $f0, $f0
|
||||
/* B78E60 80101CC0 46000121 */ cvt.d.s $f4, $f0
|
||||
/* B78E64 80101CC4 46245183 */ div.d $f6, $f10, $f4
|
||||
/* B78E68 80101CC8 46203520 */ cvt.s.d $f20, $f6
|
||||
/* B78E6C 80101CCC 4614B582 */ mul.s $f22, $f22, $f20
|
||||
/* B78E70 80101CD0 00000000 */ nop
|
||||
/* B78E74 80101CD4 4614C602 */ mul.s $f24, $f24, $f20
|
||||
/* B78E78 80101CD8 00000000 */ nop
|
||||
/* B78E7C 80101CDC 4614D682 */ mul.s $f26, $f26, $f20
|
||||
/* B78E80 80101CE0 00000000 */ nop
|
||||
/* B78E84 80101CE4 461AF202 */ mul.s $f8, $f30, $f26
|
||||
/* B78E88 80101CE8 00000000 */ nop
|
||||
/* B78E8C 80101CEC 46188282 */ mul.s $f10, $f16, $f24
|
||||
/* B78E90 80101CF0 00000000 */ nop
|
||||
/* B78E94 80101CF4 46168102 */ mul.s $f4, $f16, $f22
|
||||
/* B78E98 80101CF8 00000000 */ nop
|
||||
/* B78E9C 80101CFC 461AE182 */ mul.s $f6, $f28, $f26
|
||||
/* B78EA0 80101D00 460A4081 */ sub.s $f2, $f8, $f10
|
||||
/* B78EA4 80101D04 4618E202 */ mul.s $f8, $f28, $f24
|
||||
/* B78EA8 80101D08 00000000 */ nop
|
||||
/* B78EAC 80101D0C 4616F282 */ mul.s $f10, $f30, $f22
|
||||
/* B78EB0 80101D10 46062301 */ sub.s $f12, $f4, $f6
|
||||
/* B78EB4 80101D14 46021102 */ mul.s $f4, $f2, $f2
|
||||
/* B78EB8 80101D18 44812800 */ mtc1 $at, $f5
|
||||
/* B78EBC 80101D1C 3C013F80 */ li $at, 0x3F800000 # 0.000000
|
||||
/* B78EC0 80101D20 460C6182 */ mul.s $f6, $f12, $f12
|
||||
/* B78EC4 80101D24 460A4381 */ sub.s $f14, $f8, $f10
|
||||
/* B78EC8 80101D28 460E7282 */ mul.s $f10, $f14, $f14
|
||||
/* B78ECC 80101D2C 46062200 */ add.s $f8, $f4, $f6
|
||||
/* B78ED0 80101D30 44802000 */ mtc1 $zero, $f4
|
||||
/* B78ED4 80101D34 460A4000 */ add.s $f0, $f8, $f10
|
||||
/* B78ED8 80101D38 46000004 */ sqrt.s $f0, $f0
|
||||
/* B78EDC 80101D3C 460001A1 */ cvt.d.s $f6, $f0
|
||||
/* B78EE0 80101D40 46262203 */ div.d $f8, $f4, $f6
|
||||
/* B78EE4 80101D44 46204520 */ cvt.s.d $f20, $f8
|
||||
/* B78EE8 80101D48 46141282 */ mul.s $f10, $f2, $f20
|
||||
/* B78EEC 80101D4C E7AA0094 */ swc1 $f10, 0x94($sp)
|
||||
/* B78EF0 80101D50 E4960000 */ swc1 $f22, ($a0)
|
||||
/* B78EF4 80101D54 E4980010 */ swc1 $f24, 0x10($a0)
|
||||
/* B78EF8 80101D58 E49A0020 */ swc1 $f26, 0x20($a0)
|
||||
/* B78EFC 80101D5C C7A4007C */ lwc1 $f4, 0x7c($sp)
|
||||
/* B78F00 80101D60 C7A80080 */ lwc1 $f8, 0x80($sp)
|
||||
/* B78F04 80101D64 46162182 */ mul.s $f6, $f4, $f22
|
||||
/* B78F08 80101D68 00000000 */ nop
|
||||
/* B78F0C 80101D6C 46184282 */ mul.s $f10, $f8, $f24
|
||||
/* B78F10 80101D70 C7A80084 */ lwc1 $f8, 0x84($sp)
|
||||
/* B78F14 80101D74 460A3100 */ add.s $f4, $f6, $f10
|
||||
/* B78F18 80101D78 461A4182 */ mul.s $f6, $f8, $f26
|
||||
/* B78F1C 80101D7C 46062280 */ add.s $f10, $f4, $f6
|
||||
/* B78F20 80101D80 46146002 */ mul.s $f0, $f12, $f20
|
||||
/* B78F24 80101D84 46005207 */ neg.s $f8, $f10
|
||||
/* B78F28 80101D88 46147082 */ mul.s $f2, $f14, $f20
|
||||
/* B78F2C 80101D8C E4880030 */ swc1 $f8, 0x30($a0)
|
||||
/* B78F30 80101D90 C7BA007C */ lwc1 $f26, 0x7c($sp)
|
||||
/* B78F34 80101D94 C7B00094 */ lwc1 $f16, 0x94($sp)
|
||||
/* B78F38 80101D98 C7B80080 */ lwc1 $f24, 0x80($sp)
|
||||
/* B78F3C 80101D9C C7B60084 */ lwc1 $f22, 0x84($sp)
|
||||
/* B78F40 80101DA0 4610D102 */ mul.s $f4, $f26, $f16
|
||||
/* B78F44 80101DA4 C7B20068 */ lwc1 $f18, 0x68($sp)
|
||||
/* B78F48 80101DA8 E4800014 */ swc1 $f0, 0x14($a0)
|
||||
/* B78F4C 80101DAC 4600C182 */ mul.s $f6, $f24, $f0
|
||||
/* B78F50 80101DB0 44800000 */ mtc1 $zero, $f0
|
||||
/* B78F54 80101DB4 E4820024 */ swc1 $f2, 0x24($a0)
|
||||
/* B78F58 80101DB8 4602B202 */ mul.s $f8, $f22, $f2
|
||||
/* B78F5C 80101DBC E49C0008 */ swc1 $f28, 8($a0)
|
||||
/* B78F60 80101DC0 E49E0018 */ swc1 $f30, 0x18($a0)
|
||||
/* B78F64 80101DC4 E4900004 */ swc1 $f16, 4($a0)
|
||||
/* B78F68 80101DC8 E4920028 */ swc1 $f18, 0x28($a0)
|
||||
/* B78F6C 80101DCC 46062280 */ add.s $f10, $f4, $f6
|
||||
/* B78F70 80101DD0 E480000C */ swc1 $f0, 0xc($a0)
|
||||
/* B78F74 80101DD4 E480001C */ swc1 $f0, 0x1c($a0)
|
||||
/* B78F78 80101DD8 E480002C */ swc1 $f0, 0x2c($a0)
|
||||
/* B78F7C 80101DDC 46085100 */ add.s $f4, $f10, $f8
|
||||
/* B78F80 80101DE0 461CD282 */ mul.s $f10, $f26, $f28
|
||||
/* B78F84 80101DE4 00000000 */ nop
|
||||
/* B78F88 80101DE8 461EC202 */ mul.s $f8, $f24, $f30
|
||||
/* B78F8C 80101DEC 46002187 */ neg.s $f6, $f4
|
||||
/* B78F90 80101DF0 E4860034 */ swc1 $f6, 0x34($a0)
|
||||
/* B78F94 80101DF4 4612B182 */ mul.s $f6, $f22, $f18
|
||||
/* B78F98 80101DF8 46085100 */ add.s $f4, $f10, $f8
|
||||
/* B78F9C 80101DFC 46062280 */ add.s $f10, $f4, $f6
|
||||
/* B78FA0 80101E00 44812000 */ mtc1 $at, $f4
|
||||
/* B78FA4 80101E04 46005207 */ neg.s $f8, $f10
|
||||
/* B78FA8 80101E08 E484003C */ swc1 $f4, 0x3c($a0)
|
||||
/* B78FAC 80101E0C E4880038 */ swc1 $f8, 0x38($a0)
|
||||
/* B78FB0 80101E10 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
/* B78FB4 80101E14 D7BE0038 */ ldc1 $f30, 0x38($sp)
|
||||
/* B78FB8 80101E18 D7BC0030 */ ldc1 $f28, 0x30($sp)
|
||||
/* B78FBC 80101E1C D7BA0028 */ ldc1 $f26, 0x28($sp)
|
||||
/* B78FC0 80101E20 D7B80020 */ ldc1 $f24, 0x20($sp)
|
||||
/* B78FC4 80101E24 D7B60018 */ ldc1 $f22, 0x18($sp)
|
||||
/* B78FC8 80101E28 D7B40010 */ ldc1 $f20, 0x10($sp)
|
||||
/* B78FCC 80101E2C 03E00008 */ jr $ra
|
||||
/* B78FD0 80101E30 27BD0078 */ addiu $sp, $sp, 0x78
|
@ -1,14 +1,3 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .text
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel osPfsInitPak
|
||||
/* B7C0E0 80104F40 27BDFF90 */ addiu $sp, $sp, -0x70
|
||||
/* B7C0E4 80104F44 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
@ -33,14 +22,14 @@ glabel osPfsInitPak
|
||||
.L80104F90:
|
||||
/* B7C130 80104F90 8FAF0078 */ lw $t7, 0x78($sp)
|
||||
/* B7C134 80104F94 AE000000 */ sw $zero, ($s0)
|
||||
/* B7C138 80104F98 0C041452 */ jal func_80105148
|
||||
/* B7C138 80104F98 0C041452 */ jal __osPfsCheckRamArea
|
||||
/* 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 func_80104C80
|
||||
/* B7C150 80104FB0 0C041320 */ jal __osPfsSelectBank
|
||||
/* B7C154 80104FB4 00002825 */ move $a1, $zero
|
||||
/* B7C158 80104FB8 10400003 */ beqz $v0, .L80104FC8
|
||||
/* B7C15C 80104FBC 24060001 */ li $a2, 1
|
||||
@ -49,7 +38,7 @@ glabel osPfsInitPak
|
||||
.L80104FC8:
|
||||
/* B7C168 80104FC8 8E040004 */ lw $a0, 4($s0)
|
||||
/* B7C16C 80104FCC 8E050008 */ lw $a1, 8($s0)
|
||||
/* B7C170 80104FD0 0C0417D0 */ jal osReadMempak
|
||||
/* B7C170 80104FD0 0C0417D0 */ jal __osContRamRead
|
||||
/* B7C174 80104FD4 27A70048 */ addiu $a3, $sp, 0x48
|
||||
/* B7C178 80104FD8 10400003 */ beqz $v0, .L80104FE8
|
||||
/* B7C17C 80104FDC 27A40048 */ addiu $a0, $sp, 0x48
|
||||
@ -57,7 +46,7 @@ glabel osPfsInitPak
|
||||
/* B7C184 80104FE4 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L80104FE8:
|
||||
/* B7C188 80104FE8 27A5006A */ addiu $a1, $sp, 0x6a
|
||||
/* B7C18C 80104FEC 0C040925 */ jal func_80102494
|
||||
/* B7C18C 80104FEC 0C040925 */ jal __osIdCheckSum
|
||||
/* B7C190 80104FF0 27A60068 */ addiu $a2, $sp, 0x68
|
||||
/* B7C194 80104FF4 97B8006A */ lhu $t8, 0x6a($sp)
|
||||
/* B7C198 80104FF8 97B90064 */ lhu $t9, 0x64($sp)
|
||||
@ -69,7 +58,7 @@ glabel osPfsInitPak
|
||||
/* B7C1B0 80105010 512A000A */ beql $t1, $t2, .L8010503C
|
||||
/* B7C1B4 80105014 97AD0060 */ lhu $t5, 0x60($sp)
|
||||
.L80105018:
|
||||
/* B7C1B8 80105018 0C040A38 */ jal func_801028E0
|
||||
/* B7C1B8 80105018 0C040A38 */ jal __osCheckPackId
|
||||
/* B7C1BC 8010501C 02002025 */ move $a0, $s0
|
||||
/* B7C1C0 80105020 50400006 */ beql $v0, $zero, .L8010503C
|
||||
/* B7C1C4 80105024 97AD0060 */ lhu $t5, 0x60($sp)
|
||||
@ -84,7 +73,7 @@ glabel osPfsInitPak
|
||||
/* B7C1E4 80105044 31AE0001 */ andi $t6, $t5, 1
|
||||
/* B7C1E8 80105048 55C00016 */ bnezl $t6, .L801050A4
|
||||
/* B7C1EC 8010504C 8FA40044 */ lw $a0, 0x44($sp)
|
||||
/* B7C1F0 80105050 0C040964 */ jal func_80102590
|
||||
/* B7C1F0 80105050 0C040964 */ jal __osRepairPackId
|
||||
/* B7C1F4 80105054 27A60020 */ addiu $a2, $sp, 0x20
|
||||
/* B7C1F8 80105058 10400009 */ beqz $v0, .L80105080
|
||||
/* B7C1FC 8010505C 00401825 */ move $v1, $v0
|
||||
@ -133,14 +122,14 @@ glabel osPfsInitPak
|
||||
/* 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 osReadMempak
|
||||
/* B7C2A8 80105108 0C0417D0 */ jal __osContRamRead
|
||||
/* 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 func_80105250
|
||||
/* B7C2C0 80105120 0C041494 */ jal osPfsChecker
|
||||
/* B7C2C4 80105124 02002025 */ move $a0, $s0
|
||||
/* B7C2C8 80105128 8E0B0000 */ lw $t3, ($s0)
|
||||
/* B7C2CC 8010512C 356C0001 */ ori $t4, $t3, 1
|
||||
@ -153,77 +142,3 @@ glabel osPfsInitPak
|
||||
/* B7C2E0 80105140 03E00008 */ jr $ra
|
||||
/* B7C2E4 80105144 00000000 */ nop
|
||||
|
||||
glabel func_80105148
|
||||
/* B7C2E8 80105148 27BDFF68 */ addiu $sp, $sp, -0x98
|
||||
/* B7C2EC 8010514C AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* B7C2F0 80105150 AFB00020 */ sw $s0, 0x20($sp)
|
||||
/* B7C2F4 80105154 00808025 */ move $s0, $a0
|
||||
/* B7C2F8 80105158 0C041320 */ jal func_80104C80
|
||||
/* B7C2FC 8010515C 00002825 */ move $a1, $zero
|
||||
/* B7C300 80105160 10400003 */ beqz $v0, .L80105170
|
||||
/* B7C304 80105164 00003025 */ move $a2, $zero
|
||||
/* B7C308 80105168 10000034 */ b .L8010523C
|
||||
/* B7C30C 8010516C 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
.L80105170:
|
||||
/* B7C310 80105170 8E040004 */ lw $a0, 4($s0)
|
||||
/* B7C314 80105174 8E050008 */ lw $a1, 8($s0)
|
||||
/* B7C318 80105178 0C0417D0 */ jal osReadMempak
|
||||
/* B7C31C 8010517C 27A70030 */ addiu $a3, $sp, 0x30
|
||||
/* B7C320 80105180 10400003 */ beqz $v0, .L80105190
|
||||
/* B7C324 80105184 27A30070 */ addiu $v1, $sp, 0x70
|
||||
/* B7C328 80105188 1000002C */ b .L8010523C
|
||||
/* B7C32C 8010518C 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
.L80105190:
|
||||
/* B7C330 80105190 00001025 */ move $v0, $zero
|
||||
/* B7C334 80105194 24040020 */ li $a0, 32
|
||||
.L80105198:
|
||||
/* B7C338 80105198 244E0001 */ addiu $t6, $v0, 1
|
||||
/* B7C33C 8010519C 244F0002 */ addiu $t7, $v0, 2
|
||||
/* B7C340 801051A0 24580003 */ addiu $t8, $v0, 3
|
||||
/* B7C344 801051A4 A0620000 */ sb $v0, ($v1)
|
||||
/* B7C348 801051A8 24420004 */ addiu $v0, $v0, 4
|
||||
/* B7C34C 801051AC A0780003 */ sb $t8, 3($v1)
|
||||
/* B7C350 801051B0 A06F0002 */ sb $t7, 2($v1)
|
||||
/* B7C354 801051B4 A06E0001 */ sb $t6, 1($v1)
|
||||
/* B7C358 801051B8 1444FFF7 */ bne $v0, $a0, .L80105198
|
||||
/* B7C35C 801051BC 24630004 */ addiu $v1, $v1, 4
|
||||
/* B7C360 801051C0 8E040004 */ lw $a0, 4($s0)
|
||||
/* B7C364 801051C4 8E050008 */ lw $a1, 8($s0)
|
||||
/* B7C368 801051C8 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B7C36C 801051CC 00003025 */ move $a2, $zero
|
||||
/* B7C370 801051D0 0C04173C */ jal func_80105CF0
|
||||
/* B7C374 801051D4 27A70070 */ addiu $a3, $sp, 0x70
|
||||
/* B7C378 801051D8 10400003 */ beqz $v0, .L801051E8
|
||||
/* B7C37C 801051DC 00003025 */ move $a2, $zero
|
||||
/* B7C380 801051E0 10000016 */ b .L8010523C
|
||||
/* B7C384 801051E4 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
.L801051E8:
|
||||
/* B7C388 801051E8 8E040004 */ lw $a0, 4($s0)
|
||||
/* B7C38C 801051EC 8E050008 */ lw $a1, 8($s0)
|
||||
/* B7C390 801051F0 0C0417D0 */ jal osReadMempak
|
||||
/* B7C394 801051F4 27A70050 */ addiu $a3, $sp, 0x50
|
||||
/* B7C398 801051F8 10400003 */ beqz $v0, .L80105208
|
||||
/* B7C39C 801051FC 27A40070 */ addiu $a0, $sp, 0x70
|
||||
/* B7C3A0 80105200 1000000E */ b .L8010523C
|
||||
/* B7C3A4 80105204 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
.L80105208:
|
||||
/* B7C3A8 80105208 27A50050 */ addiu $a1, $sp, 0x50
|
||||
/* B7C3AC 8010520C 0C001A30 */ jal bcmp
|
||||
/* B7C3B0 80105210 24060020 */ li $a2, 32
|
||||
/* B7C3B4 80105214 10400003 */ beqz $v0, .L80105224
|
||||
/* B7C3B8 80105218 00003025 */ move $a2, $zero
|
||||
/* B7C3BC 8010521C 10000006 */ b .L80105238
|
||||
/* B7C3C0 80105220 2402000B */ li $v0, 11
|
||||
.L80105224:
|
||||
/* B7C3C4 80105224 8E040004 */ lw $a0, 4($s0)
|
||||
/* B7C3C8 80105228 8E050008 */ lw $a1, 8($s0)
|
||||
/* B7C3CC 8010522C AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* B7C3D0 80105230 0C04173C */ jal func_80105CF0
|
||||
/* B7C3D4 80105234 27A70030 */ addiu $a3, $sp, 0x30
|
||||
.L80105238:
|
||||
/* B7C3D8 80105238 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
.L8010523C:
|
||||
/* B7C3DC 8010523C 8FB00020 */ lw $s0, 0x20($sp)
|
||||
/* B7C3E0 80105240 27BD0098 */ addiu $sp, $sp, 0x98
|
||||
/* B7C3E4 80105244 03E00008 */ jr $ra
|
||||
/* B7C3E8 80105248 00000000 */ nop
|
@ -1,143 +0,0 @@
|
||||
.late_rodata
|
||||
|
||||
glabel D_8014B210
|
||||
.incbin "baserom.z64", 0xBC23B0, 0x28
|
||||
|
||||
glabel D_8014B238
|
||||
.incbin "baserom.z64", 0xBC23D8, 0x8 # probably 0.01 / M_PI
|
||||
|
||||
glabel D_8014B240
|
||||
.incbin "baserom.z64", 0xBC23E0, 0x8 # Pi
|
||||
|
||||
glabel D_8014B248
|
||||
.incbin "baserom.z64", 0xBC23E8, 0x8 # .double 3.17865095470564E-8
|
||||
|
||||
glabel D_8014B250
|
||||
.incbin "baserom.z64", 0xBC23F0, 0x10
|
||||
|
||||
.text
|
||||
glabel sinf
|
||||
/* B77430 80100290 E7AC0000 */ swc1 $f12, ($sp)
|
||||
/* B77434 80100294 8FA20000 */ lw $v0, ($sp)
|
||||
/* B77438 80100298 C7A40000 */ lwc1 $f4, ($sp)
|
||||
/* B7743C 8010029C 00021D83 */ sra $v1, $v0, 0x16
|
||||
/* B77440 801002A0 306E01FF */ andi $t6, $v1, 0x1ff
|
||||
/* B77444 801002A4 29C100FF */ slti $at, $t6, 0xff
|
||||
/* B77448 801002A8 10200019 */ beqz $at, .L80100310
|
||||
/* B7744C 801002AC 01C01825 */ move $v1, $t6
|
||||
/* B77450 801002B0 29C100E6 */ slti $at, $t6, 0xe6
|
||||
/* B77454 801002B4 14200014 */ bnez $at, .L80100308
|
||||
/* B77458 801002B8 460020A1 */ cvt.d.s $f2, $f4
|
||||
/* B7745C 801002BC 46221302 */ mul.d $f12, $f2, $f2
|
||||
/* B77460 801002C0 3C038015 */ lui $v1, %hi(D_8014B210) # $v1, 0x8015
|
||||
/* B77464 801002C4 2463B210 */ addiu $v1, %lo(D_8014B210) # addiu $v1, $v1, -0x4df0
|
||||
/* B77468 801002C8 D4660020 */ ldc1 $f6, 0x20($v1)
|
||||
/* B7746C 801002CC D46A0018 */ ldc1 $f10, 0x18($v1)
|
||||
/* B77470 801002D0 D4640010 */ ldc1 $f4, 0x10($v1)
|
||||
/* B77474 801002D4 462C3202 */ mul.d $f8, $f6, $f12
|
||||
/* B77478 801002D8 462A4400 */ add.d $f16, $f8, $f10
|
||||
/* B7747C 801002DC D46A0008 */ ldc1 $f10, 8($v1)
|
||||
/* B77480 801002E0 462C8482 */ mul.d $f18, $f16, $f12
|
||||
/* B77484 801002E4 46249180 */ add.d $f6, $f18, $f4
|
||||
/* B77488 801002E8 462C3202 */ mul.d $f8, $f6, $f12
|
||||
/* B7748C 801002EC 46285380 */ add.d $f14, $f10, $f8
|
||||
/* B77490 801002F0 462C1402 */ mul.d $f16, $f2, $f12
|
||||
/* B77494 801002F4 00000000 */ nop
|
||||
/* B77498 801002F8 462E8482 */ mul.d $f18, $f16, $f14
|
||||
/* B7749C 801002FC 46229100 */ add.d $f4, $f18, $f2
|
||||
/* B774A0 80100300 03E00008 */ jr $ra
|
||||
/* B774A4 80100304 46202020 */ cvt.s.d $f0, $f4
|
||||
|
||||
.L80100308:
|
||||
/* B774A8 80100308 03E00008 */ jr $ra
|
||||
/* B774AC 8010030C C7A00000 */ lwc1 $f0, ($sp)
|
||||
|
||||
.L80100310:
|
||||
/* B774B0 80100310 28610136 */ slti $at, $v1, 0x136
|
||||
/* B774B4 80100314 10200044 */ beqz $at, .L80100428
|
||||
/* B774B8 80100318 C7A40000 */ lwc1 $f4, ($sp)
|
||||
/* B774BC 8010031C C7A60000 */ lwc1 $f6, ($sp)
|
||||
/* B774C0 80100320 3C018015 */ lui $at, %hi(D_8014B238)
|
||||
/* B774C4 80100324 D42AB238 */ ldc1 $f10, %lo(D_8014B238)($at)
|
||||
/* B774C8 80100328 460030A1 */ cvt.d.s $f2, $f6
|
||||
/* B774CC 8010032C 44804800 */ mtc1 $zero, $f9
|
||||
/* B774D0 80100330 462A1002 */ mul.d $f0, $f2, $f10
|
||||
/* B774D4 80100334 44804000 */ mtc1 $zero, $f8
|
||||
/* B774D8 80100338 3C013FE0 */ li $at, 0x3FE00000 # 0.000000
|
||||
/* B774DC 8010033C 4620403E */ c.le.d $f8, $f0
|
||||
/* B774E0 80100340 00000000 */ nop
|
||||
/* B774E4 80100344 4502000B */ bc1fl .L80100374
|
||||
/* B774E8 80100348 44813800 */ mtc1 $at, $f7
|
||||
/* B774EC 8010034C 3C013FE0 */ li $at, 0x3FE00000 # 0.000000
|
||||
/* B774F0 80100350 44818800 */ mtc1 $at, $f17
|
||||
/* B774F4 80100354 44808000 */ mtc1 $zero, $f16
|
||||
/* B774F8 80100358 00000000 */ nop
|
||||
/* B774FC 8010035C 46300480 */ add.d $f18, $f0, $f16
|
||||
/* B77500 80100360 4620910D */ trunc.w.d $f4, $f18
|
||||
/* B77504 80100364 44022000 */ mfc1 $v0, $f4
|
||||
/* B77508 80100368 10000009 */ b .L80100390
|
||||
/* B7750C 8010036C 44828000 */ mtc1 $v0, $f16
|
||||
/* B77510 80100370 44813800 */ mtc1 $at, $f7
|
||||
.L80100374:
|
||||
/* B77514 80100374 44803000 */ mtc1 $zero, $f6
|
||||
/* B77518 80100378 00000000 */ nop
|
||||
/* B7751C 8010037C 46260281 */ sub.d $f10, $f0, $f6
|
||||
/* B77520 80100380 4620520D */ trunc.w.d $f8, $f10
|
||||
/* B77524 80100384 44024000 */ mfc1 $v0, $f8
|
||||
/* B77528 80100388 00000000 */ nop
|
||||
/* B7752C 8010038C 44828000 */ mtc1 $v0, $f16
|
||||
.L80100390:
|
||||
/* B77530 80100390 3C018015 */ lui $at, %hi(D_8014B240)
|
||||
/* B77534 80100394 D432B240 */ ldc1 $f18, %lo(D_8014B240)($at)
|
||||
/* B77538 80100398 46808021 */ cvt.d.w $f0, $f16
|
||||
/* B7753C 8010039C 3C018015 */ lui $at, %hi(D_8014B248)
|
||||
/* B77540 801003A0 D426B248 */ ldc1 $f6, %lo(D_8014B248)($at)
|
||||
/* B77544 801003A4 3C038015 */ lui $v1, %hi(D_8014B210) # $v1, 0x8015
|
||||
/* B77548 801003A8 2463B210 */ addiu $v1, %lo(D_8014B210) # addiu $v1, $v1, -0x4df0
|
||||
/* B7754C 801003AC 46320102 */ mul.d $f4, $f0, $f18
|
||||
/* B77550 801003B0 D4680020 */ ldc1 $f8, 0x20($v1)
|
||||
/* B77554 801003B4 D4720018 */ ldc1 $f18, 0x18($v1)
|
||||
/* B77558 801003B8 30590001 */ andi $t9, $v0, 1
|
||||
/* B7755C 801003BC 46260282 */ mul.d $f10, $f0, $f6
|
||||
/* B77560 801003C0 46241081 */ sub.d $f2, $f2, $f4
|
||||
/* B77564 801003C4 462A1081 */ sub.d $f2, $f2, $f10
|
||||
/* B77568 801003C8 D46A0010 */ ldc1 $f10, 0x10($v1)
|
||||
/* B7756C 801003CC 46221302 */ mul.d $f12, $f2, $f2
|
||||
/* B77570 801003D0 00000000 */ nop
|
||||
/* B77574 801003D4 462C4402 */ mul.d $f16, $f8, $f12
|
||||
/* B77578 801003D8 46328100 */ add.d $f4, $f16, $f18
|
||||
/* B7757C 801003DC D4720008 */ ldc1 $f18, 8($v1)
|
||||
/* B77580 801003E0 462C2182 */ mul.d $f6, $f4, $f12
|
||||
/* B77584 801003E4 462A3200 */ add.d $f8, $f6, $f10
|
||||
/* B77588 801003E8 462C4402 */ mul.d $f16, $f8, $f12
|
||||
/* B7758C 801003EC 17200007 */ bnez $t9, .L8010040C
|
||||
/* B77590 801003F0 46309380 */ add.d $f14, $f18, $f16
|
||||
/* B77594 801003F4 462C1102 */ mul.d $f4, $f2, $f12
|
||||
/* B77598 801003F8 00000000 */ nop
|
||||
/* B7759C 801003FC 462E2182 */ mul.d $f6, $f4, $f14
|
||||
/* B775A0 80100400 46223280 */ add.d $f10, $f6, $f2
|
||||
/* B775A4 80100404 03E00008 */ jr $ra
|
||||
/* B775A8 80100408 46205020 */ cvt.s.d $f0, $f10
|
||||
|
||||
.L8010040C:
|
||||
/* B775AC 8010040C 462C1202 */ mul.d $f8, $f2, $f12
|
||||
/* B775B0 80100410 00000000 */ nop
|
||||
/* B775B4 80100414 462E4482 */ mul.d $f18, $f8, $f14
|
||||
/* B775B8 80100418 46229400 */ add.d $f16, $f18, $f2
|
||||
/* B775BC 8010041C 46208020 */ cvt.s.d $f0, $f16
|
||||
/* B775C0 80100420 03E00008 */ jr $ra
|
||||
/* B775C4 80100424 46000007 */ neg.s $f0, $f0
|
||||
|
||||
.L80100428:
|
||||
/* B775C8 80100428 46042032 */ c.eq.s $f4, $f4
|
||||
/* B775CC 8010042C 3C018015 */ lui $at, %hi(D_8014B250)
|
||||
/* B775D0 80100430 45010004 */ bc1t .L80100444
|
||||
/* B775D4 80100434 00000000 */ nop
|
||||
/* B775D8 80100438 3C018015 */ lui $at, %hi(D_8014B2D0)
|
||||
/* B775DC 8010043C 03E00008 */ jr $ra
|
||||
/* B775E0 80100440 C420B2D0 */ lwc1 $f0, %lo(D_8014B2D0)($at)
|
||||
|
||||
.L80100444:
|
||||
/* B775E4 80100444 C420B250 */ lwc1 $f0, %lo(D_8014B250)($at)
|
||||
/* B775E8 80100448 03E00008 */ jr $ra
|
||||
/* B775EC 8010044C 00000000 */ nop
|
@ -1,33 +0,0 @@
|
||||
glabel sins
|
||||
/* B775F0 80100450 308EFFFF */ andi $t6, $a0, 0xffff
|
||||
/* B775F4 80100454 000E7902 */ srl $t7, $t6, 4
|
||||
/* B775F8 80100458 31F8FFFF */ andi $t8, $t7, 0xffff
|
||||
/* B775FC 8010045C 33190400 */ andi $t9, $t8, 0x400
|
||||
/* B77600 80100460 AFA40000 */ sw $a0, ($sp)
|
||||
/* B77604 80100464 13200008 */ beqz $t9, .L80100488
|
||||
/* B77608 80100468 03001025 */ move $v0, $t8
|
||||
/* B7760C 8010046C 330803FF */ andi $t0, $t8, 0x3ff
|
||||
/* B77610 80100470 00084840 */ sll $t1, $t0, 1
|
||||
/* B77614 80100474 00095023 */ negu $t2, $t1
|
||||
/* B77618 80100478 3C038013 */ lui $v1, %hi(D_80134CCE)
|
||||
/* B7761C 8010047C 006A1821 */ addu $v1, $v1, $t2
|
||||
/* B77620 80100480 10000006 */ b .L8010049C
|
||||
/* B77624 80100484 84634CCE */ lh $v1, %lo(D_80134CCE)($v1)
|
||||
.L80100488:
|
||||
/* B77628 80100488 304B03FF */ andi $t3, $v0, 0x3ff
|
||||
/* B7762C 8010048C 000B6040 */ sll $t4, $t3, 1
|
||||
/* B77630 80100490 3C038013 */ lui $v1, %hi(D_801344D0)
|
||||
/* B77634 80100494 006C1821 */ addu $v1, $v1, $t4
|
||||
/* B77638 80100498 846344D0 */ lh $v1, %lo(D_801344D0)($v1)
|
||||
.L8010049C:
|
||||
/* B7763C 8010049C 304D0800 */ andi $t5, $v0, 0x800
|
||||
/* B77640 801004A0 11A00005 */ beqz $t5, .L801004B8
|
||||
/* B77644 801004A4 00601025 */ move $v0, $v1
|
||||
/* B77648 801004A8 00031023 */ negu $v0, $v1
|
||||
/* B7764C 801004AC 00027400 */ sll $t6, $v0, 0x10
|
||||
/* B77650 801004B0 03E00008 */ jr $ra
|
||||
/* B77654 801004B4 000E1403 */ sra $v0, $t6, 0x10
|
||||
|
||||
.L801004B8:
|
||||
/* B77658 801004B8 03E00008 */ jr $ra
|
||||
/* B7765C 801004BC 00000000 */ nop
|
@ -5,9 +5,7 @@
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .bss
|
||||
.section .rodata
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel D_80175860
|
||||
.space 0x100
|
||||
glabel __libm_qnan_f
|
||||
.word 0x7F810000
|
@ -1,16 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .data
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel D_80134CF0
|
||||
.incbin "baserom.z64", 0xBABE90, 0x4
|
||||
|
||||
glabel __osPfsInodeCacheBank
|
||||
.incbin "baserom.z64", 0xBABE94, 0xC
|
@ -1,13 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .data
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel __osPfsLastChannel
|
||||
.incbin "baserom.z64", 0xBABEC0, 0x10
|
@ -1,16 +0,0 @@
|
||||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
|
||||
.section .data
|
||||
|
||||
.balign 16
|
||||
|
||||
glabel D_801344D0
|
||||
.incbin "baserom.z64", 0xBAB670, 0x7FE
|
||||
|
||||
glabel D_80134CCE
|
||||
.incbin "baserom.z64", 0xBABE6E, 0x2
|
@ -2402,7 +2402,7 @@ s32 JpegDecoder_Decode(JpegDecoder* decoder, u16* mcuBuff, s32 count, u8 isFollo
|
||||
s32 JpegDecoder_ProcessMcu(JpegHuffmanTable* hTable0, JpegHuffmanTable* hTable1, s16* mcu, s16* unk);
|
||||
s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, u8* outZeroCount);
|
||||
u16 JpegDecoder_ReadBits(u8 len);
|
||||
s32 osPfsFreeBlocks(OSPfs* pfs, s32 *bytes_not_used);
|
||||
s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes);
|
||||
void guScale(Mtx* m, f32 x, f32 y, f32 z);
|
||||
f32 sinf(f32);
|
||||
s16 sins(u16);
|
||||
@ -2426,26 +2426,26 @@ void __osPackReadData();
|
||||
// ? __osSpRawStartDma(?);
|
||||
s32 __osSiRawStartDma(s32 dir, void *addr);
|
||||
// ? osSpTaskYield(?);
|
||||
// ? func_801014C0(?);
|
||||
s32 osPfsReadWriteFile(OSPfs* pfs, s32 file_no, u8 flag, s32 offset, s32 nbytes, u8* data_buffer);
|
||||
s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page);
|
||||
s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data);
|
||||
s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel);
|
||||
void __osPfsRequestOneChannel(s32 channel, u8 poll);
|
||||
void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData);
|
||||
// ? guMtxIdentF(?);
|
||||
void guLookAtF(MtxF* mf, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
|
||||
void guLookAtF(float mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
|
||||
void guLookAt(Mtx*, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
|
||||
s32 osPfsAllocateFile(OSPfs* pfs, u16 company_code, u32 game_code, u8* game_name, u8* ext_name, s32 length, s32* file_no);
|
||||
// ? func_801021E4(?);
|
||||
s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared, s32* finalPage);
|
||||
// ? osStopTimer(?);
|
||||
// ? func_80102420(?);
|
||||
// ? func_80102494(?);
|
||||
// ? func_80102590(?);
|
||||
// ? func_801028E0(?);
|
||||
// ? func_80102A44(?);
|
||||
// ? func_80102BF0(?);
|
||||
// ? func_80102CC4(?);
|
||||
u16 __osSumcalc(u8* ptr, s32 length);
|
||||
s32 __osIdCheckSum(u16 *ptr, u16 *csum, u16 *icsum);
|
||||
s32 __osRepairPackId(OSPfs* pfs, __OSPackId* badid, __OSPackId* newid);
|
||||
s32 __osCheckPackId(OSPfs* pfs, __OSPackId* temp);
|
||||
s32 __osGetId(OSPfs* pfs);
|
||||
s32 __osCheckId(OSPfs* pfs);
|
||||
s32 __osPfsRWInode(OSPfs* pfs, __OSInode* inode, u8 flag, u8 bank);
|
||||
// ? func_80102FA0(?);
|
||||
s32 osPfsFindFile(OSPfs* pfs, u16 company_code, u32 game_code, u8* game_name, u8* ext_name, s32* file_no);
|
||||
s32 osPfsFindFile(OSPfs *pfs, u16 companyCode, u32 gameCode, u8 *gameName, u8 *extName, s32 *fileNo);
|
||||
// ? osAfterPreNMI(?);
|
||||
// ? osContStartQuery(?);
|
||||
void osContGetQuery(OSContStatus* data);
|
||||
@ -2466,7 +2466,7 @@ void guRotate(Mtx*, f32 angle, f32 x, f32 y, f32 z);
|
||||
u32 osDpGetStatus(void);
|
||||
void osDpSetStatus(u32 status);
|
||||
s32 osPfsDeleteFile(OSPfs* pfs, u16 company_code, u32 game_code, u8* game_name, u8* ext_name);
|
||||
// ? func_801043B8(?);
|
||||
s32 __osPfsReleasePages(OSPfs* pfs, __OSInode* inode, u8 initialPage, u8 bank, __OSInodeUnit* finalPage);
|
||||
void guOrthoF(f32[4][4], f32, f32, f32, f32, f32, f32, f32);
|
||||
void guOrtho(Mtx*, f32, f32, f32, f32, f32, f32, f32);
|
||||
f32 cosf(f32);
|
||||
@ -2476,20 +2476,20 @@ s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern);
|
||||
void __osPfsRequestData(u8 poll);
|
||||
void __osPfsGetInitData(u8 *pattern, OSContStatus* contData);
|
||||
void guS2DInitBg(uObjBg *bg);
|
||||
// ? func_80104C80(?);
|
||||
s32 __osPfsSelectBank(OSPfs *pfs, u8 bank);
|
||||
s32 osContSetCh(u8 ch);
|
||||
s32 osPfsFileState(OSPfs* pfs, s32 file_no, OSPfsState* state);
|
||||
s32 osPfsInitPak(OSMesgQueue* mq, OSPfs* pfs, s32 controller_no);
|
||||
// ? func_80105148(?);
|
||||
// ? func_80105250(?);
|
||||
// ? func_80105788(?);
|
||||
// ? func_80105A60(?);
|
||||
s32 osPfsInitPak(OSMesgQueue* mq, OSPfs* pfs, s32 channel);
|
||||
s32 __osPfsCheckRamArea(OSPfs* pfs);
|
||||
s32 osPfsChecker(OSPfs* pfs);
|
||||
s32 func_80105788(OSPfs* pfs, __OSInodeCache* cache);
|
||||
s32 func_80105A60(OSPfs* pfs, __OSInodeUnit fpage, __OSInodeCache* cache);
|
||||
// ? osAiGetLength(?);
|
||||
void guTranslate(Mtx* m, f32 x, f32 y, f32 z);
|
||||
// ? func_80105CF0(?);
|
||||
s32 osReadMempak(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data);
|
||||
u8 osMempakAddrCRC(u16 addr);
|
||||
u8 osMempakDataCRC(u8* data);
|
||||
s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force);
|
||||
s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data);
|
||||
u8 __osContAddressCrc(u16 addr);
|
||||
u8 __osContDataCrc(u8* data);
|
||||
u32 __osSpGetStatus();
|
||||
void __osSpSetStatus(u32 status);
|
||||
void osWritebackDCacheAll(void);
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#define SQ(x) ((x)*(x))
|
||||
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||
#define ULTRA_ABS(x) ((x) > 0) ? (x) : -(x)
|
||||
#define DECR(x) ((x) == 0 ? 0 : ((x) -= 1))
|
||||
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
|
||||
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
|
||||
|
@ -14,4 +14,20 @@ float cosf(float);
|
||||
double cos(double);
|
||||
float sqrtf(float f);
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
unsigned int hi;
|
||||
unsigned int lo;
|
||||
} word;
|
||||
|
||||
double d;
|
||||
} du;
|
||||
|
||||
typedef union {
|
||||
unsigned int i;
|
||||
float f;
|
||||
} fu;
|
||||
|
||||
extern float __libm_qnan_f;
|
||||
|
||||
#endif
|
||||
|
@ -8,6 +8,9 @@
|
||||
#define SIAccessQueueSize 2
|
||||
#define BLOCKSIZE 32
|
||||
#define MAXCONTROLLERS 4
|
||||
#define PFS_ONE_PAGE 8
|
||||
|
||||
#define PFS_PAGE_SIZE (BLOCKSIZE*PFS_ONE_PAGE)
|
||||
|
||||
#define CONT_CMD_REQUEST_STATUS 0
|
||||
#define CONT_CMD_READ_BUTTON 1
|
||||
|
@ -4,6 +4,8 @@
|
||||
#define GU_PI 3.1415926
|
||||
/* Functions */
|
||||
|
||||
#define ROUND(x) (s32)(((x) >= 0.0) ? ((x) + 0.5) : ((x) - 0.5))
|
||||
|
||||
void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy, float aspect,
|
||||
float near, float far, float scale);
|
||||
void guPerspective(Mtx *m, u16 *perspNorm, float fovy, float aspect, float near,
|
||||
|
@ -3,35 +3,12 @@
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
typedef struct {
|
||||
int status;
|
||||
OSMesgQueue* queue;
|
||||
int channel;
|
||||
u8 id[32];
|
||||
u8 label[32];
|
||||
int version;
|
||||
int dir_size;
|
||||
int inode_table; /* block location */
|
||||
int minode_table; /* mirrioring inode_table */
|
||||
int dir_table; /* block location */
|
||||
int inode_start_page; /* page # */
|
||||
u8 banks;
|
||||
u8 activebank;
|
||||
} OSPfs;
|
||||
|
||||
typedef struct {
|
||||
u32 file_size; /* bytes */
|
||||
u32 game_code;
|
||||
u16 company_code;
|
||||
char ext_name[4];
|
||||
char game_name[16];
|
||||
} OSPfsState;
|
||||
|
||||
/* File System size */
|
||||
#define OS_PFS_VERSION 0x0200
|
||||
#define OS_PFS_VERSION_HI (OS_PFS_VERSION >> 8)
|
||||
#define OS_PFS_VERSION_LO (OS_PFS_VERSION & 255)
|
||||
|
||||
#define PFS_INODE_SIZE_PER_PAGE 128
|
||||
#define PFS_FILE_NAME_LEN 16
|
||||
#define PFS_FILE_EXT_LEN 4
|
||||
#define BLOCKSIZE 32
|
||||
@ -51,6 +28,11 @@ typedef struct {
|
||||
#define PFS_MOTOR_INITIALIZED 0x8
|
||||
#define PFS_GBPAK_INITIALIZED 0x10
|
||||
|
||||
/* Definition for page usage */
|
||||
#define PFS_EOF 1
|
||||
#define PFS_PAGE_NOT_EXIST 2
|
||||
#define PFS_PAGE_NOT_USED 3
|
||||
|
||||
/* File System error number */
|
||||
|
||||
#define PFS_ERR_NOPACK 1 /* no memory card is plugged or */
|
||||
@ -67,4 +49,89 @@ typedef struct {
|
||||
#define PFS_ERR_NO_GBCART 12 /* no gb cartridge (64GB-PAK) */
|
||||
#define PFS_ERR_NEW_GBCART 13 /* gb cartridge may be changed */
|
||||
|
||||
/* Definition for bank */
|
||||
#define PFS_ID_BANK_256K 0
|
||||
#define PFS_ID_BANK_1M 4
|
||||
#define PFS_BANKS_256K 1
|
||||
|
||||
#define PFS_WRITTEN 2
|
||||
#define DEF_DIR_PAGES 2
|
||||
|
||||
#define PFS_ID_0AREA 1
|
||||
#define PFS_ID_1AREA 3
|
||||
#define PFS_ID_2AREA 4
|
||||
#define PFS_ID_3AREA 6
|
||||
#define PFS_LABEL_AREA 7
|
||||
#define PFS_ID_PAGE PFS_ONE_PAGE * 0
|
||||
|
||||
#define PFS_BANK_LAPPED_BY 8 /* => u8 */
|
||||
#define PFS_SECTOR_PER_BANK 32
|
||||
#define PFS_INODE_DIST_MAP (PFS_BANK_LAPPED_BY * PFS_SECTOR_PER_BANK)
|
||||
#define PFS_SECTOR_SIZE (PFS_INODE_SIZE_PER_PAGE/PFS_SECTOR_PER_BANK)
|
||||
|
||||
typedef struct {
|
||||
int status;
|
||||
OSMesgQueue* queue;
|
||||
int channel;
|
||||
u8 id[32];
|
||||
u8 label[32];
|
||||
int version;
|
||||
int dir_size;
|
||||
int inode_table; /* block location */
|
||||
int minode_table; /* mirrioring inode_table */
|
||||
int dir_table; /* block location */
|
||||
int inodeStartPage; /* page # */
|
||||
u8 banks;
|
||||
u8 activebank;
|
||||
} OSPfs;
|
||||
|
||||
typedef struct {
|
||||
u32 file_size; /* bytes */
|
||||
u32 game_code;
|
||||
u16 company_code;
|
||||
char ext_name[4];
|
||||
char game_name[16];
|
||||
} OSPfsState;
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
u8 bank;
|
||||
u8 page;
|
||||
} inode_t;
|
||||
u16 ipage;
|
||||
} __OSInodeUnit;
|
||||
|
||||
typedef struct {
|
||||
__OSInodeUnit inodePage[128];
|
||||
} __OSInode;
|
||||
|
||||
typedef struct {
|
||||
u32 game_code;
|
||||
u16 company_code;
|
||||
__OSInodeUnit start_page;
|
||||
u8 status;
|
||||
s8 reserved;
|
||||
u16 data_sum;
|
||||
u8 ext_name[PFS_FILE_EXT_LEN];
|
||||
u8 game_name[PFS_FILE_NAME_LEN];
|
||||
} __OSDir;
|
||||
|
||||
typedef struct {
|
||||
u32 repaired;
|
||||
u32 random;
|
||||
u64 serialMid;
|
||||
u64 serialLow;
|
||||
u16 deviceid;
|
||||
u8 banks;
|
||||
u8 version;
|
||||
u16 checksum;
|
||||
u16 invertedChecksum;
|
||||
} __OSPackId;
|
||||
|
||||
typedef struct {
|
||||
__OSInode inode;
|
||||
u8 bank;
|
||||
u8 map[PFS_INODE_DIST_MAP];
|
||||
} __OSInodeCache;
|
||||
|
||||
#endif
|
||||
|
@ -822,7 +822,7 @@ extern s32 gSystemArenaLogSeverity;
|
||||
//extern ? D_801344C0;
|
||||
extern u32 gOSSiAccessQueueCreated; // = 0;
|
||||
extern u32 gOSContInitialized; // = 0
|
||||
//extern ? D_80134CF0;
|
||||
extern s32 __osPfsInodeCacheChannel;
|
||||
extern u8 __osPfsInodeCacheBank;
|
||||
extern s32 __osPfsLastChannel;
|
||||
//extern ? D_80135130;
|
||||
@ -3740,7 +3740,7 @@ extern u8 __osContLastPoll;
|
||||
extern u8 __osMaxControllers;
|
||||
extern OSMesgQueue __osContMesgQueue;
|
||||
extern OSMesg __osContMesgBuff[4];
|
||||
//extern ? D_80175860;
|
||||
extern __OSInode __osPfsInodeCache;
|
||||
extern OSPifRam pifMempakBuf;
|
||||
//extern ? D_801759A0;
|
||||
//extern ? D_801759A4;
|
||||
|
32
spec
32
spec
@ -456,11 +456,10 @@ beginseg
|
||||
include "build/src/code/sleep.o"
|
||||
include "build/src/code/jpegutils.o"
|
||||
include "build/src/code/jpegdecoder.o"
|
||||
include "build/asm/code_80100040.o"
|
||||
include "build/src/libultra_code/osPfsFreeBlocks.o"
|
||||
include "build/asm/guScale.o"
|
||||
include "build/src/libultra_code/sinf.o"
|
||||
include "build/src/libultra_code/sins.o"
|
||||
include "build/data/sins.data.o"
|
||||
include "build/src/libultra_code/sptask.o"
|
||||
include "build/src/libultra_code/osRumblePak.o"
|
||||
include "build/src/libultra_code/__osSiCreateAccessQueue.o"
|
||||
@ -470,19 +469,18 @@ beginseg
|
||||
include "build/src/libultra_code/__osSpRawStartDma.o"
|
||||
include "build/src/libultra_code/__osSiRawStartDma.o"
|
||||
include "build/src/libultra_code/osSpTaskYield.o"
|
||||
include "build/asm/code_801014C0.o"
|
||||
include "build/data/code_801014C0.bss.o"
|
||||
include "build/src/libultra_code/pfsreadwritefile.o"
|
||||
include "build/src/libultra_code/__osPfsGetStatus.o"
|
||||
include "build/asm/guMtxIdentF.o"
|
||||
include "build/src/libultra_code/guLookAt.o"
|
||||
include "build/asm/code_80101EB0.o"
|
||||
include "build/src/libultra_code/pfsallocatefile.o"
|
||||
include "build/src/libultra_code/osStopTimer.o"
|
||||
include "build/asm/code_80102420.o"
|
||||
include "build/data/code_80102420.data.o"
|
||||
include "build/src/libultra_code/contpfs.o"
|
||||
include "build/asm/code_80102FA0.o"
|
||||
include "build/asm/code_80103010.o"
|
||||
include "build/src/libultra_code/osPfsFindFile.o"
|
||||
include "build/src/libultra_code/sqrtf.o"
|
||||
include "build/src/libultra_code/code_801031F0.o"
|
||||
include "build/src/libultra_code/osAfterPreNMI.o"
|
||||
include "build/src/libultra_code/contquery.o"
|
||||
include "build/src/libultra_code/guLookAtHilite.o"
|
||||
include "build/src/libultra_code/sp.o"
|
||||
include "build/asm/guMtxIdent.o"
|
||||
@ -494,24 +492,24 @@ beginseg
|
||||
include "build/asm/guNormalize.o"
|
||||
include "build/src/libultra_code/osDpGetStatus.o"
|
||||
include "build/src/libultra_code/osDpSetStatus.o"
|
||||
include "build/asm/code_801041E0.o"
|
||||
include "build/src/libultra_code/osPfsDeleteFile.o"
|
||||
include "build/src/libultra_code/ortho.o"
|
||||
include "build/src/libultra_code/cosf.o"
|
||||
include "build/data/__libm_qnan_f.rodata.o"
|
||||
include "build/src/libultra_code/coss.o"
|
||||
include "build/src/libultra_code/osViSetEvent.o"
|
||||
include "build/src/libultra_code/osPfsIsPlug.o"
|
||||
include "build/src/libultra_code/guS2DInitBg.o"
|
||||
include "build/asm/code_80104C80.o"
|
||||
include "build/src/libultra_code/__osPfsSelectBank.o"
|
||||
include "build/src/libultra_code/osContSetCh.o"
|
||||
include "build/asm/code_80104D60.o"
|
||||
include "build/asm/code_80104F40.o"
|
||||
include "build/asm/code_80105250.o"
|
||||
include "build/src/libultra_code/pfsinitpak.o"
|
||||
include "build/src/libultra_code/pfschecker.o"
|
||||
include "build/src/libultra_code/osAiGetLength.o"
|
||||
include "build/asm/guTranslate.o"
|
||||
include "build/asm/code_80105CF0.o"
|
||||
include "build/data/code_80105CF0.data.o"
|
||||
include "build/src/libultra_code/osReadMempak.o"
|
||||
include "build/src/libultra_code/osMempakAddrCRC.o"
|
||||
include "build/src/libultra_code/__osContRamWrite.o"
|
||||
include "build/src/libultra_code/__osContRamRead.o"
|
||||
include "build/src/libultra_code/__osContAddressCrc.o"
|
||||
include "build/src/libultra_code/osSetTimer.o"
|
||||
include "build/src/libultra_code/__osSpGetStatus.o"
|
||||
include "build/src/libultra_code/__osSpSetStatus.o"
|
||||
|
@ -6,7 +6,7 @@ u8 D_8012D200[] = {
|
||||
|
||||
void func_800C3C20(void) {
|
||||
s32 i;
|
||||
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_8012D200) & 0xFFFFFFFFu; i++) {
|
||||
func_800F87A0(D_8012D200[i]);
|
||||
}
|
||||
|
@ -714,7 +714,8 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
||||
break;
|
||||
|
||||
case 13:
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
if (globalCtx->sceneLoadFlag == -0x14) {
|
||||
if (globalCtx->envCtx.unk_E7 < 0x6E) {
|
||||
gTrnsnUnkState = 0;
|
||||
@ -747,7 +748,8 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
||||
break;
|
||||
|
||||
case 15:
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_SAND_STORM - SFX_FLAG, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
if (globalCtx->sceneLoadFlag == -0x14) {
|
||||
if (globalCtx->envCtx.unk_E7 <= 0) {
|
||||
gTrnsnUnkState = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Valid addr up to 0x7FF
|
||||
// It's the address of a block of 0x20 bytes in the mempak
|
||||
// So that means the whole mempak has a 16-bit address space
|
||||
u8 osMempakAddrCRC(u16 addr) {
|
||||
u8 __osContAddressCrc(u16 addr) {
|
||||
u32 addr32 = addr;
|
||||
u32 ret = 0;
|
||||
u32 bit;
|
||||
@ -34,7 +34,7 @@ u8 osMempakAddrCRC(u16 addr) {
|
||||
return ret & 0x1f;
|
||||
}
|
||||
|
||||
u8 osMempakDataCRC(u8* data) {
|
||||
u8 __osContDataCrc(u8* data) {
|
||||
s32 ret;
|
||||
u32 bit;
|
||||
u32 byte;
|
@ -4,7 +4,9 @@
|
||||
|
||||
#define BLOCKSIZE 32
|
||||
|
||||
s32 osReadMempak(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data) {
|
||||
s32 __osPfsLastChannel = -1;
|
||||
|
||||
s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data) {
|
||||
s32 ret;
|
||||
s32 i;
|
||||
u8* bufptr;
|
||||
@ -31,15 +33,15 @@ s32 osReadMempak(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data) {
|
||||
} else {
|
||||
bufptr += channel;
|
||||
}
|
||||
((__OSContRamHeader*)bufptr)->hi = addr >> 3; // send byte 1
|
||||
((__OSContRamHeader*)bufptr)->lo = (s8)(osMempakAddrCRC(addr) | (addr << 5)); // send byte 2
|
||||
((__OSContRamHeader*)bufptr)->hi = addr >> 3; // send byte 1
|
||||
((__OSContRamHeader*)bufptr)->lo = (s8)(__osContAddressCrc(addr) | (addr << 5)); // send byte 2
|
||||
__osSiRawStartDma(OS_WRITE, &pifMempakBuf);
|
||||
osRecvMesg(ctrlrqueue, NULL, OS_MESG_BLOCK);
|
||||
__osSiRawStartDma(OS_READ, &pifMempakBuf);
|
||||
osRecvMesg(ctrlrqueue, NULL, OS_MESG_BLOCK);
|
||||
ret = (((__OSContRamHeader*)bufptr)->rxsize & 0xC0) >> 4;
|
||||
if (!ret) {
|
||||
if (((__OSContRamHeader*)bufptr)->datacrc != osMempakDataCRC(bufptr + 6)) {
|
||||
if (((__OSContRamHeader*)bufptr)->datacrc != __osContDataCrc(bufptr + 6)) {
|
||||
ret = __osPfsGetStatus(ctrlrqueue, channel);
|
||||
if (ret) {
|
||||
break;
|
68
src/libultra_code/__osContRamWrite.c
Normal file
68
src/libultra_code/__osContRamWrite.c
Normal file
@ -0,0 +1,68 @@
|
||||
#include <ultra64.h>
|
||||
#include <ultra64/controller.h>
|
||||
#include <global.h>
|
||||
|
||||
s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force) {
|
||||
s32 ret = 0;
|
||||
s32 i;
|
||||
u8* ptr;
|
||||
s32 retry = 2;
|
||||
u8 crc;
|
||||
|
||||
if ((force != PFS_FORCE) && (address < PFS_LABEL_AREA) && (address != 0)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
__osSiGetAccess();
|
||||
|
||||
do {
|
||||
ptr = (u8*)(&pifMempakBuf);
|
||||
|
||||
if (__osContLastPoll != CONT_CMD_WRITE_MEMPACK || __osPfsLastChannel != channel) {
|
||||
__osContLastPoll = CONT_CMD_WRITE_MEMPACK;
|
||||
__osPfsLastChannel = channel;
|
||||
|
||||
// clang-format off
|
||||
for (i = 0; i < channel; i++) { *ptr++ = 0; }
|
||||
// clang-format on
|
||||
|
||||
pifMempakBuf.status = 1;
|
||||
|
||||
((__OSContRamHeader*)ptr)->unk_00 = 0xff;
|
||||
((__OSContRamHeader*)ptr)->txsize = 35;
|
||||
((__OSContRamHeader*)ptr)->rxsize = 1;
|
||||
((__OSContRamHeader*)ptr)->poll = CONT_CMD_WRITE_MEMPACK;
|
||||
((__OSContRamHeader*)ptr)->datacrc = 0xff;
|
||||
|
||||
ptr[sizeof(__OSContRamHeader)] = CONT_CMD_END;
|
||||
} else {
|
||||
ptr += channel;
|
||||
}
|
||||
((__OSContRamHeader*)ptr)->hi = address >> 3;
|
||||
((__OSContRamHeader*)ptr)->lo = ((address << 5) | __osContAddressCrc(address));
|
||||
|
||||
bcopy(buffer, ((__OSContRamHeader*)ptr)->data, BLOCKSIZE);
|
||||
|
||||
ret = __osSiRawStartDma(OS_WRITE, &pifMempakBuf);
|
||||
crc = __osContDataCrc(buffer);
|
||||
osRecvMesg(mq, (OSMesg*)NULL, OS_MESG_BLOCK);
|
||||
|
||||
ret = __osSiRawStartDma(OS_READ, &pifMempakBuf);
|
||||
osRecvMesg(mq, (OSMesg*)NULL, OS_MESG_BLOCK);
|
||||
|
||||
ret = ((((__OSContRamHeader*)ptr)->rxsize & 0xC0) >> 4);
|
||||
if (!ret) {
|
||||
if (crc != ((__OSContRamHeader*)ptr)->datacrc) {
|
||||
if ((ret = __osPfsGetStatus(mq, channel))) {
|
||||
break;
|
||||
} else {
|
||||
ret = PFS_ERR_CONTRFAIL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ret = PFS_ERR_NOPACK;
|
||||
}
|
||||
} while ((ret == PFS_ERR_CONTRFAIL) && (retry-- >= 0));
|
||||
__osSiRelAccess();
|
||||
return ret;
|
||||
}
|
18
src/libultra_code/__osPfsSelectBank.c
Normal file
18
src/libultra_code/__osPfsSelectBank.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include <ultra64/pfs.h>
|
||||
#include <global.h>
|
||||
|
||||
s32 __osPfsSelectBank(OSPfs* pfs, u8 bank) {
|
||||
u8 temp[BLOCKSIZE];
|
||||
s32 i;
|
||||
s32 ret = 0;
|
||||
|
||||
for (i = 0; i < BLOCKSIZE; i++) {
|
||||
temp[i] = bank;
|
||||
}
|
||||
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, 0x8000 / BLOCKSIZE, temp, 0);
|
||||
if (ret == 0) {
|
||||
pfs->activebank = bank;
|
||||
}
|
||||
return ret;
|
||||
}
|
314
src/libultra_code/contpfs.c
Normal file
314
src/libultra_code/contpfs.c
Normal file
@ -0,0 +1,314 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
extern __OSInode __osPfsInodeCache; // bss
|
||||
s32 __osPfsInodeCacheChannel = -1;
|
||||
u8 __osPfsInodeCacheBank = 250;
|
||||
|
||||
u16 __osSumcalc(u8* ptr, s32 length) {
|
||||
s32 i;
|
||||
u32 sum = 0;
|
||||
u8* temp;
|
||||
|
||||
temp = ptr;
|
||||
for (i = 0; i < length; i++) {
|
||||
sum += *temp++;
|
||||
}
|
||||
return sum & 0xFFFF;
|
||||
}
|
||||
|
||||
s32 __osIdCheckSum(u16* ptr, u16* checkSum, u16* idSum) {
|
||||
|
||||
u16 data = 0;
|
||||
u32 i;
|
||||
|
||||
*checkSum = *idSum = 0;
|
||||
for (i = 0; i < ((sizeof(__OSPackId) - sizeof(u32)) / sizeof(u8)); i += 2) {
|
||||
data = *((u16*)((u32)ptr + i));
|
||||
*checkSum += data;
|
||||
*idSum += ~data;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 __osRepairPackId(OSPfs* pfs, __OSPackId* badid, __OSPackId* newid) {
|
||||
s32 ret = 0;
|
||||
u8 temp[BLOCKSIZE];
|
||||
u8 comp[BLOCKSIZE];
|
||||
u8 mask = 0;
|
||||
s32 i, j = 0;
|
||||
u16 index[4];
|
||||
|
||||
newid->repaired = 0xFFFFFFFF;
|
||||
newid->random = osGetCount();
|
||||
newid->serialMid = badid->serialMid;
|
||||
newid->serialLow = badid->serialLow;
|
||||
|
||||
if ((pfs->activebank != 0) && ((ret = __osPfsSelectBank(pfs, 0)) != 0)) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
do {
|
||||
if ((ret = __osPfsSelectBank(pfs, j)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, 0, temp)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
temp[0] = j | 0x80;
|
||||
for (i = 1; i < BLOCKSIZE; i++) {
|
||||
temp[i] = ~temp[i];
|
||||
}
|
||||
|
||||
if ((ret = __osContRamWrite(pfs->queue, pfs->channel, 0, temp, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, 0, comp)) != 0) {
|
||||
return (ret);
|
||||
}
|
||||
for (i = 0; i < BLOCKSIZE; i++) {
|
||||
if (comp[i] != temp[i]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i != BLOCKSIZE) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (j > 0) {
|
||||
if ((ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, 0, temp)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if (temp[0] != 0x80) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
j++;
|
||||
} while (j < PFS_MAX_BANKS);
|
||||
|
||||
if ((pfs->activebank != 0) && (ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
mask = (j > 0) ? 1 : 0;
|
||||
newid->deviceid = (badid->deviceid & 0xFFFE) | mask;
|
||||
newid->banks = j;
|
||||
newid->version = badid->version;
|
||||
__osIdCheckSum(newid, &newid->checksum, &newid->invertedChecksum);
|
||||
|
||||
index[0] = PFS_ID_0AREA;
|
||||
index[1] = PFS_ID_1AREA;
|
||||
index[2] = PFS_ID_2AREA;
|
||||
index[3] = PFS_ID_3AREA;
|
||||
for (i = 0; i < 4; i++) {
|
||||
if ((ret = __osContRamWrite(pfs->queue, pfs->channel, index[i], newid, PFS_FORCE)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, PFS_ID_0AREA, temp)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
for (i = 0; i < BLOCKSIZE; i++) {
|
||||
if (temp[i] != *(u8*)((s32)newid + i)) {
|
||||
return PFS_ERR_DEVICE;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 __osCheckPackId(OSPfs* pfs, __OSPackId* temp) {
|
||||
|
||||
u16 index[4];
|
||||
s32 ret = 0;
|
||||
u16 sum;
|
||||
u16 idSum;
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
if ((pfs->activebank != 0) && (ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
index[0] = PFS_ID_0AREA;
|
||||
index[1] = PFS_ID_1AREA;
|
||||
index[2] = PFS_ID_2AREA;
|
||||
index[3] = PFS_ID_3AREA;
|
||||
for (i = 1; i < 4; i++) {
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, index[i], temp)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
__osIdCheckSum(temp, &sum, &idSum);
|
||||
if ((temp->checksum == sum) && (temp->invertedChecksum == idSum)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == 4) {
|
||||
return PFS_ERR_ID_FATAL;
|
||||
}
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
if (j != i) {
|
||||
if ((ret = __osContRamWrite(pfs->queue, pfs->channel, index[j], temp, PFS_FORCE)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
s32 __osGetId(OSPfs* pfs) {
|
||||
|
||||
u16 sum, isum;
|
||||
u8 temp[BLOCKSIZE];
|
||||
__OSPackId newid;
|
||||
s32 ret;
|
||||
__OSPackId* id;
|
||||
|
||||
if (pfs->activebank != 0) {
|
||||
if ((ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, PFS_ID_0AREA, temp)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
__osIdCheckSum((u16*)temp, &sum, &isum);
|
||||
id = (__OSPackId*)temp;
|
||||
if ((id->checksum != sum) || (id->invertedChecksum != isum)) {
|
||||
if ((ret = __osCheckPackId(pfs, id)) == PFS_ERR_ID_FATAL) {
|
||||
ret = __osRepairPackId(pfs, id, &newid);
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
id = &newid;
|
||||
} else if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((id->deviceid & 0x01) == 0) {
|
||||
ret = __osRepairPackId(pfs, id, &newid);
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
id = &newid;
|
||||
if ((id->deviceid & 0x01) == 0) {
|
||||
return PFS_ERR_DEVICE;
|
||||
}
|
||||
}
|
||||
|
||||
bcopy(id, pfs->id, BLOCKSIZE);
|
||||
|
||||
pfs->version = id->version;
|
||||
|
||||
pfs->banks = id->banks;
|
||||
pfs->inodeStartPage = 1 + DEF_DIR_PAGES + (2 * pfs->banks);
|
||||
pfs->dir_size = DEF_DIR_PAGES * PFS_ONE_PAGE;
|
||||
pfs->inode_table = 1 * PFS_ONE_PAGE;
|
||||
pfs->minode_table = (1 + pfs->banks) * PFS_ONE_PAGE;
|
||||
pfs->dir_table = pfs->minode_table + (pfs->banks * PFS_ONE_PAGE);
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, PFS_LABEL_AREA, pfs->label)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/contpfs/__osGetId.s")
|
||||
#endif
|
||||
|
||||
s32 __osCheckId(OSPfs* pfs) {
|
||||
u8 temp[BLOCKSIZE];
|
||||
s32 ret;
|
||||
|
||||
if (pfs->activebank != 0) {
|
||||
ret = __osPfsSelectBank(pfs, 0);
|
||||
if (ret == PFS_ERR_NEW_PACK) {
|
||||
ret = __osPfsSelectBank(pfs, 0);
|
||||
}
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, PFS_ID_0AREA, temp)) != 0) {
|
||||
if (ret != PFS_ERR_NEW_PACK) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, PFS_ID_0AREA, temp)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (bcmp(pfs->id, temp, BLOCKSIZE) != 0) {
|
||||
return PFS_ERR_NEW_PACK;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 __osPfsRWInode(OSPfs* pfs, __OSInode* inode, u8 flag, u8 bank) {
|
||||
u8 sum;
|
||||
s32 j;
|
||||
s32 ret;
|
||||
s32 offset;
|
||||
u8* addr;
|
||||
|
||||
if (flag == PFS_READ && bank == __osPfsInodeCacheBank && (pfs->channel == __osPfsInodeCacheChannel)) {
|
||||
bcopy(&__osPfsInodeCache, inode, sizeof(__OSInode));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((pfs->activebank != 0) && (ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
offset = ((bank > 0) ? 1 : pfs->inodeStartPage);
|
||||
|
||||
if (flag == PFS_WRITE) {
|
||||
inode->inodePage[0].inode_t.page =
|
||||
__osSumcalc(inode->inodePage + offset, (PFS_INODE_SIZE_PER_PAGE - offset) * 2);
|
||||
}
|
||||
|
||||
for (j = 0; j < PFS_ONE_PAGE; j++) {
|
||||
addr = (u8*)(((u8*)inode) + (j * BLOCKSIZE));
|
||||
if (flag == PFS_WRITE) {
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->inode_table + (bank * PFS_ONE_PAGE) + j, addr, 0);
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->minode_table + (bank * PFS_ONE_PAGE) + j, addr, 0);
|
||||
} else {
|
||||
ret = __osContRamRead(pfs->queue, pfs->channel, pfs->inode_table + (bank * PFS_ONE_PAGE) + j, addr);
|
||||
}
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (flag == PFS_READ) {
|
||||
sum = __osSumcalc((u8*)(inode->inodePage + offset), (PFS_INODE_SIZE_PER_PAGE - offset) * 2);
|
||||
if (sum != inode->inodePage[0].inode_t.page) {
|
||||
for (j = 0; j < PFS_ONE_PAGE; j++) {
|
||||
addr = (u8*)(((u8*)inode) + (j * BLOCKSIZE));
|
||||
ret = __osContRamRead(pfs->queue, pfs->channel, pfs->minode_table + (bank * PFS_ONE_PAGE) + j, addr);
|
||||
}
|
||||
sum = __osSumcalc(inode->inodePage + offset, (PFS_INODE_SIZE_PER_PAGE - offset) * 2);
|
||||
if (sum != inode->inodePage[0].inode_t.page) {
|
||||
return PFS_ERR_INCONSISTENT;
|
||||
}
|
||||
for (j = 0; j < PFS_ONE_PAGE; j++) {
|
||||
addr = (u8*)(((u8*)inode) + (j * BLOCKSIZE));
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->inode_table + (bank * PFS_ONE_PAGE) + j, addr, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
__osPfsInodeCacheBank = bank;
|
||||
bcopy(inode, &__osPfsInodeCache, sizeof(__OSInode));
|
||||
__osPfsInodeCacheChannel = pfs->channel;
|
||||
return 0;
|
||||
}
|
@ -1,15 +1,12 @@
|
||||
#include "libultra_internal.h"
|
||||
#include <global.h>
|
||||
|
||||
s32 osAfterPreNMI(void) {
|
||||
return __osSpSetPc(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* osContStartQuery:
|
||||
* Starts to read the values for SI device status and type which are connected to the controller port and joyport
|
||||
* connector.
|
||||
**/
|
||||
|
||||
s32 osContStartQuery(OSMesgQueue* mq) {
|
||||
s32 ret;
|
||||
ret = 0;
|
@ -1,3 +1,64 @@
|
||||
#include "libultra_internal.h"
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cosf/cosf.s")
|
||||
static const du P[] = {
|
||||
{ 0x3FF00000, 0x00000000 }, { 0xBFC55554, 0xBC83656D }, { 0x3F8110ED, 0x3804C2A0 },
|
||||
{ 0xBF29f6FF, 0xEEA56814 }, { 0x3EC5DBDF, 0x0E314BFE },
|
||||
};
|
||||
|
||||
static const du rpi = { 0x3FD45F30, 0x6DC9C883 };
|
||||
|
||||
static const du pihi = { 0x400921FB, 0x50000000 };
|
||||
|
||||
static const du pilo = { 0x3E6110B4, 0x611A6263 };
|
||||
|
||||
static const fu zero = { 0x00000000 };
|
||||
|
||||
f32 cosf(f32 x) {
|
||||
f32 absx;
|
||||
f64 dx;
|
||||
f64 xSq;
|
||||
f64 polyApprox;
|
||||
f64 dn;
|
||||
s32 n;
|
||||
f64 result;
|
||||
s32 ix, xpt;
|
||||
|
||||
ix = *(s32*)&x;
|
||||
xpt = (ix >> 22);
|
||||
xpt &= 0x1FF;
|
||||
|
||||
if (xpt < 0x136) {
|
||||
|
||||
absx = ULTRA_ABS(x);
|
||||
|
||||
dx = absx;
|
||||
|
||||
dn = dx * rpi.d + 0.5;
|
||||
n = ROUND(dn);
|
||||
dn = n;
|
||||
|
||||
dn -= 0.5;
|
||||
|
||||
dx -= dn * pihi.d;
|
||||
dx -= dn * pilo.d;
|
||||
|
||||
xSq = SQ(dx);
|
||||
|
||||
polyApprox = ((P[4].d * xSq + P[3].d) * xSq + P[2].d) * xSq + P[1].d;
|
||||
|
||||
result = dx + (dx * xSq) * polyApprox;
|
||||
|
||||
if (!(n & 1)) {
|
||||
return (f32)result;
|
||||
}
|
||||
|
||||
return -(f32)result;
|
||||
}
|
||||
|
||||
if (x != x) {
|
||||
return __libm_qnan_f;
|
||||
}
|
||||
|
||||
return zero.f;
|
||||
}
|
||||
|
@ -1,6 +1,62 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/guLookAt/guLookAtF.s")
|
||||
void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp) {
|
||||
f32 length;
|
||||
f32 xLook, yLook, zLook;
|
||||
f32 xRight, yRight, zRight;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/guLookAt/guLookAt.s")
|
||||
guMtxIdentF(mf);
|
||||
|
||||
xLook = xAt - xEye;
|
||||
yLook = yAt - yEye;
|
||||
zLook = zAt - zEye;
|
||||
length = -1.0 / sqrtf(SQ(xLook) + SQ(yLook) + SQ(zLook));
|
||||
xLook *= length;
|
||||
yLook *= length;
|
||||
zLook *= length;
|
||||
|
||||
xRight = yUp * zLook - zUp * yLook;
|
||||
yRight = zUp * xLook - xUp * zLook;
|
||||
zRight = xUp * yLook - yUp * xLook;
|
||||
length = 1.0 / sqrtf(SQ(xRight) + SQ(yRight) + SQ(zRight));
|
||||
xRight *= length;
|
||||
yRight *= length;
|
||||
zRight *= length;
|
||||
|
||||
xUp = yLook * zRight - zLook * yRight;
|
||||
yUp = zLook * xRight - xLook * zRight;
|
||||
zUp = xLook * yRight - yLook * xRight;
|
||||
length = 1.0 / sqrtf(SQ(xUp) + SQ(yUp) + SQ(zUp));
|
||||
xUp *= length;
|
||||
yUp *= length;
|
||||
zUp *= length;
|
||||
|
||||
mf[0][0] = xRight;
|
||||
mf[1][0] = yRight;
|
||||
mf[2][0] = zRight;
|
||||
mf[3][0] = -(xEye * xRight + yEye * yRight + zEye * zRight);
|
||||
|
||||
mf[0][1] = xUp;
|
||||
mf[1][1] = yUp;
|
||||
mf[2][1] = zUp;
|
||||
mf[3][1] = -(xEye * xUp + yEye * yUp + zEye * zUp);
|
||||
|
||||
mf[0][2] = xLook;
|
||||
mf[1][2] = yLook;
|
||||
mf[2][2] = zLook;
|
||||
mf[3][2] = -(xEye * xLook + yEye * yLook + zEye * zLook);
|
||||
|
||||
mf[0][3] = 0;
|
||||
mf[1][3] = 0;
|
||||
mf[2][3] = 0;
|
||||
mf[3][3] = 1;
|
||||
}
|
||||
|
||||
void guLookAt(Mtx* m, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp) {
|
||||
f32 mf[4][4];
|
||||
|
||||
guLookAtF(mf, xEye, yEye, zEye, xAt, yAt, zAt, xUp, yUp, zUp);
|
||||
|
||||
guMtxF2L(mf, m);
|
||||
}
|
||||
|
6
src/libultra_code/osAfterPreNMI.c
Normal file
6
src/libultra_code/osAfterPreNMI.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
s32 osAfterPreNMI(void) {
|
||||
return __osSpSetPc(0);
|
||||
}
|
70
src/libultra_code/osPfsDeleteFile.c
Normal file
70
src/libultra_code/osPfsDeleteFile.c
Normal file
@ -0,0 +1,70 @@
|
||||
#include <ultra64/pfs.h>
|
||||
#include <global.h>
|
||||
|
||||
s32 osPfsDeleteFile(OSPfs* pfs, u16 company_code, u32 game_code, u8* game_name, u8* ext_name) {
|
||||
|
||||
s32 file_no;
|
||||
s32 ret;
|
||||
__OSInode inode;
|
||||
__OSDir dir;
|
||||
__OSInodeUnit last_page;
|
||||
u8 startpage;
|
||||
u8 bank;
|
||||
|
||||
if ((company_code == 0) || (game_code == 0)) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
if ((ret = osPfsFindFile(pfs, company_code, game_code, game_name, ext_name, &file_no)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if ((pfs->activebank != 0) && (ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + file_no, (u8*)&dir)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
startpage = dir.start_page.inode_t.page;
|
||||
for (bank = dir.start_page.inode_t.bank; bank < pfs->banks;) {
|
||||
if ((ret = __osPfsRWInode(pfs, &inode, PFS_READ, bank)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = __osPfsReleasePages(pfs, &inode, startpage, bank, &last_page)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = __osPfsRWInode(pfs, &inode, PFS_WRITE, bank)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if (last_page.ipage == PFS_EOF) {
|
||||
break;
|
||||
}
|
||||
bank = last_page.inode_t.bank;
|
||||
startpage = last_page.inode_t.page;
|
||||
}
|
||||
|
||||
if (bank >= pfs->banks) {
|
||||
return PFS_ERR_INCONSISTENT;
|
||||
}
|
||||
bzero(&dir, sizeof(__OSDir));
|
||||
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + file_no, (u8*)&dir, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 __osPfsReleasePages(OSPfs* pfs, __OSInode* inode, u8 initialPage, u8 bank, __OSInodeUnit* finalPage) {
|
||||
__OSInodeUnit next;
|
||||
__OSInodeUnit prev;
|
||||
s32 ret = 0;
|
||||
|
||||
next.ipage = (u16)((bank << 8) + initialPage);
|
||||
|
||||
do {
|
||||
prev = next;
|
||||
next = inode->inodePage[next.inode_t.page];
|
||||
inode->inodePage[prev.inode_t.page].ipage = PFS_PAGE_NOT_USED;
|
||||
} while (next.ipage >= pfs->inodeStartPage && next.inode_t.bank == bank);
|
||||
|
||||
*finalPage = next;
|
||||
|
||||
return ret;
|
||||
}
|
53
src/libultra_code/osPfsFindFile.c
Normal file
53
src/libultra_code/osPfsFindFile.c
Normal file
@ -0,0 +1,53 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
s32 osPfsFindFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32* fileNo) {
|
||||
s32 j;
|
||||
s32 i;
|
||||
__OSDir dir;
|
||||
s32 ret = 0;
|
||||
s32 err;
|
||||
|
||||
if (!(pfs->status & PFS_INITIALIZED)) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
|
||||
if ((ret = __osCheckId(pfs)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (j = 0; j < pfs->dir_size; j++) {
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + j, &dir)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = __osPfsGetStatus(pfs->queue, pfs->channel)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((dir.company_code == companyCode) && (dir.game_code == gameCode)) {
|
||||
err = 0;
|
||||
if (gameName != 0) {
|
||||
for (i = 0; i < PFS_FILE_NAME_LEN; i++) {
|
||||
if (dir.game_name[i] != gameName[i]) {
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((extName != 0) && (err == 0)) {
|
||||
for (i = 0; i < PFS_FILE_EXT_LEN; i++) {
|
||||
if (dir.ext_name[i] != extName[i]) {
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (err == 0) {
|
||||
*fileNo = j;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
*fileNo = -1;
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
36
src/libultra_code/osPfsFreeBlocks.c
Normal file
36
src/libultra_code/osPfsFreeBlocks.c
Normal file
@ -0,0 +1,36 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <ultra64/pfs.h>
|
||||
|
||||
s32 osPfsFreeBlocks(OSPfs* pfs, s32* leftoverBytes) {
|
||||
s32 j;
|
||||
s32 pages = 0;
|
||||
__OSInode inode;
|
||||
s32 ret = 0;
|
||||
u8 bank;
|
||||
s32 offset;
|
||||
|
||||
if (!(pfs->status & PFS_INITIALIZED)) {
|
||||
return (PFS_ERR_INVALID);
|
||||
}
|
||||
|
||||
if ((ret = __osCheckId(pfs)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (bank = PFS_ID_BANK_256K; bank < pfs->banks; bank++) {
|
||||
if ((ret = __osPfsRWInode(pfs, &inode, PFS_READ, bank)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
offset = ((bank > PFS_ID_BANK_256K) ? 1 : pfs->inodeStartPage);
|
||||
for (j = offset; j < PFS_INODE_SIZE_PER_PAGE; j++) {
|
||||
if (inode.inodePage[j].ipage == PFS_PAGE_NOT_USED) {
|
||||
pages++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*leftoverBytes = pages * PFS_ONE_PAGE * BLOCKSIZE;
|
||||
return 0;
|
||||
}
|
@ -54,7 +54,7 @@ void osSetUpMempakWrite(s32 channel, OSPifRam* buf) {
|
||||
mempakwr.rxsize = 1;
|
||||
mempakwr.poll = 3; // write mempak
|
||||
mempakwr.hi = 0x600 >> 3;
|
||||
mempakwr.lo = (u8)(osMempakAddrCRC(0x600) | (0x600 << 5));
|
||||
mempakwr.lo = (u8)(__osContAddressCrc(0x600) | (0x600 << 5));
|
||||
if (channel != 0) {
|
||||
for (i = 0; i < channel; ++i) {
|
||||
*bufptr++ = 0;
|
||||
@ -74,14 +74,14 @@ s32 osProbeRumblePak(OSMesgQueue* ctrlrqueue, OSPfs* pfs, u32 channel) {
|
||||
pfs->activebank = 0xFF;
|
||||
pfs->status = 0;
|
||||
|
||||
ret = func_80104C80(pfs, 0xFE);
|
||||
ret = __osPfsSelectBank(pfs, 0xFE);
|
||||
if (ret == 2) {
|
||||
ret = func_80104C80(pfs, MOTOR_ID);
|
||||
ret = __osPfsSelectBank(pfs, MOTOR_ID);
|
||||
}
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
ret = osReadMempak(ctrlrqueue, channel, BANK_ADDR, sp24);
|
||||
ret = __osContRamRead(ctrlrqueue, channel, BANK_ADDR, sp24);
|
||||
ret = ret;
|
||||
if (ret == 2) {
|
||||
ret = 4; // "Controller pack communication error"
|
||||
@ -92,14 +92,14 @@ s32 osProbeRumblePak(OSMesgQueue* ctrlrqueue, OSPfs* pfs, u32 channel) {
|
||||
if (sp24[BLOCKSIZE - 1] == 0xFE) {
|
||||
return 0xB;
|
||||
}
|
||||
ret = func_80104C80(pfs, MOTOR_ID);
|
||||
ret = __osPfsSelectBank(pfs, MOTOR_ID);
|
||||
if (ret == 2) {
|
||||
ret = 4; // "Controller pack communication error"
|
||||
}
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
ret = osReadMempak(ctrlrqueue, channel, BANK_ADDR, sp24);
|
||||
ret = __osContRamRead(ctrlrqueue, channel, BANK_ADDR, sp24);
|
||||
if (ret == 2) {
|
||||
ret = 4; // "Controller pack communication error"
|
||||
}
|
||||
|
137
src/libultra_code/pfsallocatefile.c
Normal file
137
src/libultra_code/pfsallocatefile.c
Normal file
@ -0,0 +1,137 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <ultra64/pfs.h>
|
||||
|
||||
s32 osPfsAllocateFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 fileSize, s32* fileNo) {
|
||||
s32 startPage, decleared, prevPage;
|
||||
s32 oldPrevPage = 0;
|
||||
s32 ret = 0;
|
||||
s32 fileSizeInPages;
|
||||
__OSInode inode, backup_inode;
|
||||
__OSDir dir;
|
||||
u8 bank;
|
||||
u8 prevBank = 0;
|
||||
s32 firsttime = 0;
|
||||
s32 bytes;
|
||||
__OSInodeUnit fpage;
|
||||
|
||||
if ((companyCode == 0) || (gameCode == 0)) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
|
||||
fileSizeInPages = (fileSize + PFS_PAGE_SIZE - 1) / PFS_PAGE_SIZE;
|
||||
|
||||
if (((ret = osPfsFindFile(pfs, companyCode, gameCode, gameName, extName, fileNo)) != 0) &&
|
||||
(ret != PFS_ERR_INVALID)) {
|
||||
return ret;
|
||||
}
|
||||
if (*fileNo != -1) {
|
||||
return PFS_ERR_EXIST;
|
||||
}
|
||||
|
||||
ret = osPfsFreeBlocks(pfs, &bytes);
|
||||
if (fileSize > bytes) {
|
||||
return PFS_DATA_FULL;
|
||||
}
|
||||
|
||||
if (fileSizeInPages == 0) {
|
||||
return (PFS_ERR_INVALID);
|
||||
}
|
||||
|
||||
if (((ret = osPfsFindFile(pfs, 0, 0, 0, 0, fileNo)) != 0) && (ret != PFS_ERR_INVALID)) {
|
||||
return ret;
|
||||
}
|
||||
if (*fileNo == -1) {
|
||||
return PFS_DIR_FULL;
|
||||
}
|
||||
|
||||
for (bank = PFS_ID_BANK_256K; bank < pfs->banks; bank++) {
|
||||
if ((ret = __osPfsRWInode(pfs, &inode, PFS_READ, bank)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
ret = __osPfsDeclearPage(pfs, &inode, fileSizeInPages, &startPage, bank, &decleared, &prevPage);
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
if (startPage != -1) { /* There is free space */
|
||||
if (firsttime == 0) {
|
||||
fpage.inode_t.page = (u8)startPage;
|
||||
fpage.inode_t.bank = bank;
|
||||
} else { /* Writing previous bank inode */
|
||||
backup_inode.inodePage[oldPrevPage].inode_t.bank = bank;
|
||||
backup_inode.inodePage[oldPrevPage].inode_t.page = (u8)startPage;
|
||||
if ((ret = __osPfsRWInode(pfs, &backup_inode, PFS_WRITE, prevBank)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if (fileSizeInPages > decleared) {
|
||||
bcopy(&inode, &backup_inode, sizeof(__OSInode));
|
||||
oldPrevPage = prevPage;
|
||||
prevBank = bank;
|
||||
fileSizeInPages -= decleared;
|
||||
firsttime++;
|
||||
} else {
|
||||
fileSizeInPages = 0;
|
||||
if ((ret = __osPfsRWInode(pfs, &inode, PFS_WRITE, bank)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((fileSizeInPages > 0) || (startPage == -1)) {
|
||||
return PFS_ERR_INCONSISTENT;
|
||||
}
|
||||
|
||||
dir.start_page = fpage;
|
||||
dir.company_code = companyCode;
|
||||
dir.game_code = gameCode;
|
||||
dir.data_sum = 0;
|
||||
|
||||
bcopy(gameName, dir.game_name, PFS_FILE_NAME_LEN);
|
||||
bcopy(extName, dir.ext_name, PFS_FILE_EXT_LEN);
|
||||
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + *fileNo, &dir, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared,
|
||||
s32* finalPage) {
|
||||
s32 j;
|
||||
s32 spage, prevPage;
|
||||
s32 ret = 0;
|
||||
s32 offset;
|
||||
|
||||
offset = ((bank > PFS_ID_BANK_256K) ? 1 : pfs->inodeStartPage);
|
||||
for (j = offset; j < PFS_INODE_SIZE_PER_PAGE; j++) {
|
||||
if (inode->inodePage[j].ipage == PFS_PAGE_NOT_USED) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (j == PFS_INODE_SIZE_PER_PAGE) {
|
||||
*startPage = -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
spage = j;
|
||||
*decleared = 1;
|
||||
prevPage = j;
|
||||
j++;
|
||||
while ((fileSizeInPages > *decleared) && (j < PFS_INODE_SIZE_PER_PAGE)) {
|
||||
if (inode->inodePage[j].ipage == PFS_PAGE_NOT_USED) {
|
||||
inode->inodePage[prevPage].inode_t.bank = (u8)bank;
|
||||
inode->inodePage[prevPage].inode_t.page = (u8)j;
|
||||
prevPage = j;
|
||||
(*decleared)++;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
*startPage = spage;
|
||||
if ((j == (PFS_INODE_SIZE_PER_PAGE)) && (fileSizeInPages > *decleared)) {
|
||||
*finalPage = prevPage;
|
||||
} else {
|
||||
inode->inodePage[prevPage].ipage = PFS_EOF;
|
||||
*finalPage = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
203
src/libultra_code/pfschecker.c
Normal file
203
src/libultra_code/pfschecker.c
Normal file
@ -0,0 +1,203 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <ultra64/pfs.h>
|
||||
|
||||
#define CHECK_IPAGE(p) \
|
||||
(((p).ipage >= pfs->inodeStartPage) && ((p).inode_t.bank < pfs->banks) && ((p).inode_t.page >= 0x01) && \
|
||||
((p).inode_t.page < 0x80))
|
||||
|
||||
s32 osPfsChecker(OSPfs* pfs) {
|
||||
s32 j;
|
||||
s32 ret;
|
||||
__OSInodeUnit next;
|
||||
__OSInode checkedInode;
|
||||
__OSInode tempInode;
|
||||
__OSDir tempDir;
|
||||
__OSInodeUnit nextNodeInFile[16];
|
||||
|
||||
__OSInodeCache cache;
|
||||
|
||||
s32 fixed = 0;
|
||||
u8 bank, prevBank = 254;
|
||||
s32 cc, cl;
|
||||
s32 offset;
|
||||
|
||||
ret = __osCheckId(pfs);
|
||||
|
||||
if (ret == PFS_ERR_NEW_PACK) {
|
||||
ret = __osGetId(pfs);
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = func_80105788(pfs, &cache)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (j = 0; j < pfs->dir_size; j++) {
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + j, &tempDir)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((tempDir.company_code != 0) || (tempDir.game_code != 0)) {
|
||||
if ((tempDir.company_code == 0) || (tempDir.game_code == 0)) {
|
||||
cc = -1;
|
||||
} else {
|
||||
next = tempDir.start_page;
|
||||
|
||||
cl = cc = 0;
|
||||
bank = 255;
|
||||
|
||||
while (CHECK_IPAGE(next)) {
|
||||
if (bank != next.inode_t.bank) {
|
||||
bank = next.inode_t.bank;
|
||||
if (prevBank != bank) {
|
||||
ret = __osPfsRWInode(pfs, &tempInode, PFS_READ, bank);
|
||||
prevBank = bank;
|
||||
}
|
||||
|
||||
if ((ret != 0) && (ret != PFS_ERR_INCONSISTENT)) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((cc = func_80105A60(pfs, next, &cache) - cl) != 0) {
|
||||
break;
|
||||
}
|
||||
cl = 1;
|
||||
|
||||
next = tempInode.inodePage[next.inode_t.page];
|
||||
}
|
||||
}
|
||||
|
||||
if ((cc != 0) || (next.ipage != PFS_EOF)) {
|
||||
bzero(&tempDir, sizeof(__OSDir));
|
||||
if (pfs->activebank != 0) {
|
||||
if ((ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if ((ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + j, &tempDir, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
fixed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (j = 0; j < pfs->dir_size; j++) {
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + j, &tempDir)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((tempDir.company_code != 0) && (tempDir.game_code != 0) &&
|
||||
(tempDir.start_page.ipage >= (u16)pfs->inodeStartPage)) { // cast required
|
||||
nextNodeInFile[j].ipage = tempDir.start_page.ipage;
|
||||
} else {
|
||||
nextNodeInFile[j].ipage = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (bank = 0; bank < pfs->banks; bank++) {
|
||||
ret = __osPfsRWInode(pfs, &tempInode, PFS_READ, bank);
|
||||
if ((ret != 0) && (ret != PFS_ERR_INCONSISTENT)) {
|
||||
return (ret);
|
||||
}
|
||||
offset = ((bank > PFS_ID_BANK_256K) ? 1 : pfs->inodeStartPage);
|
||||
for (j = 0; j < offset; j++) {
|
||||
checkedInode.inodePage[j].ipage = tempInode.inodePage[j].ipage;
|
||||
}
|
||||
for (; j < PFS_INODE_SIZE_PER_PAGE; j++) {
|
||||
checkedInode.inodePage[j].ipage = PFS_PAGE_NOT_USED;
|
||||
}
|
||||
|
||||
for (j = 0; j < pfs->dir_size; j++) {
|
||||
while (nextNodeInFile[j].inode_t.bank == bank &&
|
||||
nextNodeInFile[j].ipage >= (u16)pfs->inodeStartPage) { // cast required
|
||||
u8 val;
|
||||
val = nextNodeInFile[j].inode_t.page;
|
||||
nextNodeInFile[j] = checkedInode.inodePage[val] = tempInode.inodePage[val];
|
||||
}
|
||||
}
|
||||
if ((ret = __osPfsRWInode(pfs, &checkedInode, PFS_WRITE, bank)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (fixed != 0) {
|
||||
pfs->status |= PFS_CORRUPTED;
|
||||
} else {
|
||||
pfs->status &= ~PFS_CORRUPTED;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Original name: corrupted_init (probably needs better name)
|
||||
s32 func_80105788(OSPfs* pfs, __OSInodeCache* cache) {
|
||||
s32 i;
|
||||
s32 n;
|
||||
s32 offset;
|
||||
u8 bank;
|
||||
__OSInodeUnit tpage;
|
||||
__OSInode tempInode;
|
||||
s32 ret;
|
||||
|
||||
for (i = 0; i < PFS_INODE_DIST_MAP; i++) {
|
||||
cache->map[i] = 0;
|
||||
}
|
||||
cache->bank = 255;
|
||||
|
||||
for (bank = PFS_ID_BANK_256K; bank < pfs->banks; bank++) {
|
||||
offset = ((bank > PFS_ID_BANK_256K) ? 1 : pfs->inodeStartPage);
|
||||
ret = __osPfsRWInode(pfs, &tempInode, PFS_READ, bank);
|
||||
if ((ret != 0) && (ret != PFS_ERR_INCONSISTENT)) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i = offset; i < PFS_INODE_SIZE_PER_PAGE; i++) {
|
||||
tpage = tempInode.inodePage[i];
|
||||
if ((tpage.ipage >= pfs->inodeStartPage) && (tpage.inode_t.bank != bank)) {
|
||||
n = ((tpage.inode_t.page & 0x7F) / PFS_SECTOR_SIZE) +
|
||||
PFS_SECTOR_PER_BANK * (tpage.inode_t.bank % PFS_BANK_LAPPED_BY);
|
||||
cache->map[n] |= (1 << (bank % PFS_BANK_LAPPED_BY));
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// original name: corrupted (probably needs a better name)
|
||||
s32 func_80105A60(OSPfs* pfs, __OSInodeUnit fpage, __OSInodeCache* cache) {
|
||||
s32 j;
|
||||
s32 n;
|
||||
s32 hit = 0;
|
||||
u8 bank;
|
||||
s32 offset;
|
||||
s32 ret = 0;
|
||||
|
||||
n = (fpage.inode_t.page / PFS_SECTOR_SIZE) + PFS_SECTOR_PER_BANK * (fpage.inode_t.bank % PFS_BANK_LAPPED_BY);
|
||||
|
||||
for (bank = PFS_ID_BANK_256K; bank < pfs->banks; bank++) {
|
||||
offset = ((bank > PFS_ID_BANK_256K) ? 1 : pfs->inodeStartPage);
|
||||
if ((bank == fpage.inode_t.bank) || (cache->map[n] & (1 << (bank % PFS_BANK_LAPPED_BY))) != 0) {
|
||||
if (bank != cache->bank) {
|
||||
ret = __osPfsRWInode(pfs, &(cache->inode), PFS_READ, bank);
|
||||
if ((ret) && (ret != PFS_ERR_INCONSISTENT)) {
|
||||
return ret;
|
||||
}
|
||||
cache->bank = bank;
|
||||
}
|
||||
for (j = offset; ((hit < 2) && (j < PFS_INODE_SIZE_PER_PAGE)); j++) {
|
||||
if (cache->inode.inodePage[j].ipage == fpage.ipage) {
|
||||
hit++;
|
||||
}
|
||||
}
|
||||
if (hit >= 2) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return hit;
|
||||
}
|
113
src/libultra_code/pfsinitpak.c
Normal file
113
src/libultra_code/pfsinitpak.c
Normal file
@ -0,0 +1,113 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc with temp registers
|
||||
s32 osPfsInitPak(OSMesgQueue* queue, OSPfs* pfs, s32 channel) {
|
||||
s32 ret = 0;
|
||||
u16 sum;
|
||||
u16 isum;
|
||||
u8 temp[BLOCKSIZE];
|
||||
__OSPackId* id;
|
||||
__OSPackId newid;
|
||||
|
||||
__osSiGetAccess();
|
||||
|
||||
ret = __osPfsGetStatus(queue, channel);
|
||||
|
||||
__osSiRelAccess();
|
||||
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
pfs->queue = queue;
|
||||
pfs->channel = channel;
|
||||
pfs->status = 0;
|
||||
|
||||
if ((ret = __osPfsCheckRamArea(pfs)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, PFS_ID_0AREA, temp)) != 0) {
|
||||
return (ret);
|
||||
}
|
||||
__osIdCheckSum((u16*)temp, &sum, &isum);
|
||||
id = (__OSPackId*)temp;
|
||||
if ((id->checksum != sum) || (id->invertedChecksum != isum)) {
|
||||
if ((ret = __osCheckPackId(pfs, id)) != 0) {
|
||||
pfs->status |= PFS_ID_BROKEN;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if ((id->deviceid & 0x01) == 0) {
|
||||
ret = __osRepairPackId(pfs, id, &newid);
|
||||
if (ret) {
|
||||
if (ret == PFS_ERR_ID_FATAL) {
|
||||
pfs->status |= PFS_ID_BROKEN;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
id = &newid;
|
||||
if ((id->deviceid & 0x01) == 0) {
|
||||
return PFS_ERR_DEVICE;
|
||||
}
|
||||
}
|
||||
|
||||
bcopy(id, pfs->id, BLOCKSIZE);
|
||||
|
||||
pfs->version = (s32)id->version;
|
||||
pfs->banks = id->banks;
|
||||
pfs->inodeStartPage = 1 + DEF_DIR_PAGES + (2 * pfs->banks);
|
||||
pfs->dir_size = DEF_DIR_PAGES * PFS_ONE_PAGE;
|
||||
pfs->inode_table = 1 * PFS_ONE_PAGE;
|
||||
pfs->minode_table = (1 + pfs->banks) * PFS_ONE_PAGE;
|
||||
pfs->dir_table = pfs->minode_table + (pfs->banks * PFS_ONE_PAGE);
|
||||
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, PFS_LABEL_AREA, (u8*)pfs->label)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = osPfsChecker(pfs);
|
||||
pfs->status |= PFS_INITIALIZED;
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/pfsinitpak/osPfsInitPak.s")
|
||||
#endif
|
||||
|
||||
s32 __osPfsCheckRamArea(OSPfs* pfs) {
|
||||
s32 i = 0;
|
||||
s32 ret = 0;
|
||||
u8 temp1[BLOCKSIZE];
|
||||
u8 temp2[BLOCKSIZE];
|
||||
u8 saveReg[BLOCKSIZE];
|
||||
|
||||
if ((ret = __osPfsSelectBank(pfs, PFS_ID_BANK_256K)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, 0, saveReg)) != 0) {
|
||||
return (ret);
|
||||
}
|
||||
for (i = 0; i < BLOCKSIZE; i++) {
|
||||
temp1[i] = i;
|
||||
}
|
||||
if ((ret = __osContRamWrite(pfs->queue, pfs->channel, 0, temp1, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, 0, temp2)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
if (bcmp(temp1, temp2, BLOCKSIZE) != 0) {
|
||||
return PFS_ERR_DEVICE;
|
||||
}
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, 0, saveReg, 0);
|
||||
|
||||
return ret;
|
||||
}
|
140
src/libultra_code/pfsreadwritefile.c
Normal file
140
src/libultra_code/pfsreadwritefile.c
Normal file
@ -0,0 +1,140 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
#define CHECK_IPAGE(p, pfs) \
|
||||
(((p).ipage >= (pfs).inodeStartPage) && ((p).inode_t.bank < (pfs).banks) && ((p).inode_t.page >= 0x01) && \
|
||||
((p).inode_t.page < 0x80))
|
||||
|
||||
__OSInode __osPfsInodeCache;
|
||||
|
||||
s32 __osPfsGetNextPage(OSPfs* pfs, u8* bank, __OSInode* inode, __OSInodeUnit* page) {
|
||||
s32 ret;
|
||||
|
||||
if (page->inode_t.bank != *bank) {
|
||||
*bank = page->inode_t.bank;
|
||||
if ((ret = __osPfsRWInode(pfs, inode, PFS_READ, *bank)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
*page = inode->inodePage[page->inode_t.page];
|
||||
|
||||
if (!CHECK_IPAGE(*page, *pfs)) {
|
||||
if (page->ipage == PFS_EOF) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
return PFS_ERR_INCONSISTENT;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 osPfsReadWriteFile(OSPfs* pfs, s32 fileNo, u8 flag, s32 offset, s32 size, u8* data) {
|
||||
s32 ret;
|
||||
__OSDir dir;
|
||||
__OSInode inode;
|
||||
__OSInodeUnit curPage;
|
||||
s32 curBlock;
|
||||
s32 blockSize;
|
||||
u8* buffer;
|
||||
u8 bank;
|
||||
u16 blockno;
|
||||
|
||||
if ((fileNo >= pfs->dir_size) || (fileNo < 0)) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
if ((size <= 0) || ((size % BLOCKSIZE) != 0)) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
if ((offset < 0) || ((offset % BLOCKSIZE) != 0)) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
if (!(pfs->status & PFS_INITIALIZED)) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
|
||||
if (__osCheckId(pfs) == PFS_ERR_NEW_PACK) {
|
||||
return PFS_ERR_NEW_PACK;
|
||||
}
|
||||
|
||||
if (pfs->activebank != 0) {
|
||||
if ((ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + fileNo, &dir)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((dir.company_code == 0) || (dir.game_code == 0)) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
|
||||
if (!CHECK_IPAGE(dir.start_page, *pfs)) {
|
||||
if (dir.start_page.ipage == PFS_EOF) {
|
||||
return PFS_ERR_INVALID;
|
||||
}
|
||||
return PFS_ERR_INCONSISTENT;
|
||||
}
|
||||
|
||||
if ((flag == PFS_READ) && ((dir.status & PFS_WRITTEN) == 0)) {
|
||||
return PFS_ERR_BAD_DATA;
|
||||
}
|
||||
|
||||
bank = 255;
|
||||
|
||||
curBlock = offset / BLOCKSIZE;
|
||||
curPage = dir.start_page;
|
||||
|
||||
while (curBlock >= 8) {
|
||||
if ((ret = __osPfsGetNextPage(pfs, &bank, &inode, &curPage)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
curBlock -= 8;
|
||||
}
|
||||
|
||||
blockSize = size / BLOCKSIZE;
|
||||
buffer = data;
|
||||
|
||||
while (blockSize > 0) {
|
||||
if (curBlock == 8) {
|
||||
if ((ret = __osPfsGetNextPage(pfs, &bank, &inode, &curPage)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
curBlock = 0;
|
||||
}
|
||||
|
||||
if (pfs->activebank != curPage.inode_t.bank) {
|
||||
if ((ret = __osPfsSelectBank(pfs, curPage.inode_t.bank)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
blockno = curPage.inode_t.page * PFS_ONE_PAGE + curBlock;
|
||||
if (flag == PFS_READ) {
|
||||
ret = __osContRamRead(pfs->queue, pfs->channel, blockno, buffer);
|
||||
} else {
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, blockno, buffer, 0);
|
||||
}
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
buffer += BLOCKSIZE;
|
||||
curBlock++;
|
||||
blockSize--;
|
||||
}
|
||||
|
||||
if (flag == PFS_WRITE && !(dir.status & PFS_WRITTEN)) {
|
||||
dir.status |= PFS_WRITTEN;
|
||||
if (pfs->activebank != 0) {
|
||||
if ((ret = __osPfsSelectBank(pfs, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if ((ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + fileNo, &dir, 0)) != 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = __osPfsGetStatus(pfs->queue, pfs->channel);
|
||||
return ret;
|
||||
}
|
@ -1,3 +1,66 @@
|
||||
#include "libultra_internal.h"
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sinf/sinf.s")
|
||||
static const du P[] = {
|
||||
{ 0x3FF00000, 0x00000000 }, { 0xBFC55554, 0xBC83656D }, { 0x3F8110ED, 0x3804C2A0 },
|
||||
{ 0xBF29F6FF, 0xEEA56814 }, { 0x3EC5DBDF, 0x0E314BFE },
|
||||
};
|
||||
|
||||
static const du rpi = { 0x3FD45F30, 0x6DC9C883 };
|
||||
|
||||
static const du pihi = { 0x400921FB, 0x50000000 };
|
||||
|
||||
static const du pilo = { 0x3E6110B4, 0x611A6263 };
|
||||
|
||||
static const fu zero = { 0x00000000 };
|
||||
|
||||
f32 sinf(f32 x) {
|
||||
f64 dx;
|
||||
f64 xSq;
|
||||
f64 polyApprox;
|
||||
f64 dn;
|
||||
s32 n;
|
||||
f64 result;
|
||||
s32 ix, xpt;
|
||||
|
||||
ix = *(s32*)&x;
|
||||
xpt = (ix >> 22);
|
||||
xpt &= 0x1FF;
|
||||
|
||||
if (xpt < 0xFF) {
|
||||
dx = x;
|
||||
|
||||
if (xpt >= 0xE6) {
|
||||
xSq = SQ(dx);
|
||||
polyApprox = ((P[4].d * xSq + P[3].d) * xSq + P[2].d) * xSq + P[1].d;
|
||||
result = dx + (dx * xSq) * polyApprox;
|
||||
return (f32)result;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
if (xpt < 0x136) {
|
||||
dx = x;
|
||||
dn = dx * rpi.d;
|
||||
n = ROUND(dn);
|
||||
dn = n;
|
||||
|
||||
dx -= dn * pihi.d;
|
||||
dx -= dn * pilo.d;
|
||||
xSq = SQ(dx);
|
||||
|
||||
polyApprox = ((P[4].d * xSq + P[3].d) * xSq + P[2].d) * xSq + P[1].d;
|
||||
result = dx + (dx * xSq) * polyApprox;
|
||||
|
||||
if (!(n & 1)) {
|
||||
return (f32)result;
|
||||
}
|
||||
|
||||
return -(f32)result;
|
||||
}
|
||||
|
||||
if (x != x) {
|
||||
return __libm_qnan_f;
|
||||
}
|
||||
return zero.f;
|
||||
}
|
||||
|
@ -1,3 +1,21 @@
|
||||
#include "libultra_internal.h"
|
||||
#include <ultra64.h>
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sins/sins.s")
|
||||
#include "sintable.c"
|
||||
|
||||
s16 sins(u16 x) {
|
||||
s16 value;
|
||||
|
||||
x >>= 4;
|
||||
|
||||
if (x & 0x400) {
|
||||
value = sintable[0x3FF - (x & 0x3FF)];
|
||||
} else {
|
||||
value = sintable[x & 0x3FF];
|
||||
}
|
||||
|
||||
if (x & 0x800) {
|
||||
return -value;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
78
src/libultra_code/sintable.c
Normal file
78
src/libultra_code/sintable.c
Normal file
@ -0,0 +1,78 @@
|
||||
#include <ultra64/types.h>
|
||||
|
||||
static s16 sintable[0x400] = {
|
||||
0x0000, 0x0032, 0x0064, 0x0096, 0x00C9, 0x00FB, 0x012D, 0x0160, 0x0192, 0x01C4, 0x01F7, 0x0229, 0x025B, 0x028E,
|
||||
0x02C0, 0x02F2, 0x0324, 0x0357, 0x0389, 0x03BB, 0x03EE, 0x0420, 0x0452, 0x0484, 0x04B7, 0x04E9, 0x051B, 0x054E,
|
||||
0x0580, 0x05B2, 0x05E4, 0x0617, 0x0649, 0x067B, 0x06AD, 0x06E0, 0x0712, 0x0744, 0x0776, 0x07A9, 0x07DB, 0x080D,
|
||||
0x083F, 0x0871, 0x08A4, 0x08D6, 0x0908, 0x093A, 0x096C, 0x099F, 0x09D1, 0x0A03, 0x0A35, 0x0A67, 0x0A99, 0x0ACB,
|
||||
0x0AFE, 0x0B30, 0x0B62, 0x0B94, 0x0BC6, 0x0BF8, 0x0C2A, 0x0C5C, 0x0C8E, 0x0CC0, 0x0CF2, 0x0D25, 0x0D57, 0x0D89,
|
||||
0x0DBB, 0x0DED, 0x0E1F, 0x0E51, 0x0E83, 0x0EB5, 0x0EE7, 0x0F19, 0x0F4B, 0x0F7C, 0x0FAE, 0x0FE0, 0x1012, 0x1044,
|
||||
0x1076, 0x10A8, 0x10DA, 0x110C, 0x113E, 0x116F, 0x11A1, 0x11D3, 0x1205, 0x1237, 0x1269, 0x129A, 0x12CC, 0x12FE,
|
||||
0x1330, 0x1361, 0x1393, 0x13C5, 0x13F6, 0x1428, 0x145A, 0x148C, 0x14BD, 0x14EF, 0x1520, 0x1552, 0x1584, 0x15B5,
|
||||
0x15E7, 0x1618, 0x164A, 0x167B, 0x16AD, 0x16DF, 0x1710, 0x1741, 0x1773, 0x17A4, 0x17D6, 0x1807, 0x1839, 0x186A,
|
||||
0x189B, 0x18CD, 0x18FE, 0x1930, 0x1961, 0x1992, 0x19C3, 0x19F5, 0x1A26, 0x1A57, 0x1A88, 0x1ABA, 0x1AEB, 0x1B1C,
|
||||
0x1B4D, 0x1B7E, 0x1BAF, 0x1BE1, 0x1C12, 0x1C43, 0x1C74, 0x1CA5, 0x1CD6, 0x1D07, 0x1D38, 0x1D69, 0x1D9A, 0x1DCB,
|
||||
0x1DFC, 0x1E2D, 0x1E5D, 0x1E8E, 0x1EBF, 0x1EF0, 0x1F21, 0x1F52, 0x1F82, 0x1FB3, 0x1FE4, 0x2015, 0x2045, 0x2076,
|
||||
0x20A7, 0x20D7, 0x2108, 0x2139, 0x2169, 0x219A, 0x21CA, 0x21FB, 0x222B, 0x225C, 0x228C, 0x22BD, 0x22ED, 0x231D,
|
||||
0x234E, 0x237E, 0x23AE, 0x23DF, 0x240F, 0x243F, 0x2470, 0x24A0, 0x24D0, 0x2500, 0x2530, 0x2560, 0x2591, 0x25C1,
|
||||
0x25F1, 0x2621, 0x2651, 0x2681, 0x26B1, 0x26E1, 0x2711, 0x2740, 0x2770, 0x27A0, 0x27D0, 0x2800, 0x2830, 0x285F,
|
||||
0x288F, 0x28BF, 0x28EE, 0x291E, 0x294E, 0x297D, 0x29AD, 0x29DD, 0x2A0C, 0x2A3C, 0x2A6B, 0x2A9B, 0x2ACA, 0x2AF9,
|
||||
0x2B29, 0x2B58, 0x2B87, 0x2BB7, 0x2BE6, 0x2C15, 0x2C44, 0x2C74, 0x2CA3, 0x2CD2, 0x2D01, 0x2D30, 0x2D5F, 0x2D8E,
|
||||
0x2DBD, 0x2DEC, 0x2E1B, 0x2E4A, 0x2E79, 0x2EA8, 0x2ED7, 0x2F06, 0x2F34, 0x2F63, 0x2F92, 0x2FC0, 0x2FEF, 0x301E,
|
||||
0x304C, 0x307B, 0x30A9, 0x30D8, 0x3107, 0x3135, 0x3163, 0x3192, 0x31C0, 0x31EF, 0x321D, 0x324B, 0x3279, 0x32A8,
|
||||
0x32D6, 0x3304, 0x3332, 0x3360, 0x338E, 0x33BC, 0x33EA, 0x3418, 0x3446, 0x3474, 0x34A2, 0x34D0, 0x34FE, 0x352B,
|
||||
0x3559, 0x3587, 0x35B5, 0x35E2, 0x3610, 0x363D, 0x366B, 0x3698, 0x36C6, 0x36F3, 0x3721, 0x374E, 0x377C, 0x37A9,
|
||||
0x37D6, 0x3803, 0x3831, 0x385E, 0x388B, 0x38B8, 0x38E5, 0x3912, 0x393F, 0x396C, 0x3999, 0x39C6, 0x39F3, 0x3A20,
|
||||
0x3A4D, 0x3A79, 0x3AA6, 0x3AD3, 0x3B00, 0x3B2C, 0x3B59, 0x3B85, 0x3BB2, 0x3BDE, 0x3C0B, 0x3C37, 0x3C64, 0x3C90,
|
||||
0x3CBC, 0x3CE9, 0x3D15, 0x3D41, 0x3D6D, 0x3D99, 0x3DC5, 0x3DF1, 0x3E1D, 0x3E49, 0x3E75, 0x3EA1, 0x3ECD, 0x3EF9,
|
||||
0x3F25, 0x3F50, 0x3F7C, 0x3FA8, 0x3FD3, 0x3FFF, 0x402B, 0x4056, 0x4082, 0x40AD, 0x40D8, 0x4104, 0x412F, 0x415A,
|
||||
0x4186, 0x41B1, 0x41DC, 0x4207, 0x4232, 0x425D, 0x4288, 0x42B3, 0x42DE, 0x4309, 0x4334, 0x435F, 0x4389, 0x43B4,
|
||||
0x43DF, 0x4409, 0x4434, 0x445F, 0x4489, 0x44B4, 0x44DE, 0x4508, 0x4533, 0x455D, 0x4587, 0x45B1, 0x45DC, 0x4606,
|
||||
0x4630, 0x465A, 0x4684, 0x46AE, 0x46D8, 0x4702, 0x472C, 0x4755, 0x477F, 0x47A9, 0x47D2, 0x47FC, 0x4826, 0x484F,
|
||||
0x4879, 0x48A2, 0x48CC, 0x48F5, 0x491E, 0x4948, 0x4971, 0x499A, 0x49C3, 0x49EC, 0x4A15, 0x4A3E, 0x4A67, 0x4A90,
|
||||
0x4AB9, 0x4AE2, 0x4B0B, 0x4B33, 0x4B5C, 0x4B85, 0x4BAD, 0x4BD6, 0x4BFE, 0x4C27, 0x4C4F, 0x4C78, 0x4CA0, 0x4CC8,
|
||||
0x4CF0, 0x4D19, 0x4D41, 0x4D69, 0x4D91, 0x4DB9, 0x4DE1, 0x4E09, 0x4E31, 0x4E58, 0x4E80, 0x4EA8, 0x4ED0, 0x4EF7,
|
||||
0x4F1F, 0x4F46, 0x4F6E, 0x4F95, 0x4FBD, 0x4FE4, 0x500B, 0x5032, 0x505A, 0x5081, 0x50A8, 0x50CF, 0x50F6, 0x511D,
|
||||
0x5144, 0x516B, 0x5191, 0x51B8, 0x51DF, 0x5205, 0x522C, 0x5253, 0x5279, 0x52A0, 0x52C6, 0x52EC, 0x5313, 0x5339,
|
||||
0x535F, 0x5385, 0x53AB, 0x53D1, 0x53F7, 0x541D, 0x5443, 0x5469, 0x548F, 0x54B5, 0x54DA, 0x5500, 0x5525, 0x554B,
|
||||
0x5571, 0x5596, 0x55BB, 0x55E1, 0x5606, 0x562B, 0x5650, 0x5675, 0x569B, 0x56C0, 0x56E5, 0x5709, 0x572E, 0x5753,
|
||||
0x5778, 0x579D, 0x57C1, 0x57E6, 0x580A, 0x582F, 0x5853, 0x5878, 0x589C, 0x58C0, 0x58E5, 0x5909, 0x592D, 0x5951,
|
||||
0x5975, 0x5999, 0x59BD, 0x59E1, 0x5A04, 0x5A28, 0x5A4C, 0x5A6F, 0x5A93, 0x5AB7, 0x5ADA, 0x5AFD, 0x5B21, 0x5B44,
|
||||
0x5B67, 0x5B8B, 0x5BAE, 0x5BD1, 0x5BF4, 0x5C17, 0x5C3A, 0x5C5D, 0x5C7F, 0x5CA2, 0x5CC5, 0x5CE7, 0x5D0A, 0x5D2D,
|
||||
0x5D4F, 0x5D71, 0x5D94, 0x5DB6, 0x5DD8, 0x5DFA, 0x5E1D, 0x5E3F, 0x5E61, 0x5E83, 0x5EA5, 0x5EC6, 0x5EE8, 0x5F0A,
|
||||
0x5F2C, 0x5F4D, 0x5F6F, 0x5F90, 0x5FB2, 0x5FD3, 0x5FF4, 0x6016, 0x6037, 0x6058, 0x6079, 0x609A, 0x60BB, 0x60DC,
|
||||
0x60FD, 0x611E, 0x613E, 0x615F, 0x6180, 0x61A0, 0x61C1, 0x61E1, 0x6202, 0x6222, 0x6242, 0x6263, 0x6283, 0x62A3,
|
||||
0x62C3, 0x62E3, 0x6303, 0x6323, 0x6342, 0x6362, 0x6382, 0x63A1, 0x63C1, 0x63E0, 0x6400, 0x641F, 0x643F, 0x645E,
|
||||
0x647D, 0x649C, 0x64BB, 0x64DA, 0x64F9, 0x6518, 0x6537, 0x6556, 0x6574, 0x6593, 0x65B2, 0x65D0, 0x65EF, 0x660D,
|
||||
0x662B, 0x664A, 0x6668, 0x6686, 0x66A4, 0x66C2, 0x66E0, 0x66FE, 0x671C, 0x673A, 0x6757, 0x6775, 0x6792, 0x67B0,
|
||||
0x67CD, 0x67EB, 0x6808, 0x6825, 0x6843, 0x6860, 0x687D, 0x689A, 0x68B7, 0x68D4, 0x68F1, 0x690D, 0x692A, 0x6947,
|
||||
0x6963, 0x6980, 0x699C, 0x69B9, 0x69D5, 0x69F1, 0x6A0E, 0x6A2A, 0x6A46, 0x6A62, 0x6A7E, 0x6A9A, 0x6AB5, 0x6AD1,
|
||||
0x6AED, 0x6B08, 0x6B24, 0x6B40, 0x6B5B, 0x6B76, 0x6B92, 0x6BAD, 0x6BC8, 0x6BE3, 0x6BFE, 0x6C19, 0x6C34, 0x6C4F,
|
||||
0x6C6A, 0x6C84, 0x6C9F, 0x6CBA, 0x6CD4, 0x6CEF, 0x6D09, 0x6D23, 0x6D3E, 0x6D58, 0x6D72, 0x6D8C, 0x6DA6, 0x6DC0,
|
||||
0x6DDA, 0x6DF3, 0x6E0D, 0x6E27, 0x6E40, 0x6E5A, 0x6E73, 0x6E8D, 0x6EA6, 0x6EBF, 0x6ED9, 0x6EF2, 0x6F0B, 0x6F24,
|
||||
0x6F3D, 0x6F55, 0x6F6E, 0x6F87, 0x6FA0, 0x6FB8, 0x6FD1, 0x6FE9, 0x7002, 0x701A, 0x7032, 0x704A, 0x7062, 0x707A,
|
||||
0x7092, 0x70AA, 0x70C2, 0x70DA, 0x70F2, 0x7109, 0x7121, 0x7138, 0x7150, 0x7167, 0x717E, 0x7196, 0x71AD, 0x71C4,
|
||||
0x71DB, 0x71F2, 0x7209, 0x7220, 0x7236, 0x724D, 0x7264, 0x727A, 0x7291, 0x72A7, 0x72BD, 0x72D4, 0x72EA, 0x7300,
|
||||
0x7316, 0x732C, 0x7342, 0x7358, 0x736E, 0x7383, 0x7399, 0x73AE, 0x73C4, 0x73D9, 0x73EF, 0x7404, 0x7419, 0x742E,
|
||||
0x7443, 0x7458, 0x746D, 0x7482, 0x7497, 0x74AC, 0x74C0, 0x74D5, 0x74EA, 0x74FE, 0x7512, 0x7527, 0x753B, 0x754F,
|
||||
0x7563, 0x7577, 0x758B, 0x759F, 0x75B3, 0x75C7, 0x75DA, 0x75EE, 0x7601, 0x7615, 0x7628, 0x763B, 0x764F, 0x7662,
|
||||
0x7675, 0x7688, 0x769B, 0x76AE, 0x76C1, 0x76D3, 0x76E6, 0x76F9, 0x770B, 0x771E, 0x7730, 0x7742, 0x7754, 0x7767,
|
||||
0x7779, 0x778B, 0x779D, 0x77AF, 0x77C0, 0x77D2, 0x77E4, 0x77F5, 0x7807, 0x7818, 0x782A, 0x783B, 0x784C, 0x785D,
|
||||
0x786E, 0x787F, 0x7890, 0x78A1, 0x78B2, 0x78C3, 0x78D3, 0x78E4, 0x78F4, 0x7905, 0x7915, 0x7925, 0x7936, 0x7946,
|
||||
0x7956, 0x7966, 0x7976, 0x7985, 0x7995, 0x79A5, 0x79B5, 0x79C4, 0x79D4, 0x79E3, 0x79F2, 0x7A02, 0x7A11, 0x7A20,
|
||||
0x7A2F, 0x7A3E, 0x7A4D, 0x7A5B, 0x7A6A, 0x7A79, 0x7A87, 0x7A96, 0x7AA4, 0x7AB3, 0x7AC1, 0x7ACF, 0x7ADD, 0x7AEB,
|
||||
0x7AF9, 0x7B07, 0x7B15, 0x7B23, 0x7B31, 0x7B3E, 0x7B4C, 0x7B59, 0x7B67, 0x7B74, 0x7B81, 0x7B8E, 0x7B9B, 0x7BA8,
|
||||
0x7BB5, 0x7BC2, 0x7BCF, 0x7BDC, 0x7BE8, 0x7BF5, 0x7C02, 0x7C0E, 0x7C1A, 0x7C27, 0x7C33, 0x7C3F, 0x7C4B, 0x7C57,
|
||||
0x7C63, 0x7C6F, 0x7C7A, 0x7C86, 0x7C92, 0x7C9D, 0x7CA9, 0x7CB4, 0x7CBF, 0x7CCB, 0x7CD6, 0x7CE1, 0x7CEC, 0x7CF7,
|
||||
0x7D02, 0x7D0C, 0x7D17, 0x7D22, 0x7D2C, 0x7D37, 0x7D41, 0x7D4B, 0x7D56, 0x7D60, 0x7D6A, 0x7D74, 0x7D7E, 0x7D88,
|
||||
0x7D91, 0x7D9B, 0x7DA5, 0x7DAE, 0x7DB8, 0x7DC1, 0x7DCB, 0x7DD4, 0x7DDD, 0x7DE6, 0x7DEF, 0x7DF8, 0x7E01, 0x7E0A,
|
||||
0x7E13, 0x7E1B, 0x7E24, 0x7E2C, 0x7E35, 0x7E3D, 0x7E45, 0x7E4D, 0x7E56, 0x7E5E, 0x7E66, 0x7E6D, 0x7E75, 0x7E7D,
|
||||
0x7E85, 0x7E8C, 0x7E94, 0x7E9B, 0x7EA3, 0x7EAA, 0x7EB1, 0x7EB8, 0x7EBF, 0x7EC6, 0x7ECD, 0x7ED4, 0x7EDB, 0x7EE1,
|
||||
0x7EE8, 0x7EEE, 0x7EF5, 0x7EFB, 0x7F01, 0x7F08, 0x7F0E, 0x7F14, 0x7F1A, 0x7F20, 0x7F25, 0x7F2B, 0x7F31, 0x7F36,
|
||||
0x7F3C, 0x7F41, 0x7F47, 0x7F4C, 0x7F51, 0x7F56, 0x7F5B, 0x7F60, 0x7F65, 0x7F6A, 0x7F6F, 0x7F74, 0x7F78, 0x7F7D,
|
||||
0x7F81, 0x7F85, 0x7F8A, 0x7F8E, 0x7F92, 0x7F96, 0x7F9A, 0x7F9E, 0x7FA2, 0x7FA6, 0x7FA9, 0x7FAD, 0x7FB0, 0x7FB4,
|
||||
0x7FB7, 0x7FBA, 0x7FBE, 0x7FC1, 0x7FC4, 0x7FC7, 0x7FCA, 0x7FCC, 0x7FCF, 0x7FD2, 0x7FD4, 0x7FD7, 0x7FD9, 0x7FDC,
|
||||
0x7FDE, 0x7FE0, 0x7FE2, 0x7FE4, 0x7FE6, 0x7FE8, 0x7FEA, 0x7FEC, 0x7FED, 0x7FEF, 0x7FF1, 0x7FF2, 0x7FF3, 0x7FF5,
|
||||
0x7FF6, 0x7FF7, 0x7FF8, 0x7FF9, 0x7FFA, 0x7FFB, 0x7FFB, 0x7FFC, 0x7FFD, 0x7FFD, 0x7FFE, 0x7FFE, 0x7FFE, 0x7FFE,
|
||||
0x7FFE, 0x7FFF,
|
||||
};
|
@ -279,8 +279,8 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
return;
|
||||
}
|
||||
func_80062D60(globalCtx, &this->actor.posRot.pos);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0,
|
||||
&D_801333E0, &D_801333E8);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ void BgJyaLift_SetInitPosY(BgJyaLift* this) {
|
||||
void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F) || (this->moveDelay > 0)) {
|
||||
this->moveDelay++;
|
||||
if (this->moveDelay >= 20) {
|
||||
if (this->moveDelay >= 20) {
|
||||
func_800800F8(globalCtx, 0xD66, -0x63, &this->dyna.actor, 0);
|
||||
BgJyaLift_SetupMove(this);
|
||||
}
|
||||
@ -142,8 +142,9 @@ void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
if ((this->dyna.unk_160 & 4) && ((this->unk_16B & 4) == 0)) {
|
||||
func_8005A77C(globalCtx2->cameraPtrs[0], 0x3F);
|
||||
} else if (((this->dyna.unk_160) & 4) == 0 && ((this->unk_16B & 4)) && (globalCtx2->cameraPtrs[0]->setting == 0x3F)) {
|
||||
func_8005A77C(globalCtx2->cameraPtrs[0], 3);
|
||||
} else if (((this->dyna.unk_160) & 4) == 0 && ((this->unk_16B & 4)) &&
|
||||
(globalCtx2->cameraPtrs[0]->setting == 0x3F)) {
|
||||
func_8005A77C(globalCtx2->cameraPtrs[0], 3);
|
||||
}
|
||||
this->unk_16B = this->dyna.unk_160;
|
||||
|
||||
|
@ -67,10 +67,8 @@ BgSpot18ObjInitFunc D_808B910C[] = {
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain1[] = {
|
||||
ICHAIN_F32(minVelocityY, 65526, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(gravity, 65532, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneForward, 1400, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(minVelocityY, 65526, ICHAIN_CONTINUE), ICHAIN_F32(gravity, 65532, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneForward, 1400, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneDownward, 800, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
|
@ -39,8 +39,10 @@ const ActorInit Bg_Treemouth_InitVars = {
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(unk_1F, 5, ICHAIN_CONTINUE), ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneForward, 8000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 300, ICHAIN_CONTINUE),
|
||||
ICHAIN_U8(unk_1F, 5, ICHAIN_CONTINUE),
|
||||
ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneForward, 8000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneScale, 300, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
|
@ -58,7 +58,8 @@ void BgZg_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_808C0C50(BgZg* this) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_METALDOOR_OPEN, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_METALDOOR_OPEN, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
}
|
||||
|
||||
s32 func_808C0C98(BgZg* this, GlobalContext* globalCtx) {
|
||||
|
@ -138,7 +138,8 @@ void func_80A686A8(EnHorseGanon* this, GlobalContext* globalCtx) {
|
||||
void func_80A68870(EnHorseGanon* this) {
|
||||
if (this->skin.skelAnime.animCurrentFrame > D_80A692B8[this->soundCount]) {
|
||||
if (D_80A692B8[this->soundCount] != 0 || !(this->skin.skelAnime.animCurrentFrame > D_80A692B8[1])) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_WALK, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_HORSE_WALK, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
|
||||
this->soundCount += 1;
|
||||
if (this->soundCount >= 2) {
|
||||
|
@ -323,7 +323,7 @@ void Select_UpdateMenu(SelectContext* this) {
|
||||
if (this->unk_21C < -7) {
|
||||
this->unk_220 = 0;
|
||||
this->unk_21C = 0;
|
||||
|
||||
|
||||
this->currentScene++;
|
||||
this->currentScene = (this->currentScene + this->count) % this->count;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user