mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-19 15:20:29 -04:00
Port over fault.c from oot decomp
This commit is contained in:
@@ -20,16 +20,19 @@ build/src/libultra/%: CC := $(QEMU_IRIX) -L $(IRIX_53_ROOT) $(IRIX_53_ROOT)/usr/
|
||||
build/src/libultra/%: CFLAGS := $(CFLAGS) -Wab,-r4300_mul
|
||||
build/src/boot_O1/%: OPTIMIZATION := -O1
|
||||
build/src/boot_O2_g3/%: OPTIMIZATION := -O2 -g3
|
||||
build/src/boot_O2_g3_trapuv/%: OPTIMIZATION := -O2 -g3
|
||||
build/src/code/%: CFLAGS := $(CFLAGS) -Wab,-r4300_mul
|
||||
build/src/actors/%: CFLAGS := $(CFLAGS) -Wab,-r4300_mul
|
||||
build/src/boot_O2_g3_trapuv/%: CFLAGS := $(CFLAGS) -trapuv
|
||||
test.txt: OPTIMIZATION := -O2 -g3
|
||||
test.txt: CC := $(QEMU_IRIX) -L $(IRIX_71_ROOT) $(IRIX_71_ROOT)/usr/bin/cc
|
||||
test.txt: CFLAGS := $(CFLAGS) -Wab,-r4300_mul
|
||||
test.txt: CFLAGS := $(CFLAGS) -Wab,-r4300_mul -trapuv
|
||||
|
||||
CC := $(QEMU_IRIX) -L $(IRIX_71_ROOT) $(IRIX_71_ROOT)/usr/bin/cc
|
||||
|
||||
test.txt: CC := ./tools/preprocess.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
build/src/boot_O2_g3/%: CC := ./tools/preprocess.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
build/src/boot_O2_g3_trapuv/%: CC := ./tools/preprocess.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
build/src/code/%: CC := ./tools/preprocess.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
build/src/actors/%: CC := ./tools/preprocess.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
|
||||
@@ -53,6 +56,7 @@ C_FILES := $(wildcard src/libultra/*) \
|
||||
$(wildcard src/libultra/gu/*) \
|
||||
$(wildcard src/code/*) \
|
||||
$(wildcard src/boot_O2_g3/*) \
|
||||
$(wildcard src/boot_O2_g3_trapuv/*) \
|
||||
$(wildcard src/boot_O1/*) \
|
||||
$(wildcard src/actors/Bg_Fu_Kaiten/*) \
|
||||
$(wildcard src/actors/Bg_Ikana_Ray/*)
|
||||
@@ -79,6 +83,7 @@ $(shell mkdir -p $(BUILD_DIR)/src/libultra/libc)
|
||||
$(shell mkdir -p $(BUILD_DIR)/src/libultra/gu)
|
||||
$(shell mkdir -p $(BUILD_DIR)/src/code)
|
||||
$(shell mkdir -p $(BUILD_DIR)/src/boot_O2_g3)
|
||||
$(shell mkdir -p $(BUILD_DIR)/src/boot_O2_g3_trapuv)
|
||||
$(shell mkdir -p $(BUILD_DIR)/src/boot_O1)
|
||||
$(shell mkdir -p $(BUILD_DIR)/src/actors/Bg_Fu_Kaiten)
|
||||
$(shell mkdir -p $(BUILD_DIR)/src/actors/Bg_Ikana_Ray)
|
||||
|
||||
+62
-59
@@ -51,64 +51,64 @@ void func_800818F4(void); // func_800818F4
|
||||
void Fault_Nop80081920(UNK_TYPE4 param_1, ...); // func_80081920
|
||||
void Fault_Log(char* str, ...); // func_8008193C
|
||||
void Fault_Nop80081958(UNK_TYPE4 param_1, ...); // func_80081958
|
||||
void Fault_WaitMilliseconds2(u32 ms); // func_80081980
|
||||
void Fault_AddClient(FaultClient* client, fault_client_func* func, void* arg1, void* arg2); // func_800819F0
|
||||
void Fault_SleepImpl(u32 duration); // func_80081980
|
||||
void Fault_AddClient(FaultClient* client, fault_client_func callback, void* param0, void* param1); // func_800819F0
|
||||
void Fault_RemoveClient(FaultClient* client); // func_80081AD4
|
||||
void Fault_AddressConverterAddClient(FaultAddressConverterClient* client, fault_address_converter_func* func, void* arg); // func_80081BCC
|
||||
void Fault_AddressConverterRemoveClient(FaultAddressConverterClient* client); // func_80081CA4
|
||||
void Fault_AddAddrConvClient(FaultAddrConvClient* client, fault_address_converter_func callback, void* param); // func_80081BCC
|
||||
void Fault_RemoveAddrConvClient(FaultAddrConvClient* client); // func_80081CA4
|
||||
void* Fault_ConvertAddress(void* addr); // func_80081D9C
|
||||
void Fault_WaitMilliseconds(u32 ms); // func_80081E2C
|
||||
void Fault_UpdateInputFunc(InputStruct* input); // func_80081E68
|
||||
void Fault_InputUpdate(void); // func_80081EA4
|
||||
s32 Fault_WaitForInput(void); // func_80081EF0
|
||||
void Fault_PageEnd(void); // func_8008203C
|
||||
void Fault_DrawRectangle(s32 x, s32 y, s32 width, s32 height, u16 color); // func_80082078
|
||||
void Fault_DrawBlackPage(void); // func_800820D8
|
||||
void Fault_DrawRedPage(void); // func_8008212C
|
||||
void Fault_DrawTextCaret(u16 color); // func_80082180
|
||||
void Fault_PrintFloatToScreen(u32 regNum, f32* f); // func_800821D4
|
||||
void Fault_LogFloat(u32 regNum, f32* f); // func_80082280
|
||||
void Fault_PrintFpcCsrToScreen(u32 fpcCsr); // func_80082330
|
||||
void Fault_LogFpcCsr(u32 fpcCsr); // func_800823D4
|
||||
void Fault_PrintCpuRegistersToScreen(OSThread* thread); // func_8008246C
|
||||
void Fault_LogCpuRegisters(OSThread* thread); // func_800827BC
|
||||
void Fault_Sleep(u32 duration); // func_80081E2C
|
||||
void Fault_PadCallback(Input* input); // func_80081E68
|
||||
void Fault_UpdatePadImpl(void); // func_80081EA4
|
||||
s32 Fault_WaitForInputImpl(void); // func_80081EF0
|
||||
void Fault_WaitForInput(void); // func_8008203C
|
||||
void Fault_DrawRec(s32 x, s32 y, s32 w, s32 h, u16 color); // func_80082078
|
||||
void Fault_FillScreenBlack(void); // func_800820D8
|
||||
void Fault_FillScreenRed(void); // func_8008212C
|
||||
void Fault_DrawCornerRec(u16 color); // func_80082180
|
||||
void Fault_PrintFReg(s32 idx, f32* value); // func_800821D4
|
||||
void Fault_LogFReg(s32 idx, f32* value); // func_80082280
|
||||
void Fault_PrintFPCR(u32 value); // func_80082330
|
||||
void Fault_LogFPCR(u32 value); // func_800823D4
|
||||
void Fault_PrintThreadContext(OSThread* t); // func_8008246C
|
||||
void Fault_LogThreadContext(OSThread* t); // func_800827BC
|
||||
OSThread* Fault_FindFaultedThread(void); // func_80082AB8
|
||||
void Fault_Wait5Seconds(void); // func_80082B40
|
||||
void Fault_WaitForButtonCombo(void); // func_80082BD0
|
||||
void Fault_PrintMemDumPage(char* title, void* start, u32 param_3); // func_80082C6C
|
||||
void Fault_MemDump(void* startPc, void* start1, void* start2, void* start3); // func_80082DD8
|
||||
void Fault_DrawMemDumpPage(char* title, u32* addr, u32 param_3); // func_80082C6C
|
||||
void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1); // func_80082DD8
|
||||
void Fault_FindNextStackCall(u32** sp, u32** pc, u32** ra); // func_80082FD0
|
||||
void Fault_PrintStackTraceToScreen(OSThread* thread, u32 flags); // func_80083144
|
||||
void Fault_LogStackTrace(OSThread* thread, u32 flags); // func_800832D4
|
||||
void Fault_SetNextInstBreak(OSThread* thread); // func_80083450
|
||||
void Fault_ResetFramebuffer(void); // func_800834CC
|
||||
void Fault_PrintClients(void); // func_8008358C
|
||||
void Fault_DrawStackTrace(OSThread* t, u32 flags); // func_80083144
|
||||
void Fault_LogStackTrace(OSThread* t, u32 flags); // func_800832D4
|
||||
void Fault_ResumeThread(OSThread* t); // func_80083450
|
||||
void Fault_CommitFB(void); // func_800834CC
|
||||
void Fault_ProcessClients(void); // func_8008358C
|
||||
void Fault_SetOptionsFromController3(void); // func_80083670
|
||||
void Fault_SetOptions(void); // func_800837E4
|
||||
void Fault_ThreadEntry(void* arg); // func_80083828
|
||||
void Fault_SetFramebuffer(void* framebuffer, u16 width, u16 height); // func_80083B70
|
||||
void Fault_SetFB(void* fb, u16 w, u16 h); // func_80083B70
|
||||
void Fault_Start(void); // func_80083BC4
|
||||
void Fault_HungUpThreadPrint(char* arg1, char* arg2); // func_80083CF8
|
||||
void Fault_HungUpThead(char* arg1, char* arg2); // func_80083DF4
|
||||
void Fault_AssertFail(char* file, s32 lineNum); // func_80083E4C
|
||||
void FaultDraw_SetCopyToLog(u8 copy); // func_80083EB0
|
||||
void FaultDraw_DrawRectangle(s32 leftX, s32 upperY, s32 rightX, s32 lowerY, u16 color); // func_80083EC4
|
||||
void FaultDraw_DrawChar(u8 c); // func_80083FE4
|
||||
s32 FaultDraw_FindColorIndex(u16 color); // func_80084160
|
||||
void FaultDraw_UpdatePrintColors(void); // func_80084210
|
||||
void FaultDraw_SetForgroundColor(u16 color); // func_800842BC
|
||||
void FaultDraw_SetBackgroundColor(u16 color); // func_80084308
|
||||
void FaultDraw_SetForegroundColorWithAlpha(u16 color); // func_80084354
|
||||
void FaultDraw_SetCharPadding(s8 x, s8 y); // func_8008439C
|
||||
void FaultDraw_SetCursor(s32 x, int y); // func_800843D4
|
||||
void FaultDraw_Reset(void); // func_800844D8
|
||||
FaultDrawContext* FaultDraw_PrintfFunc(FaultDrawContext* arg, char* fmt, size_t n); // func_80084568
|
||||
void FaultDraw_PrintfImpl(char* str, char* args); // func_8008477C
|
||||
void FaultDraw_Printf(char* uParm1, ...); // func_800847CC
|
||||
void FaultDraw_DrawText(s32 x, s32 y, char* str, ...); // func_8008481C
|
||||
void FaultDraw_SetFramebuffer(void* framebuffer, u16 width, u16 height); // func_8008486C
|
||||
void FaultDraw_SetPageEndFunc(func_ptr* func); // func_800848A4
|
||||
void FaultDraw_Init(void); // func_800848B8
|
||||
void Fault_HangupFaultClient(char* arg0, char* arg1); // func_80083CF8
|
||||
void Fault_AddHungupAndCrashImpl(char* arg0, char* arg1); // func_80083DF4
|
||||
void Fault_AddHungupAndCrash(char* filename, u32 line); // func_80083E4C
|
||||
void FaultDrawer_SetOsSyncPrintfEnabled(u32 enabled); // func_80083EB0
|
||||
void FaultDrawer_DrawRecImpl(s32 xstart, s32 ystart, s32 xend, s32 yend, u16 color); // func_80083EC4
|
||||
void FaultDrawer_DrawChar(char c); // func_80083FE4
|
||||
s32 FaultDrawer_ColorToPrintColor(u16 color); // func_80084160
|
||||
void FaultDrawer_UpdatePrintColor(void); // func_80084210
|
||||
void FaultDrawer_SetForeColor(u16 color); // func_800842BC
|
||||
void FaultDrawer_SetBackColor(u16 color); // func_80084308
|
||||
void FaultDrawer_SetFontColor(u16 color); // func_80084354
|
||||
void FaultDrawer_SetCharPad(s8 padW, s8 padH); // func_8008439C
|
||||
void FaultDrawer_SetCursor(s32 x, s32 y); // func_800843D4
|
||||
void FaultDrawer_FillScreen(void); // func_800844D8
|
||||
FaultDrawer* FaultDrawer_FormatStringFunc(FaultDrawer* arg, char* str, s32 count); // func_80084568
|
||||
void FaultDrawer_VPrintf(char* str, char* args); // func_8008477C
|
||||
void FaultDrawer_Printf(char* fmt, ...); // func_800847CC
|
||||
void FaultDrawer_DrawText(s32 x, s32 y, char* fmt, ...); // func_8008481C
|
||||
void FaultDrawer_SetDrawerFB(void* fb, u16 w, u16 h); // func_8008486C
|
||||
void FaultDrawer_SetInputCallback(func_ptr func); // func_800848A4
|
||||
void FaultDrawer_Init(void); // func_800848B8
|
||||
void func_80084940(void); // func_80084940
|
||||
void func_80084968(void); // func_80084968
|
||||
void func_800849A0(void); // func_800849A0
|
||||
@@ -291,7 +291,7 @@ void __osSiRelAccess(void); // func_80089B34
|
||||
s32 osContInit(OSMesgQueue* mq, u8* bitpattern, OSContStatus* data); // func_80089B60
|
||||
void __osContGetInitData(u8* pattern, OSContStatus* data); // func_80089CBC
|
||||
void __osPackRequestData(u8 cmd); // func_80089D68
|
||||
void osCreateThread(OSThread* t, OSId id, osCreateThread_func* entry, void* arg, void* sp, OSPri p); // func_80089E40
|
||||
void osCreateThread(OSThread* t, OSId id, osCreateThread_func entry, void* arg, void* sp, OSPri p); // func_80089E40
|
||||
void osContStartReadData(void); // func_80089F90
|
||||
void osContGetReadData(void); // func_8008A014
|
||||
void __osPackReadData(void); // func_8008A0A0
|
||||
@@ -352,7 +352,7 @@ s32 osContStartQuery(OSMesgQueue* mq); // func_8008D730
|
||||
void osContGetQuery(OSContStatus* data); // func_8008D7AC
|
||||
void guLookAtHiliteF(f32* mf, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 twidth, s32 theight); // func_8008D7D0
|
||||
void guLookAtHilite(Mtx* m, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 twidth, s32 theight); // func_8008DF90
|
||||
int _Printf(printf_func* pfn, void* arg, char* fmt, char* ap); // func_8008E050
|
||||
int _Printf(printf_func pfn, void* arg, char* fmt, char* ap); // func_8008E050
|
||||
void func_8008E698(void); // func_8008E698
|
||||
void func_8008ED30(void); // func_8008ED30
|
||||
void osUnmapTLBAll(void); // func_8008EDE0
|
||||
@@ -477,6 +477,7 @@ void func_80096410(void); // func_80096410
|
||||
void func_800964D0(void); // func_800964D0
|
||||
s32 __osSpSetPc(u32 data); // func_80096510
|
||||
void func_80096540(void); // func_80096540
|
||||
// UNK_RET func_80096770(UNK_ARGS);
|
||||
void func_800967A0(void); // func_800967A0
|
||||
u32 __osGetWatchLo(void); // func_80096810
|
||||
void __osSetWatchLo(u32 value); // func_80096820
|
||||
@@ -658,7 +659,7 @@ void func_800B3644(void); // func_800B3644
|
||||
void DLF_LoadGameState(GameStateMetaInfo* gameState); // func_800B3880
|
||||
void DLF_FreeGameState(GameStateMetaInfo* gameState); // func_800B39A4
|
||||
void Actor_PrintLists(ActorContext* actCtxt); // func_800B3AD0
|
||||
void Actor_SetDrawParams(ActorDrawParams* iParm1, f32 yDisplacement, actor_post_draw_func* func, f32 scale); // func_800B3BA4
|
||||
void Actor_SetDrawParams(ActorDrawParams* iParm1, f32 yDisplacement, actor_post_draw_func func, f32 scale); // func_800B3BA4
|
||||
void Actor_PostDraw(Actor* actor, LightMapper* mapper, GlobalContext* ctxt, u32 displayList, ColorRGBA8* color); // func_800B3BC8
|
||||
void func_800B3FC0(Actor* actor, LightMapper* mapper, GlobalContext* ctxt); // func_800B3FC0
|
||||
void func_800B4024(Actor* actor, LightMapper* mapper, GlobalContext* ctxt); // func_800B4024
|
||||
@@ -2172,7 +2173,7 @@ s32 func_801224E0(s32 param_1, s16 param_2, s16 param_3); // func_801224E0
|
||||
void func_80122524(void); // func_80122524
|
||||
void func_801225CC(void); // func_801225CC
|
||||
void func_80122660(void); // func_80122660
|
||||
UNK_TYPE4 func_80122670(int* param_1, InputStruct* input); // func_80122670
|
||||
UNK_TYPE4 func_80122670(int* param_1, Input* input); // func_80122670
|
||||
void func_801226E0(void); // func_801226E0
|
||||
void func_80122744(void); // func_80122744
|
||||
void func_80122760(void); // func_80122760
|
||||
@@ -3019,7 +3020,7 @@ void func_8016E40C(void); // func_8016E40C
|
||||
void func_8016EA90(void); // func_8016EA90
|
||||
void func_8016F1A8(void); // func_8016F1A8
|
||||
void func_8016F4EC(void); // func_8016F4EC
|
||||
void func_8016F5A8(GlobalContext* ctxt, s8* pcParm2, InputStruct* iParm3); // func_8016F5A8
|
||||
void func_8016F5A8(GlobalContext* ctxt, s8* pcParm2, Input* iParm3); // func_8016F5A8
|
||||
void func_8016FC78(void); // func_8016FC78
|
||||
void func_8016FC98(void); // func_8016FC98
|
||||
void func_8016FCF0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // func_8016FCF0
|
||||
@@ -3101,7 +3102,7 @@ void Game_Update(ContextCommon* ctxt); // func_8017377C
|
||||
void Game_IncrementFrameCount(ContextCommon* ctxt); // func_801737E4
|
||||
void Game_InitHeap(ContextCommon* ctxt, u32 size); // func_80173810
|
||||
void Game_ResizeHeap(ContextCommon* ctxt, u32 size); // func_80173880
|
||||
void Game_StateInit(ContextCommon* ctxt, func_ptr* gameStateInit, GraphicsContext* gCtxt); // func_80173950
|
||||
void Game_StateInit(ContextCommon* ctxt, func_ptr gameStateInit, GraphicsContext* gCtxt); // func_80173950
|
||||
void Game_StateFini(ContextCommon* ctxt); // func_80173A50
|
||||
UNK_TYPE4 Game_GetNextStateInit(ContextCommon* ctxt); // func_80173B00
|
||||
u32 Game_GetNextStateSize(ContextCommon* ctxt); // func_80173B0C
|
||||
@@ -3150,15 +3151,15 @@ void func_80175434(void); // func_80175434
|
||||
void func_8017544C(void); // func_8017544C
|
||||
void func_80175474(void); // func_80175474
|
||||
void func_801754C0(void); // func_801754C0
|
||||
void Padmgr_CalcStickEdges(InputStruct* input); // func_801754E0
|
||||
void Padmgr_CalcStickEdges(Input* input); // func_801754E0
|
||||
void Padmgr_ParseState(void); // func_801757A4
|
||||
void func_801759BC(void); // func_801759BC
|
||||
void func_80175AE0(void); // func_80175AE0
|
||||
void Padmgr_Update(void); // func_80175C80
|
||||
void Padmgr_Stop(void); // func_80175E3C
|
||||
void func_80175E68(InputStruct* input, int param_2); // func_80175E68
|
||||
void Padmgr_GetInput(InputStruct* input, int param_2); // func_80175F98
|
||||
void Padmgr_GetInput2(InputStruct* input, int param_2); // func_80175FD4
|
||||
void func_80175E68(Input* input, int param_2); // func_80175E68
|
||||
void Padmgr_GetInput(Input* input, int param_2); // func_80175F98
|
||||
void Padmgr_GetInput2(Input* input, int param_2); // func_80175FD4
|
||||
void Padmgr_ThreadEntry(PadmgrThreadStruct* padmgr); // func_80176010
|
||||
void Padmgr_Start(OSMesgQueue* siEventCallbackQueue, Irqmgr* irqmgr, OSId threadId, OSPri threadPri, void* stack); // func_80176194
|
||||
void func_80176280(void); // func_80176280
|
||||
@@ -3728,6 +3729,8 @@ void func_8019AB40(void); // func_8019AB40
|
||||
void func_8019AC10(void); // func_8019AC10
|
||||
void func_8019ACEC(void); // func_8019ACEC
|
||||
void func_8019ADBC(void); // func_8019ADBC
|
||||
// UNK_RET func_8019AE40(UNK_ARGS);
|
||||
// UNK_RET func_8019AEC0(UNK_ARGS);
|
||||
void func_8019AF00(void); // func_8019AF00
|
||||
void func_8019AF58(void); // func_8019AF58
|
||||
void func_8019AFE8(void); // func_8019AFE8
|
||||
@@ -6884,7 +6887,7 @@ void func_809200F8(void); // func_809200F8
|
||||
void func_80920140(void); // func_80920140
|
||||
void func_80920164(void); // func_80920164
|
||||
void func_809201BC(void); // func_809201BC
|
||||
void FireArrow_SetUpdateFunc(ActorArrowFire* this, actor_func* update); // func_80920340
|
||||
void FireArrow_SetUpdateFunc(ActorArrowFire* this, actor_func update); // func_80920340
|
||||
void ArrowFire_Init(ActorArrowFire* this, GlobalContext* ctxt); // func_8092034C
|
||||
void ArrowFire_Fini(ActorArrowFire* this, GlobalContext* ctxt); // func_809203F8
|
||||
void FireArrow_Update1(ActorArrowFire* pzParm1); // func_80920440
|
||||
|
||||
+45
-45
@@ -381,13 +381,6 @@ typedef struct {
|
||||
/* 0x5 */ UNK_TYPE1 pad5[1];
|
||||
} InputInfo;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ InputInfo current;
|
||||
/* 0x06 */ InputInfo last;
|
||||
/* 0x0C */ InputInfo pressEdge;
|
||||
/* 0x12 */ InputInfo releaseEdge;
|
||||
} InputStruct;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x2 */ u16 params[6];
|
||||
@@ -707,8 +700,6 @@ typedef void*(*fault_address_converter_func)(void* addr, void* arg);
|
||||
|
||||
typedef void(*fault_client_func)(void* arg1, void* arg2);
|
||||
|
||||
typedef void(*fault_update_input_func)(InputStruct* input);
|
||||
|
||||
typedef unsigned long(*func)(void);
|
||||
|
||||
typedef void(*func_ptr)(void);
|
||||
@@ -934,27 +925,27 @@ typedef union {
|
||||
} F3DVertex;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ void* framebuffer;
|
||||
/* 0x04 */ u16 width;
|
||||
/* 0x06 */ u16 height;
|
||||
/* 0x08 */ u16 minY;
|
||||
/* 0x0A */ u16 maxY;
|
||||
/* 0x0C */ u16 minX;
|
||||
/* 0x0E */ u16 maxX;
|
||||
/* 0x10 */ u16 foregroundColor;
|
||||
/* 0x12 */ u16 backgroundColor;
|
||||
/* 0x00 */ void* fb;
|
||||
/* 0x04 */ u16 w;
|
||||
/* 0x06 */ u16 h;
|
||||
/* 0x08 */ u16 yStart;
|
||||
/* 0x0A */ u16 yEnd;
|
||||
/* 0x0C */ u16 xStart;
|
||||
/* 0x0E */ u16 xEnd;
|
||||
/* 0x10 */ u16 foreColor;
|
||||
/* 0x12 */ u16 backColor;
|
||||
/* 0x14 */ u16 cursorX;
|
||||
/* 0x16 */ u16 cursorY;
|
||||
/* 0x18 */ u32* font;
|
||||
/* 0x1C */ u8 charWidth;
|
||||
/* 0x1D */ u8 charHeight;
|
||||
/* 0x1E */ s8 charXPad;
|
||||
/* 0x1F */ s8 charYPad;
|
||||
/* 0x20 */ u16 foregroundColors[10];
|
||||
/* 0x34 */ u8 nextCharSetsForeground;
|
||||
/* 0x35 */ u8 copyToLog;
|
||||
/* 0x38 */ func_ptr pageEndFunc;
|
||||
} FaultDrawContext;
|
||||
/* 0x1C */ u8 charW;
|
||||
/* 0x1D */ u8 charH;
|
||||
/* 0x1E */ s8 charWPad;
|
||||
/* 0x1F */ s8 charHPad;
|
||||
/* 0x20 */ u16 printColors[10];
|
||||
/* 0x34 */ u8 escCode;
|
||||
/* 0x35 */ u8 osSyncPrintfEnabled;
|
||||
/* 0x38 */ func_ptr inputCallback;
|
||||
} FaultDrawer;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u16 cycleLength;
|
||||
@@ -987,6 +978,13 @@ typedef struct {
|
||||
/* 0x10 */ Vector3f unk10;
|
||||
} GlobalContext1F78;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ InputInfo current;
|
||||
/* 0x06 */ InputInfo last;
|
||||
/* 0x0C */ InputInfo pressEdge;
|
||||
/* 0x12 */ InputInfo releaseEdge;
|
||||
} Input;
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 type;
|
||||
/* 0x2 */ LightInfoDirectionalParams params;
|
||||
@@ -1089,6 +1087,8 @@ typedef struct {
|
||||
/* 0x164 */ UNK_TYPE1 pad164[4];
|
||||
} View;
|
||||
|
||||
typedef void(*fault_update_input_func)(Input* input);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vector3s min;
|
||||
/* 0x06 */ Vector3s max;
|
||||
@@ -1467,12 +1467,12 @@ typedef struct EffFootmark EffFootmark;
|
||||
|
||||
typedef struct EffectTableInfo EffectTableInfo;
|
||||
|
||||
typedef struct FaultAddressConverterClient FaultAddressConverterClient;
|
||||
typedef struct FaultAddrConvClient FaultAddrConvClient;
|
||||
|
||||
struct FaultAddressConverterClient {
|
||||
/* 0x0 */ FaultAddressConverterClient* next;
|
||||
/* 0x4 */ fault_address_converter_func func;
|
||||
/* 0x8 */ void* arg;
|
||||
struct FaultAddrConvClient {
|
||||
/* 0x0 */ FaultAddrConvClient* next;
|
||||
/* 0x4 */ fault_address_converter_func callback;
|
||||
/* 0x8 */ void* param;
|
||||
};
|
||||
|
||||
typedef struct FaultClient FaultClient;
|
||||
@@ -1480,26 +1480,26 @@ typedef struct FaultClient FaultClient;
|
||||
struct FaultClient {
|
||||
/* 0x0 */ FaultClient* next;
|
||||
/* 0x4 */ fault_client_func callback;
|
||||
/* 0x8 */ void* arg1;
|
||||
/* 0xC */ void* arg2;
|
||||
/* 0x8 */ void* param0;
|
||||
/* 0xC */ void* param1;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ OSThread thread;
|
||||
/* 0x1B0 */ u8 stack[1536]; // Seems leftover from an earlier version. The thread actually uses a stack of this size at 0x8009BE60
|
||||
/* 0x7B0 */ OSMesgQueue faultEventQueue;
|
||||
/* 0x7C8 */ OSMesg faultEventMesg[1];
|
||||
/* 0x7CC */ u8 unk7CC;
|
||||
/* 0x7CD */ u8 faultType; // 1 - CPU Break; 2 - Fault; 3 - Unknown
|
||||
/* 0x7B0 */ OSMesgQueue queue;
|
||||
/* 0x7C8 */ OSMesg msg[1];
|
||||
/* 0x7CC */ u8 exitDebugger;
|
||||
/* 0x7CD */ u8 msgId; // 1 - CPU Break; 2 - Fault; 3 - Unknown
|
||||
/* 0x7CE */ u8 faultHandlerEnabled;
|
||||
/* 0x7CF */ u8 faultActive;
|
||||
/* 0x7D0 */ OSThread* faultedThread;
|
||||
/* 0x7D4 */ fault_update_input_func inputUpdateFunc;
|
||||
/* 0x7D8 */ FaultClient* clientList;
|
||||
/* 0x7DC */ FaultAddressConverterClient* addrConvList;
|
||||
/* 0x7D4 */ fault_update_input_func padCallback;
|
||||
/* 0x7D8 */ FaultClient* clients;
|
||||
/* 0x7DC */ FaultAddrConvClient* addrConvClients;
|
||||
/* 0x7E0 */ UNK_TYPE1 pad7E0[4];
|
||||
/* 0x7E4 */ InputStruct input[4];
|
||||
/* 0x844 */ void* framebuffer;
|
||||
/* 0x7E4 */ Input padInput[4];
|
||||
/* 0x844 */ void* fb;
|
||||
} FaultContext;
|
||||
|
||||
typedef struct FireObj FireObj;
|
||||
@@ -1522,7 +1522,7 @@ struct ContextCommon {
|
||||
/* 0x08 */ func_ptr fini;
|
||||
/* 0x0C */ func_ptr nextGameStateInit;
|
||||
/* 0x10 */ u32 nextGameStateSize;
|
||||
/* 0x14 */ InputStruct controllers[4];
|
||||
/* 0x14 */ Input controllers[4];
|
||||
/* 0x74 */ GameStateHeap heap;
|
||||
/* 0x84 */ GameAllocNode gamealloc;
|
||||
/* 0x98 */ UNK_TYPE1 pad98[3];
|
||||
@@ -1696,7 +1696,7 @@ typedef struct {
|
||||
/* 0x094 */ OSMesgQueueListNode irqmgrCallbackQueueNode;
|
||||
/* 0x09C */ Irqmgr* irqmgr;
|
||||
/* 0x0A0 */ OSThread thread;
|
||||
/* 0x250 */ InputStruct input[4];
|
||||
/* 0x250 */ Input input[4];
|
||||
/* 0x2B0 */ OSContPad controllerState1[4];
|
||||
/* 0x2C8 */ u8 maxNumControllers;
|
||||
/* 0x2C9 */ UNK_TYPE1 pad2C9[435];
|
||||
|
||||
+29
-23
@@ -19,10 +19,10 @@ extern u32 prenmiStage; // D_80096B60
|
||||
extern OSTime lastPrenmiTime; // D_80096B68
|
||||
extern u64 lastFrameDuration; // D_80096B70
|
||||
extern s32 frameCount; // D_80096B78
|
||||
extern char D_80096B80[][18]; // D_80096B80
|
||||
extern char D_80096BC8[][6]; // D_80096BC8
|
||||
extern FaultDrawContext* faultDrawContext; // D_80096BE0
|
||||
extern FaultDrawContext faultDrawContextInit; // D_80096BE4
|
||||
extern char* D_80096B80[18]; // D_80096B80
|
||||
extern char* D_80096BC8[6]; // D_80096BC8
|
||||
extern FaultDrawer* faultDrawContext; // D_80096BE0
|
||||
extern FaultDrawer faultDrawContextInit; // D_80096BE4
|
||||
extern UNK_TYPE4 D_80096C20; // D_80096C20
|
||||
extern UNK_TYPE4 D_80096C30; // D_80096C30
|
||||
extern ThreadInfo* ThreadInfoListHead; // D_80096C40
|
||||
@@ -122,15 +122,17 @@ extern char D_80098474[]; // D_80098474
|
||||
extern char D_80098488[]; // D_80098488
|
||||
extern char D_80098494[]; // D_80098494
|
||||
extern char D_800984A0[]; // D_800984A0
|
||||
extern UNK_TYPE1 D_800984B4; // D_800984B4
|
||||
extern UNK_TYPE1 D_800984EC; // D_800984EC
|
||||
extern UNK_TYPE1 D_80098524; // D_80098524
|
||||
extern UNK_TYPE1 D_8009856C; // D_8009856C
|
||||
extern char D_800984B4[55]; // D_800984B4
|
||||
extern char D_800984EC[54]; // D_800984EC
|
||||
extern char D_80098524[71]; // D_80098524
|
||||
extern char D_8009856C[74]; // D_8009856C
|
||||
extern char D_800985B8[]; // D_800985B8
|
||||
extern char D_800985C8[]; // D_800985C8
|
||||
extern char D_800985DC[]; // D_800985DC
|
||||
extern char D_800985EC[]; // D_800985EC
|
||||
extern char D_80098600[]; // D_80098600
|
||||
extern UNK_TYPE1 D_80098610; // D_80098610
|
||||
extern UNK_TYPE1 D_80098618; // D_80098618
|
||||
extern char D_80098610[]; // D_80098610
|
||||
extern char D_80098618[]; // D_80098618
|
||||
extern char D_8009861C[]; // D_8009861C
|
||||
extern char D_8009862C[]; // D_8009862C
|
||||
extern char D_80098634[]; // D_80098634
|
||||
@@ -155,6 +157,7 @@ extern char D_80098798[]; // D_80098798
|
||||
extern char D_8009879C[]; // D_8009879C
|
||||
extern char D_800987A0[]; // D_800987A0
|
||||
extern char D_800987A4[]; // D_800987A4
|
||||
extern char D_800987B0[]; // D_800987B0
|
||||
extern char D_800987B4[]; // D_800987B4
|
||||
extern char D_800987CC[]; // D_800987CC
|
||||
extern char D_800987EC[]; // D_800987EC
|
||||
@@ -186,32 +189,35 @@ extern char D_80098980[]; // D_80098980
|
||||
extern char D_8009898C[]; // D_8009898C
|
||||
extern char D_800989A4[]; // D_800989A4
|
||||
extern char D_800989B0[]; // D_800989B0
|
||||
extern char D_800989BC[]; // D_800989BC
|
||||
extern char D_800989CC[]; // D_800989CC
|
||||
extern char D_800989D8[]; // D_800989D8
|
||||
extern char D_800989F4[]; // D_800989F4
|
||||
extern char D_80098A00[]; // D_80098A00
|
||||
extern char D_80098A0C[]; // D_80098A0C
|
||||
extern char D_80098A1C[]; // D_80098A1C
|
||||
extern UNK_TYPE1 D_80098A20; // D_80098A20
|
||||
extern char D_80098A20[34]; // D_80098A20
|
||||
extern char D_80098A44[]; // D_80098A44
|
||||
extern char D_80098A68[]; // D_80098A68
|
||||
extern UNK_TYPE1 D_80098A88; // D_80098A88
|
||||
extern UNK_TYPE1 D_80098AC0; // D_80098AC0
|
||||
extern UNK_TYPE1 D_80098AF4; // D_80098AF4
|
||||
extern char D_80098A88[53]; // D_80098A88
|
||||
extern char D_80098AC0[49]; // D_80098AC0
|
||||
extern char D_80098AF4[51]; // D_80098AF4
|
||||
extern char D_80098B28[]; // D_80098B28
|
||||
extern char D_80098B4C[]; // D_80098B4C
|
||||
extern char D_80098B68[]; // D_80098B68
|
||||
extern char D_80098B84[]; // D_80098B84
|
||||
extern char D_80098BA0[]; // D_80098BA0
|
||||
extern char D_80098BBC[]; // D_80098BBC
|
||||
extern char faultThreadName[]; // D_80098BD8
|
||||
extern char D_80098BE0[]; // D_80098BE0
|
||||
extern UNK_TYPE1 D_80098BF8; // D_80098BF8
|
||||
extern char D_80098BF8[]; // D_80098BF8
|
||||
extern char D_80098BFC[]; // D_80098BFC
|
||||
extern UNK_TYPE1 D_80098C04; // D_80098C04
|
||||
extern char D_80098C04[]; // D_80098C04
|
||||
extern char D_80098C08[]; // D_80098C08
|
||||
extern char D_80098C10[]; // D_80098C10
|
||||
extern UNK_TYPE1 D_80098C28; // D_80098C28
|
||||
extern char D_80098C28[]; // D_80098C28
|
||||
extern char D_80098C2C[]; // D_80098C2C
|
||||
extern UNK_TYPE1 D_80098C34; // D_80098C34
|
||||
extern char D_80098C34[]; // D_80098C34
|
||||
extern char D_80098C38[]; // D_80098C38
|
||||
extern char D_80098C40[]; // D_80098C40
|
||||
extern u8 faultDrawFont[8][128]; // D_80098C50
|
||||
@@ -286,13 +292,13 @@ extern UNK_TYPE4 D_8009BE30; // D_8009BE30
|
||||
extern UNK_TYPE4 D_8009BE34; // D_8009BE34
|
||||
extern FaultClient romInfoFaultClient; // D_8009BE38
|
||||
extern FaultContext* faultCtxt; // D_8009BE50
|
||||
extern UNK_TYPE4 D_8009BE54; // D_8009BE54
|
||||
extern f32 D_8009BE54; // D_8009BE54
|
||||
extern u32 faultCustomOptions; // D_8009BE58
|
||||
extern u32 faultCopyToLog; // D_8009BE5C
|
||||
extern u8 faultStack[1536]; // D_8009BE60
|
||||
extern ThreadInfo faultThreadInfo; // D_8009C460
|
||||
extern FaultContext faultContextStruct; // D_8009C480
|
||||
extern FaultDrawContext faultDrawContextStruct; // D_8009CCD0
|
||||
extern FaultDrawer faultDrawContextStruct; // D_8009CCD0
|
||||
extern UNK_TYPE4 D_8009CD10; // D_8009CD10
|
||||
extern Heap startHeap; // D_8009CD20
|
||||
extern f32 randLast; // D_8009CD50
|
||||
@@ -1208,7 +1214,7 @@ extern UNK_TYPE4 D_801D0D50; // D_801D0D50
|
||||
extern UNK_TYPE1 D_801D0D54; // D_801D0D54
|
||||
extern UNK_TYPE2 D_801D0D58; // D_801D0D58
|
||||
extern UNK_TYPE2 D_801D0D5C; // D_801D0D5C
|
||||
extern InputStruct* D_801D0D60; // D_801D0D60
|
||||
extern Input* D_801D0D60; // D_801D0D60
|
||||
extern UNK_TYPE2 D_801D0D64; // D_801D0D64
|
||||
extern UNK_TYPE1 D_801D0D7A; // D_801D0D7A
|
||||
extern UNK_TYPE1 D_801D0D80; // D_801D0D80
|
||||
@@ -2749,7 +2755,7 @@ extern UNK_TYPE1 D_801F6BF0; // D_801F6BF0
|
||||
extern UNK_TYPE1 D_801F6C00; // D_801F6C00
|
||||
extern UNK_TYPE1 D_801F6C04; // D_801F6C04
|
||||
extern UNK_TYPE1 D_801F6C10; // D_801F6C10
|
||||
extern InputStruct D_801F6C18; // D_801F6C18
|
||||
extern Input D_801F6C18; // D_801F6C18
|
||||
extern UNK_TYPE1 D_801F6C30; // D_801F6C30
|
||||
extern UNK_TYPE1 D_801F6D0C; // D_801F6D0C
|
||||
extern UNK_TYPE4 D_801F6D10; // D_801F6D10
|
||||
@@ -2770,7 +2776,7 @@ extern UNK_TYPE1 D_801F8010; // D_801F8010
|
||||
extern UNK_TYPE1 D_801F8020; // D_801F8020
|
||||
extern UNK_TYPE1 D_801F8030; // D_801F8030
|
||||
extern UNK_TYPE1 D_801F8048; // D_801F8048
|
||||
extern FaultAddressConverterClient grapgFaultAddrConvClient; // D_801F80D0
|
||||
extern FaultAddrConvClient grapgFaultAddrConvClient; // D_801F80D0
|
||||
extern FaultClient graphFaultClient; // D_801F80E0
|
||||
extern Gfx* graphDlEntry; // D_801F80F0
|
||||
extern UNK_TYPE1 D_801F80F8; // D_801F80F8
|
||||
|
||||
@@ -13,7 +13,7 @@ SECTIONS
|
||||
build/asm/boot_0x80081250.o(.text)
|
||||
build/src/boot_O2_g3/CIC6105.o(.text)
|
||||
build/src/boot_O2_g3/boot_0x80081920.o(.text)
|
||||
build/asm/boot_0x80081980.o(.text)
|
||||
build/src/boot_O2_g3_trapuv/fault.o(.text)
|
||||
build/asm/boot_0x80083EB0.o(.text)
|
||||
build/asm/loadfragment.o(.text)
|
||||
build/asm/loadfragment2.o(.text)
|
||||
|
||||
@@ -6,13 +6,13 @@ void CIC6105_Nop80081820(void) {}
|
||||
void CIC6105_Nop80081828(void) {}
|
||||
|
||||
void CIC6105_PrintRomInfo(void) {
|
||||
FaultDraw_DrawText(80, 200, D_80098280, (UNK_PTR)(*(u32*)0xA4040010));
|
||||
FaultDraw_DrawText(40, 184, D_80098290, &D_800994D0);
|
||||
FaultDraw_DrawText(56, 192, D_800982A4, &D_800994DC);
|
||||
FaultDrawer_DrawText(80, 200, D_80098280, (UNK_PTR)(*(u32*)0xA4040010));
|
||||
FaultDrawer_DrawText(40, 184, D_80098290, &D_800994D0);
|
||||
FaultDrawer_DrawText(56, 192, D_800982A4, &D_800994DC);
|
||||
}
|
||||
|
||||
void CIC6105_AddRomInfoFaultPage(void) {
|
||||
Fault_AddClient(&romInfoFaultClient, (fault_client_func*)CIC6105_PrintRomInfo, 0, 0);
|
||||
Fault_AddClient(&romInfoFaultClient, (fault_client_func)CIC6105_PrintRomInfo, 0, 0);
|
||||
}
|
||||
|
||||
void CIC6105_RemoveRomInfoFaultPage(void) {
|
||||
|
||||
@@ -9,6 +9,6 @@ UNK_RET start(void) {
|
||||
osUnmapTLBAll();
|
||||
D_80096B40 = func_80092920();
|
||||
thread_info_init(&idleTreadInfo, idleStack, &idleStack[1024], 0, 256, idleThreadName);
|
||||
osCreateThread(&idleOSThread, 1, (osCreateThread_func*)Idle_ThreadEntry, 0, &idleTreadInfo, 12);
|
||||
osCreateThread(&idleOSThread, 1, (osCreateThread_func)Idle_ThreadEntry, 0, &idleTreadInfo, 12);
|
||||
osStartThread(&idleOSThread);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,926 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
// TODO move out
|
||||
#define OS_CLOCK_RATE 62500000LL
|
||||
#define OS_CPU_COUNTER (OS_CLOCK_RATE*3/4)
|
||||
#define OS_USEC_TO_CYCLES(n) (((u64)(n)*(OS_CPU_COUNTER/15625LL))/(1000000LL/15625LL))
|
||||
|
||||
void Fault_SleepImpl(u32 duration) {
|
||||
u64 value = (duration * OS_CPU_COUNTER) / 1000ull;
|
||||
wait_cycles(value);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// minor reordering around the start of the loop, same as Fault_AddAddrConvClient
|
||||
void Fault_AddClient(FaultClient* client, fault_client_func callback, void* param0, void* param1) {
|
||||
OSIntMask mask;
|
||||
u32 alreadyExist;
|
||||
FaultClient* iter;
|
||||
|
||||
alreadyExist = 0;
|
||||
|
||||
mask = osSetIntMask(1);
|
||||
|
||||
iter = faultCtxt->clients;
|
||||
while (iter) {
|
||||
if (iter == client) {
|
||||
alreadyExist = 1;
|
||||
goto end;
|
||||
}
|
||||
iter = iter->next;
|
||||
}
|
||||
|
||||
client->callback = callback;
|
||||
client->param0 = param0;
|
||||
client->param1 = param1;
|
||||
client->next = faultCtxt->clients;
|
||||
faultCtxt->clients = client;
|
||||
|
||||
end:
|
||||
osSetIntMask(mask);
|
||||
|
||||
if (alreadyExist) {
|
||||
Fault_Log(D_800984B4, client);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("./asm/nonmatching/fault/Fault_AddClient.asm")
|
||||
#endif
|
||||
|
||||
void Fault_RemoveClient(FaultClient* client) {
|
||||
FaultClient* iter;
|
||||
FaultClient* lastIter;
|
||||
OSIntMask mask;
|
||||
u32 listIsEmpty;
|
||||
|
||||
iter = faultCtxt->clients;
|
||||
listIsEmpty = 0;
|
||||
lastIter = NULL;
|
||||
|
||||
mask = osSetIntMask(1);
|
||||
|
||||
while (iter) {
|
||||
if (iter == client) {
|
||||
if (lastIter) {
|
||||
lastIter->next = client->next;
|
||||
} else {
|
||||
faultCtxt->clients = client;
|
||||
if (faultCtxt->clients) {
|
||||
faultCtxt->clients = client->next;
|
||||
} else {
|
||||
listIsEmpty = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
lastIter = iter;
|
||||
iter = iter->next;
|
||||
}
|
||||
|
||||
osSetIntMask(mask);
|
||||
|
||||
if (listIsEmpty) {
|
||||
Fault_Log(D_800984EC, client);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// minor reordering around the start of the loop, same as Fault_AddClient
|
||||
void Fault_AddAddrConvClient(FaultAddrConvClient* client, fault_address_converter_func callback, void* param) {
|
||||
OSIntMask mask;
|
||||
u32 alreadyExist;
|
||||
FaultAddrConvClient* iter;
|
||||
|
||||
alreadyExist = 0;
|
||||
|
||||
mask = osSetIntMask(1);
|
||||
|
||||
iter = faultCtxt->addrConvClients;
|
||||
while (iter) {
|
||||
if (iter == client) {
|
||||
alreadyExist = 1;
|
||||
goto end;
|
||||
}
|
||||
iter = iter->next;
|
||||
}
|
||||
|
||||
client->callback = callback;
|
||||
client->param = param;
|
||||
client->next = faultCtxt->addrConvClients;
|
||||
faultCtxt->addrConvClients = client;
|
||||
|
||||
end:
|
||||
osSetIntMask(mask);
|
||||
|
||||
if (alreadyExist) {
|
||||
Fault_Log(D_80098524, client);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("./asm/nonmatching/fault/Fault_AddAddrConvClient.asm")
|
||||
#endif
|
||||
|
||||
void Fault_RemoveAddrConvClient(FaultAddrConvClient* client) {
|
||||
FaultAddrConvClient* iter;
|
||||
FaultAddrConvClient* lastIter;
|
||||
OSIntMask mask;
|
||||
u32 listIsEmpty;
|
||||
|
||||
iter = faultCtxt->addrConvClients;
|
||||
listIsEmpty = 0;
|
||||
lastIter = NULL;
|
||||
|
||||
mask = osSetIntMask(1);
|
||||
|
||||
while (iter) {
|
||||
if (iter == client) {
|
||||
if (lastIter) {
|
||||
lastIter->next = client->next;
|
||||
} else {
|
||||
faultCtxt->addrConvClients = client;
|
||||
if (faultCtxt->addrConvClients) {
|
||||
faultCtxt->addrConvClients = client->next;
|
||||
} else {
|
||||
listIsEmpty = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
lastIter = iter;
|
||||
iter = iter->next;
|
||||
}
|
||||
|
||||
osSetIntMask(mask);
|
||||
|
||||
if (listIsEmpty) {
|
||||
Fault_Log(D_8009856C, client);
|
||||
}
|
||||
}
|
||||
|
||||
void* Fault_ConvertAddress(void* addr) {
|
||||
void* ret;
|
||||
FaultAddrConvClient* iter = faultCtxt->addrConvClients;
|
||||
|
||||
while(iter) {
|
||||
if (iter->callback) {
|
||||
ret = iter->callback(addr, iter->param);
|
||||
if (ret != NULL) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
iter = iter->next;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Fault_Sleep(u32 duration) {
|
||||
Fault_SleepImpl(duration);
|
||||
}
|
||||
|
||||
void Fault_PadCallback(Input* input) {
|
||||
Padmgr_GetInput2(input, 0);
|
||||
}
|
||||
|
||||
void Fault_UpdatePadImpl() {
|
||||
faultCtxt->padCallback(faultCtxt->padInput);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// curInput is being put in s3 instead of temp registers
|
||||
// Stack is too small
|
||||
s32 Fault_WaitForInputImpl() {
|
||||
Input* curInput;
|
||||
u32 kDown;
|
||||
s32 count;
|
||||
|
||||
count = 600;
|
||||
curInput = faultCtxt->padInput;
|
||||
while (1) {
|
||||
while (1) {
|
||||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
kDown = curInput->pressEdge.buttons;
|
||||
if (kDown == 0x20) {
|
||||
faultCtxt->faultActive = !faultCtxt->faultActive;
|
||||
}
|
||||
|
||||
if (!faultCtxt->faultActive) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (count-- < 1) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (kDown == 0x8000 || kDown == 0x100) {
|
||||
return 0;
|
||||
}
|
||||
if (kDown == 0x200) {
|
||||
return 1;
|
||||
}
|
||||
if (kDown == 0x800) {
|
||||
FaultDrawer_SetOsSyncPrintfEnabled(1);
|
||||
}
|
||||
if (kDown == 0x400) {
|
||||
FaultDrawer_SetOsSyncPrintfEnabled(0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("./asm/nonmatching/fault/Fault_WaitForInputImpl.asm")
|
||||
#endif
|
||||
|
||||
void Fault_WaitForInput() {
|
||||
Fault_WaitForInputImpl();
|
||||
}
|
||||
|
||||
void Fault_DrawRec(s32 x, s32 y, s32 w, s32 h, u16 color) {
|
||||
FaultDrawer_DrawRecImpl(x, y, x + w - 1, y + h - 1, color);
|
||||
}
|
||||
|
||||
void Fault_FillScreenBlack() {
|
||||
FaultDrawer_SetForeColor(0xFFFF);
|
||||
FaultDrawer_SetBackColor(1);
|
||||
FaultDrawer_FillScreen();
|
||||
FaultDrawer_SetBackColor(0);
|
||||
}
|
||||
|
||||
void Fault_FillScreenRed() {
|
||||
FaultDrawer_SetForeColor(0xFFFF);
|
||||
FaultDrawer_SetBackColor(0xF001);
|
||||
FaultDrawer_FillScreen();
|
||||
FaultDrawer_SetBackColor(0);
|
||||
}
|
||||
|
||||
void Fault_DrawCornerRec(u16 color) {
|
||||
Fault_DrawRec(0x16, 0x10, 8, 1, color);
|
||||
}
|
||||
|
||||
void Fault_PrintFReg(s32 idx, f32* value) {
|
||||
u32 raw = *(u32*)value;
|
||||
s32 v0 = ((raw & 0x7f800000) >> 0x17) - 0x7f;
|
||||
|
||||
if ((v0 >= -0x7e && v0 < 0x80) || raw == 0) {
|
||||
FaultDrawer_Printf(D_800985B8, idx, *value);
|
||||
} else {
|
||||
FaultDrawer_Printf(D_800985C8, idx, raw);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc
|
||||
void Fault_LogFReg(s32 idx, f32* value) {
|
||||
s32 v0;
|
||||
u32 raw;
|
||||
|
||||
raw = *(u32*)value;
|
||||
v0 = ((*(u32*)value & 0x7f800000) >> 0x17) - 0x7f;
|
||||
|
||||
if ((v0 >= -0x7e && v0 < 0x80) || *(u32*)value == 0) {
|
||||
Fault_Log(D_800985DC, idx, *value);
|
||||
} else {
|
||||
Fault_Log(D_800985EC, idx, raw);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("./asm/nonmatching/fault/Fault_LogFReg.asm")
|
||||
#endif
|
||||
|
||||
void Fault_PrintFPCR(u32 value) {
|
||||
s32 i;
|
||||
u32 flag = 0x20000;
|
||||
FaultDrawer_Printf(D_80098600, value);
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (value & flag) {
|
||||
FaultDrawer_Printf(D_80098610, D_80096BC8[i]);
|
||||
break;
|
||||
}
|
||||
flag >>= 1;
|
||||
}
|
||||
FaultDrawer_Printf(D_80098618);
|
||||
}
|
||||
|
||||
void Fault_LogFPCR(u32 value) {
|
||||
s32 i;
|
||||
u32 flag = 0x20000;
|
||||
Fault_Log(D_8009861C, value);
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (value & flag) {
|
||||
Fault_Log(D_8009862C, D_80096BC8[i]);
|
||||
break;
|
||||
}
|
||||
flag >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
void Fault_PrintThreadContext(OSThread* t){
|
||||
__OSThreadContext* ctx;
|
||||
s32 causeStrIdx = (s32) ((((u32) t->context.cause >> 2) & 0x1f) << 0x10) >> 0x10;
|
||||
if (causeStrIdx == 0x17)
|
||||
causeStrIdx = 0x10;
|
||||
if (causeStrIdx == 0x1F)
|
||||
causeStrIdx = 0x11;
|
||||
|
||||
FaultDrawer_FillScreen();
|
||||
FaultDrawer_SetCharPad(-2, 4);
|
||||
FaultDrawer_SetCursor(0x16, 0x14);
|
||||
|
||||
ctx = &t->context;
|
||||
FaultDrawer_Printf(D_80098634, t->id, causeStrIdx, D_80096B80[causeStrIdx]);
|
||||
FaultDrawer_SetCharPad(-1, 0);
|
||||
|
||||
FaultDrawer_Printf(D_80098648, (u32)ctx->pc, (u32)ctx->sr, (u32)ctx->badvaddr);
|
||||
FaultDrawer_Printf(D_80098664, (u32)ctx->at, (u32)ctx->v0, (u32)ctx->v1);
|
||||
FaultDrawer_Printf(D_80098680, (u32)ctx->a0, (u32)ctx->a1, (u32)ctx->a2);
|
||||
FaultDrawer_Printf(D_8009869C, (u32)ctx->a3, (u32)ctx->t0, (u32)ctx->t1);
|
||||
FaultDrawer_Printf(D_800986B8, (u32)ctx->t2, (u32)ctx->t3, (u32)ctx->t4);
|
||||
FaultDrawer_Printf(D_800986D4, (u32)ctx->t5, (u32)ctx->t6, (u32)ctx->t7);
|
||||
FaultDrawer_Printf(D_800986F0, (u32)ctx->s0, (u32)ctx->s1, (u32)ctx->s2);
|
||||
FaultDrawer_Printf(D_8009870C, (u32)ctx->s3, (u32)ctx->s4, (u32)ctx->s5);
|
||||
FaultDrawer_Printf(D_80098728, (u32)ctx->s6, (u32)ctx->s7, (u32)ctx->t8);
|
||||
FaultDrawer_Printf(D_80098744, (u32)ctx->t9, (u32)ctx->gp, (u32)ctx->sp);
|
||||
FaultDrawer_Printf(D_80098760, (u32)ctx->s8, (u32)ctx->ra, (u32)ctx->lo);
|
||||
|
||||
Fault_PrintFPCR(ctx->fpcsr);
|
||||
FaultDrawer_Printf(D_80098780);
|
||||
Fault_PrintFReg(0, &ctx->fp0.f.f_even);
|
||||
Fault_PrintFReg(2, &ctx->fp2.f.f_even);
|
||||
FaultDrawer_Printf(D_80098784);
|
||||
Fault_PrintFReg(4, &ctx->fp4.f.f_even);
|
||||
Fault_PrintFReg(6, &ctx->fp6.f.f_even);
|
||||
FaultDrawer_Printf(D_80098788);
|
||||
Fault_PrintFReg(8, &ctx->fp8.f.f_even);
|
||||
Fault_PrintFReg(0xA, &ctx->fp10.f.f_even);
|
||||
FaultDrawer_Printf(D_8009878C);
|
||||
Fault_PrintFReg(0xC, &ctx->fp12.f.f_even);
|
||||
Fault_PrintFReg(0xE, &ctx->fp14.f.f_even);
|
||||
FaultDrawer_Printf(D_80098790);
|
||||
Fault_PrintFReg(0x10, &ctx->fp16.f.f_even);
|
||||
Fault_PrintFReg(0x12, &ctx->fp18.f.f_even);
|
||||
FaultDrawer_Printf(D_80098794);
|
||||
Fault_PrintFReg(0x14, &ctx->fp20.f.f_even);
|
||||
Fault_PrintFReg(0x16, &ctx->fp22.f.f_even);
|
||||
FaultDrawer_Printf(D_80098798);
|
||||
Fault_PrintFReg(0x18, &ctx->fp24.f.f_even);
|
||||
Fault_PrintFReg(0x1A, &ctx->fp26.f.f_even);
|
||||
FaultDrawer_Printf(D_8009879C);
|
||||
Fault_PrintFReg(0x1C, &ctx->fp28.f.f_even);
|
||||
Fault_PrintFReg(0x1E, &ctx->fp30.f.f_even);
|
||||
FaultDrawer_Printf(D_800987A0);
|
||||
FaultDrawer_SetCharPad(0, 0);
|
||||
|
||||
if (D_8009BE54 != 0) {
|
||||
FaultDrawer_DrawText(0xA0, 0xD8, D_800987A4, D_8009BE54);
|
||||
}
|
||||
}
|
||||
|
||||
void Fault_LogThreadContext(OSThread* t){
|
||||
__OSThreadContext *ctx;
|
||||
s32 causeStrIdx = (s32) ((((u32) t->context.cause >> 2) & 0x1f) << 0x10) >> 0x10;
|
||||
if (causeStrIdx == 0x17)
|
||||
causeStrIdx = 0x10;
|
||||
if (causeStrIdx == 0x1f)
|
||||
causeStrIdx = 0x11;
|
||||
|
||||
ctx = &t->context;
|
||||
Fault_Log(D_800987B0);
|
||||
Fault_Log(D_800987B4, t->id, causeStrIdx, D_80096B80[causeStrIdx]);
|
||||
|
||||
Fault_Log(D_800987CC, (u32)ctx->pc, (u32)ctx->sr, (u32)ctx->badvaddr);
|
||||
Fault_Log(D_800987EC, (u32)ctx->at, (u32)ctx->v0, (u32)ctx->v1);
|
||||
Fault_Log(D_8009880C, (u32)ctx->a0, (u32)ctx->a1, (u32)ctx->a2);
|
||||
Fault_Log(D_8009882C, (u32)ctx->a3, (u32)ctx->t0, (u32)ctx->t1);
|
||||
Fault_Log(D_8009884C, (u32)ctx->t2, (u32)ctx->t3, (u32)ctx->t4);
|
||||
Fault_Log(D_8009886C, (u32)ctx->t5, (u32)ctx->t6, (u32)ctx->t7);
|
||||
Fault_Log(D_8009888C, (u32)ctx->s0, (u32)ctx->s1, (u32)ctx->s2);
|
||||
Fault_Log(D_800988AC, (u32)ctx->s3, (u32)ctx->s4, (u32)ctx->s5);
|
||||
Fault_Log(D_800988CC, (u32)ctx->s6, (u32)ctx->s7, (u32)ctx->t8);
|
||||
Fault_Log(D_800988EC, (u32)ctx->t9, (u32)ctx->gp, (u32)ctx->sp);
|
||||
Fault_Log(D_8009890C, (u32)ctx->s8, (u32)ctx->ra, (u32)ctx->lo);
|
||||
Fault_Log(D_8009892C);
|
||||
Fault_LogFPCR(ctx->fpcsr);
|
||||
Fault_Log(D_80098930);
|
||||
Fault_LogFReg(0, &ctx->fp0.f.f_even);
|
||||
Fault_LogFReg(2, &ctx->fp2.f.f_even);
|
||||
Fault_Log(D_80098934);
|
||||
Fault_LogFReg(4, &ctx->fp4.f.f_even);
|
||||
Fault_LogFReg(6, &ctx->fp6.f.f_even);
|
||||
Fault_Log(D_80098938);
|
||||
Fault_LogFReg(8, &ctx->fp8.f.f_even);
|
||||
Fault_LogFReg(0xa, &ctx->fp10.f.f_even);
|
||||
Fault_Log(D_8009893C);
|
||||
Fault_LogFReg(0xc, &ctx->fp12.f.f_even);
|
||||
Fault_LogFReg(0xe, &ctx->fp14.f.f_even);
|
||||
Fault_Log(D_80098940);
|
||||
Fault_LogFReg(0x10, &ctx->fp16.f.f_even);
|
||||
Fault_LogFReg(0x12, &ctx->fp18.f.f_even);
|
||||
Fault_Log(D_80098944);
|
||||
Fault_LogFReg(0x14, &ctx->fp20.f.f_even);
|
||||
Fault_LogFReg(0x16, &ctx->fp22.f.f_even);
|
||||
Fault_Log(D_80098948);
|
||||
Fault_LogFReg(0x18, &ctx->fp24.f.f_even);
|
||||
Fault_LogFReg(0x1a, &ctx->fp26.f.f_even);
|
||||
Fault_Log(D_8009894C);
|
||||
Fault_LogFReg(0x1c, &ctx->fp28.f.f_even);
|
||||
Fault_LogFReg(0x1e, &ctx->fp30.f.f_even);
|
||||
Fault_Log(D_80098950);
|
||||
}
|
||||
|
||||
OSThread* Fault_FindFaultedThread() {
|
||||
OSThread* iter = __osGetActiveQueue();
|
||||
while (iter->priority != -1)
|
||||
{
|
||||
if (iter->priority > 0 && iter->priority < 0x7f && (iter->flags & 3)) {
|
||||
return iter;
|
||||
}
|
||||
iter = iter->tlnext;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
void Fault_Wait5Seconds(void) {
|
||||
u32 pad;
|
||||
OSTime start;
|
||||
start = osGetTime();
|
||||
do {
|
||||
Fault_Sleep(0x10);
|
||||
} while ((osGetTime() - start) <= OS_USEC_TO_CYCLES(5000000));
|
||||
|
||||
faultCtxt->faultActive = 1;
|
||||
}
|
||||
|
||||
void Fault_WaitForButtonCombo(void) {
|
||||
Input* input = &faultCtxt->padInput[0];
|
||||
|
||||
FaultDrawer_SetForeColor(0xffff);
|
||||
FaultDrawer_SetBackColor(1);
|
||||
do {
|
||||
do {
|
||||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
} while (~(input->pressEdge.buttons | ~0x80) != 0);
|
||||
} while (~(input->current.buttons | ~0x231) != 0);
|
||||
}
|
||||
|
||||
void Fault_DrawMemDumpPage(char* title, u32* addr, u32 param_3) {
|
||||
u32* alignedAddr;
|
||||
u32* writeAddr;
|
||||
s32 y;
|
||||
s32 x;
|
||||
|
||||
alignedAddr = addr;
|
||||
|
||||
if (alignedAddr < (u32*)0x80000000) {
|
||||
alignedAddr = (u32*)0x80000000;
|
||||
}
|
||||
if (alignedAddr > (u32*)0x807fff00) {
|
||||
alignedAddr = (u32*)0x807fff00;
|
||||
}
|
||||
|
||||
alignedAddr = (u32*)((u32)alignedAddr & ~3);
|
||||
writeAddr = alignedAddr;
|
||||
Fault_FillScreenBlack();
|
||||
FaultDrawer_SetCharPad(-2, 0);
|
||||
|
||||
FaultDrawer_DrawText(0x24, 0x12, D_80098954, title? title : D_8009895C, alignedAddr);
|
||||
if (alignedAddr >= (u32*)0x80000000 && alignedAddr < (u32*)0xC0000000) {
|
||||
for (y = 0x1C; y != 0xE2; y += 9) {
|
||||
FaultDrawer_DrawText(0x18, y, D_80098968, writeAddr);
|
||||
for (x = 0x52; x != 0x122; x += 0x34) {
|
||||
FaultDrawer_DrawText(x, y, D_80098970, *writeAddr++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FaultDrawer_SetCharPad(0, 0);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// The count = 600 load happens a bit too early
|
||||
void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
||||
s32 count;
|
||||
s32 off;
|
||||
Input* input = &faultCtxt->padInput[0];
|
||||
u32 addr = pc;
|
||||
|
||||
do {
|
||||
if (addr < 0x80000000) {
|
||||
addr = 0x80000000;
|
||||
}
|
||||
if (addr > 0x807fff00) {
|
||||
addr = 0x807fff00;
|
||||
}
|
||||
|
||||
addr &= ~0xF;
|
||||
Fault_DrawMemDumpPage(D_80098978, (u32*)addr, 0);
|
||||
|
||||
count = 600;
|
||||
while (faultCtxt->faultActive) {
|
||||
if (count == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
count--;
|
||||
|
||||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
|
||||
if (~(input->pressEdge.buttons | ~0x20) == 0) {
|
||||
faultCtxt->faultActive = 0;
|
||||
}
|
||||
}
|
||||
do {
|
||||
Fault_Sleep(0x10);
|
||||
Fault_UpdatePadImpl();
|
||||
} while (input->pressEdge.buttons == 0);
|
||||
|
||||
if (~(input->pressEdge.buttons | ~0x1000) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
off = 0x10;
|
||||
if (~(input->current.buttons | ~0x8000) == 0) {
|
||||
off = 0x100;
|
||||
}
|
||||
if (~(input->current.buttons | ~0x4000) == 0) {
|
||||
off <<= 8;
|
||||
}
|
||||
if (~(input->pressEdge.buttons | ~0x800) == 0) {
|
||||
addr -= off;
|
||||
}
|
||||
if (~(input->pressEdge.buttons | ~0x400) == 0) {
|
||||
addr += off;
|
||||
}
|
||||
if (~(input->pressEdge.buttons | ~0x8) == 0) {
|
||||
addr = pc;
|
||||
}
|
||||
if (~(input->pressEdge.buttons | ~0x4) == 0) {
|
||||
addr = sp;
|
||||
}
|
||||
if (~(input->pressEdge.buttons | ~0x2) == 0) {
|
||||
addr = unk0;
|
||||
}
|
||||
if (~(input->pressEdge.buttons | ~0x1) == 0) {
|
||||
addr = unk1;
|
||||
}
|
||||
|
||||
} while (~(input->pressEdge.buttons | ~0x20) != 0);
|
||||
|
||||
faultCtxt->faultActive = 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("./asm/nonmatching/fault/Fault_DrawMemDump.asm")
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// This function still needs a bit of work
|
||||
void Fault_FindNextStackCall(u32** sp, u32** pc, u32** ra) {
|
||||
u32* currentSp;
|
||||
u32* currentPc;
|
||||
u32* currentRa;
|
||||
u32 lastInst;
|
||||
u32 currInst;
|
||||
|
||||
currentSp = *sp;
|
||||
currentPc = *pc;
|
||||
currentRa = *ra;
|
||||
|
||||
if ((((u32)currentSp & 3) != 0) || (currentSp < (u32*)0x80000000) || (currentSp >= (u32*)0xC0000000) ||
|
||||
(((u32)currentRa & 3) != 0) || (currentRa < (u32*)0x80000000) || (currentRa >= (u32*)0xC0000000)) {
|
||||
*sp = NULL;
|
||||
*pc = NULL;
|
||||
*ra = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((((u32)currentPc & 3) != 0) || (currentPc < (u32*)0x80000000) || (currentPc >= (u32*)0xC0000000)) {
|
||||
*pc = currentRa;
|
||||
return;
|
||||
}
|
||||
|
||||
lastInst = 0;
|
||||
while (1) {
|
||||
currInst = *currentPc;
|
||||
if (((currInst >> 0x10) & 0xFFFF) == 0x8FBF) {
|
||||
currentRa = *(u32**)((u32)currentSp + (s16)currInst);
|
||||
} else if (((currInst >> 0x10) & 0xFFFF) == 0x27BD) {
|
||||
currentSp = (u32*)((u32)currentSp + (s16)currInst);
|
||||
} else if (currInst == 0x42000018) {
|
||||
currentSp = NULL;
|
||||
currentPc = NULL;
|
||||
currentRa = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (lastInst == 0x03E00008) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((lastInst >> 0x1A) == 2) {
|
||||
currentPc = (u32*)((((u32)currentPc >> 0x1C) << 0x1C) | ((lastInst << 6) >> 4));
|
||||
break;
|
||||
}
|
||||
|
||||
lastInst = currInst;
|
||||
currentPc++;
|
||||
}
|
||||
|
||||
*sp = currentSp;
|
||||
*pc = currentPc;
|
||||
*ra = currentRa;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("./asm/nonmatching/fault/Fault_FindNextStackCall.asm")
|
||||
#endif
|
||||
|
||||
void Fault_DrawStackTrace(OSThread* t, u32 flags) {
|
||||
s32 y;
|
||||
u32 sp;
|
||||
u32 ra;
|
||||
u32 pc;
|
||||
u32 pad;
|
||||
u32 convertedPc;
|
||||
|
||||
sp = t->context.sp;
|
||||
ra = t->context.ra;
|
||||
pc = t->context.pc;
|
||||
|
||||
Fault_FillScreenBlack();
|
||||
FaultDrawer_DrawText(0x78, 0x10, D_80098980);
|
||||
FaultDrawer_DrawText(0x24, 0x18, D_8009898C);
|
||||
|
||||
for (y = 1; (y < 22) && (((ra != 0) || (sp != 0)) && (pc != (u32)__osCleanupThread)); y++) {
|
||||
FaultDrawer_DrawText(0x24, y*8+24, D_800989A4, sp, pc);
|
||||
|
||||
if (flags & 1) {
|
||||
convertedPc = (u32)Fault_ConvertAddress((void*)pc);
|
||||
if (convertedPc != 0) {
|
||||
FaultDrawer_Printf(D_800989B0, convertedPc);
|
||||
}
|
||||
} else {
|
||||
FaultDrawer_Printf(D_800989BC);
|
||||
}
|
||||
|
||||
Fault_FindNextStackCall((u32**)&sp, (u32**)&pc, (u32**)&ra);
|
||||
}
|
||||
}
|
||||
|
||||
void Fault_LogStackTrace(OSThread* t, u32 flags) {
|
||||
s32 y;
|
||||
u32 sp;
|
||||
u32 ra;
|
||||
u32 pc;
|
||||
u32 convertedPc;
|
||||
|
||||
sp = t->context.sp;
|
||||
ra = t->context.ra;
|
||||
pc = t->context.pc;
|
||||
|
||||
Fault_Log(D_800989CC);
|
||||
Fault_Log(D_800989D8);
|
||||
|
||||
for (y = 1; (y < 22) && (((ra != 0) || (sp != 0)) && (pc != (u32)__osCleanupThread)); y++) {
|
||||
Fault_Log(D_800989F4, sp, pc);
|
||||
|
||||
if (flags & 1) {
|
||||
convertedPc = (u32)Fault_ConvertAddress((void*)pc);
|
||||
if (convertedPc != 0) {
|
||||
Fault_Log(D_80098A00, convertedPc);
|
||||
}
|
||||
} else {
|
||||
Fault_Log(D_80098A0C);
|
||||
}
|
||||
Fault_Log(D_80098A1C);
|
||||
|
||||
Fault_FindNextStackCall((u32**)&sp, (u32**)&pc, (u32**)&ra);
|
||||
}
|
||||
}
|
||||
|
||||
void Fault_ResumeThread(OSThread* t) {
|
||||
t->context.cause = 0;
|
||||
t->context.fpcsr = 0;
|
||||
t->context.pc += 4;
|
||||
*(u32*)t->context.pc = 0xd;
|
||||
osWritebackDCache((void*)t->context.pc, 4);
|
||||
osInvalICache((void*)t->context.pc, 4);
|
||||
osStartThread(t);
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc
|
||||
void Fault_CommitFB() {
|
||||
u16* fb;
|
||||
osViSetYScale(1.0f);
|
||||
osViSetMode(&osViModeNtscLan1);
|
||||
osViSetSpecialFeatures(0x42); //gama_disable|dither_fliter_enable_aa_mode3_disable
|
||||
osViBlack(0);
|
||||
|
||||
if (faultCtxt->fb) {
|
||||
fb = faultCtxt->fb;
|
||||
} else {
|
||||
fb = (u16*)osViGetNextFramebuffer();
|
||||
if ((u32)fb == 0x80000000) {
|
||||
fb = (u16*)((osMemSize | 0x80000000) - 0x25800);
|
||||
}
|
||||
}
|
||||
|
||||
osViSwapBuffer(fb);
|
||||
FaultDrawer_SetDrawerFB(fb, 0x140, 0xF0);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("./asm/nonmatching/fault/Fault_CommitFB.asm")
|
||||
#endif
|
||||
|
||||
void Fault_ProcessClients(void) {
|
||||
FaultClient* iter = faultCtxt->clients;
|
||||
s32 idx = 0;
|
||||
while(iter) {
|
||||
if (iter->callback) {
|
||||
Fault_FillScreenBlack();
|
||||
FaultDrawer_SetCharPad(-2, 0);
|
||||
FaultDrawer_Printf(D_80098A20, idx++, iter, iter->param0, iter->param1);
|
||||
FaultDrawer_SetCharPad(0, 0);
|
||||
iter->callback(iter->param0, iter->param1);
|
||||
Fault_WaitForInput();
|
||||
Fault_CommitFB();
|
||||
}
|
||||
iter = iter->next;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc and ordering differences around the two bool variables (faultCustomOptions and faultCopyToLog)
|
||||
void Fault_SetOptionsFromController3(void) {
|
||||
Input* input3;
|
||||
u32 pad;
|
||||
u32 graphPC;
|
||||
u32 graphRA;
|
||||
u32 graphSP;
|
||||
|
||||
input3 = &faultCtxt->padInput[3];
|
||||
|
||||
if (~(input3->pressEdge.buttons | ~0x80) == 0) {
|
||||
faultCustomOptions = faultCustomOptions == 0;
|
||||
}
|
||||
|
||||
if (faultCustomOptions) {
|
||||
graphPC = graphOSThread.context.pc;
|
||||
graphRA = graphOSThread.context.ra;
|
||||
graphSP = graphOSThread.context.sp;
|
||||
if (~(input3->current.buttons | ~0x10) == 0) {
|
||||
faultCopyToLog = !faultCopyToLog;
|
||||
FaultDrawer_SetOsSyncPrintfEnabled(faultCopyToLog);
|
||||
}
|
||||
if (~(input3->current.buttons | ~0x8000) == 0) {
|
||||
Fault_Log(D_80098A44, graphPC, graphRA, graphSP);
|
||||
}
|
||||
if (~(input3->current.buttons | ~0x4000) == 0) {
|
||||
FaultDrawer_SetDrawerFB(osViGetNextFramebuffer(), 0x140, 0xF0);
|
||||
Fault_DrawRec(0, 0xD7, 0x140, 9, 1);
|
||||
FaultDrawer_SetCharPad(-2, 0);
|
||||
FaultDrawer_DrawText(0x20, 0xD8, D_80098A68, graphPC, graphRA, graphSP);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("./asm/nonmatching/fault/Fault_SetOptionsFromController3.asm")
|
||||
#endif
|
||||
|
||||
void Fault_SetOptions(void) {
|
||||
Fault_UpdatePadImpl();
|
||||
Fault_SetOptionsFromController3();
|
||||
}
|
||||
|
||||
void Fault_ThreadEntry(void* arg) {
|
||||
OSMesg msg;
|
||||
u32 pad;
|
||||
OSThread* faultedThread;
|
||||
|
||||
osSetEventMesg(10, &faultCtxt->queue, (OSMesg)1);
|
||||
osSetEventMesg(12, &faultCtxt->queue, (OSMesg)2);
|
||||
while (1) {
|
||||
do {
|
||||
osRecvMesg(&faultCtxt->queue, &msg, 1);
|
||||
|
||||
if (msg == (OSMesg)1) {
|
||||
faultCtxt->msgId = 1;
|
||||
Fault_Log(D_80098A88);
|
||||
}
|
||||
else if (msg == (OSMesg)2) {
|
||||
faultCtxt->msgId = 2;
|
||||
Fault_Log(D_80098AC0);
|
||||
}
|
||||
else if (msg == (OSMesg)3) {
|
||||
Fault_SetOptions();
|
||||
faultedThread = NULL;
|
||||
continue;
|
||||
} else {
|
||||
faultCtxt->msgId = 3;
|
||||
Fault_Log(D_80098AF4);
|
||||
}
|
||||
|
||||
faultedThread = __osGetCurrFaultedThread();
|
||||
Fault_Log(D_80098B28, faultedThread);
|
||||
if (!faultedThread)
|
||||
{
|
||||
faultedThread = Fault_FindFaultedThread();
|
||||
Fault_Log(D_80098B4C, faultedThread);
|
||||
}
|
||||
} while (faultedThread == NULL);
|
||||
|
||||
__osSetFpcCsr(__osGetFpcCsr() & 0xFFFFF07F);
|
||||
faultCtxt->faultedThread = faultedThread;
|
||||
while (!faultCtxt->faultHandlerEnabled) {
|
||||
Fault_Sleep(1000);
|
||||
}
|
||||
Fault_Sleep(500);
|
||||
Fault_CommitFB();
|
||||
|
||||
if (faultCtxt->faultActive) {
|
||||
Fault_Wait5Seconds();
|
||||
} else {
|
||||
Fault_DrawCornerRec(0xF801);
|
||||
Fault_WaitForButtonCombo();
|
||||
}
|
||||
|
||||
faultCtxt->faultActive = 1;
|
||||
FaultDrawer_SetForeColor(0xFFFF);
|
||||
FaultDrawer_SetBackColor(0);
|
||||
|
||||
do {
|
||||
Fault_PrintThreadContext(faultedThread);
|
||||
Fault_LogThreadContext(faultedThread);
|
||||
Fault_WaitForInput();
|
||||
Fault_DrawStackTrace(faultedThread, 0);
|
||||
Fault_LogStackTrace(faultedThread, 0);
|
||||
Fault_WaitForInput();
|
||||
Fault_ProcessClients();
|
||||
Fault_DrawMemDump((u32)(faultedThread->context.pc - 0x100), (u32)faultedThread->context.sp, 0, 0);
|
||||
Fault_DrawStackTrace(faultedThread, 1);
|
||||
Fault_LogStackTrace(faultedThread, 1);
|
||||
Fault_WaitForInput();
|
||||
Fault_FillScreenRed();
|
||||
FaultDrawer_DrawText(0x40, 0x50, D_80098B68);
|
||||
FaultDrawer_DrawText(0x40, 0x5A, D_80098B84);
|
||||
FaultDrawer_DrawText(0x40, 0x64, D_80098BA0);
|
||||
FaultDrawer_DrawText(0x40, 0x6E, D_80098BBC);
|
||||
Fault_WaitForInput();
|
||||
|
||||
} while (!faultCtxt->exitDebugger);
|
||||
|
||||
while(!faultCtxt->exitDebugger);
|
||||
|
||||
Fault_ResumeThread(faultedThread);
|
||||
}
|
||||
}
|
||||
|
||||
void Fault_SetFB(void* fb, u16 w, u16 h) {
|
||||
faultCtxt->fb = fb;
|
||||
FaultDrawer_SetDrawerFB(fb, w, h);
|
||||
}
|
||||
|
||||
void Fault_Start(void){
|
||||
faultCtxt = &faultContextStruct;
|
||||
bzero(faultCtxt, sizeof(FaultContext));
|
||||
FaultDrawer_Init();
|
||||
FaultDrawer_SetInputCallback(Fault_WaitForInput);
|
||||
faultCtxt->exitDebugger = 0;
|
||||
faultCtxt->msgId = 0;
|
||||
faultCtxt->faultHandlerEnabled = 0;
|
||||
faultCtxt->faultedThread = NULL;
|
||||
faultCtxt->padCallback = &Fault_PadCallback;
|
||||
faultCtxt->clients = NULL;
|
||||
faultCtxt->faultActive = 0;
|
||||
faultContextStruct.faultHandlerEnabled = 1;
|
||||
osCreateMesgQueue(&faultCtxt->queue, faultCtxt->msg, 1);
|
||||
thread_info_init(&faultThreadInfo, faultStack, &faultStack[1536], 0, 0x100, faultThreadName);
|
||||
osCreateThread(&faultCtxt->thread, 2, (osCreateThread_func)Fault_ThreadEntry, 0, &faultThreadInfo, 0x7f);
|
||||
osStartThread(&faultCtxt->thread);
|
||||
}
|
||||
|
||||
void Fault_HangupFaultClient(char* arg0, char* arg1) {
|
||||
Fault_Log(D_80098BE0, osGetThreadId(0));
|
||||
Fault_Log(D_80098BF8, arg0 ? arg0 : D_80098BFC);
|
||||
Fault_Log(D_80098C04, arg1 ? arg1 : D_80098C08);
|
||||
FaultDrawer_Printf(D_80098C10, osGetThreadId(0));
|
||||
FaultDrawer_Printf(D_80098C28, arg0 ? arg0 : D_80098C2C);
|
||||
FaultDrawer_Printf(D_80098C34, arg1 ? arg1 : D_80098C38);
|
||||
}
|
||||
|
||||
void Fault_AddHungupAndCrashImpl(char* arg0, char* arg1) {
|
||||
FaultClient client;
|
||||
char padd[4];
|
||||
Fault_AddClient(&client, (fault_client_func)Fault_HangupFaultClient, arg0, arg1);
|
||||
*(u32*)0x11111111 = 0; //trigger an exception
|
||||
}
|
||||
|
||||
void Fault_AddHungupAndCrash(char* filename, u32 line) {
|
||||
char msg[256];
|
||||
sprintf(msg, D_80098C40, filename, line);
|
||||
Fault_AddHungupAndCrashImpl(msg, NULL);
|
||||
}
|
||||
@@ -8,7 +8,7 @@ void EnAObj_Init(ActorEnAObj* this, GlobalContext* ctxt) {
|
||||
s0->base.textId = ((s0->base.variable >> 8) & 0xFF) | 0x300;
|
||||
s0->base.variable = (s0->base.variable & 0xFF) - 9;
|
||||
Lib_ApplyActorInitVars((Actor*)s0, (ActorInitVar*)&enAObjInitVar);
|
||||
Actor_SetDrawParams(&s0->base.drawParams, 0, (actor_post_draw_func*)func_800B3FC0, 12);
|
||||
Actor_SetDrawParams(&s0->base.drawParams, 0, (actor_post_draw_func)func_800B3FC0, 12);
|
||||
Collision_InitCylinder(ctxt, &s0->collision, (Actor*)s0, &enAObjCylinderInit);
|
||||
Collision_CylinderMoveToActor((Actor*)s0, &s0->collision);
|
||||
s0->base.unkA0.unk16 = 255;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <PR/ultratypes.h>
|
||||
#include <osint.h>
|
||||
|
||||
void osCreateThread(OSThread* t, OSId id, osCreateThread_func* entry, void* arg, void* sp, OSPri p) {
|
||||
void osCreateThread(OSThread* t, OSId id, osCreateThread_func entry, void* arg, void* sp, OSPri p) {
|
||||
register u32 saveMask;
|
||||
OSIntMask mask;
|
||||
|
||||
|
||||
+59
-59
@@ -48,64 +48,64 @@
|
||||
0x80081920:("Fault_Nop80081920","void","UNK_TYPE4 param_1, ..."),
|
||||
0x8008193C:("Fault_Log","void","char* str, ..."),
|
||||
0x80081958:("Fault_Nop80081958","void","UNK_TYPE4 param_1, ..."),
|
||||
0x80081980:("Fault_WaitMilliseconds2","void","u32 ms"),
|
||||
0x800819F0:("Fault_AddClient","void","FaultClient* client, fault_client_func* func, void* arg1, void* arg2"),
|
||||
0x80081980:("Fault_SleepImpl","void","u32 duration"),
|
||||
0x800819F0:("Fault_AddClient","void","FaultClient* client, fault_client_func callback, void* param0, void* param1"),
|
||||
0x80081AD4:("Fault_RemoveClient","void","FaultClient* client"),
|
||||
0x80081BCC:("Fault_AddressConverterAddClient","void","FaultAddressConverterClient* client, fault_address_converter_func* func, void* arg"),
|
||||
0x80081CA4:("Fault_AddressConverterRemoveClient","void","FaultAddressConverterClient* client"),
|
||||
0x80081BCC:("Fault_AddAddrConvClient","void","FaultAddrConvClient* client, fault_address_converter_func callback, void* param"),
|
||||
0x80081CA4:("Fault_RemoveAddrConvClient","void","FaultAddrConvClient* client"),
|
||||
0x80081D9C:("Fault_ConvertAddress","void*","void* addr"),
|
||||
0x80081E2C:("Fault_WaitMilliseconds","void","u32 ms"),
|
||||
0x80081E68:("Fault_UpdateInputFunc","void","InputStruct* input"),
|
||||
0x80081EA4:("Fault_InputUpdate","void","void"),
|
||||
0x80081EF0:("Fault_WaitForInput","s32","void"),
|
||||
0x8008203C:("Fault_PageEnd","void","void"),
|
||||
0x80082078:("Fault_DrawRectangle","void","s32 x, s32 y, s32 width, s32 height, u16 color"),
|
||||
0x800820D8:("Fault_DrawBlackPage","void","void"),
|
||||
0x8008212C:("Fault_DrawRedPage","void","void"),
|
||||
0x80082180:("Fault_DrawTextCaret","void","u16 color"),
|
||||
0x800821D4:("Fault_PrintFloatToScreen","void","u32 regNum, f32* f"),
|
||||
0x80082280:("Fault_LogFloat","void","u32 regNum, f32* f"),
|
||||
0x80082330:("Fault_PrintFpcCsrToScreen","void","u32 fpcCsr"),
|
||||
0x800823D4:("Fault_LogFpcCsr","void","u32 fpcCsr"),
|
||||
0x8008246C:("Fault_PrintCpuRegistersToScreen","void","OSThread* thread"),
|
||||
0x800827BC:("Fault_LogCpuRegisters","void","OSThread* thread"),
|
||||
0x80081E2C:("Fault_Sleep","void","u32 duration"),
|
||||
0x80081E68:("Fault_PadCallback","void","Input* input"),
|
||||
0x80081EA4:("Fault_UpdatePadImpl","void","void"),
|
||||
0x80081EF0:("Fault_WaitForInputImpl","s32","void"),
|
||||
0x8008203C:("Fault_WaitForInput","void","void"),
|
||||
0x80082078:("Fault_DrawRec","void","s32 x, s32 y, s32 w, s32 h, u16 color"),
|
||||
0x800820D8:("Fault_FillScreenBlack","void","void"),
|
||||
0x8008212C:("Fault_FillScreenRed","void","void"),
|
||||
0x80082180:("Fault_DrawCornerRec","void","u16 color"),
|
||||
0x800821D4:("Fault_PrintFReg","void","s32 idx, f32* value"),
|
||||
0x80082280:("Fault_LogFReg","void","s32 idx, f32* value"),
|
||||
0x80082330:("Fault_PrintFPCR","void","u32 value"),
|
||||
0x800823D4:("Fault_LogFPCR","void","u32 value"),
|
||||
0x8008246C:("Fault_PrintThreadContext","void","OSThread* t"),
|
||||
0x800827BC:("Fault_LogThreadContext","void","OSThread* t"),
|
||||
0x80082AB8:("Fault_FindFaultedThread","OSThread*","void"),
|
||||
0x80082B40:("Fault_Wait5Seconds","void","void"),
|
||||
0x80082BD0:("Fault_WaitForButtonCombo","void","void"),
|
||||
0x80082C6C:("Fault_PrintMemDumPage","void","char* title, void* start, u32 param_3"),
|
||||
0x80082DD8:("Fault_MemDump","void","void* startPc, void* start1, void* start2, void* start3"),
|
||||
0x80082C6C:("Fault_DrawMemDumpPage","void","char* title, u32* addr, u32 param_3"),
|
||||
0x80082DD8:("Fault_DrawMemDump","void","u32 pc, u32 sp, u32 unk0, u32 unk1"),
|
||||
0x80082FD0:("Fault_FindNextStackCall","void","u32** sp, u32** pc, u32** ra"),
|
||||
0x80083144:("Fault_PrintStackTraceToScreen","void","OSThread* thread, u32 flags"),
|
||||
0x800832D4:("Fault_LogStackTrace","void","OSThread* thread, u32 flags"),
|
||||
0x80083450:("Fault_SetNextInstBreak","void","OSThread* thread"),
|
||||
0x800834CC:("Fault_ResetFramebuffer","void","void"),
|
||||
0x8008358C:("Fault_PrintClients","void","void"),
|
||||
0x80083144:("Fault_DrawStackTrace","void","OSThread* t, u32 flags"),
|
||||
0x800832D4:("Fault_LogStackTrace","void","OSThread* t, u32 flags"),
|
||||
0x80083450:("Fault_ResumeThread","void","OSThread* t"),
|
||||
0x800834CC:("Fault_CommitFB","void","void"),
|
||||
0x8008358C:("Fault_ProcessClients","void","void"),
|
||||
0x80083670:("Fault_SetOptionsFromController3","void","void"),
|
||||
0x800837E4:("Fault_SetOptions","void","void"),
|
||||
0x80083828:("Fault_ThreadEntry","void","void* arg"),
|
||||
0x80083B70:("Fault_SetFramebuffer","void","void* framebuffer, u16 width, u16 height"),
|
||||
0x80083B70:("Fault_SetFB","void","void* fb, u16 w, u16 h"),
|
||||
0x80083BC4:("Fault_Start","void","void"),
|
||||
0x80083CF8:("Fault_HungUpThreadPrint","void","char* arg1, char* arg2"),
|
||||
0x80083DF4:("Fault_HungUpThead","void","char* arg1, char* arg2"),
|
||||
0x80083E4C:("Fault_AssertFail","void","char* file, s32 lineNum"),
|
||||
0x80083EB0:("FaultDraw_SetCopyToLog","void","u8 copy"),
|
||||
0x80083EC4:("FaultDraw_DrawRectangle","void","s32 leftX, s32 upperY, s32 rightX, s32 lowerY, u16 color"),
|
||||
0x80083FE4:("FaultDraw_DrawChar","void","u8 c"),
|
||||
0x80084160:("FaultDraw_FindColorIndex","s32","u16 color"),
|
||||
0x80084210:("FaultDraw_UpdatePrintColors","void","void"),
|
||||
0x800842BC:("FaultDraw_SetForgroundColor","void","u16 color"),
|
||||
0x80084308:("FaultDraw_SetBackgroundColor","void","u16 color"),
|
||||
0x80084354:("FaultDraw_SetForegroundColorWithAlpha","void","u16 color"),
|
||||
0x8008439C:("FaultDraw_SetCharPadding","void","s8 x, s8 y"),
|
||||
0x800843D4:("FaultDraw_SetCursor","void","s32 x, int y"),
|
||||
0x800844D8:("FaultDraw_Reset","void","void"),
|
||||
0x80084568:("FaultDraw_PrintfFunc","FaultDrawContext*","FaultDrawContext* arg, char* fmt, size_t n"),
|
||||
0x8008477C:("FaultDraw_PrintfImpl","void","char* str, char* args"),
|
||||
0x800847CC:("FaultDraw_Printf","void","char* uParm1, ..."),
|
||||
0x8008481C:("FaultDraw_DrawText","void","s32 x, s32 y, char* str, ..."),
|
||||
0x8008486C:("FaultDraw_SetFramebuffer","void","void* framebuffer, u16 width, u16 height"),
|
||||
0x800848A4:("FaultDraw_SetPageEndFunc","void","func_ptr* func"),
|
||||
0x800848B8:("FaultDraw_Init","void","void"),
|
||||
0x80083CF8:("Fault_HangupFaultClient","void","char* arg0, char* arg1"),
|
||||
0x80083DF4:("Fault_AddHungupAndCrashImpl","void","char* arg0, char* arg1"),
|
||||
0x80083E4C:("Fault_AddHungupAndCrash","void","char* filename, u32 line"),
|
||||
0x80083EB0:("FaultDrawer_SetOsSyncPrintfEnabled","void","u32 enabled"),
|
||||
0x80083EC4:("FaultDrawer_DrawRecImpl","void","s32 xstart, s32 ystart, s32 xend, s32 yend, u16 color"),
|
||||
0x80083FE4:("FaultDrawer_DrawChar","void","char c"),
|
||||
0x80084160:("FaultDrawer_ColorToPrintColor","s32","u16 color"),
|
||||
0x80084210:("FaultDrawer_UpdatePrintColor","void","void"),
|
||||
0x800842BC:("FaultDrawer_SetForeColor","void","u16 color"),
|
||||
0x80084308:("FaultDrawer_SetBackColor","void","u16 color"),
|
||||
0x80084354:("FaultDrawer_SetFontColor","void","u16 color"),
|
||||
0x8008439C:("FaultDrawer_SetCharPad","void","s8 padW, s8 padH"),
|
||||
0x800843D4:("FaultDrawer_SetCursor","void","s32 x, s32 y"),
|
||||
0x800844D8:("FaultDrawer_FillScreen","void","void"),
|
||||
0x80084568:("FaultDrawer_FormatStringFunc","FaultDrawer*","FaultDrawer* arg, char* str, s32 count"),
|
||||
0x8008477C:("FaultDrawer_VPrintf","void","char* str, char* args"),
|
||||
0x800847CC:("FaultDrawer_Printf","void","char* fmt, ..."),
|
||||
0x8008481C:("FaultDrawer_DrawText","void","s32 x, s32 y, char* fmt, ..."),
|
||||
0x8008486C:("FaultDrawer_SetDrawerFB","void","void* fb, u16 w, u16 h"),
|
||||
0x800848A4:("FaultDrawer_SetInputCallback","void","func_ptr func"),
|
||||
0x800848B8:("FaultDrawer_Init","void","void"),
|
||||
0x80084940:("func_80084940","void","void"),
|
||||
0x80084968:("func_80084968","void","void"),
|
||||
0x800849A0:("func_800849A0","void","void"),
|
||||
@@ -288,7 +288,7 @@
|
||||
0x80089B60:("osContInit","s32","OSMesgQueue* mq, u8* bitpattern, OSContStatus* data"),
|
||||
0x80089CBC:("__osContGetInitData","void","u8* pattern, OSContStatus* data"),
|
||||
0x80089D68:("__osPackRequestData","void","u8 cmd"),
|
||||
0x80089E40:("osCreateThread","void","OSThread* t, OSId id, osCreateThread_func* entry, void* arg, void* sp, OSPri p"),
|
||||
0x80089E40:("osCreateThread","void","OSThread* t, OSId id, osCreateThread_func entry, void* arg, void* sp, OSPri p"),
|
||||
0x80089F90:("osContStartReadData","void","void"),
|
||||
0x8008A014:("osContGetReadData","void","void"),
|
||||
0x8008A0A0:("__osPackReadData","void","void"),
|
||||
@@ -349,7 +349,7 @@
|
||||
0x8008D7AC:("osContGetQuery","void","OSContStatus* data"),
|
||||
0x8008D7D0:("guLookAtHiliteF","void","f32* mf, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 twidth, s32 theight"),
|
||||
0x8008DF90:("guLookAtHilite","void","Mtx* m, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 twidth, s32 theight"),
|
||||
0x8008E050:("_Printf","int","printf_func* pfn, void* arg, char* fmt, char* ap"),
|
||||
0x8008E050:("_Printf","int","printf_func pfn, void* arg, char* fmt, char* ap"),
|
||||
0x8008E698:("func_8008E698","void","void"),
|
||||
0x8008ED30:("func_8008ED30","void","void"),
|
||||
0x8008EDE0:("osUnmapTLBAll","void","void"),
|
||||
@@ -655,7 +655,7 @@
|
||||
0x800B3880:("DLF_LoadGameState","void","GameStateMetaInfo* gameState"),
|
||||
0x800B39A4:("DLF_FreeGameState","void","GameStateMetaInfo* gameState"),
|
||||
0x800B3AD0:("Actor_PrintLists","void","ActorContext* actCtxt"),
|
||||
0x800B3BA4:("Actor_SetDrawParams","void","ActorDrawParams* iParm1, f32 yDisplacement, actor_post_draw_func* func, f32 scale"),
|
||||
0x800B3BA4:("Actor_SetDrawParams","void","ActorDrawParams* iParm1, f32 yDisplacement, actor_post_draw_func func, f32 scale"),
|
||||
0x800B3BC8:("Actor_PostDraw","void","Actor* actor, LightMapper* mapper, GlobalContext* ctxt, u32 displayList, ColorRGBA8* color"),
|
||||
0x800B3FC0:("func_800B3FC0","void","Actor* actor, LightMapper* mapper, GlobalContext* ctxt"),
|
||||
0x800B4024:("func_800B4024","void","Actor* actor, LightMapper* mapper, GlobalContext* ctxt"),
|
||||
@@ -2169,7 +2169,7 @@
|
||||
0x80122524:("func_80122524","void","void"),
|
||||
0x801225CC:("func_801225CC","void","void"),
|
||||
0x80122660:("func_80122660","void","void"),
|
||||
0x80122670:("func_80122670","UNK_TYPE4","int* param_1, InputStruct* input"),
|
||||
0x80122670:("func_80122670","UNK_TYPE4","int* param_1, Input* input"),
|
||||
0x801226E0:("func_801226E0","void","void"),
|
||||
0x80122744:("func_80122744","void","void"),
|
||||
0x80122760:("func_80122760","void","void"),
|
||||
@@ -3016,7 +3016,7 @@
|
||||
0x8016EA90:("func_8016EA90","void","void"),
|
||||
0x8016F1A8:("func_8016F1A8","void","void"),
|
||||
0x8016F4EC:("func_8016F4EC","void","void"),
|
||||
0x8016F5A8:("func_8016F5A8","void","GlobalContext* ctxt, s8* pcParm2, InputStruct* iParm3"),
|
||||
0x8016F5A8:("func_8016F5A8","void","GlobalContext* ctxt, s8* pcParm2, Input* iParm3"),
|
||||
0x8016FC78:("func_8016FC78","void","void"),
|
||||
0x8016FC98:("func_8016FC98","void","void"),
|
||||
0x8016FCF0:("func_8016FCF0","void","UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6"),
|
||||
@@ -3098,7 +3098,7 @@
|
||||
0x801737E4:("Game_IncrementFrameCount","void","ContextCommon* ctxt"),
|
||||
0x80173810:("Game_InitHeap","void","ContextCommon* ctxt, u32 size"),
|
||||
0x80173880:("Game_ResizeHeap","void","ContextCommon* ctxt, u32 size"),
|
||||
0x80173950:("Game_StateInit","void","ContextCommon* ctxt, func_ptr* gameStateInit, GraphicsContext* gCtxt"),
|
||||
0x80173950:("Game_StateInit","void","ContextCommon* ctxt, func_ptr gameStateInit, GraphicsContext* gCtxt"),
|
||||
0x80173A50:("Game_StateFini","void","ContextCommon* ctxt"),
|
||||
0x80173B00:("Game_GetNextStateInit","UNK_TYPE4","ContextCommon* ctxt"),
|
||||
0x80173B0C:("Game_GetNextStateSize","u32","ContextCommon* ctxt"),
|
||||
@@ -3147,15 +3147,15 @@
|
||||
0x8017544C:("func_8017544C","void","void"),
|
||||
0x80175474:("func_80175474","void","void"),
|
||||
0x801754C0:("func_801754C0","void","void"),
|
||||
0x801754E0:("Padmgr_CalcStickEdges","void","InputStruct* input"),
|
||||
0x801754E0:("Padmgr_CalcStickEdges","void","Input* input"),
|
||||
0x801757A4:("Padmgr_ParseState","void","void"),
|
||||
0x801759BC:("func_801759BC","void","void"),
|
||||
0x80175AE0:("func_80175AE0","void","void"),
|
||||
0x80175C80:("Padmgr_Update","void","void"),
|
||||
0x80175E3C:("Padmgr_Stop","void","void"),
|
||||
0x80175E68:("func_80175E68","void","InputStruct* input, int param_2"),
|
||||
0x80175F98:("Padmgr_GetInput","void","InputStruct* input, int param_2"),
|
||||
0x80175FD4:("Padmgr_GetInput2","void","InputStruct* input, int param_2"),
|
||||
0x80175E68:("func_80175E68","void","Input* input, int param_2"),
|
||||
0x80175F98:("Padmgr_GetInput","void","Input* input, int param_2"),
|
||||
0x80175FD4:("Padmgr_GetInput2","void","Input* input, int param_2"),
|
||||
0x80176010:("Padmgr_ThreadEntry","void","PadmgrThreadStruct* padmgr"),
|
||||
0x80176194:("Padmgr_Start","void","OSMesgQueue* siEventCallbackQueue, Irqmgr* irqmgr, OSId threadId, OSPri threadPri, void* stack"),
|
||||
0x80176280:("func_80176280","void","void"),
|
||||
@@ -6881,7 +6881,7 @@
|
||||
0x80920140:("func_80920140","void","void"),
|
||||
0x80920164:("func_80920164","void","void"),
|
||||
0x809201BC:("func_809201BC","void","void"),
|
||||
0x80920340:("FireArrow_SetUpdateFunc","void","ActorArrowFire* this, actor_func* update"),
|
||||
0x80920340:("FireArrow_SetUpdateFunc","void","ActorArrowFire* this, actor_func update"),
|
||||
0x8092034C:("ArrowFire_Init","void","ActorArrowFire* this, GlobalContext* ctxt"),
|
||||
0x809203F8:("ArrowFire_Fini","void","ActorArrowFire* this, GlobalContext* ctxt"),
|
||||
0x80920440:("FireArrow_Update1","void","ActorArrowFire* pzParm1"),
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
0x80081250:"",
|
||||
0x80081820:"CIC6105",
|
||||
0x80081920:"",
|
||||
0x80081980:"",
|
||||
0x80081980:"fault",
|
||||
0x80083EB0:"",
|
||||
0x80084940:"loadfragment",
|
||||
0x80084DB0:"loadfragment2",
|
||||
|
||||
+29
-23
@@ -13,10 +13,10 @@
|
||||
0x80096B68:("lastPrenmiTime","OSTime",""),
|
||||
0x80096B70:("lastFrameDuration","u64",""),
|
||||
0x80096B78:("frameCount","s32",""),
|
||||
0x80096B80:("D_80096B80","char","[][18]"),
|
||||
0x80096BC8:("D_80096BC8","char","[][6]"),
|
||||
0x80096BE0:("faultDrawContext","FaultDrawContext*",""),
|
||||
0x80096BE4:("faultDrawContextInit","FaultDrawContext",""),
|
||||
0x80096B80:("D_80096B80","char*","[18]"),
|
||||
0x80096BC8:("D_80096BC8","char*","[6]"),
|
||||
0x80096BE0:("faultDrawContext","FaultDrawer*",""),
|
||||
0x80096BE4:("faultDrawContextInit","FaultDrawer",""),
|
||||
0x80096C20:("D_80096C20","UNK_TYPE4",""),
|
||||
0x80096C30:("D_80096C30","UNK_TYPE4",""),
|
||||
0x80096C40:("ThreadInfoListHead","ThreadInfo*",""),
|
||||
@@ -116,15 +116,17 @@
|
||||
0x80098488:("D_80098488","char","[]"),
|
||||
0x80098494:("D_80098494","char","[]"),
|
||||
0x800984A0:("D_800984A0","char","[]"),
|
||||
0x800984B4:("D_800984B4","UNK_TYPE1",""),
|
||||
0x800984EC:("D_800984EC","UNK_TYPE1",""),
|
||||
0x80098524:("D_80098524","UNK_TYPE1",""),
|
||||
0x8009856C:("D_8009856C","UNK_TYPE1",""),
|
||||
0x800984B4:("D_800984B4","char","[55]"),
|
||||
0x800984EC:("D_800984EC","char","[54]"),
|
||||
0x80098524:("D_80098524","char","[71]"),
|
||||
0x8009856C:("D_8009856C","char","[74]"),
|
||||
0x800985B8:("D_800985B8","char","[]"),
|
||||
0x800985C8:("D_800985C8","char","[]"),
|
||||
0x800985DC:("D_800985DC","char","[]"),
|
||||
0x800985EC:("D_800985EC","char","[]"),
|
||||
0x80098600:("D_80098600","char","[]"),
|
||||
0x80098610:("D_80098610","UNK_TYPE1",""),
|
||||
0x80098618:("D_80098618","UNK_TYPE1",""),
|
||||
0x80098610:("D_80098610","char","[]"),
|
||||
0x80098618:("D_80098618","char","[]"),
|
||||
0x8009861C:("D_8009861C","char","[]"),
|
||||
0x8009862C:("D_8009862C","char","[]"),
|
||||
0x80098634:("D_80098634","char","[]"),
|
||||
@@ -149,6 +151,7 @@
|
||||
0x8009879C:("D_8009879C","char","[]"),
|
||||
0x800987A0:("D_800987A0","char","[]"),
|
||||
0x800987A4:("D_800987A4","char","[]"),
|
||||
0x800987B0:("D_800987B0","char","[]"),
|
||||
0x800987B4:("D_800987B4","char","[]"),
|
||||
0x800987CC:("D_800987CC","char","[]"),
|
||||
0x800987EC:("D_800987EC","char","[]"),
|
||||
@@ -180,32 +183,35 @@
|
||||
0x8009898C:("D_8009898C","char","[]"),
|
||||
0x800989A4:("D_800989A4","char","[]"),
|
||||
0x800989B0:("D_800989B0","char","[]"),
|
||||
0x800989BC:("D_800989BC","char","[]"),
|
||||
0x800989CC:("D_800989CC","char","[]"),
|
||||
0x800989D8:("D_800989D8","char","[]"),
|
||||
0x800989F4:("D_800989F4","char","[]"),
|
||||
0x80098A00:("D_80098A00","char","[]"),
|
||||
0x80098A0C:("D_80098A0C","char","[]"),
|
||||
0x80098A1C:("D_80098A1C","char","[]"),
|
||||
0x80098A20:("D_80098A20","UNK_TYPE1",""),
|
||||
0x80098A20:("D_80098A20","char","[34]"),
|
||||
0x80098A44:("D_80098A44","char","[]"),
|
||||
0x80098A68:("D_80098A68","char","[]"),
|
||||
0x80098A88:("D_80098A88","UNK_TYPE1",""),
|
||||
0x80098AC0:("D_80098AC0","UNK_TYPE1",""),
|
||||
0x80098AF4:("D_80098AF4","UNK_TYPE1",""),
|
||||
0x80098A88:("D_80098A88","char","[53]"),
|
||||
0x80098AC0:("D_80098AC0","char","[49]"),
|
||||
0x80098AF4:("D_80098AF4","char","[51]"),
|
||||
0x80098B28:("D_80098B28","char","[]"),
|
||||
0x80098B4C:("D_80098B4C","char","[]"),
|
||||
0x80098B68:("D_80098B68","char","[]"),
|
||||
0x80098B84:("D_80098B84","char","[]"),
|
||||
0x80098BA0:("D_80098BA0","char","[]"),
|
||||
0x80098BBC:("D_80098BBC","char","[]"),
|
||||
0x80098BD8:("faultThreadName","char","[]"),
|
||||
0x80098BE0:("D_80098BE0","char","[]"),
|
||||
0x80098BF8:("D_80098BF8","UNK_TYPE1",""),
|
||||
0x80098BF8:("D_80098BF8","char","[]"),
|
||||
0x80098BFC:("D_80098BFC","char","[]"),
|
||||
0x80098C04:("D_80098C04","UNK_TYPE1",""),
|
||||
0x80098C04:("D_80098C04","char","[]"),
|
||||
0x80098C08:("D_80098C08","char","[]"),
|
||||
0x80098C10:("D_80098C10","char","[]"),
|
||||
0x80098C28:("D_80098C28","UNK_TYPE1",""),
|
||||
0x80098C28:("D_80098C28","char","[]"),
|
||||
0x80098C2C:("D_80098C2C","char","[]"),
|
||||
0x80098C34:("D_80098C34","UNK_TYPE1",""),
|
||||
0x80098C34:("D_80098C34","char","[]"),
|
||||
0x80098C38:("D_80098C38","char","[]"),
|
||||
0x80098C40:("D_80098C40","char","[]"),
|
||||
0x80098C50:("faultDrawFont","u8","[8][128]"),
|
||||
@@ -280,13 +286,13 @@
|
||||
0x8009BE34:("D_8009BE34","UNK_TYPE4",""),
|
||||
0x8009BE38:("romInfoFaultClient","FaultClient",""),
|
||||
0x8009BE50:("faultCtxt","FaultContext*",""),
|
||||
0x8009BE54:("D_8009BE54","UNK_TYPE4",""),
|
||||
0x8009BE54:("D_8009BE54","f32",""),
|
||||
0x8009BE58:("faultCustomOptions","u32",""),
|
||||
0x8009BE5C:("faultCopyToLog","u32",""),
|
||||
0x8009BE60:("faultStack","u8","[1536]"),
|
||||
0x8009C460:("faultThreadInfo","ThreadInfo",""),
|
||||
0x8009C480:("faultContextStruct","FaultContext",""),
|
||||
0x8009CCD0:("faultDrawContextStruct","FaultDrawContext",""),
|
||||
0x8009CCD0:("faultDrawContextStruct","FaultDrawer",""),
|
||||
0x8009CD10:("D_8009CD10","UNK_TYPE4",""),
|
||||
0x8009CD20:("startHeap","Heap",""),
|
||||
0x8009CD50:("randLast","f32",""),
|
||||
@@ -1202,7 +1208,7 @@
|
||||
0x801D0D54:("D_801D0D54","UNK_TYPE1",""),
|
||||
0x801D0D58:("D_801D0D58","UNK_TYPE2",""),
|
||||
0x801D0D5C:("D_801D0D5C","UNK_TYPE2",""),
|
||||
0x801D0D60:("D_801D0D60","InputStruct*",""),
|
||||
0x801D0D60:("D_801D0D60","Input*",""),
|
||||
0x801D0D64:("D_801D0D64","UNK_TYPE2",""),
|
||||
0x801D0D7A:("D_801D0D7A","UNK_TYPE1",""),
|
||||
0x801D0D80:("D_801D0D80","UNK_TYPE1",""),
|
||||
@@ -2743,7 +2749,7 @@
|
||||
0x801F6C00:("D_801F6C00","UNK_TYPE1",""),
|
||||
0x801F6C04:("D_801F6C04","UNK_TYPE1",""),
|
||||
0x801F6C10:("D_801F6C10","UNK_TYPE1",""),
|
||||
0x801F6C18:("D_801F6C18","InputStruct",""),
|
||||
0x801F6C18:("D_801F6C18","Input",""),
|
||||
0x801F6C30:("D_801F6C30","UNK_TYPE1",""),
|
||||
0x801F6D0C:("D_801F6D0C","UNK_TYPE1",""),
|
||||
0x801F6D10:("D_801F6D10","UNK_TYPE4",""),
|
||||
@@ -2764,7 +2770,7 @@
|
||||
0x801F8020:("D_801F8020","UNK_TYPE1",""),
|
||||
0x801F8030:("D_801F8030","UNK_TYPE1",""),
|
||||
0x801F8048:("D_801F8048","UNK_TYPE1",""),
|
||||
0x801F80D0:("grapgFaultAddrConvClient","FaultAddressConverterClient",""),
|
||||
0x801F80D0:("grapgFaultAddrConvClient","FaultAddrConvClient",""),
|
||||
0x801F80E0:("graphFaultClient","FaultClient",""),
|
||||
0x801F80F0:("graphDlEntry","Gfx*",""),
|
||||
0x801F80F8:("D_801F80F8","UNK_TYPE1",""),
|
||||
|
||||
Reference in New Issue
Block a user