Link OSAlarm, Error, Interrupt, Reset, Time

This commit is contained in:
HeartPiece 2023-02-11 23:47:10 +11:00
parent 41e132c832
commit 097c3db225
23 changed files with 882 additions and 4680 deletions

View File

@ -1,552 +0,0 @@
.include "macros.inc"
.section .data, "wa" # 0x8049E220 - 0x804EFC20
.balign 8
.obj ResetFunctionInfo, local
.4byte OnReset
.4byte 0xFFFFFFFF
.4byte 0x00000000
.4byte 0x00000000
.endobj ResetFunctionInfo
.section .sbss # 0x80514D80 - 0x80516360
.balign 8
.obj AlarmQueue, local
.skip 8
.endobj AlarmQueue
.section .text, "ax" # 0x800056C0 - 0x80472F00
.fn OSInitAlarm, global
/* 800EBAB4 000E89F4 7C 08 02 A6 */ mflr r0
/* 800EBAB8 000E89F8 38 60 00 08 */ li r3, 8
/* 800EBABC 000E89FC 90 01 00 04 */ stw r0, 4(r1)
/* 800EBAC0 000E8A00 94 21 FF F8 */ stwu r1, -8(r1)
/* 800EBAC4 000E8A04 4B FF FE 55 */ bl __OSGetExceptionHandler
/* 800EBAC8 000E8A08 3C 80 80 0F */ lis r4, DecrementerExceptionHandler@ha
/* 800EBACC 000E8A0C 38 84 C1 20 */ addi r4, r4, DecrementerExceptionHandler@l
/* 800EBAD0 000E8A10 7C 03 20 40 */ cmplw r3, r4
/* 800EBAD4 000E8A14 41 82 00 28 */ beq .L_800EBAFC
/* 800EBAD8 000E8A18 38 00 00 00 */ li r0, 0
/* 800EBADC 000E8A1C 38 6D 8F 50 */ addi r3, r13, AlarmQueue@sda21
/* 800EBAE0 000E8A20 90 03 00 04 */ stw r0, 4(r3)
/* 800EBAE4 000E8A24 38 60 00 08 */ li r3, 8
/* 800EBAE8 000E8A28 90 0D 8F 50 */ stw r0, AlarmQueue@sda21(r13)
/* 800EBAEC 000E8A2C 4B FF FE 11 */ bl __OSSetExceptionHandler
/* 800EBAF0 000E8A30 3C 60 80 4B */ lis r3, ResetFunctionInfo@ha
/* 800EBAF4 000E8A34 38 63 8A F8 */ addi r3, r3, ResetFunctionInfo@l
/* 800EBAF8 000E8A38 48 00 47 AD */ bl OSRegisterResetFunction
.L_800EBAFC:
/* 800EBAFC 000E8A3C 80 01 00 0C */ lwz r0, 0xc(r1)
/* 800EBB00 000E8A40 38 21 00 08 */ addi r1, r1, 8
/* 800EBB04 000E8A44 7C 08 03 A6 */ mtlr r0
/* 800EBB08 000E8A48 4E 80 00 20 */ blr
.endfn OSInitAlarm
.fn OSCreateAlarm, global
/* 800EBB0C 000E8A4C 38 00 00 00 */ li r0, 0
/* 800EBB10 000E8A50 90 03 00 00 */ stw r0, 0(r3)
/* 800EBB14 000E8A54 90 03 00 04 */ stw r0, 4(r3)
/* 800EBB18 000E8A58 4E 80 00 20 */ blr
.endfn OSCreateAlarm
.fn InsertAlarm, local
/* 800EBB1C 000E8A5C 7C 08 02 A6 */ mflr r0
/* 800EBB20 000E8A60 90 01 00 04 */ stw r0, 4(r1)
/* 800EBB24 000E8A64 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 800EBB28 000E8A68 BF 21 00 24 */ stmw r25, 0x24(r1)
/* 800EBB2C 000E8A6C 3B 80 00 00 */ li r28, 0
/* 800EBB30 000E8A70 7C 7D 1B 78 */ mr r29, r3
/* 800EBB34 000E8A74 6F 84 80 00 */ xoris r4, r28, 0x8000
/* 800EBB38 000E8A78 3B 25 00 00 */ addi r25, r5, 0
/* 800EBB3C 000E8A7C 3B C6 00 00 */ addi r30, r6, 0
/* 800EBB40 000E8A80 3B E7 00 00 */ addi r31, r7, 0
/* 800EBB44 000E8A84 80 03 00 18 */ lwz r0, 0x18(r3)
/* 800EBB48 000E8A88 81 03 00 1C */ lwz r8, 0x1c(r3)
/* 800EBB4C 000E8A8C 6C 03 80 00 */ xoris r3, r0, 0x8000
/* 800EBB50 000E8A90 7C 08 E0 10 */ subfc r0, r8, r28
/* 800EBB54 000E8A94 7C 63 21 10 */ subfe r3, r3, r4
/* 800EBB58 000E8A98 7C 64 21 10 */ subfe r3, r4, r4
/* 800EBB5C 000E8A9C 7C 63 00 D1 */ neg. r3, r3
/* 800EBB60 000E8AA0 41 82 00 7C */ beq .L_800EBBDC
/* 800EBB64 000E8AA4 48 00 70 4D */ bl __OSGetSystemTime
/* 800EBB68 000E8AA8 80 FD 00 20 */ lwz r7, 0x20(r29)
/* 800EBB6C 000E8AAC 6C 65 80 00 */ xoris r5, r3, 0x8000
/* 800EBB70 000E8AB0 81 1D 00 24 */ lwz r8, 0x24(r29)
/* 800EBB74 000E8AB4 6C E6 80 00 */ xoris r6, r7, 0x8000
/* 800EBB78 000E8AB8 7C 04 40 10 */ subfc r0, r4, r8
/* 800EBB7C 000E8ABC 7C A5 31 10 */ subfe r5, r5, r6
/* 800EBB80 000E8AC0 7C A6 31 10 */ subfe r5, r6, r6
/* 800EBB84 000E8AC4 7C A5 00 D1 */ neg. r5, r5
/* 800EBB88 000E8AC8 3B C8 00 00 */ addi r30, r8, 0
/* 800EBB8C 000E8ACC 3B 27 00 00 */ addi r25, r7, 0
/* 800EBB90 000E8AD0 41 82 00 4C */ beq .L_800EBBDC
/* 800EBB94 000E8AD4 83 7D 00 18 */ lwz r27, 0x18(r29)
/* 800EBB98 000E8AD8 7C 88 20 10 */ subfc r4, r8, r4
/* 800EBB9C 000E8ADC 83 5D 00 1C */ lwz r26, 0x1c(r29)
/* 800EBBA0 000E8AE0 7C 67 19 10 */ subfe r3, r7, r3
/* 800EBBA4 000E8AE4 38 BB 00 00 */ addi r5, r27, 0
/* 800EBBA8 000E8AE8 38 DA 00 00 */ addi r6, r26, 0
/* 800EBBAC 000E8AEC 4B FD 62 19 */ bl __div2i
/* 800EBBB0 000E8AF0 38 00 00 01 */ li r0, 1
/* 800EBBB4 000E8AF4 7C A4 00 14 */ addc r5, r4, r0
/* 800EBBB8 000E8AF8 7C 9B 29 D6 */ mullw r4, r27, r5
/* 800EBBBC 000E8AFC 7C 1A 28 16 */ mulhwu r0, r26, r5
/* 800EBBC0 000E8B00 7C 63 E1 14 */ adde r3, r3, r28
/* 800EBBC4 000E8B04 7C 84 02 14 */ add r4, r4, r0
/* 800EBBC8 000E8B08 7C 1A 19 D6 */ mullw r0, r26, r3
/* 800EBBCC 000E8B0C 7C 7A 29 D6 */ mullw r3, r26, r5
/* 800EBBD0 000E8B10 7C 04 02 14 */ add r0, r4, r0
/* 800EBBD4 000E8B14 7F DE 18 14 */ addc r30, r30, r3
/* 800EBBD8 000E8B18 7F 39 01 14 */ adde r25, r25, r0
.L_800EBBDC:
/* 800EBBDC 000E8B1C 93 FD 00 00 */ stw r31, 0(r29)
/* 800EBBE0 000E8B20 6F 24 80 00 */ xoris r4, r25, 0x8000
/* 800EBBE4 000E8B24 93 DD 00 0C */ stw r30, 0xc(r29)
/* 800EBBE8 000E8B28 93 3D 00 08 */ stw r25, 8(r29)
/* 800EBBEC 000E8B2C 80 CD 8F 50 */ lwz r6, AlarmQueue@sda21(r13)
/* 800EBBF0 000E8B30 48 00 00 C4 */ b .L_800EBCB4
.L_800EBBF4:
/* 800EBBF4 000E8B34 80 06 00 08 */ lwz r0, 8(r6)
/* 800EBBF8 000E8B38 80 A6 00 0C */ lwz r5, 0xc(r6)
/* 800EBBFC 000E8B3C 6C 03 80 00 */ xoris r3, r0, 0x8000
/* 800EBC00 000E8B40 7C 05 F0 10 */ subfc r0, r5, r30
/* 800EBC04 000E8B44 7C 63 21 10 */ subfe r3, r3, r4
/* 800EBC08 000E8B48 7C 64 21 10 */ subfe r3, r4, r4
/* 800EBC0C 000E8B4C 7C 63 00 D1 */ neg. r3, r3
/* 800EBC10 000E8B50 41 82 00 A0 */ beq .L_800EBCB0
/* 800EBC14 000E8B54 80 06 00 10 */ lwz r0, 0x10(r6)
/* 800EBC18 000E8B58 90 1D 00 10 */ stw r0, 0x10(r29)
/* 800EBC1C 000E8B5C 93 A6 00 10 */ stw r29, 0x10(r6)
/* 800EBC20 000E8B60 90 DD 00 14 */ stw r6, 0x14(r29)
/* 800EBC24 000E8B64 80 7D 00 10 */ lwz r3, 0x10(r29)
/* 800EBC28 000E8B68 28 03 00 00 */ cmplwi r3, 0
/* 800EBC2C 000E8B6C 41 82 00 0C */ beq .L_800EBC38
/* 800EBC30 000E8B70 93 A3 00 14 */ stw r29, 0x14(r3)
/* 800EBC34 000E8B74 48 00 01 24 */ b .L_800EBD58
.L_800EBC38:
/* 800EBC38 000E8B78 93 AD 8F 50 */ stw r29, AlarmQueue@sda21(r13)
/* 800EBC3C 000E8B7C 48 00 6F 75 */ bl __OSGetSystemTime
/* 800EBC40 000E8B80 80 DD 00 0C */ lwz r6, 0xc(r29)
/* 800EBC44 000E8B84 38 E0 00 00 */ li r7, 0
/* 800EBC48 000E8B88 80 1D 00 08 */ lwz r0, 8(r29)
/* 800EBC4C 000E8B8C 6C E5 80 00 */ xoris r5, r7, 0x8000
/* 800EBC50 000E8B90 7D 04 30 10 */ subfc r8, r4, r6
/* 800EBC54 000E8B94 7C 03 01 10 */ subfe r0, r3, r0
/* 800EBC58 000E8B98 6C 06 80 00 */ xoris r6, r0, 0x8000
/* 800EBC5C 000E8B9C 7C 07 40 10 */ subfc r0, r7, r8
/* 800EBC60 000E8BA0 7C A5 31 10 */ subfe r5, r5, r6
/* 800EBC64 000E8BA4 7C A6 31 10 */ subfe r5, r6, r6
/* 800EBC68 000E8BA8 7C A5 00 D1 */ neg. r5, r5
/* 800EBC6C 000E8BAC 41 82 00 10 */ beq .L_800EBC7C
/* 800EBC70 000E8BB0 38 60 00 00 */ li r3, 0
/* 800EBC74 000E8BB4 4B FE 89 15 */ bl PPCMtdec
/* 800EBC78 000E8BB8 48 00 00 E0 */ b .L_800EBD58
.L_800EBC7C:
/* 800EBC7C 000E8BBC 3C 80 80 00 */ lis r4, 0x8000
/* 800EBC80 000E8BC0 6C E3 80 00 */ xoris r3, r7, 0x8000
/* 800EBC84 000E8BC4 7C 04 40 10 */ subfc r0, r4, r8
/* 800EBC88 000E8BC8 7C 63 31 10 */ subfe r3, r3, r6
/* 800EBC8C 000E8BCC 7C 66 31 10 */ subfe r3, r6, r6
/* 800EBC90 000E8BD0 7C 63 00 D1 */ neg. r3, r3
/* 800EBC94 000E8BD4 41 82 00 10 */ beq .L_800EBCA4
/* 800EBC98 000E8BD8 7D 03 43 78 */ mr r3, r8
/* 800EBC9C 000E8BDC 4B FE 88 ED */ bl PPCMtdec
/* 800EBCA0 000E8BE0 48 00 00 B8 */ b .L_800EBD58
.L_800EBCA4:
/* 800EBCA4 000E8BE4 38 64 FF FF */ addi r3, r4, -1
/* 800EBCA8 000E8BE8 4B FE 88 E1 */ bl PPCMtdec
/* 800EBCAC 000E8BEC 48 00 00 AC */ b .L_800EBD58
.L_800EBCB0:
/* 800EBCB0 000E8BF0 80 C6 00 14 */ lwz r6, 0x14(r6)
.L_800EBCB4:
/* 800EBCB4 000E8BF4 28 06 00 00 */ cmplwi r6, 0
/* 800EBCB8 000E8BF8 40 82 FF 3C */ bne .L_800EBBF4
/* 800EBCBC 000E8BFC 3B C0 00 00 */ li r30, 0
/* 800EBCC0 000E8C00 93 DD 00 14 */ stw r30, 0x14(r29)
/* 800EBCC4 000E8C04 38 6D 8F 50 */ addi r3, r13, AlarmQueue@sda21
/* 800EBCC8 000E8C08 80 83 00 04 */ lwz r4, 4(r3)
/* 800EBCCC 000E8C0C 97 A3 00 04 */ stwu r29, 4(r3)
/* 800EBCD0 000E8C10 28 04 00 00 */ cmplwi r4, 0
/* 800EBCD4 000E8C14 90 9D 00 10 */ stw r4, 0x10(r29)
/* 800EBCD8 000E8C18 41 82 00 0C */ beq .L_800EBCE4
/* 800EBCDC 000E8C1C 93 A4 00 14 */ stw r29, 0x14(r4)
/* 800EBCE0 000E8C20 48 00 00 78 */ b .L_800EBD58
.L_800EBCE4:
/* 800EBCE4 000E8C24 93 A3 00 00 */ stw r29, 0(r3)
/* 800EBCE8 000E8C28 93 AD 8F 50 */ stw r29, AlarmQueue@sda21(r13)
/* 800EBCEC 000E8C2C 48 00 6E C5 */ bl __OSGetSystemTime
/* 800EBCF0 000E8C30 80 DD 00 0C */ lwz r6, 0xc(r29)
/* 800EBCF4 000E8C34 6F C5 80 00 */ xoris r5, r30, 0x8000
/* 800EBCF8 000E8C38 80 1D 00 08 */ lwz r0, 8(r29)
/* 800EBCFC 000E8C3C 7C E4 30 10 */ subfc r7, r4, r6
/* 800EBD00 000E8C40 7C 03 01 10 */ subfe r0, r3, r0
/* 800EBD04 000E8C44 6C 06 80 00 */ xoris r6, r0, 0x8000
/* 800EBD08 000E8C48 7C 1E 38 10 */ subfc r0, r30, r7
/* 800EBD0C 000E8C4C 7C A5 31 10 */ subfe r5, r5, r6
/* 800EBD10 000E8C50 7C A6 31 10 */ subfe r5, r6, r6
/* 800EBD14 000E8C54 7C A5 00 D1 */ neg. r5, r5
/* 800EBD18 000E8C58 41 82 00 10 */ beq .L_800EBD28
/* 800EBD1C 000E8C5C 38 60 00 00 */ li r3, 0
/* 800EBD20 000E8C60 4B FE 88 69 */ bl PPCMtdec
/* 800EBD24 000E8C64 48 00 00 34 */ b .L_800EBD58
.L_800EBD28:
/* 800EBD28 000E8C68 3C 80 80 00 */ lis r4, 0x8000
/* 800EBD2C 000E8C6C 6F C3 80 00 */ xoris r3, r30, 0x8000
/* 800EBD30 000E8C70 7C 04 38 10 */ subfc r0, r4, r7
/* 800EBD34 000E8C74 7C 63 31 10 */ subfe r3, r3, r6
/* 800EBD38 000E8C78 7C 66 31 10 */ subfe r3, r6, r6
/* 800EBD3C 000E8C7C 7C 63 00 D1 */ neg. r3, r3
/* 800EBD40 000E8C80 41 82 00 10 */ beq .L_800EBD50
/* 800EBD44 000E8C84 7C E3 3B 78 */ mr r3, r7
/* 800EBD48 000E8C88 4B FE 88 41 */ bl PPCMtdec
/* 800EBD4C 000E8C8C 48 00 00 0C */ b .L_800EBD58
.L_800EBD50:
/* 800EBD50 000E8C90 38 64 FF FF */ addi r3, r4, -1
/* 800EBD54 000E8C94 4B FE 88 35 */ bl PPCMtdec
.L_800EBD58:
/* 800EBD58 000E8C98 BB 21 00 24 */ lmw r25, 0x24(r1)
/* 800EBD5C 000E8C9C 80 01 00 44 */ lwz r0, 0x44(r1)
/* 800EBD60 000E8CA0 38 21 00 40 */ addi r1, r1, 0x40
/* 800EBD64 000E8CA4 7C 08 03 A6 */ mtlr r0
/* 800EBD68 000E8CA8 4E 80 00 20 */ blr
.endfn InsertAlarm
.fn OSSetAlarm, global
/* 800EBD6C 000E8CAC 7C 08 02 A6 */ mflr r0
/* 800EBD70 000E8CB0 90 01 00 04 */ stw r0, 4(r1)
/* 800EBD74 000E8CB4 94 21 FF C8 */ stwu r1, -0x38(r1)
/* 800EBD78 000E8CB8 BF 61 00 24 */ stmw r27, 0x24(r1)
/* 800EBD7C 000E8CBC 3B 63 00 00 */ addi r27, r3, 0
/* 800EBD80 000E8CC0 3B A5 00 00 */ addi r29, r5, 0
/* 800EBD84 000E8CC4 3B 86 00 00 */ addi r28, r6, 0
/* 800EBD88 000E8CC8 3B C7 00 00 */ addi r30, r7, 0
/* 800EBD8C 000E8CCC 48 00 2E AD */ bl OSDisableInterrupts
/* 800EBD90 000E8CD0 38 00 00 00 */ li r0, 0
/* 800EBD94 000E8CD4 90 1B 00 1C */ stw r0, 0x1c(r27)
/* 800EBD98 000E8CD8 7C 7F 1B 78 */ mr r31, r3
/* 800EBD9C 000E8CDC 90 1B 00 18 */ stw r0, 0x18(r27)
/* 800EBDA0 000E8CE0 48 00 6E 11 */ bl __OSGetSystemTime
/* 800EBDA4 000E8CE4 7C DC 20 14 */ addc r6, r28, r4
/* 800EBDA8 000E8CE8 7C BD 19 14 */ adde r5, r29, r3
/* 800EBDAC 000E8CEC 38 7B 00 00 */ addi r3, r27, 0
/* 800EBDB0 000E8CF0 38 FE 00 00 */ addi r7, r30, 0
/* 800EBDB4 000E8CF4 4B FF FD 69 */ bl InsertAlarm
/* 800EBDB8 000E8CF8 7F E3 FB 78 */ mr r3, r31
/* 800EBDBC 000E8CFC 48 00 2E A5 */ bl OSRestoreInterrupts
/* 800EBDC0 000E8D00 BB 61 00 24 */ lmw r27, 0x24(r1)
/* 800EBDC4 000E8D04 80 01 00 3C */ lwz r0, 0x3c(r1)
/* 800EBDC8 000E8D08 38 21 00 38 */ addi r1, r1, 0x38
/* 800EBDCC 000E8D0C 7C 08 03 A6 */ mtlr r0
/* 800EBDD0 000E8D10 4E 80 00 20 */ blr
.endfn OSSetAlarm
.fn OSCancelAlarm, global
/* 800EBDD4 000E8D14 7C 08 02 A6 */ mflr r0
/* 800EBDD8 000E8D18 90 01 00 04 */ stw r0, 4(r1)
/* 800EBDDC 000E8D1C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 800EBDE0 000E8D20 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 800EBDE4 000E8D24 93 C1 00 18 */ stw r30, 0x18(r1)
/* 800EBDE8 000E8D28 7C 7E 1B 78 */ mr r30, r3
/* 800EBDEC 000E8D2C 93 A1 00 14 */ stw r29, 0x14(r1)
/* 800EBDF0 000E8D30 48 00 2E 49 */ bl OSDisableInterrupts
/* 800EBDF4 000E8D34 80 1E 00 00 */ lwz r0, 0(r30)
/* 800EBDF8 000E8D38 3B E3 00 00 */ addi r31, r3, 0
/* 800EBDFC 000E8D3C 28 00 00 00 */ cmplwi r0, 0
/* 800EBE00 000E8D40 40 82 00 10 */ bne .L_800EBE10
/* 800EBE04 000E8D44 7F E3 FB 78 */ mr r3, r31
/* 800EBE08 000E8D48 48 00 2E 59 */ bl OSRestoreInterrupts
/* 800EBE0C 000E8D4C 48 00 00 C8 */ b .L_800EBED4
.L_800EBE10:
/* 800EBE10 000E8D50 83 BE 00 14 */ lwz r29, 0x14(r30)
/* 800EBE14 000E8D54 28 1D 00 00 */ cmplwi r29, 0
/* 800EBE18 000E8D58 40 82 00 14 */ bne .L_800EBE2C
/* 800EBE1C 000E8D5C 80 1E 00 10 */ lwz r0, 0x10(r30)
/* 800EBE20 000E8D60 38 6D 8F 50 */ addi r3, r13, AlarmQueue@sda21
/* 800EBE24 000E8D64 90 03 00 04 */ stw r0, 4(r3)
/* 800EBE28 000E8D68 48 00 00 0C */ b .L_800EBE34
.L_800EBE2C:
/* 800EBE2C 000E8D6C 80 1E 00 10 */ lwz r0, 0x10(r30)
/* 800EBE30 000E8D70 90 1D 00 10 */ stw r0, 0x10(r29)
.L_800EBE34:
/* 800EBE34 000E8D74 80 7E 00 10 */ lwz r3, 0x10(r30)
/* 800EBE38 000E8D78 28 03 00 00 */ cmplwi r3, 0
/* 800EBE3C 000E8D7C 41 82 00 0C */ beq .L_800EBE48
/* 800EBE40 000E8D80 93 A3 00 14 */ stw r29, 0x14(r3)
/* 800EBE44 000E8D84 48 00 00 80 */ b .L_800EBEC4
.L_800EBE48:
/* 800EBE48 000E8D88 28 1D 00 00 */ cmplwi r29, 0
/* 800EBE4C 000E8D8C 93 AD 8F 50 */ stw r29, AlarmQueue@sda21(r13)
/* 800EBE50 000E8D90 41 82 00 74 */ beq .L_800EBEC4
/* 800EBE54 000E8D94 48 00 6D 5D */ bl __OSGetSystemTime
/* 800EBE58 000E8D98 80 DD 00 0C */ lwz r6, 0xc(r29)
/* 800EBE5C 000E8D9C 38 E0 00 00 */ li r7, 0
/* 800EBE60 000E8DA0 80 1D 00 08 */ lwz r0, 8(r29)
/* 800EBE64 000E8DA4 6C E5 80 00 */ xoris r5, r7, 0x8000
/* 800EBE68 000E8DA8 7D 04 30 10 */ subfc r8, r4, r6
/* 800EBE6C 000E8DAC 7C 03 01 10 */ subfe r0, r3, r0
/* 800EBE70 000E8DB0 6C 06 80 00 */ xoris r6, r0, 0x8000
/* 800EBE74 000E8DB4 7C 07 40 10 */ subfc r0, r7, r8
/* 800EBE78 000E8DB8 7C A5 31 10 */ subfe r5, r5, r6
/* 800EBE7C 000E8DBC 7C A6 31 10 */ subfe r5, r6, r6
/* 800EBE80 000E8DC0 7C A5 00 D1 */ neg. r5, r5
/* 800EBE84 000E8DC4 41 82 00 10 */ beq .L_800EBE94
/* 800EBE88 000E8DC8 38 60 00 00 */ li r3, 0
/* 800EBE8C 000E8DCC 4B FE 86 FD */ bl PPCMtdec
/* 800EBE90 000E8DD0 48 00 00 34 */ b .L_800EBEC4
.L_800EBE94:
/* 800EBE94 000E8DD4 3C 80 80 00 */ lis r4, 0x8000
/* 800EBE98 000E8DD8 6C E3 80 00 */ xoris r3, r7, 0x8000
/* 800EBE9C 000E8DDC 7C 04 40 10 */ subfc r0, r4, r8
/* 800EBEA0 000E8DE0 7C 63 31 10 */ subfe r3, r3, r6
/* 800EBEA4 000E8DE4 7C 66 31 10 */ subfe r3, r6, r6
/* 800EBEA8 000E8DE8 7C 63 00 D1 */ neg. r3, r3
/* 800EBEAC 000E8DEC 41 82 00 10 */ beq .L_800EBEBC
/* 800EBEB0 000E8DF0 7D 03 43 78 */ mr r3, r8
/* 800EBEB4 000E8DF4 4B FE 86 D5 */ bl PPCMtdec
/* 800EBEB8 000E8DF8 48 00 00 0C */ b .L_800EBEC4
.L_800EBEBC:
/* 800EBEBC 000E8DFC 38 64 FF FF */ addi r3, r4, -1
/* 800EBEC0 000E8E00 4B FE 86 C9 */ bl PPCMtdec
.L_800EBEC4:
/* 800EBEC4 000E8E04 38 00 00 00 */ li r0, 0
/* 800EBEC8 000E8E08 90 1E 00 00 */ stw r0, 0(r30)
/* 800EBECC 000E8E0C 7F E3 FB 78 */ mr r3, r31
/* 800EBED0 000E8E10 48 00 2D 91 */ bl OSRestoreInterrupts
.L_800EBED4:
/* 800EBED4 000E8E14 80 01 00 24 */ lwz r0, 0x24(r1)
/* 800EBED8 000E8E18 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 800EBEDC 000E8E1C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 800EBEE0 000E8E20 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 800EBEE4 000E8E24 38 21 00 20 */ addi r1, r1, 0x20
/* 800EBEE8 000E8E28 7C 08 03 A6 */ mtlr r0
/* 800EBEEC 000E8E2C 4E 80 00 20 */ blr
.endfn OSCancelAlarm
.fn DecrementerExceptionCallback, local
/* 800EBEF0 000E8E30 7C 08 02 A6 */ mflr r0
/* 800EBEF4 000E8E34 90 01 00 04 */ stw r0, 4(r1)
/* 800EBEF8 000E8E38 94 21 FD 10 */ stwu r1, -0x2f0(r1)
/* 800EBEFC 000E8E3C 93 E1 02 EC */ stw r31, 0x2ec(r1)
/* 800EBF00 000E8E40 93 C1 02 E8 */ stw r30, 0x2e8(r1)
/* 800EBF04 000E8E44 93 A1 02 E4 */ stw r29, 0x2e4(r1)
/* 800EBF08 000E8E48 7C 9D 23 78 */ mr r29, r4
/* 800EBF0C 000E8E4C 93 81 02 E0 */ stw r28, 0x2e0(r1)
/* 800EBF10 000E8E50 48 00 6C A1 */ bl __OSGetSystemTime
/* 800EBF14 000E8E54 80 0D 8F 50 */ lwz r0, AlarmQueue@sda21(r13)
/* 800EBF18 000E8E58 3B 84 00 00 */ addi r28, r4, 0
/* 800EBF1C 000E8E5C 3B C3 00 00 */ addi r30, r3, 0
/* 800EBF20 000E8E60 28 00 00 00 */ cmplwi r0, 0
/* 800EBF24 000E8E64 7C 1F 03 78 */ mr r31, r0
/* 800EBF28 000E8E68 40 82 00 0C */ bne .L_800EBF34
/* 800EBF2C 000E8E6C 7F A3 EB 78 */ mr r3, r29
/* 800EBF30 000E8E70 48 00 11 5D */ bl OSLoadContext
.L_800EBF34:
/* 800EBF34 000E8E74 80 1F 00 08 */ lwz r0, 8(r31)
/* 800EBF38 000E8E78 6F C4 80 00 */ xoris r4, r30, 0x8000
/* 800EBF3C 000E8E7C 80 BF 00 0C */ lwz r5, 0xc(r31)
/* 800EBF40 000E8E80 6C 03 80 00 */ xoris r3, r0, 0x8000
/* 800EBF44 000E8E84 7C 05 E0 10 */ subfc r0, r5, r28
/* 800EBF48 000E8E88 7C 63 21 10 */ subfe r3, r3, r4
/* 800EBF4C 000E8E8C 7C 64 21 10 */ subfe r3, r4, r4
/* 800EBF50 000E8E90 7C 63 00 D1 */ neg. r3, r3
/* 800EBF54 000E8E94 41 82 00 7C */ beq .L_800EBFD0
/* 800EBF58 000E8E98 48 00 6C 59 */ bl __OSGetSystemTime
/* 800EBF5C 000E8E9C 80 DF 00 0C */ lwz r6, 0xc(r31)
/* 800EBF60 000E8EA0 38 E0 00 00 */ li r7, 0
/* 800EBF64 000E8EA4 80 1F 00 08 */ lwz r0, 8(r31)
/* 800EBF68 000E8EA8 6C E5 80 00 */ xoris r5, r7, 0x8000
/* 800EBF6C 000E8EAC 7D 04 30 10 */ subfc r8, r4, r6
/* 800EBF70 000E8EB0 7C 03 01 10 */ subfe r0, r3, r0
/* 800EBF74 000E8EB4 6C 06 80 00 */ xoris r6, r0, 0x8000
/* 800EBF78 000E8EB8 7C 07 40 10 */ subfc r0, r7, r8
/* 800EBF7C 000E8EBC 7C A5 31 10 */ subfe r5, r5, r6
/* 800EBF80 000E8EC0 7C A6 31 10 */ subfe r5, r6, r6
/* 800EBF84 000E8EC4 7C A5 00 D1 */ neg. r5, r5
/* 800EBF88 000E8EC8 41 82 00 10 */ beq .L_800EBF98
/* 800EBF8C 000E8ECC 38 60 00 00 */ li r3, 0
/* 800EBF90 000E8ED0 4B FE 85 F9 */ bl PPCMtdec
/* 800EBF94 000E8ED4 48 00 00 34 */ b .L_800EBFC8
.L_800EBF98:
/* 800EBF98 000E8ED8 3C 80 80 00 */ lis r4, 0x8000
/* 800EBF9C 000E8EDC 6C E3 80 00 */ xoris r3, r7, 0x8000
/* 800EBFA0 000E8EE0 7C 04 40 10 */ subfc r0, r4, r8
/* 800EBFA4 000E8EE4 7C 63 31 10 */ subfe r3, r3, r6
/* 800EBFA8 000E8EE8 7C 66 31 10 */ subfe r3, r6, r6
/* 800EBFAC 000E8EEC 7C 63 00 D1 */ neg. r3, r3
/* 800EBFB0 000E8EF0 41 82 00 10 */ beq .L_800EBFC0
/* 800EBFB4 000E8EF4 7D 03 43 78 */ mr r3, r8
/* 800EBFB8 000E8EF8 4B FE 85 D1 */ bl PPCMtdec
/* 800EBFBC 000E8EFC 48 00 00 0C */ b .L_800EBFC8
.L_800EBFC0:
/* 800EBFC0 000E8F00 38 64 FF FF */ addi r3, r4, -1
/* 800EBFC4 000E8F04 4B FE 85 C5 */ bl PPCMtdec
.L_800EBFC8:
/* 800EBFC8 000E8F08 7F A3 EB 78 */ mr r3, r29
/* 800EBFCC 000E8F0C 48 00 10 C1 */ bl OSLoadContext
.L_800EBFD0:
/* 800EBFD0 000E8F10 80 7F 00 14 */ lwz r3, 0x14(r31)
/* 800EBFD4 000E8F14 28 03 00 00 */ cmplwi r3, 0
/* 800EBFD8 000E8F18 90 6D 8F 50 */ stw r3, AlarmQueue@sda21(r13)
/* 800EBFDC 000E8F1C 40 82 00 14 */ bne .L_800EBFF0
/* 800EBFE0 000E8F20 38 00 00 00 */ li r0, 0
/* 800EBFE4 000E8F24 38 6D 8F 50 */ addi r3, r13, AlarmQueue@sda21
/* 800EBFE8 000E8F28 90 03 00 04 */ stw r0, 4(r3)
/* 800EBFEC 000E8F2C 48 00 00 0C */ b .L_800EBFF8
.L_800EBFF0:
/* 800EBFF0 000E8F30 38 00 00 00 */ li r0, 0
/* 800EBFF4 000E8F34 90 03 00 10 */ stw r0, 0x10(r3)
.L_800EBFF8:
/* 800EBFF8 000E8F38 83 DF 00 00 */ lwz r30, 0(r31)
/* 800EBFFC 000E8F3C 38 C0 00 00 */ li r6, 0
/* 800EC000 000E8F40 6C C4 80 00 */ xoris r4, r6, 0x8000
/* 800EC004 000E8F44 90 DF 00 00 */ stw r6, 0(r31)
/* 800EC008 000E8F48 80 1F 00 18 */ lwz r0, 0x18(r31)
/* 800EC00C 000E8F4C 80 BF 00 1C */ lwz r5, 0x1c(r31)
/* 800EC010 000E8F50 6C 03 80 00 */ xoris r3, r0, 0x8000
/* 800EC014 000E8F54 7C 05 30 10 */ subfc r0, r5, r6
/* 800EC018 000E8F58 7C 63 21 10 */ subfe r3, r3, r4
/* 800EC01C 000E8F5C 7C 64 21 10 */ subfe r3, r4, r4
/* 800EC020 000E8F60 7C 63 00 D1 */ neg. r3, r3
/* 800EC024 000E8F64 41 82 00 18 */ beq .L_800EC03C
/* 800EC028 000E8F68 38 7F 00 00 */ addi r3, r31, 0
/* 800EC02C 000E8F6C 38 FE 00 00 */ addi r7, r30, 0
/* 800EC030 000E8F70 38 C0 00 00 */ li r6, 0
/* 800EC034 000E8F74 38 A0 00 00 */ li r5, 0
/* 800EC038 000E8F78 4B FF FA E5 */ bl InsertAlarm
.L_800EC03C:
/* 800EC03C 000E8F7C 83 8D 8F 50 */ lwz r28, AlarmQueue@sda21(r13)
/* 800EC040 000E8F80 28 1C 00 00 */ cmplwi r28, 0
/* 800EC044 000E8F84 41 82 00 74 */ beq .L_800EC0B8
/* 800EC048 000E8F88 48 00 6B 69 */ bl __OSGetSystemTime
/* 800EC04C 000E8F8C 80 DC 00 0C */ lwz r6, 0xc(r28)
/* 800EC050 000E8F90 38 E0 00 00 */ li r7, 0
/* 800EC054 000E8F94 80 1C 00 08 */ lwz r0, 8(r28)
/* 800EC058 000E8F98 6C E5 80 00 */ xoris r5, r7, 0x8000
/* 800EC05C 000E8F9C 7D 04 30 10 */ subfc r8, r4, r6
/* 800EC060 000E8FA0 7C 03 01 10 */ subfe r0, r3, r0
/* 800EC064 000E8FA4 6C 06 80 00 */ xoris r6, r0, 0x8000
/* 800EC068 000E8FA8 7C 07 40 10 */ subfc r0, r7, r8
/* 800EC06C 000E8FAC 7C A5 31 10 */ subfe r5, r5, r6
/* 800EC070 000E8FB0 7C A6 31 10 */ subfe r5, r6, r6
/* 800EC074 000E8FB4 7C A5 00 D1 */ neg. r5, r5
/* 800EC078 000E8FB8 41 82 00 10 */ beq .L_800EC088
/* 800EC07C 000E8FBC 38 60 00 00 */ li r3, 0
/* 800EC080 000E8FC0 4B FE 85 09 */ bl PPCMtdec
/* 800EC084 000E8FC4 48 00 00 34 */ b .L_800EC0B8
.L_800EC088:
/* 800EC088 000E8FC8 3C 80 80 00 */ lis r4, 0x8000
/* 800EC08C 000E8FCC 6C E3 80 00 */ xoris r3, r7, 0x8000
/* 800EC090 000E8FD0 7C 04 40 10 */ subfc r0, r4, r8
/* 800EC094 000E8FD4 7C 63 31 10 */ subfe r3, r3, r6
/* 800EC098 000E8FD8 7C 66 31 10 */ subfe r3, r6, r6
/* 800EC09C 000E8FDC 7C 63 00 D1 */ neg. r3, r3
/* 800EC0A0 000E8FE0 41 82 00 10 */ beq .L_800EC0B0
/* 800EC0A4 000E8FE4 7D 03 43 78 */ mr r3, r8
/* 800EC0A8 000E8FE8 4B FE 84 E1 */ bl PPCMtdec
/* 800EC0AC 000E8FEC 48 00 00 0C */ b .L_800EC0B8
.L_800EC0B0:
/* 800EC0B0 000E8FF0 38 64 FF FF */ addi r3, r4, -1
/* 800EC0B4 000E8FF4 4B FE 84 D5 */ bl PPCMtdec
.L_800EC0B8:
/* 800EC0B8 000E8FF8 48 00 59 4D */ bl OSDisableScheduler
/* 800EC0BC 000E8FFC 38 61 00 18 */ addi r3, r1, 0x18
/* 800EC0C0 000E9000 48 00 10 AD */ bl OSClearContext
/* 800EC0C4 000E9004 38 61 00 18 */ addi r3, r1, 0x18
/* 800EC0C8 000E9008 48 00 0E DD */ bl OSSetCurrentContext
/* 800EC0CC 000E900C 39 9E 00 00 */ addi r12, r30, 0
/* 800EC0D0 000E9010 7D 88 03 A6 */ mtlr r12
/* 800EC0D4 000E9014 38 7F 00 00 */ addi r3, r31, 0
/* 800EC0D8 000E9018 38 9D 00 00 */ addi r4, r29, 0
/* 800EC0DC 000E901C 4E 80 00 21 */ blrl
/* 800EC0E0 000E9020 38 61 00 18 */ addi r3, r1, 0x18
/* 800EC0E4 000E9024 48 00 10 89 */ bl OSClearContext
/* 800EC0E8 000E9028 7F A3 EB 78 */ mr r3, r29
/* 800EC0EC 000E902C 48 00 0E B9 */ bl OSSetCurrentContext
/* 800EC0F0 000E9030 48 00 59 55 */ bl OSEnableScheduler
/* 800EC0F4 000E9034 48 00 5E 6D */ bl __OSReschedule
/* 800EC0F8 000E9038 7F A3 EB 78 */ mr r3, r29
/* 800EC0FC 000E903C 48 00 0F 91 */ bl OSLoadContext
/* 800EC100 000E9040 80 01 02 F4 */ lwz r0, 0x2f4(r1)
/* 800EC104 000E9044 83 E1 02 EC */ lwz r31, 0x2ec(r1)
/* 800EC108 000E9048 83 C1 02 E8 */ lwz r30, 0x2e8(r1)
/* 800EC10C 000E904C 83 A1 02 E4 */ lwz r29, 0x2e4(r1)
/* 800EC110 000E9050 83 81 02 E0 */ lwz r28, 0x2e0(r1)
/* 800EC114 000E9054 38 21 02 F0 */ addi r1, r1, 0x2f0
/* 800EC118 000E9058 7C 08 03 A6 */ mtlr r0
/* 800EC11C 000E905C 4E 80 00 20 */ blr
.endfn DecrementerExceptionCallback
.fn DecrementerExceptionHandler, local
/* 800EC120 000E9060 90 04 00 00 */ stw r0, 0(r4)
/* 800EC124 000E9064 90 24 00 04 */ stw r1, 4(r4)
/* 800EC128 000E9068 90 44 00 08 */ stw r2, 8(r4)
/* 800EC12C 000E906C BC C4 00 18 */ stmw r6, 0x18(r4)
/* 800EC130 000E9070 7C 11 E2 A6 */ mfspr r0, 0x391
/* 800EC134 000E9074 90 04 01 A8 */ stw r0, 0x1a8(r4)
/* 800EC138 000E9078 7C 12 E2 A6 */ mfspr r0, 0x392
/* 800EC13C 000E907C 90 04 01 AC */ stw r0, 0x1ac(r4)
/* 800EC140 000E9080 7C 13 E2 A6 */ mfspr r0, 0x393
/* 800EC144 000E9084 90 04 01 B0 */ stw r0, 0x1b0(r4)
/* 800EC148 000E9088 7C 14 E2 A6 */ mfspr r0, 0x394
/* 800EC14C 000E908C 90 04 01 B4 */ stw r0, 0x1b4(r4)
/* 800EC150 000E9090 7C 15 E2 A6 */ mfspr r0, 0x395
/* 800EC154 000E9094 90 04 01 B8 */ stw r0, 0x1b8(r4)
/* 800EC158 000E9098 7C 16 E2 A6 */ mfspr r0, 0x396
/* 800EC15C 000E909C 90 04 01 BC */ stw r0, 0x1bc(r4)
/* 800EC160 000E90A0 7C 17 E2 A6 */ mfspr r0, 0x397
/* 800EC164 000E90A4 90 04 01 C0 */ stw r0, 0x1c0(r4)
/* 800EC168 000E90A8 94 21 FF F8 */ stwu r1, -8(r1)
/* 800EC16C 000E90AC 4B FF FD 84 */ b DecrementerExceptionCallback
.endfn DecrementerExceptionHandler
.fn OnReset, local
/* 800EC170 000E90B0 7C 08 02 A6 */ mflr r0
/* 800EC174 000E90B4 90 01 00 04 */ stw r0, 4(r1)
/* 800EC178 000E90B8 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 800EC17C 000E90BC 93 E1 00 14 */ stw r31, 0x14(r1)
/* 800EC180 000E90C0 93 C1 00 10 */ stw r30, 0x10(r1)
/* 800EC184 000E90C4 2C 03 00 00 */ cmpwi r3, 0
/* 800EC188 000E90C8 41 82 00 6C */ beq .L_800EC1F4
/* 800EC18C 000E90CC 80 0D 8F 50 */ lwz r0, AlarmQueue@sda21(r13)
/* 800EC190 000E90D0 28 00 00 00 */ cmplwi r0, 0
/* 800EC194 000E90D4 7C 1F 03 78 */ mr r31, r0
/* 800EC198 000E90D8 41 82 00 0C */ beq .L_800EC1A4
/* 800EC19C 000E90DC 80 1F 00 14 */ lwz r0, 0x14(r31)
/* 800EC1A0 000E90E0 48 00 00 08 */ b .L_800EC1A8
.L_800EC1A4:
/* 800EC1A4 000E90E4 38 00 00 00 */ li r0, 0
.L_800EC1A8:
/* 800EC1A8 000E90E8 7C 1E 03 78 */ mr r30, r0
/* 800EC1AC 000E90EC 48 00 00 04 */ b .L_800EC1B0
.L_800EC1B0:
/* 800EC1B0 000E90F0 48 00 00 04 */ b .L_800EC1B4
.L_800EC1B4:
/* 800EC1B4 000E90F4 48 00 00 38 */ b .L_800EC1EC
.L_800EC1B8:
/* 800EC1B8 000E90F8 7F E3 FB 78 */ mr r3, r31
/* 800EC1BC 000E90FC 4B FF 32 69 */ bl __DVDTestAlarm
/* 800EC1C0 000E9100 2C 03 00 00 */ cmpwi r3, 0
/* 800EC1C4 000E9104 40 82 00 0C */ bne .L_800EC1D0
/* 800EC1C8 000E9108 7F E3 FB 78 */ mr r3, r31
/* 800EC1CC 000E910C 4B FF FC 09 */ bl OSCancelAlarm
.L_800EC1D0:
/* 800EC1D0 000E9110 28 1E 00 00 */ cmplwi r30, 0
/* 800EC1D4 000E9114 7F DF F3 78 */ mr r31, r30
/* 800EC1D8 000E9118 41 82 00 0C */ beq .L_800EC1E4
/* 800EC1DC 000E911C 80 1E 00 14 */ lwz r0, 0x14(r30)
/* 800EC1E0 000E9120 48 00 00 08 */ b .L_800EC1E8
.L_800EC1E4:
/* 800EC1E4 000E9124 38 00 00 00 */ li r0, 0
.L_800EC1E8:
/* 800EC1E8 000E9128 7C 1E 03 78 */ mr r30, r0
.L_800EC1EC:
/* 800EC1EC 000E912C 28 1F 00 00 */ cmplwi r31, 0
/* 800EC1F0 000E9130 40 82 FF C8 */ bne .L_800EC1B8
.L_800EC1F4:
/* 800EC1F4 000E9134 38 60 00 01 */ li r3, 1
/* 800EC1F8 000E9138 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 800EC1FC 000E913C 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 800EC200 000E9140 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 800EC204 000E9144 38 21 00 18 */ addi r1, r1, 0x18
/* 800EC208 000E9148 7C 08 03 A6 */ mtlr r0
/* 800EC20C 000E914C 4E 80 00 20 */ blr
.endfn OnReset

View File

@ -1,564 +0,0 @@
.include "macros.inc"
.section .data, "wa" # 0x8049E220 - 0x804EFC20
.balign 8
.obj lbl_804A8F90, local
.asciz " in \"%s\" on line %d.\n"
.endobj lbl_804A8F90
.balign 4
.obj lbl_804A8FA8, local
.asciz "\nAddress: Back Chain LR Save\n"
.endobj lbl_804A8FA8
.balign 4
.obj lbl_804A8FD0, local
.asciz "0x%08x: 0x%08x 0x%08x\n"
.endobj lbl_804A8FD0
.balign 4
.obj lbl_804A8FEC, local
.asciz "Non-recoverable Exception %d"
.endobj lbl_804A8FEC
.balign 4
.obj lbl_804A900C, local
.asciz "Unhandled Exception %d"
.endobj lbl_804A900C
.balign 4
.obj lbl_804A9024, local
.asciz "\nDSISR = 0x%08x DAR = 0x%08x\n"
.endobj lbl_804A9024
.balign 4
.obj lbl_804A9058, local
.asciz "TB = 0x%016llx\n"
.endobj lbl_804A9058
.balign 4
.obj lbl_804A9068, local
.asciz "\nInstruction at 0x%x (read from SRR0) attempted to access invalid address 0x%x (read from DAR)\n"
.endobj lbl_804A9068
.balign 4
.obj lbl_804A90C8, local
.asciz "\nAttempted to fetch instruction from invalid address 0x%x (read from SRR0)\n"
.endobj lbl_804A90C8
.balign 4
.obj lbl_804A9114, local
.asciz "\nInstruction at 0x%x (read from SRR0) attempted to access unaligned address 0x%x (read from DAR)\n"
.endobj lbl_804A9114
.balign 4
.obj lbl_804A9178, local
.asciz "\nProgram exception : Possible illegal instruction/operation at or around 0x%x (read from SRR0)\n"
.endobj lbl_804A9178
.balign 4
.obj lbl_804A91D8, local
.asciz "AI DMA Address = 0x%04x%04x\n"
.endobj lbl_804A91D8
.balign 4
.obj lbl_804A91F8, local
.asciz "ARAM DMA Address = 0x%04x%04x\n"
.endobj lbl_804A91F8
.balign 4
.obj lbl_804A9218, local
.asciz "DI DMA Address = 0x%08x\n"
.endobj lbl_804A9218
.balign 4
.obj lbl_804A9234, local
.asciz "\nLast interrupt (%d): SRR0 = 0x%08x TB = 0x%016llx\n"
.endobj lbl_804A9234
.balign 4
.obj lbl_804A926C, local
.4byte .L_800EDD64
.4byte .L_800EDD64
.4byte .L_800EDCBC
.4byte .L_800EDCD4
.4byte .L_800EDD64
.4byte .L_800EDCE8
.4byte .L_800EDD00
.4byte .L_800EDD64
.4byte .L_800EDD64
.4byte .L_800EDD64
.4byte .L_800EDD64
.4byte .L_800EDD64
.4byte .L_800EDD64
.4byte .L_800EDD64
.4byte .L_800EDD64
.4byte .L_800EDD18
.endobj lbl_804A926C
.section .bss # 0x804EFC20 - 0x8051467C
.obj __OSErrorTable, global
.skip 0x44
.endobj __OSErrorTable
.section .sdata, "wa" # 0x80514680 - 0x80514D80
.balign 8
.obj __OSFpscrEnableBits, global
.4byte 0x000000F8
.endobj __OSFpscrEnableBits
.balign 4
.obj lbl_805149EC, local
.asciz "\n"
.endobj lbl_805149EC
.section .text, "ax" # 0x800056C0 - 0x80472F00
.fn OSReport, weak
/* 800ED6EC 000EA62C 7C 08 02 A6 */ mflr r0
/* 800ED6F0 000EA630 90 01 00 04 */ stw r0, 4(r1)
/* 800ED6F4 000EA634 94 21 FF 88 */ stwu r1, -0x78(r1)
/* 800ED6F8 000EA638 40 86 00 24 */ bne cr1, .L_800ED71C
/* 800ED6FC 000EA63C D8 21 00 28 */ stfd f1, 0x28(r1)
/* 800ED700 000EA640 D8 41 00 30 */ stfd f2, 0x30(r1)
/* 800ED704 000EA644 D8 61 00 38 */ stfd f3, 0x38(r1)
/* 800ED708 000EA648 D8 81 00 40 */ stfd f4, 0x40(r1)
/* 800ED70C 000EA64C D8 A1 00 48 */ stfd f5, 0x48(r1)
/* 800ED710 000EA650 D8 C1 00 50 */ stfd f6, 0x50(r1)
/* 800ED714 000EA654 D8 E1 00 58 */ stfd f7, 0x58(r1)
/* 800ED718 000EA658 D9 01 00 60 */ stfd f8, 0x60(r1)
.L_800ED71C:
/* 800ED71C 000EA65C 90 61 00 08 */ stw r3, 8(r1)
/* 800ED720 000EA660 3C 00 01 00 */ lis r0, 0x100
/* 800ED724 000EA664 90 81 00 0C */ stw r4, 0xc(r1)
/* 800ED728 000EA668 38 81 00 6C */ addi r4, r1, 0x6c
/* 800ED72C 000EA66C 90 A1 00 10 */ stw r5, 0x10(r1)
/* 800ED730 000EA670 90 C1 00 14 */ stw r6, 0x14(r1)
/* 800ED734 000EA674 90 E1 00 18 */ stw r7, 0x18(r1)
/* 800ED738 000EA678 91 01 00 1C */ stw r8, 0x1c(r1)
/* 800ED73C 000EA67C 91 21 00 20 */ stw r9, 0x20(r1)
/* 800ED740 000EA680 91 41 00 24 */ stw r10, 0x24(r1)
/* 800ED744 000EA684 90 01 00 6C */ stw r0, 0x6c(r1)
/* 800ED748 000EA688 38 01 00 80 */ addi r0, r1, 0x80
/* 800ED74C 000EA68C 90 01 00 70 */ stw r0, 0x70(r1)
/* 800ED750 000EA690 38 01 00 08 */ addi r0, r1, 8
/* 800ED754 000EA694 90 01 00 74 */ stw r0, 0x74(r1)
/* 800ED758 000EA698 4B FD 9F 81 */ bl vprintf
/* 800ED75C 000EA69C 80 01 00 7C */ lwz r0, 0x7c(r1)
/* 800ED760 000EA6A0 38 21 00 78 */ addi r1, r1, 0x78
/* 800ED764 000EA6A4 7C 08 03 A6 */ mtlr r0
/* 800ED768 000EA6A8 4E 80 00 20 */ blr
.endfn OSReport
.fn OSPanic, weak
/* 800ED76C 000EA6AC 7C 08 02 A6 */ mflr r0
/* 800ED770 000EA6B0 90 01 00 04 */ stw r0, 4(r1)
/* 800ED774 000EA6B4 94 21 FF 70 */ stwu r1, -0x90(r1)
/* 800ED778 000EA6B8 93 E1 00 8C */ stw r31, 0x8c(r1)
/* 800ED77C 000EA6BC 93 C1 00 88 */ stw r30, 0x88(r1)
/* 800ED780 000EA6C0 93 A1 00 84 */ stw r29, 0x84(r1)
/* 800ED784 000EA6C4 93 81 00 80 */ stw r28, 0x80(r1)
/* 800ED788 000EA6C8 40 86 00 24 */ bne cr1, .L_800ED7AC
/* 800ED78C 000EA6CC D8 21 00 28 */ stfd f1, 0x28(r1)
/* 800ED790 000EA6D0 D8 41 00 30 */ stfd f2, 0x30(r1)
/* 800ED794 000EA6D4 D8 61 00 38 */ stfd f3, 0x38(r1)
/* 800ED798 000EA6D8 D8 81 00 40 */ stfd f4, 0x40(r1)
/* 800ED79C 000EA6DC D8 A1 00 48 */ stfd f5, 0x48(r1)
/* 800ED7A0 000EA6E0 D8 C1 00 50 */ stfd f6, 0x50(r1)
/* 800ED7A4 000EA6E4 D8 E1 00 58 */ stfd f7, 0x58(r1)
/* 800ED7A8 000EA6E8 D9 01 00 60 */ stfd f8, 0x60(r1)
.L_800ED7AC:
/* 800ED7AC 000EA6EC 90 61 00 08 */ stw r3, 8(r1)
/* 800ED7B0 000EA6F0 3B 83 00 00 */ addi r28, r3, 0
/* 800ED7B4 000EA6F4 3B C4 00 00 */ addi r30, r4, 0
/* 800ED7B8 000EA6F8 90 81 00 0C */ stw r4, 0xc(r1)
/* 800ED7BC 000EA6FC 3B A5 00 00 */ addi r29, r5, 0
/* 800ED7C0 000EA700 90 A1 00 10 */ stw r5, 0x10(r1)
/* 800ED7C4 000EA704 90 C1 00 14 */ stw r6, 0x14(r1)
/* 800ED7C8 000EA708 3C C0 80 4B */ lis r6, lbl_804A8F90@ha
/* 800ED7CC 000EA70C 3B E6 8F 90 */ addi r31, r6, lbl_804A8F90@l
/* 800ED7D0 000EA710 90 E1 00 18 */ stw r7, 0x18(r1)
/* 800ED7D4 000EA714 91 01 00 1C */ stw r8, 0x1c(r1)
/* 800ED7D8 000EA718 91 21 00 20 */ stw r9, 0x20(r1)
/* 800ED7DC 000EA71C 91 41 00 24 */ stw r10, 0x24(r1)
/* 800ED7E0 000EA720 48 00 14 59 */ bl OSDisableInterrupts
/* 800ED7E4 000EA724 3C 00 03 00 */ lis r0, 0x300
/* 800ED7E8 000EA728 90 01 00 74 */ stw r0, 0x74(r1)
/* 800ED7EC 000EA72C 38 01 00 98 */ addi r0, r1, 0x98
/* 800ED7F0 000EA730 38 81 00 74 */ addi r4, r1, 0x74
/* 800ED7F4 000EA734 90 01 00 78 */ stw r0, 0x78(r1)
/* 800ED7F8 000EA738 38 01 00 08 */ addi r0, r1, 8
/* 800ED7FC 000EA73C 38 7D 00 00 */ addi r3, r29, 0
/* 800ED800 000EA740 90 01 00 7C */ stw r0, 0x7c(r1)
/* 800ED804 000EA744 4B FD 9E D5 */ bl vprintf
/* 800ED808 000EA748 38 7F 00 00 */ addi r3, r31, 0
/* 800ED80C 000EA74C 4C C6 31 82 */ crclr 6
/* 800ED810 000EA750 38 9C 00 00 */ addi r4, r28, 0
/* 800ED814 000EA754 38 BE 00 00 */ addi r5, r30, 0
/* 800ED818 000EA758 4B FF FE D5 */ bl OSReport
/* 800ED81C 000EA75C 38 7F 00 18 */ addi r3, r31, 0x18
/* 800ED820 000EA760 4C C6 31 82 */ crclr 6
/* 800ED824 000EA764 4B FF FE C9 */ bl OSReport
/* 800ED828 000EA768 3B C0 00 00 */ li r30, 0
/* 800ED82C 000EA76C 4B FF F9 39 */ bl OSGetStackPointer
/* 800ED830 000EA770 7C 7D 1B 78 */ mr r29, r3
/* 800ED834 000EA774 48 00 00 20 */ b .L_800ED854
.L_800ED838:
/* 800ED838 000EA778 80 BD 00 00 */ lwz r5, 0(r29)
/* 800ED83C 000EA77C 7F A4 EB 78 */ mr r4, r29
/* 800ED840 000EA780 80 DD 00 04 */ lwz r6, 4(r29)
/* 800ED844 000EA784 38 7F 00 40 */ addi r3, r31, 0x40
/* 800ED848 000EA788 4C C6 31 82 */ crclr 6
/* 800ED84C 000EA78C 4B FF FE A1 */ bl OSReport
/* 800ED850 000EA790 83 BD 00 00 */ lwz r29, 0(r29)
.L_800ED854:
/* 800ED854 000EA794 28 1D 00 00 */ cmplwi r29, 0
/* 800ED858 000EA798 41 82 00 1C */ beq .L_800ED874
/* 800ED85C 000EA79C 3C 1D 00 01 */ addis r0, r29, 1
/* 800ED860 000EA7A0 28 00 FF FF */ cmplwi r0, 0xffff
/* 800ED864 000EA7A4 41 82 00 10 */ beq .L_800ED874
/* 800ED868 000EA7A8 28 1E 00 10 */ cmplwi r30, 0x10
/* 800ED86C 000EA7AC 3B DE 00 01 */ addi r30, r30, 1
/* 800ED870 000EA7B0 41 80 FF C8 */ blt .L_800ED838
.L_800ED874:
/* 800ED874 000EA7B4 4B FE 6D 25 */ bl PPCHalt
/* 800ED878 000EA7B8 80 01 00 94 */ lwz r0, 0x94(r1)
/* 800ED87C 000EA7BC 83 E1 00 8C */ lwz r31, 0x8c(r1)
/* 800ED880 000EA7C0 83 C1 00 88 */ lwz r30, 0x88(r1)
/* 800ED884 000EA7C4 83 A1 00 84 */ lwz r29, 0x84(r1)
/* 800ED888 000EA7C8 83 81 00 80 */ lwz r28, 0x80(r1)
/* 800ED88C 000EA7CC 38 21 00 90 */ addi r1, r1, 0x90
/* 800ED890 000EA7D0 7C 08 03 A6 */ mtlr r0
/* 800ED894 000EA7D4 4E 80 00 20 */ blr
.endfn OSPanic
.fn OSSetErrorHandler, global
/* 800ED898 000EA7D8 7C 08 02 A6 */ mflr r0
/* 800ED89C 000EA7DC 90 01 00 04 */ stw r0, 4(r1)
/* 800ED8A0 000EA7E0 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 800ED8A4 000EA7E4 93 E1 00 2C */ stw r31, 0x2c(r1)
/* 800ED8A8 000EA7E8 93 C1 00 28 */ stw r30, 0x28(r1)
/* 800ED8AC 000EA7EC 93 A1 00 24 */ stw r29, 0x24(r1)
/* 800ED8B0 000EA7F0 3B A3 00 00 */ addi r29, r3, 0
/* 800ED8B4 000EA7F4 93 81 00 20 */ stw r28, 0x20(r1)
/* 800ED8B8 000EA7F8 3B 84 00 00 */ addi r28, r4, 0
/* 800ED8BC 000EA7FC 48 00 13 7D */ bl OSDisableInterrupts
/* 800ED8C0 000EA800 3C 80 80 4F */ lis r4, __OSErrorTable@ha
/* 800ED8C4 000EA804 57 A5 13 BA */ rlwinm r5, r29, 2, 0xe, 0x1d
/* 800ED8C8 000EA808 38 04 66 70 */ addi r0, r4, __OSErrorTable@l
/* 800ED8CC 000EA80C 57 A6 04 3E */ clrlwi r6, r29, 0x10
/* 800ED8D0 000EA810 7C 80 2A 14 */ add r4, r0, r5
/* 800ED8D4 000EA814 83 C4 00 00 */ lwz r30, 0(r4)
/* 800ED8D8 000EA818 28 06 00 10 */ cmplwi r6, 0x10
/* 800ED8DC 000EA81C 7C 7D 1B 78 */ mr r29, r3
/* 800ED8E0 000EA820 93 84 00 00 */ stw r28, 0(r4)
/* 800ED8E4 000EA824 40 82 01 A0 */ bne .L_800EDA84
/* 800ED8E8 000EA828 4B FE 6C 71 */ bl PPCMfmsr
/* 800ED8EC 000EA82C 3B E3 00 00 */ addi r31, r3, 0
/* 800ED8F0 000EA830 63 E3 20 00 */ ori r3, r31, 0x2000
/* 800ED8F4 000EA834 4B FE 6C 6D */ bl PPCMtmsr
/* 800ED8F8 000EA838 4B FE 6C E5 */ bl PPCMffpscr
/* 800ED8FC 000EA83C 28 1C 00 00 */ cmplwi r28, 0
/* 800ED900 000EA840 41 82 01 18 */ beq .L_800EDA18
/* 800ED904 000EA844 3C A0 80 00 */ lis r5, 0x800000DC@ha
/* 800ED908 000EA848 3C 80 60 06 */ lis r4, 0x6005F8FF@ha
/* 800ED90C 000EA84C 80 C5 00 DC */ lwz r6, 0x800000DC@l(r5)
/* 800ED910 000EA850 38 84 F8 FF */ addi r4, r4, 0x6005F8FF@l
/* 800ED914 000EA854 48 00 00 E8 */ b .L_800ED9FC
.L_800ED918:
/* 800ED918 000EA858 80 06 01 9C */ lwz r0, 0x19c(r6)
/* 800ED91C 000EA85C 60 00 09 00 */ ori r0, r0, 0x900
/* 800ED920 000EA860 90 06 01 9C */ stw r0, 0x19c(r6)
/* 800ED924 000EA864 A0 A6 01 A2 */ lhz r5, 0x1a2(r6)
/* 800ED928 000EA868 54 A0 07 FF */ clrlwi. r0, r5, 0x1f
/* 800ED92C 000EA86C 40 82 00 AC */ bne .L_800ED9D8
/* 800ED930 000EA870 60 A5 00 01 */ ori r5, r5, 1
/* 800ED934 000EA874 38 00 00 04 */ li r0, 4
/* 800ED938 000EA878 B0 A6 01 A2 */ sth r5, 0x1a2(r6)
/* 800ED93C 000EA87C 7C 09 03 A6 */ mtctr r0
/* 800ED940 000EA880 38 A6 00 00 */ addi r5, r6, 0
.L_800ED944:
/* 800ED944 000EA884 38 00 FF FF */ li r0, -1
/* 800ED948 000EA888 90 05 00 94 */ stw r0, 0x94(r5)
/* 800ED94C 000EA88C 90 05 00 90 */ stw r0, 0x90(r5)
/* 800ED950 000EA890 90 05 01 CC */ stw r0, 0x1cc(r5)
/* 800ED954 000EA894 90 05 01 C8 */ stw r0, 0x1c8(r5)
/* 800ED958 000EA898 90 05 00 9C */ stw r0, 0x9c(r5)
/* 800ED95C 000EA89C 90 05 00 98 */ stw r0, 0x98(r5)
/* 800ED960 000EA8A0 90 05 01 D4 */ stw r0, 0x1d4(r5)
/* 800ED964 000EA8A4 90 05 01 D0 */ stw r0, 0x1d0(r5)
/* 800ED968 000EA8A8 90 05 00 A4 */ stw r0, 0xa4(r5)
/* 800ED96C 000EA8AC 90 05 00 A0 */ stw r0, 0xa0(r5)
/* 800ED970 000EA8B0 90 05 01 DC */ stw r0, 0x1dc(r5)
/* 800ED974 000EA8B4 90 05 01 D8 */ stw r0, 0x1d8(r5)
/* 800ED978 000EA8B8 90 05 00 AC */ stw r0, 0xac(r5)
/* 800ED97C 000EA8BC 90 05 00 A8 */ stw r0, 0xa8(r5)
/* 800ED980 000EA8C0 90 05 01 E4 */ stw r0, 0x1e4(r5)
/* 800ED984 000EA8C4 90 05 01 E0 */ stw r0, 0x1e0(r5)
/* 800ED988 000EA8C8 90 05 00 B4 */ stw r0, 0xb4(r5)
/* 800ED98C 000EA8CC 90 05 00 B0 */ stw r0, 0xb0(r5)
/* 800ED990 000EA8D0 90 05 01 EC */ stw r0, 0x1ec(r5)
/* 800ED994 000EA8D4 90 05 01 E8 */ stw r0, 0x1e8(r5)
/* 800ED998 000EA8D8 90 05 00 BC */ stw r0, 0xbc(r5)
/* 800ED99C 000EA8DC 90 05 00 B8 */ stw r0, 0xb8(r5)
/* 800ED9A0 000EA8E0 90 05 01 F4 */ stw r0, 0x1f4(r5)
/* 800ED9A4 000EA8E4 90 05 01 F0 */ stw r0, 0x1f0(r5)
/* 800ED9A8 000EA8E8 90 05 00 C4 */ stw r0, 0xc4(r5)
/* 800ED9AC 000EA8EC 90 05 00 C0 */ stw r0, 0xc0(r5)
/* 800ED9B0 000EA8F0 90 05 01 FC */ stw r0, 0x1fc(r5)
/* 800ED9B4 000EA8F4 90 05 01 F8 */ stw r0, 0x1f8(r5)
/* 800ED9B8 000EA8F8 90 05 00 CC */ stw r0, 0xcc(r5)
/* 800ED9BC 000EA8FC 90 05 00 C8 */ stw r0, 0xc8(r5)
/* 800ED9C0 000EA900 90 05 02 04 */ stw r0, 0x204(r5)
/* 800ED9C4 000EA904 90 05 02 00 */ stw r0, 0x200(r5)
/* 800ED9C8 000EA908 38 A5 00 40 */ addi r5, r5, 0x40
/* 800ED9CC 000EA90C 42 00 FF 78 */ bdnz .L_800ED944
/* 800ED9D0 000EA910 38 00 00 04 */ li r0, 4
/* 800ED9D4 000EA914 90 06 01 94 */ stw r0, 0x194(r6)
.L_800ED9D8:
/* 800ED9D8 000EA918 80 0D 83 68 */ lwz r0, __OSFpscrEnableBits@sda21(r13)
/* 800ED9DC 000EA91C 80 A6 01 94 */ lwz r5, 0x194(r6)
/* 800ED9E0 000EA920 54 00 06 38 */ rlwinm r0, r0, 0, 0x18, 0x1c
/* 800ED9E4 000EA924 7C A0 03 78 */ or r0, r5, r0
/* 800ED9E8 000EA928 90 06 01 94 */ stw r0, 0x194(r6)
/* 800ED9EC 000EA92C 80 06 01 94 */ lwz r0, 0x194(r6)
/* 800ED9F0 000EA930 7C 00 20 38 */ and r0, r0, r4
/* 800ED9F4 000EA934 90 06 01 94 */ stw r0, 0x194(r6)
/* 800ED9F8 000EA938 80 C6 02 FC */ lwz r6, 0x2fc(r6)
.L_800ED9FC:
/* 800ED9FC 000EA93C 28 06 00 00 */ cmplwi r6, 0
/* 800EDA00 000EA940 40 82 FF 18 */ bne .L_800ED918
/* 800EDA04 000EA944 80 0D 83 68 */ lwz r0, __OSFpscrEnableBits@sda21(r13)
/* 800EDA08 000EA948 63 FF 09 00 */ ori r31, r31, 0x900
/* 800EDA0C 000EA94C 54 00 06 38 */ rlwinm r0, r0, 0, 0x18, 0x1c
/* 800EDA10 000EA950 7C 63 03 78 */ or r3, r3, r0
/* 800EDA14 000EA954 48 00 00 58 */ b .L_800EDA6C
.L_800EDA18:
/* 800EDA18 000EA958 3C A0 80 00 */ lis r5, 0x800000DC@ha
/* 800EDA1C 000EA95C 3C 80 60 06 */ lis r4, 0x6005F8FF@ha
/* 800EDA20 000EA960 80 C5 00 DC */ lwz r6, 0x800000DC@l(r5)
/* 800EDA24 000EA964 38 84 F8 FF */ addi r4, r4, 0x6005F8FF@l
/* 800EDA28 000EA968 38 A0 F6 FF */ li r5, -2305
/* 800EDA2C 000EA96C 48 00 00 2C */ b .L_800EDA58
.L_800EDA30:
/* 800EDA30 000EA970 80 06 01 9C */ lwz r0, 0x19c(r6)
/* 800EDA34 000EA974 7C 00 28 38 */ and r0, r0, r5
/* 800EDA38 000EA978 90 06 01 9C */ stw r0, 0x19c(r6)
/* 800EDA3C 000EA97C 80 06 01 94 */ lwz r0, 0x194(r6)
/* 800EDA40 000EA980 54 00 07 6E */ rlwinm r0, r0, 0, 0x1d, 0x17
/* 800EDA44 000EA984 90 06 01 94 */ stw r0, 0x194(r6)
/* 800EDA48 000EA988 80 06 01 94 */ lwz r0, 0x194(r6)
/* 800EDA4C 000EA98C 7C 00 20 38 */ and r0, r0, r4
/* 800EDA50 000EA990 90 06 01 94 */ stw r0, 0x194(r6)
/* 800EDA54 000EA994 80 C6 02 FC */ lwz r6, 0x2fc(r6)
.L_800EDA58:
/* 800EDA58 000EA998 28 06 00 00 */ cmplwi r6, 0
/* 800EDA5C 000EA99C 40 82 FF D4 */ bne .L_800EDA30
/* 800EDA60 000EA9A0 38 00 F6 FF */ li r0, -2305
/* 800EDA64 000EA9A4 54 63 07 6E */ rlwinm r3, r3, 0, 0x1d, 0x17
/* 800EDA68 000EA9A8 7F FF 00 38 */ and r31, r31, r0
.L_800EDA6C:
/* 800EDA6C 000EA9AC 3C 80 60 06 */ lis r4, 0x6005F8FF@ha
/* 800EDA70 000EA9B0 38 04 F8 FF */ addi r0, r4, 0x6005F8FF@l
/* 800EDA74 000EA9B4 7C 63 00 38 */ and r3, r3, r0
/* 800EDA78 000EA9B8 4B FE 6B 85 */ bl PPCMtfpscr
/* 800EDA7C 000EA9BC 7F E3 FB 78 */ mr r3, r31
/* 800EDA80 000EA9C0 4B FE 6A E1 */ bl PPCMtmsr
.L_800EDA84:
/* 800EDA84 000EA9C4 7F A3 EB 78 */ mr r3, r29
/* 800EDA88 000EA9C8 48 00 11 D9 */ bl OSRestoreInterrupts
/* 800EDA8C 000EA9CC 7F C3 F3 78 */ mr r3, r30
/* 800EDA90 000EA9D0 80 01 00 34 */ lwz r0, 0x34(r1)
/* 800EDA94 000EA9D4 83 E1 00 2C */ lwz r31, 0x2c(r1)
/* 800EDA98 000EA9D8 83 C1 00 28 */ lwz r30, 0x28(r1)
/* 800EDA9C 000EA9DC 83 A1 00 24 */ lwz r29, 0x24(r1)
/* 800EDAA0 000EA9E0 83 81 00 20 */ lwz r28, 0x20(r1)
/* 800EDAA4 000EA9E4 38 21 00 30 */ addi r1, r1, 0x30
/* 800EDAA8 000EA9E8 7C 08 03 A6 */ mtlr r0
/* 800EDAAC 000EA9EC 4E 80 00 20 */ blr
.endfn OSSetErrorHandler
.fn __OSUnhandledException, global
/* 800EDAB0 000EA9F0 7C 08 02 A6 */ mflr r0
/* 800EDAB4 000EA9F4 3D 00 80 4F */ lis r8, __OSErrorTable@ha
/* 800EDAB8 000EA9F8 90 01 00 04 */ stw r0, 4(r1)
/* 800EDABC 000EA9FC 3C E0 80 4B */ lis r7, lbl_804A8F90@ha
/* 800EDAC0 000EAA00 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 800EDAC4 000EAA04 BE C1 00 18 */ stmw r22, 0x18(r1)
/* 800EDAC8 000EAA08 3B 03 00 00 */ addi r24, r3, 0
/* 800EDACC 000EAA0C 3B 24 00 00 */ addi r25, r4, 0
/* 800EDAD0 000EAA10 3B 45 00 00 */ addi r26, r5, 0
/* 800EDAD4 000EAA14 3B 66 00 00 */ addi r27, r6, 0
/* 800EDAD8 000EAA18 3B C8 66 70 */ addi r30, r8, __OSErrorTable@l
/* 800EDADC 000EAA1C 3B E7 8F 90 */ addi r31, r7, lbl_804A8F90@l
/* 800EDAE0 000EAA20 48 00 50 B1 */ bl OSGetTime
/* 800EDAE4 000EAA24 80 B9 01 9C */ lwz r5, 0x19c(r25)
/* 800EDAE8 000EAA28 3B 84 00 00 */ addi r28, r4, 0
/* 800EDAEC 000EAA2C 3B A3 00 00 */ addi r29, r3, 0
/* 800EDAF0 000EAA30 54 A0 07 BD */ rlwinm. r0, r5, 0, 0x1e, 0x1e
/* 800EDAF4 000EAA34 40 82 00 18 */ bne .L_800EDB0C
/* 800EDAF8 000EAA38 38 7F 00 5C */ addi r3, r31, 0x5c
/* 800EDAFC 000EAA3C 4C C6 31 82 */ crclr 6
/* 800EDB00 000EAA40 57 04 06 3E */ clrlwi r4, r24, 0x18
/* 800EDB04 000EAA44 4B FF FB E9 */ bl OSReport
/* 800EDB08 000EAA48 48 00 01 54 */ b .L_800EDC5C
.L_800EDB0C:
/* 800EDB0C 000EAA4C 57 00 06 3E */ clrlwi r0, r24, 0x18
/* 800EDB10 000EAA50 28 00 00 06 */ cmplwi r0, 6
/* 800EDB14 000EAA54 40 82 00 D8 */ bne .L_800EDBEC
/* 800EDB18 000EAA58 54 A0 02 D7 */ rlwinm. r0, r5, 0, 0xb, 0xb
/* 800EDB1C 000EAA5C 41 82 00 D0 */ beq .L_800EDBEC
/* 800EDB20 000EAA60 80 1E 00 40 */ lwz r0, 0x40(r30)
/* 800EDB24 000EAA64 28 00 00 00 */ cmplwi r0, 0
/* 800EDB28 000EAA68 41 82 00 C4 */ beq .L_800EDBEC
/* 800EDB2C 000EAA6C 3B 00 00 10 */ li r24, 0x10
/* 800EDB30 000EAA70 4B FE 6A 29 */ bl PPCMfmsr
/* 800EDB34 000EAA74 3A E3 00 00 */ addi r23, r3, 0
/* 800EDB38 000EAA78 62 E3 20 00 */ ori r3, r23, 0x2000
/* 800EDB3C 000EAA7C 4B FE 6A 25 */ bl PPCMtmsr
/* 800EDB40 000EAA80 3C 60 80 00 */ lis r3, 0x800000D8@ha
/* 800EDB44 000EAA84 80 63 00 D8 */ lwz r3, 0x800000D8@l(r3)
/* 800EDB48 000EAA88 28 03 00 00 */ cmplwi r3, 0
/* 800EDB4C 000EAA8C 41 82 00 08 */ beq .L_800EDB54
/* 800EDB50 000EAA90 4B FF F4 4D */ bl OSSaveFPUContext
.L_800EDB54:
/* 800EDB54 000EAA94 4B FE 6A 89 */ bl PPCMffpscr
/* 800EDB58 000EAA98 3C 80 60 06 */ lis r4, 0x6005F8FF@ha
/* 800EDB5C 000EAA9C 3A C4 F8 FF */ addi r22, r4, 0x6005F8FF@l
/* 800EDB60 000EAAA0 7C 63 B0 38 */ and r3, r3, r22
/* 800EDB64 000EAAA4 4B FE 6A 99 */ bl PPCMtfpscr
/* 800EDB68 000EAAA8 7E E3 BB 78 */ mr r3, r23
/* 800EDB6C 000EAAAC 4B FE 69 F5 */ bl PPCMtmsr
/* 800EDB70 000EAAB0 3E E0 80 00 */ lis r23, 0x800000D8@ha
/* 800EDB74 000EAAB4 80 17 00 D8 */ lwz r0, 0x800000D8@l(r23)
/* 800EDB78 000EAAB8 7C 00 C8 40 */ cmplw r0, r25
/* 800EDB7C 000EAABC 40 82 00 54 */ bne .L_800EDBD0
/* 800EDB80 000EAAC0 48 00 3E 85 */ bl OSDisableScheduler
/* 800EDB84 000EAAC4 81 9E 00 40 */ lwz r12, 0x40(r30)
/* 800EDB88 000EAAC8 38 99 00 00 */ addi r4, r25, 0
/* 800EDB8C 000EAACC 38 BA 00 00 */ addi r5, r26, 0
/* 800EDB90 000EAAD0 4C C6 31 82 */ crclr 6
/* 800EDB94 000EAAD4 7D 88 03 A6 */ mtlr r12
/* 800EDB98 000EAAD8 38 DB 00 00 */ addi r6, r27, 0
/* 800EDB9C 000EAADC 38 60 00 10 */ li r3, 0x10
/* 800EDBA0 000EAAE0 4E 80 00 21 */ blrl
/* 800EDBA4 000EAAE4 80 79 01 9C */ lwz r3, 0x19c(r25)
/* 800EDBA8 000EAAE8 38 00 00 00 */ li r0, 0
/* 800EDBAC 000EAAEC 54 63 04 E2 */ rlwinm r3, r3, 0, 0x13, 0x11
/* 800EDBB0 000EAAF0 90 79 01 9C */ stw r3, 0x19c(r25)
/* 800EDBB4 000EAAF4 90 17 00 D8 */ stw r0, 0xd8(r23)
/* 800EDBB8 000EAAF8 80 19 01 94 */ lwz r0, 0x194(r25)
/* 800EDBBC 000EAAFC 7C 00 B0 38 */ and r0, r0, r22
/* 800EDBC0 000EAB00 90 19 01 94 */ stw r0, 0x194(r25)
/* 800EDBC4 000EAB04 48 00 3E 81 */ bl OSEnableScheduler
/* 800EDBC8 000EAB08 48 00 43 99 */ bl __OSReschedule
/* 800EDBCC 000EAB0C 48 00 00 18 */ b .L_800EDBE4
.L_800EDBD0:
/* 800EDBD0 000EAB10 80 79 01 9C */ lwz r3, 0x19c(r25)
/* 800EDBD4 000EAB14 38 00 00 00 */ li r0, 0
/* 800EDBD8 000EAB18 54 63 04 E2 */ rlwinm r3, r3, 0, 0x13, 0x11
/* 800EDBDC 000EAB1C 90 79 01 9C */ stw r3, 0x19c(r25)
/* 800EDBE0 000EAB20 90 17 00 D8 */ stw r0, 0xd8(r23)
.L_800EDBE4:
/* 800EDBE4 000EAB24 7F 23 CB 78 */ mr r3, r25
/* 800EDBE8 000EAB28 4B FF F4 A5 */ bl OSLoadContext
.L_800EDBEC:
/* 800EDBEC 000EAB2C 57 17 06 3E */ clrlwi r23, r24, 0x18
/* 800EDBF0 000EAB30 57 00 15 BA */ rlwinm r0, r24, 2, 0x16, 0x1d
/* 800EDBF4 000EAB34 7E DE 02 14 */ add r22, r30, r0
/* 800EDBF8 000EAB38 80 16 00 00 */ lwz r0, 0(r22)
/* 800EDBFC 000EAB3C 28 00 00 00 */ cmplwi r0, 0
/* 800EDC00 000EAB40 41 82 00 38 */ beq .L_800EDC38
/* 800EDC04 000EAB44 48 00 3E 01 */ bl OSDisableScheduler
/* 800EDC08 000EAB48 81 96 00 00 */ lwz r12, 0(r22)
/* 800EDC0C 000EAB4C 38 77 00 00 */ addi r3, r23, 0
/* 800EDC10 000EAB50 38 99 00 00 */ addi r4, r25, 0
/* 800EDC14 000EAB54 4C C6 31 82 */ crclr 6
/* 800EDC18 000EAB58 7D 88 03 A6 */ mtlr r12
/* 800EDC1C 000EAB5C 38 BA 00 00 */ addi r5, r26, 0
/* 800EDC20 000EAB60 38 DB 00 00 */ addi r6, r27, 0
/* 800EDC24 000EAB64 4E 80 00 21 */ blrl
/* 800EDC28 000EAB68 48 00 3E 1D */ bl OSEnableScheduler
/* 800EDC2C 000EAB6C 48 00 43 35 */ bl __OSReschedule
/* 800EDC30 000EAB70 7F 23 CB 78 */ mr r3, r25
/* 800EDC34 000EAB74 4B FF F4 59 */ bl OSLoadContext
.L_800EDC38:
/* 800EDC38 000EAB78 57 00 06 3E */ clrlwi r0, r24, 0x18
/* 800EDC3C 000EAB7C 28 00 00 08 */ cmplwi r0, 8
/* 800EDC40 000EAB80 40 82 00 0C */ bne .L_800EDC4C
/* 800EDC44 000EAB84 7F 23 CB 78 */ mr r3, r25
/* 800EDC48 000EAB88 4B FF F4 45 */ bl OSLoadContext
.L_800EDC4C:
/* 800EDC4C 000EAB8C 38 7F 00 7C */ addi r3, r31, 0x7c
/* 800EDC50 000EAB90 4C C6 31 82 */ crclr 6
/* 800EDC54 000EAB94 57 04 06 3E */ clrlwi r4, r24, 0x18
/* 800EDC58 000EAB98 4B FF FA 95 */ bl OSReport
.L_800EDC5C:
/* 800EDC5C 000EAB9C 38 6D 83 6C */ addi r3, r13, lbl_805149EC@sda21
/* 800EDC60 000EABA0 4C C6 31 82 */ crclr 6
/* 800EDC64 000EABA4 4B FF FA 89 */ bl OSReport
/* 800EDC68 000EABA8 7F 23 CB 78 */ mr r3, r25
/* 800EDC6C 000EABAC 4B FF F5 E1 */ bl OSDumpContext
/* 800EDC70 000EABB0 38 9A 00 00 */ addi r4, r26, 0
/* 800EDC74 000EABB4 4C C6 31 82 */ crclr 6
/* 800EDC78 000EABB8 38 BB 00 00 */ addi r5, r27, 0
/* 800EDC7C 000EABBC 38 7F 00 94 */ addi r3, r31, 0x94
/* 800EDC80 000EABC0 4B FF FA 6D */ bl OSReport
/* 800EDC84 000EABC4 38 DC 00 00 */ addi r6, r28, 0
/* 800EDC88 000EABC8 4C C6 31 82 */ crclr 6
/* 800EDC8C 000EABCC 38 BD 00 00 */ addi r5, r29, 0
/* 800EDC90 000EABD0 38 7F 00 C8 */ addi r3, r31, 0xc8
/* 800EDC94 000EABD4 4B FF FA 59 */ bl OSReport
/* 800EDC98 000EABD8 57 00 06 3E */ clrlwi r0, r24, 0x18
/* 800EDC9C 000EABDC 28 00 00 0F */ cmplwi r0, 0xf
/* 800EDCA0 000EABE0 41 81 00 C4 */ bgt .L_800EDD64
/* 800EDCA4 000EABE4 3C 60 80 4B */ lis r3, lbl_804A926C@ha
/* 800EDCA8 000EABE8 38 63 92 6C */ addi r3, r3, lbl_804A926C@l
/* 800EDCAC 000EABEC 54 00 10 3A */ slwi r0, r0, 2
/* 800EDCB0 000EABF0 7C 03 00 2E */ lwzx r0, r3, r0
/* 800EDCB4 000EABF4 7C 09 03 A6 */ mtctr r0
/* 800EDCB8 000EABF8 4E 80 04 20 */ bctr
.L_800EDCBC:
/* 800EDCBC 000EABFC 80 99 01 98 */ lwz r4, 0x198(r25)
/* 800EDCC0 000EAC00 38 BB 00 00 */ addi r5, r27, 0
/* 800EDCC4 000EAC04 38 7F 00 D8 */ addi r3, r31, 0xd8
/* 800EDCC8 000EAC08 4C C6 31 82 */ crclr 6
/* 800EDCCC 000EAC0C 4B FF FA 21 */ bl OSReport
/* 800EDCD0 000EAC10 48 00 00 94 */ b .L_800EDD64
.L_800EDCD4:
/* 800EDCD4 000EAC14 80 99 01 98 */ lwz r4, 0x198(r25)
/* 800EDCD8 000EAC18 38 7F 01 38 */ addi r3, r31, 0x138
/* 800EDCDC 000EAC1C 4C C6 31 82 */ crclr 6
/* 800EDCE0 000EAC20 4B FF FA 0D */ bl OSReport
/* 800EDCE4 000EAC24 48 00 00 80 */ b .L_800EDD64
.L_800EDCE8:
/* 800EDCE8 000EAC28 80 99 01 98 */ lwz r4, 0x198(r25)
/* 800EDCEC 000EAC2C 38 BB 00 00 */ addi r5, r27, 0
/* 800EDCF0 000EAC30 38 7F 01 84 */ addi r3, r31, 0x184
/* 800EDCF4 000EAC34 4C C6 31 82 */ crclr 6
/* 800EDCF8 000EAC38 4B FF F9 F5 */ bl OSReport
/* 800EDCFC 000EAC3C 48 00 00 68 */ b .L_800EDD64
.L_800EDD00:
/* 800EDD00 000EAC40 80 99 01 98 */ lwz r4, 0x198(r25)
/* 800EDD04 000EAC44 38 BB 00 00 */ addi r5, r27, 0
/* 800EDD08 000EAC48 38 7F 01 E8 */ addi r3, r31, 0x1e8
/* 800EDD0C 000EAC4C 4C C6 31 82 */ crclr 6
/* 800EDD10 000EAC50 4B FF F9 DD */ bl OSReport
/* 800EDD14 000EAC54 48 00 00 50 */ b .L_800EDD64
.L_800EDD18:
/* 800EDD18 000EAC58 38 6D 83 6C */ addi r3, r13, lbl_805149EC@sda21
/* 800EDD1C 000EAC5C 4C C6 31 82 */ crclr 6
/* 800EDD20 000EAC60 4B FF F9 CD */ bl OSReport
/* 800EDD24 000EAC64 3F 20 CC 00 */ lis r25, 0xCC005000@ha
/* 800EDD28 000EAC68 4C C6 31 82 */ crclr 6
/* 800EDD2C 000EAC6C 3B 19 50 00 */ addi r24, r25, 0xCC005000@l
/* 800EDD30 000EAC70 A0 99 50 30 */ lhz r4, 0x5030(r25)
/* 800EDD34 000EAC74 38 7F 02 48 */ addi r3, r31, 0x248
/* 800EDD38 000EAC78 A0 B9 50 32 */ lhz r5, 0x5032(r25)
/* 800EDD3C 000EAC7C 4B FF F9 B1 */ bl OSReport
/* 800EDD40 000EAC80 A0 98 00 20 */ lhz r4, 0x20(r24)
/* 800EDD44 000EAC84 38 7F 02 68 */ addi r3, r31, 0x268
/* 800EDD48 000EAC88 A0 B8 00 22 */ lhz r5, 0x22(r24)
/* 800EDD4C 000EAC8C 4C C6 31 82 */ crclr 6
/* 800EDD50 000EAC90 4B FF F9 9D */ bl OSReport
/* 800EDD54 000EAC94 80 99 60 14 */ lwz r4, 0x6014(r25)
/* 800EDD58 000EAC98 4C C6 31 82 */ crclr 6
/* 800EDD5C 000EAC9C 38 7F 02 88 */ addi r3, r31, 0x288
/* 800EDD60 000EACA0 4B FF F9 8D */ bl OSReport
.L_800EDD64:
/* 800EDD64 000EACA4 A8 8D 8F 88 */ lha r4, __OSLastInterrupt@sda21(r13)
/* 800EDD68 000EACA8 38 7F 02 A4 */ addi r3, r31, 0x2a4
/* 800EDD6C 000EACAC 4C C6 31 82 */ crclr 6
/* 800EDD70 000EACB0 80 AD 8F 84 */ lwz r5, __OSLastInterruptSrr0@sda21(r13)
/* 800EDD74 000EACB4 80 ED 8F 90 */ lwz r7, __OSLastInterruptTime@sda21(r13)
/* 800EDD78 000EACB8 81 0D 8F 94 */ lwz r8, (__OSLastInterruptTime+4)@sda21(r13)
/* 800EDD7C 000EACBC 4B FF F9 71 */ bl OSReport
/* 800EDD80 000EACC0 4B FE 68 19 */ bl PPCHalt
/* 800EDD84 000EACC4 BA C1 00 18 */ lmw r22, 0x18(r1)
/* 800EDD88 000EACC8 80 01 00 44 */ lwz r0, 0x44(r1)
/* 800EDD8C 000EACCC 38 21 00 40 */ addi r1, r1, 0x40
/* 800EDD90 000EACD0 7C 08 03 A6 */ mtlr r0
/* 800EDD94 000EACD4 4E 80 00 20 */ blr
.endfn __OSUnhandledException

View File

@ -1,691 +0,0 @@
.include "macros.inc"
.section .data, "wa" # 0x8049E220 - 0x804EFC20
.balign 8
.obj InterruptPrioTable, local
.4byte 0x00000100
.4byte 0x00000040
.4byte 0xF8000000
.4byte 0x00000200
.4byte 0x00000080
.4byte 0x00003000
.4byte 0x00000020
.4byte 0x03FF8C00
.4byte 0x04000000
.4byte 0x00004000
.4byte 0xFFFFFFFF
.endobj InterruptPrioTable
.section .sbss # 0x80514D80 - 0x80516360
.balign 8
.obj InterruptHandlerTable, local
.skip 0x4
.endobj InterruptHandlerTable
.obj __OSLastInterruptSrr0, global
.skip 0x4
.endobj __OSLastInterruptSrr0
.obj __OSLastInterrupt, global
.skip 0x2
.endobj __OSLastInterrupt
.balign 8
.obj __OSLastInterruptTime, global
.skip 0x8
.endobj __OSLastInterruptTime
.section .text, "ax" # 0x800056C0 - 0x80472F00
.fn OSDisableInterrupts, global
.global __RAS_OSDisableInterrupts_begin
__RAS_OSDisableInterrupts_begin:
/* 800EEC38 000EBB78 7C 60 00 A6 */ mfmsr r3
/* 800EEC3C 000EBB7C 54 64 04 5E */ rlwinm r4, r3, 0, 0x11, 0xf
/* 800EEC40 000EBB80 7C 80 01 24 */ mtmsr r4
.global __RAS_OSDisableInterrupts_end
__RAS_OSDisableInterrupts_end:
/* 800EEC44 000EBB84 54 63 8F FE */ rlwinm r3, r3, 0x11, 0x1f, 0x1f
/* 800EEC48 000EBB88 4E 80 00 20 */ blr
.endfn OSDisableInterrupts
.fn OSEnableInterrupts, global
/* 800EEC4C 000EBB8C 7C 60 00 A6 */ mfmsr r3
/* 800EEC50 000EBB90 60 64 80 00 */ ori r4, r3, 0x8000
/* 800EEC54 000EBB94 7C 80 01 24 */ mtmsr r4
/* 800EEC58 000EBB98 54 63 8F FE */ rlwinm r3, r3, 0x11, 0x1f, 0x1f
/* 800EEC5C 000EBB9C 4E 80 00 20 */ blr
.endfn OSEnableInterrupts
.fn OSRestoreInterrupts, global
/* 800EEC60 000EBBA0 2C 03 00 00 */ cmpwi r3, 0
/* 800EEC64 000EBBA4 7C 80 00 A6 */ mfmsr r4
/* 800EEC68 000EBBA8 41 82 00 0C */ beq .L_800EEC74
/* 800EEC6C 000EBBAC 60 85 80 00 */ ori r5, r4, 0x8000
/* 800EEC70 000EBBB0 48 00 00 08 */ b .L_800EEC78
.L_800EEC74:
/* 800EEC74 000EBBB4 54 85 04 5E */ rlwinm r5, r4, 0, 0x11, 0xf
.L_800EEC78:
/* 800EEC78 000EBBB8 7C A0 01 24 */ mtmsr r5
/* 800EEC7C 000EBBBC 54 83 8F FE */ rlwinm r3, r4, 0x11, 0x1f, 0x1f
/* 800EEC80 000EBBC0 4E 80 00 20 */ blr
.endfn OSRestoreInterrupts
.fn __OSSetInterruptHandler, global
/* 800EEC84 000EBBC4 7C 60 07 34 */ extsh r0, r3
/* 800EEC88 000EBBC8 80 6D 8F 80 */ lwz r3, InterruptHandlerTable@sda21(r13)
/* 800EEC8C 000EBBCC 54 00 10 3A */ slwi r0, r0, 2
/* 800EEC90 000EBBD0 7C A3 02 14 */ add r5, r3, r0
/* 800EEC94 000EBBD4 80 65 00 00 */ lwz r3, 0(r5)
/* 800EEC98 000EBBD8 90 85 00 00 */ stw r4, 0(r5)
/* 800EEC9C 000EBBDC 4E 80 00 20 */ blr
.endfn __OSSetInterruptHandler
.fn __OSGetInterruptHandler, global
/* 800EECA0 000EBBE0 7C 60 07 34 */ extsh r0, r3
/* 800EECA4 000EBBE4 80 6D 8F 80 */ lwz r3, InterruptHandlerTable@sda21(r13)
/* 800EECA8 000EBBE8 54 00 10 3A */ slwi r0, r0, 2
/* 800EECAC 000EBBEC 7C 63 00 2E */ lwzx r3, r3, r0
/* 800EECB0 000EBBF0 4E 80 00 20 */ blr
.endfn __OSGetInterruptHandler
.fn __OSInterruptInit, global
/* 800EECB4 000EBBF4 7C 08 02 A6 */ mflr r0
/* 800EECB8 000EBBF8 90 01 00 04 */ stw r0, 4(r1)
/* 800EECBC 000EBBFC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 800EECC0 000EBC00 93 E1 00 0C */ stw r31, 0xc(r1)
/* 800EECC4 000EBC04 3F E0 80 00 */ lis r31, 0x80003040@ha
/* 800EECC8 000EBC08 38 1F 30 40 */ addi r0, r31, 0x80003040@l
/* 800EECCC 000EBC0C 90 0D 8F 80 */ stw r0, InterruptHandlerTable@sda21(r13)
/* 800EECD0 000EBC10 38 80 00 00 */ li r4, 0
/* 800EECD4 000EBC14 38 A0 00 80 */ li r5, 0x80
/* 800EECD8 000EBC18 80 6D 8F 80 */ lwz r3, InterruptHandlerTable@sda21(r13)
/* 800EECDC 000EBC1C 4B F1 63 D9 */ bl memset
/* 800EECE0 000EBC20 38 00 00 00 */ li r0, 0
/* 800EECE4 000EBC24 90 1F 00 C4 */ stw r0, 0xc4(r31)
/* 800EECE8 000EBC28 3C 60 CC 00 */ lis r3, 0xCC003000@ha
/* 800EECEC 000EBC2C 38 83 30 00 */ addi r4, r3, 0xCC003000@l
/* 800EECF0 000EBC30 90 1F 00 C8 */ stw r0, 0xc8(r31)
/* 800EECF4 000EBC34 38 00 00 F0 */ li r0, 0xf0
/* 800EECF8 000EBC38 38 60 FF E0 */ li r3, -32
/* 800EECFC 000EBC3C 90 04 00 04 */ stw r0, 4(r4)
/* 800EED00 000EBC40 48 00 03 01 */ bl __OSMaskInterrupts
/* 800EED04 000EBC44 3C 60 80 0F */ lis r3, ExternalInterruptHandler@ha
/* 800EED08 000EBC48 38 83 F4 54 */ addi r4, r3, ExternalInterruptHandler@l
/* 800EED0C 000EBC4C 38 60 00 04 */ li r3, 4
/* 800EED10 000EBC50 4B FF CB ED */ bl __OSSetExceptionHandler
/* 800EED14 000EBC54 80 01 00 14 */ lwz r0, 0x14(r1)
/* 800EED18 000EBC58 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 800EED1C 000EBC5C 38 21 00 10 */ addi r1, r1, 0x10
/* 800EED20 000EBC60 7C 08 03 A6 */ mtlr r0
/* 800EED24 000EBC64 4E 80 00 20 */ blr
.endfn __OSInterruptInit
.fn SetInterruptMask, local
/* 800EED28 000EBC68 7C 60 00 34 */ cntlzw r0, r3
/* 800EED2C 000EBC6C 2C 00 00 0C */ cmpwi r0, 0xc
/* 800EED30 000EBC70 40 80 00 24 */ bge .L_800EED54
/* 800EED34 000EBC74 2C 00 00 08 */ cmpwi r0, 8
/* 800EED38 000EBC78 41 82 00 FC */ beq .L_800EEE34
/* 800EED3C 000EBC7C 40 80 01 28 */ bge .L_800EEE64
/* 800EED40 000EBC80 2C 00 00 05 */ cmpwi r0, 5
/* 800EED44 000EBC84 40 80 00 9C */ bge .L_800EEDE0
/* 800EED48 000EBC88 2C 00 00 00 */ cmpwi r0, 0
/* 800EED4C 000EBC8C 40 80 00 28 */ bge .L_800EED74
/* 800EED50 000EBC90 48 00 02 AC */ b .L_800EEFFC
.L_800EED54:
/* 800EED54 000EBC94 2C 00 00 11 */ cmpwi r0, 0x11
/* 800EED58 000EBC98 40 80 00 10 */ bge .L_800EED68
/* 800EED5C 000EBC9C 2C 00 00 0F */ cmpwi r0, 0xf
/* 800EED60 000EBCA0 40 80 01 A8 */ bge .L_800EEF08
/* 800EED64 000EBCA4 48 00 01 50 */ b .L_800EEEB4
.L_800EED68:
/* 800EED68 000EBCA8 2C 00 00 1B */ cmpwi r0, 0x1b
/* 800EED6C 000EBCAC 40 80 02 90 */ bge .L_800EEFFC
/* 800EED70 000EBCB0 48 00 01 D8 */ b .L_800EEF48
.L_800EED74:
/* 800EED74 000EBCB4 54 80 00 00 */ rlwinm r0, r4, 0, 0, 0
/* 800EED78 000EBCB8 28 00 00 00 */ cmplwi r0, 0
/* 800EED7C 000EBCBC 38 A0 00 00 */ li r5, 0
/* 800EED80 000EBCC0 40 82 00 08 */ bne .L_800EED88
/* 800EED84 000EBCC4 60 A5 00 01 */ ori r5, r5, 1
.L_800EED88:
/* 800EED88 000EBCC8 54 80 00 42 */ rlwinm r0, r4, 0, 1, 1
/* 800EED8C 000EBCCC 28 00 00 00 */ cmplwi r0, 0
/* 800EED90 000EBCD0 40 82 00 08 */ bne .L_800EED98
/* 800EED94 000EBCD4 60 A5 00 02 */ ori r5, r5, 2
.L_800EED98:
/* 800EED98 000EBCD8 54 80 00 84 */ rlwinm r0, r4, 0, 2, 2
/* 800EED9C 000EBCDC 28 00 00 00 */ cmplwi r0, 0
/* 800EEDA0 000EBCE0 40 82 00 08 */ bne .L_800EEDA8
/* 800EEDA4 000EBCE4 60 A5 00 04 */ ori r5, r5, 4
.L_800EEDA8:
/* 800EEDA8 000EBCE8 54 80 00 C6 */ rlwinm r0, r4, 0, 3, 3
/* 800EEDAC 000EBCEC 28 00 00 00 */ cmplwi r0, 0
/* 800EEDB0 000EBCF0 40 82 00 08 */ bne .L_800EEDB8
/* 800EEDB4 000EBCF4 60 A5 00 08 */ ori r5, r5, 8
.L_800EEDB8:
/* 800EEDB8 000EBCF8 54 80 01 08 */ rlwinm r0, r4, 0, 4, 4
/* 800EEDBC 000EBCFC 28 00 00 00 */ cmplwi r0, 0
/* 800EEDC0 000EBD00 40 82 00 08 */ bne .L_800EEDC8
/* 800EEDC4 000EBD04 60 A5 00 10 */ ori r5, r5, 0x10
.L_800EEDC8:
/* 800EEDC8 000EBD08 3C 80 CC 00 */ lis r4, 0xCC004000@ha
/* 800EEDCC 000EBD0C 54 A0 04 3E */ clrlwi r0, r5, 0x10
/* 800EEDD0 000EBD10 38 84 40 00 */ addi r4, r4, 0xCC004000@l
/* 800EEDD4 000EBD14 B0 04 00 1C */ sth r0, 0x1c(r4)
/* 800EEDD8 000EBD18 54 63 01 7E */ clrlwi r3, r3, 5
/* 800EEDDC 000EBD1C 48 00 02 20 */ b .L_800EEFFC
.L_800EEDE0:
/* 800EEDE0 000EBD20 3C A0 CC 00 */ lis r5, 0xCC005000@ha
/* 800EEDE4 000EBD24 38 A5 50 00 */ addi r5, r5, 0xCC005000@l
/* 800EEDE8 000EBD28 38 A5 00 0A */ addi r5, r5, 0xa
/* 800EEDEC 000EBD2C 54 80 01 4A */ rlwinm r0, r4, 0, 5, 5
/* 800EEDF0 000EBD30 A0 C5 00 00 */ lhz r6, 0(r5)
/* 800EEDF4 000EBD34 28 00 00 00 */ cmplwi r0, 0
/* 800EEDF8 000EBD38 54 C6 07 6C */ rlwinm r6, r6, 0, 0x1d, 0x16
/* 800EEDFC 000EBD3C 40 82 00 08 */ bne .L_800EEE04
/* 800EEE00 000EBD40 60 C6 00 10 */ ori r6, r6, 0x10
.L_800EEE04:
/* 800EEE04 000EBD44 54 80 01 8C */ rlwinm r0, r4, 0, 6, 6
/* 800EEE08 000EBD48 28 00 00 00 */ cmplwi r0, 0
/* 800EEE0C 000EBD4C 40 82 00 08 */ bne .L_800EEE14
/* 800EEE10 000EBD50 60 C6 00 40 */ ori r6, r6, 0x40
.L_800EEE14:
/* 800EEE14 000EBD54 54 80 01 CE */ rlwinm r0, r4, 0, 7, 7
/* 800EEE18 000EBD58 28 00 00 00 */ cmplwi r0, 0
/* 800EEE1C 000EBD5C 40 82 00 08 */ bne .L_800EEE24
/* 800EEE20 000EBD60 60 C6 01 00 */ ori r6, r6, 0x100
.L_800EEE24:
/* 800EEE24 000EBD64 54 C0 04 3E */ clrlwi r0, r6, 0x10
/* 800EEE28 000EBD68 B0 05 00 00 */ sth r0, 0(r5)
/* 800EEE2C 000EBD6C 54 63 02 08 */ rlwinm r3, r3, 0, 8, 4
/* 800EEE30 000EBD70 48 00 01 CC */ b .L_800EEFFC
.L_800EEE34:
/* 800EEE34 000EBD74 54 80 02 10 */ rlwinm r0, r4, 0, 8, 8
/* 800EEE38 000EBD78 3C 80 CC 00 */ lis r4, 0xCC006C00@ha
/* 800EEE3C 000EBD7C 28 00 00 00 */ cmplwi r0, 0
/* 800EEE40 000EBD80 80 A4 6C 00 */ lwz r5, 0xCC006C00@l(r4)
/* 800EEE44 000EBD84 38 00 FF D3 */ li r0, -45
/* 800EEE48 000EBD88 7C A5 00 38 */ and r5, r5, r0
/* 800EEE4C 000EBD8C 40 82 00 08 */ bne .L_800EEE54
/* 800EEE50 000EBD90 60 A5 00 04 */ ori r5, r5, 4
.L_800EEE54:
/* 800EEE54 000EBD94 3C 80 CC 00 */ lis r4, 0xCC006C00@ha
/* 800EEE58 000EBD98 90 A4 6C 00 */ stw r5, 0xCC006C00@l(r4)
/* 800EEE5C 000EBD9C 54 63 02 4E */ rlwinm r3, r3, 0, 9, 7
/* 800EEE60 000EBDA0 48 00 01 9C */ b .L_800EEFFC
.L_800EEE64:
/* 800EEE64 000EBDA4 54 80 02 52 */ rlwinm r0, r4, 0, 9, 9
/* 800EEE68 000EBDA8 3C A0 CC 00 */ lis r5, 0xCC006800@ha
/* 800EEE6C 000EBDAC 28 00 00 00 */ cmplwi r0, 0
/* 800EEE70 000EBDB0 80 A5 68 00 */ lwz r5, 0xCC006800@l(r5)
/* 800EEE74 000EBDB4 38 00 D3 F0 */ li r0, -11280
/* 800EEE78 000EBDB8 7C A5 00 38 */ and r5, r5, r0
/* 800EEE7C 000EBDBC 40 82 00 08 */ bne .L_800EEE84
/* 800EEE80 000EBDC0 60 A5 00 01 */ ori r5, r5, 1
.L_800EEE84:
/* 800EEE84 000EBDC4 54 80 02 94 */ rlwinm r0, r4, 0, 0xa, 0xa
/* 800EEE88 000EBDC8 28 00 00 00 */ cmplwi r0, 0
/* 800EEE8C 000EBDCC 40 82 00 08 */ bne .L_800EEE94
/* 800EEE90 000EBDD0 60 A5 00 04 */ ori r5, r5, 4
.L_800EEE94:
/* 800EEE94 000EBDD4 54 80 02 D6 */ rlwinm r0, r4, 0, 0xb, 0xb
/* 800EEE98 000EBDD8 28 00 00 00 */ cmplwi r0, 0
/* 800EEE9C 000EBDDC 40 82 00 08 */ bne .L_800EEEA4
/* 800EEEA0 000EBDE0 60 A5 04 00 */ ori r5, r5, 0x400
.L_800EEEA4:
/* 800EEEA4 000EBDE4 3C 80 CC 00 */ lis r4, 0xCC006800@ha
/* 800EEEA8 000EBDE8 90 A4 68 00 */ stw r5, 0xCC006800@l(r4)
/* 800EEEAC 000EBDEC 54 63 03 10 */ rlwinm r3, r3, 0, 0xc, 8
/* 800EEEB0 000EBDF0 48 00 01 4C */ b .L_800EEFFC
.L_800EEEB4:
/* 800EEEB4 000EBDF4 3C A0 CC 00 */ lis r5, 0xCC006800@ha
/* 800EEEB8 000EBDF8 38 C5 68 00 */ addi r6, r5, 0xCC006800@l
/* 800EEEBC 000EBDFC 38 C6 00 14 */ addi r6, r6, 0x14
/* 800EEEC0 000EBE00 54 80 03 18 */ rlwinm r0, r4, 0, 0xc, 0xc
/* 800EEEC4 000EBE04 80 E6 00 00 */ lwz r7, 0(r6)
/* 800EEEC8 000EBE08 38 A0 F3 F0 */ li r5, -3088
/* 800EEECC 000EBE0C 28 00 00 00 */ cmplwi r0, 0
/* 800EEED0 000EBE10 7C E7 28 38 */ and r7, r7, r5
/* 800EEED4 000EBE14 40 82 00 08 */ bne .L_800EEEDC
/* 800EEED8 000EBE18 60 E7 00 01 */ ori r7, r7, 1
.L_800EEEDC:
/* 800EEEDC 000EBE1C 54 80 03 5A */ rlwinm r0, r4, 0, 0xd, 0xd
/* 800EEEE0 000EBE20 28 00 00 00 */ cmplwi r0, 0
/* 800EEEE4 000EBE24 40 82 00 08 */ bne .L_800EEEEC
/* 800EEEE8 000EBE28 60 E7 00 04 */ ori r7, r7, 4
.L_800EEEEC:
/* 800EEEEC 000EBE2C 54 80 03 9C */ rlwinm r0, r4, 0, 0xe, 0xe
/* 800EEEF0 000EBE30 28 00 00 00 */ cmplwi r0, 0
/* 800EEEF4 000EBE34 40 82 00 08 */ bne .L_800EEEFC
/* 800EEEF8 000EBE38 60 E7 04 00 */ ori r7, r7, 0x400
.L_800EEEFC:
/* 800EEEFC 000EBE3C 90 E6 00 00 */ stw r7, 0(r6)
/* 800EEF00 000EBE40 54 63 03 D6 */ rlwinm r3, r3, 0, 0xf, 0xb
/* 800EEF04 000EBE44 48 00 00 F8 */ b .L_800EEFFC
.L_800EEF08:
/* 800EEF08 000EBE48 3C A0 CC 00 */ lis r5, 0xCC006800@ha
/* 800EEF0C 000EBE4C 38 A5 68 00 */ addi r5, r5, 0xCC006800@l
/* 800EEF10 000EBE50 38 A5 00 28 */ addi r5, r5, 0x28
/* 800EEF14 000EBE54 54 80 03 DE */ rlwinm r0, r4, 0, 0xf, 0xf
/* 800EEF18 000EBE58 80 C5 00 00 */ lwz r6, 0(r5)
/* 800EEF1C 000EBE5C 28 00 00 00 */ cmplwi r0, 0
/* 800EEF20 000EBE60 54 C6 00 36 */ rlwinm r6, r6, 0, 0, 0x1b
/* 800EEF24 000EBE64 40 82 00 08 */ bne .L_800EEF2C
/* 800EEF28 000EBE68 60 C6 00 01 */ ori r6, r6, 1
.L_800EEF2C:
/* 800EEF2C 000EBE6C 54 80 04 20 */ rlwinm r0, r4, 0, 0x10, 0x10
/* 800EEF30 000EBE70 28 00 00 00 */ cmplwi r0, 0
/* 800EEF34 000EBE74 40 82 00 08 */ bne .L_800EEF3C
/* 800EEF38 000EBE78 60 C6 00 04 */ ori r6, r6, 4
.L_800EEF3C:
/* 800EEF3C 000EBE7C 90 C5 00 00 */ stw r6, 0(r5)
/* 800EEF40 000EBE80 54 63 04 5C */ rlwinm r3, r3, 0, 0x11, 0xe
/* 800EEF44 000EBE84 48 00 00 B8 */ b .L_800EEFFC
.L_800EEF48:
/* 800EEF48 000EBE88 54 80 04 62 */ rlwinm r0, r4, 0, 0x11, 0x11
/* 800EEF4C 000EBE8C 28 00 00 00 */ cmplwi r0, 0
/* 800EEF50 000EBE90 38 A0 00 F0 */ li r5, 0xf0
/* 800EEF54 000EBE94 40 82 00 08 */ bne .L_800EEF5C
/* 800EEF58 000EBE98 60 A5 08 00 */ ori r5, r5, 0x800
.L_800EEF5C:
/* 800EEF5C 000EBE9C 54 80 05 28 */ rlwinm r0, r4, 0, 0x14, 0x14
/* 800EEF60 000EBEA0 28 00 00 00 */ cmplwi r0, 0
/* 800EEF64 000EBEA4 40 82 00 08 */ bne .L_800EEF6C
/* 800EEF68 000EBEA8 60 A5 00 08 */ ori r5, r5, 8
.L_800EEF6C:
/* 800EEF6C 000EBEAC 54 80 05 6A */ rlwinm r0, r4, 0, 0x15, 0x15
/* 800EEF70 000EBEB0 28 00 00 00 */ cmplwi r0, 0
/* 800EEF74 000EBEB4 40 82 00 08 */ bne .L_800EEF7C
/* 800EEF78 000EBEB8 60 A5 00 04 */ ori r5, r5, 4
.L_800EEF7C:
/* 800EEF7C 000EBEBC 54 80 05 AC */ rlwinm r0, r4, 0, 0x16, 0x16
/* 800EEF80 000EBEC0 28 00 00 00 */ cmplwi r0, 0
/* 800EEF84 000EBEC4 40 82 00 08 */ bne .L_800EEF8C
/* 800EEF88 000EBEC8 60 A5 00 02 */ ori r5, r5, 2
.L_800EEF8C:
/* 800EEF8C 000EBECC 54 80 05 EE */ rlwinm r0, r4, 0, 0x17, 0x17
/* 800EEF90 000EBED0 28 00 00 00 */ cmplwi r0, 0
/* 800EEF94 000EBED4 40 82 00 08 */ bne .L_800EEF9C
/* 800EEF98 000EBED8 60 A5 00 01 */ ori r5, r5, 1
.L_800EEF9C:
/* 800EEF9C 000EBEDC 54 80 06 30 */ rlwinm r0, r4, 0, 0x18, 0x18
/* 800EEFA0 000EBEE0 28 00 00 00 */ cmplwi r0, 0
/* 800EEFA4 000EBEE4 40 82 00 08 */ bne .L_800EEFAC
/* 800EEFA8 000EBEE8 60 A5 01 00 */ ori r5, r5, 0x100
.L_800EEFAC:
/* 800EEFAC 000EBEEC 54 80 06 72 */ rlwinm r0, r4, 0, 0x19, 0x19
/* 800EEFB0 000EBEF0 28 00 00 00 */ cmplwi r0, 0
/* 800EEFB4 000EBEF4 40 82 00 08 */ bne .L_800EEFBC
/* 800EEFB8 000EBEF8 60 A5 10 00 */ ori r5, r5, 0x1000
.L_800EEFBC:
/* 800EEFBC 000EBEFC 54 80 04 A4 */ rlwinm r0, r4, 0, 0x12, 0x12
/* 800EEFC0 000EBF00 28 00 00 00 */ cmplwi r0, 0
/* 800EEFC4 000EBF04 40 82 00 08 */ bne .L_800EEFCC
/* 800EEFC8 000EBF08 60 A5 02 00 */ ori r5, r5, 0x200
.L_800EEFCC:
/* 800EEFCC 000EBF0C 54 80 04 E6 */ rlwinm r0, r4, 0, 0x13, 0x13
/* 800EEFD0 000EBF10 28 00 00 00 */ cmplwi r0, 0
/* 800EEFD4 000EBF14 40 82 00 08 */ bne .L_800EEFDC
/* 800EEFD8 000EBF18 60 A5 04 00 */ ori r5, r5, 0x400
.L_800EEFDC:
/* 800EEFDC 000EBF1C 54 80 06 B4 */ rlwinm r0, r4, 0, 0x1a, 0x1a
/* 800EEFE0 000EBF20 28 00 00 00 */ cmplwi r0, 0
/* 800EEFE4 000EBF24 40 82 00 08 */ bne .L_800EEFEC
/* 800EEFE8 000EBF28 60 A5 20 00 */ ori r5, r5, 0x2000
.L_800EEFEC:
/* 800EEFEC 000EBF2C 3C 80 CC 00 */ lis r4, 0xCC003000@ha
/* 800EEFF0 000EBF30 38 84 30 00 */ addi r4, r4, 0xCC003000@l
/* 800EEFF4 000EBF34 90 A4 00 04 */ stw r5, 4(r4)
/* 800EEFF8 000EBF38 54 63 06 E0 */ rlwinm r3, r3, 0, 0x1b, 0x10
.L_800EEFFC:
/* 800EEFFC 000EBF3C 4E 80 00 20 */ blr
.endfn SetInterruptMask
.fn __OSMaskInterrupts, global
/* 800EF000 000EBF40 7C 08 02 A6 */ mflr r0
/* 800EF004 000EBF44 90 01 00 04 */ stw r0, 4(r1)
/* 800EF008 000EBF48 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 800EF00C 000EBF4C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 800EF010 000EBF50 93 C1 00 18 */ stw r30, 0x18(r1)
/* 800EF014 000EBF54 93 A1 00 14 */ stw r29, 0x14(r1)
/* 800EF018 000EBF58 7C 7F 1B 78 */ mr r31, r3
/* 800EF01C 000EBF5C 4B FF FC 1D */ bl OSDisableInterrupts
/* 800EF020 000EBF60 3C 80 80 00 */ lis r4, 0x800000C4@ha
/* 800EF024 000EBF64 83 A4 00 C4 */ lwz r29, 0x800000C4@l(r4)
/* 800EF028 000EBF68 7C 7E 1B 78 */ mr r30, r3
/* 800EF02C 000EBF6C 80 A4 00 C8 */ lwz r5, 0xc8(r4)
/* 800EF030 000EBF70 7F A0 2B 78 */ or r0, r29, r5
/* 800EF034 000EBF74 7F E3 00 78 */ andc r3, r31, r0
/* 800EF038 000EBF78 7F FF EB 78 */ or r31, r31, r29
/* 800EF03C 000EBF7C 93 E4 00 C4 */ stw r31, 0xc4(r4)
/* 800EF040 000EBF80 7F FF 2B 78 */ or r31, r31, r5
/* 800EF044 000EBF84 48 00 00 04 */ b .L_800EF048
.L_800EF048:
/* 800EF048 000EBF88 48 00 00 04 */ b .L_800EF04C
.L_800EF04C:
/* 800EF04C 000EBF8C 48 00 00 0C */ b .L_800EF058
.L_800EF050:
/* 800EF050 000EBF90 7F E4 FB 78 */ mr r4, r31
/* 800EF054 000EBF94 4B FF FC D5 */ bl SetInterruptMask
.L_800EF058:
/* 800EF058 000EBF98 28 03 00 00 */ cmplwi r3, 0
/* 800EF05C 000EBF9C 40 82 FF F4 */ bne .L_800EF050
/* 800EF060 000EBFA0 7F C3 F3 78 */ mr r3, r30
/* 800EF064 000EBFA4 4B FF FB FD */ bl OSRestoreInterrupts
/* 800EF068 000EBFA8 7F A3 EB 78 */ mr r3, r29
/* 800EF06C 000EBFAC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 800EF070 000EBFB0 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 800EF074 000EBFB4 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 800EF078 000EBFB8 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 800EF07C 000EBFBC 38 21 00 20 */ addi r1, r1, 0x20
/* 800EF080 000EBFC0 7C 08 03 A6 */ mtlr r0
/* 800EF084 000EBFC4 4E 80 00 20 */ blr
.endfn __OSMaskInterrupts
.fn __OSUnmaskInterrupts, global
/* 800EF088 000EBFC8 7C 08 02 A6 */ mflr r0
/* 800EF08C 000EBFCC 90 01 00 04 */ stw r0, 4(r1)
/* 800EF090 000EBFD0 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 800EF094 000EBFD4 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 800EF098 000EBFD8 93 C1 00 18 */ stw r30, 0x18(r1)
/* 800EF09C 000EBFDC 93 A1 00 14 */ stw r29, 0x14(r1)
/* 800EF0A0 000EBFE0 7C 7F 1B 78 */ mr r31, r3
/* 800EF0A4 000EBFE4 4B FF FB 95 */ bl OSDisableInterrupts
/* 800EF0A8 000EBFE8 3C 80 80 00 */ lis r4, 0x800000C4@ha
/* 800EF0AC 000EBFEC 83 A4 00 C4 */ lwz r29, 0x800000C4@l(r4)
/* 800EF0B0 000EBFF0 7C 7E 1B 78 */ mr r30, r3
/* 800EF0B4 000EBFF4 80 A4 00 C8 */ lwz r5, 0xc8(r4)
/* 800EF0B8 000EBFF8 7F A0 2B 78 */ or r0, r29, r5
/* 800EF0BC 000EBFFC 7F E3 00 38 */ and r3, r31, r0
/* 800EF0C0 000EC000 7F BF F8 78 */ andc r31, r29, r31
/* 800EF0C4 000EC004 93 E4 00 C4 */ stw r31, 0xc4(r4)
/* 800EF0C8 000EC008 7F FF 2B 78 */ or r31, r31, r5
/* 800EF0CC 000EC00C 48 00 00 04 */ b .L_800EF0D0
.L_800EF0D0:
/* 800EF0D0 000EC010 48 00 00 04 */ b .L_800EF0D4
.L_800EF0D4:
/* 800EF0D4 000EC014 48 00 00 0C */ b .L_800EF0E0
.L_800EF0D8:
/* 800EF0D8 000EC018 7F E4 FB 78 */ mr r4, r31
/* 800EF0DC 000EC01C 4B FF FC 4D */ bl SetInterruptMask
.L_800EF0E0:
/* 800EF0E0 000EC020 28 03 00 00 */ cmplwi r3, 0
/* 800EF0E4 000EC024 40 82 FF F4 */ bne .L_800EF0D8
/* 800EF0E8 000EC028 7F C3 F3 78 */ mr r3, r30
/* 800EF0EC 000EC02C 4B FF FB 75 */ bl OSRestoreInterrupts
/* 800EF0F0 000EC030 7F A3 EB 78 */ mr r3, r29
/* 800EF0F4 000EC034 80 01 00 24 */ lwz r0, 0x24(r1)
/* 800EF0F8 000EC038 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 800EF0FC 000EC03C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 800EF100 000EC040 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 800EF104 000EC044 38 21 00 20 */ addi r1, r1, 0x20
/* 800EF108 000EC048 7C 08 03 A6 */ mtlr r0
/* 800EF10C 000EC04C 4E 80 00 20 */ blr
.endfn __OSUnmaskInterrupts
.fn __OSDispatchInterrupt, global
/* 800EF110 000EC050 7C 08 02 A6 */ mflr r0
/* 800EF114 000EC054 90 01 00 04 */ stw r0, 4(r1)
/* 800EF118 000EC058 94 21 FF D8 */ stwu r1, -0x28(r1)
/* 800EF11C 000EC05C 93 E1 00 24 */ stw r31, 0x24(r1)
/* 800EF120 000EC060 93 C1 00 20 */ stw r30, 0x20(r1)
/* 800EF124 000EC064 93 A1 00 1C */ stw r29, 0x1c(r1)
/* 800EF128 000EC068 7C 9E 23 78 */ mr r30, r4
/* 800EF12C 000EC06C 3C 60 CC 00 */ lis r3, 0xCC003000@ha
/* 800EF130 000EC070 83 E3 30 00 */ lwz r31, 0xCC003000@l(r3)
/* 800EF134 000EC074 57 FF 04 1C */ rlwinm r31, r31, 0, 0x10, 0xe
/* 800EF138 000EC078 28 1F 00 00 */ cmplwi r31, 0
/* 800EF13C 000EC07C 41 82 00 18 */ beq .L_800EF154
/* 800EF140 000EC080 38 63 30 00 */ addi r3, r3, 0x3000
/* 800EF144 000EC084 80 03 00 04 */ lwz r0, 4(r3)
/* 800EF148 000EC088 7F E0 00 38 */ and r0, r31, r0
/* 800EF14C 000EC08C 28 00 00 00 */ cmplwi r0, 0
/* 800EF150 000EC090 40 82 00 0C */ bne .L_800EF15C
.L_800EF154:
/* 800EF154 000EC094 7F C3 F3 78 */ mr r3, r30
/* 800EF158 000EC098 4B FF DF 35 */ bl OSLoadContext
.L_800EF15C:
/* 800EF15C 000EC09C 57 E0 06 30 */ rlwinm r0, r31, 0, 0x18, 0x18
/* 800EF160 000EC0A0 28 00 00 00 */ cmplwi r0, 0
/* 800EF164 000EC0A4 38 00 00 00 */ li r0, 0
/* 800EF168 000EC0A8 41 82 00 60 */ beq .L_800EF1C8
/* 800EF16C 000EC0AC 3C 60 CC 00 */ lis r3, 0xCC004000@ha
/* 800EF170 000EC0B0 38 63 40 00 */ addi r3, r3, 0xCC004000@l
/* 800EF174 000EC0B4 A0 83 00 1E */ lhz r4, 0x1e(r3)
/* 800EF178 000EC0B8 54 83 07 FE */ clrlwi r3, r4, 0x1f
/* 800EF17C 000EC0BC 28 03 00 00 */ cmplwi r3, 0
/* 800EF180 000EC0C0 41 82 00 08 */ beq .L_800EF188
/* 800EF184 000EC0C4 64 00 80 00 */ oris r0, r0, 0x8000
.L_800EF188:
/* 800EF188 000EC0C8 54 83 07 BC */ rlwinm r3, r4, 0, 0x1e, 0x1e
/* 800EF18C 000EC0CC 28 03 00 00 */ cmplwi r3, 0
/* 800EF190 000EC0D0 41 82 00 08 */ beq .L_800EF198
/* 800EF194 000EC0D4 64 00 40 00 */ oris r0, r0, 0x4000
.L_800EF198:
/* 800EF198 000EC0D8 54 83 07 7A */ rlwinm r3, r4, 0, 0x1d, 0x1d
/* 800EF19C 000EC0DC 28 03 00 00 */ cmplwi r3, 0
/* 800EF1A0 000EC0E0 41 82 00 08 */ beq .L_800EF1A8
/* 800EF1A4 000EC0E4 64 00 20 00 */ oris r0, r0, 0x2000
.L_800EF1A8:
/* 800EF1A8 000EC0E8 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c
/* 800EF1AC 000EC0EC 28 03 00 00 */ cmplwi r3, 0
/* 800EF1B0 000EC0F0 41 82 00 08 */ beq .L_800EF1B8
/* 800EF1B4 000EC0F4 64 00 10 00 */ oris r0, r0, 0x1000
.L_800EF1B8:
/* 800EF1B8 000EC0F8 54 83 06 F6 */ rlwinm r3, r4, 0, 0x1b, 0x1b
/* 800EF1BC 000EC0FC 28 03 00 00 */ cmplwi r3, 0
/* 800EF1C0 000EC100 41 82 00 08 */ beq .L_800EF1C8
/* 800EF1C4 000EC104 64 00 08 00 */ oris r0, r0, 0x800
.L_800EF1C8:
/* 800EF1C8 000EC108 57 E3 06 72 */ rlwinm r3, r31, 0, 0x19, 0x19
/* 800EF1CC 000EC10C 28 03 00 00 */ cmplwi r3, 0
/* 800EF1D0 000EC110 41 82 00 40 */ beq .L_800EF210
/* 800EF1D4 000EC114 3C 60 CC 00 */ lis r3, 0xCC005000@ha
/* 800EF1D8 000EC118 38 63 50 00 */ addi r3, r3, 0xCC005000@l
/* 800EF1DC 000EC11C A0 83 00 0A */ lhz r4, 0xa(r3)
/* 800EF1E0 000EC120 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c
/* 800EF1E4 000EC124 28 03 00 00 */ cmplwi r3, 0
/* 800EF1E8 000EC128 41 82 00 08 */ beq .L_800EF1F0
/* 800EF1EC 000EC12C 64 00 04 00 */ oris r0, r0, 0x400
.L_800EF1F0:
/* 800EF1F0 000EC130 54 83 06 B4 */ rlwinm r3, r4, 0, 0x1a, 0x1a
/* 800EF1F4 000EC134 28 03 00 00 */ cmplwi r3, 0
/* 800EF1F8 000EC138 41 82 00 08 */ beq .L_800EF200
/* 800EF1FC 000EC13C 64 00 02 00 */ oris r0, r0, 0x200
.L_800EF200:
/* 800EF200 000EC140 54 83 06 30 */ rlwinm r3, r4, 0, 0x18, 0x18
/* 800EF204 000EC144 28 03 00 00 */ cmplwi r3, 0
/* 800EF208 000EC148 41 82 00 08 */ beq .L_800EF210
/* 800EF20C 000EC14C 64 00 01 00 */ oris r0, r0, 0x100
.L_800EF210:
/* 800EF210 000EC150 57 E3 06 B4 */ rlwinm r3, r31, 0, 0x1a, 0x1a
/* 800EF214 000EC154 28 03 00 00 */ cmplwi r3, 0
/* 800EF218 000EC158 41 82 00 1C */ beq .L_800EF234
/* 800EF21C 000EC15C 3C 60 CC 00 */ lis r3, 0xCC006C00@ha
/* 800EF220 000EC160 80 63 6C 00 */ lwz r3, 0xCC006C00@l(r3)
/* 800EF224 000EC164 54 63 07 38 */ rlwinm r3, r3, 0, 0x1c, 0x1c
/* 800EF228 000EC168 28 03 00 00 */ cmplwi r3, 0
/* 800EF22C 000EC16C 41 82 00 08 */ beq .L_800EF234
/* 800EF230 000EC170 64 00 00 80 */ oris r0, r0, 0x80
.L_800EF234:
/* 800EF234 000EC174 57 E3 06 F6 */ rlwinm r3, r31, 0, 0x1b, 0x1b
/* 800EF238 000EC178 28 03 00 00 */ cmplwi r3, 0
/* 800EF23C 000EC17C 41 82 00 A4 */ beq .L_800EF2E0
/* 800EF240 000EC180 3C 60 CC 00 */ lis r3, 0xCC006800@ha
/* 800EF244 000EC184 80 83 68 00 */ lwz r4, 0xCC006800@l(r3)
/* 800EF248 000EC188 54 83 07 BC */ rlwinm r3, r4, 0, 0x1e, 0x1e
/* 800EF24C 000EC18C 28 03 00 00 */ cmplwi r3, 0
/* 800EF250 000EC190 41 82 00 08 */ beq .L_800EF258
/* 800EF254 000EC194 64 00 00 40 */ oris r0, r0, 0x40
.L_800EF258:
/* 800EF258 000EC198 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c
/* 800EF25C 000EC19C 28 03 00 00 */ cmplwi r3, 0
/* 800EF260 000EC1A0 41 82 00 08 */ beq .L_800EF268
/* 800EF264 000EC1A4 64 00 00 20 */ oris r0, r0, 0x20
.L_800EF268:
/* 800EF268 000EC1A8 54 83 05 28 */ rlwinm r3, r4, 0, 0x14, 0x14
/* 800EF26C 000EC1AC 28 03 00 00 */ cmplwi r3, 0
/* 800EF270 000EC1B0 41 82 00 08 */ beq .L_800EF278
/* 800EF274 000EC1B4 64 00 00 10 */ oris r0, r0, 0x10
.L_800EF278:
/* 800EF278 000EC1B8 3C 60 CC 00 */ lis r3, 0xCC006800@ha
/* 800EF27C 000EC1BC 38 63 68 00 */ addi r3, r3, 0xCC006800@l
/* 800EF280 000EC1C0 80 83 00 14 */ lwz r4, 0x14(r3)
/* 800EF284 000EC1C4 54 83 07 BC */ rlwinm r3, r4, 0, 0x1e, 0x1e
/* 800EF288 000EC1C8 28 03 00 00 */ cmplwi r3, 0
/* 800EF28C 000EC1CC 41 82 00 08 */ beq .L_800EF294
/* 800EF290 000EC1D0 64 00 00 08 */ oris r0, r0, 8
.L_800EF294:
/* 800EF294 000EC1D4 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c
/* 800EF298 000EC1D8 28 03 00 00 */ cmplwi r3, 0
/* 800EF29C 000EC1DC 41 82 00 08 */ beq .L_800EF2A4
/* 800EF2A0 000EC1E0 64 00 00 04 */ oris r0, r0, 4
.L_800EF2A4:
/* 800EF2A4 000EC1E4 54 83 05 28 */ rlwinm r3, r4, 0, 0x14, 0x14
/* 800EF2A8 000EC1E8 28 03 00 00 */ cmplwi r3, 0
/* 800EF2AC 000EC1EC 41 82 00 08 */ beq .L_800EF2B4
/* 800EF2B0 000EC1F0 64 00 00 02 */ oris r0, r0, 2
.L_800EF2B4:
/* 800EF2B4 000EC1F4 3C 60 CC 00 */ lis r3, 0xCC006800@ha
/* 800EF2B8 000EC1F8 38 63 68 00 */ addi r3, r3, 0xCC006800@l
/* 800EF2BC 000EC1FC 80 83 00 28 */ lwz r4, 0x28(r3)
/* 800EF2C0 000EC200 54 83 07 BC */ rlwinm r3, r4, 0, 0x1e, 0x1e
/* 800EF2C4 000EC204 28 03 00 00 */ cmplwi r3, 0
/* 800EF2C8 000EC208 41 82 00 08 */ beq .L_800EF2D0
/* 800EF2CC 000EC20C 64 00 00 01 */ oris r0, r0, 1
.L_800EF2D0:
/* 800EF2D0 000EC210 54 83 07 38 */ rlwinm r3, r4, 0, 0x1c, 0x1c
/* 800EF2D4 000EC214 28 03 00 00 */ cmplwi r3, 0
/* 800EF2D8 000EC218 41 82 00 08 */ beq .L_800EF2E0
/* 800EF2DC 000EC21C 60 00 80 00 */ ori r0, r0, 0x8000
.L_800EF2E0:
/* 800EF2E0 000EC220 57 E3 04 A4 */ rlwinm r3, r31, 0, 0x12, 0x12
/* 800EF2E4 000EC224 28 03 00 00 */ cmplwi r3, 0
/* 800EF2E8 000EC228 41 82 00 08 */ beq .L_800EF2F0
/* 800EF2EC 000EC22C 60 00 00 20 */ ori r0, r0, 0x20
.L_800EF2F0:
/* 800EF2F0 000EC230 57 E3 04 E6 */ rlwinm r3, r31, 0, 0x13, 0x13
/* 800EF2F4 000EC234 28 03 00 00 */ cmplwi r3, 0
/* 800EF2F8 000EC238 41 82 00 08 */ beq .L_800EF300
/* 800EF2FC 000EC23C 60 00 00 40 */ ori r0, r0, 0x40
.L_800EF300:
/* 800EF300 000EC240 57 E3 05 6A */ rlwinm r3, r31, 0, 0x15, 0x15
/* 800EF304 000EC244 28 03 00 00 */ cmplwi r3, 0
/* 800EF308 000EC248 41 82 00 08 */ beq .L_800EF310
/* 800EF30C 000EC24C 60 00 10 00 */ ori r0, r0, 0x1000
.L_800EF310:
/* 800EF310 000EC250 57 E3 05 AC */ rlwinm r3, r31, 0, 0x16, 0x16
/* 800EF314 000EC254 28 03 00 00 */ cmplwi r3, 0
/* 800EF318 000EC258 41 82 00 08 */ beq .L_800EF320
/* 800EF31C 000EC25C 60 00 20 00 */ ori r0, r0, 0x2000
.L_800EF320:
/* 800EF320 000EC260 57 E3 05 EE */ rlwinm r3, r31, 0, 0x17, 0x17
/* 800EF324 000EC264 28 03 00 00 */ cmplwi r3, 0
/* 800EF328 000EC268 41 82 00 08 */ beq .L_800EF330
/* 800EF32C 000EC26C 60 00 00 80 */ ori r0, r0, 0x80
.L_800EF330:
/* 800EF330 000EC270 57 E3 07 38 */ rlwinm r3, r31, 0, 0x1c, 0x1c
/* 800EF334 000EC274 28 03 00 00 */ cmplwi r3, 0
/* 800EF338 000EC278 41 82 00 08 */ beq .L_800EF340
/* 800EF33C 000EC27C 60 00 08 00 */ ori r0, r0, 0x800
.L_800EF340:
/* 800EF340 000EC280 57 E3 07 7A */ rlwinm r3, r31, 0, 0x1d, 0x1d
/* 800EF344 000EC284 28 03 00 00 */ cmplwi r3, 0
/* 800EF348 000EC288 41 82 00 08 */ beq .L_800EF350
/* 800EF34C 000EC28C 60 00 04 00 */ ori r0, r0, 0x400
.L_800EF350:
/* 800EF350 000EC290 57 E3 07 BC */ rlwinm r3, r31, 0, 0x1e, 0x1e
/* 800EF354 000EC294 28 03 00 00 */ cmplwi r3, 0
/* 800EF358 000EC298 41 82 00 08 */ beq .L_800EF360
/* 800EF35C 000EC29C 60 00 02 00 */ ori r0, r0, 0x200
.L_800EF360:
/* 800EF360 000EC2A0 57 E3 05 28 */ rlwinm r3, r31, 0, 0x14, 0x14
/* 800EF364 000EC2A4 28 03 00 00 */ cmplwi r3, 0
/* 800EF368 000EC2A8 41 82 00 08 */ beq .L_800EF370
/* 800EF36C 000EC2AC 60 00 40 00 */ ori r0, r0, 0x4000
.L_800EF370:
/* 800EF370 000EC2B0 57 E3 07 FE */ clrlwi r3, r31, 0x1f
/* 800EF374 000EC2B4 28 03 00 00 */ cmplwi r3, 0
/* 800EF378 000EC2B8 41 82 00 08 */ beq .L_800EF380
/* 800EF37C 000EC2BC 60 00 01 00 */ ori r0, r0, 0x100
.L_800EF380:
/* 800EF380 000EC2C0 3C 60 80 00 */ lis r3, 0x800000C4@ha
/* 800EF384 000EC2C4 80 83 00 C4 */ lwz r4, 0x800000C4@l(r3)
/* 800EF388 000EC2C8 80 63 00 C8 */ lwz r3, 0xc8(r3)
/* 800EF38C 000EC2CC 7C 83 1B 78 */ or r3, r4, r3
/* 800EF390 000EC2D0 7C 04 18 78 */ andc r4, r0, r3
/* 800EF394 000EC2D4 28 04 00 00 */ cmplwi r4, 0
/* 800EF398 000EC2D8 41 82 00 98 */ beq .L_800EF430
/* 800EF39C 000EC2DC 3C 60 80 4B */ lis r3, InterruptPrioTable@ha
/* 800EF3A0 000EC2E0 38 03 9D C0 */ addi r0, r3, InterruptPrioTable@l
/* 800EF3A4 000EC2E4 7C 03 03 78 */ mr r3, r0
/* 800EF3A8 000EC2E8 48 00 00 04 */ b .L_800EF3AC
.L_800EF3AC:
/* 800EF3AC 000EC2EC 48 00 00 04 */ b .L_800EF3B0
.L_800EF3B0:
/* 800EF3B0 000EC2F0 80 03 00 00 */ lwz r0, 0(r3)
/* 800EF3B4 000EC2F4 7C 80 00 38 */ and r0, r4, r0
/* 800EF3B8 000EC2F8 28 00 00 00 */ cmplwi r0, 0
/* 800EF3BC 000EC2FC 41 82 00 10 */ beq .L_800EF3CC
/* 800EF3C0 000EC300 7C 00 00 34 */ cntlzw r0, r0
/* 800EF3C4 000EC304 7C 1D 07 34 */ extsh r29, r0
/* 800EF3C8 000EC308 48 00 00 0C */ b .L_800EF3D4
.L_800EF3CC:
/* 800EF3CC 000EC30C 38 63 00 04 */ addi r3, r3, 4
/* 800EF3D0 000EC310 4B FF FF E0 */ b .L_800EF3B0
.L_800EF3D4:
/* 800EF3D4 000EC314 80 6D 8F 80 */ lwz r3, InterruptHandlerTable@sda21(r13)
/* 800EF3D8 000EC318 57 A0 10 3A */ slwi r0, r29, 2
/* 800EF3DC 000EC31C 7F E3 00 2E */ lwzx r31, r3, r0
/* 800EF3E0 000EC320 28 1F 00 00 */ cmplwi r31, 0
/* 800EF3E4 000EC324 41 82 00 4C */ beq .L_800EF430
/* 800EF3E8 000EC328 2C 1D 00 04 */ cmpwi r29, 4
/* 800EF3EC 000EC32C 40 81 00 1C */ ble .L_800EF408
/* 800EF3F0 000EC330 B3 AD 8F 88 */ sth r29, __OSLastInterrupt@sda21(r13)
/* 800EF3F4 000EC334 48 00 37 9D */ bl OSGetTime
/* 800EF3F8 000EC338 90 8D 8F 94 */ stw r4, (__OSLastInterruptTime+4)@sda21(r13)
/* 800EF3FC 000EC33C 90 6D 8F 90 */ stw r3, __OSLastInterruptTime@sda21(r13)
/* 800EF400 000EC340 80 1E 01 98 */ lwz r0, 0x198(r30)
/* 800EF404 000EC344 90 0D 8F 84 */ stw r0, __OSLastInterruptSrr0@sda21(r13)
.L_800EF408:
/* 800EF408 000EC348 48 00 25 FD */ bl OSDisableScheduler
/* 800EF40C 000EC34C 7F A3 EB 78 */ mr r3, r29
/* 800EF410 000EC350 7F C4 F3 78 */ mr r4, r30
/* 800EF414 000EC354 7F EC FB 78 */ mr r12, r31
/* 800EF418 000EC358 7D 88 03 A6 */ mtlr r12
/* 800EF41C 000EC35C 4E 80 00 21 */ blrl
/* 800EF420 000EC360 48 00 26 25 */ bl OSEnableScheduler
/* 800EF424 000EC364 48 00 2B 3D */ bl __OSReschedule
/* 800EF428 000EC368 7F C3 F3 78 */ mr r3, r30
/* 800EF42C 000EC36C 4B FF DC 61 */ bl OSLoadContext
.L_800EF430:
/* 800EF430 000EC370 7F C3 F3 78 */ mr r3, r30
/* 800EF434 000EC374 4B FF DC 59 */ bl OSLoadContext
/* 800EF438 000EC378 80 01 00 2C */ lwz r0, 0x2c(r1)
/* 800EF43C 000EC37C 83 E1 00 24 */ lwz r31, 0x24(r1)
/* 800EF440 000EC380 83 C1 00 20 */ lwz r30, 0x20(r1)
/* 800EF444 000EC384 83 A1 00 1C */ lwz r29, 0x1c(r1)
/* 800EF448 000EC388 38 21 00 28 */ addi r1, r1, 0x28
/* 800EF44C 000EC38C 7C 08 03 A6 */ mtlr r0
/* 800EF450 000EC390 4E 80 00 20 */ blr
.endfn __OSDispatchInterrupt
.fn ExternalInterruptHandler, local
/* 800EF454 000EC394 90 04 00 00 */ stw r0, 0(r4)
/* 800EF458 000EC398 90 24 00 04 */ stw r1, 4(r4)
/* 800EF45C 000EC39C 90 44 00 08 */ stw r2, 8(r4)
/* 800EF460 000EC3A0 BC C4 00 18 */ stmw r6, 0x18(r4)
/* 800EF464 000EC3A4 7C 11 E2 A6 */ mfspr r0, 0x391
/* 800EF468 000EC3A8 90 04 01 A8 */ stw r0, 0x1a8(r4)
/* 800EF46C 000EC3AC 7C 12 E2 A6 */ mfspr r0, 0x392
/* 800EF470 000EC3B0 90 04 01 AC */ stw r0, 0x1ac(r4)
/* 800EF474 000EC3B4 7C 13 E2 A6 */ mfspr r0, 0x393
/* 800EF478 000EC3B8 90 04 01 B0 */ stw r0, 0x1b0(r4)
/* 800EF47C 000EC3BC 7C 14 E2 A6 */ mfspr r0, 0x394
/* 800EF480 000EC3C0 90 04 01 B4 */ stw r0, 0x1b4(r4)
/* 800EF484 000EC3C4 7C 15 E2 A6 */ mfspr r0, 0x395
/* 800EF488 000EC3C8 90 04 01 B8 */ stw r0, 0x1b8(r4)
/* 800EF48C 000EC3CC 7C 16 E2 A6 */ mfspr r0, 0x396
/* 800EF490 000EC3D0 90 04 01 BC */ stw r0, 0x1bc(r4)
/* 800EF494 000EC3D4 7C 17 E2 A6 */ mfspr r0, 0x397
/* 800EF498 000EC3D8 90 04 01 C0 */ stw r0, 0x1c0(r4)
/* 800EF49C 000EC3DC 94 21 FF F8 */ stwu r1, -8(r1)
/* 800EF4A0 000EC3E0 4B FF FC 70 */ b __OSDispatchInterrupt
.endfn ExternalInterruptHandler

View File

@ -1,345 +0,0 @@
.include "macros.inc"
.section .sbss # 0x80514D80 - 0x80516360
.balign 8
.obj ResetFunctionQueue, local
.skip 0x8
.endobj ResetFunctionQueue
.balign 4
.obj bootThisDol, local
.skip 0x4
.endobj bootThisDol
.section .text, "ax" # 0x800056C0 - 0x80472F00
.fn OSRegisterResetFunction, global
/* 800F02A4 000ED1E4 80 AD 8F A8 */ lwz r5, ResetFunctionQueue@sda21(r13)
/* 800F02A8 000ED1E8 48 00 00 08 */ b .L_800F02B0
.L_800F02AC:
/* 800F02AC 000ED1EC 80 A5 00 08 */ lwz r5, 8(r5)
.L_800F02B0:
/* 800F02B0 000ED1F0 28 05 00 00 */ cmplwi r5, 0
/* 800F02B4 000ED1F4 41 82 00 14 */ beq .L_800F02C8
/* 800F02B8 000ED1F8 80 85 00 04 */ lwz r4, 4(r5)
/* 800F02BC 000ED1FC 80 03 00 04 */ lwz r0, 4(r3)
/* 800F02C0 000ED200 7C 04 00 40 */ cmplw r4, r0
/* 800F02C4 000ED204 40 81 FF E8 */ ble .L_800F02AC
.L_800F02C8:
/* 800F02C8 000ED208 28 05 00 00 */ cmplwi r5, 0
/* 800F02CC 000ED20C 40 82 00 34 */ bne .L_800F0300
/* 800F02D0 000ED210 38 AD 8F A8 */ addi r5, r13, ResetFunctionQueue@sda21
/* 800F02D4 000ED214 84 85 00 04 */ lwzu r4, 4(r5)
/* 800F02D8 000ED218 28 04 00 00 */ cmplwi r4, 0
/* 800F02DC 000ED21C 40 82 00 0C */ bne .L_800F02E8
/* 800F02E0 000ED220 90 6D 8F A8 */ stw r3, ResetFunctionQueue@sda21(r13)
/* 800F02E4 000ED224 48 00 00 08 */ b .L_800F02EC
.L_800F02E8:
/* 800F02E8 000ED228 90 64 00 08 */ stw r3, 8(r4)
.L_800F02EC:
/* 800F02EC 000ED22C 90 83 00 0C */ stw r4, 0xc(r3)
/* 800F02F0 000ED230 38 00 00 00 */ li r0, 0
/* 800F02F4 000ED234 90 03 00 08 */ stw r0, 8(r3)
/* 800F02F8 000ED238 90 65 00 00 */ stw r3, 0(r5)
/* 800F02FC 000ED23C 4E 80 00 20 */ blr
.L_800F0300:
/* 800F0300 000ED240 90 A3 00 08 */ stw r5, 8(r3)
/* 800F0304 000ED244 80 85 00 0C */ lwz r4, 0xc(r5)
/* 800F0308 000ED248 90 65 00 0C */ stw r3, 0xc(r5)
/* 800F030C 000ED24C 28 04 00 00 */ cmplwi r4, 0
/* 800F0310 000ED250 90 83 00 0C */ stw r4, 0xc(r3)
/* 800F0314 000ED254 40 82 00 0C */ bne .L_800F0320
/* 800F0318 000ED258 90 6D 8F A8 */ stw r3, ResetFunctionQueue@sda21(r13)
/* 800F031C 000ED25C 4E 80 00 20 */ blr
.L_800F0320:
/* 800F0320 000ED260 90 64 00 08 */ stw r3, 8(r4)
/* 800F0324 000ED264 4E 80 00 20 */ blr
.endfn OSRegisterResetFunction
.fn Reset, local
/* 800F0328 000ED268 48 00 00 20 */ b .L_800F0348
.L_800F032C:
/* 800F032C 000ED26C 7D 10 FA A6 */ mfspr r8, 0x3f0
/* 800F0330 000ED270 61 08 00 08 */ ori r8, r8, 8
/* 800F0334 000ED274 7D 10 FB A6 */ mtspr 0x3f0, r8
/* 800F0338 000ED278 4C 00 01 2C */ isync
/* 800F033C 000ED27C 7C 00 04 AC */ sync 0
/* 800F0340 000ED280 60 00 00 00 */ nop
/* 800F0344 000ED284 48 00 00 08 */ b .L_800F034C
.L_800F0348:
/* 800F0348 000ED288 48 00 00 20 */ b .L_800F0368
.L_800F034C:
/* 800F034C 000ED28C 7C AC 42 E6 */ mftb r5, 0x10c
.L_800F0350:
/* 800F0350 000ED290 7C CC 42 E6 */ mftb r6, 0x10c
/* 800F0354 000ED294 7C E5 30 50 */ subf r7, r5, r6
/* 800F0358 000ED298 28 07 11 24 */ cmplwi r7, 0x1124
/* 800F035C 000ED29C 41 80 FF F4 */ blt .L_800F0350
/* 800F0360 000ED2A0 60 00 00 00 */ nop
/* 800F0364 000ED2A4 48 00 00 08 */ b .L_800F036C
.L_800F0368:
/* 800F0368 000ED2A8 48 00 00 20 */ b .L_800F0388
.L_800F036C:
/* 800F036C 000ED2AC 3D 00 CC 00 */ lis r8, 0xCC003000@h
/* 800F0370 000ED2B0 61 08 30 00 */ ori r8, r8, 0xCC003000@l
/* 800F0374 000ED2B4 38 80 00 03 */ li r4, 3
/* 800F0378 000ED2B8 90 88 00 24 */ stw r4, 0x24(r8)
/* 800F037C 000ED2BC 90 68 00 24 */ stw r3, 0x24(r8)
/* 800F0380 000ED2C0 60 00 00 00 */ nop
/* 800F0384 000ED2C4 48 00 00 08 */ b .L_800F038C
.L_800F0388:
/* 800F0388 000ED2C8 48 00 00 0C */ b .L_800F0394
.L_800F038C:
/* 800F038C 000ED2CC 60 00 00 00 */ nop
/* 800F0390 000ED2D0 4B FF FF FC */ b .L_800F038C
.L_800F0394:
/* 800F0394 000ED2D4 4B FF FF 98 */ b .L_800F032C
.endfn Reset
.fn __OSDoHotReset, global
/* 800F0398 000ED2D8 7C 08 02 A6 */ mflr r0
/* 800F039C 000ED2DC 90 01 00 04 */ stw r0, 4(r1)
/* 800F03A0 000ED2E0 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 800F03A4 000ED2E4 93 E1 00 14 */ stw r31, 0x14(r1)
/* 800F03A8 000ED2E8 7C 7F 1B 78 */ mr r31, r3
/* 800F03AC 000ED2EC 4B FF E8 8D */ bl OSDisableInterrupts
/* 800F03B0 000ED2F0 3C 60 CC 00 */ lis r3, 0xCC002000@ha
/* 800F03B4 000ED2F4 38 63 20 00 */ addi r3, r3, 0xCC002000@l
/* 800F03B8 000ED2F8 38 00 00 00 */ li r0, 0
/* 800F03BC 000ED2FC B0 03 00 02 */ sth r0, 2(r3)
/* 800F03C0 000ED300 4B FF C4 71 */ bl ICFlashInvalidate
/* 800F03C4 000ED304 57 E3 18 38 */ slwi r3, r31, 3
/* 800F03C8 000ED308 4B FF FF 61 */ bl Reset
/* 800F03CC 000ED30C 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 800F03D0 000ED310 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 800F03D4 000ED314 38 21 00 18 */ addi r1, r1, 0x18
/* 800F03D8 000ED318 7C 08 03 A6 */ mtlr r0
/* 800F03DC 000ED31C 4E 80 00 20 */ blr
.endfn __OSDoHotReset
.fn OSResetSystem, global
/* 800F03E0 000ED320 7C 08 02 A6 */ mflr r0
/* 800F03E4 000ED324 90 01 00 04 */ stw r0, 4(r1)
/* 800F03E8 000ED328 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 800F03EC 000ED32C BF 41 00 28 */ stmw r26, 0x28(r1)
/* 800F03F0 000ED330 7C 7C 1B 78 */ mr r28, r3
/* 800F03F4 000ED334 7C 9D 23 78 */ mr r29, r4
/* 800F03F8 000ED338 7C BE 2B 78 */ mr r30, r5
/* 800F03FC 000ED33C 48 00 16 09 */ bl OSDisableScheduler
/* 800F0400 000ED340 4B FF C2 01 */ bl __OSStopAudioSystem
/* 800F0404 000ED344 2C 1C 00 02 */ cmpwi r28, 2
/* 800F0408 000ED348 41 82 00 18 */ beq .L_800F0420
/* 800F040C 000ED34C 2C 1C 00 00 */ cmpwi r28, 0
/* 800F0410 000ED350 40 82 00 1C */ bne .L_800F042C
/* 800F0414 000ED354 80 0D 8F B0 */ lwz r0, bootThisDol@sda21(r13)
/* 800F0418 000ED358 28 00 00 00 */ cmplwi r0, 0
/* 800F041C 000ED35C 41 82 00 10 */ beq .L_800F042C
.L_800F0420:
/* 800F0420 000ED360 38 60 00 01 */ li r3, 1
/* 800F0424 000ED364 48 00 4A 5D */ bl __PADDisableRecalibration
/* 800F0428 000ED368 7C 7F 1B 78 */ mr r31, r3
.L_800F042C:
/* 800F042C 000ED36C 48 00 00 04 */ b .L_800F0430
.L_800F0430:
/* 800F0430 000ED370 48 00 00 04 */ b .L_800F0434
.L_800F0434:
/* 800F0434 000ED374 83 4D 8F A8 */ lwz r26, ResetFunctionQueue@sda21(r13)
/* 800F0438 000ED378 3B 60 00 00 */ li r27, 0
/* 800F043C 000ED37C 48 00 00 04 */ b .L_800F0440
.L_800F0440:
/* 800F0440 000ED380 48 00 00 04 */ b .L_800F0444
.L_800F0444:
/* 800F0444 000ED384 48 00 00 24 */ b .L_800F0468
.L_800F0448:
/* 800F0448 000ED388 38 60 00 00 */ li r3, 0
/* 800F044C 000ED38C 81 9A 00 00 */ lwz r12, 0(r26)
/* 800F0450 000ED390 7D 88 03 A6 */ mtlr r12
/* 800F0454 000ED394 4E 80 00 21 */ blrl
/* 800F0458 000ED398 7C 60 00 34 */ cntlzw r0, r3
/* 800F045C 000ED39C 83 5A 00 08 */ lwz r26, 8(r26)
/* 800F0460 000ED3A0 54 00 D9 7E */ srwi r0, r0, 5
/* 800F0464 000ED3A4 7F 7B 03 78 */ or r27, r27, r0
.L_800F0468:
/* 800F0468 000ED3A8 28 1A 00 00 */ cmplwi r26, 0
/* 800F046C 000ED3AC 41 82 00 0C */ beq .L_800F0478
/* 800F0470 000ED3B0 2C 1B 00 00 */ cmpwi r27, 0
/* 800F0474 000ED3B4 41 82 FF D4 */ beq .L_800F0448
.L_800F0478:
/* 800F0478 000ED3B8 48 00 0C F5 */ bl __OSSyncSram
/* 800F047C 000ED3BC 7C 60 00 34 */ cntlzw r0, r3
/* 800F0480 000ED3C0 54 00 D9 7E */ srwi r0, r0, 5
/* 800F0484 000ED3C4 7F 7B 03 78 */ or r27, r27, r0
/* 800F0488 000ED3C8 2C 1B 00 00 */ cmpwi r27, 0
/* 800F048C 000ED3CC 41 82 00 0C */ beq .L_800F0498
/* 800F0490 000ED3D0 38 00 00 00 */ li r0, 0
/* 800F0494 000ED3D4 48 00 00 08 */ b .L_800F049C
.L_800F0498:
/* 800F0498 000ED3D8 38 00 00 01 */ li r0, 1
.L_800F049C:
/* 800F049C 000ED3DC 2C 00 00 00 */ cmpwi r0, 0
/* 800F04A0 000ED3E0 41 82 FF 94 */ beq .L_800F0434
/* 800F04A4 000ED3E4 2C 1C 00 01 */ cmpwi r28, 1
/* 800F04A8 000ED3E8 40 82 00 3C */ bne .L_800F04E4
/* 800F04AC 000ED3EC 2C 1E 00 00 */ cmpwi r30, 0
/* 800F04B0 000ED3F0 41 82 00 34 */ beq .L_800F04E4
/* 800F04B4 000ED3F4 48 00 08 7D */ bl __OSLockSram
/* 800F04B8 000ED3F8 88 03 00 13 */ lbz r0, 0x13(r3)
/* 800F04BC 000ED3FC 60 00 00 40 */ ori r0, r0, 0x40
/* 800F04C0 000ED400 98 03 00 13 */ stb r0, 0x13(r3)
/* 800F04C4 000ED404 38 60 00 01 */ li r3, 1
/* 800F04C8 000ED408 48 00 0C 5D */ bl __OSUnlockSram
/* 800F04CC 000ED40C 48 00 00 04 */ b .L_800F04D0
.L_800F04D0:
/* 800F04D0 000ED410 48 00 00 04 */ b .L_800F04D4
.L_800F04D4:
/* 800F04D4 000ED414 48 00 0C 99 */ bl __OSSyncSram
/* 800F04D8 000ED418 2C 03 00 00 */ cmpwi r3, 0
/* 800F04DC 000ED41C 41 82 FF F8 */ beq .L_800F04D4
/* 800F04E0 000ED420 3B A0 00 00 */ li r29, 0
.L_800F04E4:
/* 800F04E4 000ED424 4B FF E7 55 */ bl OSDisableInterrupts
/* 800F04E8 000ED428 83 6D 8F A8 */ lwz r27, ResetFunctionQueue@sda21(r13)
/* 800F04EC 000ED42C 3B 40 00 00 */ li r26, 0
/* 800F04F0 000ED430 48 00 00 04 */ b .L_800F04F4
.L_800F04F4:
/* 800F04F4 000ED434 48 00 00 04 */ b .L_800F04F8
.L_800F04F8:
/* 800F04F8 000ED438 48 00 00 24 */ b .L_800F051C
.L_800F04FC:
/* 800F04FC 000ED43C 38 60 00 01 */ li r3, 1
/* 800F0500 000ED440 81 9B 00 00 */ lwz r12, 0(r27)
/* 800F0504 000ED444 7D 88 03 A6 */ mtlr r12
/* 800F0508 000ED448 4E 80 00 21 */ blrl
/* 800F050C 000ED44C 7C 60 00 34 */ cntlzw r0, r3
/* 800F0510 000ED450 83 7B 00 08 */ lwz r27, 8(r27)
/* 800F0514 000ED454 54 00 D9 7E */ srwi r0, r0, 5
/* 800F0518 000ED458 7F 5A 03 78 */ or r26, r26, r0
.L_800F051C:
/* 800F051C 000ED45C 28 1B 00 00 */ cmplwi r27, 0
/* 800F0520 000ED460 41 82 00 0C */ beq .L_800F052C
/* 800F0524 000ED464 2C 1A 00 00 */ cmpwi r26, 0
/* 800F0528 000ED468 41 82 FF D4 */ beq .L_800F04FC
.L_800F052C:
/* 800F052C 000ED46C 48 00 0C 41 */ bl __OSSyncSram
/* 800F0530 000ED470 4B FF C4 29 */ bl LCDisable
/* 800F0534 000ED474 2C 1C 00 01 */ cmpwi r28, 1
/* 800F0538 000ED478 40 82 00 28 */ bne .L_800F0560
/* 800F053C 000ED47C 4B FF E6 FD */ bl OSDisableInterrupts
/* 800F0540 000ED480 3C 60 CC 00 */ lis r3, 0xCC002000@ha
/* 800F0544 000ED484 38 63 20 00 */ addi r3, r3, 0xCC002000@l
/* 800F0548 000ED488 38 00 00 00 */ li r0, 0
/* 800F054C 000ED48C B0 03 00 02 */ sth r0, 2(r3)
/* 800F0550 000ED490 4B FF C2 E1 */ bl ICFlashInvalidate
/* 800F0554 000ED494 57 A3 18 38 */ slwi r3, r29, 3
/* 800F0558 000ED498 4B FF FD D1 */ bl Reset
/* 800F055C 000ED49C 48 00 00 7C */ b .L_800F05D8
.L_800F0560:
/* 800F0560 000ED4A0 2C 1C 00 00 */ cmpwi r28, 0
/* 800F0564 000ED4A4 40 82 00 74 */ bne .L_800F05D8
/* 800F0568 000ED4A8 80 0D 8F B0 */ lwz r0, bootThisDol@sda21(r13)
/* 800F056C 000ED4AC 3C 60 80 00 */ lis r3, 0x800030EC@ha
/* 800F0570 000ED4B0 28 00 00 00 */ cmplwi r0, 0
/* 800F0574 000ED4B4 90 03 30 EC */ stw r0, 0x800030EC@l(r3)
/* 800F0578 000ED4B8 41 82 00 0C */ beq .L_800F0584
/* 800F057C 000ED4BC 7F E3 FB 78 */ mr r3, r31
/* 800F0580 000ED4C0 48 00 49 01 */ bl __PADDisableRecalibration
.L_800F0584:
/* 800F0584 000ED4C4 3C 60 80 00 */ lis r3, 0x800000DC@ha
/* 800F0588 000ED4C8 80 63 00 DC */ lwz r3, 0x800000DC@l(r3)
/* 800F058C 000ED4CC 48 00 00 04 */ b .L_800F0590
.L_800F0590:
/* 800F0590 000ED4D0 48 00 00 04 */ b .L_800F0594
.L_800F0594:
/* 800F0594 000ED4D4 48 00 00 2C */ b .L_800F05C0
.L_800F0598:
/* 800F0598 000ED4D8 A0 03 02 C8 */ lhz r0, 0x2c8(r3)
/* 800F059C 000ED4DC 83 43 02 FC */ lwz r26, 0x2fc(r3)
/* 800F05A0 000ED4E0 2C 00 00 04 */ cmpwi r0, 4
/* 800F05A4 000ED4E4 41 82 00 14 */ beq .L_800F05B8
/* 800F05A8 000ED4E8 40 80 00 14 */ bge .L_800F05BC
/* 800F05AC 000ED4EC 2C 00 00 01 */ cmpwi r0, 1
/* 800F05B0 000ED4F0 41 82 00 08 */ beq .L_800F05B8
/* 800F05B4 000ED4F4 48 00 00 08 */ b .L_800F05BC
.L_800F05B8:
/* 800F05B8 000ED4F8 48 00 1C E1 */ bl OSCancelThread
.L_800F05BC:
/* 800F05BC 000ED4FC 7F 43 D3 78 */ mr r3, r26
.L_800F05C0:
/* 800F05C0 000ED500 28 03 00 00 */ cmplwi r3, 0
/* 800F05C4 000ED504 40 82 FF D4 */ bne .L_800F0598
/* 800F05C8 000ED508 48 00 14 7D */ bl OSEnableScheduler
/* 800F05CC 000ED50C 7F A3 EB 78 */ mr r3, r29
/* 800F05D0 000ED510 7F C4 F3 78 */ mr r4, r30
/* 800F05D4 000ED514 4B FF F9 95 */ bl __OSReboot
.L_800F05D8:
/* 800F05D8 000ED518 3C 60 80 00 */ lis r3, 0x800000DC@ha
/* 800F05DC 000ED51C 80 63 00 DC */ lwz r3, 0x800000DC@l(r3)
/* 800F05E0 000ED520 48 00 00 04 */ b .L_800F05E4
.L_800F05E4:
/* 800F05E4 000ED524 48 00 00 04 */ b .L_800F05E8
.L_800F05E8:
/* 800F05E8 000ED528 48 00 00 2C */ b .L_800F0614
.L_800F05EC:
/* 800F05EC 000ED52C A0 03 02 C8 */ lhz r0, 0x2c8(r3)
/* 800F05F0 000ED530 83 43 02 FC */ lwz r26, 0x2fc(r3)
/* 800F05F4 000ED534 2C 00 00 04 */ cmpwi r0, 4
/* 800F05F8 000ED538 41 82 00 14 */ beq .L_800F060C
/* 800F05FC 000ED53C 40 80 00 14 */ bge .L_800F0610
/* 800F0600 000ED540 2C 00 00 01 */ cmpwi r0, 1
/* 800F0604 000ED544 41 82 00 08 */ beq .L_800F060C
/* 800F0608 000ED548 48 00 00 08 */ b .L_800F0610
.L_800F060C:
/* 800F060C 000ED54C 48 00 1C 8D */ bl OSCancelThread
.L_800F0610:
/* 800F0610 000ED550 7F 43 D3 78 */ mr r3, r26
.L_800F0614:
/* 800F0614 000ED554 28 03 00 00 */ cmplwi r3, 0
/* 800F0618 000ED558 40 82 FF D4 */ bne .L_800F05EC
/* 800F061C 000ED55C 3F 80 80 00 */ lis r28, 0x80000040@ha
/* 800F0620 000ED560 38 7C 00 40 */ addi r3, r28, 0x80000040@l
/* 800F0624 000ED564 38 80 00 00 */ li r4, 0
/* 800F0628 000ED568 38 A0 00 8C */ li r5, 0x8c
/* 800F062C 000ED56C 4B F1 4A 89 */ bl memset
/* 800F0630 000ED570 38 7C 00 D4 */ addi r3, r28, 0xd4
/* 800F0634 000ED574 38 80 00 00 */ li r4, 0
/* 800F0638 000ED578 38 A0 00 14 */ li r5, 0x14
/* 800F063C 000ED57C 4B F1 4A 79 */ bl memset
/* 800F0640 000ED580 38 7C 00 F4 */ addi r3, r28, 0xf4
/* 800F0644 000ED584 38 80 00 00 */ li r4, 0
/* 800F0648 000ED588 38 A0 00 04 */ li r5, 4
/* 800F064C 000ED58C 4B F1 4A 69 */ bl memset
/* 800F0650 000ED590 38 7C 30 00 */ addi r3, r28, 0x3000
/* 800F0654 000ED594 38 80 00 00 */ li r4, 0
/* 800F0658 000ED598 38 A0 00 C0 */ li r5, 0xc0
/* 800F065C 000ED59C 4B F1 4A 59 */ bl memset
/* 800F0660 000ED5A0 38 7C 30 C8 */ addi r3, r28, 0x30c8
/* 800F0664 000ED5A4 38 80 00 00 */ li r4, 0
/* 800F0668 000ED5A8 38 A0 00 0C */ li r5, 0xc
/* 800F066C 000ED5AC 4B F1 4A 49 */ bl memset
/* 800F0670 000ED5B0 38 7C 30 E2 */ addi r3, r28, 0x30e2
/* 800F0674 000ED5B4 38 80 00 00 */ li r4, 0
/* 800F0678 000ED5B8 38 A0 00 01 */ li r5, 1
/* 800F067C 000ED5BC 4B F1 4A 39 */ bl memset
/* 800F0680 000ED5C0 7F E3 FB 78 */ mr r3, r31
/* 800F0684 000ED5C4 48 00 47 FD */ bl __PADDisableRecalibration
/* 800F0688 000ED5C8 BB 41 00 28 */ lmw r26, 0x28(r1)
/* 800F068C 000ED5CC 80 01 00 44 */ lwz r0, 0x44(r1)
/* 800F0690 000ED5D0 38 21 00 40 */ addi r1, r1, 0x40
/* 800F0694 000ED5D4 7C 08 03 A6 */ mtlr r0
/* 800F0698 000ED5D8 4E 80 00 20 */ blr
.endfn OSResetSystem
.fn OSGetResetCode, global
/* 800F069C 000ED5DC 3C 60 80 00 */ lis r3, 0x800030E2@ha
/* 800F06A0 000ED5E0 88 03 30 E2 */ lbz r0, 0x800030E2@l(r3)
/* 800F06A4 000ED5E4 28 00 00 00 */ cmplwi r0, 0
/* 800F06A8 000ED5E8 41 82 00 10 */ beq .L_800F06B8
/* 800F06AC 000ED5EC 80 03 30 F0 */ lwz r0, 0x30f0(r3)
/* 800F06B0 000ED5F0 64 03 80 00 */ oris r3, r0, 0x8000
/* 800F06B4 000ED5F4 48 00 00 18 */ b .L_800F06CC
.L_800F06B8:
/* 800F06B8 000ED5F8 3C 60 CC 00 */ lis r3, 0xCC003000@ha
/* 800F06BC 000ED5FC 38 63 30 00 */ addi r3, r3, 0xCC003000@l
/* 800F06C0 000ED600 80 03 00 24 */ lwz r0, 0x24(r3)
/* 800F06C4 000ED604 54 00 00 38 */ rlwinm r0, r0, 0, 0, 0x1c
/* 800F06C8 000ED608 54 03 E8 FE */ srwi r3, r0, 3
.L_800F06CC:
/* 800F06CC 000ED60C 4E 80 00 20 */ blr
.endfn OSGetResetCode

View File

@ -1,327 +0,0 @@
.include "macros.inc"
.section .data, "wa" # 0x8049E220 - 0x804EFC20
.balign 8
.obj YearDays, local
.4byte 0x00000000
.4byte 0x0000001F
.4byte 0x0000003B
.4byte 0x0000005A
.4byte 0x00000078
.4byte 0x00000097
.4byte 0x000000B5
.4byte 0x000000D4
.4byte 0x000000F3
.4byte 0x00000111
.4byte 0x00000130
.4byte 0x0000014E
.endobj YearDays
.balign 4
.obj LeapYearDays, local
.4byte 0x00000000
.4byte 0x0000001F
.4byte 0x0000003C
.4byte 0x0000005B
.4byte 0x00000079
.4byte 0x00000098
.4byte 0x000000B6
.4byte 0x000000D5
.4byte 0x000000F4
.4byte 0x00000112
.4byte 0x00000131
.4byte 0x0000014F
.endobj LeapYearDays
.section .text, "ax" # 0x800056C0 - 0x80472F00
.fn OSGetTime, global
/* 800F2B90 000EFAD0 7C 6D 42 E6 */ mftbu r3
/* 800F2B94 000EFAD4 7C 8C 42 E6 */ mftb r4, 0x10c
/* 800F2B98 000EFAD8 7C AD 42 E6 */ mftbu r5
/* 800F2B9C 000EFADC 7C 03 28 00 */ cmpw r3, r5
/* 800F2BA0 000EFAE0 40 82 FF F0 */ bne OSGetTime
/* 800F2BA4 000EFAE4 4E 80 00 20 */ blr
.endfn OSGetTime
.fn OSGetTick, global
/* 800F2BA8 000EFAE8 7C 6C 42 E6 */ mftb r3, 0x10c
/* 800F2BAC 000EFAEC 4E 80 00 20 */ blr
.endfn OSGetTick
.fn __OSGetSystemTime, global
/* 800F2BB0 000EFAF0 7C 08 02 A6 */ mflr r0
/* 800F2BB4 000EFAF4 90 01 00 04 */ stw r0, 4(r1)
/* 800F2BB8 000EFAF8 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 800F2BBC 000EFAFC 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 800F2BC0 000EFB00 93 C1 00 18 */ stw r30, 0x18(r1)
/* 800F2BC4 000EFB04 93 A1 00 14 */ stw r29, 0x14(r1)
/* 800F2BC8 000EFB08 4B FF C0 71 */ bl OSDisableInterrupts
/* 800F2BCC 000EFB0C 7C 7F 1B 78 */ mr r31, r3
/* 800F2BD0 000EFB10 4B FF FF C1 */ bl OSGetTime
/* 800F2BD4 000EFB14 3C C0 80 00 */ lis r6, 0x800030DC@ha
/* 800F2BD8 000EFB18 80 A6 30 DC */ lwz r5, 0x800030DC@l(r6)
/* 800F2BDC 000EFB1C 80 06 30 D8 */ lwz r0, 0x30d8(r6)
/* 800F2BE0 000EFB20 7F A5 20 14 */ addc r29, r5, r4
/* 800F2BE4 000EFB24 7F C0 19 14 */ adde r30, r0, r3
/* 800F2BE8 000EFB28 7F E3 FB 78 */ mr r3, r31
/* 800F2BEC 000EFB2C 4B FF C0 75 */ bl OSRestoreInterrupts
/* 800F2BF0 000EFB30 7F A4 EB 78 */ mr r4, r29
/* 800F2BF4 000EFB34 7F C3 F3 78 */ mr r3, r30
/* 800F2BF8 000EFB38 80 01 00 24 */ lwz r0, 0x24(r1)
/* 800F2BFC 000EFB3C 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 800F2C00 000EFB40 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 800F2C04 000EFB44 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 800F2C08 000EFB48 38 21 00 20 */ addi r1, r1, 0x20
/* 800F2C0C 000EFB4C 7C 08 03 A6 */ mtlr r0
/* 800F2C10 000EFB50 4E 80 00 20 */ blr
.endfn __OSGetSystemTime
.fn GetDates, local
/* 800F2C14 000EFB54 3C A0 92 49 */ lis r5, 0x92492493@ha
/* 800F2C18 000EFB58 38 05 24 93 */ addi r0, r5, 0x92492493@l
/* 800F2C1C 000EFB5C 38 E3 00 06 */ addi r7, r3, 6
/* 800F2C20 000EFB60 7C C0 38 96 */ mulhw r6, r0, r7
/* 800F2C24 000EFB64 3C A0 B3 8D */ lis r5, 0xB38CF9B1@ha
/* 800F2C28 000EFB68 38 05 F9 B1 */ addi r0, r5, 0xB38CF9B1@l
/* 800F2C2C 000EFB6C 7C 00 18 96 */ mulhw r0, r0, r3
/* 800F2C30 000EFB70 7C A6 3A 14 */ add r5, r6, r7
/* 800F2C34 000EFB74 7C A5 16 70 */ srawi r5, r5, 2
/* 800F2C38 000EFB78 54 A6 0F FE */ srwi r6, r5, 0x1f
/* 800F2C3C 000EFB7C 7C A5 32 14 */ add r5, r5, r6
/* 800F2C40 000EFB80 7C 00 1A 14 */ add r0, r0, r3
/* 800F2C44 000EFB84 1C C5 00 07 */ mulli r6, r5, 7
/* 800F2C48 000EFB88 7C 00 46 70 */ srawi r0, r0, 8
/* 800F2C4C 000EFB8C 54 05 0F FE */ srwi r5, r0, 0x1f
/* 800F2C50 000EFB90 7C A0 2A 14 */ add r5, r0, r5
/* 800F2C54 000EFB94 7C 06 38 50 */ subf r0, r6, r7
/* 800F2C58 000EFB98 1D 65 01 6D */ mulli r11, r5, 0x16d
/* 800F2C5C 000EFB9C 90 04 00 18 */ stw r0, 0x18(r4)
/* 800F2C60 000EFBA0 48 00 00 04 */ b .L_800F2C64
.L_800F2C64:
/* 800F2C64 000EFBA4 3C C0 51 EC */ lis r6, 0x51EB851F@ha
/* 800F2C68 000EFBA8 39 46 85 1F */ addi r10, r6, 0x51EB851F@l
/* 800F2C6C 000EFBAC 48 00 00 04 */ b .L_800F2C70
.L_800F2C70:
/* 800F2C70 000EFBB0 48 00 00 0C */ b .L_800F2C7C
.L_800F2C74:
/* 800F2C74 000EFBB4 39 6B FE 93 */ addi r11, r11, -365
/* 800F2C78 000EFBB8 38 A5 FF FF */ addi r5, r5, -1
.L_800F2C7C:
/* 800F2C7C 000EFBBC 2C 05 00 01 */ cmpwi r5, 1
/* 800F2C80 000EFBC0 40 80 00 0C */ bge .L_800F2C8C
/* 800F2C84 000EFBC4 38 00 00 00 */ li r0, 0
/* 800F2C88 000EFBC8 48 00 00 38 */ b .L_800F2CC0
.L_800F2C8C:
/* 800F2C8C 000EFBCC 38 05 FF FF */ addi r0, r5, -1
/* 800F2C90 000EFBD0 7C 0A 00 96 */ mulhw r0, r10, r0
/* 800F2C94 000EFBD4 7C 08 3E 70 */ srawi r8, r0, 7
/* 800F2C98 000EFBD8 7C 06 2E 70 */ srawi r6, r0, 5
/* 800F2C9C 000EFBDC 38 05 00 03 */ addi r0, r5, 3
/* 800F2CA0 000EFBE0 54 C7 0F FE */ srwi r7, r6, 0x1f
/* 800F2CA4 000EFBE4 7C 00 16 70 */ srawi r0, r0, 2
/* 800F2CA8 000EFBE8 55 09 0F FE */ srwi r9, r8, 0x1f
/* 800F2CAC 000EFBEC 7C C6 3A 14 */ add r6, r6, r7
/* 800F2CB0 000EFBF0 7C 00 01 94 */ addze r0, r0
/* 800F2CB4 000EFBF4 7C E8 4A 14 */ add r7, r8, r9
/* 800F2CB8 000EFBF8 7C 06 00 50 */ subf r0, r6, r0
/* 800F2CBC 000EFBFC 7C 07 02 14 */ add r0, r7, r0
.L_800F2CC0:
/* 800F2CC0 000EFC00 7C 0B 02 14 */ add r0, r11, r0
/* 800F2CC4 000EFC04 7C 03 00 00 */ cmpw r3, r0
/* 800F2CC8 000EFC08 41 80 FF AC */ blt .L_800F2C74
/* 800F2CCC 000EFC0C 7C A6 16 70 */ srawi r6, r5, 2
/* 800F2CD0 000EFC10 90 A4 00 14 */ stw r5, 0x14(r4)
/* 800F2CD4 000EFC14 7C C6 01 94 */ addze r6, r6
/* 800F2CD8 000EFC18 54 C6 10 3A */ slwi r6, r6, 2
/* 800F2CDC 000EFC1C 7C C6 28 10 */ subfc r6, r6, r5
/* 800F2CE0 000EFC20 7C 00 18 50 */ subf r0, r0, r3
/* 800F2CE4 000EFC24 2C 06 00 00 */ cmpwi r6, 0
/* 800F2CE8 000EFC28 90 04 00 1C */ stw r0, 0x1c(r4)
/* 800F2CEC 000EFC2C 38 E0 00 01 */ li r7, 1
/* 800F2CF0 000EFC30 39 00 00 00 */ li r8, 0
/* 800F2CF4 000EFC34 40 82 00 30 */ bne .L_800F2D24
/* 800F2CF8 000EFC38 3C 60 51 EC */ lis r3, 0x51EB851F@ha
/* 800F2CFC 000EFC3C 38 63 85 1F */ addi r3, r3, 0x51EB851F@l
/* 800F2D00 000EFC40 7C 63 28 96 */ mulhw r3, r3, r5
/* 800F2D04 000EFC44 7C 63 2E 70 */ srawi r3, r3, 5
/* 800F2D08 000EFC48 54 66 0F FE */ srwi r6, r3, 0x1f
/* 800F2D0C 000EFC4C 7C 63 32 14 */ add r3, r3, r6
/* 800F2D10 000EFC50 1C 63 00 64 */ mulli r3, r3, 0x64
/* 800F2D14 000EFC54 7C 63 28 50 */ subf r3, r3, r5
/* 800F2D18 000EFC58 2C 03 00 00 */ cmpwi r3, 0
/* 800F2D1C 000EFC5C 41 82 00 08 */ beq .L_800F2D24
/* 800F2D20 000EFC60 7C E8 3B 78 */ mr r8, r7
.L_800F2D24:
/* 800F2D24 000EFC64 2C 08 00 00 */ cmpwi r8, 0
/* 800F2D28 000EFC68 40 82 00 30 */ bne .L_800F2D58
/* 800F2D2C 000EFC6C 3C 60 51 EC */ lis r3, 0x51EB851F@ha
/* 800F2D30 000EFC70 38 63 85 1F */ addi r3, r3, 0x51EB851F@l
/* 800F2D34 000EFC74 7C 63 28 96 */ mulhw r3, r3, r5
/* 800F2D38 000EFC78 7C 63 3E 70 */ srawi r3, r3, 7
/* 800F2D3C 000EFC7C 54 66 0F FE */ srwi r6, r3, 0x1f
/* 800F2D40 000EFC80 7C 63 32 14 */ add r3, r3, r6
/* 800F2D44 000EFC84 1C 63 01 90 */ mulli r3, r3, 0x190
/* 800F2D48 000EFC88 7C 63 28 50 */ subf r3, r3, r5
/* 800F2D4C 000EFC8C 2C 03 00 00 */ cmpwi r3, 0
/* 800F2D50 000EFC90 41 82 00 08 */ beq .L_800F2D58
/* 800F2D54 000EFC94 38 E0 00 00 */ li r7, 0
.L_800F2D58:
/* 800F2D58 000EFC98 2C 07 00 00 */ cmpwi r7, 0
/* 800F2D5C 000EFC9C 41 82 00 10 */ beq .L_800F2D6C
/* 800F2D60 000EFCA0 3C 60 80 4B */ lis r3, LeapYearDays@ha
/* 800F2D64 000EFCA4 38 C3 9E 30 */ addi r6, r3, LeapYearDays@l
/* 800F2D68 000EFCA8 48 00 00 0C */ b .L_800F2D74
.L_800F2D6C:
/* 800F2D6C 000EFCAC 3C 60 80 4B */ lis r3, YearDays@ha
/* 800F2D70 000EFCB0 38 C3 9E 00 */ addi r6, r3, YearDays@l
.L_800F2D74:
/* 800F2D74 000EFCB4 38 E0 00 0C */ li r7, 0xc
/* 800F2D78 000EFCB8 38 60 00 30 */ li r3, 0x30
/* 800F2D7C 000EFCBC 48 00 00 04 */ b .L_800F2D80
.L_800F2D80:
/* 800F2D80 000EFCC0 48 00 00 04 */ b .L_800F2D84
.L_800F2D84:
/* 800F2D84 000EFCC4 38 63 FF FC */ addi r3, r3, -4
/* 800F2D88 000EFCC8 7C A6 18 2E */ lwzx r5, r6, r3
/* 800F2D8C 000EFCCC 38 E7 FF FF */ addi r7, r7, -1
/* 800F2D90 000EFCD0 7C 00 28 00 */ cmpw r0, r5
/* 800F2D94 000EFCD4 41 80 FF F0 */ blt .L_800F2D84
/* 800F2D98 000EFCD8 90 E4 00 10 */ stw r7, 0x10(r4)
/* 800F2D9C 000EFCDC 7C 66 18 2E */ lwzx r3, r6, r3
/* 800F2DA0 000EFCE0 7C 63 00 50 */ subf r3, r3, r0
/* 800F2DA4 000EFCE4 38 03 00 01 */ addi r0, r3, 1
/* 800F2DA8 000EFCE8 90 04 00 0C */ stw r0, 0xc(r4)
/* 800F2DAC 000EFCEC 4E 80 00 20 */ blr
.endfn GetDates
.fn OSTicksToCalendarTime, global
/* 800F2DB0 000EFCF0 7C 08 02 A6 */ mflr r0
/* 800F2DB4 000EFCF4 90 01 00 04 */ stw r0, 4(r1)
/* 800F2DB8 000EFCF8 94 21 FF C8 */ stwu r1, -0x38(r1)
/* 800F2DBC 000EFCFC BF 21 00 1C */ stmw r25, 0x1c(r1)
/* 800F2DC0 000EFD00 7C 7D 1B 78 */ mr r29, r3
/* 800F2DC4 000EFD04 7C 9E 23 78 */ mr r30, r4
/* 800F2DC8 000EFD08 7C BF 2B 78 */ mr r31, r5
/* 800F2DCC 000EFD0C 3F 60 80 00 */ lis r27, 0x800000F8@ha
/* 800F2DD0 000EFD10 80 1B 00 F8 */ lwz r0, 0x800000F8@l(r27)
/* 800F2DD4 000EFD14 7F A3 EB 78 */ mr r3, r29
/* 800F2DD8 000EFD18 7F C4 F3 78 */ mr r4, r30
/* 800F2DDC 000EFD1C 54 06 F0 BE */ srwi r6, r0, 2
/* 800F2DE0 000EFD20 38 A0 00 00 */ li r5, 0
/* 800F2DE4 000EFD24 4B FC F1 FD */ bl __mod2i
/* 800F2DE8 000EFD28 7C 7A 1B 78 */ mr r26, r3
/* 800F2DEC 000EFD2C 38 A0 00 00 */ li r5, 0
/* 800F2DF0 000EFD30 7C 99 23 78 */ mr r25, r4
/* 800F2DF4 000EFD34 6F 44 80 00 */ xoris r4, r26, 0x8000
/* 800F2DF8 000EFD38 6C A3 80 00 */ xoris r3, r5, 0x8000
/* 800F2DFC 000EFD3C 7C 05 C8 10 */ subfc r0, r5, r25
/* 800F2E00 000EFD40 7C 63 21 10 */ subfe r3, r3, r4
/* 800F2E04 000EFD44 7C 64 21 10 */ subfe r3, r4, r4
/* 800F2E08 000EFD48 7C 63 00 D0 */ neg r3, r3
/* 800F2E0C 000EFD4C 2C 03 00 00 */ cmpwi r3, 0
/* 800F2E10 000EFD50 41 82 00 14 */ beq .L_800F2E24
/* 800F2E14 000EFD54 80 1B 00 F8 */ lwz r0, 0xf8(r27)
/* 800F2E18 000EFD58 54 00 F0 BE */ srwi r0, r0, 2
/* 800F2E1C 000EFD5C 7F 39 00 14 */ addc r25, r25, r0
/* 800F2E20 000EFD60 7F 5A 29 14 */ adde r26, r26, r5
.L_800F2E24:
/* 800F2E24 000EFD64 38 80 00 08 */ li r4, 8
/* 800F2E28 000EFD68 7C 7A 21 D6 */ mullw r3, r26, r4
/* 800F2E2C 000EFD6C 7C 19 20 16 */ mulhwu r0, r25, r4
/* 800F2E30 000EFD70 3F 60 80 00 */ lis r27, 0x800000F8@ha
/* 800F2E34 000EFD74 80 DB 00 F8 */ lwz r6, 0x800000F8@l(r27)
/* 800F2E38 000EFD78 3C A0 43 1C */ lis r5, 0x431BDE83@ha
/* 800F2E3C 000EFD7C 38 A5 DE 83 */ addi r5, r5, 0x431BDE83@l
/* 800F2E40 000EFD80 54 C6 F0 BE */ srwi r6, r6, 2
/* 800F2E44 000EFD84 7C A5 30 16 */ mulhwu r5, r5, r6
/* 800F2E48 000EFD88 54 A6 8B FE */ srwi r6, r5, 0xf
/* 800F2E4C 000EFD8C 3B 80 00 00 */ li r28, 0
/* 800F2E50 000EFD90 7C 63 02 14 */ add r3, r3, r0
/* 800F2E54 000EFD94 7C 19 E1 D6 */ mullw r0, r25, r28
/* 800F2E58 000EFD98 7C 99 21 D6 */ mullw r4, r25, r4
/* 800F2E5C 000EFD9C 7C 63 02 14 */ add r3, r3, r0
/* 800F2E60 000EFDA0 38 A0 00 00 */ li r5, 0
/* 800F2E64 000EFDA4 4B FC EF 61 */ bl __div2i
/* 800F2E68 000EFDA8 38 A0 00 00 */ li r5, 0
/* 800F2E6C 000EFDAC 38 C0 03 E8 */ li r6, 0x3e8
/* 800F2E70 000EFDB0 4B FC F1 71 */ bl __mod2i
/* 800F2E74 000EFDB4 90 9F 00 24 */ stw r4, 0x24(r31)
/* 800F2E78 000EFDB8 3C 60 10 62 */ lis r3, 0x10624DD3@ha
/* 800F2E7C 000EFDBC 38 A3 4D D3 */ addi r5, r3, 0x10624DD3@l
/* 800F2E80 000EFDC0 80 1B 00 F8 */ lwz r0, 0xf8(r27)
/* 800F2E84 000EFDC4 7F 43 D3 78 */ mr r3, r26
/* 800F2E88 000EFDC8 7F 24 CB 78 */ mr r4, r25
/* 800F2E8C 000EFDCC 54 00 F0 BE */ srwi r0, r0, 2
/* 800F2E90 000EFDD0 7C 05 00 16 */ mulhwu r0, r5, r0
/* 800F2E94 000EFDD4 54 06 D1 BE */ srwi r6, r0, 6
/* 800F2E98 000EFDD8 38 A0 00 00 */ li r5, 0
/* 800F2E9C 000EFDDC 4B FC EF 29 */ bl __div2i
/* 800F2EA0 000EFDE0 38 A0 00 00 */ li r5, 0
/* 800F2EA4 000EFDE4 38 C0 03 E8 */ li r6, 0x3e8
/* 800F2EA8 000EFDE8 4B FC F1 39 */ bl __mod2i
/* 800F2EAC 000EFDEC 90 9F 00 20 */ stw r4, 0x20(r31)
/* 800F2EB0 000EFDF0 7F D9 F0 10 */ subfc r30, r25, r30
/* 800F2EB4 000EFDF4 7F BA E9 10 */ subfe r29, r26, r29
/* 800F2EB8 000EFDF8 80 1B 00 F8 */ lwz r0, 0xf8(r27)
/* 800F2EBC 000EFDFC 3C A0 00 01 */ lis r5, 0x00015180@ha
/* 800F2EC0 000EFE00 3B 25 51 80 */ addi r25, r5, 0x00015180@l
/* 800F2EC4 000EFE04 7F A3 EB 78 */ mr r3, r29
/* 800F2EC8 000EFE08 54 06 F0 BE */ srwi r6, r0, 2
/* 800F2ECC 000EFE0C 7F C4 F3 78 */ mr r4, r30
/* 800F2ED0 000EFE10 38 A0 00 00 */ li r5, 0
/* 800F2ED4 000EFE14 4B FC EE F1 */ bl __div2i
/* 800F2ED8 000EFE18 7F 26 CB 78 */ mr r6, r25
/* 800F2EDC 000EFE1C 38 A0 00 00 */ li r5, 0
/* 800F2EE0 000EFE20 4B FC EE E5 */ bl __div2i
/* 800F2EE4 000EFE24 3C A0 00 0B */ lis r5, 0x000B2575@ha
/* 800F2EE8 000EFE28 80 1B 00 F8 */ lwz r0, 0xf8(r27)
/* 800F2EEC 000EFE2C 38 A5 25 75 */ addi r5, r5, 0x000B2575@l
/* 800F2EF0 000EFE30 7F 44 28 14 */ addc r26, r4, r5
/* 800F2EF4 000EFE34 54 06 F0 BE */ srwi r6, r0, 2
/* 800F2EF8 000EFE38 7C 03 E1 14 */ adde r0, r3, r28
/* 800F2EFC 000EFE3C 7F A3 EB 78 */ mr r3, r29
/* 800F2F00 000EFE40 7F C4 F3 78 */ mr r4, r30
/* 800F2F04 000EFE44 38 A0 00 00 */ li r5, 0
/* 800F2F08 000EFE48 4B FC EE BD */ bl __div2i
/* 800F2F0C 000EFE4C 7F 26 CB 78 */ mr r6, r25
/* 800F2F10 000EFE50 38 A0 00 00 */ li r5, 0
/* 800F2F14 000EFE54 4B FC F0 CD */ bl __mod2i
/* 800F2F18 000EFE58 7C 9B 23 78 */ mr r27, r4
/* 800F2F1C 000EFE5C 2C 1B 00 00 */ cmpwi r27, 0
/* 800F2F20 000EFE60 40 80 00 10 */ bge .L_800F2F30
/* 800F2F24 000EFE64 3F 7B 00 01 */ addis r27, r27, 1
/* 800F2F28 000EFE68 3B 5A FF FF */ addi r26, r26, -1
/* 800F2F2C 000EFE6C 3B 7B 51 80 */ addi r27, r27, 0x5180
.L_800F2F30:
/* 800F2F30 000EFE70 7F 43 D3 78 */ mr r3, r26
/* 800F2F34 000EFE74 7F E4 FB 78 */ mr r4, r31
/* 800F2F38 000EFE78 4B FF FC DD */ bl GetDates
/* 800F2F3C 000EFE7C 3C 60 88 89 */ lis r3, 0x88888889@ha
/* 800F2F40 000EFE80 38 A3 88 89 */ addi r5, r3, 0x88888889@l
/* 800F2F44 000EFE84 7C 05 D8 96 */ mulhw r0, r5, r27
/* 800F2F48 000EFE88 7C 80 DA 14 */ add r4, r0, r27
/* 800F2F4C 000EFE8C 7C 80 2E 70 */ srawi r0, r4, 5
/* 800F2F50 000EFE90 54 03 0F FE */ srwi r3, r0, 0x1f
/* 800F2F54 000EFE94 7C E0 1A 14 */ add r7, r0, r3
/* 800F2F58 000EFE98 7C 05 38 96 */ mulhw r0, r5, r7
/* 800F2F5C 000EFE9C 7C 00 3A 14 */ add r0, r0, r7
/* 800F2F60 000EFEA0 7C 05 2E 70 */ srawi r5, r0, 5
/* 800F2F64 000EFEA4 7C 00 2E 70 */ srawi r0, r0, 5
/* 800F2F68 000EFEA8 54 03 0F FE */ srwi r3, r0, 0x1f
/* 800F2F6C 000EFEAC 7C 60 1A 14 */ add r3, r0, r3
/* 800F2F70 000EFEB0 7C 80 2E 70 */ srawi r0, r4, 5
/* 800F2F74 000EFEB4 54 A6 0F FE */ srwi r6, r5, 0x1f
/* 800F2F78 000EFEB8 1C 83 00 3C */ mulli r4, r3, 0x3c
/* 800F2F7C 000EFEBC 54 03 0F FE */ srwi r3, r0, 0x1f
/* 800F2F80 000EFEC0 7C A5 32 14 */ add r5, r5, r6
/* 800F2F84 000EFEC4 7C 00 1A 14 */ add r0, r0, r3
/* 800F2F88 000EFEC8 90 BF 00 08 */ stw r5, 8(r31)
/* 800F2F8C 000EFECC 1C 00 00 3C */ mulli r0, r0, 0x3c
/* 800F2F90 000EFED0 7C 64 38 50 */ subf r3, r4, r7
/* 800F2F94 000EFED4 90 7F 00 04 */ stw r3, 4(r31)
/* 800F2F98 000EFED8 7C 00 D8 50 */ subf r0, r0, r27
/* 800F2F9C 000EFEDC 90 1F 00 00 */ stw r0, 0(r31)
/* 800F2FA0 000EFEE0 BB 21 00 1C */ lmw r25, 0x1c(r1)
/* 800F2FA4 000EFEE4 80 01 00 3C */ lwz r0, 0x3c(r1)
/* 800F2FA8 000EFEE8 38 21 00 38 */ addi r1, r1, 0x38
/* 800F2FAC 000EFEEC 7C 08 03 A6 */ mtlr r0
/* 800F2FB0 000EFEF0 4E 80 00 20 */ blr
.endfn OSTicksToCalendarTime

View File

@ -731,26 +731,26 @@ LIBS = [
"host": False,
"objects": [
["Dolphin/os/OS", True],
"Dolphin/os/OSAlarm",
["Dolphin/os/OSAlarm", True],
["Dolphin/os/OSAlloc", True],
["Dolphin/os/OSArena", True],
["Dolphin/os/OSAudioSystem", True],
["Dolphin/os/OSCache", True],
["Dolphin/os/OSContext", True],
"Dolphin/os/OSError",
["Dolphin/os/OSError", True],
"Dolphin/os/OSFont",
"Dolphin/os/OSInterrupt",
["Dolphin/os/OSInterrupt", True],
["Dolphin/os/OSLink", True],
["Dolphin/os/OSMessage", True],
["Dolphin/os/OSMemory", True],
["Dolphin/os/OSMutex", True],
"Dolphin/os/OSReboot",
"Dolphin/os/OSReset",
["Dolphin/os/OSReset", True],
["Dolphin/os/OSResetSW", True],
["Dolphin/os/OSRtc", True],
["Dolphin/os/OSSync", True],
["Dolphin/os/OSThread", True],
"Dolphin/os/OSTime",
["Dolphin/os/OSTime", True],
"Dolphin/os/__mem",
["Dolphin/os/__start", True],
["Dolphin/os/__ppc_eabi_init", True],

View File

@ -25,15 +25,14 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/TRK_MINNOW_DOLPHIN/CircleBuffer.c">TRK_MINNOW_DOLPHIN/CircleBuffer.c</a> | 4715 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/TRK_MINNOW_DOLPHIN/serpoll.c">TRK_MINNOW_DOLPHIN/serpoll.c</a> | 4793 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/TRK_MINNOW_DOLPHIN/mpc_7xx_603e.c">TRK_MINNOW_DOLPHIN/mpc_7xx_603e.c</a> | 5554 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/MSL_C/mem_funcs.c">MSL_C/mem_funcs.c</a> | 5682 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/mtx/mtx44.c">mtx/mtx44.c</a> | 5987 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/MSL_C/direct_io.c">MSL_C/direct_io.c</a> | 6259 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/os/OSReboot.c">os/OSReboot.c</a> | 6397 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/os/OSError.c">os/OSError.c</a> | 6937 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXGeometry.c">gx/GXGeometry.c</a> | 6983 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/thp/THPAudio.c">thp/THPAudio.c</a> | 7974 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/os/OSReset.c">os/OSReset.c</a> | 8122 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/os/OSTime.c">os/OSTime.c</a> | 8247 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/TRK_MINNOW_DOLPHIN/dolphin_trk_glue.c">TRK_MINNOW_DOLPHIN/dolphin_trk_glue.c</a> | 10320 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/exi/EXIUart.c">exi/EXIUart.c</a> | 10329 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/TRK_MINNOW_DOLPHIN/dolphin_trk.c">TRK_MINNOW_DOLPHIN/dolphin_trk.c</a> | 11230 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/MSL_C/alloc.c">MSL_C/alloc.c</a> | 12018 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/TRK_MINNOW_DOLPHIN/support.c">TRK_MINNOW_DOLPHIN/support.c</a> | 12046 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXTransform.c">gx/GXTransform.c</a> | 12379 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/os/OSAlarm.c">os/OSAlarm.c</a> | 13933 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXLight.c">gx/GXLight.c</a> | 14151 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/os/OSReboot.c">os/OSReboot.c</a> | 6397 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXGeometry.c">gx/GXGeometry.c</a> | 6983 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/thp/THPAudio.c">thp/THPAudio.c</a> | 7974 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/TRK_MINNOW_DOLPHIN/dolphin_trk_glue.c">TRK_MINNOW_DOLPHIN/dolphin_trk_glue.c</a> | 10320 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/exi/EXIUart.c">exi/EXIUart.c</a> | 10329 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/TRK_MINNOW_DOLPHIN/dolphin_trk.c">TRK_MINNOW_DOLPHIN/dolphin_trk.c</a> | 11230 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/MSL_C/alloc.c">MSL_C/alloc.c</a> | 12018 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/TRK_MINNOW_DOLPHIN/support.c">TRK_MINNOW_DOLPHIN/support.c</a> | 12046 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXTransform.c">gx/GXTransform.c</a> | 12379 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXLight.c">gx/GXLight.c</a> | 14151 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXTev.c">gx/GXTev.c</a> | 14624 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/MSL_C/strtoul.c">MSL_C/strtoul.c</a> | 15615 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXPixel.c">gx/GXPixel.c</a> | 15806 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXPixel.c">gx/GXPixel.c</a> | 15806 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gx/GXPerf.c">gx/GXPerf.c</a> | 17304 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/Dolphin/gd/GDGeometry.c">gd/GDGeometry.c</a> | 18306 |
### <section id="JSystem">JSystem</section>
| File | Size (bytes) | File | Size (bytes) |

View File

@ -11,6 +11,7 @@ extern "C" {
/////////// ALARM TYPES //////////
typedef struct OSAlarm OSAlarm;
typedef struct OSAlarmQueue OSAlarmQueue;
// Generic alarm handler function.
typedef void (*OSAlarmHandler)(OSAlarm* alarm, OSContext* context);
@ -26,6 +27,12 @@ struct OSAlarm {
OSTime start; // _20, start of periodic alarm
};
// Queue struct for OSAlarm.
struct OSAlarmQueue {
OSAlarm* head;
OSAlarm* tail;
};
// Alarm functions.
void OSInitAlarm();
void OSSetAlarm(OSAlarm* alarm, OSTime tick, OSAlarmHandler handler);

View File

@ -25,6 +25,10 @@ extern volatile __OSInterrupt __OSLastInterrupt; // one of the Interrupt Codes b
extern volatile u32 __OSLastInterruptSrr0; // SRR0 value at time of interrupt.
extern volatile OSTime __OSLastInterruptTime; // time of interrupt (from OSGetTime()).
// Interrupt global addresses.
volatile OSInterruptMask __OSPriorInterruptMask AT_ADDRESS((u32)OSPhysicalToCached(0x00C4));
volatile OSInterruptMask __OSCurrentInterruptMask AT_ADDRESS((u32)OSPhysicalToCached(0x00C8));
//////////////////////////////////
////// INTERRUPT FUNCTIONS ///////
@ -36,7 +40,7 @@ __OSInterruptHandler __OSGetInterruptHandler(__OSInterrupt interrupt);
void __OSDispatchInterrupt(__OSException exception, OSContext* context);
BOOL OSEnableInterrupts();
BOOL OSDisableInterrupts();
void OSRestoreInterrupts(BOOL level);
BOOL OSRestoreInterrupts(BOOL level);
// Mask functions.
OSInterruptMask __OSMaskInterrupts(OSInterruptMask mask);

View File

@ -25,6 +25,12 @@ struct OSResetFunctionInfo {
OSResetFunctionInfo* prev; // _0C
};
// Queue struct for ResetFunctionInfos.
typedef struct OSResetQueue {
OSResetFunctionInfo* head;
OSResetFunctionInfo* tail;
} OSResetQueue;
//////////////////////////////////
//////// RESET FUNCTIONS /////////

View File

@ -73,6 +73,12 @@ struct OSThread {
void* specific[2]; // _310
};
// Thread global addresses.
volatile OSContext* __OSCurrentContext AT_ADDRESS((u32)OSPhysicalToCached(0x00D4));
volatile OSContext* __OSFPUContext AT_ADDRESS((u32)OSPhysicalToCached(0x00D8));
OSThreadQueue __OSActiveThreadQueue AT_ADDRESS((u32)OSPhysicalToCached(0x00DC));
OSThread* __OSCurrentThread AT_ADDRESS((u32)OSPhysicalToCached(0x00E4));
//////////////////////////////////
//////// THREAD FUNCTIONS ////////

View File

@ -46,6 +46,31 @@ extern "C" {
#define SRR1_DMA_BIT 0x00200000
#define SRR1_L2DP_BIT 0x00100000
#define FPSCR_FX 0x80000000 // Exception summary
#define FPSCR_FEX 0x40000000 // Enabled exception summary
#define FPSCR_VX 0x20000000 // Invalid operation
#define FPSCR_OX 0x10000000 // Overflow exception
#define FPSCR_UX 0x08000000 // Underflow exception
#define FPSCR_ZX 0x04000000 // Zero divide exception
#define FPSCR_XX 0x02000000 // Inexact exception
#define FPSCR_VXSNAN 0x01000000 // SNaN
#define FPSCR_VXISI 0x00800000 // Infinity - Infinity
#define FPSCR_VXIDI 0x00400000 // Infinity / Infinity
#define FPSCR_VXZDZ 0x00200000 // 0 / 0
#define FPSCR_VXIMZ 0x00100000 // Infinity * 0
#define FPSCR_VXVC 0x00080000 // Invalid compare
#define FPSCR_FR 0x00040000 // Fraction rounded
#define FPSCR_FI 0x00020000 // Fraction inexact
#define FPSCR_VXSOFT 0x00000400 // Software request
#define FPSCR_VXSQRT 0x00000200 // Invalid square root
#define FPSCR_VXCVI 0x00000100 // Invalid integer convert
#define FPSCR_VE 0x00000080 // Invalid operation exception enable
#define FPSCR_OE 0x00000040 // Overflow exception enable
#define FPSCR_UE 0x00000020 // Underflow exception enable
#define FPSCR_ZE 0x00000010 // Zero divide exception enable
#define FPSCR_XE 0x00000008 // Inexact exception enable
#define FPSCR_NI 0x00000004 // Non-IEEE mode
u32 PPCMfmsr();
void PPCMtmsr(u32 newMSR);
// u32 PPCOrMsr(u32 value);

View File

@ -38,6 +38,8 @@ vu32 __PIRegs[12] AT_ADDRESS(0xCC003000);
#define PI_FIFO_END (4) // FIFO base end
#define PI_FIFO_PTR (5) // FIFO current write pointer
#define PI_RESETCODE (9) // reset code, used by OSReset
// PI Interrupt causes.
#define PI_INTRPT_ERR (0x1) // GP runtime error
#define PI_INTRPT_RSW (0x2) // reset switch

View File

@ -88,4 +88,10 @@ typedef u32 unknown;
#define SPRAY_TYPE_SPICY (0)
#define SPRAY_TYPE_BITTER (1)
#ifdef __MWERKS__
#define WEAKFUNC __declspec(weak)
#else
#define WEAKFUNC ;
#endif
#endif

View File

@ -1,40 +1,45 @@
OS_FILES:=\
$(BUILD_DIR)/src/Dolphin/os/OS.o\
$(BUILD_DIR)/asm/Dolphin/os/OSAlarm.o\
$(BUILD_DIR)/src/Dolphin/os/OSAlarm.o\
$(BUILD_DIR)/src/Dolphin/os/OSAlloc.o\
$(BUILD_DIR)/src/Dolphin/os/OSArena.o\
$(BUILD_DIR)/src/Dolphin/os/OSAudioSystem.o\
$(BUILD_DIR)/src/Dolphin/os/OSCache.o\
$(BUILD_DIR)/src/Dolphin/os/OSContext.o\
$(BUILD_DIR)/asm/Dolphin/os/OSError.o\
$(BUILD_DIR)/src/Dolphin/os/OSError.o\
$(BUILD_DIR)/asm/Dolphin/os/OSFont.o\
$(BUILD_DIR)/asm/Dolphin/os/OSInterrupt.o\
$(BUILD_DIR)/src/Dolphin/os/OSInterrupt.o\
$(BUILD_DIR)/src/Dolphin/os/OSLink.o\
$(BUILD_DIR)/src/Dolphin/os/OSMessage.o\
$(BUILD_DIR)/src/Dolphin/os/OSMemory.o\
$(BUILD_DIR)/src/Dolphin/os/OSMutex.o\
$(BUILD_DIR)/asm/Dolphin/os/OSReboot.o\
$(BUILD_DIR)/asm/Dolphin/os/OSReset.o\
$(BUILD_DIR)/src/Dolphin/os/OSReset.o\
$(BUILD_DIR)/src/Dolphin/os/OSResetSW.o\
$(BUILD_DIR)/src/Dolphin/os/OSRtc.o\
$(BUILD_DIR)/src/Dolphin/os/OSSync.o\
$(BUILD_DIR)/src/Dolphin/os/OSThread.o\
$(BUILD_DIR)/asm/Dolphin/os/OSTime.o\
$(BUILD_DIR)/src/Dolphin/os/OSTime.o\
$(BUILD_DIR)/asm/Dolphin/os/__mem.o\
$(BUILD_DIR)/src/Dolphin/os/__start.o\
$(BUILD_DIR)/src/Dolphin/os/__ppc_eabi_init.o\
OS_UNSCHEDULED:=\
$(EPILOGUE_DIR)/src/Dolphin/os/OS.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSAlarm.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSAudioSystem.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSCache.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSContext.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSError.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSInterrupt.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSMessage.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSMemory.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSMutex.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSReset.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSResetSW.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSRtc.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSThread.o\
$(EPILOGUE_DIR)/src/Dolphin/os/OSTime.o\
$(OS_FILES): CFLAGS += -common off -str noreadonly
$(OS_UNSCHEDULED): CFLAGS += -common off -str noreadonly

View File

@ -1,23 +1,32 @@
#include "Dolphin/os.h"
/*
* --INFO--
* Address: ........
* Size: 000140
*/
void OSCheckAlarmQueue(void)
{
// UNUSED FUNCTION
}
// forward declarations
BOOL __DVDTestAlarm(OSAlarm* alarm);
static OSAlarmQueue AlarmQueue;
static void DecrementerExceptionHandler(__OSException exception, OSContext* context);
static BOOL OnReset(BOOL final);
static OSResetFunctionInfo ResetFunctionInfo = { OnReset, 0xFFFFFFFF };
/*
* --INFO--
* Address: ........
* Size: 000098
*/
void SetTimer(void)
static void SetTimer(OSAlarm* alarm)
{
// UNUSED FUNCTION
OSTime delta;
delta = alarm->fire - __OSGetSystemTime();
if (delta < 0) {
PPCMtdec(0);
} else if (delta < 0x80000000) {
PPCMtdec((u32)delta);
} else {
PPCMtdec(0x7fffffff);
}
}
/*
@ -25,35 +34,13 @@ void SetTimer(void)
* Address: 800EBAB4
* Size: 000058
*/
void OSInitAlarm(void)
void OSInitAlarm()
{
/*
.loc_0x0:
mflr r0
li r3, 0x8
stw r0, 0x4(r1)
stwu r1, -0x8(r1)
bl -0x1AC
lis r4, 0x800F
subi r4, r4, 0x3EE0
cmplw r3, r4
beq- .loc_0x48
li r0, 0
subi r3, r13, 0x70B0
stw r0, 0x4(r3)
li r3, 0x8
stw r0, -0x70B0(r13)
bl -0x1F0
lis r3, 0x804B
subi r3, r3, 0x7508
bl 0x47AC
.loc_0x48:
lwz r0, 0xC(r1)
addi r1, r1, 0x8
mtlr r0
blr
*/
if (__OSGetExceptionHandler(8) != DecrementerExceptionHandler) {
AlarmQueue.head = AlarmQueue.tail = nullptr;
__OSSetExceptionHandler(8, DecrementerExceptionHandler);
OSRegisterResetFunction(&ResetFunctionInfo);
}
}
/*
@ -63,13 +50,8 @@ void OSInitAlarm(void)
*/
void OSCreateAlarm(OSAlarm* alarm)
{
/*
.loc_0x0:
li r0, 0
stw r0, 0x0(r3)
stw r0, 0x4(r3)
blr
*/
alarm->handler = nullptr;
alarm->tag = 0;
}
/*
@ -77,181 +59,50 @@ void OSCreateAlarm(OSAlarm* alarm)
* Address: 800EBB1C
* Size: 000250
*/
void InsertAlarm(void)
static void InsertAlarm(OSAlarm* alarm, OSTime fire, OSAlarmHandler handler)
{
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x40(r1)
stmw r25, 0x24(r1)
li r28, 0
mr r29, r3
xoris r4, r28, 0x8000
addi r25, r5, 0
addi r30, r6, 0
addi r31, r7, 0
lwz r0, 0x18(r3)
lwz r8, 0x1C(r3)
xoris r3, r0, 0x8000
subc r0, r28, r8
subfe r3, r3, r4
subfe r3, r4, r4
neg. r3, r3
beq- .loc_0xC0
bl 0x704C
lwz r7, 0x20(r29)
xoris r5, r3, 0x8000
lwz r8, 0x24(r29)
xoris r6, r7, 0x8000
subc r0, r8, r4
subfe r5, r5, r6
subfe r5, r6, r6
neg. r5, r5
addi r30, r8, 0
addi r25, r7, 0
beq- .loc_0xC0
lwz r27, 0x18(r29)
subc r4, r4, r8
lwz r26, 0x1C(r29)
subfe r3, r7, r3
addi r5, r27, 0
addi r6, r26, 0
bl -0x29DE8
li r0, 0x1
addc r5, r4, r0
mullw r4, r27, r5
mulhwu r0, r26, r5
adde r3, r3, r28
add r4, r4, r0
mullw r0, r26, r3
mullw r3, r26, r5
add r0, r4, r0
addc r30, r30, r3
adde r25, r25, r0
OSAlarm* next;
OSAlarm* prev;
.loc_0xC0:
stw r31, 0x0(r29)
xoris r4, r25, 0x8000
stw r30, 0xC(r29)
stw r25, 0x8(r29)
lwz r6, -0x70B0(r13)
b .loc_0x198
if (alarm->period > 0) {
OSTime time = __OSGetSystemTime();
.loc_0xD8:
lwz r0, 0x8(r6)
lwz r5, 0xC(r6)
xoris r3, r0, 0x8000
subc r0, r30, r5
subfe r3, r3, r4
subfe r3, r4, r4
neg. r3, r3
beq- .loc_0x194
lwz r0, 0x10(r6)
stw r0, 0x10(r29)
stw r29, 0x10(r6)
stw r6, 0x14(r29)
lwz r3, 0x10(r29)
cmplwi r3, 0
beq- .loc_0x11C
stw r29, 0x14(r3)
b .loc_0x23C
fire = alarm->start;
if (alarm->start < time) {
fire += alarm->period * ((time - alarm->start) / alarm->period + 1);
}
}
.loc_0x11C:
stw r29, -0x70B0(r13)
bl 0x6F74
lwz r6, 0xC(r29)
li r7, 0
lwz r0, 0x8(r29)
xoris r5, r7, 0x8000
subc r8, r6, r4
subfe r0, r3, r0
xoris r6, r0, 0x8000
subc r0, r8, r7
subfe r5, r5, r6
subfe r5, r6, r6
neg. r5, r5
beq- .loc_0x160
li r3, 0
bl -0x176EC
b .loc_0x23C
alarm->handler = handler;
alarm->fire = fire;
.loc_0x160:
lis r4, 0x8000
xoris r3, r7, 0x8000
subc r0, r8, r4
subfe r3, r3, r6
subfe r3, r6, r6
neg. r3, r3
beq- .loc_0x188
mr r3, r8
bl -0x17714
b .loc_0x23C
for (next = AlarmQueue.head; next; next = next->next) {
if (next->fire <= fire) {
continue;
}
.loc_0x188:
subi r3, r4, 0x1
bl -0x17720
b .loc_0x23C
.loc_0x194:
lwz r6, 0x14(r6)
.loc_0x198:
cmplwi r6, 0
bne+ .loc_0xD8
li r30, 0
stw r30, 0x14(r29)
subi r3, r13, 0x70B0
lwz r4, 0x4(r3)
stwu r29, 0x4(r3)
cmplwi r4, 0
stw r4, 0x10(r29)
beq- .loc_0x1C8
stw r29, 0x14(r4)
b .loc_0x23C
.loc_0x1C8:
stw r29, 0x0(r3)
stw r29, -0x70B0(r13)
bl 0x6EC4
lwz r6, 0xC(r29)
xoris r5, r30, 0x8000
lwz r0, 0x8(r29)
subc r7, r6, r4
subfe r0, r3, r0
xoris r6, r0, 0x8000
subc r0, r7, r30
subfe r5, r5, r6
subfe r5, r6, r6
neg. r5, r5
beq- .loc_0x20C
li r3, 0
bl -0x17798
b .loc_0x23C
.loc_0x20C:
lis r4, 0x8000
xoris r3, r30, 0x8000
subc r0, r7, r4
subfe r3, r3, r6
subfe r3, r6, r6
neg. r3, r3
beq- .loc_0x234
mr r3, r7
bl -0x177C0
b .loc_0x23C
.loc_0x234:
subi r3, r4, 0x1
bl -0x177CC
.loc_0x23C:
lmw r25, 0x24(r1)
lwz r0, 0x44(r1)
addi r1, r1, 0x40
mtlr r0
blr
*/
alarm->prev = next->prev;
next->prev = alarm;
alarm->next = next;
prev = alarm->prev;
if (prev) {
prev->next = alarm;
} else {
AlarmQueue.head = alarm;
SetTimer(alarm);
}
return;
}
alarm->next = nullptr;
prev = AlarmQueue.tail;
AlarmQueue.tail = alarm;
alarm->prev = prev;
if (prev) {
prev->next = alarm;
} else {
AlarmQueue.head = AlarmQueue.tail = alarm;
SetTimer(alarm);
}
}
/*
@ -259,57 +110,13 @@ void InsertAlarm(void)
* Address: 800EBD6C
* Size: 000068
*/
void OSSetAlarm(OSAlarm* alarm, unknown p2, unknown p3, u32 tickRateMaybe, OSAlarmHandler* handler)
void OSSetAlarm(OSAlarm* alarm, OSTime tick, OSAlarmHandler handler)
{
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x38(r1)
stmw r27, 0x24(r1)
addi r27, r3, 0
addi r29, r5, 0
addi r28, r6, 0
addi r30, r7, 0
bl 0x2EAC
li r0, 0
stw r0, 0x1C(r27)
mr r31, r3
stw r0, 0x18(r27)
bl 0x6E10
addc r6, r28, r4
adde r5, r29, r3
addi r3, r27, 0
addi r7, r30, 0
bl -0x298
mr r3, r31
bl 0x2EA4
lmw r27, 0x24(r1)
lwz r0, 0x3C(r1)
addi r1, r1, 0x38
mtlr r0
blr
*/
}
/*
* --INFO--
* Address: ........
* Size: 000070
*/
void OSSetAbsAlarm(void)
{
// UNUSED FUNCTION
}
/*
* --INFO--
* Address: ........
* Size: 00007C
*/
void OSSetPeriodicAlarm(void)
{
// UNUSED FUNCTION
BOOL enabled;
enabled = OSDisableInterrupts();
alarm->period = 0;
InsertAlarm(alarm, __OSGetSystemTime() + tick, handler);
OSRestoreInterrupts(enabled);
}
/*
@ -319,96 +126,33 @@ void OSSetPeriodicAlarm(void)
*/
void OSCancelAlarm(OSAlarm* alarm)
{
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x20(r1)
stw r31, 0x1C(r1)
stw r30, 0x18(r1)
mr r30, r3
stw r29, 0x14(r1)
bl 0x2E48
lwz r0, 0x0(r30)
addi r31, r3, 0
cmplwi r0, 0
bne- .loc_0x3C
mr r3, r31
bl 0x2E58
b .loc_0x100
OSAlarm* next;
BOOL enabled;
.loc_0x3C:
lwz r29, 0x14(r30)
cmplwi r29, 0
bne- .loc_0x58
lwz r0, 0x10(r30)
subi r3, r13, 0x70B0
stw r0, 0x4(r3)
b .loc_0x60
enabled = OSDisableInterrupts();
.loc_0x58:
lwz r0, 0x10(r30)
stw r0, 0x10(r29)
if (alarm->handler == nullptr) {
OSRestoreInterrupts(enabled);
return;
}
.loc_0x60:
lwz r3, 0x10(r30)
cmplwi r3, 0
beq- .loc_0x74
stw r29, 0x14(r3)
b .loc_0xF0
next = alarm->next;
if (next == nullptr) {
AlarmQueue.tail = alarm->prev;
} else {
next->prev = alarm->prev;
}
if (alarm->prev) {
alarm->prev->next = next;
} else {
AlarmQueue.head = next;
if (next) {
SetTimer(next);
}
}
alarm->handler = nullptr;
.loc_0x74:
cmplwi r29, 0
stw r29, -0x70B0(r13)
beq- .loc_0xF0
bl 0x6D5C
lwz r6, 0xC(r29)
li r7, 0
lwz r0, 0x8(r29)
xoris r5, r7, 0x8000
subc r8, r6, r4
subfe r0, r3, r0
xoris r6, r0, 0x8000
subc r0, r8, r7
subfe r5, r5, r6
subfe r5, r6, r6
neg. r5, r5
beq- .loc_0xC0
li r3, 0
bl -0x17904
b .loc_0xF0
.loc_0xC0:
lis r4, 0x8000
xoris r3, r7, 0x8000
subc r0, r8, r4
subfe r3, r3, r6
subfe r3, r6, r6
neg. r3, r3
beq- .loc_0xE8
mr r3, r8
bl -0x1792C
b .loc_0xF0
.loc_0xE8:
subi r3, r4, 0x1
bl -0x17938
.loc_0xF0:
li r0, 0
stw r0, 0x0(r30)
mr r3, r31
bl 0x2D90
.loc_0x100:
lwz r0, 0x24(r1)
lwz r31, 0x1C(r1)
lwz r30, 0x18(r1)
lwz r29, 0x14(r1)
addi r1, r1, 0x20
mtlr r0
blr
*/
OSRestoreInterrupts(enabled);
}
/*
@ -416,173 +160,51 @@ void OSCancelAlarm(OSAlarm* alarm)
* Address: 800EBEF0
* Size: 000230
*/
void DecrementerExceptionCallback(void)
static void DecrementerExceptionCallback(__OSException exception, OSContext* context)
{
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x2F0(r1)
stw r31, 0x2EC(r1)
stw r30, 0x2E8(r1)
stw r29, 0x2E4(r1)
mr r29, r4
stw r28, 0x2E0(r1)
bl 0x6CA0
lwz r0, -0x70B0(r13)
addi r28, r4, 0
addi r30, r3, 0
cmplwi r0, 0
mr r31, r0
bne- .loc_0x44
mr r3, r29
bl 0x115C
OSAlarm* alarm;
OSAlarm* next;
OSAlarmHandler handler;
OSTime time;
OSContext exceptionContext;
time = __OSGetSystemTime();
alarm = AlarmQueue.head;
if (alarm == nullptr) {
OSLoadContext(context);
}
.loc_0x44:
lwz r0, 0x8(r31)
xoris r4, r30, 0x8000
lwz r5, 0xC(r31)
xoris r3, r0, 0x8000
subc r0, r28, r5
subfe r3, r3, r4
subfe r3, r4, r4
neg. r3, r3
beq- .loc_0xE0
bl 0x6C58
lwz r6, 0xC(r31)
li r7, 0
lwz r0, 0x8(r31)
xoris r5, r7, 0x8000
subc r8, r6, r4
subfe r0, r3, r0
xoris r6, r0, 0x8000
subc r0, r8, r7
subfe r5, r5, r6
subfe r5, r6, r6
neg. r5, r5
beq- .loc_0xA8
li r3, 0
bl -0x17A08
b .loc_0xD8
if (time < alarm->fire) {
SetTimer(alarm);
OSLoadContext(context);
}
.loc_0xA8:
lis r4, 0x8000
xoris r3, r7, 0x8000
subc r0, r8, r4
subfe r3, r3, r6
subfe r3, r6, r6
neg. r3, r3
beq- .loc_0xD0
mr r3, r8
bl -0x17A30
b .loc_0xD8
next = alarm->next;
AlarmQueue.head = next;
if (next == nullptr) {
AlarmQueue.tail = nullptr;
} else {
next->prev = nullptr;
}
.loc_0xD0:
subi r3, r4, 0x1
bl -0x17A3C
handler = alarm->handler;
alarm->handler = nullptr;
if (0 < alarm->period) {
InsertAlarm(alarm, 0, handler);
}
.loc_0xD8:
mr r3, r29
bl 0x10C0
if (AlarmQueue.head) {
SetTimer(AlarmQueue.head);
}
.loc_0xE0:
lwz r3, 0x14(r31)
cmplwi r3, 0
stw r3, -0x70B0(r13)
bne- .loc_0x100
li r0, 0
subi r3, r13, 0x70B0
stw r0, 0x4(r3)
b .loc_0x108
.loc_0x100:
li r0, 0
stw r0, 0x10(r3)
.loc_0x108:
lwz r30, 0x0(r31)
li r6, 0
xoris r4, r6, 0x8000
stw r6, 0x0(r31)
lwz r0, 0x18(r31)
lwz r5, 0x1C(r31)
xoris r3, r0, 0x8000
subc r0, r6, r5
subfe r3, r3, r4
subfe r3, r4, r4
neg. r3, r3
beq- .loc_0x14C
addi r3, r31, 0
addi r7, r30, 0
li r6, 0
li r5, 0
bl -0x51C
.loc_0x14C:
lwz r28, -0x70B0(r13)
cmplwi r28, 0
beq- .loc_0x1C8
bl 0x6B68
lwz r6, 0xC(r28)
li r7, 0
lwz r0, 0x8(r28)
xoris r5, r7, 0x8000
subc r8, r6, r4
subfe r0, r3, r0
xoris r6, r0, 0x8000
subc r0, r8, r7
subfe r5, r5, r6
subfe r5, r6, r6
neg. r5, r5
beq- .loc_0x198
li r3, 0
bl -0x17AF8
b .loc_0x1C8
.loc_0x198:
lis r4, 0x8000
xoris r3, r7, 0x8000
subc r0, r8, r4
subfe r3, r3, r6
subfe r3, r6, r6
neg. r3, r3
beq- .loc_0x1C0
mr r3, r8
bl -0x17B20
b .loc_0x1C8
.loc_0x1C0:
subi r3, r4, 0x1
bl -0x17B2C
.loc_0x1C8:
bl 0x594C
addi r3, r1, 0x18
bl 0x10AC
addi r3, r1, 0x18
bl 0xEDC
addi r12, r30, 0
mtlr r12
addi r3, r31, 0
addi r4, r29, 0
blrl
addi r3, r1, 0x18
bl 0x1088
mr r3, r29
bl 0xEB8
bl 0x5954
bl 0x5E6C
mr r3, r29
bl 0xF90
lwz r0, 0x2F4(r1)
lwz r31, 0x2EC(r1)
lwz r30, 0x2E8(r1)
lwz r29, 0x2E4(r1)
lwz r28, 0x2E0(r1)
addi r1, r1, 0x2F0
mtlr r0
blr
*/
OSDisableScheduler();
OSClearContext(&exceptionContext);
OSSetCurrentContext(&exceptionContext);
handler(alarm, context);
OSClearContext(&exceptionContext);
OSSetCurrentContext(context);
OSEnableScheduler();
__OSReschedule();
OSLoadContext(context);
}
/*
@ -590,51 +212,14 @@ void DecrementerExceptionCallback(void)
* Address: 800EC120
* Size: 000050
*/
void DecrementerExceptionHandler(void)
static asm void DecrementerExceptionHandler(register __OSException exception, register OSContext* context)
{
/*
.loc_0x0:
stw r0, 0x0(r4)
stw r1, 0x4(r4)
stw r2, 0x8(r4)
stmw r6, 0x18(r4)
mfspr r0, 0x391
stw r0, 0x1A8(r4)
mfspr r0, 0x392
stw r0, 0x1AC(r4)
mfspr r0, 0x393
stw r0, 0x1B0(r4)
mfspr r0, 0x394
stw r0, 0x1B4(r4)
mfspr r0, 0x395
stw r0, 0x1B8(r4)
mfspr r0, 0x396
stw r0, 0x1BC(r4)
mfspr r0, 0x397
stw r0, 0x1C0(r4)
stwu r1, -0x8(r1)
b -0x27C
*/
}
/*
* --INFO--
* Address: ........
* Size: 000008
*/
void OSSetAlarmTag(void)
{
// UNUSED FUNCTION
}
/*
* --INFO--
* Address: ........
* Size: 0000B0
*/
void OSCancelAlarms(void)
{
// UNUSED FUNCTION
// clang-format off
nofralloc
OS_EXCEPTION_SAVE_GPRS(context)
stwu r1, -8(r1)
b DecrementerExceptionCallback
// clang-format on
}
/*
@ -642,69 +227,24 @@ void OSCancelAlarms(void)
* Address: 800EC170
* Size: 0000A0
*/
void OnReset(void)
static BOOL OnReset(BOOL final)
{
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x18(r1)
stw r31, 0x14(r1)
stw r30, 0x10(r1)
cmpwi r3, 0
beq- .loc_0x84
lwz r0, -0x70B0(r13)
cmplwi r0, 0
mr r31, r0
beq- .loc_0x34
lwz r0, 0x14(r31)
b .loc_0x38
OSAlarm* alarm;
OSAlarm* next;
.loc_0x34:
li r0, 0
if (final != FALSE) {
alarm = AlarmQueue.head;
next = (alarm) ? alarm->next : nullptr;
.loc_0x38:
mr r30, r0
b .loc_0x40
while (alarm != nullptr) {
if (__DVDTestAlarm(alarm) == FALSE) {
OSCancelAlarm(alarm);
}
.loc_0x40:
b .loc_0x44
alarm = next;
next = (alarm) ? alarm->next : nullptr;
}
}
.loc_0x44:
b .loc_0x7C
.loc_0x48:
mr r3, r31
bl -0xCD98
cmpwi r3, 0
bne- .loc_0x60
mr r3, r31
bl -0x3F8
.loc_0x60:
cmplwi r30, 0
mr r31, r30
beq- .loc_0x74
lwz r0, 0x14(r30)
b .loc_0x78
.loc_0x74:
li r0, 0
.loc_0x78:
mr r30, r0
.loc_0x7C:
cmplwi r31, 0
bne+ .loc_0x48
.loc_0x84:
li r3, 0x1
lwz r0, 0x1C(r1)
lwz r31, 0x14(r1)
lwz r30, 0x10(r1)
addi r1, r1, 0x18
mtlr r0
blr
*/
return TRUE;
}

View File

@ -5,9 +5,6 @@
extern void __RAS_OSDisableInterrupts_begin();
extern void __RAS_OSDisableInterrupts_end();
volatile OSContext* __OSCurrentContext AT_ADDRESS((u32)OSPhysicalToCached(0xD4));
volatile OSContext* __OSFPUContext AT_ADDRESS((u32)OSPhysicalToCached(0xD8));
/*
* --INFO--
* Address: 800ECD50

View File

@ -2,24 +2,12 @@
#include "Dolphin/os.h"
#include "printf.h"
#include "Dolphin/PPCArch.h"
extern volatile OSTime __OSLastInterruptTime;
extern volatile __OSInterrupt __OSLastInterrupt;
extern volatile u32 __OSLastInterruptSrr0;
extern volatile u32 __DIRegs[];
extern volatile u16 __DSPRegs[];
#include "Dolphin/hw_regs.h"
// All enable
#define FPSCR_ENABLE 0xF8
OSThreadQueue __OSActiveThreadQueue : (0x80000000 | 0xDC);
volatile OSContext* __OSCurrentContext : (0x80000000 | OS_CURRENTCONTEXT_PADDR);
volatile OSContext* __OSFPUContext : (0x80000000 | 0xD8);
OSErrorHandler __OSErrorTable[OS_ERROR_MAX];
u32 __OSFpscrEnableBits = FPSCR_ENABLE;
/*
@ -27,7 +15,7 @@ u32 __OSFpscrEnableBits = FPSCR_ENABLE;
* Address: 800ED6EC
* Size: 000080
*/
__declspec(weak) void OSReport(const char* msg, ...)
WEAKFUNC void OSReport(const char* msg, ...)
{
va_list marker;
@ -42,14 +30,14 @@ __declspec(weak) void OSReport(const char* msg, ...)
* Size: 000020
* same as OSReport but without va start/end
*/
__declspec(weak) void OSVReport(const char* msg, va_list list) { vprintf(msg, list); }
WEAKFUNC void OSVReport(const char* msg, va_list list) { vprintf(msg, list); }
/*
* --INFO--
* Address: 800ED76C
* Size: 00012C
*/
__declspec(weak) void OSPanic(const char* file, int line, const char* msg, ...)
WEAKFUNC void OSPanic(const char* file, int line, const char* msg, ...)
{
va_list marker;
u32 i;
@ -141,72 +129,61 @@ OSErrorHandler OSSetErrorHandler(OSError error, OSErrorHandler handler)
void __OSUnhandledException(__OSException exception, OSContext* context, u32 dsisr, u32 dar)
{
OSTime now;
OSErrorHandler* errorTable = __OSErrorTable;
now = OSGetTime();
now = OSGetTime();
if (!(context->srr1 & 2)) {
OSReport("Non-recoverable Exception %d", exception);
} else {
if (exception == OS_ERROR_PROGRAM && (context->srr1 & (0x80000000 >> 11)) && errorTable[OS_ERROR_MAX] != 0) {
if (exception == __OS_EXCEPTION_PROGRAM && (context->srr1 & (0x80000000 >> 11)) && __OSErrorTable[OS_ERROR_MAX] != 0) {
u32 fpscr;
u32 msr;
u32 res;
// set exception
exception = OS_ERROR_MAX; // probably meant to be something related to FPU
exception = OS_ERROR_MAX;
// Enable FPU
msr = PPCMfmsr();
PPCMtmsr(msr | 0x2000);
// Save FPU context if it isn't null
if (__OSFPUContext) {
OSSaveFPUContext((OSContext*)__OSFPUContext);
}
// magic hex turns something off
res = PPCMffpscr();
fpscr = 0x6005F8FF;
PPCMtfpscr(res & fpscr);
fpscr = PPCMffpscr();
fpscr &= ~(FPSCR_VXVC | FPSCR_VXIMZ | FPSCR_VXZDZ | FPSCR_VXIDI | FPSCR_VXISI | FPSCR_VXSNAN | FPSCR_VXSOFT | FPSCR_VXSQRT
| FPSCR_VXCVI | FPSCR_XX | FPSCR_ZX | FPSCR_UX | FPSCR_OX | FPSCR_FX | FPSCR_FI);
PPCMtfpscr(fpscr);
// Restore FPU
PPCMtmsr(msr);
if (__OSFPUContext == context) {
OSDisableScheduler();
errorTable[exception](exception, context, dsisr, dar);
// Clear FPU context so that the error handler can alter the FPU context
__OSErrorTable[exception](exception, context, dsisr, dar);
context->srr1 &= ~0x2000;
__OSFPUContext = NULL;
__OSFPUContext = nullptr;
// Turn off floating point exception
context->fpscr &= fpscr;
context->fpscr &= ~(FPSCR_VXVC | FPSCR_VXIMZ | FPSCR_VXZDZ | FPSCR_VXIDI | FPSCR_VXISI | FPSCR_VXSNAN | FPSCR_VXSOFT
| FPSCR_VXSQRT | FPSCR_VXCVI | FPSCR_XX | FPSCR_ZX | FPSCR_UX | FPSCR_OX | FPSCR_FX | FPSCR_FI);
OSEnableScheduler();
__OSReschedule();
} else {
// Clear FPU context
context->srr1 &= ~0x2000;
__OSFPUContext = NULL;
__OSFPUContext = nullptr;
}
OSLoadContext(context);
// NOT REACHED HERE
}
if (errorTable[exception]) {
if (__OSErrorTable[exception]) {
OSDisableScheduler();
errorTable[exception](exception, context, dsisr, dar);
__OSErrorTable[exception](exception, context, dsisr, dar);
OSEnableScheduler();
__OSReschedule();
OSLoadContext(context);
// NOT REACHED HERE
}
// ignore decrementer exception
if (exception == OS_ERROR_DECREMENTER) {
OSLoadContext(context);
// NOT REACHED HERE
}
OSReport("Unhandled Exception %d", exception);
@ -217,38 +194,36 @@ void __OSUnhandledException(__OSException exception, OSContext* context, u32 dsi
OSReport("\nDSISR = 0x%08x DAR = 0x%08x\n", dsisr, dar);
OSReport("TB = 0x%016llx\n", now);
// Perform some explanation of most common errors
switch (exception) {
case OS_ERROR_DSI:
case __OS_EXCEPTION_DSI:
OSReport("\nInstruction at 0x%x (read from SRR0) attempted to access "
"invalid address 0x%x (read from DAR)\n",
context->srr0, dar);
break;
case OS_ERROR_ISI:
case __OS_EXCEPTION_ISI:
OSReport("\nAttempted to fetch instruction from invalid address 0x%x "
"(read from SRR0)\n",
context->srr0);
break;
case OS_ERROR_ALIGNMENT:
case __OS_EXCEPTION_ALIGNMENT:
OSReport("\nInstruction at 0x%x (read from SRR0) attempted to access "
"unaligned address 0x%x (read from DAR)\n",
context->srr0, dar);
break;
case OS_ERROR_PROGRAM:
case __OS_EXCEPTION_PROGRAM:
OSReport("\nProgram exception : Possible illegal instruction/operation "
"at or around 0x%x (read from SRR0)\n",
context->srr0, dar);
break;
case OS_ERROR_PROTECTION:
OSReport("\n");
OSReport("AI DMA Address = 0x%04x%04x\n", __DSPRegs[0x18], __DSPRegs[0x18 + 1]); // fix this code block -epoch
OSReport("ARAM DMA Address = 0x%04x%04x\n", __DSPRegs[0x10], __DSPRegs[0x10 + 1]);
OSReport("DI DMA Address = 0x%08x\n", __DIRegs[0x5]);
OSReport("AI DMA Address = 0x%04x%04x\n", __DSPRegs[DSP_DMA_START_HI], __DSPRegs[DSP_DMA_START_LO]);
OSReport("ARAM DMA Address = 0x%04x%04x\n", __DSPRegs[DSP_ARAM_DMA_MM_HI], __DSPRegs[DSP_ARAM_DMA_MM_LO]);
OSReport("DI DMA Address = 0x%08x\n", __DIRegs[DI_DMA_MEM_ADDR]);
break;
}
OSReport("\nLast interrupt (%d): SRR0 = 0x%08x TB = 0x%016llx\n", __OSLastInterrupt, __OSLastInterruptSrr0, __OSLastInterruptTime);
PPCHalt();
// NOT REACHED HERE
}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,8 @@
#include "Dolphin/os.h"
#include "Dolphin/hw_regs.h"
static OSResetQueue ResetFunctionQueue;
static u32 bootThisDol;
/*
* --INFO--
@ -7,66 +11,35 @@
*/
void OSRegisterResetFunction(OSResetFunctionInfo* info)
{
/*
.loc_0x0:
lwz r5, -0x7058(r13)
b .loc_0xC
OSResetFunctionInfo* tmp;
OSResetFunctionInfo* iter;
.loc_0x8:
lwz r5, 0x8(r5)
for (iter = ResetFunctionQueue.head; iter && iter->priority <= info->priority; iter = iter->next) {
;
}
.loc_0xC:
cmplwi r5, 0
beq- .loc_0x24
lwz r4, 0x4(r5)
lwz r0, 0x4(r3)
cmplw r4, r0
ble+ .loc_0x8
if (iter == nullptr) {
tmp = ResetFunctionQueue.tail;
if (tmp == nullptr) {
ResetFunctionQueue.head = info;
} else {
tmp->next = info;
}
info->prev = tmp;
info->next = nullptr;
ResetFunctionQueue.tail = info;
return;
}
.loc_0x24:
cmplwi r5, 0
bne- .loc_0x5C
subi r5, r13, 0x7058
lwzu r4, 0x4(r5)
cmplwi r4, 0
bne- .loc_0x44
stw r3, -0x7058(r13)
b .loc_0x48
.loc_0x44:
stw r3, 0x8(r4)
.loc_0x48:
stw r4, 0xC(r3)
li r0, 0
stw r0, 0x8(r3)
stw r3, 0x0(r5)
blr
.loc_0x5C:
stw r5, 0x8(r3)
lwz r4, 0xC(r5)
stw r3, 0xC(r5)
cmplwi r4, 0
stw r4, 0xC(r3)
bne- .loc_0x7C
stw r3, -0x7058(r13)
blr
.loc_0x7C:
stw r3, 0x8(r4)
blr
*/
}
/*
* --INFO--
* Address: ........
* Size: 000038
*/
void OSUnregisterResetFunction(void)
{
// UNUSED FUNCTION
info->next = iter;
tmp = iter->prev;
iter->prev = info;
info->prev = tmp;
if (tmp == nullptr) {
ResetFunctionQueue.head = info;
return;
}
tmp->next = info;
}
/*
@ -74,9 +47,21 @@ void OSUnregisterResetFunction(void)
* Address: ........
* Size: 000094
*/
void __OSCallResetFunctions(void)
BOOL __OSCallResetFunctions(BOOL final)
{
// UNUSED FUNCTION
OSResetFunctionInfo* iter;
BOOL retCode = FALSE;
for (iter = ResetFunctionQueue.head; (iter != nullptr && retCode == FALSE); iter = iter->next) {
retCode |= !iter->func(final);
}
retCode |= !__OSSyncSram();
if (retCode) {
return FALSE;
}
return TRUE;
}
/*
@ -84,57 +69,56 @@ void __OSCallResetFunctions(void)
* Address: 800F0328
* Size: 000070
*/
void Reset(void)
static asm void Reset(register s32 resetCode)
{
/*
.loc_0x0:
b .loc_0x20
// clang-format off
nofralloc
b _jump1
.loc_0x4:
mfspr r8, 0x3F0
ori r8, r8, 0x8
mtspr 1008, r8
isync
sync
nop
b .loc_0x24
_begin:
mfspr r8, HID0
ori r8, r8, 8
mtspr HID0, r8
isync
sync
nop
b _preloop
.loc_0x20:
b .loc_0x40
_jump1:
b _jump2
.loc_0x24:
mftbl r5
_preloop:
mftb r5, 268
_loop:
mftb r6, 268
subf r7, r5, r6
cmplwi r7, 0x1124
blt _loop
nop
b _setPIReg
.loc_0x28:
mftbl r6
sub r7, r6, r5
cmplwi r7, 0x1124
blt+ .loc_0x28
nop
b .loc_0x44
_jump2:
b _jump3
.loc_0x40:
b .loc_0x60
_setPIReg:
lis r8, 0xCC003000@h
ori r8, r8, 0xCC003000@l
li r4, 3
stw r4, 0x24(r8)
stw r3, 0x24(r8)
nop
b _noptrap
.loc_0x44:
lis r8, 0xCC00
ori r8, r8, 0x3000
li r4, 0x3
stw r4, 0x24(r8)
stw r3, 0x24(r8)
nop
b .loc_0x64
_jump3:
b _jump4
.loc_0x60:
b .loc_0x6C
_noptrap:
nop
b _noptrap
.loc_0x64:
nop
b .loc_0x64
.loc_0x6C:
b .loc_0x4
*/
_jump4:
b _begin
// clang-format on
}
/*
@ -142,9 +126,22 @@ void Reset(void)
* Address: ........
* Size: 000068
*/
void KillThreads(void)
static void KillThreads()
{
// UNUSED FUNCTION
OSThread* thread;
OSThread* next;
for (thread = __OSActiveThreadQueue.head; thread; thread = next) {
next = thread->linkActive.next;
switch (thread->state) {
case 1:
case 4:
OSCancelThread(thread);
break;
default:
break;
}
}
}
/*
@ -152,29 +149,12 @@ void KillThreads(void)
* Address: 800F0398
* Size: 000048
*/
void __OSDoHotReset(void)
void __OSDoHotReset(s32 code)
{
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x18(r1)
stw r31, 0x14(r1)
mr r31, r3
bl -0x1774
lis r3, 0xCC00
addi r3, r3, 0x2000
li r0, 0
sth r0, 0x2(r3)
bl -0x3B90
rlwinm r3,r31,3,0,28
bl -0xA0
lwz r0, 0x1C(r1)
lwz r31, 0x14(r1)
addi r1, r1, 0x18
mtlr r0
blr
*/
OSDisableInterrupts();
__VIRegs[VI_DISP_CONFIG] = 0;
ICFlashInvalidate();
Reset(code * 8);
}
/*
@ -182,254 +162,59 @@ void __OSDoHotReset(void)
* Address: 800F03E0
* Size: 0002BC
*/
void OSResetSystem(void)
void OSResetSystem(int reset, u32 resetCode, BOOL forceMenu)
{
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x40(r1)
stmw r26, 0x28(r1)
mr r28, r3
mr r29, r4
mr r30, r5
bl 0x1608
bl -0x3E00
cmpwi r28, 0x2
beq- .loc_0x40
cmpwi r28, 0
bne- .loc_0x4C
lwz r0, -0x7050(r13)
cmplwi r0, 0
beq- .loc_0x4C
BOOL rc;
BOOL disableRecalibration;
u32 unk[3]; // dumb compiler
.loc_0x40:
li r3, 0x1
bl 0x4A5C
mr r31, r3
OSDisableScheduler();
__OSStopAudioSystem();
.loc_0x4C:
b .loc_0x50
if (reset == OS_RESET_SHUTDOWN || (reset == OS_RESET_RESTART && bootThisDol != 0)) {
disableRecalibration = __PADDisableRecalibration(TRUE);
}
.loc_0x50:
b .loc_0x54
while (!__OSCallResetFunctions(FALSE)) {
;
}
.loc_0x54:
lwz r26, -0x7058(r13)
li r27, 0
b .loc_0x60
if (reset == OS_RESET_HOTRESET && forceMenu) {
OSSram* sram;
.loc_0x60:
b .loc_0x64
sram = __OSLockSram();
sram->flags |= 0x40;
__OSUnlockSram(TRUE);
.loc_0x64:
b .loc_0x88
while (!__OSSyncSram()) {
;
}
resetCode = 0;
}
.loc_0x68:
li r3, 0
lwz r12, 0x0(r26)
mtlr r12
blrl
cntlzw r0, r3
lwz r26, 0x8(r26)
rlwinm r0,r0,27,5,31
or r27, r27, r0
OSDisableInterrupts();
__OSCallResetFunctions(TRUE);
LCDisable();
if (reset == OS_RESET_HOTRESET) {
__OSDoHotReset(resetCode);
} else if (reset == OS_RESET_RESTART) {
if ((*(u32*)OSPhysicalToCached(0x30EC) = bootThisDol) != 0) {
__PADDisableRecalibration(disableRecalibration);
}
KillThreads();
OSEnableScheduler();
__OSReboot(resetCode, forceMenu);
}
.loc_0x88:
cmplwi r26, 0
beq- .loc_0x98
cmpwi r27, 0
beq+ .loc_0x68
KillThreads();
memset(OSPhysicalToCached(0x40), 0, 0xCC - 0x40);
memset(OSPhysicalToCached(0xD4), 0, 0xE8 - 0xD4);
memset(OSPhysicalToCached(0xF4), 0, 0xF8 - 0xF4);
memset(OSPhysicalToCached(0x3000), 0, 0xC0);
memset(OSPhysicalToCached(0x30C8), 0, 0xD4 - 0xC8);
memset(OSPhysicalToCached(0x30E2), 0, 1);
.loc_0x98:
bl 0xCF4
cntlzw r0, r3
rlwinm r0,r0,27,5,31
or r27, r27, r0
cmpwi r27, 0
beq- .loc_0xB8
li r0, 0
b .loc_0xBC
.loc_0xB8:
li r0, 0x1
.loc_0xBC:
cmpwi r0, 0
beq+ .loc_0x54
cmpwi r28, 0x1
bne- .loc_0x104
cmpwi r30, 0
beq- .loc_0x104
bl 0x87C
lbz r0, 0x13(r3)
ori r0, r0, 0x40
stb r0, 0x13(r3)
li r3, 0x1
bl 0xC5C
b .loc_0xF0
.loc_0xF0:
b .loc_0xF4
.loc_0xF4:
bl 0xC98
cmpwi r3, 0
beq+ .loc_0xF4
li r29, 0
.loc_0x104:
bl -0x18AC
lwz r27, -0x7058(r13)
li r26, 0
b .loc_0x114
.loc_0x114:
b .loc_0x118
.loc_0x118:
b .loc_0x13C
.loc_0x11C:
li r3, 0x1
lwz r12, 0x0(r27)
mtlr r12
blrl
cntlzw r0, r3
lwz r27, 0x8(r27)
rlwinm r0,r0,27,5,31
or r26, r26, r0
.loc_0x13C:
cmplwi r27, 0
beq- .loc_0x14C
cmpwi r26, 0
beq+ .loc_0x11C
.loc_0x14C:
bl 0xC40
bl -0x3BD8
cmpwi r28, 0x1
bne- .loc_0x180
bl -0x1904
lis r3, 0xCC00
addi r3, r3, 0x2000
li r0, 0
sth r0, 0x2(r3)
bl -0x3D20
rlwinm r3,r29,3,0,28
bl -0x230
b .loc_0x1F8
.loc_0x180:
cmpwi r28, 0
bne- .loc_0x1F8
lwz r0, -0x7050(r13)
lis r3, 0x8000
cmplwi r0, 0
stw r0, 0x30EC(r3)
beq- .loc_0x1A4
mr r3, r31
bl 0x4900
.loc_0x1A4:
lis r3, 0x8000
lwz r3, 0xDC(r3)
b .loc_0x1B0
.loc_0x1B0:
b .loc_0x1B4
.loc_0x1B4:
b .loc_0x1E0
.loc_0x1B8:
lhz r0, 0x2C8(r3)
lwz r26, 0x2FC(r3)
cmpwi r0, 0x4
beq- .loc_0x1D8
bge- .loc_0x1DC
cmpwi r0, 0x1
beq- .loc_0x1D8
b .loc_0x1DC
.loc_0x1D8:
bl 0x1CE0
.loc_0x1DC:
mr r3, r26
.loc_0x1E0:
cmplwi r3, 0
bne+ .loc_0x1B8
bl 0x147C
mr r3, r29
mr r4, r30
bl -0x66C
.loc_0x1F8:
lis r3, 0x8000
lwz r3, 0xDC(r3)
b .loc_0x204
.loc_0x204:
b .loc_0x208
.loc_0x208:
b .loc_0x234
.loc_0x20C:
lhz r0, 0x2C8(r3)
lwz r26, 0x2FC(r3)
cmpwi r0, 0x4
beq- .loc_0x22C
bge- .loc_0x230
cmpwi r0, 0x1
beq- .loc_0x22C
b .loc_0x230
.loc_0x22C:
bl 0x1C8C
.loc_0x230:
mr r3, r26
.loc_0x234:
cmplwi r3, 0
bne+ .loc_0x20C
lis r28, 0x8000
addi r3, r28, 0x40
li r4, 0
li r5, 0x8C
bl -0xEB578
addi r3, r28, 0xD4
li r4, 0
li r5, 0x14
bl -0xEB588
addi r3, r28, 0xF4
li r4, 0
li r5, 0x4
bl -0xEB598
addi r3, r28, 0x3000
li r4, 0
li r5, 0xC0
bl -0xEB5A8
addi r3, r28, 0x30C8
li r4, 0
li r5, 0xC
bl -0xEB5B8
addi r3, r28, 0x30E2
li r4, 0
li r5, 0x1
bl -0xEB5C8
mr r3, r31
bl 0x47FC
lmw r26, 0x28(r1)
lwz r0, 0x44(r1)
addi r1, r1, 0x40
mtlr r0
blr
*/
__PADDisableRecalibration(disableRecalibration);
}
/*
@ -437,36 +222,11 @@ void OSResetSystem(void)
* Address: 800F069C
* Size: 000034
*/
void OSGetResetCode(void)
u32 OSGetResetCode()
{
/*
.loc_0x0:
lis r3, 0x8000
lbz r0, 0x30E2(r3)
cmplwi r0, 0
beq- .loc_0x1C
lwz r0, 0x30F0(r3)
oris r3, r0, 0x8000
b .loc_0x30
if (*(u8*)OSPhysicalToCached(0x30E2) != 0) {
return *(u32*)OSPhysicalToCached(0x30F0) | 0x80000000;
}
.loc_0x1C:
lis r3, 0xCC00
addi r3, r3, 0x3000
lwz r0, 0x24(r3)
rlwinm r0,r0,0,0,28
rlwinm r3,r0,29,3,31
.loc_0x30:
blr
*/
}
/*
* --INFO--
* Address: ........
* Size: 000010
*/
void OSSetBootDol(void)
{
// UNUSED FUNCTION
return ((__PIRegs[PI_RESETCODE] & ~7) >> 3);
}

View File

@ -12,11 +12,6 @@ static OSContext IdleContext;
static void DefaultSwitchThreadCallback(OSThread* from, OSThread* to);
static OSSwitchThreadCallback SwitchThreadCallback = DefaultSwitchThreadCallback;
OSThread* __OSCurrentThread AT_ADDRESS((u32)OSPhysicalToCached(0x00E4));
OSThreadQueue __OSActiveThreadQueue AT_ADDRESS((u32)OSPhysicalToCached(0x00DC));
volatile OSContext __OSCurrentContext AT_ADDRESS((u32)OSPhysicalToCached(0x00D4));
volatile OSContext* __OSFPUContext AT_ADDRESS((u32)OSPhysicalToCached(0x00D8));
// Fabricated helper inlines.
// Initialise mutex queue (mutex equiv. to OSInitThreadQueue below).
static inline void InitMutexQueue(OSMutexQueue* queue) { queue->head = queue->tail = NULL; }

View File

@ -1,21 +1,35 @@
#include "Dolphin/os.h"
#define OS_TIME_MONTH_MAX 12
#define OS_TIME_WEEK_DAY_MAX 7
#define OS_TIME_YEAR_DAY_MAX 365
#define BIAS (2000 * 365 + (2000 + 3) / 4 - (2000 - 1) / 100 + (2000 - 1) / 400)
// End of each month in standard year
static s32 YearDays[OS_TIME_MONTH_MAX] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
// End of each month in leap year
static s32 LeapYearDays[OS_TIME_MONTH_MAX] = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 };
/*
* --INFO--
* Address: 800F2B90
* Size: 000018
*/
u64 OSGetTime(void)
asm s64 OSGetTime()
{
/*
.loc_0x0:
mftbu r3
mftbl r4
mftbu r5
cmpw r3, r5
bne+ .loc_0x0
blr
*/
// clang-format off
nofralloc
mftbu r3
mftb r4
// Check for possible carry from TBL to TBU
mftbu r5
cmpw r3, r5
bne OSGetTime
blr
// clang-format on
}
/*
@ -23,33 +37,13 @@ u64 OSGetTime(void)
* Address: 800F2BA8
* Size: 000008
*/
void OSGetTick(void)
{
/*
.loc_0x0:
mftbl r3
blr
*/
}
asm u32 OSGetTick() {
// clang-format off
nofralloc
/*
* --INFO--
* Address: ........
* Size: 000014
*/
void __SetTime(void)
{
// UNUSED FUNCTION
}
/*
* --INFO--
* Address: ........
* Size: 000084
*/
void __OSSetTime(void)
{
// UNUSED FUNCTION
mftb r3
blr
// clang-format on
}
/*
@ -57,56 +51,17 @@ void __OSSetTime(void)
* Address: 800F2BB0
* Size: 000064
*/
void __OSGetSystemTime(void)
OSTime __OSGetSystemTime()
{
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x20(r1)
stw r31, 0x1C(r1)
stw r30, 0x18(r1)
stw r29, 0x14(r1)
bl -0x3F90
mr r31, r3
bl -0x40
lis r6, 0x8000
lwz r5, 0x30DC(r6)
lwz r0, 0x30D8(r6)
addc r29, r5, r4
adde r30, r0, r3
mr r3, r31
bl -0x3F8C
mr r4, r29
mr r3, r30
lwz r0, 0x24(r1)
lwz r31, 0x1C(r1)
lwz r30, 0x18(r1)
lwz r29, 0x14(r1)
addi r1, r1, 0x20
mtlr r0
blr
*/
}
BOOL enabled;
OSTime* timeAdjustAddr = (OSTime*)(OSPhysicalToCached(0x30D8));
OSTime result;
/*
* --INFO--
* Address: ........
* Size: 000058
*/
void __OSTimeToSystemTime(void)
{
// UNUSED FUNCTION
}
enabled = OSDisableInterrupts();
result = *timeAdjustAddr + OSGetTime();
OSRestoreInterrupts(enabled);
/*
* --INFO--
* Address: ........
* Size: 000008
*/
void __OSSetTick(void)
{
// UNUSED FUNCTION
return result;
}
/*
@ -114,29 +69,19 @@ void __OSSetTick(void)
* Address: ........
* Size: 000088
*/
void IsLeapYear(void)
{
// UNUSED FUNCTION
}
/*
* --INFO--
* Address: ........
* Size: 0000A8
*/
void GetYearDays(void)
{
// UNUSED FUNCTION
}
static BOOL IsLeapYear(s32 year) { return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); }
/*
* --INFO--
* Address: ........
* Size: 000050
*/
void GetLeapDays(void)
static s32 GetLeapDays(s32 year)
{
// UNUSED FUNCTION
if (year < 1) {
return 0;
}
return (year + 3) / 4 - (year - 1) / 100 + (year - 1) / 400;
}
/*
@ -144,291 +89,62 @@ void GetLeapDays(void)
* Address: 800F2C14
* Size: 00019C
*/
void GetDates(void)
static void GetDates(s32 days, OSCalendarTime* cal)
{
/*
.loc_0x0:
lis r5, 0x9249
addi r0, r5, 0x2493
addi r7, r3, 0x6
mulhw r6, r0, r7
lis r5, 0xB38D
subi r0, r5, 0x64F
mulhw r0, r0, r3
add r5, r6, r7
srawi r5, r5, 0x2
rlwinm r6,r5,1,31,31
add r5, r5, r6
add r0, r0, r3
mulli r6, r5, 0x7
srawi r0, r0, 0x8
rlwinm r5,r0,1,31,31
add r5, r0, r5
sub r0, r7, r6
mulli r11, r5, 0x16D
stw r0, 0x18(r4)
b .loc_0x50
s32 year;
s32 totalDays;
s32* p_days;
s32 month;
cal->wday = (days + 6) % OS_TIME_WEEK_DAY_MAX;
.loc_0x50:
lis r6, 0x51EC
subi r10, r6, 0x7AE1
b .loc_0x5C
for (year = days / OS_TIME_YEAR_DAY_MAX; days < (totalDays = year * OS_TIME_YEAR_DAY_MAX + GetLeapDays(year));) {
year--;
}
.loc_0x5C:
b .loc_0x68
days -= totalDays;
cal->year = year;
cal->yday = days;
.loc_0x60:
subi r11, r11, 0x16D
subi r5, r5, 0x1
.loc_0x68:
cmpwi r5, 0x1
bge- .loc_0x78
li r0, 0
b .loc_0xAC
.loc_0x78:
subi r0, r5, 0x1
mulhw r0, r10, r0
srawi r8, r0, 0x7
srawi r6, r0, 0x5
addi r0, r5, 0x3
rlwinm r7,r6,1,31,31
srawi r0, r0, 0x2
rlwinm r9,r8,1,31,31
add r6, r6, r7
addze r0, r0
add r7, r8, r9
sub r0, r0, r6
add r0, r7, r0
.loc_0xAC:
add r0, r11, r0
cmpw r3, r0
blt+ .loc_0x60
srawi r6, r5, 0x2
stw r5, 0x14(r4)
addze r6, r6
rlwinm r6,r6,2,0,29
subc r6, r5, r6
sub r0, r3, r0
cmpwi r6, 0
stw r0, 0x1C(r4)
li r7, 0x1
li r8, 0
bne- .loc_0x110
lis r3, 0x51EC
subi r3, r3, 0x7AE1
mulhw r3, r3, r5
srawi r3, r3, 0x5
rlwinm r6,r3,1,31,31
add r3, r3, r6
mulli r3, r3, 0x64
sub r3, r5, r3
cmpwi r3, 0
beq- .loc_0x110
mr r8, r7
.loc_0x110:
cmpwi r8, 0
bne- .loc_0x144
lis r3, 0x51EC
subi r3, r3, 0x7AE1
mulhw r3, r3, r5
srawi r3, r3, 0x7
rlwinm r6,r3,1,31,31
add r3, r3, r6
mulli r3, r3, 0x190
sub r3, r5, r3
cmpwi r3, 0
beq- .loc_0x144
li r7, 0
.loc_0x144:
cmpwi r7, 0
beq- .loc_0x158
lis r3, 0x804B
subi r6, r3, 0x61D0
b .loc_0x160
.loc_0x158:
lis r3, 0x804B
subi r6, r3, 0x6200
.loc_0x160:
li r7, 0xC
li r3, 0x30
b .loc_0x16C
.loc_0x16C:
b .loc_0x170
.loc_0x170:
subi r3, r3, 0x4
lwzx r5, r6, r3
subi r7, r7, 0x1
cmpw r0, r5
blt+ .loc_0x170
stw r7, 0x10(r4)
lwzx r3, r6, r3
sub r3, r0, r3
addi r0, r3, 0x1
stw r0, 0xC(r4)
blr
*/
p_days = IsLeapYear(year) ? LeapYearDays : YearDays;
month = OS_TIME_MONTH_MAX;
while (days < p_days[--month]) {
;
}
cal->mon = month;
cal->mday = days - p_days[month] + 1;
}
#pragma dont_inline on
/*
* --INFO--
* Address: 800F2DB0
* Size: 000204
*/
void OSTicksToCalendarTime(void)
void OSTicksToCalendarTime(OSTime ticks, OSCalendarTime* cal)
{
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x38(r1)
stmw r25, 0x1C(r1)
mr r29, r3
mr r30, r4
mr r31, r5
lis r27, 0x8000
lwz r0, 0xF8(r27)
mr r3, r29
mr r4, r30
rlwinm r6,r0,30,2,31
li r5, 0
bl -0x30E04
mr r26, r3
li r5, 0
mr r25, r4
xoris r4, r26, 0x8000
xoris r3, r5, 0x8000
subc r0, r25, r5
subfe r3, r3, r4
subfe r3, r4, r4
neg r3, r3
cmpwi r3, 0
beq- .loc_0x74
lwz r0, 0xF8(r27)
rlwinm r0,r0,30,2,31
addc r25, r25, r0
adde r26, r26, r5
int days;
int secs;
OSTime d;
.loc_0x74:
li r4, 0x8
mullw r3, r26, r4
mulhwu r0, r25, r4
lis r27, 0x8000
lwz r6, 0xF8(r27)
lis r5, 0x431C
subi r5, r5, 0x217D
rlwinm r6,r6,30,2,31
mulhwu r5, r5, r6
rlwinm r6,r5,17,15,31
li r28, 0
add r3, r3, r0
mullw r0, r25, r28
mullw r4, r25, r4
add r3, r3, r0
li r5, 0
bl -0x310A0
li r5, 0
li r6, 0x3E8
bl -0x30E90
stw r4, 0x24(r31)
lis r3, 0x1062
addi r5, r3, 0x4DD3
lwz r0, 0xF8(r27)
mr r3, r26
mr r4, r25
rlwinm r0,r0,30,2,31
mulhwu r0, r5, r0
rlwinm r6,r0,26,6,31
li r5, 0
bl -0x310D8
li r5, 0
li r6, 0x3E8
bl -0x30EC8
stw r4, 0x20(r31)
subc r30, r30, r25
subfe r29, r26, r29
lwz r0, 0xF8(r27)
lis r5, 0x1
addi r25, r5, 0x5180
mr r3, r29
rlwinm r6,r0,30,2,31
mr r4, r30
li r5, 0
bl -0x31110
mr r6, r25
li r5, 0
bl -0x3111C
lis r5, 0xB
lwz r0, 0xF8(r27)
addi r5, r5, 0x2575
addc r26, r4, r5
rlwinm r6,r0,30,2,31
adde r0, r3, r28
mr r3, r29
mr r4, r30
li r5, 0
bl -0x31144
mr r6, r25
li r5, 0
bl -0x30F34
mr r27, r4
cmpwi r27, 0
bge- .loc_0x180
addis r27, r27, 0x1
subi r26, r26, 0x1
addi r27, r27, 0x5180
d = ticks % OSSecondsToTicks(1);
if (d < 0) {
d += OSSecondsToTicks(1);
}
cal->usec = (int)(OSTicksToMicroseconds(d) % 1000);
cal->msec = (int)(OSTicksToMilliseconds(d) % 1000);
.loc_0x180:
mr r3, r26
mr r4, r31
bl -0x324
lis r3, 0x8889
subi r5, r3, 0x7777
mulhw r0, r5, r27
add r4, r0, r27
srawi r0, r4, 0x5
rlwinm r3,r0,1,31,31
add r7, r0, r3
mulhw r0, r5, r7
add r0, r0, r7
srawi r5, r0, 0x5
srawi r0, r0, 0x5
rlwinm r3,r0,1,31,31
add r3, r0, r3
srawi r0, r4, 0x5
rlwinm r6,r5,1,31,31
mulli r4, r3, 0x3C
rlwinm r3,r0,1,31,31
add r5, r5, r6
add r0, r0, r3
stw r5, 0x8(r31)
mulli r0, r0, 0x3C
sub r3, r7, r4
stw r3, 0x4(r31)
sub r0, r27, r0
stw r0, 0x0(r31)
lmw r25, 0x1C(r1)
lwz r0, 0x3C(r1)
addi r1, r1, 0x38
mtlr r0
blr
*/
}
/*
* --INFO--
* Address: ........
* Size: 0002E0
*/
void OSCalendarTimeToTicks(void)
{
// UNUSED FUNCTION
ticks -= d;
days = (int)(OSTicksToSeconds(ticks) / 86400 + BIAS);
secs = (int)(OSTicksToSeconds(ticks) % 86400);
if (secs < 0) {
days -= 1;
secs += 24 * 60 * 60;
}
GetDates(days, cal);
cal->hour = secs / 60 / 60;
cal->min = (secs / 60) % 60;
cal->sec = secs % 60;
}
#pragma dont_inline reset

View File

@ -437,3 +437,5 @@ You have 2217 out of 10000 Pokos and 66 out of 201 treasures.",2023-02-11 13:29:
You have 2228 out of 10000 Pokos and 67 out of 201 treasures.",2023-02-11 19:29:37.896137
2245,1044504,0.2245109570385044,67,239155,0.33548851380924055,"
You have 2245 out of 10000 Pokos and 67 out of 201 treasures.",2023-02-11 21:24:33.916225
2261,1052360,0.22619956529514534,67,240196,0.33694883679172233,"
You have 2261 out of 10000 Pokos and 67 out of 201 treasures.",2023-02-11 23:41:28.222009

1 code_count_in_pokos code_completion_in_bytes code_completion_in_percentage data_count_in_treasures data_completion_in_bytes data_completion_in_percentage sentence created_at
437
438
439
440
441