From 92e45885515db2f1c28ff4f6988a96b3d491e2ce Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Mon, 6 Jun 2016 12:26:21 -0400 Subject: [PATCH] A few tweaks to @Wolfvak's code and menu layout (loader options are now their own section) and add Wolfvak to README --- README.txt | 2 +- external/loader/source/patcher.c | 2 +- source/config.h | 5 ++--- source/menu.c | 20 +++++++++++++------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/README.txt b/README.txt index f89ee96..3888763 100644 --- a/README.txt +++ b/README.txt @@ -130,7 +130,7 @@ The complete "Thanks cool people" list: @mid-kid General inspiration from Cakes. - @Wolfvak Go use BootAnim9. + @Wolfvak Code segment dumping, also BootAnim9 is cool stuff. Go use it. @AuroraWright Luma made chunks of this possible. diff --git a/external/loader/source/patcher.c b/external/loader/source/patcher.c index e4908f2..0c2a211 100644 --- a/external/loader/source/patcher.c +++ b/external/loader/source/patcher.c @@ -345,7 +345,7 @@ dump_code(u64 progId, u8 *code_loc, u32 code_len) { u32 len = 0; FSFILE_Write(code_f, &len, 0, code_loc, code_len, FS_WRITE_FLUSH | FS_WRITE_UPDATE_TIME); - logstr("dumped code to "); + logstr(" dumped code to "); logstr(code_path); logstr("\n"); } diff --git a/source/config.h b/source/config.h index bc01063..4d2f4b8 100644 --- a/source/config.h +++ b/source/config.h @@ -102,9 +102,8 @@ struct options_s // Which EmuNAND to use (currently only allows 10 total, but eh, I can change that if anyone truly needs it) #define OPTION_EMUNAND_INDEX 17 -// Dump titles' code section as they're loaded by the loader module -// WARNING!! Slows down boot time considerably the first time! -#define OPTION_LOADER_DUMPCODE 252 +// Dump titles' code sections as they're loaded by the loader module. +#define OPTION_LOADER_DUMPCODE 18 // Save log files during boot and from loader. // This will slow things down a bit. diff --git a/source/menu.c b/source/menu.c index 74e772a..9af726b 100644 --- a/source/menu.c +++ b/source/menu.c @@ -19,13 +19,7 @@ static struct options_s options[] = { // space { 0, "", "", not_option, 0, 0 }, // Patches. - { 0, "\x1b[32;40mOptions\x1b[0m", "", not_option, 0, 0 }, - - { OPTION_LOADER, "Loader Replacement", "Replaces loader with one capable of the below and also applying bytecode patches.", boolean_val, 0, 0 }, - { OPTION_LOADER_CPU_L2, " CPU - L2 cache", "Forces the system to use the L2 cache. Ignored if not a N3DS.", boolean_val, 0, 0 }, - { OPTION_LOADER_CPU_800MHZ, " CPU - 800Mhz", "Forces the system to run in 800Mhz mode. Ignored if not a N3DS.", boolean_val, 0, 0 }, - { OPTION_LOADER_LANGEMU, " Language Emulation", "Reads language emulation configuration and imitates the region/language.", boolean_val, 0, 0 }, - { OPTION_LOADER_DUMPCODE, " Dump code section", "Dumps code sections to SD card only the first time they're loaded.", boolean_val, 0, 0 }, + { 0, "\x1b[32;40mGeneral Options\x1b[0m", "", not_option, 0, 0 }, { 0, "", "", not_option, 0, 0 }, @@ -45,6 +39,18 @@ static struct options_s options[] = { { OPTION_READ_ME, "Hide `Help`", "Hides the help option from the main menu.", boolean_val, 0, 0 }, + // space + { 0, "", "", not_option, 0, 0 }, + // Patches. + { 0, "\x1b[32;40mLoader Options\x1b[0m", "", not_option, 0, 0 }, + + { OPTION_LOADER, "Use Loader Replacement", "Replaces loader with one capable of the below and also applying bytecode patches.", boolean_val, 0, 0 }, + { OPTION_LOADER_CPU_L2, " CPU - L2 cache (n3ds)", "Forces the system to use the L2 cache. Ignored if not a N3DS.", boolean_val, 0, 0 }, + { OPTION_LOADER_CPU_800MHZ, " CPU - 800Mhz (n3ds)", "Forces the system to run in 800Mhz mode. Ignored if not a N3DS.", boolean_val, 0, 0 }, + { OPTION_LOADER_LANGEMU, " Language Emulation", "Reads language emulation configuration and imitates the region/language.", boolean_val, 0, 0 }, + + { OPTION_LOADER_DUMPCODE, " Dump Code Sections (dev)", "Dumps code sections for titles to SD card the first time they're loaded. This doesn't dump system titles. Slows things down considerably.", boolean_val, 0, 0 }, + // space { 0, "", "", not_option, 0, 0 }, // Patches. -- 2.39.5