summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/code_801DBE90_asm.s2
-rw-r--r--asm/code_801DCE6C_asm.s (renamed from asm/code_801DCE6C.s)27
-rw-r--r--include/code_801DCE6C.h21
-rw-r--r--obj_files.mk3
-rw-r--r--src/code_801DBE90.cpp24
-rw-r--r--src/code_801DCE6C.cpp37
6 files changed, 75 insertions, 39 deletions
diff --git a/asm/code_801DBE90_asm.s b/asm/code_801DBE90_asm.s
index ad4144b..362f1c7 100644
--- a/asm/code_801DBE90_asm.s
+++ b/asm/code_801DBE90_asm.s
@@ -28,7 +28,7 @@ lbl_801DC0F8:
/* 801DC118 001D7D78 4B FF E9 19 */ bl __nw__FUl
/* 801DC11C 001D7D7C 2C 03 00 00 */ cmpwi r3, 0
/* 801DC120 001D7D80 41 82 00 08 */ beq lbl_801DC128
-/* 801DC124 001D7D84 48 00 0D 59 */ bl func_801DCE7C
+/* 801DC124 001D7D84 48 00 0D 59 */ bl __ct__10gUnkClass4Fv
lbl_801DC128:
/* 801DC128 001D7D88 90 6D A0 78 */ stw r3, lbl_8063F338-_SDA_BASE_(r13)
lbl_801DC12C:
diff --git a/asm/code_801DCE6C.s b/asm/code_801DCE6C_asm.s
index 26b3613..85522fc 100644
--- a/asm/code_801DCE6C.s
+++ b/asm/code_801DCE6C_asm.s
@@ -2,33 +2,6 @@
.section .text, "ax" # 0x80006980 - 0x803E1E60
-.global func_801DCE6C
-func_801DCE6C:
-/* 801DCE6C 001D8ACC 38 63 00 07 */ addi r3, r3, 7
-/* 801DCE70 001D8AD0 4E 80 00 20 */ blr
-
-.global func_801DCE74
-func_801DCE74:
-/* 801DCE74 001D8AD4 38 63 00 02 */ addi r3, r3, 2
-/* 801DCE78 001D8AD8 4E 80 00 20 */ blr
-
-.global func_801DCE7C
-func_801DCE7C:
-/* 801DCE7C 001D8ADC 94 21 FF F0 */ stwu r1, -0x10(r1)
-/* 801DCE80 001D8AE0 7C 08 02 A6 */ mflr r0
-/* 801DCE84 001D8AE4 38 80 00 00 */ li r4, 0
-/* 801DCE88 001D8AE8 38 A0 0C 80 */ li r5, 0xc80
-/* 801DCE8C 001D8AEC 90 01 00 14 */ stw r0, 0x14(r1)
-/* 801DCE90 001D8AF0 93 E1 00 0C */ stw r31, 0xc(r1)
-/* 801DCE94 001D8AF4 7C 7F 1B 78 */ mr r31, r3
-/* 801DCE98 001D8AF8 4B E2 72 6D */ bl memset
-/* 801DCE9C 001D8AFC 7F E3 FB 78 */ mr r3, r31
-/* 801DCEA0 001D8B00 83 E1 00 0C */ lwz r31, 0xc(r1)
-/* 801DCEA4 001D8B04 80 01 00 14 */ lwz r0, 0x14(r1)
-/* 801DCEA8 001D8B08 7C 08 03 A6 */ mtlr r0
-/* 801DCEAC 001D8B0C 38 21 00 10 */ addi r1, r1, 0x10
-/* 801DCEB0 001D8B10 4E 80 00 20 */ blr
-
.global func_801DCEB4
func_801DCEB4:
/* 801DCEB4 001D8B14 94 21 FF E0 */ stwu r1, -0x20(r1)
diff --git a/include/code_801DCE6C.h b/include/code_801DCE6C.h
new file mode 100644
index 0000000..1b0d847
--- /dev/null
+++ b/include/code_801DCE6C.h
@@ -0,0 +1,21 @@
+#ifndef POKEREVO_CODE_801DCE6C_H
+#define POKEREVO_CODE_801DCE6C_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct gUnkClass4
+{
+ u8 unk0[0x2];
+ char unk2[0x5];
+ char unk7[0xC79];
+
+ gUnkClass4(void);
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //POKEREVO_CODE_801DCE6C_H
diff --git a/obj_files.mk b/obj_files.mk
index 37b4c5b..ecf302d 100644
--- a/obj_files.mk
+++ b/obj_files.mk
@@ -224,7 +224,8 @@ SPLIT_O_FILES := \
$(BUILD_DIR)/src/code_801DBB3C.o \
$(BUILD_DIR)/src/code_801DBE90.o \
$(BUILD_DIR)/asm/code_801DBE90_asm.o \
- $(BUILD_DIR)/asm/code_801DCE6C.o \
+ $(BUILD_DIR)/src/code_801DCE6C.o \
+ $(BUILD_DIR)/asm/code_801DCE6C_asm.o \
$(BUILD_DIR)/asm/code_801DD5C8.o \
$(BUILD_DIR)/asm/code_801DD8C0.o \
$(BUILD_DIR)/asm/code_801DDF78.o \
diff --git a/src/code_801DBE90.cpp b/src/code_801DBE90.cpp
index 2f57aae..6e7b54c 100644
--- a/src/code_801DBE90.cpp
+++ b/src/code_801DBE90.cpp
@@ -5,7 +5,7 @@
#include "SDK/dvd.h"
#include "SDK/nand.h"
#include "code_801DAAE0.h"
-
+#include "code_801DCE6C.h"
namespace
{
@@ -68,24 +68,28 @@ void func_801DBEA0(void)
//static
unkClass *func_801DBED0(void)
{
- int new_var;
- OSDisableInterrupts();
+
+ OSDisableInterrupts();
+
unkClass *r31 = 0;
size_t i;
for (i = 0; i < lbl_8063F320; i++)
{
if (lbl_8063F324[i].unk0 != 1)
{
- new_var = 1;
- lbl_8063F324[i].unk0 = new_var;
+ lbl_8063F324[i].unk0 = 1;
lbl_8063F324[i].unk1 = 0;
r31 = &lbl_8063F324[i];
break;
}
}
-OSRestoreInterrupts();
-return r31;
+
+
+ OSRestoreInterrupts();
+ return r31;
+
+
}
#else
asm unkClass* func_801DBED0(void)
@@ -133,7 +137,6 @@ lbl_801DBF44:
}
#pragma peephole on
#endif
-
//static
void func_801DBF60(unkClass* p1)
{
@@ -207,6 +210,7 @@ void lbl_801DC068(u32 p1, unkClass2* p2)
}
}
+#if 0
BOOL func_801DC0C8(size_t p1)
{
if (lbl_8063F31E != 1) {
@@ -214,14 +218,14 @@ BOOL func_801DC0C8(size_t p1)
lbl_8063F338 = 0;
NANDInit();
if (!lbl_8063F338) {
+ // lbl_8063F338 = new ...;
// new , 801DCE7C constructor
}
} else {
return FALSE;
}
}
-
-
+#endif
diff --git a/src/code_801DCE6C.cpp b/src/code_801DCE6C.cpp
new file mode 100644
index 0000000..553b6fc
--- /dev/null
+++ b/src/code_801DCE6C.cpp
@@ -0,0 +1,37 @@
+#include "types.h"
+#include "ctorStruct.h"
+#include "code_801DCE6C.h"
+#include "Runtime/__mem.h"
+
+extern "C" {
+
+//static
+char* func_801DCE6C(gUnkClass4* p1)
+{
+ return p1->unk7;
+}
+
+//static
+char* func_801DCE74(gUnkClass4* p1)
+{
+ return p1->unk2;
+}
+
+gUnkClass4::gUnkClass4(void)
+{
+ memset(this, 0, sizeof(gUnkClass4));
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+} //extern "C"