add wii usa rev0 support (#2505)

* wii usa rev0 dol building ok

* wii dol cleanup

* some wii tests

* most rels building
This commit is contained in:
TakaRikka
2025-06-27 03:14:58 -07:00
committed by GitHub
parent 028c07d47d
commit 79c56b2548
1525 changed files with 125994 additions and 807 deletions
+11 -2
View File
@@ -3,6 +3,7 @@
#include "JSystem/JKernel/JKRDisposer.h"
#include <dolphin/os.h>
#include "global.h"
class JKRHeap;
typedef void (*JKRErrorHandler)(void*, u32, int);
@@ -149,7 +150,8 @@ public:
static void* getUserRamEnd(void) { return mUserRamEnd; }
static u32 getMemorySize(void) { return mMemorySize; }
static JKRHeap* getRootHeap() { return sRootHeap; }
#ifdef DEBUG
#if PLATFORM_WII || PLATFORM_SHIELD
static JKRHeap* getRootHeap2() { return sRootHeap2; }
#endif
@@ -173,7 +175,8 @@ public:
static u32 mMemorySize;
static JKRHeap* sRootHeap;
#ifdef DEBUG
#if PLATFORM_WII || PLATFORM_SHIELD
static JKRHeap* sRootHeap2;
#endif
@@ -250,6 +253,12 @@ inline JKRHeap* JKRGetRootHeap() {
return JKRHeap::getRootHeap();
}
#if PLATFORM_WII || PLATFORM_SHIELD
inline JKRHeap* JKRGetRootHeap2() {
return JKRHeap::getRootHeap2();
}
#endif
#ifdef DEBUG
inline void JKRSetDebugFillNotuse(u8 status) { data_804508B1 = status; }
inline void JKRSetDebugFillNew(u8 status) { data_804508B2 = status; }
+4
View File
@@ -83,6 +83,10 @@ public:
/* 802AE5B0 */ bool isSoundCulling(JAISoundID);
/* 802B9AC4 */ void resetCrowdSize() { mCrowdSize = 0; }
#if PLATFORM_WII
void homeMenuSeCallback(s32);
#endif
private:
/* 0x000 */ JAISoundHandle mSoundHandle[24];
/* 0x060 */ JAISoundHandles mSoundHandles;
+2 -2
View File
@@ -315,11 +315,11 @@ public:
/* 0x49C */ dAttCatch_c mCatghTarget;
/* 0x4B4 */ dAttLook_c mLookTarget;
/* 0x4C4 */ int mAttnBlockTimer;
#ifdef DEBUG
#if PLATFORM_WII || PLATFORM_SHIELD
/* 0x4C8 */ u8 field_0x4c8[0x4D0 - 0x4C8];
#endif
/* 0x4C8 */ dAttParam_c mAttParam;
#ifdef DEBUG
#if PLATFORM_WII || PLATFORM_SHIELD
/* 0x51C */ u8 field_0x50c[0x520 - 0x51C];
#else
/* 0x50C */ u8 field_0x50c[0x514 - 0x50c];
+8 -1
View File
@@ -215,7 +215,7 @@ public:
/* 0x04F47 */ u8 field_0x4f47[2];
/* 0x04F49 */ u8 mDirection;
/* 0x04F4A */ u8 field_0x4f4a;
#ifdef DEBUG
#if PLATFORM_WII || PLATFORM_SHIELD
/* 0x04FE3 */ u8 unk_0x4fe3;
#endif
/* 0x04F4B */ u8 field_0x4f4b; // related to itemInit
@@ -772,6 +772,9 @@ public:
/* 0x04780 */ dAttention_c mAttention;
/* 0x04C9C */ dVibration_c mVibration;
/* 0x04D2C */ u8 field_0x4d2c[4];
#if PLATFORM_WII
/* 0x04D38 */ u8 unk_0x4d38[8];
#endif
/* 0x04D30 */ JKRArchive* mFieldMapArchive2;
/* 0x04D34 */ JKRArchive* mMsgArchive[11];
/* 0x04D60 */ JKRArchive* mDemoMsgArchive;
@@ -1817,6 +1820,10 @@ inline s16 dComIfGs_getTurnRestartAngleY() {
return g_dComIfG_gameInfo.info.getTurnRestart().getAngleY();
}
inline s8 dComIfGs_getTurnRestartRoomNo() {
return g_dComIfG_gameInfo.info.getTurnRestart().getRoomNo();
}
inline u32 dComIfGs_getRestartRoomParam() {
return g_dComIfG_gameInfo.info.getRestart().getRoomParam();
}
+1 -1
View File
@@ -174,7 +174,7 @@ public:
/* 0x128 */ u8 mCompulsory;
/* 0x129 */ bool mRoomInfoSet;
/* 0x12C */ int mRoomNo;
#ifdef DEBUG
#if PLATFORM_WII || PLATFORM_SHIELD
/* 0x130 */ u8 field_0x130;
#endif
}; // Size = 0x130
+22
View File
@@ -0,0 +1,22 @@
#ifndef D_HOME_BUTTON_H
#define D_HOME_BUTTON_H
#include <revolution/hbm.h>
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
class dHomeButton_c {
public:
void create_(int, void*);
int execute_();
void initHomeButtonInfo(int, void*);
void initCursorPos();
void calcCursorPos();
void onReset();
void create(int, void*);
int execute();
void drawCapture(u8, void (*)(J2DOrthoGraph&, void*), void*);
/* 0x00 */ HBMDataInfo m_info;
};
#endif /* D_HOME_BUTTON_H */
+796 -792
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -835,6 +835,7 @@ public:
u32 getParam() const { return mParam; }
cXyz& getPos() { return mPosition; }
s16 getAngleY() const { return mAngleY; }
s8 getRoomNo() const { return unk18; }
f32 getCameraFvy() const { return mCameraFvy; }
void setCameraFvy(f32 i_fvy) { mCameraFvy = i_fvy; }
+4
View File
@@ -1277,6 +1277,10 @@ dStage_KeepDoorInfo* dStage_GetKeepDoorInfo();
dStage_KeepDoorInfo* dStage_GetRoomKeepDoorInfo();
void dStage_dt_c_fieldMapLoader(void* i_data, dStage_dt_c* i_stage);
#if VERSION == VERSION_WII_USA_R0
void dStage_escapeRestart();
#endif
inline s32 dStage_roomRead_dt_c_ChkBg(u8 param_0) {
return param_0 & 0x80;
}
+1 -1
View File
@@ -48,7 +48,7 @@
#define GLUE(a, b) a##b
#define GLUE2(a, b) GLUE(a, b)
#if VERSION != VERSION_SHIELD_DEBUG
#if VERSION == VERSION_GCN_USA
#define STATIC_ASSERT(cond) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1]
#else
#define STATIC_ASSERT(...)
+13
View File
@@ -0,0 +1,13 @@
#ifndef M_RE_CONTROLLER_PAD_H
#define M_RE_CONTROLLER_PAD_H
#include <dolphin.h>
class mReCPd {
public:
struct Pad {
struct Acc {};
};
};
#endif /* M_RE_CONTROLLER_PAD_H */
+43
View File
@@ -0,0 +1,43 @@
#ifndef _REVOLUTION_HBM_H_
#define _REVOLUTION_HBM_H_
#include <revolution/types.h>
#ifdef __cplusplus
extern "C" {
#endif
// TODO: properly setup later
typedef struct Vec2 {
f32 x; // size 0x04, offset 0x00
f32 y; // size 0x04, offset 0x04
} Vec2; // size 0x08
typedef struct MEMAllocator MEMAllocator;
typedef int HBMSoundCallback(int evt, int num);
typedef struct HBMDataInfo {
void *layoutBuf; // size 0x04, offset 0x00
void *spkSeBuf; // size 0x04, offset 0x04
void *msgBuf; // size 0x04, offset 0x08
void *configBuf; // size 0x04, offset 0x0c
void *mem; // size 0x04, offset 0x10
HBMSoundCallback *sound_callback; // size 0x04, offset 0x14
int backFlag; // size 0x04, offset 0x18
int region; // size 0x04, offset 0x1c
int cursor; // size 0x04, offset 0x20
u32 memSize; // size 0x04, offset 0x24
f32 frameDelta; // size 0x04, offset 0x28
Vec2 adjust; // size 0x08, offset 0x2c
MEMAllocator *pAllocator; // size 0x04, offset 0x34
} HBMDataInfo; // size 0x40
void HBMCreate(const HBMDataInfo *pHBInfo);
#ifdef __cplusplus
}
#endif
#endif // _REVOLUTION_HBM_H_
+58
View File
@@ -0,0 +1,58 @@
#ifndef _DOLPHIN_TYPES_H_
#define _DOLPHIN_TYPES_H_
typedef signed char s8;
typedef unsigned char u8;
typedef signed short int s16;
typedef unsigned short int u16;
typedef signed long s32;
typedef unsigned long u32;
typedef signed long long int s64;
typedef unsigned long long int u64;
typedef volatile u8 vu8;
typedef volatile u16 vu16;
typedef volatile u32 vu32;
typedef volatile u64 vu64;
typedef volatile s8 vs8;
typedef volatile s16 vs16;
typedef volatile s32 vs32;
typedef volatile s64 vs64;
typedef float f32;
typedef double f64;
typedef volatile f32 vf32;
typedef volatile f64 vf64;
typedef char *Ptr;
typedef int BOOL;
typedef unsigned int uint;
#define FALSE 0
#define TRUE 1
#if defined(__MWERKS__)
#define AT_ADDRESS(addr) : (addr)
#elif defined(__GNUC__)
//#define AT_ADDRESS(addr) __attribute__((address((addr))))
#define AT_ADDRESS(addr) // was removed in GCC. define in linker script instead.
#else
#error unknown compiler
#endif
#define ATTRIBUTE_ALIGN(num) __attribute__((aligned(num)))
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void*)0)
#endif
#endif
#include "stddef.h"
#endif