Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions config/GZ2E01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ d/d_k_wpillar.cpp:
.sdata2 start:0x80454FF0 end:0x80455008

PowerPC_EABI_Support/Runtime/Src/__mem.c:
.init start:0x80003458 end:0x800035E4
.init start:0x80003458 end:0x80003590

DynamicLink.cpp:
.text start:0x802621CC end:0x802631D4
Expand Down Expand Up @@ -3601,7 +3601,7 @@ TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.
.text start:0x8036F548 end:0x8036F580

TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c:
.init start:0x800035E4 end:0x80005544
.init start:0x80003590 end:0x800035E4
.text start:0x8036F580 end:0x8036F638

TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c:
Expand All @@ -3610,13 +3610,17 @@ TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c:
.data start:0x803D3238 end:0x803D3268
.bss start:0x8044F290 end:0x8044F810

TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s:
.text start:0x803711D0 end:0x803711F0

TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c:
.text start:0x803711F0 end:0x80371560

TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s:
.init start:0x800035E4 end:0x80005518

TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c:
.init start:0x80005518 end:0x80005544
.text start:0x80371560 end:0x80371B9C
.data start:0x803D3268 end:0x803D32A8
.bss start:0x8044F810 end:0x8044F818
Expand Down
25 changes: 13 additions & 12 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
"-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",
"-i include/dolphin",
f"-DVERSION={version_num}",
"-D__GEKKO__",
]
Expand Down Expand Up @@ -245,7 +245,6 @@
*cflags_base,
"-use_lmw_stmw on",
"-str reuse,pool,readonly",
"-gccinc",
"-common off",
"-char signed",
]
Expand Down Expand Up @@ -291,7 +290,7 @@
"-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",
"-i include/dolphin",
f"-DVERSION={version_num}",
"-D__GEKKO__",
"-DSDK_REVISION=2",
Expand Down Expand Up @@ -484,6 +483,7 @@ def MatchingFor(*versions):
Object(MatchingFor("GZ2E01"), "f_pc/f_pc_draw.cpp"),
Object(MatchingFor("GZ2E01"), "f_pc/f_pc_fstcreate_req.cpp"),
Object(MatchingFor("GZ2E01"), "f_pc/f_pc_stdcreate_req.cpp"),
Object(NonMatching, "f_pc/f_pc_debug_sv.cpp"),
],
},
{
Expand Down Expand Up @@ -1276,10 +1276,10 @@ def MatchingFor(*versions):
Object(MatchingFor("GZ2E01"), "PowerPC_EABI_Support/Runtime/Src/__va_arg.c"),
Object(MatchingFor("GZ2E01"), "PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c"),
Object(MatchingFor("GZ2E01"), "PowerPC_EABI_Support/Runtime/Src/CPlusLibPPC.cp"),
Object(NonMatching, "PowerPC_EABI_Support/Runtime/Src/NMWException.cp"),
Object(MatchingFor("GZ2E01"), "PowerPC_EABI_Support/Runtime/Src/NMWException.cp", extra_cflags=["-Cpp_exceptions on"]),
Object(MatchingFor("GZ2E01"), "PowerPC_EABI_Support/Runtime/Src/ptmf.c"),
Object(MatchingFor("GZ2E01"), "PowerPC_EABI_Support/Runtime/Src/runtime.c"),
Object(NonMatching, "PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp"),
Object(MatchingFor("GZ2E01"), "PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp"),
Object(MatchingFor("GZ2E01"), "PowerPC_EABI_Support/Runtime/Src/Gecko_ExceptionPPC.cp"),
Object(MatchingFor("GZ2E01"), "PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c", extra_cflags=["-str reuse,nopool,readonly"]),
],
Expand Down Expand Up @@ -1370,11 +1370,12 @@ def MatchingFor(*versions):
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mutex_TRK.c"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/notify.c"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c"),
Object(NonMatching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c"),
Object(NonMatching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.c", extra_cflags=["-func_align 32"]),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c"),
Object(NonMatching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/main_TRK.c"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c"),
Object(MatchingFor("GZ2E01"), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/targcont.c"),
Expand Down Expand Up @@ -1402,12 +1403,12 @@ def MatchingFor(*versions):
},
{
"lib": "odemuexi2",
"mw_version": MWVersion(config.version),
"mw_version": "GC/1.2.5n",
"cflags": cflags_runtime,
"progress_category": "sdk",
"host": False,
"objects": [
Object(NonMatching, "odemuexi2/DebuggerDriver.c"),
Object(MatchingFor("GZ2E01"), "odemuexi2/DebuggerDriver.c"),
],
},
{
Expand All @@ -1431,7 +1432,7 @@ def MatchingFor(*versions):
"objects": [
Object(MatchingFor("GZ2E01"), "REL/executor.c"),
Object(
NonMatching,
MatchingFor("GZ2E01"),
"REL/global_destructor_chain.c",
source="PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c",
),
Expand Down Expand Up @@ -1658,7 +1659,7 @@ def MatchingFor(*versions):
ActorRel(MatchingFor("GZ2E01"), "d_a_e_ph"),
ActorRel(NonMatching, "d_a_e_pm"),
ActorRel(NonMatching, "d_a_e_po"),
ActorRel(NonMatching, "d_a_e_pz"),
ActorRel(Equivalent, "d_a_e_pz", extra_cflags=['-pragma "nosyminline off"']), # weak func order, inline issue
ActorRel(NonMatching, "d_a_e_rb"),
ActorRel(NonMatching, "d_a_e_rdb"),
ActorRel(NonMatching, "d_a_e_rdy"),
Expand Down
16 changes: 8 additions & 8 deletions include/d/actor/d_a_alink.h
Original file line number Diff line number Diff line change
Expand Up @@ -4904,14 +4904,14 @@ class daAlinkHIO_wallCatch_c0 {

class daAlinkHIO_wallHang_c1 {
public:
/* 0x00 */ s16 field_0x0;
/* 0x02 */ s16 field_0x2;
/* 0x04 */ f32 field_0x4;
/* 0x08 */ f32 field_0x8;
/* 0x0C */ f32 field_0xC;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ f32 field_0x14;
/* 0x18 */ f32 field_0x18;
/* 0x00 */ s16 small_jump_input_time;
/* 0x02 */ s16 grab_input_time;
/* 0x04 */ f32 auto_walk_height;
/* 0x08 */ f32 small_jump_height;
/* 0x0C */ f32 climb_height;
/* 0x10 */ f32 jump_climb_height;
/* 0x14 */ f32 jump_hang_height;
/* 0x18 */ f32 hang_foot_pos_height;
}; // Size: 0x1C

class daAlinkHIO_wallHang_c0 {
Expand Down
108 changes: 95 additions & 13 deletions include/d/actor/d_a_e_pz.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define D_A_E_PZ_H

#include "f_op/f_op_actor_mng.h"
#include "d/d_bg_s_acch.h"
#include "d/d_cc_d.h"
#include "d/d_cc_uty.h"

/**
* @ingroup actors-enemies
Expand All @@ -13,15 +16,24 @@
*/
class daE_PZ_c : public fopEn_enemy_c {
public:
void onBombArrowHit() { field_0x845 = 1; }
enum Action_e {
ACTION_SEARCH_POINT_e,
ACTION_OPENING_DEMO_e,
ACTION_WAIT_e,
ACTION_ATTACK_e,
ACTION_DAMAGE_e,
ACTION_DEAD_e,
};

/* 807585BC */ void draw();
void onBombArrowHit() { mBombArrowHit = true; }

/* 807585BC */ int draw();
/* 80758800 */ void setBck(int, u8, f32, f32);
/* 807588AC */ void setActionMode(int, int);
/* 807588B8 */ void mEntrySUB(bool);
/* 80758A94 */ void mPzScaleSet(bool);
/* 80758A94 */ bool mPzScaleSet(bool);
/* 80758BA0 */ void mEnemyScaleSet();
/* 80758D44 */ void getCutType();
/* 80758D44 */ u8 getCutType();
/* 80758DA4 */ void mSetFirePos();
/* 80758E04 */ void damage_check();
/* 807592F4 */ void executeSearchPoint();
Expand All @@ -38,23 +50,93 @@ class daE_PZ_c : public fopEn_enemy_c {
/* 8075F578 */ void fire_mtx_set();
/* 8075F734 */ void mtx_set();
/* 8075F7E8 */ void cc_set();
/* 8075F964 */ void execute();
/* 8075FA88 */ void _delete();
/* 8075FB4C */ void CreateHeap();
/* 8076010C */ void create();
/* 8075F964 */ int execute();
/* 8075FA88 */ int _delete();
/* 8075FB4C */ int CreateHeap();
/* 8076010C */ int create();
/* 807607EC */ daE_PZ_c();

private:
/* 0x5AC */ u8 field_0x5ac[0x845 - 0x5ac];
/* 0x845 */ u8 field_0x845;
/* 0x846 */ u8 field_0x846[0xef8 - 0x846];
/* 0x5AC */ request_of_phase_process_class mPhase;
/* 0x5B4 */ mDoExt_McaMorfSO* mpModelMorf;
/* 0x5B8 */ mDoExt_McaMorfSO* mpBallModelMorf;
/* 0x5BC */ J3DModel* mpPortalModel;
/* 0x5C0 */ mDoExt_btkAnm* mpPortalBtk;
/* 0x5C4 */ mDoExt_brkAnm* mpPortalBrk[2];
/* 0x5CC */ mDoExt_brkAnm* mpBallBrk;
/* 0x5D0 */ mDoExt_btkAnm* mpPzBtk;
/* 0x5D4 */ mDoExt_brkAnm* mpPzBrk;
/* 0x5D8 */ int field_0x5d8;
/* 0x5DC */ Z2CreatureEnemy field_0x5dc;
/* 0x680 */ int mActionMode;
/* 0x684 */ int mMoveMode;
/* 0x688 */ u32 mShadowKey;
/* 0x68C */ int mAnm;
/* 0x690 */ cXyz mPointPos[10];
/* 0x708 */ cXyz field_0x708[10];
/* 0x780 */ u8 field_0x780[10];
/* 0x78A */ u8 mPointNum;
/* 0x78B */ u8 mCurrentPoint;
/* 0x78C */ u8 field_0x78c;
/* 0x790 */ cXyz field_0x790;
/* 0x79C */ cXyz mPzScale;
/* 0x7A8 */ cXyz field_0x7a8;
/* 0x7B4 */ u8 field_0x7B4[0x7BC - 0x7B4];
/* 0x7BC */ f32 field_0x7bc;
/* 0x7C0 */ f32 field_0x7c0;
/* 0x7C4 */ f32 field_0x7c4;
/* 0x7C8 */ f32 field_0x7c8;
/* 0x7CC */ f32 field_0x7cc;
/* 0x7D0 */ u8 field_0x7d0;
/* 0x7D1 */ u8 field_0x7d1;
/* 0x7D2 */ u8 field_0x7d2;
/* 0x7D3 */ u8 field_0x7d3;
/* 0x7D4 */ u8 arg0;
/* 0x7D5 */ u8 arg1;
/* 0x7D6 */ u8 bitSw;
/* 0x7D7 */ u8 field_0x7d7;
/* 0x7D8 */ u8 field_0x7d8;
/* 0x7DC */ fpc_ProcID field_0x7dc[25];
/* 0x840 */ u8 field_0x840;
/* 0x841 */ u8 field_0x841;
/* 0x842 */ u8 field_0x842;
/* 0x843 */ u8 field_0x843;
/* 0x844 */ u8 field_0x844;
/* 0x845 */ u8 mBombArrowHit;
/* 0x846 */ u8 field_0x846;
/* 0x847 */ u8 field_0x847;
/* 0x848 */ u8 field_0x848;
/* 0x84C */ int field_0x84c;
/* 0x850 */ dBgS_AcchCir mAcchCir;
/* 0x890 */ dBgS_ObjAcch mAcch;
/* 0xA68 */ u32 field_0xa68[3];
/* 0xA74 */ u32 field_0xa74[2];
/* 0xA7C */ u8 field_0xA7C[0xAB4 - 0xA7C];
/* 0xAB4 */ u32 field_0xab4[2];
/* 0xABC */ cXyz mDemoCameraEye;
/* 0xAC8 */ cXyz mDemoCameraCenter;
/* 0xAD4 */ dCcD_Stts mColliderStts;
/* 0xB10 */ dCcD_Cyl mCylCollider;
/* 0xC4C */ dCcD_Cyl mWarpCylCollider;
/* 0xD88 */ dCcD_Sph mBulletAtCollider;
/* 0xEC0 */ dCcU_AtInfo mAtInfo;
/* 0xEE4 */ u8 mInitHIO;
/* 0xEE5 */ u8 field_0xee5[0xEF8 - 0xEE5];
};

STATIC_ASSERT(sizeof(daE_PZ_c) == 0xEF8);

class daE_PZ_HIO_c {
public:
/* 8075856C */ daE_PZ_HIO_c();
/* 80760C60 */ ~daE_PZ_HIO_c();
/* 80760C60 */ virtual ~daE_PZ_HIO_c() {}

/* 0x04 */ s8 no;
/* 0x08 */ f32 body_model_size;
/* 0x0C */ f32 portal_model_size;
/* 0x10 */ f32 bullet_speed;
/* 0x14 */ f32 weapon_hit_warp_speed;
/* 0x18 */ s16 after_attack_wait_time;
/* 0x1A */ s16 blur_start_timing;
};


Expand Down
1 change: 1 addition & 0 deletions include/d/actor/d_a_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ class daPy_py_c : public fopAc_ac_c {
void offPressedDamage() { offNoResetFlg2(FLG2_PRESSED_DAMAGE); }
void onForceSubjectCancel() { onEndResetFlg0(ERFLG0_FORCE_SUBJECT_CANCEL); }
void onEnemyDead() { onEndResetFlg0(ERFLG0_ENEMY_DEAD); }
void offDkCaught2() { offNoResetFlg0(FLG0_UNK_20000); }

u32 checkBoarSingleBattle() const { return checkNoResetFlg2(daPy_FLG2(FLG2_UNK_1000000 | FLG2_BOAR_SINGLE_BATTLE)); }
u32 checkWolfDashAutoJump() const { return checkNoResetFlg2(FLG2_WOLF_DASH_AUTO_JUMP); }
Expand Down
2 changes: 2 additions & 0 deletions include/f_pc/f_pc_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ int fpcBs_Delete(base_process_class* i_proc);
base_process_class* fpcBs_Create(s16 i_profname, fpc_ProcID i_procID, void* i_append);
int fpcBs_SubCreate(base_process_class* i_proc);

extern int g_fpcBs_type;

#endif
4 changes: 2 additions & 2 deletions include/f_pc/f_pc_create_req.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ typedef struct create_request {
/* 0x44 */ layer_class* layer;
} create_request; // Size: 0x48

bool fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_id);
BOOL fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_id);
BOOL fpcCtRq_IsCreatingByID(fpc_ProcID i_id);
void fpcCtRq_CreateQTo(create_request* i_request);
void fpcCtRq_ToCreateQ(create_request* i_request);
BOOL fpcCtRq_Delete(create_request* i_request);
BOOL fpcCtRq_Cancel(create_request* i_request);
BOOL fpcCtRq_IsDoing(create_request* i_request);
void fpcCtRq_Handler();
int fpcCtRq_Handler();
create_request* fpcCtRq_Create(layer_class* i_layer, u32 i_size,
create_request_method_class* i_methods);

Expand Down
2 changes: 1 addition & 1 deletion include/f_pc/f_pc_creator.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ typedef struct base_process_class base_process_class;
BOOL fpcCt_IsCreatingByID(fpc_ProcID id);
BOOL fpcCt_IsDoing(base_process_class* pProc);
BOOL fpcCt_Abort(base_process_class* pProc);
void fpcCt_Handler();
int fpcCt_Handler();

#endif
16 changes: 16 additions & 0 deletions include/f_pc/f_pc_debug_sv.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

#ifndef F_PC_DEBUG_SV_H_
#define F_PC_DEBUG_SV_H_

#include <dolphin.h>

#ifdef DEBUG

char* fpcDbSv_getNameString(s16 i_name);

typedef void (*fpcDbSv_callback)(void* i_process);
extern const fpcDbSv_callback g_fpcDbSv_service[50];

#endif

#endif
2 changes: 1 addition & 1 deletion include/f_pc/f_pc_layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ s32 fpcLy_ToQueue(layer_class* i_layer, int treeListIdx, create_tag_class* i_cre
s32 fpcLy_QueueTo(layer_class* i_layer, create_tag_class* i_createTag);

int fpcLy_Cancel(layer_class* i_layer);
bool fpcLy_CancelMethod(process_method_tag_class* i_layer);
BOOL fpcLy_CancelMethod(process_method_tag_class* i_layer);

void fpcLy_CancelQTo(process_method_tag_class* i_methods);
s32 fpcLy_ToCancelQ(layer_class* i_layer, process_method_tag_class* i_methods);
Expand Down
4 changes: 4 additions & 0 deletions include/f_pc/f_pc_node_req.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ typedef struct node_create_request {
/* 0x58 */ s16 name;
/* 0x5C */ void* data;
/* 0x60 */ s16 unk_0x60;
#ifdef DEBUG
/* 0x64 */ int unk_0x64;
/* 0x68 */ int unk_0x68;
#endif
} node_create_request; // Size: 0x64

typedef struct request_node_class {
Expand Down
8 changes: 4 additions & 4 deletions include/f_pc/f_pc_priority.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ enum {
fpcPi_NONE_e = 0xFFFF,
};

typedef struct process_priority_queue_info {
typedef struct priority_id {
/* 0x0 */ unsigned int layer_id;
/* 0x4 */ u16 list_id;
/* 0x6 */ u16 list_priority;
} process_priority_queue_info;
} priority_id;

typedef struct process_priority_class {
/* 0x00 */ create_tag_class base;
/* 0x14 */ process_method_tag_class method_tag;
/* 0x30 */ process_priority_queue_info queue_info;
/* 0x38 */ process_priority_queue_info current_info;
/* 0x30 */ priority_id queue_info;
/* 0x38 */ priority_id current_info;
} process_priority_class;

s32 fpcPi_IsInQueue(process_priority_class* pPi);
Expand Down
Loading