mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
don't run b4ds anymore, as it is obsolete (#87)
* don't run b4ds anymore, as it is obsolete * fix off by one error when printing SHA1 hash
This commit is contained in:
parent
9e00e5394e
commit
4c726266f7
@ -95,7 +95,7 @@ bool calculateSHA1(const char *fileName, u8 *sha1)
|
|||||||
int keys = keysHeld();
|
int keys = keysHeld();
|
||||||
if (keys & KEY_START) return false;
|
if (keys & KEY_START) return false;
|
||||||
iprintf("\x1b[1;A");
|
iprintf("\x1b[1;A");
|
||||||
iprintf("%ld/%lld bytes\n", ftell(fp), fsize);
|
iprintf("%ld/%lld bytes processed\n", ftell(fp), fsize);
|
||||||
}
|
}
|
||||||
swiSHA1Final(sha1, &ctx);
|
swiSHA1Final(sha1, &ctx);
|
||||||
free(buf);
|
free(buf);
|
||||||
|
|||||||
@ -242,12 +242,13 @@ FileOperation fileBrowse_A(DirEntry* entry, char path[PATH_MAX]) {
|
|||||||
assignedOp[++maxCursors] = FileOperation::copyFatOut;
|
assignedOp[++maxCursors] = FileOperation::copyFatOut;
|
||||||
printf(" Copy to fat:/gm9i/out\n");
|
printf(" Copy to fat:/gm9i/out\n");
|
||||||
}
|
}
|
||||||
// The bios SHA1 functions are only availible on the DSi
|
// The bios SHA1 functions are only available on the DSi
|
||||||
// https://problemkaputt.de/gbatek.htm#biossha1functionsdsionly
|
// https://problemkaputt.de/gbatek.htm#biossha1functionsdsionly
|
||||||
if (isDSiMode()) {
|
if (isDSiMode()) {
|
||||||
assignedOp[++maxCursors] = FileOperation::calculateSHA1;
|
assignedOp[++maxCursors] = FileOperation::calculateSHA1;
|
||||||
printf(" Calculate SHA1 hash\n");
|
printf(" Calculate SHA1 hash\n");
|
||||||
}
|
}
|
||||||
|
printf("\n(<A> select, <B> cancel)");
|
||||||
consoleSelect(&bottomConsole);
|
consoleSelect(&bottomConsole);
|
||||||
printf ("\x1B[47m"); // Print foreground white color
|
printf ("\x1B[47m"); // Print foreground white color
|
||||||
while (true) {
|
while (true) {
|
||||||
@ -307,7 +308,7 @@ FileOperation fileBrowse_A(DirEntry* entry, char path[PATH_MAX]) {
|
|||||||
// TODO Something less hacky lol
|
// TODO Something less hacky lol
|
||||||
chdir(isDSiMode()&&sdMounted ? "sd:/_nds" : "fat:/_nds");
|
chdir(isDSiMode()&&sdMounted ? "sd:/_nds" : "fat:/_nds");
|
||||||
// TODO Read header and check for homebrew flag, based on that runNdsFile nds-bootstrap(-hb)-release
|
// TODO Read header and check for homebrew flag, based on that runNdsFile nds-bootstrap(-hb)-release
|
||||||
entry->name = isDSiMode() ? "nds-bootstrap-release.nds" : "b4ds-release.nds";
|
entry->name = "nds-bootstrap-release.nds";
|
||||||
applaunch = true;
|
applaunch = true;
|
||||||
return FileOperation::bootFile;
|
return FileOperation::bootFile;
|
||||||
break;
|
break;
|
||||||
@ -386,8 +387,8 @@ FileOperation fileBrowse_A(DirEntry* entry, char path[PATH_MAX]) {
|
|||||||
u8 sha1[20] = {0};
|
u8 sha1[20] = {0};
|
||||||
bool ret = calculateSHA1(strcat(getcwd(path, PATH_MAX), entry->name.c_str()), sha1);
|
bool ret = calculateSHA1(strcat(getcwd(path, PATH_MAX), entry->name.c_str()), sha1);
|
||||||
if (!ret) break;
|
if (!ret) break;
|
||||||
iprintf("SHA1 hash is: ");
|
iprintf("SHA1 hash is: \n");
|
||||||
for (int i = 0; i < 19; ++i) iprintf("%02X", sha1[i]);
|
for (int i = 0; i < 20; ++i) iprintf("%02X", sha1[i]);
|
||||||
consoleSelect(&topConsole);
|
consoleSelect(&topConsole);
|
||||||
iprintf ("\x1B[30m"); // Print black color
|
iprintf ("\x1B[30m"); // Print black color
|
||||||
// Power saving loop. Only poll the keys once per frame and sleep the CPU if there is nothing else to do
|
// Power saving loop. Only poll the keys once per frame and sleep the CPU if there is nothing else to do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user