Skip to content

Commit 6687087

Browse files
committed
Decrease size limit of ce7 binary
1 parent b28bc77 commit 6687087

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

retail/bootloader/source/arm7/main.arm7.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static void resetMemory_ARM7(void) {
286286
memset_addrs_arm7(0x03800000 - 0x8000, 0x03800000 + 0x10000);
287287
toncset((u32*)0x02380000, 0, 0x38000); // clear part of EWRAM - except before 0x023B8000, which has the DSiWare ROM's arm9i code, and 0x023BF000, which has the bootloader arm9 code
288288
toncset((u32*)0x023C0000, 0, 0x20000);
289-
toncset((u32*)0x023F0000, 0, 0xCE00);
289+
toncset((u32*)0x023F0000, 0, 0xCF80);
290290
toncset((u32*)0x023FE000, 0, 0x400);
291291
toncset((u32*)0x023FF000, 0, 0x1000);
292292

@@ -1386,8 +1386,8 @@ int arm7_main(void) {
13861386
overlayPatch = true; // Allow overlay patching for SM64DS ROM hacks (ex. Mario's Holiday)
13871387
}
13881388

1389-
tonccpy((u8*)CARDENGINE_ARM7_LOCATION, (u8*)CARDENGINE_ARM7_LOCATION_BUFFERED, 0x1200);
1390-
toncset((u8*)CARDENGINE_ARM7_LOCATION_BUFFERED, 0, 0x1200);
1389+
tonccpy((u8*)CARDENGINE_ARM7_LOCATION, (u8*)CARDENGINE_ARM7_LOCATION_BUFFERED, 0x1080);
1390+
toncset((u8*)CARDENGINE_ARM7_LOCATION_BUFFERED, 0, 0x1080);
13911391

13921392
ce9Location = *(u32*)CARDENGINE_ARM9_LOCATION_BUFFERED;
13931393
ce9Alt = (ce9Location == CARDENGINE_ARM9_LOCATION_DLDI_ALT || ce9Location == CARDENGINE_ARM9_LOCATION_DLDI_ALT2);
@@ -1651,7 +1651,7 @@ int arm7_main(void) {
16511651
errorOutput();
16521652
}
16531653

1654-
toncset((u32*)0x0380C000, 0, 0x2380);
1654+
toncset((u32*)0x0380C000, 0, 0x2700);
16551655

16561656
errorCode = hookNdsRetailArm7(
16571657
(cardengineArm7*)CARDENGINE_ARM7_LOCATION,

retail/cardengine/arm7/cardengine.ld.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OUTPUT_ARCH(arm)
66

77
MEMORY {
88

9-
vram : ORIGIN = CARDENGINE_ARM7_LOCATION, LENGTH = 4K + 0x200 /* Main RAM */
9+
vram : ORIGIN = CARDENGINE_ARM7_LOCATION, LENGTH = 4K + 0x80 /* Main RAM */
1010
}
1111

1212
__vram_start = ORIGIN(vram);

retail/cardengine/arm7_ace3dsp/cardengine.ld.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OUTPUT_ARCH(arm)
66

77
MEMORY {
88

9-
vram : ORIGIN = CARDENGINE_ARM7_LOCATION, LENGTH = 4K + 0x200 /* Main RAM */
9+
vram : ORIGIN = CARDENGINE_ARM7_LOCATION, LENGTH = 4K + 0x80 /* Main RAM */
1010
}
1111

1212
__vram_start = ORIGIN(vram);

retail/cardengine/arm7_music/cardengine.ld.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OUTPUT_ARCH(arm)
66

77
MEMORY {
88

9-
vram : ORIGIN = CARDENGINE_ARM7_LOCATION, LENGTH = 4K + 0x200 /* Main RAM */
9+
vram : ORIGIN = CARDENGINE_ARM7_LOCATION, LENGTH = 4K + 0x80 /* Main RAM */
1010
}
1111

1212
__vram_start = ORIGIN(vram);

retail/common/include/locations.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
#define IMAGES_LOCATION 0x02338000 // Also IPS location for B4DS mode
3434

3535
#define CHEAT_ENGINE_LOCATION_B4DS_BUFFERED 0x023FE400
36-
#define CARDENGINE_ARM7_LOCATION_BUFFERED 0x023FCE00
36+
#define CARDENGINE_ARM7_LOCATION_BUFFERED 0x023FCF80
3737
#define CARDENGINE_ARM9_LOCATION_BUFFERED 0x023E0000
3838

3939
#define CHEAT_ENGINE_LOCATION_B4DS 0x027DE000
4040
#define CHEAT_ENGINE_LOCATION_B4DS_ALT 0x027FC000
4141
#define CHEAT_ENGINE_LOCATION_B4DS_ALT2 0x027FD000
42-
#define CARDENGINE_ARM7_LOCATION 0x0380E580
42+
#define CARDENGINE_ARM7_LOCATION 0x0380E700
4343
#define CARDENGINE_ARM9_LOCATION_DLDI_START 0x02000400
4444
#define CARDENGINE_ARM9_LOCATION_DLDI 0x023DA400
4545
#define CARDENGINE_ARM9_LOCATION_DLDI_32 0x023D4400

0 commit comments

Comments
 (0)