DATTool: Fix some designer display issues and add a readme

This commit is contained in:
Asnivor 2021-06-07 12:24:11 +01:00
parent 1bf6aa6ddd
commit d189790918
5 changed files with 312 additions and 166 deletions

View File

@ -28,171 +28,185 @@
/// </summary>
private void InitializeComponent()
{
this.comboBoxSystemSelect = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.groupImportTypes = new System.Windows.Forms.GroupBox();
this.radioTOSEC = new System.Windows.Forms.RadioButton();
this.listBoxFiles = new System.Windows.Forms.ListBox();
this.buttonAddFiles = new System.Windows.Forms.Button();
this.buttonRemove = new System.Windows.Forms.Button();
this.buttonStartProcessing = new System.Windows.Forms.Button();
this.textBoxOutputFolder = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.radioNOINTRO = new System.Windows.Forms.RadioButton();
this.groupImportTypes.SuspendLayout();
this.SuspendLayout();
//
// comboBoxSystemSelect
//
this.comboBoxSystemSelect.FormattingEnabled = true;
this.comboBoxSystemSelect.Location = new System.Drawing.Point(13, 13);
this.comboBoxSystemSelect.Name = "comboBoxSystemSelect";
this.comboBoxSystemSelect.Size = new System.Drawing.Size(121, 21);
this.comboBoxSystemSelect.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(141, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(74, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Select System";
//
// groupImportTypes
//
this.groupImportTypes.Controls.Add(this.radioNOINTRO);
this.groupImportTypes.Controls.Add(this.radioTOSEC);
this.groupImportTypes.Location = new System.Drawing.Point(13, 50);
this.groupImportTypes.Name = "groupImportTypes";
this.groupImportTypes.Size = new System.Drawing.Size(200, 100);
this.groupImportTypes.TabIndex = 2;
this.groupImportTypes.TabStop = false;
this.groupImportTypes.Text = "Import Type";
//
// radioTOSEC
//
this.radioTOSEC.AutoSize = true;
this.radioTOSEC.Location = new System.Drawing.Point(7, 20);
this.radioTOSEC.Name = "radioTOSEC";
this.radioTOSEC.Size = new System.Drawing.Size(61, 17);
this.radioTOSEC.TabIndex = 0;
this.radioTOSEC.TabStop = true;
this.radioTOSEC.Text = "TOSEC";
this.radioTOSEC.UseVisualStyleBackColor = true;
//
// listBoxFiles
//
this.listBoxFiles.FormattingEnabled = true;
this.listBoxFiles.HorizontalScrollbar = true;
this.listBoxFiles.Location = new System.Drawing.Point(13, 180);
this.listBoxFiles.Name = "listBoxFiles";
this.listBoxFiles.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listBoxFiles.Size = new System.Drawing.Size(328, 121);
this.listBoxFiles.TabIndex = 3;
this.listBoxFiles.UseTabStops = false;
//
// buttonAddFiles
//
this.buttonAddFiles.Location = new System.Drawing.Point(348, 180);
this.buttonAddFiles.Name = "buttonAddFiles";
this.buttonAddFiles.Size = new System.Drawing.Size(107, 23);
this.buttonAddFiles.TabIndex = 4;
this.buttonAddFiles.Text = "Browse";
this.buttonAddFiles.UseVisualStyleBackColor = true;
this.buttonAddFiles.Click += new System.EventHandler(this.buttonAddFiles_Click);
//
// buttonRemove
//
this.buttonRemove.Location = new System.Drawing.Point(348, 210);
this.buttonRemove.Name = "buttonRemove";
this.buttonRemove.Size = new System.Drawing.Size(107, 23);
this.buttonRemove.TabIndex = 5;
this.buttonRemove.Text = "Remove";
this.buttonRemove.UseVisualStyleBackColor = true;
this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
//
// buttonStartProcessing
//
this.buttonStartProcessing.Location = new System.Drawing.Point(13, 356);
this.buttonStartProcessing.Name = "buttonStartProcessing";
this.buttonStartProcessing.Size = new System.Drawing.Size(101, 23);
this.buttonStartProcessing.TabIndex = 6;
this.buttonStartProcessing.Text = "Start Processing";
this.buttonStartProcessing.UseVisualStyleBackColor = true;
this.buttonStartProcessing.Click += new System.EventHandler(this.buttonStartProcessing_Click);
//
// textBoxOutputFolder
//
this.textBoxOutputFolder.Location = new System.Drawing.Point(13, 330);
this.textBoxOutputFolder.Name = "textBoxOutputFolder";
this.textBoxOutputFolder.Size = new System.Drawing.Size(328, 20);
this.textBoxOutputFolder.TabIndex = 7;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 164);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(75, 13);
this.label2.TabIndex = 8;
this.label2.Text = "Files to Import:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 314);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(87, 13);
this.label3.TabIndex = 9;
this.label3.Text = "Output Directory:";
//
// button2
//
this.button2.Location = new System.Drawing.Point(348, 328);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(107, 23);
this.button2.TabIndex = 10;
this.button2.Text = "Select Output DIR";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// radioNOINTRO
//
this.radioNOINTRO.AutoSize = true;
this.radioNOINTRO.Location = new System.Drawing.Point(7, 44);
this.radioNOINTRO.Name = "radioNOINTRO";
this.radioNOINTRO.Size = new System.Drawing.Size(172, 17);
this.radioNOINTRO.TabIndex = 1;
this.radioNOINTRO.TabStop = true;
this.radioNOINTRO.Text = "NOINTRO (standard DAT only)";
this.radioNOINTRO.UseVisualStyleBackColor = true;
//
// DATConverter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(469, 391);
this.Controls.Add(this.button2);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBoxOutputFolder);
this.Controls.Add(this.buttonStartProcessing);
this.Controls.Add(this.buttonRemove);
this.Controls.Add(this.buttonAddFiles);
this.Controls.Add(this.listBoxFiles);
this.Controls.Add(this.groupImportTypes);
this.Controls.Add(this.label1);
this.Controls.Add(this.comboBoxSystemSelect);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "DATConverter";
this.Text = "DATConverter";
this.groupImportTypes.ResumeLayout(false);
this.groupImportTypes.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
this.comboBoxSystemSelect = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.groupImportTypes = new System.Windows.Forms.GroupBox();
this.radioNOINTRO = new System.Windows.Forms.RadioButton();
this.radioTOSEC = new System.Windows.Forms.RadioButton();
this.listBoxFiles = new System.Windows.Forms.ListBox();
this.buttonAddFiles = new System.Windows.Forms.Button();
this.buttonRemove = new System.Windows.Forms.Button();
this.buttonStartProcessing = new System.Windows.Forms.Button();
this.textBoxOutputFolder = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.textBoxInfo = new System.Windows.Forms.TextBox();
this.groupImportTypes.SuspendLayout();
this.SuspendLayout();
//
// comboBoxSystemSelect
//
this.comboBoxSystemSelect.FormattingEnabled = true;
this.comboBoxSystemSelect.Location = new System.Drawing.Point(13, 13);
this.comboBoxSystemSelect.Name = "comboBoxSystemSelect";
this.comboBoxSystemSelect.Size = new System.Drawing.Size(121, 21);
this.comboBoxSystemSelect.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(141, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(74, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Select System";
//
// groupImportTypes
//
this.groupImportTypes.Controls.Add(this.radioNOINTRO);
this.groupImportTypes.Controls.Add(this.radioTOSEC);
this.groupImportTypes.Location = new System.Drawing.Point(13, 50);
this.groupImportTypes.Name = "groupImportTypes";
this.groupImportTypes.Size = new System.Drawing.Size(200, 100);
this.groupImportTypes.TabIndex = 2;
this.groupImportTypes.TabStop = false;
this.groupImportTypes.Text = "Import Type";
//
// radioNOINTRO
//
this.radioNOINTRO.AutoSize = true;
this.radioNOINTRO.Location = new System.Drawing.Point(7, 44);
this.radioNOINTRO.Name = "radioNOINTRO";
this.radioNOINTRO.Size = new System.Drawing.Size(172, 17);
this.radioNOINTRO.TabIndex = 1;
this.radioNOINTRO.TabStop = true;
this.radioNOINTRO.Text = "NOINTRO (standard DAT only)";
this.radioNOINTRO.UseVisualStyleBackColor = true;
//
// radioTOSEC
//
this.radioTOSEC.AutoSize = true;
this.radioTOSEC.Location = new System.Drawing.Point(7, 20);
this.radioTOSEC.Name = "radioTOSEC";
this.radioTOSEC.Size = new System.Drawing.Size(61, 17);
this.radioTOSEC.TabIndex = 0;
this.radioTOSEC.TabStop = true;
this.radioTOSEC.Text = "TOSEC";
this.radioTOSEC.UseVisualStyleBackColor = true;
//
// listBoxFiles
//
this.listBoxFiles.FormattingEnabled = true;
this.listBoxFiles.HorizontalScrollbar = true;
this.listBoxFiles.Location = new System.Drawing.Point(13, 180);
this.listBoxFiles.Name = "listBoxFiles";
this.listBoxFiles.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.listBoxFiles.Size = new System.Drawing.Size(328, 121);
this.listBoxFiles.TabIndex = 3;
this.listBoxFiles.UseTabStops = false;
//
// buttonAddFiles
//
this.buttonAddFiles.Location = new System.Drawing.Point(348, 180);
this.buttonAddFiles.Name = "buttonAddFiles";
this.buttonAddFiles.Size = new System.Drawing.Size(107, 23);
this.buttonAddFiles.TabIndex = 4;
this.buttonAddFiles.Text = "Browse";
this.buttonAddFiles.UseVisualStyleBackColor = true;
this.buttonAddFiles.Click += new System.EventHandler(this.buttonAddFiles_Click);
//
// buttonRemove
//
this.buttonRemove.Location = new System.Drawing.Point(348, 210);
this.buttonRemove.Name = "buttonRemove";
this.buttonRemove.Size = new System.Drawing.Size(107, 23);
this.buttonRemove.TabIndex = 5;
this.buttonRemove.Text = "Remove";
this.buttonRemove.UseVisualStyleBackColor = true;
this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
//
// buttonStartProcessing
//
this.buttonStartProcessing.Location = new System.Drawing.Point(13, 356);
this.buttonStartProcessing.Name = "buttonStartProcessing";
this.buttonStartProcessing.Size = new System.Drawing.Size(101, 23);
this.buttonStartProcessing.TabIndex = 6;
this.buttonStartProcessing.Text = "Start Processing";
this.buttonStartProcessing.UseVisualStyleBackColor = true;
this.buttonStartProcessing.Click += new System.EventHandler(this.buttonStartProcessing_Click);
//
// textBoxOutputFolder
//
this.textBoxOutputFolder.Location = new System.Drawing.Point(13, 330);
this.textBoxOutputFolder.Name = "textBoxOutputFolder";
this.textBoxOutputFolder.Size = new System.Drawing.Size(328, 20);
this.textBoxOutputFolder.TabIndex = 7;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 164);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(75, 13);
this.label2.TabIndex = 8;
this.label2.Text = "Files to Import:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 314);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(87, 13);
this.label3.TabIndex = 9;
this.label3.Text = "Output Directory:";
//
// button2
//
this.button2.Location = new System.Drawing.Point(348, 328);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(107, 23);
this.button2.TabIndex = 10;
this.button2.Text = "Select Output DIR";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// textBoxInfo
//
this.textBoxInfo.Location = new System.Drawing.Point(262, 13);
this.textBoxInfo.Multiline = true;
this.textBoxInfo.Name = "textBoxInfo";
this.textBoxInfo.ReadOnly = true;
this.textBoxInfo.Size = new System.Drawing.Size(193, 137);
this.textBoxInfo.TabIndex = 11;
this.textBoxInfo.Text = "This tool will take TOSEC or NoIntro DAT files - parse them - and spit out text f" +
"iles that are compatible with the BizHawk gamedb flat file format.\r\n\r\nModerately" +
" timesaving when developing new cores.";
//
// DATConverter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(469, 391);
this.Controls.Add(this.textBoxInfo);
this.Controls.Add(this.button2);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBoxOutputFolder);
this.Controls.Add(this.buttonStartProcessing);
this.Controls.Add(this.buttonRemove);
this.Controls.Add(this.buttonAddFiles);
this.Controls.Add(this.listBoxFiles);
this.Controls.Add(this.groupImportTypes);
this.Controls.Add(this.label1);
this.Controls.Add(this.comboBoxSystemSelect);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "DATConverter";
this.Text = "DATConverter";
this.groupImportTypes.ResumeLayout(false);
this.groupImportTypes.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
@ -211,5 +225,6 @@
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.RadioButton radioNOINTRO;
private System.Windows.Forms.TextBox textBoxInfo;
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -10,6 +10,7 @@
<PackageReference Include="System.Memory" Version="4.5.4" />
</ItemGroup>
<ItemGroup>
<Compile Update="CustomMainForm.cs" SubType="Form" />
<Compile Update="DATConverter.cs" SubType="Form" />
<Compile Update="DATConverter.Designer.cs" DependentUpon="DATConverter.cs" />
<Compile Update="Properties/Settings.Designer.cs" AutoGen="true" DependentUpon="Settings.settings" DesignTime="true">

View File

@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace DATParser.Properties {
namespace BizHawk.DATTool.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]

View File

@ -0,0 +1,10 @@
# BizHawk DAT Tools
## External DAT Parser
This is a quick external tool that will parse either NoIntro or TOSEC DAT files and output them to text files in a format compatible with the BizHawk text gamedb standard.
Useful for quickly getting new cores up and running with valid ROM hash information.
### Usage
Like other BizHawk external tools, open the .csproj file in Visual Studio (in this case "DATParser.csproj") and rebuild it. This will place a DLL in your BizHawk > output > ExternalTools folder enabling you to access it through EmuHawk > Tools > External Tool > DATTool