diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb index dc771d8..d8c4df1 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 5151cb9..8200d91 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 ddc1c81..7d90343 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/srl.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp index de55dc8..2d3e5cb 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp @@ -1031,16 +1031,8 @@ void RCSrl::calcNandUsedSize(FILE *fp) // ------------------------------------------------------------------- // MRCメッセージを取得 // ------------------------------------------------------------------- -RCMrcError^ RCSrl::makeMrcError( System::String ^tag, ... cli::array ^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 ^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 ^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 ^args ) +{ + return (this->makeMrcError( RCMrcError::PurposeType::Common, tag, args )); // 共通エラー +} diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h index 60f2690..6909dad 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h @@ -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 ^args ); RCMrcError^ makeMrcError( System::UInt32 beg, System::UInt32 end, System::Boolean isEnableModify, System::Boolean isAffectRom, RCMrcError::PurposeType purpose, System::String ^tag, ... cli::array ^args ); + RCMrcError^ makeMrcError( RCMrcError::PurposeType purpose, System::String ^tag, ... cli::array ^args ); + RCMrcError^ makeMrcError( System::String ^tag, ... cli::array ^args ); }; // end of ref class RCSrl diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp index f33d12a..7b57453 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp @@ -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") ); } } -} \ No newline at end of file +} + +// ------------------------------------------------------------------- +// 体験版用の追加チェック +// ------------------------------------------------------------------- +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() \ 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 57af68a..ffa9b71 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 ed42e84..533224f 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_j.xml +++ b/build/tools/MasterEditor/MasterEditorTWL/resource/mrc_msg_j.xml @@ -31,45 +31,45 @@ - DS Station蟇セ蠢 - DS Station逕ィROM縺ァ縺ッtmp繧ク繝」繝ウ繝励ッ險ア蜿ッ縺輔l縺ヲ縺縺セ縺帙s縲 + Touch!Try!DS蟇セ蠢 + Touch!Try!DS逕ィ繧「繝励Μ縺ァ縺ッtmp繧ク繝」繝ウ繝励ッ險ア蜿ッ縺輔l縺ヲ縺縺セ縺帙s縲 1d1dFalseTrue - DS Station蟇セ蠢 - DS Station逕ィROM縺ョ繝輔ぃ繧、繝ォ繧オ繧、繧コ縺ッ768Mbit莉・荳九〒縺ェ縺代l縺ー縺ェ繧翫∪縺帙s縲 + Touch!Try!DS蟇セ蠢 + Touch!Try!DS逕ィ繧「繝励Μ縺ョ繝輔ぃ繧、繝ォ繧オ繧、繧コ縺ッ768Mbit(96MByte)莉・荳九〒縺ェ縺代l縺ー縺ェ繧翫∪縺帙s縲 00FalseTrue - DS Station蟇セ蠢 - 蠎鈴ュ隧ヲ驕雁床逕ィ繝ゥ繧、繝悶Λ繝ェ縺御スソ逕ィ縺輔l縺ヲ縺縺セ縺帙s縲 + Touch!Try!DS蟇セ蠢 + Touch!Try!DS繝ゥ繧、繝悶Λ繝ェ(NIS_FOR_TWLSDK)縺御スソ逕ィ縺輔l縺ヲ縺縺セ縺帙s縲 00FalseTrue - 繝繧ヲ繝ウ繝ュ繝シ繝峨し繝シ繝薙せ蟇セ蠢 - 繝繧ヲ繝ウ繝ュ繝シ繝峨し繝シ繝薙せ逕ィ縺ョROM縺ァ縺ッ縲》mp繧ク繝」繝ウ繝励r險ア蜿ッ縺吶k蠢隕√′縺ゅj縺セ縺吶3SF繝輔ぃ繧、繝ォ縺ョPermitLandingTmpJump繝励Ο繝代ユ繧」繧定ィュ螳壹@縺ヲ縺上□縺輔>縲 + Nintendo Zone蟇セ蠢 + Nintendo Zone逕ィ縺ョROM縺ァ縺ッ縲》mp繧ク繝」繝ウ繝励r險ア蜿ッ縺吶k蠢隕√′縺ゅj縺セ縺吶3SF繝輔ぃ繧、繝ォ縺ョPermitLandingTmpJump繝励Ο繝代ユ繧」繧定ィュ螳壹@縺ヲ縺上□縺輔>縲 1d1dFalseTrue - 繝繧ヲ繝ウ繝ュ繝シ繝峨し繝シ繝薙せ蟇セ蠢 - 繝繧ヲ繝ウ繝ュ繝シ繝峨し繝シ繝薙せ逕ィ繧「繝励Μ繧辿YBRID迚医→縺励※菴懈舌☆繧九%縺ィ縺ッ險ア蜿ッ縺輔l縺ヲ縺縺セ縺帙s縲 + Nintendo Zone蟇セ蠢 + Nintendo Zone逕ィ繧「繝励Μ繧辿YBRID迚医→縺励※菴懈舌☆繧九%縺ィ縺ッ險ア蜿ッ縺輔l縺ヲ縺縺セ縺帙s縲 1212FalseTrue - 繝繧ヲ繝ウ繝ュ繝シ繝峨し繝シ繝薙せ蟇セ蠢 - 縺薙ョ繧ス繝輔ヨ縺ッLIMITED迚医〒縺吶ョ縺ァ縲¨intendoZone縺ョ縺ソ縺ァ驟堺ソ。蜿ッ閭ス縺ァ縺吶ゅ∩繧薙↑縺ョ繝九Φ繝繝ウ繝峨シ繝√Ε繝ウ繝阪Ν繧ДS繝繧ヲ繝ウ繝ュ繝シ繝峨励Ξ繧、縺ョ縺励¥縺ソ繧剃スソ逕ィ縺励※驟堺ソ。縺吶k縺薙→縺ッ縺ァ縺阪∪縺帙s縲 + Nintendo Zone蟇セ蠢 + 縺薙ョ繧ス繝輔ヨ縺ッNintendo Zone縺ョ縺ソ縺ァ驟堺ソ。蜿ッ閭ス縺ァ縺吶ゅ∩繧薙↑縺ョ繝九Φ繝繝ウ繝峨シ繝√Ε繝ウ繝阪Ν繧ДS繝繧ヲ繝ウ繝ュ繝シ繝峨励Ξ繧、縺ョ縺励¥縺ソ繧剃スソ逕ィ縺励※驟堺ソ。縺吶k縺薙→縺ッ縺ァ縺阪∪縺帙s縺ョ縺ァ縺疲ウィ諢上¥縺縺輔>縲(譛ャ隴ヲ蜻翫ッROM縺ョ蝠城。後r謖鞫倥@縺ヲ縺繧九o縺代〒縺ッ縺ゅj縺セ縺帙s縺ョ縺ァ縲∵悽隴ヲ蜻翫r辟。隕悶@縺ヲ縺縺溘□縺縺ヲ邨先ァ九〒縺吶) 1212FalseTrue - 繝繧ヲ繝ウ繝ュ繝シ繝峨し繝シ繝薙せ蟇セ蠢 - 繝繧ヲ繝ウ繝ュ繝シ繝峨し繝シ繝薙せ逕ィ縺ョROM繧オ繧、繧コ縺ッ2.5MByte莉・荳九〒縺ェ縺代l縺ー縺ェ繧翫∪縺帙s縲 + Nintendo Zone蟇セ蠢 + Nintendo Zone逕ィ縺ョ繝輔ぃ繧、繝ォ繧オ繧、繧コ縺ッ2.5MByte莉・荳九〒縺ェ縺代l縺ー縺ェ繧翫∪縺帙s縲 00FalseTrue