mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-14 11:00:41 +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:
parent
cf4dc98cc9
commit
17edb82c0d
168 changed files with 652 additions and 606 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue