Compare commits

...

84 Commits
1.02 ... 1.04

Author SHA1 Message Date
Matt Nadareski
e763fec01e Update README for 1.04 (#37)
Update README for 1.04
2018-06-13 12:27:42 -07:00
Matt Nadareski
f960aca8a9 Populate drive speed (#35) (#1) (#36)
* Allow child process to be killed (#10)

* Add constants, use them, use child process more

* Try to automatically populate the drive speed
2018-06-13 12:23:35 -07:00
Matt Nadareski
1a44fb5c8a Merge branch 'master' into master 2018-06-13 12:20:14 -07:00
Matt Nadareski
285921cae3 Fix getting speed on changed drive letter 2018-06-13 12:18:06 -07:00
Matt Nadareski
2255dba640 Populate drive speed (#35)
* Allow child process to be killed (#10)

* Add constants, use them, use child process more

* Try to automatically populate the drive speed
2018-06-13 11:57:10 -07:00
Matt Nadareski
99158f31c9 Merge branch 'master' into master 2018-06-13 11:56:30 -07:00
Matt Nadareski
53a2ef227b Try to automatically populate the drive speed 2018-06-13 11:51:21 -07:00
Matt Nadareski
c0efc63741 Allow child process to be killed (#10) (#34)
* Allow child process to be killed (#10)

* Add constants, use them, use child process more
2018-06-13 11:31:19 -07:00
Matt Nadareski
905bd1a7dc Add constants, use them, use child process more 2018-06-13 11:30:33 -07:00
Matt Nadareski
5d49d4833f Allow child process to be killed (#10) 2018-06-13 11:26:40 -07:00
Matt Nadareski
8fd3e2d405 Merge pull request #33 from mnadareski/master
Split constants
2018-06-13 11:11:41 -07:00
Matt Nadareski
1521a918f3 Split constants 2018-06-13 10:39:03 -07:00
Matt Nadareski
5f580ee025 Merge pull request #32 from mnadareski/master
Enable validation of DIC parameters
2018-06-13 00:03:34 -07:00
Matt Nadareski
9c7cee0aa3 Fix validation, hook up to main dumping, fix dumping 2018-06-12 23:41:11 -07:00
Matt Nadareski
d549609a0f Add as many validations as humanly possible 2018-06-12 22:30:14 -07:00
Matt Nadareski
207fdbb49c Start adding validation to DIC command line 2018-06-12 22:06:16 -07:00
Matt Nadareski
63e63a0033 Add DIC command constants 2018-06-12 22:05:50 -07:00
Matt Nadareski
73be55a645 Merge pull request #31 from mnadareski/master
Add verification for overwrite
2018-06-12 20:30:54 -07:00
Matt Nadareski
d913aa247e Re-enable button on error 2018-06-12 20:29:40 -07:00
Matt Nadareski
d9a9f3bfd4 Add verification for overwrite 2018-06-12 20:22:49 -07:00
reignstumble
ea3e040b3f Merge pull request #29 from mnadareski/master
Add Custom Parameter Support
2018-06-12 20:47:54 -04:00
Matt Nadareski
ed67522675 Add custom parameter support 2018-06-12 16:49:33 -07:00
reignstumble
6e3902bbb1 Update README.md 2018-06-12 19:02:59 -04:00
Matt Nadareski
3f802e8548 Consistent UI states 2018-06-12 15:15:41 -07:00
reignstumble
c3c4cf6e5b Merge pull request #28 from mnadareski/master
Minor fixes
2018-06-12 17:43:33 -04:00
Matt Nadareski
39258c4e85 Use subfolder for indivdual dumps, change filename 2018-06-12 14:16:16 -07:00
Matt Nadareski
df81259fba Address feedback 2018-06-12 14:10:10 -07:00
reignstumble
a835c81951 Merge pull request #27 from mnadareski/master
Write Centralized Disc Information
2018-06-12 17:03:43 -04:00
Matt Nadareski
af4f3e8444 Add better default values, fix output 2018-06-12 13:48:30 -07:00
Matt Nadareski
085916e1e6 Fix minor issues with output, ordering 2018-06-12 13:34:25 -07:00
Matt Nadareski
557354c844 Fix build 2018-06-12 12:30:29 -07:00
Matt Nadareski
a23a74ffa4 Attempt to write out all information 2018-06-12 12:23:04 -07:00
Matt Nadareski
958aeeae32 Add constants, create formatted output 2018-06-12 11:39:10 -07:00
reignstumble
c73ff42500 Merge pull request #26 from mnadareski/master
Disc Information Framework
2018-06-12 09:38:11 -04:00
Matt Nadareski
24a93e298b Remove last batchfile 2018-06-12 01:03:10 -07:00
Matt Nadareski
ae81bb0743 Move unused code due to future dependencies 2018-06-12 00:40:41 -07:00
Matt Nadareski
cf7863fbb2 Add some system specific values, notes 2018-06-12 00:34:00 -07:00
Matt Nadareski
5e0e71120d Add layerbreak disc info for relevant discs 2018-06-12 00:06:30 -07:00
Matt Nadareski
5adbdd29e6 Add all CD-ROM info getters 2018-06-12 00:00:27 -07:00
Matt Nadareski
fd855b9024 More clariication of template, fix .dat reading 2018-06-11 23:43:38 -07:00
Matt Nadareski
17c283ff67 Add a couple more info grabbers 2018-06-11 22:07:42 -07:00
Matt Nadareski
a37e6aaf18 Add first two info extraction helpers 2018-06-11 21:51:35 -07:00
Matt Nadareski
1dbf23ca95 Add first iteration of getting output information (incomplete) 2018-06-11 21:23:32 -07:00
Matt Nadareski
2e52d00107 Add TODO 2018-06-11 21:02:39 -07:00
Matt Nadareski
eb69b74b4a Add check to ensure all output files are found 2018-06-11 21:01:50 -07:00
Matt Nadareski
db4a785558 Use path combination 2018-06-11 20:40:20 -07:00
Matt Nadareski
9bdd2d6951 First use of finding the first track 2018-06-11 20:37:44 -07:00
Matt Nadareski
de48c8f0f9 Add method to find the first (only) track of a dump 2018-06-11 20:32:04 -07:00
reignstumble
c59f7c2dae Merge pull request #25 from mnadareski/master
Cleanup/Automation
2018-06-11 23:12:49 -04:00
Matt Nadareski
2740a6a1c1 Don't blindly start processes 2018-06-11 00:14:37 -07:00
Matt Nadareski
56e8470069 Add note regarding issues/12 2018-06-10 23:57:26 -07:00
Matt Nadareski
a5f1a12aee Error checking and don't include speed in bd command 2018-06-10 23:35:25 -07:00
Matt Nadareski
8749b486a8 Separate paths to be configurable in future 2018-06-10 16:43:46 -07:00
Matt Nadareski
3446957f68 Better output names, misc cleanup 2018-06-10 16:37:05 -07:00
Matt Nadareski
cb9813db3d Spaces 2018-06-10 16:17:06 -07:00
Matt Nadareski
6e6b716c18 Remove all debug console writes 2018-06-10 16:16:47 -07:00
Matt Nadareski
400ef38c60 Make sure events don't have anything but calling a helper in them 2018-06-10 16:14:17 -07:00
Matt Nadareski
87d5fc0e66 More reasonable default drive speed 2018-06-10 16:10:09 -07:00
Matt Nadareski
d5d8ae0501 Fix build 2018-06-10 16:08:19 -07:00
Matt Nadareski
fae7a5254d Remove unnecessary event 2018-06-10 16:07:14 -07:00
Matt Nadareski
97be13f020 Make code more well-ordered, add default list of all drive speeds supported, privatize EVERYTHING 2018-06-10 16:06:20 -07:00
Matt Nadareski
dd0dfc5cf5 Move drive scanning to Utilities 2018-06-10 16:05:25 -07:00
Matt Nadareski
a7a295434d Simplification of rows, some renames 2018-06-10 16:04:58 -07:00
Matt Nadareski
319f5563cb More descriptive process names 2018-06-10 15:13:16 -07:00
Matt Nadareski
939174d8c4 Merge branch 'master' of https://github.com/mnadareski/DICUI 2018-06-10 15:11:30 -07:00
Matt Nadareski
1d5d7b265e Remove one unnecessary batch file creation step 2018-06-10 15:11:25 -07:00
Matt Nadareski
a2ac7222f9 Remove extra ECC check from PS1 2018-06-10 15:07:28 -07:00
reignstumble
4f0b5904c3 Merge pull request #24 from mnadareski/master
Add Enumerations; Helper Methods
2018-06-09 14:54:59 -04:00
Matt Nadareski
7ff848347c Merge branch 'master' into master 2018-06-08 16:24:11 -07:00
Matt Nadareski
a1c89d17b8 How did I miss this? 2018-06-08 16:16:50 -07:00
Matt Nadareski
3575c43703 Missed this one 2018-06-08 16:14:19 -07:00
Matt Nadareski
928c9966fa Cleanup, make some things work more intended 2018-06-08 16:12:46 -07:00
Matt Nadareski
a404a270f1 Make combobox entirely auto-generated 2018-06-08 15:54:23 -07:00
Matt Nadareski
dfba97685a Fix minor formatting issues 2018-06-08 15:15:47 -07:00
Matt Nadareski
8de2f1c9bb Add helper function to make list of systems 2018-06-08 14:55:17 -07:00
Matt Nadareski
f57b29615b Add other string conversion, update comments 2018-06-08 14:37:17 -07:00
reignstumble
565a9bb09a Update README.md 2018-06-08 17:20:33 -04:00
Matt Nadareski
d9d61cf665 Fix build 2018-06-08 14:15:05 -07:00
reignstumble
106f16d703 Features Update 2018-06-08 17:11:13 -04:00
Matt Nadareski
8b600a6a35 Add enumerations and unused methods 2018-06-08 14:05:06 -07:00
reignstumble
b251ae7927 Update README.md 2018-05-22 12:29:32 -04:00
ReignStumble
3a749b67e3 Merge branch 'master' of https://github.com/reignstumble/DICUI 2018-05-18 23:13:49 -04:00
ReignStumble
3abc277aab Changed /c2 to /c2 20 2018-05-18 23:13:47 -04:00
reignstumble
894f2c6fde Update README.md 2018-05-18 22:39:05 -04:00
7 changed files with 2572 additions and 429 deletions

101
Constants.cs Normal file
View File

@@ -0,0 +1,101 @@
namespace DICUI
{
public static class UIElements
{
public const string StartDumping = "Start Dumping";
public const string StopDumping = "Stop Dumping";
}
public static class DICCommands
{
// Commands
public const string CompactDiscCommand = "cd";
public const string DataCommand = "data";
public const string AudioCommand = "audio";
public const string GDROMCommand = "gd";
public const string GDROMSwapCommand = "swap";
public const string DVDCommand = "dvd";
public const string BDCommand = "bd";
public const string FloppyCommand = "fd";
public const string StopCommand = "stop";
public const string StartCommand = "start";
public const string EjectCommand = "eject";
public const string CloseCommand = "close";
public const string ResetCommand = "reset";
public const string SubCommand = "sub";
public const string MDSCommand = "mds";
public const string DriveSpeedCommand = "ls"; // Unlisted in help text
// DIC Flags
public const string ForceUnitAccessFlag = "/f";
public const string DisableBeepFlag = "/q";
public const string CDAddOffsetFlag = "/a";
public const string CDBEOpcodeFlag = "/be";
public const string CDD8OpcodeFlag = "/d8";
public const string CDC2OpcodeFlag = "/c2";
public const string CDMCNFlag = "/m";
public const string CDAMSFFlag = "/p";
public const string CDReverseFlag = "/r";
public const string CDMultiSessionFlag = "/ms";
public const string CDScanFileProtectFlag = "/sf";
public const string CDScanSectorProtectFlag = "/ss";
public const string CDScanAnitModFlag = "/am";
public const string CDNoFixSubPFlag = "/np";
public const string CDNoFixSubQFlag = "/nq";
public const string CDNoFixSubRtoWFlag = "/nr";
public const string CDNoFixSubQLibCryptFlag = "/nl";
public const string CDNoFixSubQSecuROMFlag = "/ns";
public const string CDSubchannelReadLevelFlag = "/s";
public const string DVDCMIFlag = "/c";
public const string DVDRawFlag = "/raw";
}
public static class Template
{
// Manual information
public const string TitleField = "Title";
public const string DiscNumberField = "Disc Number / Letter";
public const string DiscTitleField = "Disc Title";
public const string CategoryField = "Category";
public const string RegionField = "Region";
public const string LanguagesField = "Languages";
public const string DiscSerialField = "Disc Serial";
public const string BarcodeField = "Barcode";
public const string ISBNField = "ISBN";
public const string CommentsField = "Comments";
public const string ContentsField = "Contents";
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 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";
// Automatic Information
public const string PVDField = "Primary Volume Descriptor (PVD)";
public const string DATField = "DAT";
public const string ErrorCountField = "Error Count";
public const string CuesheetField = "Cuesheet";
public const string WriteOffsetField = "WriteOffset";
public const string LayerbreakField = "Layerbreak";
public const string PlaystationEXEDateField = "EXE Date"; // TODO: Not automatic yet
public const string PlayStationEDCField = "EDC"; // TODO: Not automatic yet
public const string PlayStationAntiModchipField = "Anti-modchip"; // TODO: Not automatic yet
public const string PlayStationLibCryptField = "LibCrypt"; // TODO: Not automatic yet
public const string SaturnHeaderField = "Header"; // TODO: Not automatic yet
public const string SaturnBuildDateField = "Build Date"; // TODO: Not automatic yet
// Default values
public const string RequiredValue = "(REQUIRED)";
public const string RequiredIfExistsValue = "(REQUIRED, IF EXISTS)";
public const string OptionalValue = "(OPTIONAL)";
public const string YesNoValue = "Yes/No";
}
}

View File

@@ -87,6 +87,8 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Constants.cs" />
<Compile Include="Utilities.cs" />
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -95,6 +97,7 @@
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Enumerations.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>

107
Enumerations.cs Normal file
View File

@@ -0,0 +1,107 @@
namespace DICUI
{
/// <summary>
/// Known disc types
/// </summary>
public enum DiscType
{
NONE = 0,
CD,
DVD5,
DVD9,
GDROM,
HDDVD,
BD25,
BD50,
// Special Formats
GameCubeGameDisc,
UMD,
// Keeping this separate since it's currently unsupported in the UI
Floppy = 99,
}
/// <summary>
/// Known systems
/// </summary>
/// <remarks>Ensure that Utilities methods are updated as well</remarks>
public enum KnownSystem
{
NONE = 0,
#region Consoles
BandaiPlaydiaQuickInteractiveSystem,
BandaiApplePippin,
CommodoreAmigaCD32,
CommodoreAmigaCDTV,
MattelHyperscan,
MicrosoftXBOX,
MicrosoftXBOX360,
MicrosoftXBOXOne,
NECPCEngineTurboGrafxCD,
NECPCFX,
NintendoGameCube,
NintendoWii,
NintendoWiiU,
Panasonic3DOInteractiveMultiplayer,
PhilipsCDi,
SegaCDMegaCD,
SegaDreamcast,
SegaSaturn,
SNKNeoGeoCD,
SonyPlayStation,
SonyPlayStation2,
SonyPlayStation3,
SonyPlayStation4,
SonyPlayStationPortable,
VMLabsNuon,
VTechVFlashVSmilePro,
ZAPiTGamesGameWaveFamilyEntertainmentSystem,
#endregion
#region Computers
AcornArchimedes,
AppleMacintosh,
CommodoreAmigaCD,
FujitsuFMTowns,
IBMPCCompatible,
NECPC88,
NECPC98,
SharpX68000,
#endregion
#region Arcade
NamcoSegaNintendoTriforce,
NamcoSystem246,
SegaChihiro,
SegaLindbergh,
SegaNaomi,
SegaNaomi2,
TABAustriaQuizard,
TandyMemorexVisualInformationSystem,
#endregion
#region Other
AudioCD,
BDVideo,
DVDVideo,
EnhancedCD,
PalmOS,
PhilipsCDiDigitalVideo,
PhotoCD,
PlayStationGameSharkUpdates,
TaoiKTV,
TomyKissSite,
VideoCD,
#endregion
}
}

View File

@@ -37,70 +37,23 @@
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" VerticalAlignment="Center">Disc Type</Label>
<Label Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">DiscImageCreator Path</Label>
<Label Grid.Row="2" Grid.Column="0" VerticalAlignment="Center">Output Filename</Label>
<Label Grid.Row="3" Grid.Column="0" VerticalAlignment="Center">Output Directory</Label>
<Label Grid.Row="4" Grid.Column="0" VerticalAlignment="Center">Drive Letter</Label>
<Label Grid.Row="5" Grid.Column="0" VerticalAlignment="Center">Drive Speed</Label>
<ComboBox x:Name="cmb_DiscType" Grid.Row="0" Grid.Column="1" Height="22" SelectionChanged="cmb_DiscType_SelectionChanged" />
<ComboBox x:Name="cmb_DiscType" Grid.Row="0" Grid.Column="1" Height="22" Text="Bandai Playdia Quick Interactive System" DropDownClosed="cmb_DiscType_DropDownClosed" SelectionChanged="cmb_DiscType_SelectionChanged">
<ComboBoxItem Content="Unknown"/>
<ComboBoxItem Content="---------- Consoles ----------" IsEnabled="False"/>
<ComboBoxItem Content="Bandai Playdia Quick Interactive System"/>
<ComboBoxItem Content="Bandai / Apple Pippin"/>
<ComboBoxItem Content="Commodore Amiga CD / CD32 / CDTV"/>
<ComboBoxItem Content="Mattel HyperScan"/>
<ComboBoxItem Content="Microsoft XBOX One"/>
<ComboBoxItem Content="NEC PC-Engine / TurboGrafx CD"/>
<ComboBoxItem Content="NEC PC-FX / PC-FXGA"/>
<ComboBoxItem Content="Panasonic 3DO"/>
<ComboBoxItem Content="Philips CD-i"/>
<ComboBoxItem Content="Sega CD / Mega CD"/>
<ComboBoxItem Content="Sega Saturn"/>
<ComboBoxItem Content="SNK Neo Geo CD"/>
<ComboBoxItem Content="Sony PlayStation"/>
<ComboBoxItem Content="Sony PlayStation 2 (CD-Rom)"/>
<ComboBoxItem Content="Sony PlayStation 2 (DVD-Rom)"/>
<ComboBoxItem Content="Sony PlayStation 4"/>
<ComboBoxItem Content="VTech V.Flash - V.Smile Pro"/>
<ComboBoxItem Content="---------- Computers ----------" IsEnabled="False"/>
<ComboBoxItem Content="Apple Macintosh (CD-Rom)"/>
<ComboBoxItem Content="Apple Macintosh (DVD-Rom)"/>
<ComboBoxItem Content="Fujitsu FM Towns series"/>
<ComboBoxItem Content="IBM PC Compatible (CD-Rom)"/>
<ComboBoxItem Content="IBM PC Compatible (DVD-Rom)"/>
<ComboBoxItem Content="NEC PC-88"/>
<ComboBoxItem Content="NEC PC-98"/>
<ComboBoxItem Content="---------- Arcade ----------" IsEnabled="False"/>
<ComboBoxItem Content="Sega Lindbergh"/>
<ComboBoxItem Content="---------- Others ----------" IsEnabled="False"/>
<ComboBoxItem Content="Audio CD"/>
<ComboBoxItem Content="BD-Video"/>
<ComboBoxItem Content="DVD-Video"/>
<ComboBoxItem Content="PalmOS"/>
<ComboBoxItem Content="Photo CD"/>
<ComboBoxItem Content="PlayStation GameShark Updates"/>
<ComboBoxItem Content="Tomy Kiss-Site"/>
<ComboBoxItem Content="Video CD"/>
</ComboBox>
<Label Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">Output Filename</Label>
<TextBox x:Name="txt_OutputFilename" Grid.Row="1" Grid.Column="1" Height="22"></TextBox>
<TextBox x:Name="TXT_DiscImageCreatorPath" Grid.Row="1" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="left" IsEnabled="False" ></TextBox>
<Button x:Name="BTN_DiscImageCreatorBrowse" Grid.Row="1" Grid.Column="1" Height="22" Width="50" HorizontalAlignment="Right" Content="Browse" IsEnabled="False"></Button>
<Label Grid.Row="2" Grid.Column="0" VerticalAlignment="Center">Output Directory</Label>
<TextBox x:Name="txt_OutputDirectory" Grid.Row="2" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="left" Text="ISO" />
<Button x:Name="btn_OutputDirectoryBrowse" Grid.Row="2" Grid.Column="1" Height="22" Width="50" HorizontalAlignment="Right" Content="Browse" Click="btn_OutputDirectoryBrowse_Click"/>
<TextBox x:Name="txt_OutputFilename" Grid.Row="2" Grid.Column="1" Height="22"></TextBox>
<Label Grid.Row="3" Grid.Column="0" VerticalAlignment="Center">Drive Letter</Label>
<ComboBox x:Name="cmb_DriveLetter" Grid.Row="3" Grid.Column="1" Height="22" Width="397" HorizontalAlignment="left" SelectionChanged="cmb_DriveLetter_SelectionChanged"/>
<TextBox x:Name="txt_OutputDirectory" Grid.Row="3" Grid.Column="1" Height="22" Width="345" HorizontalAlignment="left" Text="ISO" ></TextBox>
<Button x:Name="BTN_OutputDirectoryBrowse" Grid.Row="3" Grid.Column="1" Height="22" Width="50" HorizontalAlignment="Right" Content="Browse" Click="BTN_OutputDirectoryBrowse_Click" ></Button>
<Label Grid.Row="4" Grid.Column="0" VerticalAlignment="Center">Drive Speed</Label>
<ComboBox x:Name="cmb_DriveSpeed" Grid.Row="4" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="left" SelectionChanged="cmb_DriveSpeed_SelectionChanged"/>
<ComboBox x:Name="cmb_DriveLetter" Grid.Row="4" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="left"></ComboBox>
<ComboBox x:Name="cmb_DriveSpeed" Grid.Row="5" Grid.Column="1" Height="22" Width="60" HorizontalAlignment="left" SelectionChanged="cmb_DriveSpeed_SelectionChanged">
<ComboBoxItem Content="4"/>
<ComboBoxItem Content="8"/>
<ComboBoxItem Content="16"/>
<ComboBoxItem Content="48"/>
<ComboBoxItem Content="Custom"/>
</ComboBox>
<Label Grid.Row="5" Grid.Column="0" VerticalAlignment="Center">Custom Parameters</Label>
<TextBox x:Name="txt_CustomParameters" Grid.Row="5" Grid.Column="1" Height="22" Width="397" HorizontalAlignment="left" IsEnabled="False" />
</Grid>
<Grid Grid.Row="1" Grid.Column="0" Margin="15,19.6,15.2,9.8" Grid.ColumnSpan="2">
@@ -112,7 +65,7 @@
<RowDefinition/>
</Grid.RowDefinitions>
<Button x:Name="btn_Start" Grid.Row="0" Grid.Column="0" Height="22" Width="150" VerticalAlignment="Center" HorizontalAlignment="Center" Content="Start Dumping" Click="btn_Start_Click" IsEnabled="False" />
<Button x:Name="btn_StartStop" Grid.Row="0" Grid.Column="0" Height="22" Width="150" VerticalAlignment="Center" HorizontalAlignment="Center" Content="Start Dumping" Click="btn_StartStop_Click" IsEnabled="False" />
<Button x:Name="btn_Search" Grid.Row="0" Grid.Column="1" Height="22" Width="150" VerticalAlignment="Center" HorizontalAlignment="Center" Content="Scan for disks" Click="btn_Search_Click" />
</Grid>
@@ -125,9 +78,6 @@
</Grid.RowDefinitions>
<Label x:Name="lbl_Status" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Content="Waiting for CD or DVD..." />
</Grid>
</Grid>
</Window>

View File

@@ -1,411 +1,454 @@
using System;
using System.Linq;
using System.Windows;
using System.IO;
using WinForms = System.Windows.Forms;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using WinForms = System.Windows.Forms;
namespace DICUI
{
public partial class MainWindow : Window
{
public String discType;
public String processArguments;
public String dicPath = "Programs\\DiscImageCreator.exe";
public String driveLetter;
public String outputDirectory;
public String outputFileName;
public String driveSpeed;
public Boolean isPSX = false;
public Boolean isXboneOrPS4 = false;
// TODO: Make configurable in UI or in Settings
private const string defaultOutputPath = "ISO";
private const string dicPath = "Programs\\DiscImageCreator.exe";
private const string psxtPath = "psxt001z.exe";
private const string sgRawPath = "sg_raw.exe";
public void ScanForDisk()
private List<Tuple<char, string>> _drives { get; set; }
private List<int> _driveSpeeds { get { return new List<int> { 1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 32, 40, 44, 48, 52, 56, 72 }; } }
private List<Tuple<string, KnownSystem?, DiscType?>> _systems { get; set; }
private Process childProcess { get; set; }
public MainWindow()
{
btn_Search.IsEnabled = false;
cmb_DriveLetter.Items.Clear();
foreach (var d in DriveInfo.GetDrives().Where(d => d.DriveType == DriveType.CDRom))
InitializeComponent();
// Populate the list of systems
PopulateSystems();
// Populate the list of drives
PopulateDrives();
// Populate the list of drive speeds
PopulateDriveSpeeds();
SetSupportedDriveSpeed();
}
#region Events
private void btn_StartStop_Click(object sender, RoutedEventArgs e)
{
if ((string)btn_StartStop.Content == UIElements.StartDumping)
{
if (d.IsReady == true)
{
txt_OutputFilename.Text = d.VolumeLabel;
if (txt_OutputFilename.Text == "")
{
txt_OutputFilename.Text = "unknown";
}
cmb_DriveLetter.Items.Add(d.Name.Replace(":\\", ""));
cmb_DriveLetter.SelectedIndex = 0;
txt_OutputDirectory.Text = "ISO" + "\\" + txt_OutputFilename.Text + "\\";
lbl_Status.Content = "CD or DVD found ! Choose your Disc Type";
btn_Start.IsEnabled = true;
cmb_DriveSpeed.Text = "8";
}
else
{
lbl_Status.Content = "No CD or DVD found !";
}
btn_Search.IsEnabled = true;
StartDumping();
}
else if ((string)btn_StartStop.Content == UIElements.StopDumping)
{
CancelDumping();
}
}
public void BrowseFolder()
private void btn_OutputDirectoryBrowse_Click(object sender, RoutedEventArgs e)
{
BrowseFolder();
EnsureDiscInformation();
}
private void btn_Search_Click(object sender, RoutedEventArgs e)
{
PopulateDrives();
SetSupportedDriveSpeed();
EnsureDiscInformation();
}
private void cmb_DiscType_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
EnsureDiscInformation();
GetOutputNames();
}
private void cmb_DriveLetter_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
SetSupportedDriveSpeed();
GetOutputNames();
EnsureDiscInformation();
}
private void cmb_DriveSpeed_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
EnsureDiscInformation();
}
#endregion
#region Helpers
/// <summary>
/// Get a complete list of supported systems and fill the combo box
/// </summary>
private void PopulateSystems()
{
_systems = Utilities.CreateListOfSystems();
cmb_DiscType.ItemsSource = _systems;
cmb_DiscType.DisplayMemberPath = "Item1";
cmb_DiscType.SelectedIndex = 0;
cmb_DiscType_SelectionChanged(null, null);
btn_StartStop.IsEnabled = false;
}
/// <summary>
/// Get a complete list of active disc drives and fill the combo box
/// </summary>
/// <remarks>TODO: Find a way for this to periodically run, or have it hook to a "drive change" event</remarks>
private void PopulateDrives()
{
// Populate the list of drives and add it to the combo box
_drives = Utilities.CreateListOfDrives();
cmb_DriveLetter.ItemsSource = _drives;
cmb_DriveLetter.DisplayMemberPath = "Item1";
cmb_DriveLetter.SelectedIndex = 0;
cmb_DriveLetter_SelectionChanged(null, null);
if (cmb_DriveLetter.Items.Count > 0)
{
lbl_Status.Content = "Valid optical disc found! Choose your Disc Type";
btn_StartStop.IsEnabled = true;
}
else
{
lbl_Status.Content = "No valid optical disc found!";
btn_StartStop.IsEnabled = false;
}
}
/// <summary>
/// Get a complete list of (possible) disc drive speeds, and fill the combo box
/// </summary>
private void PopulateDriveSpeeds()
{
cmb_DriveSpeed.ItemsSource = _driveSpeeds;
cmb_DriveSpeed.SelectedItem = 8;
}
/// <summary>
/// Browse for an output folder
/// </summary>
private void BrowseFolder()
{
WinForms.FolderBrowserDialog folderDialog = new WinForms.FolderBrowserDialog { ShowNewFolderButton = false, SelectedPath = System.AppDomain.CurrentDomain.BaseDirectory };
WinForms.DialogResult result = folderDialog.ShowDialog();
if (result == WinForms.DialogResult.OK)
{
String sPath = folderDialog.SelectedPath;
txt_OutputDirectory.Text = sPath;
txt_OutputDirectory.Text = folderDialog.SelectedPath;
}
}
public async void StartDumping()
/// <summary>
/// Begin the dumping process using the given inputs
/// </summary>
private async void StartDumping()
{
// Local variables
string driveLetter = cmb_DriveLetter.Text;
string outputDirectory = txt_OutputDirectory.Text;
string outputFilename = txt_OutputFilename.Text;
btn_StartStop.Content = UIElements.StopDumping;
driveLetter = cmb_DriveLetter.Text;
outputDirectory = txt_OutputDirectory.Text;
outputFileName = txt_OutputFilename.Text;
driveSpeed = cmb_DriveSpeed.Text;
btn_Start.IsEnabled = false;
// Get the currently selected item
var selected = cmb_DiscType.SelectedValue as Tuple<string, KnownSystem?, DiscType?>;
switch (Convert.ToString(cmb_DiscType.Text))
// Validate that everything is good
if (string.IsNullOrWhiteSpace(txt_CustomParameters.Text)
|| !Utilities.ValidateParameters(txt_CustomParameters.Text))
{
#region Consoles
case "Bandai Playdia Quick Interactive System":
discType = "cd";
processArguments = "/c2";
break;
case "Bandai / Apple Pippin":
discType = "cd";
processArguments = "/c2";
break;
case "Commodore Amiga CD / CD32 / CDTV":
discType = "cd";
processArguments = "/c2";
break;
case "Mattel HyperScan":
discType = "cd";
processArguments = "/c2";
break;
case "Microsoft XBOX":
// Placeholder for later use
break;
case "Microsoft XBOX 360":
// Placeholder for later use
break;
case "Microsoft XBOX One":
discType = "bd";
processArguments = "";
isXboneOrPS4 = true;
break;
case "NEC PC-Engine / TurboGrafx CD":
discType = "cd";
processArguments = "/c2";
break;
case "NEC PC-FX / PC-FXGA":
discType = "cd";
processArguments = "/c2";
break;
case "Nintendo GameCube":
// Placeholder for later use
break;
case "Nintendo Wii":
// Placeholder for later use
break;
case "Nintendo Wii U":
// Placeholder for later use
break;
case "Panasonic 3DO":
discType = "cd";
processArguments = "/c2";
break;
case "Philips CD-i":
discType = "cd";
processArguments = "/c2";
break;
case "Sega CD / Mega CD":
discType = "cd";
processArguments = "/c2";
break;
case "Sega Dreamcast":
// Placeholder for later use
break;
case "Sega Saturn":
discType = "cd";
processArguments = "/c2";
break;
case "SNK Neo Geo CD":
discType = "cd";
processArguments = "/c2";
break;
case "Sony PlayStation":
discType = "cd";
processArguments = "/c2";
isPSX = true;
break;
case "Sony PlayStation 2 (CD-Rom)":
discType = "cd";
processArguments = "/c2";
break;
case "Sony PlayStation 2 (DVD-Rom)":
discType = "dvd";
processArguments = "";
break;
case "Sony PlayStation 3":
// Placeholder for later use
break;
case "Sony PlayStation 4":
discType = "bd";
processArguments = "";
isXboneOrPS4 = true;
break;
case "Sony PlayStation Portable":
// No-op - PSP can't be dumped with DIC
break;
case "VM Labs NUON":
// Placeholder for later use
break;
case "VTech V.Flash - V.Smile Pro":
discType = "cd";
processArguments = "/c2";
break;
case "ZAPiT Games Game Wave Family Entertainment System":
// Placeholder for later use
break;
#endregion
#region Computers
case "Acorn Archimedes":
// Placeholder for later use
break;
case "Apple Macintosh (CD-Rom)":
discType = "cd";
processArguments = "/c2";
break;
case "Apple Macintosh (DVD-Rom)":
discType = "dvd";
processArguments = "";
break;
case "Fujitsu FM Towns series":
discType = "cd";
processArguments = "/c2";
break;
case "IBM PC Compatible (CD-Rom)":
discType = "cd";
processArguments = "/c2 /ns /sf /ss";
break;
case "IBM PC Compatible (DVD-Rom)":
discType = "dvd";
processArguments = "";
break;
case "NEC PC-88":
discType = "cd";
processArguments = "/c2";
break;
case "NEC PC-98":
discType = "cd";
processArguments = "/c2";
break;
case "Sharp X68000":
// Placeholder for later use
break;
#endregion
#region Arcade
case "Namco / Sega / Nintendo Triforce":
// Placeholder for later use
break;
case "Sega Chihiro":
// Placeholder for later use
break;
case "Sega Lindbergh":
discType = "cd";
processArguments = "/c2";
break;
case "Sega Naomi":
// Placeholder for later use
break;
case "Sega Naomi 2":
// Placeholder for later use
break;
case "TAB-Austria Quizard":
// Placeholder for later use
break;
case "Tandy / Memorex Visual Information System":
// Placeholder for later use
break;
#endregion
#region Others
case "Audio CD":
discType = "cd";
processArguments = "/c2";
break;
case "BD-Video":
discType = "bd";
processArguments = "";
break;
case "DVD-Video":
discType = "dvd";
break;
case "PalmOS":
discType = "cd";
processArguments = "/c2";
break;
case "Philips CD-i Digital Video":
// Placeholder for later use
break;
case "Photo CD":
discType = "cd";
processArguments = "/c2";
break;
case "PlayStation GameShark Updates":
discType = "cd";
processArguments = "/c2";
break;
case "Tao iKTV":
// Placeholder for later use
break;
case "Tomy Kiss-Site":
discType = "cd";
processArguments = "/c2";
break;
case "Video CD":
discType = "cd";
processArguments = "/c2";
break;
#endregion
case "Unknown":
default:
discType = "";
processArguments = "";
break;
lbl_Status.Content = "Error! Current configuration is not supported!";
btn_StartStop.Content = UIElements.StartDumping;
return;
}
// Validate that the required program exits
if (!File.Exists(dicPath))
{
lbl_Status.Content = "Error! Could not find DiscImageCreator!";
btn_StartStop.Content = UIElements.StartDumping;
return;
}
// If a complete dump already exists
if (Utilities.FoundAllFiles(outputDirectory, outputFilename, selected.Item3))
{
MessageBoxResult result = MessageBox.Show("A complete dump already exists! Are you sure you want to overwrite?", "Overwrite?", MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
if (result == MessageBoxResult.No || result == MessageBoxResult.Cancel || result == MessageBoxResult.None)
{
lbl_Status.Content = "Dumping aborted!";
btn_StartStop.Content = UIElements.StartDumping;
return;
}
}
lbl_Status.Content = "Beginning dumping process";
string parameters = txt_CustomParameters.Text;
await Task.Run(
() =>
{
Process process = new Process();
process.StartInfo.FileName = dicPath; // TODO: Make this configurable in UI
process.StartInfo.Arguments = discType + " " + driveLetter + " \"" + outputDirectory + "\\" + outputFileName + "\" " + driveSpeed + " " + processArguments;
Console.WriteLine(process.StartInfo.Arguments);
process.Start();
process.WaitForExit();
childProcess = new Process()
{
StartInfo = new ProcessStartInfo()
{
FileName = dicPath,
Arguments = parameters,
},
};
childProcess.Start();
childProcess.WaitForExit();
});
if (isXboneOrPS4 == true)
// Special cases
switch (selected.Item2)
{
// TODO: Add random string / GUID to end of batch file name so that multiple instances can run at once
using (StreamWriter writetext = new StreamWriter("XboneOrPS4.bat"))
{
writetext.WriteLine("sg_raw.exe -v -r 4100 -R " + driveLetter + ": " + "ad 01 00 00 00 00 00 00 10 04 00 00 -o \"PIC.bin\"");
}
Process processXboneOrPS4 = new Process();
processXboneOrPS4.StartInfo.FileName = "XboneOrPS4.bat";
processXboneOrPS4.Start();
processXboneOrPS4.WaitForExit();
}
if (isPSX == true)
{
// TODO: Add random string / GUID to end of batch file name so that multiple instances can run at once
using (StreamWriter writetext = new StreamWriter("PSX.bat"))
{
writetext.WriteLine("edccchk" + " " + "\"" + outputDirectory + "\\" + outputFileName + ".bin" + "\" > " + "\"" + outputDirectory + "\\" + "edccchk1.txt");
writetext.WriteLine("edccchk" + " " + "\"" + outputDirectory + "\\" + outputFileName + " (Track 1).bin" + "\" > " + "\"" + outputDirectory + "\\" + "edccchk1.txt");
writetext.WriteLine("edccchk" + " " + "\"" + outputDirectory + "\\" + outputFileName + " (Track 01).bin" + "\" > " + "\"" + outputDirectory + "\\" + "edccchk1.txt");
writetext.WriteLine("psxt001z" + " " + "\"" + outputDirectory + "\\" + outputFileName + ".bin" + "\" > " + "\"" + outputDirectory + "\\" + "psxt001z1.txt");
writetext.WriteLine("psxt001z" + " " + "\"" + outputDirectory + "\\" + outputFileName + " (Track 1).bin" + "\" > " + "\"" + outputDirectory + "\\" + "psxt001z2.txt");
writetext.WriteLine("psxt001z" + " " + "\"" + outputDirectory + "\\" + outputFileName + " (Track 01).bin" + "\" > " + "\"" + outputDirectory + "\\" + "psxt001z3.txt");
writetext.WriteLine("psxt001z" + " " + "--libcrypt " + "\"" + outputDirectory + "\\" + outputFileName + ".sub\" > " + "\"" + outputDirectory + "\\" + "libcrypt.txt");
writetext.WriteLine("psxt001z" + " " + "--libcryptdrvfast " + driveLetter + " > " + "\"" + outputDirectory + "\\" + "libcryptdrv.log");
}
Process processpsx = new Process();
processpsx.StartInfo.FileName = "PSX.bat";
processpsx.Start();
processpsx.WaitForExit();
}
btn_Start.IsEnabled = true;
}
case KnownSystem.MicrosoftXBOXOne:
case KnownSystem.SonyPlayStation4:
if (!File.Exists(sgRawPath))
{
lbl_Status.Content = "Error! Could not find sg-raw!";
break;
}
public MainWindow()
{
InitializeComponent();
ScanForDisk();
}
private void btn_Start_Click(object sender, RoutedEventArgs e)
{
StartDumping();
}
private void BTN_OutputDirectoryBrowse_Click(object sender, RoutedEventArgs e)
{
BrowseFolder();
}
private void btn_Search_Click(object sender, RoutedEventArgs e)
{
ScanForDisk();
}
private void cmb_DiscType_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
lbl_Status.Content = "Ready to dump";
}
private void cmb_DriveSpeed_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
// TODO: Figure out how to keep the list of items while also allowing the custom input
if (cmb_DriveSpeed.SelectedIndex == 4)
{
cmb_DriveSpeed.Items.Clear();
cmb_DriveSpeed.IsEditable = true;
}
}
private void cmb_DiscType_DropDownClosed(object sender, EventArgs e)
{
switch (Convert.ToString(cmb_DiscType.Text))
{
case "Sony PlayStation 4":
cmb_DriveSpeed.Items.Clear();
cmb_DriveSpeed.IsEnabled = false;
childProcess = new Process()
{
StartInfo = new ProcessStartInfo()
{
FileName = sgRawPath,
Arguments = "-v -r 4100 -R " + driveLetter + ": " + "ad 01 00 00 00 00 00 00 10 04 00 00 -o \"PIC.bin\""
},
};
childProcess.Start();
childProcess.WaitForExit();
break;
case "Microsoft XBOX One":
cmb_DriveSpeed.Items.Clear();
case KnownSystem.SonyPlayStation:
if (!File.Exists(psxtPath))
{
lbl_Status.Content = "Error! Could not find psxt001z!";
break;
}
// Invoke the program with all 3 configurations
// TODO: Use these outputs for PSX information
childProcess = new Process()
{
StartInfo = new ProcessStartInfo()
{
FileName = psxtPath,
Arguments = "\"" + Utilities.GetFirstTrack(outputDirectory, outputFilename) + "\" > " + "\"" + Path.Combine(outputDirectory, "psxt001z.txt"),
},
};
childProcess.Start();
childProcess.WaitForExit();
childProcess = new Process()
{
StartInfo = new ProcessStartInfo()
{
FileName = psxtPath,
Arguments = "--libcrypt " + "\"" + Path.Combine(outputDirectory, outputFilename + ".sub") + "\" > " + "\"" + Path.Combine(outputDirectory, "libcrypt.txt"),
},
};
childProcess.Start();
childProcess.WaitForExit();
childProcess = new Process()
{
StartInfo = new ProcessStartInfo()
{
FileName = psxtPath,
Arguments = "--libcryptdrvfast " + driveLetter + " > " + "\"" + Path.Combine(outputDirectory, "libcryptdrv.log"),
},
};
childProcess.Start();
childProcess.WaitForExit();
break;
}
// Check to make sure that the output had all the correct files
if (!Utilities.FoundAllFiles(outputDirectory, outputFilename, selected.Item3))
{
lbl_Status.Content = "Error! Please check output directory as dump may be incomplete!";
btn_StartStop.Content = UIElements.StartDumping;
return;
}
lbl_Status.Content = "Dumping complete!";
Dictionary<string, string> templateValues = Utilities.ExtractOutputInformation(outputDirectory, outputFilename, selected.Item2, selected.Item3);
List<string> formattedValues = Utilities.FormatOutputData(templateValues, selected.Item2, selected.Item3);
bool success = Utilities.WriteOutputData(outputDirectory, outputFilename, formattedValues);
btn_StartStop.Content = UIElements.StartDumping;
}
/// <summary>
/// Cancel an in-progress dumping process
/// </summary>
private void CancelDumping()
{
try
{
childProcess.Kill();
}
catch
{ }
}
/// <summary>
/// Ensure information is consistent with the currently selected disc type
/// </summary>
private void EnsureDiscInformation()
{
// If we're on a separator, go to the next item
var tuple = cmb_DiscType.SelectedItem as Tuple<string, KnownSystem?, DiscType?>;
if (tuple.Item2 == null && tuple.Item3 == null)
{
cmb_DiscType.SelectedIndex++;
tuple = cmb_DiscType.SelectedItem as Tuple<string, KnownSystem?, DiscType?>;
}
// If we're on an unsupported type, update the status accordingly
switch (tuple.Item3)
{
case DiscType.NONE:
lbl_Status.Content = "Please select a valid disc type";
btn_StartStop.IsEnabled = false;
break;
case DiscType.GameCubeGameDisc:
case DiscType.GDROM:
lbl_Status.Content = string.Format("{0} discs are partially supported by DIC", Utilities.DiscTypeToString(tuple.Item3));
btn_StartStop.IsEnabled = true;
break;
case DiscType.HDDVD:
case DiscType.UMD:
lbl_Status.Content = string.Format("{0} discs are not currently supported by DIC", Utilities.DiscTypeToString(tuple.Item3));
btn_StartStop.IsEnabled = true;
break;
default:
lbl_Status.Content = string.Format("{0} ready to dump", Utilities.DiscTypeToString(tuple.Item3));
btn_StartStop.IsEnabled = true;
break;
}
// If we're in a type that doesn't support drive speeds
switch (tuple.Item3)
{
case DiscType.BD25:
case DiscType.BD50:
cmb_DriveSpeed.IsEnabled = false;
break;
default:
cmb_DriveSpeed.IsEnabled = true;
cmb_DriveSpeed.Items.Clear();
cmb_DriveSpeed.Items.Add("4");
cmb_DriveSpeed.Items.Add("8");
cmb_DriveSpeed.Items.Add("16");
cmb_DriveSpeed.Items.Add("48");
cmb_DriveSpeed.Items.Add("Custom");
cmb_DriveSpeed.SelectedIndex = 1;
break;
}
// Special case for Custom input
if (tuple.Item1 == "Custom Input" && tuple.Item2 == KnownSystem.NONE && tuple.Item3 == DiscType.NONE)
{
txt_CustomParameters.IsEnabled = true;
txt_OutputFilename.IsEnabled = false;
txt_OutputDirectory.IsEnabled = false;
btn_OutputDirectoryBrowse.IsEnabled = false;
cmb_DriveLetter.IsEnabled = false;
cmb_DriveSpeed.IsEnabled = false;
lbl_Status.Content = "User input mode";
}
else
{
txt_CustomParameters.IsEnabled = false;
txt_OutputFilename.IsEnabled = true;
txt_OutputDirectory.IsEnabled = true;
btn_OutputDirectoryBrowse.IsEnabled = true;
cmb_DriveLetter.IsEnabled = true;
cmb_DriveSpeed.IsEnabled = true;
// Populate with the correct params for inputs (if we're not on the default option)
if (cmb_DiscType.SelectedIndex > 0)
{
var selected = cmb_DiscType.SelectedValue as Tuple<string, KnownSystem?, DiscType?>;
string discType = Utilities.GetBaseCommand(selected.Item3);
List<string> defaultParams = Utilities.GetDefaultParameters(selected.Item2, selected.Item3);
txt_CustomParameters.Text = discType
+ " " + cmb_DriveLetter.Text
+ " \"" + Path.Combine(txt_OutputDirectory.Text, txt_OutputFilename.Text + Utilities.GetDefaultExtension(selected.Item3)) + "\" "
+ (selected.Item3 != DiscType.BD25 && selected.Item3 != DiscType.BD50 ? (int)cmb_DriveSpeed.SelectedItem + " " : "")
+ string.Join(" ", defaultParams);
}
}
}
/// <summary>
/// Get the default output directory name from the currently selected drive
/// </summary>
private void GetOutputNames()
{
var driveTuple = cmb_DriveLetter.SelectedItem as Tuple<char, string>;
var discTuple = cmb_DiscType.SelectedItem as Tuple<string, KnownSystem?, DiscType?>;
if (driveTuple != null && discTuple != null)
{
txt_OutputDirectory.Text = Path.Combine(defaultOutputPath, driveTuple.Item2);
txt_OutputFilename.Text = driveTuple.Item2 + Utilities.GetDefaultExtension(discTuple.Item3);
}
else
{
txt_OutputDirectory.Text = defaultOutputPath;
txt_OutputFilename.Text = "disc.bin";
}
}
/// <summary>
/// Get the highest supported drive speed as reported by DiscImageCreator
/// </summary>
private void SetSupportedDriveSpeed()
{
// Get the drive letter from the selected item
var selected = cmb_DriveLetter.SelectedItem as Tuple<char, string>;
char driveLetter = selected.Item1;
// Validate that the required program exits
if (!File.Exists(dicPath))
{
return;
}
childProcess = new Process()
{
StartInfo = new ProcessStartInfo()
{
FileName = dicPath,
Arguments = DICCommands.DriveSpeedCommand + " " + driveLetter,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true,
},
};
childProcess.Start();
childProcess.WaitForExit();
string output = childProcess.StandardOutput.ReadToEnd();
int index = output.IndexOf("ReadSpeedMaximum:");
string readspeed = Regex.Match(output.Substring(index), @"ReadSpeedMaximum: [0-9]+KB/sec \(([0-9]*)x\)").Groups[1].Value;
if (!Int32.TryParse(readspeed, out int speed))
{
return;
}
cmb_DriveSpeed.SelectedValue = speed;
}
#endregion
}
}

View File

@@ -1,6 +1,11 @@
# DICUI
This is my current progress on my C# Disc Image Creator UI.
I am using Disc Image Creator, created by Sarami, and would like to thanks him for this great software.
You can get the latest code and released on his github right here:
https://github.com/saramibreak/DiscImageCreator
I'm a hobbyist programmer, so this code might not be optimal, feel free to make your recommendation / Pull request.
I would like this project to be a community project, so if you have some time and knowledge to give, I'll be glad to add you to the contributor of this project :)
@@ -8,18 +13,55 @@ I would like this project to be a community project, so if you have some time an
--------------------------------------------------------------------------
Currently working on the project:
ReignStumble - Lead Developer
ReignStumble - Co-Lead Programmer
darksabre76 - Contributer
darksabre76 - Co-Lead Programmer
NHellFire - Contributer
Dizzzy - Concept/Ideas/Beta tester
--------------------------------------------------------------------------
2018-06-13
--------------------------------------------------------------------------
Version 1.04 released:
- Behind-the-scenes fixes and formatting
- Better checks for external programs
- Automatically changing disc information
- Custom parameters (and parameter validation)
- Automatic drive speed selection
- Automatic submission information creation
- Add ability to stop a dump from the UI
--------------------------------------------------------------------------
2018-06-08
--------------------------------------------------------------------------
Version 1.03 released:
- edccchk now run on all CD-Roms
- Discs unsupported by Windows are now regonized
- Extra \ when accepting default save has been removed.
--------------------------------------------------------------------------
2018-05-18
--------------------------------------------------------------------------
Version 1.02b released:
- Fixed XBOX One and PS4 Drive Speed issue. (1.02)
- Started implementing DiscImageCreator Path selection. (1.02)
- Conforming my naming for objects and variable. (1.02)
- Added missing DLL (1.02b)
--------------------------------------------------------------------------
2018-05-14
--------------------------------------------------------------------------
Version 1.01d released:
Download the latest release here:
https://github.com/reignstumble/DICUI/releases

1897
Utilities.cs Normal file

File diff suppressed because it is too large Load Diff