Skip to content

Commit

Permalink
B4DS: Only boot *Flipnote Studio* on DS Debug consoles
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Jan 6, 2024
1 parent 07b5607 commit 56e79c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions retail/bootloader/source/arm7/dsi2ds_patches.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions retail/bootloader/source/arm7/main.arm7.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

2 comments on commit 56e79c9

@Anonymous941
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it has the same bugs on the debug console as on a retail one, why only have it boot on those?

@RocketRobz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it has the same bugs on the debug console as on a retail one, why only have it boot on those?

Because the debug console has more memory to allow it to use the flipnote making mode, which retail consoles would likely never run.
Also, because there's no point in having Flipnote run for a majority of users (with retail consoles) if they can't make any flipnotes.

Please sign in to comment.