diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb index 75d139b..c784200 100644 Binary files a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb and b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb differ diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.suo b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.suo index 4f19fab..9521d1d 100644 Binary files a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.suo and b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.suo differ diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm index 2251c40..58ea016 100644 Binary files a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm and b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm differ diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_srl.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_srl.cpp index 07f94c8..762bc7f 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_srl.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_srl.cpp @@ -83,7 +83,7 @@ void Form1::setSrlForms(void) this->tboxIsCodec->Text = gcnew System::String( "DS" ); } this->cboxIsSD->Checked = this->hSrl->IsSD; - if( this->hSrl->IsSD && this->hSrl->IsSDK52Release ) + if( this->hSrl->IsSD && !this->hSrl->IsOldSDK52Release ) { System::String ^sdright = ""; if( this->hSrl->IsSDRead && this->hSrl->IsSDWrite ) diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/common.h b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/common.h index 291cfa0..c647c83 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/common.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/common.h @@ -23,6 +23,7 @@ #define METWL_SEG3_CRC 0x0254 #define METWL_TAD_TMP_FILENAME "tmp.srl" // TAD読み込みの際に split_tad で一時的に作成するファイル名 #define METWL_SDK52_RELEASE ((5 << 24)|(2 << 16)|30000) // SDアクセス権の判定が必要なSDKバージョン (5.2 RELEASE) +#define METWL_SDK51_PR ((5 << 24)|(1 << 16)|10000) // クローンブート対応をしたSDKバージョン (5.1 PR) // 特別にGUI表示/提出確認書に記述する文字列 #define METWL_STRING_UNNECESSARY_RATING_J ("レーティング表示不要(全年齢)") diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/deliverable.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/deliverable.cpp index 394b3cd..506a6a4 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/deliverable.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/deliverable.cpp @@ -159,7 +159,7 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet( if( hSrl->IsNormalJump ) { if( english ) - capEx += " [The normal jump is set.]"; + capEx += " [The normal jump is comfigured.]"; else capEx += " [ノーマルジャンプが設定されています.]"; } @@ -447,7 +447,7 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet( } if( node->FirstChild->Value->Equals( "TagSDAccessRight" ) ) { - if( hSrl->IsSD && hSrl->IsSDK52Release ) + if( hSrl->IsSD && !hSrl->IsOldSDK52Release ) { if( hSrl->IsSDRead && hSrl->IsSDWrite ) node->FirstChild->Value = gcnew System::String("Read/Write"); diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp index 77fc58f..89ae0da 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp @@ -301,6 +301,10 @@ ECSrlResult RCSrl::setRomInfo(void) this->IsSDWrite = (this->pRomHeader->s.access_control.sdmc_access_write != 0)?true:false; this->IsSDRead = (this->pRomHeader->s.access_control.sdmc_access_read != 0)?true:false; + // 中韓設定フラグ + this->IsForChina = (this->pRomHeader->s.for_china != 0)?true:false; + this->IsForKorea = (this->pRomHeader->s.for_korea != 0)?true:false; + // 5.2 RELEASE以降のときSDアクセス権を調べる必要あり u32 sdkver = 0; for each ( RCSDKVersion ^sdk in this->hSDKList ) @@ -310,7 +314,8 @@ ECSrlResult RCSrl::setRomInfo(void) sdkver = sdk->Code; } } - this->IsSDK52Release = !MasterEditorTWL::IsOldSDKVersion(sdkver, METWL_SDK52_RELEASE, true); // PR/RC版でもエラーを出す + this->IsOldSDK52Release = MasterEditorTWL::IsOldSDKVersion(sdkver, METWL_SDK52_RELEASE, true); // PR/RC版でもエラーを出す + this->IsOldSDK51PR = MasterEditorTWL::IsOldSDKVersion(sdkver, METWL_SDK51_PR, true); // SCFG がロックされるか if( (this->pRomHeader->s.arm7_scfg_ext >> 31) != 0 ) diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h index 9886e62..2787cc2 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h @@ -95,7 +95,8 @@ namespace MasterEditorTWL property System::Boolean IsPhotoRead; property System::Boolean IsSDWrite; // SDカードアクセス権 : フラグとは別に用意された(5.2 RELEASE) property System::Boolean IsSDRead; - property System::Boolean IsSDK52Release; // SDアクセス権を調べる必要があるか : 5.2 RELEASE 以降のとき調べる必要あり + property System::Boolean IsOldSDK52Release; // SDアクセス権を調べる必要があるか : 5.2 RELEASE 以降のとき調べる必要あり + property System::Boolean IsOldSDK51PR; // HYBRID-NANDアプリを禁止する必要があるか : 5.1 PR 以前のとき調べる必要あり // Shared2ファイルサイズ Read Only property cli::array ^hShared2SizeArray; @@ -108,6 +109,10 @@ namespace MasterEditorTWL property System::Boolean IsRegionKorea; property System::Boolean IsRegionChina; + // 中韓設定フラグ Read Only + property System::Boolean IsForChina; + property System::Boolean IsForKorea; + // SDKバージョンと使用ライブラリのリスト property System::Collections::Generic::List ^hSDKList; property System::Collections::Generic::List ^hLicenseList; @@ -181,6 +186,7 @@ namespace MasterEditorTWL void mrcReservedArea( FILE *fp ); void mrcShared2( FILE *fp ); void mrcSDKVersion( FILE *fp ); + void mrcChinaKorea(void); // MRCメッセージを追加 RCMrcError^ makeMrcError( System::String ^tag, ... cli::array ^args ); diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp index 5db09c2..eaaefa5 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp @@ -245,6 +245,15 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) } } + // SDK5.1PRよりも前のバージョンではクローンブート非対応なのでNAND-HYBRIDを禁止する + if( this->IsMediaNand ) + { + if( this->IsOldSDK51PR && (this->pRomHeader->s.platform_code == PLATFORM_CODE_TWL_HYBLID) ) + { + this->hWarnList->Add( this->makeMrcError("NandHybridBefore51PR") ); + } + } + // 旧開発用暗号フラグとクローンブートの組み合わせはマスタリングで矛盾が生じる if( this->IsOldDevEncrypt && this->HasDSDLPlaySign ) { @@ -344,13 +353,13 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) { this->hErrorList->Add( this->makeMrcError("ExtraRegion") ); } - if( this->IsAppUser ) + if( !this->IsMediaNand && this->IsNormalJump ) { - if( (this->pRomHeader->s.permit_landing_normal_jump != 0) && - !this->hMrcExternalCheckItems->IsPermitNormalJump ) // 設定ファイルでアクセス許可されていないときにチェック - { - this->hErrorList->Add( this->makeMrcError("NormalJump") ); - } + this->hErrorList->Add( this->makeMrcError("NormalJumpCard") ); + } + if( this->IsNormalJump && this->IsTmpJump ) + { + this->hErrorList->Add( this->makeMrcError("NormalJumpAndTmpJump") ); } } @@ -450,6 +459,9 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) } } + // 中韓版チェック + this->mrcChinaKorea(); + // 追加チェック this->mrcSDKVersion(fp); @@ -549,7 +561,7 @@ void RCSrl::mrcAccessControl(FILE *fp) this->hErrorList->Add( this->makeMrcError("CardAccess") ); } - if( !this->IsAppUser ) + if( this->IsAppUser ) { if( this->pRomHeader->s.access_control.common_client_key != 0 ) { @@ -647,7 +659,15 @@ void RCSrl::mrcAccessControl(FILE *fp) else { // 5.2 RELEASEかどうかで判定がかわる - if( this->IsSDK52Release ) + if( this->IsOldSDK52Release ) + { + // 5.2 RELEASE以前は原則SDアクセス禁止 + if( this->pRomHeader->s.access_control.sd_card_access != 0 ) + { + this->hErrorList->Add( this->makeMrcError("SDAccessUser") ); + } + } + else { // 5.2 RELEASE以降はアクセス権さえ設定されていればエラーを出さない if( (this->pRomHeader->s.access_control.sd_card_access != 0) && // SDカードアクセスが有効になっているのに @@ -657,14 +677,6 @@ void RCSrl::mrcAccessControl(FILE *fp) this->hErrorList->Add( this->makeMrcError("SDAccessPriv") ); } } - else - { - // 5.2 RELEASE以前は原則SDアクセス禁止 - if( this->pRomHeader->s.access_control.sd_card_access != 0 ) - { - this->hErrorList->Add( this->makeMrcError("SDAccessUser") ); - } - } } if( !this->IsMediaNand ) @@ -728,7 +740,7 @@ void RCSrl::mrcAccessControl(FILE *fp) { this->hErrorList->Add( this->makeMrcError("AccessDefault") ); } - } + } //else } //RCSrl::mrcAccessControl() // ------------------------------------------------------------------- @@ -1058,3 +1070,74 @@ void RCSrl::mrcBanner(FILE *fp) } delete []banner; } //RCSrl::mrcBanner() + +// ------------------------------------------------------------------- +// 中韓版のチェック +// ------------------------------------------------------------------- +void RCSrl::mrcChinaKorea(void) +{ + // オールリージョンはチェック不要 + if( this->IsRegionJapan && this->IsRegionAmerica && this->IsRegionEurope && this->IsRegionAustralia && + this->IsRegionChina && this->IsRegionKorea ) + { + return; + } + + // ユーザアプリのときの中国版のチェック + if( this->IsAppUser ) + { + // OS_InitChina が使用されているかを調べる + bool use = false; + for each(RCLicense ^lic in this->hLicenseList) + { + if( (lic->Publisher == "NINTENDO") && (lic->Name == "FORCHINA") ) + { + use = true; + } + } + + // 「中国リージョン」&&「for_chinaがTRUE」と「OS_InitChina使用」のすべてが成り立っているときのみ中国版として認める + if( this->IsRegionChina && !this->IsForChina ) + { + this->hErrorList->Add( this->makeMrcError("ChinaFlagNegated") ); + } + if( !this->IsRegionChina && this->IsForChina ) + { + this->hErrorList->Add( this->makeMrcError("ChinaFlagAsserted") ); + } + if( this->IsRegionChina && !use ) + { + this->hErrorList->Add( this->makeMrcError("OSInitChinaUnused") ); + } + if( !this->IsRegionChina && use ) + { + this->hErrorList->Add( this->makeMrcError("OSInitChinaUsed") ); + } + } + else // システムアプリのとき + { + // 「中国リージョン」「for_chinaがTRUE」が成り立っているときのみ中国版として認める + // OS_InitChina の使用は必須ではない + if( this->IsRegionChina && !this->IsForChina ) + { + this->hErrorList->Add( this->makeMrcError("ChinaFlagNegated") ); + } + if( !this->IsRegionChina && this->IsForChina ) + { + this->hErrorList->Add( this->makeMrcError("ChinaFlagAsserted") ); + } + } + + // 韓国版のチェック + { + // 「韓国リージョン」「for_koreaがTRUE」が成り立っているときのみ韓国版として認める + if( this->IsRegionKorea && !this->IsForKorea ) + { + this->hErrorList->Add( this->makeMrcError("KoreaFlagNegated") ); + } + if( !this->IsRegionKorea && this->IsForKorea ) + { + this->hErrorList->Add( this->makeMrcError("KoreaFlagAsserted") ); + } + } +} \ No newline at end of file diff --git a/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_e.xml b/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_e.xml index a42860a..2fb24ef 100644 Binary files a/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_e.xml and b/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_e.xml differ diff --git a/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_j.xml b/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_j.xml index 9caee3d..8faba3b 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_j.xml +++ b/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_j.xml @@ -110,6 +110,18 @@ 00FalseTrue + + + 繧「繝励Μ繧ク繝」繝ウ繝 + 繧イ繝シ繝繧ォ繝シ繝牙髄縺代ョ繧ス繝輔ヨ縺ァ縺ッ繝弱シ繝槭Ν繧「繝励Μ繧ク繝」繝ウ繝励ッ險ア蜿ッ縺輔l縺ヲ縺縺セ縺帙s縲 + 1d1dFalseTrue + + + 繧「繝励Μ繧ク繝」繝ウ繝 + 繝弱シ繝槭Ν繧「繝励Μ繧ク繝」繝ウ繝励→tmp繧ク繝」繝ウ繝励r蜷梧凾縺ォ險ュ螳壹☆繧九%縺ィ縺ッ縺ァ縺阪∪縺帙s縲 + 1d1dFalseTrue + +