1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 09:50:50 +00:00

Decouple Debug Features From gc-eu-mq-dbg (#2296)

* rename OOT_DEBUG to DEBUG_FEATURES

* makefile changes

* add DEBUG_ASSETS

* fix DEBUG_FEATURES usages

* format

* fix errors

* review

* fix problem and review2

* review

* add DEBUG_FEATURES to DEBUG_ASSETS check

* review

* whoops

* format
This commit is contained in:
fig02 2024-11-17 17:02:07 -05:00 committed by GitHub
parent cf4dc98cc9
commit 17edb82c0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
168 changed files with 652 additions and 606 deletions

View file

@ -30,7 +30,7 @@ void bootproc(void) {
gCartHandle = osCartRomInit();
osDriveRomInit();
#if OOT_DEBUG
#if DEBUG_FEATURES
isPrintfInit();
#endif
Locale_Init();

View file

@ -80,7 +80,7 @@ void Idle_ThreadEntry(void* arg) {
gViConfigYScale = 1.0f;
#endif
#if OOT_DEBUG
#if DEBUG_FEATURES
// Allow both 60 Hz and 50 Hz
switch (osTvType) {
case OS_TV_NTSC:
@ -96,7 +96,9 @@ void Idle_ThreadEntry(void* arg) {
case OS_TV_PAL:
gViConfigModeType = OS_VI_FPAL_LAN1;
gViConfigMode = osViModeFpalLan1;
#if OOT_VERSION >= PAL_1_0
gViConfigYScale = 0.833f;
#endif
break;
}
#elif !OOT_PAL_N64

View file

@ -3,7 +3,7 @@
#define gISVDbgPrnAdrs ((ISVDbg*)0xB3FF0000)
#define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))
#if OOT_DEBUG
#if DEBUG_FEATURES
OSPiHandle* sISVHandle; // official name : is_Handle
void isPrintfInit(void) {
@ -18,7 +18,7 @@ void osSyncPrintfUnused(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
#if OOT_DEBUG
#if DEBUG_FEATURES
_Printf(is_proutSyncPrintf, NULL, fmt, args);
#endif
@ -29,7 +29,7 @@ void osSyncPrintf(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
#if OOT_DEBUG
#if DEBUG_FEATURES
_Printf(is_proutSyncPrintf, NULL, fmt, args);
#endif
@ -41,7 +41,7 @@ void rmonPrintf(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
#if OOT_DEBUG
#if DEBUG_FEATURES
_Printf(is_proutSyncPrintf, NULL, fmt, args);
#endif
@ -53,7 +53,7 @@ void func_800015F4(void) {
}
#endif
#if OOT_DEBUG
#if DEBUG_FEATURES
void* is_proutSyncPrintf(void* arg, const char* str, size_t count) {
u32 data;
s32 pos;

View file

@ -60,7 +60,7 @@ void Locale_ResetRegion(void) {
gCurrentRegion = REGION_NULL;
}
#if OOT_DEBUG
#if DEBUG_FEATURES
u32 func_80001F48(void) {
if (gCurrentRegion == OOT_REGION) {
return 0;

View file

@ -40,7 +40,7 @@ u32 sDmaMgrIsRomCompressed = false;
OSThread sDmaMgrThread;
STACK(sDmaMgrStack, 0x500);
#if OOT_DEBUG
#if DEBUG_FEATURES
const char* sDmaMgrCurFileName;
s32 sDmaMgrCurFileLine;
@ -56,7 +56,7 @@ const char* sDmaMgrFileNames[] = {
#undef DEFINE_DMA_ENTRY
#if PLATFORM_N64 || OOT_DEBUG
#if PLATFORM_N64 || DEBUG_FEATURES
/**
* Compares `str1` and `str2`.
*
@ -252,7 +252,7 @@ void DmaMgr_DmaFromDriveRom(void* ram, uintptr_t rom, size_t size) {
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
}
#if OOT_DEBUG
#if DEBUG_FEATURES
/**
* DMA error encountered, print error messages and bring up the crash screen.
*
@ -315,7 +315,7 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er
* @return Pointer to associated filename
*/
const char* DmaMgr_FindFileName(uintptr_t vrom) {
#if OOT_DEBUG
#if DEBUG_FEATURES
DmaEntry* iter = gDmaDataTable;
const char** name = sDmaMgrFileNames;
@ -339,7 +339,7 @@ const char* DmaMgr_FindFileName(uintptr_t vrom) {
#endif
const char* DmaMgr_GetFileName(uintptr_t vrom) {
#if OOT_DEBUG
#if PLATFORM_GC && DEBUG_FEATURES
const char* ret = DmaMgr_FindFileName(vrom);
if (ret == NULL) {
@ -352,10 +352,10 @@ const char* DmaMgr_GetFileName(uintptr_t vrom) {
return NULL;
}
return ret;
#elif PLATFORM_N64
return "??";
#elif PLATFORM_GC
return "";
#elif PLATFORM_N64
return "??";
#endif
}
@ -370,7 +370,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
const char* filename;
s32 i = 0;
#if OOT_DEBUG
#if DEBUG_FEATURES
// Get the filename (for debugging)
filename = DmaMgr_GetFileName(vrom);
#elif PLATFORM_GC
@ -538,7 +538,7 @@ s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size,
OSMesg msg) {
static s32 sDmaMgrQueueFullLogged = 0;
#if OOT_DEBUG
#if DEBUG_FEATURES
if ((ram == NULL) || (osMemSize < OS_K0_TO_PHYSICAL(ram) + size) || (vrom & 1) || (vrom > 0x4000000) ||
(size == 0) || (size & 1)) {
//! @bug `req` is passed to `DMA_ERROR` without rom, ram and size being set
@ -562,7 +562,7 @@ s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size,
req->notifyQueue = queue;
req->notifyMsg = msg;
#if OOT_DEBUG
#if DEBUG_FEATURES
if (1 && (sDmaMgrQueueFullLogged == 0) && MQ_IS_FULL(&sDmaMgrMsgQueue)) {
sDmaMgrQueueFullLogged++;
PRINTF("%c", BEL);
@ -614,7 +614,7 @@ void DmaMgr_Init(void) {
(u32)(_dmadataSegmentRomEnd - _dmadataSegmentRomStart));
PRINTF("dma_rom_ad[]\n");
#if OOT_DEBUG
#if DEBUG_FEATURES
name = sDmaMgrFileNames;
iter = gDmaDataTable;
idx = 0;
@ -662,7 +662,7 @@ void DmaMgr_Init(void) {
osStartThread(&sDmaMgrThread);
}
#if OOT_DEBUG
#if DEBUG_FEATURES
/**
* Asynchronous DMA Request with source file and line info for debugging.
*