From f1e5f0cddc1b66a244808a6766c04c1816b144a6 Mon Sep 17 00:00:00 2001 From: Alex Abbatiello <50689733+synthic@users.noreply.github.com> Date: Fri, 2 Jan 2026 15:01:43 -0600 Subject: [PATCH] Fix typo in detectNocashPrintSupport and add support for melonDS (#85) --- arm7/source/core/Environment.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arm7/source/core/Environment.cpp b/arm7/source/core/Environment.cpp index 0a12d27..fdfe9fe 100644 --- a/arm7/source/core/Environment.cpp +++ b/arm7/source/core/Environment.cpp @@ -2,6 +2,9 @@ #include "picoAgbAdapter.h" #include "Environment.h" +#define NOCASH_ID 0x67246F6E +#define NOCASH_ID_MELONDS 0x6F6C656D + u32 Environment::_flags; static bool detectIsNitroEmulator() @@ -15,10 +18,10 @@ static bool detectIsNitroEmulator() return true; } -static bool detectNocashPrintSuppport() +static bool detectNocashPrintSupport() { u32 nocashIdentifier = *(vu32*)0x04FFFA00; - return nocashIdentifier == 0x67246F6E; //no$g + return nocashIdentifier == NOCASH_ID || nocashIdentifier == NOCASH_ID_MELONDS; } static bool detectPicoAgbAdapter() @@ -55,7 +58,7 @@ void Environment::Initialize(bool dsiMode) } if (!(_flags & ENVIRONMENT_FLAGS_IS_NITRO_EMULATOR)) { - if (detectNocashPrintSuppport()) + if (detectNocashPrintSupport()) _flags |= ENVIRONMENT_FLAGS_NOCASH_PRINT; } -} \ No newline at end of file +}