Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c7dd7178f | ||
|
|
d93b50205a | ||
|
|
405cb46b77 | ||
|
|
7f7c2e65ee | ||
|
|
c2df3d80dd | ||
|
|
a3b876ea3e | ||
|
|
4309194a11 | ||
|
|
ae57cb1e63 | ||
|
|
a86294218c | ||
|
|
eecefd634c | ||
|
|
37ce49a31f | ||
|
|
ab061cf0b3 | ||
|
|
1a2fd158e9 | ||
|
|
eb8652c6ec | ||
|
|
9885308bce |
4
Makefile
4
Makefile
@@ -10,8 +10,8 @@ include $(DEVKITARM)/base_rules
|
||||
|
||||
IPL_LOAD_ADDR := 0x40003000
|
||||
LPVERSION_MAJOR := 2
|
||||
LPVERSION_MINOR := 2
|
||||
LPVERSION_BUGFX := 1
|
||||
LPVERSION_MINOR := 3
|
||||
LPVERSION_BUGFX := 2
|
||||
|
||||
################################################################################
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "../../sec/se.h"
|
||||
#include "../../storage/nx_emmc.h"
|
||||
#include "../../storage/sdmmc.h"
|
||||
#include "../../storage/emummc.h"
|
||||
|
||||
extern sdmmc_storage_t sd_storage;
|
||||
extern sdmmc_storage_t storage;
|
||||
|
||||
@@ -6113,6 +6113,8 @@ FRESULT f_fdisk (
|
||||
DWORD sz_disk, p_sect, b_cyl, b_sect;
|
||||
FRESULT res;
|
||||
|
||||
BYTE *empty_buff;
|
||||
empty_buff = ff_memcalloc(sizeof(BYTE), 16384);
|
||||
|
||||
stat = disk_initialize(pdrv);
|
||||
if (stat & STA_NOINIT) return FR_NOT_READY;
|
||||
@@ -6167,8 +6169,13 @@ FRESULT f_fdisk (
|
||||
st_dword(p + 12, p_sect); /* Number of sectors */
|
||||
/* Next partition */
|
||||
b_sect += p_sect;
|
||||
|
||||
for (int cursect = 0; cursect < 1024; cursect++){
|
||||
disk_write(pdrv, empty_buff, b_sect + (32 * cursect), 32);
|
||||
}
|
||||
}
|
||||
st_word(p, 0xAA55); /* MBR signature (always at offset 510) */
|
||||
ff_memfree(empty_buff);
|
||||
|
||||
/* Write it to the MBR */
|
||||
res = (disk_write(pdrv, buf, 0, 1) == RES_OK && disk_ioctl(pdrv, CTRL_SYNC, 0) == RES_OK) ? FR_OK : FR_DISK_ERR;
|
||||
|
||||
@@ -321,6 +321,7 @@ DWORD ff_wtoupper (DWORD uni); /* Unicode upper-case conversion */
|
||||
#endif
|
||||
#if FF_USE_LFN == 3 /* Dynamic memory allocation */
|
||||
void* ff_memalloc (UINT msize); /* Allocate memory block */
|
||||
void* ff_memcalloc (UINT msize, UINT amount);
|
||||
void ff_memfree (void* mblock); /* Free memory block */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@ void* ff_memalloc ( /* Returns pointer to the allocated memory block (null if no
|
||||
return malloc(msize); /* Allocate a new memory block with POSIX API */
|
||||
}
|
||||
|
||||
void* ff_memcalloc (UINT msize, UINT amount){
|
||||
return calloc(amount, msize);
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* Free a memory block */
|
||||
|
||||
@@ -52,10 +52,10 @@ boot_cfg_t __attribute__((section ("._boot_cfg"))) b_cfg;
|
||||
|
||||
bool return_sd_mounted(int value){
|
||||
switch(value){
|
||||
case 1:
|
||||
return sd_mounted;
|
||||
case 7:
|
||||
case 10:
|
||||
return sd_inited;
|
||||
default:
|
||||
return sd_mounted;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,6 @@ out:
|
||||
|
||||
int emummc_storage_end(sdmmc_storage_t *storage)
|
||||
{
|
||||
sd_unmount();
|
||||
sdmmc_storage_end(storage);
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -74,5 +74,5 @@ int nx_emmc_part_write(sdmmc_storage_t *storage, emmc_part_t *part, u32 sector_o
|
||||
// The last LBA is inclusive.
|
||||
if (part->lba_start + sector_off > part->lba_end)
|
||||
return 0;
|
||||
return sdmmc_storage_write(storage, part->lba_start + sector_off, num_sectors, buf);
|
||||
return emummc_storage_write(storage, part->lba_start + sector_off, num_sectors, buf);
|
||||
}
|
||||
|
||||
@@ -20,15 +20,20 @@
|
||||
#include "../soc/hw_init.h"
|
||||
#include "../mem/emc.h"
|
||||
#include "../mem/sdram.h"
|
||||
#include "../storage/emummc.h"
|
||||
#include "../config/config.h"
|
||||
|
||||
sdmmc_storage_t storage;
|
||||
emmc_part_t *system_part;
|
||||
sdmmc_t sdmmc;
|
||||
extern hekate_config h_cfg;
|
||||
__attribute__ ((aligned (16))) FATFS emmc;
|
||||
LIST_INIT(gpt);
|
||||
|
||||
u8 bis_key[4][32];
|
||||
short pkg1ver = -1;
|
||||
pkg1_info pkg1inf = {-1, ""};
|
||||
short currentlyMounted = -1;
|
||||
|
||||
|
||||
static bool _key_exists(const void *data) { return memcmp(data, zeros, 0x10); };
|
||||
|
||||
@@ -52,7 +57,11 @@ void print_biskeys(){
|
||||
gfx_hexdump(0, bis_key[2], 32);
|
||||
}
|
||||
|
||||
int mount_emmc(char *partition, int biskeynumb){
|
||||
pkg1_info returnpkg1info(){
|
||||
return pkg1inf;
|
||||
}
|
||||
|
||||
int mount_mmc(const char *partition, const int biskeynumb){
|
||||
f_unmount("emmc:");
|
||||
|
||||
se_aes_key_set(8, bis_key[biskeynumb] + 0x00, 0x10);
|
||||
@@ -72,13 +81,37 @@ int mount_emmc(char *partition, int biskeynumb){
|
||||
return 0;
|
||||
}
|
||||
|
||||
short returnpkg1ver(){
|
||||
return pkg1ver;
|
||||
void connect_mmc(short mmctype){
|
||||
if (mmctype != currentlyMounted){
|
||||
disconnect_mmc();
|
||||
h_cfg.emummc_force_disable = 0;
|
||||
switch (mmctype){
|
||||
case SYSMMC:
|
||||
sdmmc_storage_init_mmc(&storage, &sdmmc, SDMMC_4, SDMMC_BUS_WIDTH_8, 4);
|
||||
h_cfg.emummc_force_disable = 1;
|
||||
currentlyMounted = SYSMMC;
|
||||
break;
|
||||
case EMUMMC:
|
||||
if (emummc_storage_init_mmc(&storage, &sdmmc)){
|
||||
h_cfg.emummc_force_disable = 0;
|
||||
currentlyMounted = EMUMMC;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void disconnect_emmc(){
|
||||
void disconnect_mmc(){
|
||||
f_unmount("emmc:");
|
||||
sdmmc_storage_end(&storage);
|
||||
switch (currentlyMounted){
|
||||
case SYSMMC:
|
||||
sdmmc_storage_end(&storage);
|
||||
break;
|
||||
case EMUMMC:
|
||||
emummc_storage_end(&storage);
|
||||
break;
|
||||
}
|
||||
currentlyMounted = -1;
|
||||
}
|
||||
|
||||
int dump_biskeys(){
|
||||
@@ -87,7 +120,7 @@ int dump_biskeys(){
|
||||
|
||||
int retries = 0;
|
||||
|
||||
sdmmc_storage_init_mmc(&storage, &sdmmc, SDMMC_4, SDMMC_BUS_WIDTH_8, 4);
|
||||
connect_mmc(SYSMMC);
|
||||
|
||||
// Read package1.
|
||||
u8 *pkg1 = (u8 *)malloc(0x40000);
|
||||
@@ -172,41 +205,11 @@ int dump_biskeys(){
|
||||
sdmmc_storage_set_mmc_partition(&storage, 0);
|
||||
// Parse eMMC GPT.
|
||||
nx_emmc_gpt_parse(&gpt, &storage);
|
||||
/*
|
||||
char part_name[37] = "SYSTEM";
|
||||
|
||||
// todo: menu selection for this
|
||||
|
||||
u32 bis_key_index = 0;
|
||||
if (strcmp(part_name, "PRODINFOF") == 0)
|
||||
bis_key_index = 0;
|
||||
else if (strcmp(part_name, "SAFE") == 0)
|
||||
bis_key_index = 1;
|
||||
else if (strcmp(part_name, "SYSTEM") == 0)
|
||||
bis_key_index = 2;
|
||||
else if (strcmp(part_name, "USER") == 0)
|
||||
bis_key_index = 3;
|
||||
else {
|
||||
gfx_printf("Partition name %s unrecognized.", part_name);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
se_aes_key_set(8, bis_key[2] + 0x00, 0x10);
|
||||
se_aes_key_set(9, bis_key[2] + 0x10, 0x10);
|
||||
|
||||
/*
|
||||
system_part = nx_emmc_part_find(&gpt, "SYSTEM");
|
||||
if (!system_part) {
|
||||
gfx_printf("Failed to locate SYSTEM partition.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (f_mount(&emmc_sys, "system:", 1)) {
|
||||
gfx_printf("Mount failed of SYSTEM.");
|
||||
return -1;
|
||||
}
|
||||
*/
|
||||
|
||||
pkg1ver = pkg1_id->kb;
|
||||
pkg1inf.ver = pkg1_id->kb;
|
||||
strcpy(pkg1inf.id, pkg1_id->id);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,11 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct _pkg1_info {
|
||||
short ver;
|
||||
char id[16];
|
||||
} pkg1_info;
|
||||
|
||||
//int mount_emmc_partition(const char *part, int logicnumb);
|
||||
int dump_biskeys();
|
||||
void print_biskeys();
|
||||
int mount_emmc(char *partition, int biskeynumb);
|
||||
short returnpkg1ver();
|
||||
void disconnect_emmc();
|
||||
pkg1_info returnpkg1info();
|
||||
|
||||
int mount_mmc(const char *partition, const int biskeynumb);
|
||||
void connect_mmc(short mmctype);
|
||||
void disconnect_mmc();
|
||||
|
||||
|
||||
static const u8 zeros[0x10] = {0};
|
||||
|
||||
@@ -41,3 +49,8 @@ static const u8 bis_key_source[3][0x20] = {
|
||||
0x52, 0xC2, 0xE9, 0xEB, 0x09, 0xE3, 0xEE, 0x29, 0x32, 0xA1, 0x0C, 0x1F, 0xB6, 0xA0, 0x92, 0x6C,
|
||||
0x4D, 0x12, 0xE1, 0x4B, 0x2A, 0x47, 0x4C, 0x1C, 0x09, 0xCB, 0x03, 0x59, 0xF0, 0x15, 0xF4, 0xE4}
|
||||
};
|
||||
|
||||
enum mmc_types {
|
||||
SYSMMC = 0,
|
||||
EMUMMC
|
||||
};
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "../gfx/gfx.h"
|
||||
#include "../utils/util.h"
|
||||
#include "io.h"
|
||||
#include "script.h"
|
||||
|
||||
fs_entry *fileobjects;
|
||||
char rootpath[10] = "";
|
||||
@@ -18,7 +19,7 @@ u8 clipboardhelper = 0;
|
||||
extern const char sizevalues[4][3];
|
||||
extern int launch_payload(char *path);
|
||||
|
||||
menu_item explfilemenu[10] = {
|
||||
menu_item explfilemenu[11] = {
|
||||
{"-- File Menu --", COLOR_BLUE, -1, 0},
|
||||
{"FILE", COLOR_GREEN, -1, 0},
|
||||
{"\nSIZE", COLOR_VIOLET, -1, 0},
|
||||
@@ -28,6 +29,7 @@ menu_item explfilemenu[10] = {
|
||||
{"Move to clipboard", COLOR_BLUE, MOVE, 1},
|
||||
{"\nDelete file\n", COLOR_RED, DELETE, 1},
|
||||
{"Launch Payload", COLOR_ORANGE, PAYLOAD, 1},
|
||||
{"Launch Script", COLOR_YELLOW, SCRIPT, 1},
|
||||
{"View Hex", COLOR_GREEN, HEXVIEW, 1}
|
||||
};
|
||||
|
||||
@@ -309,7 +311,12 @@ int filemenu(fs_entry file){
|
||||
else
|
||||
explfilemenu[8].property = -1;
|
||||
|
||||
temp = makemenu(explfilemenu, 10);
|
||||
if (strstr(file.name, ".tegrascript") != NULL)
|
||||
explfilemenu[9].property = 1;
|
||||
else
|
||||
explfilemenu[9].property = -1;
|
||||
|
||||
temp = makemenu(explfilemenu, 11);
|
||||
|
||||
switch (temp){
|
||||
case COPY:
|
||||
@@ -324,6 +331,9 @@ int filemenu(fs_entry file){
|
||||
case PAYLOAD:
|
||||
launch_payload(getnextloc(currentpath, file.name));
|
||||
break;
|
||||
case SCRIPT:
|
||||
ParseScript(getnextloc(currentpath, file.name));
|
||||
break;
|
||||
case HEXVIEW:
|
||||
viewbytes(getnextloc(currentpath, file.name));
|
||||
break;
|
||||
|
||||
@@ -34,6 +34,7 @@ enum filemenuoptions {
|
||||
MOVE,
|
||||
DELETE,
|
||||
PAYLOAD,
|
||||
SCRIPT,
|
||||
HEXVIEW
|
||||
};
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "gfx.h"
|
||||
#include "fs.h"
|
||||
#include "../mem/minerva.h"
|
||||
#include "../power/max17050.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
const char fixedoptions[3][50] = {
|
||||
@@ -24,10 +25,22 @@ const char sizevalues[4][3] = {
|
||||
};
|
||||
|
||||
void clearscreen(){
|
||||
int battery = 0;
|
||||
max17050_get_property(MAX17050_RepSOC, &battery);
|
||||
|
||||
gfx_clear_grey(0x1B);
|
||||
SWAPCOLOR(COLOR_DEFAULT);
|
||||
SWAPBGCOLOR(COLOR_WHITE);
|
||||
|
||||
gfx_box(0, 1263, 719, 1279, COLOR_WHITE);
|
||||
gfx_con_setpos(0, 1263);
|
||||
gfx_printf("Move: Vol+/- | Select: Pow | Battery: %3d%%", battery >> 8);
|
||||
|
||||
gfx_box(0, 0, 719, 15, COLOR_WHITE);
|
||||
gfx_con_setpos(0, 0);
|
||||
gfx_printf("%k%KTegraexplorer v1.2.1%k%K\n", COLOR_DEFAULT, COLOR_WHITE, COLOR_WHITE, COLOR_DEFAULT);
|
||||
gfx_printf("Tegraexplorer v1.3.2\n");
|
||||
|
||||
RESETCOLOR;
|
||||
}
|
||||
|
||||
int message(u32 color, const char* message, ...){
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "fs.h"
|
||||
|
||||
#define SWAPCOLOR(color) gfx_printf("%k", color)
|
||||
#define SWAPBGCOLOR(color) gfx_printf("%K", color)
|
||||
#define RESETCOLOR gfx_printf("%k%K", COLOR_WHITE, COLOR_DEFAULT)
|
||||
|
||||
int makemenu(menu_item menu[], int menuamount);
|
||||
|
||||
@@ -75,7 +75,7 @@ int copy(const char *locin, const char *locout, bool print, bool canCancel){
|
||||
return 21;
|
||||
}
|
||||
|
||||
if (f_open(&in, locin, FA_READ | FA_OPEN_EXISTING)){
|
||||
if ((res = f_open(&in, locin, FA_READ | FA_OPEN_EXISTING))){
|
||||
return 22;
|
||||
}
|
||||
|
||||
@@ -123,6 +123,7 @@ int copy(const char *locin, const char *locout, bool print, bool canCancel){
|
||||
if ((res = f_chmod(locout, in_info.fattrib, 0x3A)))
|
||||
return res;
|
||||
|
||||
f_stat(locin, &in_info); //somehow stops fatfs from being weird
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -158,20 +159,23 @@ int del_recursive(char *path){
|
||||
DIR dir;
|
||||
FILINFO fno;
|
||||
int res;
|
||||
u32 x, y;
|
||||
char *localpath = NULL;
|
||||
|
||||
gfx_con_getpos(&x, &y);
|
||||
makestring(path, &localpath);
|
||||
|
||||
if ((res = f_opendir(&dir, localpath))){
|
||||
message(COLOR_RED, "Error during f_opendir: %d", res);
|
||||
//message(COLOR_RED, "Error during f_opendir: %d", res);
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (!f_readdir(&dir, &fno) && fno.fname[0]){
|
||||
if (fno.fattrib & AM_DIR)
|
||||
if (fno.fattrib & AM_DIR){
|
||||
del_recursive(getnextloc(localpath, fno.fname));
|
||||
|
||||
}
|
||||
else {
|
||||
gfx_box(0, 47, 719, 63, COLOR_DEFAULT);
|
||||
gfx_box(0, y, 719, y + 16, COLOR_DEFAULT);
|
||||
SWAPCOLOR(COLOR_RED);
|
||||
gfx_printf("\r");
|
||||
gfx_print_length(37, fno.fname);
|
||||
@@ -197,15 +201,17 @@ int copy_recursive(char *path, char *dstpath){
|
||||
DIR dir;
|
||||
FILINFO fno;
|
||||
int res;
|
||||
u32 x, y;
|
||||
char *startpath = NULL, *destpath = NULL, *destfoldername = NULL, *temp = NULL;
|
||||
|
||||
gfx_con_getpos(&x, &y);
|
||||
|
||||
makestring(path, &startpath);
|
||||
makestring(strrchr(path, '/') + 1, &destfoldername);
|
||||
|
||||
destpath = (char*) malloc (strlen(dstpath) + strlen(destfoldername) + 2);
|
||||
sprintf(destpath, (dstpath[strlen(dstpath) - 1] == '/') ? "%s%s" : "%s/%s", dstpath, destfoldername);
|
||||
|
||||
|
||||
if ((res = f_opendir(&dir, startpath))){
|
||||
message(COLOR_RED, "Error during f_opendir: %d", res);
|
||||
return 21;
|
||||
@@ -213,15 +219,12 @@ int copy_recursive(char *path, char *dstpath){
|
||||
|
||||
f_mkdir(destpath);
|
||||
|
||||
if (f_stat(startpath, &fno))
|
||||
return 22;
|
||||
|
||||
while (!f_readdir(&dir, &fno) && fno.fname[0]){
|
||||
if (fno.fattrib & AM_DIR){
|
||||
copy_recursive(getnextloc(startpath, fno.fname), destpath);
|
||||
}
|
||||
else {
|
||||
gfx_box(0, 47, 719, 63, COLOR_DEFAULT);
|
||||
gfx_box(0, y, 719, y + 16, COLOR_DEFAULT);
|
||||
SWAPCOLOR(COLOR_GREEN);
|
||||
gfx_printf("\r");
|
||||
gfx_print_length(37, fno.fname);
|
||||
@@ -237,12 +240,16 @@ int copy_recursive(char *path, char *dstpath){
|
||||
}
|
||||
|
||||
f_closedir(&dir);
|
||||
free(startpath);
|
||||
free(destpath);
|
||||
free(destfoldername);
|
||||
|
||||
if (f_stat(startpath, &fno))
|
||||
return 22;
|
||||
|
||||
if ((res = f_chmod(destpath, fno.fattrib, 0x3A)))
|
||||
return res;
|
||||
|
||||
free(startpath);
|
||||
free(destpath);
|
||||
free(destfoldername);
|
||||
|
||||
return 0;
|
||||
}
|
||||
277
source/tegraexplorer/script.c
Normal file
277
source/tegraexplorer/script.c
Normal file
@@ -0,0 +1,277 @@
|
||||
#include <string.h>
|
||||
#include "../mem/heap.h"
|
||||
#include "gfx.h"
|
||||
#include "fs.h"
|
||||
#include "io.h"
|
||||
#include "emmc.h"
|
||||
#include "../utils/types.h"
|
||||
#include "../libs/fatfs/ff.h"
|
||||
#include "../utils/sprintf.h"
|
||||
#include "../utils/btn.h"
|
||||
#include "../gfx/gfx.h"
|
||||
#include "../utils/util.h"
|
||||
#include "../storage/emummc.h"
|
||||
#include "script.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
char func[11] = "", args[2][128] = {"", ""};
|
||||
int res, errcode;
|
||||
const int scriptver = 131;
|
||||
bool forceExit = false;
|
||||
u32 currentcolor;
|
||||
|
||||
void Part_SetColor(){
|
||||
if (strcmpcheck(args[0], "RED"))
|
||||
currentcolor = COLOR_RED;
|
||||
else if (strcmpcheck(args[0], "ORANGE"))
|
||||
currentcolor = COLOR_ORANGE;
|
||||
else if (strcmpcheck(args[0], "YELLOW"))
|
||||
currentcolor = COLOR_YELLOW;
|
||||
else if (strcmpcheck(args[0], "GREEN"))
|
||||
currentcolor = COLOR_GREEN;
|
||||
else if (strcmpcheck(args[0], "BLUE"))
|
||||
currentcolor = COLOR_BLUE;
|
||||
else if (strcmpcheck(args[0], "VIOLET"))
|
||||
currentcolor = COLOR_VIOLET;
|
||||
else if (strcmpcheck(args[0], "WHITE"))
|
||||
currentcolor = COLOR_WHITE;
|
||||
}
|
||||
|
||||
void Part_Wait(){
|
||||
int waitamount, begintime;
|
||||
SWAPCOLOR(currentcolor);
|
||||
|
||||
waitamount = atoi(args[0]);
|
||||
begintime = get_tmr_s();
|
||||
|
||||
while (begintime + waitamount > get_tmr_s()){
|
||||
gfx_printf("\r<Wait %d seconds> ", (begintime + waitamount) - get_tmr_s());
|
||||
}
|
||||
|
||||
gfx_printf("\r \r");
|
||||
}
|
||||
|
||||
void Part_VersionCheck(){
|
||||
int givenversion = atoi(args[0]);
|
||||
|
||||
if (givenversion > scriptver){
|
||||
gfx_printf("Script required version is too high\nUpdate TegraExplorer!");
|
||||
btn_wait();
|
||||
forceExit = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Part_Move(){
|
||||
errcode = f_rename(args[0], args[1]);
|
||||
if (errcode)
|
||||
f_rename(args[0], args[1]);
|
||||
}
|
||||
|
||||
void Part_Delete(){
|
||||
errcode = f_unlink(args[0]);
|
||||
if (errcode)
|
||||
f_unlink(args[0]);
|
||||
}
|
||||
|
||||
void Part_DeleteRecursive(){
|
||||
errcode = del_recursive(args[0]);
|
||||
}
|
||||
|
||||
void Part_Copy(){
|
||||
errcode = copy(args[0], args[1], true, false);
|
||||
}
|
||||
|
||||
void Part_RecursiveCopy(){
|
||||
errcode = copy_recursive(args[0], args[1]);
|
||||
}
|
||||
|
||||
void Part_MakeFolder(){
|
||||
errcode = f_mkdir(args[0]);
|
||||
if (errcode)
|
||||
f_mkdir(args[0]);
|
||||
}
|
||||
|
||||
void Part_ConnectMMC(){
|
||||
if (strcmpcheck(args[0], "SYSMMC"))
|
||||
connect_mmc(SYSMMC);
|
||||
if (strcmpcheck(args[0], "EMUMMC"))
|
||||
connect_mmc(EMUMMC);
|
||||
}
|
||||
|
||||
void Part_MountMMC(){
|
||||
errcode = mount_mmc(args[0], 2);
|
||||
}
|
||||
|
||||
void Part_Print(){
|
||||
RESETCOLOR;
|
||||
SWAPCOLOR(currentcolor);
|
||||
gfx_printf("%s\n", args[0]);
|
||||
}
|
||||
|
||||
void Part_ErrorPrint(){
|
||||
RESETCOLOR;
|
||||
SWAPCOLOR(COLOR_RED);
|
||||
gfx_printf("Errorcode: %d\n", errcode);
|
||||
}
|
||||
|
||||
void Part_Exit(){
|
||||
forceExit = true;
|
||||
}
|
||||
|
||||
u8 buttons_pressed = 0;
|
||||
void Part_WaitOnUser(){
|
||||
buttons_pressed = btn_wait();
|
||||
}
|
||||
|
||||
script_parts parts[] = {
|
||||
{"COPY", Part_Copy, 2},
|
||||
{"COPY-R", Part_RecursiveCopy, 2},
|
||||
{"MKDIR", Part_MakeFolder, 1},
|
||||
{"CON_MMC", Part_ConnectMMC, 1},
|
||||
{"MNT_MMC", Part_MountMMC, 1},
|
||||
{"PRINT", Part_Print, 1},
|
||||
{"ERRPRINT", Part_ErrorPrint, 0},
|
||||
{"EXIT", Part_Exit, 0},
|
||||
{"PAUSE", Part_WaitOnUser, 0},
|
||||
{"DEL", Part_Delete, 1},
|
||||
{"DEL-R", Part_DeleteRecursive, 1},
|
||||
{"MOVE", Part_Move, 2},
|
||||
{"VERSION", Part_VersionCheck, 1},
|
||||
{"WAIT", Part_Wait, 1},
|
||||
{"COLOR", Part_SetColor, 1},
|
||||
{"NULL", NULL, -1}
|
||||
};
|
||||
|
||||
int ParsePart(){
|
||||
int i;
|
||||
for (i = 0; parts[i].arg_amount != -1; i++){
|
||||
if (strcmpcheck(func, parts[i].name))
|
||||
return i;
|
||||
}
|
||||
gfx_printf("Parsing error...\nPress any key to continue");
|
||||
btn_wait();
|
||||
forceExit = true;
|
||||
return -1;
|
||||
}
|
||||
|
||||
FIL in;
|
||||
UINT endByte = 0;
|
||||
|
||||
char GetNextByte(){
|
||||
char single;
|
||||
f_read(&in, &single, sizeof(char), &endByte);
|
||||
|
||||
if (sizeof(char) != endByte)
|
||||
forceExit = true;
|
||||
|
||||
return single;
|
||||
}
|
||||
|
||||
void ParseScript(char* path){
|
||||
char currentchar;
|
||||
int strlength;
|
||||
bool inifstatement = false;
|
||||
forceExit = false;
|
||||
currentcolor = COLOR_WHITE;
|
||||
|
||||
clearscreen();
|
||||
|
||||
res = f_open(&in, path, FA_READ | FA_OPEN_EXISTING);
|
||||
if (res != FR_OK){
|
||||
message(COLOR_RED, "File Opening Failed\nErrcode %d", res);
|
||||
return;
|
||||
}
|
||||
|
||||
while (!forceExit){
|
||||
currentchar = GetNextByte();
|
||||
|
||||
if (endByte == 0 || currentchar == (char)EOF)
|
||||
break;
|
||||
|
||||
switch(currentchar){
|
||||
case '{':
|
||||
if (!inifstatement)
|
||||
while (currentchar != '}')
|
||||
currentchar = GetNextByte();
|
||||
|
||||
break;
|
||||
case '}':
|
||||
if (inifstatement)
|
||||
inifstatement = false;
|
||||
|
||||
break;
|
||||
case '<':
|
||||
strlength = 0;
|
||||
currentchar = GetNextByte();
|
||||
|
||||
while (currentchar != '>'){
|
||||
func[strlength++] = currentchar;
|
||||
currentchar = GetNextByte();
|
||||
}
|
||||
func[strlength] = '\0';
|
||||
|
||||
res = ParsePart();
|
||||
if (res == -1)
|
||||
break;
|
||||
|
||||
for (int i = 0; i < parts[res].arg_amount; i++){
|
||||
while (currentchar != 0x22)
|
||||
currentchar = GetNextByte();
|
||||
|
||||
strlength = 0;
|
||||
currentchar = GetNextByte();
|
||||
while (currentchar != 0x22){
|
||||
args[i][strlength++] = currentchar;
|
||||
currentchar = GetNextByte();
|
||||
}
|
||||
args[i][strlength] = '\0';
|
||||
|
||||
if (i < parts[res].arg_amount)
|
||||
currentchar = GetNextByte();
|
||||
}
|
||||
parts[res].handler();
|
||||
break;
|
||||
case '$':
|
||||
strlength = 0;
|
||||
currentchar = GetNextByte();
|
||||
|
||||
while (currentchar != '$'){
|
||||
func[strlength++] = currentchar;
|
||||
currentchar = GetNextByte();
|
||||
}
|
||||
func[strlength] = '\0';
|
||||
|
||||
if (strcmpcheck(func, "ERROR") || strcmpcheck(func, "TRUE")){
|
||||
inifstatement = (errcode);
|
||||
}
|
||||
else if (strcmpcheck(func, "NOERROR") || strcmpcheck(func, "FALSE")){
|
||||
inifstatement = (!errcode);
|
||||
}
|
||||
else if (strcmpcheck(func, "BTN_POWER")){
|
||||
inifstatement = (buttons_pressed & BTN_POWER);
|
||||
}
|
||||
else if (strcmpcheck(func, "BTN_VOL+")){
|
||||
inifstatement = (buttons_pressed & BTN_VOL_UP);
|
||||
}
|
||||
else if (strcmpcheck(func, "BTN_VOL-")){
|
||||
inifstatement = (buttons_pressed & BTN_VOL_DOWN);
|
||||
}
|
||||
else if (strcmpcheck(func, "EMUMMC")){
|
||||
inifstatement = (emu_cfg.enabled);
|
||||
}
|
||||
else if (strcmpcheck(func, "NOEMUMMC")){
|
||||
inifstatement = (!emu_cfg.enabled);
|
||||
}
|
||||
|
||||
if (inifstatement)
|
||||
while(currentchar != '{')
|
||||
currentchar = GetNextByte();
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
f_close(&in);
|
||||
}
|
||||
11
source/tegraexplorer/script.h
Normal file
11
source/tegraexplorer/script.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#define strcmpcheck(x, y) (!strcmp(x, y))
|
||||
|
||||
typedef void (*part_handler)();
|
||||
typedef struct _script_parts {
|
||||
char name[11];
|
||||
part_handler handler;
|
||||
short arg_amount;
|
||||
} script_parts;
|
||||
|
||||
void ParseScript(char* path);
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "io.h"
|
||||
#include "../utils/btn.h"
|
||||
#include "emmc.h"
|
||||
#include "../storage/emummc.h"
|
||||
#include "script.h"
|
||||
|
||||
extern bool sd_mount();
|
||||
extern void sd_unmount();
|
||||
@@ -19,6 +21,9 @@ menu_item mainmenu[MAINMENU_AMOUNT] = {
|
||||
{"[SYSTEM:/] EMMC", COLOR_ORANGE, EMMC_SYS, 1},
|
||||
{"[USER:/] EMMC", COLOR_ORANGE, EMMC_USR, 1},
|
||||
{"[SAFE:/] EMMC", COLOR_ORANGE, EMMC_SAF, 1},
|
||||
{"\n[SYSTEM:/] EMUMMC", COLOR_BLUE, EMUMMC_SYS, 1},
|
||||
{"[USER:/] EMUMMC", COLOR_BLUE, EMUMMC_USR, 1},
|
||||
{"[SAFE:/] EMUMMC", COLOR_BLUE, EMUMMC_SAF, 1},
|
||||
{"\nMount/Unmount SD", COLOR_WHITE, MOUNT_SD, 1},
|
||||
{"Tools", COLOR_VIOLET, TOOLS, 1},
|
||||
{"SD format", COLOR_VIOLET, SD_FORMAT, 1},
|
||||
@@ -52,25 +57,160 @@ menu_item formatmenu[4] = {
|
||||
{"Format for EmuMMC setup (FAT32/RAW)", COLOR_RED, FORMAT_EMUMMC, 1}
|
||||
};
|
||||
|
||||
menu_item mmcChoice[3] = {
|
||||
{"Back\n", COLOR_WHITE, -1, 1},
|
||||
{"SysMMC", COLOR_ORANGE, SYSMMC, 1},
|
||||
{"EmuMMC", COLOR_BLUE, EMUMMC, 1}
|
||||
};
|
||||
|
||||
const char emmc_entries[3][8] = {
|
||||
"SAFE",
|
||||
"SYSTEM",
|
||||
"USER"
|
||||
};
|
||||
|
||||
int res = 0;
|
||||
|
||||
void MainMenu_SDCard(){
|
||||
fileexplorer("SD:/");
|
||||
}
|
||||
|
||||
void MainMenu_EMMC(){
|
||||
if (makewaitmenu("You're about to enter EMMC\nModifying anything here\n can result in a BRICK!\n\nPlease only continue\n if you know what you're doing\n\nPress Vol+/- to return\n", "Press Power to enter", 4)){
|
||||
connect_mmc(SYSMMC);
|
||||
|
||||
if (!mount_mmc(emmc_entries[res - 2], res - 1))
|
||||
fileexplorer("emmc:/");
|
||||
else
|
||||
message(COLOR_RED, "EMMC failed to mount!");
|
||||
}
|
||||
}
|
||||
|
||||
void MainMenu_EMUMMC(){
|
||||
connect_mmc(EMUMMC);
|
||||
|
||||
if (!mount_mmc(emmc_entries[res - 5], res - 4))
|
||||
fileexplorer("emmc:/");
|
||||
else
|
||||
message(COLOR_RED, "EMUMMC failed to mount!");
|
||||
}
|
||||
|
||||
void MainMenu_MountSD(){
|
||||
if (return_sd_mounted(1))
|
||||
sd_unmount();
|
||||
else
|
||||
sd_mount();
|
||||
}
|
||||
|
||||
void MainMenu_Tools(){
|
||||
res = makemenu(toolsmenu, 6);
|
||||
|
||||
switch(res){
|
||||
case DISPLAY_INFO:
|
||||
displayinfo();
|
||||
break;
|
||||
case DISPLAY_GPIO:
|
||||
displaygpio();
|
||||
break;
|
||||
case DUMPFIRMWARE:
|
||||
dumpfirmware(SYSMMC);
|
||||
break;
|
||||
case DUMPUSERSAVE:
|
||||
if (mainmenu[4].property >= 0){
|
||||
if ((res = makemenu(mmcChoice, 3)) >= 0)
|
||||
dumpusersaves(res);
|
||||
}
|
||||
else
|
||||
dumpusersaves(SYSMMC);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void MainMenu_SDFormat(){
|
||||
res = makemenu(formatmenu, 4);
|
||||
|
||||
if (res >= 0){
|
||||
if(makewaitmenu("Are you sure you want to format your sd?\nThis will delete everything on your SD card\nThis action is irreversible!\n\nPress Vol+/- to cancel\n", "Press Power to continue", 10)){
|
||||
if (format(res)){
|
||||
sd_unmount();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainMenu_Credits(){
|
||||
message(COLOR_WHITE, CREDITS_MESSAGE);
|
||||
}
|
||||
|
||||
void MainMenu_Exit(){
|
||||
if (return_sd_mounted(1)){
|
||||
shutdownmenu[5].property = (checkfile("/bootloader/update.bin")) ? 1 : -1;
|
||||
shutdownmenu[6].property = (checkfile("/atmosphere/reboot_payload.bin")) ? 1 : -1;
|
||||
}
|
||||
else {
|
||||
shutdownmenu[5].property = -1;
|
||||
shutdownmenu[6].property = -1;
|
||||
}
|
||||
|
||||
res = makemenu(shutdownmenu, 7);
|
||||
|
||||
switch(res){
|
||||
case REBOOT_RCM:
|
||||
reboot_rcm();
|
||||
|
||||
case REBOOT_NORMAL:
|
||||
reboot_normal();
|
||||
|
||||
case POWER_OFF:
|
||||
power_off();
|
||||
|
||||
case HEKATE:
|
||||
launch_payload("/bootloader/update.bin");
|
||||
|
||||
case AMS:
|
||||
launch_payload("/atmosphere/reboot_payload.bin");
|
||||
} //todo declock bpmp
|
||||
}
|
||||
|
||||
part_handler mainmenu_functions[] = {
|
||||
MainMenu_SDCard,
|
||||
MainMenu_EMMC,
|
||||
MainMenu_EMMC,
|
||||
MainMenu_EMMC,
|
||||
MainMenu_EMUMMC,
|
||||
MainMenu_EMUMMC,
|
||||
MainMenu_EMUMMC,
|
||||
MainMenu_MountSD,
|
||||
MainMenu_Tools,
|
||||
MainMenu_SDFormat,
|
||||
MainMenu_Credits,
|
||||
MainMenu_Exit,
|
||||
};
|
||||
|
||||
void RunMenuOption(int option){
|
||||
if (option > 0)
|
||||
mainmenu_functions[option - 1]();
|
||||
}
|
||||
|
||||
void fillmainmenu(){
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAINMENU_AMOUNT; i++){
|
||||
switch (i + 1) {
|
||||
case 1:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
if (mainmenu[i].property == -2)
|
||||
continue;
|
||||
case 1:
|
||||
case 10:
|
||||
if (return_sd_mounted(i + 1))
|
||||
mainmenu[i].property = 1;
|
||||
else
|
||||
mainmenu[i].property = -1;
|
||||
break;
|
||||
case 5:
|
||||
case 8:
|
||||
if (return_sd_mounted(1)){
|
||||
mainmenu[i].property = 2;
|
||||
strcpy(mainmenu[i].name, "\nUnmount SD");
|
||||
@@ -85,7 +225,6 @@ void fillmainmenu(){
|
||||
}
|
||||
|
||||
void te_main(){
|
||||
int res;
|
||||
|
||||
if (dump_biskeys() == -1){
|
||||
message(COLOR_RED, "Biskeys failed to dump!\nEmmc will not be mounted!");
|
||||
@@ -94,110 +233,17 @@ void te_main(){
|
||||
mainmenu[3].property = -1;
|
||||
}
|
||||
|
||||
if (emummc_load_cfg()){
|
||||
mainmenu[4].property = -2;
|
||||
mainmenu[5].property = -2;
|
||||
mainmenu[6].property = -2;
|
||||
}
|
||||
|
||||
disconnect_mmc();
|
||||
|
||||
while (1){
|
||||
fillmainmenu();
|
||||
res = makemenu(mainmenu, MAINMENU_AMOUNT);
|
||||
|
||||
switch(res){
|
||||
case SD_CARD:
|
||||
fileexplorer("SD:/");
|
||||
break;
|
||||
|
||||
case EMMC_SAF:
|
||||
case EMMC_SYS:
|
||||
case EMMC_USR:
|
||||
|
||||
if (makewaitmenu("You're about to enter EMMC\nModifying anything here\n can result in a BRICK!\n\nPlease only continue\n if you know what you're doing\n\nPress Vol+/- to return\n", "Press Power to enter", 4)){
|
||||
if (!mount_emmc(emmc_entries[res - 2], res - 1)){
|
||||
fileexplorer("emmc:/");
|
||||
}
|
||||
else
|
||||
message(COLOR_RED, "EMMC failed to mount!");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case MOUNT_SD:
|
||||
if (return_sd_mounted(1))
|
||||
sd_unmount();
|
||||
else
|
||||
sd_mount();
|
||||
|
||||
break;
|
||||
|
||||
case TOOLS:
|
||||
res = makemenu(toolsmenu, 6);
|
||||
|
||||
switch(res){
|
||||
case DISPLAY_INFO:
|
||||
displayinfo();
|
||||
break;
|
||||
case DISPLAY_GPIO:
|
||||
displaygpio();
|
||||
break;
|
||||
case DUMPFIRMWARE:
|
||||
dumpfirmware();
|
||||
break;
|
||||
case DUMPUSERSAVE:
|
||||
dumpusersaves();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case SD_FORMAT:
|
||||
res = makemenu(formatmenu, 4);
|
||||
|
||||
if (res >= 0){
|
||||
if(makewaitmenu("Are you sure you want to format your sd?\nThis will delete everything on your SD card\nThis action is irreversible!\n\nPress Vol+/- to cancel\n", "Press Power to continue", 10)){
|
||||
if (format(res)){
|
||||
sd_unmount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case CREDITS:
|
||||
message(COLOR_WHITE, CREDITS_MESSAGE);
|
||||
break;
|
||||
|
||||
case EXIT:
|
||||
if (return_sd_mounted(1)){
|
||||
if (checkfile("/bootloader/update.bin"))
|
||||
shutdownmenu[5].property = 1;
|
||||
else
|
||||
shutdownmenu[5].property = -1;
|
||||
|
||||
if (checkfile("/atmosphere/reboot_payload.bin"))
|
||||
shutdownmenu[6].property = 1;
|
||||
else
|
||||
shutdownmenu[6].property = -1;
|
||||
}
|
||||
else {
|
||||
shutdownmenu[5].property = -1;
|
||||
shutdownmenu[6].property = -1;
|
||||
}
|
||||
|
||||
res = makemenu(shutdownmenu, 7);
|
||||
|
||||
switch(res){
|
||||
case REBOOT_RCM:
|
||||
reboot_rcm();
|
||||
|
||||
case REBOOT_NORMAL:
|
||||
reboot_normal();
|
||||
|
||||
case POWER_OFF:
|
||||
power_off();
|
||||
|
||||
case HEKATE:
|
||||
launch_payload("/bootloader/update.bin");
|
||||
|
||||
case AMS:
|
||||
launch_payload("/atmosphere/reboot_payload.bin");
|
||||
} //todo declock bpmp
|
||||
|
||||
break;
|
||||
}
|
||||
RunMenuOption(res);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "../utils/types.h"
|
||||
|
||||
#define MAINMENU_AMOUNT 9
|
||||
#define MAINMENU_AMOUNT 12
|
||||
#define CREDITS_MESSAGE "\nTegraexplorer, made by:\nSuch Meme, Many Skill\n\nProject based on:\nLockpick_RCM\nHekate\n\nCool people:\nshchmue\ndennthecafebabe\nDax"
|
||||
|
||||
typedef struct _menu_item {
|
||||
@@ -16,6 +16,9 @@ enum mainmenu_return {
|
||||
EMMC_SAF,
|
||||
EMMC_SYS,
|
||||
EMMC_USR,
|
||||
EMUMMC_SAF,
|
||||
EMUMMC_SYS,
|
||||
EMUMMC_USR,
|
||||
MOUNT_SD,
|
||||
TOOLS,
|
||||
SD_FORMAT,
|
||||
@@ -43,6 +46,4 @@ enum formatmenu_return {
|
||||
FORMAT_ALL_FAT32
|
||||
};
|
||||
|
||||
//menu_item mainmenu[MAINMENU_AMOUNT];
|
||||
|
||||
void te_main();
|
||||
@@ -25,6 +25,7 @@ void displayinfo(){
|
||||
DWORD fre_clust, fre_sect, tot_sect;
|
||||
u32 capacity;
|
||||
u8 fuse_count = 0;
|
||||
pkg1_info pkg1 = returnpkg1info();
|
||||
int res;
|
||||
|
||||
for (u32 i = 0; i < 32; i++){
|
||||
@@ -34,7 +35,7 @@ void displayinfo(){
|
||||
|
||||
SWAPCOLOR(COLOR_ORANGE);
|
||||
|
||||
gfx_printf("Fuse count: %d\nPKG1 version: %d\n\n", fuse_count, returnpkg1ver());
|
||||
gfx_printf("Fuse count: %d\nPKG1 version: %d\nPKG1 id: %s\n\n", fuse_count, pkg1.ver, pkg1.id);
|
||||
print_biskeys();
|
||||
|
||||
RESETCOLOR;
|
||||
@@ -85,7 +86,7 @@ void displaygpio(){
|
||||
}
|
||||
}
|
||||
|
||||
int dumpfirmware(){
|
||||
int dumpfirmware(int mmc){
|
||||
DIR dir;
|
||||
FILINFO fno;
|
||||
bool fail = false;
|
||||
@@ -94,13 +95,14 @@ int dumpfirmware(){
|
||||
char sdfolderpath[100] = "";
|
||||
char syspath[100] = "";
|
||||
char sdpath[100] = "";
|
||||
short pkg1ver = returnpkg1ver();
|
||||
pkg1_info pkg1 = returnpkg1info();
|
||||
u32 timer = get_tmr_s();
|
||||
|
||||
clearscreen();
|
||||
mount_emmc("SYSTEM", 2);
|
||||
connect_mmc(mmc);
|
||||
mount_mmc("SYSTEM", 2);
|
||||
|
||||
gfx_printf("PKG1 version: %d\n", pkg1ver);
|
||||
gfx_printf("PKG1 version: %d\n", pkg1.ver);
|
||||
|
||||
ret = f_mkdir("sd:/tegraexplorer");
|
||||
gfx_printf("Creating sd:/tegraexplorer %d\n", ret);
|
||||
@@ -108,7 +110,7 @@ int dumpfirmware(){
|
||||
ret = f_mkdir("sd:/tegraexplorer/Firmware");
|
||||
gfx_printf("Creating sd:/tegraexplorer/Firmware %d\n", ret);
|
||||
|
||||
sprintf(sdfolderpath, "sd:/tegraexplorer/Firmware/%d", pkg1ver);
|
||||
sprintf(sdfolderpath, "sd:/tegraexplorer/Firmware/%d (%s)", pkg1.ver, pkg1.id);
|
||||
ret = f_mkdir(sdfolderpath);
|
||||
gfx_printf("Creating %s %d\n", sdfolderpath, ret);
|
||||
|
||||
@@ -141,10 +143,11 @@ int dumpfirmware(){
|
||||
return fail;
|
||||
}
|
||||
|
||||
void dumpusersaves(){
|
||||
void dumpusersaves(int mmc){
|
||||
int res;
|
||||
|
||||
mount_emmc("USER", 2);
|
||||
connect_mmc(mmc);
|
||||
mount_mmc("USER", 2);
|
||||
clearscreen();
|
||||
|
||||
res = f_mkdir("sd:/tegraexplorer");
|
||||
@@ -180,7 +183,7 @@ int format(int mode){
|
||||
formatoptions |= (FM_FAT32);
|
||||
//formatoptions |= (FM_SFD);
|
||||
|
||||
disconnect_emmc();
|
||||
disconnect_mmc();
|
||||
|
||||
timer = get_tmr_s();
|
||||
totalsectors = sd_storage.csd.capacity;
|
||||
@@ -238,8 +241,7 @@ int format(int mode){
|
||||
}
|
||||
}
|
||||
|
||||
dump_biskeys();
|
||||
mount_emmc("SYSTEM", 2);
|
||||
connect_mmc(SYSMMC);
|
||||
|
||||
gfx_printf("\nPress any button to return%k\nTotal time taken: %ds", COLOR_WHITE, (get_tmr_s() - timer));
|
||||
btn_wait();
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
void displayinfo();
|
||||
void displaygpio();
|
||||
int format(int mode);
|
||||
int dumpfirmware();
|
||||
void dumpusersaves();
|
||||
int dumpfirmware(int mmc);
|
||||
void dumpusersaves(int mmc);
|
||||
Reference in New Issue
Block a user