diff --git a/makerom/accessdesc.c b/makerom/accessdesc.c
index 317f759..fcb17be 100644
--- a/makerom/accessdesc.c
+++ b/makerom/accessdesc.c
@@ -44,12 +44,12 @@ int accessdesc_SignWithKey(exheader_settings *exhdrset)
memcpy(&exhdrset->acexDesc->arm9AccessControlInfo,&exhdrset->exHdr->arm9AccessControlInfo,sizeof(exhdr_ARM9AccessControlInfo));
/* Adjust Data */
- u8 *flag = &exhdrset->acexDesc->arm11SystemLocalCapabilities.flag;
+ u8 *flag = &exhdrset->acexDesc->arm11SystemLocalCapabilities.flag[2];
u8 SystemMode = (*flag>>4)&0xF;
u8 AffinityMask = (*flag>>2)&0x3;
u8 IdealProcessor = 1<<((*flag>>0)&0x3);
*flag = (u8)(SystemMode << 4 | AffinityMask << 2 | IdealProcessor);
- exhdrset->acexDesc->arm11SystemLocalCapabilities.priority /= 2;
+ exhdrset->acexDesc->arm11SystemLocalCapabilities.flag[3] /= 2;
/* Sign AccessDesc */
return SignAccessDesc(exhdrset->acexDesc,exhdrset->keys);
diff --git a/makerom/exheader.c b/makerom/exheader.c
index 87d78f7..e159ebe 100644
--- a/makerom/exheader.c
+++ b/makerom/exheader.c
@@ -317,7 +317,34 @@ int SetARM11SystemLocalInfoFlags(exhdr_ARM11SystemLocalCapabilities *arm11, rsf_
return EXHDR_BAD_RSF_OPT;
}
- /* Flag */
+ /* Flag[0] */
+ arm11->flag[0] |= rsf->AccessControlInfo.EnableL2Cache;
+
+ if (rsf->AccessControlInfo.CpuSpeed) {
+ if(strcasecmp(rsf->AccessControlInfo.CpuSpeed, "256mhz") == 0)
+ arm11->flag[0] |= cpuspeed_268MHz << 1;
+ else if(strcasecmp(rsf->AccessControlInfo.CpuSpeed, "804mhz") == 0)
+ arm11->flag[0] |= cpuspeed_804MHz << 1;
+ else {
+ fprintf(stderr, "[EXHEADER ERROR] Invalid cpu speed: 0x%s\n", rsf->AccessControlInfo.CpuSpeed);
+ return EXHDR_BAD_RSF_OPT;
+ }
+ }
+ else
+ arm11->flag[0] |= cpuspeed_268MHz << 1;
+
+ /* Flag[1] (SystemModeExt) */
+ u8 systemModeExt = 0;
+ if (rsf->AccessControlInfo.SystemModeExt) {
+ systemModeExt = strtol(rsf->AccessControlInfo.SystemModeExt, NULL, 0);
+ if (systemModeExt > 15) {
+ fprintf(stderr, "[EXHEADER ERROR] Unexpected SystemModeExt: 0x%x. Expected range: 0x0 - 0xf\n", systemModeExt);
+ return EXHDR_BAD_RSF_OPT;
+ }
+ arm11->flag[1] = systemModeExt & 0xf;
+ }
+
+ /* Flag[2] */
u8 affinityMask = 0;
u8 idealProcessor = 0;
u8 systemMode = 0;
@@ -343,9 +370,9 @@ int SetARM11SystemLocalInfoFlags(exhdr_ARM11SystemLocalCapabilities *arm11, rsf_
return EXHDR_BAD_RSF_OPT;
}
}
- arm11->flag = (u8)(systemMode << 4 | affinityMask << 2 | idealProcessor);
+ arm11->flag[2] = (u8)(systemMode << 4 | affinityMask << 2 | idealProcessor);
- /* Thread Priority */
+ /* flag[3] (Thread Priority) */
if(rsf->AccessControlInfo.Priority){
u8 priority = strtoul(rsf->AccessControlInfo.Priority,NULL,0);
if(GetAppType(rsf) == processtype_APPLICATION)
@@ -354,7 +381,7 @@ int SetARM11SystemLocalInfoFlags(exhdr_ARM11SystemLocalCapabilities *arm11, rsf_
fprintf(stderr,"[EXHEADER ERROR] Invalid Priority: %d\n",priority);
return EXHDR_BAD_RSF_OPT;
}
- arm11->priority = priority;
+ arm11->flag[3] = priority;
}
else{
ErrorParamNotFound("AccessControlInfo/Priority");
@@ -479,8 +506,13 @@ void SetARM11StorageInfoSystemSaveDataId(exhdr_ARM11SystemLocalCapabilities *arm
void SetARM11StorageInfoExtSaveDataId(exhdr_ARM11SystemLocalCapabilities *arm11, rsf_settings *rsf)
{
- if(rsf->AccessControlInfo.ExtSaveDataId)
- u64_to_u8(arm11->storageInfo.extSavedataId, strtoull(rsf->AccessControlInfo.ExtSaveDataId,NULL,0), LE);
+ if (rsf->AccessControlInfo.UseExtSaveData || rsf->AccessControlInfo.ExtSaveDataId) {
+ if (rsf->AccessControlInfo.ExtSaveDataId)
+ u64_to_u8(arm11->storageInfo.extSavedataId, strtoull(rsf->AccessControlInfo.ExtSaveDataId, NULL, 0), LE);
+ else
+ u32_to_u8(arm11->storageInfo.extSavedataId, GetTidUniqueId(u8_to_u64(arm11->programId,LE)), LE);
+ }
+
}
void SetARM11StorageInfoOtherUserSaveData(exhdr_ARM11SystemLocalCapabilities *arm11, rsf_settings *rsf)
@@ -508,6 +540,10 @@ bool CheckCondiditionsForNewAccessibleSaveDataIds(rsf_settings *rsf)
fprintf(stderr,"[EXHEADER ERROR] Too many UniqueId in \"AccessibleSaveDataIds\".\n");
return false;
}
+ if (rsf->AccessControlInfo.UseExtSaveData) {
+ fprintf(stderr, "[EXHEADER ERROR] UseExtSaveData must be false if AccessibleSaveDataIds is specified.\n");
+ return false;
+ }
if (rsf->AccessControlInfo.ExtSaveDataId){
fprintf(stderr,"[EXHEADER ERROR] ExtSaveDataId is unavailable if AccessibleSaveDataIds is specified.\n");
return false;
@@ -561,8 +597,8 @@ void SetARM11StorageInfoAccessibleSaveDataIds(exhdr_ARM11SystemLocalCapabilities
int SetARM11ServiceAccessControl(exhdr_ARM11SystemLocalCapabilities *arm11, rsf_settings *rsf)
{
if(rsf->AccessControlInfo.ServiceAccessControl){
- if(rsf->AccessControlInfo.ServiceAccessControlNum > 32){
- fprintf(stderr,"[EXHEADER ERROR] Too Many Service Names, maximum is 32\n");
+ if(rsf->AccessControlInfo.ServiceAccessControlNum > 34){
+ fprintf(stderr,"[EXHEADER ERROR] Too Many Service Names, maximum is 34\n");
return EXHDR_BAD_RSF_OPT;
}
for(int i = 0; i < rsf->AccessControlInfo.ServiceAccessControlNum; i++){
diff --git a/makerom/exheader.h b/makerom/exheader.h
index d33639c..8e6ef3c 100644
--- a/makerom/exheader.h
+++ b/makerom/exheader.h
@@ -28,6 +28,12 @@ typedef enum
resrc_limit_OTHER
} resource_limit_category;
+typedef enum
+{
+ cpuspeed_268MHz,
+ cpuspeed_804MHz
+};
+
typedef enum
{
othcap_PERMIT_DEBUG = (1 << 0),
@@ -127,13 +133,11 @@ typedef struct
{
u8 programId[8];
u8 coreVersion[4];
- u8 padding0[2];
- u8 flag;
- u8 priority;
+ u8 flag[4];
u8 resourceLimitDescriptor[16][2];
exhdr_StorageInfo storageInfo;
- u8 serviceAccessControl[32][8]; // Those char[8] server names
- u8 padding1[0x1f];
+ u8 serviceAccessControl[34][8]; // Those char[8] server names
+ u8 padding1[0xf];
u8 resourceLimitCategory;
} exhdr_ARM11SystemLocalCapabilities;
diff --git a/makerom/makerom.vcxproj b/makerom/makerom.vcxproj
new file mode 100644
index 0000000..aa4d41d
--- /dev/null
+++ b/makerom/makerom.vcxproj
@@ -0,0 +1,272 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ {21926330-F5A5-4643-AD32-D4F167CE226B}
+ MakeFileProj
+
+
+
+ Makefile
+ true
+ v140
+
+
+ Makefile
+ false
+ v140
+
+
+ Application
+ true
+ v140
+
+
+ Application
+ false
+ v140
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ make
+ makerom.exe
+ make clean
+ make rebuild
+ WIN32;_DEBUG;$(NMakePreprocessorDefinitions)
+
+
+ make
+ makerom.exe
+ make clean
+ make rebuild
+ WIN32;NDEBUG;$(NMakePreprocessorDefinitions)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/makerom/makerom.vcxproj.filters b/makerom/makerom.vcxproj.filters
new file mode 100644
index 0000000..0f4ba0b
--- /dev/null
+++ b/makerom/makerom.vcxproj.filters
@@ -0,0 +1,584 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+ {bab0486d-d6e9-48e4-b4a5-ab1c9a917a15}
+
+
+ {e3b6ff03-546a-4f9c-8246-ee2a5a6b5c20}
+
+
+ {2bf08da5-c0b2-4b6f-a07a-0f3a03b79f14}
+
+
+ {7545c89e-a9ce-4c04-989e-ae726a518efd}
+
+
+ {49964d4d-b429-41e6-a85f-e4d361de0faf}
+
+
+ {a0455bf4-2a1e-4ced-9d42-88d7ce131c22}
+
+
+
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\polarssl
+
+
+ Header Files\libyaml
+
+
+ Header Files\libyaml
+
+
+ Resource Files\PKI
+
+
+ Resource Files\PKI
+
+
+ Resource Files\PKI
+
+
+ Resource Files\PKI
+
+
+ Resource Files\PKI
+
+
+ Resource Files\DESC
+
+
+ Resource Files\DESC
+
+
+ Resource Files\DESC
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files\libyaml
+
+
+ Source Files\libyaml
+
+
+ Source Files\libyaml
+
+
+ Source Files\libyaml
+
+
+ Source Files\libyaml
+
+
+ Source Files\libyaml
+
+
+ Source Files\libyaml
+
+
+ Source Files\libyaml
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+ Source Files\polarssl
+
+
+
+
+ Resource Files
+
+
+
\ No newline at end of file
diff --git a/makerom/ncch.c b/makerom/ncch.c
index 8f15f91..438940b 100644
--- a/makerom/ncch.c
+++ b/makerom/ncch.c
@@ -626,28 +626,48 @@ int SetCommonHeaderBasicData(ncch_settings *set, ncch_hdr *hdr)
hdr->flags[ncchflag_CONTENT_BLOCK_SIZE] = GetCtrBlockSizeFlag(set->options.blockSize);
/* Setting ContentPlatform */
- hdr->flags[ncchflag_CONTENT_PLATFORM] = 1; // CTR
+ if(set->rsfSet->TitleInfo.Platform){
+ if(strcasecmp(set->rsfSet->TitleInfo.Platform, "ctr") == 0)
+ hdr->flags[ncchflag_CONTENT_PLATFORM] = platform_CTR;
+ else if (strcasecmp(set->rsfSet->TitleInfo.Platform, "snake") == 0)
+ hdr->flags[ncchflag_CONTENT_PLATFORM] = platform_SNAKE;
+ else{
+ fprintf(stderr, "[NCCH ERROR] Invalid Platform '%s'\n", set->rsfSet->TitleInfo.Platform);
+ return NCCH_BAD_RSF_SET;
+ }
+ }
+ else
+ hdr->flags[ncchflag_CONTENT_PLATFORM] = platform_CTR;
/* Setting OtherFlag */
if(!set->options.UseRomFS)
hdr->flags[ncchflag_OTHER_FLAG] |= otherflag_NoMountRomFs;
+ /* Setting FormType */
+ hdr->flags[ncchflag_CONTENT_TYPE] = form_Unassigned;
+ if(set->options.IsCfa)
+ hdr->flags[ncchflag_CONTENT_TYPE] = form_SimpleContent;
+ else if (set->options.UseRomFS)
+ hdr->flags[ncchflag_CONTENT_TYPE] = form_Executable;
+ else
+ hdr->flags[ncchflag_CONTENT_TYPE] = form_ExecutableWithoutRomfs;
+
/* Setting ContentType */
- hdr->flags[ncchflag_CONTENT_TYPE] = 0;
- if(set->options.UseRomFS) hdr->flags[ncchflag_CONTENT_TYPE] |= content_Data;
- if(!set->options.IsCfa) hdr->flags[ncchflag_CONTENT_TYPE] |= content_Executable;
if(set->rsfSet->BasicInfo.ContentType){
- if(strcmp(set->rsfSet->BasicInfo.ContentType,"Application") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= 0;
- else if(strcmp(set->rsfSet->BasicInfo.ContentType,"SystemUpdate") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= content_SystemUpdate;
- else if(strcmp(set->rsfSet->BasicInfo.ContentType,"Manual") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= content_Manual;
- else if(strcmp(set->rsfSet->BasicInfo.ContentType,"Child") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= content_Child;
- else if(strcmp(set->rsfSet->BasicInfo.ContentType,"Trial") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= content_Trial;
+ if(strcmp(set->rsfSet->BasicInfo.ContentType,"Application") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= (content_Application << 2);
+ else if(strcmp(set->rsfSet->BasicInfo.ContentType,"SystemUpdate") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= (content_SystemUpdate << 2);
+ else if(strcmp(set->rsfSet->BasicInfo.ContentType,"Manual") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= (content_Manual << 2);
+ else if(strcmp(set->rsfSet->BasicInfo.ContentType,"Child") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= (content_Child << 2);
+ else if(strcmp(set->rsfSet->BasicInfo.ContentType,"Trial") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= (content_Trial << 2);
+ else if (strcmp(set->rsfSet->BasicInfo.ContentType, "ExtendedSystemUpdate") == 0) hdr->flags[ncchflag_CONTENT_TYPE] |= (content_ExtendedSystemUpdate << 2);
else{
fprintf(stderr,"[NCCH ERROR] Invalid ContentType '%s'\n",set->rsfSet->BasicInfo.ContentType);
return NCCH_BAD_RSF_SET;
}
}
+ else
+ hdr->flags[ncchflag_CONTENT_TYPE] |= (content_Application << 2);
return 0;
}
@@ -663,7 +683,7 @@ bool IsValidProductCode(char *ProductCode, bool FreeProductCode)
if(strlen(ProductCode) < 10)
return false;
- if(strncmp(ProductCode,"CTR",3) != 0)
+ if(strncmp(ProductCode,"CTR",3) != 0 && strncmp(ProductCode, "KTR", 3) != 0)
return false;
for(int i = 3; i < 10; i++){
@@ -946,12 +966,12 @@ bool IsNcch(FILE *fp, u8 *buf)
bool IsCfa(ncch_hdr* hdr)
{
- return (((hdr->flags[ncchflag_CONTENT_TYPE] & content_Data) == content_Data) && ((hdr->flags[ncchflag_CONTENT_TYPE] & content_Executable) != content_Executable));
+ return (hdr->flags[ncchflag_CONTENT_TYPE] & 3) == form_SimpleContent;
}
bool IsUpdateCfa(ncch_hdr* hdr)
{
- return (((hdr->flags[ncchflag_CONTENT_TYPE] & content_SystemUpdate) == content_SystemUpdate) && ((hdr->flags[ncchflag_CONTENT_TYPE] & content_Child) != content_Child) && IsCfa(hdr));
+ return (hdr->flags[ncchflag_CONTENT_TYPE] >> 2) == content_SystemUpdate || (hdr->flags[ncchflag_CONTENT_TYPE] >> 2) == content_ExtendedSystemUpdate;
}
u32 GetNcchBlockSize(ncch_hdr* hdr)
diff --git a/makerom/ncch.h b/makerom/ncch.h
index f291883..baf220f 100644
--- a/makerom/ncch.h
+++ b/makerom/ncch.h
@@ -50,14 +50,28 @@ typedef enum
typedef enum
{
- content_Data = 0x1,
- content_Executable = 0x2,
- content_SystemUpdate = 0x4,
- content_Manual = 0x8,
- content_Child = (0x4|0x8),
- content_Trial = 0x10
+ form_Unassigned,
+ form_SimpleContent,
+ form_ExecutableWithoutRomfs,
+ form_Executable
+};
+
+typedef enum
+{
+ content_Application,
+ content_SystemUpdate,
+ content_Manual,
+ content_Child,
+ content_Trial,
+ content_ExtendedSystemUpdate
} ncch_content_bitmask;
+typedef enum
+{
+ platform_CTR = 0x1,
+ platform_SNAKE = 0x2
+} ncch_platform;
+
typedef struct
{
u16 formatVersion;
diff --git a/makerom/readme.txt b/makerom/readme.txt
new file mode 100644
index 0000000..8b7b09e
--- /dev/null
+++ b/makerom/readme.txt
@@ -0,0 +1,29 @@
+========================================================================
+ MAKEFILE PROJECT : makerom Project Overview
+========================================================================
+
+AppWizard has created this makerom project for you.
+
+This file contains a summary of what you will find in each of the files that
+make up your makerom project.
+
+
+makerom.vcxproj
+ This is the main project file for VC++ projects generated using an Application Wizard.
+ It contains information about the version of Visual C++ that generated the file, and
+ information about the platforms, configurations, and project features selected with the
+ Application Wizard.
+
+makerom.vcxproj.filters
+ This is the filters file for VC++ projects generated using an Application Wizard.
+ It contains information about the association between the files in your project
+ and the filters. This association is used in the IDE to show grouping of files with
+ similar extensions under a specific node (for e.g. ".cpp" files are associated with the
+ "Source Files" filter).
+
+This project allows you to build/clean/rebuild from within Visual Studio by calling the commands you have input
+in the wizard. The build command can be nmake or any other tool you use.
+
+This project does not contain any files, so there are none displayed in Solution Explorer.
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/makerom/rsf_settings.c b/makerom/rsf_settings.c
index 47696b4..8240b45 100644
--- a/makerom/rsf_settings.c
+++ b/makerom/rsf_settings.c
@@ -102,12 +102,16 @@ void GET_AccessControlInfo(ctr_yaml_context *ctx, rsf_settings *rsf)
else if(cmpYamlValue("UseOtherVariationSaveData",ctx)) SetBoolYAMLValue(&rsf->AccessControlInfo.UseOtherVariationSaveData,"UseOtherVariationSaveData",ctx);
else if(cmpYamlValue("RunnableOnSleep",ctx)) SetBoolYAMLValue(&rsf->AccessControlInfo.RunnableOnSleep,"RunnableOnSleep",ctx);
else if(cmpYamlValue("SpecialMemoryArrange",ctx)) SetBoolYAMLValue(&rsf->AccessControlInfo.SpecialMemoryArrange,"SpecialMemoryArrange",ctx);
-
+ else if(cmpYamlValue("UseExtSaveData", ctx)) SetBoolYAMLValue(&rsf->AccessControlInfo.UseExtSaveData, "UseExtSaveData", ctx);
+ else if(cmpYamlValue("EnableL2Cache", ctx)) SetBoolYAMLValue(&rsf->AccessControlInfo.EnableL2Cache, "EnableL2Cache", ctx);
+
else if(cmpYamlValue("IdealProcessor",ctx)) SetSimpleYAMLValue(&rsf->AccessControlInfo.IdealProcessor,"IdealProcessor",ctx,0);
else if(cmpYamlValue("Priority",ctx)) SetSimpleYAMLValue(&rsf->AccessControlInfo.Priority,"Priority",ctx,0);
else if(cmpYamlValue("MemoryType",ctx)) SetSimpleYAMLValue(&rsf->AccessControlInfo.MemoryType,"MemoryType",ctx,0);
else if(cmpYamlValue("SystemMode",ctx)) SetSimpleYAMLValue(&rsf->AccessControlInfo.SystemMode,"SystemMode",ctx,0);
+ else if(cmpYamlValue("SystemModeExt", ctx)) SetSimpleYAMLValue(&rsf->AccessControlInfo.SystemModeExt, "SystemModeExt", ctx, 0);
+ else if(cmpYamlValue("CpuSpeed", ctx)) SetSimpleYAMLValue(&rsf->AccessControlInfo.CpuSpeed, "CpuSpeed", ctx, 0);
else if(cmpYamlValue("CoreVersion",ctx)) SetSimpleYAMLValue(&rsf->AccessControlInfo.CoreVersion,"CoreVersion",ctx,0);
else if(cmpYamlValue("HandleTableSize",ctx)) SetSimpleYAMLValue(&rsf->AccessControlInfo.HandleTableSize,"HandleTableSize",ctx,0);
else if(cmpYamlValue("SystemSaveDataId1",ctx)) SetSimpleYAMLValue(&rsf->AccessControlInfo.SystemSaveDataId1,"SystemSaveDataId1",ctx,0);
@@ -279,7 +283,8 @@ void GET_TitleInfo(ctr_yaml_context *ctx, rsf_settings *rsf)
if(ctx->error || ctx->done) return;
// Handle childs
- if(cmpYamlValue("Category",ctx)) SetSimpleYAMLValue(&rsf->TitleInfo.Category,"Category",ctx,0);
+ if (cmpYamlValue("Platform", ctx)) SetSimpleYAMLValue(&rsf->TitleInfo.Platform, "Platform", ctx, 0);
+ else if(cmpYamlValue("Category",ctx)) SetSimpleYAMLValue(&rsf->TitleInfo.Category,"Category",ctx,0);
else if(cmpYamlValue("UniqueId",ctx)) SetSimpleYAMLValue(&rsf->TitleInfo.UniqueId,"UniqueId",ctx,0);
else if(cmpYamlValue("Version",ctx)) SetSimpleYAMLValue(&rsf->TitleInfo.Version,"Version",ctx,0);
else if(cmpYamlValue("ContentsIndex",ctx)) SetSimpleYAMLValue(&rsf->TitleInfo.ContentsIndex,"ContentsIndex",ctx,0);
@@ -382,6 +387,8 @@ void free_RsfSettings(rsf_settings *set)
free(set->AccessControlInfo.Priority);
free(set->AccessControlInfo.MemoryType);
free(set->AccessControlInfo.SystemMode);
+ free(set->AccessControlInfo.SystemModeExt);
+ free(set->AccessControlInfo.CpuSpeed);
free(set->AccessControlInfo.CoreVersion);
free(set->AccessControlInfo.HandleTableSize);
free(set->AccessControlInfo.SystemSaveDataId1);
@@ -502,6 +509,7 @@ void free_RsfSettings(rsf_settings *set)
free(set->PlainRegion);
//TitleInfo
+ free(set->TitleInfo.Platform);
free(set->TitleInfo.Category);
free(set->TitleInfo.UniqueId);
free(set->TitleInfo.Version);
diff --git a/makerom/user_settings.h b/makerom/user_settings.h
index 561429a..299f5ef 100644
--- a/makerom/user_settings.h
+++ b/makerom/user_settings.h
@@ -86,12 +86,16 @@ typedef struct
bool UseOtherVariationSaveData;
bool RunnableOnSleep;
bool SpecialMemoryArrange;
-
+ bool UseExtSaveData;
+ bool EnableL2Cache;
+
// Strings
char *IdealProcessor;
char *Priority;
char *MemoryType;
char *SystemMode;
+ char *SystemModeExt;
+ char *CpuSpeed;
char *CoreVersion;
char *HandleTableSize;
char *SystemSaveDataId1;
@@ -178,6 +182,7 @@ typedef struct
struct{
// Strings
+ char *Platform;
char *Category;
char *UniqueId;
char *Version;