From f8a16fd2578b795ae3a1e9a53bba2b93ad0c3f24 Mon Sep 17 00:00:00 2001 From: intns <84647527+intns@users.noreply.github.com> Date: Tue, 5 Oct 2021 03:01:46 +0100 Subject: [PATCH] Do AppThread --- README.MD | 1 + include/AppThread.h | 11 +++++++++++ include/JSystem/JKRThread.h | 13 +++++++++++++ obj_files.mk | 2 +- src/sysGCU/appThread.cpp | 25 ++++--------------------- 5 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 include/AppThread.h create mode 100644 include/JSystem/JKRThread.h diff --git a/README.MD b/README.MD index add207fb3..67a2c9cdd 100644 --- a/README.MD +++ b/README.MD @@ -19,6 +19,7 @@ Some of this progress may be outdated, or a branch other than main (workshop or ### DONE - sysBootupU/sysBootup.cpp - sysCommonU/id32.cpp +- sysGCU/appThread.cpp - plugProjectKandoU/TSoundEvent.cpp - plugProjectHikinoU/PSCreatureMgr.cpp diff --git a/include/AppThread.h b/include/AppThread.h new file mode 100644 index 000000000..a977c04d3 --- /dev/null +++ b/include/AppThread.h @@ -0,0 +1,11 @@ +#ifndef _APPTHREAD_H +#define _APPTHREAD_H + +#include "JSystem/JKRThread.h" + +struct AppThread : public JKRThread { + AppThread(unsigned long, int, int); + virtual ~AppThread(); +}; + +#endif \ No newline at end of file diff --git a/include/JSystem/JKRThread.h b/include/JSystem/JKRThread.h new file mode 100644 index 000000000..9202459e6 --- /dev/null +++ b/include/JSystem/JKRThread.h @@ -0,0 +1,13 @@ +#ifndef _JSYSTEM_JKRTHREAD_H +#define _JSYSTEM_JKRTHREAD_H + +#include "types.h" + +struct JKRThread { + JKRThread(unsigned long, int, int); + + virtual ~JKRThread(); + virtual void run(); +}; + +#endif \ No newline at end of file diff --git a/obj_files.mk b/obj_files.mk index 4f431da1c..d67e11526 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -851,7 +851,7 @@ TEXT_O_FILES:=\ $(BUILD_DIR)/asm/sysGCU/gameflow.o\ $(BUILD_DIR)/asm/sysGCU/menuSection.o\ $(BUILD_DIR)/asm/sysGCU/dvdThread.o\ - $(BUILD_DIR)/asm/sysGCU/appThread.o\ + $(BUILD_DIR)/src/sysGCU/appThread.o\ $(BUILD_DIR)/asm/sysGCU/controller.o\ $(BUILD_DIR)/asm/sysGCU/graphics.o\ $(BUILD_DIR)/asm/sysGCU/matMath.o\ diff --git a/src/sysGCU/appThread.cpp b/src/sysGCU/appThread.cpp index 1dd9c3ef0..a10c0eb63 100644 --- a/src/sysGCU/appThread.cpp +++ b/src/sysGCU/appThread.cpp @@ -1,28 +1,11 @@ - +#include "AppThread.h" /* * --INFO-- * Address: 80424E18 * Size: 00003C */ -void AppThread::AppThread(unsigned long, int, int) +AppThread::AppThread(unsigned long r3, int r4, int r5) + : JKRThread(r3, r4, r5) { - /* - .loc_0x0: - stwu r1, -0x10(r1) - mflr r0 - stw r0, 0x14(r1) - stw r31, 0xC(r1) - mr r31, r3 - bl -0x3FF7F4 - lis r4, 0x804F - mr r3, r31 - subi r0, r4, 0x44A8 - stw r0, 0x0(r31) - lwz r31, 0xC(r1) - lwz r0, 0x14(r1) - mtlr r0 - addi r1, r1, 0x10 - blr - */ -} +} \ No newline at end of file