Round NAND size to 4MB for the default layout
This commit is contained in:
parent
deb91d1d02
commit
ddbe5fd27b
@ -34,11 +34,10 @@ void locateEmuNand(u32 *emuHeader, FirmwareSource *emuNand)
|
|||||||
for (u32 i = 0; i < 3 && !found; i++)
|
for (u32 i = 0; i < 3 && !found; i++)
|
||||||
{
|
{
|
||||||
u32 nandOffset;
|
u32 nandOffset;
|
||||||
|
|
||||||
switch(i)
|
switch(i)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
nandOffset = nandSize + 1; //"Default" layout
|
nandOffset = ROUND_TO_4MB(nandSize + 1); //"Default" layout
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
nandOffset = isN3DS ? 0x26E000 : 0x1D8000; //"Minsize" layout
|
nandOffset = isN3DS ? 0x26E000 : 0x1D8000; //"Minsize" layout
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
#define NCSD_MAGIC 0x4453434E
|
#define NCSD_MAGIC 0x4453434E
|
||||||
|
#define ROUND_TO_4MB(x) (((x) + 0x2000 - 1) & (~(0x2000 - 1)))
|
||||||
|
|
||||||
extern u32 emuOffset;
|
extern u32 emuOffset;
|
||||||
extern bool isN3DS;
|
extern bool isN3DS;
|
||||||
|
Reference in New Issue
Block a user