From 14a3a39c01a2cfaceddad013fb0d78f2127fb288 Mon Sep 17 00:00:00 2001 From: "Such Meme, Many Skill" Date: Sat, 9 May 2020 13:52:46 +0200 Subject: [PATCH] Remove dumping user saves from tools This has been replaced by a script: https://github.com/suchmememanyskill/TegraScript/blob/master/scripts/savedumper.te --- source/storage/sdmmc_driver.c | 5 +++++ source/tegraexplorer/common/common.h | 3 +-- source/tegraexplorer/common/structs.c | 3 +-- source/tegraexplorer/mainmenu.c | 24 ++---------------------- source/tegraexplorer/utils/tools.c | 3 ++- source/tegraexplorer/utils/tools.h | 3 +-- 6 files changed, 12 insertions(+), 29 deletions(-) diff --git a/source/storage/sdmmc_driver.c b/source/storage/sdmmc_driver.c index d77c579..bdd4af8 100644 --- a/source/storage/sdmmc_driver.c +++ b/source/storage/sdmmc_driver.c @@ -29,6 +29,9 @@ #include "../soc/t210.h" #include "../utils/util.h" +#pragma GCC push_options +#pragma GCC optimize ("Os") + //#define DPRINTF(...) gfx_printf(__VA_ARGS__) #define DPRINTF(...) @@ -1158,6 +1161,8 @@ int sdmmc_init(sdmmc_t *sdmmc, u32 id, u32 power, u32 bus_width, u32 type, int a return 0; } +#pragma GCC pop_options + void sdmmc_end(sdmmc_t *sdmmc) { if (!sdmmc->clock_stopped) diff --git a/source/tegraexplorer/common/common.h b/source/tegraexplorer/common/common.h index 2a4b468..8367552 100644 --- a/source/tegraexplorer/common/common.h +++ b/source/tegraexplorer/common/common.h @@ -59,8 +59,7 @@ extern menu_entry mainmenu_shutdown[]; enum mainmenu_tools_return { TOOLS_DISPLAY_INFO = 1, TOOLS_DISPLAY_GPIO, - TOOLS_DUMPFIRMWARE, - TOOLS_DUMPUSERSAVE + TOOLS_DUMPFIRMWARE }; extern menu_entry mainmenu_tools[]; diff --git a/source/tegraexplorer/common/structs.c b/source/tegraexplorer/common/structs.c index a85f404..4acd674 100644 --- a/source/tegraexplorer/common/structs.c +++ b/source/tegraexplorer/common/structs.c @@ -25,8 +25,7 @@ menu_entry mainmenu_tools[] = { {"Back", COLOR_WHITE, {ISMENU}}, {"\nDisplay Console Info", COLOR_GREEN, {ISMENU}}, {"Display GPIO pins", COLOR_VIOLET, {ISMENU}}, - {"Dump Firmware", COLOR_BLUE, {ISMENU}}, - {"Dump User Saves", COLOR_YELLOW, {ISMENU}} + {"Dump Firmware", COLOR_BLUE, {ISMENU}} }; menu_entry mainmenu_format[] = { diff --git a/source/tegraexplorer/mainmenu.c b/source/tegraexplorer/mainmenu.c index f7d51ca..90baad2 100644 --- a/source/tegraexplorer/mainmenu.c +++ b/source/tegraexplorer/mainmenu.c @@ -37,24 +37,12 @@ void MainMenu_SDCard(){ void MainMenu_EMMC(){ if (gfx_defaultWaitMenu("You're about to enter EMMC\nModifying anything here can result in a BRICK!\n\nPlease only continue if you know what you're doing", 4)){ - /* - connect_mmc(SYSMMC); - - if (!mount_mmc(emmc_fs_entries[res - 2], res - 1)) - fileexplorer("emmc:/", 1); - */ makeMmcMenu(SYSMMC); } } void MainMenu_EMUMMC(){ - /* - connect_mmc(EMUMMC); - - if (!mount_mmc(emmc_fs_entries[res - 5], res - 4)) - fileexplorer("emmc:/", 1); - */ - makeMmcMenu(EMUMMC); + makeMmcMenu(EMUMMC); } void MainMenu_MountSD(){ @@ -62,8 +50,7 @@ void MainMenu_MountSD(){ } void MainMenu_Tools(){ - //res = makemenu(toolsmenu, 8); - res = menu_make(mainmenu_tools, 5, "-- Tools Menu --"); + res = menu_make(mainmenu_tools, 4, "-- Tools Menu --"); switch(res){ case TOOLS_DISPLAY_INFO: @@ -71,21 +58,14 @@ void MainMenu_Tools(){ break; case TOOLS_DISPLAY_GPIO: displaygpio(); - //makeMmcMenu(SYSMMC); break; case TOOLS_DUMPFIRMWARE: dumpfirmware(SYSMMC); break; - case TOOLS_DUMPUSERSAVE: - if ((res = utils_mmcMenu()) > 0) - dumpusersaves(res); - - break; } } void MainMenu_SDFormat(){ - //res = makemenu(formatmenu, 4); res = menu_make(mainmenu_format, 3, "-- Format Menu --"); if (res > 0){ diff --git a/source/tegraexplorer/utils/tools.c b/source/tegraexplorer/utils/tools.c index 646069c..6cbafb5 100644 --- a/source/tegraexplorer/utils/tools.c +++ b/source/tegraexplorer/utils/tools.c @@ -159,7 +159,7 @@ int dumpfirmware(int mmc){ return fail; } - +/* void dumpusersaves(int mmc){ connect_mmc(mmc); mount_mmc("USER", 2); @@ -180,6 +180,7 @@ void dumpusersaves(int mmc){ gfx_printf("Press any key to continue"); hidWait(); } +*/ int format(int mode){ gfx_clearscreen(); diff --git a/source/tegraexplorer/utils/tools.h b/source/tegraexplorer/utils/tools.h index b745407..eb62908 100644 --- a/source/tegraexplorer/utils/tools.h +++ b/source/tegraexplorer/utils/tools.h @@ -3,5 +3,4 @@ void displayinfo(); void displaygpio(); int format(int mode); -int dumpfirmware(int mmc); -void dumpusersaves(int mmc); \ No newline at end of file +int dumpfirmware(int mmc); \ No newline at end of file