mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-05 13:49:40 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74826909f4 | ||
|
|
eb4904afb4 | ||
|
|
06975316b9 | ||
|
|
e0be24e54f | ||
|
|
eb3cbc44a7 | ||
|
|
d6f39bfd4c | ||
|
|
576fa07a2c | ||
|
|
ae2b26f84e | ||
|
|
1d9a2c9be7 | ||
|
|
538c0bba09 | ||
|
|
57c31cad48 | ||
|
|
093db36f44 | ||
|
|
fd4db3f8f0 | ||
|
|
856a3161be | ||
|
|
dfafe9789a | ||
|
|
9f750d01c4 | ||
|
|
705ee82cbb | ||
|
|
d1f80efa41 | ||
|
|
f88e6617e5 | ||
|
|
1401422b08 |
@@ -1,3 +1,12 @@
|
||||
### 1.12 (2019-01-27)
|
||||
- Added a few new systems and formats
|
||||
- Added new DIC commands and flags
|
||||
- Updated the `!submissionInfo.txt` file order
|
||||
- Fixed Audio CD handling
|
||||
- Added Sega CD / Mega CD header extraction
|
||||
- Readded Floppy Disk as a supported format
|
||||
- And more! See the full Git commit list for more details
|
||||
|
||||
### 1.11 (2018-09-20)
|
||||
|
||||
- Fix formatting of XBOX and XBOX 360 security sector output
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="EnumDescriptionConverter.cs" />
|
||||
<Compile Include="KnownSystemComboBoxItem.cs" />
|
||||
<Compile Include="MediaTypeComboBoxItem.cs" />
|
||||
<Compile Include="Options.cs" />
|
||||
<Compile Include="Properties\Settings1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Windows.Media;
|
||||
using DICUI.Data;
|
||||
using DICUI.Data;
|
||||
using DICUI.Utilities;
|
||||
|
||||
namespace DICUI
|
||||
|
||||
20
DICUI.Forms/MediaTypeComboBoxItem.cs
Normal file
20
DICUI.Forms/MediaTypeComboBoxItem.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using DICUI.Data;
|
||||
using DICUI.Utilities;
|
||||
|
||||
namespace DICUI.Forms
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single item in the MediaType combo box
|
||||
/// </summary>
|
||||
public class MediaTypeComboBoxItem
|
||||
{
|
||||
private MediaType? data;
|
||||
|
||||
public MediaTypeComboBoxItem(MediaType? mediaType) => data = mediaType;
|
||||
|
||||
public static implicit operator MediaType? (MediaTypeComboBoxItem item) => item.data;
|
||||
|
||||
public string Name { get { return data.Name(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,9 @@ namespace DICUI
|
||||
public string DICPath { get; private set; }
|
||||
public string SubDumpPath { get; private set; }
|
||||
|
||||
public int preferredDumpSpeedCD { get; set; }
|
||||
public int preferredDumpSpeedDVD { get; set; }
|
||||
public int preferredDumpSpeedBD { get; set; }
|
||||
public int PreferredDumpSpeedCD { get; set; }
|
||||
public int PreferredDumpSpeedDVD { get; set; }
|
||||
public int PreferredDumpSpeedBD { get; set; }
|
||||
|
||||
public bool QuietMode { get; set; }
|
||||
public bool ParanoidMode { get; set; }
|
||||
@@ -49,9 +49,9 @@ namespace DICUI
|
||||
SubDumpPath = ConfigurationManager.AppSettings["SubDumpPath"] ?? "subdump.exe";
|
||||
DefaultOutputPath = ConfigurationManager.AppSettings["DefaultOutputPath"] ?? "ISO";
|
||||
|
||||
this.preferredDumpSpeedCD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedCD"], out int maxDumpSpeedCD) ? maxDumpSpeedCD : 72;
|
||||
this.preferredDumpSpeedDVD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedDVD"], out int maxDumpSpeedDVD) ? maxDumpSpeedDVD : 24;
|
||||
this.preferredDumpSpeedBD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedBD"], out int maxDumpSpeedBD) ? maxDumpSpeedBD : 16;
|
||||
this.PreferredDumpSpeedCD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedCD"], out int maxDumpSpeedCD) ? maxDumpSpeedCD : 72;
|
||||
this.PreferredDumpSpeedDVD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedDVD"], out int maxDumpSpeedDVD) ? maxDumpSpeedDVD : 24;
|
||||
this.PreferredDumpSpeedBD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedBD"], out int maxDumpSpeedBD) ? maxDumpSpeedBD : 16;
|
||||
|
||||
this.QuietMode = Boolean.TryParse(ConfigurationManager.AppSettings["QuietMode"], out bool quietMode) ? quietMode : false;
|
||||
this.ParanoidMode = Boolean.TryParse(ConfigurationManager.AppSettings["ParanoidMode"], out bool paranoidMode) ? paranoidMode : false;
|
||||
@@ -81,14 +81,14 @@ namespace DICUI
|
||||
{
|
||||
case MediaType.CDROM:
|
||||
case MediaType.GDROM:
|
||||
return preferredDumpSpeedCD;
|
||||
return PreferredDumpSpeedCD;
|
||||
case MediaType.DVD:
|
||||
case MediaType.HDDVD:
|
||||
case MediaType.NintendoGameCube:
|
||||
case MediaType.NintendoWiiOpticalDisc:
|
||||
return preferredDumpSpeedDVD;
|
||||
return PreferredDumpSpeedDVD;
|
||||
case MediaType.BluRay:
|
||||
return preferredDumpSpeedBD;
|
||||
return PreferredDumpSpeedBD;
|
||||
default:
|
||||
return 8;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Windows.Media;
|
||||
using DICUI.Forms.Windows;
|
||||
|
||||
namespace DICUI.Forms
|
||||
|
||||
72
DICUI.Forms/Windows/MainWindow.Designer.cs
generated
72
DICUI.Forms/Windows/MainWindow.Designer.cs
generated
@@ -30,6 +30,9 @@
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow));
|
||||
this.MenuBar = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mainWindowLayout = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.settingsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
@@ -56,9 +59,6 @@
|
||||
this.EjectWhenDoneCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.statusGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.StatusLabel = new System.Windows.Forms.TextBox();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.showLogWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -74,13 +74,36 @@
|
||||
//
|
||||
// MenuBar
|
||||
//
|
||||
this.MenuBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.toolsToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.MenuBar.Location = new System.Drawing.Point(0, 0);
|
||||
this.MenuBar.Name = "MenuBar";
|
||||
this.MenuBar.Size = new System.Drawing.Size(584, 24);
|
||||
this.MenuBar.TabIndex = 0;
|
||||
this.MenuBar.Text = "menuStrip1";
|
||||
this.MenuBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
fileToolStripMenuItem, toolsToolStripMenuItem, helpToolStripMenuItem});
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F)));
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
//
|
||||
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
this.toolsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.T)));
|
||||
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20);
|
||||
this.toolsToolStripMenuItem.Text = "Tools";
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.H)));
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem.Text = "Help";
|
||||
//
|
||||
// mainWindowLayout
|
||||
//
|
||||
@@ -117,7 +140,7 @@
|
||||
this.tableLayoutPanel2.ColumnCount = 3;
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 26.32794F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 73.67206F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 144F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 145F));
|
||||
this.tableLayoutPanel2.Controls.Add(this.parametersLabel, 0, 5);
|
||||
this.tableLayoutPanel2.Controls.Add(this.driveSpeedLabel, 0, 4);
|
||||
this.tableLayoutPanel2.Controls.Add(this.driveLetterLabel, 0, 3);
|
||||
@@ -230,7 +253,7 @@
|
||||
this.SystemTypeComboBox.FormattingEnabled = true;
|
||||
this.SystemTypeComboBox.Location = new System.Drawing.Point(110, 13);
|
||||
this.SystemTypeComboBox.Name = "SystemTypeComboBox";
|
||||
this.SystemTypeComboBox.Size = new System.Drawing.Size(295, 21);
|
||||
this.SystemTypeComboBox.Size = new System.Drawing.Size(294, 21);
|
||||
this.SystemTypeComboBox.TabIndex = 13;
|
||||
this.SystemTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.SystemTypeComboBoxSelectionChanged);
|
||||
//
|
||||
@@ -239,7 +262,7 @@
|
||||
this.MediaTypeComboBox.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.MediaTypeComboBox.DisplayMember = "Name";
|
||||
this.MediaTypeComboBox.FormattingEnabled = true;
|
||||
this.MediaTypeComboBox.Location = new System.Drawing.Point(415, 13);
|
||||
this.MediaTypeComboBox.Location = new System.Drawing.Point(414, 13);
|
||||
this.MediaTypeComboBox.Name = "MediaTypeComboBox";
|
||||
this.MediaTypeComboBox.Size = new System.Drawing.Size(131, 21);
|
||||
this.MediaTypeComboBox.TabIndex = 14;
|
||||
@@ -250,16 +273,16 @@
|
||||
this.OutputDirectoryTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.OutputDirectoryTextBox.Location = new System.Drawing.Point(110, 87);
|
||||
this.OutputDirectoryTextBox.Name = "OutputDirectoryTextBox";
|
||||
this.OutputDirectoryTextBox.Size = new System.Drawing.Size(295, 20);
|
||||
this.OutputDirectoryTextBox.Size = new System.Drawing.Size(294, 20);
|
||||
this.OutputDirectoryTextBox.TabIndex = 15;
|
||||
this.OutputDirectoryTextBox.TextChanged += new System.EventHandler(this.OutputDirectoryTextBoxTextChanged);
|
||||
//
|
||||
// OutputDirectoryBrowseButton
|
||||
//
|
||||
this.OutputDirectoryBrowseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OutputDirectoryBrowseButton.Location = new System.Drawing.Point(411, 84);
|
||||
this.OutputDirectoryBrowseButton.Location = new System.Drawing.Point(410, 84);
|
||||
this.OutputDirectoryBrowseButton.Name = "OutputDirectoryBrowseButton";
|
||||
this.OutputDirectoryBrowseButton.Size = new System.Drawing.Size(139, 26);
|
||||
this.OutputDirectoryBrowseButton.Size = new System.Drawing.Size(140, 26);
|
||||
this.OutputDirectoryBrowseButton.TabIndex = 16;
|
||||
this.OutputDirectoryBrowseButton.Text = "Browse";
|
||||
this.OutputDirectoryBrowseButton.UseVisualStyleBackColor = true;
|
||||
@@ -293,16 +316,16 @@
|
||||
this.ParametersTextBox.Location = new System.Drawing.Point(110, 199);
|
||||
this.ParametersTextBox.Name = "ParametersTextBox";
|
||||
this.ParametersTextBox.ReadOnly = true;
|
||||
this.ParametersTextBox.Size = new System.Drawing.Size(295, 20);
|
||||
this.ParametersTextBox.Size = new System.Drawing.Size(294, 20);
|
||||
this.ParametersTextBox.TabIndex = 19;
|
||||
//
|
||||
// EnableParametersCheckBox
|
||||
//
|
||||
this.EnableParametersCheckBox.AutoSize = true;
|
||||
this.EnableParametersCheckBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.EnableParametersCheckBox.Location = new System.Drawing.Point(411, 193);
|
||||
this.EnableParametersCheckBox.Location = new System.Drawing.Point(410, 193);
|
||||
this.EnableParametersCheckBox.Name = "EnableParametersCheckBox";
|
||||
this.EnableParametersCheckBox.Size = new System.Drawing.Size(139, 33);
|
||||
this.EnableParametersCheckBox.Size = new System.Drawing.Size(140, 33);
|
||||
this.EnableParametersCheckBox.TabIndex = 20;
|
||||
this.EnableParametersCheckBox.Text = "Enable Editing";
|
||||
this.EnableParametersCheckBox.UseVisualStyleBackColor = true;
|
||||
@@ -403,27 +426,6 @@
|
||||
this.StatusLabel.Text = "Waiting for media...";
|
||||
this.StatusLabel.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F)));
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
//
|
||||
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
this.toolsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.T)));
|
||||
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20);
|
||||
this.toolsToolStripMenuItem.Text = "Tools";
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.H)));
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpToolStripMenuItem.Text = "Help";
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
|
||||
@@ -262,11 +262,15 @@ namespace DICUI.Forms.Windows
|
||||
private void PopulateMediaType()
|
||||
{
|
||||
KnownSystem? currentSystem = SystemTypeComboBox.SelectedItem as KnownSystemComboBoxItem;
|
||||
|
||||
if (currentSystem != null)
|
||||
{
|
||||
_mediaTypes = Validators.GetValidMediaTypes(currentSystem).ToList();
|
||||
MediaTypeComboBox.DataSource = _mediaTypes;
|
||||
|
||||
var comboBoxItems = new List<MediaTypeComboBoxItem>();
|
||||
foreach (var mediaType in _mediaTypes)
|
||||
comboBoxItems.Add(new MediaTypeComboBoxItem(mediaType));
|
||||
|
||||
MediaTypeComboBox.DataSource = comboBoxItems;
|
||||
|
||||
MediaTypeComboBox.Enabled = _mediaTypes.Count > 1;
|
||||
MediaTypeComboBox.SelectedIndex = (_mediaTypes.IndexOf(_currentMediaType) >= 0 ? _mediaTypes.IndexOf(_currentMediaType) : 0);
|
||||
@@ -390,7 +394,7 @@ namespace DICUI.Forms.Windows
|
||||
RereadAmountC2 = _options.RereadAmountForC2,
|
||||
|
||||
System = SystemTypeComboBox.SelectedItem as KnownSystemComboBoxItem,
|
||||
Type = MediaTypeComboBox.SelectedItem as MediaType?
|
||||
Type = MediaTypeComboBox.SelectedItem as MediaTypeComboBoxItem,
|
||||
};
|
||||
|
||||
// Fix the output paths
|
||||
@@ -587,19 +591,19 @@ namespace DICUI.Forms.Windows
|
||||
{
|
||||
case MediaType.CDROM:
|
||||
case MediaType.GDROM:
|
||||
preferred = _options.preferredDumpSpeedCD;
|
||||
preferred = _options.PreferredDumpSpeedCD;
|
||||
break;
|
||||
case MediaType.DVD:
|
||||
case MediaType.HDDVD:
|
||||
case MediaType.NintendoGameCube:
|
||||
case MediaType.NintendoWiiOpticalDisc:
|
||||
preferred = _options.preferredDumpSpeedDVD;
|
||||
preferred = _options.PreferredDumpSpeedDVD;
|
||||
break;
|
||||
case MediaType.BluRay:
|
||||
preferred = _options.preferredDumpSpeedBD;
|
||||
preferred = _options.PreferredDumpSpeedBD;
|
||||
break;
|
||||
default:
|
||||
preferred = _options.preferredDumpSpeedCD;
|
||||
preferred = _options.PreferredDumpSpeedCD;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -630,7 +634,7 @@ namespace DICUI.Forms.Windows
|
||||
{
|
||||
ViewModels.LoggerViewModel.VerboseLog("Trying to detect media type for drive {0}.. ", drive.Letter);
|
||||
_currentMediaType = Validators.GetDiscType(drive.Letter);
|
||||
ViewModels.LoggerViewModel.VerboseLogLn(_currentMediaType != null ? "unable to detect." : ("detected " + _currentMediaType.Name() + "."));
|
||||
ViewModels.LoggerViewModel.VerboseLogLn(_currentMediaType == null ? "unable to detect." : ("detected " + _currentMediaType.Name() + "."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -138,27 +138,6 @@
|
||||
<metadata name="systemMediaTypeLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="parametersLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="driveSpeedLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="driveLetterLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="outputDirectoryLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="outputFilenameLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="systemMediaTypeLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="StatusLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="StatusLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
@@ -29,9 +29,9 @@ namespace DICUI.Forms.Windows
|
||||
DumpSpeedBDSlider.Maximum = (int)Constants.SpeedsForBDAsCollection.Last();
|
||||
|
||||
// Select the current values
|
||||
DumpSpeedCDSlider.Value = _options.preferredDumpSpeedCD;
|
||||
DumpSpeedDVDSlider.Value = _options.preferredDumpSpeedDVD;
|
||||
DumpSpeedBDSlider.Value = _options.preferredDumpSpeedBD;
|
||||
DumpSpeedCDSlider.Value = _options.PreferredDumpSpeedCD;
|
||||
DumpSpeedDVDSlider.Value = _options.PreferredDumpSpeedDVD;
|
||||
DumpSpeedBDSlider.Value = _options.PreferredDumpSpeedBD;
|
||||
|
||||
// Create textbox outputs
|
||||
DumpSpeedCDTextBox.Text = DumpSpeedCDSlider.Value.ToString();
|
||||
@@ -134,9 +134,9 @@ namespace DICUI.Forms.Windows
|
||||
{
|
||||
Array.ForEach(PathSettings(), setting => TextBoxForPathSetting(setting).Text = _options.Get(setting));
|
||||
|
||||
DumpSpeedCDSlider.Value = _options.preferredDumpSpeedCD;
|
||||
DumpSpeedDVDSlider.Value = _options.preferredDumpSpeedDVD;
|
||||
DumpSpeedBDSlider.Value = _options.preferredDumpSpeedBD;
|
||||
DumpSpeedCDSlider.Value = _options.PreferredDumpSpeedCD;
|
||||
DumpSpeedDVDSlider.Value = _options.PreferredDumpSpeedDVD;
|
||||
DumpSpeedBDSlider.Value = _options.PreferredDumpSpeedBD;
|
||||
}
|
||||
|
||||
#region Event Handlers
|
||||
@@ -152,9 +152,9 @@ namespace DICUI.Forms.Windows
|
||||
{
|
||||
Array.ForEach(PathSettings(), setting => _options.Set(setting, TextBoxForPathSetting(setting).Text));
|
||||
|
||||
_options.preferredDumpSpeedCD = Convert.ToInt32(DumpSpeedCDSlider.Value);
|
||||
_options.preferredDumpSpeedDVD = Convert.ToInt32(DumpSpeedDVDSlider.Value);
|
||||
_options.preferredDumpSpeedBD = Convert.ToInt32(DumpSpeedBDSlider.Value);
|
||||
_options.PreferredDumpSpeedCD = Convert.ToInt32(DumpSpeedCDSlider.Value);
|
||||
_options.PreferredDumpSpeedDVD = Convert.ToInt32(DumpSpeedDVDSlider.Value);
|
||||
_options.PreferredDumpSpeedBD = Convert.ToInt32(DumpSpeedBDSlider.Value);
|
||||
|
||||
_options.QuietMode = QuietModeCheckBox.Checked;
|
||||
_options.ParanoidMode = ParanoidModeCheckBox.Checked;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
public const string Floppy = "fd";
|
||||
public const string GDROM = "gd";
|
||||
public const string MDS = "mds";
|
||||
public const string Merge = "merge";
|
||||
public const string Reset = "reset";
|
||||
public const string Start = "start";
|
||||
public const string Stop = "stop";
|
||||
@@ -53,6 +54,7 @@
|
||||
public const string ScanFileProtect = "/sf";
|
||||
public const string ScanSectorProtect = "/ss";
|
||||
public const string SeventyFour = "/74";
|
||||
public const string SkipSector = "/sk";
|
||||
public const string SubchannelReadLevel = "/s";
|
||||
}
|
||||
|
||||
@@ -79,11 +81,11 @@
|
||||
public const string VersionField = "Version";
|
||||
public const string EditionField = "Edition/Release";
|
||||
public const string CopyProtectionField = "Copy Protection";
|
||||
public const string MasteringRingField = "Mastering Ring";
|
||||
public const string MasteringRingField = "Mastering Code (laser branded/etched)";
|
||||
public const string MasteringSIDField = "Mastering SID Code";
|
||||
public const string MouldSIDField = "Mould SID Code";
|
||||
public const string AdditionalMouldField = "Additional Mould";
|
||||
public const string ToolstampField = "Toolstamp or Mastering Code";
|
||||
public const string ToolstampField = "Toolstamp or Mastering Code (engraved/stamped)";
|
||||
|
||||
// Automatic Information
|
||||
|
||||
@@ -99,8 +101,8 @@
|
||||
public const string PlayStationAntiModchipField = "Anti-modchip";
|
||||
public const string PlayStationLibCryptField = "LibCrypt";
|
||||
public const string PlayStation4PICField = "Permanent Information & Control (PIC)";
|
||||
public const string SaturnHeaderField = "Header";
|
||||
public const string SaturnBuildDateField = "Build Date";
|
||||
public const string SegaHeaderField = "Header";
|
||||
public const string SegaBuildDateField = "Build Date";
|
||||
public const string XBOXDMIHash = "DMI.bin Hashes";
|
||||
public const string XBOXPFIHash = "PFI.bin Hashes";
|
||||
public const string XBOXSSHash = "SS.bin Hashes";
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
Floppy,
|
||||
GDROM,
|
||||
MDS,
|
||||
Merge,
|
||||
Reset,
|
||||
Start,
|
||||
Stop,
|
||||
@@ -55,6 +56,7 @@
|
||||
ScanFileProtect,
|
||||
ScanSectorProtect,
|
||||
SeventyFour,
|
||||
SkipSector,
|
||||
SubchannelReadLevel,
|
||||
}
|
||||
|
||||
@@ -153,6 +155,7 @@
|
||||
NichibutsuHighRateSystem,
|
||||
NichibutsuSuperCD,
|
||||
NichibutsuXRateSystem,
|
||||
PanasonicM2,
|
||||
PhotoPlayVarious,
|
||||
RawThrillsVarious,
|
||||
SegaChihiro,
|
||||
@@ -183,6 +186,7 @@
|
||||
EnhancedCD,
|
||||
EnhancedDVD,
|
||||
EnhancedBD,
|
||||
HasbroVideoNow,
|
||||
HDDVDVideo,
|
||||
PalmOS,
|
||||
PhilipsCDiDigitalVideo,
|
||||
|
||||
@@ -102,6 +102,8 @@ namespace DICUI.Utilities
|
||||
return DICCommandStrings.GDROM;
|
||||
case DICCommand.MDS:
|
||||
return DICCommandStrings.MDS;
|
||||
case DICCommand.Merge:
|
||||
return DICCommandStrings.Merge;
|
||||
case DICCommand.Reset:
|
||||
return DICCommandStrings.Reset;
|
||||
case DICCommand.Start:
|
||||
@@ -178,6 +180,8 @@ namespace DICUI.Utilities
|
||||
return DICFlagStrings.ScanSectorProtect;
|
||||
case DICFlag.SeventyFour:
|
||||
return DICFlagStrings.SeventyFour;
|
||||
case DICFlag.SkipSector:
|
||||
return DICFlagStrings.SkipSector;
|
||||
case DICFlag.SubchannelReadLevel:
|
||||
return DICFlagStrings.SubchannelReadLevel;
|
||||
|
||||
@@ -255,7 +259,6 @@ namespace DICUI.Utilities
|
||||
case MediaType.Cassette:
|
||||
return ".wav";
|
||||
case MediaType.NONE:
|
||||
case MediaType.CED:
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -516,6 +519,8 @@ namespace DICUI.Utilities
|
||||
return "Nichibutsu Super CD";
|
||||
case KnownSystem.NichibutsuXRateSystem:
|
||||
return "NichibutsuX-Rate System";
|
||||
case KnownSystem.PanasonicM2:
|
||||
return "Panasonic M2";
|
||||
case KnownSystem.PhotoPlayVarious:
|
||||
return "PhotoPlay PC-based Systems";
|
||||
case KnownSystem.RawThrillsVarious:
|
||||
@@ -567,6 +572,8 @@ namespace DICUI.Utilities
|
||||
return "Enhanced DVD";
|
||||
case KnownSystem.EnhancedBD:
|
||||
return "Enhanced BD";
|
||||
case KnownSystem.HasbroVideoNow:
|
||||
return "Hasbro VideoNow";
|
||||
case KnownSystem.HDDVDVideo:
|
||||
return "HD-DVD-Video";
|
||||
case KnownSystem.PalmOS:
|
||||
|
||||
@@ -301,8 +301,8 @@ namespace DICUI.Utilities
|
||||
&& File.Exists(combinedBase + ".cue")
|
||||
&& File.Exists(combinedBase + ".dat")
|
||||
&& File.Exists(combinedBase + ".img")
|
||||
&& File.Exists(combinedBase + ".img_EdcEcc.txt")
|
||||
&& File.Exists(combinedBase + ".scm")
|
||||
&& (System == KnownSystem.AudioCD || File.Exists(combinedBase + ".img_EdcEcc.txt"))
|
||||
&& (System == KnownSystem.AudioCD || File.Exists(combinedBase + ".scm"))
|
||||
&& File.Exists(combinedBase + ".sub")
|
||||
&& File.Exists(combinedBase + "_c2Error.txt")
|
||||
&& File.Exists(combinedBase + "_cmd.txt")
|
||||
@@ -458,7 +458,7 @@ namespace DICUI.Utilities
|
||||
mappings[Template.MouldSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.AdditionalMouldField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.ToolstampField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.PVDField] = GetPVD(combinedBase + "_mainInfo.txt") ?? "";
|
||||
mappings[Template.PVDField] = GetPVD(combinedBase + "_mainInfo.txt") ?? "Disc has no PVD";
|
||||
mappings[Template.ErrorCountField] = GetErrorCount(combinedBase + ".img_EdcEcc.txt").ToString();
|
||||
mappings[Template.CuesheetField] = GetFullFile(combinedBase + ".cue") ?? "";
|
||||
mappings[Template.WriteOffsetField] = GetWriteOffset(combinedBase + "_disc.txt") ?? "";
|
||||
@@ -488,13 +488,32 @@ namespace DICUI.Utilities
|
||||
}
|
||||
|
||||
break;
|
||||
case KnownSystem.SegaSaturn:
|
||||
mappings[Template.SaturnHeaderField] = GetSaturnHeader(combinedBase + "_mainInfo.txt") ?? "";
|
||||
if (GetSaturnBuildInfo(mappings[Template.SaturnHeaderField], out string serial, out string version, out string buildDate))
|
||||
case KnownSystem.SegaCDMegaCD:
|
||||
mappings[Template.SegaHeaderField] = GetSegaHeader(combinedBase + "_mainInfo.txt") ?? "";
|
||||
|
||||
// Take only the last 16 lines for Sega CD
|
||||
if (!string.IsNullOrEmpty(mappings[Template.SegaHeaderField]))
|
||||
mappings[Template.SegaHeaderField] = string.Join("\n", mappings[Template.SegaHeaderField].Split('\n').Skip(16));
|
||||
|
||||
if (GetSegaCDBuildInfo(mappings[Template.SegaHeaderField], out string scdSerial, out string fixedDate))
|
||||
{
|
||||
mappings[Template.DiscSerialField] = serial ?? "";
|
||||
mappings[Template.DiscSerialField] = scdSerial ?? "";
|
||||
mappings[Template.SegaBuildDateField] = fixedDate ?? "";
|
||||
}
|
||||
|
||||
break;
|
||||
case KnownSystem.SegaSaturn:
|
||||
mappings[Template.SegaHeaderField] = GetSegaHeader(combinedBase + "_mainInfo.txt") ?? "";
|
||||
|
||||
// Take only the first 16 lines for Saturn
|
||||
if (!string.IsNullOrEmpty(mappings[Template.SegaHeaderField]))
|
||||
mappings[Template.SegaHeaderField] = string.Join("\n", mappings[Template.SegaHeaderField].Split('\n').Take(16));
|
||||
|
||||
if (GetSaturnBuildInfo(mappings[Template.SegaHeaderField], out string saturnSerial, out string version, out string buildDate))
|
||||
{
|
||||
mappings[Template.DiscSerialField] = saturnSerial ?? "";
|
||||
mappings[Template.VersionField] = version ?? "";
|
||||
mappings[Template.SaturnBuildDateField] = buildDate ?? "";
|
||||
mappings[Template.SegaBuildDateField] = buildDate ?? "";
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -541,7 +560,8 @@ namespace DICUI.Utilities
|
||||
}
|
||||
mappings[Template.MasteringRingField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.MasteringSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.MouldSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings["Label-Side " + Template.MouldSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings["Data-Side " + Template.MouldSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.AdditionalMouldField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.ToolstampField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.PVDField] = GetPVD(combinedBase + "_mainInfo.txt") ?? "";
|
||||
@@ -562,7 +582,8 @@ namespace DICUI.Utilities
|
||||
mappings["Inner " + Template.MasteringRingField] = Template.RequiredIfExistsValue;
|
||||
mappings["Outer " + Template.MasteringSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings["Inner " + Template.MasteringSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.MouldSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings["Label-Side " + Template.MouldSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings["Data-Side " + Template.MouldSIDField] = Template.RequiredIfExistsValue;
|
||||
mappings[Template.AdditionalMouldField] = Template.RequiredIfExistsValue;
|
||||
mappings["Outer " + Template.ToolstampField] = Template.RequiredIfExistsValue;
|
||||
mappings["Inner " + Template.ToolstampField] = Template.RequiredIfExistsValue;
|
||||
@@ -667,8 +688,9 @@ namespace DICUI.Utilities
|
||||
output.Add(Template.DiscSerialField + ": " + info[Template.DiscSerialField]);
|
||||
switch (System)
|
||||
{
|
||||
case KnownSystem.SegaCDMegaCD:
|
||||
case KnownSystem.SegaSaturn:
|
||||
output.Add(Template.SaturnBuildDateField + ": " + info[Template.SaturnBuildDateField]);
|
||||
output.Add(Template.SegaBuildDateField + ": " + info[Template.SegaBuildDateField]);
|
||||
break;
|
||||
case KnownSystem.SonyPlayStation:
|
||||
case KnownSystem.SonyPlayStation2:
|
||||
@@ -690,7 +712,8 @@ namespace DICUI.Utilities
|
||||
output.Add("\tInner " + Template.MasteringRingField + ": " + info["Inner " + Template.MasteringRingField]);
|
||||
output.Add("\tOuter " + Template.MasteringSIDField + ": " + info["Outer " + Template.MasteringSIDField]);
|
||||
output.Add("\tInner " + Template.MasteringSIDField + ": " + info["Inner " + Template.MasteringSIDField]);
|
||||
output.Add("\t" + Template.MouldSIDField + ": " + info[Template.MouldSIDField]);
|
||||
output.Add("\tLabel-Side " + Template.MouldSIDField + ": " + info["Label-Side " + Template.MouldSIDField]);
|
||||
output.Add("\tData-Side " + Template.MouldSIDField + ": " + info["Data-Side " + Template.MouldSIDField]);
|
||||
output.Add("\t" + Template.AdditionalMouldField + ": " + info[Template.AdditionalMouldField]);
|
||||
output.Add("\tOuter " + Template.ToolstampField + ": " + info["Outer " + Template.ToolstampField]);
|
||||
output.Add("\tInner " + Template.ToolstampField + ": " + info["Inner " + Template.ToolstampField]);
|
||||
@@ -700,7 +723,8 @@ namespace DICUI.Utilities
|
||||
{
|
||||
output.Add("\t" + Template.MasteringRingField + ": " + info[Template.MasteringRingField]);
|
||||
output.Add("\t" + Template.MasteringSIDField + ": " + info[Template.MasteringSIDField]);
|
||||
output.Add("\t" + Template.MouldSIDField + ": " + info[Template.MouldSIDField]);
|
||||
output.Add("\tLabel-Side " + Template.MouldSIDField + ": " + info["Label-Side " + Template.MouldSIDField]);
|
||||
output.Add("\tData-Side " + Template.MouldSIDField + ": " + info["Data-Side " + Template.MouldSIDField]);
|
||||
output.Add("\t" + Template.AdditionalMouldField + ": " + info[Template.AdditionalMouldField]);
|
||||
output.Add("\t" + Template.ToolstampField + ": " + info[Template.ToolstampField]);
|
||||
}
|
||||
@@ -731,9 +755,10 @@ namespace DICUI.Utilities
|
||||
output.Add(Template.EditionField + ": " + info[Template.EditionField]);
|
||||
switch (System)
|
||||
{
|
||||
case KnownSystem.SegaCDMegaCD:
|
||||
case KnownSystem.SegaSaturn:
|
||||
output.Add(Template.SaturnHeaderField + ":"); output.Add("");
|
||||
output.AddRange(info[Template.SaturnHeaderField].Split('\n')); output.Add("");
|
||||
output.Add(Template.SegaHeaderField + ":"); output.Add("");
|
||||
output.AddRange(info[Template.SegaHeaderField].Split('\n')); output.Add("");
|
||||
break;
|
||||
case KnownSystem.SonyPlayStation:
|
||||
output.Add(Template.PlayStationEDCField + ": " + info[Template.PlayStationEDCField]);
|
||||
@@ -791,20 +816,20 @@ namespace DICUI.Utilities
|
||||
output.Add(Template.SubIntentionField + ":"); output.Add("");
|
||||
output.AddRange(info[Template.SubIntentionField].Split('\n')); output.Add("");
|
||||
}
|
||||
if (info.ContainsKey(Template.DATField))
|
||||
{
|
||||
output.Add(Template.DATField + ":"); output.Add("");
|
||||
output.AddRange(info[Template.DATField].Split('\n')); output.Add("");
|
||||
}
|
||||
switch (Type)
|
||||
{
|
||||
case MediaType.CDROM:
|
||||
case MediaType.GDROM:
|
||||
output.Add(Template.CuesheetField + ":"); output.Add("");
|
||||
output.AddRange(info[Template.CuesheetField].Split('\n')); output.Add("");
|
||||
output.Add(Template.WriteOffsetField + ": " + info[Template.WriteOffsetField]); output.Add("");
|
||||
output.Add(Template.WriteOffsetField + ": " + info[Template.WriteOffsetField]);
|
||||
break;
|
||||
}
|
||||
if (info.ContainsKey(Template.DATField))
|
||||
{
|
||||
output.Add(Template.DATField + ":"); output.Add("");
|
||||
output.AddRange(info[Template.DATField].Split('\n'));
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
@@ -1352,11 +1377,11 @@ namespace DICUI.Utilities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the header from a Saturn disc, if possible
|
||||
/// Get the header from a Sega Saturn or Sega CD / Mega CD disc, if possible
|
||||
/// </summary>
|
||||
/// <param name="mainInfo">_mainInfo.txt file location</param>
|
||||
/// <returns>Header as a byte array if possible, null on error</returns>
|
||||
private string GetSaturnHeader(string mainInfo)
|
||||
private string GetSegaHeader(string mainInfo)
|
||||
{
|
||||
// If the file doesn't exist, we can't get info from it
|
||||
if (!File.Exists(mainInfo))
|
||||
@@ -1376,9 +1401,9 @@ namespace DICUI.Utilities
|
||||
|
||||
// Now that we're at the Header, read each line in and concatenate
|
||||
string header = "";
|
||||
for (int i = 0; i < 16; i++)
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
header += sr.ReadLine() + "\n"; // 0000-00F0
|
||||
header += sr.ReadLine() + "\n"; // 0000-01F0
|
||||
}
|
||||
|
||||
return header;
|
||||
@@ -1392,16 +1417,17 @@ namespace DICUI.Utilities
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the build info from a Saturn disc, if possible
|
||||
/// Get the build info from a Sega CD disc, if possible
|
||||
/// </summary>
|
||||
/// <<param name="saturnHeader">String representing a formatter variant of the Saturn header</param>
|
||||
/// <<param name="segaHeader">String representing a formatter variant of the Sega CD header</param>
|
||||
/// <returns>True on successful extraction of info, false otherwise</returns>
|
||||
private bool GetSaturnBuildInfo(string saturnHeader, out string serial, out string version, out string date)
|
||||
/// <remarks>Note that this works for MOST headers, except ones where the copyright stretches > 1 line</remarks>
|
||||
private bool GetSegaCDBuildInfo(string segaHeader, out string serial, out string date)
|
||||
{
|
||||
serial = null; version = null; date = null;
|
||||
serial = null; date = null;
|
||||
|
||||
// If the input header is null, we can't do a thing
|
||||
if (String.IsNullOrWhiteSpace(saturnHeader))
|
||||
if (String.IsNullOrWhiteSpace(segaHeader))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1409,7 +1435,92 @@ namespace DICUI.Utilities
|
||||
// Now read it in cutting it into lines for easier parsing
|
||||
try
|
||||
{
|
||||
string[] header = saturnHeader.Split('\n');
|
||||
string[] header = segaHeader.Split('\n');
|
||||
string serialVersionLine = header[8].Substring(58);
|
||||
string dateLine = header[1].Substring(58);
|
||||
serial = serialVersionLine.Substring(3, 7);
|
||||
date = dateLine.Substring(8).Trim();
|
||||
|
||||
// Properly format the date string, if possible
|
||||
string[] dateSplit = date.Split('.');
|
||||
|
||||
if (dateSplit.Length == 1)
|
||||
dateSplit = new string[] { date.Substring(0, 4), date.Substring(4) };
|
||||
|
||||
string month = dateSplit[1];
|
||||
switch (month)
|
||||
{
|
||||
case "JAN":
|
||||
dateSplit[1] = "01";
|
||||
break;
|
||||
case "FEB":
|
||||
dateSplit[1] = "02";
|
||||
break;
|
||||
case "MAR":
|
||||
dateSplit[1] = "03";
|
||||
break;
|
||||
case "APR":
|
||||
dateSplit[1] = "04";
|
||||
break;
|
||||
case "MAY":
|
||||
dateSplit[1] = "05";
|
||||
break;
|
||||
case "JUN":
|
||||
dateSplit[1] = "06";
|
||||
break;
|
||||
case "JUL":
|
||||
dateSplit[1] = "07";
|
||||
break;
|
||||
case "AUG":
|
||||
dateSplit[1] = "08";
|
||||
break;
|
||||
case "SEP":
|
||||
dateSplit[1] = "09";
|
||||
break;
|
||||
case "OCT":
|
||||
dateSplit[1] = "10";
|
||||
break;
|
||||
case "NOV":
|
||||
dateSplit[1] = "11";
|
||||
break;
|
||||
case "DEC":
|
||||
dateSplit[1] = "12";
|
||||
break;
|
||||
default:
|
||||
dateSplit[1] = "00";
|
||||
break;
|
||||
}
|
||||
|
||||
date = string.Join("-", dateSplit);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// We don't care what the error is
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the build info from a Saturn disc, if possible
|
||||
/// </summary>
|
||||
/// <<param name="segaHeader">String representing a formatter variant of the Saturn header</param>
|
||||
/// <returns>True on successful extraction of info, false otherwise</returns>
|
||||
private bool GetSaturnBuildInfo(string segaHeader, out string serial, out string version, out string date)
|
||||
{
|
||||
serial = null; version = null; date = null;
|
||||
|
||||
// If the input header is null, we can't do a thing
|
||||
if (String.IsNullOrWhiteSpace(segaHeader))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Now read it in cutting it into lines for easier parsing
|
||||
try
|
||||
{
|
||||
string[] header = segaHeader.Split('\n');
|
||||
string serialVersionLine = header[2].Substring(58);
|
||||
string dateLine = header[3].Substring(58);
|
||||
serial = serialVersionLine.Substring(0, 8);
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace DICUI.Utilities
|
||||
|
||||
// Path Information
|
||||
public string Filename;
|
||||
public string OptiarcFilename;
|
||||
|
||||
// Sector Information
|
||||
public int? StartLBAValue;
|
||||
@@ -52,6 +53,7 @@ namespace DICUI.Utilities
|
||||
//public int? C2OpcodeValue4; // Last LBA to reread (default EOS)
|
||||
public int? ForceUnitAccessValue; // Delete per specified (default 1)
|
||||
public int? ScanFileProtectValue; // Timeout value (default 60)
|
||||
public int?[] SkipSectorValue = new int?[2]; // Skip between sectors
|
||||
public int? SubchannelReadLevelValue; // 0 no next sub, 1 next sub (default), 2 next and next next
|
||||
|
||||
/// <summary>
|
||||
@@ -219,6 +221,7 @@ namespace DICUI.Utilities
|
||||
|| Command == DICCommand.Floppy
|
||||
|| Command == DICCommand.GDROM
|
||||
|| Command == DICCommand.MDS
|
||||
|| Command == DICCommand.Merge
|
||||
|| Command == DICCommand.Swap
|
||||
|| Command == DICCommand.Sub
|
||||
|| Command == DICCommand.XBOX
|
||||
@@ -232,6 +235,15 @@ namespace DICUI.Utilities
|
||||
return null;
|
||||
}
|
||||
|
||||
// Optiarc Filename
|
||||
if (Command == DICCommand.Merge)
|
||||
{
|
||||
if (OptiarcFilename != null)
|
||||
parameters.Add("\"" + OptiarcFilename.Trim('"') + "\"");
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
// Drive Speed
|
||||
if (Command == DICCommand.Audio
|
||||
|| Command == DICCommand.BluRay
|
||||
@@ -517,6 +529,27 @@ namespace DICUI.Utilities
|
||||
parameters.Add(DICFlag.SeventyFour.Name());
|
||||
}
|
||||
|
||||
// Skip sectors
|
||||
if (Command == DICCommand.Data)
|
||||
{
|
||||
if (this[DICFlag.SkipSector])
|
||||
{
|
||||
if (SkipSectorValue[0] != null && SkipSectorValue[1] != null)
|
||||
{
|
||||
parameters.Add(DICFlag.SkipSector.Name());
|
||||
if (SkipSectorValue[0] >= 0 && SkipSectorValue[1] >= 0)
|
||||
{
|
||||
parameters.Add(SkipSectorValue[0].ToString());
|
||||
parameters.Add(SkipSectorValue[1].ToString());
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Set Subchannel read level
|
||||
if (Command == DICCommand.Audio
|
||||
|| Command == DICCommand.CompactDisc
|
||||
@@ -779,6 +812,23 @@ namespace DICUI.Utilities
|
||||
Command = DICCommand.MDS;
|
||||
break;
|
||||
|
||||
case DICCommandStrings.Merge:
|
||||
if (!DoesExist(parts, 1) || IsFlag(parts[1]) || !File.Exists(parts[1]))
|
||||
return false;
|
||||
else
|
||||
Filename = parts[1];
|
||||
|
||||
if (!DoesExist(parts, 2) || IsFlag(parts[2]) || !File.Exists(parts[2]))
|
||||
return false;
|
||||
else
|
||||
OptiarcFilename = parts[2];
|
||||
|
||||
if (parts.Count > 3)
|
||||
return false;
|
||||
|
||||
Command = DICCommand.Merge;
|
||||
break;
|
||||
|
||||
case DICCommandStrings.Reset:
|
||||
if (!DoesExist(parts, 1) || !IsValidDriveLetter(parts[1]))
|
||||
return false;
|
||||
@@ -1150,6 +1200,22 @@ namespace DICUI.Utilities
|
||||
this[DICFlag.SeventyFour] = true;
|
||||
break;
|
||||
|
||||
case DICFlagStrings.SkipSector:
|
||||
if (parts[0] != DICCommandStrings.Data)
|
||||
return false;
|
||||
else if (!DoesExist(parts, i + 1) || !DoesExist(parts, i + 2))
|
||||
return false;
|
||||
else if (IsFlag(parts[i + 1]) || IsFlag(parts[i + 2]))
|
||||
return false;
|
||||
else if (!IsValidNumber(parts[i + 1], lowerBound: 0) || !IsValidNumber(parts[i + 2], lowerBound: 0))
|
||||
return false;
|
||||
|
||||
this[DICFlag.SkipSector] = true;
|
||||
SkipSectorValue[0] = Int32.Parse(parts[i + 1]);
|
||||
SkipSectorValue[1] = Int32.Parse(parts[i + 2]);
|
||||
i += 2;
|
||||
break;
|
||||
|
||||
case DICFlagStrings.SubchannelReadLevel:
|
||||
if (parts[0] != DICCommandStrings.Audio
|
||||
&& parts[0] != DICCommandStrings.CompactDisc
|
||||
|
||||
@@ -94,7 +94,8 @@ namespace DICUI.Utilities
|
||||
break;
|
||||
case KnownSystem.SonyPlayStation3:
|
||||
types.Add(MediaType.BluRay);
|
||||
types.Add(MediaType.CDROM); // TODO: Confirm this
|
||||
types.Add(MediaType.CDROM);
|
||||
types.Add(MediaType.DVD);
|
||||
break;
|
||||
case KnownSystem.SonyPlayStation4:
|
||||
types.Add(MediaType.BluRay);
|
||||
@@ -267,6 +268,9 @@ namespace DICUI.Utilities
|
||||
case KnownSystem.NichibutsuXRateSystem:
|
||||
types.Add(MediaType.DVD);
|
||||
break;
|
||||
case KnownSystem.PanasonicM2:
|
||||
types.Add(MediaType.CDROM);
|
||||
break;
|
||||
case KnownSystem.PhotoPlayVarious:
|
||||
types.Add(MediaType.CDROM);
|
||||
break;
|
||||
@@ -342,6 +346,9 @@ namespace DICUI.Utilities
|
||||
case KnownSystem.EnhancedBD:
|
||||
types.Add(MediaType.BluRay);
|
||||
break;
|
||||
case KnownSystem.HasbroVideoNow:
|
||||
types.Add(MediaType.CDROM);
|
||||
break;
|
||||
case KnownSystem.HDDVDVideo:
|
||||
types.Add(MediaType.HDDVD);
|
||||
break;
|
||||
@@ -461,9 +468,7 @@ namespace DICUI.Utilities
|
||||
|
||||
var collection = searcher.Get();
|
||||
foreach (ManagementObject queryObj in collection)
|
||||
{
|
||||
deviceId = (string)queryObj["DeviceID"];
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -473,9 +478,7 @@ namespace DICUI.Utilities
|
||||
|
||||
// If we got no valid device, we don't care and just return
|
||||
if (deviceId == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Get all relevant disc information
|
||||
try
|
||||
@@ -486,16 +489,12 @@ namespace DICUI.Utilities
|
||||
foreach (var disc in discMaster)
|
||||
{
|
||||
if (disc.ToString().Contains(deviceId))
|
||||
{
|
||||
id = disc.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
// If we couldn't find the drive, we don't care and return
|
||||
if (id == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Otherwise, we get the media type, if any
|
||||
MsftDiscRecorder2 recorder = new MsftDiscRecorder2();
|
||||
@@ -504,9 +503,7 @@ namespace DICUI.Utilities
|
||||
dataWriter.Recorder = recorder;
|
||||
var media = dataWriter.CurrentPhysicalMediaType;
|
||||
if (media != IMAPI_MEDIA_PHYSICAL_TYPE.IMAPI_MEDIA_TYPE_UNKNOWN)
|
||||
{
|
||||
return Converters.IMAPIDiskTypeToMediaType(media);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -529,10 +526,11 @@ namespace DICUI.Utilities
|
||||
switch (type)
|
||||
{
|
||||
// Fully supported types
|
||||
case MediaType.BluRay:
|
||||
case MediaType.CDROM:
|
||||
case MediaType.DVD:
|
||||
case MediaType.FloppyDisk:
|
||||
case MediaType.HDDVD:
|
||||
case MediaType.BluRay:
|
||||
return Result.Success("{0} ready to dump", type.Name());
|
||||
|
||||
// Partially supported types
|
||||
@@ -545,18 +543,13 @@ namespace DICUI.Utilities
|
||||
case MediaType.UMD:
|
||||
return Result.Success("{0} supported for submission info parsing", type.Name());
|
||||
|
||||
// Undumpable but recognized types
|
||||
case MediaType.LaserDisc:
|
||||
case MediaType.NintendoWiiUOpticalDisc:
|
||||
case MediaType.CED:
|
||||
case MediaType.Cartridge:
|
||||
case MediaType.Cassette:
|
||||
return Result.Failure("{0} discs are not supported for dumping", type.Name());
|
||||
|
||||
// Invalid or unknown types
|
||||
// Specifically unknown type
|
||||
case MediaType.NONE:
|
||||
default:
|
||||
return Result.Failure("Please select a valid disc type");
|
||||
|
||||
// Undumpable but recognized types
|
||||
default:
|
||||
return Result.Failure("{0} discs are not supported for dumping", type.Name());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="EnumDescriptionConverter.cs" />
|
||||
<Compile Include="MediaTypeComboBoxItem.cs" />
|
||||
<Compile Include="Options.cs" />
|
||||
<Compile Include="Windows\LogWindow.xaml.cs">
|
||||
<DependentUpon>LogWindow.xaml</DependentUpon>
|
||||
|
||||
20
DICUI/MediaTypeComboBoxItem.cs
Normal file
20
DICUI/MediaTypeComboBoxItem.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using DICUI.Data;
|
||||
using DICUI.Utilities;
|
||||
|
||||
namespace DICUI
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single item in the MediaType combo box
|
||||
/// </summary>
|
||||
public class MediaTypeComboBoxItem
|
||||
{
|
||||
private MediaType? data;
|
||||
|
||||
public MediaTypeComboBoxItem(MediaType? mediaType) => data = mediaType;
|
||||
|
||||
public static implicit operator MediaType? (MediaTypeComboBoxItem item) => item.data;
|
||||
|
||||
public string Name { get { return data.Name(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,9 @@ namespace DICUI
|
||||
public string DICPath { get; private set; }
|
||||
public string SubDumpPath { get; private set; }
|
||||
|
||||
public int preferredDumpSpeedCD { get; set; }
|
||||
public int preferredDumpSpeedDVD { get; set; }
|
||||
public int preferredDumpSpeedBD { get; set; }
|
||||
public int PreferredDumpSpeedCD { get; set; }
|
||||
public int PreferredDumpSpeedDVD { get; set; }
|
||||
public int PreferredDumpSpeedBD { get; set; }
|
||||
|
||||
public bool QuietMode { get; set; }
|
||||
public bool ParanoidMode { get; set; }
|
||||
@@ -49,9 +49,9 @@ namespace DICUI
|
||||
SubDumpPath = ConfigurationManager.AppSettings["SubDumpPath"] ?? "subdump.exe";
|
||||
DefaultOutputPath = ConfigurationManager.AppSettings["DefaultOutputPath"] ?? "ISO";
|
||||
|
||||
this.preferredDumpSpeedCD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedCD"], out int maxDumpSpeedCD) ? maxDumpSpeedCD : 72;
|
||||
this.preferredDumpSpeedDVD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedDVD"], out int maxDumpSpeedDVD) ? maxDumpSpeedDVD : 24;
|
||||
this.preferredDumpSpeedBD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedBD"], out int maxDumpSpeedBD) ? maxDumpSpeedBD : 16;
|
||||
this.PreferredDumpSpeedCD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedCD"], out int maxDumpSpeedCD) ? maxDumpSpeedCD : 72;
|
||||
this.PreferredDumpSpeedDVD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedDVD"], out int maxDumpSpeedDVD) ? maxDumpSpeedDVD : 24;
|
||||
this.PreferredDumpSpeedBD = Int32.TryParse(ConfigurationManager.AppSettings["preferredDumpSpeedBD"], out int maxDumpSpeedBD) ? maxDumpSpeedBD : 16;
|
||||
|
||||
this.QuietMode = Boolean.TryParse(ConfigurationManager.AppSettings["QuietMode"], out bool quietMode) ? quietMode : false;
|
||||
this.ParanoidMode = Boolean.TryParse(ConfigurationManager.AppSettings["ParanoidMode"], out bool paranoidMode) ? paranoidMode : false;
|
||||
@@ -81,14 +81,14 @@ namespace DICUI
|
||||
{
|
||||
case MediaType.CDROM:
|
||||
case MediaType.GDROM:
|
||||
return preferredDumpSpeedCD;
|
||||
return PreferredDumpSpeedCD;
|
||||
case MediaType.DVD:
|
||||
case MediaType.HDDVD:
|
||||
case MediaType.NintendoGameCube:
|
||||
case MediaType.NintendoWiiOpticalDisc:
|
||||
return preferredDumpSpeedDVD;
|
||||
return PreferredDumpSpeedDVD;
|
||||
case MediaType.BluRay:
|
||||
return preferredDumpSpeedBD;
|
||||
return PreferredDumpSpeedBD;
|
||||
default:
|
||||
return 8;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ namespace DICUI.Windows
|
||||
|
||||
if (currentSystem != null)
|
||||
{
|
||||
_mediaTypes = Validators.GetValidMediaTypes(currentSystem).ToList();
|
||||
_mediaTypes = Validators.GetValidMediaTypes(currentSystem);
|
||||
MediaTypeComboBox.ItemsSource = _mediaTypes;
|
||||
|
||||
MediaTypeComboBox.IsEnabled = _mediaTypes.Count > 1;
|
||||
@@ -388,7 +388,7 @@ namespace DICUI.Windows
|
||||
RereadAmountC2 = _options.RereadAmountForC2,
|
||||
|
||||
System = SystemTypeComboBox.SelectedItem as KnownSystemComboBoxItem,
|
||||
Type = MediaTypeComboBox.SelectedItem as MediaType?
|
||||
Type = MediaTypeComboBox.SelectedItem as MediaType?,
|
||||
};
|
||||
|
||||
// Fix the output paths
|
||||
@@ -585,19 +585,19 @@ namespace DICUI.Windows
|
||||
{
|
||||
case MediaType.CDROM:
|
||||
case MediaType.GDROM:
|
||||
preferred = _options.preferredDumpSpeedCD;
|
||||
preferred = _options.PreferredDumpSpeedCD;
|
||||
break;
|
||||
case MediaType.DVD:
|
||||
case MediaType.HDDVD:
|
||||
case MediaType.NintendoGameCube:
|
||||
case MediaType.NintendoWiiOpticalDisc:
|
||||
preferred = _options.preferredDumpSpeedDVD;
|
||||
preferred = _options.PreferredDumpSpeedDVD;
|
||||
break;
|
||||
case MediaType.BluRay:
|
||||
preferred = _options.preferredDumpSpeedBD;
|
||||
preferred = _options.PreferredDumpSpeedBD;
|
||||
break;
|
||||
default:
|
||||
preferred = _options.preferredDumpSpeedCD;
|
||||
preferred = _options.PreferredDumpSpeedCD;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -628,7 +628,7 @@ namespace DICUI.Windows
|
||||
{
|
||||
ViewModels.LoggerViewModel.VerboseLog("Trying to detect media type for drive {0}.. ", drive.Letter);
|
||||
_currentMediaType = Validators.GetDiscType(drive.Letter);
|
||||
ViewModels.LoggerViewModel.VerboseLogLn(_currentMediaType != null ? "unable to detect." : ("detected " + _currentMediaType.Name() + "."));
|
||||
ViewModels.LoggerViewModel.VerboseLogLn(_currentMediaType == null ? "unable to detect." : ("detected " + _currentMediaType.Name() + "."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<CheckBox Grid.Column="1" VerticalAlignment="Center" Content="Paranoid Mode"
|
||||
DataContext="{Binding Source={x:Static local:ViewModels.OptionsViewModel}}"
|
||||
IsChecked="{Binding Path=ParanoidMode}"
|
||||
ToolTip="Enable pedandic and super-safe flags"
|
||||
ToolTip="Enable pedantic and super-safe flags"
|
||||
/>
|
||||
<Grid Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -100,9 +100,9 @@ namespace DICUI.Windows
|
||||
{
|
||||
Array.ForEach(PathSettings(), setting => TextBoxForPathSetting(setting).Text = _options.Get(setting));
|
||||
|
||||
DumpSpeedCDSlider.Value = _options.preferredDumpSpeedCD;
|
||||
DumpSpeedDVDSlider.Value = _options.preferredDumpSpeedDVD;
|
||||
DumpSpeedBDSlider.Value = _options.preferredDumpSpeedBD;
|
||||
DumpSpeedCDSlider.Value = _options.PreferredDumpSpeedCD;
|
||||
DumpSpeedDVDSlider.Value = _options.PreferredDumpSpeedDVD;
|
||||
DumpSpeedBDSlider.Value = _options.PreferredDumpSpeedBD;
|
||||
}
|
||||
|
||||
#region Event Handlers
|
||||
@@ -111,9 +111,9 @@ namespace DICUI.Windows
|
||||
{
|
||||
Array.ForEach(PathSettings(), setting => _options.Set(setting, TextBoxForPathSetting(setting).Text));
|
||||
|
||||
_options.preferredDumpSpeedCD = Convert.ToInt32(DumpSpeedCDSlider.Value);
|
||||
_options.preferredDumpSpeedDVD = Convert.ToInt32(DumpSpeedDVDSlider.Value);
|
||||
_options.preferredDumpSpeedBD = Convert.ToInt32(DumpSpeedBDSlider.Value);
|
||||
_options.PreferredDumpSpeedCD = Convert.ToInt32(DumpSpeedCDSlider.Value);
|
||||
_options.PreferredDumpSpeedDVD = Convert.ToInt32(DumpSpeedDVDSlider.Value);
|
||||
_options.PreferredDumpSpeedBD = Convert.ToInt32(DumpSpeedBDSlider.Value);
|
||||
|
||||
_options.Save();
|
||||
Hide();
|
||||
|
||||
@@ -24,18 +24,18 @@ Ensure that your operating system is as up-to-date as possible, since some featu
|
||||
## Releases
|
||||
|
||||
Download the latest release here:
|
||||
[https://github.com/reignstumble/DICUI/releases](https://github.com/reignstumble/DICUI/releases)
|
||||
[https://github.com/SabreTools/DICUI/releases](https://github.com/SabreTools/DICUI/releases)
|
||||
|
||||
## Changelist
|
||||
|
||||
A list of all changes can now be found [here](https://github.com/reignstumble/DICUI/blob/master/CHANGELIST.md).
|
||||
A list of all changes can now be found [here](https://github.com/SabreTools/DICUI/blob/master/CHANGELIST.md).
|
||||
|
||||
## Contributors
|
||||
|
||||
Here are the talented people who have contributed to the project so far:
|
||||
|
||||
- **ReignStumble** - Project Lead / UI Design
|
||||
- **darksabre76** - Project Co-Lead / Backend Design
|
||||
- **darksabre76** - Project Lead / Backend Design
|
||||
- **ReignStumble** - Former Project Lead / UI Design
|
||||
- **Jakz** - Primary Feature Contributor
|
||||
- **NHellFire** - Feature Contributor
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# version format
|
||||
version: 1.10-{build}
|
||||
version: 1.12-{build}
|
||||
|
||||
# pull request template
|
||||
pull_requests:
|
||||
@@ -32,10 +32,10 @@ build:
|
||||
|
||||
# post-build step
|
||||
after_build:
|
||||
- ps: appveyor DownloadFile https://github.com/saramibreak/DiscImageCreator/files/2385718/DiscImageCreator_20180915.zip
|
||||
- ps: appveyor DownloadFile https://github.com/saramibreak/DiscImageCreator/files/2500541/DiscImageCreator_20181022.zip
|
||||
- ps: appveyor DownloadFile http://www.rawdump.net/tools/subdump_fua_0x28.zip
|
||||
- 7z e DiscImageCreator_20180915.zip -oDICUI\bin\Debug\Programs Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20180915.zip -oDICUI.Forms\bin\Debug\Programs Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20181022.zip -oDICUI\bin\Debug\Programs Release_ANSI\*
|
||||
- 7z e DiscImageCreator_20181022.zip -oDICUI.Forms\bin\Debug\Programs Release_ANSI\*
|
||||
- 7z e subdump_fua_0x28.zip -oDICUI\bin\Debug *
|
||||
- 7z e subdump_fua_0x28.zip -oDICUI.Forms\bin\Debug *
|
||||
- mv DICUI\bin\Debug\subdump_fua_0x28.exe DICUI\bin\Debug\subdump.exe
|
||||
|
||||
Reference in New Issue
Block a user