Speed up copy & formats

This commit is contained in:
Such Meme, Many Skill
2020-05-04 20:30:51 +02:00
parent 9799e2b47e
commit a9ea9725d4
6 changed files with 57 additions and 30 deletions

View File

@@ -45,7 +45,7 @@ int emmcDumpPart(char *path, sdmmc_storage_t *mmcstorage, emmc_part_t *part){
f_lseek(&fp, 0);
while (totalSectors > 0){
num = MIN(totalSectors, 64);
num = MIN(totalSectors, 128);
if (!emummc_storage_read(mmcstorage, lba_curr, num, buf)){
gfx_errDisplay("dump_emmc_part", ERR_EMMC_READ_FAILED, 3);
return -1;

View File

@@ -32,7 +32,7 @@ int emmcRestorePart(char *path, sdmmc_storage_t *mmcstorage, emmc_part_t *part){
gfx_printf("Initializing\r");
buf = calloc(16384, sizeof(u8));
buf = calloc(BUFSIZE, sizeof(u8));
if (!buf){
gfx_errDisplay("restore_emmc_part", ERR_MEM_ALLOC_FAILED, 1);
@@ -78,7 +78,7 @@ int emmcRestorePart(char *path, sdmmc_storage_t *mmcstorage, emmc_part_t *part){
}
while (totalSectors > 0){
num = MIN(totalSectors, 32);
num = MIN(totalSectors, 128);
if ((res = f_read(&fp, buf, num * NX_EMMC_BLOCKSIZE, NULL))){
gfx_errDisplay("restore_emmc_part", res, 5);