From 56e79c9ac5e822fc48b66dc7eee184f9a0e9d751 Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Fri, 5 Jan 2024 23:53:10 -0700 Subject: [PATCH] B4DS: Only boot *Flipnote Studio* on DS Debug consoles --- retail/bootloader/source/arm7/dsi2ds_patches.c | 16 ++++++++-------- retail/bootloader/source/arm7/main.arm7.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/retail/bootloader/source/arm7/dsi2ds_patches.c b/retail/bootloader/source/arm7/dsi2ds_patches.c index 325c1e3e9..625e59338 100644 --- a/retail/bootloader/source/arm7/dsi2ds_patches.c +++ b/retail/bootloader/source/arm7/dsi2ds_patches.c @@ -10838,19 +10838,19 @@ void patchDSiModeToDSMode(cardengineArm9* ce9, const tNDSHeader* ndsHeader) { } // Flipnote Studio (USA) - // Proof-of-Concept stage (Crashes when getting past the main menu) - else if (strcmp(romTid, "KGUE") == 0) { + // Uses more than 8MB of RAM (Crashes when getting past the main menu) + else if (strcmp(romTid, "KGUE") == 0 && extendedMemory) { *(u32*)0x020051E8 = 0xE1A00000; // nop *(u32*)0x020051F4 = 0xE1A00000; // nop *(u32*)0x02005200 = 0xE1A00000; // nop *(u32*)0x0200520C = 0xE1A00000; // nop - if (extendedMemory) { + // if (extendedMemory) { *(u32*)0x0200521C = 0xE3A0079E; // mov r0, #0x02780000 *(u32*)0x02005234 = 0xE3A0079D; // mov r0, #0x02740000 - } else { + /* } else { *(u32*)0x0200521C = 0xE3A00691; // mov r0, #0x09100000 *(u32*)0x02005234 = 0xE3A00409; // mov r0, #0x09000000 - } + } */ *(u32*)0x0200526C = 0xE1A00000; // nop *(u32*)0x020052F4 = 0xE1A00000; // nop *(u32*)0x02005C7C = 0xE1A00000; // nop @@ -10873,9 +10873,9 @@ void patchDSiModeToDSMode(cardengineArm9* ce9, const tNDSHeader* ndsHeader) { *(u32*)0x02032160 = 0xE3A00000; // mov r0, #0 *(u32*)0x0203218C = 0xE1A00000; // nop *(u32*)0x020325AC = 0xE1A00000; // nop - if (!extendedMemory) { - *(u32*)0x020429CC = 0xE3A00601; // mov r0, #0x100000 (Change heap size from 0x2C0000) - } + /* if (!extendedMemory) { + *(u32*)0x020429CC = 0xE3A00601; // mov r0, #0x100000 (Change heap size from 0x2C0000: Breaks flipnote mode) + } */ *(u32*)0x02058C10 = 0xE12FFF1E; // bx lr *(u32*)0x0206D698 = 0xE3A00000; // mov r0, #0 *(u32*)0x02070180 = 0xE1A00000; // nop diff --git a/retail/bootloader/source/arm7/main.arm7.c b/retail/bootloader/source/arm7/main.arm7.c index ecf0c4ce6..fde5fda13 100644 --- a/retail/bootloader/source/arm7/main.arm7.c +++ b/retail/bootloader/source/arm7/main.arm7.c @@ -638,9 +638,9 @@ static bool isROMLoadableInRAM(const tDSiHeader* dsiHeader, const tNDSHeader* nd || strncmp(romTid, "KW6", 3) == 0 // Word Searcher III || strncmp(romTid, "KW8", 3) == 0) { // Word Searcher IV romSizeLimitChange = 0x77C000; - } else if (strncmp(romTid, "KGU", 3) == 0) { // Flipnote Studio + } /* else if (strncmp(romTid, "KGU", 3) == 0) { // Flipnote Studio romSizeLimitChange = 0x140000; - } else if (strncmp(romTid, "KUP", 3) == 0) { // Match Up! + } */ else if (strncmp(romTid, "KUP", 3) == 0) { // Match Up! romSizeLimitChange = 0x380000; } else if (strncmp(romTid, "KAU", 3) == 0) { // Nintendo Cowndown Calendar romSizeLimitChange = 0x200000;