マスタエディタ:通信アイコン表示フラグをラジオボタンに変更。SCFGアクセス可能なときは備考欄に自動的に追記する。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2494 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
nishikawa_takeshi 2008-09-11 09:16:50 +00:00
parent 29a65ee72e
commit b3923139fe
8 changed files with 153 additions and 65 deletions

View File

@ -198,9 +198,9 @@ namespace MasterEditorTWL {
private: System::Windows::Forms::CheckBox^ cboxIsEULA;
private: System::Windows::Forms::CheckBox^ cboxIsWiFiIcon;
private: System::Windows::Forms::Label^ labEULA;
private: System::Windows::Forms::CheckBox^ cboxIsWirelessIcon;
private: System::Windows::Forms::NumericUpDown^ numEULA;
@ -554,6 +554,12 @@ private: System::Windows::Forms::TextBox^ tboxAppType;
private: System::Windows::Forms::TextBox^ tboxMedia;
private: System::Windows::Forms::Label^ labProductNameLimit;
private: System::Windows::Forms::Label^ labProductNameLimitForeign;
private: System::Windows::Forms::RadioButton^ rIsWiFiIcon;
private: System::Windows::Forms::RadioButton^ rIsWirelessIcon;
private: System::Windows::Forms::RadioButton^ rIsNoIcon;
@ -772,9 +778,7 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
this->labRegion = (gcnew System::Windows::Forms::Label());
this->cboxIsEULA = (gcnew System::Windows::Forms::CheckBox());
this->combRegion = (gcnew System::Windows::Forms::ComboBox());
this->cboxIsWiFiIcon = (gcnew System::Windows::Forms::CheckBox());
this->labEULA = (gcnew System::Windows::Forms::Label());
this->cboxIsWirelessIcon = (gcnew System::Windows::Forms::CheckBox());
this->numEULA = (gcnew System::Windows::Forms::NumericUpDown());
this->cboxIsInputPerson2 = (gcnew System::Windows::Forms::CheckBox());
this->gboxPerson2 = (gcnew System::Windows::Forms::GroupBox());
@ -933,6 +937,9 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
this->tboxGuideRomEditInfo = (gcnew System::Windows::Forms::TextBox());
this->gboxParental = (gcnew System::Windows::Forms::GroupBox());
this->gboxIcon = (gcnew System::Windows::Forms::GroupBox());
this->rIsNoIcon = (gcnew System::Windows::Forms::RadioButton());
this->rIsWiFiIcon = (gcnew System::Windows::Forms::RadioButton());
this->rIsWirelessIcon = (gcnew System::Windows::Forms::RadioButton());
this->gboxEULA = (gcnew System::Windows::Forms::GroupBox());
this->tabSubmitInfo = (gcnew System::Windows::Forms::TabPage());
this->labProductNameLimit = (gcnew System::Windows::Forms::Label());
@ -1590,16 +1597,6 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
this->combRegion->TabIndex = 36;
this->combRegion->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::combRegion_SelectedIndexChanged);
//
// cboxIsWiFiIcon
//
this->cboxIsWiFiIcon->AutoSize = true;
this->cboxIsWiFiIcon->Location = System::Drawing::Point(6, 43);
this->cboxIsWiFiIcon->Name = L"cboxIsWiFiIcon";
this->cboxIsWiFiIcon->Size = System::Drawing::Size(135, 16);
this->cboxIsWiFiIcon->TabIndex = 3;
this->cboxIsWiFiIcon->Text = L"Wi-Fi通信アイコン表示";
this->cboxIsWiFiIcon->UseVisualStyleBackColor = true;
//
// labEULA
//
this->labEULA->AutoSize = true;
@ -1609,16 +1606,6 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
this->labEULA->TabIndex = 7;
this->labEULA->Text = L"EULA同意バージョン";
//
// cboxIsWirelessIcon
//
this->cboxIsWirelessIcon->AutoSize = true;
this->cboxIsWirelessIcon->Location = System::Drawing::Point(6, 18);
this->cboxIsWirelessIcon->Name = L"cboxIsWirelessIcon";
this->cboxIsWirelessIcon->Size = System::Drawing::Size(168, 16);
this->cboxIsWirelessIcon->TabIndex = 2;
this->cboxIsWirelessIcon->Text = L"DSワイヤレス通信アイコン表示";
this->cboxIsWirelessIcon->UseVisualStyleBackColor = true;
//
// numEULA
//
this->numEULA->Location = System::Drawing::Point(130, 39);
@ -3196,14 +3183,47 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
//
// gboxIcon
//
this->gboxIcon->Controls->Add(this->cboxIsWirelessIcon);
this->gboxIcon->Controls->Add(this->cboxIsWiFiIcon);
this->gboxIcon->Controls->Add(this->rIsNoIcon);
this->gboxIcon->Controls->Add(this->rIsWiFiIcon);
this->gboxIcon->Controls->Add(this->rIsWirelessIcon);
this->gboxIcon->Location = System::Drawing::Point(19, 138);
this->gboxIcon->Name = L"gboxIcon";
this->gboxIcon->Size = System::Drawing::Size(215, 69);
this->gboxIcon->Size = System::Drawing::Size(215, 116);
this->gboxIcon->TabIndex = 32;
this->gboxIcon->TabStop = false;
this->gboxIcon->Text = L"アイコン表示";
this->gboxIcon->Text = L"メニュー上でのアイコン表示";
//
// rIsNoIcon
//
this->rIsNoIcon->AutoSize = true;
this->rIsNoIcon->Checked = true;
this->rIsNoIcon->Location = System::Drawing::Point(8, 79);
this->rIsNoIcon->Name = L"rIsNoIcon";
this->rIsNoIcon->Size = System::Drawing::Size(120, 16);
this->rIsNoIcon->TabIndex = 6;
this->rIsNoIcon->TabStop = true;
this->rIsNoIcon->Text = L"アイコンを表示しない";
this->rIsNoIcon->UseVisualStyleBackColor = true;
//
// rIsWiFiIcon
//
this->rIsWiFiIcon->AutoSize = true;
this->rIsWiFiIcon->Location = System::Drawing::Point(8, 53);
this->rIsWiFiIcon->Name = L"rIsWiFiIcon";
this->rIsWiFiIcon->Size = System::Drawing::Size(134, 16);
this->rIsWiFiIcon->TabIndex = 5;
this->rIsWiFiIcon->Text = L"Wi-Fi通信アイコン表示";
this->rIsWiFiIcon->UseVisualStyleBackColor = true;
//
// rIsWirelessIcon
//
this->rIsWirelessIcon->AutoSize = true;
this->rIsWirelessIcon->Location = System::Drawing::Point(8, 27);
this->rIsWirelessIcon->Name = L"rIsWirelessIcon";
this->rIsWirelessIcon->Size = System::Drawing::Size(167, 16);
this->rIsWirelessIcon->TabIndex = 4;
this->rIsWirelessIcon->Text = L"DSワイヤレス通信アイコン表示";
this->rIsWirelessIcon->UseVisualStyleBackColor = true;
//
// gboxEULA
//
@ -3862,10 +3882,15 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
MasterEditorTWL::appendXmlTag( doc, form, "Mail2", this->tboxMail2->Text );
MasterEditorTWL::appendXmlTag( doc, form, "NTSC2", this->tboxNTSC2->Text );
if( this->rIsWirelessIcon->Checked )
MasterEditorTWL::appendXmlTag( doc, form, "DisplayIcon", "Wireless" );
else if( this->rIsWiFiIcon->Checked )
MasterEditorTWL::appendXmlTag( doc, form, "DisplayIcon", "WiFi" );
else
MasterEditorTWL::appendXmlTag( doc, form, "DisplayIcon", "None" );
MasterEditorTWL::appendXmlTag( doc, form, "IsEULA", (this->cboxIsEULA->Checked)?"Y":"N" );
MasterEditorTWL::appendXmlTag( doc, form, "EULAVersion", this->numEULA->Value.ToString() );
MasterEditorTWL::appendXmlTag( doc, form, "IsWirelessIcon", (this->cboxIsWirelessIcon->Checked)?"Y":"N" );
MasterEditorTWL::appendXmlTag( doc, form, "IsWiFiIcon", (this->cboxIsWiFiIcon->Checked)?"Y":"N" );
MasterEditorTWL::appendXmlTag( doc, form, "Region", this->combRegion->SelectedIndex.ToString() );
MasterEditorTWL::appendXmlTag( doc, form, "RatingCERO", this->combCERO->SelectedIndex.ToString() );
MasterEditorTWL::appendXmlTag( doc, form, "RpCERO", (this->cboxAlwaysCERO->Checked)?"Y":"N" );
@ -4000,10 +4025,12 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
this->parseTmp( root, "/MasterEditorTWL/Form/Mail2", this->tboxMail2 );
this->parseTmp( root, "/MasterEditorTWL/Form/NTSC2", this->tboxNTSC2 );
rbuts = gcnew cli::array<System::Windows::Forms::RadioButton^>{this->rIsWirelessIcon, this->rIsWiFiIcon, this->rIsNoIcon};
strs = gcnew cli::array<System::String^>{"Wireless","WiFi","None"};
this->parseTmp( root, "/MasterEditorTWL/Form/DisplayIcon", rbuts, strs );
this->parseTmp( root, "/MasterEditorTWL/Form/IsEULA", this->cboxIsEULA );
this->parseTmp( root, "/MasterEditorTWL/Form/EULAVersion", this->numEULA );
this->parseTmp( root, "/MasterEditorTWL/Form/IsWirelessIcon", this->cboxIsWirelessIcon );
this->parseTmp( root, "/MasterEditorTWL/Form/IsWiFiIcon", this->cboxIsWiFiIcon );
this->parseTmp( root, "/MasterEditorTWL/Form/Region", this->combRegion );
this->parseTmp( root, "/MasterEditorTWL/Form/RatingCERO", this->combCERO );
this->parseTmp( root, "/MasterEditorTWL/Form/RpCERO", this->cboxAlwaysCERO );
@ -4155,8 +4182,9 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
{
this->cboxIsEULA->Enabled = false;
this->numEULA->Enabled = false;
this->cboxIsWirelessIcon->Enabled = false;
this->cboxIsWiFiIcon->Enabled = false;
this->rIsWirelessIcon->Enabled = false;
this->rIsWiFiIcon->Enabled = false;
this->rIsNoIcon->Enabled = false;
this->combCERO->Enabled = false;
this->cboxCERO->Enabled = false;
@ -4195,8 +4223,8 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
// TWL拡張領域のいくつかの情報をROMヘッダに反映させる
this->hSrl->hIsEULA = this->cboxIsEULA->Checked;
this->hSrl->hEULAVersion = gcnew System::Byte( System::Decimal::ToByte( this->numEULA->Value ) );
this->hSrl->hIsWiFiIcon = this->cboxIsWiFiIcon->Checked;
this->hSrl->hIsWirelessIcon = this->cboxIsWirelessIcon->Checked;
this->hSrl->hIsWiFiIcon = this->rIsWiFiIcon->Checked;
this->hSrl->hIsWirelessIcon = this->rIsWirelessIcon->Checked;
// Srlクラスのプロパティへの反映
this->setParentalSrlProperties();
@ -4372,8 +4400,19 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
// 編集可能情報
this->cboxIsEULA->Checked = *(this->hSrl->hIsEULA);
this->numEULA->Value = *(this->hSrl->hEULAVersion);
this->cboxIsWiFiIcon->Checked = *(this->hSrl->hIsWiFiIcon);
this->cboxIsWirelessIcon->Checked = *(this->hSrl->hIsWirelessIcon);
if( ( *this->hSrl->hIsWiFiIcon && *this->hSrl->hIsWirelessIcon) ||
(!(*this->hSrl->hIsWiFiIcon) && !(*this->hSrl->hIsWirelessIcon)) )
{
this->rIsNoIcon->Checked = true;
}
else if( *(this->hSrl->hIsWiFiIcon) && !*(this->hSrl->hIsWirelessIcon) )
{
this->rIsWiFiIcon->Checked = true;
}
else
{
this->rIsWirelessIcon->Checked = true;
}
this->setParentalForms(); // ペアレンタルコントロール関連
} //setSrlForms()
@ -4385,9 +4424,16 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
if( (this->hSrl->hHasDSDLPlaySign != nullptr) && (*(this->hSrl->hHasDSDLPlaySign) == true) )
{
if( this->stripItemJapanese->Checked == true )
this->tboxCaptionEx->Text += gcnew System::String( "DSクローンブート対応. " );
this->tboxCaptionEx->Text += gcnew System::String( "DSクローンブート対応.\r\n" );
else
this->tboxCaptionEx->Text += gcnew System::String( "DS Clone Boot. " );
this->tboxCaptionEx->Text += gcnew System::String( "DS Clone Boot.\r\n" );
}
if( (this->hSrl->hIsSCFGAccess != nullptr) && (*(this->hSrl->hIsSCFGAccess) == true) )
{
if( this->stripItemJapanese->Checked == true )
this->tboxCaptionEx->Text += gcnew System::String( "SCFGレジスタアクセス可能.\r\n" );
else
this->tboxCaptionEx->Text += gcnew System::String( "SDFC Register Accessible.\r\n" );
}
}
@ -4897,8 +4943,11 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
// ひととおりエラー登録をした後で
// SRLバイナリに影響を与えるエラーが存在するかチェック
//return this->isValidAffectRom();
#ifdef METWL_LIGHT_CHECK
return this->isValidAffectRomModified();
#else
return this->isValidAffectRom();
#endif
}
// ペアレンタルコントロール関連のフォーム入力が正しいか書き込み前チェック
@ -5095,7 +5144,7 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
tmp = this->tboxCaptionEx->Text->Replace( " ", "" );
if( !(this->tboxCaptionEx->Text->Equals("")) && !(tmp->Equals("")) )
{
this->hDeliv->hCaption += (" " + this->tboxCaptionEx->Text);
this->hDeliv->hCaption += ("(" + this->tboxCaptionEx->Text + ")");
}
// 一部のROM情報を登録
@ -5416,8 +5465,9 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
this->labEULA->Text = gcnew System::String( LANG_EULA_VER_J );
this->cboxIsEULA->Text = gcnew System::String( LANG_EULA_J );
this->gboxIcon->Text = gcnew System::String( LANG_ICON_J );
this->cboxIsWirelessIcon->Text = gcnew System::String( LANG_WIRELESS_ICON_J );
this->cboxIsWiFiIcon->Text = gcnew System::String( LANG_WIFI_ICON_J );
this->rIsWirelessIcon->Text = gcnew System::String( LANG_WIRELESS_ICON_J );
this->rIsWiFiIcon->Text = gcnew System::String( LANG_WIFI_ICON_J );
this->rIsNoIcon->Text = gcnew System::String( LANG_NO_ICON_J );
this->labRegion->Text = gcnew System::String( LANG_REGION_J );
// リージョン
@ -5642,8 +5692,9 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
this->labEULA->Text = gcnew System::String( LANG_EULA_VER_E );
this->cboxIsEULA->Text = gcnew System::String( LANG_EULA_E );
this->gboxIcon->Text = gcnew System::String( LANG_ICON_E );
this->cboxIsWirelessIcon->Text = gcnew System::String( LANG_WIRELESS_ICON_E );
this->cboxIsWiFiIcon->Text = gcnew System::String( LANG_WIFI_ICON_E );
this->rIsWirelessIcon->Text = gcnew System::String( LANG_WIRELESS_ICON_E );
this->rIsWiFiIcon->Text = gcnew System::String( LANG_WIFI_ICON_E );
this->rIsNoIcon->Text = gcnew System::String( LANG_NO_ICON_E );
this->labRegion->Text = gcnew System::String( LANG_REGION_E );
// リージョン
@ -6351,11 +6402,23 @@ private: System::Windows::Forms::Label^ labProductNameLimitForeign;
// 編集可能情報を読み込み時の設定に戻す
this->cboxIsEULA->Checked = *(this->hSrl->hIsEULA);
this->numEULA->Value = *(this->hSrl->hEULAVersion);
this->cboxIsWiFiIcon->Checked = *(this->hSrl->hIsWiFiIcon);
this->cboxIsWirelessIcon->Checked = *(this->hSrl->hIsWirelessIcon);
if( ( *this->hSrl->hIsWiFiIcon && *this->hSrl->hIsWirelessIcon) ||
(!(*this->hSrl->hIsWiFiIcon) && !(*this->hSrl->hIsWirelessIcon)) )
{
this->rIsNoIcon->Checked = true;
}
else if( *(this->hSrl->hIsWiFiIcon) && !*(this->hSrl->hIsWirelessIcon) )
{
this->rIsWiFiIcon->Checked = true;
}
else
{
this->rIsWirelessIcon->Checked = true;
}
this->setParentalForms(); // ペアレンタルコントロール関連
}
}; // enf of ref class Form1
} // end of namespace MasterEditorTWL

View File

@ -1,8 +1,9 @@
#pragma once
//#define METWL_WHETHER_PLATFORM_CHECK // プラットフォームがTWL対応以外かどうかをチェックする
//#define METWL_WHETHER_SIGN_DECRYPT // 署名を外してダイジェストをベリファイする
#define METWL_WHETHER_SIGN_DECRYPT // 署名を外してダイジェストをベリファイする
#define METWL_WHETHER_MRC // MRC機能を含めるか
#define METWL_LIGHT_CHECK // 提出条件を緩くするか
// 定数
#define METWL_ERRLIST_NORANGE 0 // エラーのアドレス範囲を指定しないことを表す特別な値

View File

@ -39,9 +39,10 @@
#define LANG_EULA_J ("EULA同意")
#define LANG_EULA_VER_J ("EULA同意バージョン")
#define LANG_ICON_J ("アイコン表示")
#define LANG_ICON_J ("メニュー上でのアイコン表示")
#define LANG_WIRELESS_ICON_J ("DSワイヤレス通信アイコン表示")
#define LANG_WIFI_ICON_J ("Wi-Fi通信アイコン表示")
#define LANG_NO_ICON_J ("アイコンを表示しない")
#define LANG_REGION_PCTL_J ("リージョンとペアレンタルコントロール")
#define LANG_REGION_J ("カードリージョン")
#define LANG_PCTL_RATING_J ("レーティング年齢")
@ -86,9 +87,10 @@
#define LANG_EULA_E ("Agree EULA")
#define LANG_EULA_VER_E ("EULA agreement ver.")
#define LANG_ICON_E ("Icons")
#define LANG_ICON_E ("Icons on the Menu")
#define LANG_WIRELESS_ICON_E ("Display an Icon of DS Wireless")
#define LANG_WIFI_ICON_E ("Display an Icon of Wi-Fi connection")
#define LANG_NO_ICON_E ("Display No Icon")
#define LANG_REGION_PCTL_E ("Card Region and Parental Control")
#define LANG_REGION_E ("Card Region")
#define LANG_PCTL_RATING_E ("Rating Age")

View File

@ -275,6 +275,17 @@ ECSrlResult RCSrl::setRomInfo(void)
this->hIsCommonClientKeyForDebugger
= gcnew System::Boolean( (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 );
}
else
{
this->hIsSCFGAccess = gcnew System::Boolean( false );
}
// Shared2ファイルサイズ
this->hShared2SizeArray = gcnew cli::array<System::UInt32^>(METWL_NUMOF_SHARED2FILES);
for( i=0; i < METWL_NUMOF_SHARED2FILES; i++ )
@ -1205,7 +1216,17 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
}
}
if( (this->pRomHeader->s.arm7_scfg_ext >> 31) != 0 )
if( (*this->hIsWiFiIcon == true) && (*this->hIsWirelessIcon == true) )
{
this->hWarnList->Add( gcnew RCMrcError(
"アイコン表示フラグ", 0x1bf, 0x1bf,
"ワイヤレス通信アイコンとWi-Fi通信アイコンは同時に表示できません。設定を無視して読み込みます。",
"Icon Displaying",
"Icon displayed on menu is either Wireless Icon or Wi-Fi Icon. This setting was ignored in reading.",
true, true ) ); // 修正可能
}
if( *(this->hIsSCFGAccess) == true )
{
this->hWarnList->Add( gcnew RCMrcError(
"SCFG設定", 0x1b8, 0x1bb, "SCFGレジスタへアクセス可能になっています。",
@ -1630,7 +1651,7 @@ void RCSrl::mrcPadding(FILE *fp)
this->hErrorList->Add( gcnew RCMrcError(
padstrJ, METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
"読み出すことができませんでした。",
padstrE, "This area couldn't be read", true, true ) );
padstrE, "This area couldn't be read", false, true ) );
return;
}
@ -1641,7 +1662,7 @@ void RCSrl::mrcPadding(FILE *fp)
this->hErrorList->Add( gcnew RCMrcError(
padstrJ, METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
"読み出すことができませんでした。",
padstrE, "This area couldn't be read", true, true ) );
padstrE, "This area couldn't be read", false, true ) );
delete []buf;
return;
}
@ -1662,7 +1683,7 @@ void RCSrl::mrcPadding(FILE *fp)
"FFh以外の値が格納されています。 " + romstr + " ROMの容量制限が守られていません。",
padstrE,
"This area includes illegai data. " + romstr + " Volume constraint is violated.",
true, true ) );
false, true ) );
}
delete []buf;
}
@ -1704,7 +1725,7 @@ void RCSrl::mrcBanner(FILE *fp)
"読み出すことができませんでした。",
"Banner File",
"The file can't be read.",
true, true ) );
false, true ) );
}
// バナーの各文字がマップに登録されているかチェック
@ -1730,7 +1751,7 @@ void RCSrl::mrcBanner(FILE *fp)
"使用不可能な文字セットが使用されています。",
"Banner File",
"A set of illegal charactor code is used.",
true, true ) );
false, true ) );
}
delete []banner;
}

View File

@ -284,6 +284,7 @@ namespace MasterEditorTWL
property System::Boolean ^hIsTmpJump;
property System::Boolean ^hHasDSDLPlaySign; // ROMヘッダ外のSRLからわかる署名の有無
property System::Boolean ^hIsOldDevEncrypt; // 旧開発用暗号フラグが立っている
property System::Boolean ^hIsSCFGAccess; // SCFGレジスタをロックしている
// TWL拡張フラグ 一部編集可能
property System::Boolean ^hIsCodecTWL;