mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-09 13:41:45 +00:00
Spice up Console Info menu
This commit is contained in:
parent
2e61413627
commit
472c0e293a
3 changed files with 25 additions and 3 deletions
|
@ -28,7 +28,7 @@ __attribute__ ((aligned (16))) FATFS emmc;
|
||||||
LIST_INIT(gpt);
|
LIST_INIT(gpt);
|
||||||
|
|
||||||
u8 bis_key[4][32];
|
u8 bis_key[4][32];
|
||||||
short pkg1ver;
|
short pkg1ver = -1;
|
||||||
|
|
||||||
static bool _key_exists(const void *data) { return memcmp(data, zeros, 0x10); };
|
static bool _key_exists(const void *data) { return memcmp(data, zeros, 0x10); };
|
||||||
|
|
||||||
|
@ -44,9 +44,11 @@ static void _generate_kek(u32 ks, const void *key_source, void *master_key, cons
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_biskeys(){
|
void print_biskeys(){
|
||||||
gfx_printf("\n");
|
gfx_printf("Bis_Key_00\n");
|
||||||
gfx_hexdump(0, bis_key[0], 32);
|
gfx_hexdump(0, bis_key[0], 32);
|
||||||
|
gfx_printf("Bis_Key_01\n");
|
||||||
gfx_hexdump(0, bis_key[1], 32);
|
gfx_hexdump(0, bis_key[1], 32);
|
||||||
|
gfx_printf("Bis_Key_02 & 03\n");
|
||||||
gfx_hexdump(0, bis_key[2], 32);
|
gfx_hexdump(0, bis_key[2], 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
#include "te.h"
|
#include "te.h"
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
|
|
||||||
|
#define SWAPCOLOR(color) gfx_printf("%k", color)
|
||||||
|
#define RESETCOLOR gfx_printf("%k%K", COLOR_WHITE, COLOR_DEFAULT)
|
||||||
|
|
||||||
int makemenu(menu_item menu[], int menuamount);
|
int makemenu(menu_item menu[], int menuamount);
|
||||||
int message(char* message, u32 color);
|
int message(char* message, u32 color);
|
||||||
void clearscreen();
|
void clearscreen();
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "../libs/fatfs/diskio.h"
|
#include "../libs/fatfs/diskio.h"
|
||||||
#include "../storage/sdmmc.h"
|
#include "../storage/sdmmc.h"
|
||||||
#include "../utils/sprintf.h"
|
#include "../utils/sprintf.h"
|
||||||
|
#include "../soc/fuse.h"
|
||||||
#include "emmc.h"
|
#include "emmc.h"
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
|
|
||||||
|
@ -22,11 +23,24 @@ void displayinfo(){
|
||||||
FATFS *fs;
|
FATFS *fs;
|
||||||
DWORD fre_clust, fre_sect, tot_sect;
|
DWORD fre_clust, fre_sect, tot_sect;
|
||||||
u32 capacity;
|
u32 capacity;
|
||||||
|
u8 fuse_count = 0;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
gfx_printf("Biskeys:\n");
|
for (u32 i = 0; i < 32; i++){
|
||||||
|
if ((fuse_read_odm(7) >> i) & 1)
|
||||||
|
fuse_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
SWAPCOLOR(COLOR_ORANGE);
|
||||||
|
|
||||||
|
gfx_printf("Fuse count: %d\nPKG1 version: %d\n\n", fuse_count, returnpkg1ver());
|
||||||
print_biskeys();
|
print_biskeys();
|
||||||
|
|
||||||
|
RESETCOLOR;
|
||||||
|
gfx_printf("\n-----\n\n");
|
||||||
|
|
||||||
|
SWAPCOLOR(COLOR_BLUE);
|
||||||
|
|
||||||
if (!sd_mount()){
|
if (!sd_mount()){
|
||||||
gfx_printf("SD mount failed!\nFailed to display SD info\n");
|
gfx_printf("SD mount failed!\nFailed to display SD info\n");
|
||||||
}
|
}
|
||||||
|
@ -44,6 +58,7 @@ void displayinfo(){
|
||||||
gfx_printf("First partition on SD:\nSectors: %d\nSpace total: %d MB\nSpace free: %d MB\n\n", tot_sect, tot_sect / 2048, fre_sect / 2048);
|
gfx_printf("First partition on SD:\nSectors: %d\nSpace total: %d MB\nSpace free: %d MB\n\n", tot_sect, tot_sect / 2048, fre_sect / 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESETCOLOR;
|
||||||
gfx_printf("Press any key to continue");
|
gfx_printf("Press any key to continue");
|
||||||
btn_wait();
|
btn_wait();
|
||||||
}
|
}
|
||||||
|
@ -141,6 +156,8 @@ int format(int mode){
|
||||||
timer = get_tmr_s();
|
timer = get_tmr_s();
|
||||||
totalsectors = sd_storage.csd.capacity;
|
totalsectors = sd_storage.csd.capacity;
|
||||||
|
|
||||||
|
// 32gb sd card size is 67108864?
|
||||||
|
|
||||||
if (mode == 0){
|
if (mode == 0){
|
||||||
if (totalsectors < 61145088){
|
if (totalsectors < 61145088){
|
||||||
gfx_printf("%k\nNot enough free space for emummc!", COLOR_RED);
|
gfx_printf("%k\nNot enough free space for emummc!", COLOR_RED);
|
||||||
|
|
Loading…
Reference in a new issue