From 0f2f6705e5ced559cc31350309066cfc30facc3b Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Mon, 8 Feb 2021 21:13:38 +0900 Subject: [PATCH] file splits --- .../func_80055068.s | 0 .../func_8005513C.s | 0 .../func_800558D4.s | 0 .../func_8005591C.s | 0 .../func_80055970.s | 0 .../func_80055A18.s | 0 .../func_80055A6C.s | 0 .../func_80055ABC.s | 0 .../func_80055AF0.s | 0 .../func_80055B28.s | 0 .../func_80055B80.s | 0 .../func_80055BB8.s | 0 .../func_80055BF0.s | 0 .../func_80055C2C.s | 0 .../func_80055C64.s | 0 .../func_80055C94.s | 0 .../func_80055CC4.s | 0 .../func_80055CE8.s | 0 .../func_80055D38.s | 0 .../func_80055D8C.s | 0 .../func_80055DDC.s | 0 .../func_80055E48.s | 0 .../func_80055EB4.s | 0 .../func_800560BC.s | 0 .../func_8005610C.s | 0 .../func_80058050.s | 0 .../func_80058B20.s | 0 .../func_80058C6C.s | 0 .../osContGetInitData.s | 0 .../osContInit.s | 0 .../osPackRequestData.s | 0 .../_Printf.s | 0 .../_Putfld.s | 0 .../proutSprintf.s | 0 .../sprintf.s | 0 .../osSpTaskLoad.s | 0 .../osSpTaskStartGo.s | 0 asm/nonmatchings/code_41880/osInsertTimer.s | 76 +++ asm/nonmatchings/code_41880/osSetTimerIntr.s | 38 ++ .../code_41880/osTimerInterrupt.s | 90 ++++ .../code_41880/osTimerServicesInit.s | 25 + .../osPfsAllocateFile.s | 0 .../osPfsDeclearPage.s | 0 .../osPfsCheckRamArea.s | 0 .../osPfsInitPak.s | 0 .../osPfsNumFiles.s | 0 .../code_EC2610/func_80240410_EC2610.s | 2 +- .../code_EC7590/func_802403E0_EC7590.s | 2 +- .../code_ECB930/func_80241C30_ECB930.s | 2 +- .../code_ED00D0/func_802400E0_ED00D0.s | 2 +- .../code_ED5540/func_80241320_ED5540.s | 2 +- .../code_EDC020/func_80240040_EDC020.s | 2 +- .../code_EE65B0/func_80240504_EE6AB4.s | 2 +- .../code_EF8010/func_80240590_EF8010.s | 2 +- asm/nonmatchings/os/code_40E10/osSpTaskLoad.s | 147 ++++++ .../os/code_40E10/osSpTaskStartGo.s | 18 + .../__osInitialize_common.s | 2 +- .../guFrustum.s | 0 .../guFrustumF.s | 0 .../guLookAt.s | 0 .../guLookAtF.s | 0 .../guMtxIdent.s | 0 .../guRotate.s | 0 .../guRotateF.s | 0 .../code_3B4A0}/nuContRmbForceStop.s | 0 .../code_3B4A0}/nuContRmbForceStopEnd.s | 0 .../code_3B4A0}/nuPiReadRomOverlay.s | 0 .../nuContRmbModeSet}/nuContRmbModeSet.s | 0 .../nuGfxThread}/nuGfxThread.s | 0 .../nuGfxThread}/nuGfxThreadStart.s | 0 .../os/osCreateMesgQueue/osCreateMesgQueue.s | 16 + .../os/osSiRawStartDma/osSiRawStartDma.s | 53 ++ .../os/osSpTaskYield/osSpTaskYield.s | 12 + .../os/osSpTaskYielded/osSpTaskYielded.s | 25 + .../osViRepeatLine.s | 0 .../osVirtualToPhysical.s | 0 .../osGetCause.s => os/__osGetCause.s} | 8 +- .../os/code_40c20_len_1f0 => os}/osGetCount.s | 6 + src/code_303c0_len_3e10.c | 457 ----------------- src/code_30450.c | 459 ++++++++++++++++++ src/code_31650.c | 6 - src/code_33450.c | 7 + src/code_3CF80.c | 7 + src/code_3FEA0.c | 9 + src/code_40E10.c | 5 + src/code_41880.c | 9 + src/code_43590.c | 6 + src/code_44490.c | 7 + src/os/code_3b390_len_110.c | 3 - src/os/code_3b4a0_len_270.c | 11 - src/os/code_3cd00_len_5f0.c | 8 - src/os/code_3d330_len_990.c | 13 - src/os/code_3fa50_len_f60.c | 10 - src/os/code_40E10.c | 5 + src/os/code_40c20_len_1f0.c | 2 - src/os/code_40e10_len_240.c | 5 - src/os/code_41050_len_120.c | 4 - src/os/code_41750_len_450.c | 8 - src/os/code_42780_len_120.c | 4 - src/os/code_42e70_len_390.c | 4 - src/os/code_43200_len_7c0.c | 5 - src/os/code_44380_len_4e0.c | 6 - src/os/code_46c70_len_e00.c | 2 - src/os/guFrustum.c | 7 + src/os/guLookAt.c | 7 + src/os/guMtxIdent.c | 3 + src/os/guRotate.c | 5 + src/os/nusys/code_3B4A0.c | 7 + src/os/nusys/nuContRmbModeSet.c | 3 + src/os/nusys/nuGfxThread.c | 5 + src/os/osCreateMesgQueue.c | 3 + src/os/osSiRawStartDma.c | 3 + src/os/osSpTaskYield.c | 3 + src/os/osSpTaskYielded.c | 3 + src/os/osViRepeatLine.c | 3 + src/os/osVirtualToPhysical.c | 3 + tools/splat.yaml | 30 +- tools/symbol_addrs.txt | 2 +- undefined_syms_auto.txt | 97 +++- 119 files changed, 1211 insertions(+), 567 deletions(-) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055068.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_8005513C.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_800558D4.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_8005591C.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055970.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055A18.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055A6C.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055ABC.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055AF0.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055B28.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055B80.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055BB8.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055BF0.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055C2C.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055C64.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055C94.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055CC4.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055CE8.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055D38.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055D8C.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055DDC.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055E48.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_80055EB4.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_800560BC.s (100%) rename asm/nonmatchings/{code_303c0_len_3e10 => code_30450}/func_8005610C.s (100%) rename asm/nonmatchings/{code_31650 => code_33450}/func_80058050.s (100%) rename asm/nonmatchings/{code_31650 => code_33450}/func_80058B20.s (100%) rename asm/nonmatchings/{code_31650 => code_33450}/func_80058C6C.s (100%) rename asm/nonmatchings/{os/code_3cd00_len_5f0 => code_3CF80}/osContGetInitData.s (100%) rename asm/nonmatchings/{os/code_3cd00_len_5f0 => code_3CF80}/osContInit.s (100%) rename asm/nonmatchings/{os/code_3cd00_len_5f0 => code_3CF80}/osPackRequestData.s (100%) rename asm/nonmatchings/{os/code_3fa50_len_f60 => code_3FEA0}/_Printf.s (100%) rename asm/nonmatchings/{os/code_3fa50_len_f60 => code_3FEA0}/_Putfld.s (100%) rename asm/nonmatchings/{os/code_3fa50_len_f60 => code_3FEA0}/proutSprintf.s (100%) rename asm/nonmatchings/{os/code_3fa50_len_f60 => code_3FEA0}/sprintf.s (100%) rename asm/nonmatchings/{os/code_40e10_len_240 => code_40E10}/osSpTaskLoad.s (100%) rename asm/nonmatchings/{os/code_40e10_len_240 => code_40E10}/osSpTaskStartGo.s (100%) create mode 100644 asm/nonmatchings/code_41880/osInsertTimer.s create mode 100644 asm/nonmatchings/code_41880/osSetTimerIntr.s create mode 100644 asm/nonmatchings/code_41880/osTimerInterrupt.s create mode 100644 asm/nonmatchings/code_41880/osTimerServicesInit.s rename asm/nonmatchings/{os/code_43200_len_7c0 => code_43590}/osPfsAllocateFile.s (100%) rename asm/nonmatchings/{os/code_43200_len_7c0 => code_43590}/osPfsDeclearPage.s (100%) rename asm/nonmatchings/{os/code_44380_len_4e0 => code_44490}/osPfsCheckRamArea.s (100%) rename asm/nonmatchings/{os/code_44380_len_4e0 => code_44490}/osPfsInitPak.s (100%) rename asm/nonmatchings/{os/code_44380_len_4e0 => code_44490}/osPfsNumFiles.s (100%) create mode 100644 asm/nonmatchings/os/code_40E10/osSpTaskLoad.s create mode 100644 asm/nonmatchings/os/code_40E10/osSpTaskStartGo.s rename asm/nonmatchings/os/{code_3d330_len_990 => guFrustum}/guFrustum.s (100%) rename asm/nonmatchings/os/{code_3d330_len_990 => guFrustum}/guFrustumF.s (100%) rename asm/nonmatchings/os/{code_3d330_len_990 => guLookAt}/guLookAt.s (100%) rename asm/nonmatchings/os/{code_3d330_len_990 => guLookAt}/guLookAtF.s (100%) rename asm/nonmatchings/os/{code_42780_len_120 => guMtxIdent}/guMtxIdent.s (100%) rename asm/nonmatchings/os/{code_42e70_len_390 => guRotate}/guRotate.s (100%) rename asm/nonmatchings/os/{code_42e70_len_390 => guRotate}/guRotateF.s (100%) rename asm/nonmatchings/os/{code_3b4a0_len_270 => nusys/code_3B4A0}/nuContRmbForceStop.s (100%) rename asm/nonmatchings/os/{code_3b4a0_len_270 => nusys/code_3B4A0}/nuContRmbForceStopEnd.s (100%) rename asm/nonmatchings/os/{code_3b4a0_len_270 => nusys/code_3B4A0}/nuPiReadRomOverlay.s (100%) rename asm/nonmatchings/os/{code_3b390_len_110 => nusys/nuContRmbModeSet}/nuContRmbModeSet.s (100%) rename asm/nonmatchings/os/{code_3b4a0_len_270 => nusys/nuGfxThread}/nuGfxThread.s (100%) rename asm/nonmatchings/os/{code_3b4a0_len_270 => nusys/nuGfxThread}/nuGfxThreadStart.s (100%) create mode 100644 asm/nonmatchings/os/osCreateMesgQueue/osCreateMesgQueue.s create mode 100644 asm/nonmatchings/os/osSiRawStartDma/osSiRawStartDma.s create mode 100644 asm/nonmatchings/os/osSpTaskYield/osSpTaskYield.s create mode 100644 asm/nonmatchings/os/osSpTaskYielded/osSpTaskYielded.s rename asm/nonmatchings/os/{code_42780_len_120 => osViRepeatLine}/osViRepeatLine.s (100%) rename asm/nonmatchings/os/{code_3cd00_len_5f0 => osVirtualToPhysical}/osVirtualToPhysical.s (100%) rename asm/{nonmatchings/os/code_46c70_len_e00/osGetCause.s => os/__osGetCause.s} (63%) rename asm/{nonmatchings/os/code_40c20_len_1f0 => os}/osGetCount.s (67%) create mode 100644 src/code_30450.c create mode 100644 src/code_33450.c create mode 100644 src/code_3CF80.c create mode 100644 src/code_3FEA0.c create mode 100644 src/code_40E10.c create mode 100644 src/code_41880.c create mode 100644 src/code_43590.c create mode 100644 src/code_44490.c delete mode 100644 src/os/code_3b390_len_110.c delete mode 100644 src/os/code_3b4a0_len_270.c delete mode 100644 src/os/code_3d330_len_990.c create mode 100644 src/os/code_40E10.c delete mode 100644 src/os/code_40e10_len_240.c create mode 100644 src/os/guFrustum.c create mode 100644 src/os/guLookAt.c create mode 100644 src/os/guMtxIdent.c create mode 100644 src/os/guRotate.c create mode 100644 src/os/nusys/code_3B4A0.c create mode 100644 src/os/nusys/nuContRmbModeSet.c create mode 100644 src/os/nusys/nuGfxThread.c create mode 100644 src/os/osCreateMesgQueue.c create mode 100644 src/os/osSiRawStartDma.c create mode 100644 src/os/osSpTaskYield.c create mode 100644 src/os/osSpTaskYielded.c create mode 100644 src/os/osViRepeatLine.c create mode 100644 src/os/osVirtualToPhysical.c diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055068.s b/asm/nonmatchings/code_30450/func_80055068.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055068.s rename to asm/nonmatchings/code_30450/func_80055068.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_8005513C.s b/asm/nonmatchings/code_30450/func_8005513C.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_8005513C.s rename to asm/nonmatchings/code_30450/func_8005513C.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_800558D4.s b/asm/nonmatchings/code_30450/func_800558D4.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_800558D4.s rename to asm/nonmatchings/code_30450/func_800558D4.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_8005591C.s b/asm/nonmatchings/code_30450/func_8005591C.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_8005591C.s rename to asm/nonmatchings/code_30450/func_8005591C.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055970.s b/asm/nonmatchings/code_30450/func_80055970.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055970.s rename to asm/nonmatchings/code_30450/func_80055970.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055A18.s b/asm/nonmatchings/code_30450/func_80055A18.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055A18.s rename to asm/nonmatchings/code_30450/func_80055A18.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055A6C.s b/asm/nonmatchings/code_30450/func_80055A6C.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055A6C.s rename to asm/nonmatchings/code_30450/func_80055A6C.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055ABC.s b/asm/nonmatchings/code_30450/func_80055ABC.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055ABC.s rename to asm/nonmatchings/code_30450/func_80055ABC.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055AF0.s b/asm/nonmatchings/code_30450/func_80055AF0.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055AF0.s rename to asm/nonmatchings/code_30450/func_80055AF0.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055B28.s b/asm/nonmatchings/code_30450/func_80055B28.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055B28.s rename to asm/nonmatchings/code_30450/func_80055B28.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055B80.s b/asm/nonmatchings/code_30450/func_80055B80.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055B80.s rename to asm/nonmatchings/code_30450/func_80055B80.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055BB8.s b/asm/nonmatchings/code_30450/func_80055BB8.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055BB8.s rename to asm/nonmatchings/code_30450/func_80055BB8.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055BF0.s b/asm/nonmatchings/code_30450/func_80055BF0.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055BF0.s rename to asm/nonmatchings/code_30450/func_80055BF0.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055C2C.s b/asm/nonmatchings/code_30450/func_80055C2C.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055C2C.s rename to asm/nonmatchings/code_30450/func_80055C2C.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055C64.s b/asm/nonmatchings/code_30450/func_80055C64.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055C64.s rename to asm/nonmatchings/code_30450/func_80055C64.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055C94.s b/asm/nonmatchings/code_30450/func_80055C94.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055C94.s rename to asm/nonmatchings/code_30450/func_80055C94.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055CC4.s b/asm/nonmatchings/code_30450/func_80055CC4.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055CC4.s rename to asm/nonmatchings/code_30450/func_80055CC4.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055CE8.s b/asm/nonmatchings/code_30450/func_80055CE8.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055CE8.s rename to asm/nonmatchings/code_30450/func_80055CE8.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055D38.s b/asm/nonmatchings/code_30450/func_80055D38.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055D38.s rename to asm/nonmatchings/code_30450/func_80055D38.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055D8C.s b/asm/nonmatchings/code_30450/func_80055D8C.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055D8C.s rename to asm/nonmatchings/code_30450/func_80055D8C.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055DDC.s b/asm/nonmatchings/code_30450/func_80055DDC.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055DDC.s rename to asm/nonmatchings/code_30450/func_80055DDC.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055E48.s b/asm/nonmatchings/code_30450/func_80055E48.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055E48.s rename to asm/nonmatchings/code_30450/func_80055E48.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_80055EB4.s b/asm/nonmatchings/code_30450/func_80055EB4.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_80055EB4.s rename to asm/nonmatchings/code_30450/func_80055EB4.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_800560BC.s b/asm/nonmatchings/code_30450/func_800560BC.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_800560BC.s rename to asm/nonmatchings/code_30450/func_800560BC.s diff --git a/asm/nonmatchings/code_303c0_len_3e10/func_8005610C.s b/asm/nonmatchings/code_30450/func_8005610C.s similarity index 100% rename from asm/nonmatchings/code_303c0_len_3e10/func_8005610C.s rename to asm/nonmatchings/code_30450/func_8005610C.s diff --git a/asm/nonmatchings/code_31650/func_80058050.s b/asm/nonmatchings/code_33450/func_80058050.s similarity index 100% rename from asm/nonmatchings/code_31650/func_80058050.s rename to asm/nonmatchings/code_33450/func_80058050.s diff --git a/asm/nonmatchings/code_31650/func_80058B20.s b/asm/nonmatchings/code_33450/func_80058B20.s similarity index 100% rename from asm/nonmatchings/code_31650/func_80058B20.s rename to asm/nonmatchings/code_33450/func_80058B20.s diff --git a/asm/nonmatchings/code_31650/func_80058C6C.s b/asm/nonmatchings/code_33450/func_80058C6C.s similarity index 100% rename from asm/nonmatchings/code_31650/func_80058C6C.s rename to asm/nonmatchings/code_33450/func_80058C6C.s diff --git a/asm/nonmatchings/os/code_3cd00_len_5f0/osContGetInitData.s b/asm/nonmatchings/code_3CF80/osContGetInitData.s similarity index 100% rename from asm/nonmatchings/os/code_3cd00_len_5f0/osContGetInitData.s rename to asm/nonmatchings/code_3CF80/osContGetInitData.s diff --git a/asm/nonmatchings/os/code_3cd00_len_5f0/osContInit.s b/asm/nonmatchings/code_3CF80/osContInit.s similarity index 100% rename from asm/nonmatchings/os/code_3cd00_len_5f0/osContInit.s rename to asm/nonmatchings/code_3CF80/osContInit.s diff --git a/asm/nonmatchings/os/code_3cd00_len_5f0/osPackRequestData.s b/asm/nonmatchings/code_3CF80/osPackRequestData.s similarity index 100% rename from asm/nonmatchings/os/code_3cd00_len_5f0/osPackRequestData.s rename to asm/nonmatchings/code_3CF80/osPackRequestData.s diff --git a/asm/nonmatchings/os/code_3fa50_len_f60/_Printf.s b/asm/nonmatchings/code_3FEA0/_Printf.s similarity index 100% rename from asm/nonmatchings/os/code_3fa50_len_f60/_Printf.s rename to asm/nonmatchings/code_3FEA0/_Printf.s diff --git a/asm/nonmatchings/os/code_3fa50_len_f60/_Putfld.s b/asm/nonmatchings/code_3FEA0/_Putfld.s similarity index 100% rename from asm/nonmatchings/os/code_3fa50_len_f60/_Putfld.s rename to asm/nonmatchings/code_3FEA0/_Putfld.s diff --git a/asm/nonmatchings/os/code_3fa50_len_f60/proutSprintf.s b/asm/nonmatchings/code_3FEA0/proutSprintf.s similarity index 100% rename from asm/nonmatchings/os/code_3fa50_len_f60/proutSprintf.s rename to asm/nonmatchings/code_3FEA0/proutSprintf.s diff --git a/asm/nonmatchings/os/code_3fa50_len_f60/sprintf.s b/asm/nonmatchings/code_3FEA0/sprintf.s similarity index 100% rename from asm/nonmatchings/os/code_3fa50_len_f60/sprintf.s rename to asm/nonmatchings/code_3FEA0/sprintf.s diff --git a/asm/nonmatchings/os/code_40e10_len_240/osSpTaskLoad.s b/asm/nonmatchings/code_40E10/osSpTaskLoad.s similarity index 100% rename from asm/nonmatchings/os/code_40e10_len_240/osSpTaskLoad.s rename to asm/nonmatchings/code_40E10/osSpTaskLoad.s diff --git a/asm/nonmatchings/os/code_40e10_len_240/osSpTaskStartGo.s b/asm/nonmatchings/code_40E10/osSpTaskStartGo.s similarity index 100% rename from asm/nonmatchings/os/code_40e10_len_240/osSpTaskStartGo.s rename to asm/nonmatchings/code_40E10/osSpTaskStartGo.s diff --git a/asm/nonmatchings/code_41880/osInsertTimer.s b/asm/nonmatchings/code_41880/osInsertTimer.s new file mode 100644 index 0000000000..ee5a6fe0dd --- /dev/null +++ b/asm/nonmatchings/code_41880/osInsertTimer.s @@ -0,0 +1,76 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osInsertTimer +/* 41A90 80066690 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 41A94 80066694 AFB20018 */ sw $s2, 0x18($sp) +/* 41A98 80066698 00809021 */ addu $s2, $a0, $zero +/* 41A9C 8006669C AFBF001C */ sw $ra, 0x1c($sp) +/* 41AA0 800666A0 AFB10014 */ sw $s1, 0x14($sp) +/* 41AA4 800666A4 0C01ACD8 */ jal __osDisableInt +/* 41AA8 800666A8 AFB00010 */ sw $s0, 0x10($sp) +/* 41AAC 800666AC 3C038009 */ lui $v1, %hi(D_80094670) +/* 41AB0 800666B0 8C634670 */ lw $v1, %lo(D_80094670)($v1) +/* 41AB4 800666B4 8C660000 */ lw $a2, ($v1) +/* 41AB8 800666B8 8E500010 */ lw $s0, 0x10($s2) +/* 41ABC 800666BC 8E510014 */ lw $s1, 0x14($s2) +/* 41AC0 800666C0 10C30017 */ beq $a2, $v1, .L80066720 +/* 41AC4 800666C4 00403821 */ addu $a3, $v0, $zero +/* 41AC8 800666C8 080199BE */ j .L800666F8 +/* 41ACC 800666CC 00000000 */ nop +.L800666D0: +/* 41AD0 800666D0 8CC20010 */ lw $v0, 0x10($a2) +/* 41AD4 800666D4 8CC30014 */ lw $v1, 0x14($a2) +/* 41AD8 800666D8 8CC60000 */ lw $a2, ($a2) +/* 41ADC 800666DC 3C048009 */ lui $a0, %hi(D_80094670) +/* 41AE0 800666E0 8C844670 */ lw $a0, %lo(D_80094670)($a0) +/* 41AE4 800666E4 0223282B */ sltu $a1, $s1, $v1 +/* 41AE8 800666E8 02238823 */ subu $s1, $s1, $v1 +/* 41AEC 800666EC 02028023 */ subu $s0, $s0, $v0 +/* 41AF0 800666F0 10C4000B */ beq $a2, $a0, .L80066720 +/* 41AF4 800666F4 02058023 */ subu $s0, $s0, $a1 +.L800666F8: +/* 41AF8 800666F8 8CC30010 */ lw $v1, 0x10($a2) +/* 41AFC 800666FC 0070102B */ sltu $v0, $v1, $s0 +/* 41B00 80066700 1440FFF3 */ bnez $v0, .L800666D0 +/* 41B04 80066704 00000000 */ nop +/* 41B08 80066708 16030005 */ bne $s0, $v1, .L80066720 +/* 41B0C 8006670C 00000000 */ nop +/* 41B10 80066710 8CC20014 */ lw $v0, 0x14($a2) +/* 41B14 80066714 0051102B */ sltu $v0, $v0, $s1 +/* 41B18 80066718 1440FFED */ bnez $v0, .L800666D0 +/* 41B1C 8006671C 00000000 */ nop +.L80066720: +/* 41B20 80066720 3C028009 */ lui $v0, %hi(D_80094670) +/* 41B24 80066724 8C424670 */ lw $v0, %lo(D_80094670)($v0) +/* 41B28 80066728 AE500010 */ sw $s0, 0x10($s2) +/* 41B2C 8006672C AE510014 */ sw $s1, 0x14($s2) +/* 41B30 80066730 50C2000A */ beql $a2, $v0, .L8006675C +/* 41B34 80066734 AE460000 */ sw $a2, ($s2) +/* 41B38 80066738 8CC20010 */ lw $v0, 0x10($a2) +/* 41B3C 8006673C 8CC30014 */ lw $v1, 0x14($a2) +/* 41B40 80066740 0071202B */ sltu $a0, $v1, $s1 +/* 41B44 80066744 00711823 */ subu $v1, $v1, $s1 +/* 41B48 80066748 00501023 */ subu $v0, $v0, $s0 +/* 41B4C 8006674C 00441023 */ subu $v0, $v0, $a0 +/* 41B50 80066750 ACC20010 */ sw $v0, 0x10($a2) +/* 41B54 80066754 ACC30014 */ sw $v1, 0x14($a2) +/* 41B58 80066758 AE460000 */ sw $a2, ($s2) +.L8006675C: +/* 41B5C 8006675C 8CC20004 */ lw $v0, 4($a2) +/* 41B60 80066760 AE420004 */ sw $v0, 4($s2) +/* 41B64 80066764 8CC20004 */ lw $v0, 4($a2) +/* 41B68 80066768 00E02021 */ addu $a0, $a3, $zero +/* 41B6C 8006676C AC520000 */ sw $s2, ($v0) +/* 41B70 80066770 0C01ACF4 */ jal __osRestoreInt +/* 41B74 80066774 ACD20004 */ sw $s2, 4($a2) +/* 41B78 80066778 02001021 */ addu $v0, $s0, $zero +/* 41B7C 8006677C 02201821 */ addu $v1, $s1, $zero +/* 41B80 80066780 8FBF001C */ lw $ra, 0x1c($sp) +/* 41B84 80066784 8FB20018 */ lw $s2, 0x18($sp) +/* 41B88 80066788 8FB10014 */ lw $s1, 0x14($sp) +/* 41B8C 8006678C 8FB00010 */ lw $s0, 0x10($sp) +/* 41B90 80066790 03E00008 */ jr $ra +/* 41B94 80066794 27BD0020 */ addiu $sp, $sp, 0x20 +/* 41B98 80066798 00000000 */ nop +/* 41B9C 8006679C 00000000 */ nop diff --git a/asm/nonmatchings/code_41880/osSetTimerIntr.s b/asm/nonmatchings/code_41880/osSetTimerIntr.s new file mode 100644 index 0000000000..ec1a81b983 --- /dev/null +++ b/asm/nonmatchings/code_41880/osSetTimerIntr.s @@ -0,0 +1,38 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osSetTimerIntr +/* 41A10 80066610 27BDFFD8 */ addiu $sp, $sp, -0x28 +/* 41A14 80066614 AFB30020 */ sw $s3, 0x20($sp) +/* 41A18 80066618 AFB2001C */ sw $s2, 0x1c($sp) +/* 41A1C 8006661C 00809021 */ addu $s2, $a0, $zero +/* 41A20 80066620 00A09821 */ addu $s3, $a1, $zero +/* 41A24 80066624 AFBF0024 */ sw $ra, 0x24($sp) +/* 41A28 80066628 16400007 */ bnez $s2, .L80066648 +/* 41A2C 8006662C AFB00018 */ sw $s0, 0x18($sp) +/* 41A30 80066630 16400003 */ bnez $s2, .L80066640 +/* 41A34 80066634 2E6201D4 */ sltiu $v0, $s3, 0x1d4 +/* 41A38 80066638 10400003 */ beqz $v0, .L80066648 +/* 41A3C 8006663C 00000000 */ nop +.L80066640: +/* 41A40 80066640 24120000 */ addiu $s2, $zero, 0 +/* 41A44 80066644 241301D4 */ addiu $s3, $zero, 0x1d4 +.L80066648: +/* 41A48 80066648 0C01ACD8 */ jal __osDisableInt +/* 41A4C 8006664C 00000000 */ nop +/* 41A50 80066650 0C019680 */ jal osGetCount +/* 41A54 80066654 00408021 */ addu $s0, $v0, $zero +/* 41A58 80066658 3C01800A */ lui $at, %hi(D_8009A62C) +/* 41A5C 8006665C AC22A62C */ sw $v0, %lo(D_8009A62C)($at) +/* 41A60 80066660 00402821 */ addu $a1, $v0, $zero +/* 41A64 80066664 00002021 */ addu $a0, $zero, $zero +/* 41A68 80066668 0C01B1A0 */ jal osSetCompare +/* 41A6C 8006666C 02652021 */ addu $a0, $s3, $a1 +/* 41A70 80066670 0C01ACF4 */ jal __osRestoreInt +/* 41A74 80066674 02002021 */ addu $a0, $s0, $zero +/* 41A78 80066678 8FBF0024 */ lw $ra, 0x24($sp) +/* 41A7C 8006667C 8FB30020 */ lw $s3, 0x20($sp) +/* 41A80 80066680 8FB2001C */ lw $s2, 0x1c($sp) +/* 41A84 80066684 8FB00018 */ lw $s0, 0x18($sp) +/* 41A88 80066688 03E00008 */ jr $ra +/* 41A8C 8006668C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_41880/osTimerInterrupt.s b/asm/nonmatchings/code_41880/osTimerInterrupt.s new file mode 100644 index 0000000000..2330fb1c3b --- /dev/null +++ b/asm/nonmatchings/code_41880/osTimerInterrupt.s @@ -0,0 +1,90 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osTimerInterrupt +/* 418D4 800664D4 3C038009 */ lui $v1, %hi(D_80094670) +/* 418D8 800664D8 8C634670 */ lw $v1, %lo(D_80094670)($v1) +/* 418DC 800664DC 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 418E0 800664E0 AFBF0014 */ sw $ra, 0x14($sp) +/* 418E4 800664E4 AFB00010 */ sw $s0, 0x10($sp) +/* 418E8 800664E8 8C620000 */ lw $v0, ($v1) +/* 418EC 800664EC 10430044 */ beq $v0, $v1, .L80066600 +/* 418F0 800664F0 00000000 */ nop +.L800664F4: +/* 418F4 800664F4 3C028009 */ lui $v0, %hi(D_80094670) +/* 418F8 800664F8 8C424670 */ lw $v0, %lo(D_80094670)($v0) +/* 418FC 800664FC 8C500000 */ lw $s0, ($v0) +/* 41900 80066500 16020006 */ bne $s0, $v0, .L8006651C +/* 41904 80066504 00000000 */ nop +/* 41908 80066508 0C01B1A0 */ jal osSetCompare +/* 4190C 8006650C 00002021 */ addu $a0, $zero, $zero +/* 41910 80066510 3C01800A */ lui $at, %hi(D_8009A62C) +/* 41914 80066514 08019980 */ j .L80066600 +/* 41918 80066518 AC20A62C */ sw $zero, %lo(D_8009A62C)($at) +.L8006651C: +/* 4191C 8006651C 0C019680 */ jal osGetCount +/* 41920 80066520 00000000 */ nop +/* 41924 80066524 3C03800A */ lui $v1, %hi(D_8009A62C) +/* 41928 80066528 8C63A62C */ lw $v1, %lo(D_8009A62C)($v1) +/* 4192C 8006652C 3C01800A */ lui $at, %hi(D_8009A62C) +/* 41930 80066530 AC22A62C */ sw $v0, %lo(D_8009A62C)($at) +/* 41934 80066534 00431023 */ subu $v0, $v0, $v1 +/* 41938 80066538 8E030010 */ lw $v1, 0x10($s0) +/* 4193C 8006653C 00403821 */ addu $a3, $v0, $zero +/* 41940 80066540 00003021 */ addu $a2, $zero, $zero +/* 41944 80066544 00C3102B */ sltu $v0, $a2, $v1 +/* 41948 80066548 14400007 */ bnez $v0, .L80066568 +/* 4194C 8006654C 00000000 */ nop +/* 41950 80066550 14660010 */ bne $v1, $a2, .L80066594 +/* 41954 80066554 00000000 */ nop +/* 41958 80066558 8E020014 */ lw $v0, 0x14($s0) +/* 4195C 8006655C 00E2102B */ sltu $v0, $a3, $v0 +/* 41960 80066560 1040000C */ beqz $v0, .L80066594 +/* 41964 80066564 00000000 */ nop +.L80066568: +/* 41968 80066568 8E040010 */ lw $a0, 0x10($s0) +/* 4196C 8006656C 8E050014 */ lw $a1, 0x14($s0) +/* 41970 80066570 00A7102B */ sltu $v0, $a1, $a3 +/* 41974 80066574 00A72823 */ subu $a1, $a1, $a3 +/* 41978 80066578 00862023 */ subu $a0, $a0, $a2 +/* 4197C 8006657C 00822023 */ subu $a0, $a0, $v0 +/* 41980 80066580 AE040010 */ sw $a0, 0x10($s0) +/* 41984 80066584 0C019984 */ jal osSetTimerIntr +/* 41988 80066588 AE050014 */ sw $a1, 0x14($s0) +/* 4198C 8006658C 08019980 */ j .L80066600 +/* 41990 80066590 00000000 */ nop +.L80066594: +/* 41994 80066594 8E030004 */ lw $v1, 4($s0) +/* 41998 80066598 8E020000 */ lw $v0, ($s0) +/* 4199C 8006659C AC620000 */ sw $v0, ($v1) +/* 419A0 800665A0 8E030000 */ lw $v1, ($s0) +/* 419A4 800665A4 8E020004 */ lw $v0, 4($s0) +/* 419A8 800665A8 AC620004 */ sw $v0, 4($v1) +/* 419AC 800665AC 8E040018 */ lw $a0, 0x18($s0) +/* 419B0 800665B0 AE000000 */ sw $zero, ($s0) +/* 419B4 800665B4 10800004 */ beqz $a0, .L800665C8 +/* 419B8 800665B8 AE000004 */ sw $zero, 4($s0) +/* 419BC 800665BC 8E05001C */ lw $a1, 0x1c($s0) +/* 419C0 800665C0 0C019608 */ jal osSendMesg +/* 419C4 800665C4 00003021 */ addu $a2, $zero, $zero +.L800665C8: +/* 419C8 800665C8 8E020008 */ lw $v0, 8($s0) +/* 419CC 800665CC 14400004 */ bnez $v0, .L800665E0 +/* 419D0 800665D0 00000000 */ nop +/* 419D4 800665D4 8E02000C */ lw $v0, 0xc($s0) +/* 419D8 800665D8 1040FFC6 */ beqz $v0, .L800664F4 +/* 419DC 800665DC 00000000 */ nop +.L800665E0: +/* 419E0 800665E0 8E020008 */ lw $v0, 8($s0) +/* 419E4 800665E4 8E03000C */ lw $v1, 0xc($s0) +/* 419E8 800665E8 02002021 */ addu $a0, $s0, $zero +/* 419EC 800665EC AC820010 */ sw $v0, 0x10($a0) +/* 419F0 800665F0 0C0199A4 */ jal osInsertTimer +/* 419F4 800665F4 AC830014 */ sw $v1, 0x14($a0) +/* 419F8 800665F8 0801993D */ j .L800664F4 +/* 419FC 800665FC 00000000 */ nop +.L80066600: +/* 41A00 80066600 8FBF0014 */ lw $ra, 0x14($sp) +/* 41A04 80066604 8FB00010 */ lw $s0, 0x10($sp) +/* 41A08 80066608 03E00008 */ jr $ra +/* 41A0C 8006660C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_41880/osTimerServicesInit.s b/asm/nonmatchings/code_41880/osTimerServicesInit.s new file mode 100644 index 0000000000..8e8dbd8ff5 --- /dev/null +++ b/asm/nonmatchings/code_41880/osTimerServicesInit.s @@ -0,0 +1,25 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osTimerServicesInit +/* 41880 80066480 3C028009 */ lui $v0, %hi(D_80094670) +/* 41884 80066484 8C424670 */ lw $v0, %lo(D_80094670)($v0) +/* 41888 80066488 00002021 */ addu $a0, $zero, $zero +/* 4188C 8006648C 00002821 */ addu $a1, $zero, $zero +/* 41890 80066490 3C01800A */ lui $at, %hi(D_8009A608) +/* 41894 80066494 AC24A608 */ sw $a0, %lo(D_8009A608)($at) +/* 41898 80066498 3C01800A */ lui $at, %hi(D_8009A60C) +/* 4189C 8006649C AC25A60C */ sw $a1, %lo(D_8009A60C)($at) +/* 418A0 800664A0 3C01800A */ lui $at, %hi(D_8009A5C8) +/* 418A4 800664A4 AC20A5C8 */ sw $zero, %lo(D_8009A5C8)($at) +/* 418A8 800664A8 3C01800A */ lui $at, %hi(D_8009A5E4) +/* 418AC 800664AC AC20A5E4 */ sw $zero, %lo(D_8009A5E4)($at) +/* 418B0 800664B0 AC440010 */ sw $a0, 0x10($v0) +/* 418B4 800664B4 AC450014 */ sw $a1, 0x14($v0) +/* 418B8 800664B8 AC440008 */ sw $a0, 8($v0) +/* 418BC 800664BC AC45000C */ sw $a1, 0xc($v0) +/* 418C0 800664C0 AC420004 */ sw $v0, 4($v0) +/* 418C4 800664C4 AC420000 */ sw $v0, ($v0) +/* 418C8 800664C8 AC400018 */ sw $zero, 0x18($v0) +/* 418CC 800664CC 03E00008 */ jr $ra +/* 418D0 800664D0 AC40001C */ sw $zero, 0x1c($v0) diff --git a/asm/nonmatchings/os/code_43200_len_7c0/osPfsAllocateFile.s b/asm/nonmatchings/code_43590/osPfsAllocateFile.s similarity index 100% rename from asm/nonmatchings/os/code_43200_len_7c0/osPfsAllocateFile.s rename to asm/nonmatchings/code_43590/osPfsAllocateFile.s diff --git a/asm/nonmatchings/os/code_43200_len_7c0/osPfsDeclearPage.s b/asm/nonmatchings/code_43590/osPfsDeclearPage.s similarity index 100% rename from asm/nonmatchings/os/code_43200_len_7c0/osPfsDeclearPage.s rename to asm/nonmatchings/code_43590/osPfsDeclearPage.s diff --git a/asm/nonmatchings/os/code_44380_len_4e0/osPfsCheckRamArea.s b/asm/nonmatchings/code_44490/osPfsCheckRamArea.s similarity index 100% rename from asm/nonmatchings/os/code_44380_len_4e0/osPfsCheckRamArea.s rename to asm/nonmatchings/code_44490/osPfsCheckRamArea.s diff --git a/asm/nonmatchings/os/code_44380_len_4e0/osPfsInitPak.s b/asm/nonmatchings/code_44490/osPfsInitPak.s similarity index 100% rename from asm/nonmatchings/os/code_44380_len_4e0/osPfsInitPak.s rename to asm/nonmatchings/code_44490/osPfsInitPak.s diff --git a/asm/nonmatchings/os/code_44380_len_4e0/osPfsNumFiles.s b/asm/nonmatchings/code_44490/osPfsNumFiles.s similarity index 100% rename from asm/nonmatchings/os/code_44380_len_4e0/osPfsNumFiles.s rename to asm/nonmatchings/code_44490/osPfsNumFiles.s diff --git a/asm/nonmatchings/code_EC2610/func_80240410_EC2610.s b/asm/nonmatchings/code_EC2610/func_80240410_EC2610.s index e87d2c5ad8..1ef2cefee2 100644 --- a/asm/nonmatchings/code_EC2610/func_80240410_EC2610.s +++ b/asm/nonmatchings/code_EC2610/func_80240410_EC2610.s @@ -11,7 +11,7 @@ glabel func_80240410_EC2610 /* EC2628 80240428 F7B80028 */ sdc1 $f24, 0x28($sp) /* EC262C 8024042C 4487C000 */ mtc1 $a3, $f24 /* EC2630 80240430 AFBF0014 */ sw $ra, 0x14($sp) -/* EC2634 80240434 0C01B198 */ jal osGetCause +/* EC2634 80240434 0C01B198 */ jal __osGetCause /* EC2638 80240438 0080802D */ daddu $s0, $a0, $zero /* EC263C 8024043C 4616A582 */ mul.s $f22, $f20, $f22 /* EC2640 80240440 00000000 */ nop diff --git a/asm/nonmatchings/code_EC7590/func_802403E0_EC7590.s b/asm/nonmatchings/code_EC7590/func_802403E0_EC7590.s index 8b2ed6b867..4606c83841 100644 --- a/asm/nonmatchings/code_EC7590/func_802403E0_EC7590.s +++ b/asm/nonmatchings/code_EC7590/func_802403E0_EC7590.s @@ -11,7 +11,7 @@ glabel func_802403E0_EC7590 /* EC75A8 802403F8 F7B80028 */ sdc1 $f24, 0x28($sp) /* EC75AC 802403FC 4487C000 */ mtc1 $a3, $f24 /* EC75B0 80240400 AFBF0014 */ sw $ra, 0x14($sp) -/* EC75B4 80240404 0C01B198 */ jal osGetCause +/* EC75B4 80240404 0C01B198 */ jal __osGetCause /* EC75B8 80240408 0080802D */ daddu $s0, $a0, $zero /* EC75BC 8024040C 4616A582 */ mul.s $f22, $f20, $f22 /* EC75C0 80240410 00000000 */ nop diff --git a/asm/nonmatchings/code_ECB930/func_80241C30_ECB930.s b/asm/nonmatchings/code_ECB930/func_80241C30_ECB930.s index 60e633f007..7a89fb3937 100644 --- a/asm/nonmatchings/code_ECB930/func_80241C30_ECB930.s +++ b/asm/nonmatchings/code_ECB930/func_80241C30_ECB930.s @@ -11,7 +11,7 @@ glabel func_80241C30_ECB930 /* ECB948 80241C48 F7B80028 */ sdc1 $f24, 0x28($sp) /* ECB94C 80241C4C 4487C000 */ mtc1 $a3, $f24 /* ECB950 80241C50 AFBF0014 */ sw $ra, 0x14($sp) -/* ECB954 80241C54 0C01B198 */ jal osGetCause +/* ECB954 80241C54 0C01B198 */ jal __osGetCause /* ECB958 80241C58 0080802D */ daddu $s0, $a0, $zero /* ECB95C 80241C5C 4616A582 */ mul.s $f22, $f20, $f22 /* ECB960 80241C60 00000000 */ nop diff --git a/asm/nonmatchings/code_ED00D0/func_802400E0_ED00D0.s b/asm/nonmatchings/code_ED00D0/func_802400E0_ED00D0.s index 10dca3368e..e28b8ec000 100644 --- a/asm/nonmatchings/code_ED00D0/func_802400E0_ED00D0.s +++ b/asm/nonmatchings/code_ED00D0/func_802400E0_ED00D0.s @@ -11,7 +11,7 @@ glabel func_802400E0_ED00D0 /* ED00E8 802400F8 F7B80028 */ sdc1 $f24, 0x28($sp) /* ED00EC 802400FC 4487C000 */ mtc1 $a3, $f24 /* ED00F0 80240100 AFBF0014 */ sw $ra, 0x14($sp) -/* ED00F4 80240104 0C01B198 */ jal osGetCause +/* ED00F4 80240104 0C01B198 */ jal __osGetCause /* ED00F8 80240108 0080802D */ daddu $s0, $a0, $zero /* ED00FC 8024010C 4616A582 */ mul.s $f22, $f20, $f22 /* ED0100 80240110 00000000 */ nop diff --git a/asm/nonmatchings/code_ED5540/func_80241320_ED5540.s b/asm/nonmatchings/code_ED5540/func_80241320_ED5540.s index 1fa03b9c17..683cd5a42f 100644 --- a/asm/nonmatchings/code_ED5540/func_80241320_ED5540.s +++ b/asm/nonmatchings/code_ED5540/func_80241320_ED5540.s @@ -11,7 +11,7 @@ glabel func_80241320_ED5540 /* ED5558 80241338 F7B80028 */ sdc1 $f24, 0x28($sp) /* ED555C 8024133C 4487C000 */ mtc1 $a3, $f24 /* ED5560 80241340 AFBF0014 */ sw $ra, 0x14($sp) -/* ED5564 80241344 0C01B198 */ jal osGetCause +/* ED5564 80241344 0C01B198 */ jal __osGetCause /* ED5568 80241348 0080802D */ daddu $s0, $a0, $zero /* ED556C 8024134C 4616A582 */ mul.s $f22, $f20, $f22 /* ED5570 80241350 00000000 */ nop diff --git a/asm/nonmatchings/code_EDC020/func_80240040_EDC020.s b/asm/nonmatchings/code_EDC020/func_80240040_EDC020.s index 122ff36cad..093dbf5582 100644 --- a/asm/nonmatchings/code_EDC020/func_80240040_EDC020.s +++ b/asm/nonmatchings/code_EDC020/func_80240040_EDC020.s @@ -11,7 +11,7 @@ glabel func_80240040_EDC020 /* EDC038 80240058 F7B80028 */ sdc1 $f24, 0x28($sp) /* EDC03C 8024005C 4487C000 */ mtc1 $a3, $f24 /* EDC040 80240060 AFBF0014 */ sw $ra, 0x14($sp) -/* EDC044 80240064 0C01B198 */ jal osGetCause +/* EDC044 80240064 0C01B198 */ jal __osGetCause /* EDC048 80240068 0080802D */ daddu $s0, $a0, $zero /* EDC04C 8024006C 4616A582 */ mul.s $f22, $f20, $f22 /* EDC050 80240070 00000000 */ nop diff --git a/asm/nonmatchings/code_EE65B0/func_80240504_EE6AB4.s b/asm/nonmatchings/code_EE65B0/func_80240504_EE6AB4.s index 4db04b902e..7ce53a2706 100644 --- a/asm/nonmatchings/code_EE65B0/func_80240504_EE6AB4.s +++ b/asm/nonmatchings/code_EE65B0/func_80240504_EE6AB4.s @@ -7,7 +7,7 @@ glabel func_80240504_EE6AB4 /* EE6ABC 8024050C AFB00060 */ sw $s0, 0x60($sp) /* EE6AC0 80240510 F7B60070 */ sdc1 $f22, 0x70($sp) /* EE6AC4 80240514 F7B40068 */ sdc1 $f20, 0x68($sp) -/* EE6AC8 80240518 0C01B198 */ jal osGetCause +/* EE6AC8 80240518 0C01B198 */ jal __osGetCause /* EE6ACC 8024051C 27A40010 */ addiu $a0, $sp, 0x10 /* EE6AD0 80240520 3C108024 */ lui $s0, %hi(D_80243B44_EEA0F4) /* EE6AD4 80240524 26103B44 */ addiu $s0, $s0, %lo(D_80243B44_EEA0F4) diff --git a/asm/nonmatchings/code_EF8010/func_80240590_EF8010.s b/asm/nonmatchings/code_EF8010/func_80240590_EF8010.s index 5a0ababfe0..7929a43588 100644 --- a/asm/nonmatchings/code_EF8010/func_80240590_EF8010.s +++ b/asm/nonmatchings/code_EF8010/func_80240590_EF8010.s @@ -11,7 +11,7 @@ glabel func_80240590_EF8010 /* EF8028 802405A8 F7B80028 */ sdc1 $f24, 0x28($sp) /* EF802C 802405AC 4487C000 */ mtc1 $a3, $f24 /* EF8030 802405B0 AFBF0014 */ sw $ra, 0x14($sp) -/* EF8034 802405B4 0C01B198 */ jal osGetCause +/* EF8034 802405B4 0C01B198 */ jal __osGetCause /* EF8038 802405B8 0080802D */ daddu $s0, $a0, $zero /* EF803C 802405BC 4616A582 */ mul.s $f22, $f20, $f22 /* EF8040 802405C0 00000000 */ nop diff --git a/asm/nonmatchings/os/code_40E10/osSpTaskLoad.s b/asm/nonmatchings/os/code_40E10/osSpTaskLoad.s new file mode 100644 index 0000000000..ef02ce804e --- /dev/null +++ b/asm/nonmatchings/os/code_40E10/osSpTaskLoad.s @@ -0,0 +1,147 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osSpTaskLoad +/* 40E10 80065A10 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 40E14 80065A14 AFB00010 */ sw $s0, 0x10($sp) +/* 40E18 80065A18 00808021 */ addu $s0, $a0, $zero +/* 40E1C 80065A1C AFB10014 */ sw $s1, 0x14($sp) +/* 40E20 80065A20 3C11800B */ lui $s1, %hi(D_800AF8C0) +/* 40E24 80065A24 2631F8C0 */ addiu $s1, $s1, %lo(D_800AF8C0) +/* 40E28 80065A28 02202821 */ addu $a1, $s1, $zero +/* 40E2C 80065A2C AFBF0018 */ sw $ra, 0x18($sp) +/* 40E30 80065A30 0C019194 */ jal bcopy +/* 40E34 80065A34 24060040 */ addiu $a2, $zero, 0x40 +/* 40E38 80065A38 3C04800B */ lui $a0, %hi(D_800AF8D0) +/* 40E3C 80065A3C 8C84F8D0 */ lw $a0, %lo(D_800AF8D0)($a0) +/* 40E40 80065A40 10800005 */ beqz $a0, .L80065A58 +/* 40E44 80065A44 00000000 */ nop +/* 40E48 80065A48 0C0187A4 */ jal osVirtualToPhysical +/* 40E4C 80065A4C 00000000 */ nop +/* 40E50 80065A50 3C01800B */ lui $at, %hi(D_800AF8D0) +/* 40E54 80065A54 AC22F8D0 */ sw $v0, %lo(D_800AF8D0)($at) +.L80065A58: +/* 40E58 80065A58 3C04800B */ lui $a0, %hi(D_800AF8D8) +/* 40E5C 80065A5C 8C84F8D8 */ lw $a0, %lo(D_800AF8D8)($a0) +/* 40E60 80065A60 10800005 */ beqz $a0, .L80065A78 +/* 40E64 80065A64 00000000 */ nop +/* 40E68 80065A68 0C0187A4 */ jal osVirtualToPhysical +/* 40E6C 80065A6C 00000000 */ nop +/* 40E70 80065A70 3C01800B */ lui $at, %hi(D_800AF8D8) +/* 40E74 80065A74 AC22F8D8 */ sw $v0, %lo(D_800AF8D8)($at) +.L80065A78: +/* 40E78 80065A78 3C04800B */ lui $a0, %hi(D_800AF8E0) +/* 40E7C 80065A7C 8C84F8E0 */ lw $a0, %lo(D_800AF8E0)($a0) +/* 40E80 80065A80 10800005 */ beqz $a0, .L80065A98 +/* 40E84 80065A84 00000000 */ nop +/* 40E88 80065A88 0C0187A4 */ jal osVirtualToPhysical +/* 40E8C 80065A8C 00000000 */ nop +/* 40E90 80065A90 3C01800B */ lui $at, %hi(D_800AF8E0) +/* 40E94 80065A94 AC22F8E0 */ sw $v0, %lo(D_800AF8E0)($at) +.L80065A98: +/* 40E98 80065A98 3C04800B */ lui $a0, %hi(D_800AF8E8) +/* 40E9C 80065A9C 8C84F8E8 */ lw $a0, %lo(D_800AF8E8)($a0) +/* 40EA0 80065AA0 10800005 */ beqz $a0, .L80065AB8 +/* 40EA4 80065AA4 00000000 */ nop +/* 40EA8 80065AA8 0C0187A4 */ jal osVirtualToPhysical +/* 40EAC 80065AAC 00000000 */ nop +/* 40EB0 80065AB0 3C01800B */ lui $at, %hi(D_800AF8E8) +/* 40EB4 80065AB4 AC22F8E8 */ sw $v0, %lo(D_800AF8E8)($at) +.L80065AB8: +/* 40EB8 80065AB8 3C04800B */ lui $a0, %hi(D_800AF8EC) +/* 40EBC 80065ABC 8C84F8EC */ lw $a0, %lo(D_800AF8EC)($a0) +/* 40EC0 80065AC0 10800005 */ beqz $a0, .L80065AD8 +/* 40EC4 80065AC4 00000000 */ nop +/* 40EC8 80065AC8 0C0187A4 */ jal osVirtualToPhysical +/* 40ECC 80065ACC 00000000 */ nop +/* 40ED0 80065AD0 3C01800B */ lui $at, %hi(D_800AF8EC) +/* 40ED4 80065AD4 AC22F8EC */ sw $v0, %lo(D_800AF8EC)($at) +.L80065AD8: +/* 40ED8 80065AD8 3C04800B */ lui $a0, %hi(D_800AF8F0) +/* 40EDC 80065ADC 8C84F8F0 */ lw $a0, %lo(D_800AF8F0)($a0) +/* 40EE0 80065AE0 10800005 */ beqz $a0, .L80065AF8 +/* 40EE4 80065AE4 00000000 */ nop +/* 40EE8 80065AE8 0C0187A4 */ jal osVirtualToPhysical +/* 40EEC 80065AEC 00000000 */ nop +/* 40EF0 80065AF0 3C01800B */ lui $at, %hi(D_800AF8F0) +/* 40EF4 80065AF4 AC22F8F0 */ sw $v0, %lo(D_800AF8F0)($at) +.L80065AF8: +/* 40EF8 80065AF8 3C04800B */ lui $a0, %hi(D_800AF8F8) +/* 40EFC 80065AFC 8C84F8F8 */ lw $a0, %lo(D_800AF8F8)($a0) +/* 40F00 80065B00 10800005 */ beqz $a0, .L80065B18 +/* 40F04 80065B04 00000000 */ nop +/* 40F08 80065B08 0C0187A4 */ jal osVirtualToPhysical +/* 40F0C 80065B0C 00000000 */ nop +/* 40F10 80065B10 3C01800B */ lui $at, %hi(D_800AF8F8) +/* 40F14 80065B14 AC22F8F8 */ sw $v0, %lo(D_800AF8F8)($at) +.L80065B18: +/* 40F18 80065B18 3C02800B */ lui $v0, %hi(D_800AF8C4) +/* 40F1C 80065B1C 8C42F8C4 */ lw $v0, %lo(D_800AF8C4)($v0) +/* 40F20 80065B20 30420001 */ andi $v0, $v0, 1 +/* 40F24 80065B24 10400019 */ beqz $v0, .L80065B8C +/* 40F28 80065B28 02202021 */ addu $a0, $s1, $zero +/* 40F2C 80065B2C 3C02800B */ lui $v0, %hi(D_800AF8F8) +/* 40F30 80065B30 8C42F8F8 */ lw $v0, %lo(D_800AF8F8)($v0) +/* 40F34 80065B34 3C03800B */ lui $v1, %hi(D_800AF8FC) +/* 40F38 80065B38 8C63F8FC */ lw $v1, %lo(D_800AF8FC)($v1) +/* 40F3C 80065B3C 3C01800B */ lui $at, %hi(D_800AF8D8) +/* 40F40 80065B40 AC22F8D8 */ sw $v0, %lo(D_800AF8D8)($at) +/* 40F44 80065B44 3C01800B */ lui $at, %hi(D_800AF8DC) +/* 40F48 80065B48 AC23F8DC */ sw $v1, %lo(D_800AF8DC)($at) +/* 40F4C 80065B4C 8E020004 */ lw $v0, 4($s0) +/* 40F50 80065B50 2403FFFE */ addiu $v1, $zero, -2 +/* 40F54 80065B54 00431024 */ and $v0, $v0, $v1 +/* 40F58 80065B58 AE020004 */ sw $v0, 4($s0) +/* 40F5C 80065B5C 3C02800B */ lui $v0, %hi(D_800AF8C4) +/* 40F60 80065B60 8C42F8C4 */ lw $v0, %lo(D_800AF8C4)($v0) +/* 40F64 80065B64 30420004 */ andi $v0, $v0, 4 +/* 40F68 80065B68 10400008 */ beqz $v0, .L80065B8C +/* 40F6C 80065B6C 3C03A000 */ lui $v1, 0xa000 +/* 40F70 80065B70 8E020038 */ lw $v0, 0x38($s0) +/* 40F74 80065B74 24420BFC */ addiu $v0, $v0, 0xbfc +/* 40F78 80065B78 00431025 */ or $v0, $v0, $v1 +/* 40F7C 80065B7C 8C420000 */ lw $v0, ($v0) +/* 40F80 80065B80 3C01800B */ lui $at, %hi(D_800AF8D0) +/* 40F84 80065B84 AC22F8D0 */ sw $v0, %lo(D_800AF8D0)($at) +/* 40F88 80065B88 02202021 */ addu $a0, $s1, $zero +.L80065B8C: +/* 40F8C 80065B8C 0C018614 */ jal osWritebackDCache +/* 40F90 80065B90 24050040 */ addiu $a1, $zero, 0x40 +/* 40F94 80065B94 0C01B1BC */ jal osSpSetStatus +/* 40F98 80065B98 24042B00 */ addiu $a0, $zero, 0x2b00 +/* 40F9C 80065B9C 2410FFFF */ addiu $s0, $zero, -1 +/* 40FA0 80065BA0 3C040400 */ lui $a0, 0x400 +.L80065BA4: +/* 40FA4 80065BA4 0C01B1C0 */ jal osSpSetPc +/* 40FA8 80065BA8 34841000 */ ori $a0, $a0, 0x1000 +/* 40FAC 80065BAC 1050FFFD */ beq $v0, $s0, .L80065BA4 +/* 40FB0 80065BB0 3C040400 */ lui $a0, 0x400 +/* 40FB4 80065BB4 2410FFFF */ addiu $s0, $zero, -1 +/* 40FB8 80065BB8 24040001 */ addiu $a0, $zero, 1 +.L80065BBC: +/* 40FBC 80065BBC 3C050400 */ lui $a1, 0x400 +/* 40FC0 80065BC0 34A50FC0 */ ori $a1, $a1, 0xfc0 +/* 40FC4 80065BC4 02203021 */ addu $a2, $s1, $zero +/* 40FC8 80065BC8 0C01B1CC */ jal osSpRawStartDma +/* 40FCC 80065BCC 24070040 */ addiu $a3, $zero, 0x40 +/* 40FD0 80065BD0 1050FFFA */ beq $v0, $s0, .L80065BBC +/* 40FD4 80065BD4 24040001 */ addiu $a0, $zero, 1 +.L80065BD8: +/* 40FD8 80065BD8 0C01B1B0 */ jal osSpDeviceBusy +/* 40FDC 80065BDC 00000000 */ nop +/* 40FE0 80065BE0 1440FFFD */ bnez $v0, .L80065BD8 +/* 40FE4 80065BE4 24040001 */ addiu $a0, $zero, 1 +/* 40FE8 80065BE8 2410FFFF */ addiu $s0, $zero, -1 +.L80065BEC: +/* 40FEC 80065BEC 8E260008 */ lw $a2, 8($s1) +/* 40FF0 80065BF0 8E27000C */ lw $a3, 0xc($s1) +/* 40FF4 80065BF4 3C050400 */ lui $a1, 0x400 +/* 40FF8 80065BF8 0C01B1CC */ jal osSpRawStartDma +/* 40FFC 80065BFC 34A51000 */ ori $a1, $a1, 0x1000 +/* 41000 80065C00 1050FFFA */ beq $v0, $s0, .L80065BEC +/* 41004 80065C04 24040001 */ addiu $a0, $zero, 1 +/* 41008 80065C08 8FBF0018 */ lw $ra, 0x18($sp) +/* 4100C 80065C0C 8FB10014 */ lw $s1, 0x14($sp) +/* 41010 80065C10 8FB00010 */ lw $s0, 0x10($sp) +/* 41014 80065C14 03E00008 */ jr $ra +/* 41018 80065C18 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/os/code_40E10/osSpTaskStartGo.s b/asm/nonmatchings/os/code_40E10/osSpTaskStartGo.s new file mode 100644 index 0000000000..5c63f5a265 --- /dev/null +++ b/asm/nonmatchings/os/code_40E10/osSpTaskStartGo.s @@ -0,0 +1,18 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osSpTaskStartGo +/* 4101C 80065C1C 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 41020 80065C20 AFBF0010 */ sw $ra, 0x10($sp) +.L80065C24: +/* 41024 80065C24 0C01B1B0 */ jal osSpDeviceBusy +/* 41028 80065C28 00000000 */ nop +/* 4102C 80065C2C 1440FFFD */ bnez $v0, .L80065C24 +/* 41030 80065C30 00000000 */ nop +/* 41034 80065C34 0C01B1BC */ jal osSpSetStatus +/* 41038 80065C38 24040125 */ addiu $a0, $zero, 0x125 +/* 4103C 80065C3C 8FBF0010 */ lw $ra, 0x10($sp) +/* 41040 80065C40 03E00008 */ jr $ra +/* 41044 80065C44 27BD0018 */ addiu $sp, $sp, 0x18 +/* 41048 80065C48 00000000 */ nop +/* 4104C 80065C4C 00000000 */ nop diff --git a/asm/nonmatchings/os/code_45a50_len_3a0/__osInitialize_common.s b/asm/nonmatchings/os/code_45a50_len_3a0/__osInitialize_common.s index 4bfb22c61c..a8d98903a4 100644 --- a/asm/nonmatchings/os/code_45a50_len_3a0/__osInitialize_common.s +++ b/asm/nonmatchings/os/code_45a50_len_3a0/__osInitialize_common.s @@ -169,7 +169,7 @@ glabel __osInitialize_common /* 45D84 8006A984 3442D354 */ ori $v0, $v0, 0xd354 .L8006A988: /* 45D88 8006A988 3C018009 */ lui $at, %hi(D_800958F8) -/* 45D8C 8006A98C 0C01B198 */ jal osGetCause +/* 45D8C 8006A98C 0C01B198 */ jal __osGetCause /* 45D90 8006A990 AC2258F8 */ sw $v0, %lo(D_800958F8)($at) /* 45D94 8006A994 30421000 */ andi $v0, $v0, 0x1000 /* 45D98 8006A998 10400003 */ beqz $v0, .L8006A9A8 diff --git a/asm/nonmatchings/os/code_3d330_len_990/guFrustum.s b/asm/nonmatchings/os/guFrustum/guFrustum.s similarity index 100% rename from asm/nonmatchings/os/code_3d330_len_990/guFrustum.s rename to asm/nonmatchings/os/guFrustum/guFrustum.s diff --git a/asm/nonmatchings/os/code_3d330_len_990/guFrustumF.s b/asm/nonmatchings/os/guFrustum/guFrustumF.s similarity index 100% rename from asm/nonmatchings/os/code_3d330_len_990/guFrustumF.s rename to asm/nonmatchings/os/guFrustum/guFrustumF.s diff --git a/asm/nonmatchings/os/code_3d330_len_990/guLookAt.s b/asm/nonmatchings/os/guLookAt/guLookAt.s similarity index 100% rename from asm/nonmatchings/os/code_3d330_len_990/guLookAt.s rename to asm/nonmatchings/os/guLookAt/guLookAt.s diff --git a/asm/nonmatchings/os/code_3d330_len_990/guLookAtF.s b/asm/nonmatchings/os/guLookAt/guLookAtF.s similarity index 100% rename from asm/nonmatchings/os/code_3d330_len_990/guLookAtF.s rename to asm/nonmatchings/os/guLookAt/guLookAtF.s diff --git a/asm/nonmatchings/os/code_42780_len_120/guMtxIdent.s b/asm/nonmatchings/os/guMtxIdent/guMtxIdent.s similarity index 100% rename from asm/nonmatchings/os/code_42780_len_120/guMtxIdent.s rename to asm/nonmatchings/os/guMtxIdent/guMtxIdent.s diff --git a/asm/nonmatchings/os/code_42e70_len_390/guRotate.s b/asm/nonmatchings/os/guRotate/guRotate.s similarity index 100% rename from asm/nonmatchings/os/code_42e70_len_390/guRotate.s rename to asm/nonmatchings/os/guRotate/guRotate.s diff --git a/asm/nonmatchings/os/code_42e70_len_390/guRotateF.s b/asm/nonmatchings/os/guRotate/guRotateF.s similarity index 100% rename from asm/nonmatchings/os/code_42e70_len_390/guRotateF.s rename to asm/nonmatchings/os/guRotate/guRotateF.s diff --git a/asm/nonmatchings/os/code_3b4a0_len_270/nuContRmbForceStop.s b/asm/nonmatchings/os/nusys/code_3B4A0/nuContRmbForceStop.s similarity index 100% rename from asm/nonmatchings/os/code_3b4a0_len_270/nuContRmbForceStop.s rename to asm/nonmatchings/os/nusys/code_3B4A0/nuContRmbForceStop.s diff --git a/asm/nonmatchings/os/code_3b4a0_len_270/nuContRmbForceStopEnd.s b/asm/nonmatchings/os/nusys/code_3B4A0/nuContRmbForceStopEnd.s similarity index 100% rename from asm/nonmatchings/os/code_3b4a0_len_270/nuContRmbForceStopEnd.s rename to asm/nonmatchings/os/nusys/code_3B4A0/nuContRmbForceStopEnd.s diff --git a/asm/nonmatchings/os/code_3b4a0_len_270/nuPiReadRomOverlay.s b/asm/nonmatchings/os/nusys/code_3B4A0/nuPiReadRomOverlay.s similarity index 100% rename from asm/nonmatchings/os/code_3b4a0_len_270/nuPiReadRomOverlay.s rename to asm/nonmatchings/os/nusys/code_3B4A0/nuPiReadRomOverlay.s diff --git a/asm/nonmatchings/os/code_3b390_len_110/nuContRmbModeSet.s b/asm/nonmatchings/os/nusys/nuContRmbModeSet/nuContRmbModeSet.s similarity index 100% rename from asm/nonmatchings/os/code_3b390_len_110/nuContRmbModeSet.s rename to asm/nonmatchings/os/nusys/nuContRmbModeSet/nuContRmbModeSet.s diff --git a/asm/nonmatchings/os/code_3b4a0_len_270/nuGfxThread.s b/asm/nonmatchings/os/nusys/nuGfxThread/nuGfxThread.s similarity index 100% rename from asm/nonmatchings/os/code_3b4a0_len_270/nuGfxThread.s rename to asm/nonmatchings/os/nusys/nuGfxThread/nuGfxThread.s diff --git a/asm/nonmatchings/os/code_3b4a0_len_270/nuGfxThreadStart.s b/asm/nonmatchings/os/nusys/nuGfxThread/nuGfxThreadStart.s similarity index 100% rename from asm/nonmatchings/os/code_3b4a0_len_270/nuGfxThreadStart.s rename to asm/nonmatchings/os/nusys/nuGfxThread/nuGfxThreadStart.s diff --git a/asm/nonmatchings/os/osCreateMesgQueue/osCreateMesgQueue.s b/asm/nonmatchings/os/osCreateMesgQueue/osCreateMesgQueue.s new file mode 100644 index 0000000000..1f35b77342 --- /dev/null +++ b/asm/nonmatchings/os/osCreateMesgQueue/osCreateMesgQueue.s @@ -0,0 +1,16 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osCreateMesgQueue +/* 40980 80065580 3C028009 */ lui $v0, %hi(D_80094650) +/* 40984 80065584 24424650 */ addiu $v0, $v0, %lo(D_80094650) +/* 40988 80065588 AC820000 */ sw $v0, ($a0) +/* 4098C 8006558C AC820004 */ sw $v0, 4($a0) +/* 40990 80065590 AC800008 */ sw $zero, 8($a0) +/* 40994 80065594 AC80000C */ sw $zero, 0xc($a0) +/* 40998 80065598 AC860010 */ sw $a2, 0x10($a0) +/* 4099C 8006559C 03E00008 */ jr $ra +/* 409A0 800655A0 AC850014 */ sw $a1, 0x14($a0) +/* 409A4 800655A4 00000000 */ nop +/* 409A8 800655A8 00000000 */ nop +/* 409AC 800655AC 00000000 */ nop diff --git a/asm/nonmatchings/os/osSiRawStartDma/osSiRawStartDma.s b/asm/nonmatchings/os/osSiRawStartDma/osSiRawStartDma.s new file mode 100644 index 0000000000..d4ea6abb27 --- /dev/null +++ b/asm/nonmatchings/os/osSiRawStartDma/osSiRawStartDma.s @@ -0,0 +1,53 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osSiRawStartDma +/* 410C0 80065CC0 27BDFFE0 */ addiu $sp, $sp, -0x20 +/* 410C4 80065CC4 3C02A480 */ lui $v0, 0xa480 +/* 410C8 80065CC8 34420018 */ ori $v0, $v0, 0x18 +/* 410CC 80065CCC AFBF0018 */ sw $ra, 0x18($sp) +/* 410D0 80065CD0 AFB10014 */ sw $s1, 0x14($sp) +/* 410D4 80065CD4 AFB00010 */ sw $s0, 0x10($sp) +/* 410D8 80065CD8 8C420000 */ lw $v0, ($v0) +/* 410DC 80065CDC 00808021 */ addu $s0, $a0, $zero +/* 410E0 80065CE0 30420003 */ andi $v0, $v0, 3 +/* 410E4 80065CE4 10400003 */ beqz $v0, .L80065CF4 +/* 410E8 80065CE8 00A08821 */ addu $s1, $a1, $zero +/* 410EC 80065CEC 08019754 */ j .L80065D50 +/* 410F0 80065CF0 2402FFFF */ addiu $v0, $zero, -1 +.L80065CF4: +/* 410F4 80065CF4 24020001 */ addiu $v0, $zero, 1 +/* 410F8 80065CF8 16020003 */ bne $s0, $v0, .L80065D08 +/* 410FC 80065CFC 02202021 */ addu $a0, $s1, $zero +/* 41100 80065D00 0C018614 */ jal osWritebackDCache +/* 41104 80065D04 24050040 */ addiu $a1, $zero, 0x40 +.L80065D08: +/* 41108 80065D08 0C0187A4 */ jal osVirtualToPhysical +/* 4110C 80065D0C 02202021 */ addu $a0, $s1, $zero +/* 41110 80065D10 3C03A480 */ lui $v1, 0xa480 +/* 41114 80065D14 AC620000 */ sw $v0, ($v1) +/* 41118 80065D18 56000003 */ bnel $s0, $zero, .L80065D28 +/* 4111C 80065D1C 3C03A480 */ lui $v1, 0xa480 +/* 41120 80065D20 0801974B */ j .L80065D2C +/* 41124 80065D24 34630004 */ ori $v1, $v1, 4 +.L80065D28: +/* 41128 80065D28 34630010 */ ori $v1, $v1, 0x10 +.L80065D2C: +/* 4112C 80065D2C 3C021FC0 */ lui $v0, 0x1fc0 +/* 41130 80065D30 344207C0 */ ori $v0, $v0, 0x7c0 +/* 41134 80065D34 AC620000 */ sw $v0, ($v1) +/* 41138 80065D38 16000005 */ bnez $s0, .L80065D50 +/* 4113C 80065D3C 00001021 */ addu $v0, $zero, $zero +/* 41140 80065D40 02202021 */ addu $a0, $s1, $zero +/* 41144 80065D44 0C0185C8 */ jal osInvalDCache +/* 41148 80065D48 24050040 */ addiu $a1, $zero, 0x40 +/* 4114C 80065D4C 00001021 */ addu $v0, $zero, $zero +.L80065D50: +/* 41150 80065D50 8FBF0018 */ lw $ra, 0x18($sp) +/* 41154 80065D54 8FB10014 */ lw $s1, 0x14($sp) +/* 41158 80065D58 8FB00010 */ lw $s0, 0x10($sp) +/* 4115C 80065D5C 03E00008 */ jr $ra +/* 41160 80065D60 27BD0020 */ addiu $sp, $sp, 0x20 +/* 41164 80065D64 00000000 */ nop +/* 41168 80065D68 00000000 */ nop +/* 4116C 80065D6C 00000000 */ nop diff --git a/asm/nonmatchings/os/osSpTaskYield/osSpTaskYield.s b/asm/nonmatchings/os/osSpTaskYield/osSpTaskYield.s new file mode 100644 index 0000000000..f2df926325 --- /dev/null +++ b/asm/nonmatchings/os/osSpTaskYield/osSpTaskYield.s @@ -0,0 +1,12 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osSpTaskYield +/* 41050 80065C50 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 41054 80065C54 AFBF0010 */ sw $ra, 0x10($sp) +/* 41058 80065C58 0C01B1BC */ jal osSpSetStatus +/* 4105C 80065C5C 24040400 */ addiu $a0, $zero, 0x400 +/* 41060 80065C60 8FBF0010 */ lw $ra, 0x10($sp) +/* 41064 80065C64 03E00008 */ jr $ra +/* 41068 80065C68 27BD0018 */ addiu $sp, $sp, 0x18 +/* 4106C 80065C6C 00000000 */ nop diff --git a/asm/nonmatchings/os/osSpTaskYielded/osSpTaskYielded.s b/asm/nonmatchings/os/osSpTaskYielded/osSpTaskYielded.s new file mode 100644 index 0000000000..cafca33adc --- /dev/null +++ b/asm/nonmatchings/os/osSpTaskYielded/osSpTaskYielded.s @@ -0,0 +1,25 @@ +.set noat # allow manual use of $at +.set noreorder # don't insert nops after branches + +glabel osSpTaskYielded +/* 41070 80065C70 27BDFFE8 */ addiu $sp, $sp, -0x18 +/* 41074 80065C74 AFB00010 */ sw $s0, 0x10($sp) +/* 41078 80065C78 AFBF0014 */ sw $ra, 0x14($sp) +/* 4107C 80065C7C 0C01B1B8 */ jal osSpGetStatus +/* 41080 80065C80 00808021 */ addu $s0, $a0, $zero +/* 41084 80065C84 00022202 */ srl $a0, $v0, 8 +/* 41088 80065C88 30420080 */ andi $v0, $v0, 0x80 +/* 4108C 80065C8C 10400006 */ beqz $v0, .L80065CA8 +/* 41090 80065C90 30840001 */ andi $a0, $a0, 1 +/* 41094 80065C94 8E020004 */ lw $v0, 4($s0) +/* 41098 80065C98 2403FFFD */ addiu $v1, $zero, -3 +/* 4109C 80065C9C 00441025 */ or $v0, $v0, $a0 +/* 410A0 80065CA0 00431024 */ and $v0, $v0, $v1 +/* 410A4 80065CA4 AE020004 */ sw $v0, 4($s0) +.L80065CA8: +/* 410A8 80065CA8 00801021 */ addu $v0, $a0, $zero +/* 410AC 80065CAC 8FBF0014 */ lw $ra, 0x14($sp) +/* 410B0 80065CB0 8FB00010 */ lw $s0, 0x10($sp) +/* 410B4 80065CB4 03E00008 */ jr $ra +/* 410B8 80065CB8 27BD0018 */ addiu $sp, $sp, 0x18 +/* 410BC 80065CBC 00000000 */ nop diff --git a/asm/nonmatchings/os/code_42780_len_120/osViRepeatLine.s b/asm/nonmatchings/os/osViRepeatLine/osViRepeatLine.s similarity index 100% rename from asm/nonmatchings/os/code_42780_len_120/osViRepeatLine.s rename to asm/nonmatchings/os/osViRepeatLine/osViRepeatLine.s diff --git a/asm/nonmatchings/os/code_3cd00_len_5f0/osVirtualToPhysical.s b/asm/nonmatchings/os/osVirtualToPhysical/osVirtualToPhysical.s similarity index 100% rename from asm/nonmatchings/os/code_3cd00_len_5f0/osVirtualToPhysical.s rename to asm/nonmatchings/os/osVirtualToPhysical/osVirtualToPhysical.s diff --git a/asm/nonmatchings/os/code_46c70_len_e00/osGetCause.s b/asm/os/__osGetCause.s similarity index 63% rename from asm/nonmatchings/os/code_46c70_len_e00/osGetCause.s rename to asm/os/__osGetCause.s index 3926dc04fb..207e40e1b1 100644 --- a/asm/nonmatchings/os/code_46c70_len_e00/osGetCause.s +++ b/asm/os/__osGetCause.s @@ -1,7 +1,13 @@ +.include "macro.inc" + +# assembler directives .set noat # allow manual use of $at .set noreorder # don't insert nops after branches +.set gp=64 # allow use of 64-bit general purpose registers -glabel osGetCause +.section .text, "ax" + +glabel __osGetCause /* 47A60 8006C660 40026800 */ mfc0 $v0, $13 /* 47A64 8006C664 03E00008 */ jr $ra /* 47A68 8006C668 00000000 */ nop diff --git a/asm/nonmatchings/os/code_40c20_len_1f0/osGetCount.s b/asm/os/osGetCount.s similarity index 67% rename from asm/nonmatchings/os/code_40c20_len_1f0/osGetCount.s rename to asm/os/osGetCount.s index ed1e89a39e..9a3d517575 100644 --- a/asm/nonmatchings/os/code_40c20_len_1f0/osGetCount.s +++ b/asm/os/osGetCount.s @@ -1,5 +1,11 @@ +.include "macro.inc" + +# assembler directives .set noat # allow manual use of $at .set noreorder # don't insert nops after branches +.set gp=64 # allow use of 64-bit general purpose registers + +.section .text, "ax" glabel osGetCount /* 40E00 80065A00 40024800 */ mfc0 $v0, $9 diff --git a/src/code_303c0_len_3e10.c b/src/code_303c0_len_3e10.c index b02a5d000b..7d1831a2b4 100644 --- a/src/code_303c0_len_3e10.c +++ b/src/code_303c0_len_3e10.c @@ -1,461 +1,4 @@ #include "common.h" #include "audio.h" -s32 D_80078DB0 = 0; -u16 D_80078DB4 = 0; -u16 D_80078DB6 = 0; - -// chunks of data, not sure what -s32 D_80078DB8[] = { 0x025E0350, 0x04640554, 0x00000000, }; -s32 D_80078DC4[] = { 0x0264036E, 0x045A0000, }; -s32 D_80078DCC[] = { 0x025F0000, }; -s32 D_80078DD0[] = { 0x0546065A, 0x075A0864, 0x00000000, }; -s32 D_80078DDC[] = { 0x05000600, 0x07000800, 0x09000A00, 0x0B000C00, 0x0D000E00, 0x0F001000, 0x00000000, }; -s32 D_80078DF8[] = { 0x05640666, 0x0758086E, 0x09000A00, 0x0B000C00, 0x0D000E00, 0x0F001000, 0x00000000, }; -s32 D_80078E14[] = { 0x05640666, 0x0758086E, 0x097E0A58, 0x0B640C00, 0x0D000E00, 0x0F001000, 0x00000000, }; -s32 D_80078E30[] = { 0x05640666, 0x0758086E, 0x097E0A58, 0x0B640C64, 0x0D6A0E64, 0x0F64106E, 0x00000000, 0x00000000, }; - INCLUDE_ASM(void, "code_303c0_len_3e10", al_LoadBKHeaders, UnkAl19E0* arg0, ALHeap* arg1); - -void func_80055050(void) { - D_80078DB4 = 1; - D_80078DB0 = 0; -} - -INCLUDE_ASM(void, "code_303c0_len_3e10", func_80055068, u32 arg0); - -void func_80055110(UnkAlA9C* arg0) { - s32 i; - - for (i = 0; i < 8; i++) { - arg0->unk_238[i] = 0; - } - - arg0->unk_25B = 0; - arg0->unk_25A = 0; - arg0->unk_259 = 0; - arg0->unk_258 = 0; -} - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_8005513C); - -void func_800551E0(s32 arg0, u8 arg1, s8 arg2) { - UnkAl6CC* sym = D_8009A640; - s16 a1temp = arg1 * 256; - - if (a1temp != 0) { - a1temp |= 0xFF; - } - - if (arg2 < 0) { - arg2 = 0x7F; - } - - func_8004B6D8(sym, arg0, a1temp, 0, arg2); -} - -void func_80055240(s32 arg0, u8 arg1, s8 arg2, s16 arg3) { - UnkAl6CC* sym = D_8009A640; - s16 a1temp = arg1 * 256; - - if (a1temp != 0) { - a1temp |= 0xFF; - } - - if (arg2 < 0) { - arg2 = 0x7F; - } - - if (arg3 > 0x960) { - arg3 = 0x960; - } else if (arg3 < -0x960) { - arg3 = -0x960; - } - - func_8004B6D8(sym, arg0, a1temp, arg3, arg2); -} - -void func_800552D0(s32 arg0, u8 arg1, s8 arg2) { - UnkAl6CC* sym = D_8009A640; - s16 a1temp = arg1 * 256; - - if (a1temp != 0) { - a1temp |= 0xFF; - } - - if (arg2 < 0) { - arg2 = 0x7F; - } - - func_8004B6D8(sym, arg0 | 0x1000, a1temp, 0, arg2); -} - -void func_80055330(s32 arg0, u8 arg1, s8 arg2, s16 arg3) { - UnkAl6CC* sym = D_8009A640; - s16 a1temp = arg1 * 256; - - if (a1temp != 0) { - a1temp |= 0xFF; - } - - if (arg2 < 0) { - arg2 = 0x7F; - } - - if (arg3 > 0x960) { - arg3 = 0x960; - } else if (arg3 < -0x960) { - arg3 = -0x960; - } - - func_8004B6D8(sym, arg0 | 0x1000, a1temp, arg3, arg2); -} - -void func_800553C0(s32 arg0) { - func_8004B6D8(D_8009A640, arg0 | 0x8000, 0, 0, 0); -} - -void func_800553F4(void) { - D_8009A640->unk_168 = 1; -} - -void func_80055408(s32 arg0, s16 arg1, s16 arg2, s32 arg3) { - func_8004B6D8(D_8009A640, arg0, arg1, arg2, arg3); -} - -s32 func_80055448(s32 arg0) { - return func_80053F80(arg0); -} - -s32 func_80055464(s32 arg0, s32 arg1) { - if (func_80050C30(arg0) == 0) { - func_80050CA0(arg0, arg1); - } -} - -s32 func_800554A4(s32 arg0) { - s32 ret = func_80050C30(arg0); - - if (ret == 0) { - func_80050EF0(arg0); - } - - return ret; -} - -s32 func_800554E8(s32 arg0, s32 arg1) { - s32 ret = func_80050C30(arg0); - - if (ret == 0) { - func_80050F64(arg0, arg1); - } - - return ret; -} - -s32 func_8005553C(s32 arg0, s32 arg1) { - s32 ret = func_80050C30(arg0); - - if (ret == 0) { - func_80050E18(arg0, arg1); - } - - return ret; -} - -s32 func_80055590(s32 arg0, s32 arg1) { - s32 ret = func_80050C30(arg0); - - if (ret == 0) { - func_80050E84(arg0, arg1); - } - - return ret; -} - -void func_800555E4(s32 arg0) { - if (func_80050C30(arg0) == 0) { - func_80051050(arg0); - } -} - -s32 func_80055618(s32 arg0, s32 arg1) { - s32 ret = func_80050C30(arg0); - - if (ret == 0) { - func_80050C54(arg0, arg1); - } - - return ret; -} - -s32 func_8005566C(s32 arg0, s32 arg1, s32 arg2) { - s32 ret = func_80050C30(arg0); - - if (ret == 0) { - func_80050FD0(arg0, arg1, arg2); - } - - return ret; -} - -s32 func_800556D0(s32 arg0) { - s32 ret = func_80050C30(arg0); - - if (ret == 0) { - func_80050C64(arg0, 1); - } - - return ret; -} - -s32 func_80055718(s32 arg0) { - s32 ret = func_80050C30(arg0); - - if (ret == 0) { - func_80050C64(arg0, 0); - } - - return ret; -} - -void func_80055760(s32 arg0) { - u32 i; - s32 lim = 4; - - D_80078DB6 = 0xFF; - - for (i = 0; i < lim; i++) { - if (func_80055464(i, 0) != 0) { - return; - } - } - - func_80055848(arg0); -} - -s32 func_800557CC(s32 arg0) { - u32 i; - s32 lim = 4; - s32 phi_v1; - - for (i = 0; i < lim; i++) { - if (i == D_80078DB6) { - phi_v1 = func_800554E8(i, arg0); - } else { - phi_v1 = func_800554A4(i); - } - - if (phi_v1 != 0) { - break; - } - } - return phi_v1; -} - -s32 func_80055848(s32 arg0) { - s32 lim = 4; - s32 phi_v1 = 0; - - if (arg0 != D_80078DB6) { - u32 i; - - for (i = 0; i < lim; i++) { - if (i == arg0) { - phi_v1 = func_80055718(arg0); - } else { - phi_v1 = func_800556D0(i); - } - - if (phi_v1 != 0) { - break; - } - } - - if (phi_v1 == 0) { - D_80078DB6 = arg0; - } - } - - return phi_v1; -} - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_800558D4); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_8005591C); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055970); - -s32 func_800559C4(UNK_TYPE arg0) { - return func_8004DA0C(arg0); -} - -void func_800559E0(void) { - func_8004DA74(); -} - -void func_800559FC(void) { - func_8004DAE0(); -} - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055A18); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055A6C); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055ABC); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055AF0); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055B28); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055B80); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055BB8); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055BF0); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055C2C); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055C64); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055C94); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055CC4); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055CE8); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055D38); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055D8C); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055DDC); - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055E48); - -// needs rodata -#ifdef NON_MATCHING -s32* func_80055EB4(s32 arg0) { - s32* ret = NULL; - - switch (arg0) { - case 0: - ret = &D_80078DB8; - break; - case 1: - ret = &D_80078DC4; - break; - case 2: - ret = &D_80078DCC; - break; - case 3: - ret = &D_80078DD0; - break; - case 4: - ret = &D_80078DDC; - break; - case 5: - ret = &D_80078DF8; - break; - case 6: - ret = &D_80078E14; - break; - case 7: - ret = &D_80078E30; - break; - } - - return ret; -} -#else -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055EB4); -#endif - -s32 func_80055F58(s32 arg0, u32 arg1, u32 arg2) { - s32* subroutine_arg4; - s32* subroutine_arg5; - s32 temp_s2 = func_80055CE8(arg0, &subroutine_arg4, &subroutine_arg5); - - if (temp_s2 == 0) { - if (arg2 > 0x7F) { - arg2 = 0x7F; - } - if (arg1 > 0xF) { - arg1 = 0xF; - } - func_8005083C(subroutine_arg5, arg1, 0x60, (u8)arg2); // todo remove cast when func is defined - } - return temp_s2; -} - -s32 func_80055FD4(s32 arg0, s32 arg1) { - return func_80055F58(arg0, arg1, 0); -} - -s32 func_80055FF0(s32 arg0, s32 arg1) { - return func_80055F58(arg0, arg1, 0x3F); -} - -s32 func_8005600C(s32 arg0, s32 arg1) { - return func_80055F58(arg0, arg1, 0x7F); -} - -s32 func_80056028(s32 arg0, u8 arg1) { - return func_800506C8(arg0, arg1); -} - -s32 func_80056044(s32 arg0, u8 arg1) { - return func_800506C8(arg0, arg1 | 0x57000000); -} - -s32 func_80056068(s32 arg0, u8 arg1) { - return func_800506C8(arg0, arg1 | 0x7F000000); -} - -void func_8005608C(s32* arg0, s32* arg1) { - UnkAl19E0* temp_v0 = D_8009A5C0; - - *arg0 = temp_v0->unk_94; - *arg1 = temp_v0->unk_98; -} - -void func_800560A8(void) { - D_8009A5C0->unk_9C = 1; -} - -INCLUDE_ASM(s32, "code_303c0_len_3e10", func_800560BC); - -INCLUDE_ASM(void, "code_303c0_len_3e10", func_8005610C, void); - -void func_80056144(UnkFuncAl arg0, s32 arg1) { - D_8009A5C0->unk_A4[arg1] = arg0; -} - -void func_8005615C(void) { - func_80056D5C(1); - func_80054DA8(0); -} - -void func_80056180(void) { - func_80056D5C(0); - func_80054DA8(1); -} - -void func_800561A4(s32 arg0) { - func_80054CE0(1, arg0); -} - -void func_800561C4(s32 arg0) { - func_80054CE0(16, arg0); -} - -void func_800561E4(s32 arg0) { - func_80054D74(16, arg0); -} - -void func_80056204(void) { - func_8004BA54(D_8009A640, 0); -} - -void func_80056228(void) { - func_8004BA54(D_8009A640, 1); -} diff --git a/src/code_30450.c b/src/code_30450.c new file mode 100644 index 0000000000..baa5ef2105 --- /dev/null +++ b/src/code_30450.c @@ -0,0 +1,459 @@ +#include "common.h" +#include "audio.h" + +s32 D_80078DB0 = 0; +u16 D_80078DB4 = 0; +u16 D_80078DB6 = 0; + +// chunks of data, not sure what +s32 D_80078DB8[] = { 0x025E0350, 0x04640554, 0x00000000, }; +s32 D_80078DC4[] = { 0x0264036E, 0x045A0000, }; +s32 D_80078DCC[] = { 0x025F0000, }; +s32 D_80078DD0[] = { 0x0546065A, 0x075A0864, 0x00000000, }; +s32 D_80078DDC[] = { 0x05000600, 0x07000800, 0x09000A00, 0x0B000C00, 0x0D000E00, 0x0F001000, 0x00000000, }; +s32 D_80078DF8[] = { 0x05640666, 0x0758086E, 0x09000A00, 0x0B000C00, 0x0D000E00, 0x0F001000, 0x00000000, }; +s32 D_80078E14[] = { 0x05640666, 0x0758086E, 0x097E0A58, 0x0B640C00, 0x0D000E00, 0x0F001000, 0x00000000, }; +s32 D_80078E30[] = { 0x05640666, 0x0758086E, 0x097E0A58, 0x0B640C64, 0x0D6A0E64, 0x0F64106E, 0x00000000, 0x00000000, }; + +void func_80055050(void) { + D_80078DB4 = 1; + D_80078DB0 = 0; +} + +INCLUDE_ASM(void, "code_30450", func_80055068, u32 arg0); + +void func_80055110(UnkAlA9C* arg0) { + s32 i; + + for (i = 0; i < 8; i++) { + arg0->unk_238[i] = 0; + } + + arg0->unk_25B = 0; + arg0->unk_25A = 0; + arg0->unk_259 = 0; + arg0->unk_258 = 0; +} + +INCLUDE_ASM(s32, "code_30450", func_8005513C); + +void func_800551E0(s32 arg0, u8 arg1, s8 arg2) { + UnkAl6CC* sym = D_8009A640; + s16 a1temp = arg1 * 256; + + if (a1temp != 0) { + a1temp |= 0xFF; + } + + if (arg2 < 0) { + arg2 = 0x7F; + } + + func_8004B6D8(sym, arg0, a1temp, 0, arg2); +} + +void func_80055240(s32 arg0, u8 arg1, s8 arg2, s16 arg3) { + UnkAl6CC* sym = D_8009A640; + s16 a1temp = arg1 * 256; + + if (a1temp != 0) { + a1temp |= 0xFF; + } + + if (arg2 < 0) { + arg2 = 0x7F; + } + + if (arg3 > 0x960) { + arg3 = 0x960; + } else if (arg3 < -0x960) { + arg3 = -0x960; + } + + func_8004B6D8(sym, arg0, a1temp, arg3, arg2); +} + +void func_800552D0(s32 arg0, u8 arg1, s8 arg2) { + UnkAl6CC* sym = D_8009A640; + s16 a1temp = arg1 * 256; + + if (a1temp != 0) { + a1temp |= 0xFF; + } + + if (arg2 < 0) { + arg2 = 0x7F; + } + + func_8004B6D8(sym, arg0 | 0x1000, a1temp, 0, arg2); +} + +void func_80055330(s32 arg0, u8 arg1, s8 arg2, s16 arg3) { + UnkAl6CC* sym = D_8009A640; + s16 a1temp = arg1 * 256; + + if (a1temp != 0) { + a1temp |= 0xFF; + } + + if (arg2 < 0) { + arg2 = 0x7F; + } + + if (arg3 > 0x960) { + arg3 = 0x960; + } else if (arg3 < -0x960) { + arg3 = -0x960; + } + + func_8004B6D8(sym, arg0 | 0x1000, a1temp, arg3, arg2); +} + +void func_800553C0(s32 arg0) { + func_8004B6D8(D_8009A640, arg0 | 0x8000, 0, 0, 0); +} + +void func_800553F4(void) { + D_8009A640->unk_168 = 1; +} + +void func_80055408(s32 arg0, s16 arg1, s16 arg2, s32 arg3) { + func_8004B6D8(D_8009A640, arg0, arg1, arg2, arg3); +} + +s32 func_80055448(s32 arg0) { + return func_80053F80(arg0); +} + +s32 func_80055464(s32 arg0, s32 arg1) { + if (func_80050C30(arg0) == 0) { + func_80050CA0(arg0, arg1); + } +} + +s32 func_800554A4(s32 arg0) { + s32 ret = func_80050C30(arg0); + + if (ret == 0) { + func_80050EF0(arg0); + } + + return ret; +} + +s32 func_800554E8(s32 arg0, s32 arg1) { + s32 ret = func_80050C30(arg0); + + if (ret == 0) { + func_80050F64(arg0, arg1); + } + + return ret; +} + +s32 func_8005553C(s32 arg0, s32 arg1) { + s32 ret = func_80050C30(arg0); + + if (ret == 0) { + func_80050E18(arg0, arg1); + } + + return ret; +} + +s32 func_80055590(s32 arg0, s32 arg1) { + s32 ret = func_80050C30(arg0); + + if (ret == 0) { + func_80050E84(arg0, arg1); + } + + return ret; +} + +void func_800555E4(s32 arg0) { + if (func_80050C30(arg0) == 0) { + func_80051050(arg0); + } +} + +s32 func_80055618(s32 arg0, s32 arg1) { + s32 ret = func_80050C30(arg0); + + if (ret == 0) { + func_80050C54(arg0, arg1); + } + + return ret; +} + +s32 func_8005566C(s32 arg0, s32 arg1, s32 arg2) { + s32 ret = func_80050C30(arg0); + + if (ret == 0) { + func_80050FD0(arg0, arg1, arg2); + } + + return ret; +} + +s32 func_800556D0(s32 arg0) { + s32 ret = func_80050C30(arg0); + + if (ret == 0) { + func_80050C64(arg0, 1); + } + + return ret; +} + +s32 func_80055718(s32 arg0) { + s32 ret = func_80050C30(arg0); + + if (ret == 0) { + func_80050C64(arg0, 0); + } + + return ret; +} + +void func_80055760(s32 arg0) { + u32 i; + s32 lim = 4; + + D_80078DB6 = 0xFF; + + for (i = 0; i < lim; i++) { + if (func_80055464(i, 0) != 0) { + return; + } + } + + func_80055848(arg0); +} + +s32 func_800557CC(s32 arg0) { + u32 i; + s32 lim = 4; + s32 phi_v1; + + for (i = 0; i < lim; i++) { + if (i == D_80078DB6) { + phi_v1 = func_800554E8(i, arg0); + } else { + phi_v1 = func_800554A4(i); + } + + if (phi_v1 != 0) { + break; + } + } + return phi_v1; +} + +s32 func_80055848(s32 arg0) { + s32 lim = 4; + s32 phi_v1 = 0; + + if (arg0 != D_80078DB6) { + u32 i; + + for (i = 0; i < lim; i++) { + if (i == arg0) { + phi_v1 = func_80055718(arg0); + } else { + phi_v1 = func_800556D0(i); + } + + if (phi_v1 != 0) { + break; + } + } + + if (phi_v1 == 0) { + D_80078DB6 = arg0; + } + } + + return phi_v1; +} + +INCLUDE_ASM(s32, "code_30450", func_800558D4); + +INCLUDE_ASM(s32, "code_30450", func_8005591C); + +INCLUDE_ASM(s32, "code_30450", func_80055970); + +s32 func_800559C4(UNK_TYPE arg0) { + return func_8004DA0C(arg0); +} + +void func_800559E0(void) { + func_8004DA74(); +} + +void func_800559FC(void) { + func_8004DAE0(); +} + +INCLUDE_ASM(s32, "code_30450", func_80055A18); + +INCLUDE_ASM(s32, "code_30450", func_80055A6C); + +INCLUDE_ASM(s32, "code_30450", func_80055ABC); + +INCLUDE_ASM(s32, "code_30450", func_80055AF0); + +INCLUDE_ASM(s32, "code_30450", func_80055B28); + +INCLUDE_ASM(s32, "code_30450", func_80055B80); + +INCLUDE_ASM(s32, "code_30450", func_80055BB8); + +INCLUDE_ASM(s32, "code_30450", func_80055BF0); + +INCLUDE_ASM(s32, "code_30450", func_80055C2C); + +INCLUDE_ASM(s32, "code_30450", func_80055C64); + +INCLUDE_ASM(s32, "code_30450", func_80055C94); + +INCLUDE_ASM(s32, "code_30450", func_80055CC4); + +INCLUDE_ASM(s32, "code_30450", func_80055CE8); + +INCLUDE_ASM(s32, "code_30450", func_80055D38); + +INCLUDE_ASM(s32, "code_30450", func_80055D8C); + +INCLUDE_ASM(s32, "code_30450", func_80055DDC); + +INCLUDE_ASM(s32, "code_30450", func_80055E48); + +// needs rodata +#ifdef NON_MATCHING +s32* func_80055EB4(s32 arg0) { + s32* ret = NULL; + + switch (arg0) { + case 0: + ret = &D_80078DB8; + break; + case 1: + ret = &D_80078DC4; + break; + case 2: + ret = &D_80078DCC; + break; + case 3: + ret = &D_80078DD0; + break; + case 4: + ret = &D_80078DDC; + break; + case 5: + ret = &D_80078DF8; + break; + case 6: + ret = &D_80078E14; + break; + case 7: + ret = &D_80078E30; + break; + } + + return ret; +} +#else +INCLUDE_ASM(s32, "code_30450", func_80055EB4); +#endif + +s32 func_80055F58(s32 arg0, u32 arg1, u32 arg2) { + s32* subroutine_arg4; + s32* subroutine_arg5; + s32 temp_s2 = func_80055CE8(arg0, &subroutine_arg4, &subroutine_arg5); + + if (temp_s2 == 0) { + if (arg2 > 0x7F) { + arg2 = 0x7F; + } + if (arg1 > 0xF) { + arg1 = 0xF; + } + func_8005083C(subroutine_arg5, arg1, 0x60, (u8)arg2); // todo remove cast when func is defined + } + return temp_s2; +} + +s32 func_80055FD4(s32 arg0, s32 arg1) { + return func_80055F58(arg0, arg1, 0); +} + +s32 func_80055FF0(s32 arg0, s32 arg1) { + return func_80055F58(arg0, arg1, 0x3F); +} + +s32 func_8005600C(s32 arg0, s32 arg1) { + return func_80055F58(arg0, arg1, 0x7F); +} + +s32 func_80056028(s32 arg0, u8 arg1) { + return func_800506C8(arg0, arg1); +} + +s32 func_80056044(s32 arg0, u8 arg1) { + return func_800506C8(arg0, arg1 | 0x57000000); +} + +s32 func_80056068(s32 arg0, u8 arg1) { + return func_800506C8(arg0, arg1 | 0x7F000000); +} + +void func_8005608C(s32* arg0, s32* arg1) { + UnkAl19E0* temp_v0 = D_8009A5C0; + + *arg0 = temp_v0->unk_94; + *arg1 = temp_v0->unk_98; +} + +void func_800560A8(void) { + D_8009A5C0->unk_9C = 1; +} + +INCLUDE_ASM(s32, "code_30450", func_800560BC); + +INCLUDE_ASM(void, "code_30450", func_8005610C, void); + +void func_80056144(UnkFuncAl arg0, s32 arg1) { + D_8009A5C0->unk_A4[arg1] = arg0; +} + +void func_8005615C(void) { + func_80056D5C(1); + func_80054DA8(0); +} + +void func_80056180(void) { + func_80056D5C(0); + func_80054DA8(1); +} + +void func_800561A4(s32 arg0) { + func_80054CE0(1, arg0); +} + +void func_800561C4(s32 arg0) { + func_80054CE0(16, arg0); +} + +void func_800561E4(s32 arg0) { + func_80054D74(16, arg0); +} + +void func_80056204(void) { + func_8004BA54(D_8009A640, 0); +} + +void func_80056228(void) { + func_8004BA54(D_8009A640, 1); +} diff --git a/src/code_31650.c b/src/code_31650.c index 7a03bc9b01..b549618c5f 100644 --- a/src/code_31650.c +++ b/src/code_31650.c @@ -233,9 +233,3 @@ void func_80057FD8(u8* src, u8* dst, s32 size) { } INCLUDE_ASM(s32, "code_31650", func_80058004); - -INCLUDE_ASM(s32, "code_31650", func_80058050); - -INCLUDE_ASM(s32, "code_31650", func_80058B20); - -INCLUDE_ASM(s32, "code_31650", func_80058C6C); diff --git a/src/code_33450.c b/src/code_33450.c new file mode 100644 index 0000000000..1fe6d2f79e --- /dev/null +++ b/src/code_33450.c @@ -0,0 +1,7 @@ +#include "common.h" + +INCLUDE_ASM(s32, "code_33450", func_80058050); + +INCLUDE_ASM(s32, "code_33450", func_80058B20); + +INCLUDE_ASM(s32, "code_33450", func_80058C6C); diff --git a/src/code_3CF80.c b/src/code_3CF80.c new file mode 100644 index 0000000000..54468a7e3f --- /dev/null +++ b/src/code_3CF80.c @@ -0,0 +1,7 @@ +#include "common.h" + +INCLUDE_ASM(s32, "code_3CF80", osContInit, OSMesgQueue* arg0, u8* arg1, OSContStatus* arg2); + +INCLUDE_ASM(s32, "code_3CF80", osContGetInitData); + +INCLUDE_ASM(s32, "code_3CF80", osPackRequestData); diff --git a/src/code_3FEA0.c b/src/code_3FEA0.c new file mode 100644 index 0000000000..9369d74276 --- /dev/null +++ b/src/code_3FEA0.c @@ -0,0 +1,9 @@ +#include "common.h" + +INCLUDE_ASM(s32, "code_3FEA0", _Printf); + +INCLUDE_ASM(s32, "code_3FEA0", _Putfld); + +INCLUDE_ASM(int, "code_3FEA0", sprintf, char* s, const char* fmt, ...); + +INCLUDE_ASM(s32, "code_3FEA0", proutSprintf); diff --git a/src/code_40E10.c b/src/code_40E10.c new file mode 100644 index 0000000000..ab0648719c --- /dev/null +++ b/src/code_40E10.c @@ -0,0 +1,5 @@ +#include "common.h" + +INCLUDE_ASM(void, "code_40E10", osSpTaskLoad, OSTask* tp); + +INCLUDE_ASM(void, "code_40E10", osSpTaskStartGo, OSTask* tp); diff --git a/src/code_41880.c b/src/code_41880.c new file mode 100644 index 0000000000..5c2fb083e5 --- /dev/null +++ b/src/code_41880.c @@ -0,0 +1,9 @@ +#include "common.h" + +INCLUDE_ASM(s32, "code_41880", osTimerServicesInit); + +INCLUDE_ASM(s32, "code_41880", osTimerInterrupt); + +INCLUDE_ASM(s32, "code_41880", osSetTimerIntr); + +INCLUDE_ASM(s32, "code_41880", osInsertTimer); diff --git a/src/code_43590.c b/src/code_43590.c new file mode 100644 index 0000000000..f5cf5e4732 --- /dev/null +++ b/src/code_43590.c @@ -0,0 +1,6 @@ +#include "common.h" + +INCLUDE_ASM(s32, "code_43590", osPfsAllocateFile, OSPfs* pfs, u16 unk1, u32 unk2, u8* unk3, u8* unk4, + int unk5, s32* unk6); + +INCLUDE_ASM(s32, "code_43590", osPfsDeclearPage); diff --git a/src/code_44490.c b/src/code_44490.c new file mode 100644 index 0000000000..d20d0dad30 --- /dev/null +++ b/src/code_44490.c @@ -0,0 +1,7 @@ +#include "common.h" + +INCLUDE_ASM(s32, "code_44490", osPfsNumFiles, OSPfs* pfs, s32* unk1, s32* unk2); + +INCLUDE_ASM(s32, "code_44490", osPfsInitPak, OSMesgQueue* queue, OSPfs* pfs, int unk1); + +INCLUDE_ASM(s32, "code_44490", osPfsCheckRamArea); diff --git a/src/os/code_3b390_len_110.c b/src/os/code_3b390_len_110.c deleted file mode 100644 index 9163cf304c..0000000000 --- a/src/os/code_3b390_len_110.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "os/code_3b390_len_110", nuContRmbModeSet); diff --git a/src/os/code_3b4a0_len_270.c b/src/os/code_3b4a0_len_270.c deleted file mode 100644 index 9e8a0ae387..0000000000 --- a/src/os/code_3b4a0_len_270.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuContRmbForceStop); - -INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuContRmbForceStopEnd); - -INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuPiReadRomOverlay); - -INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuGfxThreadStart); - -INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuGfxThread); diff --git a/src/os/code_3cd00_len_5f0.c b/src/os/code_3cd00_len_5f0.c index abdaf89721..fcd23ad7e7 100644 --- a/src/os/code_3cd00_len_5f0.c +++ b/src/os/code_3cd00_len_5f0.c @@ -9,11 +9,3 @@ INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osContStartReadData, OSMesgQueue* queu INCLUDE_ASM(void, "os/code_3cd00_len_5f0", osContGetReadData, OSContPad* pad); INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osPackReadData); - -INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osContInit, OSMesgQueue* queue, u8* unk, OSContStatus* status); - -INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osContGetInitData); - -INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osPackRequestData); - -INCLUDE_ASM(u32, "os/code_3cd00_len_5f0", osVirtualToPhysical, void* virt); diff --git a/src/os/code_3d330_len_990.c b/src/os/code_3d330_len_990.c deleted file mode 100644 index 49137d6d60..0000000000 --- a/src/os/code_3d330_len_990.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(void, "os/code_3d330_len_990", guFrustumF, float mf[4][4], float l, float r, float b, float t, float n, - float f, float scale); - -INCLUDE_ASM(void, "os/code_3d330_len_990", guFrustum, Mtx* m, float l, float r, float b, float t, float n, float f, - float scale); - -INCLUDE_ASM(void, "os/code_3d330_len_990", guLookAtF, float mf[4][4], float xEye, float yEye, float zEye, float xAt, - float yAt, float zAt, float xUp, float yUp, float zUp); - -INCLUDE_ASM(void, "os/code_3d330_len_990", guLookAt, Mtx* m, float xEye, float yEye, float zEye, float xAt, float yAt, - float zAt, float xUp, float yUp, float zUp); diff --git a/src/os/code_3fa50_len_f60.c b/src/os/code_3fa50_len_f60.c index 8758333659..7162a73909 100644 --- a/src/os/code_3fa50_len_f60.c +++ b/src/os/code_3fa50_len_f60.c @@ -9,13 +9,3 @@ INCLUDE_ASM(s32, "os/code_3fa50_len_f60", strchr); INCLUDE_ASM(s32, "os/code_3fa50_len_f60", strlen); INCLUDE_ASM(s32, "os/code_3fa50_len_f60", memcpy); - -INCLUDE_ASM(s32, "os/code_3fa50_len_f60", _Printf); - -INCLUDE_ASM(s32, "os/code_3fa50_len_f60", _Putfld); - -INCLUDE_ASM(int, "os/code_3fa50_len_f60", sprintf, char* s, const char* fmt, ...); - -INCLUDE_ASM(s32, "os/code_3fa50_len_f60", proutSprintf); - -INCLUDE_ASM(void, "os/code_3fa50_len_f60", osCreateMesgQueue, OSMesgQueue* queue, OSMesg* mesg, s32 unk); diff --git a/src/os/code_40E10.c b/src/os/code_40E10.c new file mode 100644 index 0000000000..142cf0773c --- /dev/null +++ b/src/os/code_40E10.c @@ -0,0 +1,5 @@ +#include "common.h" + +INCLUDE_ASM(void, "os/code_40E10", osSpTaskLoad, OSTask* tp); + +INCLUDE_ASM(void, "os/code_40E10", osSpTaskStartGo, OSTask* tp); diff --git a/src/os/code_40c20_len_1f0.c b/src/os/code_40c20_len_1f0.c index bda8480ade..3251efda3c 100644 --- a/src/os/code_40c20_len_1f0.c +++ b/src/os/code_40c20_len_1f0.c @@ -3,5 +3,3 @@ INCLUDE_ASM(s32, "os/code_40c20_len_1f0", osSendMesg, OSMesgQueue* queue, OSMesg mesg, s32 unk); INCLUDE_ASM(void, "os/code_40c20_len_1f0", osSetEventMesg, OSEvent event, OSMesgQueue* queue, OSMesg mesg); - -INCLUDE_ASM(u32, "os/code_40c20_len_1f0", osGetCount, void); diff --git a/src/os/code_40e10_len_240.c b/src/os/code_40e10_len_240.c deleted file mode 100644 index dafec23b7a..0000000000 --- a/src/os/code_40e10_len_240.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "common.h" - -INCLUDE_ASM(void, "os/code_40e10_len_240", osSpTaskLoad, OSTask* tp); - -INCLUDE_ASM(void, "os/code_40e10_len_240", osSpTaskStartGo, OSTask* tp); diff --git a/src/os/code_41050_len_120.c b/src/os/code_41050_len_120.c index dd945c2990..ca86eaeb0a 100644 --- a/src/os/code_41050_len_120.c +++ b/src/os/code_41050_len_120.c @@ -1,7 +1,3 @@ #include "common.h" INCLUDE_ASM(void, "os/code_41050_len_120", osSpTaskYield, void); - -INCLUDE_ASM(OSYieldResult, "os/code_41050_len_120", osSpTaskYielded, OSTask* tp); - -INCLUDE_ASM(s32, "os/code_41050_len_120", osSiRawStartDma); diff --git a/src/os/code_41750_len_450.c b/src/os/code_41750_len_450.c index 14d1c6e331..7cd2939c44 100644 --- a/src/os/code_41750_len_450.c +++ b/src/os/code_41750_len_450.c @@ -2,11 +2,3 @@ INCLUDE_ASM(int, "os/code_41750_len_450", osSetTimer, OSTimer* timer, OSTime start, OSTime end, OSMesgQueue* queue, OSMesg mesg); - -INCLUDE_ASM(s32, "os/code_41750_len_450", osTimerServicesInit); - -INCLUDE_ASM(s32, "os/code_41750_len_450", osTimerInterrupt); - -INCLUDE_ASM(s32, "os/code_41750_len_450", osSetTimerIntr); - -INCLUDE_ASM(s32, "os/code_41750_len_450", osInsertTimer); diff --git a/src/os/code_42780_len_120.c b/src/os/code_42780_len_120.c index ddad57fbe6..3326616e99 100644 --- a/src/os/code_42780_len_120.c +++ b/src/os/code_42780_len_120.c @@ -1,7 +1,3 @@ #include "common.h" INCLUDE_ASM(void, "os/code_42780_len_120", osViBlack, u8 unk); - -INCLUDE_ASM(void, "os/code_42780_len_120", osViRepeatLine, u8 unk); - -INCLUDE_ASM(void, "os/code_42780_len_120", guMtxIdent, Mtx* m); diff --git a/src/os/code_42e70_len_390.c b/src/os/code_42e70_len_390.c index 64574a8977..46e0a42925 100644 --- a/src/os/code_42e70_len_390.c +++ b/src/os/code_42e70_len_390.c @@ -2,7 +2,3 @@ INCLUDE_ASM(void, "os/code_42e70_len_390", guMtxXFMF, float mf[4][4], float x, float y, float z, float* ox, float* oy, float* oz); - -INCLUDE_ASM(void, "os/code_42e70_len_390", guRotateF, float mf[4][4], float a, float x, float y, float z); - -INCLUDE_ASM(void, "os/code_42e70_len_390", guRotate, Mtx* m, float a, float x, float y, float z); diff --git a/src/os/code_43200_len_7c0.c b/src/os/code_43200_len_7c0.c index 1f8faaec1a..82ebd410c3 100644 --- a/src/os/code_43200_len_7c0.c +++ b/src/os/code_43200_len_7c0.c @@ -3,8 +3,3 @@ INCLUDE_ASM(s32, "os/code_43200_len_7c0", __osMotorAccess, OSPfs* pfs, s32 unk); INCLUDE_ASM(s32, "os/code_43200_len_7c0", osMotorInit, OSMesgQueue* queue, OSPfs* pfs, int unk); - -INCLUDE_ASM(s32, "os/code_43200_len_7c0", osPfsAllocateFile, OSPfs* pfs, u16 unk1, u32 unk2, u8* unk3, u8* unk4, - int unk5, s32* unk6); - -INCLUDE_ASM(s32, "os/code_43200_len_7c0", osPfsDeclearPage); diff --git a/src/os/code_44380_len_4e0.c b/src/os/code_44380_len_4e0.c index a95c787054..6f375b3b5b 100644 --- a/src/os/code_44380_len_4e0.c +++ b/src/os/code_44380_len_4e0.c @@ -1,9 +1,3 @@ #include "common.h" INCLUDE_ASM(s32, "os/code_44380_len_4e0", osPfsFreeBlocks, OSPfs* pfs, s32* unk1); - -INCLUDE_ASM(s32, "os/code_44380_len_4e0", osPfsNumFiles, OSPfs* pfs, s32* unk1, s32* unk2); - -INCLUDE_ASM(s32, "os/code_44380_len_4e0", osPfsInitPak, OSMesgQueue* queue, OSPfs* pfs, int unk1); - -INCLUDE_ASM(s32, "os/code_44380_len_4e0", osPfsCheckRamArea); diff --git a/src/os/code_46c70_len_e00.c b/src/os/code_46c70_len_e00.c index c3cc957ad0..f164425340 100644 --- a/src/os/code_46c70_len_e00.c +++ b/src/os/code_46c70_len_e00.c @@ -9,5 +9,3 @@ INCLUDE_ASM(s32, "os/code_46c70_len_e00", _Ldtob); INCLUDE_ASM(s32, "os/code_46c70_len_e00", _Ldunscale); INCLUDE_ASM(s32, "os/code_46c70_len_e00", _Genld); - -INCLUDE_ASM(s32, "os/code_46c70_len_e00", osGetCause); diff --git a/src/os/guFrustum.c b/src/os/guFrustum.c new file mode 100644 index 0000000000..9e4cddf9cf --- /dev/null +++ b/src/os/guFrustum.c @@ -0,0 +1,7 @@ +#include "common.h" + +INCLUDE_ASM(void, "os/guFrustum", guFrustumF, float mf[4][4], float l, float r, float b, float t, float n, + float f, float scale); + +INCLUDE_ASM(void, "os/guFrustum", guFrustum, Mtx* m, float l, float r, float b, float t, float n, float f, + float scale); diff --git a/src/os/guLookAt.c b/src/os/guLookAt.c new file mode 100644 index 0000000000..63e8423b3d --- /dev/null +++ b/src/os/guLookAt.c @@ -0,0 +1,7 @@ +#include "common.h" + +INCLUDE_ASM(void, "os/guLookAt", guLookAtF, float mf[4][4], float xEye, float yEye, float zEye, float xAt, + float yAt, float zAt, float xUp, float yUp, float zUp); + +INCLUDE_ASM(void, "os/guLookAt", guLookAt, Mtx* m, float xEye, float yEye, float zEye, float xAt, float yAt, + float zAt, float xUp, float yUp, float zUp); diff --git a/src/os/guMtxIdent.c b/src/os/guMtxIdent.c new file mode 100644 index 0000000000..d5f4bedcb5 --- /dev/null +++ b/src/os/guMtxIdent.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(void, "os/guMtxIdent", guMtxIdent, Mtx* m); diff --git a/src/os/guRotate.c b/src/os/guRotate.c new file mode 100644 index 0000000000..a652b1f269 --- /dev/null +++ b/src/os/guRotate.c @@ -0,0 +1,5 @@ +#include "common.h" + +INCLUDE_ASM(void, "os/guRotate", guRotateF, float mf[4][4], float a, float x, float y, float z); + +INCLUDE_ASM(void, "os/guRotate", guRotate, Mtx* m, float a, float x, float y, float z); diff --git a/src/os/nusys/code_3B4A0.c b/src/os/nusys/code_3B4A0.c new file mode 100644 index 0000000000..a89294ebbe --- /dev/null +++ b/src/os/nusys/code_3B4A0.c @@ -0,0 +1,7 @@ +#include "common.h" + +INCLUDE_ASM(s32, "os/nusys/code_3B4A0", nuContRmbForceStop); + +INCLUDE_ASM(s32, "os/nusys/code_3B4A0", nuContRmbForceStopEnd); + +INCLUDE_ASM(s32, "os/nusys/code_3B4A0", nuPiReadRomOverlay); diff --git a/src/os/nusys/nuContRmbModeSet.c b/src/os/nusys/nuContRmbModeSet.c new file mode 100644 index 0000000000..c9d28a8243 --- /dev/null +++ b/src/os/nusys/nuContRmbModeSet.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(s32, "os/nusys/nuContRmbModeSet", nuContRmbModeSet); diff --git a/src/os/nusys/nuGfxThread.c b/src/os/nusys/nuGfxThread.c new file mode 100644 index 0000000000..eaa6d8a345 --- /dev/null +++ b/src/os/nusys/nuGfxThread.c @@ -0,0 +1,5 @@ +#include "common.h" + +INCLUDE_ASM(s32, "os/nusys/nuGfxThread", nuGfxThreadStart); + +INCLUDE_ASM(s32, "os/nusys/nuGfxThread", nuGfxThread); diff --git a/src/os/osCreateMesgQueue.c b/src/os/osCreateMesgQueue.c new file mode 100644 index 0000000000..8ea2baa205 --- /dev/null +++ b/src/os/osCreateMesgQueue.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(void, "os/osCreateMesgQueue", osCreateMesgQueue, OSMesgQueue* queue, OSMesg* mesg, s32 unk); diff --git a/src/os/osSiRawStartDma.c b/src/os/osSiRawStartDma.c new file mode 100644 index 0000000000..3c2c534df8 --- /dev/null +++ b/src/os/osSiRawStartDma.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(s32, "os/osSiRawStartDma", osSiRawStartDma); diff --git a/src/os/osSpTaskYield.c b/src/os/osSpTaskYield.c new file mode 100644 index 0000000000..fb5f39de37 --- /dev/null +++ b/src/os/osSpTaskYield.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(void, "os/osSpTaskYield", osSpTaskYield); diff --git a/src/os/osSpTaskYielded.c b/src/os/osSpTaskYielded.c new file mode 100644 index 0000000000..cbf589f726 --- /dev/null +++ b/src/os/osSpTaskYielded.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(OSYieldResult, "os/osSpTaskYielded", osSpTaskYielded, OSTask* tp); diff --git a/src/os/osViRepeatLine.c b/src/os/osViRepeatLine.c new file mode 100644 index 0000000000..e8f2e3b599 --- /dev/null +++ b/src/os/osViRepeatLine.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(void, "os/osViRepeatLine", osViRepeatLine, u8 unk); diff --git a/src/os/osVirtualToPhysical.c b/src/os/osVirtualToPhysical.c new file mode 100644 index 0000000000..ab2deaa706 --- /dev/null +++ b/src/os/osVirtualToPhysical.c @@ -0,0 +1,3 @@ +#include "common.h" + +INCLUDE_ASM(u32, "os/osVirtualToPhysical", osVirtualToPhysical, void* virt); diff --git a/tools/splat.yaml b/tools/splat.yaml index 0af73c0658..e64260b2d0 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -66,7 +66,9 @@ segments: - [0x2d9a0, c, code_2d9a0_len_890] - [0x2e230, c, code_2e230_len_2190] - [0x303c0, c, code_303c0_len_3e10] + - [0x30450, c] - [0x31650, c, code_31650] + - [0x33450, c] - [0x341d0, c, code_341d0] - [0x35ac0, c, world/world] - [0x362a0, c, code_362a0_len_2f70] @@ -88,8 +90,9 @@ segments: - [0x3af10, c, os/nusys/nuContRmbMgr] - [0x3b290, c, os/nusys/nuContRmbStart] - [0x3b2f0, c, os/nusys/nuContRmbCheck] - - [0x3b390, c, os/code_3b390_len_110] - - [0x3b4a0, c, os/code_3b4a0_len_270] + - [0x3b390, c, os/nusys/nuContRmbModeSet] + - [0x3b4a0, c, os/nusys/code_3B4A0] + - [0x3B5F0, c, os/nusys/nuGfxThread] - [0x3b710, c, os/code_3b710_len_40] - [0x3b750, c, os/code_3b750_len_20] - [0x3b770, c, os/code_3b770_len_80] @@ -111,9 +114,12 @@ segments: - [0x3cc50, c, os/code_3cc50_len_80] - [0x3ccd0, c, os/code_3ccd0_len_30] - [0x3cd00, c, os/code_3cd00_len_5f0] + - [0x3CF80, c] + - [0x3D290, c, os/osVirtualToPhysical] - [0x3d2f0, c, os/code_3d2f0_len_10] - [0x3d300, c, os/code_3d300_len_30] - - [0x3d330, c, os/code_3d330_len_990] + - [0x3d330, c, os/guFrustum] + - [0x3D5B0, c, os/guLookAt] - [0x3dcc0, c, os/code_3dcc0_len_a60] - [0x3e720, c, os/code_3e720_len_5f0] - [0x3ed10, c, os/guOrtho] @@ -122,11 +128,16 @@ segments: - [0x3f6d0, c, os/code_3f6d0_len_320] - [0x3f9f0, c, os/code_3f9f0_len_60] - [0x3fa50, c, os/code_3fa50_len_f60] + - [0x3FEA0, c] + - [0x40980, c, os/osCreateMesgQueue] - [0x409b0, c, os/code_409b0_len_140] - [0x40af0, c, os/code_40af0_len_130] - [0x40c20, c, os/code_40c20_len_1f0] - - [0x40e10, c, os/code_40e10_len_240] - - [0x41050, c, os/code_41050_len_120] + - [0x40E00, hasm, os/osGetCount] + - [0x40E10, c] + - [0x41050, c, os/osSpTaskYield] + - [0x41070, c, os/osSpTaskYielded] + - [0x410C0, c, os/osSiRawStartDma] - [0x41170, c, os/code_41170_len_f0] - [0x41260, c, os/osCreateThread] - [0x41330, c, os/osGetThreadPri] @@ -139,6 +150,7 @@ segments: - [0x416a0, c, os/code_416a0_len_90] - [0x41730, c, os/code_41730_len_20] - [0x41750, c, os/code_41750_len_450] + - [0x41880, c] - [0x41ba0, c, os/code_41ba0_len_c0] - [0x41c60, c, os/code_41c60_len_c0] - [0x41d20, c, os/code_41d20_len_40] @@ -154,6 +166,8 @@ segments: - [0x42420, c, os/code_42420_len_50] - [0x42470, c, os/code_42470_len_310] - [0x42780, c, os/code_42780_len_120] + - [0x427E0, c, os/osViRepeatLine] + - [0x42840, c, os/guMtxIdent] - [0x428a0, c, os/guMtxIdentF] - [0x42900, c, os/code_42900_len_80] - [0x42980, c, os/code_42980_len_80] @@ -165,11 +179,14 @@ segments: - [0x42d60, c, os/code_42d60_len_80] - [0x42de0, c, os/code_42de0_len_90] - [0x42e70, c, os/code_42e70_len_390] + - [0x42F20, c, os/guRotate] - [0x43200, c, os/code_43200_len_7c0] + - [0x43590, c] - [0x439c0, c, os/code_439c0_len_220] - [0x43be0, c, os/code_43be0_len_5e0] - [0x441c0, c, os/code_441c0_len_1c0] - [0x44380, c, os/code_44380_len_4e0] + - [0x44490, c] - [0x44860, c, os/code_44860_len_60] - [0x448c0, c, os/code_448c0_len_210] - [0x44ad0, c, os/code_44ad0_len_70] @@ -186,6 +203,7 @@ segments: - [0x46ae0, c, os/code_46ae0_len_170] - [0x46c50, c, os/code_46c50_len_20] - [0x46c70, c, os/code_46c70_len_e00] + - [0x47A60, hasm, os/__osGetCause] - [0x47a70, c, os/code_47a70_len_10] - [0x47a80, c, os/code_47a80_len_10] - [0x47a90, c, os/code_47a90_len_50] @@ -214,7 +232,7 @@ segments: - [0x4F9D0, data, code_6240_len_c00] - [0x53570, .data, code_25f00_len_940] - [0x53590, data, code_26840_len_20d0] - - [0x541B0, .data, code_303c0_len_3e10] + - [0x541B0, .data, code_30450] - [0x54250, .data, code_31650] - [0x542E0, data, code_31650] - [0x6B450, .data, world/world] diff --git a/tools/symbol_addrs.txt b/tools/symbol_addrs.txt index c9d0aa9e7b..2daca346a4 100644 --- a/tools/symbol_addrs.txt +++ b/tools/symbol_addrs.txt @@ -513,7 +513,7 @@ _Litob = 0x8006B980; // type:func rom:0x46D80 _Ldtob = 0x8006BBD0; // type:func rom:0x46FD0 _Ldunscale = 0x8006C01C; // type:func rom:0x4741C _Genld = 0x8006C0B4; // type:func rom:0x474B4 -osGetCause = 0x8006C660; // type:func rom:0x47A60 +__osGetCause = 0x8006C660; // type:func rom:0x47A60 osGetSR = 0x8006C670; // type:func rom:0x47A70 osSetCompare = 0x8006C680; // type:func rom:0x47A80 osSetFpcCsr = 0x8006C690; // type:func rom:0x47A90 diff --git a/undefined_syms_auto.txt b/undefined_syms_auto.txt index a84850d546..98aed7c9ae 100644 --- a/undefined_syms_auto.txt +++ b/undefined_syms_auto.txt @@ -1,10 +1,17 @@ osTvType = 0x80000300; osExceptionPreamble = 0x8006AA00; +nuAuPreNMIFunc = 0x80078174; +nuAuDmaNext = 0x80078178; +nuAuFrameCounter = 0x8007817C; +D_80078DB0 = 0x80078DB0; +D_80078DB4 = 0x80078DB4; +gAreas = 0x800934F0; nuAuDmaState = 0x800A3BD0; nuAuDmaBuf = 0x800A3BE0; gCurrentEncounter = 0x800B0F10; gBattleState = 0x800DC068; gBattleStatus = 0x800DC070; +gBattleAreas = 0x80095A30; gPartnerAnimations = 0x800F8348; gPlayerStatus = 0x8010EFC8; gPlayerData = 0x8010F290; @@ -20,8 +27,6 @@ gMusicPlayers = 0x80159AF0; gCollisionStatus = 0x8015A550; MultiplyVec3ByActorScale = 0x802540DC; gPauseMenuStrings = 0x8026F778; -EnterWalk = 0x80285960; -ExitWalk = 0x80285CF4; gSpeakingActorPrintCtx = 0x8029FA60; D_8029FA64 = 0x8029FA64; gSpeakingActorPrintIsDone = 0x8029FA68; @@ -90,6 +95,9 @@ func_802AA014 = 0x802AA014; func_802AA0D8 = 0x802AA0D8; func_802B71E8 = 0x802B71E8; func_802BE070 = 0x802BE070; +gStaticScriptCounter = 0x802D9CA0; +gIsUpdatingScripts = 0x802D9CA4; +gGlobalTimeSpace = 0x802D9CA8; gBattleMeshAnimationList = 0x802DADB0; gWorldMeshAnimationList = 0x802DADF0; gCurrentMeshAnimationListPtr = 0x802DAE30; @@ -192,6 +200,7 @@ gScriptIndexList = 0x802DA898; gScriptIdList = 0x802DAA98; gScriptListCount = 0x802DAC98; gCurrentPrintContext = 0x802DB260; +gRandSeed = 0x80074410; gSpriteHeapPtr = 0x8034F800; D_A4700000 = 0xA4700000; D_A4300000 = 0xA4300000; @@ -230,6 +239,26 @@ D_8009A6A2 = 0x8009A6A2; D_8009A6A4 = 0x8009A6A4; D_8009A6A6 = 0x8009A6A6; D_8009A5B8 = 0x8009A5B8; +D_80074260 = 0x80074260; +D_80074264 = 0x80074264; +D_80074270 = 0x80074270; +D_80074274 = 0x80074274; +D_800743E0 = 0x800743E0; +D_80074414 = 0x80074414; +D_80097D60 = 0x80097D60; +D_80097D68 = 0x80097D68; +D_80097D70 = 0x80097D70; +D_80097D78 = 0x80097D78; +D_80097D80 = 0x80097D80; +D_80097D88 = 0x80097D88; +jtbl_80097D90 = 0x80097D90; +D_80097DC8 = 0x80097DC8; +D_80097DD0 = 0x80097DD0; +D_80097DD8 = 0x80097DD8; +D_80097DE0 = 0x80097DE0; +D_80097DE8 = 0x80097DE8; +D_80097DF0 = 0x80097DF0; +D_80074580 = 0x80074580; D_802FB800 = 0x802FB800; D_803DA800 = 0x803DA800; D_80268000 = 0x80268000; @@ -374,6 +403,8 @@ D_801089C4 = 0x801089C4; D_80108A14 = 0x80108A14; D_800D9248 = 0x800D9248; D_801AA000 = 0x801AA000; +D_80078180 = 0x80078180; +D_80078170 = 0x80078170; D_800DAAB8 = 0x800DAAB8; D_800A3510 = 0x800A3510; D_800A3634 = 0x800A3634; @@ -395,15 +426,31 @@ D_8009A5FC = 0x8009A5FC; D_800A3FD0 = 0x800A3FD0; D_8009A628 = 0x8009A628; D_8009A5C0 = 0x8009A5C0; +D_80078E54 = 0x80078E54; D_8009A5CC = 0x8009A5CC; D_8009A640 = 0x8009A640; D_8009A5E8 = 0x8009A5E8; +D_80078DB6 = 0x80078DB6; +D_80078DB8 = 0x80078DB8; +D_80078DC4 = 0x80078DC4; +D_80078DCC = 0x80078DCC; +D_80078DD0 = 0x80078DD0; +D_80078DDC = 0x80078DDC; +D_80078DF8 = 0x80078DF8; +D_80078E14 = 0x80078E14; +D_80078E30 = 0x80078E30; +D_80078E50 = 0x80078E50; +D_80078E58 = 0x80078E58; +D_80078E5A = 0x80078E5A; +D_80078E5C = 0x80078E5C; D_800A3FEC = 0x800A3FEC; D_800A3FEE = 0x800A3FEE; D_800A3FF0 = 0x800A3FF0; D_800A3FE0 = 0x800A3FE0; D_800A3FE4 = 0x800A3FE4; D_800A3FE8 = 0x800A3FE8; +D_80078181 = 0x80078181; +D_80078E60 = 0x80078E60; D_800A41C0 = 0x800A41C0; D_800B4514 = 0x800B4514; D_E0200000 = 0xE0200000; @@ -412,7 +459,10 @@ D_800A4000 = 0x800A4000; D_800B4398 = 0x800B4398; D_80197000 = 0x80197000; D_80280000 = 0x80280000; +D_80098A10 = 0x80098A10; D_800D91E0 = 0x800D91E0; +D_80098A1C = 0x80098A1C; +D_80098A24 = 0x80098A24; D_800A41E0 = 0x800A41E0; D_800D9668 = 0x800D9668; D_800A41E8 = 0x800A41E8; @@ -535,6 +585,10 @@ D_800B0D08 = 0x800B0D08; D_A4300008 = 0xA4300008; D_A4400010 = 0xA4400010; D_80000308 = 0x80000308; +D_80099E40 = 0x80099E40; +D_80099F40 = 0x80099F40; +D_8009A040 = 0x8009A040; +D_8009A140 = 0x8009A140; D_800B0C7C = 0x800B0C7C; D_800B0C74 = 0x800B0C74; D_800B0C75 = 0x800B0C75; @@ -556,6 +610,8 @@ D_800B0C50 = 0x800B0C50; D_800B0C40 = 0x800B0C40; D_800DC064 = 0x800DC064; D_800DC060 = 0x800DC060; +jtbl_8009A578 = 0x8009A578; +jtbl_8009A590 = 0x8009A590; D_8010C970 = 0x8010C970; D_8010C94C = 0x8010C94C; D_8010C974 = 0x8010C974; @@ -797,6 +853,9 @@ D_80151668 = 0x80151668; D_801516E8 = 0x801516E8; D_8015C7D8 = 0x8015C7D8; D_8015C7D0 = 0x8015C7D0; +D_802E98BC = 0x802E98BC; +D_802E9904 = 0x802E9904; +D_802E98E0 = 0x802E98E0; D_8015A590 = 0x8015A590; D_80153264 = 0x80153264; D_80153268 = 0x80153268; @@ -974,14 +1033,25 @@ D_8015690B = 0x8015690B; D_8015C790 = 0x8015C790; D_8015C7A4 = 0x8015C7A4; D_8015C7A8 = 0x8015C7A8; +D_8014EE60 = 0x8014EE60; D_80156948 = 0x80156948; D_80156958 = 0x80156958; D_80156970 = 0x80156970; D_80156968 = 0x80156968; D_80156960 = 0x80156960; D_80156F20 = 0x80156F20; +D_8014EE14 = 0x8014EE14; D_80156950 = 0x80156950; +D_8014EE10 = 0x8014EE10; +D_8014EE68 = 0x8014EE68; +D_8014EE98 = 0x8014EE98; +D_8014EE18 = 0x8014EE18; +D_8014EF64 = 0x8014EF64; D_80156980 = 0x80156980; +D_8014EE50 = 0x8014EE50; +D_8014EE40 = 0x8014EE40; +D_8014EFCC = 0x8014EFCC; +D_8014EFC4 = 0x8014EFC4; D_F1FFFFFF = 0xF1FFFFFF; D_E1000010 = 0xE1000010; D_80156F60 = 0x80156F60; @@ -994,14 +1064,21 @@ D_80158574 = 0x80158574; D_80158580 = 0x80158580; D_80158B80 = 0x80158B80; D_80157964 = 0x80157964; +D_8014EFC0 = 0x8014EFC0; D_80158570 = 0x80158570; D_801512B4 = 0x801512B4; D_80159180 = 0x80159180; +D_8014EFC8 = 0x8014EFC8; +D_8014F0C8 = 0x8014F0C8; +D_8014F110 = 0x8014F110; D_800DBC70 = 0x800DBC70; D_800DBD70 = 0x800DBD70; D_800DBF70 = 0x800DBF70; D_800DBF90 = 0x800DBF90; +D_8014F120 = 0x8014F120; +D_8014F128 = 0x8014F128; D_801595A0 = 0x801595A0; +D_8014F12F = 0x8014F12F; D_8015959E = 0x8015959E; D_801593A0 = 0x801593A0; D_8015C7C0 = 0x8015C7C0; @@ -1016,6 +1093,7 @@ D_801598A0 = 0x801598A0; D_801599B8 = 0x801599B8; D_80159AD0 = 0x80159AD0; D_80159AD4 = 0x80159AD4; +D_802D9D80 = 0x802D9D80; D_802DACA0 = 0x802DACA0; D_802DADA0 = 0x802DADA0; D_802DADA4 = 0x802DADA4; @@ -1077,7 +1155,17 @@ D_802EB390 = 0x802EB390; D_802EB394 = 0x802EB394; D_802EB39C = 0x802EB39C; D_802EB398 = 0x802EB398; +D_802E99DC = 0x802E99DC; D_802EB3A0 = 0x802EB3A0; +jtbl_802EB160 = 0x802EB160; +jtbl_802EB198 = 0x802EB198; +D_802E9C8C = 0x802E9C8C; +D_802E9CF8 = 0x802E9CF8; +D_802E9CB0 = 0x802E9CB0; +D_802E9D1C = 0x802E9D1C; +D_802E9CD4 = 0x802E9CD4; +D_802E9D40 = 0x802E9D40; +D_802E9D64 = 0x802E9D64; D_802EA07C = 0x802EA07C; D_802E9E54 = 0x802E9E54; D_802E9E80 = 0x802E9E80; @@ -1387,10 +1475,12 @@ D_8029FBD4 = 0x8029FBD4; D_8029FBD0 = 0x8029FBD0; D_8004AA85 = 0x8004AA85; D_80026AC7 = 0x80026AC7; +D_802BDD88_317CA8 = 0x802BDD88; D_802BDF30 = 0x802BDF30; D_802BDF34 = 0x802BDF34; D_802B79A8 = 0x802B79A8; D_802BDF38 = 0x802BDF38; +D_802BDC40_317B60 = 0x802BDC40; D_802BE928 = 0x802BE928; D_802BE924 = 0x802BE924; D_802BE934 = 0x802BE934; @@ -1437,6 +1527,7 @@ D_802BE0C0 = 0x802BE0C0; D_802BE0E4 = 0x802BE0E4; D_802BE0E8 = 0x802BE0E8; D_802BE0EC = 0x802BE0EC; +D_802BD58C_324E9C = 0x802BD58C; D_E0200690 = 0xE0200690; D_E0200734 = 0xE0200734; D_E0200694 = 0xE0200694; @@ -2509,6 +2600,7 @@ D_802A98E2_42FFC2 = 0x802A98E2; D_80294440 = 0x80294440; jtbl_802A9940_430960 = 0x802A9940; D_802A9922_430942 = 0x802A9922; +D_8021A194_432B34 = 0x8021A194; D_8021BC70_434610 = 0x8021BC70; D_8021EF6C_43790C = 0x8021EF6C; D_8021A434_43BEC4 = 0x8021A434; @@ -2888,6 +2980,7 @@ D_80286528 = 0x80286528; D_8028652C = 0x8028652C; D_80286538 = 0x80286538; D_80080868 = 0x80080868; +jtbl_80286500 = 0x80286500; D_80286540 = 0x80286540; D_802DBC88 = 0x802DBC88; D_802EA2BC = 0x802EA2BC;