Skip to content

Commit

Permalink
B4DS: Remove heap hack from *Frogger Returns*
Browse files Browse the repository at this point in the history
ALSO: Bug fix
  • Loading branch information
RocketRobz committed Dec 14, 2023
1 parent 79e3fca commit 8c00881
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion retail/bootloader/source/arm7/dsi2ds_patches.c
Original file line number Diff line number Diff line change
Expand Up @@ -11087,7 +11087,13 @@ void patchDSiModeToDSMode(cardengineArm9* ce9, const tNDSHeader* ndsHeader) {
*(u32*)0x020117D4 = 0xE1A00000; // nop
tonccpy((u32*)0x0201234C, dsiSaveGetResultCode, 0xC);
*(u32*)0x020152F0 = 0xE1A00000; // nop
patchInitDSiWare(0x0201BFB4, heapEnd8MBHack);
patchInitDSiWare(0x0201BFB4, heapEnd);
*(u32*)0x0201C340 = *(u32*)0x02004FD0;
if (!extendedMemory) {
// Shrink heap from 0x60E000
*(u32*)0x020250B4 = 0xE2822602; // add r2, r2, 0x200000
*(u32*)0x020250EC = 0x20E000;
}
*(u32*)0x020381BC = 0xE1A00000; // nop
setBL(0x02038250, (u32)dsiSaveGetInfo);
setBL(0x02038294, (u32)dsiSaveOpen);
Expand Down
1 change: 1 addition & 0 deletions retail/bootloader/source/arm7/main.arm7.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ static void resetMemory_ARM7(void) {
toncset((u32*)0x02380000, 0, 0x38000); // clear part of EWRAM - except before 0x023DA000, which has the arm9 code
toncset((u32*)0x023C0000, 0, 0x20000);
toncset((u32*)0x023F0000, 0, 0xD000);
toncset((u32*)0x023FE000, 0, 0x400);
toncset((u32*)0x023FF000, 0, 0x1000);
if (extendedMemory) {
toncset((u32*)0x02400000, 0, 0x3FC000);
Expand Down

0 comments on commit 8c00881

Please sign in to comment.