mirror of
https://github.com/rvtr/TwlToolsRED.git
synced 2025-10-31 06:41:18 -04:00
マスタエディタ:ソースブラッシュアップ。value classのメンバをハンドルから値に変更。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@63 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
parent
d98efd5cde
commit
b626b4a88e
Binary file not shown.
Binary file not shown.
@ -38,21 +38,21 @@ namespace MasterEditorTWL {
|
||||
RCDeliverable ^hDeliv;
|
||||
|
||||
// TADを読み込んだかどうか(SRLを読み込んだ場合はfalse)
|
||||
System::Boolean ^hIsLoadTad;
|
||||
System::Boolean IsLoadTad;
|
||||
|
||||
// 書類出力モード(ノーマルXML or XML Spread Sheet)
|
||||
System::Boolean ^hIsSpreadSheet;
|
||||
System::Boolean IsSpreadSheet;
|
||||
|
||||
// リードオンリーモード
|
||||
System::Boolean ^hIsReadOnly;
|
||||
System::Boolean IsReadOnly;
|
||||
|
||||
// 入力エラー情報
|
||||
System::Collections::Generic::List<RCMrcError ^> ^hErrorList;
|
||||
System::Collections::Generic::List<RCMrcError ^> ^hWarnList;
|
||||
|
||||
// SRLに登録されないROM仕様を読み込み時の状態に戻せる仕組み
|
||||
System::Boolean ^hIsCheckedUGC; // 読み込み時にチェックされていたか
|
||||
System::Boolean ^hIsCheckedPhotoEx;
|
||||
System::Boolean IsCheckedUGC; // 読み込み時にチェックされていたか
|
||||
System::Boolean IsCheckedPhotoEx;
|
||||
|
||||
// VC自動追加フィールド
|
||||
private: System::Windows::Forms::GroupBox^ gboxCRC;
|
||||
@ -696,13 +696,13 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
//
|
||||
this->hSrl = gcnew (RCSrl);
|
||||
this->hDeliv = gcnew (RCDeliverable);
|
||||
this->hIsLoadTad = gcnew System::Boolean(false);
|
||||
this->IsLoadTad = false;
|
||||
this->hErrorList = gcnew System::Collections::Generic::List<RCMrcError^>();
|
||||
this->hErrorList->Clear();
|
||||
this->hWarnList = gcnew System::Collections::Generic::List<RCMrcError^>();
|
||||
this->hWarnList->Clear();
|
||||
this->hIsCheckedUGC = gcnew System::Boolean(false);
|
||||
this->hIsCheckedPhotoEx = gcnew System::Boolean(false);
|
||||
this->IsCheckedUGC = false;
|
||||
this->IsCheckedPhotoEx = false;
|
||||
|
||||
// バージョン情報を表示
|
||||
//this->labAssemblyVersion->Text = System::Windows::Forms::Application::ProductVersion;
|
||||
@ -720,8 +720,8 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
|
||||
|
||||
// デフォルト値
|
||||
this->hIsSpreadSheet = gcnew System::Boolean( true );
|
||||
this->hIsReadOnly = gcnew System::Boolean( false );
|
||||
this->IsSpreadSheet = true;
|
||||
this->IsReadOnly = false;
|
||||
this->dateRelease->Value = System::DateTime::Now;
|
||||
this->dateSubmit->Value = System::DateTime::Now;
|
||||
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||
@ -2832,22 +2832,22 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
void loadInit(void);
|
||||
|
||||
// ファイルの読み込み (TAD/SRL読み込みをラップ)
|
||||
void loadRom( System::String ^infile );
|
||||
System::Boolean loadRom( System::String ^infile );
|
||||
|
||||
// ファイルの書き出し (SRL書き出しをラップ)
|
||||
System::Boolean saveRom( System::String ^outname );
|
||||
|
||||
// SRLの読み込み
|
||||
System::Void loadSrl( System::String ^srlfile );
|
||||
System::Boolean loadSrl( System::String ^srlfile );
|
||||
|
||||
// SRLの保存と再読み込み
|
||||
// SRLの書き出しと再読み込み
|
||||
System::Boolean saveSrl( System::String ^infile, System::String ^outfile );
|
||||
|
||||
// SRLの保存のみ @ret 成否
|
||||
// SRLの書き出しのみ @ret 成否
|
||||
System::Boolean saveSrlCore( System::String ^infile, System::String ^outfile );
|
||||
|
||||
// tadの読み込み
|
||||
System::Void loadTad( System::String ^tadfile );
|
||||
System::Boolean loadTad( System::String ^tadfile );
|
||||
|
||||
// tadの読み込みで生成する一時SRLファイル名を返す
|
||||
System::String ^getSplitTadTmpFilename(void)
|
||||
@ -2864,19 +2864,19 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
// ミドルウェアリストの作成(XML形式)
|
||||
System::Void makeMiddlewareListXml(System::Xml::XmlDocument^ doc);
|
||||
|
||||
// ミドルウェアリストの保存
|
||||
// ミドルウェアリストの書き出し
|
||||
System::Boolean saveMiddlewareListXml( System::String ^filename );
|
||||
|
||||
// ミドルウェアリストの保存(XML->HTML変換)
|
||||
// ミドルウェアリストの書き出し(XML->HTML変換)
|
||||
System::Boolean saveMiddlewareListHtml( System::String ^filename );
|
||||
|
||||
// ミドルウェアリストの保存(XSL埋め込み)
|
||||
// ミドルウェアリストの書き出し(XSL埋め込み)
|
||||
System::Boolean saveMiddlewareListXmlEmbeddedXsl( System::String ^filename );
|
||||
|
||||
// 提出ファイル名をゲームコードなどから決定
|
||||
System::String^ getSubmitFilePrefix(void)
|
||||
{
|
||||
System::Byte romver = *this->hSrl->hRomVersion & 0x0F; // 下位1桁
|
||||
System::Byte romver = this->hSrl->RomVersion & 0x0F; // 下位1桁
|
||||
System::Byte subver = System::Decimal::ToByte(this->numSubmitVersion->Value) & 0x0F;
|
||||
|
||||
System::String ^prefix = "T" + this->hSrl->hGameCode + romver.ToString("X") + subver.ToString("X");
|
||||
@ -2948,18 +2948,18 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
{
|
||||
this->cboxIsUGC->Checked = false;
|
||||
this->cboxIsPhotoEx->Checked = false;
|
||||
this->hIsCheckedUGC = gcnew System::Boolean(false);
|
||||
this->hIsCheckedPhotoEx = gcnew System::Boolean(false);
|
||||
this->IsCheckedUGC = false;
|
||||
this->IsCheckedPhotoEx = false;
|
||||
}
|
||||
void saveOtherForms(void)
|
||||
{
|
||||
this->hIsCheckedUGC = gcnew System::Boolean(this->cboxIsUGC->Checked);
|
||||
this->hIsCheckedPhotoEx = gcnew System::Boolean(this->cboxIsPhotoEx->Checked);
|
||||
this->IsCheckedUGC = this->cboxIsUGC->Checked;
|
||||
this->IsCheckedPhotoEx = this->cboxIsPhotoEx->Checked;
|
||||
}
|
||||
void loadOtherForms(void)
|
||||
{
|
||||
this->cboxIsUGC->Checked = *(this->hIsCheckedUGC);
|
||||
this->cboxIsPhotoEx->Checked = *(this->hIsCheckedPhotoEx);
|
||||
this->cboxIsUGC->Checked = this->IsCheckedUGC;
|
||||
this->cboxIsPhotoEx->Checked = this->IsCheckedPhotoEx;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -3195,15 +3195,17 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
}
|
||||
|
||||
// 拡張子で tad 読み込みにするかを判定
|
||||
this->loadRom( filename );
|
||||
if( !this->loadRom( filename ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
this->tboxFile->Text = filename;
|
||||
|
||||
this->clearOtherForms();
|
||||
this->clearOtherForms(); // ROMヘッダには反映されない編集情報を更新
|
||||
//this->sucMsg( "ROMデータファイルのオープンに成功しました。", "The ROM data file is opened successfully." );
|
||||
} //stripItemOpenRom_Click()
|
||||
|
||||
private:
|
||||
System::Void stripItemMasterRom_Click(System::Object^ sender, System::EventArgs^ e)
|
||||
System::Void stripItemMasterRom_Click(System::Object^ sender, System::EventArgs^ e) // SRLのみ出力
|
||||
{
|
||||
// SRLが読み込まれていないときにはリードさせない
|
||||
if( System::String::IsNullOrEmpty( this->tboxFile->Text ) )
|
||||
@ -3275,7 +3277,7 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
} //stripItemMasterRom_Click()
|
||||
|
||||
private:
|
||||
System::Void stripItemSheet_Click(System::Object^ sender, System::EventArgs^ e)
|
||||
System::Void stripItemSheet_Click(System::Object^ sender, System::EventArgs^ e) // 一式を出力
|
||||
{
|
||||
ECDeliverableResult result;
|
||||
|
||||
@ -3377,10 +3379,9 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
"Calculating CRC is failed. Therefore, a part of files can't be made." );
|
||||
return;
|
||||
}
|
||||
System::UInt16 ^hcrc = gcnew System::UInt16( crc );
|
||||
this->tboxWholeCRC->Clear();
|
||||
this->tboxWholeCRC->AppendText( "0x" );
|
||||
this->tboxWholeCRC->AppendText( hcrc->ToString("X") );
|
||||
this->tboxWholeCRC->AppendText( crc.ToString("X4") ); // 書き出したSRLを再読み込みするのでCRCを再計算する
|
||||
|
||||
// ミドルウェアのリストを作成
|
||||
if( !this->saveMiddlewareListXmlEmbeddedXsl( middlefile ) || !this->saveMiddlewareListHtml( middlefilePrint ) )
|
||||
@ -3393,7 +3394,7 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
// 書類作成
|
||||
srlfile = System::IO::Path::GetFileName( srlfile );
|
||||
//result = this->hDeliv->write( delivfile, this->hSrl, hcrc, srlfile, !this->isJapanese() );
|
||||
result = this->hDeliv->writeSpreadsheet( delivfile, this->hSrl, hcrc, srlfile, !this->isJapanese() );
|
||||
result = this->hDeliv->writeSpreadsheet( delivfile, this->hSrl, crc, srlfile, !this->isJapanese() );
|
||||
if( result != ECDeliverableResult::NOERROR )
|
||||
{
|
||||
switch( result )
|
||||
@ -3422,7 +3423,6 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
System::Void stripItemSaveTemp_Click(System::Object^ sender, System::EventArgs^ e)
|
||||
{
|
||||
System::String ^filename = this->saveFileDlg( "xml format (*.xml)|*.xml", ".xml" );
|
||||
|
||||
if( !filename )
|
||||
{
|
||||
return;
|
||||
@ -3434,7 +3434,6 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
System::Void stripItemLoadTemp_Click(System::Object^ sender, System::EventArgs^ e)
|
||||
{
|
||||
System::String ^filename = this->openFileDlg( "xml format (*.xml)|*.xml" );
|
||||
|
||||
if( filename == nullptr )
|
||||
{
|
||||
return;
|
||||
@ -3503,7 +3502,10 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
"The ROM data file is not found. Therefore the file can not be opened." );
|
||||
return;
|
||||
}
|
||||
this->loadRom( filename );
|
||||
if( !this->loadRom( filename ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
this->tboxFile->Text = filename;
|
||||
this->clearOtherForms();
|
||||
//this->sucMsg( "ROMデータファイルのオープンに成功しました。", "The ROM data file is opened successfully." );
|
||||
@ -3621,13 +3623,13 @@ private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||
return;
|
||||
|
||||
// 編集可能情報を読み込み時の設定に戻す
|
||||
this->cboxIsEULA->Checked = *(this->hSrl->hIsEULA);
|
||||
if( ( *this->hSrl->hIsWiFiIcon && *this->hSrl->hIsWirelessIcon) ||
|
||||
(!(*this->hSrl->hIsWiFiIcon) && !(*this->hSrl->hIsWirelessIcon)) )
|
||||
this->cboxIsEULA->Checked = this->hSrl->IsEULA;
|
||||
if( ( this->hSrl->IsWiFiIcon && this->hSrl->IsWirelessIcon) ||
|
||||
(!this->hSrl->IsWiFiIcon && !this->hSrl->IsWirelessIcon) )
|
||||
{
|
||||
this->rIsNoIcon->Checked = true;
|
||||
}
|
||||
else if( *(this->hSrl->hIsWiFiIcon) && !*(this->hSrl->hIsWirelessIcon) )
|
||||
else if( this->hSrl->IsWiFiIcon && !this->hSrl->IsWirelessIcon )
|
||||
{
|
||||
this->rIsWiFiIcon->Checked = true;
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ namespace MasterEditorTWL {
|
||||
{
|
||||
for each( RCMrcError ^err in listLo )
|
||||
{
|
||||
if( !err->EnableModify ) // 修正可能な情報は表示しない
|
||||
if( !err->IsEnableModify ) // 修正可能な情報は表示しない
|
||||
this->gridError->Rows->Add( err->getAll( isJapanese ) );
|
||||
}
|
||||
}
|
||||
@ -316,7 +316,7 @@ namespace MasterEditorTWL {
|
||||
{
|
||||
for each( RCMrcError ^err in listLo )
|
||||
{
|
||||
if( !err->EnableModify ) // 修正可能な情報は表示しない
|
||||
if( !err->IsEnableModify ) // 修正可能な情報は表示しない
|
||||
this->gridWarn->Rows->Add( err->getAll( isJapanese ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,10 +24,10 @@ using namespace MasterEditorTWL;
|
||||
void Form1::setDeliverableProperties(void)
|
||||
{
|
||||
// 提出情報
|
||||
this->hDeliv->hProductName = this->tboxProductName->Text;
|
||||
this->hDeliv->hProductCode1 = this->tboxProductCode1->Text;
|
||||
this->hDeliv->hProductCode2 = this->tboxProductCode2->Text;
|
||||
this->hDeliv->hReleaseForeign = gcnew System::Boolean( this->cboxReleaseForeign->Checked );
|
||||
this->hDeliv->hProductName = this->tboxProductName->Text;
|
||||
this->hDeliv->hProductCode1 = this->tboxProductCode1->Text;
|
||||
this->hDeliv->hProductCode2 = this->tboxProductCode2->Text;
|
||||
this->hDeliv->IsReleaseForeign = this->cboxReleaseForeign->Checked;
|
||||
if( this->cboxReleaseForeign->Checked == true )
|
||||
{
|
||||
this->hDeliv->hProductNameForeign = this->tboxProductNameForeign->Text;
|
||||
@ -49,13 +49,13 @@ void Form1::setDeliverableProperties(void)
|
||||
this->hDeliv->hProductCode1Foreign = nullptr;
|
||||
this->hDeliv->hProductCode2Foreign = nullptr;
|
||||
}
|
||||
this->hDeliv->hReleaseYear = gcnew System::Int32( this->dateRelease->Value.Year );
|
||||
this->hDeliv->hReleaseMonth = gcnew System::Int32( this->dateRelease->Value.Month );
|
||||
this->hDeliv->hReleaseDay = gcnew System::Int32( this->dateRelease->Value.Day );
|
||||
this->hDeliv->hSubmitYear = gcnew System::Int32( this->dateSubmit->Value.Year );
|
||||
this->hDeliv->hSubmitMonth = gcnew System::Int32( this->dateSubmit->Value.Month );
|
||||
this->hDeliv->hSubmitDay = gcnew System::Int32( this->dateSubmit->Value.Day );
|
||||
this->hDeliv->hSubmitVersion = gcnew System::Int32( System::Decimal::ToInt32( this->numSubmitVersion->Value ) );
|
||||
this->hDeliv->ReleaseYear = this->dateRelease->Value.Year;
|
||||
this->hDeliv->ReleaseMonth = this->dateRelease->Value.Month;
|
||||
this->hDeliv->ReleaseDay = this->dateRelease->Value.Day;
|
||||
this->hDeliv->SubmitYear = this->dateSubmit->Value.Year;
|
||||
this->hDeliv->SubmitMonth = this->dateSubmit->Value.Month;
|
||||
this->hDeliv->SubmitDay = this->dateSubmit->Value.Day;
|
||||
this->hDeliv->SubmitVersion = System::Decimal::ToInt32( this->numSubmitVersion->Value );
|
||||
// SDK
|
||||
this->hDeliv->hSDK = nullptr;
|
||||
if( this->hSrl->hSDKList )
|
||||
@ -290,8 +290,8 @@ void Form1::setDeliverableProperties(void)
|
||||
}
|
||||
|
||||
// SRLには登録されないROM仕様
|
||||
this->hDeliv->hIsUGC = System::Boolean( this->cboxIsUGC->Checked );
|
||||
this->hDeliv->hIsPhotoEx = System::Boolean( this->cboxIsPhotoEx->Checked );
|
||||
this->hDeliv->IsUGC = this->cboxIsUGC->Checked;
|
||||
this->hDeliv->IsPhotoEx = this->cboxIsPhotoEx->Checked;
|
||||
}
|
||||
|
||||
// ----------------------------------------------
|
||||
|
||||
@ -26,18 +26,20 @@ using namespace MasterEditorTWL;
|
||||
// ファイルの読み込み (TAD/SRL読み込みをラップ)
|
||||
// ----------------------------------------------
|
||||
|
||||
void Form1::loadRom( System::String ^infile )
|
||||
System::Boolean Form1::loadRom( System::String ^infile )
|
||||
{
|
||||
this->hIsLoadTad = gcnew System::Boolean(false);
|
||||
System::Boolean result = false;
|
||||
this->IsLoadTad = false;
|
||||
if( System::IO::Path::GetExtension( infile )->ToUpper()->Equals( ".TAD" ) ) // 拡張子で判別
|
||||
{
|
||||
*this->hIsLoadTad = true;
|
||||
this->loadTad( infile );
|
||||
this->IsLoadTad = true;
|
||||
result = this->loadTad( infile );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->loadSrl( infile );
|
||||
result = this->loadSrl( infile );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// ----------------------------------------------
|
||||
@ -47,7 +49,7 @@ void Form1::loadRom( System::String ^infile )
|
||||
System::Boolean Form1::saveRom( System::String ^outfile )
|
||||
{
|
||||
System::Boolean result = false;
|
||||
if( *this->hIsLoadTad )
|
||||
if( this->IsLoadTad )
|
||||
{
|
||||
// 一時ファイルにSRLを書き出しているのでその一時ファイルから出力ファイルを作成
|
||||
System::String ^tmpsrl = this->getSplitTadTmpFilename();
|
||||
@ -65,7 +67,7 @@ System::Boolean Form1::saveRom( System::String ^outfile )
|
||||
// tadの読み込み
|
||||
// ----------------------------------------------
|
||||
|
||||
System::Void Form1::loadTad( System::String ^tadfile )
|
||||
System::Boolean Form1::loadTad( System::String ^tadfile )
|
||||
{
|
||||
// tadファイルを変換したSRLを一時ファイルに保存
|
||||
System::String ^srlfile = this->getSplitTadTmpFilename();
|
||||
@ -77,16 +79,17 @@ System::Void Form1::loadTad( System::String ^tadfile )
|
||||
{
|
||||
this->errMsg( "TADファイルの読み出しに失敗しました。", "Reading TAD file failed." );
|
||||
System::IO::File::Delete( srlfile );
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
this->loadSrl( srlfile ); // 一時保存したSRLを読み込み
|
||||
System::Boolean result = this->loadSrl( srlfile ); // 一時保存したSRLを読み込み
|
||||
return result;
|
||||
}
|
||||
|
||||
// ----------------------------------------------
|
||||
// SRLの読み込み
|
||||
// ----------------------------------------------
|
||||
|
||||
System::Void Form1::loadSrl( System::String ^srlfile )
|
||||
System::Boolean Form1::loadSrl( System::String ^srlfile )
|
||||
{
|
||||
ECSrlResult result = this->hSrl->readFromFile( srlfile );
|
||||
if( result != ECSrlResult::NOERROR )
|
||||
@ -109,12 +112,12 @@ System::Void Form1::loadSrl( System::String ^srlfile )
|
||||
"Reading the ROM data file failed. \nPlease read a ROM data file again, with \"Open a ROM data file\"" );
|
||||
break;
|
||||
}
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// GUIにROM情報を格納
|
||||
this->setSrlForms();
|
||||
if( *(this->hIsReadOnly) )
|
||||
if( this->IsReadOnly )
|
||||
{
|
||||
this->readOnly(); // リードオンリーモードのときフォームをEnableにする
|
||||
}
|
||||
@ -129,7 +132,7 @@ System::Void Form1::loadSrl( System::String ^srlfile )
|
||||
{
|
||||
this->errMsg( "ROMデータのCRC計算に失敗しました。ROMデータの読み込みはキャンセルされました。",
|
||||
"Calculating CRC of the ROM data failed. Therefore reading ROM data is canceled." );
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
System::UInt16 ^hcrc = gcnew System::UInt16( crc );
|
||||
this->tboxWholeCRC->Clear();
|
||||
@ -140,14 +143,8 @@ System::Void Form1::loadSrl( System::String ^srlfile )
|
||||
this->rErrorReading->Checked = true;
|
||||
this->setGridError();
|
||||
this->setGridWarn();
|
||||
//if( this->hSrl->hErrorList->Count > 0 )
|
||||
//{
|
||||
// this->errMsg( "ROMデータにエラーがあります。「エラー情報」タブをご確認ください。",
|
||||
// "ROM data include error. Please look the tab \"Setting Error\"." );
|
||||
// return;
|
||||
//}
|
||||
|
||||
return;
|
||||
return true;
|
||||
} // loadSrl()
|
||||
|
||||
// ----------------------------------------------
|
||||
@ -359,7 +356,7 @@ void Form1::loadInit(void)
|
||||
|
||||
// <rw>タグ
|
||||
System::Boolean bReadOnly = MasterEditorTWL::isXmlEqual( root, "rw", "r" );
|
||||
this->hIsReadOnly = System::Boolean( bReadOnly );
|
||||
this->IsReadOnly = bReadOnly;
|
||||
if( bReadOnly )
|
||||
{
|
||||
this->readOnly();
|
||||
@ -382,7 +379,7 @@ void Form1::loadInit(void)
|
||||
if( bCheck ) // チェックするときのみ追加チェック項目を設定
|
||||
{
|
||||
// チェックするかどうか
|
||||
this->hSrl->hMrcSpecialList->hIsCheck = gcnew System::Boolean( true );
|
||||
this->hSrl->hMrcSpecialList->IsCheck = true;
|
||||
|
||||
// SDK
|
||||
try
|
||||
@ -391,14 +388,14 @@ void Form1::loadInit(void)
|
||||
u32 minor = System::UInt32::Parse( MasterEditorTWL::getXPathText( root, "/init/sdk/minor" ) );
|
||||
u32 relstep = System::UInt32::Parse( MasterEditorTWL::getXPathText( root, "/init/sdk/relstep" ) );
|
||||
u32 sdkver = (major << 24) | (minor << 16) | (relstep & 0xFFFF);
|
||||
this->hSrl->hMrcSpecialList->hSDKVer = gcnew System::UInt32( sdkver );
|
||||
this->hSrl->hMrcSpecialList->SDKVer = sdkver;
|
||||
}
|
||||
catch ( System::Exception ^ex )
|
||||
{
|
||||
(void)ex;
|
||||
this->errMsg( "設定ファイル中のSDKバージョンが読み込めませんでした。バージョンは0とみなされます。",
|
||||
"SDK ver. can't be read from setting file. Therefore it is set by 0." );
|
||||
this->hSrl->hMrcSpecialList->hSDKVer = gcnew System::UInt32( 0 );
|
||||
this->hSrl->hMrcSpecialList->SDKVer = 0;
|
||||
}
|
||||
|
||||
// Shared2File
|
||||
@ -408,7 +405,7 @@ void Form1::loadInit(void)
|
||||
for( i=0; i < METWL_NUMOF_SHARED2FILES; i++ )
|
||||
{
|
||||
u32 size = System::UInt32::Parse( MasterEditorTWL::getXPathText( root, "/init/shared2/size" + i.ToString() ) );
|
||||
this->hSrl->hMrcSpecialList->hShared2SizeArray[i] = gcnew System::UInt32( size );
|
||||
this->hSrl->hMrcSpecialList->hShared2SizeArray[i] = size;
|
||||
}
|
||||
}
|
||||
catch ( System::Exception ^ex )
|
||||
@ -419,7 +416,7 @@ void Form1::loadInit(void)
|
||||
System::Int32 i;
|
||||
for( i=0; i < METWL_NUMOF_SHARED2FILES; i++ )
|
||||
{
|
||||
this->hSrl->hMrcSpecialList->hShared2SizeArray[i] = gcnew System::UInt32( 0 );
|
||||
this->hSrl->hMrcSpecialList->hShared2SizeArray[i] = 0;
|
||||
}
|
||||
}
|
||||
} //if( bCheck )
|
||||
|
||||
@ -28,39 +28,39 @@ using namespace MasterEditorTWL;
|
||||
// フォーム入力をSRLに反映させる
|
||||
void Form1::setRegionSrlPropaties(void)
|
||||
{
|
||||
this->hSrl->hIsRegionJapan = gcnew System::Boolean(false);
|
||||
this->hSrl->hIsRegionAmerica = gcnew System::Boolean(false);
|
||||
this->hSrl->hIsRegionEurope = gcnew System::Boolean(false);
|
||||
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(false);
|
||||
this->hSrl->IsRegionJapan = false;
|
||||
this->hSrl->IsRegionAmerica = false;
|
||||
this->hSrl->IsRegionEurope = false;
|
||||
this->hSrl->IsRegionAustralia = false;
|
||||
switch( this->combRegion->SelectedIndex )
|
||||
{
|
||||
case 0:
|
||||
this->hSrl->hIsRegionJapan = gcnew System::Boolean(true);
|
||||
this->hSrl->IsRegionJapan = true;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
this->hSrl->hIsRegionAmerica = gcnew System::Boolean(true);
|
||||
this->hSrl->IsRegionAmerica = true;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
this->hSrl->hIsRegionEurope = gcnew System::Boolean(true);
|
||||
this->hSrl->IsRegionEurope = true;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(true);
|
||||
this->hSrl->IsRegionAustralia = true;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
this->hSrl->hIsRegionEurope = gcnew System::Boolean(true);
|
||||
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(true);
|
||||
this->hSrl->IsRegionEurope = true;
|
||||
this->hSrl->IsRegionAustralia = true;
|
||||
break;
|
||||
|
||||
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||
case 5:
|
||||
this->hSrl->hIsRegionJapan = gcnew System::Boolean(true);
|
||||
this->hSrl->hIsRegionAmerica = gcnew System::Boolean(true);
|
||||
this->hSrl->hIsRegionEurope = gcnew System::Boolean(true);
|
||||
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(true);
|
||||
this->hSrl->IsRegionJapan = true;
|
||||
this->hSrl->IsRegionAmerica = true;
|
||||
this->hSrl->IsRegionEurope = true;
|
||||
this->hSrl->IsRegionAustralia = true;
|
||||
break;
|
||||
#endif //defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||
default:
|
||||
@ -75,10 +75,10 @@ void Form1::setRegionSrlPropaties(void)
|
||||
// SRL情報をフォームに反映させる
|
||||
void Form1::setRegionForms(void)
|
||||
{
|
||||
System::Boolean isJapan = *(this->hSrl->hIsRegionJapan); // ƒŠ<C692>[ƒWƒ‡ƒ“
|
||||
System::Boolean isAmerica = *(this->hSrl->hIsRegionAmerica);
|
||||
System::Boolean isEurope = *(this->hSrl->hIsRegionEurope);
|
||||
System::Boolean isAustralia = *(this->hSrl->hIsRegionAustralia);
|
||||
System::Boolean isJapan = this->hSrl->IsRegionJapan; // ƒŠ<C692>[ƒWƒ‡ƒ“
|
||||
System::Boolean isAmerica = this->hSrl->IsRegionAmerica;
|
||||
System::Boolean isEurope = this->hSrl->IsRegionEurope;
|
||||
System::Boolean isAustralia = this->hSrl->IsRegionAustralia;
|
||||
System::Int32 index;
|
||||
if( isJapan && !isAmerica && !isEurope && !isAustralia )
|
||||
index = 0;
|
||||
|
||||
@ -28,9 +28,9 @@ void Form1::setSrlProperties(void)
|
||||
// ROMヘッダの[0,0x160)の領域はRead Onlyで変更しない
|
||||
|
||||
// TWL拡張領域のいくつかの情報をROMヘッダに反映させる
|
||||
this->hSrl->hIsEULA = this->cboxIsEULA->Checked;
|
||||
this->hSrl->hIsWiFiIcon = this->rIsWiFiIcon->Checked;
|
||||
this->hSrl->hIsWirelessIcon = this->rIsWirelessIcon->Checked;
|
||||
this->hSrl->IsEULA = this->cboxIsEULA->Checked;
|
||||
this->hSrl->IsWiFiIcon = this->rIsWiFiIcon->Checked;
|
||||
this->hSrl->IsWirelessIcon = this->rIsWirelessIcon->Checked;
|
||||
|
||||
// リージョン
|
||||
this->setRegionSrlPropaties();
|
||||
@ -49,8 +49,8 @@ void Form1::setSrlForms(void)
|
||||
this->tboxPlatform->Text = this->hSrl->hPlatform;
|
||||
this->tboxRomSize->Text = this->hSrl->hRomSize;
|
||||
this->tboxRomLatency->Text = this->hSrl->hLatency;
|
||||
this->tboxRemasterVer->Text = this->hSrl->hRomVersion->ToString("X2");
|
||||
if( *(this->hSrl->hRomVersion) == 0xE0 )
|
||||
this->tboxRemasterVer->Text = this->hSrl->RomVersion.ToString("X2");
|
||||
if( this->hSrl->RomVersion == 0xE0 )
|
||||
{
|
||||
this->cboxRemasterVerE->Checked = true;
|
||||
}
|
||||
@ -61,7 +61,7 @@ void Form1::setSrlForms(void)
|
||||
|
||||
this->tboxHeaderCRC->Clear();
|
||||
this->tboxHeaderCRC->AppendText( "0x" );
|
||||
this->tboxHeaderCRC->AppendText( this->hSrl->hHeaderCRC->ToString("X") );
|
||||
this->tboxHeaderCRC->AppendText( this->hSrl->HeaderCRC.ToString("X4") );
|
||||
|
||||
if( this->hSrl->hPlatform == nullptr )
|
||||
{
|
||||
@ -71,16 +71,16 @@ void Form1::setSrlForms(void)
|
||||
|
||||
// TWL拡張情報
|
||||
this->tboxTitleIDLo->Text = this->hSrl->hTitleIDLo;
|
||||
this->tboxTitleIDHi->Text = this->hSrl->hTitleIDHi->ToString("X8");
|
||||
this->tboxNormalRomOffset->Text = this->hSrl->hNormalRomOffset->ToString("X8");
|
||||
this->tboxKeyTableRomOffset->Text = this->hSrl->hKeyTableRomOffset->ToString("X8");
|
||||
this->tboxPublicSize->Text = MasterEditorTWL::transSizeToString( this->hSrl->hPublicSize );
|
||||
this->tboxPrivateSize->Text = MasterEditorTWL::transSizeToString( this->hSrl->hPrivateSize );
|
||||
this->cboxIsNormalJump->Checked = *(this->hSrl->hIsNormalJump);
|
||||
this->cboxIsTmpJump->Checked = *(this->hSrl->hIsTmpJump);
|
||||
this->cboxIsSubBanner->Checked = *(this->hSrl->hIsSubBanner);
|
||||
this->cboxIsWL->Checked = *(this->hSrl->hIsWL);
|
||||
if( *(this->hSrl->hIsCodecTWL) == true )
|
||||
this->tboxTitleIDHi->Text = this->hSrl->TitleIDHi.ToString("X8");
|
||||
this->tboxNormalRomOffset->Text = this->hSrl->NormalRomOffset.ToString("X8");
|
||||
this->tboxKeyTableRomOffset->Text = this->hSrl->KeyTableRomOffset.ToString("X8");
|
||||
this->tboxPublicSize->Text = MasterEditorTWL::transSizeToString( this->hSrl->PublicSize );
|
||||
this->tboxPrivateSize->Text = MasterEditorTWL::transSizeToString( this->hSrl->PrivateSize );
|
||||
this->cboxIsNormalJump->Checked = this->hSrl->IsNormalJump;
|
||||
this->cboxIsTmpJump->Checked = this->hSrl->IsTmpJump;
|
||||
this->cboxIsSubBanner->Checked = this->hSrl->IsSubBanner;
|
||||
this->cboxIsWL->Checked = this->hSrl->IsWL;
|
||||
if( this->hSrl->IsCodecTWL == true )
|
||||
{
|
||||
this->tboxIsCodec->Text = gcnew System::String( "TWL" );
|
||||
}
|
||||
@ -88,13 +88,13 @@ void Form1::setSrlForms(void)
|
||||
{
|
||||
this->tboxIsCodec->Text = gcnew System::String( "NTR" );
|
||||
}
|
||||
this->cboxIsSD->Checked = *(this->hSrl->hIsSD);
|
||||
this->cboxIsNAND->Checked = *(this->hSrl->hIsNAND);
|
||||
if( *(this->hSrl->hIsGameCardNitro) == true )
|
||||
this->cboxIsSD->Checked = this->hSrl->IsSD;
|
||||
this->cboxIsNAND->Checked = this->hSrl->IsNAND;
|
||||
if( this->hSrl->IsGameCardNitro )
|
||||
{
|
||||
this->tboxIsGameCardOn->Text = gcnew System::String( "ON(NTR)" );
|
||||
}
|
||||
else if( *(this->hSrl->hIsGameCardOn) == true )
|
||||
else if( this->hSrl->IsGameCardOn == true )
|
||||
{
|
||||
this->tboxIsGameCardOn->Text = gcnew System::String( "ON(normal)" );
|
||||
}
|
||||
@ -102,7 +102,7 @@ void Form1::setSrlForms(void)
|
||||
{
|
||||
this->tboxIsGameCardOn->Text = gcnew System::String( "OFF" );
|
||||
}
|
||||
this->cboxIsShared2->Checked = *(this->hSrl->hIsShared2);
|
||||
this->cboxIsShared2->Checked = this->hSrl->IsShared2;
|
||||
this->tboxShared2Size0->Text = MasterEditorTWL::transSizeToString( this->hSrl->hShared2SizeArray[0] );
|
||||
this->tboxShared2Size1->Text = MasterEditorTWL::transSizeToString( this->hSrl->hShared2SizeArray[1] );
|
||||
this->tboxShared2Size2->Text = MasterEditorTWL::transSizeToString( this->hSrl->hShared2SizeArray[2] );
|
||||
@ -111,7 +111,7 @@ void Form1::setSrlForms(void)
|
||||
this->tboxShared2Size5->Text = MasterEditorTWL::transSizeToString( this->hSrl->hShared2SizeArray[5] );
|
||||
|
||||
// アプリ種別
|
||||
if( *this->hSrl->hIsMediaNand )
|
||||
if( this->hSrl->IsMediaNand )
|
||||
{
|
||||
this->tboxMedia->Text = gcnew System::String( "NAND" );
|
||||
}
|
||||
@ -121,19 +121,19 @@ void Form1::setSrlForms(void)
|
||||
}
|
||||
|
||||
|
||||
if( *(this->hSrl->hIsAppLauncher) == true )
|
||||
if( this->hSrl->IsAppLauncher == true )
|
||||
{
|
||||
this->tboxAppType->Text = gcnew System::String( "Launcher" );
|
||||
}
|
||||
else if( *(this->hSrl->hIsAppSecure) == true )
|
||||
else if( this->hSrl->IsAppSecure == true )
|
||||
{
|
||||
this->tboxAppType->Text = gcnew System::String( "Secure" );
|
||||
}
|
||||
else if( *(this->hSrl->hIsAppSystem) == true )
|
||||
else if( this->hSrl->IsAppSystem == true )
|
||||
{
|
||||
this->tboxAppType->Text = gcnew System::String( "System" );
|
||||
}
|
||||
else if( *(this->hSrl->hIsAppUser) == true )
|
||||
else if( this->hSrl->IsAppUser == true )
|
||||
{
|
||||
this->tboxAppType->Text = gcnew System::String( "User" );
|
||||
}
|
||||
@ -144,31 +144,31 @@ void Form1::setSrlForms(void)
|
||||
|
||||
// アクセスコントロール その他
|
||||
System::String ^acc = gcnew System::String("");
|
||||
if( *(this->hSrl->hIsCommonClientKey) == true )
|
||||
if( this->hSrl->IsCommonClientKey == true )
|
||||
{
|
||||
acc += "commonClientKey.\r\n";
|
||||
}
|
||||
if( *(this->hSrl->hIsAesSlotBForES) == true )
|
||||
if( this->hSrl->IsAesSlotBForES == true )
|
||||
{
|
||||
acc += "AES-SlotB(ES).\r\n";
|
||||
}
|
||||
if( *(this->hSrl->hIsAesSlotCForNAM) == true )
|
||||
if( this->hSrl->IsAesSlotCForNAM == true )
|
||||
{
|
||||
acc += "AES-SlotC(NAM).\r\n";
|
||||
}
|
||||
if( *(this->hSrl->hIsAesSlotBForJpegEnc) == true )
|
||||
if( this->hSrl->IsAesSlotBForJpegEnc == true )
|
||||
{
|
||||
acc += "AES-SlotB(Jpeg Launcher).\r\n";
|
||||
}
|
||||
if( *(this->hSrl->hIsAesSlotBForJpegEncUser) == true )
|
||||
if( this->hSrl->IsAesSlotBForJpegEncUser == true )
|
||||
{
|
||||
acc += "AES-SlotB(Jpeg User).\r\n";
|
||||
}
|
||||
if( *(this->hSrl->hIsAesSlotAForSSL) == true )
|
||||
if( this->hSrl->IsAesSlotAForSSL == true )
|
||||
{
|
||||
acc += "AES-SlotA(SSL).\r\n";
|
||||
}
|
||||
if( *(this->hSrl->hIsCommonClientKeyForDebugger) == true )
|
||||
if( this->hSrl->IsCommonClientKeyForDebugger == true )
|
||||
{
|
||||
acc += "commonClientKey(Debug).\r\n";
|
||||
}
|
||||
@ -204,13 +204,13 @@ void Form1::setSrlForms(void)
|
||||
}
|
||||
|
||||
// 編集可能情報
|
||||
this->cboxIsEULA->Checked = *(this->hSrl->hIsEULA);
|
||||
if( ( *this->hSrl->hIsWiFiIcon && *this->hSrl->hIsWirelessIcon) ||
|
||||
(!(*this->hSrl->hIsWiFiIcon) && !(*this->hSrl->hIsWirelessIcon)) )
|
||||
this->cboxIsEULA->Checked = this->hSrl->IsEULA;
|
||||
if( ( this->hSrl->IsWiFiIcon && this->hSrl->IsWirelessIcon) ||
|
||||
(!this->hSrl->IsWiFiIcon && !this->hSrl->IsWirelessIcon) )
|
||||
{
|
||||
this->rIsNoIcon->Checked = true;
|
||||
}
|
||||
else if( *(this->hSrl->hIsWiFiIcon) && !*(this->hSrl->hIsWirelessIcon) )
|
||||
else if( this->hSrl->IsWiFiIcon && !this->hSrl->IsWirelessIcon )
|
||||
{
|
||||
this->rIsWiFiIcon->Checked = true;
|
||||
}
|
||||
@ -230,14 +230,14 @@ void Form1::setSrlFormsCaptionEx()
|
||||
return;
|
||||
}
|
||||
System::String ^appother = gcnew System::String("");
|
||||
if( *(this->hSrl->hIsLaunch) == false )
|
||||
if( !this->hSrl->IsLaunch )
|
||||
{
|
||||
if( this->isJapanese() == true )
|
||||
appother += "ランチャー非表示.\r\n";
|
||||
else
|
||||
appother += "Not Display On the Launcher.\r\n";
|
||||
}
|
||||
if( *(this->hSrl->hIsDataOnly) == true )
|
||||
if( this->hSrl->IsDataOnly )
|
||||
{
|
||||
if( this->isJapanese() == true )
|
||||
appother += "データ専用.\r\n";
|
||||
@ -247,14 +247,14 @@ void Form1::setSrlFormsCaptionEx()
|
||||
this->tboxAppTypeOther->Text = appother;
|
||||
|
||||
this->tboxCaptionEx->Clear();
|
||||
if( (this->hSrl->hHasDSDLPlaySign != nullptr) && (*(this->hSrl->hHasDSDLPlaySign) == true) )
|
||||
if( this->hSrl->HasDSDLPlaySign )
|
||||
{
|
||||
if( this->isJapanese() == true )
|
||||
this->tboxCaptionEx->Text += gcnew System::String( "DSクローンブート対応.\r\n" );
|
||||
else
|
||||
this->tboxCaptionEx->Text += gcnew System::String( "DS Clone Boot.\r\n" );
|
||||
}
|
||||
if( (this->hSrl->hIsSCFGAccess != nullptr) && (*(this->hSrl->hIsSCFGAccess) == true) )
|
||||
if( this->hSrl->IsSCFGAccess )
|
||||
{
|
||||
if( this->isJapanese() == true )
|
||||
this->tboxCaptionEx->Text += gcnew System::String( "SCFGレジスタアクセス可能.\r\n" );
|
||||
|
||||
@ -117,7 +117,7 @@ void Form1::overloadGridError( void )
|
||||
{
|
||||
for each( RCMrcError ^err in this->hSrl->hErrorList )
|
||||
{
|
||||
if( !err->EnableModify ) // 修正可能な情報は表示しない
|
||||
if( !err->IsEnableModify ) // 修正可能な情報は表示しない
|
||||
{
|
||||
this->gridError->Rows->Add( err->getAll(this->isJapanese()) );
|
||||
this->colorGridError( err );
|
||||
@ -140,7 +140,7 @@ void Form1::overloadGridWarn( void )
|
||||
{
|
||||
for each( RCMrcError ^err in this->hSrl->hWarnList )
|
||||
{
|
||||
if( !err->EnableModify )
|
||||
if( !err->IsEnableModify )
|
||||
{
|
||||
this->gridWarn->Rows->Add( err->getAll(this->isJapanese()) );
|
||||
this->colorGridWarn( err );
|
||||
@ -160,12 +160,12 @@ void Form1::overloadGridWarn( void )
|
||||
// セルの色を変える
|
||||
void Form1::colorGridError( RCMrcError ^err )
|
||||
{
|
||||
if( err->AffectRom && !err->EnableModify ) // SRLに関係ありで修正不可
|
||||
if( err->IsAffectRom && !err->IsEnableModify ) // SRLに関係ありで修正不可
|
||||
{
|
||||
System::Int32 last = this->gridError->Rows->Count - 2; // 追加直後の行
|
||||
this->gridError->Rows[ last ]->DefaultCellStyle->ForeColor = System::Drawing::Color::Red;
|
||||
}
|
||||
else if( err->AffectRom && err->EnableModify ) // SRLに関係ありで修正可
|
||||
else if( err->IsAffectRom && err->IsEnableModify ) // SRLに関係ありで修正可
|
||||
{
|
||||
System::Int32 last = this->gridError->Rows->Count - 2;
|
||||
this->gridError->Rows[ last ]->DefaultCellStyle->ForeColor = System::Drawing::Color::Blue;
|
||||
@ -173,12 +173,12 @@ void Form1::colorGridError( RCMrcError ^err )
|
||||
}
|
||||
void Form1::colorGridWarn( RCMrcError ^err )
|
||||
{
|
||||
if( err->AffectRom && !err->EnableModify )
|
||||
if( err->IsAffectRom && !err->IsEnableModify )
|
||||
{
|
||||
System::Int32 last = this->gridWarn->Rows->Count - 2;
|
||||
this->gridWarn->Rows[ last ]->DefaultCellStyle->ForeColor = System::Drawing::Color::Red;
|
||||
}
|
||||
else if( err->AffectRom && err->EnableModify )
|
||||
else if( err->IsAffectRom && err->IsEnableModify )
|
||||
{
|
||||
System::Int32 last = this->gridWarn->Rows->Count - 2;
|
||||
this->gridWarn->Rows[ last ]->DefaultCellStyle->ForeColor = System::Drawing::Color::Blue;
|
||||
@ -220,7 +220,7 @@ System::Boolean Form1::isValidOnlyDeliverable(void)
|
||||
// -> 入力エラーのみのチェックでよい
|
||||
for each( RCMrcError ^err in this->hErrorList )
|
||||
{
|
||||
if( !err->AffectRom )
|
||||
if( !err->IsAffectRom )
|
||||
count++;
|
||||
}
|
||||
return (count == 0);
|
||||
@ -235,7 +235,7 @@ System::Boolean Form1::isValidAffectRom(void)
|
||||
// (修正可エラーは入力によって修正されてるかもしれないのでチェックしない)
|
||||
for each( RCMrcError ^err in this->hSrl->hErrorList )
|
||||
{
|
||||
if( !err->EnableModify ) // すべてSRLバイナリに影響する
|
||||
if( !err->IsEnableModify ) // すべてSRLバイナリに影響する
|
||||
count++;
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ System::Boolean Form1::isValidAffectRom(void)
|
||||
// (エラーリストが更新されていることが前提)
|
||||
for each( RCMrcError ^err in this->hErrorList )
|
||||
{
|
||||
if( err->AffectRom ) // 修正不可エラーは存在しない
|
||||
if( err->IsAffectRom ) // 修正不可エラーは存在しない
|
||||
count++;
|
||||
}
|
||||
return (count == 0);
|
||||
@ -256,7 +256,7 @@ System::Boolean Form1::isValidAffectRomModified(void)
|
||||
System::Int32 count = 0;
|
||||
for each( RCMrcError ^err in this->hErrorList )
|
||||
{
|
||||
if( err->AffectRom ) // 修正不可エラーは存在しない
|
||||
if( err->IsAffectRom ) // 修正不可エラーは存在しない
|
||||
count++;
|
||||
}
|
||||
return (count == 0);
|
||||
|
||||
Binary file not shown.
@ -25,7 +25,7 @@ using namespace MasterEditorTWL;
|
||||
// @arg [in] 英語フラグ
|
||||
//
|
||||
ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
System::String ^hFilename, MasterEditorTWL::RCSrl ^hSrl, System::UInt16 ^hCRC, System::String ^hSrlFilename, System::Boolean english )
|
||||
System::String ^hFilename, MasterEditorTWL::RCSrl ^hSrl, System::UInt16 CRC, System::String ^hSrlFilename, System::Boolean english )
|
||||
{
|
||||
// テンプレートを読み込む
|
||||
System::Xml::XmlDocument ^doc = gcnew System::Xml::XmlDocument();
|
||||
@ -53,24 +53,24 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
|
||||
// アプリ種別
|
||||
System::String ^apptype = gcnew System::String("");
|
||||
if( *hSrl->hIsAppLauncher )
|
||||
if( hSrl->IsAppLauncher )
|
||||
{
|
||||
apptype = gcnew System::String( "Launcher" );
|
||||
}
|
||||
else if( *hSrl->hIsAppSecure )
|
||||
else if( hSrl->IsAppSecure )
|
||||
{
|
||||
apptype = gcnew System::String( "Secure" );
|
||||
}
|
||||
else if( *hSrl->hIsAppSystem )
|
||||
else if( hSrl->IsAppSystem )
|
||||
{
|
||||
apptype = gcnew System::String( "System" );
|
||||
}
|
||||
else if( *hSrl->hIsAppUser )
|
||||
else if( hSrl->IsAppUser )
|
||||
{
|
||||
apptype = gcnew System::String( "User" );
|
||||
}
|
||||
System::String ^media = gcnew System::String("");
|
||||
if( *hSrl->hIsMediaNand )
|
||||
if( hSrl->IsMediaNand )
|
||||
{
|
||||
media = gcnew System::String( "NAND" );
|
||||
}
|
||||
@ -79,42 +79,42 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
media = gcnew System::String( "Game Card" );
|
||||
}
|
||||
System::String ^appother = gcnew System::String("");
|
||||
if( *(hSrl->hIsLaunch) == false )
|
||||
if( !hSrl->IsLaunch )
|
||||
{
|
||||
appother += "ランチャー非表示.";
|
||||
}
|
||||
if( *(hSrl->hIsDataOnly) == true )
|
||||
if( hSrl->IsDataOnly )
|
||||
{
|
||||
apptype += "データ専用.";
|
||||
}
|
||||
|
||||
// アクセスコントロール その他
|
||||
System::String ^access = gcnew System::String("");
|
||||
if( *(hSrl->hIsCommonClientKey) == true )
|
||||
if( hSrl->IsCommonClientKey )
|
||||
{
|
||||
access += "commonClientKey. ";
|
||||
}
|
||||
if( *(hSrl->hIsAesSlotBForES) == true )
|
||||
if( hSrl->IsAesSlotBForES )
|
||||
{
|
||||
access += "AES-SlotB(ES). ";
|
||||
}
|
||||
if( *(hSrl->hIsAesSlotCForNAM) == true )
|
||||
if( hSrl->IsAesSlotCForNAM )
|
||||
{
|
||||
access += "AES-SlotC(NAM). ";
|
||||
}
|
||||
if( *(hSrl->hIsAesSlotBForJpegEnc) == true )
|
||||
if( hSrl->IsAesSlotBForJpegEnc )
|
||||
{
|
||||
access += "AES-SlotB(Jpeg Launcher). ";
|
||||
}
|
||||
if( *(hSrl->hIsAesSlotBForJpegEncUser) == true )
|
||||
if( hSrl->IsAesSlotBForJpegEncUser )
|
||||
{
|
||||
access += "AES-SlotB(Jpeg User). ";
|
||||
}
|
||||
if( *(hSrl->hIsAesSlotAForSSL) == true )
|
||||
if( hSrl->IsAesSlotAForSSL )
|
||||
{
|
||||
access += "AES-SlotA(SSL). ";
|
||||
}
|
||||
if( *(hSrl->hIsCommonClientKeyForDebugger) == true )
|
||||
if( hSrl->IsCommonClientKeyForDebugger )
|
||||
{
|
||||
access += "commonClientKey(Debug). ";
|
||||
}
|
||||
@ -153,7 +153,7 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagReleaseForeign" ) )
|
||||
{
|
||||
if( *(this->hReleaseForeign) )
|
||||
if( this->IsReleaseForeign )
|
||||
node->FirstChild->Value = gcnew System::String( "○" );
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
@ -172,27 +172,27 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagSubmitYear" ) )
|
||||
{
|
||||
node->FirstChild->Value = this->hSubmitYear->ToString();
|
||||
node->FirstChild->Value = this->SubmitYear.ToString();
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagSubmitMonth" ) )
|
||||
{
|
||||
node->FirstChild->Value = this->hSubmitMonth->ToString();
|
||||
node->FirstChild->Value = this->SubmitMonth.ToString();
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagSubmitDay" ) )
|
||||
{
|
||||
node->FirstChild->Value = this->hSubmitDay->ToString();
|
||||
node->FirstChild->Value = this->SubmitDay.ToString();
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagReleaseYear" ) )
|
||||
{
|
||||
node->FirstChild->Value = this->hReleaseYear->ToString();
|
||||
node->FirstChild->Value = this->ReleaseYear.ToString();
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagReleaseMonth" ) )
|
||||
{
|
||||
node->FirstChild->Value = this->hReleaseMonth->ToString();
|
||||
node->FirstChild->Value = this->ReleaseMonth.ToString();
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagReleaseDay" ) )
|
||||
{
|
||||
node->FirstChild->Value = this->hReleaseDay->ToString();
|
||||
node->FirstChild->Value = this->ReleaseDay.ToString();
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagSubmitWay" ) )
|
||||
{
|
||||
@ -208,8 +208,8 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagRomVersion" ) )
|
||||
{
|
||||
node->FirstChild->Value = hSrl->hRomVersion->ToString("X2");
|
||||
if( *(hSrl->hRomVersion) == 0xE0 )
|
||||
node->FirstChild->Value = hSrl->RomVersion.ToString("X2");
|
||||
if( hSrl->RomVersion == 0xE0 )
|
||||
{
|
||||
if( english )
|
||||
node->FirstChild->Value += "(Preliminary ver.)";
|
||||
@ -219,7 +219,7 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagSubmitVersion" ) )
|
||||
{
|
||||
node->FirstChild->Value = this->hSubmitVersion->ToString("X");
|
||||
node->FirstChild->Value = this->SubmitVersion.ToString("X");
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagSrlFilename" ) )
|
||||
{
|
||||
@ -227,7 +227,7 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagCRC" ) )
|
||||
{
|
||||
node->FirstChild->Value = "0x" + hCRC->ToString("X");
|
||||
node->FirstChild->Value = "0x" + CRC.ToString("X4");
|
||||
}
|
||||
// ROM情報
|
||||
if( node->FirstChild->Value->Equals( "TagLatency" ) )
|
||||
@ -261,7 +261,7 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagTitleIDHi" ) )
|
||||
{
|
||||
node->FirstChild->Value = "0x" + hSrl->hTitleIDHi->ToString("X8");
|
||||
node->FirstChild->Value = "0x" + hSrl->TitleIDHi.ToString("X8");
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagAppType" ) )
|
||||
{
|
||||
@ -277,102 +277,102 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsNormalJump" ) )
|
||||
{
|
||||
if( *(hSrl->hIsNormalJump) == true )
|
||||
if( hSrl->IsNormalJump )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsTmpJump" ) )
|
||||
{
|
||||
if( *(hSrl->hIsTmpJump) == true )
|
||||
if( hSrl->IsTmpJump )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagNormalRomOffset" ) )
|
||||
{
|
||||
node->FirstChild->Value = "0x" + hSrl->hNormalRomOffset->ToString("X8");
|
||||
node->FirstChild->Value = "0x" + hSrl->NormalRomOffset.ToString("X8");
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagKeyTableRomOffset" ) )
|
||||
{
|
||||
node->FirstChild->Value = "0x" + hSrl->hKeyTableRomOffset->ToString("X8");
|
||||
node->FirstChild->Value = "0x" + hSrl->KeyTableRomOffset.ToString("X8");
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagPublicSize" ) )
|
||||
{
|
||||
node->FirstChild->Value = MasterEditorTWL::transSizeToString( hSrl->hPublicSize );
|
||||
node->FirstChild->Value = MasterEditorTWL::transSizeToString( hSrl->PublicSize );
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagPrivateSize" ) )
|
||||
{
|
||||
node->FirstChild->Value = MasterEditorTWL::transSizeToString( hSrl->hPrivateSize );
|
||||
node->FirstChild->Value = MasterEditorTWL::transSizeToString( hSrl->PrivateSize );
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsCodec" ) )
|
||||
{
|
||||
if( *(hSrl->hIsCodecTWL) == true )
|
||||
if( hSrl->IsCodecTWL )
|
||||
node->FirstChild->Value = gcnew System::String("TWL");
|
||||
else
|
||||
node->FirstChild->Value = gcnew System::String("NTR");
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsEULA" ) )
|
||||
{
|
||||
if( *(hSrl->hIsEULA) == true )
|
||||
if( hSrl->IsEULA )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsSubBanner" ) )
|
||||
{
|
||||
if( *(hSrl->hIsSubBanner) == true )
|
||||
if( hSrl->IsSubBanner )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsWiFiIcon" ) )
|
||||
{
|
||||
if( *(hSrl->hIsWiFiIcon) == true )
|
||||
if( hSrl->IsWiFiIcon )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsWirelessIcon" ) )
|
||||
{
|
||||
if( *(hSrl->hIsWirelessIcon) == true )
|
||||
if( hSrl->IsWirelessIcon )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsWL" ) )
|
||||
{
|
||||
if( *(hSrl->hIsWL) == true )
|
||||
if( hSrl->IsWL )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsSD" ) )
|
||||
{
|
||||
if( *(hSrl->hIsSD) == true )
|
||||
if( hSrl->IsSD )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsNAND" ) )
|
||||
{
|
||||
if( *(hSrl->hIsNAND) == true )
|
||||
if( hSrl->IsNAND )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsShared2" ) )
|
||||
{
|
||||
if( *(hSrl->hIsShared2) == true )
|
||||
if( hSrl->IsShared2 )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsGameCardOn" ) )
|
||||
{
|
||||
if( *(hSrl->hIsGameCardNitro) == true )
|
||||
if( hSrl->IsGameCardNitro )
|
||||
node->FirstChild->Value = gcnew System::String("ON(NTR)");
|
||||
else if( *(hSrl->hIsGameCardOn) == true )
|
||||
else if( hSrl->IsGameCardOn )
|
||||
node->FirstChild->Value = gcnew System::String("ON(normal)");
|
||||
else
|
||||
node->FirstChild->Value = gcnew System::String("OFF");;
|
||||
@ -509,14 +509,14 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
// SRLに登録されないROM仕様
|
||||
if( node->FirstChild->Value->Equals( "TagIsUGC" ) )
|
||||
{
|
||||
if( *(this->hIsUGC) == true )
|
||||
if( this->IsUGC )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
}
|
||||
if( node->FirstChild->Value->Equals( "TagIsPhotoEx" ) )
|
||||
{
|
||||
if( *(this->hIsPhotoEx) == true )
|
||||
if( this->IsPhotoEx )
|
||||
node->FirstChild->Value = gcnew System::String("○");
|
||||
else
|
||||
node->FirstChild->Value = nullptr;
|
||||
@ -525,7 +525,7 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
|
||||
// ROM内登録データを1バイトずつ表に書き込む
|
||||
if( node->FirstChild->Value->Equals( "TagRomVersionHex" ) )
|
||||
{
|
||||
node->FirstChild->Value = hSrl->hRomVersion->ToString("X2");
|
||||
node->FirstChild->Value = hSrl->RomVersion.ToString("X2");
|
||||
}
|
||||
System::Int32 byte;
|
||||
for( byte=0; byte < TITLE_NAME_MAX; byte++ )
|
||||
|
||||
@ -45,18 +45,18 @@ namespace MasterEditorTWL
|
||||
property System::String ^hProductName; // 製品名
|
||||
property System::String ^hProductCode1; // 製品コード
|
||||
property System::String ^hProductCode2; // 製品コード
|
||||
property System::Int32 ^hReleaseYear; // 発売予定日
|
||||
property System::Int32 ^hReleaseMonth;
|
||||
property System::Int32 ^hReleaseDay;
|
||||
property System::Int32 ^hSubmitYear; // 提出日
|
||||
property System::Int32 ^hSubmitMonth;
|
||||
property System::Int32 ^hSubmitDay;
|
||||
property System::Int32 ReleaseYear; // 発売予定日
|
||||
property System::Int32 ReleaseMonth;
|
||||
property System::Int32 ReleaseDay;
|
||||
property System::Int32 SubmitYear; // 提出日
|
||||
property System::Int32 SubmitMonth;
|
||||
property System::Int32 SubmitDay;
|
||||
property System::String ^hSubmitWay; // 提出方法
|
||||
property System::String ^hUsage; // 用途
|
||||
property System::String ^hUsageOther; // その他の用途
|
||||
property System::Int32 ^hSubmitVersion; // 提出バージョン
|
||||
property System::Int32 SubmitVersion; // 提出バージョン
|
||||
property System::String ^hSDK; // SDKバージョン
|
||||
property System::Boolean ^hReleaseForeign; // 海外版の予定
|
||||
property System::Boolean IsReleaseForeign; // 海外版の予定
|
||||
property System::String ^hProductNameForeign;
|
||||
property System::String ^hProductCode1Foreign;
|
||||
property System::String ^hProductCode2Foreign;
|
||||
@ -98,8 +98,8 @@ namespace MasterEditorTWL
|
||||
property System::String ^hAppTypeOther; // 特記事項
|
||||
|
||||
// SRLには登録されないROM仕様
|
||||
property System::Boolean ^hIsUGC;
|
||||
property System::Boolean ^hIsPhotoEx;
|
||||
property System::Boolean IsUGC;
|
||||
property System::Boolean IsPhotoEx;
|
||||
|
||||
// constructor and destructor
|
||||
public:
|
||||
@ -117,7 +117,7 @@ namespace MasterEditorTWL
|
||||
// @arg [in] 英語フラグ
|
||||
//
|
||||
ECDeliverableResult writeSpreadsheet(
|
||||
System::String ^hFilename, RCSrl ^hSrl, System::UInt16 ^hCRC, System::String ^hSrlFilename, System::Boolean english );
|
||||
System::String ^hFilename, RCSrl ^hSrl, System::UInt16 CRC, System::String ^hSrlFilename, System::Boolean english );
|
||||
|
||||
}; // end of ref class RCDeliverable
|
||||
|
||||
|
||||
@ -172,9 +172,9 @@ ECSrlResult RCSrl::setRomInfo(void)
|
||||
this->hRomSize = MasterEditorTWL::transRomSizeToString( this->pRomHeader->s.rom_size );
|
||||
//this->hForKorea = gcnew System::Byte( this->pRomHeader->s.for_korea );
|
||||
//this->hForChina = gcnew System::Byte( this->pRomHeader->s.for_china );
|
||||
this->hRomVersion = gcnew System::Byte( this->pRomHeader->s.rom_version );
|
||||
this->hHeaderCRC = gcnew System::UInt16( this->pRomHeader->s.header_crc16 );
|
||||
this->hIsOldDevEncrypt = gcnew System::Boolean( (this->pRomHeader->s.developer_encrypt_old != 0)?true:false );
|
||||
this->RomVersion = this->pRomHeader->s.rom_version;
|
||||
this->HeaderCRC = this->pRomHeader->s.header_crc16;
|
||||
this->IsOldDevEncrypt = (this->pRomHeader->s.developer_encrypt_old != 0)?true:false;
|
||||
|
||||
switch( this->pRomHeader->s.game_cmd_param & CARD_LATENCY_MASK )
|
||||
{
|
||||
@ -192,132 +192,132 @@ ECSrlResult RCSrl::setRomInfo(void)
|
||||
}
|
||||
|
||||
// TWL専用情報
|
||||
this->hIsNormalJump = gcnew System::Boolean( (this->pRomHeader->s.permit_landing_normal_jump != 0)?true:false );
|
||||
this->hIsTmpJump = gcnew System::Boolean( (this->pRomHeader->s.permit_landing_tmp_jump != 0)?true:false );
|
||||
this->hNormalRomOffset = gcnew System::UInt32( (u32)(this->pRomHeader->s.twl_card_normal_area_rom_offset) * 0x80000 );
|
||||
this->hKeyTableRomOffset = gcnew System::UInt32( (u32)(this->pRomHeader->s.twl_card_keytable_area_rom_offset) * 0x80000 );
|
||||
this->hPublicSize = gcnew System::UInt32( this->pRomHeader->s.public_save_data_size );
|
||||
this->hPrivateSize = gcnew System::UInt32( this->pRomHeader->s.private_save_data_size );
|
||||
this->IsNormalJump = (this->pRomHeader->s.permit_landing_normal_jump != 0)?true:false;
|
||||
this->IsTmpJump = (this->pRomHeader->s.permit_landing_tmp_jump != 0)?true:false;
|
||||
this->NormalRomOffset = (u32)(this->pRomHeader->s.twl_card_normal_area_rom_offset) * 0x80000;
|
||||
this->KeyTableRomOffset = (u32)(this->pRomHeader->s.twl_card_keytable_area_rom_offset) * 0x80000;
|
||||
this->PublicSize = this->pRomHeader->s.public_save_data_size;
|
||||
this->PrivateSize = this->pRomHeader->s.private_save_data_size;
|
||||
|
||||
u8 *idL = this->pRomHeader->s.titleID_Lo;
|
||||
u32 idH = this->pRomHeader->s.titleID_Hi;
|
||||
//u32 val;
|
||||
//val = ((u32)(idL[0]) << 24) | ((u32)(idL[1]) << 16) | ((u32)(idL[2]) << 8) | ((u32)(idL[3])); // ビッグエンディアン
|
||||
//this->hTitleIDLo = gcnew System::UInt32( val );
|
||||
this->hTitleIDLo = gcnew System::String( (char*)idL, 0, 4, utf8 );
|
||||
this->hTitleIDHi = gcnew System::UInt32( idH );
|
||||
this->hTitleIDLo = gcnew System::String( (char*)idL, 0, 4, utf8 );
|
||||
this->TitleIDHi = idH;
|
||||
|
||||
// TitleIDからわかる情報
|
||||
this->hIsAppLauncher = gcnew System::Boolean( false );
|
||||
this->hIsAppUser = gcnew System::Boolean( false );
|
||||
this->hIsAppSystem = gcnew System::Boolean( false );
|
||||
this->hIsAppSecure = gcnew System::Boolean( false );
|
||||
this->hIsLaunch = gcnew System::Boolean( false );
|
||||
this->hIsMediaNand = gcnew System::Boolean( false );
|
||||
this->hIsDataOnly = gcnew System::Boolean( false );
|
||||
this->IsAppLauncher = false;
|
||||
this->IsAppUser = false;
|
||||
this->IsAppSystem = false;
|
||||
this->IsAppSecure = false;
|
||||
this->IsLaunch = false;
|
||||
this->IsMediaNand = false;
|
||||
this->IsDataOnly = false;
|
||||
if( (idL[3]=='H') && (idL[2]=='N') && (idL[1]=='A') ) // ランチャアプリかどうかはTitleID_Loの値で決定
|
||||
{
|
||||
*(this->hIsAppLauncher) = true;
|
||||
this->IsAppLauncher = true;
|
||||
}
|
||||
else if( idH & TITLE_ID_HI_SECURE_FLAG_MASK ) // 各ビットは排他的とは限らないのでelse ifにはならない
|
||||
{
|
||||
*(this->hIsAppSecure) = true;
|
||||
this->IsAppSecure = true;
|
||||
}
|
||||
else if( (idH & TITLE_ID_HI_APP_TYPE_MASK) == 1 )
|
||||
{
|
||||
*(this->hIsAppSystem) = true;
|
||||
this->IsAppSystem = true;
|
||||
}
|
||||
else if( (idH & TITLE_ID_HI_APP_TYPE_MASK) == 0 )
|
||||
{
|
||||
*(this->hIsAppUser) = true;
|
||||
this->IsAppUser = true;
|
||||
}
|
||||
if( idH & TITLE_ID_HI_DATA_ONLY_FLAG_MASK )
|
||||
{
|
||||
*(this->hIsDataOnly) = true;
|
||||
this->IsDataOnly = true;
|
||||
}
|
||||
if( idH & TITLE_ID_HI_MEDIA_MASK )
|
||||
{
|
||||
*(this->hIsMediaNand) = true;
|
||||
this->IsMediaNand = true;
|
||||
}
|
||||
if( (idH & TITLE_ID_HI_NOT_LAUNCH_FLAG_MASK) == 0 ) // ビットが0のときLaunch
|
||||
{
|
||||
*(this->hIsLaunch) = true;
|
||||
this->IsLaunch = true;
|
||||
}
|
||||
u16 pub = (u16)((idH & TITLE_ID_HI_PUBLISHER_CODE_MASK) >> TITLE_ID_HI_PUBLISHER_CODE_SHIFT);
|
||||
this->hPublisherCode = gcnew System::UInt16( pub );
|
||||
this->PublisherCode = pub;
|
||||
|
||||
// TWL拡張フラグ
|
||||
this->hIsCodecTWL = gcnew System::Boolean( (this->pRomHeader->s.exFlags.codec_mode != 0)?true:false );
|
||||
this->hIsEULA = gcnew System::Boolean( (this->pRomHeader->s.exFlags.agree_EULA != 0)?true:false );
|
||||
this->hIsSubBanner = gcnew System::Boolean( (this->pRomHeader->s.exFlags.availableSubBannerFile != 0)?true:false );
|
||||
this->hIsWiFiIcon = gcnew System::Boolean( (this->pRomHeader->s.exFlags.WiFiConnectionIcon != 0)?true:false );
|
||||
this->hIsWirelessIcon = gcnew System::Boolean( (this->pRomHeader->s.exFlags.DSWirelessIcon != 0)?true:false );
|
||||
this->hIsWL = gcnew System::Boolean( (this->pRomHeader->s.exFlags.enable_nitro_whitelist_signature != 0)?true:false );
|
||||
this->IsCodecTWL = (this->pRomHeader->s.exFlags.codec_mode != 0)?true:false;
|
||||
this->IsEULA = (this->pRomHeader->s.exFlags.agree_EULA != 0)?true:false;
|
||||
this->IsSubBanner = (this->pRomHeader->s.exFlags.availableSubBannerFile != 0)?true:false;
|
||||
this->IsWiFiIcon = (this->pRomHeader->s.exFlags.WiFiConnectionIcon != 0)?true:false;
|
||||
this->IsWirelessIcon = (this->pRomHeader->s.exFlags.DSWirelessIcon != 0)?true:false;
|
||||
this->IsWL = (this->pRomHeader->s.exFlags.enable_nitro_whitelist_signature != 0)?true:false;
|
||||
|
||||
// TWLアクセスコントロール
|
||||
this->hIsCommonClientKey = gcnew System::Boolean( (this->pRomHeader->s.access_control.common_client_key != 0)?true:false );
|
||||
this->hIsAesSlotBForES = gcnew System::Boolean( (this->pRomHeader->s.access_control.hw_aes_slot_B != 0)?true:false );
|
||||
this->hIsAesSlotCForNAM = gcnew System::Boolean( (this->pRomHeader->s.access_control.hw_aes_slot_C != 0)?true:false );
|
||||
this->hIsSD = gcnew System::Boolean( (this->pRomHeader->s.access_control.sd_card_access != 0)?true:false );
|
||||
this->hIsNAND = gcnew System::Boolean( (this->pRomHeader->s.access_control.nand_access != 0)?true:false );
|
||||
this->hIsGameCardOn = gcnew System::Boolean( (this->pRomHeader->s.access_control.game_card_on != 0)?true:false );
|
||||
this->hIsShared2 = gcnew System::Boolean( (this->pRomHeader->s.access_control.shared2_file != 0)?true:false );
|
||||
this->hIsAesSlotBForJpegEnc = gcnew System::Boolean( (this->pRomHeader->s.access_control.hw_aes_slot_B_SignJPEGForLauncher != 0)?true:false );
|
||||
this->hIsAesSlotBForJpegEncUser = gcnew System::Boolean( (this->pRomHeader->s.access_control.hw_aes_slot_B_SignJPEGForUser != 0)?true:false );
|
||||
this->hIsGameCardNitro = gcnew System::Boolean( (this->pRomHeader->s.access_control.game_card_nitro_mode != 0)?true:false );
|
||||
this->hIsAesSlotAForSSL = gcnew System::Boolean( (this->pRomHeader->s.access_control.hw_aes_slot_A_SSLClientCert != 0)?true:false );
|
||||
this->hIsCommonClientKeyForDebugger
|
||||
= gcnew System::Boolean( (this->pRomHeader->s.access_control.common_client_key_for_debugger_sysmenu != 0)?true:false );
|
||||
this->IsCommonClientKey = (this->pRomHeader->s.access_control.common_client_key != 0)?true:false;
|
||||
this->IsAesSlotBForES = (this->pRomHeader->s.access_control.hw_aes_slot_B != 0)?true:false;
|
||||
this->IsAesSlotCForNAM = (this->pRomHeader->s.access_control.hw_aes_slot_C != 0)?true:false;
|
||||
this->IsSD = (this->pRomHeader->s.access_control.sd_card_access != 0)?true:false;
|
||||
this->IsNAND = (this->pRomHeader->s.access_control.nand_access != 0)?true:false;
|
||||
this->IsGameCardOn = (this->pRomHeader->s.access_control.game_card_on != 0)?true:false;
|
||||
this->IsShared2 = (this->pRomHeader->s.access_control.shared2_file != 0)?true:false;
|
||||
this->IsAesSlotBForJpegEnc = (this->pRomHeader->s.access_control.hw_aes_slot_B_SignJPEGForLauncher != 0)?true:false;
|
||||
this->IsAesSlotBForJpegEncUser = (this->pRomHeader->s.access_control.hw_aes_slot_B_SignJPEGForUser != 0)?true:false;
|
||||
this->IsGameCardNitro = (this->pRomHeader->s.access_control.game_card_nitro_mode != 0)?true:false;
|
||||
this->IsAesSlotAForSSL = (this->pRomHeader->s.access_control.hw_aes_slot_A_SSLClientCert != 0)?true:false;
|
||||
this->IsCommonClientKeyForDebugger
|
||||
= (this->pRomHeader->s.access_control.common_client_key_for_debugger_sysmenu != 0)?true:false;
|
||||
|
||||
// SCFG がロックされるか
|
||||
if( (this->pRomHeader->s.arm7_scfg_ext >> 31) != 0 )
|
||||
{
|
||||
this->hIsSCFGAccess = gcnew System::Boolean( true );
|
||||
this->IsSCFGAccess = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->hIsSCFGAccess = gcnew System::Boolean( false );
|
||||
this->IsSCFGAccess = false;
|
||||
}
|
||||
|
||||
|
||||
// Shared2ファイルサイズ
|
||||
this->hShared2SizeArray = gcnew cli::array<System::UInt32^>(METWL_NUMOF_SHARED2FILES);
|
||||
this->hShared2SizeArray = gcnew cli::array<System::UInt32>(METWL_NUMOF_SHARED2FILES);
|
||||
for( i=0; i < METWL_NUMOF_SHARED2FILES; i++ )
|
||||
{
|
||||
this->hShared2SizeArray[i] = gcnew System::UInt32( 0 );
|
||||
this->hShared2SizeArray[i] = 0;
|
||||
}
|
||||
u32 unit = 16 * 1024; // 16KBの乗数が格納されている
|
||||
if( this->pRomHeader->s.shared2_file0_size != 0 )
|
||||
{
|
||||
*(this->hShared2SizeArray[0]) = (this->pRomHeader->s.shared2_file0_size * unit) + unit;
|
||||
this->hShared2SizeArray[0] = (this->pRomHeader->s.shared2_file0_size * unit) + unit;
|
||||
}
|
||||
if( this->pRomHeader->s.shared2_file1_size != 0 )
|
||||
{
|
||||
*(this->hShared2SizeArray[1]) = (this->pRomHeader->s.shared2_file1_size * unit) + unit;
|
||||
this->hShared2SizeArray[1] = (this->pRomHeader->s.shared2_file1_size * unit) + unit;
|
||||
}
|
||||
if( this->pRomHeader->s.shared2_file2_size != 0 )
|
||||
{
|
||||
*(this->hShared2SizeArray[2]) = (this->pRomHeader->s.shared2_file2_size * unit) + unit;
|
||||
this->hShared2SizeArray[2] = (this->pRomHeader->s.shared2_file2_size * unit) + unit;
|
||||
}
|
||||
if( this->pRomHeader->s.shared2_file3_size != 0 )
|
||||
{
|
||||
*(this->hShared2SizeArray[3]) = (this->pRomHeader->s.shared2_file3_size * unit) + unit;
|
||||
this->hShared2SizeArray[3] = (this->pRomHeader->s.shared2_file3_size * unit) + unit;
|
||||
}
|
||||
if( this->pRomHeader->s.shared2_file4_size != 0 )
|
||||
{
|
||||
*(this->hShared2SizeArray[4]) = (this->pRomHeader->s.shared2_file4_size * unit) + unit;
|
||||
this->hShared2SizeArray[4] = (this->pRomHeader->s.shared2_file4_size * unit) + unit;
|
||||
}
|
||||
if( this->pRomHeader->s.shared2_file5_size != 0 )
|
||||
{
|
||||
*(this->hShared2SizeArray[5]) = (this->pRomHeader->s.shared2_file5_size * unit) + unit;
|
||||
this->hShared2SizeArray[5] = (this->pRomHeader->s.shared2_file5_size * unit) + unit;
|
||||
}
|
||||
|
||||
// カードリージョン
|
||||
const u32 map = this->pRomHeader->s.card_region_bitmap;
|
||||
this->hIsRegionJapan = gcnew System::Boolean( ((map & METWL_MASK_REGION_JAPAN) != 0)?true:false );
|
||||
this->hIsRegionAmerica = gcnew System::Boolean( ((map & METWL_MASK_REGION_AMERICA) != 0)?true:false );
|
||||
this->hIsRegionEurope = gcnew System::Boolean( ((map & METWL_MASK_REGION_EUROPE) != 0)?true:false );
|
||||
this->hIsRegionAustralia = gcnew System::Boolean( ((map & METWL_MASK_REGION_AUSTRALIA) != 0)?true:false );
|
||||
this->IsRegionJapan = ((map & METWL_MASK_REGION_JAPAN) != 0)?true:false;
|
||||
this->IsRegionAmerica = ((map & METWL_MASK_REGION_AMERICA) != 0)?true:false;
|
||||
this->IsRegionEurope = ((map & METWL_MASK_REGION_EUROPE) != 0)?true:false;
|
||||
this->IsRegionAustralia = ((map & METWL_MASK_REGION_AUSTRALIA) != 0)?true:false;
|
||||
|
||||
// ペアレンタルコントロール
|
||||
this->setParentalControlInfo();
|
||||
@ -460,19 +460,19 @@ ECSrlResult RCSrl::setRomHeader(void)
|
||||
// ROMヘッダの[0,0x160)の領域はRead Onlyで変更しない
|
||||
|
||||
// いくつかのフラグをROMヘッダに反映
|
||||
this->pRomHeader->s.exFlags.agree_EULA = (*(this->hIsEULA) == true)?1:0;
|
||||
this->pRomHeader->s.exFlags.WiFiConnectionIcon = (*(this->hIsWiFiIcon) == true)?1:0;
|
||||
this->pRomHeader->s.exFlags.DSWirelessIcon = (*(this->hIsWirelessIcon) == true)?1:0;
|
||||
this->pRomHeader->s.exFlags.agree_EULA = (this->IsEULA == true)?1:0;
|
||||
this->pRomHeader->s.exFlags.WiFiConnectionIcon = (this->IsWiFiIcon == true)?1:0;
|
||||
this->pRomHeader->s.exFlags.DSWirelessIcon = (this->IsWirelessIcon == true)?1:0;
|
||||
|
||||
// レーティング
|
||||
u32 map = 0;
|
||||
if( *(this->hIsRegionJapan) == true ) { map |= METWL_MASK_REGION_JAPAN; }
|
||||
if( *(this->hIsRegionAmerica) == true ) { map |= METWL_MASK_REGION_AMERICA; }
|
||||
if( *(this->hIsRegionEurope) == true ) { map |= METWL_MASK_REGION_EUROPE; }
|
||||
if( *(this->hIsRegionAustralia) == true ){ map |= METWL_MASK_REGION_AUSTRALIA; }
|
||||
if( this->IsRegionJapan == true ) { map |= METWL_MASK_REGION_JAPAN; }
|
||||
if( this->IsRegionAmerica == true ) { map |= METWL_MASK_REGION_AMERICA; }
|
||||
if( this->IsRegionEurope == true ) { map |= METWL_MASK_REGION_EUROPE; }
|
||||
if( this->IsRegionAustralia == true ){ map |= METWL_MASK_REGION_AUSTRALIA; }
|
||||
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||
if( (*(this->hIsRegionJapan) == true ) && (*(this->hIsRegionAmerica) == true)
|
||||
&& (*(this->hIsRegionEurope) == true ) && (*(this->hIsRegionAustralia) == true)
|
||||
if( (this->IsRegionJapan == true ) && (this->IsRegionAmerica == true)
|
||||
&& (this->IsRegionEurope == true ) && (this->IsRegionAustralia == true)
|
||||
)
|
||||
{
|
||||
map |= METWL_MASK_REGION_ALL; // オールリージョンを許す
|
||||
@ -594,7 +594,7 @@ ECSrlResult RCSrl::signRomHeader(void)
|
||||
|
||||
// 鍵を選ぶ
|
||||
#ifdef METWL_VER_APPTYPE_LAUNCHER
|
||||
if( *this->hIsAppLauncher )
|
||||
if( this->IsAppLauncher )
|
||||
{
|
||||
privateKey = (u8*)g_devPrivKey_DER_launcher;
|
||||
publicKey = (u8*)g_devPubKey_DER_launcher;
|
||||
@ -602,7 +602,7 @@ ECSrlResult RCSrl::signRomHeader(void)
|
||||
else
|
||||
#endif //METWL_VER_APPTYPE_LAUNCHER
|
||||
#ifdef METWL_VER_APPTYPE_SECURE
|
||||
if( *this->hIsAppSecure )
|
||||
if( this->IsAppSecure )
|
||||
{
|
||||
privateKey = (u8*)g_devPrivKey_DER_secure;
|
||||
publicKey = (u8*)g_devPubKey_DER_secure;
|
||||
@ -610,7 +610,7 @@ ECSrlResult RCSrl::signRomHeader(void)
|
||||
else
|
||||
#endif //METWL_VER_APPTYPE_SECURE
|
||||
#ifdef METWL_VER_APPTYPE_SYSTEM
|
||||
if( *this->hIsAppSystem )
|
||||
if( this->IsAppSystem )
|
||||
{
|
||||
privateKey = (u8*)g_devPrivKey_DER_system;
|
||||
publicKey = (u8*)g_devPubKey_DER_system;
|
||||
@ -761,23 +761,23 @@ ECSrlResult RCSrl::hasDSDLPlaySign( FILE *fp )
|
||||
offset = this->pRomHeader->s.rom_valid_size;
|
||||
if( fseek( fp, offset, SEEK_SET ) != 0 )
|
||||
{
|
||||
this->hHasDSDLPlaySign = gcnew System::Boolean( false ); // 署名はNTRのROM領域の最後に入るので
|
||||
return ECSrlResult::ERROR_FILE_READ; // NTRのSRLに署名が格納されていない場合はシークもリードもできない
|
||||
this->HasDSDLPlaySign = false; // 署名はNTRのROM領域の最後に入るので
|
||||
return ECSrlResult::ERROR_FILE_READ; // NTRのSRLに署名が格納されていない場合はシークもリードもできない
|
||||
}
|
||||
if( DSDLPLAY_SIZE != fread( buf, 1, DSDLPLAY_SIZE, fp ) )
|
||||
{
|
||||
this->hHasDSDLPlaySign = gcnew System::Boolean( false );
|
||||
this->HasDSDLPlaySign = false;
|
||||
return ECSrlResult::ERROR_FILE_READ;
|
||||
}
|
||||
|
||||
// 最初の2バイトが固定の値となることが保証されているのでその値かどうかで判定
|
||||
if( (buf[0] == 'a') && (buf[1] == 'c') )
|
||||
{
|
||||
this->hHasDSDLPlaySign = gcnew System::Boolean( true );
|
||||
this->HasDSDLPlaySign = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->hHasDSDLPlaySign = gcnew System::Boolean( false );
|
||||
this->HasDSDLPlaySign = false;
|
||||
}
|
||||
return (ECSrlResult::NOERROR);
|
||||
}
|
||||
@ -1068,7 +1068,7 @@ ECSrlResult RCSrl::mrcNTR( FILE *fp )
|
||||
// CRC
|
||||
u16 crc;
|
||||
// セキュア領域
|
||||
if( *this->hIsMediaNand == false ) // カードアプリのときのみ
|
||||
if( !this->IsMediaNand ) // カードアプリのときのみ
|
||||
{
|
||||
// セキュア領域はROMヘッダ外
|
||||
u8 *secures;
|
||||
@ -1159,7 +1159,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
}
|
||||
#endif
|
||||
|
||||
if( *this->hIsOldDevEncrypt && *this->hHasDSDLPlaySign )
|
||||
if( this->IsOldDevEncrypt && this->HasDSDLPlaySign )
|
||||
{
|
||||
this->hErrorList->Add( gcnew RCMrcError(
|
||||
"旧開発用暗号フラグ", 0x1c, 0x1c,
|
||||
@ -1174,7 +1174,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
fseek( fp, 0, SEEK_END );
|
||||
u32 filesize = ftell(fp); // 実ファイルサイズ(単位Mbit)
|
||||
u32 romsize = 1 << (this->pRomHeader->s.rom_size); // ROM容量
|
||||
if( *(this->hIsMediaNand) == false ) // カードアプリのときのみのチェック
|
||||
if( !this->IsMediaNand ) // カードアプリのときのみのチェック
|
||||
{
|
||||
u32 filesizeMb = (filesize / (1024*1024)) * 8;
|
||||
if( romsize < filesizeMb )
|
||||
@ -1246,7 +1246,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
}
|
||||
}
|
||||
|
||||
if( *this->hIsAppLauncher || *this->hIsAppSecure || *this->hIsAppSystem )
|
||||
if( this->IsAppLauncher || this->IsAppSecure || this->IsAppSystem )
|
||||
{
|
||||
if( this->pRomHeader->s.disable_debug == 0 )
|
||||
{
|
||||
@ -1272,7 +1272,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
"ROM Control Info.", "Mask ROM can be set. Please set One-time PROM.", false, true ) );
|
||||
}
|
||||
|
||||
if( *this->hIsMediaNand == false )
|
||||
if( !this->IsMediaNand )
|
||||
{
|
||||
if( (this->pRomHeader->s.enable_aes == 0) || (this->pRomHeader->s.aes_target_size == 0) )
|
||||
{
|
||||
@ -1407,7 +1407,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
"Access Control Info.", "Sizes of shared2 files is setting, but using them is not enabled.", false, true ) );
|
||||
}
|
||||
}
|
||||
if( *this->hIsMediaNand == false ) // カードアプリのときのみ
|
||||
if( !this->IsMediaNand ) // カードアプリのときのみ
|
||||
{
|
||||
if( (this->pRomHeader->s.access_control.nand_access != 0) || (this->pRomHeader->s.access_control.sd_card_access != 0) )
|
||||
{
|
||||
@ -1420,7 +1420,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
}
|
||||
}
|
||||
|
||||
if( (*this->hIsWiFiIcon == true) && (*this->hIsWirelessIcon == true) )
|
||||
if( this->IsWiFiIcon && this->IsWirelessIcon )
|
||||
{
|
||||
this->hErrorList->Add( gcnew RCMrcError(
|
||||
"アイコン表示フラグ", 0x1bf, 0x1bf,
|
||||
@ -1430,7 +1430,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
true, true ) ); // 修正可能
|
||||
}
|
||||
|
||||
if( *this->hIsMediaNand == false ) // カードアプリのときのみ
|
||||
if( !this->IsMediaNand ) // カードアプリのときのみ
|
||||
{
|
||||
u32 ideal = (this->pRomHeader->s.twl_card_keytable_area_rom_offset * 0x80000) + 0x3000; // TWL KeyTable領域の開始 + KeyTableサイズ
|
||||
u32 actual = this->pRomHeader->s.main_ltd_rom_offset;
|
||||
@ -1445,7 +1445,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
}
|
||||
}
|
||||
|
||||
if( (*this->hIsAppLauncher == false) && (*this->hIsSCFGAccess == true) )
|
||||
if( !this->IsAppLauncher && this->IsSCFGAccess )
|
||||
{
|
||||
this->hWarnList->Add( gcnew RCMrcError(
|
||||
"SCFG設定", 0x1b8, 0x1bb, "SCFGレジスタへアクセス可能になっています。",
|
||||
@ -1468,13 +1468,13 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
this->mrcReservedArea(fp);
|
||||
|
||||
// 追加チェック
|
||||
if( *(this->hMrcSpecialList->hIsCheck) == true )
|
||||
if( this->hMrcSpecialList->IsCheck )
|
||||
{
|
||||
// SDKバージョン
|
||||
System::Boolean match = true;
|
||||
for each( RCSDKVersion ^sdk in this->hSDKList )
|
||||
{
|
||||
if( sdk->IsStatic && (sdk->Code != *(this->hMrcSpecialList->hSDKVer) ) )
|
||||
if( sdk->IsStatic && (sdk->Code != this->hMrcSpecialList->SDKVer) )
|
||||
{
|
||||
match = false;
|
||||
}
|
||||
@ -1489,9 +1489,9 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
||||
// Shared2ファイルサイズ
|
||||
for( i=0; i < METWL_NUMOF_SHARED2FILES; i++ )
|
||||
{
|
||||
if( *(this->hShared2SizeArray[i]) > 0 ) // 0は未使用を表すのでチェックしない
|
||||
if( this->hShared2SizeArray[i] > 0 ) // 0は未使用を表すのでチェックしない
|
||||
{
|
||||
if( *(this->hShared2SizeArray[i]) != *(this->hMrcSpecialList->hShared2SizeArray[i]) )
|
||||
if( this->hShared2SizeArray[i] != this->hMrcSpecialList->hShared2SizeArray[i] )
|
||||
{
|
||||
this->hWarnList->Add( gcnew RCMrcError(
|
||||
"Shared2ファイル" + i.ToString(), METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
|
||||
|
||||
@ -65,8 +65,8 @@ namespace MasterEditorTWL
|
||||
{
|
||||
private:
|
||||
System::String ^hVersion;
|
||||
System::UInt32 ^hCode;
|
||||
System::Boolean ^hIsStatic;
|
||||
System::UInt32 code;
|
||||
System::Boolean isStatic;
|
||||
private:
|
||||
RCSDKVersion(){} // 封じる
|
||||
public:
|
||||
@ -76,23 +76,23 @@ namespace MasterEditorTWL
|
||||
this->hVersion = gcnew System::String(""); // NULL参照バグを避ける
|
||||
else
|
||||
this->hVersion = ver;
|
||||
this->hCode = gcnew System::UInt32( code );
|
||||
this->hIsStatic = gcnew System::Boolean( isStatic );
|
||||
this->code = code;
|
||||
this->isStatic = isStatic;
|
||||
}
|
||||
public:
|
||||
property System::String ^Version // 生成後にはフィールドはRead Only
|
||||
{
|
||||
System::String^ get(){ return this->hVersion; }
|
||||
System::String^ get(){ return System::String::Copy(this->hVersion); }
|
||||
}
|
||||
public:
|
||||
property System::Boolean IsStatic
|
||||
{
|
||||
System::Boolean get(){ return *(this->hIsStatic); }
|
||||
System::Boolean get(){ return (this->isStatic); }
|
||||
}
|
||||
public:
|
||||
property System::UInt32 Code
|
||||
{
|
||||
System::UInt32 get(){ return *(this->hCode); }
|
||||
System::UInt32 get(){ return (this->code); }
|
||||
}
|
||||
};
|
||||
|
||||
@ -127,12 +127,12 @@ namespace MasterEditorTWL
|
||||
public:
|
||||
property System::String ^Name // 生成後にはフィールドはRead Only
|
||||
{
|
||||
System::String^ get(){ return this->hName; }
|
||||
System::String^ get(){ return System::String::Copy(this->hName); }
|
||||
}
|
||||
public:
|
||||
property System::String ^Publisher
|
||||
{
|
||||
System::String^ get(){ return this->hPublisher; }
|
||||
System::String^ get(){ return System::String::Copy(this->hPublisher); }
|
||||
}
|
||||
};
|
||||
|
||||
@ -148,19 +148,19 @@ namespace MasterEditorTWL
|
||||
{
|
||||
private:
|
||||
System::String ^hName; // 項目名
|
||||
System::UInt32 ^hBegin; // 開始アドレス
|
||||
System::UInt32 ^hEnd; // 終了アドレス
|
||||
System::UInt32 begin; // 開始アドレス
|
||||
System::UInt32 end; // 終了アドレス
|
||||
System::String ^hMsg; // エラーメッセージ
|
||||
System::String ^hNameE; // 英語版
|
||||
System::String ^hMsgE;
|
||||
System::Boolean ^hEnableModify; // マスタエディタで修正可能かどうか
|
||||
System::Boolean ^hAffectRom; // 変更するとSRL(ROMバイナリ)が変更されるか
|
||||
System::Boolean isEnableModify; // マスタエディタで修正可能かどうか
|
||||
System::Boolean isAffectRom; // 変更するとSRL(ROMバイナリ)が変更されるか
|
||||
private:
|
||||
RCMrcError(){} // 封じる
|
||||
public:
|
||||
RCMrcError(
|
||||
System::String ^name, System::UInt32 beg, System::UInt32 end, System::String ^msg,
|
||||
System::String ^nameE, System::String ^msgE, System::Boolean enableModify, System::Boolean affectRom )
|
||||
System::String ^nameE, System::String ^msgE, System::Boolean isEnableModify, System::Boolean isAffectRom )
|
||||
{
|
||||
if( name == nullptr )
|
||||
this->hName = gcnew System::String("");
|
||||
@ -172,8 +172,8 @@ namespace MasterEditorTWL
|
||||
else
|
||||
this->hNameE = nameE;
|
||||
|
||||
this->hBegin = gcnew System::UInt32( beg );
|
||||
this->hEnd = gcnew System::UInt32( end );
|
||||
this->begin = beg;
|
||||
this->end = end;
|
||||
|
||||
if( msg == nullptr )
|
||||
this->hMsg = gcnew System::String("");
|
||||
@ -185,23 +185,23 @@ namespace MasterEditorTWL
|
||||
else
|
||||
this->hMsgE = msgE;
|
||||
|
||||
this->hEnableModify = gcnew System::Boolean( enableModify );
|
||||
this->hAffectRom = gcnew System::Boolean( affectRom );
|
||||
this->isEnableModify = isEnableModify;
|
||||
this->isAffectRom = isAffectRom;
|
||||
}
|
||||
public:
|
||||
property System::Boolean EnableModify
|
||||
property System::Boolean IsEnableModify
|
||||
{
|
||||
System::Boolean get(){ return *(this->hEnableModify); } // Read Only
|
||||
System::Boolean get(){ return this->isEnableModify; } // Read Only
|
||||
}
|
||||
property System::Boolean AffectRom
|
||||
property System::Boolean IsAffectRom
|
||||
{
|
||||
System::Boolean get(){ return *(this->hAffectRom); }
|
||||
System::Boolean get(){ return this->isAffectRom; }
|
||||
}
|
||||
public:
|
||||
// gridViewの表示形式にあわせる
|
||||
cli::array<System::Object^>^ getAll( System::Boolean isJapanese )
|
||||
{
|
||||
if( (*this->hBegin == METWL_ERRLIST_NORANGE) && (*this->hEnd == METWL_ERRLIST_NORANGE) )
|
||||
if( (this->begin == METWL_ERRLIST_NORANGE) && (this->end == METWL_ERRLIST_NORANGE) )
|
||||
{
|
||||
if( isJapanese )
|
||||
return (gcnew array<System::Object^>{this->hName, "-", "-", this->hMsg});
|
||||
@ -210,9 +210,9 @@ namespace MasterEditorTWL
|
||||
}
|
||||
|
||||
if( isJapanese )
|
||||
return (gcnew array<System::Object^>{this->hName, this->hBegin->ToString("X04")+"h", this->hEnd->ToString("X04")+"h", this->hMsg});
|
||||
return (gcnew array<System::Object^>{this->hName, this->begin.ToString("X04")+"h", this->end.ToString("X04")+"h", this->hMsg});
|
||||
else
|
||||
return (gcnew array<System::Object^>{this->hNameE, this->hBegin->ToString("X04")+"h", this->hEnd->ToString("X04")+"h", this->hMsgE});
|
||||
return (gcnew array<System::Object^>{this->hNameE, this->begin.ToString("X04")+"h", this->end.ToString("X04")+"h", this->hMsgE});
|
||||
}
|
||||
};
|
||||
|
||||
@ -227,20 +227,21 @@ namespace MasterEditorTWL
|
||||
ref class RCMrcSpecialList
|
||||
{
|
||||
public:
|
||||
property System::Boolean ^hIsCheck;
|
||||
property System::UInt32 ^hSDKVer;
|
||||
property System::Byte ^hEULAVer;
|
||||
property cli::array<System::UInt32^> ^hShared2SizeArray;
|
||||
property System::Boolean IsCheck;
|
||||
property System::UInt32 SDKVer;
|
||||
property System::Byte EULAVer;
|
||||
property cli::array<System::UInt32> ^hShared2SizeArray;
|
||||
public:
|
||||
RCMrcSpecialList()
|
||||
{
|
||||
this->hIsCheck = gcnew System::Boolean( false );
|
||||
this->hSDKVer = gcnew System::UInt32( 0 );
|
||||
this->hShared2SizeArray = gcnew cli::array<System::UInt32^>(METWL_NUMOF_SHARED2FILES); // ファイルサイズの数に合わせる
|
||||
this->IsCheck = false;
|
||||
this->SDKVer = 0;
|
||||
this->EULAVer = 0;
|
||||
this->hShared2SizeArray = gcnew cli::array<System::UInt32>(METWL_NUMOF_SHARED2FILES); // ファイルサイズの数に合わせる
|
||||
System::Int32 i;
|
||||
for( i=0; i < METWL_NUMOF_SHARED2FILES; i++ )
|
||||
{
|
||||
this->hShared2SizeArray[i] = gcnew System::UInt32( 0 );
|
||||
this->hShared2SizeArray[i] = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -269,64 +270,64 @@ namespace MasterEditorTWL
|
||||
property System::String ^hMakerCode;
|
||||
property System::String ^hPlatform;
|
||||
property System::String ^hRomSize;
|
||||
property System::Byte ^hRomVersion;
|
||||
property System::UInt16 ^hHeaderCRC;
|
||||
property System::Byte RomVersion;
|
||||
property System::UInt16 HeaderCRC;
|
||||
property System::String ^hLatency; // MROM/1TROM/Illegal
|
||||
|
||||
// ペアレンタルコントロール
|
||||
property cli::array<System::Int32> ^hArrayParentalIndex; // 表示用のコンボボックスのインデックス
|
||||
|
||||
// TWL専用情報 一部編集可能
|
||||
property System::UInt32 ^hNormalRomOffset;
|
||||
property System::UInt32 ^hKeyTableRomOffset;
|
||||
property System::UInt32 NormalRomOffset;
|
||||
property System::UInt32 KeyTableRomOffset;
|
||||
property System::String ^hTitleIDLo;
|
||||
property System::UInt32 ^hTitleIDHi;
|
||||
property System::Boolean ^hIsAppLauncher; // TitleIDLoからわかるアプリ種別
|
||||
property System::Boolean ^hIsAppUser; // TitleIDHiからわかるアプリ種別
|
||||
property System::Boolean ^hIsAppSystem; //
|
||||
property System::Boolean ^hIsAppSecure; //
|
||||
property System::Boolean ^hIsLaunch; //
|
||||
property System::Boolean ^hIsMediaNand; //
|
||||
property System::Boolean ^hIsDataOnly; //
|
||||
property System::UInt16 ^hPublisherCode; //
|
||||
property System::UInt32 ^hPublicSize;
|
||||
property System::UInt32 ^hPrivateSize;
|
||||
property System::Boolean ^hIsNormalJump;
|
||||
property System::Boolean ^hIsTmpJump;
|
||||
property System::Boolean ^hHasDSDLPlaySign; // ROMヘッダ外のSRLからわかる署名の有無
|
||||
property System::Boolean ^hIsOldDevEncrypt; // 旧開発用暗号フラグが立っている
|
||||
property System::Boolean ^hIsSCFGAccess; // SCFGレジスタをロックしている
|
||||
property System::UInt32 TitleIDHi;
|
||||
property System::Boolean IsAppLauncher; // TitleIDLoからわかるアプリ種別
|
||||
property System::Boolean IsAppUser; // TitleIDHiからわかるアプリ種別
|
||||
property System::Boolean IsAppSystem; //
|
||||
property System::Boolean IsAppSecure; //
|
||||
property System::Boolean IsLaunch; //
|
||||
property System::Boolean IsMediaNand; //
|
||||
property System::Boolean IsDataOnly; //
|
||||
property System::UInt16 PublisherCode; //
|
||||
property System::UInt32 PublicSize;
|
||||
property System::UInt32 PrivateSize;
|
||||
property System::Boolean IsNormalJump;
|
||||
property System::Boolean IsTmpJump;
|
||||
property System::Boolean HasDSDLPlaySign; // ROMヘッダ外のSRLからわかる署名の有無
|
||||
property System::Boolean IsOldDevEncrypt; // 旧開発用暗号フラグが立っている
|
||||
property System::Boolean IsSCFGAccess; // SCFGレジスタをロックしている
|
||||
|
||||
// TWL拡張フラグ 一部編集可能
|
||||
property System::Boolean ^hIsCodecTWL;
|
||||
property System::Boolean ^hIsEULA; // 編集可能
|
||||
property System::Boolean ^hIsSubBanner;
|
||||
property System::Boolean ^hIsWiFiIcon; // 編集可能
|
||||
property System::Boolean ^hIsWirelessIcon; // 編集可能
|
||||
property System::Boolean ^hIsWL;
|
||||
property System::Boolean IsCodecTWL;
|
||||
property System::Boolean IsEULA; // 編集可能
|
||||
property System::Boolean IsSubBanner;
|
||||
property System::Boolean IsWiFiIcon; // 編集可能
|
||||
property System::Boolean IsWirelessIcon; // 編集可能
|
||||
property System::Boolean IsWL;
|
||||
|
||||
// TWLアクセスコントロール Read Only
|
||||
property System::Boolean ^hIsCommonClientKey;
|
||||
property System::Boolean ^hIsAesSlotBForES;
|
||||
property System::Boolean ^hIsAesSlotCForNAM;
|
||||
property System::Boolean ^hIsSD;
|
||||
property System::Boolean ^hIsNAND;
|
||||
property System::Boolean ^hIsGameCardOn;
|
||||
property System::Boolean ^hIsShared2;
|
||||
property System::Boolean ^hIsAesSlotBForJpegEnc;
|
||||
property System::Boolean ^hIsAesSlotBForJpegEncUser;
|
||||
property System::Boolean ^hIsGameCardNitro;
|
||||
property System::Boolean ^hIsAesSlotAForSSL;
|
||||
property System::Boolean ^hIsCommonClientKeyForDebugger;
|
||||
property System::Boolean IsCommonClientKey;
|
||||
property System::Boolean IsAesSlotBForES;
|
||||
property System::Boolean IsAesSlotCForNAM;
|
||||
property System::Boolean IsSD;
|
||||
property System::Boolean IsNAND;
|
||||
property System::Boolean IsGameCardOn;
|
||||
property System::Boolean IsShared2;
|
||||
property System::Boolean IsAesSlotBForJpegEnc;
|
||||
property System::Boolean IsAesSlotBForJpegEncUser;
|
||||
property System::Boolean IsGameCardNitro;
|
||||
property System::Boolean IsAesSlotAForSSL;
|
||||
property System::Boolean IsCommonClientKeyForDebugger;
|
||||
|
||||
// Shared2ファイルサイズ Read Only
|
||||
property cli::array<System::UInt32^> ^hShared2SizeArray;
|
||||
property cli::array<System::UInt32> ^hShared2SizeArray;
|
||||
|
||||
// カードリージョン Read Only
|
||||
property System::Boolean ^hIsRegionJapan;
|
||||
property System::Boolean ^hIsRegionAmerica;
|
||||
property System::Boolean ^hIsRegionEurope;
|
||||
property System::Boolean ^hIsRegionAustralia;
|
||||
property System::Boolean IsRegionJapan;
|
||||
property System::Boolean IsRegionAmerica;
|
||||
property System::Boolean IsRegionEurope;
|
||||
property System::Boolean IsRegionAustralia;
|
||||
|
||||
// SDKバージョンと使用ライブラリのリスト
|
||||
property System::Collections::Generic::List<RCSDKVersion^> ^hSDKList;
|
||||
|
||||
@ -64,14 +64,9 @@ System::String^ MasterEditorTWL::transRomSizeToString( System::Byte ^byte )
|
||||
//
|
||||
// @ret 文字列(単位つき)
|
||||
//
|
||||
System::String^ MasterEditorTWL::transSizeToString( System::UInt32 ^size )
|
||||
System::String^ MasterEditorTWL::transSizeToString( const System::UInt32 size )
|
||||
{
|
||||
if( size == nullptr )
|
||||
{
|
||||
return (gcnew System::String(""));
|
||||
}
|
||||
|
||||
System::UInt32 val = *size;
|
||||
System::UInt32 val = size;
|
||||
|
||||
// Byte単位
|
||||
if( val == 0 )
|
||||
|
||||
@ -39,7 +39,7 @@ namespace MasterEditorTWL
|
||||
//
|
||||
// @ret 文字列(単位つき)
|
||||
//
|
||||
System::String^ transSizeToString( System::UInt32 ^size );
|
||||
System::String^ transSizeToString( const System::UInt32 size );
|
||||
|
||||
//
|
||||
// ペアレンタルコントロールの各団体の設定可能年齢を取得する
|
||||
|
||||
Loading…
Reference in New Issue
Block a user