From: chaoskagami Date: Fri, 17 Jun 2016 07:18:49 +0000 (-0400) Subject: Expose description to menus via select (and improve descriptions somewhat) X-Git-Tag: v0.1.0~5 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=73c770722c49f31728cc3ff9eb95a492b4bbb4ce;p=corbenik%2Fcorbenik.git Expose description to menus via select (and improve descriptions somewhat) --- diff --git a/contrib/mysterymachine.pco b/contrib/mysterymachine.pco index 08bb1b0..bc65247 100644 --- a/contrib/mysterymachine.pco +++ b/contrib/mysterymachine.pco @@ -1,5 +1,5 @@ # $name MysteryMachine Patcher (Loader) -# $desc Patches Mystery Gift to point to SALT servers +# $desc Patches Mystery Gift in Pokemon X, Y, Omega Ruby, and Alpha Sapphire to point to SALT's servers. See . # $title 000400000011C400 000400000011C500 0004000000055D00 0004000000055E00 # $ver 01 # $uuid 0001 diff --git a/patch/aadowngrade.pco b/patch/aadowngrade.pco index 7429ffa..c047f9a 100644 --- a/patch/aadowngrade.pco +++ b/patch/aadowngrade.pco @@ -1,5 +1,5 @@ # $name Title Downgrade Fix (11.0 NFIRM) -# $desc Removes added checks to prevent downgrade (in 11.0) +# $desc Removes added checks to prevent downgrade of system titles (in 11.0 NATIVE_FIRM) # $ver 09 # $uuid 00 # $flags require diff --git a/patch/agb_biosscreen.pco b/patch/agb_biosscreen.pco index 99db776..9136487 100644 --- a/patch/agb_biosscreen.pco +++ b/patch/agb_biosscreen.pco @@ -1,5 +1,5 @@ # $name AGB Bootscreen -# $desc Force usage of GBA bios in AGB_FIRM. +# $desc Force usage of GBA bios in AGB_FIRM. Games must pass the Nintendo logo check. If you see garbage instead of Nintendo, turn this off. # $ver 09 # $uuid 35 diff --git a/patch/agb_sig.pco b/patch/agb_sig.pco index 761abee..d942300 100644 --- a/patch/agb_sig.pco +++ b/patch/agb_sig.pco @@ -1,5 +1,5 @@ # $name AGB Signature fix -# $desc Patches signatures in AGB_FIRM +# $desc Patches signatures in AGB_FIRM. This allows booting unsigned GBA games. # $ver 09 # $uuid 39 diff --git a/patch/block_nim_update.pco b/patch/block_nim_update.pco index e33e5e1..c84b923 100644 --- a/patch/block_nim_update.pco +++ b/patch/block_nim_update.pco @@ -1,5 +1,5 @@ # $name Block NIM updates (Loader) -# $desc Prevents NIM from downloading system updates. +# $desc Prevents NIM from downloading system updates. This is what causes the HOME menu nag. # $title 0004013000002C02 # $ver 09 # $uuid 03 diff --git a/patch/errdisp.pco b/patch/errdisp.pco index 83cf5a3..500e972 100644 --- a/patch/errdisp.pco +++ b/patch/errdisp.pco @@ -1,5 +1,5 @@ # $name ErrDisp devmode (Loader) -# $desc Forces ErrDisp into displaying developer info without developer UNITINFO. Doesn't break eShop. +# $desc Forces ErrDisp into displaying developer info on crashes without developer UNITINFO. Doesn't break eShop, so there's no harm. # $title 0004003000008A02 # $ver 09 # $uuid 04 diff --git a/patch/memexec.pco b/patch/memexec.pco index e1ed3af..b3b24aa 100644 --- a/patch/memexec.pco +++ b/patch/memexec.pco @@ -1,5 +1,5 @@ # $name ARM11 XN Disable -# $desc Disables the XN bit on the ARM11 kernel to allow executing code from all memory. May be unsafe. +# $desc Disables the XN bit on the ARM11 kernel to allow executing code from memory. May be unsafe. # $ver 09 # $uuid 06 # $flags devmode diff --git a/patch/mset_str.pco b/patch/mset_str.pco index 268494a..7d4e8c6 100644 --- a/patch/mset_str.pco +++ b/patch/mset_str.pco @@ -1,5 +1,5 @@ # $name MSET Version (Loader) -# $desc Replaces 'Ver.' with CFW info. +# $desc Replaces 'Ver.' with a custom string like '.hack//1100:32U' # $title 0004001000021000 0004001000020000 0004001000022000 0004001000026000 0004001000027000 0004001000028000 # $ver 09 # $uuid 07 diff --git a/patch/ns_force_menu.pco b/patch/ns_force_menu.pco index 3e90a07..fb9921c 100644 --- a/patch/ns_force_menu.pco +++ b/patch/ns_force_menu.pco @@ -1,5 +1,5 @@ # $name Force TestMenu (Loader) -# $desc Force NS to boot TestMenu rather than HOME (TestMenu must be installed) +# $desc Force NS to boot TestMenu rather than HOME. TestMenu must be installed, and I can't tell you where to acquire it. # $title 0004013000008002 # $ver 09 # $uuid 1e diff --git a/patch/regionfree.pco b/patch/regionfree.pco index b726e72..e132758 100644 --- a/patch/regionfree.pco +++ b/patch/regionfree.pco @@ -1,5 +1,5 @@ # $name Region free HOME (Loader) -# $desc Allows launching installed software from any region. +# $desc Allows launching installed software from any region. This is only for CIA titles. # $title 0004003000008F02 0004003000008202 0004003000009802 000400300000A102 000400300000A902 000400300000B102 # $ver 09 # $uuid 09 diff --git a/patch/ro_sigs.pco b/patch/ro_sigs.pco index c977fd1..1f4e1b0 100644 --- a/patch/ro_sigs.pco +++ b/patch/ro_sigs.pco @@ -1,5 +1,5 @@ # $name RO signature fix (Loader) -# $desc Allows usage of unsigned CRO files. This is useful for romhacks. +# $desc Allows usage of unsigned CRO files. This is useful for romhacks of ORAS, for example. # $title 0004013000003702 # $ver 09 # $uuid 0a diff --git a/patch/secinfo_sigs.pco b/patch/secinfo_sigs.pco index ff651e7..46567a5 100644 --- a/patch/secinfo_sigs.pco +++ b/patch/secinfo_sigs.pco @@ -1,5 +1,5 @@ # $name SecureInfo_A Signature Fix (Loader) -# $desc Allows using unsigned or improperly signed SecureInfo_A files. Useful for region changes. +# $desc Allows using unsigned or improperly signed SecureInfo_A files. Needed for region changed consoles. # $title 0004013000001702 # $ver 09 # $uuid 0b diff --git a/patch/sig.pco b/patch/sig.pco index a8a63aa..929fc17 100644 --- a/patch/sig.pco +++ b/patch/sig.pco @@ -1,5 +1,5 @@ # $name Signature Fix -# $desc Disables signature checks on content. +# $desc Disables signature checks on all content. # $ver 09 # $uuid 0c # $flags require diff --git a/patch/twl_fix.pco b/patch/twl_fix.pco index 6261bf3..ff66f5e 100644 --- a/patch/twl_fix.pco +++ b/patch/twl_fix.pco @@ -1,5 +1,5 @@ # $name TWL Patches -# $desc +# $desc Disables a large number of validity checks on DS, DSi and DSiware titles. # $ver 09 # $uuid 34 diff --git a/patch/unitinfo.pco b/patch/unitinfo.pco index ec239ac..e15fdca 100644 --- a/patch/unitinfo.pco +++ b/patch/unitinfo.pco @@ -1,5 +1,5 @@ # $name Developer UNITINFO -# $desc Imitates a panda's configuration. For the average user, loader ErrDisp is enough. +# $desc Imitates a panda's configuration. For the average user, loader ErrDisp is enough. This will break eShop/online access as long as it is enabled. # $ver 09 # $uuid 0d # $flags devmode diff --git a/source/display.c b/source/display.c index 7ddb1b8..abcce53 100644 --- a/source/display.c +++ b/source/display.c @@ -8,6 +8,14 @@ extern int is_n3ds; extern unsigned int font_h; +void show_help(char* help) { + clear_screen(TOP_SCREEN); + set_cursor(TOP_SCREEN, 0, 0); + header("Any:Back"); + fprintf(stdout, "%s", help); + wait_key(1); +} + int show_menu(struct options_s *options, uint8_t *toggles) { @@ -49,7 +57,7 @@ show_menu(struct options_s *options, uint8_t *toggles) cursor_y = cursor_min; } - header("A:Enter B:Back DPAD:Nav"); + header("A:Enter B:Back DPAD:Nav Select:Info"); int i = window_top; while (options[i].index != -1) { // -1 Sentinel. @@ -135,6 +143,12 @@ show_menu(struct options_s *options, uint8_t *toggles) clear_screen(TOP_SCREEN); cursor_y = cursor_min; break; + case BUTTON_SEL: + if (options[cursor_y].desc[0] != 0) { + show_help(options[cursor_y].desc); + clear_screen(TOP_SCREEN); + } + break; } if (cursor_y < cursor_min) diff --git a/source/menu.c b/source/menu.c index 74d9992..cebc739 100644 --- a/source/menu.c +++ b/source/menu.c @@ -10,42 +10,42 @@ static struct options_s options[] = { // Patches. { 0, "\x1b[32;40mGeneral Options\x1b[0m", "", not_option, 0, 0 }, - { OPTION_SVCS, "svcBackdoor Fixup", "Reinserts svcBackdoor on 11.0 NATIVE_FIRM.", boolean_val, 0, 0 }, + { OPTION_SVCS, "svcBackdoor Fixup", "Reinserts svcBackdoor on 11.0 NATIVE_FIRM. svcBackdoor allows executing arbitrary functions with ARM11 kernel permissions, and is required by some (poorly coded) applications.", boolean_val, 0, 0 }, - { OPTION_REBOOT, "Reboot Hook", "Hooks firmlaunch to allow largemem games on o3DS (and allow patching TWL/AGB on all consoles)", boolean_val, 0, 0 }, + { OPTION_REBOOT, "Reboot Hook", "Hooks firmlaunch to allow largemem games on o3DS. Also allows patching TWL/AGB on all consoles.", boolean_val, 0, 0 }, - { OPTION_EMUNAND, "Use EmuNAND", "Redirects NAND write/read to the SD.", boolean_val, 0, 0 }, - { OPTION_EMUNAND_INDEX, " Index", "Which EmuNAND to use. Currently, 10 maximum (but this is arbitrary)", ranged_val, 0, 0x9 }, - { OPTION_EMUNAND_REVERSE, " Reverse layout", "EmuNAND is at the end of the disk, not the start.", boolean_val, 0, 0x9 }, + { OPTION_EMUNAND, "Use EmuNAND", "Redirects NAND write/read to the SD. This supports both Gateway and redirected layouts.", boolean_val, 0, 0 }, + { OPTION_EMUNAND_INDEX, " Index", "Which EmuNAND to use. If you only have one, you want 0. Currently the maximum supported is 10 (0-9), but this is arbitrary.", ranged_val, 0, 0x9 }, + { OPTION_EMUNAND_REVERSE, " Reverse layout", "(Warning - Experimental!) Calculate EmuNAND sector from the end of the disk, not the start. This isn't supported by tools like Decrypt9, but has some advantages.", boolean_val, 0, 0x9 }, - { OPTION_AUTOBOOT, "Autoboot", "Boot the system automatically, unless the R key is held.", boolean_val, 0, 0 }, - { OPTION_SILENCE, " Silent mode", "Suppress all debug output during autoboot. You'll see the screen turn on, then off.", boolean_val, 0, 0 }, + { OPTION_AUTOBOOT, "Autoboot", "Boot the system automatically, unless the R key is held while booting.", boolean_val, 0, 0 }, + { OPTION_SILENCE, " Silent mode", "Suppress all debug output during autoboot. You'll see the screen turn on and then off once.", 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_n3ds, 0, 0 }, - { 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_LOADCODE, " Load Code Sections", "Loads code sections from SD card and patches afterwards.", boolean_val, 0, 0 }, + { OPTION_LOADER, "Use Loader Replacement", "Replaces loader with one capable of extra features. You should enable this even if you don't plan to use loader-based patches to kill ASLR and the Ninjhax/OOThax checks.", boolean_val, 0, 0 }, + { OPTION_LOADER_CPU_L2, " CPU - L2 cache", "Forces the system to use the L2 cache on all applications. If you have issues with crashes, try turning this off.", boolean_val_n3ds, 0, 0 }, + { OPTION_LOADER_CPU_800MHZ, " CPU - 800Mhz", "Forces the system to run in 800Mhz mode on all applications.", boolean_val_n3ds, 0, 0 }, + { OPTION_LOADER_LANGEMU, " Language Emulation", "Reads language emulation configuration from `" PATH_LOCEMU "` and imitates the region/language.", boolean_val, 0, 0 }, + { OPTION_LOADER_LOADCODE, " Load Code Sections", "Loads code sections (text/ro/data) from SD card and patches afterwards.", boolean_val, 0, 0 }, - { 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, " Dump Code Sections", + "Dumps code sections for titles to SD card the first time they're loaded. Slows things down on first launch.", 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 }, + "Dumps code sections for system titles, too. Expect to sit at a blank screen for >3mins on the first time you do this, because it dumps everything.", boolean_val, 0, 0 }, // space { 0, "", "", not_option, 0, 0 }, // Patches. { 0, "\x1b[32;40mDeveloper Options\x1b[0m", "", not_option, 0, 0 }, - { OPTION_TRACE, "Step Through", "After each important step, [WAIT] will be shown and you'll need to press a key. Debug.", boolean_val, 0, 0 }, + { OPTION_TRACE, "Step Through", "After each important step, [WAIT] will be shown and you'll need to press a key. Debug feature.", boolean_val, 0, 0 }, { OPTION_OVERLY_VERBOSE, "Verbose", "Output more debug information than the average user needs.", boolean_val, 0, 0 }, - { OPTION_SAVE_LOGS, "Logging", "Save logs to the corbenik folder. Slows operation a bit.", boolean_val, 0, 0 }, + { OPTION_SAVE_LOGS, "Logging", "Save logs to `" PATH_CFW "` as `boot.log` and `loader.log`. Slows operation a bit.", boolean_val, 0, 0 }, // { OPTION_ARM9THREAD, "ARM9 Thread", boolean_val, 0, 0 }, // { IGNORE_PATCH_DEPS, "Ignore dependencies", boolean_val, 0, 0 }, @@ -85,6 +85,8 @@ wait_key(int sleep) ret = BUTTON_B; else if (get & BUTTON_X) ret = BUTTON_X; + else if (get & BUTTON_SEL) + ret = BUTTON_SEL; } while (HID_PAD & ret); @@ -301,14 +303,14 @@ poweroff() } static struct options_s main_s[] = { - { 0, "Options", "", call_fun, (uint32_t)menu_options, 0 }, - { 0, "Patches", "", call_fun, (uint32_t)menu_patches, 0 }, - { 0, "Info", "", call_fun, (uint32_t)menu_info, 0 }, - { 0, "Help/Readme", "", call_fun, (uint32_t)menu_help, 0 }, - { 0, "Reboot", "", call_fun, (uint32_t)reset, 0 }, - { 0, "Power off", "", call_fun, (uint32_t)poweroff, 0 }, - { 0, "Save Configuration", "", call_fun, (uint32_t)save_config, 0 }, - { 0, "Boot Firmware", "", break_menu, 0, 0 }, + { 0, "Options", "Internal options for the CFW. These are part of Corbenik itself.", call_fun, (uint32_t)menu_options, 0 }, + { 0, "Patches", "External bytecode patches found in `" PATH_PATCHES "`. You can choose which to enable.", call_fun, (uint32_t)menu_patches, 0 }, + { 0, "Info", "Shows the current FIRM versions (and loads them, if needed)", call_fun, (uint32_t)menu_info, 0 }, + { 0, "Help/Readme", "Displays info. Why are you opening help on help? That's kind of silly.", call_fun, (uint32_t)menu_help, 0 }, + { 0, "Reboot", "Reboots the console.", call_fun, (uint32_t)reset, 0 }, + { 0, "Power off", "Powers off the console.", call_fun, (uint32_t)poweroff, 0 }, + { 0, "Save Configuration", "Save the configuration. You must do this prior to booting, otherwise nothing is done.", call_fun, (uint32_t)save_config, 0 }, + { 0, "Boot Firmware", "Generates caches, patches the firmware, and boots it.", break_menu, 0, 0 }, // Sentinel. { -1, "", "", 0, -1, -1 }, // cursor_min and cursor_max are stored in the last two.