Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JUTException.h
Go to the documentation of this file.
1#ifndef JUTEXCEPTION_H
2#define JUTEXCEPTION_H
3
6#include "__va_arg.h"
7#include "dolphin/gx/GXEnum.h"
9#include "global.h"
10
12typedef struct OSContext OSContext;
13class JUTDirectPrint;
14
20public:
21 /* 802E40CC */ JUTExternalFB(_GXRenderModeObj*, GXGamma, void*, u32);
22
23private:
25 /* 0x04 */ u32 mSize;
26 /* 0x08 */ u32 field_0x08;
27 /* 0x0C */ u16 field_0x0C;
28 /* 0x0E */ u16 mGamma;
29 /* 0x10 */ bool field_0x10;
30 /* 0x11 */ u8 field_[3];
31};
32
34
35#define JUT_PRINT_GPR 1
36#define JUT_PRINT_GPR_MAP 2
37#define JUT_PRINT_SRR0_MAP 4
38#define JUT_PRINT_FLOAT 8
39#define JUT_PRINT_STACK 16
40
45class JUTException : public JKRThread {
46public:
54
56 public:
58
59 public:
60 /* 0x00 */ char* mPath;
62 /* 0x14 */
63 };
64
65 /* 802E1D5C */ JUTException(JUTDirectPrint*);
66 /* 802E40EC */ virtual ~JUTException();
67
68 /* 802E22C4 */ void showFloatSub(int, f32);
69 /* 802E2454 */ void showFloat(OSContext*);
70 /* 802E26B0 */ void showStack(OSContext*);
71 /* 802E27B0 */ void showMainInfo(u16, OSContext*, u32, u32);
72 /* 802E2A84 */ void showGPR(OSContext*);
73 /* 802E2B44 */ bool showMapInfo_subroutine(u32, bool);
74 /* 802E2CA0 */ void showGPRMap(OSContext*);
75 /* 802E2DAC */ void showSRR0Map(OSContext*);
77 /* 802E2F18 */ bool isEnablePad() const;
78 /* 802E2F54 */ bool readPad(u32*, u32*);
79 /* 802E34C0 */ void printContext(u16, OSContext*, u32, u32);
80 /* 802E3A08 */ void createFB();
81
82 /* 802E1EA8 */ /* vt[03] */ virtual void* run();
83
84 /* 802E1E40 */ static JUTException* create(JUTDirectPrint*);
85 /* 802E1FCC */ static void errorHandler(OSError, OSContext*, u32, u32);
86 /* 802E20C0 */ static void panic_f_va(char const*, int, char const*, va_list);
87 /* 802E21FC */ static void panic_f(char const*, int, char const*, ...);
88 /* 802E227C */ static void setFPException(u32);
89 /* 802E2578 */ static bool searchPartialModule(u32, u32*, u32*, u32*, u32*);
92 /* 802E3B0C */ static void appendMapFile(char const*);
93 /* 802E3BA0 */ static bool queryMapAddress(char*, u32, s32, u32*, u32*, char*, u32, bool, bool);
94 /* 802E3C90 */ static bool queryMapAddress_single(char*, u32, s32, u32*, u32*, char*, u32, bool,
95 bool);
96 /* 802E3FEC */ static void createConsole(void*, u32);
97 /* 802E3980 */ static void waitTime(s32);
98
100 static JUTConsole* getConsole() { return sConsole; }
101
103
109
110 static void setMapFile(const char* map) {
112 }
113 static void panic(const char* file, int line, const char* msg) {
114 panic_f(file, line, "%s", msg);
115 }
116
117private:
119 static const char* sCpuExpName[17];
121 static OSMessage sMessageBuffer[1 + 1 /* padding */];
125 static void* sConsoleBuffer;
128 static u32 msr;
129 static u32 fpscr;
130
131private:
134 /* 0x84 */ JUTGamePad* mGamePad;
138 /* 0x94 */ u32 mTraceSuppress;
139 /* 0x98 */ u32 field_0x98;
140 /* 0x9C */ u32 mPrintFlags;
141 /* 0xA0 */ u32 mStackPointer;
142};
143
145
150struct JUTWarn {
151 JUTWarn& operator<<(const char*) { return *this; }
152 JUTWarn& operator<<(long) { return *this; }
153};
154
155#endif /* JUTEXCEPTION_H */
enum _GXGamma GXGamma
STATIC_ASSERT(sizeof(JUTExternalFB)==0x14)
void(* OSErrorHandler)(OSError error, OSContext *context, u32, u32)
Definition OSError.h:55
u16 OSError
Definition OSError.h:13
void * OSMessage
Definition OSMessage.h:10
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRThread.h:23
Definition JSUList.h:96
Definition JUTConsole.h:13
Definition JUTDirectPrint.h:11
Definition JUTException.h:55
JUTExMapFile(char *path)
Definition JUTException.h:57
JSULink< JUTExMapFile > mLink
Definition JUTException.h:61
char * mPath
Definition JUTException.h:60
Definition JUTException.h:45
JUTExternalFB * getFrameMemory() const
Definition JUTException.h:102
u32 field_0x98
Definition JUTException.h:139
void showFloat(OSContext *)
Definition JUTException.cpp:318
static void setMapFile(const char *map)
Definition JUTException.h:110
void createFB()
Definition JUTException.cpp:883
void showGPR(OSContext *)
Definition JUTException.cpp:484
JUTGamePad::EPadPort mGamePadPort
Definition JUTException.h:135
bool showMapInfo_subroutine(u32, bool)
Definition JUTException.cpp:499
void showStack(OSContext *)
Definition JUTException.cpp:395
JUTDirectPrint * mDirectPrint
Definition JUTException.h:133
static JSUList< JUTException::JUTExMapFile > sMapFileList
Definition JUTException.h:120
static void errorHandler(OSError, OSContext *, u32, u32)
Definition JUTException.cpp:206
static bool queryMapAddress_single(char *, u32, s32, u32 *, u32 *, char *, u32, bool, bool)
Definition JUTException.cpp:984
void showGPRMap(OSContext *)
Definition JUTException.cpp:548
void setGamePad(JUTGamePad *gamePad)
Definition JUTException.h:105
void printContext(u16, OSContext *, u32, u32)
Definition JUTException.cpp:709
static void panic(const char *file, int line, const char *msg)
Definition JUTException.h:113
bool isEnablePad() const
Definition JUTException.cpp:616
static JUTException * sErrorManager
Definition JUTException.h:122
s32 mPrintWaitTime0
Definition JUTException.h:136
static void waitTime(s32)
Definition JUTException.cpp:870
static JUTException * getManager()
Definition JUTException.h:99
static void panic_f(char const *, int, char const *,...)
Definition JUTException.cpp:269
u32 mStackPointer
Definition JUTException.h:141
void printDebugInfo(JUTException::EInfoPage, OSError, OSContext *, u32, u32)
Definition JUTException.cpp:595
static OSErrorHandler setPostUserCallback(OSErrorHandler)
Definition JUTException.cpp:921
EInfoPage
Definition JUTException.h:47
@ EINFO_PAGE_GPR_MAP
Definition JUTException.h:51
@ EINFO_PAGE_GPR
Definition JUTException.h:48
@ EINFO_PAGE_SSR0_MAP
Definition JUTException.h:52
@ EINFO_PAGE_FLOAT
Definition JUTException.h:49
@ EINFO_PAGE_STACK
Definition JUTException.h:50
s32 mPrintWaitTime1
Definition JUTException.h:137
static u32 sConsoleBufferSize
Definition JUTException.h:126
static OSErrorHandler setPreUserCallback(OSErrorHandler)
Definition JUTException.cpp:913
virtual ~JUTException()
Definition JUTException.cpp:1148
static bool searchPartialModule(u32, u32 *, u32 *, u32 *, u32 *)
Definition JUTException.cpp:340
void setTraceSuppress(u32 param_0)
Definition JUTException.h:104
static void * sConsoleBuffer
Definition JUTException.h:125
u32 mPrintFlags
Definition JUTException.h:140
JUTExternalFB * mFrameMemory
Definition JUTException.h:132
bool readPad(u32 *, u32 *)
Definition JUTException.cpp:627
static OSMessageQueue sMessageQueue
Definition JUTException.h:65
static void appendMapFile(char const *)
Definition JUTException.cpp:929
static JUTConsole * getConsole()
Definition JUTException.h:100
static bool queryMapAddress(char *, u32, s32, u32 *, u32 *, char *, u32, bool, bool)
Definition JUTException.cpp:947
void showSRR0Map(OSContext *)
Definition JUTException.cpp:577
static void setFPException(u32)
Definition JUTException.cpp:278
JUTGamePad * mGamePad
Definition JUTException.h:134
static JUTException * create(JUTDirectPrint *)
Definition JUTException.cpp:125
virtual void * run()
Definition JUTException.cpp:150
static void createConsole(void *, u32)
Definition JUTException.cpp:1115
u32 mTraceSuppress
Definition JUTException.h:138
static OSErrorHandler sPreUserCallback
Definition JUTException.h:123
void showFloatSub(int, f32)
Definition JUTException.cpp:291
static OSErrorHandler sPostUserCallback
Definition JUTException.h:124
static OSMessage sMessageBuffer[1+1]
Definition JUTException.h:137
void showMainInfo(u16, OSContext *, u32, u32)
Definition JUTException.cpp:422
static void panic_f_va(char const *, int, char const *, va_list)
Definition JUTException.cpp:237
static u32 msr
Definition JUTException.h:128
static const char * sCpuExpName[17]
Definition JUTException.h:71
static JUTConsole * sConsole
Definition JUTException.h:127
static u32 fpscr
Definition JUTException.h:129
Definition JUTException.h:19
u32 mSize
Definition JUTException.h:25
u8 field_[3]
Definition JUTException.h:30
u16 mGamma
Definition JUTException.h:28
bool field_0x10
Definition JUTException.h:29
_GXRenderModeObj * mRenderMode
Definition JUTException.h:24
u32 field_0x08
Definition JUTException.h:26
u16 field_0x0C
Definition JUTException.h:27
Definition JUTGamePad.h:45
EPadPort
Definition JUTGamePad.h:54
@ Port_Unknown
Definition JUTGamePad.h:55
Definition JUTException.h:150
JUTWarn & operator<<(const char *)
Definition JUTException.h:151
JUTWarn & operator<<(long)
Definition JUTException.h:152
Definition OSContext.h:137
Definition OSMessage.h:12
Definition GXStruct.h:22
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8