Decompile dsp.c start OSReset.c

Former-commit-id: 6753bb7115
This commit is contained in:
Phillip Stephens 2022-04-30 01:32:00 -07:00
parent 3ffb92066d
commit e0bd52d345
18 changed files with 933 additions and 550 deletions

View File

@ -110,6 +110,8 @@ $(BUILD_DIR)/src/Dolphin/PPCArch.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/Dolphin/PPCArch.o: CFLAGS := $(CFLAGS_1.2) $(BUILD_DIR)/src/Dolphin/PPCArch.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/Dolphin/os/OSAudioSystem.o: MWCC_VERSION := 1.2.5 $(BUILD_DIR)/src/Dolphin/os/OSAudioSystem.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/Dolphin/os/OSAudioSystem.o: CFLAGS := $(CFLAGS_1.2) $(BUILD_DIR)/src/Dolphin/os/OSAudioSystem.o: CFLAGS := $(CFLAGS_1.2)
$(BUILD_DIR)/src/Dolphin/dsp/dsp.o: MWCC_VERSION := 1.2.5
$(BUILD_DIR)/src/Dolphin/dsp/dsp.o: CFLAGS := $(CFLAGS_1.2)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Recipes # Recipes

View File

@ -1,35 +1,18 @@
.include "macros.inc" .include "macros.inc"
.section .sdata .section .sdata
.global lbl_805A8A80 .global __DSPVersion
lbl_805A8A80: __DSPVersion:
.incbin "baserom.dol", 0x3F6420, 0x8 .4byte __DSPVersionString
.balign 8
.section .sbss .section .sbss
.global lbl_805A9748 .global __DSP_init_flag
lbl_805A9748: __DSP_init_flag:
.skip 0x8 .skip 0x8
.global lbl_805A9750
lbl_805A9750:
.skip 0x4
.global lbl_805A9754
lbl_805A9754:
.skip 0x4
.global lbl_805A9758
lbl_805A9758:
.skip 0x4
.global lbl_805A975C
lbl_805A975C:
.skip 0x4
.global lbl_805A9760
lbl_805A9760:
.skip 0x4
.global lbl_805A9764
lbl_805A9764:
.skip 0x4
.section .data .section .data
lbl_803EF9D0: __DSPVersionString:
.asciz "<< Dolphin SDK - DSP\trelease build: Sep 5 2002 05:35:13 (0x2301) >>" .asciz "<< Dolphin SDK - DSP\trelease build: Sep 5 2002 05:35:13 (0x2301) >>"
.balign 4 .balign 4
.asciz "DSPInit(): Build Date: %s %s\n" .asciz "DSPInit(): Build Date: %s %s\n"
@ -74,9 +57,9 @@ DSPSendMailToDSP:
.global DSPInit .global DSPInit
DSPInit: DSPInit:
/* 8036FA04 0036C964 7C 08 02 A6 */ mflr r0 /* 8036FA04 0036C964 7C 08 02 A6 */ mflr r0
/* 8036FA08 0036C968 3C 60 80 3F */ lis r3, lbl_803EF9D0@ha /* 8036FA08 0036C968 3C 60 80 3F */ lis r3, __DSPVersionString@ha
/* 8036FA0C 0036C96C 90 01 00 04 */ stw r0, 4(r1) /* 8036FA0C 0036C96C 90 01 00 04 */ stw r0, 4(r1)
/* 8036FA10 0036C970 38 A3 F9 D0 */ addi r5, r3, lbl_803EF9D0@l /* 8036FA10 0036C970 38 A3 F9 D0 */ addi r5, r3, __DSPVersionString@l
/* 8036FA14 0036C974 4C C6 31 82 */ crclr 6 /* 8036FA14 0036C974 4C C6 31 82 */ crclr 6
/* 8036FA18 0036C978 38 65 00 48 */ addi r3, r5, 0x48 /* 8036FA18 0036C978 38 65 00 48 */ addi r3, r5, 0x48
/* 8036FA1C 0036C97C 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8036FA1C 0036C97C 94 21 FF F0 */ stwu r1, -0x10(r1)
@ -84,10 +67,10 @@ DSPInit:
/* 8036FA24 0036C984 93 E1 00 0C */ stw r31, 0xc(r1) /* 8036FA24 0036C984 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8036FA28 0036C988 38 A5 00 74 */ addi r5, r5, 0x74 /* 8036FA28 0036C988 38 A5 00 74 */ addi r5, r5, 0x74
/* 8036FA2C 0036C98C 48 00 01 A5 */ bl __DSP_debug_printf /* 8036FA2C 0036C98C 48 00 01 A5 */ bl __DSP_debug_printf
/* 8036FA30 0036C990 80 0D AB 88 */ lwz r0, lbl_805A9748@sda21(r13) /* 8036FA30 0036C990 80 0D AB 88 */ lwz r0, __DSP_init_flag@sda21(r13)
/* 8036FA34 0036C994 2C 00 00 01 */ cmpwi r0, 1 /* 8036FA34 0036C994 2C 00 00 01 */ cmpwi r0, 1
/* 8036FA38 0036C998 41 82 00 7C */ beq lbl_8036FAB4 /* 8036FA38 0036C998 41 82 00 7C */ beq lbl_8036FAB4
/* 8036FA3C 0036C99C 80 6D 9E C0 */ lwz r3, lbl_805A8A80@sda21(r13) /* 8036FA3C 0036C99C 80 6D 9E C0 */ lwz r3, __DSPVersion@sda21(r13)
/* 8036FA40 0036C9A0 48 00 E5 F9 */ bl OSRegisterVersion /* 8036FA40 0036C9A0 48 00 E5 F9 */ bl OSRegisterVersion
/* 8036FA44 0036C9A4 48 01 1C 1D */ bl OSDisableInterrupts /* 8036FA44 0036C9A4 48 01 1C 1D */ bl OSDisableInterrupts
/* 8036FA48 0036C9A8 3C 80 80 37 */ lis r4, __DSPHandler@ha /* 8036FA48 0036C9A8 3C 80 80 37 */ lis r4, __DSPHandler@ha
@ -111,11 +94,11 @@ DSPInit:
/* 8036FA90 0036C9F0 38 7F 00 00 */ addi r3, r31, 0 /* 8036FA90 0036C9F0 38 7F 00 00 */ addi r3, r31, 0
/* 8036FA94 0036C9F4 7C E5 28 38 */ and r5, r7, r5 /* 8036FA94 0036C9F4 7C E5 28 38 */ and r5, r7, r5
/* 8036FA98 0036C9F8 B0 A6 00 0A */ sth r5, 0xa(r6) /* 8036FA98 0036C9F8 B0 A6 00 0A */ sth r5, 0xa(r6)
/* 8036FA9C 0036C9FC 90 8D AB 98 */ stw r4, lbl_805A9758@sda21(r13) /* 8036FA9C 0036C9FC 90 8D AB 98 */ stw r4, __DSP_tmp_task@sda21(r13)
/* 8036FAA0 0036CA00 90 8D AB A4 */ stw r4, lbl_805A9764@sda21(r13) /* 8036FAA0 0036CA00 90 8D AB A4 */ stw r4, __DSP_curr_task@sda21(r13)
/* 8036FAA4 0036CA04 90 8D AB 9C */ stw r4, lbl_805A975C@sda21(r13) /* 8036FAA4 0036CA04 90 8D AB 9C */ stw r4, __DSP_last_task@sda21(r13)
/* 8036FAA8 0036CA08 90 8D AB A0 */ stw r4, lbl_805A9760@sda21(r13) /* 8036FAA8 0036CA08 90 8D AB A0 */ stw r4, __DSP_first_task@sda21(r13)
/* 8036FAAC 0036CA0C 90 0D AB 88 */ stw r0, lbl_805A9748@sda21(r13) /* 8036FAAC 0036CA0C 90 0D AB 88 */ stw r0, __DSP_init_flag@sda21(r13)
/* 8036FAB0 0036CA10 48 01 1B D9 */ bl OSRestoreInterrupts /* 8036FAB0 0036CA10 48 01 1B D9 */ bl OSRestoreInterrupts
lbl_8036FAB4: lbl_8036FAB4:
/* 8036FAB4 0036CA14 80 01 00 14 */ lwz r0, 0x14(r1) /* 8036FAB4 0036CA14 80 01 00 14 */ lwz r0, 0x14(r1)
@ -138,7 +121,7 @@ DSPReset:
/* 8036FAEC 0036CA4C 60 00 08 01 */ ori r0, r0, 0x801 /* 8036FAEC 0036CA4C 60 00 08 01 */ ori r0, r0, 0x801
/* 8036FAF0 0036CA50 B0 04 00 0A */ sth r0, 0xa(r4) /* 8036FAF0 0036CA50 B0 04 00 0A */ sth r0, 0xa(r4)
/* 8036FAF4 0036CA54 38 00 00 00 */ li r0, 0 /* 8036FAF4 0036CA54 38 00 00 00 */ li r0, 0
/* 8036FAF8 0036CA58 90 0D AB 88 */ stw r0, lbl_805A9748@sda21(r13) /* 8036FAF8 0036CA58 90 0D AB 88 */ stw r0, __DSP_init_flag@sda21(r13)
/* 8036FAFC 0036CA5C 48 01 1B 8D */ bl OSRestoreInterrupts /* 8036FAFC 0036CA5C 48 01 1B 8D */ bl OSRestoreInterrupts
/* 8036FB00 0036CA60 80 01 00 0C */ lwz r0, 0xc(r1) /* 8036FB00 0036CA60 80 01 00 0C */ lwz r0, 0xc(r1)
/* 8036FB04 0036CA64 38 21 00 08 */ addi r1, r1, 8 /* 8036FB04 0036CA64 38 21 00 08 */ addi r1, r1, 8
@ -189,7 +172,7 @@ DSPAddTask:
/* 8036FB94 0036CAF4 38 7F 00 00 */ addi r3, r31, 0 /* 8036FB94 0036CAF4 38 7F 00 00 */ addi r3, r31, 0
/* 8036FB98 0036CAF8 90 1E 00 08 */ stw r0, 8(r30) /* 8036FB98 0036CAF8 90 1E 00 08 */ stw r0, 8(r30)
/* 8036FB9C 0036CAFC 48 01 1A ED */ bl OSRestoreInterrupts /* 8036FB9C 0036CAFC 48 01 1A ED */ bl OSRestoreInterrupts
/* 8036FBA0 0036CB00 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) /* 8036FBA0 0036CB00 80 0D AB A0 */ lwz r0, __DSP_first_task@sda21(r13)
/* 8036FBA4 0036CB04 7C 1E 00 40 */ cmplw r30, r0 /* 8036FBA4 0036CB04 7C 1E 00 40 */ cmplw r30, r0
/* 8036FBA8 0036CB08 40 82 00 0C */ bne lbl_8036FBB4 /* 8036FBA8 0036CB08 40 82 00 0C */ bne lbl_8036FBB4
/* 8036FBAC 0036CB0C 7F C3 F3 78 */ mr r3, r30 /* 8036FBAC 0036CB0C 7F C3 F3 78 */ mr r3, r30

View File

@ -17,6 +17,27 @@ lbl_803EFA50:
.balign 4 .balign 4
.asciz "__DSP_add_task() : Added task : 0x%08X\n" .asciz "__DSP_add_task() : Added task : 0x%08X\n"
.section .sbss
.global __DSP_rude_task_pending
__DSP_rude_task_pending:
.skip 0x4
.global __DSP_rude_task
__DSP_rude_task:
.skip 0x4
.global __DSP_tmp_task
__DSP_tmp_task:
.skip 0x4
.global __DSP_last_task
__DSP_last_task:
.skip 0x4
.global __DSP_first_task
__DSP_first_task:
.skip 0x4
.global __DSP_curr_task
__DSP_curr_task:
.skip 0x4
.section .text, "ax" .section .text, "ax"
.global __DSPHandler .global __DSPHandler
@ -42,7 +63,7 @@ lbl_8036FC60:
/* 8036FC64 0036CBC4 28 03 00 00 */ cmplwi r3, 0 /* 8036FC64 0036CBC4 28 03 00 00 */ cmplwi r3, 0
/* 8036FC68 0036CBC8 41 82 FF F8 */ beq lbl_8036FC60 /* 8036FC68 0036CBC8 41 82 FF F8 */ beq lbl_8036FC60
/* 8036FC6C 0036CBCC 4B FF FD 6D */ bl DSPReadMailFromDSP /* 8036FC6C 0036CBCC 4B FF FD 6D */ bl DSPReadMailFromDSP
/* 8036FC70 0036CBD0 80 AD AB A4 */ lwz r5, lbl_805A9764@sda21(r13) /* 8036FC70 0036CBD0 80 AD AB A4 */ lwz r5, __DSP_curr_task@sda21(r13)
/* 8036FC74 0036CBD4 80 05 00 08 */ lwz r0, 8(r5) /* 8036FC74 0036CBD4 80 05 00 08 */ lwz r0, 8(r5)
/* 8036FC78 0036CBD8 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e /* 8036FC78 0036CBD8 54 00 07 BD */ rlwinm. r0, r0, 0, 0x1e, 0x1e
/* 8036FC7C 0036CBDC 41 82 00 18 */ beq lbl_8036FC94 /* 8036FC7C 0036CBDC 41 82 00 18 */ beq lbl_8036FC94
@ -70,7 +91,7 @@ lbl_8036FCB8:
lbl_8036FCCC: lbl_8036FCCC:
/* 8036FCCC 0036CC2C 38 00 00 01 */ li r0, 1 /* 8036FCCC 0036CC2C 38 00 00 01 */ li r0, 1
/* 8036FCD0 0036CC30 90 05 00 00 */ stw r0, 0(r5) /* 8036FCD0 0036CC30 90 05 00 00 */ stw r0, 0(r5)
/* 8036FCD4 0036CC34 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FCD4 0036CC34 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FCD8 0036CC38 81 83 00 28 */ lwz r12, 0x28(r3) /* 8036FCD8 0036CC38 81 83 00 28 */ lwz r12, 0x28(r3)
/* 8036FCDC 0036CC3C 28 0C 00 00 */ cmplwi r12, 0 /* 8036FCDC 0036CC3C 28 0C 00 00 */ cmplwi r12, 0
/* 8036FCE0 0036CC40 41 82 03 40 */ beq lbl_80370020 /* 8036FCE0 0036CC40 41 82 03 40 */ beq lbl_80370020
@ -80,7 +101,7 @@ lbl_8036FCCC:
lbl_8036FCF0: lbl_8036FCF0:
/* 8036FCF0 0036CC50 38 00 00 01 */ li r0, 1 /* 8036FCF0 0036CC50 38 00 00 01 */ li r0, 1
/* 8036FCF4 0036CC54 90 05 00 00 */ stw r0, 0(r5) /* 8036FCF4 0036CC54 90 05 00 00 */ stw r0, 0(r5)
/* 8036FCF8 0036CC58 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FCF8 0036CC58 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FCFC 0036CC5C 81 83 00 2C */ lwz r12, 0x2c(r3) /* 8036FCFC 0036CC5C 81 83 00 2C */ lwz r12, 0x2c(r3)
/* 8036FD00 0036CC60 28 0C 00 00 */ cmplwi r12, 0 /* 8036FD00 0036CC60 28 0C 00 00 */ cmplwi r12, 0
/* 8036FD04 0036CC64 41 82 03 1C */ beq lbl_80370020 /* 8036FD04 0036CC64 41 82 03 1C */ beq lbl_80370020
@ -88,10 +109,10 @@ lbl_8036FCF0:
/* 8036FD0C 0036CC6C 4E 80 00 21 */ blrl /* 8036FD0C 0036CC6C 4E 80 00 21 */ blrl
/* 8036FD10 0036CC70 48 00 03 10 */ b lbl_80370020 /* 8036FD10 0036CC70 48 00 03 10 */ b lbl_80370020
lbl_8036FD14: lbl_8036FD14:
/* 8036FD14 0036CC74 80 0D AB 90 */ lwz r0, lbl_805A9750@sda21(r13) /* 8036FD14 0036CC74 80 0D AB 90 */ lwz r0, __DSP_rude_task_pending@sda21(r13)
/* 8036FD18 0036CC78 2C 00 00 00 */ cmpwi r0, 0 /* 8036FD18 0036CC78 2C 00 00 00 */ cmpwi r0, 0
/* 8036FD1C 0036CC7C 41 82 00 98 */ beq lbl_8036FDB4 /* 8036FD1C 0036CC7C 41 82 00 98 */ beq lbl_8036FDB4
/* 8036FD20 0036CC80 80 0D AB 94 */ lwz r0, lbl_805A9754@sda21(r13) /* 8036FD20 0036CC80 80 0D AB 94 */ lwz r0, __DSP_rude_task@sda21(r13)
/* 8036FD24 0036CC84 7C 05 00 40 */ cmplw r5, r0 /* 8036FD24 0036CC84 7C 05 00 40 */ cmplw r5, r0
/* 8036FD28 0036CC88 40 82 00 44 */ bne lbl_8036FD6C /* 8036FD28 0036CC88 40 82 00 44 */ bne lbl_8036FD6C
/* 8036FD2C 0036CC8C 3C 60 CD D1 */ lis r3, 0xCDD10003@ha /* 8036FD2C 0036CC8C 3C 60 CD D1 */ lis r3, 0xCDD10003@ha
@ -102,9 +123,9 @@ lbl_8036FD38:
/* 8036FD3C 0036CC9C 28 03 00 00 */ cmplwi r3, 0 /* 8036FD3C 0036CC9C 28 03 00 00 */ cmplwi r3, 0
/* 8036FD40 0036CCA0 40 82 FF F8 */ bne lbl_8036FD38 /* 8036FD40 0036CCA0 40 82 FF F8 */ bne lbl_8036FD38
/* 8036FD44 0036CCA4 38 00 00 00 */ li r0, 0 /* 8036FD44 0036CCA4 38 00 00 00 */ li r0, 0
/* 8036FD48 0036CCA8 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FD48 0036CCA8 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FD4C 0036CCAC 90 0D AB 94 */ stw r0, lbl_805A9754@sda21(r13) /* 8036FD4C 0036CCAC 90 0D AB 94 */ stw r0, __DSP_rude_task@sda21(r13)
/* 8036FD50 0036CCB0 90 0D AB 90 */ stw r0, lbl_805A9750@sda21(r13) /* 8036FD50 0036CCB0 90 0D AB 90 */ stw r0, __DSP_rude_task_pending@sda21(r13)
/* 8036FD54 0036CCB4 81 83 00 2C */ lwz r12, 0x2c(r3) /* 8036FD54 0036CCB4 81 83 00 2C */ lwz r12, 0x2c(r3)
/* 8036FD58 0036CCB8 28 0C 00 00 */ cmplwi r12, 0 /* 8036FD58 0036CCB8 28 0C 00 00 */ cmplwi r12, 0
/* 8036FD5C 0036CCBC 41 82 02 C4 */ beq lbl_80370020 /* 8036FD5C 0036CCBC 41 82 02 C4 */ beq lbl_80370020
@ -119,23 +140,23 @@ lbl_8036FD78:
/* 8036FD78 0036CCD8 4B FF FC 41 */ bl DSPCheckMailToDSP /* 8036FD78 0036CCD8 4B FF FC 41 */ bl DSPCheckMailToDSP
/* 8036FD7C 0036CCDC 28 03 00 00 */ cmplwi r3, 0 /* 8036FD7C 0036CCDC 28 03 00 00 */ cmplwi r3, 0
/* 8036FD80 0036CCE0 40 82 FF F8 */ bne lbl_8036FD78 /* 8036FD80 0036CCE0 40 82 FF F8 */ bne lbl_8036FD78
/* 8036FD84 0036CCE4 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FD84 0036CCE4 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FD88 0036CCE8 80 8D AB 94 */ lwz r4, lbl_805A9754@sda21(r13) /* 8036FD88 0036CCE8 80 8D AB 94 */ lwz r4, __DSP_rude_task@sda21(r13)
/* 8036FD8C 0036CCEC 48 00 02 B9 */ bl __DSP_exec_task /* 8036FD8C 0036CCEC 48 00 02 B9 */ bl __DSP_exec_task
/* 8036FD90 0036CCF0 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FD90 0036CCF0 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FD94 0036CCF4 38 80 00 02 */ li r4, 2 /* 8036FD94 0036CCF4 38 80 00 02 */ li r4, 2
/* 8036FD98 0036CCF8 38 00 00 00 */ li r0, 0 /* 8036FD98 0036CCF8 38 00 00 00 */ li r0, 0
/* 8036FD9C 0036CCFC 90 83 00 00 */ stw r4, 0(r3) /* 8036FD9C 0036CCFC 90 83 00 00 */ stw r4, 0(r3)
/* 8036FDA0 0036CD00 80 6D AB 94 */ lwz r3, lbl_805A9754@sda21(r13) /* 8036FDA0 0036CD00 80 6D AB 94 */ lwz r3, __DSP_rude_task@sda21(r13)
/* 8036FDA4 0036CD04 90 0D AB 90 */ stw r0, lbl_805A9750@sda21(r13) /* 8036FDA4 0036CD04 90 0D AB 90 */ stw r0, __DSP_rude_task_pending@sda21(r13)
/* 8036FDA8 0036CD08 90 6D AB A4 */ stw r3, lbl_805A9764@sda21(r13) /* 8036FDA8 0036CD08 90 6D AB A4 */ stw r3, __DSP_curr_task@sda21(r13)
/* 8036FDAC 0036CD0C 90 0D AB 94 */ stw r0, lbl_805A9754@sda21(r13) /* 8036FDAC 0036CD0C 90 0D AB 94 */ stw r0, __DSP_rude_task@sda21(r13)
/* 8036FDB0 0036CD10 48 00 02 70 */ b lbl_80370020 /* 8036FDB0 0036CD10 48 00 02 70 */ b lbl_80370020
lbl_8036FDB4: lbl_8036FDB4:
/* 8036FDB4 0036CD14 80 05 00 38 */ lwz r0, 0x38(r5) /* 8036FDB4 0036CD14 80 05 00 38 */ lwz r0, 0x38(r5)
/* 8036FDB8 0036CD18 28 00 00 00 */ cmplwi r0, 0 /* 8036FDB8 0036CD18 28 00 00 00 */ cmplwi r0, 0
/* 8036FDBC 0036CD1C 40 82 00 80 */ bne lbl_8036FE3C /* 8036FDBC 0036CD1C 40 82 00 80 */ bne lbl_8036FE3C
/* 8036FDC0 0036CD20 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) /* 8036FDC0 0036CD20 80 0D AB A0 */ lwz r0, __DSP_first_task@sda21(r13)
/* 8036FDC4 0036CD24 7C 05 00 40 */ cmplw r5, r0 /* 8036FDC4 0036CD24 7C 05 00 40 */ cmplw r5, r0
/* 8036FDC8 0036CD28 40 82 00 38 */ bne lbl_8036FE00 /* 8036FDC8 0036CD28 40 82 00 38 */ bne lbl_8036FE00
/* 8036FDCC 0036CD2C 3C 60 CD D1 */ lis r3, 0xCDD10003@ha /* 8036FDCC 0036CD2C 3C 60 CD D1 */ lis r3, 0xCDD10003@ha
@ -145,7 +166,7 @@ lbl_8036FDD8:
/* 8036FDD8 0036CD38 4B FF FB E1 */ bl DSPCheckMailToDSP /* 8036FDD8 0036CD38 4B FF FB E1 */ bl DSPCheckMailToDSP
/* 8036FDDC 0036CD3C 28 03 00 00 */ cmplwi r3, 0 /* 8036FDDC 0036CD3C 28 03 00 00 */ cmplwi r3, 0
/* 8036FDE0 0036CD40 40 82 FF F8 */ bne lbl_8036FDD8 /* 8036FDE0 0036CD40 40 82 FF F8 */ bne lbl_8036FDD8
/* 8036FDE4 0036CD44 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FDE4 0036CD44 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FDE8 0036CD48 81 83 00 2C */ lwz r12, 0x2c(r3) /* 8036FDE8 0036CD48 81 83 00 2C */ lwz r12, 0x2c(r3)
/* 8036FDEC 0036CD4C 28 0C 00 00 */ cmplwi r12, 0 /* 8036FDEC 0036CD4C 28 0C 00 00 */ cmplwi r12, 0
/* 8036FDF0 0036CD50 41 82 02 30 */ beq lbl_80370020 /* 8036FDF0 0036CD50 41 82 02 30 */ beq lbl_80370020
@ -160,14 +181,14 @@ lbl_8036FE0C:
/* 8036FE0C 0036CD6C 4B FF FB AD */ bl DSPCheckMailToDSP /* 8036FE0C 0036CD6C 4B FF FB AD */ bl DSPCheckMailToDSP
/* 8036FE10 0036CD70 28 03 00 00 */ cmplwi r3, 0 /* 8036FE10 0036CD70 28 03 00 00 */ cmplwi r3, 0
/* 8036FE14 0036CD74 40 82 FF F8 */ bne lbl_8036FE0C /* 8036FE14 0036CD74 40 82 FF F8 */ bne lbl_8036FE0C
/* 8036FE18 0036CD78 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FE18 0036CD78 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FE1C 0036CD7C 80 8D AB A0 */ lwz r4, lbl_805A9760@sda21(r13) /* 8036FE1C 0036CD7C 80 8D AB A0 */ lwz r4, __DSP_first_task@sda21(r13)
/* 8036FE20 0036CD80 48 00 02 25 */ bl __DSP_exec_task /* 8036FE20 0036CD80 48 00 02 25 */ bl __DSP_exec_task
/* 8036FE24 0036CD84 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FE24 0036CD84 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FE28 0036CD88 38 00 00 02 */ li r0, 2 /* 8036FE28 0036CD88 38 00 00 02 */ li r0, 2
/* 8036FE2C 0036CD8C 90 03 00 00 */ stw r0, 0(r3) /* 8036FE2C 0036CD8C 90 03 00 00 */ stw r0, 0(r3)
/* 8036FE30 0036CD90 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) /* 8036FE30 0036CD90 80 0D AB A0 */ lwz r0, __DSP_first_task@sda21(r13)
/* 8036FE34 0036CD94 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) /* 8036FE34 0036CD94 90 0D AB A4 */ stw r0, __DSP_curr_task@sda21(r13)
/* 8036FE38 0036CD98 48 00 01 E8 */ b lbl_80370020 /* 8036FE38 0036CD98 48 00 01 E8 */ b lbl_80370020
lbl_8036FE3C: lbl_8036FE3C:
/* 8036FE3C 0036CD9C 3C 60 CD D1 */ lis r3, 0xCDD10001@ha /* 8036FE3C 0036CD9C 3C 60 CD D1 */ lis r3, 0xCDD10001@ha
@ -177,18 +198,18 @@ lbl_8036FE48:
/* 8036FE48 0036CDA8 4B FF FB 71 */ bl DSPCheckMailToDSP /* 8036FE48 0036CDA8 4B FF FB 71 */ bl DSPCheckMailToDSP
/* 8036FE4C 0036CDAC 28 03 00 00 */ cmplwi r3, 0 /* 8036FE4C 0036CDAC 28 03 00 00 */ cmplwi r3, 0
/* 8036FE50 0036CDB0 40 82 FF F8 */ bne lbl_8036FE48 /* 8036FE50 0036CDB0 40 82 FF F8 */ bne lbl_8036FE48
/* 8036FE54 0036CDB4 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FE54 0036CDB4 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FE58 0036CDB8 80 83 00 38 */ lwz r4, 0x38(r3) /* 8036FE58 0036CDB8 80 83 00 38 */ lwz r4, 0x38(r3)
/* 8036FE5C 0036CDBC 48 00 01 E9 */ bl __DSP_exec_task /* 8036FE5C 0036CDBC 48 00 01 E9 */ bl __DSP_exec_task
/* 8036FE60 0036CDC0 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FE60 0036CDC0 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FE64 0036CDC4 38 00 00 02 */ li r0, 2 /* 8036FE64 0036CDC4 38 00 00 02 */ li r0, 2
/* 8036FE68 0036CDC8 90 03 00 00 */ stw r0, 0(r3) /* 8036FE68 0036CDC8 90 03 00 00 */ stw r0, 0(r3)
/* 8036FE6C 0036CDCC 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FE6C 0036CDCC 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FE70 0036CDD0 80 03 00 38 */ lwz r0, 0x38(r3) /* 8036FE70 0036CDD0 80 03 00 38 */ lwz r0, 0x38(r3)
/* 8036FE74 0036CDD4 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) /* 8036FE74 0036CDD4 90 0D AB A4 */ stw r0, __DSP_curr_task@sda21(r13)
/* 8036FE78 0036CDD8 48 00 01 A8 */ b lbl_80370020 /* 8036FE78 0036CDD8 48 00 01 A8 */ b lbl_80370020
lbl_8036FE7C: lbl_8036FE7C:
/* 8036FE7C 0036CDDC 80 0D AB 90 */ lwz r0, lbl_805A9750@sda21(r13) /* 8036FE7C 0036CDDC 80 0D AB 90 */ lwz r0, __DSP_rude_task_pending@sda21(r13)
/* 8036FE80 0036CDE0 2C 00 00 00 */ cmpwi r0, 0 /* 8036FE80 0036CDE0 2C 00 00 00 */ cmpwi r0, 0
/* 8036FE84 0036CDE4 41 82 00 60 */ beq lbl_8036FEE4 /* 8036FE84 0036CDE4 41 82 00 60 */ beq lbl_8036FEE4
/* 8036FE88 0036CDE8 81 85 00 30 */ lwz r12, 0x30(r5) /* 8036FE88 0036CDE8 81 85 00 30 */ lwz r12, 0x30(r5)
@ -206,21 +227,21 @@ lbl_8036FEAC:
/* 8036FEB0 0036CE10 28 03 00 00 */ cmplwi r3, 0 /* 8036FEB0 0036CE10 28 03 00 00 */ cmplwi r3, 0
/* 8036FEB4 0036CE14 40 82 FF F8 */ bne lbl_8036FEAC /* 8036FEB4 0036CE14 40 82 FF F8 */ bne lbl_8036FEAC
/* 8036FEB8 0036CE18 38 60 00 00 */ li r3, 0 /* 8036FEB8 0036CE18 38 60 00 00 */ li r3, 0
/* 8036FEBC 0036CE1C 80 8D AB 94 */ lwz r4, lbl_805A9754@sda21(r13) /* 8036FEBC 0036CE1C 80 8D AB 94 */ lwz r4, __DSP_rude_task@sda21(r13)
/* 8036FEC0 0036CE20 48 00 01 85 */ bl __DSP_exec_task /* 8036FEC0 0036CE20 48 00 01 85 */ bl __DSP_exec_task
/* 8036FEC4 0036CE24 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FEC4 0036CE24 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FEC8 0036CE28 48 00 05 49 */ bl __DSP_remove_task /* 8036FEC8 0036CE28 48 00 05 49 */ bl __DSP_remove_task
/* 8036FECC 0036CE2C 80 6D AB 94 */ lwz r3, lbl_805A9754@sda21(r13) /* 8036FECC 0036CE2C 80 6D AB 94 */ lwz r3, __DSP_rude_task@sda21(r13)
/* 8036FED0 0036CE30 38 00 00 00 */ li r0, 0 /* 8036FED0 0036CE30 38 00 00 00 */ li r0, 0
/* 8036FED4 0036CE34 90 0D AB 90 */ stw r0, lbl_805A9750@sda21(r13) /* 8036FED4 0036CE34 90 0D AB 90 */ stw r0, __DSP_rude_task_pending@sda21(r13)
/* 8036FED8 0036CE38 90 6D AB A4 */ stw r3, lbl_805A9764@sda21(r13) /* 8036FED8 0036CE38 90 6D AB A4 */ stw r3, __DSP_curr_task@sda21(r13)
/* 8036FEDC 0036CE3C 90 0D AB 94 */ stw r0, lbl_805A9754@sda21(r13) /* 8036FEDC 0036CE3C 90 0D AB 94 */ stw r0, __DSP_rude_task@sda21(r13)
/* 8036FEE0 0036CE40 48 00 01 40 */ b lbl_80370020 /* 8036FEE0 0036CE40 48 00 01 40 */ b lbl_80370020
lbl_8036FEE4: lbl_8036FEE4:
/* 8036FEE4 0036CE44 80 05 00 38 */ lwz r0, 0x38(r5) /* 8036FEE4 0036CE44 80 05 00 38 */ lwz r0, 0x38(r5)
/* 8036FEE8 0036CE48 28 00 00 00 */ cmplwi r0, 0 /* 8036FEE8 0036CE48 28 00 00 00 */ cmplwi r0, 0
/* 8036FEEC 0036CE4C 40 82 00 B4 */ bne lbl_8036FFA0 /* 8036FEEC 0036CE4C 40 82 00 B4 */ bne lbl_8036FFA0
/* 8036FEF0 0036CE50 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) /* 8036FEF0 0036CE50 80 0D AB A0 */ lwz r0, __DSP_first_task@sda21(r13)
/* 8036FEF4 0036CE54 7C 05 00 40 */ cmplw r5, r0 /* 8036FEF4 0036CE54 7C 05 00 40 */ cmplw r5, r0
/* 8036FEF8 0036CE58 40 82 00 4C */ bne lbl_8036FF44 /* 8036FEF8 0036CE58 40 82 00 4C */ bne lbl_8036FF44
/* 8036FEFC 0036CE5C 81 85 00 30 */ lwz r12, 0x30(r5) /* 8036FEFC 0036CE5C 81 85 00 30 */ lwz r12, 0x30(r5)
@ -237,10 +258,10 @@ lbl_8036FF20:
/* 8036FF20 0036CE80 4B FF FA 99 */ bl DSPCheckMailToDSP /* 8036FF20 0036CE80 4B FF FA 99 */ bl DSPCheckMailToDSP
/* 8036FF24 0036CE84 28 03 00 00 */ cmplwi r3, 0 /* 8036FF24 0036CE84 28 03 00 00 */ cmplwi r3, 0
/* 8036FF28 0036CE88 40 82 FF F8 */ bne lbl_8036FF20 /* 8036FF28 0036CE88 40 82 FF F8 */ bne lbl_8036FF20
/* 8036FF2C 0036CE8C 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FF2C 0036CE8C 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FF30 0036CE90 38 00 00 03 */ li r0, 3 /* 8036FF30 0036CE90 38 00 00 03 */ li r0, 3
/* 8036FF34 0036CE94 90 03 00 00 */ stw r0, 0(r3) /* 8036FF34 0036CE94 90 03 00 00 */ stw r0, 0(r3)
/* 8036FF38 0036CE98 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FF38 0036CE98 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FF3C 0036CE9C 48 00 04 D5 */ bl __DSP_remove_task /* 8036FF3C 0036CE9C 48 00 04 D5 */ bl __DSP_remove_task
/* 8036FF40 0036CEA0 48 00 00 E0 */ b lbl_80370020 /* 8036FF40 0036CEA0 48 00 00 E0 */ b lbl_80370020
lbl_8036FF44: lbl_8036FF44:
@ -258,15 +279,15 @@ lbl_8036FF68:
/* 8036FF68 0036CEC8 4B FF FA 51 */ bl DSPCheckMailToDSP /* 8036FF68 0036CEC8 4B FF FA 51 */ bl DSPCheckMailToDSP
/* 8036FF6C 0036CECC 28 03 00 00 */ cmplwi r3, 0 /* 8036FF6C 0036CECC 28 03 00 00 */ cmplwi r3, 0
/* 8036FF70 0036CED0 40 82 FF F8 */ bne lbl_8036FF68 /* 8036FF70 0036CED0 40 82 FF F8 */ bne lbl_8036FF68
/* 8036FF74 0036CED4 80 8D AB A4 */ lwz r4, lbl_805A9764@sda21(r13) /* 8036FF74 0036CED4 80 8D AB A4 */ lwz r4, __DSP_curr_task@sda21(r13)
/* 8036FF78 0036CED8 38 00 00 03 */ li r0, 3 /* 8036FF78 0036CED8 38 00 00 03 */ li r0, 3
/* 8036FF7C 0036CEDC 38 60 00 00 */ li r3, 0 /* 8036FF7C 0036CEDC 38 60 00 00 */ li r3, 0
/* 8036FF80 0036CEE0 90 04 00 00 */ stw r0, 0(r4) /* 8036FF80 0036CEE0 90 04 00 00 */ stw r0, 0(r4)
/* 8036FF84 0036CEE4 80 8D AB A0 */ lwz r4, lbl_805A9760@sda21(r13) /* 8036FF84 0036CEE4 80 8D AB A0 */ lwz r4, __DSP_first_task@sda21(r13)
/* 8036FF88 0036CEE8 48 00 00 BD */ bl __DSP_exec_task /* 8036FF88 0036CEE8 48 00 00 BD */ bl __DSP_exec_task
/* 8036FF8C 0036CEEC 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) /* 8036FF8C 0036CEEC 80 0D AB A0 */ lwz r0, __DSP_first_task@sda21(r13)
/* 8036FF90 0036CEF0 80 6D AB 9C */ lwz r3, lbl_805A975C@sda21(r13) /* 8036FF90 0036CEF0 80 6D AB 9C */ lwz r3, __DSP_last_task@sda21(r13)
/* 8036FF94 0036CEF4 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) /* 8036FF94 0036CEF4 90 0D AB A4 */ stw r0, __DSP_curr_task@sda21(r13)
/* 8036FF98 0036CEF8 48 00 04 79 */ bl __DSP_remove_task /* 8036FF98 0036CEF8 48 00 04 79 */ bl __DSP_remove_task
/* 8036FF9C 0036CEFC 48 00 00 84 */ b lbl_80370020 /* 8036FF9C 0036CEFC 48 00 00 84 */ b lbl_80370020
lbl_8036FFA0: lbl_8036FFA0:
@ -284,17 +305,17 @@ lbl_8036FFC4:
/* 8036FFC4 0036CF24 4B FF F9 F5 */ bl DSPCheckMailToDSP /* 8036FFC4 0036CF24 4B FF F9 F5 */ bl DSPCheckMailToDSP
/* 8036FFC8 0036CF28 28 03 00 00 */ cmplwi r3, 0 /* 8036FFC8 0036CF28 28 03 00 00 */ cmplwi r3, 0
/* 8036FFCC 0036CF2C 40 82 FF F8 */ bne lbl_8036FFC4 /* 8036FFCC 0036CF2C 40 82 FF F8 */ bne lbl_8036FFC4
/* 8036FFD0 0036CF30 80 8D AB A4 */ lwz r4, lbl_805A9764@sda21(r13) /* 8036FFD0 0036CF30 80 8D AB A4 */ lwz r4, __DSP_curr_task@sda21(r13)
/* 8036FFD4 0036CF34 38 00 00 03 */ li r0, 3 /* 8036FFD4 0036CF34 38 00 00 03 */ li r0, 3
/* 8036FFD8 0036CF38 38 60 00 00 */ li r3, 0 /* 8036FFD8 0036CF38 38 60 00 00 */ li r3, 0
/* 8036FFDC 0036CF3C 90 04 00 00 */ stw r0, 0(r4) /* 8036FFDC 0036CF3C 90 04 00 00 */ stw r0, 0(r4)
/* 8036FFE0 0036CF40 80 8D AB A4 */ lwz r4, lbl_805A9764@sda21(r13) /* 8036FFE0 0036CF40 80 8D AB A4 */ lwz r4, __DSP_curr_task@sda21(r13)
/* 8036FFE4 0036CF44 80 84 00 38 */ lwz r4, 0x38(r4) /* 8036FFE4 0036CF44 80 84 00 38 */ lwz r4, 0x38(r4)
/* 8036FFE8 0036CF48 48 00 00 5D */ bl __DSP_exec_task /* 8036FFE8 0036CF48 48 00 00 5D */ bl __DSP_exec_task
/* 8036FFEC 0036CF4C 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FFEC 0036CF4C 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FFF0 0036CF50 80 03 00 38 */ lwz r0, 0x38(r3) /* 8036FFF0 0036CF50 80 03 00 38 */ lwz r0, 0x38(r3)
/* 8036FFF4 0036CF54 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) /* 8036FFF4 0036CF54 90 0D AB A4 */ stw r0, __DSP_curr_task@sda21(r13)
/* 8036FFF8 0036CF58 80 6D AB A4 */ lwz r3, lbl_805A9764@sda21(r13) /* 8036FFF8 0036CF58 80 6D AB A4 */ lwz r3, __DSP_curr_task@sda21(r13)
/* 8036FFFC 0036CF5C 80 63 00 3C */ lwz r3, 0x3c(r3) /* 8036FFFC 0036CF5C 80 63 00 3C */ lwz r3, 0x3c(r3)
/* 80370000 0036CF60 48 00 04 11 */ bl __DSP_remove_task /* 80370000 0036CF60 48 00 04 11 */ bl __DSP_remove_task
/* 80370004 0036CF64 48 00 00 1C */ b lbl_80370020 /* 80370004 0036CF64 48 00 00 1C */ b lbl_80370020
@ -559,13 +580,13 @@ lbl_803702EC:
.global __DSP_insert_task .global __DSP_insert_task
__DSP_insert_task: __DSP_insert_task:
/* 80370370 0036D2D0 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) /* 80370370 0036D2D0 80 0D AB A0 */ lwz r0, __DSP_first_task@sda21(r13)
/* 80370374 0036D2D4 28 00 00 00 */ cmplwi r0, 0 /* 80370374 0036D2D4 28 00 00 00 */ cmplwi r0, 0
/* 80370378 0036D2D8 40 82 00 20 */ bne lbl_80370398 /* 80370378 0036D2D8 40 82 00 20 */ bne lbl_80370398
/* 8037037C 0036D2DC 90 6D AB A4 */ stw r3, lbl_805A9764@sda21(r13) /* 8037037C 0036D2DC 90 6D AB A4 */ stw r3, __DSP_curr_task@sda21(r13)
/* 80370380 0036D2E0 38 00 00 00 */ li r0, 0 /* 80370380 0036D2E0 38 00 00 00 */ li r0, 0
/* 80370384 0036D2E4 90 6D AB 9C */ stw r3, lbl_805A975C@sda21(r13) /* 80370384 0036D2E4 90 6D AB 9C */ stw r3, __DSP_last_task@sda21(r13)
/* 80370388 0036D2E8 90 6D AB A0 */ stw r3, lbl_805A9760@sda21(r13) /* 80370388 0036D2E8 90 6D AB A0 */ stw r3, __DSP_first_task@sda21(r13)
/* 8037038C 0036D2EC 90 03 00 3C */ stw r0, 0x3c(r3) /* 8037038C 0036D2EC 90 03 00 3C */ stw r0, 0x3c(r3)
/* 80370390 0036D2F0 90 03 00 38 */ stw r0, 0x38(r3) /* 80370390 0036D2F0 90 03 00 38 */ stw r0, 0x38(r3)
/* 80370394 0036D2F4 4E 80 00 20 */ blr /* 80370394 0036D2F4 4E 80 00 20 */ blr
@ -584,7 +605,7 @@ lbl_803703A0:
/* 803703C0 0036D320 80 83 00 3C */ lwz r4, 0x3c(r3) /* 803703C0 0036D320 80 83 00 3C */ lwz r4, 0x3c(r3)
/* 803703C4 0036D324 28 04 00 00 */ cmplwi r4, 0 /* 803703C4 0036D324 28 04 00 00 */ cmplwi r4, 0
/* 803703C8 0036D328 40 82 00 0C */ bne lbl_803703D4 /* 803703C8 0036D328 40 82 00 0C */ bne lbl_803703D4
/* 803703CC 0036D32C 90 6D AB A0 */ stw r3, lbl_805A9760@sda21(r13) /* 803703CC 0036D32C 90 6D AB A0 */ stw r3, __DSP_first_task@sda21(r13)
/* 803703D0 0036D330 48 00 00 18 */ b lbl_803703E8 /* 803703D0 0036D330 48 00 00 18 */ b lbl_803703E8
lbl_803703D4: lbl_803703D4:
/* 803703D4 0036D334 90 64 00 38 */ stw r3, 0x38(r4) /* 803703D4 0036D334 90 64 00 38 */ stw r3, 0x38(r4)
@ -597,13 +618,13 @@ lbl_803703E0:
lbl_803703E8: lbl_803703E8:
/* 803703E8 0036D348 28 05 00 00 */ cmplwi r5, 0 /* 803703E8 0036D348 28 05 00 00 */ cmplwi r5, 0
/* 803703EC 0036D34C 4C 82 00 20 */ bnelr /* 803703EC 0036D34C 4C 82 00 20 */ bnelr
/* 803703F0 0036D350 80 8D AB 9C */ lwz r4, lbl_805A975C@sda21(r13) /* 803703F0 0036D350 80 8D AB 9C */ lwz r4, __DSP_last_task@sda21(r13)
/* 803703F4 0036D354 38 00 00 00 */ li r0, 0 /* 803703F4 0036D354 38 00 00 00 */ li r0, 0
/* 803703F8 0036D358 90 64 00 38 */ stw r3, 0x38(r4) /* 803703F8 0036D358 90 64 00 38 */ stw r3, 0x38(r4)
/* 803703FC 0036D35C 90 03 00 38 */ stw r0, 0x38(r3) /* 803703FC 0036D35C 90 03 00 38 */ stw r0, 0x38(r3)
/* 80370400 0036D360 80 0D AB 9C */ lwz r0, lbl_805A975C@sda21(r13) /* 80370400 0036D360 80 0D AB 9C */ lwz r0, __DSP_last_task@sda21(r13)
/* 80370404 0036D364 90 03 00 3C */ stw r0, 0x3c(r3) /* 80370404 0036D364 90 03 00 3C */ stw r0, 0x3c(r3)
/* 80370408 0036D368 90 6D AB 9C */ stw r3, lbl_805A975C@sda21(r13) /* 80370408 0036D368 90 6D AB 9C */ stw r3, __DSP_last_task@sda21(r13)
/* 8037040C 0036D36C 4E 80 00 20 */ blr /* 8037040C 0036D36C 4E 80 00 20 */ blr
.global __DSP_remove_task .global __DSP_remove_task
@ -612,35 +633,35 @@ __DSP_remove_task:
/* 80370414 0036D374 90 83 00 08 */ stw r4, 8(r3) /* 80370414 0036D374 90 83 00 08 */ stw r4, 8(r3)
/* 80370418 0036D378 38 00 00 03 */ li r0, 3 /* 80370418 0036D378 38 00 00 03 */ li r0, 3
/* 8037041C 0036D37C 90 03 00 00 */ stw r0, 0(r3) /* 8037041C 0036D37C 90 03 00 00 */ stw r0, 0(r3)
/* 80370420 0036D380 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) /* 80370420 0036D380 80 0D AB A0 */ lwz r0, __DSP_first_task@sda21(r13)
/* 80370424 0036D384 7C 00 18 40 */ cmplw r0, r3 /* 80370424 0036D384 7C 00 18 40 */ cmplw r0, r3
/* 80370428 0036D388 40 82 00 30 */ bne lbl_80370458 /* 80370428 0036D388 40 82 00 30 */ bne lbl_80370458
/* 8037042C 0036D38C 80 03 00 38 */ lwz r0, 0x38(r3) /* 8037042C 0036D38C 80 03 00 38 */ lwz r0, 0x38(r3)
/* 80370430 0036D390 28 00 00 00 */ cmplwi r0, 0 /* 80370430 0036D390 28 00 00 00 */ cmplwi r0, 0
/* 80370434 0036D394 41 82 00 14 */ beq lbl_80370448 /* 80370434 0036D394 41 82 00 14 */ beq lbl_80370448
/* 80370438 0036D398 90 0D AB A0 */ stw r0, lbl_805A9760@sda21(r13) /* 80370438 0036D398 90 0D AB A0 */ stw r0, __DSP_first_task@sda21(r13)
/* 8037043C 0036D39C 80 63 00 38 */ lwz r3, 0x38(r3) /* 8037043C 0036D39C 80 63 00 38 */ lwz r3, 0x38(r3)
/* 80370440 0036D3A0 90 83 00 3C */ stw r4, 0x3c(r3) /* 80370440 0036D3A0 90 83 00 3C */ stw r4, 0x3c(r3)
/* 80370444 0036D3A4 4E 80 00 20 */ blr /* 80370444 0036D3A4 4E 80 00 20 */ blr
lbl_80370448: lbl_80370448:
/* 80370448 0036D3A8 90 8D AB A4 */ stw r4, lbl_805A9764@sda21(r13) /* 80370448 0036D3A8 90 8D AB A4 */ stw r4, __DSP_curr_task@sda21(r13)
/* 8037044C 0036D3AC 90 8D AB 9C */ stw r4, lbl_805A975C@sda21(r13) /* 8037044C 0036D3AC 90 8D AB 9C */ stw r4, __DSP_last_task@sda21(r13)
/* 80370450 0036D3B0 90 8D AB A0 */ stw r4, lbl_805A9760@sda21(r13) /* 80370450 0036D3B0 90 8D AB A0 */ stw r4, __DSP_first_task@sda21(r13)
/* 80370454 0036D3B4 4E 80 00 20 */ blr /* 80370454 0036D3B4 4E 80 00 20 */ blr
lbl_80370458: lbl_80370458:
/* 80370458 0036D3B8 80 0D AB 9C */ lwz r0, lbl_805A975C@sda21(r13) /* 80370458 0036D3B8 80 0D AB 9C */ lwz r0, __DSP_last_task@sda21(r13)
/* 8037045C 0036D3BC 7C 00 18 40 */ cmplw r0, r3 /* 8037045C 0036D3BC 7C 00 18 40 */ cmplw r0, r3
/* 80370460 0036D3C0 40 82 00 20 */ bne lbl_80370480 /* 80370460 0036D3C0 40 82 00 20 */ bne lbl_80370480
/* 80370464 0036D3C4 80 03 00 3C */ lwz r0, 0x3c(r3) /* 80370464 0036D3C4 80 03 00 3C */ lwz r0, 0x3c(r3)
/* 80370468 0036D3C8 90 0D AB 9C */ stw r0, lbl_805A975C@sda21(r13) /* 80370468 0036D3C8 90 0D AB 9C */ stw r0, __DSP_last_task@sda21(r13)
/* 8037046C 0036D3CC 80 63 00 3C */ lwz r3, 0x3c(r3) /* 8037046C 0036D3CC 80 63 00 3C */ lwz r3, 0x3c(r3)
/* 80370470 0036D3D0 90 83 00 38 */ stw r4, 0x38(r3) /* 80370470 0036D3D0 90 83 00 38 */ stw r4, 0x38(r3)
/* 80370474 0036D3D4 80 0D AB A0 */ lwz r0, lbl_805A9760@sda21(r13) /* 80370474 0036D3D4 80 0D AB A0 */ lwz r0, __DSP_first_task@sda21(r13)
/* 80370478 0036D3D8 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) /* 80370478 0036D3D8 90 0D AB A4 */ stw r0, __DSP_curr_task@sda21(r13)
/* 8037047C 0036D3DC 4E 80 00 20 */ blr /* 8037047C 0036D3DC 4E 80 00 20 */ blr
lbl_80370480: lbl_80370480:
/* 80370480 0036D3E0 80 03 00 38 */ lwz r0, 0x38(r3) /* 80370480 0036D3E0 80 03 00 38 */ lwz r0, 0x38(r3)
/* 80370484 0036D3E4 90 0D AB A4 */ stw r0, lbl_805A9764@sda21(r13) /* 80370484 0036D3E4 90 0D AB A4 */ stw r0, __DSP_curr_task@sda21(r13)
/* 80370488 0036D3E8 80 03 00 38 */ lwz r0, 0x38(r3) /* 80370488 0036D3E8 80 03 00 38 */ lwz r0, 0x38(r3)
/* 8037048C 0036D3EC 80 83 00 3C */ lwz r4, 0x3c(r3) /* 8037048C 0036D3EC 80 83 00 3C */ lwz r4, 0x3c(r3)
/* 80370490 0036D3F0 90 04 00 38 */ stw r0, 0x38(r4) /* 80370490 0036D3F0 90 04 00 38 */ stw r0, 0x38(r4)

View File

@ -6,59 +6,111 @@ DriveInfo:
.skip 0x50 .skip 0x50
.section .sbss .section .sbss
.global lbl_805A9880 .global BootInfo
lbl_805A9880: BootInfo:
.skip 0x4 .skip 0x4
.global lbl_805A9884 .global BI2DebugFlag
lbl_805A9884: BI2DebugFlag:
.skip 0x4 .skip 0x4
.global lbl_805A9888 .global BI2DebugFlagHolder
lbl_805A9888: BI2DebugFlagHolder:
.skip 0x4 .skip 0x4
.global lbl_805A988C .global __OSIsGcam
lbl_805A988C: __OSIsGcam:
.skip 0x4 .skip 0x4
.global AreWeInitialized .global AreWeInitialized
AreWeInitialized: AreWeInitialized:
.skip 0x4 .skip 0x4
.global lbl_805A9894 .global OSExceptionTable
lbl_805A9894: OSExceptionTable:
.skip 0x4 .skip 0x4
.global lbl_805A9898 .global __OSSavedRegionEnd
lbl_805A9898: __OSSavedRegionEnd:
.skip 0x4 .skip 0x4
.global lbl_805A989C .global __OSSavedRegionStart
lbl_805A989C: __OSSavedRegionStart:
.skip 0x4 .skip 0x4
.global lbl_805A98A0 .global __OSInIPL
lbl_805A98A0: __OSInIPL:
.skip 0x8
.global __OSStartTime
__OSStartTime:
.skip 0x8 .skip 0x8
.global lbl_805A98A8
lbl_805A98A8:
.skip 0x4
.global lbl_805A98AC
lbl_805A98AC:
.skip 0x4
.section .data .section .data
.global lbl_803F0DA0 .global lbl_803F0DA0
lbl_803F0DA0: lbl_803F0DA0:
.incbin "baserom.dol", 0x3EDDA0, 0x208 .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
.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
.section .sdata .section .sdata
.global lbl_805A8B28 .global lbl_805A8B28
lbl_805A8B28: lbl_805A8B28:
.incbin "baserom.dol", 0x3F64C8, 0x4 .4byte lbl_803F0DA0
.global lbl_805A8B2C .global lbl_805A8B2C
lbl_805A8B2C: lbl_805A8B2C:
.incbin "baserom.dol", 0x3F64CC, 0x4 .asciz "%s\n"
.balign 4
.section .text, "ax" .section .text, "ax"
.global OSGetConsoleType .global OSGetConsoleType
OSGetConsoleType: OSGetConsoleType:
/* 8037D71C 0037A67C 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) /* 8037D71C 0037A67C 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
/* 8037D720 0037A680 28 03 00 00 */ cmplwi r3, 0 /* 8037D720 0037A680 28 03 00 00 */ cmplwi r3, 0
/* 8037D724 0037A684 41 82 00 10 */ beq lbl_8037D734 /* 8037D724 0037A684 41 82 00 10 */ beq lbl_8037D734
/* 8037D728 0037A688 80 63 00 2C */ lwz r3, 0x2c(r3) /* 8037D728 0037A688 80 63 00 2C */ lwz r3, 0x2c(r3)
@ -82,8 +134,8 @@ ClearArena:
/* 8037D75C 0037A6BC 28 00 00 00 */ cmplwi r0, 0 /* 8037D75C 0037A6BC 28 00 00 00 */ cmplwi r0, 0
/* 8037D760 0037A6C0 41 82 00 34 */ beq lbl_8037D794 /* 8037D760 0037A6C0 41 82 00 34 */ beq lbl_8037D794
/* 8037D764 0037A6C4 38 00 00 00 */ li r0, 0 /* 8037D764 0037A6C4 38 00 00 00 */ li r0, 0
/* 8037D768 0037A6C8 90 0D AC DC */ stw r0, lbl_805A989C@sda21(r13) /* 8037D768 0037A6C8 90 0D AC DC */ stw r0, __OSSavedRegionStart@sda21(r13)
/* 8037D76C 0037A6CC 90 0D AC D8 */ stw r0, lbl_805A9898@sda21(r13) /* 8037D76C 0037A6CC 90 0D AC D8 */ stw r0, __OSSavedRegionEnd@sda21(r13)
/* 8037D770 0037A6D0 48 00 10 21 */ bl OSGetArenaHi /* 8037D770 0037A6D0 48 00 10 21 */ bl OSGetArenaHi
/* 8037D774 0037A6D4 7C 7F 1B 78 */ mr r31, r3 /* 8037D774 0037A6D4 7C 7F 1B 78 */ mr r31, r3
/* 8037D778 0037A6D8 48 00 10 21 */ bl OSGetArenaLo /* 8037D778 0037A6D8 48 00 10 21 */ bl OSGetArenaLo
@ -98,8 +150,8 @@ lbl_8037D794:
/* 8037D798 0037A6F8 80 64 DF F0 */ lwz r3, 0x812FDFF0@l(r4) /* 8037D798 0037A6F8 80 64 DF F0 */ lwz r3, 0x812FDFF0@l(r4)
/* 8037D79C 0037A6FC 80 04 DF EC */ lwz r0, -0x2014(r4) /* 8037D79C 0037A6FC 80 04 DF EC */ lwz r0, -0x2014(r4)
/* 8037D7A0 0037A700 28 03 00 00 */ cmplwi r3, 0 /* 8037D7A0 0037A700 28 03 00 00 */ cmplwi r3, 0
/* 8037D7A4 0037A704 90 6D AC DC */ stw r3, lbl_805A989C@sda21(r13) /* 8037D7A4 0037A704 90 6D AC DC */ stw r3, __OSSavedRegionStart@sda21(r13)
/* 8037D7A8 0037A708 90 0D AC D8 */ stw r0, lbl_805A9898@sda21(r13) /* 8037D7A8 0037A708 90 0D AC D8 */ stw r0, __OSSavedRegionEnd@sda21(r13)
/* 8037D7AC 0037A70C 40 82 00 28 */ bne lbl_8037D7D4 /* 8037D7AC 0037A70C 40 82 00 28 */ bne lbl_8037D7D4
/* 8037D7B0 0037A710 48 00 0F E1 */ bl OSGetArenaHi /* 8037D7B0 0037A710 48 00 0F E1 */ bl OSGetArenaHi
/* 8037D7B4 0037A714 7C 7F 1B 78 */ mr r31, r3 /* 8037D7B4 0037A714 7C 7F 1B 78 */ mr r31, r3
@ -112,11 +164,11 @@ lbl_8037D794:
/* 8037D7D0 0037A730 48 00 00 88 */ b lbl_8037D858 /* 8037D7D0 0037A730 48 00 00 88 */ b lbl_8037D858
lbl_8037D7D4: lbl_8037D7D4:
/* 8037D7D4 0037A734 48 00 0F C5 */ bl OSGetArenaLo /* 8037D7D4 0037A734 48 00 0F C5 */ bl OSGetArenaLo
/* 8037D7D8 0037A738 80 0D AC DC */ lwz r0, lbl_805A989C@sda21(r13) /* 8037D7D8 0037A738 80 0D AC DC */ lwz r0, __OSSavedRegionStart@sda21(r13)
/* 8037D7DC 0037A73C 7C 03 00 40 */ cmplw r3, r0 /* 8037D7DC 0037A73C 7C 03 00 40 */ cmplw r3, r0
/* 8037D7E0 0037A740 40 80 00 78 */ bge lbl_8037D858 /* 8037D7E0 0037A740 40 80 00 78 */ bge lbl_8037D858
/* 8037D7E4 0037A744 48 00 0F AD */ bl OSGetArenaHi /* 8037D7E4 0037A744 48 00 0F AD */ bl OSGetArenaHi
/* 8037D7E8 0037A748 80 0D AC DC */ lwz r0, lbl_805A989C@sda21(r13) /* 8037D7E8 0037A748 80 0D AC DC */ lwz r0, __OSSavedRegionStart@sda21(r13)
/* 8037D7EC 0037A74C 7C 03 00 40 */ cmplw r3, r0 /* 8037D7EC 0037A74C 7C 03 00 40 */ cmplw r3, r0
/* 8037D7F0 0037A750 41 81 00 28 */ bgt lbl_8037D818 /* 8037D7F0 0037A750 41 81 00 28 */ bgt lbl_8037D818
/* 8037D7F4 0037A754 48 00 0F 9D */ bl OSGetArenaHi /* 8037D7F4 0037A754 48 00 0F 9D */ bl OSGetArenaHi
@ -130,14 +182,14 @@ lbl_8037D7D4:
/* 8037D814 0037A774 48 00 00 44 */ b lbl_8037D858 /* 8037D814 0037A774 48 00 00 44 */ b lbl_8037D858
lbl_8037D818: lbl_8037D818:
/* 8037D818 0037A778 48 00 0F 81 */ bl OSGetArenaLo /* 8037D818 0037A778 48 00 0F 81 */ bl OSGetArenaLo
/* 8037D81C 0037A77C 80 0D AC DC */ lwz r0, lbl_805A989C@sda21(r13) /* 8037D81C 0037A77C 80 0D AC DC */ lwz r0, __OSSavedRegionStart@sda21(r13)
/* 8037D820 0037A780 7F E3 00 50 */ subf r31, r3, r0 /* 8037D820 0037A780 7F E3 00 50 */ subf r31, r3, r0
/* 8037D824 0037A784 48 00 0F 75 */ bl OSGetArenaLo /* 8037D824 0037A784 48 00 0F 75 */ bl OSGetArenaLo
/* 8037D828 0037A788 7F E5 FB 78 */ mr r5, r31 /* 8037D828 0037A788 7F E5 FB 78 */ mr r5, r31
/* 8037D82C 0037A78C 38 80 00 00 */ li r4, 0 /* 8037D82C 0037A78C 38 80 00 00 */ li r4, 0
/* 8037D830 0037A790 4B C8 5B 79 */ bl memset /* 8037D830 0037A790 4B C8 5B 79 */ bl memset
/* 8037D834 0037A794 48 00 0F 5D */ bl OSGetArenaHi /* 8037D834 0037A794 48 00 0F 5D */ bl OSGetArenaHi
/* 8037D838 0037A798 83 ED AC D8 */ lwz r31, lbl_805A9898@sda21(r13) /* 8037D838 0037A798 83 ED AC D8 */ lwz r31, __OSSavedRegionEnd@sda21(r13)
/* 8037D83C 0037A79C 7C 03 F8 40 */ cmplw r3, r31 /* 8037D83C 0037A79C 7C 03 F8 40 */ cmplw r3, r31
/* 8037D840 0037A7A0 40 81 00 18 */ ble lbl_8037D858 /* 8037D840 0037A7A0 40 81 00 18 */ ble lbl_8037D858
/* 8037D844 0037A7A4 48 00 0F 4D */ bl OSGetArenaHi /* 8037D844 0037A7A4 48 00 0F 4D */ bl OSGetArenaHi
@ -191,28 +243,28 @@ OSInit:
/* 8037D8DC 0037A83C 38 00 00 01 */ li r0, 1 /* 8037D8DC 0037A83C 38 00 00 01 */ li r0, 1
/* 8037D8E0 0037A840 90 0D AC D0 */ stw r0, AreWeInitialized@sda21(r13) /* 8037D8E0 0037A840 90 0D AC D0 */ stw r0, AreWeInitialized@sda21(r13)
/* 8037D8E4 0037A844 48 00 7A E5 */ bl __OSGetSystemTime /* 8037D8E4 0037A844 48 00 7A E5 */ bl __OSGetSystemTime
/* 8037D8E8 0037A848 90 8D AC EC */ stw r4, lbl_805A98AC@sda21(r13) /* 8037D8E8 0037A848 90 8D AC EC */ stw r4, __OSStartTime+4@sda21(r13)
/* 8037D8EC 0037A84C 90 6D AC E8 */ stw r3, lbl_805A98A8@sda21(r13) /* 8037D8EC 0037A84C 90 6D AC E8 */ stw r3, __OSStartTime@sda21(r13)
/* 8037D8F0 0037A850 48 00 3D 71 */ bl OSDisableInterrupts /* 8037D8F0 0037A850 48 00 3D 71 */ bl OSDisableInterrupts
/* 8037D8F4 0037A854 4B FF 1F A1 */ bl PPCDisableSpeculation /* 8037D8F4 0037A854 4B FF 1F A1 */ bl PPCDisableSpeculation
/* 8037D8F8 0037A858 4B FF 1F CD */ bl PPCSetFpNonIEEEMode /* 8037D8F8 0037A858 4B FF 1F CD */ bl PPCSetFpNonIEEEMode
/* 8037D8FC 0037A85C 38 00 00 00 */ li r0, 0 /* 8037D8FC 0037A85C 38 00 00 00 */ li r0, 0
/* 8037D900 0037A860 3C 80 80 00 */ lis r4, 0x800000F4@ha /* 8037D900 0037A860 3C 80 80 00 */ lis r4, 0x800000F4@ha
/* 8037D904 0037A864 90 0D AC C4 */ stw r0, lbl_805A9884@sda21(r13) /* 8037D904 0037A864 90 0D AC C4 */ stw r0, BI2DebugFlag@sda21(r13)
/* 8037D908 0037A868 90 8D AC C0 */ stw r4, lbl_805A9880@sda21(r13) /* 8037D908 0037A868 90 8D AC C0 */ stw r4, BootInfo@sda21(r13)
/* 8037D90C 0037A86C 90 0D AC 04 */ stw r0, lbl_805A97C4@sda21(r13) /* 8037D90C 0037A86C 90 0D AC 04 */ stw r0, lbl_805A97C4@sda21(r13)
/* 8037D910 0037A870 80 64 00 F4 */ lwz r3, 0x800000F4@l(r4) /* 8037D910 0037A870 80 64 00 F4 */ lwz r3, 0x800000F4@l(r4)
/* 8037D914 0037A874 28 03 00 00 */ cmplwi r3, 0 /* 8037D914 0037A874 28 03 00 00 */ cmplwi r3, 0
/* 8037D918 0037A878 41 82 00 34 */ beq lbl_8037D94C /* 8037D918 0037A878 41 82 00 34 */ beq lbl_8037D94C
/* 8037D91C 0037A87C 38 03 00 0C */ addi r0, r3, 0xc /* 8037D91C 0037A87C 38 03 00 0C */ addi r0, r3, 0xc
/* 8037D920 0037A880 90 0D AC C4 */ stw r0, lbl_805A9884@sda21(r13) /* 8037D920 0037A880 90 0D AC C4 */ stw r0, BI2DebugFlag@sda21(r13)
/* 8037D924 0037A884 80 03 00 24 */ lwz r0, 0x24(r3) /* 8037D924 0037A884 80 03 00 24 */ lwz r0, 0x24(r3)
/* 8037D928 0037A888 80 6D AC C4 */ lwz r3, lbl_805A9884@sda21(r13) /* 8037D928 0037A888 80 6D AC C4 */ lwz r3, BI2DebugFlag@sda21(r13)
/* 8037D92C 0037A88C 90 0D AD 94 */ stw r0, lbl_805A9954@sda21(r13) /* 8037D92C 0037A88C 90 0D AD 94 */ stw r0, __PADSpec@sda21(r13)
/* 8037D930 0037A890 80 03 00 00 */ lwz r0, 0(r3) /* 8037D930 0037A890 80 03 00 00 */ lwz r0, 0(r3)
/* 8037D934 0037A894 54 00 06 3E */ clrlwi r0, r0, 0x18 /* 8037D934 0037A894 54 00 06 3E */ clrlwi r0, r0, 0x18
/* 8037D938 0037A898 98 04 30 E8 */ stb r0, 0x30e8(r4) /* 8037D938 0037A898 98 04 30 E8 */ stb r0, 0x30e8(r4)
/* 8037D93C 0037A89C 80 0D AD 94 */ lwz r0, lbl_805A9954@sda21(r13) /* 8037D93C 0037A89C 80 0D AD 94 */ lwz r0, __PADSpec@sda21(r13)
/* 8037D940 0037A8A0 54 00 06 3E */ clrlwi r0, r0, 0x18 /* 8037D940 0037A8A0 54 00 06 3E */ clrlwi r0, r0, 0x18
/* 8037D944 0037A8A4 98 04 30 E9 */ stb r0, 0x30e9(r4) /* 8037D944 0037A8A4 98 04 30 E9 */ stb r0, 0x30e9(r4)
/* 8037D948 0037A8A8 48 00 00 28 */ b lbl_8037D970 /* 8037D948 0037A8A8 48 00 00 28 */ b lbl_8037D970
@ -221,14 +273,14 @@ lbl_8037D94C:
/* 8037D950 0037A8B0 28 00 00 00 */ cmplwi r0, 0 /* 8037D950 0037A8B0 28 00 00 00 */ cmplwi r0, 0
/* 8037D954 0037A8B4 41 82 00 1C */ beq lbl_8037D970 /* 8037D954 0037A8B4 41 82 00 1C */ beq lbl_8037D970
/* 8037D958 0037A8B8 88 64 30 E8 */ lbz r3, 0x30e8(r4) /* 8037D958 0037A8B8 88 64 30 E8 */ lbz r3, 0x30e8(r4)
/* 8037D95C 0037A8BC 38 0D AC C8 */ addi r0, r13, lbl_805A9888@sda21 /* 8037D95C 0037A8BC 38 0D AC C8 */ addi r0, r13, BI2DebugFlagHolder@sda21
/* 8037D960 0037A8C0 90 6D AC C8 */ stw r3, lbl_805A9888@sda21(r13) /* 8037D960 0037A8C0 90 6D AC C8 */ stw r3, BI2DebugFlagHolder@sda21(r13)
/* 8037D964 0037A8C4 90 0D AC C4 */ stw r0, lbl_805A9884@sda21(r13) /* 8037D964 0037A8C4 90 0D AC C4 */ stw r0, BI2DebugFlag@sda21(r13)
/* 8037D968 0037A8C8 88 04 30 E9 */ lbz r0, 0x30e9(r4) /* 8037D968 0037A8C8 88 04 30 E9 */ lbz r0, 0x30e9(r4)
/* 8037D96C 0037A8CC 90 0D AD 94 */ stw r0, lbl_805A9954@sda21(r13) /* 8037D96C 0037A8CC 90 0D AD 94 */ stw r0, __PADSpec@sda21(r13)
lbl_8037D970: lbl_8037D970:
/* 8037D970 0037A8D0 38 00 00 01 */ li r0, 1 /* 8037D970 0037A8D0 38 00 00 01 */ li r0, 1
/* 8037D974 0037A8D4 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) /* 8037D974 0037A8D4 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
/* 8037D978 0037A8D8 90 0D AC 04 */ stw r0, lbl_805A97C4@sda21(r13) /* 8037D978 0037A8D8 90 0D AC 04 */ stw r0, lbl_805A97C4@sda21(r13)
/* 8037D97C 0037A8DC 80 63 00 30 */ lwz r3, 0x30(r3) /* 8037D97C 0037A8DC 80 63 00 30 */ lwz r3, 0x30(r3)
/* 8037D980 0037A8E0 28 03 00 00 */ cmplwi r3, 0 /* 8037D980 0037A8E0 28 03 00 00 */ cmplwi r3, 0
@ -238,11 +290,11 @@ lbl_8037D970:
/* 8037D990 0037A8F0 48 00 00 04 */ b lbl_8037D994 /* 8037D990 0037A8F0 48 00 00 04 */ b lbl_8037D994
lbl_8037D994: lbl_8037D994:
/* 8037D994 0037A8F4 48 00 0E 15 */ bl OSSetArenaLo /* 8037D994 0037A8F4 48 00 0E 15 */ bl OSSetArenaLo
/* 8037D998 0037A8F8 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) /* 8037D998 0037A8F8 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
/* 8037D99C 0037A8FC 80 03 00 30 */ lwz r0, 0x30(r3) /* 8037D99C 0037A8FC 80 03 00 30 */ lwz r0, 0x30(r3)
/* 8037D9A0 0037A900 28 00 00 00 */ cmplwi r0, 0 /* 8037D9A0 0037A900 28 00 00 00 */ cmplwi r0, 0
/* 8037D9A4 0037A904 40 82 00 30 */ bne lbl_8037D9D4 /* 8037D9A4 0037A904 40 82 00 30 */ bne lbl_8037D9D4
/* 8037D9A8 0037A908 80 6D AC C4 */ lwz r3, lbl_805A9884@sda21(r13) /* 8037D9A8 0037A908 80 6D AC C4 */ lwz r3, BI2DebugFlag@sda21(r13)
/* 8037D9AC 0037A90C 28 03 00 00 */ cmplwi r3, 0 /* 8037D9AC 0037A90C 28 03 00 00 */ cmplwi r3, 0
/* 8037D9B0 0037A910 41 82 00 24 */ beq lbl_8037D9D4 /* 8037D9B0 0037A910 41 82 00 24 */ beq lbl_8037D9D4
/* 8037D9B4 0037A914 80 03 00 00 */ lwz r0, 0(r3) /* 8037D9B4 0037A914 80 03 00 00 */ lwz r0, 0(r3)
@ -254,7 +306,7 @@ lbl_8037D994:
/* 8037D9CC 0037A92C 54 03 00 34 */ rlwinm r3, r0, 0, 0, 0x1a /* 8037D9CC 0037A92C 54 03 00 34 */ rlwinm r3, r0, 0, 0, 0x1a
/* 8037D9D0 0037A930 48 00 0D D9 */ bl OSSetArenaLo /* 8037D9D0 0037A930 48 00 0D D9 */ bl OSSetArenaLo
lbl_8037D9D4: lbl_8037D9D4:
/* 8037D9D4 0037A934 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) /* 8037D9D4 0037A934 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
/* 8037D9D8 0037A938 80 63 00 34 */ lwz r3, 0x34(r3) /* 8037D9D8 0037A938 80 63 00 34 */ lwz r3, 0x34(r3)
/* 8037D9DC 0037A93C 28 03 00 00 */ cmplwi r3, 0 /* 8037D9DC 0037A93C 28 03 00 00 */ cmplwi r3, 0
/* 8037D9E0 0037A940 40 82 00 10 */ bne lbl_8037D9F0 /* 8037D9E0 0037A940 40 82 00 10 */ bne lbl_8037D9F0
@ -276,13 +328,13 @@ lbl_8037D9F0:
/* 8037DA1C 0037A97C 48 00 16 B9 */ bl __OSCacheInit /* 8037DA1C 0037A97C 48 00 16 B9 */ bl __OSCacheInit
/* 8037DA20 0037A980 48 04 38 29 */ bl EXIInit /* 8037DA20 0037A980 48 04 38 29 */ bl EXIInit
/* 8037DA24 0037A984 48 04 15 7D */ bl SIInit /* 8037DA24 0037A984 48 04 15 7D */ bl SIInit
/* 8037DA28 0037A988 48 00 5F 79 */ bl sub_803839a0 /* 8037DA28 0037A988 48 00 5F 79 */ bl __OSInitSram
/* 8037DA2C 0037A98C 48 00 6A 41 */ bl __OSThreadInit /* 8037DA2C 0037A98C 48 00 6A 41 */ bl __OSThreadInit
/* 8037DA30 0037A990 48 00 0D AD */ bl __OSInitAudioSystem /* 8037DA30 0037A990 48 00 0D AD */ bl __OSInitAudioSystem
/* 8037DA34 0037A994 4B FF 1E 3D */ bl PPCMfhid2 /* 8037DA34 0037A994 4B FF 1E 3D */ bl PPCMfhid2
/* 8037DA38 0037A998 54 63 00 80 */ rlwinm r3, r3, 0, 2, 0 /* 8037DA38 0037A998 54 63 00 80 */ rlwinm r3, r3, 0, 2, 0
/* 8037DA3C 0037A99C 4B FF 1E 3D */ bl PPCMthid2 /* 8037DA3C 0037A99C 4B FF 1E 3D */ bl PPCMthid2
/* 8037DA40 0037A9A0 80 0D AC E0 */ lwz r0, lbl_805A98A0@sda21(r13) /* 8037DA40 0037A9A0 80 0D AC E0 */ lwz r0, __OSInIPL@sda21(r13)
/* 8037DA44 0037A9A4 2C 00 00 00 */ cmpwi r0, 0 /* 8037DA44 0037A9A4 2C 00 00 00 */ cmpwi r0, 0
/* 8037DA48 0037A9A8 40 82 00 08 */ bne lbl_8037DA50 /* 8037DA48 0037A9A8 40 82 00 08 */ bne lbl_8037DA50
/* 8037DA4C 0037A9AC 48 00 52 4D */ bl __OSInitMemoryProtection /* 8037DA4C 0037A9AC 48 00 52 4D */ bl __OSInitMemoryProtection
@ -298,7 +350,7 @@ lbl_8037DA50:
/* 8037DA70 0037A9D0 38 7F 00 94 */ addi r3, r31, 0x94 /* 8037DA70 0037A9D0 38 7F 00 94 */ addi r3, r31, 0x94
/* 8037DA74 0037A9D4 4C C6 31 82 */ crclr 6 /* 8037DA74 0037A9D4 4C C6 31 82 */ crclr 6
/* 8037DA78 0037A9D8 48 00 1F 35 */ bl OSReport /* 8037DA78 0037A9D8 48 00 1F 35 */ bl OSReport
/* 8037DA7C 0037A9DC 80 6D AC C0 */ lwz r3, lbl_805A9880@sda21(r13) /* 8037DA7C 0037A9DC 80 6D AC C0 */ lwz r3, BootInfo@sda21(r13)
/* 8037DA80 0037A9E0 28 03 00 00 */ cmplwi r3, 0 /* 8037DA80 0037A9E0 28 03 00 00 */ cmplwi r3, 0
/* 8037DA84 0037A9E4 41 82 00 10 */ beq lbl_8037DA94 /* 8037DA84 0037A9E4 41 82 00 10 */ beq lbl_8037DA94
/* 8037DA88 0037A9E8 80 83 00 2C */ lwz r4, 0x2c(r3) /* 8037DA88 0037A9E8 80 83 00 2C */ lwz r4, 0x2c(r3)
@ -362,7 +414,7 @@ lbl_8037DB38:
/* 8037DB48 0037AAA8 38 86 FF FD */ addi r4, r6, -3 /* 8037DB48 0037AAA8 38 86 FF FD */ addi r4, r6, -3
/* 8037DB4C 0037AAAC 48 00 1E 61 */ bl OSReport /* 8037DB4C 0037AAAC 48 00 1E 61 */ bl OSReport
lbl_8037DB50: lbl_8037DB50:
/* 8037DB50 0037AAB0 80 8D AC C0 */ lwz r4, lbl_805A9880@sda21(r13) /* 8037DB50 0037AAB0 80 8D AC C0 */ lwz r4, BootInfo@sda21(r13)
/* 8037DB54 0037AAB4 38 7F 01 0C */ addi r3, r31, 0x10c /* 8037DB54 0037AAB4 38 7F 01 0C */ addi r3, r31, 0x10c
/* 8037DB58 0037AAB8 4C C6 31 82 */ crclr 6 /* 8037DB58 0037AAB8 4C C6 31 82 */ crclr 6
/* 8037DB5C 0037AABC 80 04 00 28 */ lwz r0, 0x28(r4) /* 8037DB5C 0037AABC 80 04 00 28 */ lwz r0, 0x28(r4)
@ -378,7 +430,7 @@ lbl_8037DB50:
/* 8037DB84 0037AAE4 48 00 1E 29 */ bl OSReport /* 8037DB84 0037AAE4 48 00 1E 29 */ bl OSReport
/* 8037DB88 0037AAE8 80 6D 9F 68 */ lwz r3, lbl_805A8B28@sda21(r13) /* 8037DB88 0037AAE8 80 6D 9F 68 */ lwz r3, lbl_805A8B28@sda21(r13)
/* 8037DB8C 0037AAEC 48 00 04 AD */ bl OSRegisterVersion /* 8037DB8C 0037AAEC 48 00 04 AD */ bl OSRegisterVersion
/* 8037DB90 0037AAF0 80 6D AC C4 */ lwz r3, lbl_805A9884@sda21(r13) /* 8037DB90 0037AAF0 80 6D AC C4 */ lwz r3, BI2DebugFlag@sda21(r13)
/* 8037DB94 0037AAF4 28 03 00 00 */ cmplwi r3, 0 /* 8037DB94 0037AAF4 28 03 00 00 */ cmplwi r3, 0
/* 8037DB98 0037AAF8 41 82 00 14 */ beq lbl_8037DBAC /* 8037DB98 0037AAF8 41 82 00 14 */ beq lbl_8037DBAC
/* 8037DB9C 0037AAFC 80 03 00 00 */ lwz r0, 0(r3) /* 8037DB9C 0037AAFC 80 03 00 00 */ lwz r0, 0(r3)
@ -388,11 +440,11 @@ lbl_8037DB50:
lbl_8037DBAC: lbl_8037DBAC:
/* 8037DBAC 0037AB0C 4B FF FB 99 */ bl ClearArena /* 8037DBAC 0037AB0C 4B FF FB 99 */ bl ClearArena
/* 8037DBB0 0037AB10 48 00 3A C5 */ bl OSEnableInterrupts /* 8037DBB0 0037AB10 48 00 3A C5 */ bl OSEnableInterrupts
/* 8037DBB4 0037AB14 80 0D AC E0 */ lwz r0, lbl_805A98A0@sda21(r13) /* 8037DBB4 0037AB14 80 0D AC E0 */ lwz r0, __OSInIPL@sda21(r13)
/* 8037DBB8 0037AB18 2C 00 00 00 */ cmpwi r0, 0 /* 8037DBB8 0037AB18 2C 00 00 00 */ cmpwi r0, 0
/* 8037DBBC 0037AB1C 40 82 00 48 */ bne lbl_8037DC04 /* 8037DBBC 0037AB1C 40 82 00 48 */ bne lbl_8037DC04
/* 8037DBC0 0037AB20 4B FF 3F E5 */ bl DVDInit /* 8037DBC0 0037AB20 4B FF 3F E5 */ bl DVDInit
/* 8037DBC4 0037AB24 80 0D AC CC */ lwz r0, lbl_805A988C@sda21(r13) /* 8037DBC4 0037AB24 80 0D AC CC */ lwz r0, __OSIsGcam@sda21(r13)
/* 8037DBC8 0037AB28 2C 00 00 00 */ cmpwi r0, 0 /* 8037DBC8 0037AB28 2C 00 00 00 */ cmpwi r0, 0
/* 8037DBCC 0037AB2C 41 82 00 18 */ beq lbl_8037DBE4 /* 8037DBCC 0037AB2C 41 82 00 18 */ beq lbl_8037DBE4
/* 8037DBD0 0037AB30 3C 60 00 01 */ lis r3, 0x00009000@ha /* 8037DBD0 0037AB30 3C 60 00 01 */ lis r3, 0x00009000@ha
@ -428,10 +480,10 @@ OSExceptionInit:
/* 8037DC34 0037AB94 80 03 00 60 */ lwz r0, 0x80000060@l(r3) /* 8037DC34 0037AB94 80 03 00 60 */ lwz r0, 0x80000060@l(r3)
/* 8037DC38 0037AB98 3C 80 80 38 */ lis r4, lbl_8037DF60@ha /* 8037DC38 0037AB98 3C 80 80 38 */ lis r4, lbl_8037DF60@ha
/* 8037DC3C 0037AB9C 3B C4 DF 60 */ addi r30, r4, lbl_8037DF60@l /* 8037DC3C 0037AB9C 3B C4 DF 60 */ addi r30, r4, lbl_8037DF60@l
/* 8037DC40 0037ABA0 3C A0 80 38 */ lis r5, sub_8037def8@ha /* 8037DC40 0037ABA0 3C A0 80 38 */ lis r5, OSExceptionVector@ha
/* 8037DC44 0037ABA4 83 3E 00 00 */ lwz r25, 0(r30) /* 8037DC44 0037ABA4 83 3E 00 00 */ lwz r25, 0(r30)
/* 8037DC48 0037ABA8 3C 80 80 38 */ lis r4, lbl_8037DF90@ha /* 8037DC48 0037ABA8 3C 80 80 38 */ lis r4, lbl_8037DF90@ha
/* 8037DC4C 0037ABAC 38 A5 DE F8 */ addi r5, r5, sub_8037def8@l /* 8037DC4C 0037ABAC 38 A5 DE F8 */ addi r5, r5, OSExceptionVector@l
/* 8037DC50 0037ABB0 38 84 DF 90 */ addi r4, r4, lbl_8037DF90@l /* 8037DC50 0037ABB0 38 84 DF 90 */ addi r4, r4, lbl_8037DF90@l
/* 8037DC54 0037ABB4 3C C0 80 3F */ lis r6, lbl_803F0DA0@ha /* 8037DC54 0037ABB4 3C C0 80 3F */ lis r6, lbl_803F0DA0@ha
/* 8037DC58 0037ABB8 28 00 00 00 */ cmplwi r0, 0 /* 8037DC58 0037ABB8 28 00 00 00 */ cmplwi r0, 0
@ -444,8 +496,8 @@ OSExceptionInit:
/* 8037DC74 0037ABD4 4C C6 31 82 */ crclr 6 /* 8037DC74 0037ABD4 4C C6 31 82 */ crclr 6
/* 8037DC78 0037ABD8 4B FF 1C F1 */ bl DBPrintf /* 8037DC78 0037ABD8 4B FF 1C F1 */ bl DBPrintf
/* 8037DC7C 0037ABDC 3C 80 80 38 */ lis r4, __OSDBIntegrator@ha /* 8037DC7C 0037ABDC 3C 80 80 38 */ lis r4, __OSDBIntegrator@ha
/* 8037DC80 0037ABE0 3C 60 80 38 */ lis r3, sub_8037dec4@ha /* 8037DC80 0037ABE0 3C 60 80 38 */ lis r3, __OSDBJump@ha
/* 8037DC84 0037ABE4 38 03 DE C4 */ addi r0, r3, sub_8037dec4@l /* 8037DC84 0037ABE4 38 03 DE C4 */ addi r0, r3, __OSDBJump@l
/* 8037DC88 0037ABE8 38 84 DE A0 */ addi r4, r4, __OSDBIntegrator@l /* 8037DC88 0037ABE8 38 84 DE A0 */ addi r4, r4, __OSDBIntegrator@l
/* 8037DC8C 0037ABEC 7E A4 00 50 */ subf r21, r4, r0 /* 8037DC8C 0037ABEC 7E A4 00 50 */ subf r21, r4, r0
/* 8037DC90 0037ABF0 7E 83 A3 78 */ mr r3, r20 /* 8037DC90 0037ABF0 7E 83 A3 78 */ mr r3, r20
@ -459,23 +511,23 @@ OSExceptionInit:
/* 8037DCB0 0037AC10 7E A4 AB 78 */ mr r4, r21 /* 8037DCB0 0037AC10 7E A4 AB 78 */ mr r4, r21
/* 8037DCB4 0037AC14 48 00 0E E1 */ bl ICInvalidateRange /* 8037DCB4 0037AC14 48 00 0E E1 */ bl ICInvalidateRange
lbl_8037DCB8: lbl_8037DCB8:
/* 8037DCB8 0037AC18 3C 80 80 38 */ lis r4, sub_8037dec4@ha /* 8037DCB8 0037AC18 3C 80 80 38 */ lis r4, __OSDBJump@ha
/* 8037DCBC 0037AC1C 3C 60 80 38 */ lis r3, __OSSetExceptionHandler@ha /* 8037DCBC 0037AC1C 3C 60 80 38 */ lis r3, __OSSetExceptionHandler@ha
/* 8037DCC0 0037AC20 3B E4 DE C4 */ addi r31, r4, sub_8037dec4@l /* 8037DCC0 0037AC20 3B E4 DE C4 */ addi r31, r4, __OSDBJump@l
/* 8037DCC4 0037AC24 38 03 DE C8 */ addi r0, r3, __OSSetExceptionHandler@l /* 8037DCC4 0037AC24 38 03 DE C8 */ addi r0, r3, __OSSetExceptionHandler@l
/* 8037DCC8 0037AC28 3B 9D 01 34 */ addi r28, r29, 0x134 /* 8037DCC8 0037AC28 3B 9D 01 34 */ addi r28, r29, 0x134
/* 8037DCCC 0037AC2C 7F 7F 00 50 */ subf r27, r31, r0 /* 8037DCCC 0037AC2C 7F 7F 00 50 */ subf r27, r31, r0
/* 8037DCD0 0037AC30 3B 40 00 00 */ li r26, 0 /* 8037DCD0 0037AC30 3B 40 00 00 */ li r26, 0
/* 8037DCD4 0037AC34 48 00 00 04 */ b lbl_8037DCD8 /* 8037DCD4 0037AC34 48 00 00 04 */ b lbl_8037DCD8
lbl_8037DCD8: lbl_8037DCD8:
/* 8037DCD8 0037AC38 3C 60 80 38 */ lis r3, lbl_8037DF50@ha /* 8037DCD8 0037AC38 3C 60 80 38 */ lis r3, __DBVECTOR@ha
/* 8037DCDC 0037AC3C 3A A3 DF 50 */ addi r21, r3, lbl_8037DF50@l /* 8037DCDC 0037AC3C 3A A3 DF 50 */ addi r21, r3, __DBVECTOR@l
/* 8037DCE0 0037AC40 3E C0 60 00 */ lis r22, 0x6000 /* 8037DCE0 0037AC40 3E C0 60 00 */ lis r22, 0x6000
/* 8037DCE4 0037AC44 48 00 00 04 */ b lbl_8037DCE8 /* 8037DCE4 0037AC44 48 00 00 04 */ b lbl_8037DCE8
lbl_8037DCE8: lbl_8037DCE8:
/* 8037DCE8 0037AC48 48 00 01 48 */ b lbl_8037DE30 /* 8037DCE8 0037AC48 48 00 01 48 */ b lbl_8037DE30
lbl_8037DCEC: lbl_8037DCEC:
/* 8037DCEC 0037AC4C 80 6D AC C4 */ lwz r3, lbl_805A9884@sda21(r13) /* 8037DCEC 0037AC4C 80 6D AC C4 */ lwz r3, BI2DebugFlag@sda21(r13)
/* 8037DCF0 0037AC50 28 03 00 00 */ cmplwi r3, 0 /* 8037DCF0 0037AC50 28 03 00 00 */ cmplwi r3, 0
/* 8037DCF4 0037AC54 41 82 00 34 */ beq lbl_8037DD28 /* 8037DCF4 0037AC54 41 82 00 34 */ beq lbl_8037DD28
/* 8037DCF8 0037AC58 80 03 00 00 */ lwz r0, 0(r3) /* 8037DCF8 0037AC58 80 03 00 00 */ lwz r0, 0(r3)
@ -570,7 +622,7 @@ lbl_8037DE30:
/* 8037DE38 0037AD98 41 80 FE B4 */ blt lbl_8037DCEC /* 8037DE38 0037AD98 41 80 FE B4 */ blt lbl_8037DCEC
/* 8037DE3C 0037AD9C 3C 60 80 00 */ lis r3, 0x80003000@ha /* 8037DE3C 0037AD9C 3C 60 80 00 */ lis r3, 0x80003000@ha
/* 8037DE40 0037ADA0 38 03 30 00 */ addi r0, r3, 0x80003000@l /* 8037DE40 0037ADA0 38 03 30 00 */ addi r0, r3, 0x80003000@l
/* 8037DE44 0037ADA4 90 0D AC D4 */ stw r0, lbl_805A9894@sda21(r13) /* 8037DE44 0037ADA4 90 0D AC D4 */ stw r0, OSExceptionTable@sda21(r13)
/* 8037DE48 0037ADA8 3A 80 00 00 */ li r20, 0 /* 8037DE48 0037ADA8 3A 80 00 00 */ li r20, 0
/* 8037DE4C 0037ADAC 48 00 00 04 */ b lbl_8037DE50 /* 8037DE4C 0037ADAC 48 00 00 04 */ b lbl_8037DE50
lbl_8037DE50: lbl_8037DE50:
@ -610,14 +662,18 @@ __OSDBIntegrator:
/* 8037DEBC 0037AE1C 7C 60 01 24 */ mtmsr r3 /* 8037DEBC 0037AE1C 7C 60 01 24 */ mtmsr r3
/* 8037DEC0 0037AE20 4E 80 00 20 */ blr /* 8037DEC0 0037AE20 4E 80 00 20 */ blr
.global sub_8037dec4 .global __OSDBJump
sub_8037dec4: __OSDBJump:
.global __OSDBJUMPSTART
__OSDBJUMPSTART:
.global __OSDBINTEND
__OSDBINTEND:
/* 8037DEC4 0037AE24 48 00 00 63 */ bla 0x60 /* 8037DEC4 0037AE24 48 00 00 63 */ bla 0x60
.global __OSSetExceptionHandler .global __OSSetExceptionHandler
__OSSetExceptionHandler: __OSSetExceptionHandler:
/* 8037DEC8 0037AE28 54 60 06 3E */ clrlwi r0, r3, 0x18 /* 8037DEC8 0037AE28 54 60 06 3E */ clrlwi r0, r3, 0x18
/* 8037DECC 0037AE2C 80 6D AC D4 */ lwz r3, lbl_805A9894@sda21(r13) /* 8037DECC 0037AE2C 80 6D AC D4 */ lwz r3, OSExceptionTable@sda21(r13)
/* 8037DED0 0037AE30 54 00 10 3A */ slwi r0, r0, 2 /* 8037DED0 0037AE30 54 00 10 3A */ slwi r0, r0, 2
/* 8037DED4 0037AE34 7C A3 02 14 */ add r5, r3, r0 /* 8037DED4 0037AE34 7C A3 02 14 */ add r5, r3, r0
/* 8037DED8 0037AE38 80 65 00 00 */ lwz r3, 0(r5) /* 8037DED8 0037AE38 80 65 00 00 */ lwz r3, 0(r5)
@ -627,13 +683,13 @@ __OSSetExceptionHandler:
.global __OSGetExceptionHandler .global __OSGetExceptionHandler
__OSGetExceptionHandler: __OSGetExceptionHandler:
/* 8037DEE4 0037AE44 54 60 06 3E */ clrlwi r0, r3, 0x18 /* 8037DEE4 0037AE44 54 60 06 3E */ clrlwi r0, r3, 0x18
/* 8037DEE8 0037AE48 80 6D AC D4 */ lwz r3, lbl_805A9894@sda21(r13) /* 8037DEE8 0037AE48 80 6D AC D4 */ lwz r3, OSExceptionTable@sda21(r13)
/* 8037DEEC 0037AE4C 54 00 10 3A */ slwi r0, r0, 2 /* 8037DEEC 0037AE4C 54 00 10 3A */ slwi r0, r0, 2
/* 8037DEF0 0037AE50 7C 63 00 2E */ lwzx r3, r3, r0 /* 8037DEF0 0037AE50 7C 63 00 2E */ lwzx r3, r3, r0
/* 8037DEF4 0037AE54 4E 80 00 20 */ blr /* 8037DEF4 0037AE54 4E 80 00 20 */ blr
.global sub_8037def8 .global OSExceptionVector
sub_8037def8: OSExceptionVector:
/* 8037DEF8 0037AE58 7C 90 43 A6 */ mtspr 0x110, r4 /* 8037DEF8 0037AE58 7C 90 43 A6 */ mtspr 0x110, r4
/* 8037DEFC 0037AE5C 80 80 00 C0 */ lwz r4, 0xc0(0) /* 8037DEFC 0037AE5C 80 80 00 C0 */ lwz r4, 0xc0(0)
/* 8037DF00 0037AE60 90 64 00 0C */ stw r3, 0xc(r4) /* 8037DF00 0037AE60 90 64 00 0C */ stw r3, 0xc(r4)
@ -656,7 +712,7 @@ sub_8037def8:
/* 8037DF44 0037AEA4 7C 7B 02 A6 */ mfspr r3, 0x1b /* 8037DF44 0037AEA4 7C 7B 02 A6 */ mfspr r3, 0x1b
/* 8037DF48 0037AEA8 90 64 01 9C */ stw r3, 0x19c(r4) /* 8037DF48 0037AEA8 90 64 01 9C */ stw r3, 0x19c(r4)
/* 8037DF4C 0037AEAC 7C 65 1B 78 */ mr r5, r3 /* 8037DF4C 0037AEAC 7C 65 1B 78 */ mr r5, r3
lbl_8037DF50: __DBVECTOR:
/* 8037DF50 0037AEB0 60 00 00 00 */ nop /* 8037DF50 0037AEB0 60 00 00 00 */ nop
/* 8037DF54 0037AEB4 7C 60 00 A6 */ mfmsr r3 /* 8037DF54 0037AEB4 7C 60 00 A6 */ mfmsr r3
/* 8037DF58 0037AEB8 60 63 00 30 */ ori r3, r3, 0x30 /* 8037DF58 0037AEB8 60 63 00 30 */ ori r3, r3, 0x30
@ -700,9 +756,6 @@ OSDefaultExceptionHandler:
/* 8037DFD8 0037AF38 90 04 01 C0 */ stw r0, 0x1c0(r4) /* 8037DFD8 0037AF38 90 04 01 C0 */ stw r0, 0x1c0(r4)
/* 8037DFDC 0037AF3C 7C B2 02 A6 */ mfdsisr r5 /* 8037DFDC 0037AF3C 7C B2 02 A6 */ mfdsisr r5
/* 8037DFE0 0037AF40 7C D3 02 A6 */ mfdar r6 /* 8037DFE0 0037AF40 7C D3 02 A6 */ mfdar r6
.global sub_8037dfe4
sub_8037dfe4:
/* 8037DFE4 0037AF44 94 21 FF F8 */ stwu r1, -8(r1) /* 8037DFE4 0037AF44 94 21 FF F8 */ stwu r1, -8(r1)
/* 8037DFE8 0037AF48 48 00 1D 88 */ b __OSUnhandledException /* 8037DFE8 0037AF48 48 00 1D 88 */ b __OSUnhandledException

View File

@ -17,8 +17,8 @@ lbl_805A98CC:
.section .data .section .data
.balign 8 .balign 8
.global lbl_803F1750 .global HankakuToCode
lbl_803F1750: HankakuToCode:
.4byte 0x020C020D .4byte 0x020C020D
.4byte 0x020E020F .4byte 0x020E020F
.4byte 0x02100211 .4byte 0x02100211
@ -116,8 +116,8 @@ lbl_803F1750:
.4byte 0x02A602A7 .4byte 0x02A602A7
.4byte 0x02A802A9 .4byte 0x02A802A9
.global lbl_803F18D0 .global Zenkaku2Code
lbl_803F18D0: Zenkaku2Code:
.4byte 0x00000001 .4byte 0x00000001
.4byte 0x00020003 .4byte 0x00020003
@ -748,8 +748,8 @@ lbl_805AEC5C:
.section .text, "ax" .section .text, "ax"
.global sub_80380c34 .global GetFontCode
sub_80380c34: GetFontCode:
/* 80380C34 0037DB94 7C 08 02 A6 */ mflr r0 /* 80380C34 0037DB94 7C 08 02 A6 */ mflr r0
/* 80380C38 0037DB98 90 01 00 04 */ stw r0, 4(r1) /* 80380C38 0037DB98 90 01 00 04 */ stw r0, 4(r1)
/* 80380C3C 0037DB9C 94 21 FF E8 */ stwu r1, -0x18(r1) /* 80380C3C 0037DB9C 94 21 FF E8 */ stwu r1, -0x18(r1)
@ -764,8 +764,8 @@ sub_80380c34:
/* 80380C60 0037DBC0 41 80 00 24 */ blt lbl_80380C84 /* 80380C60 0037DBC0 41 80 00 24 */ blt lbl_80380C84
/* 80380C64 0037DBC4 28 00 00 DF */ cmplwi r0, 0xdf /* 80380C64 0037DBC4 28 00 00 DF */ cmplwi r0, 0xdf
/* 80380C68 0037DBC8 41 81 00 1C */ bgt lbl_80380C84 /* 80380C68 0037DBC8 41 81 00 1C */ bgt lbl_80380C84
/* 80380C6C 0037DBCC 3C 60 80 3F */ lis r3, lbl_803F1750@ha /* 80380C6C 0037DBCC 3C 60 80 3F */ lis r3, HankakuToCode@ha
/* 80380C70 0037DBD0 38 63 17 50 */ addi r3, r3, lbl_803F1750@l /* 80380C70 0037DBD0 38 63 17 50 */ addi r3, r3, HankakuToCode@l
/* 80380C74 0037DBD4 54 00 08 3C */ slwi r0, r0, 1 /* 80380C74 0037DBD4 54 00 08 3C */ slwi r0, r0, 1
/* 80380C78 0037DBD8 7C 63 02 14 */ add r3, r3, r0 /* 80380C78 0037DBD8 7C 63 02 14 */ add r3, r3, r0
/* 80380C7C 0037DBDC A0 63 FF C0 */ lhz r3, -0x40(r3) /* 80380C7C 0037DBDC A0 63 FF C0 */ lhz r3, -0x40(r3)
@ -844,9 +844,9 @@ lbl_80380D70:
/* 80380D7C 0037DCDC 38 63 FF FF */ addi r3, r3, -1 /* 80380D7C 0037DCDC 38 63 FF FF */ addi r3, r3, -1
lbl_80380D80: lbl_80380D80:
/* 80380D80 0037DCE0 7C 05 1A 14 */ add r0, r5, r3 /* 80380D80 0037DCE0 7C 05 1A 14 */ add r0, r5, r3
/* 80380D84 0037DCE4 3C 60 80 3F */ lis r3, lbl_803F18D0@ha /* 80380D84 0037DCE4 3C 60 80 3F */ lis r3, Zenkaku2Code@ha
/* 80380D88 0037DCE8 54 04 08 3C */ slwi r4, r0, 1 /* 80380D88 0037DCE8 54 04 08 3C */ slwi r4, r0, 1
/* 80380D8C 0037DCEC 38 03 18 D0 */ addi r0, r3, lbl_803F18D0@l /* 80380D8C 0037DCEC 38 03 18 D0 */ addi r0, r3, Zenkaku2Code@l
/* 80380D90 0037DCF0 7C 60 22 14 */ add r3, r0, r4 /* 80380D90 0037DCF0 7C 60 22 14 */ add r3, r0, r4
/* 80380D94 0037DCF4 A0 63 00 00 */ lhz r3, 0(r3) /* 80380D94 0037DCF4 A0 63 00 00 */ lhz r3, 0(r3)
/* 80380D98 0037DCF8 48 00 00 24 */ b lbl_80380DBC /* 80380D98 0037DCF8 48 00 00 24 */ b lbl_80380DBC
@ -1139,7 +1139,7 @@ lbl_8038114C:
/* 80381160 0037E0C0 80 02 CF 3C */ lwz r0, lbl_805AEC5C@sda21(r2) /* 80381160 0037E0C0 80 02 CF 3C */ lwz r0, lbl_805AEC5C@sda21(r2)
/* 80381164 0037E0C4 90 81 00 1C */ stw r4, 0x1c(r1) /* 80381164 0037E0C4 90 81 00 1C */ stw r4, 0x1c(r1)
/* 80381168 0037E0C8 90 01 00 20 */ stw r0, 0x20(r1) /* 80381168 0037E0C8 90 01 00 20 */ stw r0, 0x20(r1)
/* 8038116C 0037E0CC 4B FF FA C9 */ bl sub_80380c34 /* 8038116C 0037E0CC 4B FF FA C9 */ bl GetFontCode
/* 80381170 0037E0D0 80 AD AD 0C */ lwz r5, lbl_805A98CC@sda21(r13) /* 80381170 0037E0D0 80 AD AD 0C */ lwz r5, lbl_805A98CC@sda21(r13)
/* 80381174 0037E0D4 81 8D AD 00 */ lwz r12, lbl_805A98C0@sda21(r13) /* 80381174 0037E0D4 81 8D AD 00 */ lwz r12, lbl_805A98C0@sda21(r13)
/* 80381178 0037E0D8 7D 43 2B D6 */ divw r10, r3, r5 /* 80381178 0037E0D8 7D 43 2B D6 */ divw r10, r3, r5
@ -1350,7 +1350,7 @@ lbl_80381450:
lbl_80381470: lbl_80381470:
/* 80381470 0037E3D0 80 8D AD 00 */ lwz r4, lbl_805A98C0@sda21(r13) /* 80381470 0037E3D0 80 8D AD 00 */ lwz r4, lbl_805A98C0@sda21(r13)
/* 80381474 0037E3D4 3B 24 00 2C */ addi r25, r4, 0x2c /* 80381474 0037E3D4 3B 24 00 2C */ addi r25, r4, 0x2c
/* 80381478 0037E3D8 4B FF F7 BD */ bl sub_80380c34 /* 80381478 0037E3D8 4B FF F7 BD */ bl GetFontCode
/* 8038147C 0037E3DC 80 CD AD 0C */ lwz r6, lbl_805A98CC@sda21(r13) /* 8038147C 0037E3DC 80 CD AD 0C */ lwz r6, lbl_805A98CC@sda21(r13)
/* 80381480 0037E3E0 57 00 10 3A */ slwi r0, r24, 2 /* 80381480 0037E3E0 57 00 10 3A */ slwi r0, r24, 2
/* 80381484 0037E3E4 81 8D AD 00 */ lwz r12, lbl_805A98C0@sda21(r13) /* 80381484 0037E3E4 81 8D AD 00 */ lwz r12, lbl_805A98C0@sda21(r13)

View File

@ -1,46 +1,44 @@
.include "macros.inc" .include "macros.inc"
.section .bss .section .bss
.global lbl_80541580 .global Header
lbl_80541580: Header:
.skip 0x20 .skip 0x20
.section .sbss .section .sbss
lbl_805A98E8: SaveStart:
.skip 0x4 .skip 0x4
lbl_805A98EC: SaveEnd:
.skip 0x4 .skip 0x4
lbl_805A98F0: Prepared:
.skip 0x8 .skip 0x8
.section .text, "ax" .section .text, "ax"
.global Run
Run: Run:
/* 80382E28 0037FD88 7C 00 04 AC */ sync 0 /* 80382E28 0037FD88 7C 00 04 AC */ sync 0
/* 80382E2C 0037FD8C 4C 00 01 2C */ isync /* 80382E2C 0037FD8C 4C 00 01 2C */ isync
/* 80382E30 0037FD90 7C 68 03 A6 */ mtlr r3 /* 80382E30 0037FD90 7C 68 03 A6 */ mtlr r3
/* 80382E34 0037FD94 4E 80 00 20 */ blr /* 80382E34 0037FD94 4E 80 00 20 */ blr
.global sub_80382e38 Callback:
sub_80382e38:
/* 80382E38 0037FD98 38 00 00 01 */ li r0, 1 /* 80382E38 0037FD98 38 00 00 01 */ li r0, 1
/* 80382E3C 0037FD9C 90 0D AD 30 */ stw r0, lbl_805A98F0@sda21(r13) /* 80382E3C 0037FD9C 90 0D AD 30 */ stw r0, Prepared@sda21(r13)
/* 80382E40 0037FDA0 4E 80 00 20 */ blr /* 80382E40 0037FDA0 4E 80 00 20 */ blr
.global sub_80382e44 .global __OSReboot
sub_80382e44: __OSReboot:
/* 80382E44 0037FDA4 7C 08 02 A6 */ mflr r0 /* 80382E44 0037FDA4 7C 08 02 A6 */ mflr r0
/* 80382E48 0037FDA8 90 01 00 04 */ stw r0, 4(r1) /* 80382E48 0037FDA8 90 01 00 04 */ stw r0, 4(r1)
/* 80382E4C 0037FDAC 94 21 FC C0 */ stwu r1, -0x340(r1) /* 80382E4C 0037FDAC 94 21 FC C0 */ stwu r1, -0x340(r1)
/* 80382E50 0037FDB0 93 E1 03 3C */ stw r31, 0x33c(r1) /* 80382E50 0037FDB0 93 E1 03 3C */ stw r31, 0x33c(r1)
/* 80382E54 0037FDB4 93 C1 03 38 */ stw r30, 0x338(r1) /* 80382E54 0037FDB4 93 C1 03 38 */ stw r30, 0x338(r1)
/* 80382E58 0037FDB8 3C 60 80 54 */ lis r3, lbl_80541580@ha /* 80382E58 0037FDB8 3C 60 80 54 */ lis r3, Header@ha
/* 80382E5C 0037FDBC 3B C3 15 80 */ addi r30, r3, lbl_80541580@l /* 80382E5C 0037FDBC 3B C3 15 80 */ addi r30, r3, Header@l
/* 80382E60 0037FDC0 4B FF E8 01 */ bl OSDisableInterrupts /* 80382E60 0037FDC0 4B FF E8 01 */ bl OSDisableInterrupts
/* 80382E64 0037FDC4 80 AD AD 28 */ lwz r5, lbl_805A98E8@sda21(r13) /* 80382E64 0037FDC4 80 AD AD 28 */ lwz r5, SaveStart@sda21(r13)
/* 80382E68 0037FDC8 3C 80 81 30 */ lis r4, 0x812FDFF0@ha /* 80382E68 0037FDC8 3C 80 81 30 */ lis r4, 0x812FDFF0@ha
/* 80382E6C 0037FDCC 80 0D AD 2C */ lwz r0, lbl_805A98EC@sda21(r13) /* 80382E6C 0037FDCC 80 0D AD 2C */ lwz r0, SaveEnd@sda21(r13)
/* 80382E70 0037FDD0 38 60 00 00 */ li r3, 0 /* 80382E70 0037FDD0 38 60 00 00 */ li r3, 0
/* 80382E74 0037FDD4 3F E0 81 80 */ lis r31, 0x817FFFFC@ha /* 80382E74 0037FDD4 3F E0 81 80 */ lis r31, 0x817FFFFC@ha
/* 80382E78 0037FDD8 38 E0 00 01 */ li r7, 1 /* 80382E78 0037FDD8 38 E0 00 01 */ li r7, 1
@ -57,8 +55,8 @@ sub_80382e44:
/* 80382EA4 0037FE04 4B FE ED 01 */ bl DVDInit /* 80382EA4 0037FE04 4B FE ED 01 */ bl DVDInit
/* 80382EA8 0037FE08 38 60 00 01 */ li r3, 1 /* 80382EA8 0037FE08 38 60 00 01 */ li r3, 1
/* 80382EAC 0037FE0C 4B FF 13 51 */ bl DVDSetAutoInvalidation /* 80382EAC 0037FE0C 4B FF 13 51 */ bl DVDSetAutoInvalidation
/* 80382EB0 0037FE10 3C 60 80 38 */ lis r3, sub_80382e38@ha /* 80382EB0 0037FE10 3C 60 80 38 */ lis r3, Callback@ha
/* 80382EB4 0037FE14 38 63 2E 38 */ addi r3, r3, sub_80382e38@l /* 80382EB4 0037FE14 38 63 2E 38 */ addi r3, r3, Callback@l
/* 80382EB8 0037FE18 4B FF 18 E5 */ bl __DVDPrepareResetAsync /* 80382EB8 0037FE18 4B FF 18 E5 */ bl __DVDPrepareResetAsync
/* 80382EBC 0037FE1C 4B FF 17 FD */ bl DVDCheckDisk /* 80382EBC 0037FE1C 4B FF 17 FD */ bl DVDCheckDisk
/* 80382EC0 0037FE20 2C 03 00 00 */ cmpwi r3, 0 /* 80382EC0 0037FE20 2C 03 00 00 */ cmpwi r3, 0
@ -75,7 +73,7 @@ lbl_80382ED0:
lbl_80382EE8: lbl_80382EE8:
/* 80382EE8 0037FE48 48 00 00 04 */ b lbl_80382EEC /* 80382EE8 0037FE48 48 00 00 04 */ b lbl_80382EEC
lbl_80382EEC: lbl_80382EEC:
/* 80382EEC 0037FE4C 80 0D AD 30 */ lwz r0, lbl_805A98F0@sda21(r13) /* 80382EEC 0037FE4C 80 0D AD 30 */ lwz r0, Prepared@sda21(r13)
/* 80382EF0 0037FE50 2C 00 00 00 */ cmpwi r0, 0 /* 80382EF0 0037FE50 2C 00 00 00 */ cmpwi r0, 0
/* 80382EF4 0037FE54 41 82 FF F8 */ beq lbl_80382EEC /* 80382EF4 0037FE54 41 82 FF F8 */ beq lbl_80382EEC
/* 80382EF8 0037FE58 7F C4 F3 78 */ mr r4, r30 /* 80382EF8 0037FE58 7F C4 F3 78 */ mr r4, r30
@ -115,7 +113,7 @@ lbl_80382F54:
lbl_80382F6C: lbl_80382F6C:
/* 80382F6C 0037FECC 48 00 00 04 */ b lbl_80382F70 /* 80382F6C 0037FECC 48 00 00 04 */ b lbl_80382F70
lbl_80382F70: lbl_80382F70:
/* 80382F70 0037FED0 80 0D AD 30 */ lwz r0, lbl_805A98F0@sda21(r13) /* 80382F70 0037FED0 80 0D AD 30 */ lwz r0, Prepared@sda21(r13)
/* 80382F74 0037FED4 2C 00 00 00 */ cmpwi r0, 0 /* 80382F74 0037FED4 2C 00 00 00 */ cmpwi r0, 0
/* 80382F78 0037FED8 41 82 FF F8 */ beq lbl_80382F70 /* 80382F78 0037FED8 41 82 FF F8 */ beq lbl_80382F70
/* 80382F7C 0037FEDC 7F C5 F3 78 */ mr r5, r30 /* 80382F7C 0037FEDC 7F C5 F3 78 */ mr r5, r30
@ -160,16 +158,16 @@ lbl_80382FD8:
/* 80383004 0037FF64 7C 08 03 A6 */ mtlr r0 /* 80383004 0037FF64 7C 08 03 A6 */ mtlr r0
/* 80383008 0037FF68 4E 80 00 20 */ blr /* 80383008 0037FF68 4E 80 00 20 */ blr
.global sub_8038300c .global OSSetSaveRegion
sub_8038300c: OSSetSaveRegion:
/* 8038300C 0037FF6C 90 6D AD 28 */ stw r3, lbl_805A98E8@sda21(r13) /* 8038300C 0037FF6C 90 6D AD 28 */ stw r3, SaveStart@sda21(r13)
/* 80383010 0037FF70 90 8D AD 2C */ stw r4, lbl_805A98EC@sda21(r13) /* 80383010 0037FF70 90 8D AD 2C */ stw r4, SaveEnd@sda21(r13)
/* 80383014 0037FF74 4E 80 00 20 */ blr /* 80383014 0037FF74 4E 80 00 20 */ blr
.global sub_80383018 .global OSGetSaveRegion
sub_80383018: OSGetSaveRegion:
/* 80383018 0037FF78 80 0D AC DC */ lwz r0, lbl_805A989C@sda21(r13) /* 80383018 0037FF78 80 0D AC DC */ lwz r0, __OSSavedRegionStart@sda21(r13)
/* 8038301C 0037FF7C 90 03 00 00 */ stw r0, 0(r3) /* 8038301C 0037FF7C 90 03 00 00 */ stw r0, 0(r3)
/* 80383020 0037FF80 80 0D AC D8 */ lwz r0, lbl_805A9898@sda21(r13) /* 80383020 0037FF80 80 0D AC D8 */ lwz r0, __OSSavedRegionEnd@sda21(r13)
/* 80383024 0037FF84 90 04 00 00 */ stw r0, 0(r4) /* 80383024 0037FF84 90 04 00 00 */ stw r0, 0(r4)
/* 80383028 0037FF88 4E 80 00 20 */ blr /* 80383028 0037FF88 4E 80 00 20 */ blr

View File

@ -1,14 +1,14 @@
.include "macros.inc" .include "macros.inc"
.section .sbss .section .sbss
lbl_805A98F8: ResetFunctionQueue:
.skip 0x8 .skip 0x8
.section .text, "ax" .section .text, "ax"
.global OSRegisterResetFunction .global OSRegisterResetFunction
OSRegisterResetFunction: OSRegisterResetFunction:
/* 8038302C 0037FF8C 80 AD AD 38 */ lwz r5, lbl_805A98F8@sda21(r13) /* 8038302C 0037FF8C 80 AD AD 38 */ lwz r5, ResetFunctionQueue@sda21(r13)
/* 80383030 0037FF90 48 00 00 08 */ b lbl_80383038 /* 80383030 0037FF90 48 00 00 08 */ b lbl_80383038
lbl_80383034: lbl_80383034:
/* 80383034 0037FF94 80 A5 00 08 */ lwz r5, 8(r5) /* 80383034 0037FF94 80 A5 00 08 */ lwz r5, 8(r5)
@ -22,11 +22,11 @@ lbl_80383038:
lbl_80383050: lbl_80383050:
/* 80383050 0037FFB0 28 05 00 00 */ cmplwi r5, 0 /* 80383050 0037FFB0 28 05 00 00 */ cmplwi r5, 0
/* 80383054 0037FFB4 40 82 00 34 */ bne lbl_80383088 /* 80383054 0037FFB4 40 82 00 34 */ bne lbl_80383088
/* 80383058 0037FFB8 38 AD AD 38 */ addi r5, r13, lbl_805A98F8@sda21 /* 80383058 0037FFB8 38 AD AD 38 */ addi r5, r13, ResetFunctionQueue@sda21
/* 8038305C 0037FFBC 84 85 00 04 */ lwzu r4, 4(r5) /* 8038305C 0037FFBC 84 85 00 04 */ lwzu r4, 4(r5)
/* 80383060 0037FFC0 28 04 00 00 */ cmplwi r4, 0 /* 80383060 0037FFC0 28 04 00 00 */ cmplwi r4, 0
/* 80383064 0037FFC4 40 82 00 0C */ bne lbl_80383070 /* 80383064 0037FFC4 40 82 00 0C */ bne lbl_80383070
/* 80383068 0037FFC8 90 6D AD 38 */ stw r3, lbl_805A98F8@sda21(r13) /* 80383068 0037FFC8 90 6D AD 38 */ stw r3, ResetFunctionQueue@sda21(r13)
/* 8038306C 0037FFCC 48 00 00 08 */ b lbl_80383074 /* 8038306C 0037FFCC 48 00 00 08 */ b lbl_80383074
lbl_80383070: lbl_80383070:
/* 80383070 0037FFD0 90 64 00 08 */ stw r3, 8(r4) /* 80383070 0037FFD0 90 64 00 08 */ stw r3, 8(r4)
@ -43,7 +43,7 @@ lbl_80383088:
/* 80383094 0037FFF4 28 04 00 00 */ cmplwi r4, 0 /* 80383094 0037FFF4 28 04 00 00 */ cmplwi r4, 0
/* 80383098 0037FFF8 90 83 00 0C */ stw r4, 0xc(r3) /* 80383098 0037FFF8 90 83 00 0C */ stw r4, 0xc(r3)
/* 8038309C 0037FFFC 40 82 00 0C */ bne lbl_803830A8 /* 8038309C 0037FFFC 40 82 00 0C */ bne lbl_803830A8
/* 803830A0 00380000 90 6D AD 38 */ stw r3, lbl_805A98F8@sda21(r13) /* 803830A0 00380000 90 6D AD 38 */ stw r3, ResetFunctionQueue@sda21(r13)
/* 803830A4 00380004 4E 80 00 20 */ blr /* 803830A4 00380004 4E 80 00 20 */ blr
lbl_803830A8: lbl_803830A8:
/* 803830A8 00380008 90 64 00 08 */ stw r3, 8(r4) /* 803830A8 00380008 90 64 00 08 */ stw r3, 8(r4)
@ -59,7 +59,7 @@ __OSCallResetFunctions:
/* 803830C4 00380024 3B C0 00 00 */ li r30, 0 /* 803830C4 00380024 3B C0 00 00 */ li r30, 0
/* 803830C8 00380028 93 A1 00 14 */ stw r29, 0x14(r1) /* 803830C8 00380028 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803830CC 0038002C 3B A3 00 00 */ addi r29, r3, 0 /* 803830CC 0038002C 3B A3 00 00 */ addi r29, r3, 0
/* 803830D0 00380030 83 ED AD 38 */ lwz r31, lbl_805A98F8@sda21(r13) /* 803830D0 00380030 83 ED AD 38 */ lwz r31, ResetFunctionQueue@sda21(r13)
/* 803830D4 00380034 48 00 00 24 */ b lbl_803830F8 /* 803830D4 00380034 48 00 00 24 */ b lbl_803830F8
lbl_803830D8: lbl_803830D8:
/* 803830D8 00380038 81 9F 00 00 */ lwz r12, 0(r31) /* 803830D8 00380038 81 9F 00 00 */ lwz r12, 0(r31)
@ -91,7 +91,6 @@ lbl_80383120:
/* 80383134 00380094 7C 08 03 A6 */ mtlr r0 /* 80383134 00380094 7C 08 03 A6 */ mtlr r0
/* 80383138 00380098 4E 80 00 20 */ blr /* 80383138 00380098 4E 80 00 20 */ blr
.global Reset
Reset: Reset:
/* 8038313C 0038009C 48 00 00 20 */ b lbl_8038315C /* 8038313C 0038009C 48 00 00 20 */ b lbl_8038315C
lbl_80383140: lbl_80383140:
@ -173,7 +172,7 @@ lbl_8038322C:
lbl_80383230: lbl_80383230:
/* 80383230 00380190 48 00 00 04 */ b lbl_80383234 /* 80383230 00380190 48 00 00 04 */ b lbl_80383234
lbl_80383234: lbl_80383234:
/* 80383234 00380194 83 6D AD 38 */ lwz r27, lbl_805A98F8@sda21(r13) /* 80383234 00380194 83 6D AD 38 */ lwz r27, ResetFunctionQueue@sda21(r13)
/* 80383238 00380198 3B 80 00 00 */ li r28, 0 /* 80383238 00380198 3B 80 00 00 */ li r28, 0
/* 8038323C 0038019C 48 00 00 04 */ b lbl_80383240 /* 8038323C 0038019C 48 00 00 04 */ b lbl_80383240
lbl_80383240: lbl_80383240:
@ -224,7 +223,7 @@ lbl_803832CC:
/* 803832D4 00380234 41 82 FF F8 */ beq lbl_803832CC /* 803832D4 00380234 41 82 FF F8 */ beq lbl_803832CC
lbl_803832D8: lbl_803832D8:
/* 803832D8 00380238 4B FF E3 89 */ bl OSDisableInterrupts /* 803832D8 00380238 4B FF E3 89 */ bl OSDisableInterrupts
/* 803832DC 0038023C 83 8D AD 38 */ lwz r28, lbl_805A98F8@sda21(r13) /* 803832DC 0038023C 83 8D AD 38 */ lwz r28, ResetFunctionQueue@sda21(r13)
/* 803832E0 00380240 3B 60 00 00 */ li r27, 0 /* 803832E0 00380240 3B 60 00 00 */ li r27, 0
/* 803832E4 00380244 48 00 00 04 */ b lbl_803832E8 /* 803832E4 00380244 48 00 00 04 */ b lbl_803832E8
lbl_803832E8: lbl_803832E8:
@ -285,7 +284,7 @@ lbl_80383390:
/* 80383398 003802F8 48 00 12 89 */ bl OSEnableScheduler /* 80383398 003802F8 48 00 12 89 */ bl OSEnableScheduler
/* 8038339C 003802FC 7F A3 EB 78 */ mr r3, r29 /* 8038339C 003802FC 7F A3 EB 78 */ mr r3, r29
/* 803833A0 00380300 7F C4 F3 78 */ mr r4, r30 /* 803833A0 00380300 7F C4 F3 78 */ mr r4, r30
/* 803833A4 00380304 4B FF FA A1 */ bl sub_80382e44 /* 803833A4 00380304 4B FF FA A1 */ bl __OSReboot
lbl_803833A8: lbl_803833A8:
/* 803833A8 00380308 3C 60 80 00 */ lis r3, 0x800000DC@ha /* 803833A8 00380308 3C 60 80 00 */ lis r3, 0x800000DC@ha
/* 803833AC 0038030C 80 63 00 DC */ lwz r3, 0x800000DC@l(r3) /* 803833AC 0038030C 80 63 00 DC */ lwz r3, 0x800000DC@l(r3)

View File

@ -225,8 +225,8 @@ lbl_80383750:
/* 80383760 003806C0 41 82 00 A0 */ beq lbl_80383800 /* 80383760 003806C0 41 82 00 A0 */ beq lbl_80383800
/* 80383764 003806C4 1D 40 00 3C */ mulli r10, r0, 0x3c /* 80383764 003806C4 1D 40 00 3C */ mulli r10, r0, 0x3c
/* 80383768 003806C8 80 05 00 F8 */ lwz r0, 0xf8(r5) /* 80383768 003806C8 80 05 00 F8 */ lwz r0, 0xf8(r5)
/* 8038376C 003806CC 81 2D AC EC */ lwz r9, lbl_805A98AC@sda21(r13) /* 8038376C 003806CC 81 2D AC EC */ lwz r9, __OSStartTime+4@sda21(r13)
/* 80383770 003806D0 81 0D AC E8 */ lwz r8, lbl_805A98A8@sda21(r13) /* 80383770 003806D0 81 0D AC E8 */ lwz r8, __OSStartTime@sda21(r13)
/* 80383774 003806D4 54 06 F0 BE */ srwi r6, r0, 2 /* 80383774 003806D4 54 06 F0 BE */ srwi r6, r0, 2
/* 80383778 003806D8 7D 40 FE 70 */ srawi r0, r10, 0x1f /* 80383778 003806D8 7D 40 FE 70 */ srawi r0, r10, 0x1f
/* 8038377C 003806DC 7C E0 31 D6 */ mullw r7, r0, r6 /* 8038377C 003806DC 7C E0 31 D6 */ mullw r7, r0, r6

View File

@ -1,7 +1,7 @@
.include "macros.inc" .include "macros.inc"
.section .bss .section .bss
lbl_805415A0: Scb:
.skip 0x58 .skip 0x58
.section .text, "ax" .section .text, "ax"
@ -9,11 +9,11 @@ lbl_805415A0:
.global WriteSramCallback .global WriteSramCallback
WriteSramCallback: WriteSramCallback:
/* 80383828 00380788 7C 08 02 A6 */ mflr r0 /* 80383828 00380788 7C 08 02 A6 */ mflr r0
/* 8038382C 0038078C 3C 60 80 54 */ lis r3, lbl_805415A0@ha /* 8038382C 0038078C 3C 60 80 54 */ lis r3, Scb@ha
/* 80383830 00380790 90 01 00 04 */ stw r0, 4(r1) /* 80383830 00380790 90 01 00 04 */ stw r0, 4(r1)
/* 80383834 00380794 94 21 FF E8 */ stwu r1, -0x18(r1) /* 80383834 00380794 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80383838 00380798 93 E1 00 14 */ stw r31, 0x14(r1) /* 80383838 00380798 93 E1 00 14 */ stw r31, 0x14(r1)
/* 8038383C 0038079C 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l /* 8038383C 0038079C 3B E3 15 A0 */ addi r31, r3, Scb@l
/* 80383840 003807A0 93 C1 00 10 */ stw r30, 0x10(r1) /* 80383840 003807A0 93 C1 00 10 */ stw r30, 0x10(r1)
/* 80383844 003807A4 3B DF 00 40 */ addi r30, r31, 0x40 /* 80383844 003807A4 3B DF 00 40 */ addi r30, r31, 0x40
/* 80383848 003807A8 80 9F 00 40 */ lwz r4, 0x40(r31) /* 80383848 003807A8 80 9F 00 40 */ lwz r4, 0x40(r31)
@ -110,17 +110,17 @@ lbl_80383984:
/* 80383998 003808F8 7C 08 03 A6 */ mtlr r0 /* 80383998 003808F8 7C 08 03 A6 */ mtlr r0
/* 8038399C 003808FC 4E 80 00 20 */ blr /* 8038399C 003808FC 4E 80 00 20 */ blr
.global sub_803839a0 .global __OSInitSram
sub_803839a0: __OSInitSram:
/* 803839A0 00380900 7C 08 02 A6 */ mflr r0 /* 803839A0 00380900 7C 08 02 A6 */ mflr r0
/* 803839A4 00380904 3C 60 80 54 */ lis r3, lbl_805415A0@ha /* 803839A4 00380904 3C 60 80 54 */ lis r3, Scb@ha
/* 803839A8 00380908 90 01 00 04 */ stw r0, 4(r1) /* 803839A8 00380908 90 01 00 04 */ stw r0, 4(r1)
/* 803839AC 0038090C 38 80 00 40 */ li r4, 0x40 /* 803839AC 0038090C 38 80 00 40 */ li r4, 0x40
/* 803839B0 00380910 94 21 FF E8 */ stwu r1, -0x18(r1) /* 803839B0 00380910 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 803839B4 00380914 93 E1 00 14 */ stw r31, 0x14(r1) /* 803839B4 00380914 93 E1 00 14 */ stw r31, 0x14(r1)
/* 803839B8 00380918 3B E0 00 00 */ li r31, 0 /* 803839B8 00380918 3B E0 00 00 */ li r31, 0
/* 803839BC 0038091C 93 C1 00 10 */ stw r30, 0x10(r1) /* 803839BC 0038091C 93 C1 00 10 */ stw r30, 0x10(r1)
/* 803839C0 00380920 3B C3 15 A0 */ addi r30, r3, lbl_805415A0@l /* 803839C0 00380920 3B C3 15 A0 */ addi r30, r3, Scb@l
/* 803839C4 00380924 38 7E 00 00 */ addi r3, r30, 0 /* 803839C4 00380924 38 7E 00 00 */ addi r3, r30, 0
/* 803839C8 00380928 93 FE 00 44 */ stw r31, 0x44(r30) /* 803839C8 00380928 93 FE 00 44 */ stw r31, 0x44(r30)
/* 803839CC 0038092C 93 FE 00 48 */ stw r31, 0x48(r30) /* 803839CC 0038092C 93 FE 00 48 */ stw r31, 0x48(r30)
@ -196,11 +196,11 @@ lbl_80383AB0:
.global __OSLockSram .global __OSLockSram
__OSLockSram: __OSLockSram:
/* 80383AD4 00380A34 7C 08 02 A6 */ mflr r0 /* 80383AD4 00380A34 7C 08 02 A6 */ mflr r0
/* 80383AD8 00380A38 3C 60 80 54 */ lis r3, lbl_805415A0@ha /* 80383AD8 00380A38 3C 60 80 54 */ lis r3, Scb@ha
/* 80383ADC 00380A3C 90 01 00 04 */ stw r0, 4(r1) /* 80383ADC 00380A3C 90 01 00 04 */ stw r0, 4(r1)
/* 80383AE0 00380A40 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80383AE0 00380A40 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80383AE4 00380A44 93 E1 00 0C */ stw r31, 0xc(r1) /* 80383AE4 00380A44 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80383AE8 00380A48 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l /* 80383AE8 00380A48 3B E3 15 A0 */ addi r31, r3, Scb@l
/* 80383AEC 00380A4C 4B FF DB 75 */ bl OSDisableInterrupts /* 80383AEC 00380A4C 4B FF DB 75 */ bl OSDisableInterrupts
/* 80383AF0 00380A50 80 1F 00 48 */ lwz r0, 0x48(r31) /* 80383AF0 00380A50 80 1F 00 48 */ lwz r0, 0x48(r31)
/* 80383AF4 00380A54 38 9F 00 48 */ addi r4, r31, 0x48 /* 80383AF4 00380A54 38 9F 00 48 */ addi r4, r31, 0x48
@ -224,11 +224,11 @@ lbl_80383B18:
.global __OSLockSramEx .global __OSLockSramEx
__OSLockSramEx: __OSLockSramEx:
/* 80383B30 00380A90 7C 08 02 A6 */ mflr r0 /* 80383B30 00380A90 7C 08 02 A6 */ mflr r0
/* 80383B34 00380A94 3C 60 80 54 */ lis r3, lbl_805415A0@ha /* 80383B34 00380A94 3C 60 80 54 */ lis r3, Scb@ha
/* 80383B38 00380A98 90 01 00 04 */ stw r0, 4(r1) /* 80383B38 00380A98 90 01 00 04 */ stw r0, 4(r1)
/* 80383B3C 00380A9C 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80383B3C 00380A9C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80383B40 00380AA0 93 E1 00 0C */ stw r31, 0xc(r1) /* 80383B40 00380AA0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80383B44 00380AA4 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l /* 80383B44 00380AA4 3B E3 15 A0 */ addi r31, r3, Scb@l
/* 80383B48 00380AA8 4B FF DB 19 */ bl OSDisableInterrupts /* 80383B48 00380AA8 4B FF DB 19 */ bl OSDisableInterrupts
/* 80383B4C 00380AAC 80 1F 00 48 */ lwz r0, 0x48(r31) /* 80383B4C 00380AAC 80 1F 00 48 */ lwz r0, 0x48(r31)
/* 80383B50 00380AB0 38 9F 00 48 */ addi r4, r31, 0x48 /* 80383B50 00380AB0 38 9F 00 48 */ addi r4, r31, 0x48
@ -249,15 +249,15 @@ lbl_80383B78:
/* 80383B84 00380AE4 7C 08 03 A6 */ mtlr r0 /* 80383B84 00380AE4 7C 08 03 A6 */ mtlr r0
/* 80383B88 00380AE8 4E 80 00 20 */ blr /* 80383B88 00380AE8 4E 80 00 20 */ blr
.global sub_80383b8c .global UnlockSram
sub_80383b8c: UnlockSram:
/* 80383B8C 00380AEC 7C 08 02 A6 */ mflr r0 /* 80383B8C 00380AEC 7C 08 02 A6 */ mflr r0
/* 80383B90 00380AF0 2C 03 00 00 */ cmpwi r3, 0 /* 80383B90 00380AF0 2C 03 00 00 */ cmpwi r3, 0
/* 80383B94 00380AF4 90 01 00 04 */ stw r0, 4(r1) /* 80383B94 00380AF4 90 01 00 04 */ stw r0, 4(r1)
/* 80383B98 00380AF8 3C 60 80 54 */ lis r3, lbl_805415A0@ha /* 80383B98 00380AF8 3C 60 80 54 */ lis r3, Scb@ha
/* 80383B9C 00380AFC 94 21 FF D0 */ stwu r1, -0x30(r1) /* 80383B9C 00380AFC 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 80383BA0 00380B00 BF 61 00 1C */ stmw r27, 0x1c(r1) /* 80383BA0 00380B00 BF 61 00 1C */ stmw r27, 0x1c(r1)
/* 80383BA4 00380B04 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l /* 80383BA4 00380B04 3B E3 15 A0 */ addi r31, r3, Scb@l
/* 80383BA8 00380B08 41 82 02 C4 */ beq lbl_80383E6C /* 80383BA8 00380B08 41 82 02 C4 */ beq lbl_80383E6C
/* 80383BAC 00380B0C 28 04 00 00 */ cmplwi r4, 0 /* 80383BAC 00380B0C 28 04 00 00 */ cmplwi r4, 0
/* 80383BB0 00380B10 40 82 01 B0 */ bne lbl_80383D60 /* 80383BB0 00380B10 40 82 01 B0 */ bne lbl_80383D60
@ -462,7 +462,7 @@ __OSUnlockSram:
/* 80383E98 00380DF8 38 80 00 00 */ li r4, 0 /* 80383E98 00380DF8 38 80 00 00 */ li r4, 0
/* 80383E9C 00380DFC 90 01 00 04 */ stw r0, 4(r1) /* 80383E9C 00380DFC 90 01 00 04 */ stw r0, 4(r1)
/* 80383EA0 00380E00 94 21 FF F8 */ stwu r1, -8(r1) /* 80383EA0 00380E00 94 21 FF F8 */ stwu r1, -8(r1)
/* 80383EA4 00380E04 4B FF FC E9 */ bl sub_80383b8c /* 80383EA4 00380E04 4B FF FC E9 */ bl UnlockSram
/* 80383EA8 00380E08 80 01 00 0C */ lwz r0, 0xc(r1) /* 80383EA8 00380E08 80 01 00 0C */ lwz r0, 0xc(r1)
/* 80383EAC 00380E0C 38 21 00 08 */ addi r1, r1, 8 /* 80383EAC 00380E0C 38 21 00 08 */ addi r1, r1, 8
/* 80383EB0 00380E10 7C 08 03 A6 */ mtlr r0 /* 80383EB0 00380E10 7C 08 03 A6 */ mtlr r0
@ -474,7 +474,7 @@ __OSUnlockSramEx:
/* 80383EBC 00380E1C 38 80 00 14 */ li r4, 0x14 /* 80383EBC 00380E1C 38 80 00 14 */ li r4, 0x14
/* 80383EC0 00380E20 90 01 00 04 */ stw r0, 4(r1) /* 80383EC0 00380E20 90 01 00 04 */ stw r0, 4(r1)
/* 80383EC4 00380E24 94 21 FF F8 */ stwu r1, -8(r1) /* 80383EC4 00380E24 94 21 FF F8 */ stwu r1, -8(r1)
/* 80383EC8 00380E28 4B FF FC C5 */ bl sub_80383b8c /* 80383EC8 00380E28 4B FF FC C5 */ bl UnlockSram
/* 80383ECC 00380E2C 80 01 00 0C */ lwz r0, 0xc(r1) /* 80383ECC 00380E2C 80 01 00 0C */ lwz r0, 0xc(r1)
/* 80383ED0 00380E30 38 21 00 08 */ addi r1, r1, 8 /* 80383ED0 00380E30 38 21 00 08 */ addi r1, r1, 8
/* 80383ED4 00380E34 7C 08 03 A6 */ mtlr r0 /* 80383ED4 00380E34 7C 08 03 A6 */ mtlr r0
@ -482,8 +482,8 @@ __OSUnlockSramEx:
.global __OSSyncSram .global __OSSyncSram
__OSSyncSram: __OSSyncSram:
/* 80383EDC 00380E3C 3C 60 80 54 */ lis r3, lbl_805415A0@ha /* 80383EDC 00380E3C 3C 60 80 54 */ lis r3, Scb@ha
/* 80383EE0 00380E40 38 63 15 A0 */ addi r3, r3, lbl_805415A0@l /* 80383EE0 00380E40 38 63 15 A0 */ addi r3, r3, Scb@l
/* 80383EE4 00380E44 80 63 00 4C */ lwz r3, 0x4c(r3) /* 80383EE4 00380E44 80 63 00 4C */ lwz r3, 0x4c(r3)
/* 80383EE8 00380E48 4E 80 00 20 */ blr /* 80383EE8 00380E48 4E 80 00 20 */ blr
@ -569,11 +569,11 @@ lbl_80383FF4:
.global OSGetSoundMode .global OSGetSoundMode
OSGetSoundMode: OSGetSoundMode:
/* 80384010 00380F70 7C 08 02 A6 */ mflr r0 /* 80384010 00380F70 7C 08 02 A6 */ mflr r0
/* 80384014 00380F74 3C 60 80 54 */ lis r3, lbl_805415A0@ha /* 80384014 00380F74 3C 60 80 54 */ lis r3, Scb@ha
/* 80384018 00380F78 90 01 00 04 */ stw r0, 4(r1) /* 80384018 00380F78 90 01 00 04 */ stw r0, 4(r1)
/* 8038401C 00380F7C 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8038401C 00380F7C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80384020 00380F80 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80384020 00380F80 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80384024 00380F84 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l /* 80384024 00380F84 3B E3 15 A0 */ addi r31, r3, Scb@l
/* 80384028 00380F88 4B FF D6 39 */ bl OSDisableInterrupts /* 80384028 00380F88 4B FF D6 39 */ bl OSDisableInterrupts
/* 8038402C 00380F8C 80 1F 00 48 */ lwz r0, 0x48(r31) /* 8038402C 00380F8C 80 1F 00 48 */ lwz r0, 0x48(r31)
/* 80384030 00380F90 38 9F 00 48 */ addi r4, r31, 0x48 /* 80384030 00380F90 38 9F 00 48 */ addi r4, r31, 0x48
@ -597,7 +597,7 @@ lbl_80384068:
lbl_8038406C: lbl_8038406C:
/* 8038406C 00380FCC 38 60 00 00 */ li r3, 0 /* 8038406C 00380FCC 38 60 00 00 */ li r3, 0
/* 80384070 00380FD0 38 80 00 00 */ li r4, 0 /* 80384070 00380FD0 38 80 00 00 */ li r4, 0
/* 80384074 00380FD4 4B FF FB 19 */ bl sub_80383b8c /* 80384074 00380FD4 4B FF FB 19 */ bl UnlockSram
/* 80384078 00380FD8 7F E3 FB 78 */ mr r3, r31 /* 80384078 00380FD8 7F E3 FB 78 */ mr r3, r31
/* 8038407C 00380FDC 80 01 00 24 */ lwz r0, 0x24(r1) /* 8038407C 00380FDC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80384080 00380FE0 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80384080 00380FE0 83 E1 00 1C */ lwz r31, 0x1c(r1)
@ -608,11 +608,11 @@ lbl_8038406C:
.global OSSetSoundMode .global OSSetSoundMode
OSSetSoundMode: OSSetSoundMode:
/* 80384090 00380FF0 7C 08 02 A6 */ mflr r0 /* 80384090 00380FF0 7C 08 02 A6 */ mflr r0
/* 80384094 00380FF4 3C 80 80 54 */ lis r4, lbl_805415A0@ha /* 80384094 00380FF4 3C 80 80 54 */ lis r4, Scb@ha
/* 80384098 00380FF8 90 01 00 04 */ stw r0, 4(r1) /* 80384098 00380FF8 90 01 00 04 */ stw r0, 4(r1)
/* 8038409C 00380FFC 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8038409C 00380FFC 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803840A0 00381000 93 E1 00 1C */ stw r31, 0x1c(r1) /* 803840A0 00381000 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803840A4 00381004 3B E4 15 A0 */ addi r31, r4, lbl_805415A0@l /* 803840A4 00381004 3B E4 15 A0 */ addi r31, r4, Scb@l
/* 803840A8 00381008 93 C1 00 18 */ stw r30, 0x18(r1) /* 803840A8 00381008 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803840AC 0038100C 54 7E 17 7A */ rlwinm r30, r3, 2, 0x1d, 0x1d /* 803840AC 0038100C 54 7E 17 7A */ rlwinm r30, r3, 2, 0x1d, 0x1d
/* 803840B0 00381010 4B FF D5 B1 */ bl OSDisableInterrupts /* 803840B0 00381010 4B FF D5 B1 */ bl OSDisableInterrupts
@ -634,7 +634,7 @@ lbl_803840DC:
/* 803840E8 00381048 40 82 00 14 */ bne lbl_803840FC /* 803840E8 00381048 40 82 00 14 */ bne lbl_803840FC
/* 803840EC 0038104C 38 60 00 00 */ li r3, 0 /* 803840EC 0038104C 38 60 00 00 */ li r3, 0
/* 803840F0 00381050 38 80 00 00 */ li r4, 0 /* 803840F0 00381050 38 80 00 00 */ li r4, 0
/* 803840F4 00381054 4B FF FA 99 */ bl sub_80383b8c /* 803840F4 00381054 4B FF FA 99 */ bl UnlockSram
/* 803840F8 00381058 48 00 00 24 */ b lbl_8038411C /* 803840F8 00381058 48 00 00 24 */ b lbl_8038411C
lbl_803840FC: lbl_803840FC:
/* 803840FC 0038105C 54 60 07 B8 */ rlwinm r0, r3, 0, 0x1e, 0x1c /* 803840FC 0038105C 54 60 07 B8 */ rlwinm r0, r3, 0, 0x1e, 0x1c
@ -644,7 +644,7 @@ lbl_803840FC:
/* 8038410C 0038106C 88 1F 00 13 */ lbz r0, 0x13(r31) /* 8038410C 0038106C 88 1F 00 13 */ lbz r0, 0x13(r31)
/* 80384110 00381070 7C 00 F3 78 */ or r0, r0, r30 /* 80384110 00381070 7C 00 F3 78 */ or r0, r0, r30
/* 80384114 00381074 98 1F 00 13 */ stb r0, 0x13(r31) /* 80384114 00381074 98 1F 00 13 */ stb r0, 0x13(r31)
/* 80384118 00381078 4B FF FA 75 */ bl sub_80383b8c /* 80384118 00381078 4B FF FA 75 */ bl UnlockSram
lbl_8038411C: lbl_8038411C:
/* 8038411C 0038107C 80 01 00 24 */ lwz r0, 0x24(r1) /* 8038411C 0038107C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80384120 00381080 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80384120 00381080 83 E1 00 1C */ lwz r31, 0x1c(r1)
@ -656,11 +656,11 @@ lbl_8038411C:
.global OSGetProgressiveMode .global OSGetProgressiveMode
OSGetProgressiveMode: OSGetProgressiveMode:
/* 80384134 00381094 7C 08 02 A6 */ mflr r0 /* 80384134 00381094 7C 08 02 A6 */ mflr r0
/* 80384138 00381098 3C 60 80 54 */ lis r3, lbl_805415A0@ha /* 80384138 00381098 3C 60 80 54 */ lis r3, Scb@ha
/* 8038413C 0038109C 90 01 00 04 */ stw r0, 4(r1) /* 8038413C 0038109C 90 01 00 04 */ stw r0, 4(r1)
/* 80384140 003810A0 94 21 FF E8 */ stwu r1, -0x18(r1) /* 80384140 003810A0 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80384144 003810A4 93 E1 00 14 */ stw r31, 0x14(r1) /* 80384144 003810A4 93 E1 00 14 */ stw r31, 0x14(r1)
/* 80384148 003810A8 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l /* 80384148 003810A8 3B E3 15 A0 */ addi r31, r3, Scb@l
/* 8038414C 003810AC 4B FF D5 15 */ bl OSDisableInterrupts /* 8038414C 003810AC 4B FF D5 15 */ bl OSDisableInterrupts
/* 80384150 003810B0 80 1F 00 48 */ lwz r0, 0x48(r31) /* 80384150 003810B0 80 1F 00 48 */ lwz r0, 0x48(r31)
/* 80384154 003810B4 38 9F 00 48 */ addi r4, r31, 0x48 /* 80384154 003810B4 38 9F 00 48 */ addi r4, r31, 0x48
@ -678,7 +678,7 @@ lbl_80384178:
/* 8038417C 003810DC 38 60 00 00 */ li r3, 0 /* 8038417C 003810DC 38 60 00 00 */ li r3, 0
/* 80384180 003810E0 38 80 00 00 */ li r4, 0 /* 80384180 003810E0 38 80 00 00 */ li r4, 0
/* 80384184 003810E4 54 1F CF FE */ rlwinm r31, r0, 0x19, 0x1f, 0x1f /* 80384184 003810E4 54 1F CF FE */ rlwinm r31, r0, 0x19, 0x1f, 0x1f
/* 80384188 003810E8 4B FF FA 05 */ bl sub_80383b8c /* 80384188 003810E8 4B FF FA 05 */ bl UnlockSram
/* 8038418C 003810EC 7F E3 FB 78 */ mr r3, r31 /* 8038418C 003810EC 7F E3 FB 78 */ mr r3, r31
/* 80384190 003810F0 80 01 00 1C */ lwz r0, 0x1c(r1) /* 80384190 003810F0 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 80384194 003810F4 83 E1 00 14 */ lwz r31, 0x14(r1) /* 80384194 003810F4 83 E1 00 14 */ lwz r31, 0x14(r1)
@ -689,11 +689,11 @@ lbl_80384178:
.global sub_803841a4 .global sub_803841a4
sub_803841a4: sub_803841a4:
/* 803841A4 00381104 7C 08 02 A6 */ mflr r0 /* 803841A4 00381104 7C 08 02 A6 */ mflr r0
/* 803841A8 00381108 3C 80 80 54 */ lis r4, lbl_805415A0@ha /* 803841A8 00381108 3C 80 80 54 */ lis r4, Scb@ha
/* 803841AC 0038110C 90 01 00 04 */ stw r0, 4(r1) /* 803841AC 0038110C 90 01 00 04 */ stw r0, 4(r1)
/* 803841B0 00381110 94 21 FF E0 */ stwu r1, -0x20(r1) /* 803841B0 00381110 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803841B4 00381114 93 E1 00 1C */ stw r31, 0x1c(r1) /* 803841B4 00381114 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803841B8 00381118 3B E4 15 A0 */ addi r31, r4, lbl_805415A0@l /* 803841B8 00381118 3B E4 15 A0 */ addi r31, r4, Scb@l
/* 803841BC 0038111C 93 C1 00 18 */ stw r30, 0x18(r1) /* 803841BC 0038111C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803841C0 00381120 54 7E 3E 30 */ rlwinm r30, r3, 7, 0x18, 0x18 /* 803841C0 00381120 54 7E 3E 30 */ rlwinm r30, r3, 7, 0x18, 0x18
/* 803841C4 00381124 4B FF D4 9D */ bl OSDisableInterrupts /* 803841C4 00381124 4B FF D4 9D */ bl OSDisableInterrupts
@ -715,7 +715,7 @@ lbl_803841F0:
/* 803841FC 0038115C 40 82 00 14 */ bne lbl_80384210 /* 803841FC 0038115C 40 82 00 14 */ bne lbl_80384210
/* 80384200 00381160 38 60 00 00 */ li r3, 0 /* 80384200 00381160 38 60 00 00 */ li r3, 0
/* 80384204 00381164 38 80 00 00 */ li r4, 0 /* 80384204 00381164 38 80 00 00 */ li r4, 0
/* 80384208 00381168 4B FF F9 85 */ bl sub_80383b8c /* 80384208 00381168 4B FF F9 85 */ bl UnlockSram
/* 8038420C 0038116C 48 00 00 24 */ b lbl_80384230 /* 8038420C 0038116C 48 00 00 24 */ b lbl_80384230
lbl_80384210: lbl_80384210:
/* 80384210 00381170 54 60 06 6E */ rlwinm r0, r3, 0, 0x19, 0x17 /* 80384210 00381170 54 60 06 6E */ rlwinm r0, r3, 0, 0x19, 0x17
@ -725,7 +725,7 @@ lbl_80384210:
/* 80384220 00381180 88 1F 00 13 */ lbz r0, 0x13(r31) /* 80384220 00381180 88 1F 00 13 */ lbz r0, 0x13(r31)
/* 80384224 00381184 7C 00 F3 78 */ or r0, r0, r30 /* 80384224 00381184 7C 00 F3 78 */ or r0, r0, r30
/* 80384228 00381188 98 1F 00 13 */ stb r0, 0x13(r31) /* 80384228 00381188 98 1F 00 13 */ stb r0, 0x13(r31)
/* 8038422C 0038118C 4B FF F9 61 */ bl sub_80383b8c /* 8038422C 0038118C 4B FF F9 61 */ bl UnlockSram
lbl_80384230: lbl_80384230:
/* 80384230 00381190 80 01 00 24 */ lwz r0, 0x24(r1) /* 80384230 00381190 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80384234 00381194 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80384234 00381194 83 E1 00 1C */ lwz r31, 0x1c(r1)
@ -737,11 +737,11 @@ lbl_80384230:
.global OSGetLanguage .global OSGetLanguage
OSGetLanguage: OSGetLanguage:
/* 80384248 003811A8 7C 08 02 A6 */ mflr r0 /* 80384248 003811A8 7C 08 02 A6 */ mflr r0
/* 8038424C 003811AC 3C 60 80 54 */ lis r3, lbl_805415A0@ha /* 8038424C 003811AC 3C 60 80 54 */ lis r3, Scb@ha
/* 80384250 003811B0 90 01 00 04 */ stw r0, 4(r1) /* 80384250 003811B0 90 01 00 04 */ stw r0, 4(r1)
/* 80384254 003811B4 94 21 FF E8 */ stwu r1, -0x18(r1) /* 80384254 003811B4 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 80384258 003811B8 93 E1 00 14 */ stw r31, 0x14(r1) /* 80384258 003811B8 93 E1 00 14 */ stw r31, 0x14(r1)
/* 8038425C 003811BC 3B E3 15 A0 */ addi r31, r3, lbl_805415A0@l /* 8038425C 003811BC 3B E3 15 A0 */ addi r31, r3, Scb@l
/* 80384260 003811C0 4B FF D4 01 */ bl OSDisableInterrupts /* 80384260 003811C0 4B FF D4 01 */ bl OSDisableInterrupts
/* 80384264 003811C4 80 1F 00 48 */ lwz r0, 0x48(r31) /* 80384264 003811C4 80 1F 00 48 */ lwz r0, 0x48(r31)
/* 80384268 003811C8 38 9F 00 48 */ addi r4, r31, 0x48 /* 80384268 003811C8 38 9F 00 48 */ addi r4, r31, 0x48
@ -758,7 +758,7 @@ lbl_8038428C:
/* 8038428C 003811EC 8B FF 00 12 */ lbz r31, 0x12(r31) /* 8038428C 003811EC 8B FF 00 12 */ lbz r31, 0x12(r31)
/* 80384290 003811F0 38 60 00 00 */ li r3, 0 /* 80384290 003811F0 38 60 00 00 */ li r3, 0
/* 80384294 003811F4 38 80 00 00 */ li r4, 0 /* 80384294 003811F4 38 80 00 00 */ li r4, 0
/* 80384298 003811F8 4B FF F8 F5 */ bl sub_80383b8c /* 80384298 003811F8 4B FF F8 F5 */ bl UnlockSram
/* 8038429C 003811FC 7F E3 FB 78 */ mr r3, r31 /* 8038429C 003811FC 7F E3 FB 78 */ mr r3, r31
/* 803842A0 00381200 80 01 00 1C */ lwz r0, 0x1c(r1) /* 803842A0 00381200 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803842A4 00381204 83 E1 00 14 */ lwz r31, 0x14(r1) /* 803842A4 00381204 83 E1 00 14 */ lwz r31, 0x14(r1)
@ -769,11 +769,11 @@ lbl_8038428C:
.global OSGetWirelessID .global OSGetWirelessID
OSGetWirelessID: OSGetWirelessID:
/* 803842B4 00381214 7C 08 02 A6 */ mflr r0 /* 803842B4 00381214 7C 08 02 A6 */ mflr r0
/* 803842B8 00381218 3C 80 80 54 */ lis r4, lbl_805415A0@ha /* 803842B8 00381218 3C 80 80 54 */ lis r4, Scb@ha
/* 803842BC 0038121C 90 01 00 04 */ stw r0, 4(r1) /* 803842BC 0038121C 90 01 00 04 */ stw r0, 4(r1)
/* 803842C0 00381220 94 21 FF E0 */ stwu r1, -0x20(r1) /* 803842C0 00381220 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803842C4 00381224 93 E1 00 1C */ stw r31, 0x1c(r1) /* 803842C4 00381224 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803842C8 00381228 3B E4 15 A0 */ addi r31, r4, lbl_805415A0@l /* 803842C8 00381228 3B E4 15 A0 */ addi r31, r4, Scb@l
/* 803842CC 0038122C 93 C1 00 18 */ stw r30, 0x18(r1) /* 803842CC 0038122C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803842D0 00381230 3B C3 00 00 */ addi r30, r3, 0 /* 803842D0 00381230 3B C3 00 00 */ addi r30, r3, 0
/* 803842D4 00381234 4B FF D3 8D */ bl OSDisableInterrupts /* 803842D4 00381234 4B FF D3 8D */ bl OSDisableInterrupts
@ -795,7 +795,7 @@ lbl_80384304:
/* 8038430C 0038126C A3 E3 00 1C */ lhz r31, 0x1c(r3) /* 8038430C 0038126C A3 E3 00 1C */ lhz r31, 0x1c(r3)
/* 80384310 00381270 38 60 00 00 */ li r3, 0 /* 80384310 00381270 38 60 00 00 */ li r3, 0
/* 80384314 00381274 38 80 00 14 */ li r4, 0x14 /* 80384314 00381274 38 80 00 14 */ li r4, 0x14
/* 80384318 00381278 4B FF F8 75 */ bl sub_80383b8c /* 80384318 00381278 4B FF F8 75 */ bl UnlockSram
/* 8038431C 0038127C 7F E3 FB 78 */ mr r3, r31 /* 8038431C 0038127C 7F E3 FB 78 */ mr r3, r31
/* 80384320 00381280 80 01 00 24 */ lwz r0, 0x24(r1) /* 80384320 00381280 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80384324 00381284 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80384324 00381284 83 E1 00 1C */ lwz r31, 0x1c(r1)
@ -807,11 +807,11 @@ lbl_80384304:
.global OSSetWirelessID .global OSSetWirelessID
OSSetWirelessID: OSSetWirelessID:
/* 80384338 00381298 7C 08 02 A6 */ mflr r0 /* 80384338 00381298 7C 08 02 A6 */ mflr r0
/* 8038433C 0038129C 3C A0 80 54 */ lis r5, lbl_805415A0@ha /* 8038433C 0038129C 3C A0 80 54 */ lis r5, Scb@ha
/* 80384340 003812A0 90 01 00 04 */ stw r0, 4(r1) /* 80384340 003812A0 90 01 00 04 */ stw r0, 4(r1)
/* 80384344 003812A4 94 21 FF D8 */ stwu r1, -0x28(r1) /* 80384344 003812A4 94 21 FF D8 */ stwu r1, -0x28(r1)
/* 80384348 003812A8 93 E1 00 24 */ stw r31, 0x24(r1) /* 80384348 003812A8 93 E1 00 24 */ stw r31, 0x24(r1)
/* 8038434C 003812AC 3B E5 15 A0 */ addi r31, r5, lbl_805415A0@l /* 8038434C 003812AC 3B E5 15 A0 */ addi r31, r5, Scb@l
/* 80384350 003812B0 93 C1 00 20 */ stw r30, 0x20(r1) /* 80384350 003812B0 93 C1 00 20 */ stw r30, 0x20(r1)
/* 80384354 003812B4 3B C4 00 00 */ addi r30, r4, 0 /* 80384354 003812B4 3B C4 00 00 */ addi r30, r4, 0
/* 80384358 003812B8 93 A1 00 1C */ stw r29, 0x1c(r1) /* 80384358 003812B8 93 A1 00 1C */ stw r29, 0x1c(r1)
@ -839,12 +839,12 @@ lbl_80384390:
/* 803843A8 00381308 B3 C4 00 00 */ sth r30, 0(r4) /* 803843A8 00381308 B3 C4 00 00 */ sth r30, 0(r4)
/* 803843AC 0038130C 38 60 00 01 */ li r3, 1 /* 803843AC 0038130C 38 60 00 01 */ li r3, 1
/* 803843B0 00381310 38 80 00 14 */ li r4, 0x14 /* 803843B0 00381310 38 80 00 14 */ li r4, 0x14
/* 803843B4 00381314 4B FF F7 D9 */ bl sub_80383b8c /* 803843B4 00381314 4B FF F7 D9 */ bl UnlockSram
/* 803843B8 00381318 48 00 00 10 */ b lbl_803843C8 /* 803843B8 00381318 48 00 00 10 */ b lbl_803843C8
lbl_803843BC: lbl_803843BC:
/* 803843BC 0038131C 38 60 00 00 */ li r3, 0 /* 803843BC 0038131C 38 60 00 00 */ li r3, 0
/* 803843C0 00381320 38 80 00 14 */ li r4, 0x14 /* 803843C0 00381320 38 80 00 14 */ li r4, 0x14
/* 803843C4 00381324 4B FF F7 C9 */ bl sub_80383b8c /* 803843C4 00381324 4B FF F7 C9 */ bl UnlockSram
lbl_803843C8: lbl_803843C8:
/* 803843C8 00381328 80 01 00 2C */ lwz r0, 0x2c(r1) /* 803843C8 00381328 80 01 00 2C */ lwz r0, 0x2c(r1)
/* 803843CC 0038132C 83 E1 00 24 */ lwz r31, 0x24(r1) /* 803843CC 0038132C 83 E1 00 24 */ lwz r31, 0x24(r1)

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@ lbl_802D6868:
/* 802D68D0 002D3830 38 C3 0D 1E */ addi r6, r3, 0xD1DD0D1E@l /* 802D68D0 002D3830 38 C3 0D 1E */ addi r6, r3, 0xD1DD0D1E@l
/* 802D68D4 002D3834 38 60 00 FF */ li r3, 0xff /* 802D68D4 002D3834 38 60 00 FF */ li r3, 0xff
/* 802D68D8 002D3838 38 A0 00 00 */ li r5, 0 /* 802D68D8 002D3838 38 A0 00 00 */ li r5, 0
/* 802D68DC 002D383C 48 00 00 7D */ bl sub_802d6958 /* 802D68DC 002D383C 48 00 00 7D */ bl ErrorHandler
/* 802D68E0 002D3840 80 01 03 54 */ lwz r0, 0x354(r1) /* 802D68E0 002D3840 80 01 03 54 */ lwz r0, 0x354(r1)
/* 802D68E4 002D3844 83 E1 03 4C */ lwz r31, 0x34c(r1) /* 802D68E4 002D3844 83 E1 03 4C */ lwz r31, 0x34c(r1)
/* 802D68E8 002D3848 83 C1 03 48 */ lwz r30, 0x348(r1) /* 802D68E8 002D3848 83 C1 03 48 */ lwz r30, 0x348(r1)
@ -68,30 +68,30 @@ lbl_802D6868:
SetErrorHandlers: SetErrorHandlers:
/* 802D68FC 002D385C 94 21 FF F0 */ stwu r1, -0x10(r1) /* 802D68FC 002D385C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 802D6900 002D3860 7C 08 02 A6 */ mflr r0 /* 802D6900 002D3860 7C 08 02 A6 */ mflr r0
/* 802D6904 002D3864 3C 80 80 2D */ lis r4, sub_802d6958@ha /* 802D6904 002D3864 3C 80 80 2D */ lis r4, ErrorHandler@ha
/* 802D6908 002D3868 38 60 00 02 */ li r3, 2 /* 802D6908 002D3868 38 60 00 02 */ li r3, 2
/* 802D690C 002D386C 90 01 00 14 */ stw r0, 0x14(r1) /* 802D690C 002D386C 90 01 00 14 */ stw r0, 0x14(r1)
/* 802D6910 002D3870 38 84 69 58 */ addi r4, r4, sub_802d6958@l /* 802D6910 002D3870 38 84 69 58 */ addi r4, r4, ErrorHandler@l
/* 802D6914 002D3874 48 0A 92 45 */ bl OSSetErrorHandler /* 802D6914 002D3874 48 0A 92 45 */ bl OSSetErrorHandler
/* 802D6918 002D3878 3C 80 80 2D */ lis r4, sub_802d6958@ha /* 802D6918 002D3878 3C 80 80 2D */ lis r4, ErrorHandler@ha
/* 802D691C 002D387C 38 60 00 03 */ li r3, 3 /* 802D691C 002D387C 38 60 00 03 */ li r3, 3
/* 802D6920 002D3880 38 84 69 58 */ addi r4, r4, sub_802d6958@l /* 802D6920 002D3880 38 84 69 58 */ addi r4, r4, ErrorHandler@l
/* 802D6924 002D3884 48 0A 92 35 */ bl OSSetErrorHandler /* 802D6924 002D3884 48 0A 92 35 */ bl OSSetErrorHandler
/* 802D6928 002D3888 3C 80 80 2D */ lis r4, sub_802d6958@ha /* 802D6928 002D3888 3C 80 80 2D */ lis r4, ErrorHandler@ha
/* 802D692C 002D388C 38 60 00 05 */ li r3, 5 /* 802D692C 002D388C 38 60 00 05 */ li r3, 5
/* 802D6930 002D3890 38 84 69 58 */ addi r4, r4, sub_802d6958@l /* 802D6930 002D3890 38 84 69 58 */ addi r4, r4, ErrorHandler@l
/* 802D6934 002D3894 48 0A 92 25 */ bl OSSetErrorHandler /* 802D6934 002D3894 48 0A 92 25 */ bl OSSetErrorHandler
/* 802D6938 002D3898 3C 80 80 2D */ lis r4, sub_802d6958@ha /* 802D6938 002D3898 3C 80 80 2D */ lis r4, ErrorHandler@ha
/* 802D693C 002D389C 38 60 00 0F */ li r3, 0xf /* 802D693C 002D389C 38 60 00 0F */ li r3, 0xf
/* 802D6940 002D38A0 38 84 69 58 */ addi r4, r4, sub_802d6958@l /* 802D6940 002D38A0 38 84 69 58 */ addi r4, r4, ErrorHandler@l
/* 802D6944 002D38A4 48 0A 92 15 */ bl OSSetErrorHandler /* 802D6944 002D38A4 48 0A 92 15 */ bl OSSetErrorHandler
/* 802D6948 002D38A8 80 01 00 14 */ lwz r0, 0x14(r1) /* 802D6948 002D38A8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 802D694C 002D38AC 7C 08 03 A6 */ mtlr r0 /* 802D694C 002D38AC 7C 08 03 A6 */ mtlr r0
/* 802D6950 002D38B0 38 21 00 10 */ addi r1, r1, 0x10 /* 802D6950 002D38B0 38 21 00 10 */ addi r1, r1, 0x10
/* 802D6954 002D38B4 4E 80 00 20 */ blr /* 802D6954 002D38B4 4E 80 00 20 */ blr
.global sub_802d6958 .global ErrorHandler
sub_802d6958: ErrorHandler:
/* 802D6958 002D38B8 94 21 FF 90 */ stwu r1, -0x70(r1) /* 802D6958 002D38B8 94 21 FF 90 */ stwu r1, -0x70(r1)
/* 802D695C 002D38BC 7C 08 02 A6 */ mflr r0 /* 802D695C 002D38BC 7C 08 02 A6 */ mflr r0
/* 802D6960 002D38C0 90 01 00 74 */ stw r0, 0x74(r1) /* 802D6960 002D38C0 90 01 00 74 */ stw r0, 0x74(r1)
@ -118,7 +118,7 @@ lbl_802D699C:
/* 802D69B0 002D3910 3A E0 00 00 */ li r23, 0 /* 802D69B0 002D3910 3A E0 00 00 */ li r23, 0
/* 802D69B4 002D3914 38 60 00 00 */ li r3, 0 /* 802D69B4 002D3914 38 60 00 00 */ li r3, 0
/* 802D69B8 002D3918 38 80 00 00 */ li r4, 0 /* 802D69B8 002D3918 38 80 00 00 */ li r4, 0
/* 802D69BC 002D391C 48 0B 02 21 */ bl sub_80386bdc /* 802D69BC 002D391C 48 0B 02 21 */ bl PADControlMotor
/* 802D69C0 002D3920 38 60 00 01 */ li r3, 1 /* 802D69C0 002D3920 38 60 00 01 */ li r3, 1
/* 802D69C4 002D3924 48 0B 28 E9 */ bl VISetBlack /* 802D69C4 002D3924 48 0B 28 E9 */ bl VISetBlack
/* 802D69C8 002D3928 48 0B 27 49 */ bl VIFlush /* 802D69C8 002D3928 48 0B 27 49 */ bl VIFlush

View File

@ -3957,7 +3957,7 @@ lbl_80005EC0:
/* 80005F4C 00002EAC 48 37 8B 65 */ bl DCFlushRange /* 80005F4C 00002EAC 48 37 8B 65 */ bl DCFlushRange
/* 80005F50 00002EB0 80 6D A0 90 */ lwz r3, lbl_805A8C50@sda21(r13) /* 80005F50 00002EB0 80 6D A0 90 */ lwz r3, lbl_805A8C50@sda21(r13)
/* 80005F54 00002EB4 38 83 00 80 */ addi r4, r3, 0x80 /* 80005F54 00002EB4 38 83 00 80 */ addi r4, r3, 0x80
/* 80005F58 00002EB8 48 37 D0 B5 */ bl sub_8038300c /* 80005F58 00002EB8 48 37 D0 B5 */ bl OSSetSaveRegion
/* 80005F5C 00002EBC 38 60 00 01 */ li r3, 1 /* 80005F5C 00002EBC 38 60 00 01 */ li r3, 1
/* 80005F60 00002EC0 48 38 33 4D */ bl VISetBlack /* 80005F60 00002EC0 48 38 33 4D */ bl VISetBlack
/* 80005F64 00002EC4 48 38 31 AD */ bl VIFlush /* 80005F64 00002EC4 48 38 31 AD */ bl VIFlush
@ -6677,10 +6677,10 @@ sub_80008584:
/* 8000859C 000054FC 93 C1 00 18 */ stw r30, 0x18(r1) /* 8000859C 000054FC 93 C1 00 18 */ stw r30, 0x18(r1)
/* 800085A0 00005500 7C 7E 1B 78 */ mr r30, r3 /* 800085A0 00005500 7C 7E 1B 78 */ mr r30, r3
/* 800085A4 00005504 38 6D A0 94 */ addi r3, r13, lbl_805A8C54@sda21 /* 800085A4 00005504 38 6D A0 94 */ addi r3, r13, lbl_805A8C54@sda21
/* 800085A8 00005508 48 37 AA 71 */ bl sub_80383018 /* 800085A8 00005508 48 37 AA 71 */ bl OSGetSaveRegion
/* 800085AC 0000550C 38 60 00 00 */ li r3, 0 /* 800085AC 0000550C 38 60 00 00 */ li r3, 0
/* 800085B0 00005510 38 80 00 00 */ li r4, 0 /* 800085B0 00005510 38 80 00 00 */ li r4, 0
/* 800085B4 00005514 48 37 AA 59 */ bl sub_8038300c /* 800085B4 00005514 48 37 AA 59 */ bl OSSetSaveRegion
/* 800085B8 00005518 7F E3 FB 78 */ mr r3, r31 /* 800085B8 00005518 7F E3 FB 78 */ mr r3, r31
/* 800085BC 0000551C 38 80 00 80 */ li r4, 0x80 /* 800085BC 0000551C 38 80 00 80 */ li r4, 0x80
/* 800085C0 00005520 48 2C DE 21 */ bl sub_802d63e0 /* 800085C0 00005520 48 2C DE 21 */ bl sub_802d63e0

60
include/Dolphin/dsp.h Normal file
View File

@ -0,0 +1,60 @@
#ifndef __DSP_H__
#define __DSP_H__
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*DSPCallback)(void *task);
typedef struct DSPTaskInfo DSPTaskInfo;
typedef struct DSPTaskInfo {
vu32 state;
vu32 priority;
vu32 flags;
u16 *iram_mmem_addr;
u32 iram_length;
u32 iram_addr;
u16 *dram_mmem_addr;
u32 dram_length;
u32 dram_addr;
u16 dsp_init_vector;
u16 dsp_resume_vector;
DSPCallback init_cb;
DSPCallback res_cb;
DSPCallback done_cb;
DSPCallback req_cb;
struct STRUCT_DSP_TASK *next;
struct STRUCT_DSP_TASK *prev;
OSTime t_context;
OSTime t_task;
} DSPTaskInfo;
void DSPInit();
void DSPReset();
void DSPHalt();
void DSPSendMailToDSP(u32 mail);
u32 DSPCheckMailToDSP();
u32 DSPCheckMailFromDSP();
u32 DSPGetDMAStatus();
DSPTaskInfo* DSPAddTask(DSPTaskInfo* task);
void __DSP_debug_printf(const char* fmt, ...);
#ifdef __cplusplus
}
#endif
#endif // __DSP_H__

View File

@ -0,0 +1,8 @@
#ifndef __DSP_REGS_H__
#define __DSP_REGS_H__
#include "types.h"
vu16 __DSPRegs[32] : 0xCC005000;
#endif // __DSP_REGS_H__

View File

@ -21,7 +21,31 @@ extern "C" {
#define OSSecondsToTicks(v) ((v)*OS_TIMER_CLOCK) #define OSSecondsToTicks(v) ((v)*OS_TIMER_CLOCK)
typedef s64 OSTime;
typedef struct OSContext {
u32 gpr[32];
u32 cr;
u32 lr;
u32 ctr;
u32 xer;
f64 fpr[32];
u32 fpscr_pad;
u32 fpscr;
u32 srr0;
u32 srr1;
u16 mode;
u16 state;
u32 gqr[8];
u32 psf_pad;
f64 psf[32];
} OSContext;
OSTime OSGetTime(); OSTime OSGetTime();
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -34,6 +34,9 @@ typedef volatile double vf64;
typedef s32 size_t; typedef s32 size_t;
typedef u32 uintptr_t; typedef u32 uintptr_t;
typedef s16 __OSInterrupt;
typedef s64 OSTime;
// Pointer to unknown, to be determined at a later date. // Pointer to unknown, to be determined at a later date.
typedef void* unkptr; typedef void* unkptr;

108
src/Dolphin/dsp/dsp.c Normal file
View File

@ -0,0 +1,108 @@
#include "Dolphin/dsp.h"
#include "Dolphin/os.h"
#include "Dolphin/dsp_regs.h"
#ifdef __cplusplus
extern "C" {
#endif
static const char* __DSPVersion = "<< Dolphin SDK - DSP\trelease build: Sep 5 2002 05:35:13 (0x2301) >>";
extern s32 __DSP_init_flag = 0;
extern DSPTaskInfo* __DSP_tmp_task;
extern DSPTaskInfo* __DSP_last_task;
extern DSPTaskInfo* __DSP_first_task;
extern DSPTaskInfo* __DSP_curr_task;
extern void __DSPHandler(__OSInterrupt, OSContext*);
extern void __DSP_debug_printf(const char* fmt, ...);
extern void __DSP_boot_task(DSPTaskInfo* task);
u32 DSPCheckMailToDSP(void) {
return (__DSPRegs[0] >> 0xF) & 1;
}
u32 DSPCheckMailFromDSP(void) {
return (__DSPRegs[2] >> 0xF) & 1;
}
u32 DSPReadMailFromDSP() {
u16 reg1;
u16 reg2;
reg1 = __DSPRegs[2];
reg2 = __DSPRegs[3];
return reg1 << 16 | reg2;
}
void DSPSendMailToDSP(u32 mail) {
__DSPRegs[0] = mail >> 16;
__DSPRegs[1] = mail;
}
void DSPInit(void) {
u32 oldInt;
u16 reg;
__DSP_debug_printf("DSPInit(): Build Date: %s %s\n", "Sep 5 2002", "05:35:13");
if (__DSP_init_flag == 1) {
return;
}
OSRegisterVersion(__DSPVersion);
oldInt = OSDisableInterrupts();
__OSSetInterruptHandler(7, __DSPHandler);
__OSUnmaskInterrupts(0x1000000);
reg = __DSPRegs[5];
reg = (reg & ~0xA8) | 0x800;
__DSPRegs[5] = reg;
reg = __DSPRegs[5];
reg = reg & ~0xAC;
__DSPRegs[5] = reg;
__DSP_tmp_task = 0;
__DSP_curr_task = 0;
__DSP_last_task = 0;
__DSP_first_task = 0;
__DSP_init_flag = 1;
OSRestoreInterrupts(oldInt);
}
void DSPReset(void) {
u16 reg;
u32 oldInt;
oldInt = OSDisableInterrupts();
reg = __DSPRegs[5];
__DSPRegs[5] = (reg & ~0xA8) | 0x801;
__DSP_init_flag = 0;
OSRestoreInterrupts(oldInt);
}
void DSPHalt(void) {
u16 reg;
u32 oldInt;
oldInt = OSDisableInterrupts();
reg = __DSPRegs[5];
__DSPRegs[5] = (reg & ~0xA8) | 4;
OSRestoreInterrupts(oldInt);
}
u32 DSPGetDMAStatus(void) {
return __DSPRegs[5] & 0x200;
}
DSPTaskInfo* DSPAddTask(DSPTaskInfo* task) {
u32 oldInt;
oldInt = OSDisableInterrupts();
__DSP_insert_task(task);
task->state = 0;
task->flags = 1;
OSRestoreInterrupts(oldInt);
if (task == __DSP_first_task) {
__DSP_boot_task(task);
}
return task;
}
#ifdef __cplusplus
}
#endif

123
src/Dolphin/os/OSReset.c Normal file
View File

@ -0,0 +1,123 @@
volatile u8 DAT_800030e2 : 0x800030e2;
typedef struct Unk {
u8 pad[0x24];
u32 resetCode;
} Unk;
volatile Unk DAT_cc003000 : 0xcc003000;
typedef struct Unk2 {
u16 _0;
u16 _2;
} Unk2;
volatile Unk2 DAT_cc002000 : 0xcc002000;
typedef struct OSResetQueue {
OSResetFunctionInfo* first;
OSResetFunctionInfo* last;
} OSResetQueue;
void OSRegisterResetFunction(OSResetFunctionInfo* func) {
OSResetFunctionInfo* tmp;
OSResetFunctionInfo* iter;
for (iter = ResetFunctionQueue.first; iter && iter->priority <= func->priority; iter = iter->next);
if (iter == NULL) {
tmp = ResetFunctionQueue.last;
if (tmp == NULL) {
ResetFunctionQueue.first = func;
} else {
tmp->next = func;
}
func->prev = tmp;
func->next = NULL;
ResetFunctionQueue.last = func;
return;
}
func->next = iter;
tmp = iter->prev;
iter->prev = func;
func->prev = tmp;
if (tmp == NULL) {
ResetFunctionQueue.first = func;
return;
}
tmp->next = func;
}
s32 __OSCallResetFunctions(s32 arg0) {
OSResetFunctionInfo* iter;
s32 retCode = 0;
u32 ret;
for (iter = ResetFunctionQueue.first; iter != NULL; iter = iter->next) {
retCode |= !iter->func(arg0);
}
retCode |= !__OSSyncSram();
if (retCode) {
return 0;
}
return 1;
}
asm void Reset(register s32 resetCode) {
nofralloc
b lbl_8038315C
lbl_80383140:
mfspr r8, 0x3f0
ori r8, r8, 8
mtspr 0x3f0, r8
isync
sync
nop
b lbl_80383160
lbl_8038315C:
b lbl_8038317C
lbl_80383160:
mftb r5, 0x10c
lbl_80383164:
mftb r6, 0x10c
subf r7, r5, r6
cmplwi r7, 0x1124
blt lbl_80383164
nop
b lbl_80383180
lbl_8038317C:
b lbl_8038319C
lbl_80383180:
lis r8, 0xCC003000@h
ori r8, r8, 0xCC003000@l
li r4, 3
stw r4, 0x24(r8)
stw r3, 0x24(r8)
nop
b lbl_803831A0
lbl_8038319C:
b lbl_803831A8
lbl_803831A0:
nop
b lbl_803831A0
lbl_803831A8:
b lbl_80383140
}
void __OSDoHotReset(s32 arg0) {
OSDisableInterrupts();
DAT_cc002000._2 = 0;
ICFlashInvalidate();
Reset(arg0 * 8);
}
void OSResetSystem(int reset, u32 resetCode, BOOL forceMenu) {
}
u32 OSGetResetCode(void) {
if (DAT_800030e2 != 0) {
return 0x80000000;
}
return ((DAT_cc003000.resetCode & ~7) >> 3);
}