mirror of
https://github.com/rvtr/TwlToolsRED.git
synced 2025-10-31 06:41:18 -04:00
体験版用エラーチェックを追加。ただ、一般販売専用のエラーの洗い出しはまだ。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@424 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
parent
6566da27d9
commit
d6a4302a6e
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1031,16 +1031,8 @@ void RCSrl::calcNandUsedSize(FILE *fp)
|
||||
// -------------------------------------------------------------------
|
||||
// MRCƒ<43>ƒbƒZ<C692>[ƒW‚ðŽæ“¾
|
||||
// -------------------------------------------------------------------
|
||||
RCMrcError^ RCSrl::makeMrcError( System::String ^tag, ... cli::array<System::String^> ^args )
|
||||
{
|
||||
// パラメータも取得(パラメータは英語版にも日本語版にも登録されておりどちらでもよいが日本語版のものにしておく)
|
||||
System::UInt32 beg = System::UInt32::Parse( this->hMrcMsg->getMessage( tag+"/begin", "J" ), System::Globalization::NumberStyles::HexNumber );
|
||||
System::UInt32 end = System::UInt32::Parse( this->hMrcMsg->getMessage( tag+"/end", "J" ), System::Globalization::NumberStyles::HexNumber );
|
||||
System::Boolean isEnableModify = System::Boolean::Parse( this->hMrcMsg->getMessage( tag+"/modify", "J" ) );
|
||||
System::Boolean isAffectRom = System::Boolean::Parse( this->hMrcMsg->getMessage( tag+"/affect", "J" ) );
|
||||
|
||||
return (this->makeMrcError( beg, end, isEnableModify, isAffectRom, RCMrcError::PurposeType::Common, tag, args )); // 共通エラー
|
||||
}
|
||||
// 開始と終了アドレスがROMによって異なる/存在しないエラー
|
||||
RCMrcError^ RCSrl::makeMrcError( System::UInt32 beg, System::UInt32 end, System::Boolean isEnableModify, System::Boolean isAffectRom,
|
||||
RCMrcError::PurposeType purpose,
|
||||
System::String ^tag, ... cli::array<System::String^> ^args )
|
||||
@ -1056,3 +1048,21 @@ RCMrcError^ RCSrl::makeMrcError( System::UInt32 beg, System::UInt32 end, System:
|
||||
|
||||
return (gcnew RCMrcError( nameJ, beg, end, msgJ, nameE, msgE, isEnableModify, isAffectRom, purpose ));
|
||||
}
|
||||
|
||||
// 開始と終了アドレスに設定ファイルに書かれているものを採用するエラー (用途が限定されるとき用)
|
||||
RCMrcError^ RCSrl::makeMrcError( RCMrcError::PurposeType purpose, System::String ^tag, ... cli::array<System::String^> ^args )
|
||||
{
|
||||
// パラメータも取得(パラメータは英語版にも日本語版にも登録されておりどちらでもよいが日本語版のものにしておく)
|
||||
System::UInt32 beg = System::UInt32::Parse( this->hMrcMsg->getMessage( tag+"/begin", "J" ), System::Globalization::NumberStyles::HexNumber );
|
||||
System::UInt32 end = System::UInt32::Parse( this->hMrcMsg->getMessage( tag+"/end", "J" ), System::Globalization::NumberStyles::HexNumber );
|
||||
System::Boolean isEnableModify = System::Boolean::Parse( this->hMrcMsg->getMessage( tag+"/modify", "J" ) );
|
||||
System::Boolean isAffectRom = System::Boolean::Parse( this->hMrcMsg->getMessage( tag+"/affect", "J" ) );
|
||||
|
||||
return (this->makeMrcError( beg, end, isEnableModify, isAffectRom, purpose, tag, args ));
|
||||
}
|
||||
|
||||
// 用途にかかわらず共通のエラー
|
||||
RCMrcError^ RCSrl::makeMrcError( System::String ^tag, ... cli::array<System::String^> ^args )
|
||||
{
|
||||
return (this->makeMrcError( RCMrcError::PurposeType::Common, tag, args )); // 共通エラー
|
||||
}
|
||||
|
||||
@ -187,12 +187,14 @@ namespace MasterEditorTWL
|
||||
void mrcShared2( FILE *fp );
|
||||
void mrcSDKVersion( FILE *fp );
|
||||
void mrcChinaKorea(void);
|
||||
void mrcTrialApp( FILE *fp ); // 体験版アプリ用の追加チェック
|
||||
|
||||
// MRCメッセージを追加
|
||||
RCMrcError^ makeMrcError( System::String ^tag, ... cli::array<System::String^> ^args );
|
||||
RCMrcError^ makeMrcError( System::UInt32 beg, System::UInt32 end, System::Boolean isEnableModify, System::Boolean isAffectRom,
|
||||
RCMrcError::PurposeType purpose,
|
||||
System::String ^tag, ... cli::array<System::String^> ^args );
|
||||
RCMrcError^ makeMrcError( RCMrcError::PurposeType purpose, System::String ^tag, ... cli::array<System::String^> ^args );
|
||||
RCMrcError^ makeMrcError( System::String ^tag, ... cli::array<System::String^> ^args );
|
||||
|
||||
}; // end of ref class RCSrl
|
||||
|
||||
|
||||
@ -484,6 +484,9 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
// 追加チェック
|
||||
this->mrcSDKVersion(fp);
|
||||
|
||||
// 体験版用追加チェック
|
||||
this->mrcTrialApp(fp);
|
||||
|
||||
return ECSrlResult::NOERROR;
|
||||
} // mrcTWL()
|
||||
|
||||
@ -1232,4 +1235,55 @@ void RCSrl::mrcChinaKorea(void)
|
||||
this->hErrorList->Add( this->makeMrcError("KoreaFlagAsserted") );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// 体験版用の追加チェック
|
||||
// -------------------------------------------------------------------
|
||||
void RCSrl::mrcTrialApp(FILE *fp)
|
||||
{
|
||||
// ROM読み出し時には用途はわからないのですべてのチェックをしておき
|
||||
// 表示するときに振り分けをする
|
||||
|
||||
// Touch!Try!DS
|
||||
if( this->IsTmpJump )
|
||||
{
|
||||
this->hErrorList->Add( this->makeMrcError(RCMrcError::PurposeType::DSStation, "DSStationTmpJump") );
|
||||
}
|
||||
fseek( fp, 0, SEEK_END );
|
||||
u32 filesize = ftell(fp); // 実ファイルサイズ
|
||||
if( filesize > (96 * 1024 * 1024) )
|
||||
{
|
||||
this->hErrorList->Add( this->makeMrcError(RCMrcError::PurposeType::DSStation, "DSStationRomSize") );
|
||||
}
|
||||
bool use_nis = false;
|
||||
for each( RCLicense ^lic in this->hLicenseList )
|
||||
{
|
||||
if( lic->Publisher->Equals( "NINTENDO" ) && lic->Name->Equals( "NIS_FOR_TWLSDK" ) )
|
||||
{
|
||||
use_nis = true;
|
||||
}
|
||||
}
|
||||
if( !use_nis )
|
||||
{
|
||||
this->hErrorList->Add( this->makeMrcError(RCMrcError::PurposeType::DSStation, "DSStationLib") );
|
||||
}
|
||||
|
||||
// Nintendo Zone
|
||||
if( !this->IsTmpJump )
|
||||
{
|
||||
this->hErrorList->Add( this->makeMrcError(RCMrcError::PurposeType::Zone, "ZoneTmpJump") );
|
||||
}
|
||||
if( filesize > (5 * 1024 * 1024 / 2) )
|
||||
{
|
||||
this->hErrorList->Add( this->makeMrcError(RCMrcError::PurposeType::Zone, "ZoneRomSize") );
|
||||
}
|
||||
if( this->pRomHeader->s.platform_code == PLATFORM_CODE_TWL_HYBLID )
|
||||
{
|
||||
this->hErrorList->Add( this->makeMrcError(RCMrcError::PurposeType::Zone, "ZoneHybrid") );
|
||||
}
|
||||
if( this->pRomHeader->s.platform_code == PLATFORM_CODE_TWL_LIMITED )
|
||||
{
|
||||
this->hWarnList->Add( this->makeMrcError(RCMrcError::PurposeType::Zone, "ZoneLimited") );
|
||||
}
|
||||
} //mrcTrialApp()
|
||||
Binary file not shown.
@ -31,45 +31,45 @@
|
||||
|
||||
<!-- For DS Station -->
|
||||
<DSStationTmpJump>
|
||||
<name>DS Station対応</name>
|
||||
<sentence>DS Station用ROMではtmpジャンプは許可されていません。</sentence>
|
||||
<name>Touch!Try!DS対応</name>
|
||||
<sentence>Touch!Try!DS用アプリではtmpジャンプは許可されていません。</sentence>
|
||||
<begin>1d</begin><end>1d</end><modify>False</modify><affect>True</affect>
|
||||
</DSStationTmpJump>
|
||||
|
||||
<DSStationRomSize>
|
||||
<name>DS Station対応</name>
|
||||
<sentence>DS Station用ROMのファイルサイズは768Mbit以下でなければなりません。</sentence>
|
||||
<name>Touch!Try!DS対応</name>
|
||||
<sentence>Touch!Try!DS用アプリのファイルサイズは768Mbit(96MByte)以下でなければなりません。</sentence>
|
||||
<begin>0</begin><end>0</end><modify>False</modify><affect>True</affect>
|
||||
</DSStationRomSize>
|
||||
|
||||
<DSStationLib>
|
||||
<name>DS Station対応</name>
|
||||
<sentence>店頭試遊台用ライブラリが使用されていません。</sentence>
|
||||
<name>Touch!Try!DS対応</name>
|
||||
<sentence>Touch!Try!DSライブラリ(NIS_FOR_TWLSDK)が使用されていません。</sentence>
|
||||
<begin>0</begin><end>0</end><modify>False</modify><affect>True</affect>
|
||||
</DSStationLib>
|
||||
|
||||
<!-- For Nintendo Zone -->
|
||||
<ZoneTmpJump>
|
||||
<name>ダウンロードサービス対応</name>
|
||||
<sentence>ダウンロードサービス用のROMでは、tmpジャンプを許可する必要があります。RSFファイルのPermitLandingTmpJumpプロパティを設定してください。</sentence>
|
||||
<name>Nintendo Zone対応</name>
|
||||
<sentence>Nintendo Zone用のROMでは、tmpジャンプを許可する必要があります。RSFファイルのPermitLandingTmpJumpプロパティを設定してください。</sentence>
|
||||
<begin>1d</begin><end>1d</end><modify>False</modify><affect>True</affect>
|
||||
</ZoneTmpJump>
|
||||
|
||||
<ZoneHybrid>
|
||||
<name>ダウンロードサービス対応</name>
|
||||
<sentence>ダウンロードサービス用アプリをHYBRID版として作成することは許可されていません。</sentence>
|
||||
<name>Nintendo Zone対応</name>
|
||||
<sentence>Nintendo Zone用アプリをHYBRID版として作成することは許可されていません。</sentence>
|
||||
<begin>12</begin><end>12</end><modify>False</modify><affect>True</affect>
|
||||
</ZoneHybrid>
|
||||
|
||||
<ZoneLimited>
|
||||
<name>ダウンロードサービス対応</name>
|
||||
<sentence>このソフトはLIMITED版ですので、NintendoZoneのみで配信可能です。みんなのニンテンドーチャンネルやDSダウンロードプレイのしくみを使用して配信することはできません。</sentence>
|
||||
<name>Nintendo Zone対応</name>
|
||||
<sentence>このソフトはNintendo Zoneのみで配信可能です。みんなのニンテンドーチャンネルやDSダウンロードプレイのしくみを使用して配信することはできませんのでご注意ください。(本警告はROMの問題を指摘しているわけではありませんので、本警告を無視していただいて結構です。)</sentence>
|
||||
<begin>12</begin><end>12</end><modify>False</modify><affect>True</affect>
|
||||
</ZoneLimited>
|
||||
|
||||
<ZoneRomSize>
|
||||
<name>ダウンロードサービス対応</name>
|
||||
<sentence>ダウンロードサービス用のROMサイズは2.5MByte以下でなければなりません。</sentence>
|
||||
<name>Nintendo Zone対応</name>
|
||||
<sentence>Nintendo Zone用のファイルサイズは2.5MByte以下でなければなりません。</sentence>
|
||||
<begin>0</begin><end>0</end><modify>False</modify><affect>True</affect>
|
||||
</ZoneRomSize>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user