diff --git a/src/ox/std/tracehook.cpp b/src/ox/std/tracehook.cpp index fb710314e..a3cb2d5f9 100644 --- a/src/ox/std/tracehook.cpp +++ b/src/ox/std/tracehook.cpp @@ -12,9 +12,9 @@ #include "stringview.hpp" #include "types.hpp" -#define REG_DEBUG_ENABLE *reinterpret_cast(0x4FFF780) -#define REG_DEBUG_FLAGS *reinterpret_cast(0x4FFF700) -#define REG_DEBUG_STRING (reinterpret_cast(0x4FFF600)) +#define REG_MGBA_DEBUG_ENABLE *reinterpret_cast(0x4FFF780) +#define REG_MGBA_DEBUG_FLAGS *reinterpret_cast(0x4FFF700) +#define REG_MGBA_DEBUG_STRING (reinterpret_cast(0x4FFF600)) namespace ox::hw { static void (*infoLog)(ox::CRStringView) = [](ox::CRStringView) {}; @@ -36,14 +36,14 @@ template static auto mkLogger() { return [](ox::CRStringView str) { const auto sz = ox::min(0x100, str.bytes()); - ox_strncpy(REG_DEBUG_STRING, str.data(), sz); - REG_DEBUG_FLAGS = chan | 0x100; + ox_strncpy(REG_MGBA_DEBUG_STRING, str.data(), sz); + REG_MGBA_DEBUG_FLAGS = chan | 0x100; }; } void initConsole() { - REG_DEBUG_ENABLE = 0xC0DE; - if (REG_DEBUG_ENABLE == 0x1DEA) { + REG_MGBA_DEBUG_ENABLE = 0xC0DE; + if (REG_MGBA_DEBUG_ENABLE == 0x1DEA) { ox::hw::infoLog = mgba::mkLogger(); ox::hw::debugLog = mgba::mkLogger(); // use INFO because mGBA disables DEBUG on start ox::hw::errorLog = mgba::mkLogger();