]> Chaos Git - corbenik/corbenik.git/commitdiff
Expose system title dumping as optional (warning - super slow boot) v0.0.7
authorchaoskagami <chaos.kagami@gmail.com>
Wed, 8 Jun 2016 02:10:09 +0000 (22:10 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Wed, 8 Jun 2016 02:10:09 +0000 (22:10 -0400)
external/loader/source/patcher.c
source/config.h
source/menu.c

index 0b33a4a0e5cc1eeeeca28d869114b93a327e537e..8eeb5e8321b9b844db4a3f9f1b7cc656975adbfb 100644 (file)
@@ -319,9 +319,8 @@ dump_code(u64 progId, u8 *code_loc, u32 code_len)
 
     u32 highTid = progId >> 0x20;
 
-    // Only regular titles and demos will get dumped
-    // Otherwise it's insanely slow
-    if (highTid != 0x00040000 && highTid != 0x00040002)
+    // Only dump user titles unless the user is prepared for pain.
+    if (highTid != 0x00040000 && highTid != 0x00040002 && !config.options[OPTION_LOADER_DUMPCODE_ALL])
         return;
 
     char code_path[] = CODE_PATH;
index f89a2c2edf270efd72229d9e778605454419372f..426b51922fc180b7b5dcd2a9707ce0a0e09b2308 100644 (file)
@@ -109,6 +109,9 @@ struct options_s
 // Hook firmlaunches.
 #define OPTION_REBOOT 19
 
+// Dump *all* code, from system applications, modules, etc. You'll be sitting around for about five minutes.
+#define OPTION_LOADER_DUMPCODE_ALL 20
+
 // Save log files during boot and from loader.
 // This will slow things down a bit.
 #define OPTION_SAVE_LOGS 253
index f0dd19d714e77cc22fca3af77969aef396b3e1ce..806f25d7912140922ee19078f3690b8f6cf2b680 100644 (file)
@@ -43,8 +43,12 @@ static struct options_s options[] = {
     { OPTION_LOADER_CPU_800MHZ, "  CPU - 800Mhz (n3ds)", "Forces the system to run in 800Mhz mode. Ignored if not a N3DS.", boolean_val_n3ds, 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,
+    { OPTION_LOADER_DUMPCODE, "  Dump Title Code Sections",
+      "Dumps code sections for titles to SD card the first time they're loaded. Slows things down considerably.", boolean_val,
+      0, 0 },
+
+    { OPTION_LOADER_DUMPCODE_ALL, "    + System Titles",
+      "Dumps code sections for system titles, too. Expect to sit at a black screen for >3mins on the first time.", boolean_val,
       0, 0 },
 
     // space