First commit as developer in the team. :P

Committed the first revision of the new GSDX Dump Viewer. At the moment it contains the PThreads dll inside the build process and output to the bin directory of the tools directory till I know for sure I can output the exe directly into pcsx2 bin directory. :P
Report here or on the issue tracker any bug you find. (in this application) :P

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2652 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
feal87 2010-03-01 16:47:58 +00:00
parent b86a9477e4
commit afde55c1c8
16 changed files with 3555 additions and 0 deletions

View File

@ -0,0 +1,72 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Specialized = System.Collections.Specialized;
using Reflection = System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
using System.Diagnostics;
namespace GSDumpGUI
{
static class Program
{
static public GSDumpGUI frmMain;
[STAThread]
static void Main(String[] args)
{
if (args.Length == 3)
{
Thread thd = new Thread(new ThreadStart(delegate
{
while (true)
{
Int32 tmp = NativeMethods.GetAsyncKeyState(0x1b) & 0xf;
if (tmp != 0)
Process.GetCurrentProcess().Kill();
Thread.Sleep(16);
}
}));
thd.IsBackground = true;
thd.Start();
// Retrieve parameters
String DLLPath = args[0];
String DumpPath = args[1];
String Operation = args[2];
// Try to load the DLL in memory
IntPtr hmod = NativeMethods.LoadLibrary(DLLPath);
if (hmod.ToInt64() > 0)
{
// Search if the DLL has the requested operation
IntPtr funcaddr = NativeMethods.GetProcAddress(hmod, Operation);
if (funcaddr.ToInt64() > 0)
{
// Execute the appropriate function pointer by casting it to a delegate.
if (Operation == "GSReplay")
{
GSDXImport.GSReplay dg = (GSDXImport.GSReplay)Marshal.GetDelegateForFunctionPointer(funcaddr, typeof(GSDXImport.GSReplay));
dg.Invoke(new IntPtr(0), new IntPtr(0), DumpPath, false);
}
else
{
GSDXImport.GSConfigure dg = (GSDXImport.GSConfigure)Marshal.GetDelegateForFunctionPointer(funcaddr, typeof(GSDXImport.GSConfigure));
dg.Invoke();
}
}
// Unload the library.
NativeMethods.FreeLibrary(hmod);
}
}
else
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
frmMain = new GSDumpGUI();
Application.Run(frmMain);
}
}
}
}

276
tools/GSDumpGUI/Forms/frmMain.Designer.cs generated Normal file
View File

@ -0,0 +1,276 @@
namespace GSDumpGUI
{
partial class GSDumpGUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GSDumpGUI));
this.txtGSDXDirectory = new System.Windows.Forms.TextBox();
this.lblDirectory = new System.Windows.Forms.Label();
this.cmdBrowseGSDX = new System.Windows.Forms.Button();
this.cmdBrowseDumps = new System.Windows.Forms.Button();
this.lblDumpDirectory = new System.Windows.Forms.Label();
this.txtDumpsDirectory = new System.Windows.Forms.TextBox();
this.cmdSaveAndReload = new System.Windows.Forms.Button();
this.lstGSDX = new System.Windows.Forms.ListBox();
this.lstDumps = new System.Windows.Forms.ListBox();
this.lblDumps = new System.Windows.Forms.Label();
this.GsdxList = new System.Windows.Forms.Label();
this.cmdStart = new System.Windows.Forms.Button();
this.cmdConfigGSDX = new System.Windows.Forms.Button();
this.txtLog = new System.Windows.Forms.TextBox();
this.lblLog = new System.Windows.Forms.Label();
this.cmdOpenIni = new System.Windows.Forms.Button();
this.pctBox = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pctBox)).BeginInit();
this.SuspendLayout();
//
// txtGSDXDirectory
//
this.txtGSDXDirectory.Location = new System.Drawing.Point(705, 25);
this.txtGSDXDirectory.Name = "txtGSDXDirectory";
this.txtGSDXDirectory.Size = new System.Drawing.Size(165, 20);
this.txtGSDXDirectory.TabIndex = 0;
this.txtGSDXDirectory.TabStop = false;
//
// lblDirectory
//
this.lblDirectory.AutoSize = true;
this.lblDirectory.Location = new System.Drawing.Point(702, 9);
this.lblDirectory.Name = "lblDirectory";
this.lblDirectory.Size = new System.Drawing.Size(82, 13);
this.lblDirectory.TabIndex = 1;
this.lblDirectory.Text = "GSDX Directory";
//
// cmdBrowseGSDX
//
this.cmdBrowseGSDX.Location = new System.Drawing.Point(876, 22);
this.cmdBrowseGSDX.Name = "cmdBrowseGSDX";
this.cmdBrowseGSDX.Size = new System.Drawing.Size(35, 23);
this.cmdBrowseGSDX.TabIndex = 2;
this.cmdBrowseGSDX.TabStop = false;
this.cmdBrowseGSDX.Text = "...";
this.cmdBrowseGSDX.UseVisualStyleBackColor = true;
this.cmdBrowseGSDX.Click += new System.EventHandler(this.cmdBrowseGSDX_Click);
//
// cmdBrowseDumps
//
this.cmdBrowseDumps.Location = new System.Drawing.Point(876, 67);
this.cmdBrowseDumps.Name = "cmdBrowseDumps";
this.cmdBrowseDumps.Size = new System.Drawing.Size(35, 23);
this.cmdBrowseDumps.TabIndex = 5;
this.cmdBrowseDumps.TabStop = false;
this.cmdBrowseDumps.Text = "...";
this.cmdBrowseDumps.UseVisualStyleBackColor = true;
this.cmdBrowseDumps.Click += new System.EventHandler(this.cmdBrowseDumps_Click);
//
// lblDumpDirectory
//
this.lblDumpDirectory.AutoSize = true;
this.lblDumpDirectory.Location = new System.Drawing.Point(702, 54);
this.lblDumpDirectory.Name = "lblDumpDirectory";
this.lblDumpDirectory.Size = new System.Drawing.Size(85, 13);
this.lblDumpDirectory.TabIndex = 4;
this.lblDumpDirectory.Text = "Dumps Directory";
//
// txtDumpsDirectory
//
this.txtDumpsDirectory.Location = new System.Drawing.Point(705, 70);
this.txtDumpsDirectory.Name = "txtDumpsDirectory";
this.txtDumpsDirectory.Size = new System.Drawing.Size(165, 20);
this.txtDumpsDirectory.TabIndex = 3;
this.txtDumpsDirectory.TabStop = false;
//
// cmdSaveAndReload
//
this.cmdSaveAndReload.Location = new System.Drawing.Point(705, 96);
this.cmdSaveAndReload.Name = "cmdSaveAndReload";
this.cmdSaveAndReload.Size = new System.Drawing.Size(206, 23);
this.cmdSaveAndReload.TabIndex = 6;
this.cmdSaveAndReload.TabStop = false;
this.cmdSaveAndReload.Text = "Save And Reload";
this.cmdSaveAndReload.UseVisualStyleBackColor = true;
this.cmdSaveAndReload.Click += new System.EventHandler(this.cmdSave_Click);
//
// lstGSDX
//
this.lstGSDX.FormattingEnabled = true;
this.lstGSDX.Location = new System.Drawing.Point(393, 25);
this.lstGSDX.Name = "lstGSDX";
this.lstGSDX.Size = new System.Drawing.Size(299, 225);
this.lstGSDX.TabIndex = 1;
this.lstGSDX.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lstGSDX_KeyDown);
//
// lstDumps
//
this.lstDumps.FormattingEnabled = true;
this.lstDumps.Location = new System.Drawing.Point(12, 25);
this.lstDumps.Name = "lstDumps";
this.lstDumps.Size = new System.Drawing.Size(155, 225);
this.lstDumps.TabIndex = 0;
this.lstDumps.SelectedIndexChanged += new System.EventHandler(this.lstDumps_SelectedIndexChanged);
this.lstDumps.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lstDumps_KeyDown);
//
// lblDumps
//
this.lblDumps.AutoSize = true;
this.lblDumps.Location = new System.Drawing.Point(9, 8);
this.lblDumps.Name = "lblDumps";
this.lblDumps.Size = new System.Drawing.Size(59, 13);
this.lblDumps.TabIndex = 9;
this.lblDumps.Text = "Dumps List";
//
// GsdxList
//
this.GsdxList.AutoSize = true;
this.GsdxList.Location = new System.Drawing.Point(390, 9);
this.GsdxList.Name = "GsdxList";
this.GsdxList.Size = new System.Drawing.Size(56, 13);
this.GsdxList.TabIndex = 10;
this.GsdxList.Text = "GSDX List";
//
// cmdStart
//
this.cmdStart.Location = new System.Drawing.Point(705, 187);
this.cmdStart.Name = "cmdStart";
this.cmdStart.Size = new System.Drawing.Size(206, 58);
this.cmdStart.TabIndex = 11;
this.cmdStart.TabStop = false;
this.cmdStart.Text = "Start";
this.cmdStart.UseVisualStyleBackColor = true;
this.cmdStart.Click += new System.EventHandler(this.cmdStart_Click);
//
// cmdConfigGSDX
//
this.cmdConfigGSDX.Location = new System.Drawing.Point(705, 125);
this.cmdConfigGSDX.Name = "cmdConfigGSDX";
this.cmdConfigGSDX.Size = new System.Drawing.Size(100, 56);
this.cmdConfigGSDX.TabIndex = 12;
this.cmdConfigGSDX.TabStop = false;
this.cmdConfigGSDX.Text = "Configure Current GSDX";
this.cmdConfigGSDX.UseVisualStyleBackColor = true;
this.cmdConfigGSDX.Click += new System.EventHandler(this.cmdConfigGSDX_Click);
//
// txtLog
//
this.txtLog.Location = new System.Drawing.Point(12, 275);
this.txtLog.Multiline = true;
this.txtLog.Name = "txtLog";
this.txtLog.ReadOnly = true;
this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.txtLog.Size = new System.Drawing.Size(899, 133);
this.txtLog.TabIndex = 13;
this.txtLog.TabStop = false;
//
// lblLog
//
this.lblLog.AutoSize = true;
this.lblLog.Location = new System.Drawing.Point(12, 259);
this.lblLog.Name = "lblLog";
this.lblLog.Size = new System.Drawing.Size(25, 13);
this.lblLog.TabIndex = 14;
this.lblLog.Text = "Log";
//
// cmdOpenIni
//
this.cmdOpenIni.Location = new System.Drawing.Point(811, 125);
this.cmdOpenIni.Name = "cmdOpenIni";
this.cmdOpenIni.Size = new System.Drawing.Size(102, 56);
this.cmdOpenIni.TabIndex = 15;
this.cmdOpenIni.TabStop = false;
this.cmdOpenIni.Text = "Open GSDX.ini";
this.cmdOpenIni.UseVisualStyleBackColor = true;
this.cmdOpenIni.Click += new System.EventHandler(this.cmdOpenIni_Click);
//
// pctBox
//
this.pctBox.Location = new System.Drawing.Point(173, 28);
this.pctBox.Name = "pctBox";
this.pctBox.Size = new System.Drawing.Size(208, 221);
this.pctBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pctBox.TabIndex = 17;
this.pctBox.TabStop = false;
this.pctBox.Click += new System.EventHandler(this.pctBox_Click);
//
// GSDumpGUI
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(920, 420);
this.Controls.Add(this.pctBox);
this.Controls.Add(this.cmdOpenIni);
this.Controls.Add(this.lblLog);
this.Controls.Add(this.txtLog);
this.Controls.Add(this.cmdConfigGSDX);
this.Controls.Add(this.cmdStart);
this.Controls.Add(this.GsdxList);
this.Controls.Add(this.lblDumps);
this.Controls.Add(this.lstDumps);
this.Controls.Add(this.lstGSDX);
this.Controls.Add(this.cmdSaveAndReload);
this.Controls.Add(this.cmdBrowseDumps);
this.Controls.Add(this.lblDumpDirectory);
this.Controls.Add(this.txtDumpsDirectory);
this.Controls.Add(this.cmdBrowseGSDX);
this.Controls.Add(this.lblDirectory);
this.Controls.Add(this.txtGSDXDirectory);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.MaximizeBox = false;
this.Name = "GSDumpGUI";
this.Text = "GSDumpGUI";
this.Load += new System.EventHandler(this.GSDumpGUI_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GSDumpGUI_KeyDown);
((System.ComponentModel.ISupportInitialize)(this.pctBox)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox txtGSDXDirectory;
private System.Windows.Forms.Label lblDirectory;
private System.Windows.Forms.Button cmdBrowseGSDX;
private System.Windows.Forms.Button cmdBrowseDumps;
private System.Windows.Forms.Label lblDumpDirectory;
private System.Windows.Forms.TextBox txtDumpsDirectory;
private System.Windows.Forms.Button cmdSaveAndReload;
private System.Windows.Forms.ListBox lstGSDX;
private System.Windows.Forms.ListBox lstDumps;
private System.Windows.Forms.Label lblDumps;
private System.Windows.Forms.Label GsdxList;
private System.Windows.Forms.Button cmdStart;
private System.Windows.Forms.Button cmdConfigGSDX;
private System.Windows.Forms.TextBox txtLog;
private System.Windows.Forms.Label lblLog;
private System.Windows.Forms.Button cmdOpenIni;
private System.Windows.Forms.PictureBox pctBox;
}
}

View File

@ -0,0 +1,280 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Diagnostics;
using System.Security;
namespace GSDumpGUI
{
public partial class GSDumpGUI : Form
{
public List<Process> Processes;
public GSDumpGUI()
{
InitializeComponent();
Processes = new List<Process>();
}
public void ReloadGSDXs()
{
txtGSDXDirectory.Text = Properties.Settings.Default.GSDXDir;
txtDumpsDirectory.Text = Properties.Settings.Default.DumpDir;
lstGSDX.Items.Clear();
lstDumps.Items.Clear();
if (Directory.Exists(txtGSDXDirectory.Text))
{
String[] File = Directory.GetFiles(txtGSDXDirectory.Text, "*.dll", SearchOption.TopDirectoryOnly);
NativeMethods.SetErrorMode(0x8007);
foreach (var itm in File)
{
IntPtr hmod = NativeMethods.LoadLibrary(itm);
if (hmod.ToInt64() > 0)
{
IntPtr funcaddr = NativeMethods.GetProcAddress(hmod, "GSReplay");
if (funcaddr.ToInt64() > 0)
{
IntPtr funcaddrN = NativeMethods.GetProcAddress(hmod, "PSEgetLibName");
if (funcaddrN.ToInt64() > 0)
{
GSDXImport.PSEgetLibName ps = (GSDXImport.PSEgetLibName)Marshal.GetDelegateForFunctionPointer(funcaddrN, typeof(GSDXImport.PSEgetLibName));
lstGSDX.Items.Add(Path.GetFileName(itm) + " | " + Marshal.PtrToStringAnsi(ps.Invoke()));
}
}
else
{
Int32 id = NativeMethods.GetLastError();
System.IO.File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + "test.txt", itm + " failed to load. Error " + id + Environment.NewLine);
}
NativeMethods.FreeLibrary(hmod);
}
else
{
Int32 id = NativeMethods.GetLastError();
System.IO.File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + "test.txt", itm + " failed to load. Error " + id);
}
}
NativeMethods.SetErrorMode(0x0000);
String[] Dumps = Directory.GetFiles(txtDumpsDirectory.Text, "*.gs", SearchOption.TopDirectoryOnly);
foreach (var itm in Dumps)
lstDumps.Items.Add(Path.GetFileName(itm));
}
}
private void GSDumpGUI_Load(object sender, EventArgs e)
{
ReloadGSDXs();
lstDumps.Focus();
if (lstDumps.Items.Count > 0)
lstDumps.SelectedIndex = 0;
}
private void cmdBrowseGSDX_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "Select the GSDX DLL Directory";
fbd.SelectedPath = AppDomain.CurrentDomain.BaseDirectory;
if (fbd.ShowDialog() == DialogResult.OK)
txtGSDXDirectory.Text = fbd.SelectedPath;
}
private void cmdBrowseDumps_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "Select the GSDX Dumps Directory";
fbd.SelectedPath = AppDomain.CurrentDomain.BaseDirectory;
if (fbd.ShowDialog() == DialogResult.OK)
txtDumpsDirectory.Text = fbd.SelectedPath;
}
private void cmdSave_Click(object sender, EventArgs e)
{
if (System.IO.Directory.Exists(txtDumpsDirectory.Text))
Properties.Settings.Default.DumpDir = txtDumpsDirectory.Text;
else
MessageBox.Show("Select a correct directory for dumps", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
if (System.IO.Directory.Exists(txtGSDXDirectory.Text))
Properties.Settings.Default.GSDXDir = txtGSDXDirectory.Text;
else
MessageBox.Show("Select a correct directory for GSDX", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
Properties.Settings.Default.Save();
ReloadGSDXs();
}
private void cmdStart_Click(object sender, EventArgs e)
{
// Execute the GSReplay function
if (lstDumps.SelectedIndex != -1)
{
if (lstGSDX.SelectedIndex != -1)
ExecuteFunction("GSReplay");
else
MessageBox.Show("Select your GSDX first", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
MessageBox.Show("Select your Dump first", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void ExecuteFunction(String Function)
{
String GSDXName = lstGSDX.SelectedItem.ToString().Split(new char[] { '|' })[0];
CreateDirs(GSDXName);
// Set the Arguments to pass to the child
String DLLPath = Properties.Settings.Default.GSDXDir + "\\" + GSDXName;
String DumpPath = "";
if (lstDumps.SelectedItem != null)
DumpPath = Properties.Settings.Default.DumpDir + "\\" + lstDumps.SelectedItem.ToString();
// Start the child and link the events.
ProcessStartInfo psi = new ProcessStartInfo();
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
psi.RedirectStandardError = false;
psi.CreateNoWindow = true;
psi.FileName = AppDomain.CurrentDomain.BaseDirectory + "GsDumpGUI.exe";
psi.Arguments = "\"" + DLLPath + "\"" + " \"" + DumpPath + "\"" + " \"" + Function + "\"";
Process p = Process.Start(psi);
p.OutputDataReceived += new DataReceivedEventHandler(p_OutputDataReceived);
p.BeginOutputReadLine();
p.Exited += new EventHandler(p_Exited);
Processes.Add(p);
}
private static void CreateDirs(String GSDXName)
{
// Create and set the config directory.
String Dir = AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\";
if (!Directory.Exists(Dir))
{
Directory.CreateDirectory(Dir);
}
Dir += GSDXName;
if (!Directory.Exists(Dir))
{
Directory.CreateDirectory(Dir);
}
Dir += "\\Inis\\";
if (!Directory.Exists(Dir))
{
Directory.CreateDirectory(Dir);
File.Create(Dir + "\\gsdx.ini").Close();
}
Dir = AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\" + GSDXName;
Directory.SetCurrentDirectory(Dir);
}
void p_Exited(object sender, EventArgs e)
{
// Remove the child if is closed
Processes.Remove((Process)sender);
}
void p_OutputDataReceived(object sender, DataReceivedEventArgs e)
{
// Write the log.
txtLog.Invoke(new Action<object>(delegate(object o) { txtLog.Text += e.Data + Environment.NewLine; }), new object[] { null });
}
private void cmdConfigGSDX_Click(object sender, EventArgs e)
{
// Execute the GSconfigure function
if (lstGSDX.SelectedIndex != -1)
ExecuteFunction("GSconfigure");
else
MessageBox.Show("Select your GSDX first", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void cmdOpenIni_Click(object sender, EventArgs e)
{
// Execute the GSconfigure function
if (lstGSDX.SelectedIndex != -1)
{
String GSDXName = lstGSDX.SelectedItem.ToString().Split(new char[] { '|' })[0];
CreateDirs(GSDXName);
Process.Start(AppDomain.CurrentDomain.BaseDirectory + "GSDumpGSDXConfigs\\" + GSDXName + "\\inis\\gsdx.ini");
}
else
MessageBox.Show("Select your GSDX first", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void lstDumps_SelectedIndexChanged(object sender, EventArgs e)
{
if (lstDumps.SelectedIndex != -1)
{
String Filename = Path.GetDirectoryName(Properties.Settings.Default.DumpDir + "\\") + "\\" + Path.GetFileNameWithoutExtension(lstDumps.SelectedItem.ToString()) + ".bmp";
if (File.Exists(Filename))
{
pctBox.Image = Image.FromFile(Filename);
pctBox.Cursor = Cursors.Hand;
}
else
{
Bitmap bt = new Bitmap(320, 240, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(bt);
g.FillRectangle(new SolidBrush(Color.Black), new Rectangle(0, 0, 320, 240));
g.DrawString("No Image", new Font(FontFamily.GenericSansSerif, 48, FontStyle.Regular), new SolidBrush(Color.White), new PointF(0,70));
g.Dispose();
pctBox.Image = bt;
pctBox.Cursor = Cursors.Default;
}
}
}
private void pctBox_Click(object sender, EventArgs e)
{
if (pctBox.Cursor == Cursors.Hand)
{
String Filename = Path.GetDirectoryName(Properties.Settings.Default.DumpDir + "\\") + "\\" + Path.GetFileNameWithoutExtension(lstDumps.SelectedItem.ToString()) + ".bmp";
Process.Start(Filename);
}
}
private void lstDumps_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
cmdStart_Click(sender, e);
if (e.KeyCode == Keys.F1)
cmdConfigGSDX_Click(sender, e);
}
private void lstGSDX_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
cmdStart_Click(sender, e);
if (e.KeyCode == Keys.F1)
cmdConfigGSDX_Click(sender, e);
}
private void GSDumpGUI_KeyDown(object sender, KeyEventArgs e)
{
if ((e.KeyCode == Keys.Down))
{
e.Handled = true;
if (lstDumps.Items.Count > lstDumps.SelectedIndex + 1)
lstDumps.SelectedIndex++;
}
if ((e.KeyCode == Keys.Up))
{
e.Handled = true;
if (lstDumps.SelectedIndex > 0)
lstDumps.SelectedIndex--;
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{825E4311-652D-4A1E-8AA1-F6D81B186E33}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GSDumpGUI</RootNamespace>
<AssemblyName>GSDumpGUI</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>Resources\AppIcon.ico</ApplicationIcon>
<TargetFrameworkSubset>
</TargetFrameworkSubset>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Forms\frmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
</Compile>
<Compile Include="Library\GSDXImport.cs" />
<Compile Include="Library\NativeMethods.cs" />
<Compile Include="Core\Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Forms\frmMain.resx">
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Resources\AppIcon.ico" />
</ItemGroup>
<ItemGroup>
<Content Include="w32pthreads.v3.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>copy "$(TargetPath)" "$(SolutionDir)\bin\$(TargetFileName)"
copy "$(TargetDir)w32pthreads.v3.dll" "$(SolutionDir)\bin\w32pthreads.v3.dll"</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace GSDumpGUI
{
static public class GSDXImport
{
public delegate void GSReplay(IntPtr HWND, IntPtr HInstance, String File, Boolean Show);
public delegate void GSConfigure();
public delegate IntPtr PSEgetLibName();
}
}

View File

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Security;
using System.Runtime.InteropServices;
namespace GSDumpGUI
{
static public class NativeMethods
{
[SuppressUnmanagedCodeSecurityAttribute]
[DllImport("kernel32")]
public extern static IntPtr LoadLibrary(string lpLibFileName);
[SuppressUnmanagedCodeSecurityAttribute]
[DllImport("kernel32")]
public extern static bool FreeLibrary(IntPtr hLibModule);
[SuppressUnmanagedCodeSecurityAttribute]
[DllImport("kernel32", CharSet = CharSet.Ansi)]
public extern static IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
[SuppressUnmanagedCodeSecurityAttribute]
[DllImport("kernel32", CharSet = CharSet.Ansi)]
public extern static int SetErrorMode(int Value);
[SuppressUnmanagedCodeSecurityAttribute]
[DllImport("kernel32", CharSet = CharSet.Ansi)]
public extern static int GetLastError();
[SuppressUnmanagedCodeSecurityAttribute]
[DllImport("user32", CharSet = CharSet.Ansi)]
public extern static short GetAsyncKeyState(int key);
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("GSDumpGUI")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("PCSX2 Team")]
[assembly: AssemblyProduct("GSDumpGUI")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ff0f400c-a2cc-4d81-be4a-43c53eed5025")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,70 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4200
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GSDumpGUI.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GSDumpGUI.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static System.Drawing.Icon AppIcon {
get {
object obj = ResourceManager.GetObject("AppIcon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}

View File

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

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4200
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GSDumpGUI.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string GSDXDir {
get {
return ((string)(this["GSDXDir"]));
}
set {
this["GSDXDir"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string DumpDir {
get {
return ((string)(this["DumpDir"]));
}
set {
this["DumpDir"] = value;
}
}
}
}

View File

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="GSDumpGUI.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="GSDXDir" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="DumpDir" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="GSDumpGUI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<userSettings>
<GSDumpGUI.Properties.Settings>
<setting name="GSDXDir" serializeAs="String">
<value/>
</setting>
<setting name="DumpDir" serializeAs="String">
<value/>
</setting>
</GSDumpGUI.Properties.Settings>
</userSettings>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>

Binary file not shown.

View File

@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bin2cpp", "bin2cpp\bin2c.vcproj", "{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GSDumpGUI", "GSDumpGUI\GSDumpGUI.csproj", "{825E4311-652D-4A1E-8AA1-F6D81B186E33}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -13,6 +15,10 @@ Global
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Debug|Win32.Build.0 = Debug|Win32
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Release|Win32.ActiveCfg = Release|Win32
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Release|Win32.Build.0 = Release|Win32
{825E4311-652D-4A1E-8AA1-F6D81B186E33}.Debug|Win32.ActiveCfg = Debug|Any CPU
{825E4311-652D-4A1E-8AA1-F6D81B186E33}.Debug|Win32.Build.0 = Debug|Any CPU
{825E4311-652D-4A1E-8AA1-F6D81B186E33}.Release|Win32.ActiveCfg = Release|Any CPU
{825E4311-652D-4A1E-8AA1-F6D81B186E33}.Release|Win32.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE