copy dolsdk2004 to tp / b_bh + e_mb done (#2299)

* move dolsdk2004 over

* cleanup some temp work

* finish and cleanup gf

* b_bh done

* d_a_e_mb done
This commit is contained in:
TakaRikka
2025-02-10 21:20:42 +02:00
committed by GitHub
parent 6c24ff1929
commit 2453c0e333
540 changed files with 68028 additions and 22061 deletions
+17 -17
View File
@@ -5,8 +5,8 @@ __register_global_object = .text:0x00000078; // type:function size:0x1C scope:gl
__destroy_global_chain = .text:0x00000094; // type:function size:0x58 scope:global
__ct__12daE_MB_HIO_cFv = .text:0x000000EC; // type:function size:0x48 scope:global
anm_init__FP10e_mb_classifUcf = .text:0x00000134; // type:function size:0xAC scope:global
daE_MB_Draw__FP10e_mb_class = .text:0x000001E0; // type:function size:0x150 scope:global
e_mb_standby__FP10e_mb_class = .text:0x00000330; // type:function size:0x26C scope:global
daE_MB_Draw__FP10e_mb_class = .text:0x000001E0; // type:function size:0x150 scope:local
e_mb_standby__FP10e_mb_class = .text:0x00000330; // type:function size:0x26C scope:local
e_mb_walk1__FP10e_mb_class = .text:0x0000059C; // type:function size:0x27C scope:global
__dt__4cXyzFv = .text:0x00000818; // type:function size:0x3C scope:global
e_mb_move__FP10e_mb_class = .text:0x00000854; // type:function size:0x6BC scope:global
@@ -14,12 +14,12 @@ e_mb_walk2__FP10e_mb_class = .text:0x00000F10; // type:function size:0x2AC scope
e_mb_firstdemo__FP10e_mb_class = .text:0x000011BC; // type:function size:0x324 scope:global
e_mb_end__FP10e_mb_class = .text:0x000014E0; // type:function size:0x10 scope:global
action__FP10e_mb_class = .text:0x000014F0; // type:function size:0x110 scope:global
daE_MB_Execute__FP10e_mb_class = .text:0x00001600; // type:function size:0xAC8 scope:global
daE_MB_IsDelete__FP10e_mb_class = .text:0x000020C8; // type:function size:0x8 scope:global
daE_MB_Delete__FP10e_mb_class = .text:0x000020D0; // type:function size:0x68 scope:global
useHeapInit__FP10fopAc_ac_c = .text:0x00002138; // type:function size:0x384 scope:global
daE_MB_Execute__FP10e_mb_class = .text:0x00001600; // type:function size:0xAC8 scope:local
daE_MB_IsDelete__FP10e_mb_class = .text:0x000020C8; // type:function size:0x8 scope:local
daE_MB_Delete__FP10e_mb_class = .text:0x000020D0; // type:function size:0x68 scope:local
useHeapInit__FP10fopAc_ac_c = .text:0x00002138; // type:function size:0x384 scope:local
__dt__12J3DFrameCtrlFv = .text:0x000024BC; // type:function size:0x48 scope:global
daE_MB_Create__FP10fopAc_ac_c = .text:0x00002504; // type:function size:0x218 scope:global
daE_MB_Create__FP10fopAc_ac_c = .text:0x00002504; // type:function size:0x218 scope:local
__dt__8cM3dGSphFv = .text:0x0000271C; // type:function size:0x48 scope:global
__dt__8cM3dGAabFv = .text:0x00002764; // type:function size:0x48 scope:global
__dt__12daE_MB_HIO_cFv = .text:0x000027AC; // type:function size:0x48 scope:global
@@ -82,7 +82,7 @@ _dtors = .dtors:0x00000000; // type:label scope:global
l_color$3793 = .data:0x00000000; // type:object size:0x4 scope:local
@3884 = .data:0x00000004; // type:object size:0x1C scope:local
cc_sph_src$4733 = .data:0x00000020; // type:object size:0x40 scope:local
l_daE_MB_Method = .data:0x00000060; // type:object size:0x20 scope:global
l_daE_MB_Method = .data:0x00000060; // type:object size:0x20 scope:local
g_profile_E_MB = .data:0x00000080; // type:object size:0x30 scope:global
__vt__8cM3dGSph = .data:0x000000B0; // type:object size:0xC scope:global
__vt__8cM3dGAab = .data:0x000000BC; // type:object size:0xC scope:global
@@ -107,23 +107,23 @@ __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:globa
@1012 = .bss:0x0000003C; // type:object size:0x1 scope:local
@1010 = .bss:0x00000040; // type:object size:0x1 scope:local
@1009 = .bss:0x00000044; // type:object size:0x1 scope:local
lbl_207_bss_45 = .bss:0x00000045; // type:object size:0x1 data:byte
lbl_207_bss_45 = .bss:0x00000045; // type:object size:0x1 scope:local data:byte
@3759 = .bss:0x00000048; // type:object size:0xC scope:local
l_HIO = .bss:0x00000054; // type:object size:0x1C scope:global data:byte
l_HIO = .bss:0x00000054; // type:object size:0x1C scope:local data:byte
@3824 = .bss:0x00000070; // type:object size:0xC scope:local
L_pos1 = .bss:0x0000007C; // type:object size:0xC scope:global
L_pos1 = .bss:0x0000007C; // type:object size:0xC scope:local
@3825 = .bss:0x00000088; // type:object size:0xC scope:local
L_pos2 = .bss:0x00000094; // type:object size:0xC scope:global data:float
L_pos2 = .bss:0x00000094; // type:object size:0xC scope:local data:float
@3826 = .bss:0x000000A0; // type:object size:0xC scope:local
L_Hpos = .bss:0x000000AC; // type:object size:0xC scope:global
L_Hpos = .bss:0x000000AC; // type:object size:0xC scope:local
@3827 = .bss:0x000000B8; // type:object size:0xC scope:local
R_pos1 = .bss:0x000000C4; // type:object size:0xC scope:global
R_pos1 = .bss:0x000000C4; // type:object size:0xC scope:local
@3828 = .bss:0x000000D0; // type:object size:0xC scope:local
R_pos2 = .bss:0x000000DC; // type:object size:0xC scope:global data:float
R_pos2 = .bss:0x000000DC; // type:object size:0xC scope:local data:float
@3829 = .bss:0x000000E8; // type:object size:0xC scope:local
R_Hpos = .bss:0x000000F4; // type:object size:0xC scope:global
R_Hpos = .bss:0x000000F4; // type:object size:0xC scope:local
@3830 = .bss:0x00000100; // type:object size:0xC scope:local
c_pos = .bss:0x0000010C; // type:object size:0xC scope:global
c_pos = .bss:0x0000010C; // type:object size:0xC scope:local
sInstance__40JASGlobalInstance<19JASDefaultBankTable> = .bss:0x00000118; // type:object size:0x4 scope:global
sInstance__35JASGlobalInstance<14JASAudioThread> = .bss:0x0000011C; // type:object size:0x4 scope:global
sInstance__27JASGlobalInstance<7Z2SeMgr> = .bss:0x00000120; // type:object size:0x4 scope:global
+2 -1
View File
@@ -2338,7 +2338,7 @@ Z2AudioLib/Z2AudioMgr.cpp:
dolphin/gf/GFGeometry.cpp:
.text start:0x802CDDC8 end:0x802CDE54
.sdata start:0x804508A8 end:0x804508B8
.sdata start:0x804508A8 end:0x804508B0
dolphin/gf/GFLight.cpp:
.text start:0x802CDE54 end:0x802CDE9C
@@ -2354,6 +2354,7 @@ JSystem/JKernel/JKRHeap.cpp:
.text start:0x802CE138 end:0x802CEDB4
.rodata start:0x8039CAD8 end:0x8039CAF0
.data start:0x803CBF70 end:0x803CBFD0
.sdata start:0x804508B0 end:0x804508B8
.sbss start:0x80451370 end:0x80451398
JSystem/JKernel/JKRExpHeap.cpp:
+47 -22
View File
@@ -201,6 +201,7 @@ cflags_base = [
"-i include",
f"-i build/{config.version}/include",
"-i src",
"-ir src/dolphin",
"-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include",
"-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include",
"-i src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include",
@@ -209,6 +210,7 @@ cflags_base = [
"-i src/PowerPC_EABI_Support/MetroTRK",
"-Iinclude/dolphin",
f"-DVERSION={version_num}",
"-D__GEKKO__",
]
if config.version == "ShieldD":
@@ -262,10 +264,33 @@ cflags_trk = [
# Dolphin library flags
cflags_dolphin = [
*cflags_base,
"-use_lmw_stmw on",
"-str reuse,pool,readonly",
"-nodefaults",
"-proc gekko",
"-align powerpc",
"-enum int",
"-fp hardware",
"-Cpp_exceptions off",
'-pragma "cats off"',
'-pragma "warn_notinlined off"',
"-maxerrors 1",
"-nosyspath",
"-char unsigned",
"-O4,p",
"-sym on",
"-inline auto",
"-i include",
f"-i build/{config.version}/include",
"-ir src/dolphin",
"-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include",
"-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include",
"-i src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include",
"-i src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include",
"-i src/PowerPC_EABI_Support/Runtime/Inc",
"-i src/PowerPC_EABI_Support/MetroTRK",
"-Iinclude/dolphin",
f"-DVERSION={version_num}",
"-D__GEKKO__",
"-DSDK_REVISION=2",
]
# Framework flags
@@ -309,7 +334,7 @@ def DolphinLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
return {
"lib": lib_name,
"mw_version": "GC/1.2.5n",
"cflags": cflags_base,
"cflags": cflags_dolphin,
"progress_category": "sdk",
"objects": objects,
}
@@ -899,7 +924,7 @@ config.libs = [
"cflags": cflags_noopt,
"progress_category": "sdk",
"objects": [
Object(NonMatching, "dolphin/gf/GFGeometry.cpp", extra_cflags=["-O3"]),
Object(MatchingFor("GZ2E01"), "dolphin/gf/GFGeometry.cpp", extra_cflags=["-O3"]),
Object(MatchingFor("GZ2E01"), "dolphin/gf/GFLight.cpp", extra_cflags=["-O3"]),
Object(MatchingFor("GZ2E01"), "dolphin/gf/GFPixel.cpp", extra_cflags=["-O3"]),
Object(MatchingFor("GZ2E01"), "dolphin/gf/GFTev.cpp", extra_cflags=["-O3"]),
@@ -1135,24 +1160,24 @@ config.libs = [
DolphinLib(
"mtx",
[
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtx.c", extra_cflags=["-fp_contract off"]),
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtx.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtxvec.c"),
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtx44.c"),
Object(MatchingFor("GZ2E01"), "dolphin/mtx/vec.c", extra_cflags=["-fp_contract off"]),
Object(MatchingFor("GZ2E01"), "dolphin/mtx/quat.c", extra_cflags=["-fp_contract off"]),
Object(MatchingFor("GZ2E01"), "dolphin/mtx/mtx44.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/mtx/vec.c"),
Object(MatchingFor("GZ2E01"), "dolphin/mtx/quat.c"),
],
),
DolphinLib(
"dvd",
[
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdlow.c"),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdfs.c"),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvd.c"),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdqueue.c"),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvderror.c"),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdidutils.c"),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdFatal.c"),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/fstload.c"),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdlow.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdfs.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvd.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdqueue.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvderror.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdidutils.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/dvdFatal.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/dvd/fstload.c", extra_cflags=["-char signed"]),
],
),
DolphinLib(
@@ -1164,8 +1189,8 @@ config.libs = [
DolphinLib(
"pad",
[
Object(MatchingFor("GZ2E01"), "dolphin/pad/Padclamp.c", extra_cflags=["-fp_contract off"]),
Object(MatchingFor("GZ2E01"), "dolphin/pad/Pad.c", extra_cflags=["-inline noauto"]),
Object(MatchingFor("GZ2E01"), "dolphin/pad/Padclamp.c"),
Object(MatchingFor("GZ2E01"), "dolphin/pad/Pad.c"),
],
),
DolphinLib(
@@ -1200,7 +1225,7 @@ config.libs = [
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDCheck.c"),
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDMount.c"),
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDFormat.c"),
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDOpen.c", extra_cflags=["-inline noauto"]),
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDOpen.c", extra_cflags=["-char signed"]),
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDCreate.c"),
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDRead.c"),
Object(MatchingFor("GZ2E01"), "dolphin/card/CARDWrite.c"),
@@ -1543,7 +1568,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_L7demo_dr"),
ActorRel(NonMatching, "d_a_L7low_dr"),
ActorRel(NonMatching, "d_a_L7op_demo_dr"),
ActorRel(NonMatching, "d_a_b_bh"),
ActorRel(MatchingFor("GZ2E01"), "d_a_b_bh"),
ActorRel(NonMatching, "d_a_b_bq"),
ActorRel(NonMatching, "d_a_b_dr"),
ActorRel(Equivalent, "d_a_b_dre"), # weak func order
@@ -1612,7 +1637,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_e_kg"),
ActorRel(NonMatching, "d_a_e_kk"),
ActorRel(NonMatching, "d_a_e_kr"),
ActorRel(NonMatching, "d_a_e_mb"),
ActorRel(MatchingFor("GZ2E01"), "d_a_e_mb"),
ActorRel(NonMatching, "d_a_e_md"),
ActorRel(NonMatching, "d_a_e_mf"),
ActorRel(NonMatching, "d_a_e_mk"),
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/JGeometry.h"
#include "JSystem/JSupport/JSUList.h"
#include "dolphin/gx/GXEnum.h"
#include <dolphin/gx.h>
#include "dolphin/mtx.h"
class J2DAnmBase;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef J2DTEVS_H
#define J2DTEVS_H
#include "dolphin/gx/GXStruct.h"
#include <dolphin/gx.h>
#include "dolphin/mtx.h"
/**
@@ -3,6 +3,7 @@
#include "JSystem/J3DGraphAnimator/J3DModelData.h"
#include "JSystem/JUtility/JUTNameTab.h"
#include "global.h"
struct JUTDataBlockHeader {
/* 0x0 */ u32 mType;
+2 -1
View File
@@ -1,6 +1,7 @@
#ifndef J3DGD_H
#define J3DGD_H
#include <dolphin/gx.h>
#include "dolphin/gd/GDBase.h"
inline void J3DGDWrite_u8(u8 param) {
@@ -116,7 +117,7 @@ inline void J3DGDSetNumTexGens(u8 numTexGens) {
J3DGDWriteXFCmd(0x103f, numTexGens);
}
inline void J3DGDSetTevKonstantSel_SwapModeTable(GXTevStageID stage, GXTevKColorSel colorSel1, GXTevKAlphaSel alphaSel1, GXTevKColorSel colorSel2, GXTevKAlphaSel alphaSel2, GXTevColor chan1, GXTevColor chan2) {
inline void J3DGDSetTevKonstantSel_SwapModeTable(GXTevStageID stage, GXTevKColorSel colorSel1, GXTevKAlphaSel alphaSel1, GXTevKColorSel colorSel2, GXTevKAlphaSel alphaSel2, GXTevColorChan chan1, GXTevColorChan chan2) {
J3DGDWriteBPCmd((stage / 2 + 0xf6) << 24 | (chan1 | chan2 << 2 | colorSel1 << 4 | alphaSel1 << 9 | colorSel2 << 14 | alphaSel2 << 19) & 0x00FFFFFF);
}
+2 -2
View File
@@ -16,13 +16,13 @@ public:
};
static inline void J3DFifoWriteCPCmd(u8 cmd, u32 param) {
GXWGFifo.u8 = GX_CMD_LOAD_CP_REG;
GXWGFifo.u8 = GX_LOAD_CP_REG;
GXWGFifo.u8 = cmd;
GXWGFifo.u32 = param;
}
static inline void J3DFifoWriteXFCmd(u16 cmd, u16 len) {
GXWGFifo.u8 = GX_CMD_LOAD_XF_REG;
GXWGFifo.u8 = GX_LOAD_XF_REG;
GXWGFifo.u16 = (len - 1);
GXWGFifo.u16 = cmd;
}
+2 -2
View File
@@ -1,9 +1,9 @@
#ifndef J3DSTRUCT_H
#define J3DSTRUCT_H
#include "dolphin/gx/GXStruct.h"
#include <dolphin/gx.h>
#include "dolphin/mtx.h"
#include "dolphin/mtx.h"
#include "dolphin/mtx/vec.h"
/**
* @ingroup jsystem-j3d
+2 -1
View File
@@ -1,7 +1,8 @@
#ifndef J3DSYS_H
#define J3DSYS_H
#include "dolphin/gx.h"
#include <dolphin/gx.h>
#include <dolphin/mtx.h>
// Perhaps move to a new J3DEnum.h?
enum J3DError {
+1 -1
View File
@@ -2,7 +2,7 @@
#define J3DTEVS_H
#include "dolphin/types.h"
#include "dolphin/gx/GXStruct.h"
#include <dolphin/gx.h>
#include "JSystem/J3DGraphBase/J3DGD.h"
/**
+3 -3
View File
@@ -13,7 +13,7 @@ struct J3DTextureSRTInfo;
struct J3DTransformInfo {
/* 0x00 */ Vec mScale;
/* 0x0C */ SVec mRotation;
/* 0x0C */ S16Vec mRotation;
/* 0x14 */ Vec mTranslate;
/* inline J3DTransformInfo& operator=(const J3DTransformInfo& b) {
@@ -162,7 +162,7 @@ inline void J3DPSMulMtxVec(register MtxP mtx, register Vec* vec, register Vec* d
}
// regalloc issues
inline void J3DPSMulMtxVec(register MtxP mtx, register SVec* vec, register SVec* dst) {
inline void J3DPSMulMtxVec(register MtxP mtx, register S16Vec* vec, register S16Vec* dst) {
register f32 fr12;
register f32 fr11;
register f32 fr10;
@@ -252,7 +252,7 @@ inline void J3DPSMulMtxVec(register Mtx3P mtx, register Vec* vec, register Vec*
}
// regalloc issues
inline void J3DPSMulMtxVec(register Mtx3P mtx, register SVec* vec, register SVec* dst) {
inline void J3DPSMulMtxVec(register Mtx3P mtx, register S16Vec* vec, register S16Vec* dst) {
register f32* punit;
register f32 unit;
register f32 fr6;
+2 -2
View File
@@ -1,8 +1,8 @@
#ifndef J3DVERTEX_H
#define J3DVERTEX_H
#include "dolphin/gx/GXAttr.h"
#include "dolphin/mtx/vec.h"
#include <dolphin/gx.h>
#include "dolphin/mtx.h"
typedef struct _GXColor GXColor;
class J3DModel;
@@ -3,7 +3,7 @@
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
#include "dolphin/gx/GXStruct.h"
#include <dolphin/gx.h>
class J3DMaterial;
@@ -3,7 +3,7 @@
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
#include "dolphin/gx/GXStruct.h"
#include <dolphin/gx.h>
class J3DMaterial;
struct J3DTexCoord2Info;
@@ -2,7 +2,7 @@
#define J3DSHAPEFACTORY_H
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
#include "dolphin/gx/GXAttr.h"
#include <dolphin/gx.h>
class J3DShape;
class J3DShapeMtx;
+1 -1
View File
@@ -6,7 +6,7 @@
#include "JSystem/JAudio2/JASOscillator.h"
#include "JSystem/JAudio2/JASSoundParams.h"
#include "JSystem/JAudio2/JASWaveInfo.h"
#include "dolphin/os/OSMessage.h"
#include <dolphin/os.h>
class JASDSPChannel;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JASCRITICALSECTION_H
#define JASCRITICALSECTION_H
#include "dolphin/os/OSInterrupt.h"
#include <dolphin/os.h>
/**
* @ingroup jsystem-jaudio
+2 -2
View File
@@ -3,8 +3,8 @@
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JSupport/JSUList.h"
#include "dolphin/os/OSInterrupt.h"
#include "dolphin/os/OSMutex.h"
#include <dolphin/os.h>
#include <dolphin/os.h>
class JASDisposer;
class JKRHeap;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef JASMUTEX_H
#define JASMUTEX_H
#include "dolphin/os/OSMutex.h"
#include <dolphin/os.h>
/**
* @ingroup jsystem-jaudio

Some files were not shown because too many files have changed in this diff Show More