sysBootup

This commit is contained in:
SodiumChlorideLogic 2021-10-03 17:04:03 -04:00
parent 185ee9de9b
commit 290712f5da
4 changed files with 73 additions and 53 deletions

View File

@ -1,26 +0,0 @@
.include "macros.inc"
.section .text, "ax" # 0x800056C0 - 0x80472F00
.global main
main:
/* 804111B4 0040E0F4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 804111B8 0040E0F8 7C 08 02 A6 */ mflr r0
/* 804111BC 0040E0FC 3C 60 80 4A */ lis r3, lbl_804995D0@ha
/* 804111C0 0040E100 90 01 00 14 */ stw r0, 0x14(r1)
/* 804111C4 0040E104 38 63 95 D0 */ addi r3, r3, lbl_804995D0@l
/* 804111C8 0040E108 4C C6 31 82 */ crclr 6
/* 804111CC 0040E10C 4B CD C5 21 */ bl OSReport
/* 804111D0 0040E110 48 01 1A 95 */ bl initialize__6SystemFv
/* 804111D4 0040E114 38 60 00 E0 */ li r3, 0xe0
/* 804111D8 0040E118 4B C1 2C CD */ bl __nw__FUl
/* 804111DC 0040E11C 7C 60 1B 79 */ or. r0, r3, r3
/* 804111E0 0040E120 41 82 00 0C */ beq lbl_804111EC
/* 804111E4 0040E124 48 01 12 05 */ bl __ct__6SystemFv
/* 804111E8 0040E128 7C 60 1B 78 */ mr r0, r3
lbl_804111EC:
/* 804111EC 0040E12C 7C 03 03 78 */ mr r3, r0
/* 804111F0 0040E130 48 01 1C 95 */ bl run__6SystemFv
/* 804111F4 0040E134 80 01 00 14 */ lwz r0, 0x14(r1)
/* 804111F8 0040E138 7C 08 03 A6 */ mtlr r0
/* 804111FC 0040E13C 38 21 00 10 */ addi r1, r1, 0x10
/* 80411200 0040E140 4E 80 00 20 */ blr

62
include/System.h Normal file
View File

@ -0,0 +1,62 @@
#ifndef _SYSTEM_H
#define _SYSTEM_H
#include "types.h"
struct System {
// static void assert_fragmentation(char*);
// void enableCPULockDetector(int);
// int disableCPULockDetector();
System();
~System();
void construct();
// void constructWithDvdAccessFirst();
// void constructWithDvdAccessSecond();
// void createRomFont(JKRHeap*);
// void destroyRomFont();
// static void createSoundSystem();
// static void loadSoundResource();
static void initialize();
// void loadResourceFirst();
// void loadResourceSecond();
int run();
// static float getTime();
// void clearOptionBlockSaveFlag();
// void setOptionBlockSaveFlag();
// Game::CommonSaveData::Mgr* getPlayCommonData();
// void dvdLoadUseCallBack(DvdThreadCommand*, IDelegate*);
// void deleteThreads();
// JFWDisplay* setCurrentDisplay(JFWDisplay*);
// u32 clearCurrentDisplay(JFWDisplay*);
// void beginFrame();
// void endFrame();
// void beginRender();
// void endRender();
// ERenderMode setRenderMode(ERenderMode);
// static _GXRenderModeObj* getRenderModeObj();
// void changeRenderMode(ERenderMode);
// u32 heapStatusStart(char*, JKRHeap*);
// void heapStatusEnd(char*);
// void heapStatusDump(bool);
// void heapStatusIndividual();
// void heapStatusNormal();
// void resetOn(bool);
// void resetPermissionOn();
// bool isResetActive();
// void activeGP();
// void inactiveGP();
// bool isDvdErrorOccured();
// void initCurrentHeapMutex();
// void startChangeCurrentHeap(JKRHeap*);
// void endChangeCurrentHeap();
// void addGenNode(CNode*);
// void initGenNode();
// void refreshGenNode();
// void setFrameRate(int);
// bool dvdLoadSyncNoBlock(DvdThreadCommand*);
// int dvdLoadSyncAllNoBlock();
u8 filler[0xe0];
};
#endif

View File

@ -826,7 +826,7 @@ TEXT_O_FILES:=\
$(BUILD_DIR)/asm/plugProjectKonoU/khWinLose.o\
$(BUILD_DIR)/asm/plugProjectKonoU/khWinLoseReason.o\
$(BUILD_DIR)/asm/plugProjectKonoU/khMailSaveData.o\
$(BUILD_DIR)/asm/sysBootupU/sysBootup.o\
$(BUILD_DIR)/src/sysBootupU/sysBootup.o\
$(BUILD_DIR)/asm/sysCommonU/node.o\
$(BUILD_DIR)/asm/sysCommonU/sysMath.o\
$(BUILD_DIR)/src/sysCommonU/id32.o\

View File

@ -1,3 +1,7 @@
#include "System.h"
extern "C" void OSReport(char*, ...);
extern char lbl_804995D0[33];
/*
@ -15,31 +19,11 @@ void _Print(char*, ...)
* Address: 804111B4
* Size: 000050
*/
void main(void)
int main(void)
{
/*
.loc_0x0:
stwu r1, -0x10(r1)
mflr r0
lis r3, 0x804A
stw r0, 0x14(r1)
subi r3, r3, 0x6A30
crclr 6, 0x6
bl -0x323AE0
bl 0x11A94
li r3, 0xE0
bl -0x3ED334
mr. r0, r3
beq- .loc_0x38
bl 0x11204
mr r0, r3
.loc_0x38:
mr r3, r0
bl 0x11C94
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
*/
System *system;
OSReport(lbl_804995D0);
System::initialize();
system = new System();
return system->run();
}