prime/asm/Dolphin/os/OS.s

800 lines
35 KiB
ArmAsm
Raw Normal View History

2022-04-02 21:03:04 +00:00
.include "macros.inc"
2022-04-08 05:17:01 +00:00
.section .bss
.global DriveInfo
DriveInfo:
.skip 0x50
.section .sbss
2022-04-30 08:32:00 +00:00
.global BootInfo
BootInfo:
.skip 0x4
2022-04-30 08:32:00 +00:00
.global BI2DebugFlag
BI2DebugFlag:
.skip 0x4
2022-04-30 08:32:00 +00:00
.global BI2DebugFlagHolder
BI2DebugFlagHolder:
.skip 0x4
2022-04-30 08:32:00 +00:00
.global __OSIsGcam
__OSIsGcam:
.skip 0x4
.global AreWeInitialized
AreWeInitialized:
.skip 0x4
2022-04-30 08:32:00 +00:00
.global OSExceptionTable
OSExceptionTable:
.skip 0x4
2022-04-30 08:32:00 +00:00
.global __OSSavedRegionEnd
__OSSavedRegionEnd:
.skip 0x4
2022-04-30 08:32:00 +00:00
.global __OSSavedRegionStart
__OSSavedRegionStart:
.skip 0x4
2022-04-30 08:32:00 +00:00
.global __OSInIPL
__OSInIPL:
.skip 0x8
.global __OSStartTime
__OSStartTime:
.skip 0x8
2022-07-14 05:48:03 +00:00
2022-04-06 10:04:03 +00:00
.section .data
.global lbl_803F0DA0
lbl_803F0DA0:
2022-04-30 08:32:00 +00:00
.asciz "<< Dolphin SDK - OS\trelease build: Sep 5 2002 05:32:39 (0x2301) >>"
.balign 4
.asciz "\nDolphin OS $Revision: 58 $.\n"
.balign 4
.asciz "Kernel built : %s %s\n"
.balign 4
.asciz "Sep 5 2002"
.balign 4
.asciz "05:32:39"
.balign 4
.asciz "Console Type : "
.balign 4
.asciz "Retail %d\n"
.balign 4
.asciz "Mac Emulator\n"
.balign 4
.asciz "PC Emulator\n"
.balign 4
.asciz "EPPC Arthur\n"
.balign 4
.asciz "EPPC Minnow\n"
.balign 4
.asciz "Development HW%d (%08x)\n"
.balign 4
.asciz "Memory %d MB\n"
.balign 4
.asciz "Arena : 0x%x - 0x%x\n"
.balign 4
2022-04-30 08:32:00 +00:00
.global __OSExceptionLocations
__OSExceptionLocations:
.4byte 0x00000100
.4byte 0x00000200
.4byte 0x00000300
.4byte 0x00000400
.4byte 0x00000500
.4byte 0x00000600
.4byte 0x00000700
.4byte 0x00000800
.4byte 0x00000900
.4byte 0x00000C00
.4byte 0x00000D00
.4byte 0x00000F00
.4byte 0x00001300
.4byte 0x00001400
.4byte 0x00001700
.asciz "Installing OSDBIntegrator\n"
.balign 4
.asciz ">>> OSINIT: exception %d commandeered by TRK\n"
.balign 4
.asciz ">>> OSINIT: exception %d vectored to debugger\n"
.balign 4
.asciz "Exceptions initialized...\n"
.balign 4
2022-07-14 05:48:03 +00:00
.section .sdata
.global lbl_805A8B28
lbl_805A8B28:
2022-04-30 08:32:00 +00:00
.4byte lbl_803F0DA0
2022-07-14 05:48:03 +00:00
.global lbl_805A8B2C
lbl_805A8B2C:
2022-04-30 08:32:00 +00:00
.asciz "%s\n"
.balign 4
2022-04-02 21:03:04 +00:00
.section .text, "ax"
.global OSGetConsoleType
OSGetConsoleType:
2022-04-30 08:32:00 +00:00
/* 8037D71C 0037A67C 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D720 0037A680 28 03 00 00 */ cmplwi r3, 0
/* 8037D724 0037A684 41 82 00 10 */ beq lbl_8037D734
/* 8037D728 0037A688 80 63 00 2C */ lwz r3, 0x2c(r3)
/* 8037D72C 0037A68C 28 03 00 00 */ cmplwi r3, 0
/* 8037D730 0037A690 40 82 00 10 */ bne lbl_8037D740
lbl_8037D734:
/* 8037D734 0037A694 3C 60 10 00 */ lis r3, 0x10000002@ha
/* 8037D738 0037A698 38 63 00 02 */ addi r3, r3, 0x10000002@l
/* 8037D73C 0037A69C 48 00 00 04 */ b lbl_8037D740
lbl_8037D740:
2022-07-14 05:48:03 +00:00
/* 8037D740 0037A6A0 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
.global ClearArena
ClearArena:
/* 8037D744 0037A6A4 7C 08 02 A6 */ mflr r0
/* 8037D748 0037A6A8 90 01 00 04 */ stw r0, 4(r1)
/* 8037D74C 0037A6AC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8037D750 0037A6B0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8037D754 0037A6B4 48 00 5D 19 */ bl OSGetResetCode
/* 8037D758 0037A6B8 3C 03 80 00 */ addis r0, r3, 0x8000
/* 8037D75C 0037A6BC 28 00 00 00 */ cmplwi r0, 0
/* 8037D760 0037A6C0 41 82 00 34 */ beq lbl_8037D794
/* 8037D764 0037A6C4 38 00 00 00 */ li r0, 0
2022-04-30 08:32:00 +00:00
/* 8037D768 0037A6C8 90 0D AC DC */ stw r0, __OSSavedRegionStart@sda21(r13)
/* 8037D76C 0037A6CC 90 0D AC D8 */ stw r0, __OSSavedRegionEnd@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D770 0037A6D0 48 00 10 21 */ bl OSGetArenaHi
/* 8037D774 0037A6D4 7C 7F 1B 78 */ mr r31, r3
/* 8037D778 0037A6D8 48 00 10 21 */ bl OSGetArenaLo
/* 8037D77C 0037A6DC 7F E3 F8 50 */ subf r31, r3, r31
/* 8037D780 0037A6E0 48 00 10 19 */ bl OSGetArenaLo
/* 8037D784 0037A6E4 7F E5 FB 78 */ mr r5, r31
/* 8037D788 0037A6E8 38 80 00 00 */ li r4, 0
/* 8037D78C 0037A6EC 4B C8 5C 1D */ bl memset
/* 8037D790 0037A6F0 48 00 00 C8 */ b lbl_8037D858
lbl_8037D794:
/* 8037D794 0037A6F4 3C 80 81 30 */ lis r4, 0x812FDFF0@ha
/* 8037D798 0037A6F8 80 64 DF F0 */ lwz r3, 0x812FDFF0@l(r4)
/* 8037D79C 0037A6FC 80 04 DF EC */ lwz r0, -0x2014(r4)
/* 8037D7A0 0037A700 28 03 00 00 */ cmplwi r3, 0
2022-04-30 08:32:00 +00:00
/* 8037D7A4 0037A704 90 6D AC DC */ stw r3, __OSSavedRegionStart@sda21(r13)
/* 8037D7A8 0037A708 90 0D AC D8 */ stw r0, __OSSavedRegionEnd@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D7AC 0037A70C 40 82 00 28 */ bne lbl_8037D7D4
/* 8037D7B0 0037A710 48 00 0F E1 */ bl OSGetArenaHi
/* 8037D7B4 0037A714 7C 7F 1B 78 */ mr r31, r3
/* 8037D7B8 0037A718 48 00 0F E1 */ bl OSGetArenaLo
/* 8037D7BC 0037A71C 7F E3 F8 50 */ subf r31, r3, r31
/* 8037D7C0 0037A720 48 00 0F D9 */ bl OSGetArenaLo
/* 8037D7C4 0037A724 7F E5 FB 78 */ mr r5, r31
/* 8037D7C8 0037A728 38 80 00 00 */ li r4, 0
/* 8037D7CC 0037A72C 4B C8 5B DD */ bl memset
/* 8037D7D0 0037A730 48 00 00 88 */ b lbl_8037D858
lbl_8037D7D4:
/* 8037D7D4 0037A734 48 00 0F C5 */ bl OSGetArenaLo
2022-04-30 08:32:00 +00:00
/* 8037D7D8 0037A738 80 0D AC DC */ lwz r0, __OSSavedRegionStart@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D7DC 0037A73C 7C 03 00 40 */ cmplw r3, r0
/* 8037D7E0 0037A740 40 80 00 78 */ bge lbl_8037D858
/* 8037D7E4 0037A744 48 00 0F AD */ bl OSGetArenaHi
2022-04-30 08:32:00 +00:00
/* 8037D7E8 0037A748 80 0D AC DC */ lwz r0, __OSSavedRegionStart@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D7EC 0037A74C 7C 03 00 40 */ cmplw r3, r0
/* 8037D7F0 0037A750 41 81 00 28 */ bgt lbl_8037D818
/* 8037D7F4 0037A754 48 00 0F 9D */ bl OSGetArenaHi
/* 8037D7F8 0037A758 7C 7F 1B 78 */ mr r31, r3
/* 8037D7FC 0037A75C 48 00 0F 9D */ bl OSGetArenaLo
/* 8037D800 0037A760 7F E3 F8 50 */ subf r31, r3, r31
/* 8037D804 0037A764 48 00 0F 95 */ bl OSGetArenaLo
/* 8037D808 0037A768 7F E5 FB 78 */ mr r5, r31
/* 8037D80C 0037A76C 38 80 00 00 */ li r4, 0
/* 8037D810 0037A770 4B C8 5B 99 */ bl memset
/* 8037D814 0037A774 48 00 00 44 */ b lbl_8037D858
lbl_8037D818:
/* 8037D818 0037A778 48 00 0F 81 */ bl OSGetArenaLo
2022-04-30 08:32:00 +00:00
/* 8037D81C 0037A77C 80 0D AC DC */ lwz r0, __OSSavedRegionStart@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D820 0037A780 7F E3 00 50 */ subf r31, r3, r0
/* 8037D824 0037A784 48 00 0F 75 */ bl OSGetArenaLo
/* 8037D828 0037A788 7F E5 FB 78 */ mr r5, r31
/* 8037D82C 0037A78C 38 80 00 00 */ li r4, 0
/* 8037D830 0037A790 4B C8 5B 79 */ bl memset
/* 8037D834 0037A794 48 00 0F 5D */ bl OSGetArenaHi
2022-04-30 08:32:00 +00:00
/* 8037D838 0037A798 83 ED AC D8 */ lwz r31, __OSSavedRegionEnd@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D83C 0037A79C 7C 03 F8 40 */ cmplw r3, r31
/* 8037D840 0037A7A0 40 81 00 18 */ ble lbl_8037D858
/* 8037D844 0037A7A4 48 00 0F 4D */ bl OSGetArenaHi
/* 8037D848 0037A7A8 7C BF 18 50 */ subf r5, r31, r3
/* 8037D84C 0037A7AC 7F E3 FB 78 */ mr r3, r31
/* 8037D850 0037A7B0 38 80 00 00 */ li r4, 0
/* 8037D854 0037A7B4 4B C8 5B 55 */ bl memset
lbl_8037D858:
/* 8037D858 0037A7B8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8037D85C 0037A7BC 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8037D860 0037A7C0 38 21 00 10 */ addi r1, r1, 0x10
/* 8037D864 0037A7C4 7C 08 03 A6 */ mtlr r0
2022-07-14 05:48:03 +00:00
/* 8037D868 0037A7C8 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
2022-04-04 10:14:22 +00:00
.global InquiryCallback
InquiryCallback:
2022-04-02 21:03:04 +00:00
/* 8037D86C 0037A7CC 80 04 00 0C */ lwz r0, 0xc(r4)
/* 8037D870 0037A7D0 2C 00 00 00 */ cmpwi r0, 0
/* 8037D874 0037A7D4 41 82 00 08 */ beq lbl_8037D87C
/* 8037D878 0037A7D8 48 00 00 20 */ b lbl_8037D898
lbl_8037D87C:
2022-04-04 10:14:22 +00:00
/* 8037D87C 0037A7DC 3C 60 80 54 */ lis r3, DriveInfo@ha
/* 8037D880 0037A7E0 38 63 12 00 */ addi r3, r3, DriveInfo@l
2022-04-02 21:03:04 +00:00
/* 8037D884 0037A7E4 A0 03 00 02 */ lhz r0, 2(r3)
/* 8037D888 0037A7E8 3C 60 80 00 */ lis r3, 0x800030E6@ha
/* 8037D88C 0037A7EC 60 00 80 00 */ ori r0, r0, 0x8000
/* 8037D890 0037A7F0 B0 03 30 E6 */ sth r0, 0x800030E6@l(r3)
/* 8037D894 0037A7F4 48 00 00 10 */ b lbl_8037d8a4
lbl_8037D898:
/* 8037D898 0037A7F8 38 00 00 01 */ li r0, 1
/* 8037D89C 0037A7FC 3C 60 80 00 */ lis r3, 0x800030E6@ha
/* 8037D8A0 0037A800 B0 03 30 E6 */ sth r0, 0x800030E6@l(r3)
lbl_8037d8a4:
2022-07-14 05:48:03 +00:00
/* 8037D8A4 0037A804 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
.global OSInit
OSInit:
/* 8037D8A8 0037A808 7C 08 02 A6 */ mflr r0
/* 8037D8AC 0037A80C 90 01 00 04 */ stw r0, 4(r1)
/* 8037D8B0 0037A810 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 8037D8B4 0037A814 93 E1 00 14 */ stw r31, 0x14(r1)
/* 8037D8B8 0037A818 93 C1 00 10 */ stw r30, 0x10(r1)
/* 8037D8BC 0037A81C 93 A1 00 0C */ stw r29, 0xc(r1)
2022-04-04 10:14:22 +00:00
/* 8037D8C0 0037A820 80 0D AC D0 */ lwz r0, AreWeInitialized@sda21(r13)
/* 8037D8C4 0037A824 3C 60 80 54 */ lis r3, DriveInfo@ha
/* 8037D8C8 0037A828 3B C3 12 00 */ addi r30, r3, DriveInfo@l
2022-04-02 21:03:04 +00:00
/* 8037D8CC 0037A82C 2C 00 00 00 */ cmpwi r0, 0
/* 8037D8D0 0037A830 3C 60 80 3F */ lis r3, lbl_803F0DA0@ha
/* 8037D8D4 0037A834 3B E3 0D A0 */ addi r31, r3, lbl_803F0DA0@l
/* 8037D8D8 0037A838 40 82 03 2C */ bne lbl_8037DC04
/* 8037D8DC 0037A83C 38 00 00 01 */ li r0, 1
2022-04-04 10:14:22 +00:00
/* 8037D8E0 0037A840 90 0D AC D0 */ stw r0, AreWeInitialized@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D8E4 0037A844 48 00 7A E5 */ bl __OSGetSystemTime
2022-04-30 08:32:00 +00:00
/* 8037D8E8 0037A848 90 8D AC EC */ stw r4, __OSStartTime+4@sda21(r13)
/* 8037D8EC 0037A84C 90 6D AC E8 */ stw r3, __OSStartTime@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D8F0 0037A850 48 00 3D 71 */ bl OSDisableInterrupts
/* 8037D8F4 0037A854 4B FF 1F A1 */ bl PPCDisableSpeculation
/* 8037D8F8 0037A858 4B FF 1F CD */ bl PPCSetFpNonIEEEMode
/* 8037D8FC 0037A85C 38 00 00 00 */ li r0, 0
/* 8037D900 0037A860 3C 80 80 00 */ lis r4, 0x800000F4@ha
2022-04-30 08:32:00 +00:00
/* 8037D904 0037A864 90 0D AC C4 */ stw r0, BI2DebugFlag@sda21(r13)
/* 8037D908 0037A868 90 8D AC C0 */ stw r4, BootInfo@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D90C 0037A86C 90 0D AC 04 */ stw r0, lbl_805A97C4@sda21(r13)
/* 8037D910 0037A870 80 64 00 F4 */ lwz r3, 0x800000F4@l(r4)
/* 8037D914 0037A874 28 03 00 00 */ cmplwi r3, 0
/* 8037D918 0037A878 41 82 00 34 */ beq lbl_8037D94C
/* 8037D91C 0037A87C 38 03 00 0C */ addi r0, r3, 0xc
2022-04-30 08:32:00 +00:00
/* 8037D920 0037A880 90 0D AC C4 */ stw r0, BI2DebugFlag@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D924 0037A884 80 03 00 24 */ lwz r0, 0x24(r3)
2022-04-30 08:32:00 +00:00
/* 8037D928 0037A888 80 6D AC C4 */ lwz r3, BI2DebugFlag@sda21(r13)
/* 8037D92C 0037A88C 90 0D AD 94 */ stw r0, __PADSpec@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D930 0037A890 80 03 00 00 */ lwz r0, 0(r3)
/* 8037D934 0037A894 54 00 06 3E */ clrlwi r0, r0, 0x18
/* 8037D938 0037A898 98 04 30 E8 */ stb r0, 0x30e8(r4)
2022-04-30 08:32:00 +00:00
/* 8037D93C 0037A89C 80 0D AD 94 */ lwz r0, __PADSpec@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D940 0037A8A0 54 00 06 3E */ clrlwi r0, r0, 0x18
/* 8037D944 0037A8A4 98 04 30 E9 */ stb r0, 0x30e9(r4)
/* 8037D948 0037A8A8 48 00 00 28 */ b lbl_8037D970
lbl_8037D94C:
/* 8037D94C 0037A8AC 80 04 00 34 */ lwz r0, 0x34(r4)
/* 8037D950 0037A8B0 28 00 00 00 */ cmplwi r0, 0
/* 8037D954 0037A8B4 41 82 00 1C */ beq lbl_8037D970
/* 8037D958 0037A8B8 88 64 30 E8 */ lbz r3, 0x30e8(r4)
2022-04-30 08:32:00 +00:00
/* 8037D95C 0037A8BC 38 0D AC C8 */ addi r0, r13, BI2DebugFlagHolder@sda21
/* 8037D960 0037A8C0 90 6D AC C8 */ stw r3, BI2DebugFlagHolder@sda21(r13)
/* 8037D964 0037A8C4 90 0D AC C4 */ stw r0, BI2DebugFlag@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D968 0037A8C8 88 04 30 E9 */ lbz r0, 0x30e9(r4)
2022-04-30 08:32:00 +00:00
/* 8037D96C 0037A8CC 90 0D AD 94 */ stw r0, __PADSpec@sda21(r13)
2022-04-02 21:03:04 +00:00
lbl_8037D970:
/* 8037D970 0037A8D0 38 00 00 01 */ li r0, 1
2022-04-30 08:32:00 +00:00
/* 8037D974 0037A8D4 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D978 0037A8D8 90 0D AC 04 */ stw r0, lbl_805A97C4@sda21(r13)
/* 8037D97C 0037A8DC 80 63 00 30 */ lwz r3, 0x30(r3)
/* 8037D980 0037A8E0 28 03 00 00 */ cmplwi r3, 0
/* 8037D984 0037A8E4 40 82 00 10 */ bne lbl_8037D994
/* 8037D988 0037A8E8 3C 60 80 5C */ lis r3, 0x805C20E0@ha
/* 8037D98C 0037A8EC 38 63 20 E0 */ addi r3, r3, 0x805C20E0@l
/* 8037D990 0037A8F0 48 00 00 04 */ b lbl_8037D994
lbl_8037D994:
/* 8037D994 0037A8F4 48 00 0E 15 */ bl OSSetArenaLo
2022-04-30 08:32:00 +00:00
/* 8037D998 0037A8F8 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D99C 0037A8FC 80 03 00 30 */ lwz r0, 0x30(r3)
/* 8037D9A0 0037A900 28 00 00 00 */ cmplwi r0, 0
/* 8037D9A4 0037A904 40 82 00 30 */ bne lbl_8037D9D4
2022-04-30 08:32:00 +00:00
/* 8037D9A8 0037A908 80 6D AC C4 */ lwz r3, BI2DebugFlag@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D9AC 0037A90C 28 03 00 00 */ cmplwi r3, 0
/* 8037D9B0 0037A910 41 82 00 24 */ beq lbl_8037D9D4
/* 8037D9B4 0037A914 80 03 00 00 */ lwz r0, 0(r3)
/* 8037D9B8 0037A918 28 00 00 02 */ cmplwi r0, 2
/* 8037D9BC 0037A91C 40 80 00 18 */ bge lbl_8037D9D4
/* 8037D9C0 0037A920 3C 60 80 5C */ lis r3, 0x805C00C8@ha
/* 8037D9C4 0037A924 38 63 00 C8 */ addi r3, r3, 0x805C00C8@l
/* 8037D9C8 0037A928 38 03 00 1F */ addi r0, r3, 0x1f
/* 8037D9CC 0037A92C 54 03 00 34 */ rlwinm r3, r0, 0, 0, 0x1a
/* 8037D9D0 0037A930 48 00 0D D9 */ bl OSSetArenaLo
lbl_8037D9D4:
2022-04-30 08:32:00 +00:00
/* 8037D9D4 0037A934 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037D9D8 0037A938 80 63 00 34 */ lwz r3, 0x34(r3)
/* 8037D9DC 0037A93C 28 03 00 00 */ cmplwi r3, 0
/* 8037D9E0 0037A940 40 82 00 10 */ bne lbl_8037D9F0
/* 8037D9E4 0037A944 3C 60 81 70 */ lis r3, 0x81700000@ha
/* 8037D9E8 0037A948 38 63 00 00 */ addi r3, r3, 0x81700000@l
/* 8037D9EC 0037A94C 48 00 00 04 */ b lbl_8037D9F0
lbl_8037D9F0:
/* 8037D9F0 0037A950 48 00 0D B1 */ bl OSSetArenaHi
/* 8037D9F4 0037A954 48 00 02 2D */ bl OSExceptionInit
/* 8037D9F8 0037A958 48 00 6A 0D */ bl __OSInitSystemCall
/* 8037D9FC 0037A95C 48 00 06 69 */ bl OSInitAlarm
/* 8037DA00 0037A960 48 00 4D F9 */ bl __OSModuleInit
/* 8037DA04 0037A964 48 00 3C D9 */ bl __OSInterruptInit
/* 8037DA08 0037A968 3C 60 80 38 */ lis r3, __OSResetSWInterruptHandler@ha
/* 8037DA0C 0037A96C 38 83 34 9C */ addi r4, r3, __OSResetSWInterruptHandler@l
/* 8037DA10 0037A970 38 60 00 16 */ li r3, 0x16
/* 8037DA14 0037A974 48 00 3C 99 */ bl __OSSetInterruptHandler
/* 8037DA18 0037A978 48 00 1F 4D */ bl __OSContextInit
/* 8037DA1C 0037A97C 48 00 16 B9 */ bl __OSCacheInit
2022-04-02 22:25:50 +00:00
/* 8037DA20 0037A980 48 04 38 29 */ bl EXIInit
2022-04-02 21:03:04 +00:00
/* 8037DA24 0037A984 48 04 15 7D */ bl SIInit
2022-04-30 08:32:00 +00:00
/* 8037DA28 0037A988 48 00 5F 79 */ bl __OSInitSram
2022-04-02 21:03:04 +00:00
/* 8037DA2C 0037A98C 48 00 6A 41 */ bl __OSThreadInit
/* 8037DA30 0037A990 48 00 0D AD */ bl __OSInitAudioSystem
/* 8037DA34 0037A994 4B FF 1E 3D */ bl PPCMfhid2
/* 8037DA38 0037A998 54 63 00 80 */ rlwinm r3, r3, 0, 2, 0
/* 8037DA3C 0037A99C 4B FF 1E 3D */ bl PPCMthid2
2022-04-30 08:32:00 +00:00
/* 8037DA40 0037A9A0 80 0D AC E0 */ lwz r0, __OSInIPL@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DA44 0037A9A4 2C 00 00 00 */ cmpwi r0, 0
/* 8037DA48 0037A9A8 40 82 00 08 */ bne lbl_8037DA50
/* 8037DA4C 0037A9AC 48 00 52 4D */ bl __OSInitMemoryProtection
lbl_8037DA50:
/* 8037DA50 0037A9B0 38 7F 00 44 */ addi r3, r31, 0x44
/* 8037DA54 0037A9B4 4C C6 31 82 */ crclr 6
/* 8037DA58 0037A9B8 48 00 1F 55 */ bl OSReport
/* 8037DA5C 0037A9BC 38 7F 00 64 */ addi r3, r31, 0x64
/* 8037DA60 0037A9C0 4C C6 31 82 */ crclr 6
/* 8037DA64 0037A9C4 38 9F 00 7C */ addi r4, r31, 0x7c
/* 8037DA68 0037A9C8 38 BF 00 88 */ addi r5, r31, 0x88
/* 8037DA6C 0037A9CC 48 00 1F 41 */ bl OSReport
/* 8037DA70 0037A9D0 38 7F 00 94 */ addi r3, r31, 0x94
/* 8037DA74 0037A9D4 4C C6 31 82 */ crclr 6
/* 8037DA78 0037A9D8 48 00 1F 35 */ bl OSReport
2022-04-30 08:32:00 +00:00
/* 8037DA7C 0037A9DC 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DA80 0037A9E0 28 03 00 00 */ cmplwi r3, 0
/* 8037DA84 0037A9E4 41 82 00 10 */ beq lbl_8037DA94
/* 8037DA88 0037A9E8 80 83 00 2C */ lwz r4, 0x2c(r3)
/* 8037DA8C 0037A9EC 28 04 00 00 */ cmplwi r4, 0
/* 8037DA90 0037A9F0 40 82 00 10 */ bne lbl_8037DAA0
lbl_8037DA94:
/* 8037DA94 0037A9F4 3C 60 10 00 */ lis r3, 0x10000002@ha
/* 8037DA98 0037A9F8 38 83 00 02 */ addi r4, r3, 0x10000002@l
/* 8037DA9C 0037A9FC 48 00 00 04 */ b lbl_8037DAA0
lbl_8037DAA0:
/* 8037DAA0 0037AA00 54 80 00 1E */ rlwinm r0, r4, 0, 0, 0xf
/* 8037DAA4 0037AA04 2C 00 00 00 */ cmpwi r0, 0
/* 8037DAA8 0037AA08 41 82 00 08 */ beq lbl_8037DAB0
/* 8037DAAC 0037AA0C 48 00 00 14 */ b lbl_8037DAC0
lbl_8037DAB0:
/* 8037DAB0 0037AA10 4C C6 31 82 */ crclr 6
/* 8037DAB4 0037AA14 38 7F 00 A4 */ addi r3, r31, 0xa4
/* 8037DAB8 0037AA18 48 00 1E F5 */ bl OSReport
/* 8037DABC 0037AA1C 48 00 00 94 */ b lbl_8037DB50
lbl_8037DAC0:
/* 8037DAC0 0037AA20 3C 60 10 00 */ lis r3, 0x10000002@ha
/* 8037DAC4 0037AA24 54 85 04 3E */ clrlwi r5, r4, 0x10
/* 8037DAC8 0037AA28 38 03 00 02 */ addi r0, r3, 0x10000002@l
/* 8037DACC 0037AA2C 7C 05 00 00 */ cmpw r5, r0
/* 8037DAD0 0037AA30 41 82 00 48 */ beq lbl_8037DB18
/* 8037DAD4 0037AA34 40 80 00 14 */ bge lbl_8037DAE8
/* 8037DAD8 0037AA38 7C 05 18 00 */ cmpw r5, r3
/* 8037DADC 0037AA3C 41 82 00 1C */ beq lbl_8037DAF8
/* 8037DAE0 0037AA40 40 80 00 28 */ bge lbl_8037DB08
/* 8037DAE4 0037AA44 48 00 00 54 */ b lbl_8037DB38
lbl_8037DAE8:
/* 8037DAE8 0037AA48 38 03 00 04 */ addi r0, r3, 4
/* 8037DAEC 0037AA4C 7C 05 00 00 */ cmpw r5, r0
/* 8037DAF0 0037AA50 40 80 00 48 */ bge lbl_8037DB38
/* 8037DAF4 0037AA54 48 00 00 34 */ b lbl_8037DB28
lbl_8037DAF8:
/* 8037DAF8 0037AA58 38 7F 00 B0 */ addi r3, r31, 0xb0
/* 8037DAFC 0037AA5C 4C C6 31 82 */ crclr 6
/* 8037DB00 0037AA60 48 00 1E AD */ bl OSReport
/* 8037DB04 0037AA64 48 00 00 4C */ b lbl_8037DB50
lbl_8037DB08:
/* 8037DB08 0037AA68 38 7F 00 C0 */ addi r3, r31, 0xc0
/* 8037DB0C 0037AA6C 4C C6 31 82 */ crclr 6
/* 8037DB10 0037AA70 48 00 1E 9D */ bl OSReport
/* 8037DB14 0037AA74 48 00 00 3C */ b lbl_8037DB50
lbl_8037DB18:
/* 8037DB18 0037AA78 38 7F 00 D0 */ addi r3, r31, 0xd0
/* 8037DB1C 0037AA7C 4C C6 31 82 */ crclr 6
/* 8037DB20 0037AA80 48 00 1E 8D */ bl OSReport
/* 8037DB24 0037AA84 48 00 00 2C */ b lbl_8037DB50
lbl_8037DB28:
/* 8037DB28 0037AA88 38 7F 00 E0 */ addi r3, r31, 0xe0
/* 8037DB2C 0037AA8C 4C C6 31 82 */ crclr 6
/* 8037DB30 0037AA90 48 00 1E 7D */ bl OSReport
/* 8037DB34 0037AA94 48 00 00 1C */ b lbl_8037DB50
lbl_8037DB38:
/* 8037DB38 0037AA98 54 86 04 3E */ clrlwi r6, r4, 0x10
/* 8037DB3C 0037AA9C 4C C6 31 82 */ crclr 6
/* 8037DB40 0037AAA0 7C 85 23 78 */ mr r5, r4
/* 8037DB44 0037AAA4 38 7F 00 F0 */ addi r3, r31, 0xf0
/* 8037DB48 0037AAA8 38 86 FF FD */ addi r4, r6, -3
/* 8037DB4C 0037AAAC 48 00 1E 61 */ bl OSReport
lbl_8037DB50:
2022-04-30 08:32:00 +00:00
/* 8037DB50 0037AAB0 80 8D AC C0 */ lwz r4, BootInfo@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DB54 0037AAB4 38 7F 01 0C */ addi r3, r31, 0x10c
/* 8037DB58 0037AAB8 4C C6 31 82 */ crclr 6
/* 8037DB5C 0037AABC 80 04 00 28 */ lwz r0, 0x28(r4)
/* 8037DB60 0037AAC0 54 04 65 3E */ srwi r4, r0, 0x14
/* 8037DB64 0037AAC4 48 00 1E 49 */ bl OSReport
/* 8037DB68 0037AAC8 48 00 0C 29 */ bl OSGetArenaHi
/* 8037DB6C 0037AACC 7C 7D 1B 78 */ mr r29, r3
/* 8037DB70 0037AAD0 48 00 0C 29 */ bl OSGetArenaLo
/* 8037DB74 0037AAD4 7C 64 1B 78 */ mr r4, r3
/* 8037DB78 0037AAD8 4C C6 31 82 */ crclr 6
/* 8037DB7C 0037AADC 7F A5 EB 78 */ mr r5, r29
/* 8037DB80 0037AAE0 38 7F 01 1C */ addi r3, r31, 0x11c
/* 8037DB84 0037AAE4 48 00 1E 29 */ bl OSReport
/* 8037DB88 0037AAE8 80 6D 9F 68 */ lwz r3, lbl_805A8B28@sda21(r13)
/* 8037DB8C 0037AAEC 48 00 04 AD */ bl OSRegisterVersion
2022-04-30 08:32:00 +00:00
/* 8037DB90 0037AAF0 80 6D AC C4 */ lwz r3, BI2DebugFlag@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DB94 0037AAF4 28 03 00 00 */ cmplwi r3, 0
/* 8037DB98 0037AAF8 41 82 00 14 */ beq lbl_8037DBAC
/* 8037DB9C 0037AAFC 80 03 00 00 */ lwz r0, 0(r3)
/* 8037DBA0 0037AB00 28 00 00 02 */ cmplwi r0, 2
/* 8037DBA4 0037AB04 41 80 00 08 */ blt lbl_8037DBAC
/* 8037DBA8 0037AB08 4B C8 5A 99 */ bl EnableMetroTRKInterrupts
lbl_8037DBAC:
/* 8037DBAC 0037AB0C 4B FF FB 99 */ bl ClearArena
/* 8037DBB0 0037AB10 48 00 3A C5 */ bl OSEnableInterrupts
2022-04-30 08:32:00 +00:00
/* 8037DBB4 0037AB14 80 0D AC E0 */ lwz r0, __OSInIPL@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DBB8 0037AB18 2C 00 00 00 */ cmpwi r0, 0
/* 8037DBBC 0037AB1C 40 82 00 48 */ bne lbl_8037DC04
/* 8037DBC0 0037AB20 4B FF 3F E5 */ bl DVDInit
2022-04-30 08:32:00 +00:00
/* 8037DBC4 0037AB24 80 0D AC CC */ lwz r0, __OSIsGcam@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DBC8 0037AB28 2C 00 00 00 */ cmpwi r0, 0
/* 8037DBCC 0037AB2C 41 82 00 18 */ beq lbl_8037DBE4
/* 8037DBD0 0037AB30 3C 60 00 01 */ lis r3, 0x00009000@ha
/* 8037DBD4 0037AB34 38 03 90 00 */ addi r0, r3, 0x00009000@l
/* 8037DBD8 0037AB38 3C 60 80 00 */ lis r3, 0x800030E6@ha
/* 8037DBDC 0037AB3C B0 03 30 E6 */ sth r0, 0x800030E6@l(r3)
/* 8037DBE0 0037AB40 48 00 00 24 */ b lbl_8037DC04
lbl_8037DBE4:
/* 8037DBE4 0037AB44 7F C3 F3 78 */ mr r3, r30
/* 8037DBE8 0037AB48 38 80 00 20 */ li r4, 0x20
/* 8037DBEC 0037AB4C 48 00 0E 99 */ bl DCInvalidateRange
2022-04-04 10:14:22 +00:00
/* 8037DBF0 0037AB50 3C 60 80 38 */ lis r3, InquiryCallback@ha
/* 8037DBF4 0037AB54 38 A3 D8 6C */ addi r5, r3, InquiryCallback@l
2022-04-02 21:03:04 +00:00
/* 8037DBF8 0037AB58 7F C4 F3 78 */ mr r4, r30
/* 8037DBFC 0037AB5C 38 7E 00 20 */ addi r3, r30, 0x20
/* 8037DC00 0037AB60 4B FF 63 F1 */ bl DVDInquiryAsync
lbl_8037DC04:
/* 8037DC04 0037AB64 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 8037DC08 0037AB68 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 8037DC0C 0037AB6C 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 8037DC10 0037AB70 83 A1 00 0C */ lwz r29, 0xc(r1)
/* 8037DC14 0037AB74 38 21 00 18 */ addi r1, r1, 0x18
/* 8037DC18 0037AB78 7C 08 03 A6 */ mtlr r0
2022-07-14 05:48:03 +00:00
/* 8037DC1C 0037AB7C 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
.global OSExceptionInit
OSExceptionInit:
/* 8037DC20 0037AB80 7C 08 02 A6 */ mflr r0
/* 8037DC24 0037AB84 90 01 00 04 */ stw r0, 4(r1)
/* 8037DC28 0037AB88 94 21 FF C8 */ stwu r1, -0x38(r1)
/* 8037DC2C 0037AB8C BE 81 00 08 */ stmw r20, 8(r1)
/* 8037DC30 0037AB90 3C 60 80 00 */ lis r3, 0x80000060@ha
/* 8037DC34 0037AB94 80 03 00 60 */ lwz r0, 0x80000060@l(r3)
/* 8037DC38 0037AB98 3C 80 80 38 */ lis r4, lbl_8037DF60@ha
/* 8037DC3C 0037AB9C 3B C4 DF 60 */ addi r30, r4, lbl_8037DF60@l
2022-04-30 08:32:00 +00:00
/* 8037DC40 0037ABA0 3C A0 80 38 */ lis r5, OSExceptionVector@ha
2022-04-02 21:03:04 +00:00
/* 8037DC44 0037ABA4 83 3E 00 00 */ lwz r25, 0(r30)
/* 8037DC48 0037ABA8 3C 80 80 38 */ lis r4, lbl_8037DF90@ha
2022-04-30 08:32:00 +00:00
/* 8037DC4C 0037ABAC 38 A5 DE F8 */ addi r5, r5, OSExceptionVector@l
2022-04-02 21:03:04 +00:00
/* 8037DC50 0037ABB0 38 84 DF 90 */ addi r4, r4, lbl_8037DF90@l
/* 8037DC54 0037ABB4 3C C0 80 3F */ lis r6, lbl_803F0DA0@ha
/* 8037DC58 0037ABB8 28 00 00 00 */ cmplwi r0, 0
/* 8037DC5C 0037ABBC 7C B8 2B 78 */ mr r24, r5
/* 8037DC60 0037ABC0 3B A6 0D A0 */ addi r29, r6, lbl_803F0DA0@l
/* 8037DC64 0037ABC4 7E E5 20 50 */ subf r23, r5, r4
/* 8037DC68 0037ABC8 3A 83 00 60 */ addi r20, r3, 0x60
/* 8037DC6C 0037ABCC 40 82 00 4C */ bne lbl_8037DCB8
/* 8037DC70 0037ABD0 38 7D 01 70 */ addi r3, r29, 0x170
/* 8037DC74 0037ABD4 4C C6 31 82 */ crclr 6
/* 8037DC78 0037ABD8 4B FF 1C F1 */ bl DBPrintf
/* 8037DC7C 0037ABDC 3C 80 80 38 */ lis r4, __OSDBIntegrator@ha
2022-04-30 08:32:00 +00:00
/* 8037DC80 0037ABE0 3C 60 80 38 */ lis r3, __OSDBJump@ha
/* 8037DC84 0037ABE4 38 03 DE C4 */ addi r0, r3, __OSDBJump@l
2022-04-02 21:03:04 +00:00
/* 8037DC88 0037ABE8 38 84 DE A0 */ addi r4, r4, __OSDBIntegrator@l
/* 8037DC8C 0037ABEC 7E A4 00 50 */ subf r21, r4, r0
/* 8037DC90 0037ABF0 7E 83 A3 78 */ mr r3, r20
/* 8037DC94 0037ABF4 7E A5 AB 78 */ mr r5, r21
/* 8037DC98 0037ABF8 4B C8 57 F9 */ bl memcpy
/* 8037DC9C 0037ABFC 7E 83 A3 78 */ mr r3, r20
/* 8037DCA0 0037AC00 7E A4 AB 78 */ mr r4, r21
/* 8037DCA4 0037AC04 48 00 0E 6D */ bl DCFlushRangeNoSync
/* 8037DCA8 0037AC08 7C 00 04 AC */ sync 0
/* 8037DCAC 0037AC0C 7E 83 A3 78 */ mr r3, r20
/* 8037DCB0 0037AC10 7E A4 AB 78 */ mr r4, r21
/* 8037DCB4 0037AC14 48 00 0E E1 */ bl ICInvalidateRange
lbl_8037DCB8:
2022-04-30 08:32:00 +00:00
/* 8037DCB8 0037AC18 3C 80 80 38 */ lis r4, __OSDBJump@ha
2022-04-02 21:03:04 +00:00
/* 8037DCBC 0037AC1C 3C 60 80 38 */ lis r3, __OSSetExceptionHandler@ha
2022-04-30 08:32:00 +00:00
/* 8037DCC0 0037AC20 3B E4 DE C4 */ addi r31, r4, __OSDBJump@l
2022-04-02 21:03:04 +00:00
/* 8037DCC4 0037AC24 38 03 DE C8 */ addi r0, r3, __OSSetExceptionHandler@l
/* 8037DCC8 0037AC28 3B 9D 01 34 */ addi r28, r29, 0x134
/* 8037DCCC 0037AC2C 7F 7F 00 50 */ subf r27, r31, r0
/* 8037DCD0 0037AC30 3B 40 00 00 */ li r26, 0
/* 8037DCD4 0037AC34 48 00 00 04 */ b lbl_8037DCD8
lbl_8037DCD8:
2022-04-30 08:32:00 +00:00
/* 8037DCD8 0037AC38 3C 60 80 38 */ lis r3, __DBVECTOR@ha
/* 8037DCDC 0037AC3C 3A A3 DF 50 */ addi r21, r3, __DBVECTOR@l
2022-04-02 21:03:04 +00:00
/* 8037DCE0 0037AC40 3E C0 60 00 */ lis r22, 0x6000
/* 8037DCE4 0037AC44 48 00 00 04 */ b lbl_8037DCE8
lbl_8037DCE8:
/* 8037DCE8 0037AC48 48 00 01 48 */ b lbl_8037DE30
lbl_8037DCEC:
2022-04-30 08:32:00 +00:00
/* 8037DCEC 0037AC4C 80 6D AC C4 */ lwz r3, BI2DebugFlag@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DCF0 0037AC50 28 03 00 00 */ cmplwi r3, 0
/* 8037DCF4 0037AC54 41 82 00 34 */ beq lbl_8037DD28
/* 8037DCF8 0037AC58 80 03 00 00 */ lwz r0, 0(r3)
/* 8037DCFC 0037AC5C 28 00 00 02 */ cmplwi r0, 2
/* 8037DD00 0037AC60 41 80 00 28 */ blt lbl_8037DD28
/* 8037DD04 0037AC64 7F 43 D3 78 */ mr r3, r26
/* 8037DD08 0037AC68 4B FF 1C 45 */ bl __DBIsExceptionMarked
/* 8037DD0C 0037AC6C 2C 03 00 00 */ cmpwi r3, 0
/* 8037DD10 0037AC70 41 82 00 18 */ beq lbl_8037DD28
/* 8037DD14 0037AC74 38 7D 01 8C */ addi r3, r29, 0x18c
/* 8037DD18 0037AC78 4C C6 31 82 */ crclr 6
/* 8037DD1C 0037AC7C 57 44 06 3E */ clrlwi r4, r26, 0x18
/* 8037DD20 0037AC80 4B FF 1C 49 */ bl DBPrintf
/* 8037DD24 0037AC84 48 00 01 04 */ b lbl_8037DE28
lbl_8037DD28:
/* 8037DD28 0037AC88 57 54 06 3E */ clrlwi r20, r26, 0x18
/* 8037DD2C 0037AC8C 7F 20 A3 78 */ or r0, r25, r20
/* 8037DD30 0037AC90 90 1E 00 00 */ stw r0, 0(r30)
/* 8037DD34 0037AC94 7F 43 D3 78 */ mr r3, r26
/* 8037DD38 0037AC98 4B FF 1C 15 */ bl __DBIsExceptionMarked
/* 8037DD3C 0037AC9C 2C 03 00 00 */ cmpwi r3, 0
/* 8037DD40 0037ACA0 41 82 00 28 */ beq lbl_8037DD68
/* 8037DD44 0037ACA4 7E 84 A3 78 */ mr r4, r20
/* 8037DD48 0037ACA8 4C C6 31 82 */ crclr 6
/* 8037DD4C 0037ACAC 38 7D 01 BC */ addi r3, r29, 0x1bc
/* 8037DD50 0037ACB0 4B FF 1C 19 */ bl DBPrintf
/* 8037DD54 0037ACB4 7E A3 AB 78 */ mr r3, r21
/* 8037DD58 0037ACB8 7F E4 FB 78 */ mr r4, r31
/* 8037DD5C 0037ACBC 7F 65 DB 78 */ mr r5, r27
/* 8037DD60 0037ACC0 4B C8 57 31 */ bl memcpy
/* 8037DD64 0037ACC4 48 00 00 90 */ b lbl_8037DDF4
lbl_8037DD68:
/* 8037DD68 0037ACC8 7E A4 AB 78 */ mr r4, r21
/* 8037DD6C 0037ACCC 48 00 00 04 */ b lbl_8037DD70
lbl_8037DD70:
/* 8037DD70 0037ACD0 28 1B 00 00 */ cmplwi r27, 0
/* 8037DD74 0037ACD4 38 7B 00 03 */ addi r3, r27, 3
/* 8037DD78 0037ACD8 54 63 F0 BE */ srwi r3, r3, 2
/* 8037DD7C 0037ACDC 40 81 00 78 */ ble lbl_8037DDF4
/* 8037DD80 0037ACE0 54 60 E8 FE */ srwi r0, r3, 3
/* 8037DD84 0037ACE4 28 00 00 00 */ cmplwi r0, 0
/* 8037DD88 0037ACE8 7C 09 03 A6 */ mtctr r0
/* 8037DD8C 0037ACEC 41 82 00 54 */ beq lbl_8037DDE0
/* 8037DD90 0037ACF0 48 00 00 04 */ b lbl_8037DD94
lbl_8037DD94:
/* 8037DD94 0037ACF4 92 C4 00 00 */ stw r22, 0(r4)
/* 8037DD98 0037ACF8 38 84 00 04 */ addi r4, r4, 4
/* 8037DD9C 0037ACFC 92 C4 00 00 */ stw r22, 0(r4)
/* 8037DDA0 0037AD00 38 84 00 04 */ addi r4, r4, 4
/* 8037DDA4 0037AD04 92 C4 00 00 */ stw r22, 0(r4)
/* 8037DDA8 0037AD08 38 84 00 04 */ addi r4, r4, 4
/* 8037DDAC 0037AD0C 92 C4 00 00 */ stw r22, 0(r4)
/* 8037DDB0 0037AD10 38 84 00 04 */ addi r4, r4, 4
/* 8037DDB4 0037AD14 92 C4 00 00 */ stw r22, 0(r4)
/* 8037DDB8 0037AD18 38 84 00 04 */ addi r4, r4, 4
/* 8037DDBC 0037AD1C 92 C4 00 00 */ stw r22, 0(r4)
/* 8037DDC0 0037AD20 38 84 00 04 */ addi r4, r4, 4
/* 8037DDC4 0037AD24 92 C4 00 00 */ stw r22, 0(r4)
/* 8037DDC8 0037AD28 38 84 00 04 */ addi r4, r4, 4
/* 8037DDCC 0037AD2C 92 C4 00 00 */ stw r22, 0(r4)
/* 8037DDD0 0037AD30 38 84 00 04 */ addi r4, r4, 4
/* 8037DDD4 0037AD34 42 00 FF C0 */ bdnz lbl_8037DD94
/* 8037DDD8 0037AD38 70 63 00 07 */ andi. r3, r3, 7
/* 8037DDDC 0037AD3C 41 82 00 18 */ beq lbl_8037DDF4
lbl_8037DDE0:
/* 8037DDE0 0037AD40 7C 69 03 A6 */ mtctr r3
/* 8037DDE4 0037AD44 48 00 00 04 */ b lbl_8037DDE8
lbl_8037DDE8:
/* 8037DDE8 0037AD48 92 C4 00 00 */ stw r22, 0(r4)
/* 8037DDEC 0037AD4C 38 84 00 04 */ addi r4, r4, 4
/* 8037DDF0 0037AD50 42 00 FF F8 */ bdnz lbl_8037DDE8
lbl_8037DDF4:
/* 8037DDF4 0037AD54 80 7C 00 00 */ lwz r3, 0(r28)
/* 8037DDF8 0037AD58 7F 04 C3 78 */ mr r4, r24
/* 8037DDFC 0037AD5C 7E E5 BB 78 */ mr r5, r23
/* 8037DE00 0037AD60 3E 83 80 00 */ addis r20, r3, 0x8000
/* 8037DE04 0037AD64 7E 83 A3 78 */ mr r3, r20
/* 8037DE08 0037AD68 4B C8 56 89 */ bl memcpy
/* 8037DE0C 0037AD6C 7E 83 A3 78 */ mr r3, r20
/* 8037DE10 0037AD70 7E E4 BB 78 */ mr r4, r23
/* 8037DE14 0037AD74 48 00 0C FD */ bl DCFlushRangeNoSync
/* 8037DE18 0037AD78 7C 00 04 AC */ sync 0
/* 8037DE1C 0037AD7C 7E 83 A3 78 */ mr r3, r20
/* 8037DE20 0037AD80 7E E4 BB 78 */ mr r4, r23
/* 8037DE24 0037AD84 48 00 0D 71 */ bl ICInvalidateRange
lbl_8037DE28:
/* 8037DE28 0037AD88 3B 9C 00 04 */ addi r28, r28, 4
/* 8037DE2C 0037AD8C 3B 5A 00 01 */ addi r26, r26, 1
lbl_8037DE30:
/* 8037DE30 0037AD90 57 40 06 3E */ clrlwi r0, r26, 0x18
/* 8037DE34 0037AD94 28 00 00 0F */ cmplwi r0, 0xf
/* 8037DE38 0037AD98 41 80 FE B4 */ blt lbl_8037DCEC
/* 8037DE3C 0037AD9C 3C 60 80 00 */ lis r3, 0x80003000@ha
/* 8037DE40 0037ADA0 38 03 30 00 */ addi r0, r3, 0x80003000@l
2022-04-30 08:32:00 +00:00
/* 8037DE44 0037ADA4 90 0D AC D4 */ stw r0, OSExceptionTable@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DE48 0037ADA8 3A 80 00 00 */ li r20, 0
/* 8037DE4C 0037ADAC 48 00 00 04 */ b lbl_8037DE50
lbl_8037DE50:
/* 8037DE50 0037ADB0 3C 60 80 38 */ lis r3, OSDefaultExceptionHandler@ha
/* 8037DE54 0037ADB4 3A E3 DF 94 */ addi r23, r3, OSDefaultExceptionHandler@l
/* 8037DE58 0037ADB8 48 00 00 04 */ b lbl_8037DE5C
lbl_8037DE5C:
/* 8037DE5C 0037ADBC 48 00 00 14 */ b lbl_8037DE70
lbl_8037DE60:
/* 8037DE60 0037ADC0 7E 83 A3 78 */ mr r3, r20
/* 8037DE64 0037ADC4 7E E4 BB 78 */ mr r4, r23
/* 8037DE68 0037ADC8 48 00 00 61 */ bl __OSSetExceptionHandler
/* 8037DE6C 0037ADCC 3A 94 00 01 */ addi r20, r20, 1
lbl_8037DE70:
/* 8037DE70 0037ADD0 56 80 06 3E */ clrlwi r0, r20, 0x18
/* 8037DE74 0037ADD4 28 00 00 0F */ cmplwi r0, 0xf
/* 8037DE78 0037ADD8 41 80 FF E8 */ blt lbl_8037DE60
/* 8037DE7C 0037ADDC 93 3E 00 00 */ stw r25, 0(r30)
/* 8037DE80 0037ADE0 38 7D 01 EC */ addi r3, r29, 0x1ec
/* 8037DE84 0037ADE4 4C C6 31 82 */ crclr 6
/* 8037DE88 0037ADE8 4B FF 1A E1 */ bl DBPrintf
/* 8037DE8C 0037ADEC BA 81 00 08 */ lmw r20, 8(r1)
/* 8037DE90 0037ADF0 80 01 00 3C */ lwz r0, 0x3c(r1)
/* 8037DE94 0037ADF4 38 21 00 38 */ addi r1, r1, 0x38
/* 8037DE98 0037ADF8 7C 08 03 A6 */ mtlr r0
2022-07-14 05:48:03 +00:00
/* 8037DE9C 0037ADFC 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
.global __OSDBIntegrator
__OSDBIntegrator:
/* 8037DEA0 0037AE00 38 A0 00 40 */ li r5, 0x40
/* 8037DEA4 0037AE04 7C 68 02 A6 */ mflr r3
/* 8037DEA8 0037AE08 90 65 00 0C */ stw r3, 0xc(r5)
/* 8037DEAC 0037AE0C 80 65 00 08 */ lwz r3, 8(r5)
/* 8037DEB0 0037AE10 64 63 80 00 */ oris r3, r3, 0x8000
/* 8037DEB4 0037AE14 7C 68 03 A6 */ mtlr r3
/* 8037DEB8 0037AE18 38 60 00 30 */ li r3, 0x30
/* 8037DEBC 0037AE1C 7C 60 01 24 */ mtmsr r3
2022-07-14 05:48:03 +00:00
/* 8037DEC0 0037AE20 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
2022-04-30 08:32:00 +00:00
.global __OSDBJump
__OSDBJump:
.global __OSDBJUMPSTART
__OSDBJUMPSTART:
.global __OSDBINTEND
__OSDBINTEND:
2022-04-02 21:03:04 +00:00
/* 8037DEC4 0037AE24 48 00 00 63 */ bla 0x60
.global __OSSetExceptionHandler
__OSSetExceptionHandler:
/* 8037DEC8 0037AE28 54 60 06 3E */ clrlwi r0, r3, 0x18
2022-04-30 08:32:00 +00:00
/* 8037DECC 0037AE2C 80 6D AC D4 */ lwz r3, OSExceptionTable@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DED0 0037AE30 54 00 10 3A */ slwi r0, r0, 2
/* 8037DED4 0037AE34 7C A3 02 14 */ add r5, r3, r0
/* 8037DED8 0037AE38 80 65 00 00 */ lwz r3, 0(r5)
/* 8037DEDC 0037AE3C 90 85 00 00 */ stw r4, 0(r5)
2022-07-14 05:48:03 +00:00
/* 8037DEE0 0037AE40 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
.global __OSGetExceptionHandler
__OSGetExceptionHandler:
/* 8037DEE4 0037AE44 54 60 06 3E */ clrlwi r0, r3, 0x18
2022-04-30 08:32:00 +00:00
/* 8037DEE8 0037AE48 80 6D AC D4 */ lwz r3, OSExceptionTable@sda21(r13)
2022-04-02 21:03:04 +00:00
/* 8037DEEC 0037AE4C 54 00 10 3A */ slwi r0, r0, 2
/* 8037DEF0 0037AE50 7C 63 00 2E */ lwzx r3, r3, r0
2022-07-14 05:48:03 +00:00
/* 8037DEF4 0037AE54 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
2022-04-30 08:32:00 +00:00
.global OSExceptionVector
OSExceptionVector:
2022-04-02 21:03:04 +00:00
/* 8037DEF8 0037AE58 7C 90 43 A6 */ mtspr 0x110, r4
/* 8037DEFC 0037AE5C 80 80 00 C0 */ lwz r4, 0xc0(0)
/* 8037DF00 0037AE60 90 64 00 0C */ stw r3, 0xc(r4)
/* 8037DF04 0037AE64 7C 70 42 A6 */ mfspr r3, 0x110
/* 8037DF08 0037AE68 90 64 00 10 */ stw r3, 0x10(r4)
/* 8037DF0C 0037AE6C 90 A4 00 14 */ stw r5, 0x14(r4)
/* 8037DF10 0037AE70 A0 64 01 A2 */ lhz r3, 0x1a2(r4)
/* 8037DF14 0037AE74 60 63 00 02 */ ori r3, r3, 2
/* 8037DF18 0037AE78 B0 64 01 A2 */ sth r3, 0x1a2(r4)
/* 8037DF1C 0037AE7C 7C 60 00 26 */ mfcr r3
/* 8037DF20 0037AE80 90 64 00 80 */ stw r3, 0x80(r4)
/* 8037DF24 0037AE84 7C 68 02 A6 */ mflr r3
/* 8037DF28 0037AE88 90 64 00 84 */ stw r3, 0x84(r4)
/* 8037DF2C 0037AE8C 7C 69 02 A6 */ mfctr r3
/* 8037DF30 0037AE90 90 64 00 88 */ stw r3, 0x88(r4)
/* 8037DF34 0037AE94 7C 61 02 A6 */ mfxer r3
/* 8037DF38 0037AE98 90 64 00 8C */ stw r3, 0x8c(r4)
/* 8037DF3C 0037AE9C 7C 7A 02 A6 */ mfspr r3, 0x1a
/* 8037DF40 0037AEA0 90 64 01 98 */ stw r3, 0x198(r4)
/* 8037DF44 0037AEA4 7C 7B 02 A6 */ mfspr r3, 0x1b
/* 8037DF48 0037AEA8 90 64 01 9C */ stw r3, 0x19c(r4)
/* 8037DF4C 0037AEAC 7C 65 1B 78 */ mr r5, r3
2022-04-30 08:32:00 +00:00
__DBVECTOR:
2022-07-14 05:48:03 +00:00
/* 8037DF50 0037AEB0 60 00 00 00 */ nop
2022-04-02 21:03:04 +00:00
/* 8037DF54 0037AEB4 7C 60 00 A6 */ mfmsr r3
/* 8037DF58 0037AEB8 60 63 00 30 */ ori r3, r3, 0x30
/* 8037DF5C 0037AEBC 7C 7B 03 A6 */ mtspr 0x1b, r3
lbl_8037DF60:
/* 8037DF60 0037AEC0 38 60 00 00 */ li r3, 0
/* 8037DF64 0037AEC4 80 80 00 D4 */ lwz r4, 0xd4(0)
/* 8037DF68 0037AEC8 54 A5 07 BD */ rlwinm. r5, r5, 0, 0x1e, 0x1e
/* 8037DF6C 0037AECC 40 82 00 14 */ bne lbl_8037DF80
/* 8037DF70 0037AED0 3C A0 80 38 */ lis r5, OSDefaultExceptionHandler@ha
/* 8037DF74 0037AED4 38 A5 DF 94 */ addi r5, r5, OSDefaultExceptionHandler@l
/* 8037DF78 0037AED8 7C BA 03 A6 */ mtspr 0x1a, r5
2022-07-14 05:48:03 +00:00
/* 8037DF7C 0037AEDC 4C 00 00 64 */ rfi
2022-04-02 21:03:04 +00:00
lbl_8037DF80:
/* 8037DF80 0037AEE0 54 65 15 BA */ rlwinm r5, r3, 2, 0x16, 0x1d
/* 8037DF84 0037AEE4 80 A5 30 00 */ lwz r5, 0x3000(r5)
/* 8037DF88 0037AEE8 7C BA 03 A6 */ mtspr 0x1a, r5
2022-07-14 05:48:03 +00:00
/* 8037DF8C 0037AEEC 4C 00 00 64 */ rfi
2022-04-02 21:03:04 +00:00
lbl_8037DF90:
/* 8037DF90 0037AEF0 60 00 00 00 */ nop
.global OSDefaultExceptionHandler
OSDefaultExceptionHandler:
/* 8037DF94 0037AEF4 90 04 00 00 */ stw r0, 0(r4)
/* 8037DF98 0037AEF8 90 24 00 04 */ stw r1, 4(r4)
/* 8037DF9C 0037AEFC 90 44 00 08 */ stw r2, 8(r4)
/* 8037DFA0 0037AF00 BC C4 00 18 */ stmw r6, 0x18(r4)
/* 8037DFA4 0037AF04 7C 11 E2 A6 */ mfspr r0, 0x391
/* 8037DFA8 0037AF08 90 04 01 A8 */ stw r0, 0x1a8(r4)
/* 8037DFAC 0037AF0C 7C 12 E2 A6 */ mfspr r0, 0x392
/* 8037DFB0 0037AF10 90 04 01 AC */ stw r0, 0x1ac(r4)
/* 8037DFB4 0037AF14 7C 13 E2 A6 */ mfspr r0, 0x393
/* 8037DFB8 0037AF18 90 04 01 B0 */ stw r0, 0x1b0(r4)
/* 8037DFBC 0037AF1C 7C 14 E2 A6 */ mfspr r0, 0x394
/* 8037DFC0 0037AF20 90 04 01 B4 */ stw r0, 0x1b4(r4)
/* 8037DFC4 0037AF24 7C 15 E2 A6 */ mfspr r0, 0x395
/* 8037DFC8 0037AF28 90 04 01 B8 */ stw r0, 0x1b8(r4)
/* 8037DFCC 0037AF2C 7C 16 E2 A6 */ mfspr r0, 0x396
/* 8037DFD0 0037AF30 90 04 01 BC */ stw r0, 0x1bc(r4)
/* 8037DFD4 0037AF34 7C 17 E2 A6 */ mfspr r0, 0x397
/* 8037DFD8 0037AF38 90 04 01 C0 */ stw r0, 0x1c0(r4)
/* 8037DFDC 0037AF3C 7C B2 02 A6 */ mfdsisr r5
/* 8037DFE0 0037AF40 7C D3 02 A6 */ mfdar r6
/* 8037DFE4 0037AF44 94 21 FF F8 */ stwu r1, -8(r1)
/* 8037DFE8 0037AF48 48 00 1D 88 */ b __OSUnhandledException
.global __OSPSInit
__OSPSInit:
/* 8037DFEC 0037AF4C 7C 08 02 A6 */ mflr r0
/* 8037DFF0 0037AF50 90 01 00 04 */ stw r0, 4(r1)
/* 8037DFF4 0037AF54 94 21 FF F8 */ stwu r1, -8(r1)
/* 8037DFF8 0037AF58 4B FF 18 79 */ bl PPCMfhid2
/* 8037DFFC 0037AF5C 64 63 A0 00 */ oris r3, r3, 0xa000
/* 8037E000 0037AF60 4B FF 18 79 */ bl PPCMthid2
/* 8037E004 0037AF64 48 00 0B C5 */ bl ICFlashInvalidate
/* 8037E008 0037AF68 7C 00 04 AC */ sync 0
/* 8037E00C 0037AF6C 38 60 00 00 */ li r3, 0
/* 8037E010 0037AF70 7C 70 E3 A6 */ mtspr 0x390, r3
/* 8037E014 0037AF74 80 01 00 0C */ lwz r0, 0xc(r1)
/* 8037E018 0037AF78 38 21 00 08 */ addi r1, r1, 8
/* 8037E01C 0037AF7C 7C 08 03 A6 */ mtlr r0
2022-07-14 05:48:03 +00:00
/* 8037E020 0037AF80 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
.global __OSGetDIConfig
__OSGetDIConfig:
/* 8037E024 0037AF84 3C 60 CC 00 */ lis r3, 0xCC006000@ha
/* 8037E028 0037AF88 38 63 60 00 */ addi r3, r3, 0xCC006000@l
/* 8037E02C 0037AF8C 80 03 00 24 */ lwz r0, 0x24(r3)
/* 8037E030 0037AF90 54 03 06 3E */ clrlwi r3, r0, 0x18
2022-07-14 05:48:03 +00:00
/* 8037E034 0037AF94 4E 80 00 20 */ blr
2022-04-02 21:03:04 +00:00
.global OSRegisterVersion
OSRegisterVersion:
/* 8037E038 0037AF98 7C 08 02 A6 */ mflr r0
/* 8037E03C 0037AF9C 90 01 00 04 */ stw r0, 4(r1)
/* 8037E040 0037AFA0 94 21 FF F8 */ stwu r1, -8(r1)
/* 8037E044 0037AFA4 7C 64 1B 78 */ mr r4, r3
/* 8037E048 0037AFA8 4C C6 31 82 */ crclr 6
/* 8037E04C 0037AFAC 38 6D 9F 6C */ addi r3, r13, lbl_805A8B2C@sda21
/* 8037E050 0037AFB0 48 00 19 5D */ bl OSReport
/* 8037E054 0037AFB4 80 01 00 0C */ lwz r0, 0xc(r1)
/* 8037E058 0037AFB8 38 21 00 08 */ addi r1, r1, 8
/* 8037E05C 0037AFBC 7C 08 03 A6 */ mtlr r0
2022-07-14 05:48:03 +00:00
/* 8037E060 0037AFC0 4E 80 00 20 */ blr