diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL.ncb b/build/tools/MasterEditorTWL/MasterEditorTWL.ncb index 9b1197a9..058b9ebf 100644 Binary files a/build/tools/MasterEditorTWL/MasterEditorTWL.ncb and b/build/tools/MasterEditorTWL/MasterEditorTWL.ncb differ diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL.suo b/build/tools/MasterEditorTWL/MasterEditorTWL.suo index b140565b..8834acfd 100644 Binary files a/build/tools/MasterEditorTWL/MasterEditorTWL.suo and b/build/tools/MasterEditorTWL/MasterEditorTWL.suo differ diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm b/build/tools/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm index 3db3414c..b1cfbfbe 100644 Binary files a/build/tools/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm and b/build/tools/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm differ diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h b/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h index ff01b7d2..00f5787d 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h @@ -6250,7 +6250,17 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign; result = this->hDeliv->writeSpreadsheet( delivfile, this->hSrl, hcrc, srlfile, !(this->stripItemJapanese->Checked) ); if( result != ECDeliverableResult::NOERROR ) { - this->errMsg( "提出確認書の作成に失敗しました。", "Making the submission sheet is failed." ); + switch( result ) + { + case ECDeliverableResult::ERROR_FILE_OPEN: + this->errMsg( "提出確認書のテンプレートが開けなかったため、提出確認書の作成に失敗しました。", + "Since a templete of the submission sheet can't be opened, making the sheet is failed." ); + break; + + default: + this->errMsg( "提出確認書の作成に失敗しました。", "Making the submission sheet is failed." ); + break; + } return; } this->sucMsg( "提出確認書の作成に成功しました。", "The submission sheet is made successfully." ); diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/Release/BuildLog.htm b/build/tools/MasterEditorTWL/MasterEditorTWL/Release/BuildLog.htm index 40b6cf06..a3ec2d53 100644 Binary files a/build/tools/MasterEditorTWL/MasterEditorTWL/Release/BuildLog.htm and b/build/tools/MasterEditorTWL/MasterEditorTWL/Release/BuildLog.htm differ diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/deliverable.cpp b/build/tools/MasterEditorTWL/MasterEditorTWL/deliverable.cpp index 233c1f20..adf9a74b 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/deliverable.cpp +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/deliverable.cpp @@ -29,7 +29,15 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet( { // テンプレートを読み込む System::Xml::XmlDocument ^doc = gcnew System::Xml::XmlDocument(); - doc->Load( "../resource/sheet_templete.xml" ); + try + { + doc->Load( "../resource/sheet_templete.xml" ); + } + catch ( System::Exception ^ex ) // 改ざんされていたとき + { + (void)ex; + return ECDeliverableResult::ERROR_FILE_OPEN; + } System::Xml::XmlElement ^root = doc->DocumentElement; // ソフトタイトルetc.は1文字ずつ入れる diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp b/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp index 14b93b70..d4d31c17 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp @@ -945,19 +945,6 @@ ECSrlResult RCSrl::mrcNTR( FILE *fp ) "システムコールライブラリ", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, "SDKデフォルトです。", "System-Call Library", "This Library is SDK default one.", false, true ) ); } - -#if 0 - // セグメント3のCRC - u16 crcseg3; - BOOL crcret = getSeg3CRCInFp( fp, &crcseg3 ); - if( !crcret || (crcseg3 != METWL_SEG3_CRC) ) - { - this->hErrorList->Add( gcnew RCMrcError( - "セグメント3CRC", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, - "セグメント3領域に誤りがあります。", - "System-Call Library", "This Library is SDK default one.", false, true ) ); - } -#endif return ECSrlResult::NOERROR; } // mrcNTR() @@ -1008,8 +995,18 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) "実ファイルサイズ", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, "中途半端な値です。通常では2のべき乗の値です。", "Actual File Size", "Invalid size. This size is usually power of 2.", false, true ) ); } + // セグメント3のCRC + u16 crcseg3; + BOOL crcret = getSeg3CRCInFp( fp, &crcseg3 ); + if( !crcret || (crcseg3 != METWL_SEG3_CRC) ) + { + this->hErrorList->Add( gcnew RCMrcError( + "セグメント3CRC", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, + "セグメント3領域に誤りがあります。", + "System-Call Library", "This Library is SDK default one.", false, true ) ); + } } //if( *(this->hIsNAND) == false ) - else + else // NANDアプリのときのみのチェック { if( (romsize < METWL_ROMSIZE_MIN_NAND) || (METWL_ROMSIZE_MAX_NAND < romsize) ) { @@ -1195,26 +1192,36 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) "Title ID", "Lower 4 bytes don't match ones of Game Code.", false, true ) ); } + System::Boolean bReserved = true; for( i=0; i < (0x2f0 - 0x240); i++ ) { if( this->pRomHeader->s.reserved_ltd_F[i] != 0 ) { - this->hErrorList->Add( gcnew RCMrcError( - "予約領域F", 0x240, 0x2ef, "不正な値が含まれています。この領域をすべて0で埋めてください。", - "Reserved Area F", "Invalid data is included. Please set 0 into this area.", false, true ) ); + bReserved = false; } } + if( !bReserved ) + { + this->hErrorList->Add( gcnew RCMrcError( + "予約領域F", 0x240, 0x2ef, "不正な値が含まれています。この領域をすべて0で埋めてください。", + "Reserved Area F", "Invalid data is included. Please set 0 into this area.", false, true ) ); + } + bReserved = true; for( i=0; i < (0xf80 - 0x378); i++ ) { u8 *p = (u8*)this->pRomHeader; if( p[ 0x378 + i ] != 0 ) { - this->hErrorList->Add( gcnew RCMrcError( - "予約領域D", 0x378, 0xf7f, "不正な値が含まれています。この領域をすべて0で埋めてください。", - "Reserved Area D", "Invalid data is included. Please set 0 into this area.", false, true ) ); + bReserved = false; } } + if( !bReserved ) + { + this->hErrorList->Add( gcnew RCMrcError( + "予約領域D", 0x378, 0xf7f, "不正な値が含まれています。この領域をすべて0で埋めてください。", + "Reserved Area D", "Invalid data is included. Please set 0 into this area.", false, true ) ); + } // ROMヘッダ以外の領域のチェック @@ -1224,7 +1231,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) "クローンブート署名", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, "SDKがクローンブートに対応していないため、ROM出しによってデータに矛盾が生じます。任天堂窓口にご相談ください。", "Clone-Boot Signature", - "Since SDK used by this ROM is not support for making Clone-Boot ROM, Mastering ROM will be error. Please contact with nintendo, sorry.", + "Since SDK used by this ROM is not support for making Clone-Boot ROM, Mastering ROM will be error. Please contact nintendo, sorry.", false, true ) ); }