name some data symbols

This commit is contained in:
elijah-thomas774
2024-05-31 19:30:35 -04:00
parent 09eebc77b3
commit f612e9902f
4 changed files with 24 additions and 35 deletions
+8 -8
View File
@@ -40877,8 +40877,8 @@ mDefaultTagProcessor__Q34nw4r2ut17TextWriterBase<w> = .sbss:0x805765DC; // type:
@GUARD@mDefaultTagProcessor__Q34nw4r2ut17TextWriterBase<c> = .sbss:0x805765E0; // type:object size:0x1 scope:weak data:byte
@GUARD@mDefaultTagProcessor__Q34nw4r2ut17TextWriterBase<w> = .sbss:0x805765E1; // type:object size:0x1 scope:weak data:byte
sInitialized__Q24nw4r2db = .sbss:0x805765E8; // type:object size:0x4 scope:local data:4byte
lbl_805765F0 = .sbss:0x805765F0; // type:object size:0x4 data:4byte
lbl_805765F4 = .sbss:0x805765F4; // type:object size:0x1 data:byte
sConsoleList__Q24nw4r2db = .sbss:0x805765F0; // type:object size:0x4 scope:local data:4byte
sInited__Q24nw4r2db = .sbss:0x805765F4; // type:object size:0x1 data:byte
sMessageBuffer__Q24nw4r2db = .sbss:0x805765F8; // type:object size:0x8
sFileLength__Q24nw4r2db = .sbss:0x80576600; // type:object size:0x4 scope:local data:4byte
sMapFileList__Q24nw4r2db = .sbss:0x80576604; // type:object size:0x4 scope:local data:4byte
@@ -49351,12 +49351,12 @@ mLoadingTexture__Q34nw4r2ut10CharWriter = .bss:0x80636B58; // type:object size:0
@3896 = .bss:0x80636B74; // type:object size:0xC scope:local
sFrameBufferInfo__Q24nw4r2db = .bss:0x80636B80; // type:object size:0x10 data:4byte
sFrameBufferColor__Q24nw4r2db = .bss:0x80636B90; // type:object size:0x14 data:byte
lbl_80636BA8 = .bss:0x80636BA8; // type:object size:0x18
lbl_80636BC0 = .bss:0x80636BC0; // type:object size:0x400
lbl_80636FC0 = .bss:0x80636FC0; // type:object size:0x360
lbl_80637320 = .bss:0x80637320; // type:object size:0x4000
lbl_8063B320 = .bss:0x8063B320; // type:object size:0x200
lbl_8063B520 = .bss:0x8063B520; // type:object size:0x3C
sMutex__Q24nw4r2db = .bss:0x80636BA8; // type:object size:0x18
sStrBuf__Q24nw4r2db = .bss:0x80636BC0; // type:object size:0x400
sException__Q24nw4r2db = .bss:0x80636FC0; // type:object size:0x360
sThreadBuffer__Q24nw4r2db = .bss:0x80637320; // type:object size:0x4000
sMapBuf__Q24nw4r2db = .bss:0x8063B320; // type:object size:0x200 scope:local
sFileInfo__Q24nw4r2db = .bss:0x8063B520; // type:object size:0x3C scope:local
lbl_8063B560 = .bss:0x8063B560; // type:object size:0x300
lbl_8063B860 = .bss:0x8063B860; // type:object size:0x140
lbl_8063B9A0 = .bss:0x8063B9A0; // type:object size:0xC data:byte
+12 -17
View File
@@ -9,7 +9,7 @@ namespace db {
static ConsoleHandle sConsoleList;
static OSMutex sMutex;
static u8 buf[0x400];
static u8 sStrBuf[0x400];
bool sInited;
static ConsoleHandle FindInsertionPosition_(u16 priority) {
@@ -128,7 +128,6 @@ ConsoleHandle Console_Destroy(ConsoleHandle console) {
return console;
}
static u8 *GetTextPtr_(ConsoleHandle console, u16 line, u16 xPos) {
return &console->textBuf[(console->width + 1) * line + xPos];
}
@@ -152,15 +151,13 @@ static u16 GetActiveLines_(ConsoleHandle console) {
static void DoDrawString_(ConsoleHandle console, u32 printLine, const u8 *str, nw4r::ut::TextWriterBase<char> *writer) {
if (writer != nullptr) {
writer->Printf("%s\n", str);
} else {
s32 height = console->viewPosY + printLine * 10;
db::DirectPrint_DrawString(console->viewPosX, height, false, "%s\n",
str);
}
writer->Printf("%s\n", str);
} else {
s32 height = console->viewPosY + printLine * 10;
db::DirectPrint_DrawString(console->viewPosX, height, false, "%s\n", str);
}
}
static void DoDrawConsole_(ConsoleHandle console, nw4r::ut::TextWriterBase<char> *writer) {
// I guess we don't care if locking the mutex fails??
TryLockMutex_(&sMutex);
@@ -177,8 +174,7 @@ static void DoDrawConsole_(ConsoleHandle console, nw4r::ut::TextWriterBase<char>
}
line = console->ringTop + viewOffset;
if ( line >= console->height )
{
if (line >= console->height) {
line -= console->height;
}
@@ -215,7 +211,6 @@ void Console_DrawDirect(ConsoleHandle console) {
}
}
static void TerminateLine_(ConsoleHandle console) {
*GetTextPtr_(console, console->printTop, console->printXPos) = '\0';
}
@@ -346,8 +341,8 @@ static void Console_PrintString_(ConsoleOutputType type, ConsoleHandle console,
void Console_VFPrintf(ConsoleOutputType type, ConsoleHandle console, const char *format, va_list vlist) {
if (TryLockMutex_(&sMutex)) {
vsnprintf((char *)buf, sizeof(buf), format, vlist);
Console_PrintString_(type, console, buf);
vsnprintf((char *)sStrBuf, sizeof(sStrBuf), format, vlist);
Console_PrintString_(type, console, sStrBuf);
UnlockMutex_(&sMutex);
}
@@ -357,9 +352,9 @@ void Console_Printf(ConsoleHandle console, const char *format, ...) {
va_start(args, format);
if (TryLockMutex_(&sMutex)) {
vsnprintf((char *)buf, sizeof(buf), format, args);
OSReport("%s", buf);
PrintToBuffer_(console, buf);
vsnprintf((char *)sStrBuf, sizeof(sStrBuf), format, args);
OSReport("%s", sStrBuf);
PrintToBuffer_(console, sStrBuf);
UnlockMutex_(&sMutex);
}
-6
View File
@@ -49,8 +49,6 @@ const char *CPU_EXP_NAME[] = {
"FLOATING POINT",
};
void *RunThread_(void *);
// TODO u8 vs u16
void ErrorHandler_(u16, OSContext *, u32, u32);
@@ -146,8 +144,6 @@ static void DrawConsoleEndless_(ConsoleHandle console) {
}
}
static void DumpException_(const ExceptionCallbackParam *param) {
u16 error = param->error;
OSContext *ctx = param->ctx;
@@ -462,14 +458,12 @@ void Exception_SetUserCallback(bool (*callback)(detail::ConsoleHead *, void *),
sException.exceptionCallbackArgs = args;
}
u16 Exception_SetDisplayInfo(u16 newInfo) {
u16 old = sException.exceptionDisplayInfo;
sException.exceptionDisplayInfo = newInfo;
return old;
}
static void WaitTime_(s32 time) {
s64 t1 = OSGetTime();
s64 t2;
+4 -4
View File
@@ -10,11 +10,11 @@ static u32 sFileLength;
static MapFile *sMapFileList = nullptr;
static u8 (*GetCharPtr_)(const u8 *) = nullptr;
static u8 dvdReadBuf[512] ALIGN(32);
static u8 sMapBuf[512] ALIGN(32);
static DVDFileInfo sFileInfo;
static s32 sMapBufMaxSize = 0x200;
static u8 *sMapBuf = dvdReadBuf;
static u8 *sDvdBuf = sMapBuf;
static s32 sMapBufOffset = -1;
static void MapFile_Append_(MapFile *file) {
@@ -86,7 +86,7 @@ static u8 GetCharOnDvd_(const u8 *buf) {
address = ROUND_UP(sFileLength - sMapBufOffset, 32);
}
BOOL enabled = OSEnableInterrupts();
BOOL read = DVDReadAsyncPrio(&sFileInfo, sMapBuf, address, sMapBufOffset, nullptr, 2);
BOOL read = DVDReadAsyncPrio(&sFileInfo, sDvdBuf, address, sMapBufOffset, nullptr, 2);
while (DVDGetCommandBlockStatus(&sFileInfo.block)) {}
OSRestoreInterrupts(enabled);
@@ -94,7 +94,7 @@ static u8 GetCharOnDvd_(const u8 *buf) {
return 0;
}
}
return *(sMapBuf + offset);
return *(sDvdBuf + offset);
}
static u8 *SearchNextLine_(u8 *buf, s32 lines) {