Debug work + some retail regalloc fixes (#2787)

* Debug work + some retail regalloc fixes

* Use AUDIO_INSTANCES in places it's missing, link d_a_e_bee

* Link m_Do_machine

* Fix clang putting other includes before the pchs

* Link some more debug TUs that already match
This commit is contained in:
LagoLunatic
2025-11-09 14:43:14 -05:00
committed by GitHub
parent 3770b114eb
commit 5e9b40b7ec
49 changed files with 480 additions and 3020 deletions
+1
View File
@@ -38,6 +38,7 @@ struct DynamicModuleControlBase {
/* 80262364 */ BOOL unlink();
/* 802623EC */ BOOL load_async();
/* 8026242C */ bool force_unlink();
static JKRHeap* createHeap(u32, JKRHeap*);
static inline DynamicModuleControlBase* getFirstClass() { return mFirst; }
inline DynamicModuleControlBase* getNextClass() { return mNext; }
+26 -7
View File
@@ -2,6 +2,7 @@
#define JFWSYSTEM_H
#include "dolphin/types.h"
#include "JSystem/JUtility/JUTAssert.h"
typedef struct _GXRenderModeObj GXRenderModeObj;
class JKRExpHeap;
@@ -27,7 +28,7 @@ struct JFWSystem {
static s32 decompPriority;
static s32 aPiecePriority;
static ResFONT* systemFontRes;
static GXRenderModeObj* renderMode;
static const GXRenderModeObj* renderMode;
static u32 exConsoleBufferSize;
};
@@ -38,12 +39,30 @@ struct JFWSystem {
static JKRExpHeap* getSystemHeap() { return systemHeap; }
static JUTResFont* getSystemFont() { return systemFont; }
static void setMaxStdHeap(s32 max) { CSetUpParam::maxStdHeaps = max; }
static void setSysHeapSize(u32 size) { CSetUpParam::sysHeapSize = size; }
static void setFifoBufSize(u32 size) { CSetUpParam::fifoBufSize = size; }
static void setAramAudioBufSize(u32 size) { CSetUpParam::aramAudioBufSize = size; }
static void setAramGraphBufSize(u32 size) { CSetUpParam::aramGraphBufSize = size; }
static void setRenderMode(GXRenderModeObj* p_modeObj) { CSetUpParam::renderMode = p_modeObj; }
static void setMaxStdHeap(int max) {
JUT_ASSERT(47, sInitCalled == FALSE);
CSetUpParam::maxStdHeaps = max;
}
static void setSysHeapSize(u32 size) {
JUT_ASSERT(50, sInitCalled == FALSE);
CSetUpParam::sysHeapSize = size;
}
static void setFifoBufSize(u32 size) {
JUT_ASSERT(53, sInitCalled == FALSE);
CSetUpParam::fifoBufSize = size;
}
static void setAramAudioBufSize(u32 size) {
JUT_ASSERT(58, sInitCalled == FALSE);
CSetUpParam::aramAudioBufSize = size;
}
static void setAramGraphBufSize(u32 size) {
JUT_ASSERT(61, sInitCalled == FALSE);
CSetUpParam::aramGraphBufSize = size;
}
static void setRenderMode(const GXRenderModeObj* p_modeObj) {
JUT_ASSERT(80, sInitCalled == FALSE);
CSetUpParam::renderMode = p_modeObj;
}
static JKRExpHeap* rootHeap;
static JKRExpHeap* systemHeap;
+4
View File
@@ -77,4 +77,8 @@ inline JKRAramStreamCommand* JKRStreamToAram_Async(JSUFileInputStream *stream, u
return JKRAramStream::write_StreamToAram_Async(stream, addr, size, offset, returnSize);
}
inline void JKRSetAramTransferBuffer(u8* buffer, u32 bufferSize, JKRHeap* heap) {
JKRAramStream::setTransBuffer(buffer, bufferSize, heap);
}
#endif /* JKRARAMSTREAM_H */
+8
View File
@@ -253,6 +253,14 @@ inline JKRHeap* JKRGetRootHeap() {
return JKRHeap::getRootHeap();
}
inline JKRErrorHandler JKRSetErrorHandler(JKRErrorHandler errorHandler) {
return JKRHeap::setErrorHandler(errorHandler);
}
inline bool JKRSetErrorFlag(JKRHeap* heap, bool flag) {
return heap->setErrorFlag(flag);
}
#if PLATFORM_WII || PLATFORM_SHIELD
inline JKRHeap* JKRGetRootHeap2() {
return JKRHeap::getRootHeap2();
+4 -3
View File
@@ -17,6 +17,10 @@ public:
bool isAlive() const { return mIsInitialized; }
void setSoundStarter(Z2SoundStarter* i_soundStarter) { mSoundStarter = i_soundStarter; }
#if VERSION == VERSION_SHIELD_DEBUG
/* 0x10 */ u8 unk_0x10[0x20 - 0x10];
#endif
virtual void framework(u32, s8 reverb);
virtual void dispose();
virtual bool stopOK(Z2SoundHandlePool& pool);
@@ -24,9 +28,6 @@ public:
virtual Z2SoundHandlePool* startSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID, u32, s8);
#if VERSION == VERSION_SHIELD_DEBUG
/* 0x14 */ u8 unk_0x14[0x24 - 0x14];
#endif
/* 0x14 */ Z2SoundStarter* mSoundStarter;
/* 0x18 */ JGeometry::TVec3<f32>* mSoundPos;
/* 0x1C */ u16 field_0x1c;
-3
View File
@@ -107,7 +107,4 @@ public:
#include "f_op/f_op_actor_mng.h"
struct JKRExpHeap {};
#endif /* D_A_BALLOON_2D_H */
+1
View File
@@ -812,6 +812,7 @@ void mDoExt_modelTexturePatch(J3DModelData* i_modelData);
#if VERSION == VERSION_SHIELD_DEBUG
s32 mDoExt_getSafeZeldaHeapSize();
void mDoExt_addSafeZeldaHeapSize(s32);
JKRHeap* mDoExt_createHostIOHeap(u32, JKRHeap*);
#endif
struct JUTFont;
+1 -1
View File
@@ -32,7 +32,7 @@ public:
namespace mDoMch {
extern u8 mDebugFill;
extern u8 mDebugFillNotuse;
extern u8 mDebugFillNotUse;
extern u8 mDebugFillNew;
extern u8 mDebugFillDelete;
+1
View File
@@ -24,6 +24,7 @@ typedef enum {
VI_TVMODE_PAL_DS = VI_TVMODE(VI_PAL, VI_NON_INTERLACE),
VI_TVMODE_EURGB60_INT = VI_TVMODE(VI_EURGB60, VI_INTERLACE),
VI_TVMODE_EURGB60_DS = VI_TVMODE(VI_EURGB60, VI_NON_INTERLACE),
VI_TVMODE_EURGB60_PROG = VI_TVMODE(VI_EURGB60, VI_PROGRESSIVE),
VI_TVMODE_MPAL_INT = VI_TVMODE(VI_MPAL, VI_INTERLACE),
VI_TVMODE_MPAL_DS = VI_TVMODE(VI_MPAL, VI_NON_INTERLACE),
VI_TVMODE_DEBUG_INT = VI_TVMODE(VI_DEBUG, VI_INTERLACE),