diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL.ncb b/build/tools/MasterEditorTWL/MasterEditorTWL.ncb index 5fa48671..a9f05485 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 a6c1317d..d65e19a7 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 7b75dfc0..643a47d3 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 84489851..9107edd0 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h @@ -3899,7 +3899,7 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colErrorCause; this->sucMsg( "Step1/2: ROMデータファイル(SRL)と提出確認書の情報を一致させるため、まず、入力情報を反映させたROMデータファイルを作成します。\n(キャンセルされたとき、SRLおよび提出確認書は作成されません。)\n" + "\n ROMデータファイル名は \"" + srlfile + "\"となります。\n" + "\nROMデータファイルを保存するフォルダを選択してください。", - "Step1/2: Firstly, We save ROM file(SRL) because several information in a submission sheet are match those in the ROM data file.\n(When it is canceled, both the SRL and a submission sheet are not made.)" + "Step1/2: Firstly, We save ROM file(SRL) because several information in a submission sheet are match those in the ROM data file.\n(When it is canceled, both the SRL and a submission sheet are not made.)\n" + "\n ROM data file name is \"" + srlfile + "\".\n" + "\nPlease select a folder in which the ROM data is saved." ); } diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/deliverable.cpp b/build/tools/MasterEditorTWL/MasterEditorTWL/deliverable.cpp index 55a6e60c..16c6e119 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/deliverable.cpp +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/deliverable.cpp @@ -205,9 +205,16 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet( if( node->FirstChild->Value->Equals( "TagRomVersion" ) ) { if( *(hSrl->hRomVersion) != 0xE0 ) + { node->FirstChild->Value = hSrl->hRomVersion->ToString(); + } else - node->FirstChild->Value = gcnew System::String( "E" ); + { + if( english ) + node->FirstChild->Value = gcnew System::String( "E (Preliminary ver.)" ); + else + node->FirstChild->Value = gcnew System::String( "E (事前版)" ); + } } if( node->FirstChild->Value->Equals( "TagSubmitVersion" ) ) { diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp b/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp index ebe06742..be155f80 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp @@ -1175,13 +1175,14 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) u32 romsize = 1 << (this->pRomHeader->s.rom_size); // ROM容量 if( *(this->hIsMediaNand) == false ) // カードアプリのときのみのチェック { - if( (romsize*1024*1024/8) < filesize ) + u32 filesizeMb = (filesize / (1024*1024)) * 8; + if( romsize < filesizeMb ) { this->hErrorList->Add( gcnew RCMrcError( "デバイス容量", 0x14, 0x14, "実ファイルサイズよりも小さい値が指定されています。", "Device Capacity", "Setting data is less than the actual file size.", false, true ) ); } - else if( filesize < (romsize*1024*1024/8) ) + else if( filesizeMb < romsize ) { this->hWarnList->Add( gcnew RCMrcError( // 警告 "デバイス容量", 0x14, 0x14, "実ファイルサイズに比べて無駄のある値が設定されています。", @@ -1193,10 +1194,10 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) "デバイス容量", 0x14, 0x14, "指定可能な容量ではありません。", "Device Capacity", "Invalid capacity.", false, true ) ); } - if( (filesize % 2) != 0 ) + if( (filesizeMb < 1) || (MasterEditorTWL::countBits(filesizeMb) != 1) ) { - this->hErrorList->Add( gcnew RCMrcError( - "実ファイルサイズ", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, "中途半端な値です。通常では2のべき乗の値です。", + this->hWarnList->Add( gcnew RCMrcError( + "実ファイルサイズ", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, "中途半端な値です。通常では2のべき乗[Mbit]の値です。", "Actual File Size", "Invalid size. This size is usually power of 2.", false, true ) ); } // 1Gbit以上のときの最終領域が固定値かどうか @@ -1424,7 +1425,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) { this->hErrorList->Add( gcnew RCMrcError( "アクセスコントロール情報", 0x1b4, 0x1b7, - "ゲームカード用ソフトは、NANDフラッシュとSDカードへアクセスできません。アクセスが必要な場合は、弊社業務部にまでご連絡ください。", + "ゲームカード用ソフトは、NANDフラッシュとSDカードへアクセスできません。アクセスが必要な場合は、弊社窓口にご相談ください。", "Access Control Info.", "Game soft for Game Card does'nt access to NAND frash memory and SD Card. If the soft wish to access them, please contact us.", false, true ) ); @@ -1634,6 +1635,12 @@ void RCSrl::mrcBanner(FILE *fp) return; } + // バナーオフセットにエラーがあるときには調べない + if( this->pRomHeader->s.banner_offset == 0 ) + { + return; + } + // 使用可能な文字のマップをつくる // 文字コードをインデックスとして使用可能なら 1 が入る // そうでないなら 0 が入る diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/utility.cpp b/build/tools/MasterEditorTWL/MasterEditorTWL/utility.cpp index 17f060f7..cdd0ea49 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/utility.cpp +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/utility.cpp @@ -362,3 +362,23 @@ void MasterEditorTWL::appendXmlTag( System::Xml::XmlDocument ^doc, System::Xml:: node->AppendChild( doc->CreateTextNode( text ) ); parent->AppendChild( node ); } + +// +// ビット数をカウントする +// +// @arg [in] 値 +// +// @ret ビット数 +// +u32 MasterEditorTWL::countBits( const u32 val ) +{ + // 分割統治法:隣り合うかたまりごとにビット数をカウントしていく + u32 n = val; + + n = ((n>>1) & 0x55555555) + (n & 0x55555555); + n = ((n>>2) & 0x33333333) + (n & 0x33333333); + n = ((n>>4) & 0x0f0f0f0f) + (n & 0x0f0f0f0f); + n = ((n>>8) & 0x00ff00ff) + (n & 0x00ff00ff); + n = (n>>16) + (n & 0x0000ffff); + return n; +} diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/utility.h b/build/tools/MasterEditorTWL/MasterEditorTWL/utility.h index 8fe8a6f1..180a888a 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/utility.h +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/utility.h @@ -124,4 +124,13 @@ namespace MasterEditorTWL void appendXmlTag( System::Xml::XmlDocument ^doc, System::Xml::XmlElement ^parent, System::String ^tag, System::String ^text ); + // + // ビット数をカウントする + // + // @arg [in] 値 + // + // @ret ビット数 + // + u32 countBits( const u32 val ); + } // end of namespace MasterEditorTWL