Miscelaneous cosmetics

This commit is contained in:
d0k3 2016-07-13 20:58:14 +02:00
parent a7b511687b
commit 6be34ee104
6 changed files with 9 additions and 8 deletions

View File

@ -21,7 +21,7 @@ _start:
@ Sets MPU permissions and cache settings
ldr r0, =0xFFFF001D @ ffff0000 32k | bootrom (unprotected part)
ldr r1, =0x3000801B @ fff00000 16k | dtcm
ldr r1, =0x3000801B @ 30000000 16k | dtcm
ldr r2, =0x01FF801D @ 01ff8000 32k | itcm
ldr r3, =0x08000029 @ 08000000 2M | arm9 mem (O3DS / N3DS)
ldr r4, =0x10000029 @ 10000000 2M | io mem (ARM9 / first 2MB)

View File

@ -51,7 +51,7 @@ _start:
@ Sets MPU permissions and cache settings
ldr r0, =0xFFFF001D @ ffff0000 32k | bootrom (unprotected part)
ldr r1, =0x3000801B @ fff00000 16k | dtcm
ldr r1, =0x3000801B @ 30000000 16k | dtcm
ldr r2, =0x01FF801D @ 01ff8000 32k | itcm
ldr r3, =0x08000029 @ 08000000 2M | arm9 mem (O3DS / N3DS)
ldr r4, =0x10000029 @ 10000000 2M | io mem (ARM9 / first 2MB)

View File

@ -134,10 +134,10 @@ bool FormatSDCard(u32 hidden_mb) {
// format the SD card
// cluster size: auto (<= 4GB) / 32KiB (<= 8GB) / 64 KiB (> 8GB)
InitSDCardFS();
f_mount(fs, "0:", 1);
UINT c_size = (sd_size < 0x800000) ? 0 : (sd_size < 0x1000000) ? 32768 : 65536;
bool ret = (f_mkfs("0:", 0, c_size) == FR_OK) && (f_setlabel("0:GM9SD") == FR_OK);
DeinitSDCardFS();
f_mount(NULL, "0:", 1);
return ret;
}

View File

@ -167,7 +167,7 @@ void DrawDirContents(DirStruct* contents, u32 cursor, u32* scroll) {
}
u32 SdFormatMenu(void) {
const u32 emunand_size_table[6] = { 0x0, 0x0, 0x3AF, 0x4D8, 0x400, 0x800 };
const u32 emunand_size_table[6] = { 0x0, 0x0, 0x3AF, 0x4D8, 0x3FF, 0x7FF };
const char* optionstr[6] = { "No EmuNAND", "O3DS NAND size", "N3DS NAND size", "1GB (legacy size)", "2GB (legacy size)", "User input..." };
u64 sdcard_size_mb = 0;
u64 emunand_size_mb = (u64) -1;
@ -179,7 +179,7 @@ u32 SdFormatMenu(void) {
return 1;
}
u32 user_select = ShowSelectPrompt(6, optionstr, "Format SD card (%lluGB)?\nChoose EmuNAND size:", sdcard_size_mb / 1024);
u32 user_select = ShowSelectPrompt(6, optionstr, "Format SD card (%lluMB)?\nChoose EmuNAND size:", sdcard_size_mb);
if (user_select && (user_select < 6)) {
emunand_size_mb = emunand_size_table[user_select];
} else if (user_select == 6) do {
@ -623,6 +623,7 @@ u32 GodMode() {
u32 pad_choice = InputWait();
if ((pad_choice & (BUTTON_R1|BUTTON_Y|BUTTON_LEFT)) == (BUTTON_R1|BUTTON_Y|BUTTON_LEFT))
SdFormatMenu();
else if ((pad_choice & BUTTON_B) && InitSDCardFS()) break;
else if (pad_choice & (BUTTON_B|BUTTON_START)) return exit_mode;
else if (!(pad_choice & BUTTON_A)) continue;
if (InitSDCardFS()) break;

View File

@ -10,7 +10,7 @@
#define NAND_BUFFER_SIZE (0x100000) // must be multiple of 0x200
#define NAND_MIN_SECTORS ((GetUnitPlatform() == PLATFORM_N3DS) ? 0x26C000 : 0x1D7800)
static u8 slot0x05KeyY[0x10] = { 0x00 }; // need to load this up from FIRM0 / external file
static u8 slot0x05KeyY[0x10] = { 0x00 }; // need to load this from FIRM0 / external file
static u8 slot0x05KeyY_sha256[0x20] = { // hash for slot0x05KeyY (16 byte)
0x98, 0x24, 0x27, 0x14, 0x22, 0xB0, 0x6B, 0xF2, 0x10, 0x96, 0x9C, 0x36, 0x42, 0x53, 0x7C, 0x86,
0x62, 0x22, 0x5C, 0xFD, 0x6F, 0xAE, 0x9B, 0x0A, 0x85, 0xA5, 0xCE, 0x21, 0xAA, 0xB6, 0xC8, 0x4D

View File

@ -109,7 +109,7 @@ bool FindVirtualFile(VirtualFile* vfile, const char* path, u32 size)
return false; // this is not on O3DS consoles
if (vfile->flags & VFLAG_NAND_SIZE) {
if ((virtual_src != NAND_SYSNAND) && (GetNandSizeSectors(NAND_SYSNAND) != GetNandSizeSectors(virtual_src)))
return false; // EmuNAND/IMGNAND is too small
return false; // EmuNAND/ImgNAND is too small
vfile->size = GetNandSizeSectors(NAND_SYSNAND) * 0x200;
}
vfile->flags |= virtual_src;