中韓版のROMチェックを追加。アプリジャンプのROMチェックを追加。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@322 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
nishikawa_takeshi 2009-06-25 08:53:48 +00:00
parent d58966fdeb
commit cc1b0ca24c
11 changed files with 129 additions and 22 deletions

View File

@ -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 )

View File

@ -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 ("レーティング表示不要(全年齢)")

View File

@ -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");

View File

@ -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 )

View File

@ -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<System::UInt32> ^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<RCSDKVersion^> ^hSDKList;
property System::Collections::Generic::List<RCLicense^> ^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<System::String^> ^args );

View File

@ -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") );
}
}
}

View File

@ -110,6 +110,18 @@
<begin>0</begin><end>0</end><modify>False</modify><affect>True</affect>
</SDKVersionExModuleNtrOld>
<!-- Application Jump -->
<NormalJumpCard>
<name>アプリジャンプ</name>
<sentence>ゲームカード向けのソフトではノーマルアプリジャンプは許可されていません。</sentence>
<begin>1d</begin><end>1d</end><modify>False</modify><affect>True</affect>
</NormalJumpCard>
<NormalJumpAndTmpJump>
<name>アプリジャンプ</name>
<sentence>ーマルアプリジャンプとtmpジャンプを同時に設定することはできません。</sentence>
<begin>1d</begin><end>1d</end><modify>False</modify><affect>True</affect>
</NormalJumpAndTmpJump>
<!-- 英訳依頼 ここまで -->
<!-- NTR Compatible Area -->