mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 09:45:02 +00:00
Naming some functions in libultra_code, decompiling a decent amount. (#77)
* osgetactivequeue ok * osspdevicebusy ok * osGetCurrFaultedThread ok * osSpRawStartDma OK * __osSpSetPc and osViGetCurrentFramebuffer OK * sinf, sins, and sptask OK * coss OK * cosf OK * ran format.sh * Updated PR to use ultratypes * osContStartQuery OK * ran format.sh * Updated PR to fix issues * Made suggested changes
This commit is contained in:
parent
4961eb0a90
commit
21750d5aee
47 changed files with 709 additions and 747 deletions
|
@ -30,7 +30,7 @@ glabel func_800FCD40
|
|||
/* B73F20 800FCD80 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B73F24 800FCD84 55E10038 */ bnel $t7, $at, .L800FCE68
|
||||
/* B73F28 800FCD88 00001025 */ move $v0, $zero
|
||||
/* B73F2C 800FCD8C 0C040C84 */ jal func_80103210
|
||||
/* B73F2C 800FCD8C 0C040C84 */ jal osContStartQuery
|
||||
/* B73F30 800FCD90 AFA70024 */ sw $a3, 0x24($sp)
|
||||
/* B73F34 800FCD94 10400003 */ beqz $v0, .L800FCDA4
|
||||
/* B73F38 800FCD98 8FA70024 */ lw $a3, 0x24($sp)
|
||||
|
|
|
@ -1,367 +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 purposee registers
|
||||
|
||||
.section .text
|
||||
|
||||
.align 4
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
glabel func_801004C0
|
||||
/* B77660 801004C0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* B77664 801004C4 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B77668 801004C8 3C058017 */ lui $a1, %hi(D_80175670) # $a1, 0x8017
|
||||
/* B7766C 801004CC 24A55670 */ addiu $a1, %lo(D_80175670) # addiu $a1, $a1, 0x5670
|
||||
/* B77670 801004D0 0C001BC4 */ jal bcopy
|
||||
/* B77674 801004D4 24060040 */ li $a2, 64
|
||||
/* B77678 801004D8 3C048017 */ lui $a0, %hi(D_80175680) # $a0, 0x8017
|
||||
/* B7767C 801004DC 8C845680 */ lw $a0, %lo(D_80175680)($a0)
|
||||
/* B77680 801004E0 10800005 */ beqz $a0, .L801004F8
|
||||
/* B77684 801004E4 00000000 */ nop
|
||||
/* B77688 801004E8 0C001378 */ jal osVirtualToPhysical
|
||||
/* B7768C 801004EC 00000000 */ nop
|
||||
/* B77690 801004F0 3C018017 */ lui $at, %hi(D_80175680) # $at, 0x8017
|
||||
/* B77694 801004F4 AC225680 */ sw $v0, %lo(D_80175680)($at)
|
||||
.L801004F8:
|
||||
/* B77698 801004F8 3C048017 */ lui $a0, %hi(D_80175688) # $a0, 0x8017
|
||||
/* B7769C 801004FC 8C845688 */ lw $a0, %lo(D_80175688)($a0)
|
||||
/* B776A0 80100500 10800005 */ beqz $a0, .L80100518
|
||||
/* B776A4 80100504 00000000 */ nop
|
||||
/* B776A8 80100508 0C001378 */ jal osVirtualToPhysical
|
||||
/* B776AC 8010050C 00000000 */ nop
|
||||
/* B776B0 80100510 3C018017 */ lui $at, %hi(D_80175688) # $at, 0x8017
|
||||
/* B776B4 80100514 AC225688 */ sw $v0, %lo(D_80175688)($at)
|
||||
.L80100518:
|
||||
/* B776B8 80100518 3C048017 */ lui $a0, %hi(D_80175690) # $a0, 0x8017
|
||||
/* B776BC 8010051C 8C845690 */ lw $a0, %lo(D_80175690)($a0)
|
||||
/* B776C0 80100520 10800005 */ beqz $a0, .L80100538
|
||||
/* B776C4 80100524 00000000 */ nop
|
||||
/* B776C8 80100528 0C001378 */ jal osVirtualToPhysical
|
||||
/* B776CC 8010052C 00000000 */ nop
|
||||
/* B776D0 80100530 3C018017 */ lui $at, %hi(D_80175690) # $at, 0x8017
|
||||
/* B776D4 80100534 AC225690 */ sw $v0, %lo(D_80175690)($at)
|
||||
.L80100538:
|
||||
/* B776D8 80100538 3C048017 */ lui $a0, %hi(D_80175698) # $a0, 0x8017
|
||||
/* B776DC 8010053C 8C845698 */ lw $a0, %lo(D_80175698)($a0)
|
||||
/* B776E0 80100540 10800005 */ beqz $a0, .L80100558
|
||||
/* B776E4 80100544 00000000 */ nop
|
||||
/* B776E8 80100548 0C001378 */ jal osVirtualToPhysical
|
||||
/* B776EC 8010054C 00000000 */ nop
|
||||
/* B776F0 80100550 3C018017 */ lui $at, %hi(D_80175698) # $at, 0x8017
|
||||
/* B776F4 80100554 AC225698 */ sw $v0, %lo(D_80175698)($at)
|
||||
.L80100558:
|
||||
/* B776F8 80100558 3C048017 */ lui $a0, %hi(D_8017569C) # $a0, 0x8017
|
||||
/* B776FC 8010055C 8C84569C */ lw $a0, %lo(D_8017569C)($a0)
|
||||
/* B77700 80100560 10800005 */ beqz $a0, .L80100578
|
||||
/* B77704 80100564 00000000 */ nop
|
||||
/* B77708 80100568 0C001378 */ jal osVirtualToPhysical
|
||||
/* B7770C 8010056C 00000000 */ nop
|
||||
/* B77710 80100570 3C018017 */ lui $at, %hi(D_8017569C) # $at, 0x8017
|
||||
/* B77714 80100574 AC22569C */ sw $v0, %lo(D_8017569C)($at)
|
||||
.L80100578:
|
||||
/* B77718 80100578 3C048017 */ lui $a0, %hi(D_801756A0) # $a0, 0x8017
|
||||
/* B7771C 8010057C 8C8456A0 */ lw $a0, %lo(D_801756A0)($a0)
|
||||
/* B77720 80100580 10800005 */ beqz $a0, .L80100598
|
||||
/* B77724 80100584 00000000 */ nop
|
||||
/* B77728 80100588 0C001378 */ jal osVirtualToPhysical
|
||||
/* B7772C 8010058C 00000000 */ nop
|
||||
/* B77730 80100590 3C018017 */ lui $at, %hi(D_801756A0) # $at, 0x8017
|
||||
/* B77734 80100594 AC2256A0 */ sw $v0, %lo(D_801756A0)($at)
|
||||
.L80100598:
|
||||
/* B77738 80100598 3C048017 */ lui $a0, %hi(D_801756A8) # $a0, 0x8017
|
||||
/* B7773C 8010059C 8C8456A8 */ lw $a0, %lo(D_801756A8)($a0)
|
||||
/* B77740 801005A0 50800006 */ beql $a0, $zero, .L801005BC
|
||||
/* B77744 801005A4 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B77748 801005A8 0C001378 */ jal osVirtualToPhysical
|
||||
/* B7774C 801005AC 00000000 */ nop
|
||||
/* B77750 801005B0 3C018017 */ lui $at, %hi(D_801756A8) # $at, 0x8017
|
||||
/* B77754 801005B4 AC2256A8 */ sw $v0, %lo(D_801756A8)($at)
|
||||
/* B77758 801005B8 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
.L801005BC:
|
||||
/* B7775C 801005BC 3C028017 */ lui $v0, %hi(D_80175670) # $v0, 0x8017
|
||||
/* B77760 801005C0 24425670 */ addiu $v0, %lo(D_80175670) # addiu $v0, $v0, 0x5670
|
||||
/* B77764 801005C4 03E00008 */ jr $ra
|
||||
/* B77768 801005C8 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
||||
glabel func_801005CC
|
||||
/* B7776C 801005CC 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* B77770 801005D0 AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* B77774 801005D4 AFB00014 */ sw $s0, 0x14($sp)
|
||||
/* B77778 801005D8 00808025 */ move $s0, $a0
|
||||
/* B7777C 801005DC AFB30020 */ sw $s3, 0x20($sp)
|
||||
/* B77780 801005E0 AFB2001C */ sw $s2, 0x1c($sp)
|
||||
/* B77784 801005E4 0C040130 */ jal func_801004C0
|
||||
/* B77788 801005E8 AFB10018 */ sw $s1, 0x18($sp)
|
||||
/* B7778C 801005EC 8C4E0004 */ lw $t6, 4($v0)
|
||||
/* B77790 801005F0 00409025 */ move $s2, $v0
|
||||
/* B77794 801005F4 02402025 */ move $a0, $s2
|
||||
/* B77798 801005F8 31CF0001 */ andi $t7, $t6, 1
|
||||
/* B7779C 801005FC 11E00013 */ beqz $t7, .L8010064C
|
||||
/* B777A0 80100600 00000000 */ nop
|
||||
/* B777A4 80100604 8C580038 */ lw $t8, 0x38($v0)
|
||||
/* B777A8 80100608 8C59003C */ lw $t9, 0x3c($v0)
|
||||
/* B777AC 8010060C 2401FFFE */ li $at, -2
|
||||
/* B777B0 80100610 AC580018 */ sw $t8, 0x18($v0)
|
||||
/* B777B4 80100614 AC59001C */ sw $t9, 0x1c($v0)
|
||||
/* B777B8 80100618 8E080004 */ lw $t0, 4($s0)
|
||||
/* B777BC 8010061C 01014824 */ and $t1, $t0, $at
|
||||
/* B777C0 80100620 AE090004 */ sw $t1, 4($s0)
|
||||
/* B777C4 80100624 8C4A0004 */ lw $t2, 4($v0)
|
||||
/* B777C8 80100628 314B0004 */ andi $t3, $t2, 4
|
||||
/* B777CC 8010062C 11600007 */ beqz $t3, .L8010064C
|
||||
/* B777D0 80100630 00000000 */ nop
|
||||
/* B777D4 80100634 8E0C0038 */ lw $t4, 0x38($s0)
|
||||
/* B777D8 80100638 3C01A000 */ lui $at, 0xa000
|
||||
/* B777DC 8010063C 258D0BFC */ addiu $t5, $t4, 0xbfc
|
||||
/* B777E0 80100640 01A17025 */ or $t6, $t5, $at
|
||||
/* B777E4 80100644 8DCF0000 */ lw $t7, ($t6)
|
||||
/* B777E8 80100648 AC4F0010 */ sw $t7, 0x10($v0)
|
||||
.L8010064C:
|
||||
/* B777EC 8010064C 0C0011B0 */ jal osWritebackDCache
|
||||
/* B777F0 80100650 24050040 */ li $a1, 64
|
||||
/* B777F4 80100654 0C041920 */ jal __osSpSetStatus
|
||||
/* B777F8 80100658 24042B00 */ li $a0, 11008
|
||||
/* B777FC 8010065C 3C130400 */ lui $s3, (0x04001000 >> 16) # lui $s3, 0x400
|
||||
/* B77800 80100660 36731000 */ ori $s3, (0x04001000 & 0xFFFF) # ori $s3, $s3, 0x1000
|
||||
/* B77804 80100664 0C0419E8 */ jal func_801067A0
|
||||
/* B77808 80100668 02602025 */ move $a0, $s3
|
||||
/* B7780C 8010066C 2411FFFF */ li $s1, -1
|
||||
/* B77810 80100670 54510006 */ bnel $v0, $s1, .L8010068C
|
||||
/* B77814 80100674 3C100400 */ lui $s0, 0x400
|
||||
.L80100678:
|
||||
/* B77818 80100678 0C0419E8 */ jal func_801067A0
|
||||
/* B7781C 8010067C 02602025 */ move $a0, $s3
|
||||
/* B77820 80100680 1051FFFD */ beq $v0, $s1, .L80100678
|
||||
/* B77824 80100684 00000000 */ nop
|
||||
/* B77828 80100688 3C100400 */ lui $s0, (0x04000FC0 >> 16) # lui $s0, 0x400
|
||||
.L8010068C:
|
||||
/* B7782C 8010068C 36100FC0 */ ori $s0, (0x04000FC0 & 0xFFFF) # ori $s0, $s0, 0xfc0
|
||||
/* B77830 80100690 02002825 */ move $a1, $s0
|
||||
/* B77834 80100694 24040001 */ li $a0, 1
|
||||
/* B77838 80100698 02403025 */ move $a2, $s2
|
||||
/* B7783C 8010069C 0C0404D8 */ jal func_80101360
|
||||
/* B77840 801006A0 24070040 */ li $a3, 64
|
||||
/* B77844 801006A4 14510007 */ bne $v0, $s1, .L801006C4
|
||||
/* B77848 801006A8 24040001 */ li $a0, 1
|
||||
.L801006AC:
|
||||
/* B7784C 801006AC 02002825 */ move $a1, $s0
|
||||
/* B77850 801006B0 02403025 */ move $a2, $s2
|
||||
/* B77854 801006B4 0C0404D8 */ jal func_80101360
|
||||
/* B77858 801006B8 24070040 */ li $a3, 64
|
||||
/* B7785C 801006BC 5051FFFB */ beql $v0, $s1, .L801006AC
|
||||
/* B77860 801006C0 24040001 */ li $a0, 1
|
||||
.L801006C4:
|
||||
/* B77864 801006C4 0C040ECC */ jal func_80103B30
|
||||
/* B77868 801006C8 00000000 */ nop
|
||||
/* B7786C 801006CC 50400006 */ beql $v0, $zero, .L801006E8
|
||||
/* B77870 801006D0 24040001 */ li $a0, 1
|
||||
.L801006D4:
|
||||
/* B77874 801006D4 0C040ECC */ jal func_80103B30
|
||||
/* B77878 801006D8 00000000 */ nop
|
||||
/* B7787C 801006DC 1440FFFD */ bnez $v0, .L801006D4
|
||||
/* B77880 801006E0 00000000 */ nop
|
||||
/* B77884 801006E4 24040001 */ li $a0, 1
|
||||
.L801006E8:
|
||||
/* B77888 801006E8 02602825 */ move $a1, $s3
|
||||
/* B7788C 801006EC 8E460008 */ lw $a2, 8($s2)
|
||||
/* B77890 801006F0 0C0404D8 */ jal func_80101360
|
||||
/* B77894 801006F4 8E47000C */ lw $a3, 0xc($s2)
|
||||
/* B77898 801006F8 14510007 */ bne $v0, $s1, .L80100718
|
||||
/* B7789C 801006FC 24040001 */ li $a0, 1
|
||||
.L80100700:
|
||||
/* B778A0 80100700 02602825 */ move $a1, $s3
|
||||
/* B778A4 80100704 8E460008 */ lw $a2, 8($s2)
|
||||
/* B778A8 80100708 0C0404D8 */ jal func_80101360
|
||||
/* B778AC 8010070C 8E47000C */ lw $a3, 0xc($s2)
|
||||
/* B778B0 80100710 5051FFFB */ beql $v0, $s1, .L80100700
|
||||
/* B778B4 80100714 24040001 */ li $a0, 1
|
||||
.L80100718:
|
||||
/* B778B8 80100718 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* B778BC 8010071C 8FB00014 */ lw $s0, 0x14($sp)
|
||||
/* B778C0 80100720 8FB10018 */ lw $s1, 0x18($sp)
|
||||
/* B778C4 80100724 8FB2001C */ lw $s2, 0x1c($sp)
|
||||
/* B778C8 80100728 8FB30020 */ lw $s3, 0x20($sp)
|
||||
/* B778CC 8010072C 03E00008 */ jr $ra
|
||||
/* B778D0 80100730 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
|
||||
glabel func_80100734
|
||||
/* B778D4 80100734 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* B778D8 80100738 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B778DC 8010073C 0C040ECC */ jal func_80103B30
|
||||
/* B778E0 80100740 AFA40018 */ sw $a0, 0x18($sp)
|
||||
/* B778E4 80100744 10400005 */ beqz $v0, .L8010075C
|
||||
/* B778E8 80100748 00000000 */ nop
|
||||
.L8010074C:
|
||||
/* B778EC 8010074C 0C040ECC */ jal func_80103B30
|
||||
/* B778F0 80100750 00000000 */ nop
|
||||
/* B778F4 80100754 1440FFFD */ bnez $v0, .L8010074C
|
||||
/* B778F8 80100758 00000000 */ nop
|
||||
.L8010075C:
|
||||
/* B778FC 8010075C 0C041920 */ jal __osSpSetStatus
|
||||
/* B77900 80100760 24040125 */ li $a0, 293
|
||||
/* B77904 80100764 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B77908 80100768 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* B7790C 8010076C 03E00008 */ jr $ra
|
||||
/* B77910 80100770 00000000 */ nop
|
|
@ -1,48 +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 purposee registers
|
||||
|
||||
.section .text
|
||||
|
||||
.align 4
|
||||
|
||||
glabel func_80101360
|
||||
/* B78500 80101360 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* B78504 80101364 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B78508 80101368 AFA40018 */ sw $a0, 0x18($sp)
|
||||
/* B7850C 8010136C AFA5001C */ sw $a1, 0x1c($sp)
|
||||
/* B78510 80101370 AFA60020 */ sw $a2, 0x20($sp)
|
||||
/* B78514 80101374 0C040ECC */ jal func_80103B30
|
||||
/* B78518 80101378 AFA70024 */ sw $a3, 0x24($sp)
|
||||
/* B7851C 8010137C 10400003 */ beqz $v0, .L8010138C
|
||||
/* B78520 80101380 8FAE001C */ lw $t6, 0x1c($sp)
|
||||
/* B78524 80101384 10000013 */ b .L801013D4
|
||||
/* B78528 80101388 2402FFFF */ li $v0, -1
|
||||
.L8010138C:
|
||||
/* B7852C 8010138C 3C0FA404 */ lui $t7, 0xa404
|
||||
/* B78530 80101390 ADEE0000 */ sw $t6, ($t7)
|
||||
/* B78534 80101394 0C001378 */ jal osVirtualToPhysical
|
||||
/* B78538 80101398 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B7853C 8010139C 3C18A404 */ lui $t8, %hi(D_A4040004) # $t8, 0xa404
|
||||
/* B78540 801013A0 AF020004 */ sw $v0, %lo(D_A4040004)($t8)
|
||||
/* B78544 801013A4 8FB90018 */ lw $t9, 0x18($sp)
|
||||
/* B78548 801013A8 8FAB0024 */ lw $t3, 0x24($sp)
|
||||
/* B7854C 801013AC 00001025 */ move $v0, $zero
|
||||
/* B78550 801013B0 17200006 */ bnez $t9, .L801013CC
|
||||
/* B78554 801013B4 256CFFFF */ addiu $t4, $t3, -1
|
||||
/* B78558 801013B8 8FA80024 */ lw $t0, 0x24($sp)
|
||||
/* B7855C 801013BC 3C0AA404 */ lui $t2, %hi(D_A404000C) # $t2, 0xa404
|
||||
/* B78560 801013C0 2509FFFF */ addiu $t1, $t0, -1
|
||||
/* B78564 801013C4 10000003 */ b .L801013D4
|
||||
/* B78568 801013C8 AD49000C */ sw $t1, %lo(D_A404000C)($t2)
|
||||
.L801013CC:
|
||||
/* B7856C 801013CC 3C0DA404 */ lui $t5, %hi(D_A4040008) # $t5, 0xa404
|
||||
/* B78570 801013D0 ADAC0008 */ sw $t4, %lo(D_A4040008)($t5)
|
||||
.L801013D4:
|
||||
/* B78574 801013D4 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B78578 801013D8 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* B7857C 801013DC 03E00008 */ jr $ra
|
||||
/* B78580 801013E0 00000000 */ nop
|
10
asm/non_matchings/code/code_801031F0/func_801031F0.s
Normal file
10
asm/non_matchings/code/code_801031F0/func_801031F0.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
glabel func_801031F0
|
||||
/* B7A390 801031F0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* B7A394 801031F4 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B7A398 801031F8 0C0419E8 */ jal __osSpSetPc
|
||||
/* B7A39C 801031FC 00002025 */ move $a0, $zero
|
||||
/* B7A3A0 80103200 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B7A3A4 80103204 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* B7A3A8 80103208 03E00008 */ jr $ra
|
||||
/* B7A3AC 8010320C 00000000 */ nop
|
||||
|
11
asm/non_matchings/code/code_801031F0/func_8010328C.s
Normal file
11
asm/non_matchings/code/code_801031F0/func_8010328C.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
glabel func_8010328C
|
||||
/* B7A42C 8010328C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* B7A430 80103290 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B7A434 80103294 00802825 */ move $a1, $a0
|
||||
/* B7A438 80103298 0C04035B */ jal __osContGetInitData
|
||||
/* B7A43C 8010329C 27A4001F */ addiu $a0, $sp, 0x1f
|
||||
/* B7A440 801032A0 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B7A444 801032A4 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* B7A448 801032A8 03E00008 */ jr $ra
|
||||
/* B7A44C 801032AC 00000000 */ nop
|
||||
|
|
@ -1,69 +1,12 @@
|
|||
.include "macro.inc"
|
||||
.late_rodata
|
||||
|
||||
# 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 purposee registers
|
||||
glabel D_8014B270
|
||||
.double 0.1
|
||||
|
||||
.section .text
|
||||
|
||||
.align 4
|
||||
|
||||
glabel func_801031F0
|
||||
/* B7A390 801031F0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* B7A394 801031F4 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B7A398 801031F8 0C0419E8 */ jal func_801067A0
|
||||
/* B7A39C 801031FC 00002025 */ move $a0, $zero
|
||||
/* B7A3A0 80103200 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B7A3A4 80103204 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* B7A3A8 80103208 03E00008 */ jr $ra
|
||||
/* B7A3AC 8010320C 00000000 */ nop
|
||||
|
||||
glabel func_80103210
|
||||
/* B7A3B0 80103210 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* B7A3B4 80103214 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B7A3B8 80103218 0C0402E8 */ jal __osSiGetAccess
|
||||
/* B7A3BC 8010321C AFA40020 */ sw $a0, 0x20($sp)
|
||||
/* B7A3C0 80103220 3C0E8017 */ lui $t6, %hi(_osCont_lastPollType) # $t6, 0x8017
|
||||
/* B7A3C4 80103224 91CE5810 */ lbu $t6, %lo(_osCont_lastPollType)($t6)
|
||||
/* B7A3C8 80103228 11C0000B */ beqz $t6, .L80103258
|
||||
/* B7A3CC 8010322C 00000000 */ nop
|
||||
/* B7A3D0 80103230 0C040386 */ jal __osPackRequestData
|
||||
/* B7A3D4 80103234 00002025 */ move $a0, $zero
|
||||
/* B7A3D8 80103238 3C058017 */ lui $a1, %hi(_osPifInternalBuff) # $a1, 0x8017
|
||||
/* B7A3DC 8010323C 24A557D0 */ addiu $a1, %lo(_osPifInternalBuff) # addiu $a1, $a1, 0x57d0
|
||||
/* B7A3E0 80103240 0C0404FC */ jal __osSiRawStartDma /*(s32 dir, void *addr)*/
|
||||
/* B7A3E4 80103244 24040001 */ li $a0, 1
|
||||
/* B7A3E8 80103248 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B7A3EC 8010324C 00002825 */ move $a1, $zero
|
||||
/* B7A3F0 80103250 0C000CA0 */ jal osRecvMesg
|
||||
/* B7A3F4 80103254 24060001 */ li $a2, 1
|
||||
.L80103258:
|
||||
/* B7A3F8 80103258 3C058017 */ lui $a1, %hi(_osPifInternalBuff) # $a1, 0x8017
|
||||
/* B7A3FC 8010325C 24A557D0 */ addiu $a1, %lo(_osPifInternalBuff) # addiu $a1, $a1, 0x57d0
|
||||
/* B7A400 80103260 0C0404FC */ jal __osSiRawStartDma /*(s32 dir, void *addr)*/
|
||||
/* B7A404 80103264 00002025 */ move $a0, $zero
|
||||
/* B7A408 80103268 3C018017 */ lui $at, %hi(_osCont_lastPollType) # $at, 0x8017
|
||||
/* B7A40C 8010326C AFA2001C */ sw $v0, 0x1c($sp)
|
||||
/* B7A410 80103270 0C0402F9 */ jal __osSiRelAccess
|
||||
/* B7A414 80103274 A0205810 */ sb $zero, %lo(_osCont_lastPollType)($at)
|
||||
/* B7A418 80103278 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B7A41C 8010327C 8FA2001C */ lw $v0, 0x1c($sp)
|
||||
/* B7A420 80103280 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* B7A424 80103284 03E00008 */ jr $ra
|
||||
/* B7A428 80103288 00000000 */ nop
|
||||
|
||||
glabel func_8010328C
|
||||
/* B7A42C 8010328C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* B7A430 80103290 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* B7A434 80103294 00802825 */ move $a1, $a0
|
||||
/* B7A438 80103298 0C04035B */ jal __osContGetInitData
|
||||
/* B7A43C 8010329C 27A4001F */ addiu $a0, $sp, 0x1f
|
||||
/* B7A440 801032A0 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* B7A444 801032A4 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* B7A448 801032A8 03E00008 */ jr $ra
|
||||
/* B7A44C 801032AC 00000000 */ nop
|
||||
glabel D_8014B278
|
||||
.double 0.1
|
||||
|
||||
.text
|
||||
glabel func_801032B0
|
||||
/* B7A450 801032B0 27BDFF70 */ addiu $sp, $sp, -0x90
|
||||
/* B7A454 801032B4 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
|
@ -574,50 +517,3 @@ glabel func_801032B0
|
|||
/* B7AC08 80103A68 03E00008 */ jr $ra
|
||||
/* B7AC0C 80103A6C 27BD0090 */ addiu $sp, $sp, 0x90
|
||||
|
||||
glabel func_80103A70
|
||||
/* B7AC10 80103A70 27BDFF68 */ addiu $sp, $sp, -0x98
|
||||
/* B7AC14 80103A74 C7A400A8 */ lwc1 $f4, 0xa8($sp)
|
||||
/* B7AC18 80103A78 C7A600AC */ lwc1 $f6, 0xac($sp)
|
||||
/* B7AC1C 80103A7C C7A800B0 */ lwc1 $f8, 0xb0($sp)
|
||||
/* B7AC20 80103A80 E7A40010 */ swc1 $f4, 0x10($sp)
|
||||
/* B7AC24 80103A84 E7A60014 */ swc1 $f6, 0x14($sp)
|
||||
/* B7AC28 80103A88 C7A600C4 */ lwc1 $f6, 0xc4($sp)
|
||||
/* B7AC2C 80103A8C C7A400C0 */ lwc1 $f4, 0xc0($sp)
|
||||
/* B7AC30 80103A90 C7AA00B4 */ lwc1 $f10, 0xb4($sp)
|
||||
/* B7AC34 80103A94 C7B000B8 */ lwc1 $f16, 0xb8($sp)
|
||||
/* B7AC38 80103A98 C7B200BC */ lwc1 $f18, 0xbc($sp)
|
||||
/* B7AC3C 80103A9C 44876000 */ mtc1 $a3, $f12
|
||||
/* B7AC40 80103AA0 E7A80018 */ swc1 $f8, 0x18($sp)
|
||||
/* B7AC44 80103AA4 E7A6002C */ swc1 $f6, 0x2c($sp)
|
||||
/* B7AC48 80103AA8 E7A40028 */ swc1 $f4, 0x28($sp)
|
||||
/* B7AC4C 80103AAC E7AA001C */ swc1 $f10, 0x1c($sp)
|
||||
/* B7AC50 80103AB0 E7B00020 */ swc1 $f16, 0x20($sp)
|
||||
/* B7AC54 80103AB4 E7B20024 */ swc1 $f18, 0x24($sp)
|
||||
/* B7AC58 80103AB8 C7B200D4 */ lwc1 $f18, 0xd4($sp)
|
||||
/* B7AC5C 80103ABC C7B000D0 */ lwc1 $f16, 0xd0($sp)
|
||||
/* B7AC60 80103AC0 C7AA00CC */ lwc1 $f10, 0xcc($sp)
|
||||
/* B7AC64 80103AC4 C7A400D8 */ lwc1 $f4, 0xd8($sp)
|
||||
/* B7AC68 80103AC8 C7A600DC */ lwc1 $f6, 0xdc($sp)
|
||||
/* B7AC6C 80103ACC C7A800C8 */ lwc1 $f8, 0xc8($sp)
|
||||
/* B7AC70 80103AD0 8FAE00E0 */ lw $t6, 0xe0($sp)
|
||||
/* B7AC74 80103AD4 8FAF00E4 */ lw $t7, 0xe4($sp)
|
||||
/* B7AC78 80103AD8 AFBF0054 */ sw $ra, 0x54($sp)
|
||||
/* B7AC7C 80103ADC AFA40098 */ sw $a0, 0x98($sp)
|
||||
/* B7AC80 80103AE0 44076000 */ mfc1 $a3, $f12
|
||||
/* B7AC84 80103AE4 27A40058 */ addiu $a0, $sp, 0x58
|
||||
/* B7AC88 80103AE8 E7B2003C */ swc1 $f18, 0x3c($sp)
|
||||
/* B7AC8C 80103AEC E7B00038 */ swc1 $f16, 0x38($sp)
|
||||
/* B7AC90 80103AF0 E7AA0034 */ swc1 $f10, 0x34($sp)
|
||||
/* B7AC94 80103AF4 E7A40040 */ swc1 $f4, 0x40($sp)
|
||||
/* B7AC98 80103AF8 E7A60044 */ swc1 $f6, 0x44($sp)
|
||||
/* B7AC9C 80103AFC E7A80030 */ swc1 $f8, 0x30($sp)
|
||||
/* B7ACA0 80103B00 AFAE0048 */ sw $t6, 0x48($sp)
|
||||
/* B7ACA4 80103B04 0C040CAC */ jal func_801032B0
|
||||
/* B7ACA8 80103B08 AFAF004C */ sw $t7, 0x4c($sp)
|
||||
/* B7ACAC 80103B0C 27A40058 */ addiu $a0, $sp, 0x58
|
||||
/* B7ACB0 80103B10 0C041938 */ jal func_801064E0
|
||||
/* B7ACB4 80103B14 8FA50098 */ lw $a1, 0x98($sp)
|
||||
/* B7ACB8 80103B18 8FBF0054 */ lw $ra, 0x54($sp)
|
||||
/* B7ACBC 80103B1C 27BD0098 */ addiu $sp, $sp, 0x98
|
||||
/* B7ACC0 80103B20 03E00008 */ jr $ra
|
||||
/* B7ACC4 80103B24 00000000 */ nop
|
47
asm/non_matchings/code/code_801031F0/func_80103A70.s
Normal file
47
asm/non_matchings/code/code_801031F0/func_80103A70.s
Normal file
|
@ -0,0 +1,47 @@
|
|||
glabel func_80103A70
|
||||
/* B7AC10 80103A70 27BDFF68 */ addiu $sp, $sp, -0x98
|
||||
/* B7AC14 80103A74 C7A400A8 */ lwc1 $f4, 0xa8($sp)
|
||||
/* B7AC18 80103A78 C7A600AC */ lwc1 $f6, 0xac($sp)
|
||||
/* B7AC1C 80103A7C C7A800B0 */ lwc1 $f8, 0xb0($sp)
|
||||
/* B7AC20 80103A80 E7A40010 */ swc1 $f4, 0x10($sp)
|
||||
/* B7AC24 80103A84 E7A60014 */ swc1 $f6, 0x14($sp)
|
||||
/* B7AC28 80103A88 C7A600C4 */ lwc1 $f6, 0xc4($sp)
|
||||
/* B7AC2C 80103A8C C7A400C0 */ lwc1 $f4, 0xc0($sp)
|
||||
/* B7AC30 80103A90 C7AA00B4 */ lwc1 $f10, 0xb4($sp)
|
||||
/* B7AC34 80103A94 C7B000B8 */ lwc1 $f16, 0xb8($sp)
|
||||
/* B7AC38 80103A98 C7B200BC */ lwc1 $f18, 0xbc($sp)
|
||||
/* B7AC3C 80103A9C 44876000 */ mtc1 $a3, $f12
|
||||
/* B7AC40 80103AA0 E7A80018 */ swc1 $f8, 0x18($sp)
|
||||
/* B7AC44 80103AA4 E7A6002C */ swc1 $f6, 0x2c($sp)
|
||||
/* B7AC48 80103AA8 E7A40028 */ swc1 $f4, 0x28($sp)
|
||||
/* B7AC4C 80103AAC E7AA001C */ swc1 $f10, 0x1c($sp)
|
||||
/* B7AC50 80103AB0 E7B00020 */ swc1 $f16, 0x20($sp)
|
||||
/* B7AC54 80103AB4 E7B20024 */ swc1 $f18, 0x24($sp)
|
||||
/* B7AC58 80103AB8 C7B200D4 */ lwc1 $f18, 0xd4($sp)
|
||||
/* B7AC5C 80103ABC C7B000D0 */ lwc1 $f16, 0xd0($sp)
|
||||
/* B7AC60 80103AC0 C7AA00CC */ lwc1 $f10, 0xcc($sp)
|
||||
/* B7AC64 80103AC4 C7A400D8 */ lwc1 $f4, 0xd8($sp)
|
||||
/* B7AC68 80103AC8 C7A600DC */ lwc1 $f6, 0xdc($sp)
|
||||
/* B7AC6C 80103ACC C7A800C8 */ lwc1 $f8, 0xc8($sp)
|
||||
/* B7AC70 80103AD0 8FAE00E0 */ lw $t6, 0xe0($sp)
|
||||
/* B7AC74 80103AD4 8FAF00E4 */ lw $t7, 0xe4($sp)
|
||||
/* B7AC78 80103AD8 AFBF0054 */ sw $ra, 0x54($sp)
|
||||
/* B7AC7C 80103ADC AFA40098 */ sw $a0, 0x98($sp)
|
||||
/* B7AC80 80103AE0 44076000 */ mfc1 $a3, $f12
|
||||
/* B7AC84 80103AE4 27A40058 */ addiu $a0, $sp, 0x58
|
||||
/* B7AC88 80103AE8 E7B2003C */ swc1 $f18, 0x3c($sp)
|
||||
/* B7AC8C 80103AEC E7B00038 */ swc1 $f16, 0x38($sp)
|
||||
/* B7AC90 80103AF0 E7AA0034 */ swc1 $f10, 0x34($sp)
|
||||
/* B7AC94 80103AF4 E7A40040 */ swc1 $f4, 0x40($sp)
|
||||
/* B7AC98 80103AF8 E7A60044 */ swc1 $f6, 0x44($sp)
|
||||
/* B7AC9C 80103AFC E7A80030 */ swc1 $f8, 0x30($sp)
|
||||
/* B7ACA0 80103B00 AFAE0048 */ sw $t6, 0x48($sp)
|
||||
/* B7ACA4 80103B04 0C040CAC */ jal func_801032B0
|
||||
/* B7ACA8 80103B08 AFAF004C */ sw $t7, 0x4c($sp)
|
||||
/* B7ACAC 80103B0C 27A40058 */ addiu $a0, $sp, 0x58
|
||||
/* B7ACB0 80103B10 0C041938 */ jal func_801064E0
|
||||
/* B7ACB4 80103B14 8FA50098 */ lw $a1, 0x98($sp)
|
||||
/* B7ACB8 80103B18 8FBF0054 */ lw $ra, 0x54($sp)
|
||||
/* B7ACBC 80103B1C 27BD0098 */ addiu $sp, $sp, 0x98
|
||||
/* B7ACC0 80103B20 03E00008 */ jr $ra
|
||||
/* B7ACC4 80103B24 00000000 */ nop
|
117
asm/non_matchings/code/cosf/cosf.s
Normal file
117
asm/non_matchings/code/cosf/cosf.s
Normal file
|
@ -0,0 +1,117 @@
|
|||
.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,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 purposee registers
|
||||
|
||||
.section .text
|
||||
|
||||
.align 4
|
||||
|
||||
glabel coss
|
||||
/* B7B920 80104780 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* B7B924 80104784 AFA40018 */ sw $a0, 0x18($sp)
|
|
@ -38,7 +38,7 @@ glabel func_800C82A0
|
|||
/* B3F498 800C82F8 8F280000 */ lw $t0, ($t9)
|
||||
/* B3F49C 800C82FC 51000011 */ beql $t0, $zero, .L800C8344
|
||||
/* B3F4A0 800C8300 8C620008 */ lw $v0, 8($v1)
|
||||
/* B3F4A4 800C8304 0C0419D8 */ jal func_80106760
|
||||
/* B3F4A4 800C8304 0C0419D8 */ jal osViGetCurrentFramebuffer
|
||||
/* B3F4A8 800C8308 00000000 */ nop
|
||||
/* B3F4AC 800C830C 0C0011D0 */ jal osViGetNextFramebuffer
|
||||
/* B3F4B0 800C8310 AFA20018 */ sw $v0, 0x18($sp)
|
||||
|
|
|
@ -58,7 +58,7 @@ glabel func_800C89D4
|
|||
/* B3FBF4 800C8A54 1000000B */ b .L800C8A84
|
||||
/* B3FBF8 800C8A58 00001025 */ move $v0, $zero
|
||||
.L800C8A5C:
|
||||
/* B3FBFC 800C8A5C 0C0419D8 */ jal func_80106760
|
||||
/* B3FBFC 800C8A5C 0C0419D8 */ jal osViGetCurrentFramebuffer
|
||||
/* B3FC00 800C8A60 AFA5001C */ sw $a1, 0x1c($sp)
|
||||
/* B3FC04 800C8A64 8FA5001C */ lw $a1, 0x1c($sp)
|
||||
/* B3FC08 800C8A68 8CAF000C */ lw $t7, 0xc($a1)
|
||||
|
|
|
@ -79,7 +79,7 @@ glabel func_800C8CB8
|
|||
/* B3FF14 800C8D74 0C041924 */ jal osWritebackDCacheAll
|
||||
/* B3FF18 800C8D78 AE180004 */ sw $t8, 4($s0)
|
||||
/* B3FF1C 800C8D7C 26040010 */ addiu $a0, $s0, 0x10
|
||||
/* B3FF20 800C8D80 0C040173 */ jal func_801005CC
|
||||
/* B3FF20 800C8D80 0C040173 */ jal osSpTaskLoad
|
||||
/* B3FF24 800C8D84 AFA40020 */ sw $a0, 0x20($sp)
|
||||
/* B3FF28 800C8D88 8E040010 */ lw $a0, 0x10($s0)
|
||||
/* B3FF2C 800C8D8C 24010002 */ li $at, 2
|
||||
|
@ -108,7 +108,7 @@ glabel func_800C8CB8
|
|||
/* B3FF80 800C8DE0 AC22A510 */ sw $v0, %lo(D_8016A510)($at)
|
||||
/* B3FF84 800C8DE4 AC23A514 */ sw $v1, %lo(D_8016A514)($at)
|
||||
.L800C8DE8:
|
||||
/* B3FF88 800C8DE8 0C0401CD */ jal func_80100734
|
||||
/* B3FF88 800C8DE8 0C0401CD */ jal osSpTaskStartGo
|
||||
/* B3FF8C 800C8DEC 8FA40020 */ lw $a0, 0x20($sp)
|
||||
/* B3FF90 800C8DF0 3C198013 */ lui $t9, %hi(D_8012D290) # $t9, 0x8013
|
||||
/* B3FF94 800C8DF4 2739D290 */ addiu $t9, %lo(D_8012D290) # addiu $t9, $t9, -0x2d70
|
||||
|
|
|
@ -31,7 +31,7 @@ glabel func_800C9018
|
|||
/* B40204 800C9064 0C000DDE */ jal __ull_div
|
||||
/* B40208 800C9068 24070BB8 */ li $a3, 3000
|
||||
/* B4020C 800C906C AFA20048 */ sw $v0, 0x48($sp)
|
||||
/* B40210 800C9070 0C0419D8 */ jal func_80106760
|
||||
/* B40210 800C9070 0C0419D8 */ jal osViGetCurrentFramebuffer
|
||||
/* B40214 800C9074 AFA3004C */ sw $v1, 0x4c($sp)
|
||||
/* B40218 800C9078 3C048014 */ lui $a0, %hi(D_801460B0) # $a0, 0x8014
|
||||
/* B4021C 800C907C 248460B0 */ addiu $a0, %lo(D_801460B0) # addiu $a0, $a0, 0x60b0
|
||||
|
@ -43,7 +43,7 @@ glabel func_800C9018
|
|||
/* B40230 800C9090 00000000 */ nop
|
||||
/* B40234 800C9094 8E090238 */ lw $t1, 0x238($s0)
|
||||
/* B40238 800C9098 252A0001 */ addiu $t2, $t1, 1
|
||||
/* B4023C 800C909C 0C0419D8 */ jal func_80106760
|
||||
/* B4023C 800C909C 0C0419D8 */ jal osViGetCurrentFramebuffer
|
||||
/* B40240 800C90A0 AE0A0238 */ sw $t2, 0x238($s0)
|
||||
/* B40244 800C90A4 8E050244 */ lw $a1, 0x244($s0)
|
||||
/* B40248 800C90A8 00004025 */ move $t0, $zero
|
||||
|
@ -93,7 +93,7 @@ glabel func_800C9018
|
|||
/* B402E0 800C9140 8DCF0000 */ lw $t7, ($t6)
|
||||
/* B402E4 800C9144 11E00016 */ beqz $t7, .L800C91A0
|
||||
/* B402E8 800C9148 00000000 */ nop
|
||||
/* B402EC 800C914C 0C0419D8 */ jal func_80106760
|
||||
/* B402EC 800C914C 0C0419D8 */ jal osViGetCurrentFramebuffer
|
||||
/* B402F0 800C9150 00000000 */ nop
|
||||
/* B402F4 800C9154 0C0011D0 */ jal osViGetNextFramebuffer
|
||||
/* B402F8 800C9158 AFA2002C */ sw $v0, 0x2c($sp)
|
||||
|
|
143
asm/non_matchings/code/sinf/sinf.s
Normal file
143
asm/non_matchings/code/sinf/sinf.s
Normal file
|
@ -0,0 +1,143 @@
|
|||
.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
|
33
asm/non_matchings/code/sins/sins.s
Normal file
33
asm/non_matchings/code/sins/sins.s
Normal file
|
@ -0,0 +1,33 @@
|
|||
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
|
100
asm/non_matchings/code/sptask/osSpTaskLoad.s
Normal file
100
asm/non_matchings/code/sptask/osSpTaskLoad.s
Normal file
|
@ -0,0 +1,100 @@
|
|||
glabel osSpTaskLoad
|
||||
/* B7776C 801005CC 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* B77770 801005D0 AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* B77774 801005D4 AFB00014 */ sw $s0, 0x14($sp)
|
||||
/* B77778 801005D8 00808025 */ move $s0, $a0
|
||||
/* B7777C 801005DC AFB30020 */ sw $s3, 0x20($sp)
|
||||
/* B77780 801005E0 AFB2001C */ sw $s2, 0x1c($sp)
|
||||
/* B77784 801005E4 0C040130 */ jal _VirtualToPhysicalTask
|
||||
/* B77788 801005E8 AFB10018 */ sw $s1, 0x18($sp)
|
||||
/* B7778C 801005EC 8C4E0004 */ lw $t6, 4($v0)
|
||||
/* B77790 801005F0 00409025 */ move $s2, $v0
|
||||
/* B77794 801005F4 02402025 */ move $a0, $s2
|
||||
/* B77798 801005F8 31CF0001 */ andi $t7, $t6, 1
|
||||
/* B7779C 801005FC 11E00013 */ beqz $t7, .L8010064C
|
||||
/* B777A0 80100600 00000000 */ nop
|
||||
/* B777A4 80100604 8C580038 */ lw $t8, 0x38($v0)
|
||||
/* B777A8 80100608 8C59003C */ lw $t9, 0x3c($v0)
|
||||
/* B777AC 8010060C 2401FFFE */ li $at, -2
|
||||
/* B777B0 80100610 AC580018 */ sw $t8, 0x18($v0)
|
||||
/* B777B4 80100614 AC59001C */ sw $t9, 0x1c($v0)
|
||||
/* B777B8 80100618 8E080004 */ lw $t0, 4($s0)
|
||||
/* B777BC 8010061C 01014824 */ and $t1, $t0, $at
|
||||
/* B777C0 80100620 AE090004 */ sw $t1, 4($s0)
|
||||
/* B777C4 80100624 8C4A0004 */ lw $t2, 4($v0)
|
||||
/* B777C8 80100628 314B0004 */ andi $t3, $t2, 4
|
||||
/* B777CC 8010062C 11600007 */ beqz $t3, .L8010064C
|
||||
/* B777D0 80100630 00000000 */ nop
|
||||
/* B777D4 80100634 8E0C0038 */ lw $t4, 0x38($s0)
|
||||
/* B777D8 80100638 3C01A000 */ lui $at, 0xa000
|
||||
/* B777DC 8010063C 258D0BFC */ addiu $t5, $t4, 0xbfc
|
||||
/* B777E0 80100640 01A17025 */ or $t6, $t5, $at
|
||||
/* B777E4 80100644 8DCF0000 */ lw $t7, ($t6)
|
||||
/* B777E8 80100648 AC4F0010 */ sw $t7, 0x10($v0)
|
||||
.L8010064C:
|
||||
/* B777EC 8010064C 0C0011B0 */ jal osWritebackDCache
|
||||
/* B777F0 80100650 24050040 */ li $a1, 64
|
||||
/* B777F4 80100654 0C041920 */ jal __osSpSetStatus
|
||||
/* B777F8 80100658 24042B00 */ li $a0, 11008
|
||||
/* B777FC 8010065C 3C130400 */ lui $s3, (0x04001000 >> 16) # lui $s3, 0x400
|
||||
/* B77800 80100660 36731000 */ ori $s3, (0x04001000 & 0xFFFF) # ori $s3, $s3, 0x1000
|
||||
/* B77804 80100664 0C0419E8 */ jal __osSpSetPc
|
||||
/* B77808 80100668 02602025 */ move $a0, $s3
|
||||
/* B7780C 8010066C 2411FFFF */ li $s1, -1
|
||||
/* B77810 80100670 54510006 */ bnel $v0, $s1, .L8010068C
|
||||
/* B77814 80100674 3C100400 */ lui $s0, 0x400
|
||||
.L80100678:
|
||||
/* B77818 80100678 0C0419E8 */ jal __osSpSetPc
|
||||
/* B7781C 8010067C 02602025 */ move $a0, $s3
|
||||
/* B77820 80100680 1051FFFD */ beq $v0, $s1, .L80100678
|
||||
/* B77824 80100684 00000000 */ nop
|
||||
/* B77828 80100688 3C100400 */ lui $s0, (0x04000FC0 >> 16) # lui $s0, 0x400
|
||||
.L8010068C:
|
||||
/* B7782C 8010068C 36100FC0 */ ori $s0, (0x04000FC0 & 0xFFFF) # ori $s0, $s0, 0xfc0
|
||||
/* B77830 80100690 02002825 */ move $a1, $s0
|
||||
/* B77834 80100694 24040001 */ li $a0, 1
|
||||
/* B77838 80100698 02403025 */ move $a2, $s2
|
||||
/* B7783C 8010069C 0C0404D8 */ jal __osSpRawStartDma
|
||||
/* B77840 801006A0 24070040 */ li $a3, 64
|
||||
/* B77844 801006A4 14510007 */ bne $v0, $s1, .L801006C4
|
||||
/* B77848 801006A8 24040001 */ li $a0, 1
|
||||
.L801006AC:
|
||||
/* B7784C 801006AC 02002825 */ move $a1, $s0
|
||||
/* B77850 801006B0 02403025 */ move $a2, $s2
|
||||
/* B77854 801006B4 0C0404D8 */ jal __osSpRawStartDma
|
||||
/* B77858 801006B8 24070040 */ li $a3, 64
|
||||
/* B7785C 801006BC 5051FFFB */ beql $v0, $s1, .L801006AC
|
||||
/* B77860 801006C0 24040001 */ li $a0, 1
|
||||
.L801006C4:
|
||||
/* B77864 801006C4 0C040ECC */ jal __osSpDeviceBusy
|
||||
/* B77868 801006C8 00000000 */ nop
|
||||
/* B7786C 801006CC 50400006 */ beql $v0, $zero, .L801006E8
|
||||
/* B77870 801006D0 24040001 */ li $a0, 1
|
||||
.L801006D4:
|
||||
/* B77874 801006D4 0C040ECC */ jal __osSpDeviceBusy
|
||||
/* B77878 801006D8 00000000 */ nop
|
||||
/* B7787C 801006DC 1440FFFD */ bnez $v0, .L801006D4
|
||||
/* B77880 801006E0 00000000 */ nop
|
||||
/* B77884 801006E4 24040001 */ li $a0, 1
|
||||
.L801006E8:
|
||||
/* B77888 801006E8 02602825 */ move $a1, $s3
|
||||
/* B7788C 801006EC 8E460008 */ lw $a2, 8($s2)
|
||||
/* B77890 801006F0 0C0404D8 */ jal __osSpRawStartDma
|
||||
/* B77894 801006F4 8E47000C */ lw $a3, 0xc($s2)
|
||||
/* B77898 801006F8 14510007 */ bne $v0, $s1, .L80100718
|
||||
/* B7789C 801006FC 24040001 */ li $a0, 1
|
||||
.L80100700:
|
||||
/* B778A0 80100700 02602825 */ move $a1, $s3
|
||||
/* B778A4 80100704 8E460008 */ lw $a2, 8($s2)
|
||||
/* B778A8 80100708 0C0404D8 */ jal __osSpRawStartDma
|
||||
/* B778AC 8010070C 8E47000C */ lw $a3, 0xc($s2)
|
||||
/* B778B0 80100710 5051FFFB */ beql $v0, $s1, .L80100700
|
||||
/* B778B4 80100714 24040001 */ li $a0, 1
|
||||
.L80100718:
|
||||
/* B778B8 80100718 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* B778BC 8010071C 8FB00014 */ lw $s0, 0x14($sp)
|
||||
/* B778C0 80100720 8FB10018 */ lw $s1, 0x18($sp)
|
||||
/* B778C4 80100724 8FB2001C */ lw $s2, 0x1c($sp)
|
||||
/* B778C8 80100728 8FB30020 */ lw $s3, 0x20($sp)
|
||||
/* B778CC 8010072C 03E00008 */ jr $ra
|
||||
/* B778D0 80100730 27BD0028 */ addiu $sp, $sp, 0x28
|
|
@ -1,32 +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 purposee registers
|
||||
|
||||
.section .bss
|
||||
|
||||
glabel D_80175670
|
||||
.space 0x10
|
||||
|
||||
glabel D_80175680
|
||||
.space 0x8
|
||||
|
||||
glabel D_80175688
|
||||
.space 0x8
|
||||
|
||||
glabel D_80175690
|
||||
.space 0x8
|
||||
|
||||
glabel D_80175698
|
||||
.space 0x4
|
||||
|
||||
glabel D_8017569C
|
||||
.space 0x4
|
||||
|
||||
glabel D_801756A0
|
||||
.space 0x8
|
||||
|
||||
glabel D_801756A8
|
||||
.space 0x8
|
|
@ -1,25 +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 purposee registers
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 4
|
||||
|
||||
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
|
|
@ -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 purposee registers
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 4
|
||||
|
||||
glabel D_8014B270
|
||||
.double 0.1
|
||||
|
||||
glabel D_8014B278
|
||||
.double 0.1
|
|
@ -1,28 +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 purposee registers
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 4
|
||||
|
||||
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?
|
|
@ -11,4 +11,4 @@ glabel D_801344D0
|
|||
.incbin "baserom.z64", 0xBAB670, 0x7FE
|
||||
|
||||
glabel D_80134CCE
|
||||
.incbin "baserom.z64", 0xBABE6E, 0x2
|
||||
.incbin "baserom.z64", 0xBABE6E, 0x2
|
|
@ -125,7 +125,7 @@ void* memcpy(void* dst, const void* src, size_t size);
|
|||
void osInvalICache(void* vaddr, s32 nbytes);
|
||||
void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msg, s32 count);
|
||||
void osInvalDCache(void* vaddr, s32 nbytes);
|
||||
u32 __osSiDeviceBusy();
|
||||
s32 __osSiDeviceBusy();
|
||||
void osSetThreadPri(OSThread* thread, OSPri pri);
|
||||
OSPri osGetThreadPri(OSThread* thread);
|
||||
s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
|
||||
|
@ -2319,8 +2319,8 @@ u32 func_800FFA50(JpegDecoder* decoder, u16*, u32, u8, u32*);
|
|||
f32 sinf(f32);
|
||||
s16 sins(u16);
|
||||
// ? func_801004C0(?);
|
||||
// ? func_801005CC(?);
|
||||
// ? func_80100734(?);
|
||||
// ? osSpTaskLoad(?);
|
||||
// ? osSpTaskStartGo(?);
|
||||
// s32 osSetRumble(unk_controller_t *arg0, u32 vibrate);
|
||||
// void osSetUpMempakWrite(s32 ctrlridx, pif_data_buffer_t* buf);
|
||||
// s32 osProbeRumblePak(OSMesgQueue* ctrlrqueue, unk_controller_t *unk_controller, u32 ctrlridx);
|
||||
|
@ -2335,7 +2335,7 @@ s16 sins(u16);
|
|||
// void __osPackReadData();
|
||||
// ? guPerspectiveF(?);
|
||||
// ? guPerspective(?);
|
||||
// ? func_80101360(?);
|
||||
// ? __osSpRawStartDma(?);
|
||||
// s32 __osSiRawStartDma(s32 dir, void *addr);
|
||||
// ? osSpTaskYield(?);
|
||||
// ? func_801014C0(?);
|
||||
|
@ -2359,12 +2359,12 @@ void func_80101E34(Mtx*, f32, f32, f32, f32, f32, f32, f32, f32, f32);
|
|||
// ? func_80102FA0(?);
|
||||
// ? func_80103010(?);
|
||||
// ? func_801031F0(?);
|
||||
// ? func_80103210(?);
|
||||
// ? osContStartQuery(?);
|
||||
// ? func_8010328C(?);
|
||||
// ? func_801032B0(?);
|
||||
void func_80103A70(UNK_PTR, Gfx*, Hilite*, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32,
|
||||
s32, s32);
|
||||
// ? func_80103B30(?);
|
||||
// ? __osSpDeviceBusy(?);
|
||||
// ? func_80103B60(?);
|
||||
// ? func_80103BB0(?);
|
||||
void func_80103D58(Mtx*, f32, f32, f32, f32, f32, f32, f32);
|
||||
|
@ -2372,7 +2372,7 @@ void func_80103D58(Mtx*, f32, f32, f32, f32, f32, f32, f32);
|
|||
// ? func_80103E20(?);
|
||||
// ? func_80103FA4(?);
|
||||
// ? func_80103FF0(?);
|
||||
// ? func_80104140(?);
|
||||
// ? __osGetActiveQueue(?);
|
||||
// ? func_80104160(?);
|
||||
u32 osDpGetStatus(void);
|
||||
void osDpSetStatus(u32 status);
|
||||
|
@ -2413,8 +2413,8 @@ OSThread* __osGetCurrFaultedThread();
|
|||
// ? __ll_to_f(?);
|
||||
// ? __ull_to_d(?);
|
||||
// ? __ull_to_f(?);
|
||||
// ? func_80106760(?);
|
||||
// ? func_801067A0(?);
|
||||
// ? osViGetCurrentFramebuffer(?);
|
||||
// ? __osSpSetPc(?);
|
||||
f32 absf(f32);
|
||||
void* func_80106860(void* ptr, s32 val, size_t size);
|
||||
// ? func_801068B0(?);
|
||||
|
|
|
@ -6,6 +6,38 @@
|
|||
#include <PR/os_cont.h>
|
||||
#include <PR/os_message.h>
|
||||
|
||||
#define CONT_CMD_REQUEST_STATUS 0
|
||||
#define CONT_CMD_READ_BUTTON 1
|
||||
#define CONT_CMD_READ_MEMPACK 2
|
||||
#define CONT_CMD_WRITE_MEMPACK 3
|
||||
#define CONT_CMD_READ_EEPROM 4
|
||||
#define CONT_CMD_WRITE_EEPROM 5
|
||||
#define CONT_CMD_RESET 0xFF
|
||||
|
||||
#define CONT_CMD_REQUEST_STATUS_TX 1
|
||||
#define CONT_CMD_READ_BUTTON_TX 1
|
||||
#define CONT_CMD_READ_MEMPACK_TX 3
|
||||
#define CONT_CMD_WRITE_MEMPACK_TX 35
|
||||
#define CONT_CMD_READ_EEPROM_TX 2
|
||||
#define CONT_CMD_WRITE_EEPROM_TX 10
|
||||
#define CONT_CMD_RESET_TX 1
|
||||
|
||||
#define CONT_CMD_REQUEST_STATUS_RX 3
|
||||
#define CONT_CMD_READ_BUTTON_RX 4
|
||||
#define CONT_CMD_READ_MEMPACK_RX 33
|
||||
#define CONT_CMD_WRITE_MEMPACK_RX 1
|
||||
#define CONT_CMD_READ_EEPROM_RX 8
|
||||
#define CONT_CMD_WRITE_EEPROM_RX 1
|
||||
#define CONT_CMD_RESET_RX 3
|
||||
|
||||
#define CONT_CMD_NOP 0xFF
|
||||
#define CONT_CMD_END 0xFE // Indicates end of a command
|
||||
#define CONT_CMD_EXE 1 // Set pif ram status byte to this to do a command
|
||||
|
||||
#define DIR_STATUS_EMPTY 0
|
||||
#define DIR_STATUS_UNKNOWN 1
|
||||
#define DIR_STATUS_OCCUPIED 2
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* 0x00 */ union{
|
||||
|
|
|
@ -3792,7 +3792,7 @@ extern Arena gSystemArena;
|
|||
//extern OSMesg osSiMesgBuff[SIAccessQueueSize];
|
||||
//extern OSMesgQueue gOsSiMessageQueue;
|
||||
//extern pif_data_buffer_t _osPifInternalBuff;
|
||||
//extern u8 _osCont_lastPollType;
|
||||
extern u8 _osCont_lastPollType;
|
||||
//extern u8 _osCont_numControllers;
|
||||
//extern OSMesgQueue _osContMesgQueue;
|
||||
//extern OSMesg _osContMesgBuff[4];
|
||||
|
|
|
@ -345,13 +345,14 @@ typedef struct {
|
|||
/* 0x000C */ s32 rightX; // lrx (lower right x)
|
||||
} Viewport; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ s32 magic; // string literal "VIEW" / 0x56494557
|
||||
/* 0x0004 */ GraphicsContext* gfxCtx;
|
||||
/* 0x0008 */ Viewport viewport;
|
||||
/* 0x0018 */ f32 fovy; // vertical field of view in degrees
|
||||
/* 0x001C */ f32 near; // distance to near clipping plane
|
||||
/* 0x0020 */ f32 far; // distance to far clipping plane
|
||||
/* 0x001C */ f32 zNear; // distance to near clipping plane
|
||||
/* 0x0020 */ f32 zFar; // distance to far clipping plane
|
||||
/* 0x0024 */ f32 scale; // scale for matrix elements
|
||||
/* 0x0028 */ Vec3f eye;
|
||||
/* 0x0034 */ Vec3f unk_34;
|
||||
|
@ -368,7 +369,7 @@ typedef struct {
|
|||
/* 0x0110 */ Vec3f unk_110;
|
||||
/* 0x011C */ u16 normal; // used to normalize the projection matrix
|
||||
/* 0x0120 */ u32 flags;
|
||||
/* 0x0124 */ s32 unk_124;
|
||||
/* 0x0124 */ s32 unk_124;
|
||||
} View; // size = 0x128
|
||||
|
||||
typedef struct {
|
||||
|
|
28
spec
28
spec
|
@ -508,17 +508,16 @@ beginseg
|
|||
include "build/data/code_800FFA50.bss.o"
|
||||
include "build/asm/code_80100040.o"
|
||||
include "build/asm/code_801001E0.o"
|
||||
include "build/asm/code_80100290.o"
|
||||
include "build/data/code_80100290.data.o"
|
||||
include "build/data/code_80100290.rodata.o"
|
||||
include "build/data/code_80100290.bss.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"
|
||||
include "build/src/libultra_code/osContInit.o"
|
||||
include "build/src/libultra_code/osContStartReadData.o"
|
||||
include "build/src/libultra_code/guPerspectiveF.o"
|
||||
include "build/asm/code_80101360.o"
|
||||
include "build/data/code_80101360.rodata.o"
|
||||
include "build/src/libultra_code/__osSpRawStartDma.o"
|
||||
include "build/src/libultra_code/__osSiRawStartDma.o"
|
||||
include "build/asm/code_801014A0.o"
|
||||
include "build/data/code_801014A0.bss.o"
|
||||
|
@ -533,22 +532,21 @@ beginseg
|
|||
include "build/asm/code_80102FA0.o"
|
||||
include "build/asm/code_80103010.o"
|
||||
include "build/src/libultra_code/sqrtf.o"
|
||||
include "build/asm/code_801031F0.o"
|
||||
include "build/src/libultra_code/code_80103B30.o"
|
||||
include "build/src/libultra_code/code_801031F0.o"
|
||||
include "build/src/libultra_code/sp.o"
|
||||
include "build/asm/code_80103B60.o"
|
||||
include "build/asm/code_80103BB0.o"
|
||||
include "build/data/code_80103BB0.data.o"
|
||||
include "build/asm/code_80103DC0.o"
|
||||
include "build/data/code_80103DC0.data.o"
|
||||
include "build/src/libultra_code/code_80104140.o"
|
||||
include "build/src/libultra_code/__osGetActiveQueue.o"
|
||||
include "build/asm/code_80104160.o"
|
||||
include "build/data/code_80104610.rodata.o"
|
||||
include "build/src/libultra_code/osDpGetStatus.o"
|
||||
include "build/src/libultra_code/osDpSetStatus.o"
|
||||
include "build/asm/code_801041E0.o"
|
||||
include "build/asm/code_80104450.o"
|
||||
include "build/asm/cosf.o"
|
||||
include "build/asm/coss.o"
|
||||
include "build/src/libultra_code/cosf.o"
|
||||
include "build/src/libultra_code/coss.o"
|
||||
include "build/asm/osViSetEvent.o"
|
||||
include "build/asm/code_80104810.o"
|
||||
include "build/asm/code_80104B00.o"
|
||||
|
@ -567,12 +565,12 @@ beginseg
|
|||
include "build/src/libultra_code/__osSpGetStatus.o"
|
||||
include "build/src/libultra_code/__osSpSetStatus.o"
|
||||
include "build/asm/osWritebackDCacheAll.o"
|
||||
include "build/src/libultra_code/code_801064C0.o"
|
||||
include "build/src/libultra_code/__osGetCurrFaultedThread.o"
|
||||
include "build/asm/code_801064E0.o"
|
||||
include "build/asm/code_80106550.o"
|
||||
include "build/data/code_80106550.rodata.o"
|
||||
include "build/src/libultra_code/code_80106760.o"
|
||||
include "build/src/libultra_code/code_801067A0.o"
|
||||
include "build/src/libultra_code/osViGetCurrentFramebuffer.o"
|
||||
include "build/src/libultra_code/__osSpSetPc.o"
|
||||
include "build/asm/code_801067D0.o"
|
||||
include "build/asm/code_801067E0.o"
|
||||
include "build/asm/code_801067F0.o"
|
||||
|
|
|
@ -499,7 +499,7 @@ void Fault_LogThreadContext(OSThread* t) {
|
|||
}
|
||||
|
||||
OSThread* Fault_FindFaultedThread() {
|
||||
OSThread* iter = func_80104140();
|
||||
OSThread* iter = __osGetActiveQueue();
|
||||
while (iter->priority != -1) {
|
||||
if (iter->priority > 0 && iter->priority < 0x7f && (iter->flags & 3)) {
|
||||
return iter;
|
||||
|
|
|
@ -298,7 +298,7 @@ void PadMgr_HandleRetraceMsg(PadMgr* padmgr) {
|
|||
bzero(&padmgr->pads[0], 0x18);
|
||||
}
|
||||
PadMgr_ProcessInputs(padmgr);
|
||||
func_80103210(queue);
|
||||
osContStartQuery(queue);
|
||||
osRecvMesg(queue, NULL, OS_MESG_BLOCK);
|
||||
func_8010328C(padmgr);
|
||||
PadMgr_UnlockSerialMesgQueue(padmgr, queue);
|
||||
|
|
|
@ -1094,7 +1094,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
|
|||
gfxCtx->polyOpa.p = func_800BC8A0(globalCtx, gfxCtx->polyOpa.p);
|
||||
gfxCtx->polyXlu.p = func_800BC8A0(globalCtx, gfxCtx->polyXlu.p);
|
||||
|
||||
func_800AA460(&globalCtx->view, globalCtx->view.fovy, globalCtx->view.near, globalCtx->lightCtx.unk_0C);
|
||||
func_800AA460(&globalCtx->view, globalCtx->view.fovy, globalCtx->view.zNear, globalCtx->lightCtx.unk_0C);
|
||||
func_800AAA50(&globalCtx->view, 15);
|
||||
|
||||
Matrix_MtxToMtxF(&globalCtx->view.viewing, &globalCtx->mf_11DA0);
|
||||
|
|
|
@ -44,8 +44,8 @@ void View_Init(View* view, GraphicsContext* gfxCtx) {
|
|||
view->eye.y = 0.0f;
|
||||
view->scale = 1.0f;
|
||||
view->fovy = 60.0f;
|
||||
view->near = 10.0f;
|
||||
view->far = 12800.0f;
|
||||
view->zNear = 10.0f;
|
||||
view->zFar = 12800.0f;
|
||||
view->unk_34.x = 0.0f;
|
||||
view->unk_40.x = 0.0f;
|
||||
view->unk_40.y = 1.0f;
|
||||
|
@ -91,29 +91,29 @@ void View_GetScale(View* view, f32* scale) {
|
|||
|
||||
void func_800AA460(View* view, f32 fovy, f32 near, f32 far) {
|
||||
view->fovy = fovy;
|
||||
view->near = near;
|
||||
view->far = far;
|
||||
view->zNear = near;
|
||||
view->zFar = far;
|
||||
view->flags |= 4;
|
||||
}
|
||||
|
||||
void func_800AA48C(View* view, f32* fovy, f32* near, f32* far) {
|
||||
*fovy = view->fovy;
|
||||
*near = view->near;
|
||||
*far = view->far;
|
||||
*near = view->zNear;
|
||||
*far = view->zFar;
|
||||
}
|
||||
|
||||
void func_800AA4A8(View* view, f32 fovy, f32 near, f32 far) {
|
||||
view->fovy = fovy;
|
||||
view->near = near;
|
||||
view->far = far;
|
||||
view->zNear = near;
|
||||
view->zFar = far;
|
||||
view->flags |= 8;
|
||||
view->scale = 1.0f;
|
||||
}
|
||||
|
||||
void func_800AA4E0(View* view, f32* fovy, f32* near, f32* far) {
|
||||
*fovy = view->fovy;
|
||||
*near = view->near;
|
||||
*far = view->far;
|
||||
*near = view->zNear;
|
||||
*far = view->zFar;
|
||||
}
|
||||
|
||||
void View_SetViewport(View* view, Viewport* viewport) {
|
||||
|
@ -313,14 +313,14 @@ s32 func_800AAA9C(View* view) {
|
|||
}
|
||||
guPerspective(projection, &view->normal, HREG(83), HREG(84) / 10000.0f, HREG(85), HREG(86), HREG(87) / 100.0f);
|
||||
} else {
|
||||
guPerspective(projection, &view->normal, view->fovy, aspect, view->near, view->far, view->scale);
|
||||
guPerspective(projection, &view->normal, view->fovy, aspect, view->zNear, view->zFar, view->scale);
|
||||
}
|
||||
|
||||
if (QREG(88) & 1) {
|
||||
s32 i;
|
||||
MtxF mf;
|
||||
|
||||
osSyncPrintf("fovy %f near %f far %f scale %f aspect %f normal %08x\n", view->fovy, view->near, view->far,
|
||||
osSyncPrintf("fovy %f near %f far %f scale %f aspect %f normal %08x\n", view->fovy, view->zNear, view->zFar,
|
||||
view->scale, aspect, view->normal);
|
||||
|
||||
Matrix_MtxToMtxF(projection, &mf);
|
||||
|
@ -401,7 +401,7 @@ s32 func_800AB0A8(View* view) {
|
|||
view->projectionPtr = projection;
|
||||
|
||||
func_801045A4(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f,
|
||||
(f32)gScreenHeight * 0.5f, view->near, view->far, view->scale);
|
||||
(f32)gScreenHeight * 0.5f, view->zNear, view->zFar, view->scale);
|
||||
|
||||
view->projection = *projection;
|
||||
|
||||
|
@ -439,7 +439,7 @@ s32 func_800AB2C4(View* view) {
|
|||
view->projectionPtr = projection;
|
||||
|
||||
func_801045A4(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f,
|
||||
(f32)gScreenHeight * 0.5f, view->near, view->far, view->scale);
|
||||
(f32)gScreenHeight * 0.5f, view->zNear, view->zFar, view->scale);
|
||||
|
||||
view->projection = *projection;
|
||||
|
||||
|
@ -482,7 +482,7 @@ s32 func_800AB560(View* view) {
|
|||
height = view->viewport.bottomY - view->viewport.topY;
|
||||
|
||||
aspect = (f32)width / (f32)height;
|
||||
guPerspective(projection, &view->normal, view->fovy, aspect, view->near, view->far, view->scale);
|
||||
guPerspective(projection, &view->normal, view->fovy, aspect, view->zNear, view->zFar, view->scale);
|
||||
|
||||
view->projection = *projection;
|
||||
|
||||
|
@ -552,7 +552,7 @@ s32 func_800AB9EC(View* view, s32 arg1, Gfx** gfxp) {
|
|||
view->projectionPtr = projection;
|
||||
|
||||
func_801045A4(projection, -(f32)gScreenWidth * 0.5f, (f32)gScreenWidth * 0.5f, -(f32)gScreenHeight * 0.5f,
|
||||
(f32)gScreenHeight * 0.5f, view->near, view->far, view->scale);
|
||||
(f32)gScreenHeight * 0.5f, view->zNear, view->zFar, view->scale);
|
||||
|
||||
view->projection = *projection;
|
||||
|
||||
|
@ -567,7 +567,7 @@ s32 func_800AB9EC(View* view, s32 arg1, Gfx** gfxp) {
|
|||
width = view->viewport.rightX - view->viewport.leftX;
|
||||
height = view->viewport.bottomY - view->viewport.topY;
|
||||
|
||||
guPerspective(projection, &view->normal, view->fovy, (f32)width / (f32)height, view->near, view->far,
|
||||
guPerspective(projection, &view->normal, view->fovy, (f32)width / (f32)height, view->zNear, view->zFar,
|
||||
view->scale);
|
||||
|
||||
view->projection = *projection;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <global.h>
|
||||
#include <ultra64/hardware.h>
|
||||
|
||||
u32 __osSiDeviceBusy() {
|
||||
s32 __osSiDeviceBusy() {
|
||||
register u32 status;
|
||||
status = HW_REG(SI_STATUS_REG, u32);
|
||||
if (status & (SI_STATUS_DMA_BUSY | SI_STATUS_IO_READ_BUSY)) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <global.h>
|
||||
|
||||
OSThread* func_80104140() {
|
||||
OSThread* __osGetActiveQueue() {
|
||||
return __osActiveQueue;
|
||||
}
|
17
src/libultra_code/__osSpRawStartDma.c
Normal file
17
src/libultra_code/__osSpRawStartDma.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <ultra64/hardware.h>
|
||||
|
||||
s32 __osSpRawStartDma(s32 direction, u32 devAddr, void* dramAddr, u32 size) {
|
||||
if (__osSpDeviceBusy()) {
|
||||
return -1;
|
||||
}
|
||||
HW_REG(SP_MEM_ADDR_REG, u32) = devAddr;
|
||||
HW_REG(SP_DRAM_ADDR_REG, u32) = osVirtualToPhysical(dramAddr);
|
||||
if (direction == OS_READ) {
|
||||
HW_REG(SP_WR_LEN_REG, u32) = size - 1;
|
||||
} else {
|
||||
HW_REG(SP_RD_LEN_REG, u32) = size - 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -2,16 +2,17 @@
|
|||
#include <global.h>
|
||||
#include <ultra64/hardware.h>
|
||||
|
||||
s32 func_801067A0(u32 a0) {
|
||||
register u32 spStatus;
|
||||
s32 __osSpSetPc(u32 data) {
|
||||
|
||||
spStatus = HW_REG(SP_STATUS_REG, u32);
|
||||
register u32 spStatus = HW_REG(SP_STATUS_REG, u32);
|
||||
|
||||
if (!(spStatus & SP_STATUS_HALT)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
HW_REG(SP_PC_REG, u32) = a0;
|
||||
else {
|
||||
HW_REG(SP_PC_REG, u32) = data;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
void func_80101B40(u32* a0) {
|
||||
a0[0] = 0x3F800000; // Float?
|
||||
a0[1] = 0;
|
||||
a0[2] = 0;
|
||||
a0[3] = 0;
|
||||
a0[4] = 0;
|
||||
a0[5] = 0;
|
||||
a0[6] = 0x3F800000;
|
||||
a0[7] = 0;
|
||||
a0[8] = 0;
|
||||
a0[9] = 0;
|
||||
a0[10] = 0x3F800000;
|
||||
a0[11] = 0;
|
||||
a0[12] = 0;
|
||||
a0[13] = 0;
|
||||
a0[14] = 0;
|
||||
a0[15] = 0x3F800000;
|
||||
}
|
26
src/libultra_code/code_801031F0.c
Normal file
26
src/libultra_code/code_801031F0.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "libultra_internal.h"
|
||||
#include <global.h>
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801031F0/func_801031F0.s")
|
||||
|
||||
s32 osContStartQuery(OSMesgQueue* mq) {
|
||||
s32 ret;
|
||||
ret = 0;
|
||||
|
||||
__osSiGetAccess();
|
||||
if (_osCont_lastPollType != CONT_CMD_REQUEST_STATUS) {
|
||||
__osPackRequestData(CONT_CMD_REQUEST_STATUS);
|
||||
ret = __osSiRawStartDma(OS_WRITE, &_osPifInternalBuff);
|
||||
osRecvMesg(mq, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
ret = __osSiRawStartDma(OS_READ, &_osPifInternalBuff);
|
||||
_osCont_lastPollType = CONT_CMD_REQUEST_STATUS;
|
||||
__osSiRelAccess();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801031F0/func_8010328C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801031F0/func_801032B0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801031F0/func_80103A70.s")
|
|
@ -1,15 +0,0 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <ultra64/hardware.h>
|
||||
|
||||
u32 func_80103B30() {
|
||||
register u32 status;
|
||||
|
||||
status = HW_REG(SP_STATUS_REG, u32);
|
||||
|
||||
if (status & 0x1C) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
3
src/libultra_code/cosf.c
Normal file
3
src/libultra_code/cosf.c
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "libultra_internal.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cosf/cosf.s")
|
3
src/libultra_code/coss.c
Normal file
3
src/libultra_code/coss.c
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "libultra_internal.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/coss/coss.s")
|
|
@ -29,7 +29,7 @@ s32 __osSiRawWriteIo(void*, u32);
|
|||
s32 osPiRawReadIo(u32 a0, u32 *a1);
|
||||
void __osSpSetStatus(u32);
|
||||
u32 __osSpGetStatus();
|
||||
s32 __osSpSetPc(void*);
|
||||
s32 __osSpSetPc(u32 data);
|
||||
s32 __osSpDeviceBusy();
|
||||
s32 __osSiDeviceBusy();
|
||||
s32 __osSpRawStartDma(u32 dir, void *sp_ptr, void *dram_ptr, size_t size);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
u32* func_80106760() {
|
||||
u32* osViGetCurrentFramebuffer() {
|
||||
register u32 sMask = __osDisableInt();
|
||||
u32* var1;
|
||||
|
3
src/libultra_code/sinf.c
Normal file
3
src/libultra_code/sinf.c
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "libultra_internal.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sinf/sinf.s")
|
3
src/libultra_code/sins.c
Normal file
3
src/libultra_code/sins.c
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "libultra_internal.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sins/sins.s")
|
13
src/libultra_code/sp.c
Normal file
13
src/libultra_code/sp.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <ultra64/hardware.h>
|
||||
|
||||
u32 __osSpDeviceBusy() {
|
||||
register u32 status = HW_REG(SP_STATUS_REG, u32);
|
||||
|
||||
if (status & (SP_STATUS_DMA_BUSY | SP_STATUS_DMA_FULL | SP_STATUS_IO_FULL)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
68
src/libultra_code/sptask.c
Normal file
68
src/libultra_code/sptask.c
Normal file
|
@ -0,0 +1,68 @@
|
|||
#include "libultra_internal.h"
|
||||
#include <ultra64/hardware.h>
|
||||
|
||||
#define _osVirtualToPhysical(ptr) \
|
||||
if (ptr != NULL) { \
|
||||
ptr = (void*)osVirtualToPhysical(ptr); \
|
||||
}
|
||||
|
||||
static OSTask sTmpTask;
|
||||
OSTask* _VirtualToPhysicalTask(OSTask* intp) {
|
||||
OSTask* tp;
|
||||
tp = &sTmpTask;
|
||||
bcopy(intp, tp, sizeof(OSTask));
|
||||
|
||||
_osVirtualToPhysical(tp->t.ucode);
|
||||
_osVirtualToPhysical(tp->t.ucode_data);
|
||||
_osVirtualToPhysical(tp->t.dram_stack);
|
||||
_osVirtualToPhysical(tp->t.output_buff);
|
||||
_osVirtualToPhysical(tp->t.output_buff_size);
|
||||
_osVirtualToPhysical(tp->t.data_ptr);
|
||||
_osVirtualToPhysical(tp->t.yield_data_ptr);
|
||||
return tp;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// very close to matching, just regalloc
|
||||
void osSpTaskLoad(OSTask* intp) {
|
||||
|
||||
OSTask* tp;
|
||||
tp = _VirtualToPhysicalTask(intp);
|
||||
if (tp->t.flags & OS_TASK_YIELDED) {
|
||||
tp->t.ucode_data = tp->t.yield_data_ptr;
|
||||
tp->t.ucode_data_size = tp->t.yield_data_size;
|
||||
intp->t.flags &= ~OS_TASK_YIELDED;
|
||||
if (tp->t.flags & OS_TASK_LOADABLE) {
|
||||
tp->t.ucode = HW_REG((u32)intp->t.yield_data_ptr + OS_YIELD_DATA_SIZE - 4, u32);
|
||||
}
|
||||
}
|
||||
osWritebackDCache(tp, sizeof(OSTask));
|
||||
__osSpSetStatus(SP_CLR_SIG0 | SP_CLR_SIG1 | SP_CLR_SIG2 | SP_SET_INTR_BREAK);
|
||||
while (__osSpSetPc(SP_IMEM_START) == -1) {
|
||||
;
|
||||
}
|
||||
|
||||
while (__osSpRawStartDma(1, (SP_IMEM_START - sizeof(*tp)), tp, sizeof(OSTask)) == -1) {
|
||||
;
|
||||
}
|
||||
|
||||
while (__osSpDeviceBusy()) {
|
||||
;
|
||||
}
|
||||
|
||||
while (__osSpRawStartDma(1, SP_IMEM_START, tp->t.ucode_boot, tp->t.ucode_boot_size) == -1) {
|
||||
;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sptask/osSpTaskLoad.s")
|
||||
#endif
|
||||
|
||||
void osSpTaskStartGo(OSTask* tp) {
|
||||
|
||||
while (__osSpDeviceBusy()) {
|
||||
;
|
||||
}
|
||||
|
||||
__osSpSetStatus(SP_SET_INTR_BREAK | SP_CLR_SSTEP | SP_CLR_BROKE | SP_CLR_HALT);
|
||||
}
|
|
@ -27,13 +27,13 @@ if not os.path.exists("c"):
|
|||
dirs = os.listdir("asm")
|
||||
|
||||
for directory in dirs:
|
||||
if (os.path.isdir("asm\\" + directory)):
|
||||
if (os.path.isdir("asm//" + directory)):
|
||||
continue
|
||||
|
||||
print("Processing asm\\" + directory)
|
||||
print("Processing asm//" + directory)
|
||||
|
||||
folderName = os.path.splitext(directory)[0]
|
||||
lines = ReadAllLines("asm\\" + directory)
|
||||
lines = ReadAllLines("asm//" + directory)
|
||||
functions = list()
|
||||
currentFunction = None
|
||||
|
||||
|
@ -50,11 +50,11 @@ for directory in dirs:
|
|||
if (currentFunction != None):
|
||||
functions.insert(len(functions), currentFunction)
|
||||
|
||||
if not os.path.exists("asm\\" + folderName):
|
||||
os.makedirs("asm\\" + folderName)
|
||||
if not os.path.exists("asm//" + folderName):
|
||||
os.makedirs("asm//" + folderName)
|
||||
|
||||
for func in functions:
|
||||
WriteAllLines("asm\\" + folderName + "\\" + func.funcName + ".s", func.lines)
|
||||
WriteAllLines("asm//" + folderName + "//" + func.funcName + ".s", func.lines)
|
||||
|
||||
cLines = list()
|
||||
|
||||
|
@ -64,6 +64,6 @@ for directory in dirs:
|
|||
for func in functions:
|
||||
cLines.insert(len(cLines), "#pragma GLOBAL_ASM(\"asm/non_matchings/code/" + folderName + "/" + func.funcName + ".s\")\n")
|
||||
|
||||
WriteAllLines("c\\" + folderName + ".c", cLines)
|
||||
WriteAllLines("c//" + folderName + ".c", cLines)
|
||||
|
||||
print("Done!")
|
||||
print("Done!")
|
||||
|
|
Loading…
Reference in a new issue