Round NAND size to 4MB for the default layout

This commit is contained in:
Aurora 2016-09-07 22:22:31 +02:00
parent deb91d1d02
commit ddbe5fd27b
2 changed files with 3 additions and 3 deletions

View File

@ -34,11 +34,10 @@ void locateEmuNand(u32 *emuHeader, FirmwareSource *emuNand)
for (u32 i = 0; i < 3 && !found; i++)
{
u32 nandOffset;
switch(i)
{
case 1:
nandOffset = nandSize + 1; //"Default" layout
nandOffset = ROUND_TO_4MB(nandSize + 1); //"Default" layout
break;
case 2:
nandOffset = isN3DS ? 0x26E000 : 0x1D8000; //"Minsize" layout

View File

@ -25,6 +25,7 @@
#include "types.h"
#define NCSD_MAGIC 0x4453434E
#define ROUND_TO_4MB(x) (((x) + 0x2000 - 1) & (~(0x2000 - 1)))
extern u32 emuOffset;
extern bool isN3DS;