2022-10-16 16:05:58 +00:00
|
|
|
.include "macros.inc"
|
|
|
|
|
|
|
|
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
|
2022-10-16 16:31:36 +00:00
|
|
|
.global __OSInitAlarm
|
|
|
|
__OSInitAlarm:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B7A0 000175E0 94 21 FF F0 */ stwu r1, -0x10(r1)
|
|
|
|
/* 8001B7A4 000175E4 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 8001B7A8 000175E8 38 60 00 08 */ li r3, 0x8
|
|
|
|
/* 8001B7AC 000175EC 90 01 00 14 */ stw r0, 0x14(r1)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B7B0 000175F0 4B FF FD B1 */ bl __OSGetExceptionHandler
|
|
|
|
/* 8001B7B4 000175F4 3C 80 80 02 */ lis r4, DecrementerExceptionHandler@ha
|
|
|
|
/* 8001B7B8 000175F8 38 84 BE B0 */ addi r4, r4, DecrementerExceptionHandler@l
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B7BC 000175FC 7C 03 20 40 */ cmplw r3, r4
|
|
|
|
/* 8001B7C0 00017600 41 82 00 28 */ beq lbl_8001B7E8
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B7C4 00017604 38 6D E3 A0 */ addi r3, r13, AlarmQueue@sda21
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B7C8 00017608 38 00 00 00 */ li r0, 0x0
|
|
|
|
/* 8001B7CC 0001760C 90 03 00 04 */ stw r0, 0x4(r3)
|
|
|
|
/* 8001B7D0 00017610 38 60 00 08 */ li r3, 0x8
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B7D4 00017614 90 0D E3 A0 */ stw r0, AlarmQueue@sda21(r13)
|
|
|
|
/* 8001B7D8 00017618 4B FF FD 69 */ bl __OSSetExceptionHandler
|
|
|
|
/* 8001B7DC 0001761C 3C 60 80 42 */ lis r3, ShutdownFunctionInfo_804221E8@ha
|
|
|
|
/* 8001B7E0 00017620 38 63 21 E8 */ addi r3, r3, ShutdownFunctionInfo_804221E8@l
|
|
|
|
/* 8001B7E4 00017624 48 00 77 2D */ bl OSRegisterShutdownFunction
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001B7E8
|
|
|
|
lbl_8001B7E8:
|
|
|
|
/* 8001B7E8 00017628 80 01 00 14 */ lwz r0, 0x14(r1)
|
|
|
|
/* 8001B7EC 0001762C 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8001B7F0 00017630 38 21 00 10 */ addi r1, r1, 0x10
|
|
|
|
/* 8001B7F4 00017634 4E 80 00 20 */ blr
|
|
|
|
/* 8001B7F8 00017638 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 8001B7FC 0001763C 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global OSCreateAlarm
|
|
|
|
OSCreateAlarm:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B800 00017640 38 00 00 00 */ li r0, 0x0
|
|
|
|
/* 8001B804 00017644 90 03 00 00 */ stw r0, 0x0(r3)
|
|
|
|
/* 8001B808 00017648 90 03 00 04 */ stw r0, 0x4(r3)
|
|
|
|
/* 8001B80C 0001764C 4E 80 00 20 */ blr
|
2022-10-16 16:31:36 +00:00
|
|
|
.global InsertAlarm
|
|
|
|
InsertAlarm:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B810 00017650 94 21 FF D0 */ stwu r1, -0x30(r1)
|
|
|
|
/* 8001B814 00017654 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 8001B818 00017658 90 01 00 34 */ stw r0, 0x34(r1)
|
|
|
|
/* 8001B81C 0001765C 39 61 00 30 */ addi r11, r1, 0x30
|
|
|
|
/* 8001B820 00017660 4B FE BB 15 */ bl lbl_80007334
|
|
|
|
/* 8001B824 00017664 80 83 00 18 */ lwz r4, 0x18(r3)
|
|
|
|
/* 8001B828 00017668 3B A0 00 00 */ li r29, 0x0
|
|
|
|
/* 8001B82C 0001766C 81 03 00 1C */ lwz r8, 0x1c(r3)
|
|
|
|
/* 8001B830 00017670 7C 7E 1B 78 */ mr r30, r3
|
|
|
|
/* 8001B834 00017674 6F A0 80 00 */ xoris r0, r29, 0x8000
|
|
|
|
/* 8001B838 00017678 6C 84 80 00 */ xoris r4, r4, 0x8000
|
|
|
|
/* 8001B83C 0001767C 7C 68 E8 10 */ subfc r3, r8, r29
|
|
|
|
/* 8001B840 00017680 7C FF 3B 78 */ mr r31, r7
|
|
|
|
/* 8001B844 00017684 7C 84 01 10 */ subfe r4, r4, r0
|
|
|
|
/* 8001B848 00017688 7C 80 01 10 */ subfe r4, r0, r0
|
|
|
|
/* 8001B84C 0001768C 7C 84 00 D1 */ neg. r4, r4
|
|
|
|
/* 8001B850 00017690 41 82 00 7C */ beq lbl_8001B8CC
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B854 00017694 48 00 A3 1D */ bl __OSGetSystemTime
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B858 00017698 83 9E 00 20 */ lwz r28, 0x20(r30)
|
|
|
|
/* 8001B85C 0001769C 6C 67 80 00 */ xoris r7, r3, 0x8000
|
|
|
|
/* 8001B860 000176A0 83 7E 00 24 */ lwz r27, 0x24(r30)
|
|
|
|
/* 8001B864 000176A4 6F 80 80 00 */ xoris r0, r28, 0x8000
|
|
|
|
/* 8001B868 000176A8 7F 85 E3 78 */ mr r5, r28
|
|
|
|
/* 8001B86C 000176AC 7C C4 D8 10 */ subfc r6, r4, r27
|
|
|
|
/* 8001B870 000176B0 7C E7 01 10 */ subfe r7, r7, r0
|
|
|
|
/* 8001B874 000176B4 7C E0 01 10 */ subfe r7, r0, r0
|
|
|
|
/* 8001B878 000176B8 7F 66 DB 78 */ mr r6, r27
|
|
|
|
/* 8001B87C 000176BC 7C E7 00 D1 */ neg. r7, r7
|
|
|
|
/* 8001B880 000176C0 41 82 00 4C */ beq lbl_8001B8CC
|
|
|
|
/* 8001B884 000176C4 83 5E 00 18 */ lwz r26, 0x18(r30)
|
|
|
|
/* 8001B888 000176C8 7C 9B 20 10 */ subfc r4, r27, r4
|
|
|
|
/* 8001B88C 000176CC 83 3E 00 1C */ lwz r25, 0x1c(r30)
|
|
|
|
/* 8001B890 000176D0 7C 7C 19 10 */ subfe r3, r28, r3
|
|
|
|
/* 8001B894 000176D4 7F 45 D3 78 */ mr r5, r26
|
|
|
|
/* 8001B898 000176D8 7F 26 CB 78 */ mr r6, r25
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B89C 000176DC 4B FE BB F1 */ bl __div2i
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B8A0 000176E0 38 00 00 01 */ li r0, 0x1
|
|
|
|
/* 8001B8A4 000176E4 7C 84 00 14 */ addc r4, r4, r0
|
|
|
|
/* 8001B8A8 000176E8 7C 19 20 16 */ mulhwu r0, r25, r4
|
|
|
|
/* 8001B8AC 000176EC 7C A3 E9 14 */ adde r5, r3, r29
|
|
|
|
/* 8001B8B0 000176F0 7C 7A 21 D6 */ mullw r3, r26, r4
|
|
|
|
/* 8001B8B4 000176F4 7C 99 21 D6 */ mullw r4, r25, r4
|
|
|
|
/* 8001B8B8 000176F8 7C 60 1A 14 */ add r3, r0, r3
|
|
|
|
/* 8001B8BC 000176FC 7C 19 29 D6 */ mullw r0, r25, r5
|
|
|
|
/* 8001B8C0 00017700 7C DB 20 14 */ addc r6, r27, r4
|
|
|
|
/* 8001B8C4 00017704 7C 03 02 14 */ add r0, r3, r0
|
|
|
|
/* 8001B8C8 00017708 7C BC 01 14 */ adde r5, r28, r0
|
|
|
|
.global lbl_8001B8CC
|
|
|
|
lbl_8001B8CC:
|
|
|
|
/* 8001B8CC 0001770C 93 FE 00 00 */ stw r31, 0x0(r30)
|
|
|
|
/* 8001B8D0 00017710 6C A0 80 00 */ xoris r0, r5, 0x8000
|
|
|
|
/* 8001B8D4 00017714 90 DE 00 0C */ stw r6, 0xc(r30)
|
|
|
|
/* 8001B8D8 00017718 90 BE 00 08 */ stw r5, 0x8(r30)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B8DC 0001771C 80 ED E3 A0 */ lwz r7, AlarmQueue@sda21(r13)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B8E0 00017720 48 00 00 C4 */ b lbl_8001B9A4
|
|
|
|
.global lbl_8001B8E4
|
|
|
|
lbl_8001B8E4:
|
|
|
|
/* 8001B8E4 00017724 80 67 00 08 */ lwz r3, 0x8(r7)
|
|
|
|
/* 8001B8E8 00017728 80 A7 00 0C */ lwz r5, 0xc(r7)
|
|
|
|
/* 8001B8EC 0001772C 6C 64 80 00 */ xoris r4, r3, 0x8000
|
|
|
|
/* 8001B8F0 00017730 7C 65 30 10 */ subfc r3, r5, r6
|
|
|
|
/* 8001B8F4 00017734 7C 84 01 10 */ subfe r4, r4, r0
|
|
|
|
/* 8001B8F8 00017738 7C 80 01 10 */ subfe r4, r0, r0
|
|
|
|
/* 8001B8FC 0001773C 7C 84 00 D1 */ neg. r4, r4
|
|
|
|
/* 8001B900 00017740 41 82 00 A0 */ beq lbl_8001B9A0
|
|
|
|
/* 8001B904 00017744 80 07 00 10 */ lwz r0, 0x10(r7)
|
|
|
|
/* 8001B908 00017748 90 1E 00 10 */ stw r0, 0x10(r30)
|
|
|
|
/* 8001B90C 0001774C 93 C7 00 10 */ stw r30, 0x10(r7)
|
|
|
|
/* 8001B910 00017750 80 7E 00 10 */ lwz r3, 0x10(r30)
|
|
|
|
/* 8001B914 00017754 90 FE 00 14 */ stw r7, 0x14(r30)
|
|
|
|
/* 8001B918 00017758 2C 03 00 00 */ cmpwi r3, 0x0
|
|
|
|
/* 8001B91C 0001775C 41 82 00 0C */ beq lbl_8001B928
|
|
|
|
/* 8001B920 00017760 93 C3 00 14 */ stw r30, 0x14(r3)
|
|
|
|
/* 8001B924 00017764 48 00 01 24 */ b lbl_8001BA48
|
|
|
|
.global lbl_8001B928
|
|
|
|
lbl_8001B928:
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B928 00017768 93 CD E3 A0 */ stw r30, AlarmQueue@sda21(r13)
|
|
|
|
/* 8001B92C 0001776C 48 00 A2 45 */ bl __OSGetSystemTime
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B930 00017770 80 BE 00 0C */ lwz r5, 0xc(r30)
|
|
|
|
/* 8001B934 00017774 38 E0 00 00 */ li r7, 0x0
|
|
|
|
/* 8001B938 00017778 80 1E 00 08 */ lwz r0, 0x8(r30)
|
|
|
|
/* 8001B93C 0001777C 6C E6 80 00 */ xoris r6, r7, 0x8000
|
|
|
|
/* 8001B940 00017780 7D 04 28 10 */ subfc r8, r4, r5
|
|
|
|
/* 8001B944 00017784 7C 03 01 10 */ subfe r0, r3, r0
|
|
|
|
/* 8001B948 00017788 6C 05 80 00 */ xoris r5, r0, 0x8000
|
|
|
|
/* 8001B94C 0001778C 7C 07 40 10 */ subfc r0, r7, r8
|
|
|
|
/* 8001B950 00017790 7C C6 29 10 */ subfe r6, r6, r5
|
|
|
|
/* 8001B954 00017794 7C C5 29 10 */ subfe r6, r5, r5
|
|
|
|
/* 8001B958 00017798 7C C6 00 D1 */ neg. r6, r6
|
|
|
|
/* 8001B95C 0001779C 41 82 00 10 */ beq lbl_8001B96C
|
|
|
|
/* 8001B960 000177A0 38 60 00 00 */ li r3, 0x0
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B964 000177A4 4B FF E7 AD */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B968 000177A8 48 00 00 E0 */ b lbl_8001BA48
|
|
|
|
.global lbl_8001B96C
|
|
|
|
lbl_8001B96C:
|
|
|
|
/* 8001B96C 000177AC 3C 80 80 00 */ lis r4, 0x8000
|
|
|
|
/* 8001B970 000177B0 6C E3 80 00 */ xoris r3, r7, 0x8000
|
|
|
|
/* 8001B974 000177B4 7C 04 40 10 */ subfc r0, r4, r8
|
|
|
|
/* 8001B978 000177B8 7C 63 29 10 */ subfe r3, r3, r5
|
|
|
|
/* 8001B97C 000177BC 7C 65 29 10 */ subfe r3, r5, r5
|
|
|
|
/* 8001B980 000177C0 7C 63 00 D1 */ neg. r3, r3
|
|
|
|
/* 8001B984 000177C4 41 82 00 10 */ beq lbl_8001B994
|
|
|
|
/* 8001B988 000177C8 7D 03 43 78 */ mr r3, r8
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B98C 000177CC 4B FF E7 85 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B990 000177D0 48 00 00 B8 */ b lbl_8001BA48
|
|
|
|
.global lbl_8001B994
|
|
|
|
lbl_8001B994:
|
|
|
|
/* 8001B994 000177D4 38 64 FF FF */ addi r3, r4, -0x1
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B998 000177D8 4B FF E7 79 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B99C 000177DC 48 00 00 AC */ b lbl_8001BA48
|
|
|
|
.global lbl_8001B9A0
|
|
|
|
lbl_8001B9A0:
|
|
|
|
/* 8001B9A0 000177E0 80 E7 00 14 */ lwz r7, 0x14(r7)
|
|
|
|
.global lbl_8001B9A4
|
|
|
|
lbl_8001B9A4:
|
|
|
|
/* 8001B9A4 000177E4 2C 07 00 00 */ cmpwi r7, 0x0
|
|
|
|
/* 8001B9A8 000177E8 40 82 FF 3C */ bne lbl_8001B8E4
|
|
|
|
/* 8001B9AC 000177EC 3B E0 00 00 */ li r31, 0x0
|
|
|
|
/* 8001B9B0 000177F0 93 FE 00 14 */ stw r31, 0x14(r30)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B9B4 000177F4 38 6D E3 A0 */ addi r3, r13, AlarmQueue@sda21
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B9B8 000177F8 80 83 00 04 */ lwz r4, 0x4(r3)
|
|
|
|
/* 8001B9BC 000177FC 93 C3 00 04 */ stw r30, 0x4(r3)
|
|
|
|
/* 8001B9C0 00017800 2C 04 00 00 */ cmpwi r4, 0x0
|
|
|
|
/* 8001B9C4 00017804 90 9E 00 10 */ stw r4, 0x10(r30)
|
|
|
|
/* 8001B9C8 00017808 41 82 00 0C */ beq lbl_8001B9D4
|
|
|
|
/* 8001B9CC 0001780C 93 C4 00 14 */ stw r30, 0x14(r4)
|
|
|
|
/* 8001B9D0 00017810 48 00 00 78 */ b lbl_8001BA48
|
|
|
|
.global lbl_8001B9D4
|
|
|
|
lbl_8001B9D4:
|
|
|
|
/* 8001B9D4 00017814 93 C3 00 04 */ stw r30, 0x4(r3)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001B9D8 00017818 93 CD E3 A0 */ stw r30, AlarmQueue@sda21(r13)
|
|
|
|
/* 8001B9DC 0001781C 48 00 A1 95 */ bl __OSGetSystemTime
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001B9E0 00017820 80 BE 00 0C */ lwz r5, 0xc(r30)
|
|
|
|
/* 8001B9E4 00017824 6F E6 80 00 */ xoris r6, r31, 0x8000
|
|
|
|
/* 8001B9E8 00017828 80 1E 00 08 */ lwz r0, 0x8(r30)
|
|
|
|
/* 8001B9EC 0001782C 7C E4 28 10 */ subfc r7, r4, r5
|
|
|
|
/* 8001B9F0 00017830 7C 03 01 10 */ subfe r0, r3, r0
|
|
|
|
/* 8001B9F4 00017834 6C 05 80 00 */ xoris r5, r0, 0x8000
|
|
|
|
/* 8001B9F8 00017838 7C 1F 38 10 */ subfc r0, r31, r7
|
|
|
|
/* 8001B9FC 0001783C 7C C6 29 10 */ subfe r6, r6, r5
|
|
|
|
/* 8001BA00 00017840 7C C5 29 10 */ subfe r6, r5, r5
|
|
|
|
/* 8001BA04 00017844 7C C6 00 D1 */ neg. r6, r6
|
|
|
|
/* 8001BA08 00017848 41 82 00 10 */ beq lbl_8001BA18
|
|
|
|
/* 8001BA0C 0001784C 38 60 00 00 */ li r3, 0x0
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BA10 00017850 4B FF E7 01 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BA14 00017854 48 00 00 34 */ b lbl_8001BA48
|
|
|
|
.global lbl_8001BA18
|
|
|
|
lbl_8001BA18:
|
|
|
|
/* 8001BA18 00017858 3C 80 80 00 */ lis r4, 0x8000
|
|
|
|
/* 8001BA1C 0001785C 6F E3 80 00 */ xoris r3, r31, 0x8000
|
|
|
|
/* 8001BA20 00017860 7C 04 38 10 */ subfc r0, r4, r7
|
|
|
|
/* 8001BA24 00017864 7C 63 29 10 */ subfe r3, r3, r5
|
|
|
|
/* 8001BA28 00017868 7C 65 29 10 */ subfe r3, r5, r5
|
|
|
|
/* 8001BA2C 0001786C 7C 63 00 D1 */ neg. r3, r3
|
|
|
|
/* 8001BA30 00017870 41 82 00 10 */ beq lbl_8001BA40
|
|
|
|
/* 8001BA34 00017874 7C E3 3B 78 */ mr r3, r7
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BA38 00017878 4B FF E6 D9 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BA3C 0001787C 48 00 00 0C */ b lbl_8001BA48
|
|
|
|
.global lbl_8001BA40
|
|
|
|
lbl_8001BA40:
|
|
|
|
/* 8001BA40 00017880 38 64 FF FF */ addi r3, r4, -0x1
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BA44 00017884 4B FF E6 CD */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001BA48
|
|
|
|
lbl_8001BA48:
|
|
|
|
/* 8001BA48 00017888 39 61 00 30 */ addi r11, r1, 0x30
|
|
|
|
/* 8001BA4C 0001788C 4B FE B9 35 */ bl lbl_80007380
|
|
|
|
/* 8001BA50 00017890 80 01 00 34 */ lwz r0, 0x34(r1)
|
|
|
|
/* 8001BA54 00017894 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8001BA58 00017898 38 21 00 30 */ addi r1, r1, 0x30
|
|
|
|
/* 8001BA5C 0001789C 4E 80 00 20 */ blr
|
2022-10-16 16:31:36 +00:00
|
|
|
.global OSSetAlarm
|
|
|
|
OSSetAlarm:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BA60 000178A0 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
|
|
/* 8001BA64 000178A4 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 8001BA68 000178A8 90 01 00 24 */ stw r0, 0x24(r1)
|
|
|
|
/* 8001BA6C 000178AC 39 61 00 20 */ addi r11, r1, 0x20
|
|
|
|
/* 8001BA70 000178B0 4B FE B8 CD */ bl lbl_8000733C
|
|
|
|
/* 8001BA74 000178B4 7C 7B 1B 78 */ mr r27, r3
|
|
|
|
/* 8001BA78 000178B8 7C BD 2B 78 */ mr r29, r5
|
|
|
|
/* 8001BA7C 000178BC 7C DC 33 78 */ mr r28, r6
|
|
|
|
/* 8001BA80 000178C0 7C FE 3B 78 */ mr r30, r7
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BA84 000178C4 48 00 5D 9D */ bl OSDisableInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BA88 000178C8 38 00 00 00 */ li r0, 0x0
|
|
|
|
/* 8001BA8C 000178CC 90 1B 00 1C */ stw r0, 0x1c(r27)
|
|
|
|
/* 8001BA90 000178D0 7C 7F 1B 78 */ mr r31, r3
|
|
|
|
/* 8001BA94 000178D4 90 1B 00 18 */ stw r0, 0x18(r27)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BA98 000178D8 48 00 A0 D9 */ bl __OSGetSystemTime
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BA9C 000178DC 7C DC 20 14 */ addc r6, r28, r4
|
|
|
|
/* 8001BAA0 000178E0 7F C7 F3 78 */ mr r7, r30
|
|
|
|
/* 8001BAA4 000178E4 7C BD 19 14 */ adde r5, r29, r3
|
|
|
|
/* 8001BAA8 000178E8 7F 63 DB 78 */ mr r3, r27
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BAAC 000178EC 4B FF FD 65 */ bl InsertAlarm
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BAB0 000178F0 7F E3 FB 78 */ mr r3, r31
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BAB4 000178F4 48 00 5D AD */ bl OSRestoreInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BAB8 000178F8 39 61 00 20 */ addi r11, r1, 0x20
|
|
|
|
/* 8001BABC 000178FC 4B FE B8 CD */ bl lbl_80007388
|
|
|
|
/* 8001BAC0 00017900 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
|
|
/* 8001BAC4 00017904 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8001BAC8 00017908 38 21 00 20 */ addi r1, r1, 0x20
|
|
|
|
/* 8001BACC 0001790C 4E 80 00 20 */ blr
|
2022-10-16 16:31:36 +00:00
|
|
|
.global OSSetPeriodicAlarm
|
|
|
|
OSSetPeriodicAlarm:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BAD0 00017910 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
|
|
/* 8001BAD4 00017914 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 8001BAD8 00017918 90 01 00 24 */ stw r0, 0x24(r1)
|
|
|
|
/* 8001BADC 0001791C 39 61 00 20 */ addi r11, r1, 0x20
|
|
|
|
/* 8001BAE0 00017920 4B FE B8 59 */ bl lbl_80007338
|
|
|
|
/* 8001BAE4 00017924 7C 7A 1B 78 */ mr r26, r3
|
|
|
|
/* 8001BAE8 00017928 7C BC 2B 78 */ mr r28, r5
|
|
|
|
/* 8001BAEC 0001792C 7C DB 33 78 */ mr r27, r6
|
|
|
|
/* 8001BAF0 00017930 7C FD 3B 78 */ mr r29, r7
|
|
|
|
/* 8001BAF4 00017934 7D 1F 43 78 */ mr r31, r8
|
|
|
|
/* 8001BAF8 00017938 7D 3E 4B 78 */ mr r30, r9
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BAFC 0001793C 48 00 5D 25 */ bl OSDisableInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BB00 00017940 93 FA 00 1C */ stw r31, 0x1c(r26)
|
|
|
|
/* 8001BB04 00017944 7C 7F 1B 78 */ mr r31, r3
|
|
|
|
/* 8001BB08 00017948 7F 64 DB 78 */ mr r4, r27
|
|
|
|
/* 8001BB0C 0001794C 7F 83 E3 78 */ mr r3, r28
|
|
|
|
/* 8001BB10 00017950 93 BA 00 18 */ stw r29, 0x18(r26)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BB14 00017954 48 00 A0 CD */ bl __OSTimeToSystemTime
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BB18 00017958 90 7A 00 20 */ stw r3, 0x20(r26)
|
|
|
|
/* 8001BB1C 0001795C 7F 43 D3 78 */ mr r3, r26
|
|
|
|
/* 8001BB20 00017960 7F C7 F3 78 */ mr r7, r30
|
|
|
|
/* 8001BB24 00017964 38 C0 00 00 */ li r6, 0x0
|
|
|
|
/* 8001BB28 00017968 90 9A 00 24 */ stw r4, 0x24(r26)
|
|
|
|
/* 8001BB2C 0001796C 38 A0 00 00 */ li r5, 0x0
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BB30 00017970 4B FF FC E1 */ bl InsertAlarm
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BB34 00017974 7F E3 FB 78 */ mr r3, r31
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BB38 00017978 48 00 5D 29 */ bl OSRestoreInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BB3C 0001797C 39 61 00 20 */ addi r11, r1, 0x20
|
|
|
|
/* 8001BB40 00017980 4B FE B8 45 */ bl lbl_80007384
|
|
|
|
/* 8001BB44 00017984 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
|
|
/* 8001BB48 00017988 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8001BB4C 0001798C 38 21 00 20 */ addi r1, r1, 0x20
|
|
|
|
/* 8001BB50 00017990 4E 80 00 20 */ blr
|
|
|
|
/* 8001BB54 00017994 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 8001BB58 00017998 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 8001BB5C 0001799C 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global OSCancelAlarm
|
|
|
|
OSCancelAlarm:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BB60 000179A0 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
|
|
/* 8001BB64 000179A4 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 8001BB68 000179A8 90 01 00 24 */ stw r0, 0x24(r1)
|
|
|
|
/* 8001BB6C 000179AC 93 E1 00 1C */ stw r31, 0x1c(r1)
|
|
|
|
/* 8001BB70 000179B0 93 C1 00 18 */ stw r30, 0x18(r1)
|
|
|
|
/* 8001BB74 000179B4 7C 7E 1B 78 */ mr r30, r3
|
|
|
|
/* 8001BB78 000179B8 93 A1 00 14 */ stw r29, 0x14(r1)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BB7C 000179BC 48 00 5C A5 */ bl OSDisableInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BB80 000179C0 80 1E 00 00 */ lwz r0, 0x0(r30)
|
|
|
|
/* 8001BB84 000179C4 7C 7F 1B 78 */ mr r31, r3
|
|
|
|
/* 8001BB88 000179C8 2C 00 00 00 */ cmpwi r0, 0x0
|
|
|
|
/* 8001BB8C 000179CC 40 82 00 0C */ bne lbl_8001BB98
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BB90 000179D0 48 00 5C D1 */ bl OSRestoreInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BB94 000179D4 48 00 00 C8 */ b lbl_8001BC5C
|
|
|
|
.global lbl_8001BB98
|
|
|
|
lbl_8001BB98:
|
|
|
|
/* 8001BB98 000179D8 83 BE 00 14 */ lwz r29, 0x14(r30)
|
|
|
|
/* 8001BB9C 000179DC 2C 1D 00 00 */ cmpwi r29, 0x0
|
|
|
|
/* 8001BBA0 000179E0 40 82 00 14 */ bne lbl_8001BBB4
|
|
|
|
/* 8001BBA4 000179E4 80 1E 00 10 */ lwz r0, 0x10(r30)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BBA8 000179E8 38 6D E3 A0 */ addi r3, r13, AlarmQueue@sda21
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BBAC 000179EC 90 03 00 04 */ stw r0, 0x4(r3)
|
|
|
|
/* 8001BBB0 000179F0 48 00 00 0C */ b lbl_8001BBBC
|
|
|
|
.global lbl_8001BBB4
|
|
|
|
lbl_8001BBB4:
|
|
|
|
/* 8001BBB4 000179F4 80 1E 00 10 */ lwz r0, 0x10(r30)
|
|
|
|
/* 8001BBB8 000179F8 90 1D 00 10 */ stw r0, 0x10(r29)
|
|
|
|
.global lbl_8001BBBC
|
|
|
|
lbl_8001BBBC:
|
|
|
|
/* 8001BBBC 000179FC 80 7E 00 10 */ lwz r3, 0x10(r30)
|
|
|
|
/* 8001BBC0 00017A00 2C 03 00 00 */ cmpwi r3, 0x0
|
|
|
|
/* 8001BBC4 00017A04 41 82 00 0C */ beq lbl_8001BBD0
|
|
|
|
/* 8001BBC8 00017A08 93 A3 00 14 */ stw r29, 0x14(r3)
|
|
|
|
/* 8001BBCC 00017A0C 48 00 00 80 */ b lbl_8001BC4C
|
|
|
|
.global lbl_8001BBD0
|
|
|
|
lbl_8001BBD0:
|
|
|
|
/* 8001BBD0 00017A10 2C 1D 00 00 */ cmpwi r29, 0x0
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BBD4 00017A14 93 AD E3 A0 */ stw r29, AlarmQueue@sda21(r13)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BBD8 00017A18 41 82 00 74 */ beq lbl_8001BC4C
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BBDC 00017A1C 48 00 9F 95 */ bl __OSGetSystemTime
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BBE0 00017A20 80 BD 00 0C */ lwz r5, 0xc(r29)
|
|
|
|
/* 8001BBE4 00017A24 38 E0 00 00 */ li r7, 0x0
|
|
|
|
/* 8001BBE8 00017A28 80 1D 00 08 */ lwz r0, 0x8(r29)
|
|
|
|
/* 8001BBEC 00017A2C 6C E6 80 00 */ xoris r6, r7, 0x8000
|
|
|
|
/* 8001BBF0 00017A30 7D 04 28 10 */ subfc r8, r4, r5
|
|
|
|
/* 8001BBF4 00017A34 7C 03 01 10 */ subfe r0, r3, r0
|
|
|
|
/* 8001BBF8 00017A38 6C 05 80 00 */ xoris r5, r0, 0x8000
|
|
|
|
/* 8001BBFC 00017A3C 7C 07 40 10 */ subfc r0, r7, r8
|
|
|
|
/* 8001BC00 00017A40 7C C6 29 10 */ subfe r6, r6, r5
|
|
|
|
/* 8001BC04 00017A44 7C C5 29 10 */ subfe r6, r5, r5
|
|
|
|
/* 8001BC08 00017A48 7C C6 00 D1 */ neg. r6, r6
|
|
|
|
/* 8001BC0C 00017A4C 41 82 00 10 */ beq lbl_8001BC1C
|
|
|
|
/* 8001BC10 00017A50 38 60 00 00 */ li r3, 0x0
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BC14 00017A54 4B FF E4 FD */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BC18 00017A58 48 00 00 34 */ b lbl_8001BC4C
|
|
|
|
.global lbl_8001BC1C
|
|
|
|
lbl_8001BC1C:
|
|
|
|
/* 8001BC1C 00017A5C 3C 80 80 00 */ lis r4, 0x8000
|
|
|
|
/* 8001BC20 00017A60 6C E3 80 00 */ xoris r3, r7, 0x8000
|
|
|
|
/* 8001BC24 00017A64 7C 04 40 10 */ subfc r0, r4, r8
|
|
|
|
/* 8001BC28 00017A68 7C 63 29 10 */ subfe r3, r3, r5
|
|
|
|
/* 8001BC2C 00017A6C 7C 65 29 10 */ subfe r3, r5, r5
|
|
|
|
/* 8001BC30 00017A70 7C 63 00 D1 */ neg. r3, r3
|
|
|
|
/* 8001BC34 00017A74 41 82 00 10 */ beq lbl_8001BC44
|
|
|
|
/* 8001BC38 00017A78 7D 03 43 78 */ mr r3, r8
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BC3C 00017A7C 4B FF E4 D5 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BC40 00017A80 48 00 00 0C */ b lbl_8001BC4C
|
|
|
|
.global lbl_8001BC44
|
|
|
|
lbl_8001BC44:
|
|
|
|
/* 8001BC44 00017A84 38 64 FF FF */ addi r3, r4, -0x1
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BC48 00017A88 4B FF E4 C9 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001BC4C
|
|
|
|
lbl_8001BC4C:
|
|
|
|
/* 8001BC4C 00017A8C 38 00 00 00 */ li r0, 0x0
|
|
|
|
/* 8001BC50 00017A90 90 1E 00 00 */ stw r0, 0x0(r30)
|
|
|
|
/* 8001BC54 00017A94 7F E3 FB 78 */ mr r3, r31
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BC58 00017A98 48 00 5C 09 */ bl OSRestoreInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001BC5C
|
|
|
|
lbl_8001BC5C:
|
|
|
|
/* 8001BC5C 00017A9C 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
|
|
/* 8001BC60 00017AA0 83 E1 00 1C */ lwz r31, 0x1c(r1)
|
|
|
|
/* 8001BC64 00017AA4 83 C1 00 18 */ lwz r30, 0x18(r1)
|
|
|
|
/* 8001BC68 00017AA8 83 A1 00 14 */ lwz r29, 0x14(r1)
|
|
|
|
/* 8001BC6C 00017AAC 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8001BC70 00017AB0 38 21 00 20 */ addi r1, r1, 0x20
|
|
|
|
/* 8001BC74 00017AB4 4E 80 00 20 */ blr
|
|
|
|
/* 8001BC78 00017AB8 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 8001BC7C 00017ABC 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global DecrementerExceptionCallback
|
|
|
|
DecrementerExceptionCallback:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BC80 00017AC0 94 21 FD 20 */ stwu r1, -0x2e0(r1)
|
|
|
|
/* 8001BC84 00017AC4 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 8001BC88 00017AC8 90 01 02 E4 */ stw r0, 0x2e4(r1)
|
|
|
|
/* 8001BC8C 00017ACC 93 E1 02 DC */ stw r31, 0x2dc(r1)
|
|
|
|
/* 8001BC90 00017AD0 93 C1 02 D8 */ stw r30, 0x2d8(r1)
|
|
|
|
/* 8001BC94 00017AD4 93 A1 02 D4 */ stw r29, 0x2d4(r1)
|
|
|
|
/* 8001BC98 00017AD8 7C 9D 23 78 */ mr r29, r4
|
|
|
|
/* 8001BC9C 00017ADC 93 81 02 D0 */ stw r28, 0x2d0(r1)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BCA0 00017AE0 48 00 9E D1 */ bl __OSGetSystemTime
|
|
|
|
/* 8001BCA4 00017AE4 83 ED E3 A0 */ lwz r31, AlarmQueue@sda21(r13)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BCA8 00017AE8 7C 9C 23 78 */ mr r28, r4
|
|
|
|
/* 8001BCAC 00017AEC 7C 7E 1B 78 */ mr r30, r3
|
|
|
|
/* 8001BCB0 00017AF0 2C 1F 00 00 */ cmpwi r31, 0x0
|
|
|
|
/* 8001BCB4 00017AF4 40 82 00 0C */ bne lbl_8001BCC0
|
|
|
|
/* 8001BCB8 00017AF8 7F A3 EB 78 */ mr r3, r29
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BCBC 00017AFC 48 00 16 35 */ bl OSLoadContext
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001BCC0
|
|
|
|
lbl_8001BCC0:
|
|
|
|
/* 8001BCC0 00017B00 80 7F 00 08 */ lwz r3, 0x8(r31)
|
|
|
|
/* 8001BCC4 00017B04 6F C0 80 00 */ xoris r0, r30, 0x8000
|
|
|
|
/* 8001BCC8 00017B08 80 BF 00 0C */ lwz r5, 0xc(r31)
|
|
|
|
/* 8001BCCC 00017B0C 6C 64 80 00 */ xoris r4, r3, 0x8000
|
|
|
|
/* 8001BCD0 00017B10 7C 65 E0 10 */ subfc r3, r5, r28
|
|
|
|
/* 8001BCD4 00017B14 7C 84 01 10 */ subfe r4, r4, r0
|
|
|
|
/* 8001BCD8 00017B18 7C 80 01 10 */ subfe r4, r0, r0
|
|
|
|
/* 8001BCDC 00017B1C 7C 84 00 D1 */ neg. r4, r4
|
|
|
|
/* 8001BCE0 00017B20 41 82 00 7C */ beq lbl_8001BD5C
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BCE4 00017B24 48 00 9E 8D */ bl __OSGetSystemTime
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BCE8 00017B28 80 BF 00 0C */ lwz r5, 0xc(r31)
|
|
|
|
/* 8001BCEC 00017B2C 38 E0 00 00 */ li r7, 0x0
|
|
|
|
/* 8001BCF0 00017B30 80 1F 00 08 */ lwz r0, 0x8(r31)
|
|
|
|
/* 8001BCF4 00017B34 6C E6 80 00 */ xoris r6, r7, 0x8000
|
|
|
|
/* 8001BCF8 00017B38 7D 04 28 10 */ subfc r8, r4, r5
|
|
|
|
/* 8001BCFC 00017B3C 7C 03 01 10 */ subfe r0, r3, r0
|
|
|
|
/* 8001BD00 00017B40 6C 05 80 00 */ xoris r5, r0, 0x8000
|
|
|
|
/* 8001BD04 00017B44 7C 07 40 10 */ subfc r0, r7, r8
|
|
|
|
/* 8001BD08 00017B48 7C C6 29 10 */ subfe r6, r6, r5
|
|
|
|
/* 8001BD0C 00017B4C 7C C5 29 10 */ subfe r6, r5, r5
|
|
|
|
/* 8001BD10 00017B50 7C C6 00 D1 */ neg. r6, r6
|
|
|
|
/* 8001BD14 00017B54 41 82 00 10 */ beq lbl_8001BD24
|
|
|
|
/* 8001BD18 00017B58 38 60 00 00 */ li r3, 0x0
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BD1C 00017B5C 4B FF E3 F5 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BD20 00017B60 48 00 00 34 */ b lbl_8001BD54
|
|
|
|
.global lbl_8001BD24
|
|
|
|
lbl_8001BD24:
|
|
|
|
/* 8001BD24 00017B64 3C 80 80 00 */ lis r4, 0x8000
|
|
|
|
/* 8001BD28 00017B68 6C E3 80 00 */ xoris r3, r7, 0x8000
|
|
|
|
/* 8001BD2C 00017B6C 7C 04 40 10 */ subfc r0, r4, r8
|
|
|
|
/* 8001BD30 00017B70 7C 63 29 10 */ subfe r3, r3, r5
|
|
|
|
/* 8001BD34 00017B74 7C 65 29 10 */ subfe r3, r5, r5
|
|
|
|
/* 8001BD38 00017B78 7C 63 00 D1 */ neg. r3, r3
|
|
|
|
/* 8001BD3C 00017B7C 41 82 00 10 */ beq lbl_8001BD4C
|
|
|
|
/* 8001BD40 00017B80 7D 03 43 78 */ mr r3, r8
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BD44 00017B84 4B FF E3 CD */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BD48 00017B88 48 00 00 0C */ b lbl_8001BD54
|
|
|
|
.global lbl_8001BD4C
|
|
|
|
lbl_8001BD4C:
|
|
|
|
/* 8001BD4C 00017B8C 38 64 FF FF */ addi r3, r4, -0x1
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BD50 00017B90 4B FF E3 C1 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001BD54
|
|
|
|
lbl_8001BD54:
|
|
|
|
/* 8001BD54 00017B94 7F A3 EB 78 */ mr r3, r29
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BD58 00017B98 48 00 15 99 */ bl OSLoadContext
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001BD5C
|
|
|
|
lbl_8001BD5C:
|
|
|
|
/* 8001BD5C 00017B9C 80 7F 00 14 */ lwz r3, 0x14(r31)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BD60 00017BA0 90 6D E3 A0 */ stw r3, AlarmQueue@sda21(r13)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BD64 00017BA4 2C 03 00 00 */ cmpwi r3, 0x0
|
|
|
|
/* 8001BD68 00017BA8 40 82 00 14 */ bne lbl_8001BD7C
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BD6C 00017BAC 38 6D E3 A0 */ addi r3, r13, AlarmQueue@sda21
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BD70 00017BB0 38 00 00 00 */ li r0, 0x0
|
|
|
|
/* 8001BD74 00017BB4 90 03 00 04 */ stw r0, 0x4(r3)
|
|
|
|
/* 8001BD78 00017BB8 48 00 00 0C */ b lbl_8001BD84
|
|
|
|
.global lbl_8001BD7C
|
|
|
|
lbl_8001BD7C:
|
|
|
|
/* 8001BD7C 00017BBC 38 00 00 00 */ li r0, 0x0
|
|
|
|
/* 8001BD80 00017BC0 90 03 00 10 */ stw r0, 0x10(r3)
|
|
|
|
.global lbl_8001BD84
|
|
|
|
lbl_8001BD84:
|
|
|
|
/* 8001BD84 00017BC4 83 DF 00 00 */ lwz r30, 0x0(r31)
|
|
|
|
/* 8001BD88 00017BC8 38 C0 00 00 */ li r6, 0x0
|
|
|
|
/* 8001BD8C 00017BCC 6C C0 80 00 */ xoris r0, r6, 0x8000
|
|
|
|
/* 8001BD90 00017BD0 90 DF 00 00 */ stw r6, 0x0(r31)
|
|
|
|
/* 8001BD94 00017BD4 80 7F 00 18 */ lwz r3, 0x18(r31)
|
|
|
|
/* 8001BD98 00017BD8 80 BF 00 1C */ lwz r5, 0x1c(r31)
|
|
|
|
/* 8001BD9C 00017BDC 6C 64 80 00 */ xoris r4, r3, 0x8000
|
|
|
|
/* 8001BDA0 00017BE0 7C 65 30 10 */ subfc r3, r5, r6
|
|
|
|
/* 8001BDA4 00017BE4 7C 84 01 10 */ subfe r4, r4, r0
|
|
|
|
/* 8001BDA8 00017BE8 7C 80 01 10 */ subfe r4, r0, r0
|
|
|
|
/* 8001BDAC 00017BEC 7C 84 00 D1 */ neg. r4, r4
|
|
|
|
/* 8001BDB0 00017BF0 41 82 00 18 */ beq lbl_8001BDC8
|
|
|
|
/* 8001BDB4 00017BF4 7F E3 FB 78 */ mr r3, r31
|
|
|
|
/* 8001BDB8 00017BF8 7F C7 F3 78 */ mr r7, r30
|
|
|
|
/* 8001BDBC 00017BFC 38 C0 00 00 */ li r6, 0x0
|
|
|
|
/* 8001BDC0 00017C00 38 A0 00 00 */ li r5, 0x0
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BDC4 00017C04 4B FF FA 4D */ bl InsertAlarm
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001BDC8
|
|
|
|
lbl_8001BDC8:
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BDC8 00017C08 83 8D E3 A0 */ lwz r28, AlarmQueue@sda21(r13)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BDCC 00017C0C 2C 1C 00 00 */ cmpwi r28, 0x0
|
|
|
|
/* 8001BDD0 00017C10 41 82 00 74 */ beq lbl_8001BE44
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BDD4 00017C14 48 00 9D 9D */ bl __OSGetSystemTime
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BDD8 00017C18 80 BC 00 0C */ lwz r5, 0xc(r28)
|
|
|
|
/* 8001BDDC 00017C1C 38 E0 00 00 */ li r7, 0x0
|
|
|
|
/* 8001BDE0 00017C20 80 1C 00 08 */ lwz r0, 0x8(r28)
|
|
|
|
/* 8001BDE4 00017C24 6C E6 80 00 */ xoris r6, r7, 0x8000
|
|
|
|
/* 8001BDE8 00017C28 7D 04 28 10 */ subfc r8, r4, r5
|
|
|
|
/* 8001BDEC 00017C2C 7C 03 01 10 */ subfe r0, r3, r0
|
|
|
|
/* 8001BDF0 00017C30 6C 05 80 00 */ xoris r5, r0, 0x8000
|
|
|
|
/* 8001BDF4 00017C34 7C 07 40 10 */ subfc r0, r7, r8
|
|
|
|
/* 8001BDF8 00017C38 7C C6 29 10 */ subfe r6, r6, r5
|
|
|
|
/* 8001BDFC 00017C3C 7C C5 29 10 */ subfe r6, r5, r5
|
|
|
|
/* 8001BE00 00017C40 7C C6 00 D1 */ neg. r6, r6
|
|
|
|
/* 8001BE04 00017C44 41 82 00 10 */ beq lbl_8001BE14
|
|
|
|
/* 8001BE08 00017C48 38 60 00 00 */ li r3, 0x0
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BE0C 00017C4C 4B FF E3 05 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BE10 00017C50 48 00 00 34 */ b lbl_8001BE44
|
|
|
|
.global lbl_8001BE14
|
|
|
|
lbl_8001BE14:
|
|
|
|
/* 8001BE14 00017C54 3C 80 80 00 */ lis r4, 0x8000
|
|
|
|
/* 8001BE18 00017C58 6C E3 80 00 */ xoris r3, r7, 0x8000
|
|
|
|
/* 8001BE1C 00017C5C 7C 04 40 10 */ subfc r0, r4, r8
|
|
|
|
/* 8001BE20 00017C60 7C 63 29 10 */ subfe r3, r3, r5
|
|
|
|
/* 8001BE24 00017C64 7C 65 29 10 */ subfe r3, r5, r5
|
|
|
|
/* 8001BE28 00017C68 7C 63 00 D1 */ neg. r3, r3
|
|
|
|
/* 8001BE2C 00017C6C 41 82 00 10 */ beq lbl_8001BE3C
|
|
|
|
/* 8001BE30 00017C70 7D 03 43 78 */ mr r3, r8
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BE34 00017C74 4B FF E2 DD */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BE38 00017C78 48 00 00 0C */ b lbl_8001BE44
|
|
|
|
.global lbl_8001BE3C
|
|
|
|
lbl_8001BE3C:
|
|
|
|
/* 8001BE3C 00017C7C 38 64 FF FF */ addi r3, r4, -0x1
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BE40 00017C80 4B FF E2 D1 */ bl PPCMtdec
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001BE44
|
|
|
|
lbl_8001BE44:
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BE44 00017C84 48 00 89 4D */ bl OSDisableScheduler
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BE48 00017C88 38 61 00 08 */ addi r3, r1, 0x8
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BE4C 00017C8C 48 00 15 F5 */ bl OSClearContext
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BE50 00017C90 38 61 00 08 */ addi r3, r1, 0x8
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BE54 00017C94 48 00 13 AD */ bl OSSetCurrentContext
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BE58 00017C98 7F CC F3 78 */ mr r12, r30
|
|
|
|
/* 8001BE5C 00017C9C 7F E3 FB 78 */ mr r3, r31
|
|
|
|
/* 8001BE60 00017CA0 7F A4 EB 78 */ mr r4, r29
|
|
|
|
/* 8001BE64 00017CA4 7D 89 03 A6 */ mtctr r12
|
|
|
|
/* 8001BE68 00017CA8 4E 80 04 21 */ bctrl
|
|
|
|
/* 8001BE6C 00017CAC 38 61 00 08 */ addi r3, r1, 0x8
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BE70 00017CB0 48 00 15 D1 */ bl OSClearContext
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BE74 00017CB4 7F A3 EB 78 */ mr r3, r29
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BE78 00017CB8 48 00 13 89 */ bl OSSetCurrentContext
|
|
|
|
/* 8001BE7C 00017CBC 48 00 89 55 */ bl OSEnableScheduler
|
|
|
|
/* 8001BE80 00017CC0 48 00 8E 71 */ bl __OSReschedule
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BE84 00017CC4 7F A3 EB 78 */ mr r3, r29
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BE88 00017CC8 48 00 14 69 */ bl OSLoadContext
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BE8C 00017CCC 80 01 02 E4 */ lwz r0, 0x2e4(r1)
|
|
|
|
/* 8001BE90 00017CD0 83 E1 02 DC */ lwz r31, 0x2dc(r1)
|
|
|
|
/* 8001BE94 00017CD4 83 C1 02 D8 */ lwz r30, 0x2d8(r1)
|
|
|
|
/* 8001BE98 00017CD8 83 A1 02 D4 */ lwz r29, 0x2d4(r1)
|
|
|
|
/* 8001BE9C 00017CDC 83 81 02 D0 */ lwz r28, 0x2d0(r1)
|
|
|
|
/* 8001BEA0 00017CE0 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8001BEA4 00017CE4 38 21 02 E0 */ addi r1, r1, 0x2e0
|
|
|
|
/* 8001BEA8 00017CE8 4E 80 00 20 */ blr
|
|
|
|
/* 8001BEAC 00017CEC 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global DecrementerExceptionHandler
|
|
|
|
DecrementerExceptionHandler:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BEB0 00017CF0 90 04 00 00 */ stw r0, 0x0(r4)
|
|
|
|
/* 8001BEB4 00017CF4 90 24 00 04 */ stw r1, 0x4(r4)
|
|
|
|
/* 8001BEB8 00017CF8 90 44 00 08 */ stw r2, 0x8(r4)
|
|
|
|
/* 8001BEBC 00017CFC BC C4 00 18 */ stmw r6, 0x18(r4)
|
|
|
|
/* 8001BEC0 00017D00 7C 11 E2 A6 */ mfspr r0, GQR1
|
|
|
|
/* 8001BEC4 00017D04 90 04 01 A8 */ stw r0, 0x1a8(r4)
|
|
|
|
/* 8001BEC8 00017D08 7C 12 E2 A6 */ mfspr r0, GQR2
|
|
|
|
/* 8001BECC 00017D0C 90 04 01 AC */ stw r0, 0x1ac(r4)
|
|
|
|
/* 8001BED0 00017D10 7C 13 E2 A6 */ mfspr r0, GQR3
|
|
|
|
/* 8001BED4 00017D14 90 04 01 B0 */ stw r0, 0x1b0(r4)
|
|
|
|
/* 8001BED8 00017D18 7C 14 E2 A6 */ mfspr r0, GQR4
|
|
|
|
/* 8001BEDC 00017D1C 90 04 01 B4 */ stw r0, 0x1b4(r4)
|
|
|
|
/* 8001BEE0 00017D20 7C 15 E2 A6 */ mfspr r0, GQR5
|
|
|
|
/* 8001BEE4 00017D24 90 04 01 B8 */ stw r0, 0x1b8(r4)
|
|
|
|
/* 8001BEE8 00017D28 7C 16 E2 A6 */ mfspr r0, GQR6
|
|
|
|
/* 8001BEEC 00017D2C 90 04 01 BC */ stw r0, 0x1bc(r4)
|
|
|
|
/* 8001BEF0 00017D30 7C 17 E2 A6 */ mfspr r0, GQR7
|
|
|
|
/* 8001BEF4 00017D34 90 04 01 C0 */ stw r0, 0x1c0(r4)
|
|
|
|
/* 8001BEF8 00017D38 94 21 FF F8 */ stwu r1, -0x8(r1)
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BEFC 00017D3C 4B FF FD 84 */ b DecrementerExceptionCallback
|
2022-10-16 16:05:58 +00:00
|
|
|
|
2022-10-16 16:31:36 +00:00
|
|
|
.global OnReset
|
|
|
|
OnReset:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BF00 00017D40 94 21 FF F0 */ stwu r1, -0x10(r1)
|
|
|
|
/* 8001BF04 00017D44 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 8001BF08 00017D48 2C 03 00 00 */ cmpwi r3, 0x0
|
|
|
|
/* 8001BF0C 00017D4C 90 01 00 14 */ stw r0, 0x14(r1)
|
|
|
|
/* 8001BF10 00017D50 93 E1 00 0C */ stw r31, 0xc(r1)
|
|
|
|
/* 8001BF14 00017D54 93 C1 00 08 */ stw r30, 0x8(r1)
|
|
|
|
/* 8001BF18 00017D58 41 82 00 58 */ beq lbl_8001BF70
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BF1C 00017D5C 83 ED E3 A0 */ lwz r31, AlarmQueue@sda21(r13)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BF20 00017D60 2C 1F 00 00 */ cmpwi r31, 0x0
|
|
|
|
/* 8001BF24 00017D64 41 82 00 0C */ beq lbl_8001BF30
|
|
|
|
/* 8001BF28 00017D68 83 DF 00 14 */ lwz r30, 0x14(r31)
|
|
|
|
/* 8001BF2C 00017D6C 48 00 00 3C */ b lbl_8001BF68
|
|
|
|
.global lbl_8001BF30
|
|
|
|
lbl_8001BF30:
|
|
|
|
/* 8001BF30 00017D70 3B C0 00 00 */ li r30, 0x0
|
|
|
|
/* 8001BF34 00017D74 48 00 00 34 */ b lbl_8001BF68
|
|
|
|
.global lbl_8001BF38
|
|
|
|
lbl_8001BF38:
|
|
|
|
/* 8001BF38 00017D78 7F E3 FB 78 */ mr r3, r31
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BF3C 00017D7C 48 02 30 F5 */ bl __DVDTestAlarm
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BF40 00017D80 2C 03 00 00 */ cmpwi r3, 0x0
|
|
|
|
/* 8001BF44 00017D84 40 82 00 0C */ bne lbl_8001BF50
|
|
|
|
/* 8001BF48 00017D88 7F E3 FB 78 */ mr r3, r31
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BF4C 00017D8C 4B FF FC 15 */ bl OSCancelAlarm
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001BF50
|
|
|
|
lbl_8001BF50:
|
|
|
|
/* 8001BF50 00017D90 2C 1E 00 00 */ cmpwi r30, 0x0
|
|
|
|
/* 8001BF54 00017D94 7F DF F3 78 */ mr r31, r30
|
|
|
|
/* 8001BF58 00017D98 41 82 00 0C */ beq lbl_8001BF64
|
|
|
|
/* 8001BF5C 00017D9C 83 DE 00 14 */ lwz r30, 0x14(r30)
|
|
|
|
/* 8001BF60 00017DA0 48 00 00 08 */ b lbl_8001BF68
|
|
|
|
.global lbl_8001BF64
|
|
|
|
lbl_8001BF64:
|
|
|
|
/* 8001BF64 00017DA4 3B C0 00 00 */ li r30, 0x0
|
|
|
|
.global lbl_8001BF68
|
|
|
|
lbl_8001BF68:
|
|
|
|
/* 8001BF68 00017DA8 2C 1F 00 00 */ cmpwi r31, 0x0
|
|
|
|
/* 8001BF6C 00017DAC 40 82 FF CC */ bne lbl_8001BF38
|
|
|
|
.global lbl_8001BF70
|
|
|
|
lbl_8001BF70:
|
|
|
|
/* 8001BF70 00017DB0 83 E1 00 0C */ lwz r31, 0xc(r1)
|
|
|
|
/* 8001BF74 00017DB4 38 60 00 01 */ li r3, 0x1
|
|
|
|
/* 8001BF78 00017DB8 83 C1 00 08 */ lwz r30, 0x8(r1)
|
|
|
|
/* 8001BF7C 00017DBC 80 01 00 14 */ lwz r0, 0x14(r1)
|
|
|
|
/* 8001BF80 00017DC0 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8001BF84 00017DC4 38 21 00 10 */ addi r1, r1, 0x10
|
|
|
|
/* 8001BF88 00017DC8 4E 80 00 20 */ blr
|
|
|
|
/* 8001BF8C 00017DCC 00 00 00 00 */ .4byte 0x00000000
|
2022-10-16 16:31:36 +00:00
|
|
|
.global __OSSetInternalAlarmUserData
|
|
|
|
__OSSetInternalAlarmUserData:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BF90 00017DD0 38 00 FF FF */ li r0, -0x1
|
|
|
|
/* 8001BF94 00017DD4 90 83 00 28 */ stw r4, 0x28(r3)
|
|
|
|
/* 8001BF98 00017DD8 90 03 00 04 */ stw r0, 0x4(r3)
|
|
|
|
/* 8001BF9C 00017DDC 4E 80 00 20 */ blr
|
2022-10-16 16:31:36 +00:00
|
|
|
.global __OSCancelInternalAlarms
|
|
|
|
__OSCancelInternalAlarms:
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BFA0 00017DE0 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
|
|
/* 8001BFA4 00017DE4 7C 08 02 A6 */ mflr r0
|
|
|
|
/* 8001BFA8 00017DE8 90 01 00 24 */ stw r0, 0x24(r1)
|
|
|
|
/* 8001BFAC 00017DEC 93 E1 00 1C */ stw r31, 0x1c(r1)
|
|
|
|
/* 8001BFB0 00017DF0 93 C1 00 18 */ stw r30, 0x18(r1)
|
|
|
|
/* 8001BFB4 00017DF4 93 A1 00 14 */ stw r29, 0x14(r1)
|
|
|
|
/* 8001BFB8 00017DF8 7C 7D 1B 78 */ mr r29, r3
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001BFBC 00017DFC 48 00 58 65 */ bl OSDisableInterrupts
|
|
|
|
/* 8001BFC0 00017E00 80 8D E3 A0 */ lwz r4, AlarmQueue@sda21(r13)
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001BFC4 00017E04 7C 7F 1B 78 */ mr r31, r3
|
|
|
|
/* 8001BFC8 00017E08 2C 04 00 00 */ cmpwi r4, 0x0
|
|
|
|
/* 8001BFCC 00017E0C 41 82 00 0C */ beq lbl_8001BFD8
|
|
|
|
/* 8001BFD0 00017E10 83 C4 00 14 */ lwz r30, 0x14(r4)
|
|
|
|
/* 8001BFD4 00017E14 48 00 00 48 */ b lbl_8001C01C
|
|
|
|
.global lbl_8001BFD8
|
|
|
|
lbl_8001BFD8:
|
|
|
|
/* 8001BFD8 00017E18 3B C0 00 00 */ li r30, 0x0
|
|
|
|
/* 8001BFDC 00017E1C 48 00 00 40 */ b lbl_8001C01C
|
|
|
|
.global lbl_8001BFE0
|
|
|
|
lbl_8001BFE0:
|
|
|
|
/* 8001BFE0 00017E20 80 64 00 04 */ lwz r3, 0x4(r4)
|
|
|
|
/* 8001BFE4 00017E24 3C 03 00 01 */ addis r0, r3, 0x1
|
|
|
|
/* 8001BFE8 00017E28 28 00 FF FF */ cmplwi r0, 0xffff
|
|
|
|
/* 8001BFEC 00017E2C 40 82 00 18 */ bne lbl_8001C004
|
|
|
|
/* 8001BFF0 00017E30 80 04 00 28 */ lwz r0, 0x28(r4)
|
|
|
|
/* 8001BFF4 00017E34 7C 00 E8 40 */ cmplw r0, r29
|
|
|
|
/* 8001BFF8 00017E38 40 82 00 0C */ bne lbl_8001C004
|
|
|
|
/* 8001BFFC 00017E3C 7C 83 23 78 */ mr r3, r4
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001C000 00017E40 4B FF FB 61 */ bl OSCancelAlarm
|
2022-10-16 16:05:58 +00:00
|
|
|
.global lbl_8001C004
|
|
|
|
lbl_8001C004:
|
|
|
|
/* 8001C004 00017E44 2C 1E 00 00 */ cmpwi r30, 0x0
|
|
|
|
/* 8001C008 00017E48 7F C4 F3 78 */ mr r4, r30
|
|
|
|
/* 8001C00C 00017E4C 41 82 00 0C */ beq lbl_8001C018
|
|
|
|
/* 8001C010 00017E50 83 DE 00 14 */ lwz r30, 0x14(r30)
|
|
|
|
/* 8001C014 00017E54 48 00 00 08 */ b lbl_8001C01C
|
|
|
|
.global lbl_8001C018
|
|
|
|
lbl_8001C018:
|
|
|
|
/* 8001C018 00017E58 3B C0 00 00 */ li r30, 0x0
|
|
|
|
.global lbl_8001C01C
|
|
|
|
lbl_8001C01C:
|
|
|
|
/* 8001C01C 00017E5C 2C 04 00 00 */ cmpwi r4, 0x0
|
|
|
|
/* 8001C020 00017E60 40 82 FF C0 */ bne lbl_8001BFE0
|
|
|
|
/* 8001C024 00017E64 7F E3 FB 78 */ mr r3, r31
|
2022-10-16 16:31:36 +00:00
|
|
|
/* 8001C028 00017E68 48 00 58 39 */ bl OSRestoreInterrupts
|
2022-10-16 16:05:58 +00:00
|
|
|
/* 8001C02C 00017E6C 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
|
|
/* 8001C030 00017E70 83 E1 00 1C */ lwz r31, 0x1c(r1)
|
|
|
|
/* 8001C034 00017E74 83 C1 00 18 */ lwz r30, 0x18(r1)
|
|
|
|
/* 8001C038 00017E78 83 A1 00 14 */ lwz r29, 0x14(r1)
|
|
|
|
/* 8001C03C 00017E7C 7C 08 03 A6 */ mtlr r0
|
|
|
|
/* 8001C040 00017E80 38 21 00 20 */ addi r1, r1, 0x20
|
|
|
|
/* 8001C044 00017E84 4E 80 00 20 */ blr
|
|
|
|
/* 8001C048 00017E88 00 00 00 00 */ .4byte 0x00000000
|
|
|
|
/* 8001C04C 00017E8C 00 00 00 00 */ .4byte 0x00000000
|