[script] Make equivalent to tsV1

Fixed: functions in functions
Added functions: version, menu, pathCombine, pathEscFolder, fileMove, fileCopy, fileDel, mmcConnect, mmcMount, mkdir, dirRead, dirCopy, dirDel, mmcDump, mmcRestore
This commit is contained in:
suchmememanyskill
2021-01-04 01:55:58 +01:00
parent e1491da4ad
commit c9fdb650c3
8 changed files with 182 additions and 9 deletions

View File

@@ -125,6 +125,9 @@ ErrCode_t DumpOrWriteEmmcPart(const char *path, const char *part, u8 write, u8 f
if (!sd_mount())
return newErrCode(TE_ERR_NO_SD);
if (TConf.currentMMCConnected == MMC_CONN_None)
return newErrCode(TE_ERR_PARTITION_NOT_FOUND);
if (!memcmp(part, "BOOT0", 5)){
emummc_storage_set_mmc_partition(&emmc_storage, 1);
lba_end = (BOOT_PART_SIZE / NX_EMMC_BLOCKSIZE) - 1;

View File

@@ -61,6 +61,9 @@ int connectMMC(u8 mmcType){
}
ErrCode_t mountMMCPart(const char *partition){
if (TConf.currentMMCConnected == MMC_CONN_None)
return newErrCode(TE_ERR_PARTITION_NOT_FOUND);
unmountMMCPart();
emummc_storage_set_mmc_partition(&emmc_storage, 0); // why i have to do this twice beats me