c_dylink match

This commit is contained in:
Jasper St. Pierre
2023-10-13 14:21:53 -07:00
parent 9ea03e0768
commit 75ef109e98
5 changed files with 16 additions and 14 deletions
+1 -1
View File
@@ -270,7 +270,7 @@ config.libs = [
# c
Object(NonMatching, "c/c_damagereaction.cpp"),
Object(NonMatching, "c/c_dylink.cpp"),
Object(Matching, "c/c_dylink.cpp"),
# f_ap
Object(NonMatching, "f_ap/f_ap_game.cpp"),
+2 -3
View File
@@ -20,9 +20,7 @@ struct DynamicModuleControlBase {
virtual int getModuleSize() const { return 0; }
virtual const char* getModuleTypeString() const { return "Base"; }
virtual void dump();
static void dump();
virtual void dump2() { /* empty function */
}
virtual void dump2() {}
virtual bool do_load() { return true; }
virtual BOOL do_load_async() { return true; }
virtual bool do_unload() { return true; }
@@ -34,6 +32,7 @@ struct DynamicModuleControlBase {
BOOL load_async();
bool force_unlink();
static void dump();
static inline DynamicModuleControlBase* getFirstClass() { return mFirst; }
inline DynamicModuleControlBase* getNextClass() { return mNext; }
bool isLinked() const { return mLinkCount != 0; }
+1 -1
View File
@@ -88,7 +88,7 @@ public:
/* 0x12C */ u8 U8;
struct {
/* 0x12C */ u16 _12c;
/* 0x12C */ u16 _12e;
/* 0x12E */ u16 _12e;
} U16;
} field_0x12c;
};
+7 -2
View File
@@ -17,7 +17,7 @@
#include "dolphin/OS/OS.h"
#include "MSL_C/string.h"
DynamicModuleControl * DMC[PROC_COUNT_e];
DynamicModuleControlBase * DMC[PROC_COUNT_e];
bool DMC_initialized = false;
BOOL cDyl_Initialized = false;
mDoDvdThd_callback_c * cDyl_DVD = NULL;
@@ -512,6 +512,11 @@ s32 cDyl_Unlink(s16 i_ProfName) {
return 0;
}
static void dummy(s16 i_ProfName) {
OSReport_Error("cDyl_Link i_ProfName=%d\n", i_ProfName);
OSReport_Error("cDyl_LinkASync: リンクに失敗しました。諦めます\n");
}
/* 80022B58-80022CEC .text cDyl_LinkASync__Fs */
s32 cDyl_LinkASync(s16 i_ProfName) {
JUT_ASSERT(0x101, DMC_initialized);
@@ -525,7 +530,7 @@ s32 cDyl_LinkASync(s16 i_ProfName) {
}
JUT_ASSERT(0x111, i_ProfName < (sizeof(DMC) / sizeof(DMC[0])));
DynamicModuleControl * d = DMC[i_ProfName];
DynamicModuleControlBase * d = DMC[i_ProfName];
if (d != NULL) {
JUT_ASSERT(0x115, cDyl_Initialized);
if (d->load_async()) {
+5 -7
View File
@@ -102,12 +102,10 @@ void mDoGaC_agbCom_c::mDoGaC_Initial(mDoGaC_DataManag_c* param_0, u8 param_1) {
}
field_0x110 = param_0;
if (param_1 != 0) {
for (int i = 0; i < param_1; i++) {
param_0[i].field_0x0 = 0;
param_0[i].field_0x4 = 0;
param_0[i].field_0x5 = 0;
}
for (int i = 0; i < param_1; i++) {
param_0[i].field_0x0 = 0;
param_0[i].field_0x4 = 0;
param_0[i].field_0x5 = 0;
}
field_0x114 = -1;
@@ -508,7 +506,7 @@ void mDoGaC_agbCom_c::mDoGaC_ContextSend() {
void mDoGaC_agbCom_c::mDoGaC_ContextRead() {
u8 sp8[16];
if (!JUTGba::getManager()->resultGetStatus(mDoGaC_getPortNo(), sp8) && sp8[0] == 0x38) {
JUTGba::getManager()->doRead(mDoGaC_getPortNo(), (u8*)&field_0x118, ContextRead, NULL);
JUTGba::getManager()->doRead(mDoGaC_getPortNo(), (u8*)&field_0x118, ContextCheck, NULL);
} else {
field_0x2 = 0;
}