From 35c87abf10689d70d9c0c87f5284600a9d0236b1 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Tue, 28 Feb 2017 17:57:39 +0100 Subject: [PATCH] Use a bigger SELF_MAX_SIZE for payload size --- source/common/common.h | 3 +++ source/godmode.c | 2 +- source/virtual/vmem.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/common/common.h b/source/common/common.h index 42ad90e..9e5d583 100644 --- a/source/common/common.h +++ b/source/common/common.h @@ -50,6 +50,9 @@ // GodMode9 version #define VERSION "1.0.2" +// Maximum payload size (arbitrary value!) +#define SELF_MAX_SIZE (320 * 1024) // 320kB + // input / output paths #define INPUT_PATHS "0:", "0:/files9", "1:/rw/files9" #define OUTPUT_PATH "0:/gm9out" diff --git a/source/godmode.c b/source/godmode.c index 840fc16..d4d44e2 100644 --- a/source/godmode.c +++ b/source/godmode.c @@ -237,7 +237,7 @@ u32 SdFormatMenu(void) { if (IS_A9LH) { InitSDCardFS(); // on A9LH: copy the payload from mem to SD root - FileSetData("0:/arm9loaderhax_si.bin", (u8*) 0x23F00000, 0x40000, 0, true); + FileSetData("0:/arm9loaderhax_si.bin", (u8*) 0x23F00000, SELF_MAX_SIZE, 0, true); DeinitSDCardFS(); } diff --git a/source/virtual/vmem.c b/source/virtual/vmem.c index e79a5ff..9d8d91b 100644 --- a/source/virtual/vmem.c +++ b/source/virtual/vmem.c @@ -17,7 +17,7 @@ static const VirtualFile vMemFileTemplates[] = { // { "otp.mem" , 0x10012000, 0x00000108, 0xFF, 0 }, { "bootrom.mem" , 0xFFFF0000, 0x00010000, 0xFF, 0 }, { "bootrom_unp.mem" , 0xFFFF0000, 0x00008000, 0xFF, 0 }, - { "godmode9.bin" , 0x23F00000, 0x00040000, 0xFF, 0 } // arbitrary size + { "godmode9.bin" , 0x23F00000, SELF_MAX_SIZE, 0xFF, 0 } }; bool ReadVMemDir(VirtualFile* vfile, VirtualDir* vdir) { // uses a generic vdir object generated in virtual.c