This commit is contained in:
Ethan Roseman 2020-07-28 23:35:42 -04:00
parent 133774fc20
commit a0dff3a451
32 changed files with 104 additions and 84 deletions

View File

@ -97,7 +97,8 @@ ranges:
- [0x40e10, 0x41050, "asm", "code_40e10_len_240", 0x80065a10]
- [0x41050, 0x41170, "asm", "code_41050_len_120", 0x80065c50]
- [0x41170, 0x41260, "asm", "code_41170_len_f0", 0x80065d70]
- [0x41260, 0x41350, "asm", "code_41260_len_f0", 0x80065e60]
- [0x41260, 0x41330, "asm", "osCreateThread", 0x80065e60]
- [0x41330, 0x41350, "asm", "osGetThreadPri", 0x80065F30]
- [0x41350, 0x41420, "asm", "code_41350_len_d0", 0x80065f50]
- [0x41420, 0x41540, "asm", "code_41420_len_120", 0x80066020]
- [0x41540, 0x41600, "asm", "code_41540_len_c0", 0x80066140]

View File

@ -61,7 +61,7 @@ osCreatePiManager:
/* 03BE94 80060A94 0C0197D4 */ jal osSetThreadPri
/* 03BE98 80060A98 02002821 */ addu $a1, $s0, $zero
.L80060A9C:
/* 03BE9C 80060A9C 0C01ACD8 */ jal osDisableInt
/* 03BE9C 80060A9C 0C01ACD8 */ jal __osDisableInt
/* 03BEA0 80060AA0 00000000 */ nop
/* 03BEA4 80060AA4 3C11800B */ lui $s1, 0x800b
/* 03BEA8 80060AA8 2631E6E0 */ addiu $s1, $s1, -0x1920
@ -98,7 +98,7 @@ osCreatePiManager:
/* 03BF24 80060B24 AFA30010 */ sw $v1, 0x10($sp)
/* 03BF28 80060B28 0C019808 */ jal osStartThread
/* 03BF2C 80060B2C 02202021 */ addu $a0, $s1, $zero
/* 03BF30 80060B30 0C01ACF4 */ jal osRestoreInt
/* 03BF30 80060B30 0C01ACF4 */ jal __osRestoreInt
/* 03BF34 80060B34 02002021 */ addu $a0, $s0, $zero
/* 03BF38 80060B38 2402FFFF */ addiu $v0, $zero, -1
/* 03BF3C 80060B3C 12420003 */ beq $s2, $v0, .L80060B4C

View File

@ -15,14 +15,14 @@ osEPiLinkHandle:
/* 03C2C0 80060EC0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 03C2C4 80060EC4 AFB00010 */ sw $s0, 0x10($sp)
/* 03C2C8 80060EC8 AFBF0014 */ sw $ra, 0x14($sp)
/* 03C2CC 80060ECC 0C01ACD8 */ jal osDisableInt
/* 03C2CC 80060ECC 0C01ACD8 */ jal __osDisableInt
/* 03C2D0 80060ED0 00808021 */ addu $s0, $a0, $zero
/* 03C2D4 80060ED4 3C038009 */ lui $v1, 0x8009
/* 03C2D8 80060ED8 8C633D6C */ lw $v1, 0x3d6c($v1)
/* 03C2DC 80060EDC 00402021 */ addu $a0, $v0, $zero
/* 03C2E0 80060EE0 3C018009 */ lui $at, 0x8009
/* 03C2E4 80060EE4 AC303D6C */ sw $s0, 0x3d6c($at)
/* 03C2E8 80060EE8 0C01ACF4 */ jal osRestoreInt
/* 03C2E8 80060EE8 0C01ACF4 */ jal __osRestoreInt
/* 03C2EC 80060EEC AE030000 */ sw $v1, ($s0)
/* 03C2F0 80060EF0 00001021 */ addu $v0, $zero, $zero
/* 03C2F4 80060EF4 8FBF0014 */ lw $ra, 0x14($sp)

View File

@ -90,14 +90,14 @@ osCartRomInit:
/* 03C434 80061034 A022430F */ sb $v0, 0x430f($at)
/* 03C438 80061038 3C01800B */ lui $at, 0x800b
/* 03C43C 8006103C A0234310 */ sb $v1, 0x4310($at)
/* 03C440 80061040 0C01ACD8 */ jal osDisableInt
/* 03C440 80061040 0C01ACD8 */ jal __osDisableInt
/* 03C444 80061044 2630FFF4 */ addiu $s0, $s1, -0xc
/* 03C448 80061048 3C038009 */ lui $v1, 0x8009
/* 03C44C 8006104C 8C633D6C */ lw $v1, 0x3d6c($v1)
/* 03C450 80061050 00402021 */ addu $a0, $v0, $zero
/* 03C454 80061054 3C018009 */ lui $at, 0x8009
/* 03C458 80061058 AC303D6C */ sw $s0, 0x3d6c($at)
/* 03C45C 8006105C 0C01ACF4 */ jal osRestoreInt
/* 03C45C 8006105C 0C01ACF4 */ jal __osRestoreInt
/* 03C460 80061060 AE23FFF4 */ sw $v1, -0xc($s1)
.L80061064:
/* 03C464 80061064 0C018544 */ jal osPiRelAccess

View File

@ -22,7 +22,7 @@ osJamMesg:
/* 0409CC 800655CC AFBF0028 */ sw $ra, 0x28($sp)
/* 0409D0 800655D0 AFB40020 */ sw $s4, 0x20($sp)
/* 0409D4 800655D4 AFB3001C */ sw $s3, 0x1c($sp)
/* 0409D8 800655D8 0C01ACD8 */ jal osDisableInt
/* 0409D8 800655D8 0C01ACD8 */ jal __osDisableInt
/* 0409DC 800655DC AFB10014 */ sw $s1, 0x14($sp)
/* 0409E0 800655E0 8E030008 */ lw $v1, 8($s0)
/* 0409E4 800655E4 8E040010 */ lw $a0, 0x10($s0)
@ -34,7 +34,7 @@ osJamMesg:
.L800655FC:
/* 0409FC 800655FC 12540005 */ beq $s2, $s4, .L80065614
/* 040A00 80065600 26040004 */ addiu $a0, $s0, 4
/* 040A04 80065604 0C01ACF4 */ jal osRestoreInt
/* 040A04 80065604 0C01ACF4 */ jal __osRestoreInt
/* 040A08 80065608 02202021 */ addu $a0, $s1, $zero
/* 040A0C 8006560C 080195B0 */ j .L800656C0
/* 040A10 80065610 2402FFFF */ addiu $v0, $zero, -1
@ -84,7 +84,7 @@ osJamMesg:
/* 040AAC 800656AC 0C019808 */ jal osStartThread
/* 040AB0 800656B0 00402021 */ addu $a0, $v0, $zero
.L800656B4:
/* 040AB4 800656B4 0C01ACF4 */ jal osRestoreInt
/* 040AB4 800656B4 0C01ACF4 */ jal __osRestoreInt
/* 040AB8 800656B8 02202021 */ addu $a0, $s1, $zero
/* 040ABC 800656BC 00001021 */ addu $v0, $zero, $zero
.L800656C0:

View File

@ -21,7 +21,7 @@ osRecvMesg:
/* 040B08 80065708 00C08821 */ addu $s1, $a2, $zero
/* 040B0C 8006570C AFBF0024 */ sw $ra, 0x24($sp)
/* 040B10 80065710 AFB3001C */ sw $s3, 0x1c($sp)
/* 040B14 80065714 0C01ACD8 */ jal osDisableInt
/* 040B14 80065714 0C01ACD8 */ jal __osDisableInt
/* 040B18 80065718 AFB20018 */ sw $s2, 0x18($sp)
/* 040B1C 8006571C 8E030008 */ lw $v1, 8($s0)
/* 040B20 80065720 1460000F */ bnez $v1, .L80065760
@ -30,7 +30,7 @@ osRecvMesg:
.L8006572C:
/* 040B2C 8006572C 16200005 */ bnez $s1, .L80065744
/* 040B30 80065730 02002021 */ addu $a0, $s0, $zero
/* 040B34 80065734 0C01ACF4 */ jal osRestoreInt
/* 040B34 80065734 0C01ACF4 */ jal __osRestoreInt
/* 040B38 80065738 02402021 */ addu $a0, $s2, $zero
/* 040B3C 8006573C 080195FD */ j .L800657F4
/* 040B40 80065740 2402FFFF */ addiu $v0, $zero, -1
@ -82,7 +82,7 @@ osRecvMesg:
/* 040BE0 800657E0 0C019808 */ jal osStartThread
/* 040BE4 800657E4 00402021 */ addu $a0, $v0, $zero
.L800657E8:
/* 040BE8 800657E8 0C01ACF4 */ jal osRestoreInt
/* 040BE8 800657E8 0C01ACF4 */ jal __osRestoreInt
/* 040BEC 800657EC 02402021 */ addu $a0, $s2, $zero
/* 040BF0 800657F0 00001021 */ addu $v0, $zero, $zero
.L800657F4:

View File

@ -22,7 +22,7 @@ osSendMesg:
/* 040C3C 8006583C AFBF0028 */ sw $ra, 0x28($sp)
/* 040C40 80065840 AFB40020 */ sw $s4, 0x20($sp)
/* 040C44 80065844 AFB3001C */ sw $s3, 0x1c($sp)
/* 040C48 80065848 0C01ACD8 */ jal osDisableInt
/* 040C48 80065848 0C01ACD8 */ jal __osDisableInt
/* 040C4C 8006584C AFB10014 */ sw $s1, 0x14($sp)
/* 040C50 80065850 8E030008 */ lw $v1, 8($s0)
/* 040C54 80065854 8E040010 */ lw $a0, 0x10($s0)
@ -34,7 +34,7 @@ osSendMesg:
.L8006586C:
/* 040C6C 8006586C 12540005 */ beq $s2, $s4, .L80065884
/* 040C70 80065870 26040004 */ addiu $a0, $s0, 4
/* 040C74 80065874 0C01ACF4 */ jal osRestoreInt
/* 040C74 80065874 0C01ACF4 */ jal __osRestoreInt
/* 040C78 80065878 02202021 */ addu $a0, $s1, $zero
/* 040C7C 8006587C 0801964B */ j .L8006592C
/* 040C80 80065880 2402FFFF */ addiu $v0, $zero, -1
@ -83,7 +83,7 @@ osSendMesg:
/* 040D18 80065918 0C019808 */ jal osStartThread
/* 040D1C 8006591C 00402021 */ addu $a0, $v0, $zero
.L80065920:
/* 040D20 80065920 0C01ACF4 */ jal osRestoreInt
/* 040D20 80065920 0C01ACF4 */ jal __osRestoreInt
/* 040D24 80065924 02202021 */ addu $a0, $s1, $zero
/* 040D28 80065928 00001021 */ addu $v0, $zero, $zero
.L8006592C:
@ -106,7 +106,7 @@ osSetEventMesg:
/* 040D64 80065964 AFB20018 */ sw $s2, 0x18($sp)
/* 040D68 80065968 00C09021 */ addu $s2, $a2, $zero
/* 040D6C 8006596C AFBF0020 */ sw $ra, 0x20($sp)
/* 040D70 80065970 0C01ACD8 */ jal osDisableInt
/* 040D70 80065970 0C01ACD8 */ jal __osDisableInt
/* 040D74 80065974 AFB3001C */ sw $s3, 0x1c($sp)
/* 040D78 80065978 001018C0 */ sll $v1, $s0, 3
/* 040D7C 8006597C 3C04800E */ lui $a0, 0x800e
@ -134,7 +134,7 @@ osSetEventMesg:
/* 040DD0 800659D0 3C018009 */ lui $at, 0x8009
/* 040DD4 800659D4 AC224630 */ sw $v0, 0x4630($at)
.L800659D8:
/* 040DD8 800659D8 0C01ACF4 */ jal osRestoreInt
/* 040DD8 800659D8 0C01ACF4 */ jal __osRestoreInt
/* 040DDC 800659DC 02602021 */ addu $a0, $s3, $zero
/* 040DE0 800659E0 8FBF0020 */ lw $ra, 0x20($sp)
/* 040DE4 800659E4 8FB3001C */ lw $s3, 0x1c($sp)

View File

@ -18,7 +18,7 @@ osSetThreadPri:
/* 04135C 80065F5C AFB10014 */ sw $s1, 0x14($sp)
/* 041360 80065F60 00A08821 */ addu $s1, $a1, $zero
/* 041364 80065F64 AFBF001C */ sw $ra, 0x1c($sp)
/* 041368 80065F68 0C01ACD8 */ jal osDisableInt
/* 041368 80065F68 0C01ACD8 */ jal __osDisableInt
/* 04136C 80065F6C AFB20018 */ sw $s2, 0x18($sp)
/* 041370 80065F70 16000003 */ bnez $s0, .L80065F80
/* 041374 80065F74 00409021 */ addu $s2, $v0, $zero
@ -57,7 +57,7 @@ osSetThreadPri:
/* 0413F0 80065FF0 0C01AC1B */ jal osEnqueueAndYield
/* 0413F4 80065FF4 24844658 */ addiu $a0, $a0, 0x4658
.L80065FF8:
/* 0413F8 80065FF8 0C01ACF4 */ jal osRestoreInt
/* 0413F8 80065FF8 0C01ACF4 */ jal __osRestoreInt
/* 0413FC 80065FFC 02402021 */ addu $a0, $s2, $zero
/* 041400 80066000 8FBF001C */ lw $ra, 0x1c($sp)
/* 041404 80066004 8FB20018 */ lw $s2, 0x18($sp)

View File

@ -17,7 +17,7 @@ osStartThread:
/* 041428 80066028 00808021 */ addu $s0, $a0, $zero
/* 04142C 8006602C AFBF001C */ sw $ra, 0x1c($sp)
/* 041430 80066030 AFB20018 */ sw $s2, 0x18($sp)
/* 041434 80066034 0C01ACD8 */ jal osDisableInt
/* 041434 80066034 0C01ACD8 */ jal __osDisableInt
/* 041438 80066038 AFB10014 */ sw $s1, 0x14($sp)
/* 04143C 8006603C 96030010 */ lhu $v1, 0x10($s0)
/* 041440 80066040 00409021 */ addu $s2, $v0, $zero
@ -84,7 +84,7 @@ osStartThread:
/* 041510 80066110 0C01AC1B */ jal osEnqueueAndYield
/* 041514 80066114 24844658 */ addiu $a0, $a0, 0x4658
.L80066118:
/* 041518 80066118 0C01ACF4 */ jal osRestoreInt
/* 041518 80066118 0C01ACF4 */ jal __osRestoreInt
/* 04151C 8006611C 02402021 */ addu $a0, $s2, $zero
/* 041520 80066120 8FBF001C */ lw $ra, 0x1c($sp)
/* 041524 80066124 8FB20018 */ lw $s2, 0x18($sp)

View File

@ -16,7 +16,7 @@ osStopThread:
/* 041544 80066144 AFB00010 */ sw $s0, 0x10($sp)
/* 041548 80066148 00808021 */ addu $s0, $a0, $zero
/* 04154C 8006614C AFBF0018 */ sw $ra, 0x18($sp)
/* 041550 80066150 0C01ACD8 */ jal osDisableInt
/* 041550 80066150 0C01ACD8 */ jal __osDisableInt
/* 041554 80066154 AFB10014 */ sw $s1, 0x14($sp)
/* 041558 80066158 24030004 */ addiu $v1, $zero, 4
/* 04155C 8006615C 12000002 */ beqz $s0, .L80066168
@ -58,7 +58,7 @@ osStopThread:
/* 0415D0 800661D0 0C019880 */ jal osDequeueThread
/* 0415D4 800661D4 A6020010 */ sh $v0, 0x10($s0)
.L800661D8:
/* 0415D8 800661D8 0C01ACF4 */ jal osRestoreInt
/* 0415D8 800661D8 0C01ACF4 */ jal __osRestoreInt
/* 0415DC 800661DC 02202021 */ addu $a0, $s1, $zero
/* 0415E0 800661E0 8FBF0018 */ lw $ra, 0x18($sp)
/* 0415E4 800661E4 8FB10014 */ lw $s1, 0x14($sp)

View File

@ -14,7 +14,7 @@
osYieldThread:
/* 041640 80066240 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 041644 80066244 AFBF0014 */ sw $ra, 0x14($sp)
/* 041648 80066248 0C01ACD8 */ jal osDisableInt
/* 041648 80066248 0C01ACD8 */ jal __osDisableInt
/* 04164C 8006624C AFB00010 */ sw $s0, 0x10($sp)
/* 041650 80066250 3C038009 */ lui $v1, 0x8009
/* 041654 80066254 8C634660 */ lw $v1, 0x4660($v1)
@ -24,7 +24,7 @@ osYieldThread:
/* 041664 80066264 00408021 */ addu $s0, $v0, $zero
/* 041668 80066268 0C01AC1B */ jal osEnqueueAndYield
/* 04166C 8006626C A4650010 */ sh $a1, 0x10($v1)
/* 041670 80066270 0C01ACF4 */ jal osRestoreInt
/* 041670 80066270 0C01ACF4 */ jal __osRestoreInt
/* 041674 80066274 02002021 */ addu $a0, $s0, $zero
/* 041678 80066278 8FBF0014 */ lw $ra, 0x14($sp)
/* 04167C 8006627C 8FB00010 */ lw $s0, 0x10($sp)

View File

@ -18,7 +18,7 @@ osGetTime:
/* 0416AC 800662AC AFB3001C */ sw $s3, 0x1c($sp)
/* 0416B0 800662B0 AFB20018 */ sw $s2, 0x18($sp)
/* 0416B4 800662B4 AFB10014 */ sw $s1, 0x14($sp)
/* 0416B8 800662B8 0C01ACD8 */ jal osDisableInt
/* 0416B8 800662B8 0C01ACD8 */ jal __osDisableInt
/* 0416BC 800662BC AFB00010 */ sw $s0, 0x10($sp)
/* 0416C0 800662C0 0C019680 */ jal osGetCount
/* 0416C4 800662C4 0040A021 */ addu $s4, $v0, $zero
@ -29,7 +29,7 @@ osGetTime:
/* 0416D8 800662D8 3C13800A */ lui $s3, 0x800a
/* 0416DC 800662DC 8E73A60C */ lw $s3, -0x59f4($s3)
/* 0416E0 800662E0 02802021 */ addu $a0, $s4, $zero
/* 0416E4 800662E4 0C01ACF4 */ jal osRestoreInt
/* 0416E4 800662E4 0C01ACF4 */ jal __osRestoreInt
/* 0416E8 800662E8 00438023 */ subu $s0, $v0, $v1
/* 0416EC 800662EC 02008821 */ addu $s1, $s0, $zero
/* 0416F0 800662F0 00008021 */ addu $s0, $zero, $zero

View File

@ -36,7 +36,7 @@ osSetTimer:
/* 0417A4 800663A4 AE030014 */ sw $v1, 0x14($s0)
/* 0417A8 800663A8 AE040018 */ sw $a0, 0x18($s0)
.L800663AC:
/* 0417AC 800663AC 0C01ACD8 */ jal osDisableInt
/* 0417AC 800663AC 0C01ACD8 */ jal __osDisableInt
/* 0417B0 800663B0 AE05001C */ sw $a1, 0x1c($s0)
/* 0417B4 800663B4 3C038009 */ lui $v1, 0x8009
/* 0417B8 800663B8 8C634670 */ lw $v1, 0x4670($v1)
@ -84,7 +84,7 @@ osSetTimer:
/* 04184C 8006644C 8C440010 */ lw $a0, 0x10($v0)
/* 041850 80066450 0C019984 */ jal osSetTimerIntr
/* 041854 80066454 8C450014 */ lw $a1, 0x14($v0)
/* 041858 80066458 0C01ACF4 */ jal osRestoreInt
/* 041858 80066458 0C01ACF4 */ jal __osRestoreInt
/* 04185C 8006645C 02402021 */ addu $a0, $s2, $zero
/* 041860 80066460 00001021 */ addu $v0, $zero, $zero
/* 041864 80066464 8FBF001C */ lw $ra, 0x1c($sp)
@ -226,7 +226,7 @@ osSetTimerIntr:
/* 041A40 80066640 24120000 */ addiu $s2, $zero, 0
/* 041A44 80066644 241301D4 */ addiu $s3, $zero, 0x1d4
.L80066648:
/* 041A48 80066648 0C01ACD8 */ jal osDisableInt
/* 041A48 80066648 0C01ACD8 */ jal __osDisableInt
/* 041A4C 8006664C 00000000 */ nop
/* 041A50 80066650 0C019680 */ jal osGetCount
/* 041A54 80066654 00408021 */ addu $s0, $v0, $zero
@ -236,7 +236,7 @@ osSetTimerIntr:
/* 041A64 80066664 00002021 */ addu $a0, $zero, $zero
/* 041A68 80066668 0C01B1A0 */ jal osSetCompare
/* 041A6C 8006666C 02652021 */ addu $a0, $s3, $a1
/* 041A70 80066670 0C01ACF4 */ jal osRestoreInt
/* 041A70 80066670 0C01ACF4 */ jal __osRestoreInt
/* 041A74 80066674 02002021 */ addu $a0, $s0, $zero
/* 041A78 80066678 8FBF0024 */ lw $ra, 0x24($sp)
/* 041A7C 8006667C 8FB30020 */ lw $s3, 0x20($sp)
@ -251,7 +251,7 @@ osInsertTimer:
/* 041A98 80066698 00809021 */ addu $s2, $a0, $zero
/* 041A9C 8006669C AFBF001C */ sw $ra, 0x1c($sp)
/* 041AA0 800666A0 AFB10014 */ sw $s1, 0x14($sp)
/* 041AA4 800666A4 0C01ACD8 */ jal osDisableInt
/* 041AA4 800666A4 0C01ACD8 */ jal __osDisableInt
/* 041AA8 800666A8 AFB00010 */ sw $s0, 0x10($sp)
/* 041AAC 800666AC 3C038009 */ lui $v1, 0x8009
/* 041AB0 800666B0 8C634670 */ lw $v1, 0x4670($v1)
@ -307,7 +307,7 @@ osInsertTimer:
/* 041B64 80066764 8CC20004 */ lw $v0, 4($a2)
/* 041B68 80066768 00E02021 */ addu $a0, $a3, $zero
/* 041B6C 8006676C AC520000 */ sw $s2, ($v0)
/* 041B70 80066770 0C01ACF4 */ jal osRestoreInt
/* 041B70 80066770 0C01ACF4 */ jal __osRestoreInt
/* 041B74 80066774 ACD20004 */ sw $s2, 4($a2)
/* 041B78 80066778 02001021 */ addu $v0, $s0, $zero
/* 041B7C 8006677C 02201821 */ addu $v1, $s1, $zero

View File

@ -14,12 +14,12 @@
osViGetCurrentFramebuffer:
/* 041DB0 800669B0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 041DB4 800669B4 AFBF0014 */ sw $ra, 0x14($sp)
/* 041DB8 800669B8 0C01ACD8 */ jal osDisableInt
/* 041DB8 800669B8 0C01ACD8 */ jal __osDisableInt
/* 041DBC 800669BC AFB00010 */ sw $s0, 0x10($sp)
/* 041DC0 800669C0 3C038009 */ lui $v1, 0x8009
/* 041DC4 800669C4 8C6359D0 */ lw $v1, 0x59d0($v1)
/* 041DC8 800669C8 8C700004 */ lw $s0, 4($v1)
/* 041DCC 800669CC 0C01ACF4 */ jal osRestoreInt
/* 041DCC 800669CC 0C01ACF4 */ jal __osRestoreInt
/* 041DD0 800669D0 00402021 */ addu $a0, $v0, $zero
/* 041DD4 800669D4 02001021 */ addu $v0, $s0, $zero
/* 041DD8 800669D8 8FBF0014 */ lw $ra, 0x14($sp)

View File

@ -14,12 +14,12 @@
osViGetNextFramebuffer:
/* 041DF0 800669F0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 041DF4 800669F4 AFBF0014 */ sw $ra, 0x14($sp)
/* 041DF8 800669F8 0C01ACD8 */ jal osDisableInt
/* 041DF8 800669F8 0C01ACD8 */ jal __osDisableInt
/* 041DFC 800669FC AFB00010 */ sw $s0, 0x10($sp)
/* 041E00 80066A00 3C038009 */ lui $v1, 0x8009
/* 041E04 80066A04 8C6359D4 */ lw $v1, 0x59d4($v1)
/* 041E08 80066A08 8C700004 */ lw $s0, 4($v1)
/* 041E0C 80066A0C 0C01ACF4 */ jal osRestoreInt
/* 041E0C 80066A0C 0C01ACF4 */ jal __osRestoreInt
/* 041E10 80066A10 00402021 */ addu $a0, $v0, $zero
/* 041E14 80066A14 02001021 */ addu $v0, $s0, $zero
/* 041E18 80066A18 8FBF0014 */ lw $ra, 0x14($sp)

View File

@ -14,13 +14,13 @@
osViGetCurrentMode:
/* 041E30 80066A30 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 041E34 80066A34 AFBF0014 */ sw $ra, 0x14($sp)
/* 041E38 80066A38 0C01ACD8 */ jal osDisableInt
/* 041E38 80066A38 0C01ACD8 */ jal __osDisableInt
/* 041E3C 80066A3C AFB00010 */ sw $s0, 0x10($sp)
/* 041E40 80066A40 3C038009 */ lui $v1, 0x8009
/* 041E44 80066A44 8C6359D0 */ lw $v1, 0x59d0($v1)
/* 041E48 80066A48 8C630008 */ lw $v1, 8($v1)
/* 041E4C 80066A4C 90700000 */ lbu $s0, ($v1)
/* 041E50 80066A50 0C01ACF4 */ jal osRestoreInt
/* 041E50 80066A50 0C01ACF4 */ jal __osRestoreInt
/* 041E54 80066A54 00402021 */ addu $a0, $v0, $zero
/* 041E58 80066A58 02001021 */ addu $v0, $s0, $zero
/* 041E5C 80066A5C 8FBF0014 */ lw $ra, 0x14($sp)

View File

@ -69,7 +69,7 @@ osCreateViManager:
/* 041F48 80066B48 0C0197D4 */ jal osSetThreadPri
/* 041F4C 80066B4C 02202821 */ addu $a1, $s1, $zero
.L80066B50:
/* 041F50 80066B50 0C01ACD8 */ jal osDisableInt
/* 041F50 80066B50 0C01ACD8 */ jal __osDisableInt
/* 041F54 80066B54 00000000 */ nop
/* 041F58 80066B58 3C10800B */ lui $s0, 0x800b
/* 041F5C 80066B5C 2610F918 */ addiu $s0, $s0, -0x6e8
@ -102,7 +102,7 @@ osCreateViManager:
/* 041FC8 80066BC8 00000000 */ nop
/* 041FCC 80066BCC 0C019808 */ jal osStartThread
/* 041FD0 80066BD0 02002021 */ addu $a0, $s0, $zero
/* 041FD4 80066BD4 0C01ACF4 */ jal osRestoreInt
/* 041FD4 80066BD4 0C01ACF4 */ jal __osRestoreInt
/* 041FD8 80066BD8 02202021 */ addu $a0, $s1, $zero
/* 041FDC 80066BDC 2402FFFF */ addiu $v0, $zero, -1
/* 041FE0 80066BE0 12420003 */ beq $s2, $v0, .L80066BF0

View File

@ -19,14 +19,14 @@ osViSetEvent:
/* 0421C0 80066DC0 00A08821 */ addu $s1, $a1, $zero
/* 0421C4 80066DC4 AFB20018 */ sw $s2, 0x18($sp)
/* 0421C8 80066DC8 AFBF001C */ sw $ra, 0x1c($sp)
/* 0421CC 80066DCC 0C01ACD8 */ jal osDisableInt
/* 0421CC 80066DCC 0C01ACD8 */ jal __osDisableInt
/* 0421D0 80066DD0 00C09021 */ addu $s2, $a2, $zero
/* 0421D4 80066DD4 3C038009 */ lui $v1, 0x8009
/* 0421D8 80066DD8 8C6359D4 */ lw $v1, 0x59d4($v1)
/* 0421DC 80066DDC 00402021 */ addu $a0, $v0, $zero
/* 0421E0 80066DE0 AC700010 */ sw $s0, 0x10($v1)
/* 0421E4 80066DE4 AC710014 */ sw $s1, 0x14($v1)
/* 0421E8 80066DE8 0C01ACF4 */ jal osRestoreInt
/* 0421E8 80066DE8 0C01ACF4 */ jal __osRestoreInt
/* 0421EC 80066DEC A4720002 */ sh $s2, 2($v1)
/* 0421F0 80066DF0 8FBF001C */ lw $ra, 0x1c($sp)
/* 0421F4 80066DF4 8FB20018 */ lw $s2, 0x18($sp)

View File

@ -15,7 +15,7 @@ osViSetMode:
/* 042210 80066E10 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 042214 80066E14 AFB00010 */ sw $s0, 0x10($sp)
/* 042218 80066E18 AFBF0014 */ sw $ra, 0x14($sp)
/* 04221C 80066E1C 0C01ACD8 */ jal osDisableInt
/* 04221C 80066E1C 0C01ACD8 */ jal __osDisableInt
/* 042220 80066E20 00808021 */ addu $s0, $a0, $zero
/* 042224 80066E24 3C048009 */ lui $a0, 0x8009
/* 042228 80066E28 8C8459D4 */ lw $a0, 0x59d4($a0)
@ -25,7 +25,7 @@ osViSetMode:
/* 042238 80066E38 A4830000 */ sh $v1, ($a0)
/* 04223C 80066E3C 8CA30004 */ lw $v1, 4($a1)
/* 042240 80066E40 AC83000C */ sw $v1, 0xc($a0)
/* 042244 80066E44 0C01ACF4 */ jal osRestoreInt
/* 042244 80066E44 0C01ACF4 */ jal __osRestoreInt
/* 042248 80066E48 00402021 */ addu $a0, $v0, $zero
/* 04224C 80066E4C 8FBF0014 */ lw $ra, 0x14($sp)
/* 042250 80066E50 8FB00010 */ lw $s0, 0x10($sp)

View File

@ -15,7 +15,7 @@ osViSetSpecialFeatures:
/* 042260 80066E60 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 042264 80066E64 AFB00010 */ sw $s0, 0x10($sp)
/* 042268 80066E68 AFBF0014 */ sw $ra, 0x14($sp)
/* 04226C 80066E6C 0C01ACD8 */ jal osDisableInt
/* 04226C 80066E6C 0C01ACD8 */ jal __osDisableInt
/* 042270 80066E70 00808021 */ addu $s0, $a0, $zero
/* 042274 80066E74 00403021 */ addu $a2, $v0, $zero
/* 042278 80066E78 32020001 */ andi $v0, $s0, 1
@ -103,7 +103,7 @@ osViSetSpecialFeatures:
/* 0423A0 80066FA0 94620000 */ lhu $v0, ($v1)
/* 0423A4 80066FA4 00C02021 */ addu $a0, $a2, $zero
/* 0423A8 80066FA8 34420008 */ ori $v0, $v0, 8
/* 0423AC 80066FAC 0C01ACF4 */ jal osRestoreInt
/* 0423AC 80066FAC 0C01ACF4 */ jal __osRestoreInt
/* 0423B0 80066FB0 A4620000 */ sh $v0, ($v1)
/* 0423B4 80066FB4 8FBF0014 */ lw $ra, 0x14($sp)
/* 0423B8 80066FB8 8FB00010 */ lw $s0, 0x10($sp)

View File

@ -15,7 +15,7 @@ osViSetYScale:
/* 0423D0 80066FD0 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0423D4 80066FD4 F7B40018 */ sdc1 $f20, 0x18($sp)
/* 0423D8 80066FD8 AFBF0010 */ sw $ra, 0x10($sp)
/* 0423DC 80066FDC 0C01ACD8 */ jal osDisableInt
/* 0423DC 80066FDC 0C01ACD8 */ jal __osDisableInt
/* 0423E0 80066FE0 46006506 */ mov.s $f20, $f12
/* 0423E4 80066FE4 3C048009 */ lui $a0, 0x8009
/* 0423E8 80066FE8 8C8459D4 */ lw $a0, 0x59d4($a0)
@ -23,7 +23,7 @@ osViSetYScale:
/* 0423F0 80066FF0 E4940024 */ swc1 $f20, 0x24($a0)
/* 0423F4 80066FF4 34630004 */ ori $v1, $v1, 4
/* 0423F8 80066FF8 A4830000 */ sh $v1, ($a0)
/* 0423FC 80066FFC 0C01ACF4 */ jal osRestoreInt
/* 0423FC 80066FFC 0C01ACF4 */ jal __osRestoreInt
/* 042400 80067000 00402021 */ addu $a0, $v0, $zero
/* 042404 80067004 8FBF0010 */ lw $ra, 0x10($sp)
/* 042408 80067008 D7B40018 */ ldc1 $f20, 0x18($sp)

View File

@ -15,7 +15,7 @@ osViSwapBuffer:
/* 042420 80067020 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 042424 80067024 AFB00010 */ sw $s0, 0x10($sp)
/* 042428 80067028 AFBF0014 */ sw $ra, 0x14($sp)
/* 04242C 8006702C 0C01ACD8 */ jal osDisableInt
/* 04242C 8006702C 0C01ACD8 */ jal __osDisableInt
/* 042430 80067030 00808021 */ addu $s0, $a0, $zero
/* 042434 80067034 3C048009 */ lui $a0, 0x8009
/* 042438 80067038 8C8459D4 */ lw $a0, 0x59d4($a0)
@ -23,7 +23,7 @@ osViSwapBuffer:
/* 042440 80067040 AC900004 */ sw $s0, 4($a0)
/* 042444 80067044 34630010 */ ori $v1, $v1, 0x10
/* 042448 80067048 A4830000 */ sh $v1, ($a0)
/* 04244C 8006704C 0C01ACF4 */ jal osRestoreInt
/* 04244C 8006704C 0C01ACF4 */ jal __osRestoreInt
/* 042450 80067050 00402021 */ addu $a0, $v0, $zero
/* 042454 80067054 8FBF0014 */ lw $ra, 0x14($sp)
/* 042458 80067058 8FB00010 */ lw $s0, 0x10($sp)

View File

@ -15,7 +15,7 @@ osViBlack:
/* 042780 80067380 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 042784 80067384 AFB00010 */ sw $s0, 0x10($sp)
/* 042788 80067388 AFBF0014 */ sw $ra, 0x14($sp)
/* 04278C 8006738C 0C01ACD8 */ jal osDisableInt
/* 04278C 8006738C 0C01ACD8 */ jal __osDisableInt
/* 042790 80067390 00808021 */ addu $s0, $a0, $zero
/* 042794 80067394 321000FF */ andi $s0, $s0, 0xff
/* 042798 80067398 12000006 */ beqz $s0, .L800673B4
@ -32,7 +32,7 @@ osViBlack:
/* 0427BC 800673BC 94620000 */ lhu $v0, ($v1)
/* 0427C0 800673C0 3042FFDF */ andi $v0, $v0, 0xffdf
.L800673C4:
/* 0427C4 800673C4 0C01ACF4 */ jal osRestoreInt
/* 0427C4 800673C4 0C01ACF4 */ jal __osRestoreInt
/* 0427C8 800673C8 A4620000 */ sh $v0, ($v1)
/* 0427CC 800673CC 8FBF0014 */ lw $ra, 0x14($sp)
/* 0427D0 800673D0 8FB00010 */ lw $s0, 0x10($sp)
@ -44,7 +44,7 @@ osViRepeatLine:
/* 0427E0 800673E0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 0427E4 800673E4 AFB00010 */ sw $s0, 0x10($sp)
/* 0427E8 800673E8 AFBF0014 */ sw $ra, 0x14($sp)
/* 0427EC 800673EC 0C01ACD8 */ jal osDisableInt
/* 0427EC 800673EC 0C01ACD8 */ jal __osDisableInt
/* 0427F0 800673F0 00808021 */ addu $s0, $a0, $zero
/* 0427F4 800673F4 321000FF */ andi $s0, $s0, 0xff
/* 0427F8 800673F8 12000006 */ beqz $s0, .L80067414
@ -61,7 +61,7 @@ osViRepeatLine:
/* 04281C 8006741C 94620000 */ lhu $v0, ($v1)
/* 042820 80067420 3042FFBF */ andi $v0, $v0, 0xffbf
.L80067424:
/* 042824 80067424 0C01ACF4 */ jal osRestoreInt
/* 042824 80067424 0C01ACF4 */ jal __osRestoreInt
/* 042828 80067428 A4620000 */ sh $v0, ($v1)
/* 04282C 8006742C 8FBF0014 */ lw $ra, 0x14($sp)
/* 042830 80067430 8FB00010 */ lw $s0, 0x10($sp)

View File

@ -11,7 +11,7 @@
.section .text8006B360, "ax"
osDisableInt:
__osDisableInt:
/* 046760 8006B360 3C0A8009 */ lui $t2, 0x8009
/* 046764 8006B364 254A5900 */ addiu $t2, $t2, 0x5900
/* 046768 8006B368 8D4B0000 */ lw $t3, ($t2)
@ -42,7 +42,7 @@ osDisableInt:
/* 0467C8 8006B3C8 03E00008 */ jr $ra
/* 0467CC 8006B3CC 00000000 */ nop
osRestoreInt:
__osRestoreInt:
/* 0467D0 8006B3D0 40086000 */ mfc0 $t0, $12
/* 0467D4 8006B3D4 01044025 */ or $t0, $t0, $a0
/* 0467D8 8006B3D8 40886000 */ mtc0 $t0, $12

View File

@ -15,14 +15,14 @@ osSetGlobalIntMask:
/* 0467F0 8006B3F0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 0467F4 8006B3F4 AFB00010 */ sw $s0, 0x10($sp)
/* 0467F8 8006B3F8 AFBF0014 */ sw $ra, 0x14($sp)
/* 0467FC 8006B3FC 0C01ACD8 */ jal osDisableInt
/* 0467FC 8006B3FC 0C01ACD8 */ jal __osDisableInt
/* 046800 8006B400 00808021 */ addu $s0, $a0, $zero
/* 046804 8006B404 3C038009 */ lui $v1, 0x8009
/* 046808 8006B408 8C635900 */ lw $v1, 0x5900($v1)
/* 04680C 8006B40C 00701825 */ or $v1, $v1, $s0
/* 046810 8006B410 3C018009 */ lui $at, 0x8009
/* 046814 8006B414 AC235900 */ sw $v1, 0x5900($at)
/* 046818 8006B418 0C01ACF4 */ jal osRestoreInt
/* 046818 8006B418 0C01ACF4 */ jal __osRestoreInt
/* 04681C 8006B41C 00402021 */ addu $a0, $v0, $zero
/* 046820 8006B420 8FBF0014 */ lw $ra, 0x14($sp)
/* 046824 8006B424 8FB00010 */ lw $s0, 0x10($sp)
@ -33,7 +33,7 @@ osResetGlobalIntMask:
/* 046830 8006B430 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 046834 8006B434 AFB00010 */ sw $s0, 0x10($sp)
/* 046838 8006B438 AFBF0014 */ sw $ra, 0x14($sp)
/* 04683C 8006B43C 0C01ACD8 */ jal osDisableInt
/* 04683C 8006B43C 0C01ACD8 */ jal __osDisableInt
/* 046840 8006B440 00808021 */ addu $s0, $a0, $zero
/* 046844 8006B444 3C038009 */ lui $v1, 0x8009
/* 046848 8006B448 8C635900 */ lw $v1, 0x5900($v1)
@ -42,7 +42,7 @@ osResetGlobalIntMask:
/* 046854 8006B454 00701824 */ and $v1, $v1, $s0
/* 046858 8006B458 3C018009 */ lui $at, 0x8009
/* 04685C 8006B45C AC235900 */ sw $v1, 0x5900($at)
/* 046860 8006B460 0C01ACF4 */ jal osRestoreInt
/* 046860 8006B460 0C01ACF4 */ jal __osRestoreInt
/* 046864 8006B464 00402021 */ addu $a0, $v0, $zero
/* 046868 8006B468 8FBF0014 */ lw $ra, 0x14($sp)
/* 04686C 8006B46C 8FB00010 */ lw $s0, 0x10($sp)

View File

@ -16,7 +16,7 @@ osDestroyThread:
/* 047D54 8006C954 AFB00010 */ sw $s0, 0x10($sp)
/* 047D58 8006C958 00808021 */ addu $s0, $a0, $zero
/* 047D5C 8006C95C AFBF0018 */ sw $ra, 0x18($sp)
/* 047D60 8006C960 0C01ACD8 */ jal osDisableInt
/* 047D60 8006C960 0C01ACD8 */ jal __osDisableInt
/* 047D64 8006C964 AFB10014 */ sw $s1, 0x14($sp)
/* 047D68 8006C968 16000004 */ bnez $s0, .L8006C97C
/* 047D6C 8006C96C 00408821 */ addu $s1, $v0, $zero
@ -69,7 +69,7 @@ osDestroyThread:
/* 047E04 8006CA04 0C01AC75 */ jal osDispatchThread
/* 047E08 8006CA08 00000000 */ nop
.L8006CA0C:
/* 047E0C 8006CA0C 0C01ACF4 */ jal osRestoreInt
/* 047E0C 8006CA0C 0C01ACF4 */ jal __osRestoreInt
/* 047E10 8006CA10 02202021 */ addu $a0, $s1, $zero
/* 047E14 8006CA14 8FBF0018 */ lw $ra, 0x18($sp)
/* 047E18 8006CA18 8FB10014 */ lw $s1, 0x14($sp)

View File

@ -8,7 +8,6 @@
.include "globals.inc"
.section .text80065E60, "ax"
osCreateThread:
@ -51,30 +50,18 @@ osCreateThread:
/* 0412F0 80065EF0 254AFFFF */ addiu $t2, $t2, -1
/* 0412F4 80065EF4 01425021 */ addu $t2, $t2, $v0
/* 0412F8 80065EF8 AE0A00F0 */ sw $t2, 0xf0($s0)
/* 0412FC 80065EFC 0C01ACD8 */ jal osDisableInt
/* 0412FC 80065EFC 0C01ACD8 */ jal __osDisableInt
/* 041300 80065F00 AE0B00F4 */ sw $t3, 0xf4($s0)
/* 041304 80065F04 3C038009 */ lui $v1, 0x8009
/* 041308 80065F08 8C63465C */ lw $v1, 0x465c($v1)
/* 04130C 80065F0C 00402021 */ addu $a0, $v0, $zero
/* 041310 80065F10 3C018009 */ lui $at, 0x8009
/* 041314 80065F14 AC30465C */ sw $s0, 0x465c($at)
/* 041318 80065F18 0C01ACF4 */ jal osRestoreInt
/* 041318 80065F18 0C01ACF4 */ jal __osRestoreInt
/* 04131C 80065F1C AE03000C */ sw $v1, 0xc($s0)
/* 041320 80065F20 8FBF0014 */ lw $ra, 0x14($sp)
/* 041324 80065F24 8FB00010 */ lw $s0, 0x10($sp)
/* 041328 80065F28 03E00008 */ jr $ra
/* 04132C 80065F2C 27BD0018 */ addiu $sp, $sp, 0x18
osGetThreadPri:
/* 041330 80065F30 14800003 */ bnez $a0, .L80065F40
/* 041334 80065F34 00000000 */ nop
/* 041338 80065F38 3C048009 */ lui $a0, 0x8009
/* 04133C 80065F3C 8C844660 */ lw $a0, 0x4660($a0)
.L80065F40:
/* 041340 80065F40 03E00008 */ jr $ra
/* 041344 80065F44 8C820004 */ lw $v0, 4($a0)
/* 041348 80065F48 00000000 */ nop
/* 04134C 80065F4C 00000000 */ nop
.set reorder

View File

@ -0,0 +1,25 @@
# %s disassembly and split file
# generated by n64split v%s - N64 ROM splitter
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.include "globals.inc"
.section .text80065F30, "ax"
osGetThreadPri:
/* 041330 80065F30 14800003 */ bnez $a0, .L80065F40
/* 041334 80065F34 00000000 */ nop
/* 041338 80065F38 3C048009 */ lui $a0, 0x8009
/* 04133C 80065F3C 8C844660 */ lw $a0, 0x4660($a0)
.L80065F40:
/* 041340 80065F40 03E00008 */ jr $ra
/* 041344 80065F44 8C820004 */ lw $v0, 4($a0)
/* 041348 80065F48 00000000 */ nop
/* 04134C 80065F4C 00000000 */ nop
.set reorder

View File

@ -480,8 +480,8 @@
.global osDispatchThread
.global osDispatchThreadSave
.global osCleanupThread
.global osDisableInt
.global osRestoreInt
.global __osDisableInt
.global __osRestoreInt
.global osSetGlobalIntMask
.global osResetGlobalIntMask
.global osPiRawStartDma

View File

@ -40,8 +40,8 @@ extern void __osSetConfig(u32);
extern void __osSetCount(u32);
extern u32 __osGetSR(void);
extern void __osSetSR(u32);
extern u32 __osDisableInt(void);
extern void __osRestoreInt(u32);
extern u32 ____osDisableInt(void);
extern void ____osRestoreInt(u32);
extern u32 __osGetWatchLo(void);
extern void __osSetWatchLo(u32);

View File

@ -4,6 +4,8 @@
#include "ultra64.h"
#include "common_structs.h"
void osCleanupThread(void);
s32 get_variable(ScriptContext* script, s32 pos);
f32 get_float_variable(ScriptContext* script, s32 pos);
f32 sin_deg(f32 x);

View File

@ -444,7 +444,12 @@ SECTIONS
/* 0x80065E60 041260-041350 [F0] */
.text80065E60 0x80065E60 : AT(0x041260) {
build/asm/code_41260_len_f0.o(.text80065E60);
build/asm/osCreateThread.o(.text80065E60);
}
/* 0x80065F30 041330-041350 [F0] */
.text80065F30 0x80065F30 : AT(0x041330) {
build/asm/osGetThreadPri.o(.text80065F30);
}
/* 0x80065F50 041350-041420 [D0] */