mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-10 19:20:13 +00:00
is_debug.c and boot_main.c OK (#1641)
* Match is_debug.c and boot_main.c * Disable function declarations * Remove /* OOT_DEBUG */ * Remove newlines around ifdef
This commit is contained in:
parent
0f11f2f166
commit
64d384b4c1
3 changed files with 16 additions and 0 deletions
|
@ -36,10 +36,14 @@ void Locale_ResetRegion(void);
|
|||
u32 func_80001F48(void);
|
||||
u32 func_80001F8C(void);
|
||||
u32 Locale_IsRegionNative(void);
|
||||
#if OOT_DEBUG
|
||||
void isPrintfInit(void);
|
||||
#endif
|
||||
void rmonPrintf(const char* fmt, ...);
|
||||
#if OOT_DEBUG
|
||||
void* is_proutSyncPrintf(void* arg, const char* str, size_t count);
|
||||
NORETURN void func_80002384(const char* exp, const char* file, u32 line);
|
||||
#endif
|
||||
OSPiHandle* osDriveRomInit(void);
|
||||
void Mio0_Decompress(Yaz0Header* hdr, u8* dst);
|
||||
void StackCheck_Init(StackEntry* entry, void* stackBottom, void* stackTop, u32 initValue, s32 minSpace,
|
||||
|
|
|
@ -21,7 +21,9 @@ void bootproc(void) {
|
|||
|
||||
gCartHandle = osCartRomInit();
|
||||
osDriveRomInit();
|
||||
#ifdef OOT_DEBUG
|
||||
isPrintfInit();
|
||||
#endif
|
||||
Locale_Init();
|
||||
|
||||
StackCheck_Init(&sIdleThreadInfo, sIdleThreadStack, STACK_TOP(sIdleThreadStack), 0, 256, "idle");
|
||||
|
|
|
@ -5,18 +5,22 @@ OSPiHandle* sISVHandle; // official name : is_Handle
|
|||
#define gISVDbgPrnAdrs ((ISVDbg*)0xB3FF0000)
|
||||
#define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))
|
||||
|
||||
#ifdef OOT_DEBUG
|
||||
void isPrintfInit(void) {
|
||||
sISVHandle = osCartRomInit();
|
||||
osEPiWriteIo(sISVHandle, (u32)&gISVDbgPrnAdrs->put, 0);
|
||||
osEPiWriteIo(sISVHandle, (u32)&gISVDbgPrnAdrs->get, 0);
|
||||
osEPiWriteIo(sISVHandle, (u32)&gISVDbgPrnAdrs->magic, ASCII_TO_U32('I', 'S', '6', '4'));
|
||||
}
|
||||
#endif
|
||||
|
||||
void osSyncPrintfUnused(const char* fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
#ifdef OOT_DEBUG
|
||||
_Printf(is_proutSyncPrintf, NULL, fmt, args);
|
||||
#endif
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
@ -25,7 +29,9 @@ void osSyncPrintf(const char* fmt, ...) {
|
|||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
#ifdef OOT_DEBUG
|
||||
_Printf(is_proutSyncPrintf, NULL, fmt, args);
|
||||
#endif
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
@ -35,11 +41,14 @@ void rmonPrintf(const char* fmt, ...) {
|
|||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
#ifdef OOT_DEBUG
|
||||
_Printf(is_proutSyncPrintf, NULL, fmt, args);
|
||||
#endif
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
#ifdef OOT_DEBUG
|
||||
void* is_proutSyncPrintf(void* arg, const char* str, size_t count) {
|
||||
u32 data;
|
||||
s32 pos;
|
||||
|
@ -92,3 +101,4 @@ NORETURN void func_80002384(const char* exp, const char* file, u32 line) {
|
|||
;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue