diff --git a/source/nand/virtual.c b/source/nand/virtual.c index 14e9f56..8dbce1e 100644 --- a/source/nand/virtual.c +++ b/source/nand/virtual.c @@ -7,6 +7,7 @@ #define VFLAG_ON_NO3DS NAND_TYPE_NO3DS #define VFLAG_ON_NAND (VFLAG_ON_O3DS | VFLAG_ON_N3DS | VFLAG_ON_NO3DS) #define VFLAG_ON_MEMORY VRT_MEMORY +#define VFLAG_N3DS_ONLY (1<<30) #define VFLAG_NAND_SIZE (1<<31) // see: http://3dbrew.org/wiki/Flash_Filesystem#NAND_structure @@ -29,12 +30,15 @@ VirtualFile virtualFileTemplates[] = { { "sector0x96.bin" , 0x00012C00, 0x00000200, 0xFF, VFLAG_ON_NAND }, { "nand_hdr.bin" , 0x00000000, 0x00000200, 0xFF, VFLAG_ON_NAND }, { "itcm.mem" , 0x01FF8000, 0x00008000, 0xFF, VFLAG_ON_MEMORY }, - { "arm9internal.mem" , 0x08000000, 0x00100000, 0xFF, VFLAG_ON_MEMORY }, + { "arm9.mem" , 0x08000000, 0x00100000, 0xFF, VFLAG_ON_MEMORY }, + { "arm9ext.mem" , 0x08010000, 0x00100000, 0xFF, VFLAG_ON_MEMORY | VFLAG_N3DS_ONLY }, { "vram.mem" , 0x18000000, 0x00600000, 0xFF, VFLAG_ON_MEMORY }, { "dsp.mem" , 0x1FF00000, 0x00080000, 0xFF, VFLAG_ON_MEMORY }, { "axiwram.mem" , 0x1FF80000, 0x00080000, 0xFF, VFLAG_ON_MEMORY }, { "fcram.mem" , 0x20000000, 0x08000000, 0xFF, VFLAG_ON_MEMORY }, + { "fcramext.mem" , 0x28000000, 0x08000000, 0xFF, VFLAG_ON_MEMORY | VFLAG_N3DS_ONLY }, { "dtcm.mem" , 0x30008000, 0x00004000, 0xFF, VFLAG_ON_MEMORY }, + // { "bootrom.mem" , 0xFFFF0000, 0x00010000, 0xFF, VFLAG_ON_MEMORY }, { "bootrom_unp.mem" , 0xFFFF0000, 0x00008000, 0xFF, VFLAG_ON_MEMORY } }; @@ -95,6 +99,8 @@ bool FindVirtualFile(VirtualFile* vfile, const char* path, u32 size) // process special flags if ((vfile->keyslot == 0x05) && !CheckSlot0x05Crypto()) return false; // keyslot 0x05 not properly set up + if ((vfile->flags & VFLAG_N3DS_ONLY) && (GetUnitPlatform() != PLATFORM_N3DS)) + 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 diff --git a/source/nand/virtual.h b/source/nand/virtual.h index 9ef95f0..bff357a 100644 --- a/source/nand/virtual.h +++ b/source/nand/virtual.h @@ -8,11 +8,13 @@ #define VRT_IMGNAND NAND_IMGNAND #define VRT_MEMORY (1<<10) +#define VFLAG_EXT_A9LH_AREA (1<<20) + static const char* virtualFileList[] = { // must have a match in virtualFileTemplates[] "twln.bin", "twlp.bin", "agbsave.bin", "firm0.bin", "firm1.bin", "ctrnand_fat.bin", "ctrnand_full.bin", "nand.bin", "nand_minsize.bin", "nand_hdr.bin", "sector0x96.bin", - "itcm.mem", "arm9internal.mem", "vram.mem", "dsp.mem", "axiwram.mem", "fcram.mem", - "dtcm.mem", "bootrom_unp.mem" + "itcm.mem", "arm9.mem", "arm9ext.mem", "vram.mem", "dsp.mem", "axiwram.mem", + "fcram.mem", "fcramext.mem", "dtcm.mem", "bootrom_unp.mem" }; static const u32 virtualFileList_size = sizeof(virtualFileList) / sizeof(char*);