From 7434d949e7424979a17495f9adef48f3528dcbd4 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 3 Dec 2022 17:24:21 -0600 Subject: [PATCH] [ox/std] Begin mGBA registers with REG_MGBA_ --- deps/ox/src/ox/std/tracehook.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/deps/ox/src/ox/std/tracehook.cpp b/deps/ox/src/ox/std/tracehook.cpp index fb710314e..a3cb2d5f9 100644 --- a/deps/ox/src/ox/std/tracehook.cpp +++ b/deps/ox/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();