m_Do_ext retail linked + debug improvements (#3009)

This commit is contained in:
Max Roncace
2026-01-04 17:20:35 -08:00
committed by GitHub
parent 7cf1038865
commit b72be3074a
17 changed files with 901 additions and 499 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ m_Do/m_Do_mtx.cpp:
.ctors start:0x8062F7D0 end:0x8062F7D4
.data start:0x80661ED0 end:0x80661FC0
.sdata start:0x8073F3E8 end:0x8073F3F8
.sbss start:0x8074C3B0 end:0x8074C3BC
.sbss start:0x8074C3B0 end:0x8074C3B8
.sdata2 start:0x8074D878 end:0x8074D888
.bss start:0x807558E0 end:0x80755D30
@@ -74,7 +74,7 @@ m_Do/m_Do_ext.cpp:
.rodata start:0x8062FA30 end:0x8062FA70
.data start:0x80661FC0 end:0x80663DB0
.sdata start:0x8073F3F8 end:0x8073F600
.sbss start:0x8074C3BC end:0x8074C418
.sbss start:0x8074C3B8 end:0x8074C418
.sdata2 start:0x8074D888 end:0x8074D8D0
.bss start:0x80755D30 end:0x80755D90
+4 -4
View File
@@ -64187,9 +64187,9 @@ lbl_8074C3AA = .sbss:0x8074C3AA; // type:object size:0x1 data:byte hash:0xFDF68E
lbl_8074C3AB = .sbss:0x8074C3AB; // type:object size:0x1 data:byte hash:0x15E8B591 dhash:0xC99D7D59
@LOCAL@exceptionNNGCReadPad__FPUlPUl@l_oldButton@0 = .sbss:0x8074C3AC; // type:object size:0x4 scope:local data:4byte hash:0x50F85B88 dhash:0x8D7B3DDD
mDoMtx_stack = .sbss:0x8074C3B0; // type:object size:0x1 scope:global hash:0x2AB168B3
lbl_8074C3B8 = .sbss:0x8074C3B8; // type:object size:0x1 data:byte hash:0x60980213 dhash:0x3EBAE505
CurrentHeapAdjustVerbose__6mDoExt = .sbss:0x8074C3B8; // type:object size:0x1 data:byte hash:0x60980213 dhash:0x3EBAE505
HeapAdjustVerbose__6mDoExt = .sbss:0x8074C3B9; // type:object size:0x1 data:byte hash:0xDD10CA27 dhash:0x25FFD851
HeapAdjustQuiet__6mDoExt = .sbss:0x8074C3BA; // type:object size:0x2 hash:0x364A3DE1 dhash:0xAED09ED7
HeapAdjustQuiet__6mDoExt = .sbss:0x8074C3BA; // type:object size:0x1 hash:0x364A3DE1 dhash:0xAED09ED7
AssertHeap = .sbss:0x8074C3BC; // type:object size:0x4 scope:global data:4byte hash:0x0726E63B
DbPrintHeap = .sbss:0x8074C3C0; // type:object size:0x4 scope:global data:4byte hash:0x114A8B4E
gameHeap = .sbss:0x8074C3C4; // type:object size:0x4 scope:global data:4byte hash:0x31D7CBD7
@@ -64199,8 +64199,8 @@ archiveHeap = .sbss:0x8074C3D0; // type:object size:0x4 scope:global data:4byte
j2dHeap = .sbss:0x8074C3D4; // type:object size:0x4 scope:global data:4byte hash:0x7CA37505
HostIOHeap = .sbss:0x8074C3D8; // type:object size:0x4 scope:global data:4byte hash:0x8D1A0E3F
mDoExt_SaveCurrentHeap = .sbss:0x8074C3DC; // type:object size:0x4 scope:global data:4byte hash:0x44FDA9E1
@LOCAL@mDoExt_createSolidHeap__FUlP7JKRHeapUl@displayed@0 = .sbss:0x8074C3E0; // type:object size:0x4 scope:local data:4byte hash:0x1928D6B8 dhash:0xF0ED4395
lbl_8074C3E4 = .sbss:0x8074C3E4; // type:object size:0x1 data:byte hash:0x74053100 dhash:0xCB66AA90
@LOCAL@mDoExt_createSolidHeap__FUlP7JKRHeapUl@displayed = .sbss:0x8074C3E0; // type:object size:0x4 scope:local data:4byte hash:0x1928D6B8 dhash:0xF0ED4395
@GUARD@draw__17mDoExt_cubePacketFv@l_pos = .sbss:0x8074C3E4; // type:object size:0x1 data:byte hash:0x74053100 dhash:0xCB66AA90
mDoExt_font0 = .sbss:0x8074C3E8; // type:object size:0x4 scope:global data:4byte hash:0xA93F74F6
mDoExt_font0_getCount = .sbss:0x8074C3EC; // type:object size:0x4 scope:global data:4byte hash:0xCC867BDC
mDoExt_resfont0 = .sbss:0x8074C3F0; // type:object size:0x4 scope:global data:4byte hash:0xFFCF2592
+1 -1
View File
@@ -570,7 +570,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_graphic.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_machine.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_mtx.cpp"),
Object(Equivalent, "m_Do/m_Do_ext.cpp"), # weak func order
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_ext.cpp"),
Object(NonMatching, "m_Do/m_Do_ext2.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_lib.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_Reset.cpp"),
+2 -5
View File
@@ -56,12 +56,9 @@ public:
J3DIndBlock* getIndBlock() { return mIndBlock; }
J3DJoint* getJoint() { return mJoint; }
J3DMaterialAnm* getMaterialAnm() {
if ((uintptr_t)mMaterialAnm < 0xC0000000) {
return mMaterialAnm;
} else {
return NULL;
}
return (uintptr_t)mMaterialAnm < 0xC0000000 ? mMaterialAnm : NULL;
}
u32 getMaterialMode() { return mMaterialMode; }
J3DNBTScale* getNBTScale() { return mTexGenBlock->getNBTScale(); }
u16 getTexNo(u32 idx) { return mTevBlock->getTexNo(idx); }
J3DGXColor* getTevKColor(u32 param_0) { return mTevBlock->getTevKColor(param_0); }
+4 -1
View File
@@ -139,7 +139,10 @@ struct J3DSys {
J3DMtxCalc * getCurrentMtxCalc() const { return mCurrentMtxCalc; }
void setTexture(J3DTexture* pTex) { mTexture = pTex; }
void setTexture(J3DTexture* pTex) {
JUT_ASSERT_MSG(220, pTex != NULL, "Error : null pointer.");
mTexture = pTex;
}
J3DTexture* getTexture() { return mTexture; }
void setNBTScale(Vec* scale) { mNBTScale = scale; }
@@ -33,6 +33,7 @@ public:
}
void setResTIMG(u16 index, const ResTIMG& timg) {
JUT_ASSERT_MSG(81, (bool)(index < mNum), "Error : range over.");
mpRes[index] = timg;
mpRes[index].imageOffset = ((mpRes[index].imageOffset + (uintptr_t)&timg - (uintptr_t)(mpRes + index)));
mpRes[index].paletteOffset = ((mpRes[index].paletteOffset + (uintptr_t)&timg - (uintptr_t)(mpRes + index)));
+4
View File
@@ -116,4 +116,8 @@ inline JKRExpHeap* JKRCreateExpHeap(u32 size, JKRHeap* parent, bool errorFlag) {
return JKRExpHeap::create(size, parent, errorFlag);
}
inline void JKRDestroyExpHeap(JKRHeap* heap) {
heap->destroy();
}
#endif /* JKREXPHEAP_H */
+6 -6
View File
@@ -36,6 +36,7 @@ public:
};
public:
JKRHeap(u32 size, JKRHeap* parent, bool errorFlag);
JKRHeap(void* data, u32 size, JKRHeap* parent, bool errorFlag);
virtual ~JKRHeap();
@@ -112,6 +113,7 @@ public:
void lock() { OSLockMutex(&mMutex); }
void unlock() { OSUnlockMutex(&mMutex); }
u32 getHeapSize() { return mSize; }
u8 getCurrentGroupId() { return 0; }
protected:
/* 0x00 */ // vtable
@@ -151,9 +153,7 @@ public:
static u32 getMemorySize(void) { return mMemorySize; }
static JKRHeap* getRootHeap() { return sRootHeap; }
#if PLATFORM_WII || PLATFORM_SHIELD
static JKRHeap* getRootHeap2() { return sRootHeap2; }
#endif
static JKRHeap* getSystemHeap() { return sSystemHeap; }
static JKRHeap* getCurrentHeap() { return sCurrentHeap; }
@@ -176,9 +176,7 @@ public:
static JKRHeap* sRootHeap;
#if PLATFORM_WII || PLATFORM_SHIELD
static JKRHeap* sRootHeap2;
#endif
static JKRHeap* sSystemHeap;
static JKRHeap* sCurrentHeap;
@@ -241,6 +239,10 @@ inline u32 JKRGetMemBlockSize(JKRHeap* heap, void* block) {
return JKRHeap::getSize(block, heap);
}
inline u32 JKRGetFreeSize(JKRHeap* heap) {
return heap->getFreeSize();
}
inline void* JKRAlloc(u32 size, int alignment) {
return JKRHeap::alloc(size, alignment, NULL);
}
@@ -261,11 +263,9 @@ inline bool JKRSetErrorFlag(JKRHeap* heap, bool flag) {
return heap->setErrorFlag(flag);
}
#if PLATFORM_WII || PLATFORM_SHIELD
inline JKRHeap* JKRGetRootHeap2() {
return JKRHeap::getRootHeap2();
}
#endif
#if DEBUG
inline void JKRSetDebugFillNotuse(u8 status) { data_804508B1 = status; }
+4
View File
@@ -65,4 +65,8 @@ inline JKRSolidHeap* JKRCreateSolidHeap(u32 param_0, JKRHeap* heap, bool param_2
return JKRSolidHeap::create(param_0, heap, param_2);
}
inline void JKRDestroySolidHeap(JKRHeap* heap) {
heap->destroy();
}
#endif /* JKRSOLIDHEAP_H */
+8
View File
@@ -63,6 +63,14 @@ public:
static u32 calcCacheSize(u32 param_0, int param_1) { return (ALIGN_NEXT(param_0, 0x20) + 0x40) * param_1; }
GXTexObj* getTexObj(void* buffer) { return &((TCachePage*)buffer)->mTexObj; }
u32 getCachePage() const {
return mCachePage;
}
int getMaxSheetSize() const {
return mMaxSheetSize;
}
private:
/* 0x70 */ u32 mTotalWidSize;
/* 0x74 */ u32 mTotalGlySize;
+5
View File
@@ -12,6 +12,11 @@
// Fixes weak function ordering
#include "math.h" // IWYU pragma: export
#include "cstring.h" // IWYU pragma: export
#include "JSystem/JKernel/JKRDisposer.h" // IWYU pragma: export
#include "JSystem/J3DGraphBase/J3DPacket.h" // IWYU pragma: export
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" // IWYU pragma: export
#include "JSystem/J3DGraphAnimator/J3DJoint.h" // IWYU pragma: export
#include "JSystem/J3DGraphAnimator/J3DAnimation.h" // IWYU pragma: export
#include "JSystem/JUtility/JUTGamePad.h" // IWYU pragma: export
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" // IWYU pragma: export
#include "JSystem/JHostIO/JORReflexible.h" // IWYU pragma: export
+319 -279
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -6,6 +6,8 @@
class JKRExpHeap;
extern OSThread mainThread;
void version_check();
s32 LOAD_COPYDATE(void*);
+3
View File
@@ -5,6 +5,9 @@
#include "SSystem/SComponent/c_xyz.h"
#include <dolphin/mtx.h>
extern u8 g_printCurrentHeapDebug;
extern u8 g_printOtherHeapDebug;
void mDoMtx_XYZrotS(Mtx, s16, s16, s16);
void mDoMtx_XYZrotM(Mtx, s16, s16, s16);
void mDoMtx_ZXYrotS(Mtx, s16, s16, s16);
-9
View File
@@ -392,15 +392,6 @@ int fopAcM::HeapAdjustMargin =
0x10000;
#endif
struct DummyCheckHeap {
JKRHeap* getHeap();
void setHeap(JKRHeap* heap);
/* 0x0 */ JKRHeap* dummyHeap;
};
static DummyCheckHeap* dch = NULL;
bool fopAcM_entrySolidHeap_(fopAc_ac_c* i_actor, heapCallbackFunc i_heapCallback, u32 i_size) {
#if DEBUG
s16 procProfName = fopAcM_GetProfName(i_actor);
+535 -191
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -864,7 +864,7 @@ void parse_args(int argc, const char* argv[]) {
static u8 mainThreadStack[32768];
static OSThread mainThread;
OSThread mainThread;
void main(int argc, const char* argv[]) {
OSThread* current_thread = OSGetCurrentThread();