Add biskey dumping + more menus
Thanks shchmue :D Also can now mount and unmount the sd via the tools menu
This commit is contained in:
@@ -16,7 +16,11 @@ extern bool sd_mount();
|
||||
extern void sd_unmount();
|
||||
|
||||
void meme_main(){
|
||||
utils_gfx_init();
|
||||
utils_gfx_init();
|
||||
//dump_keys();
|
||||
|
||||
u8 bis_keys[4][0x20] = {0};
|
||||
dump_biskeys(bis_keys);
|
||||
|
||||
sdmmc_storage_t storage;
|
||||
sdmmc_t sdmmc;
|
||||
@@ -29,6 +33,7 @@ void meme_main(){
|
||||
unsigned int muhbits[1000];
|
||||
bool sd_mounted = false;
|
||||
sd_mounted = sd_mount();
|
||||
if (!sd_mounted) messagebox("\nSD INIT FAILED");
|
||||
|
||||
while (1){
|
||||
int i = 0, ret = 0;
|
||||
@@ -36,19 +41,53 @@ void meme_main(){
|
||||
addchartoarray("[SD:/] SD card", options, i);
|
||||
i++;
|
||||
}
|
||||
else messagebox("\nSD INIT FAILED");
|
||||
addchartoarray("\nAbout", options, i);
|
||||
addchartoarray("Exit", options, i+1);
|
||||
//addchartoarray("[emmc:/] SYSTEM", options, i);
|
||||
addchartoarray("\nTools", options, i);
|
||||
addchartoarray("About", options, i+1);
|
||||
addchartoarray("Exit", options, i+2);
|
||||
|
||||
meme_clearscreen();
|
||||
ret = gfx_menulist(32, options, (i + 2));
|
||||
ret = gfx_menulist(32, options, (i + 3));
|
||||
|
||||
if (strcmp(options[ret - 1], "[SD:/] SD card") == 0){
|
||||
sdexplorer(itemsinfolder, muhbits);
|
||||
sdexplorer(itemsinfolder, muhbits, "sd:/");
|
||||
}
|
||||
else if (strcmp(options[ret - 1], "\nAbout") == 0){
|
||||
else if (strcmp(options[ret - 1], "About") == 0){
|
||||
messagebox(ABOUT_MESSAGE);
|
||||
}
|
||||
else if (strcmp(options[ret - 1], "[emmc:/] SYSTEM") == 0){
|
||||
sdexplorer(itemsinfolder, muhbits, "emmc:/");
|
||||
}
|
||||
else if (strcmp(options[ret - 1], "\nTools") == 0){
|
||||
meme_clearscreen();
|
||||
addchartoarray("Back", options, 0);
|
||||
addchartoarray("\nPrint BISKEYS", options, 1);
|
||||
if (!sd_mounted) addchartoarray("Mount SD", options, 2);
|
||||
else addchartoarray("Unmount SD", options, 2);
|
||||
ret = gfx_menulist(32, options, 3);
|
||||
switch(ret){
|
||||
case 2:
|
||||
meme_clearscreen();
|
||||
gfx_printf("\nBisKey 0:\n");
|
||||
gfx_hexdump(0, bis_keys[0], 0x20 * sizeof(u8));
|
||||
gfx_printf("\n\nBisKey 1:\n");
|
||||
gfx_hexdump(0, bis_keys[1], 0x20 * sizeof(u8));
|
||||
gfx_printf("\n\nBisKey 2 + 3:\n");
|
||||
gfx_hexdump(0, bis_keys[2], 0x20 * sizeof(u8));
|
||||
btn_wait();
|
||||
break;
|
||||
case 3:
|
||||
if (sd_mounted){
|
||||
sd_unmount();
|
||||
sd_mounted = false;
|
||||
}
|
||||
else {
|
||||
sd_mounted = sd_mount();
|
||||
if (!sd_mounted) messagebox("\nSD INIT FAILED");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
meme_clearscreen();
|
||||
addchartoarray("Back", options, 0);
|
||||
|
||||
Reference in New Issue
Block a user