Use per-function ASM blocks

This commit is contained in:
rozlette 2019-09-20 20:47:01 -05:00
parent 4c11f2f364
commit 2581bed7bf
9 changed files with 85 additions and 1333 deletions

View File

@ -104,6 +104,12 @@ build/baserom/boot: boot.bin
build/comp/code.yaz0: code.bin
python3 yaz0.py -i $< -o $@
disasm:
# python3 disasm.py
@while read -r file; do \
python3 ./tools/split_asm.py ./asm/$$file.asm ./asm/nonmatching/$$file; \
done < ./tables/files_with_nonmatching.txt
# Recipes
build/baserom/%: baserom/%

View File

@ -18,7 +18,7 @@ void z_bg_fu_kaiten_fini(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt);
UNK_RET func_80ACB4B4(z_ActorBgFuKaiten* this);
UNK_RET func_80ACB50C(z_ActorBgFuKaiten* this);
void z_bg_fu_kaiten_main(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt);
void z_bg_fu_kaiten_draw(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt);
void func_80ACB5A0(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt);
z_ActorInit bgBgFuKaitenInitVar = {
0x01AE,
@ -30,7 +30,7 @@ z_ActorInit bgBgFuKaitenInitVar = {
(z_ActorFunc)z_bg_fu_kaiten_init,
(z_ActorFunc)z_bg_fu_kaiten_fini,
(z_ActorFunc)z_bg_fu_kaiten_main,
(z_ActorFunc)z_bg_fu_kaiten_draw
(z_ActorFunc)func_80ACB5A0
};
f32 D_80ACB650 = 0.002;
@ -104,7 +104,9 @@ void z_bg_fu_kaiten_main(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt) {
func_80ACB50C(this);
}
void z_bg_fu_kaiten_draw(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt) {
#ifdef NON_MATCHING
void func_80ACB5A0(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt) {
z_GraphicsContext* sp24 = ctxt->unk0;
UNK_TYPE pad;
@ -123,3 +125,9 @@ void z_bg_fu_kaiten_draw(z_ActorBgFuKaiten* this, z_GlobalContext* ctxt) {
v0->words.w0 = 0xDE000000; v0->words.w1 = (u32)&D_060005D0; // XXX: D_060005D0 is probably a constant
}
}
#else
GLOBAL_ASM("./asm/nonmatching/ovl_Bg_Fu_Kaiten_0x80ACB400/func_80ACB5A0.asm")
#endif

View File

@ -53,108 +53,7 @@ UNK_RET func_800805E0(UNK_TYPE a0) {
#else
GLOBAL_ASM(
glabel func_800805E0
/* 000352 0x800805E0 27BDFFE8 */ addiu $sp, $sp, -24
/* 000353 0x800805E4 AFBF0014 */ sw $ra, 20($sp)
/* 000354 0x800805E8 AFA40018 */ sw $a0, 24($sp)
/* 000355 0x800805EC 8FAE0018 */ lw $t6, 24($sp)
/* 000356 0x800805F0 3C028000 */ lui $v0, %hi(osTvType)
/* 000357 0x800805F4 3C04800A */ lui $a0, 0x800A
/* 000358 0x800805F8 11C00028 */ beqz $t6, .L_8008069C
/* 000359 0x800805FC 00000000 */ nop
/* 000360 0x80080600 8C420300 */ lw $v0, %lo(osTvType)($v0)
/* 000361 0x80080604 24010001 */ li $at, 1
/* 000362 0x80080608 3C048009 */ lui $a0, 0x8009
/* 000363 0x8008060C 1040000B */ beqz $v0, .L_8008063C
/* 000364 0x80080610 00000000 */ nop
/* 000365 0x80080614 1041000D */ beq $v0, $at, .L_8008064C
/* 000366 0x80080618 3C048009 */ lui $a0, 0x8009
/* 000367 0x8008061C 24010002 */ li $at, 2
/* 000368 0x80080620 1441000A */ bne $v0, $at, .L_8008064C
/* 000369 0x80080624 00000000 */ nop
/* 000370 0x80080628 3C04800A */ lui $a0, %hi(D_80098010)
/* 000371 0x8008062C 0C022D94 */ jal osViSetMode
/* 000372 0x80080630 24848010 */ addiu $a0, %lo(D_80098010)
/* 000373 0x80080634 10000007 */ b .L_80080654
/* 000374 0x80080638 00000000 */ nop
.L_8008063C:
/* 000375 0x8008063C 0C022D94 */ jal osViSetMode
/* 000376 0x80080640 24847590 */ addiu $a0, $a0, 30096
/* 000377 0x80080644 10000003 */ b .L_80080654
/* 000378 0x80080648 00000000 */ nop
.L_8008064C:
/* 000379 0x8008064C 0C022D94 */ jal osViSetMode
/* 000380 0x80080650 24847FC0 */ addiu $a0, $a0, 32704
.L_80080654:
/* 000381 0x80080654 3C048009 */ lui $a0, %hi(D_80096B2C)
/* 000382 0x80080658 8C846B2C */ lw $a0, %lo(D_80096B2C)($a0)
/* 000383 0x8008065C 50800004 */ beqzl $a0, .L_80080670
/* 000384 0x80080660 3C013F80 */ lui $at, 0x3F80
/* 000385 0x80080664 0C024840 */ jal osViSetSpecialFeatures
/* 000386 0x80080668 00000000 */ nop
/* 000387 0x8008066C 3C013F80 */ lui $at, 0x3F80
.L_80080670:
/* 000388 0x80080670 44817000 */ mtc1 $at, $f14
/* 000389 0x80080674 3C018009 */ lui $at, %hi(D_80096B34)
/* 000390 0x80080678 C4246B34 */ lwc1 $f4, %lo(D_80096B34)($at)
/* 000391 0x8008067C 46047032 */ c.eq.s $f14, $f4
/* 000392 0x80080680 00000000 */ nop
/* 000393 0x80080684 45030029 */ bc1tl .L_8008072C
/* 000394 0x80080688 8FAF0018 */ lw $t7, 24($sp)
/* 000395 0x8008068C 0C025640 */ jal osViSetYScale
/* 000396 0x80080690 46007306 */ mov.s $f12, $f14
/* 000397 0x80080694 10000025 */ b .L_8008072C
/* 000398 0x80080698 8FAF0018 */ lw $t7, 24($sp)
.L_8008069C:
/* 000399 0x8008069C 0C022D94 */ jal osViSetMode
/* 000400 0x800806A0 2484B240 */ addiu $a0, $a0, -19904
/* 000401 0x800806A4 3C048009 */ lui $a0, %hi(D_80096B28)
/* 000402 0x800806A8 90846B28 */ lbu $a0, %lo(D_80096B28)($a0)
/* 000403 0x800806AC 10800003 */ beqz $a0, .L_800806BC
/* 000404 0x800806B0 00000000 */ nop
/* 000405 0x800806B4 0C021F80 */ jal func_80087E00
/* 000406 0x800806B8 00000000 */ nop
.L_800806BC:
/* 000407 0x800806BC 3C048009 */ lui $a0, %hi(D_80096B2C)
/* 000408 0x800806C0 8C846B2C */ lw $a0, %lo(D_80096B2C)($a0)
/* 000409 0x800806C4 50800004 */ beqzl $a0, .L_800806D8
/* 000410 0x800806C8 3C013F80 */ lui $at, 0x3F80
/* 000411 0x800806CC 0C024840 */ jal osViSetSpecialFeatures
/* 000412 0x800806D0 00000000 */ nop
/* 000413 0x800806D4 3C013F80 */ lui $at, 0x3F80
.L_800806D8:
/* 000414 0x800806D8 44817000 */ mtc1 $at, $f14
/* 000415 0x800806DC 3C018009 */ lui $at, %hi(D_80096B30)
/* 000416 0x800806E0 C42C6B30 */ lwc1 $f12, %lo(D_80096B30)($at)
/* 000417 0x800806E4 460C7032 */ c.eq.s $f14, $f12
/* 000418 0x800806E8 00000000 */ nop
/* 000419 0x800806EC 45010006 */ bc1t .L_80080708
/* 000420 0x800806F0 00000000 */ nop
/* 000421 0x800806F4 0C025654 */ jal osViSetXScale
/* 000422 0x800806F8 00000000 */ nop
/* 000423 0x800806FC 3C013F80 */ lui $at, 0x3F80
/* 000424 0x80080700 44817000 */ mtc1 $at, $f14
/* 000425 0x80080704 00000000 */ nop
.L_80080708:
/* 000426 0x80080708 3C018009 */ lui $at, %hi(D_80096B34)
/* 000427 0x8008070C C42C6B34 */ lwc1 $f12, %lo(D_80096B34)($at)
/* 000428 0x80080710 460C7032 */ c.eq.s $f14, $f12
/* 000429 0x80080714 00000000 */ nop
/* 000430 0x80080718 45030004 */ bc1tl .L_8008072C
/* 000431 0x8008071C 8FAF0018 */ lw $t7, 24($sp)
/* 000432 0x80080720 0C025640 */ jal osViSetYScale
/* 000433 0x80080724 00000000 */ nop
/* 000434 0x80080728 8FAF0018 */ lw $t7, 24($sp)
.L_8008072C:
/* 000435 0x8008072C 3C188009 */ lui $t8, %hi(D_80096B24)
/* 000436 0x80080730 27186B24 */ addiu $t8, %lo(D_80096B24)
/* 000437 0x80080734 A30F0000 */ sb $t7, 0($t8)
/* 000438 0x80080738 8FBF0014 */ lw $ra, 20($sp)
/* 000439 0x8008073C 27BD0018 */ addiu $sp, $sp, 24
/* 000440 0x80080740 03E00008 */ jr $ra
/* 000441 0x80080744 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/boot_0x800805E0/func_800805E0.asm")
#endif

View File

@ -19,27 +19,6 @@ u32 func_800968B0(const u8* a0, const u8* a1) {
#else
GLOBAL_ASM(
glabel func_800968B0
/* 023060 0x800968B0 90820000 */ lbu $v0, 0($a0)
.L_800968B4:
/* 023061 0x800968B4 90A30000 */ lbu $v1, 0($a1)
/* 023062 0x800968B8 24840001 */ addiu $a0, $a0, 1
/* 023063 0x800968BC 24A50001 */ addiu $a1, $a1, 1
/* 023064 0x800968C0 10620003 */ beq $v1, $v0, .L_800968D0
/* 023065 0x800968C4 00403825 */ move $a3, $v0
/* 023066 0x800968C8 03E00008 */ jr $ra
/* 023067 0x800968CC 00E31023 */ subu $v0, $a3, $v1
.L_800968D0:
/* 023068 0x800968D0 5440FFF8 */ bnezl $v0, .L_800968B4
/* 023069 0x800968D4 90820000 */ lbu $v0, 0($a0)
/* 023070 0x800968D8 00001025 */ move $v0, $zero
/* 023071 0x800968DC 03E00008 */ jr $ra
/* 023072 0x800968E0 00000000 */ nop
/* 023073 0x800968E4 00000000 */ nop
/* 023074 0x800968E8 00000000 */ nop
/* 023075 0x800968EC 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/boot_0x800968B0/func_800968B0.asm")
#endif

View File

@ -142,110 +142,7 @@ void Dmamgr_HandleRequest(s80080A08* a0) {
#else
GLOBAL_ASM(
glabel Dmamgr_HandleRequest
/* 000618 0x80080A08 27BDFFC8 */ addiu $sp, $sp, -56
/* 000619 0x80080A0C AFBF0014 */ sw $ra, 20($sp)
/* 000620 0x80080A10 00802825 */ move $a1, $a0
/* 000621 0x80080A14 8CAE0004 */ lw $t6, 4($a1)
/* 000622 0x80080A18 8CA40000 */ lw $a0, 0($a1)
/* 000623 0x80080A1C AFAE0030 */ sw $t6, 48($sp)
/* 000624 0x80080A20 8CAF0008 */ lw $t7, 8($a1)
/* 000625 0x80080A24 AFA40034 */ sw $a0, 52($sp)
/* 000626 0x80080A28 0C02026F */ jal Dmamgr_FindDmaIndex
/* 000627 0x80080A2C AFAF002C */ sw $t7, 44($sp)
/* 000628 0x80080A30 8FA70034 */ lw $a3, 52($sp)
/* 000629 0x80080A34 0440004B */ bltz $v0, .L_80080B64
/* 000630 0x80080A38 00404025 */ move $t0, $v0
/* 000631 0x80080A3C 3C18800A */ lui $t8, %hi(D_8009B2BC)
/* 000632 0x80080A40 9718B2BC */ lhu $t8, %lo(D_8009B2BC)($t8)
/* 000633 0x80080A44 3C09800A */ lui $t1, %hi(dmadata)
/* 000634 0x80080A48 2529F8B0 */ addiu $t1, %lo(dmadata)
/* 000635 0x80080A4C 0058082A */ slt $at, $v0, $t8
/* 000636 0x80080A50 10200044 */ beqz $at, .L_80080B64
/* 000637 0x80080A54 0002C900 */ sll $t9, $v0, 4
/* 000638 0x80080A58 03292021 */ addu $a0, $t9, $t1
/* 000639 0x80080A5C 8C85000C */ lw $a1, 12($a0)
/* 000640 0x80080A60 8FAB002C */ lw $t3, 44($sp)
/* 000641 0x80080A64 54A0001B */ bnezl $a1, .L_80080AD4
/* 000642 0x80080A68 8C830008 */ lw $v1, 8($a0)
/* 000643 0x80080A6C 8C8A0004 */ lw $t2, 4($a0)
/* 000644 0x80080A70 00EB6021 */ addu $t4, $a3, $t3
/* 000645 0x80080A74 3C04800A */ lui $a0, %hi(D_800981C4)
/* 000646 0x80080A78 014C082B */ sltu $at, $t2, $t4
/* 000647 0x80080A7C 10200007 */ beqz $at, .L_80080A9C
/* 000648 0x80080A80 248481C4 */ addiu $a0, %lo(D_800981C4)
/* 000649 0x80080A84 240501F3 */ li $a1, 499
/* 000650 0x80080A88 AFA70034 */ sw $a3, 52($sp)
/* 000651 0x80080A8C 0C020F93 */ jal func_80083E4C
/* 000652 0x80080A90 AFA2001C */ sw $v0, 28($sp)
/* 000653 0x80080A94 8FA70034 */ lw $a3, 52($sp)
/* 000654 0x80080A98 8FA8001C */ lw $t0, 28($sp)
.L_80080A9C:
/* 000655 0x80080A9C 3C0E800A */ lui $t6, %hi(dmadata)
/* 000656 0x80080AA0 25CEF8B0 */ addiu $t6, %lo(dmadata)
/* 000657 0x80080AA4 00086900 */ sll $t5, $t0, 4
/* 000658 0x80080AA8 01AE1021 */ addu $v0, $t5, $t6
/* 000659 0x80080AAC 8C4F0008 */ lw $t7, 8($v0)
/* 000660 0x80080AB0 8C590000 */ lw $t9, 0($v0)
/* 000661 0x80080AB4 8FA50030 */ lw $a1, 48($sp)
/* 000662 0x80080AB8 01E7C021 */ addu $t8, $t7, $a3
/* 000663 0x80080ABC 8FA6002C */ lw $a2, 44($sp)
/* 000664 0x80080AC0 0C0201E4 */ jal Dmamgr_DoDmaTransfer
/* 000665 0x80080AC4 03192023 */ subu $a0, $t8, $t9
/* 000666 0x80080AC8 1000002B */ b .L_80080B78
/* 000667 0x80080ACC 8FBF0014 */ lw $ra, 20($sp)
/* 000668 0x80080AD0 8C830008 */ lw $v1, 8($a0)
.L_80080AD4:
/* 000669 0x80080AD4 00A34823 */ subu $t1, $a1, $v1
/* 000670 0x80080AD8 AFA90024 */ sw $t1, 36($sp)
/* 000671 0x80080ADC AFA30028 */ sw $v1, 40($sp)
/* 000672 0x80080AE0 8C8B0000 */ lw $t3, 0($a0)
/* 000673 0x80080AE4 3C04800A */ lui $a0, %hi(D_800981D4)
/* 000674 0x80080AE8 248481D4 */ addiu $a0, %lo(D_800981D4)
/* 000675 0x80080AEC 10EB0004 */ beq $a3, $t3, .L_80080B00
/* 000676 0x80080AF0 24050206 */ li $a1, 518
/* 000677 0x80080AF4 0C020F93 */ jal func_80083E4C
/* 000678 0x80080AF8 AFA8001C */ sw $t0, 28($sp)
/* 000679 0x80080AFC 8FA8001C */ lw $t0, 28($sp)
.L_80080B00:
/* 000680 0x80080B00 3C0C800A */ lui $t4, %hi(dmadata)
/* 000681 0x80080B04 258CF8B0 */ addiu $t4, %lo(dmadata)
/* 000682 0x80080B08 00085100 */ sll $t2, $t0, 4
/* 000683 0x80080B0C 014C1021 */ addu $v0, $t2, $t4
/* 000684 0x80080B10 8C4E0004 */ lw $t6, 4($v0)
/* 000685 0x80080B14 8C4F0000 */ lw $t7, 0($v0)
/* 000686 0x80080B18 8FAD002C */ lw $t5, 44($sp)
/* 000687 0x80080B1C 3C04800A */ lui $a0, %hi(D_800981E4)
/* 000688 0x80080B20 01CFC023 */ subu $t8, $t6, $t7
/* 000689 0x80080B24 11B80003 */ beq $t5, $t8, .L_80080B34
/* 000690 0x80080B28 248481E4 */ addiu $a0, %lo(D_800981E4)
/* 000691 0x80080B2C 0C020F93 */ jal func_80083E4C
/* 000692 0x80080B30 2405020D */ li $a1, 525
.L_80080B34:
/* 000693 0x80080B34 00002025 */ move $a0, $zero
/* 000694 0x80080B38 0C023F00 */ jal osSetThreadPri
/* 000695 0x80080B3C 2405000A */ li $a1, 10
/* 000696 0x80080B40 8FA40028 */ lw $a0, 40($sp)
/* 000697 0x80080B44 8FA50030 */ lw $a1, 48($sp)
/* 000698 0x80080B48 0C02045E */ jal Yaz0_LoadAndDecompressFile
/* 000699 0x80080B4C 8FA60024 */ lw $a2, 36($sp)
/* 000700 0x80080B50 00002025 */ move $a0, $zero
/* 000701 0x80080B54 0C023F00 */ jal osSetThreadPri
/* 000702 0x80080B58 24050011 */ li $a1, 17
/* 000703 0x80080B5C 10000006 */ b .L_80080B78
/* 000704 0x80080B60 8FBF0014 */ lw $ra, 20($sp)
.L_80080B64:
/* 000705 0x80080B64 3C04800A */ lui $a0, %hi(D_800981F4)
/* 000706 0x80080B68 248481F4 */ addiu $a0, %lo(D_800981F4)
/* 000707 0x80080B6C 0C020F93 */ jal func_80083E4C
/* 000708 0x80080B70 2405022E */ li $a1, 558
/* 000709 0x80080B74 8FBF0014 */ lw $ra, 20($sp)
.L_80080B78:
/* 000710 0x80080B78 27BD0038 */ addiu $sp, $sp, 56
/* 000711 0x80080B7C 03E00008 */ jr $ra
/* 000712 0x80080DFC 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_std_dma/Dmamgr_HandleRequest.asm")
#endif
@ -269,43 +166,7 @@ void Dmamgr_ThreadEntry(void* a0) {
#else
GLOBAL_ASM(
glabel Dmamgr_ThreadEntry
/* 000713 0x80080B84 27BDFFC8 */ addiu $sp, $sp, -56
/* 000714 0x80080B88 AFBF0024 */ sw $ra, 36($sp)
/* 000715 0x80080B8C AFB20020 */ sw $s2, 32($sp)
/* 000716 0x80080B90 AFB1001C */ sw $s1, 28($sp)
/* 000717 0x80080B94 AFB00018 */ sw $s0, 24($sp)
/* 000718 0x80080B98 AFA40038 */ sw $a0, 56($sp)
/* 000719 0x80080B9C 3C11800A */ lui $s1, %hi(D_8009B2C0)
/* 000720 0x80080BA0 2631B2C0 */ addiu $s1, %lo(D_8009B2C0)
/* 000721 0x80080BA4 27B20034 */ addiu $s2, $sp, 52
/* 000722 0x80080BA8 02202025 */ move $a0, $s1
.L_80080BAC:
/* 000723 0x80080BAC 02402825 */ move $a1, $s2
/* 000724 0x80080BB0 0C021FB4 */ jal osRecvMesg
/* 000725 0x80080BB4 24060001 */ li $a2, 1
/* 000726 0x80080BB8 8FA40034 */ lw $a0, 52($sp)
/* 000727 0x80080BBC 5080000C */ beqzl $a0, .L_80080BF0
/* 000728 0x80080BC0 8FBF0024 */ lw $ra, 36($sp)
/* 000729 0x80080BC4 0C020282 */ jal Dmamgr_HandleRequest
/* 000730 0x80080BC8 00808025 */ move $s0, $a0
/* 000731 0x80080BCC 8E040018 */ lw $a0, 24($s0)
/* 000732 0x80080BD0 5080FFF6 */ beqzl $a0, .L_80080BAC
/* 000733 0x80080BD4 02202025 */ move $a0, $s1
/* 000734 0x80080BD8 8E05001C */ lw $a1, 28($s0)
/* 000735 0x80080BDC 0C021EC4 */ jal osSendMesg
/* 000736 0x80080BE0 00003025 */ move $a2, $zero
/* 000737 0x80080BE4 1000FFF1 */ b .L_80080BAC
/* 000738 0x80080BE8 02202025 */ move $a0, $s1
/* 000739 0x80080BEC 8FBF0024 */ lw $ra, 36($sp)
.L_80080BF0:
/* 000740 0x80080BF0 8FB00018 */ lw $s0, 24($sp)
/* 000741 0x80080BF4 8FB1001C */ lw $s1, 28($sp)
/* 000742 0x80080BF8 8FB20020 */ lw $s2, 32($sp)
/* 000743 0x80080BFC 03E00008 */ jr $ra
/* 000744 0x80080C00 27BD0038 */ addiu $sp, $sp, 56
)
GLOBAL_ASM("./asm/nonmatching/z_std_dma/Dmamgr_ThreadEntry.asm")
#endif
@ -333,46 +194,7 @@ s32 Dmamgr_SendRequest(s80080A08* a0, UNK_FUN_PTR(a1), UNK_PTR a2, UNK_TYPE a3,
#else
GLOBAL_ASM(
glabel Dmamgr_SendRequest
/* 000745 0x80080C04 27BDFFE0 */ addiu $sp, $sp, -32
/* 000746 0x80080C08 AFB00018 */ sw $s0, 24($sp)
/* 000747 0x80080C0C 00808025 */ move $s0, $a0
/* 000748 0x80080C10 AFBF001C */ sw $ra, 28($sp)
/* 000749 0x80080C14 AFA50024 */ sw $a1, 36($sp)
/* 000750 0x80080C18 AFA60028 */ sw $a2, 40($sp)
/* 000751 0x80080C1C 3C0E8009 */ lui $t6, %hi(D_80096B60)
/* 000752 0x80080C20 25CE6B60 */ addiu $t6, %lo(D_80096B60)
/* 000753 0x80080C24 8DCF0000 */ lw $t7, 0($t6)
/* 000754 0x80080C28 8FB80028 */ lw $t8, 40($sp)
/* 000755 0x80080C2C 3C04800A */ lui $a0, 0x800A
/* 000756 0x80080C30 29E10002 */ slti $at, $t7, 2
/* 000757 0x80080C34 54200004 */ bnezl $at, .L_80080C48
/* 000758 0x80080C38 AE180000 */ sw $t8, 0($s0)
/* 000759 0x80080C3C 1000000F */ b .L_80080C7C
/* 000760 0x80080C40 2402FFFE */ li $v0, -2
/* 000761 0x80080C44 AE180000 */ sw $t8, 0($s0)
.L_80080C48:
/* 000762 0x80080C48 8FB90024 */ lw $t9, 36($sp)
/* 000763 0x80080C4C AE070008 */ sw $a3, 8($s0)
/* 000764 0x80080C50 AE000014 */ sw $zero, 20($s0)
/* 000765 0x80080C54 AE190004 */ sw $t9, 4($s0)
/* 000766 0x80080C58 8FA80034 */ lw $t0, 52($sp)
/* 000767 0x80080C5C 2484B2C0 */ addiu $a0, $a0, -19776
/* 000768 0x80080C60 02002825 */ move $a1, $s0
/* 000769 0x80080C64 AE080018 */ sw $t0, 24($s0)
/* 000770 0x80080C68 8FA90038 */ lw $t1, 56($sp)
/* 000771 0x80080C6C 24060001 */ li $a2, 1
/* 000772 0x80080C70 0C021EC4 */ jal osSendMesg
/* 000773 0x80080C74 AE09001C */ sw $t1, 28($s0)
/* 000774 0x80080C78 00001025 */ move $v0, $zero
.L_80080C7C:
/* 000775 0x80080C7C 8FBF001C */ lw $ra, 28($sp)
/* 000776 0x80080C80 8FB00018 */ lw $s0, 24($sp)
/* 000777 0x80080C84 27BD0020 */ addiu $sp, $sp, 32
/* 000778 0x80080C88 03E00008 */ jr $ra
/* 000779 0x80080C8C 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_std_dma/Dmamgr_SendRequest.asm")
#endif
@ -418,72 +240,7 @@ void Dmamgr_Start() {
#else
GLOBAL_ASM(
glabel Dmamgr_Start
/* 000811 0x80080D0C 27BDFFE0 */ addiu $sp, $sp, -32
/* 000812 0x80080D10 AFBF001C */ sw $ra, 28($sp)
/* 000813 0x80080D14 3C040002 */ lui $a0, %hi(dmadataRomStart)
/* 000814 0x80080D18 3C0E0002 */ lui $t6, %hi(dmadataRomEnd)
/* 000815 0x80080D1C 25CE0700 */ addiu $t6, %lo(dmadataRomEnd)
/* 000816 0x80080D20 2484A500 */ addiu $a0, %lo(dmadataRomStart)
/* 000817 0x80080D24 3C05800A */ lui $a1, %hi(dmadata)
/* 000818 0x80080D28 24A5F8B0 */ addiu $a1, %lo(dmadata)
/* 000819 0x80080D2C 0C0201E4 */ jal Dmamgr_DoDmaTransfer
/* 000820 0x80080D30 01C43023 */ subu $a2, $t6, $a0
/* 000821 0x80080D34 3C04800A */ lui $a0, %hi(dmadata)
/* 000822 0x80080D38 2484F8B0 */ addiu $a0, %lo(dmadata)
/* 000823 0x80080D3C 8C8F0004 */ lw $t7, 4($a0)
/* 000824 0x80080D40 00801025 */ move $v0, $a0
/* 000825 0x80080D44 00001825 */ move $v1, $zero
/* 000826 0x80080D48 11E00006 */ beqz $t7, .L_80080D64
/* 000827 0x80080D4C 3C01800A */ lui $at, %hi(D_8009B2BC)
/* 000828 0x80080D50 8C580014 */ lw $t8, 20($v0)
.L_80080D54:
/* 000829 0x80080D54 24420010 */ addiu $v0, $v0, 16
/* 000830 0x80080D58 24630001 */ addiu $v1, $v1, 1
/* 000831 0x80080D5C 5700FFFD */ bnezl $t8, .L_80080D54
/* 000832 0x80080D60 8C580014 */ lw $t8, 20($v0)
.L_80080D64:
/* 000833 0x80080D64 A423B2BC */ sh $v1, %lo(D_8009B2BC)($at)
/* 000834 0x80080D68 3C04800A */ lui $a0, %hi(D_8009B2C0)
/* 000835 0x80080D6C 3C05800A */ lui $a1, %hi(D_8009B2D8)
/* 000836 0x80080D70 24A5B2D8 */ addiu $a1, %lo(D_8009B2D8)
/* 000837 0x80080D74 2484B2C0 */ addiu $a0, %lo(D_8009B2C0)
/* 000838 0x80080D78 0C023C90 */ jal osCreateMesgQueue
/* 000839 0x80080D7C 24060020 */ li $a2, 32
/* 000840 0x80080D80 3C08800A */ lui $t0, %hi(D_80098204)
/* 000841 0x80080D84 25088204 */ addiu $t0, %lo(D_80098204)
/* 000842 0x80080D88 3C04800A */ lui $a0, 0x800A
/* 000843 0x80080D8C 3C05800A */ lui $a1, %hi(D_8009B508)
/* 000844 0x80080D90 3C06800A */ lui $a2, %hi(D_8009BA08)
/* 000845 0x80080D94 24190100 */ li $t9, 256
/* 000846 0x80080D98 AFB90010 */ sw $t9, 16($sp)
/* 000847 0x80080D9C 24C6BA08 */ addiu $a2, %lo(D_8009BA08)
/* 000848 0x80080DA0 24A5B508 */ addiu $a1, %lo(D_8009B508)
/* 000849 0x80080DA4 2484B2A0 */ addiu $a0, $a0, -19808
/* 000850 0x80080DA8 AFA80014 */ sw $t0, 20($sp)
/* 000851 0x80080DAC 0C0214C8 */ jal thread_info_init
/* 000852 0x80080DB0 00003825 */ move $a3, $zero
/* 000853 0x80080DB4 3C09800A */ lui $t1, %hi(D_8009BA08)
/* 000854 0x80080DB8 2529BA08 */ addiu $t1, %lo(D_8009BA08)
/* 000855 0x80080DBC 3C04800A */ lui $a0, %hi(D_8009B358)
/* 000856 0x80080DC0 3C068008 */ lui $a2, %hi(Dmamgr_ThreadEntry)
/* 000857 0x80080DC4 240A0011 */ li $t2, 17
/* 000858 0x80080DC8 AFAA0014 */ sw $t2, 20($sp)
/* 000859 0x80080DCC 24C60B84 */ addiu $a2, %lo(Dmamgr_ThreadEntry)
/* 000860 0x80080DD0 2484B358 */ addiu $a0, %lo(D_8009B358)
/* 000861 0x80080DD4 AFA90010 */ sw $t1, 16($sp)
/* 000862 0x80080DD8 24050012 */ li $a1, 18
/* 000863 0x80080DDC 0C022790 */ jal osCreateThread
/* 000864 0x80080DE0 00003825 */ move $a3, $zero
/* 000865 0x80080DE4 3C04800A */ lui $a0, %hi(D_8009B358)
/* 000866 0x80080DE8 0C0255EC */ jal osStartThread
/* 000867 0x80080DEC 2484B358 */ addiu $a0, %lo(D_8009B358)
/* 000868 0x80080DF0 8FBF001C */ lw $ra, 28($sp)
/* 000869 0x80080DF4 27BD0020 */ addiu $sp, $sp, 32
/* 000870 0x80080DF8 03E00008 */ jr $ra
/* 000871 0x80080DFC 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_std_dma/Dmamgr_Start.asm")
#endif

View File

@ -148,99 +148,7 @@ s32 EffectSS_FindFreeSpace(u32 priority, u32* tableEntry) {
#else
GLOBAL_ASM(
glabel EffectSS_FindFreeSpace
/* 010769 0x800B0304 27BDFFF8 */ addiu $sp, $sp, -8
/* 010770 0x800B0308 AFB00004 */ sw $s0, 0X4($sp)
/* 010771 0x800B030C 3C06801B */ lui $a2, %hi(EffectSS2Info)
/* 010772 0x800B0310 24C6E3A0 */ addiu $a2, %lo(EffectSS2Info)
/* 010773 0x800B0314 00808025 */ move $s0, $a0
/* 010774 0x800B0318 AFA5000C */ sw $a1, 0XC($sp)
/* 010775 0x800B031C 8CC20004 */ lw $v0, 0X4($a2)
/* 010776 0x800B0320 8CC30008 */ lw $v1, 0X8($a2)
/* 010777 0x800B0324 00002825 */ move $a1, $zero
/* 010778 0x800B0328 2408FFFF */ li $t0, -1
/* 010779 0x800B032C 0043082A */ slt $at, $v0, $v1
/* 010780 0x800B0330 14200003 */ bnez $at, .L_800B0340
/* 010781 0x800B0334 00000000 */ nop
/* 010782 0x800B0338 ACC00004 */ sw $zero, 0X4($a2)
/* 010783 0x800B033C 00001025 */ move $v0, $zero
.L_800B0340:
/* 010784 0x800B0340 3C06801B */ lui $a2, %hi(EffectSS2Info)
/* 010785 0x800B0344 8CC6E3A0 */ lw $a2, %lo(EffectSS2Info)($a2)
/* 010786 0x800B0348 00027080 */ sll $t6, $v0, 2
/* 010787 0x800B034C 01C27023 */ subu $t6, $t6, $v0
/* 010788 0x800B0350 000E7140 */ sll $t6, $t6, 5
/* 010789 0x800B0354 00402025 */ move $a0, $v0
/* 010790 0x800B0358 00CE3821 */ addu $a3, $a2, $t6
.L_800B035C:
/* 010791 0x800B035C 84EF005C */ lh $t7, 0X5C($a3)
/* 010792 0x800B0360 550F0004 */ bnel $t0, $t7, .L_800B0374
/* 010793 0x800B0364 24840001 */ addiu $a0, $a0, 1
/* 010794 0x800B0368 1000000C */ b .L_800B039C
/* 010795 0x800B036C 24050001 */ li $a1, 1
/* 010796 0x800B0370 24840001 */ addiu $a0, $a0, 1
.L_800B0374:
/* 010797 0x800B0374 0083082A */ slt $at, $a0, $v1
/* 010798 0x800B0378 14200002 */ bnez $at, .L_800B0384
/* 010799 0x800B037C 00000000 */ nop
/* 010800 0x800B0380 00002025 */ move $a0, $zero
.L_800B0384:
/* 010801 0x800B0384 10820005 */ beq $a0, $v0, .L_800B039C
/* 010802 0x800B0388 0004C080 */ sll $t8, $a0, 2
/* 010803 0x800B038C 0304C023 */ subu $t8, $t8, $a0
/* 010804 0x800B0390 0018C140 */ sll $t8, $t8, 5
/* 010805 0x800B0394 1000FFF1 */ b .L_800B035C
/* 010806 0x800B0398 00D83821 */ addu $a3, $a2, $t8
.L_800B039C:
/* 010807 0x800B039C 24010001 */ li $at, 1
/* 010808 0x800B03A0 14A10005 */ bne $a1, $at, .L_800B03B8
/* 010809 0x800B03A4 00024880 */ sll $t1, $v0, 2
/* 010810 0x800B03A8 8FB9000C */ lw $t9, 0XC($sp)
/* 010811 0x800B03AC 00001025 */ move $v0, $zero
/* 010812 0x800B03B0 1000001F */ b .L_800B0430
/* 010813 0x800B03B4 AF240000 */ sw $a0, 0X0($t9)
.L_800B03B8:
/* 010814 0x800B03B8 01224823 */ subu $t1, $t1, $v0
/* 010815 0x800B03BC 00094940 */ sll $t1, $t1, 5
/* 010816 0x800B03C0 00402025 */ move $a0, $v0
/* 010817 0x800B03C4 00C93821 */ addu $a3, $a2, $t1
.L_800B03C8:
/* 010818 0x800B03C8 90E5005E */ lbu $a1, 0X5E($a3)
/* 010819 0x800B03CC 00B0082A */ slt $at, $a1, $s0
/* 010820 0x800B03D0 54200008 */ bnezl $at, .L_800B03F4
/* 010821 0x800B03D4 24840001 */ addiu $a0, $a0, 1
/* 010822 0x800B03D8 56050013 */ bnel $s0, $a1, .L_800B0428
/* 010823 0x800B03DC 8FAD000C */ lw $t5, 0XC($sp)
/* 010824 0x800B03E0 94EA005A */ lhu $t2, 0X5A($a3)
/* 010825 0x800B03E4 314B0001 */ andi $t3, $t2, 0X1
/* 010826 0x800B03E8 5160000F */ beqzl $t3, .L_800B0428
/* 010827 0x800B03EC 8FAD000C */ lw $t5, 0XC($sp)
/* 010828 0x800B03F0 24840001 */ addiu $a0, $a0, 1
.L_800B03F4:
/* 010829 0x800B03F4 0083082A */ slt $at, $a0, $v1
/* 010830 0x800B03F8 14200002 */ bnez $at, .L_800B0404
/* 010831 0x800B03FC 00000000 */ nop
/* 010832 0x800B0400 00002025 */ move $a0, $zero
.L_800B0404:
/* 010833 0x800B0404 14820003 */ bne $a0, $v0, .L_800B0414
/* 010834 0x800B0408 00046080 */ sll $t4, $a0, 2
/* 010835 0x800B040C 10000008 */ b .L_800B0430
/* 010836 0x800B0410 24020001 */ li $v0, 1
.L_800B0414:
/* 010837 0x800B0414 01846023 */ subu $t4, $t4, $a0
/* 010838 0x800B0418 000C6140 */ sll $t4, $t4, 5
/* 010839 0x800B041C 1000FFEA */ b .L_800B03C8
/* 010840 0x800B0420 00CC3821 */ addu $a3, $a2, $t4
/* 010841 0x800B0424 8FAD000C */ lw $t5, 0XC($sp)
.L_800B0428:
/* 010842 0x800B0428 00001025 */ move $v0, $zero
/* 010843 0x800B042C ADA40000 */ sw $a0, 0X0($t5)
.L_800B0430:
/* 010844 0x800B0430 8FB00004 */ lw $s0, 0X4($sp)
/* 010845 0x800B0434 03E00008 */ jr $ra
/* 010846 0x800B0438 27BD0008 */ addiu $sp, $sp, 8
)
GLOBAL_ASM("./asm/nonmatching/z_effect_soft_sprite/EffectSS_FindFreeSpace.asm")
#endif
@ -307,120 +215,7 @@ void EffectSS_LoadParticle(z_GlobalContext* ctxt, u32 type, u32 priority, void*
#else
GLOBAL_ASM(
glabel EffectSS_LoadParticle
/* 010885 0x800B04D4 27BDFFC0 */ addiu $sp, $sp, -64
/* 010886 0x800B04D8 AFBF001C */ sw $ra, 0X1C($sp)
/* 010887 0x800B04DC AFA40040 */ sw $a0, 0X40($sp)
/* 010888 0x800B04E0 AFA50044 */ sw $a1, 0X44($sp)
/* 010889 0x800B04E4 AFA60048 */ sw $a2, 0X48($sp)
/* 010890 0x800B04E8 AFA7004C */ sw $a3, 0X4C($sp)
/* 010891 0x800B04EC 8FA40048 */ lw $a0, 0X48($sp)
/* 010892 0x800B04F0 0C02C0C1 */ jal EffectSS_FindFreeSpace
/* 010893 0x800B04F4 27A5003C */ addiu $a1, $sp, 60
/* 010894 0x800B04F8 1440005C */ bnez $v0, .L_800B066C
/* 010895 0x800B04FC 8FAE003C */ lw $t6, 0X3C($sp)
/* 010896 0x800B0500 8FB80044 */ lw $t8, 0X44($sp)
/* 010897 0x800B0504 3C09801B */ lui $t1, %hi(particleOverlayTable)
/* 010898 0x800B0508 25CF0001 */ addiu $t7, $t6, 1
/* 010899 0x800B050C 0018C8C0 */ sll $t9, $t8, 3
/* 010900 0x800B0510 0338C823 */ subu $t9, $t9, $t8
/* 010901 0x800B0514 3C01801B */ lui $at, %hi(D_801AE3A4)
/* 010902 0x800B0518 0019C880 */ sll $t9, $t9, 2
/* 010903 0x800B051C 2529E4A0 */ addiu $t1, %lo(particleOverlayTable)
/* 010904 0x800B0520 AC2FE3A4 */ sw $t7, %lo(D_801AE3A4)($at)
/* 010905 0x800B0524 03291821 */ addu $v1, $t9, $t1
/* 010906 0x800B0528 8C620008 */ lw $v0, 0X8($v1)
/* 010907 0x800B052C 8C6A000C */ lw $t2, 0XC($v1)
/* 010908 0x800B0530 14400003 */ bnez $v0, .L_800B0540
/* 010909 0x800B0534 01422023 */ subu $a0, $t2, $v0
/* 010910 0x800B0538 1000001B */ b .L_800B05A8
/* 010911 0x800B053C 8C620014 */ lw $v0, 0X14($v1)
.L_800B0540:
/* 010912 0x800B0540 8C6B0010 */ lw $t3, 0X10($v1)
/* 010913 0x800B0544 5560000F */ bnezl $t3, .L_800B0584
/* 010914 0x800B0548 8C620014 */ lw $v0, 0X14($v1)
/* 010915 0x800B054C 0C040B22 */ jal zelda_mallocR
/* 010916 0x800B0550 AFA30028 */ sw $v1, 0X28($sp)
/* 010917 0x800B0554 8FA30028 */ lw $v1, 0X28($sp)
/* 010918 0x800B0558 10400044 */ beqz $v0, .L_800B066C
/* 010919 0x800B055C AC620010 */ sw $v0, 0X10($v1)
/* 010920 0x800B0560 8C640000 */ lw $a0, 0X0($v1)
/* 010921 0x800B0564 8C650004 */ lw $a1, 0X4($v1)
/* 010922 0x800B0568 8C660008 */ lw $a2, 0X8($v1)
/* 010923 0x800B056C 8C67000C */ lw $a3, 0XC($v1)
/* 010924 0x800B0570 AFA30028 */ sw $v1, 0X28($sp)
/* 010925 0x800B0574 0C021407 */ jal load_and_relocate_overlay
/* 010926 0x800B0578 AFA20010 */ sw $v0, 0X10($sp)
/* 010927 0x800B057C 8FA30028 */ lw $v1, 0X28($sp)
/* 010928 0x800B0580 8C620014 */ lw $v0, 0X14($v1)
.L_800B0584:
/* 010929 0x800B0584 00002025 */ move $a0, $zero
/* 010930 0x800B0588 10400006 */ beqz $v0, .L_800B05A4
/* 010931 0x800B058C 00000000 */ nop
/* 010932 0x800B0590 8C6D0008 */ lw $t5, 0X8($v1)
/* 010933 0x800B0594 8C6E0010 */ lw $t6, 0X10($v1)
/* 010934 0x800B0598 01AE7823 */ subu $t7, $t5, $t6
/* 010935 0x800B059C 10000001 */ b .L_800B05A4
/* 010936 0x800B05A0 004F2023 */ subu $a0, $v0, $t7
.L_800B05A4:
/* 010937 0x800B05A4 00801025 */ move $v0, $a0
.L_800B05A8:
/* 010938 0x800B05A8 8C580004 */ lw $t8, 0X4($v0)
/* 010939 0x800B05AC 8FB9003C */ lw $t9, 0X3C($sp)
/* 010940 0x800B05B0 3C0A801B */ lui $t2, %hi(EffectSS2Info)
/* 010941 0x800B05B4 1300002D */ beqz $t8, .L_800B066C
/* 010942 0x800B05B8 00194880 */ sll $t1, $t9, 2
/* 010943 0x800B05BC 8D4AE3A0 */ lw $t2, %lo(EffectSS2Info)($t2)
/* 010944 0x800B05C0 01394823 */ subu $t1, $t1, $t9
/* 010945 0x800B05C4 00094940 */ sll $t1, $t1, 5
/* 010946 0x800B05C8 AFA20030 */ sw $v0, 0X30($sp)
/* 010947 0x800B05CC 0C02C084 */ jal EffectSS_Delete
/* 010948 0x800B05D0 012A2021 */ addu $a0, $t1, $t2
/* 010949 0x800B05D4 8FAD003C */ lw $t5, 0X3C($sp)
/* 010950 0x800B05D8 24030060 */ li $v1, 96
/* 010951 0x800B05DC 3C08801B */ lui $t0, %hi(EffectSS2Info)
/* 010952 0x800B05E0 01A30019 */ multu $t5, $v1
/* 010953 0x800B05E4 2508E3A0 */ addiu $t0, %lo(EffectSS2Info)
/* 010954 0x800B05E8 8D0C0000 */ lw $t4, 0X0($t0)
/* 010955 0x800B05EC 8FAB0044 */ lw $t3, 0X44($sp)
/* 010956 0x800B05F0 8FA20030 */ lw $v0, 0X30($sp)
/* 010957 0x800B05F4 00007012 */ mflo $t6
/* 010958 0x800B05F8 018E7821 */ addu $t7, $t4, $t6
/* 010959 0x800B05FC A1EB005F */ sb $t3, 0X5F($t7)
/* 010960 0x800B0600 8FA9003C */ lw $t1, 0X3C($sp)
/* 010961 0x800B0604 8D190000 */ lw $t9, 0X0($t0)
/* 010962 0x800B0608 8FB80048 */ lw $t8, 0X48($sp)
/* 010963 0x800B060C 01230019 */ multu $t1, $v1
/* 010964 0x800B0610 00005012 */ mflo $t2
/* 010965 0x800B0614 032A6821 */ addu $t5, $t9, $t2
/* 010966 0x800B0618 A1B8005E */ sb $t8, 0X5E($t5)
/* 010967 0x800B061C 8FA5003C */ lw $a1, 0X3C($sp)
/* 010968 0x800B0620 8C590004 */ lw $t9, 0X4($v0)
/* 010969 0x800B0624 8D0B0000 */ lw $t3, 0X0($t0)
/* 010970 0x800B0628 00A30019 */ multu $a1, $v1
/* 010971 0x800B062C 8FA7004C */ lw $a3, 0X4C($sp)
/* 010972 0x800B0630 8FA40040 */ lw $a0, 0X40($sp)
/* 010973 0x800B0634 00007012 */ mflo $t6
/* 010974 0x800B0638 01CB3021 */ addu $a2, $t6, $t3
/* 010975 0x800B063C 0320F809 */ jalr $t9
/* 010976 0x800B0640 00000000 */ nop
/* 010977 0x800B0644 14400009 */ bnez $v0, .L_800B066C
/* 010978 0x800B0648 24030060 */ li $v1, 96
/* 010979 0x800B064C 8FAF003C */ lw $t7, 0X3C($sp)
/* 010980 0x800B0650 3C0A801B */ lui $t2, %hi(EffectSS2Info)
/* 010981 0x800B0654 8D4AE3A0 */ lw $t2, %lo(EffectSS2Info)($t2)
/* 010982 0x800B0658 01E30019 */ multu $t7, $v1
/* 010983 0x800B065C 00004812 */ mflo $t1
/* 010984 0x800B0660 012A2021 */ addu $a0, $t1, $t2
/* 010985 0x800B0664 0C02C09C */ jal EffectSS_ResetLoadedParticleEntry
/* 010986 0x800B0668 00000000 */ nop
.L_800B066C:
/* 010987 0x800B066C 8FBF001C */ lw $ra, 0X1C($sp)
/* 010988 0x800B0670 27BD0040 */ addiu $sp, $sp, 64
/* 010989 0x800B0674 03E00008 */ jr $ra
/* 010990 0x800B0678 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_effect_soft_sprite/EffectSS_LoadParticle.asm")
#endif
@ -445,50 +240,7 @@ void EffectSS_UpdateParticle(z_GlobalContext* ctxt, u32 index) {
#else
GLOBAL_ASM(
glabel EffectSS_UpdateParticle
/* 010991 0x800B067C 27BDFFE8 */ addiu $sp, $sp, -24
/* 010992 0x800B0680 AFBF0014 */ sw $ra, 0X14($sp)
/* 010993 0x800B0684 3C0F801B */ lui $t7, %hi(EffectSS2Info)
/* 010994 0x800B0688 8DEFE3A0 */ lw $t7, %lo(EffectSS2Info)($t7)
/* 010995 0x800B068C 00057080 */ sll $t6, $a1, 2
/* 010996 0x800B0690 01C57023 */ subu $t6, $t6, $a1
/* 010997 0x800B0694 000E7140 */ sll $t6, $t6, 5
/* 010998 0x800B0698 01CF3021 */ addu $a2, $t6, $t7
/* 010999 0x800B069C 8CC20024 */ lw $v0, 0X24($a2)
/* 011000 0x800B06A0 5040001B */ beqzl $v0, .L_800B0710
/* 011001 0x800B06A4 8FBF0014 */ lw $ra, 0X14($sp)
/* 011002 0x800B06A8 C4C4000C */ lwc1 $f4, 0XC($a2)
/* 011003 0x800B06AC C4C60018 */ lwc1 $f6, 0X18($a2)
/* 011004 0x800B06B0 C4CA0010 */ lwc1 $f10, 0X10($a2)
/* 011005 0x800B06B4 C4D0001C */ lwc1 $f16, 0X1C($a2)
/* 011006 0x800B06B8 46062200 */ add.s $f8, $f4, $f6
/* 011007 0x800B06BC C4C60020 */ lwc1 $f6, 0X20($a2)
/* 011008 0x800B06C0 C4C40014 */ lwc1 $f4, 0X14($a2)
/* 011009 0x800B06C4 46105480 */ add.s $f18, $f10, $f16
/* 011010 0x800B06C8 E4C8000C */ swc1 $f8, 0XC($a2)
/* 011011 0x800B06CC C4D0000C */ lwc1 $f16, 0XC($a2)
/* 011012 0x800B06D0 C4CA0000 */ lwc1 $f10, 0X0($a2)
/* 011013 0x800B06D4 46062200 */ add.s $f8, $f4, $f6
/* 011014 0x800B06D8 E4D20010 */ swc1 $f18, 0X10($a2)
/* 011015 0x800B06DC C4C60010 */ lwc1 $f6, 0X10($a2)
/* 011016 0x800B06E0 46105480 */ add.s $f18, $f10, $f16
/* 011017 0x800B06E4 E4C80014 */ swc1 $f8, 0X14($a2)
/* 011018 0x800B06E8 C4C40004 */ lwc1 $f4, 0X4($a2)
/* 011019 0x800B06EC C4D00014 */ lwc1 $f16, 0X14($a2)
/* 011020 0x800B06F0 C4CA0008 */ lwc1 $f10, 0X8($a2)
/* 011021 0x800B06F4 E4D20000 */ swc1 $f18, 0X0($a2)
/* 011022 0x800B06F8 46062200 */ add.s $f8, $f4, $f6
/* 011023 0x800B06FC 46105480 */ add.s $f18, $f10, $f16
/* 011024 0x800B0700 E4C80004 */ swc1 $f8, 0X4($a2)
/* 011025 0x800B0704 0040F809 */ jalr $v0
/* 011026 0x800B0708 E4D20008 */ swc1 $f18, 0X8($a2)
/* 011027 0x800B070C 8FBF0014 */ lw $ra, 0X14($sp)
.L_800B0710:
/* 011028 0x800B0710 27BD0018 */ addiu $sp, $sp, 24
/* 011029 0x800B0714 03E00008 */ jr $ra
/* 011030 0x800B0718 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_effect_soft_sprite/EffectSS_UpdateParticle.asm")
#endif
@ -522,27 +274,7 @@ void EffectSS_DrawParticle(z_GlobalContext* ctxt, s32 index) {
#else
GLOBAL_ASM(
glabel EffectSS_DrawParticle
/* 011078 0x800B07D8 27BDFFE8 */ addiu $sp, $sp, -24
/* 011079 0x800B07DC AFBF0014 */ sw $ra, 0X14($sp)
/* 011080 0x800B07E0 3C0F801B */ lui $t7, %hi(EffectSS2Info)
/* 011081 0x800B07E4 8DEFE3A0 */ lw $t7, %lo(EffectSS2Info)($t7)
/* 011082 0x800B07E8 00057080 */ sll $t6, $a1, 2
/* 011083 0x800B07EC 01C57023 */ subu $t6, $t6, $a1
/* 011084 0x800B07F0 000E7140 */ sll $t6, $t6, 5
/* 011085 0x800B07F4 01CF3021 */ addu $a2, $t6, $t7
/* 011086 0x800B07F8 8CC20028 */ lw $v0, 0X28($a2)
/* 011087 0x800B07FC 50400004 */ beqzl $v0, .L_800B0810
/* 011088 0x800B0800 8FBF0014 */ lw $ra, 0X14($sp)
/* 011089 0x800B0804 0040F809 */ jalr $v0
/* 011090 0x800B0808 00000000 */ nop
/* 011091 0x800B080C 8FBF0014 */ lw $ra, 0X14($sp)
.L_800B0810:
/* 011092 0x800B0810 27BD0018 */ addiu $sp, $sp, 24
/* 011093 0x800B0814 03E00008 */ jr $ra
/* 011094 0x800B0818 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_effect_soft_sprite/EffectSS_DrawParticle.asm")
#endif
@ -588,36 +320,7 @@ s16 func_800B096C(s16 a0, s16 a1, s32 a2) {
#else
GLOBAL_ASM(
glabel func_800B096C
/* 011179 0x800B096C AFA40000 */ sw $a0, 0X0($sp)
/* 011180 0x800B0970 AFA50004 */ sw $a1, 0X4($sp)
/* 011181 0x800B0974 00052C00 */ sll $a1, $a1, 16
/* 011182 0x800B0978 00042400 */ sll $a0, $a0, 16
/* 011183 0x800B097C 00042403 */ sra $a0, $a0, 16
/* 011184 0x800B0980 00052C03 */ sra $a1, $a1, 16
/* 011185 0x800B0984 14C00004 */ bnez $a2, .L_800B0998
/* 011186 0x800B0988 00A47023 */ subu $t6, $a1, $a0
/* 011187 0x800B098C 00051C00 */ sll $v1, $a1, 16
/* 011188 0x800B0990 1000000C */ b .L_800B09C4
/* 011189 0x800B0994 00031C03 */ sra $v1, $v1, 16
.L_800B0998:
/* 011190 0x800B0998 448E2000 */ mtc1 $t6, $f4
/* 011191 0x800B099C 44864000 */ mtc1 $a2, $f8
/* 011192 0x800B09A0 468021A0 */ cvt.s.w $f6, $f4
/* 011193 0x800B09A4 468042A0 */ cvt.s.w $f10, $f8
/* 011194 0x800B09A8 460A3403 */ div.s $f16, $f6, $f10
/* 011195 0x800B09AC 4600848D */ trunc.w.s $f18, $f16
/* 011196 0x800B09B0 44189000 */ mfc1 $t8, $f18
/* 011197 0x800B09B4 00000000 */ nop
/* 011198 0x800B09B8 00981821 */ addu $v1, $a0, $t8
/* 011199 0x800B09BC 00031C00 */ sll $v1, $v1, 16
/* 011200 0x800B09C0 00031C03 */ sra $v1, $v1, 16
.L_800B09C4:
/* 011201 0x800B09C4 00601025 */ move $v0, $v1
/* 011202 0x800B09C8 03E00008 */ jr $ra
/* 011203 0x800B09CC 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_effect_soft_sprite/func_800B096C.asm")
#endif

View File

@ -32,47 +32,7 @@ void* Lib_memset(u8* a0, u32 a1, u32 a2) {
#else
GLOBAL_ASM(
glabel Lib_memset
/* 091264 0x800FECC0 27BDFFE8 */ addiu $sp, $sp, -24
/* 091265 0x800FECC4 AFBF0014 */ sw $ra, 0X14($sp)
/* 091266 0x800FECC8 AFA40018 */ sw $a0, 0X18($sp)
/* 091267 0x800FECCC 14A00006 */ bnez $a1, .L_800FECE8
/* 091268 0x800FECD0 8FA20018 */ lw $v0, 0X18($sp)
/* 091269 0x800FECD4 8FA40018 */ lw $a0, 0X18($sp)
/* 091270 0x800FECD8 0C02258C */ jal _blkclr
/* 091271 0x800FECDC 00C02825 */ move $a1, $a2
/* 091272 0x800FECE0 10000014 */ b .L_800FED34
/* 091273 0x800FECE4 8FA20018 */ lw $v0, 0X18($sp)
.L_800FECE8:
/* 091274 0x800FECE8 18C00011 */ blez $a2, .L_800FED30
/* 091275 0x800FECEC 00C01825 */ move $v1, $a2
/* 091276 0x800FECF0 30C70003 */ andi $a3, $a2, 0X3
/* 091277 0x800FECF4 00073823 */ negu $a3, $a3
/* 091278 0x800FECF8 10E00006 */ beqz $a3, .L_800FED14
/* 091279 0x800FECFC 00E62021 */ addu $a0, $a3, $a2
.L_800FED00:
/* 091280 0x800FED00 2463FFFF */ addiu $v1, $v1, -1
/* 091281 0x800FED04 A0450000 */ sb $a1, 0X0($v0)
/* 091282 0x800FED08 1483FFFD */ bne $a0, $v1, .L_800FED00
/* 091283 0x800FED0C 24420001 */ addiu $v0, $v0, 1
/* 091284 0x800FED10 10600007 */ beqz $v1, .L_800FED30
.L_800FED14:
/* 091285 0x800FED14 2463FFFC */ addiu $v1, $v1, -4
/* 091286 0x800FED18 A0450001 */ sb $a1, 0X1($v0)
/* 091287 0x800FED1C A0450002 */ sb $a1, 0X2($v0)
/* 091288 0x800FED20 A0450003 */ sb $a1, 0X3($v0)
/* 091289 0x800FED24 24420004 */ addiu $v0, $v0, 4
/* 091290 0x800FED28 1460FFFA */ bnez $v1, .L_800FED14
/* 091291 0x800FED2C A045FFFC */ sb $a1, -0X4($v0)
.L_800FED30:
/* 091292 0x800FED30 8FA20018 */ lw $v0, 0X18($sp)
.L_800FED34:
/* 091293 0x800FED34 8FBF0014 */ lw $ra, 0X14($sp)
/* 091294 0x800FED38 27BD0018 */ addiu $sp, $sp, 24
/* 091295 0x800FED3C 03E00008 */ jr $ra
/* 091296 0x800FED40 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/Lib_memset.asm")
#endif
@ -200,49 +160,7 @@ UNK_TYPE Lib_StepTowardsCheck_f(f32* a0, f32 a1, f32 a2) {
#else
GLOBAL_ASM(
glabel Lib_StepTowardsCheck_f
/* 091487 0x800FF03C 44857000 */ mtc1 $a1, $f14
/* 091488 0x800FF040 44866000 */ mtc1 $a2, $f12
/* 091489 0x800FF044 44802000 */ mtc1 $zero, $f4
/* 091490 0x800FF048 00000000 */ nop
/* 091491 0x800FF04C 46046032 */ c.eq.s $f12, $f4
/* 091492 0x800FF050 00000000 */ nop
/* 091493 0x800FF054 45030015 */ bc1tl .L_800FF0AC
/* 091494 0x800FF058 C4840000 */ lwc1 $f4, 0X0($a0)
/* 091495 0x800FF05C C4800000 */ lwc1 $f0, 0X0($a0)
/* 091496 0x800FF060 24020001 */ li $v0, 1
/* 091497 0x800FF064 4600703C */ c.lt.s $f14, $f0
/* 091498 0x800FF068 00000000 */ nop
/* 091499 0x800FF06C 45020003 */ bc1fl .L_800FF07C
/* 091500 0x800FF070 460C0180 */ add.s $f6, $f0, $f12
/* 091501 0x800FF074 46006307 */ neg.s $f12, $f12
/* 091502 0x800FF078 460C0180 */ add.s $f6, $f0, $f12
.L_800FF07C:
/* 091503 0x800FF07C 44809000 */ mtc1 $zero, $f18
/* 091504 0x800FF080 E4860000 */ swc1 $f6, 0X0($a0)
/* 091505 0x800FF084 C4880000 */ lwc1 $f8, 0X0($a0)
/* 091506 0x800FF088 460E4281 */ sub.s $f10, $f8, $f14
/* 091507 0x800FF08C 460C5402 */ mul.s $f16, $f10, $f12
/* 091508 0x800FF090 4610903E */ c.le.s $f18, $f16
/* 091509 0x800FF094 00000000 */ nop
/* 091510 0x800FF098 4502000B */ bc1fl .L_800FF0C8
/* 091511 0x800FF09C 00001025 */ move $v0, $zero
/* 091512 0x800FF0A0 03E00008 */ jr $ra
/* 091513 0x800FF0A4 E48E0000 */ swc1 $f14, 0X0($a0)
/* 091514 0x800FF0A8 C4840000 */ lwc1 $f4, 0X0($a0)
.L_800FF0AC:
/* 091515 0x800FF0AC 46047032 */ c.eq.s $f14, $f4
/* 091516 0x800FF0B0 00000000 */ nop
/* 091517 0x800FF0B4 45020004 */ bc1fl .L_800FF0C8
/* 091518 0x800FF0B8 00001025 */ move $v0, $zero
/* 091519 0x800FF0BC 03E00008 */ jr $ra
/* 091520 0x800FF0C0 24020001 */ li $v0, 1
/* 091521 0x800FF0C4 00001025 */ move $v0, $zero
.L_800FF0C8:
/* 091522 0x800FF0C8 03E00008 */ jr $ra
/* 091523 0x800FF0CC 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/Lib_StepTowardsCheck_f.asm")
#endif
@ -265,36 +183,7 @@ UNK_TYPE func_800FF0D0(s16* a0, s16 a1, s16 a2) {
#else
GLOBAL_ASM(
glabel func_800FF0D0
/* 091524 0x800FF0D0 AFA50004 */ sw $a1, 0X4($sp)
/* 091525 0x800FF0D4 AFA60008 */ sw $a2, 0X8($sp)
/* 091526 0x800FF0D8 00063400 */ sll $a2, $a2, 16
/* 091527 0x800FF0DC 00052C00 */ sll $a1, $a1, 16
/* 091528 0x800FF0E0 00052C03 */ sra $a1, $a1, 16
/* 091529 0x800FF0E4 00063403 */ sra $a2, $a2, 16
/* 091530 0x800FF0E8 84820000 */ lh $v0, 0X0($a0)
/* 091531 0x800FF0EC 00467021 */ addu $t6, $v0, $a2
/* 091532 0x800FF0F0 A48E0000 */ sh $t6, 0X0($a0)
/* 091533 0x800FF0F4 848F0000 */ lh $t7, 0X0($a0)
/* 091534 0x800FF0F8 00454823 */ subu $t1, $v0, $a1
/* 091535 0x800FF0FC 00095400 */ sll $t2, $t1, 16
/* 091536 0x800FF100 01E5C023 */ subu $t8, $t7, $a1
/* 091537 0x800FF104 0018CC00 */ sll $t9, $t8, 16
/* 091538 0x800FF108 00194403 */ sra $t0, $t9, 16
/* 091539 0x800FF10C 000A5C03 */ sra $t3, $t2, 16
/* 091540 0x800FF110 010B0019 */ multu $t0, $t3
/* 091541 0x800FF114 00001025 */ move $v0, $zero
/* 091542 0x800FF118 00006012 */ mflo $t4
/* 091543 0x800FF11C 1D800004 */ bgtz $t4, .L_800FF130
/* 091544 0x800FF120 00000000 */ nop
/* 091545 0x800FF124 A4850000 */ sh $a1, 0X0($a0)
/* 091546 0x800FF128 03E00008 */ jr $ra
/* 091547 0x800FF12C 24020001 */ li $v0, 1
.L_800FF130:
/* 091548 0x800FF130 03E00008 */ jr $ra
/* 091549 0x800FF134 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/func_800FF0D0.asm")
#endif
@ -306,63 +195,7 @@ UNK_RET func_800FF138() {
#else
GLOBAL_ASM(
glabel func_800FF138
/* 091550 0x800FF138 AFA50004 */ sw $a1, 0X4($sp)
/* 091551 0x800FF13C AFA60008 */ sw $a2, 0X8($sp)
/* 091552 0x800FF140 00063400 */ sll $a2, $a2, 16
/* 091553 0x800FF144 00052C00 */ sll $a1, $a1, 16
/* 091554 0x800FF148 00052C03 */ sra $a1, $a1, 16
/* 091555 0x800FF14C 00063403 */ sra $a2, $a2, 16
/* 091556 0x800FF150 84830000 */ lh $v1, 0X0($a0)
/* 091557 0x800FF154 34018000 */ ori $at, $zero, 0X8000
/* 091558 0x800FF158 3C0FFFFF */ lui $t7, 0xFFFF
/* 091559 0x800FF15C 00A31023 */ subu $v0, $a1, $v1
/* 091560 0x800FF160 04410004 */ bgez $v0, .L_800FF174
/* 091561 0x800FF164 0041082A */ slt $at, $v0, $at
/* 091562 0x800FF168 00063023 */ negu $a2, $a2
/* 091563 0x800FF16C 00063400 */ sll $a2, $a2, 16
/* 091564 0x800FF170 00063403 */ sra $a2, $a2, 16
.L_800FF174:
/* 091565 0x800FF174 14200007 */ bnez $at, .L_800FF194
/* 091566 0x800FF178 00027023 */ negu $t6, $v0
/* 091567 0x800FF17C 00063023 */ negu $a2, $a2
/* 091568 0x800FF180 00063400 */ sll $a2, $a2, 16
/* 091569 0x800FF184 35EF0001 */ ori $t7, $t7, 0X1
/* 091570 0x800FF188 00063403 */ sra $a2, $a2, 16
/* 091571 0x800FF18C 10000009 */ b .L_800FF1B4
/* 091572 0x800FF190 01EE1023 */ subu $v0, $t7, $t6
.L_800FF194:
/* 091573 0x800FF194 28418001 */ slti $at, $v0, -32767
/* 091574 0x800FF198 10200006 */ beqz $at, .L_800FF1B4
/* 091575 0x800FF19C 00000000 */ nop
/* 091576 0x800FF1A0 00063023 */ negu $a2, $a2
/* 091577 0x800FF1A4 3401FFFF */ ori $at, $zero, 0XFFFF
/* 091578 0x800FF1A8 00063400 */ sll $a2, $a2, 16
/* 091579 0x800FF1AC 00411021 */ addu $v0, $v0, $at
/* 091580 0x800FF1B0 00063403 */ sra $a2, $a2, 16
.L_800FF1B4:
/* 091581 0x800FF1B4 10C0000A */ beqz $a2, .L_800FF1E0
/* 091582 0x800FF1B8 00000000 */ nop
/* 091583 0x800FF1BC 00C20019 */ multu $a2, $v0
/* 091584 0x800FF1C0 0066C021 */ addu $t8, $v1, $a2
/* 091585 0x800FF1C4 A4980000 */ sh $t8, 0X0($a0)
/* 091586 0x800FF1C8 24020001 */ li $v0, 1
/* 091587 0x800FF1CC 0000C812 */ mflo $t9
/* 091588 0x800FF1D0 5F200008 */ bgtzl $t9, .L_800FF1F4
/* 091589 0x800FF1D4 00001025 */ move $v0, $zero
/* 091590 0x800FF1D8 03E00008 */ jr $ra
/* 091591 0x800FF1DC A4850000 */ sh $a1, 0X0($a0)
.L_800FF1E0:
/* 091592 0x800FF1E0 54A30004 */ bnel $a1, $v1, .L_800FF1F4
/* 091593 0x800FF1E4 00001025 */ move $v0, $zero
/* 091594 0x800FF1E8 03E00008 */ jr $ra
/* 091595 0x800FF1EC 24020001 */ li $v0, 1
/* 091596 0x800FF1F0 00001025 */ move $v0, $zero
.L_800FF1F4:
/* 091597 0x800FF1F4 03E00008 */ jr $ra
/* 091598 0x800FF1F8 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/func_800FF138.asm")
#endif
@ -374,56 +207,7 @@ UNK_RET func_800FF1FC() {
#else
GLOBAL_ASM(
glabel func_800FF1FC
/* 091599 0x800FF1FC AFA50004 */ sw $a1, 0X4($sp)
/* 091600 0x800FF200 AFA60008 */ sw $a2, 0X8($sp)
/* 091601 0x800FF204 AFA7000C */ sw $a3, 0XC($sp)
/* 091602 0x800FF208 00073C00 */ sll $a3, $a3, 16
/* 091603 0x800FF20C 00063400 */ sll $a2, $a2, 16
/* 091604 0x800FF210 00052C00 */ sll $a1, $a1, 16
/* 091605 0x800FF214 00052C03 */ sra $a1, $a1, 16
/* 091606 0x800FF218 00063403 */ sra $a2, $a2, 16
/* 091607 0x800FF21C 00073C03 */ sra $a3, $a3, 16
/* 091608 0x800FF220 84820000 */ lh $v0, 0X0($a0)
/* 091609 0x800FF224 00071C00 */ sll $v1, $a3, 16
/* 091610 0x800FF228 00031C03 */ sra $v1, $v1, 16
/* 091611 0x800FF22C 00A27023 */ subu $t6, $a1, $v0
/* 091612 0x800FF230 05C00004 */ bltz $t6, .L_800FF244
/* 091613 0x800FF234 00A2082A */ slt $at, $a1, $v0
/* 091614 0x800FF238 00061C00 */ sll $v1, $a2, 16
/* 091615 0x800FF23C 10000001 */ b .L_800FF244
/* 091616 0x800FF240 00031C03 */ sra $v1, $v1, 16
.L_800FF244:
/* 091617 0x800FF244 10600011 */ beqz $v1, .L_800FF28C
/* 091618 0x800FF248 00000000 */ nop
/* 091619 0x800FF24C 50200005 */ beqzl $at, .L_800FF264
/* 091620 0x800FF250 00437821 */ addu $t7, $v0, $v1
/* 091621 0x800FF254 00031823 */ negu $v1, $v1
/* 091622 0x800FF258 00031C00 */ sll $v1, $v1, 16
/* 091623 0x800FF25C 00031C03 */ sra $v1, $v1, 16
/* 091624 0x800FF260 00437821 */ addu $t7, $v0, $v1
.L_800FF264:
/* 091625 0x800FF264 A48F0000 */ sh $t7, 0X0($a0)
/* 091626 0x800FF268 84980000 */ lh $t8, 0X0($a0)
/* 091627 0x800FF26C 24020001 */ li $v0, 1
/* 091628 0x800FF270 0305C823 */ subu $t9, $t8, $a1
/* 091629 0x800FF274 03230019 */ multu $t9, $v1
/* 091630 0x800FF278 00004012 */ mflo $t0
/* 091631 0x800FF27C 05020008 */ bltzl $t0, .L_800FF2A0
/* 091632 0x800FF280 00001025 */ move $v0, $zero
/* 091633 0x800FF284 03E00008 */ jr $ra
/* 091634 0x800FF288 A4850000 */ sh $a1, 0X0($a0)
.L_800FF28C:
/* 091635 0x800FF28C 54A20004 */ bnel $a1, $v0, .L_800FF2A0
/* 091636 0x800FF290 00001025 */ move $v0, $zero
/* 091637 0x800FF294 03E00008 */ jr $ra
/* 091638 0x800FF298 24020001 */ li $v0, 1
/* 091639 0x800FF29C 00001025 */ move $v0, $zero
.L_800FF2A0:
/* 091640 0x800FF2A0 03E00008 */ jr $ra
/* 091641 0x800FF2A4 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/func_800FF1FC.asm")
#endif
@ -435,30 +219,7 @@ UNK_RET func_800FF2A8() {
#else
GLOBAL_ASM(
glabel func_800FF2A8
/* 091642 0x800FF2A8 44857000 */ mtc1 $a1, $f14
/* 091643 0x800FF2AC 44866000 */ mtc1 $a2, $f12
/* 091644 0x800FF2B0 00001025 */ move $v0, $zero
/* 091645 0x800FF2B4 C4820000 */ lwc1 $f2, 0X0($a0)
/* 091646 0x800FF2B8 44803000 */ mtc1 $zero, $f6
/* 091647 0x800FF2BC 460C1100 */ add.s $f4, $f2, $f12
/* 091648 0x800FF2C0 460E1401 */ sub.s $f16, $f2, $f14
/* 091649 0x800FF2C4 E4840000 */ swc1 $f4, 0X0($a0)
/* 091650 0x800FF2C8 C4880000 */ lwc1 $f8, 0X0($a0)
/* 091651 0x800FF2CC 460E4281 */ sub.s $f10, $f8, $f14
/* 091652 0x800FF2D0 46105482 */ mul.s $f18, $f10, $f16
/* 091653 0x800FF2D4 4606903E */ c.le.s $f18, $f6
/* 091654 0x800FF2D8 00000000 */ nop
/* 091655 0x800FF2DC 45000004 */ bc1f .L_800FF2F0
/* 091656 0x800FF2E0 00000000 */ nop
/* 091657 0x800FF2E4 E48E0000 */ swc1 $f14, 0X0($a0)
/* 091658 0x800FF2E8 03E00008 */ jr $ra
/* 091659 0x800FF2EC 24020001 */ li $v0, 1
.L_800FF2F0:
/* 091660 0x800FF2F0 03E00008 */ jr $ra
/* 091661 0x800FF2F4 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/func_800FF2A8.asm")
#endif
@ -470,55 +231,7 @@ UNK_RET func_800FF2F8() {
#else
GLOBAL_ASM(
glabel func_800FF2F8
/* 091662 0x800FF2F8 44856000 */ mtc1 $a1, $f12
/* 091663 0x800FF2FC 44867000 */ mtc1 $a2, $f14
/* 091664 0x800FF300 AFA7000C */ sw $a3, 0XC($sp)
/* 091665 0x800FF304 C4800000 */ lwc1 $f0, 0X0($a0)
/* 091666 0x800FF308 C7A2000C */ lwc1 $f2, 0XC($sp)
/* 091667 0x800FF30C 460C003E */ c.le.s $f0, $f12
/* 091668 0x800FF310 00000000 */ nop
/* 091669 0x800FF314 45000003 */ bc1f .L_800FF324
/* 091670 0x800FF318 00000000 */ nop
/* 091671 0x800FF31C 10000001 */ b .L_800FF324
/* 091672 0x800FF320 46007086 */ mov.s $f2, $f14
.L_800FF324:
/* 091673 0x800FF324 44807000 */ mtc1 $zero, $f14
/* 091674 0x800FF328 00000000 */ nop
/* 091675 0x800FF32C 460E1032 */ c.eq.s $f2, $f14
/* 091676 0x800FF330 00000000 */ nop
/* 091677 0x800FF334 45030012 */ bc1tl .L_800FF380
/* 091678 0x800FF338 46006032 */ c.eq.s $f12, $f0
/* 091679 0x800FF33C 4600603C */ c.lt.s $f12, $f0
/* 091680 0x800FF340 24020001 */ li $v0, 1
/* 091681 0x800FF344 45020003 */ bc1fl .L_800FF354
/* 091682 0x800FF348 46020100 */ add.s $f4, $f0, $f2
/* 091683 0x800FF34C 46001087 */ neg.s $f2, $f2
/* 091684 0x800FF350 46020100 */ add.s $f4, $f0, $f2
.L_800FF354:
/* 091685 0x800FF354 E4840000 */ swc1 $f4, 0X0($a0)
/* 091686 0x800FF358 C4860000 */ lwc1 $f6, 0X0($a0)
/* 091687 0x800FF35C 460C3201 */ sub.s $f8, $f6, $f12
/* 091688 0x800FF360 46024282 */ mul.s $f10, $f8, $f2
/* 091689 0x800FF364 460A703E */ c.le.s $f14, $f10
/* 091690 0x800FF368 00000000 */ nop
/* 091691 0x800FF36C 4502000A */ bc1fl .L_800FF398
/* 091692 0x800FF370 00001025 */ move $v0, $zero
/* 091693 0x800FF374 03E00008 */ jr $ra
/* 091694 0x800FF378 E48C0000 */ swc1 $f12, 0X0($a0)
/* 091695 0x800FF37C 46006032 */ c.eq.s $f12, $f0
.L_800FF380:
/* 091696 0x800FF380 00000000 */ nop
/* 091697 0x800FF384 45020004 */ bc1fl .L_800FF398
/* 091698 0x800FF388 00001025 */ move $v0, $zero
/* 091699 0x800FF38C 03E00008 */ jr $ra
/* 091700 0x800FF390 24020001 */ li $v0, 1
/* 091701 0x800FF394 00001025 */ move $v0, $zero
.L_800FF398:
/* 091702 0x800FF398 03E00008 */ jr $ra
/* 091703 0x800FF39C 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/func_800FF2F8.asm")
#endif
@ -530,56 +243,7 @@ UNK_RET func_800FF3A0() {
#else
GLOBAL_ASM(
glabel func_800FF3A0
/* 091704 0x800FF3A0 3C014270 */ lui $at, 0x4270
/* 091705 0x800FF3A4 27BDFFE8 */ addiu $sp, $sp, -24
/* 091706 0x800FF3A8 44817000 */ mtc1 $at, $f14
/* 091707 0x800FF3AC AFBF0014 */ sw $ra, 0X14($sp)
/* 091708 0x800FF3B0 80CE0014 */ lb $t6, 0X14($a2)
/* 091709 0x800FF3B4 80CF0015 */ lb $t7, 0X15($a2)
/* 091710 0x800FF3B8 44808000 */ mtc1 $zero, $f16
/* 091711 0x800FF3BC 448E2000 */ mtc1 $t6, $f4
/* 091712 0x800FF3C0 448F3000 */ mtc1 $t7, $f6
/* 091713 0x800FF3C4 468020A0 */ cvt.s.w $f2, $f4
/* 091714 0x800FF3C8 46803320 */ cvt.s.w $f12, $f6
/* 091715 0x800FF3CC 46021202 */ mul.s $f8, $f2, $f2
/* 091716 0x800FF3D0 00000000 */ nop
/* 091717 0x800FF3D4 460C6282 */ mul.s $f10, $f12, $f12
/* 091718 0x800FF3D8 460A4000 */ add.s $f0, $f8, $f10
/* 091719 0x800FF3DC 46000004 */ sqrt.s $f0, $f0
/* 091720 0x800FF3E0 4600703C */ c.lt.s $f14, $f0
/* 091721 0x800FF3E4 00000000 */ nop
/* 091722 0x800FF3E8 45000003 */ bc1f .L_800FF3F8
/* 091723 0x800FF3EC 00000000 */ nop
/* 091724 0x800FF3F0 10000002 */ b .L_800FF3FC
/* 091725 0x800FF3F4 E48E0000 */ swc1 $f14, 0X0($a0)
.L_800FF3F8:
/* 091726 0x800FF3F8 E4800000 */ swc1 $f0, 0X0($a0)
.L_800FF3FC:
/* 091727 0x800FF3FC 4600803C */ c.lt.s $f16, $f0
/* 091728 0x800FF400 00000000 */ nop
/* 091729 0x800FF404 4502000E */ bc1fl .L_800FF440
/* 091730 0x800FF408 A4A00000 */ sh $zero, 0X0($a1)
/* 091731 0x800FF40C 80D80002 */ lb $t8, 0X2($a2)
/* 091732 0x800FF410 80D90003 */ lb $t9, 0X3($a2)
/* 091733 0x800FF414 AFA5001C */ sw $a1, 0X1C($sp)
/* 091734 0x800FF418 44989000 */ mtc1 $t8, $f18
/* 091735 0x800FF41C 44992000 */ mtc1 $t9, $f4
/* 091736 0x800FF420 468090A0 */ cvt.s.w $f2, $f18
/* 091737 0x800FF424 46802320 */ cvt.s.w $f12, $f4
/* 091738 0x800FF428 0C060040 */ jal atans_flip
/* 091739 0x800FF42C 46001387 */ neg.s $f14, $f2
/* 091740 0x800FF430 8FA5001C */ lw $a1, 0X1C($sp)
/* 091741 0x800FF434 10000002 */ b .L_800FF440
/* 091742 0x800FF438 A4A20000 */ sh $v0, 0X0($a1)
/* 091743 0x800FF43C A4A00000 */ sh $zero, 0X0($a1)
.L_800FF440:
/* 091744 0x800FF440 8FBF0014 */ lw $ra, 0X14($sp)
/* 091745 0x800FF444 27BD0018 */ addiu $sp, $sp, 24
/* 091746 0x800FF448 03E00008 */ jr $ra
/* 091747 0x800FF44C 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/func_800FF3A0.asm")
#endif
@ -737,53 +401,7 @@ UNK_RET Lib_PushAwayXZVec3f(z_Vector3D* a0, z_Vector3D* a1, f32 a2) {
#else
GLOBAL_ASM(
glabel Lib_PushAwayXZVec3f
/* 092089 0x800FF9A4 27BDFFD8 */ addiu $sp, $sp, -40
/* 092090 0x800FF9A8 AFA5002C */ sw $a1, 0X2C($sp)
/* 092091 0x800FF9AC 00802825 */ move $a1, $a0
/* 092092 0x800FF9B0 AFBF0014 */ sw $ra, 0X14($sp)
/* 092093 0x800FF9B4 AFA40028 */ sw $a0, 0X28($sp)
/* 092094 0x800FF9B8 AFA60030 */ sw $a2, 0X30($sp)
/* 092095 0x800FF9BC 8FA4002C */ lw $a0, 0X2C($sp)
/* 092096 0x800FF9C0 27A60024 */ addiu $a2, $sp, 36
/* 092097 0x800FF9C4 27A70020 */ addiu $a3, $sp, 32
/* 092098 0x800FF9C8 0C03FE58 */ jal Lib_DistanceAndDifferenceXZVec3f
/* 092099 0x800FF9CC AFA50028 */ sw $a1, 0X28($sp)
/* 092100 0x800FF9D0 C7A20030 */ lwc1 $f2, 0X30($sp)
/* 092101 0x800FF9D4 44807000 */ mtc1 $zero, $f14
/* 092102 0x800FF9D8 8FA2002C */ lw $v0, 0X2C($sp)
/* 092103 0x800FF9DC 4602003C */ c.lt.s $f0, $f2
/* 092104 0x800FF9E0 8FA50028 */ lw $a1, 0X28($sp)
/* 092105 0x800FF9E4 C7A60024 */ lwc1 $f6, 0X24($sp)
/* 092106 0x800FF9E8 46020301 */ sub.s $f12, $f0, $f2
/* 092107 0x800FF9EC 45020004 */ bc1fl .L_800FFA00
/* 092108 0x800FF9F0 460E6032 */ c.eq.s $f12, $f14
/* 092109 0x800FF9F4 44806000 */ mtc1 $zero, $f12
/* 092110 0x800FF9F8 00000000 */ nop
/* 092111 0x800FF9FC 460E6032 */ c.eq.s $f12, $f14
.L_800FFA00:
/* 092112 0x800FFA00 00000000 */ nop
/* 092113 0x800FFA04 45020004 */ bc1fl .L_800FFA18
/* 092114 0x800FFA08 46006083 */ div.s $f2, $f12, $f0
/* 092115 0x800FFA0C 10000002 */ b .L_800FFA18
/* 092116 0x800FFA10 46007086 */ mov.s $f2, $f14
/* 092117 0x800FFA14 46006083 */ div.s $f2, $f12, $f0
.L_800FFA18:
/* 092118 0x800FFA18 46023202 */ mul.s $f8, $f6, $f2
/* 092119 0x800FFA1C C4440000 */ lwc1 $f4, 0X0($v0)
/* 092120 0x800FFA20 46006006 */ mov.s $f0, $f12
/* 092121 0x800FFA24 46082280 */ add.s $f10, $f4, $f8
/* 092122 0x800FFA28 E4AA0000 */ swc1 $f10, 0X0($a1)
/* 092123 0x800FFA2C C7B20020 */ lwc1 $f18, 0X20($sp)
/* 092124 0x800FFA30 C4500008 */ lwc1 $f16, 0X8($v0)
/* 092125 0x800FFA34 46029182 */ mul.s $f6, $f18, $f2
/* 092126 0x800FFA38 46068100 */ add.s $f4, $f16, $f6
/* 092127 0x800FFA3C E4A40008 */ swc1 $f4, 0X8($a1)
/* 092128 0x800FFA40 8FBF0014 */ lw $ra, 0X14($sp)
/* 092129 0x800FFA44 03E00008 */ jr $ra
/* 092130 0x800FFA48 27BD0028 */ addiu $sp, $sp, 40
)
GLOBAL_ASM("./asm/nonmatching/z_lib/Lib_PushAwayXZVec3f.asm")
#endif
@ -942,89 +560,7 @@ s16 Lib_ScaleMaxMin_s(s16* a0, s16 a1, s16 a2, s16 a3, s16 a4) {
#else
GLOBAL_ASM(
glabel Lib_ScaleMaxMin_s
/* 092415 0x800FFEBC AFA50004 */ sw $a1, 0X4($sp)
/* 092416 0x800FFEC0 AFA60008 */ sw $a2, 0X8($sp)
/* 092417 0x800FFEC4 00063400 */ sll $a2, $a2, 16
/* 092418 0x800FFEC8 00052C00 */ sll $a1, $a1, 16
/* 092419 0x800FFECC 00052C03 */ sra $a1, $a1, 16
/* 092420 0x800FFED0 00063403 */ sra $a2, $a2, 16
/* 092421 0x800FFED4 AFA7000C */ sw $a3, 0XC($sp)
/* 092422 0x800FFED8 84880000 */ lh $t0, 0X0($a0)
/* 092423 0x800FFEDC 87A90012 */ lh $t1, 0X12($sp)
/* 092424 0x800FFEE0 00A81823 */ subu $v1, $a1, $t0
/* 092425 0x800FFEE4 00031C00 */ sll $v1, $v1, 16
/* 092426 0x800FFEE8 10A80038 */ beq $a1, $t0, .L_800FFFCC
/* 092427 0x800FFEEC 00031C03 */ sra $v1, $v1, 16
/* 092428 0x800FFEF0 0066001A */ div $zero, $v1, $a2
/* 092429 0x800FFEF4 14C00002 */ bnez $a2, .L_800FFF00
/* 092430 0x800FFEF8 00000000 */ nop
/* 092431 0x800FFEFC 0007000D */ break 0x00007
.L_800FFF00:
/* 092432 0x800FFF00 2401FFFF */ li $at, -1
/* 092433 0x800FFF04 14C10004 */ bne $a2, $at, .L_800FFF18
/* 092434 0x800FFF08 3C018000 */ lui $at, 0x8000
/* 092435 0x800FFF0C 14610002 */ bne $v1, $at, .L_800FFF18
/* 092436 0x800FFF10 00000000 */ nop
/* 092437 0x800FFF14 0006000D */ break 0x00006
.L_800FFF18:
/* 092438 0x800FFF18 00003812 */ mflo $a3
/* 092439 0x800FFF1C 00075400 */ sll $t2, $a3, 16
/* 092440 0x800FFF20 000A5403 */ sra $t2, $t2, 16
/* 092441 0x800FFF24 00071400 */ sll $v0, $a3, 16
/* 092442 0x800FFF28 012A082A */ slt $at, $t1, $t2
/* 092443 0x800FFF2C 14200005 */ bnez $at, .L_800FFF44
/* 092444 0x800FFF30 00021403 */ sra $v0, $v0, 16
/* 092445 0x800FFF34 00097023 */ negu $t6, $t1
/* 092446 0x800FFF38 014E082A */ slt $at, $t2, $t6
/* 092447 0x800FFF3C 1020000F */ beqz $at, .L_800FFF7C
/* 092448 0x800FFF40 00000000 */ nop
.L_800FFF44:
/* 092449 0x800FFF44 87AF000E */ lh $t7, 0XE($sp)
/* 092450 0x800FFF48 87A5000E */ lh $a1, 0XE($sp)
/* 092451 0x800FFF4C 01EA082A */ slt $at, $t7, $t2
/* 092452 0x800FFF50 10200002 */ beqz $at, .L_800FFF5C
/* 092453 0x800FFF54 00052823 */ negu $a1, $a1
/* 092454 0x800FFF58 01E01025 */ move $v0, $t7
.L_800FFF5C:
/* 092455 0x800FFF5C 0045082A */ slt $at, $v0, $a1
/* 092456 0x800FFF60 50200004 */ beqzl $at, .L_800FFF74
/* 092457 0x800FFF64 0102C021 */ addu $t8, $t0, $v0
/* 092458 0x800FFF68 00051400 */ sll $v0, $a1, 16
/* 092459 0x800FFF6C 00021403 */ sra $v0, $v0, 16
/* 092460 0x800FFF70 0102C021 */ addu $t8, $t0, $v0
.L_800FFF74:
/* 092461 0x800FFF74 10000015 */ b .L_800FFFCC
/* 092462 0x800FFF78 A4980000 */ sh $t8, 0X0($a0)
.L_800FFF7C:
/* 092463 0x800FFF7C 0460000B */ bltz $v1, .L_800FFFAC
/* 092464 0x800FFF80 01097823 */ subu $t7, $t0, $t1
/* 092465 0x800FFF84 0109C821 */ addu $t9, $t0, $t1
/* 092466 0x800FFF88 A4990000 */ sh $t9, 0X0($a0)
/* 092467 0x800FFF8C 848B0000 */ lh $t3, 0X0($a0)
/* 092468 0x800FFF90 00AB6023 */ subu $t4, $a1, $t3
/* 092469 0x800FFF94 000C6C00 */ sll $t5, $t4, 16
/* 092470 0x800FFF98 000D7403 */ sra $t6, $t5, 16
/* 092471 0x800FFF9C 5DC0000C */ bgtzl $t6, .L_800FFFD0
/* 092472 0x800FFFA0 00601025 */ move $v0, $v1
/* 092473 0x800FFFA4 10000009 */ b .L_800FFFCC
/* 092474 0x800FFFA8 A4850000 */ sh $a1, 0X0($a0)
.L_800FFFAC:
/* 092475 0x800FFFAC A48F0000 */ sh $t7, 0X0($a0)
/* 092476 0x800FFFB0 84980000 */ lh $t8, 0X0($a0)
/* 092477 0x800FFFB4 00B8C823 */ subu $t9, $a1, $t8
/* 092478 0x800FFFB8 00195C00 */ sll $t3, $t9, 16
/* 092479 0x800FFFBC 000B6403 */ sra $t4, $t3, 16
/* 092480 0x800FFFC0 05820003 */ bltzl $t4, .L_800FFFD0
/* 092481 0x800FFFC4 00601025 */ move $v0, $v1
/* 092482 0x800FFFC8 A4850000 */ sh $a1, 0X0($a0)
.L_800FFFCC:
/* 092483 0x800FFFCC 00601025 */ move $v0, $v1
.L_800FFFD0:
/* 092484 0x800FFFD0 03E00008 */ jr $ra
/* 092485 0x800FFFD4 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/Lib_ScaleMaxMin_s.asm")
#endif
@ -1086,188 +622,7 @@ void Lib_LerpRGB(u8* a0, u8* a1, f32 a2, u8* a3) {
#else
GLOBAL_ASM(
glabel Lib_LerpRGB
/* 092606 0x801001B8 44866000 */ mtc1 $a2, $f12
/* 092607 0x801001BC 00000000 */ nop
/* 092608 0x801001C0 908E0000 */ lbu $t6, 0X0($a0)
/* 092609 0x801001C4 3C014F80 */ lui $at, 0x4F80
/* 092610 0x801001C8 448E2000 */ mtc1 $t6, $f4
/* 092611 0x801001CC 05C10004 */ bgez $t6, .L_801001E0
/* 092612 0x801001D0 46802020 */ cvt.s.w $f0, $f4
/* 092613 0x801001D4 44813000 */ mtc1 $at, $f6
/* 092614 0x801001D8 00000000 */ nop
/* 092615 0x801001DC 46060000 */ add.s $f0, $f0, $f6
.L_801001E0:
/* 092616 0x801001E0 90AF0000 */ lbu $t7, 0X0($a1)
/* 092617 0x801001E4 3C014F80 */ lui $at, 0x4F80
/* 092618 0x801001E8 448F4000 */ mtc1 $t7, $f8
/* 092619 0x801001EC 05E10004 */ bgez $t7, .L_80100200
/* 092620 0x801001F0 468042A0 */ cvt.s.w $f10, $f8
/* 092621 0x801001F4 44818000 */ mtc1 $at, $f16
/* 092622 0x801001F8 00000000 */ nop
/* 092623 0x801001FC 46105280 */ add.s $f10, $f10, $f16
.L_80100200:
/* 092624 0x80100200 46005481 */ sub.s $f18, $f10, $f0
/* 092625 0x80100204 24190001 */ li $t9, 1
/* 092626 0x80100208 3C014F00 */ lui $at, 0x4F00
/* 092627 0x8010020C 460C9102 */ mul.s $f4, $f18, $f12
/* 092628 0x80100210 46002180 */ add.s $f6, $f4, $f0
/* 092629 0x80100214 4458F800 */ cfc1 $t8, $31
/* 092630 0x80100218 44D9F800 */ ctc1 $t9, $31
/* 092631 0x8010021C 00000000 */ nop
/* 092632 0x80100220 46003224 */ cvt.w.s $f8, $f6
/* 092633 0x80100224 4459F800 */ cfc1 $t9, $31
/* 092634 0x80100228 00000000 */ nop
/* 092635 0x8010022C 33390078 */ andi $t9, $t9, 0X78
/* 092636 0x80100230 53200013 */ beqzl $t9, .L_80100280
/* 092637 0x80100234 44194000 */ mfc1 $t9, $f8
/* 092638 0x80100238 44814000 */ mtc1 $at, $f8
/* 092639 0x8010023C 24190001 */ li $t9, 1
/* 092640 0x80100240 46083201 */ sub.s $f8, $f6, $f8
/* 092641 0x80100244 44D9F800 */ ctc1 $t9, $31
/* 092642 0x80100248 00000000 */ nop
/* 092643 0x8010024C 46004224 */ cvt.w.s $f8, $f8
/* 092644 0x80100250 4459F800 */ cfc1 $t9, $31
/* 092645 0x80100254 00000000 */ nop
/* 092646 0x80100258 33390078 */ andi $t9, $t9, 0X78
/* 092647 0x8010025C 17200005 */ bnez $t9, .L_80100274
/* 092648 0x80100260 00000000 */ nop
/* 092649 0x80100264 44194000 */ mfc1 $t9, $f8
/* 092650 0x80100268 3C018000 */ lui $at, 0x8000
/* 092651 0x8010026C 10000007 */ b .L_8010028C
/* 092652 0x80100270 0321C825 */ or $t9, $t9, $at
.L_80100274:
/* 092653 0x80100274 10000005 */ b .L_8010028C
/* 092654 0x80100278 2419FFFF */ li $t9, -1
/* 092655 0x8010027C 44194000 */ mfc1 $t9, $f8
.L_80100280:
/* 092656 0x80100280 00000000 */ nop
/* 092657 0x80100284 0720FFFB */ bltz $t9, .L_80100274
/* 092658 0x80100288 00000000 */ nop
.L_8010028C:
/* 092659 0x8010028C A0F90000 */ sb $t9, 0X0($a3)
/* 092660 0x80100290 90880001 */ lbu $t0, 0X1($a0)
/* 092661 0x80100294 44D8F800 */ ctc1 $t8, $31
/* 092662 0x80100298 3C014F80 */ lui $at, 0x4F80
/* 092663 0x8010029C 44888000 */ mtc1 $t0, $f16
/* 092664 0x801002A0 05010004 */ bgez $t0, .L_801002B4
/* 092665 0x801002A4 46808020 */ cvt.s.w $f0, $f16
/* 092666 0x801002A8 44815000 */ mtc1 $at, $f10
/* 092667 0x801002AC 00000000 */ nop
/* 092668 0x801002B0 460A0000 */ add.s $f0, $f0, $f10
.L_801002B4:
/* 092669 0x801002B4 90A90001 */ lbu $t1, 0X1($a1)
/* 092670 0x801002B8 3C014F80 */ lui $at, 0x4F80
/* 092671 0x801002BC 44899000 */ mtc1 $t1, $f18
/* 092672 0x801002C0 05210004 */ bgez $t1, .L_801002D4
/* 092673 0x801002C4 46809120 */ cvt.s.w $f4, $f18
/* 092674 0x801002C8 44813000 */ mtc1 $at, $f6
/* 092675 0x801002CC 00000000 */ nop
/* 092676 0x801002D0 46062100 */ add.s $f4, $f4, $f6
.L_801002D4:
/* 092677 0x801002D4 46002201 */ sub.s $f8, $f4, $f0
/* 092678 0x801002D8 240B0001 */ li $t3, 1
/* 092679 0x801002DC 3C014F00 */ lui $at, 0x4F00
/* 092680 0x801002E0 460C4402 */ mul.s $f16, $f8, $f12
/* 092681 0x801002E4 46008280 */ add.s $f10, $f16, $f0
/* 092682 0x801002E8 444AF800 */ cfc1 $t2, $31
/* 092683 0x801002EC 44CBF800 */ ctc1 $t3, $31
/* 092684 0x801002F0 00000000 */ nop
/* 092685 0x801002F4 460054A4 */ cvt.w.s $f18, $f10
/* 092686 0x801002F8 444BF800 */ cfc1 $t3, $31
/* 092687 0x801002FC 00000000 */ nop
/* 092688 0x80100300 316B0078 */ andi $t3, $t3, 0X78
/* 092689 0x80100304 51600013 */ beqzl $t3, .L_80100354
/* 092690 0x80100308 440B9000 */ mfc1 $t3, $f18
/* 092691 0x8010030C 44819000 */ mtc1 $at, $f18
/* 092692 0x80100310 240B0001 */ li $t3, 1
/* 092693 0x80100314 46125481 */ sub.s $f18, $f10, $f18
/* 092694 0x80100318 44CBF800 */ ctc1 $t3, $31
/* 092695 0x8010031C 00000000 */ nop
/* 092696 0x80100320 460094A4 */ cvt.w.s $f18, $f18
/* 092697 0x80100324 444BF800 */ cfc1 $t3, $31
/* 092698 0x80100328 00000000 */ nop
/* 092699 0x8010032C 316B0078 */ andi $t3, $t3, 0X78
/* 092700 0x80100330 15600005 */ bnez $t3, .L_80100348
/* 092701 0x80100334 00000000 */ nop
/* 092702 0x80100338 440B9000 */ mfc1 $t3, $f18
/* 092703 0x8010033C 3C018000 */ lui $at, 0x8000
/* 092704 0x80100340 10000007 */ b .L_80100360
/* 092705 0x80100344 01615825 */ or $t3, $t3, $at
.L_80100348:
/* 092706 0x80100348 10000005 */ b .L_80100360
/* 092707 0x8010034C 240BFFFF */ li $t3, -1
/* 092708 0x80100350 440B9000 */ mfc1 $t3, $f18
.L_80100354:
/* 092709 0x80100354 00000000 */ nop
/* 092710 0x80100358 0560FFFB */ bltz $t3, .L_80100348
/* 092711 0x8010035C 00000000 */ nop
.L_80100360:
/* 092712 0x80100360 A0EB0001 */ sb $t3, 0X1($a3)
/* 092713 0x80100364 908C0002 */ lbu $t4, 0X2($a0)
/* 092714 0x80100368 44CAF800 */ ctc1 $t2, $31
/* 092715 0x8010036C 3C014F80 */ lui $at, 0x4F80
/* 092716 0x80100370 448C3000 */ mtc1 $t4, $f6
/* 092717 0x80100374 05810004 */ bgez $t4, .L_80100388
/* 092718 0x80100378 46803020 */ cvt.s.w $f0, $f6
/* 092719 0x8010037C 44812000 */ mtc1 $at, $f4
/* 092720 0x80100380 00000000 */ nop
/* 092721 0x80100384 46040000 */ add.s $f0, $f0, $f4
.L_80100388:
/* 092722 0x80100388 90AD0002 */ lbu $t5, 0X2($a1)
/* 092723 0x8010038C 3C014F80 */ lui $at, 0x4F80
/* 092724 0x80100390 448D4000 */ mtc1 $t5, $f8
/* 092725 0x80100394 05A10004 */ bgez $t5, .L_801003A8
/* 092726 0x80100398 46804420 */ cvt.s.w $f16, $f8
/* 092727 0x8010039C 44815000 */ mtc1 $at, $f10
/* 092728 0x801003A0 00000000 */ nop
/* 092729 0x801003A4 460A8400 */ add.s $f16, $f16, $f10
.L_801003A8:
/* 092730 0x801003A8 46008481 */ sub.s $f18, $f16, $f0
/* 092731 0x801003AC 240F0001 */ li $t7, 1
/* 092732 0x801003B0 3C014F00 */ lui $at, 0x4F00
/* 092733 0x801003B4 460C9182 */ mul.s $f6, $f18, $f12
/* 092734 0x801003B8 46003100 */ add.s $f4, $f6, $f0
/* 092735 0x801003BC 444EF800 */ cfc1 $t6, $31
/* 092736 0x801003C0 44CFF800 */ ctc1 $t7, $31
/* 092737 0x801003C4 00000000 */ nop
/* 092738 0x801003C8 46002224 */ cvt.w.s $f8, $f4
/* 092739 0x801003CC 444FF800 */ cfc1 $t7, $31
/* 092740 0x801003D0 00000000 */ nop
/* 092741 0x801003D4 31EF0078 */ andi $t7, $t7, 0X78
/* 092742 0x801003D8 51E00013 */ beqzl $t7, .L_80100428
/* 092743 0x801003DC 440F4000 */ mfc1 $t7, $f8
/* 092744 0x801003E0 44814000 */ mtc1 $at, $f8
/* 092745 0x801003E4 240F0001 */ li $t7, 1
/* 092746 0x801003E8 46082201 */ sub.s $f8, $f4, $f8
/* 092747 0x801003EC 44CFF800 */ ctc1 $t7, $31
/* 092748 0x801003F0 00000000 */ nop
/* 092749 0x801003F4 46004224 */ cvt.w.s $f8, $f8
/* 092750 0x801003F8 444FF800 */ cfc1 $t7, $31
/* 092751 0x801003FC 00000000 */ nop
/* 092752 0x80100400 31EF0078 */ andi $t7, $t7, 0X78
/* 092753 0x80100404 15E00005 */ bnez $t7, .L_8010041C
/* 092754 0x80100408 00000000 */ nop
/* 092755 0x8010040C 440F4000 */ mfc1 $t7, $f8
/* 092756 0x80100410 3C018000 */ lui $at, 0x8000
/* 092757 0x80100414 10000007 */ b .L_80100434
/* 092758 0x80100418 01E17825 */ or $t7, $t7, $at
.L_8010041C:
/* 092759 0x8010041C 10000005 */ b .L_80100434
/* 092760 0x80100420 240FFFFF */ li $t7, -1
/* 092761 0x80100424 440F4000 */ mfc1 $t7, $f8
.L_80100428:
/* 092762 0x80100428 00000000 */ nop
/* 092763 0x8010042C 05E0FFFB */ bltz $t7, .L_8010041C
/* 092764 0x80100430 00000000 */ nop
.L_80100434:
/* 092765 0x80100434 44CEF800 */ ctc1 $t6, $31
/* 092766 0x80100438 A0EF0002 */ sb $t7, 0X2($a3)
/* 092767 0x8010043C 00000000 */ nop
/* 092768 0x80100440 03E00008 */ jr $ra
/* 092769 0x80100444 00000000 */ nop
)
GLOBAL_ASM("./asm/nonmatching/z_lib/Lib_LerpRGB.asm")
#endif

@ -1 +1 @@
Subproject commit 7ca3a6009185b629b6b4d0a3d18a1f1d83f3b5ae
Subproject commit 35234f294afe646bb07e6ff489ebcfd47e808f62

45
tools/split_asm.py Normal file
View File

@ -0,0 +1,45 @@
import argparse, os
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('input', help='input file')
parser.add_argument('output', help='output file path')
parser.add_argument('-c', '--c-base', help='create base c file that has GLOBAL_ASM for each function', metavar='file')
args = parser.parse_args()
os.makedirs(args.output, exist_ok=True)
file_names = []
with open(args.input, 'r') as f:
current_file = None
writing = False
lines = f.readlines()
for line in lines:
if line.startswith('glabel'):
if current_file != None:
current_file.close()
func_name = line.split()[1]
assert(func_name != '')
file_name = args.output + '/' + func_name + '.asm'
current_file = open(file_name, 'w')
writing = True
file_names.append(file_name)
if '.word' in line:
writing = False
if writing:
current_file.write(line)
if current_file != None:
current_file.close()
if args.c_base != None:
with open(args.c_base, 'w') as f:
for name in file_names:
f.write('GLOBAL_ASM("{}")\n\n'.format(name))