diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
index d52da1b6bf..a311ba5aa9 100644
--- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
+++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
@@ -735,6 +735,12 @@
RegisterBoxControl.cs
+
+ Form
+
+
+ GameShark.cs
+
Form
@@ -1380,6 +1386,9 @@
RegisterBoxControl.cs
+
+ GameShark.cs
+
GBAGPUView.cs
diff --git a/BizHawk.Client.EmuHawk/MainForm.Designer.cs b/BizHawk.Client.EmuHawk/MainForm.Designer.cs
index 65555fc020..2f7e620551 100644
--- a/BizHawk.Client.EmuHawk/MainForm.Designer.cs
+++ b/BizHawk.Client.EmuHawk/MainForm.Designer.cs
@@ -407,6 +407,7 @@
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.timerMouseIdle = new System.Windows.Forms.Timer(this.components);
+ this.gameSharkConverterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainformMenu.SuspendLayout();
this.MainStatusBar.SuspendLayout();
this.MainFormContextMenu.SuspendLayout();
@@ -1846,6 +1847,7 @@
this.LuaConsoleMenuItem,
this.toolStripSeparator29,
this.MultiDiskBundlerFileMenuItem,
+ this.gameSharkConverterToolStripMenuItem,
this.batchRunnerToolStripMenuItem});
this.ToolsSubMenu.Name = "ToolsSubMenu";
this.ToolsSubMenu.Size = new System.Drawing.Size(47, 19);
@@ -1856,20 +1858,20 @@
//
this.ToolBoxMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.ToolBox;
this.ToolBoxMenuItem.Name = "ToolBoxMenuItem";
- this.ToolBoxMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.ToolBoxMenuItem.Size = new System.Drawing.Size(189, 22);
this.ToolBoxMenuItem.Text = "&Tool Box";
this.ToolBoxMenuItem.Click += new System.EventHandler(this.ToolBoxMenuItem_Click);
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
- this.toolStripSeparator12.Size = new System.Drawing.Size(169, 6);
+ this.toolStripSeparator12.Size = new System.Drawing.Size(186, 6);
//
// RamWatchMenuItem
//
this.RamWatchMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.watch;
this.RamWatchMenuItem.Name = "RamWatchMenuItem";
- this.RamWatchMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.RamWatchMenuItem.Size = new System.Drawing.Size(189, 22);
this.RamWatchMenuItem.Text = "RAM &Watch";
this.RamWatchMenuItem.Click += new System.EventHandler(this.RamWatchMenuItem_Click);
//
@@ -1877,7 +1879,7 @@
//
this.RamSearchMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.search;
this.RamSearchMenuItem.Name = "RamSearchMenuItem";
- this.RamSearchMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.RamSearchMenuItem.Size = new System.Drawing.Size(189, 22);
this.RamSearchMenuItem.Text = "RAM &Search";
this.RamSearchMenuItem.Click += new System.EventHandler(this.RamSearchMenuItem_Click);
//
@@ -1885,7 +1887,7 @@
//
this.HexEditorMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.poke;
this.HexEditorMenuItem.Name = "HexEditorMenuItem";
- this.HexEditorMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.HexEditorMenuItem.Size = new System.Drawing.Size(189, 22);
this.HexEditorMenuItem.Text = "&Hex Editor";
this.HexEditorMenuItem.Click += new System.EventHandler(this.HexEditorMenuItem_Click);
//
@@ -1893,7 +1895,7 @@
//
this.TraceLoggerMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.pencil;
this.TraceLoggerMenuItem.Name = "TraceLoggerMenuItem";
- this.TraceLoggerMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.TraceLoggerMenuItem.Size = new System.Drawing.Size(189, 22);
this.TraceLoggerMenuItem.Text = "Trace &Logger";
this.TraceLoggerMenuItem.Click += new System.EventHandler(this.TraceLoggerMenuItem_Click);
//
@@ -1901,7 +1903,7 @@
//
this.CodeDataLoggerMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.cdlogger;
this.CodeDataLoggerMenuItem.Name = "CodeDataLoggerMenuItem";
- this.CodeDataLoggerMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.CodeDataLoggerMenuItem.Size = new System.Drawing.Size(189, 22);
this.CodeDataLoggerMenuItem.Text = "Code-Data Logger";
this.CodeDataLoggerMenuItem.Click += new System.EventHandler(this.CodeDataLoggerMenuItem_Click);
//
@@ -1909,7 +1911,7 @@
//
this.DebuggerMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Bug;
this.DebuggerMenuItem.Name = "DebuggerMenuItem";
- this.DebuggerMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.DebuggerMenuItem.Size = new System.Drawing.Size(189, 22);
this.DebuggerMenuItem.Text = "&Debugger";
this.DebuggerMenuItem.Click += new System.EventHandler(this.DebuggerMenuItem_Click);
//
@@ -1917,14 +1919,14 @@
//
this.TAStudioMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.TAStudio;
this.TAStudioMenuItem.Name = "TAStudioMenuItem";
- this.TAStudioMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.TAStudioMenuItem.Size = new System.Drawing.Size(189, 22);
this.TAStudioMenuItem.Text = "&TAStudio";
this.TAStudioMenuItem.Click += new System.EventHandler(this.TAStudioMenuItem_Click);
//
// MacroToolMenuItem
//
this.MacroToolMenuItem.Name = "MacroToolMenuItem";
- this.MacroToolMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.MacroToolMenuItem.Size = new System.Drawing.Size(189, 22);
this.MacroToolMenuItem.Text = "&Macro Tool";
this.MacroToolMenuItem.Click += new System.EventHandler(this.MacroToolMenuItem_Click);
//
@@ -1932,34 +1934,34 @@
//
this.VirtualPadMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.GameController;
this.VirtualPadMenuItem.Name = "VirtualPadMenuItem";
- this.VirtualPadMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.VirtualPadMenuItem.Size = new System.Drawing.Size(189, 22);
this.VirtualPadMenuItem.Text = "Virtual Pad";
this.VirtualPadMenuItem.Click += new System.EventHandler(this.VirtualPadMenuItem_Click);
//
// AutoHawkMenuItem
//
this.AutoHawkMenuItem.Name = "AutoHawkMenuItem";
- this.AutoHawkMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.AutoHawkMenuItem.Size = new System.Drawing.Size(189, 22);
this.AutoHawkMenuItem.Text = "AutoHawk";
this.AutoHawkMenuItem.Click += new System.EventHandler(this.AutoHawkMenuItem_Click);
//
// BasicBotMenuItem
//
this.BasicBotMenuItem.Name = "BasicBotMenuItem";
- this.BasicBotMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.BasicBotMenuItem.Size = new System.Drawing.Size(189, 22);
this.BasicBotMenuItem.Text = "Basic Bot";
this.BasicBotMenuItem.Click += new System.EventHandler(this.BasicBotMenuItem_Click);
//
// toolStripSeparator11
//
this.toolStripSeparator11.Name = "toolStripSeparator11";
- this.toolStripSeparator11.Size = new System.Drawing.Size(169, 6);
+ this.toolStripSeparator11.Size = new System.Drawing.Size(186, 6);
//
// CheatsMenuItem
//
this.CheatsMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Freeze;
this.CheatsMenuItem.Name = "CheatsMenuItem";
- this.CheatsMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.CheatsMenuItem.Size = new System.Drawing.Size(189, 22);
this.CheatsMenuItem.Text = "Cheats";
this.CheatsMenuItem.Click += new System.EventHandler(this.CheatsMenuItem_Click);
//
@@ -1967,27 +1969,27 @@
//
this.LuaConsoleMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.Lua;
this.LuaConsoleMenuItem.Name = "LuaConsoleMenuItem";
- this.LuaConsoleMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.LuaConsoleMenuItem.Size = new System.Drawing.Size(189, 22);
this.LuaConsoleMenuItem.Text = "Lua Console";
this.LuaConsoleMenuItem.Click += new System.EventHandler(this.LuaConsoleMenuItem_Click);
//
// toolStripSeparator29
//
this.toolStripSeparator29.Name = "toolStripSeparator29";
- this.toolStripSeparator29.Size = new System.Drawing.Size(169, 6);
+ this.toolStripSeparator29.Size = new System.Drawing.Size(186, 6);
//
// MultiDiskBundlerFileMenuItem
//
this.MultiDiskBundlerFileMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.SaveConfig;
this.MultiDiskBundlerFileMenuItem.Name = "MultiDiskBundlerFileMenuItem";
- this.MultiDiskBundlerFileMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.MultiDiskBundlerFileMenuItem.Size = new System.Drawing.Size(189, 22);
this.MultiDiskBundlerFileMenuItem.Text = "Multi-disk Bundler";
this.MultiDiskBundlerFileMenuItem.Click += new System.EventHandler(this.CreateMultigameFileMenuItem_Click);
//
// batchRunnerToolStripMenuItem
//
this.batchRunnerToolStripMenuItem.Name = "batchRunnerToolStripMenuItem";
- this.batchRunnerToolStripMenuItem.Size = new System.Drawing.Size(172, 22);
+ this.batchRunnerToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
this.batchRunnerToolStripMenuItem.Text = "Batch Runner";
this.batchRunnerToolStripMenuItem.Visible = false;
this.batchRunnerToolStripMenuItem.Click += new System.EventHandler(this.batchRunnerToolStripMenuItem_Click);
@@ -3499,19 +3501,19 @@
// SavestateTypeDefaultContextMenuItem
//
this.SavestateTypeDefaultContextMenuItem.Name = "SavestateTypeDefaultContextMenuItem";
- this.SavestateTypeDefaultContextMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.SavestateTypeDefaultContextMenuItem.Size = new System.Drawing.Size(112, 22);
this.SavestateTypeDefaultContextMenuItem.Text = "&Default";
//
// SavestateBinaryContextMenuItem
//
this.SavestateBinaryContextMenuItem.Name = "SavestateBinaryContextMenuItem";
- this.SavestateBinaryContextMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.SavestateBinaryContextMenuItem.Size = new System.Drawing.Size(112, 22);
this.SavestateBinaryContextMenuItem.Text = "&Binary";
//
// SavestateTextContextMenuItem
//
this.SavestateTextContextMenuItem.Name = "SavestateTextContextMenuItem";
- this.SavestateTextContextMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.SavestateTextContextMenuItem.Size = new System.Drawing.Size(112, 22);
this.SavestateTextContextMenuItem.Text = "&Text";
//
// CoreSelectionContextSubMenu
@@ -3600,6 +3602,14 @@
this.timerMouseIdle.Interval = 2000;
this.timerMouseIdle.Tick += new System.EventHandler(this.timerMouseIdle_Tick);
//
+ // gameSharkConverterToolStripMenuItem
+ //
+ this.gameSharkConverterToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("gameSharkConverterToolStripMenuItem.Image")));
+ this.gameSharkConverterToolStripMenuItem.Name = "gameSharkConverterToolStripMenuItem";
+ this.gameSharkConverterToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
+ this.gameSharkConverterToolStripMenuItem.Text = "GameShark Converter";
+ this.gameSharkConverterToolStripMenuItem.Click += new System.EventHandler(this.gameSharkConverterToolStripMenuItem_Click);
+ //
// MainForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -4018,6 +4028,7 @@
private System.Windows.Forms.ToolStripMenuItem CodeDataLoggerMenuItem;
private System.Windows.Forms.ToolStripMenuItem setLibretroCoreToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem OpenAdvancedMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem gameSharkConverterToolStripMenuItem;
}
}
diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs
index c0771f631e..be19f70e8b 100644
--- a/BizHawk.Client.EmuHawk/MainForm.cs
+++ b/BizHawk.Client.EmuHawk/MainForm.cs
@@ -3977,6 +3977,14 @@ namespace BizHawk.Client.EmuHawk
Global.Config.DisplayMessages ^= true;
}
+ private void gameSharkConverterToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ //TODO:
+ //Wire up the Connection to the Object
+ gameSharkConverterToolStripMenuItem.Enabled = GlobalWin.Tools.IsAvailable();
+ GlobalWin.Tools.Load();
+ }
+
private void HelpSubMenu_DropDownOpened(object sender, EventArgs e)
{
FeaturesMenuItem.Visible = VersionInfo.DeveloperBuild;
diff --git a/BizHawk.Client.EmuHawk/MainForm.resx b/BizHawk.Client.EmuHawk/MainForm.resx
index b1102bdcb9..76ad03062f 100644
--- a/BizHawk.Client.EmuHawk/MainForm.resx
+++ b/BizHawk.Client.EmuHawk/MainForm.resx
@@ -121,6 +121,39 @@
17, 17
+
+
+ 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
+ +/f/AtNpu+2UY3h4AAAAAElFTkSuQmCC
+
+
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
diff --git a/BizHawk.Client.EmuHawk/images/Shark.ico b/BizHawk.Client.EmuHawk/images/Shark.ico
new file mode 100644
index 0000000000..9f35543e2e
Binary files /dev/null and b/BizHawk.Client.EmuHawk/images/Shark.ico differ
diff --git a/BizHawk.Client.EmuHawk/images/Shark.png b/BizHawk.Client.EmuHawk/images/Shark.png
new file mode 100644
index 0000000000..c3bdaf2e43
Binary files /dev/null and b/BizHawk.Client.EmuHawk/images/Shark.png differ
diff --git a/BizHawk.Client.EmuHawk/tools/GameShark.Designer.cs b/BizHawk.Client.EmuHawk/tools/GameShark.Designer.cs
new file mode 100644
index 0000000000..cab983dccd
--- /dev/null
+++ b/BizHawk.Client.EmuHawk/tools/GameShark.Designer.cs
@@ -0,0 +1,132 @@
+namespace BizHawk.Client.EmuHawk
+{
+ partial class GameShark
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GameShark));
+ this.mnuGameShark = new System.Windows.Forms.MenuStrip();
+ this.btnClear = new System.Windows.Forms.Button();
+ this.lblCheat = new System.Windows.Forms.Label();
+ this.txtCheat = new System.Windows.Forms.TextBox();
+ this.btnGo = new System.Windows.Forms.Button();
+ this.lblDescription = new System.Windows.Forms.Label();
+ this.txtDescription = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // mnuGameShark
+ //
+ this.mnuGameShark.Location = new System.Drawing.Point(0, 0);
+ this.mnuGameShark.Name = "mnuGameShark";
+ this.mnuGameShark.Size = new System.Drawing.Size(284, 24);
+ this.mnuGameShark.TabIndex = 0;
+ //
+ // btnClear
+ //
+ this.btnClear.Location = new System.Drawing.Point(141, 132);
+ this.btnClear.Name = "btnClear";
+ this.btnClear.Size = new System.Drawing.Size(75, 23);
+ this.btnClear.TabIndex = 16;
+ this.btnClear.Text = "Clear";
+ this.btnClear.UseVisualStyleBackColor = true;
+ this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
+ //
+ // lblCheat
+ //
+ this.lblCheat.AutoSize = true;
+ this.lblCheat.Location = new System.Drawing.Point(147, 91);
+ this.lblCheat.Name = "lblCheat";
+ this.lblCheat.Size = new System.Drawing.Size(63, 13);
+ this.lblCheat.TabIndex = 11;
+ this.lblCheat.Text = "Cheat Code";
+ //
+ // txtCheat
+ //
+ this.txtCheat.Location = new System.Drawing.Point(128, 106);
+ this.txtCheat.Name = "txtCheat";
+ this.txtCheat.Size = new System.Drawing.Size(100, 20);
+ this.txtCheat.TabIndex = 10;
+ //
+ // btnGo
+ //
+ this.btnGo.Location = new System.Drawing.Point(35, 131);
+ this.btnGo.Name = "btnGo";
+ this.btnGo.Size = new System.Drawing.Size(75, 23);
+ this.btnGo.TabIndex = 9;
+ this.btnGo.Text = "Convert";
+ this.btnGo.UseVisualStyleBackColor = true;
+ this.btnGo.Click += new System.EventHandler(this.btnGo_Click);
+ //
+ // lblDescription
+ //
+ this.lblDescription.AutoSize = true;
+ this.lblDescription.Location = new System.Drawing.Point(42, 90);
+ this.lblDescription.Name = "lblDescription";
+ this.lblDescription.Size = new System.Drawing.Size(60, 13);
+ this.lblDescription.TabIndex = 17;
+ this.lblDescription.Text = "Description";
+ //
+ // txtDescription
+ //
+ this.txtDescription.Location = new System.Drawing.Point(22, 106);
+ this.txtDescription.Name = "txtDescription";
+ this.txtDescription.Size = new System.Drawing.Size(100, 20);
+ this.txtDescription.TabIndex = 18;
+ //
+ // GameShark
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(284, 261);
+ this.Controls.Add(this.txtDescription);
+ this.Controls.Add(this.lblDescription);
+ this.Controls.Add(this.btnClear);
+ this.Controls.Add(this.lblCheat);
+ this.Controls.Add(this.txtCheat);
+ this.Controls.Add(this.btnGo);
+ this.Controls.Add(this.mnuGameShark);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MainMenuStrip = this.mnuGameShark;
+ this.MaximizeBox = false;
+ this.Name = "GameShark";
+ this.Text = "GameShark Converter";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.MenuStrip mnuGameShark;
+ internal System.Windows.Forms.Button btnClear;
+ internal System.Windows.Forms.Label lblCheat;
+ internal System.Windows.Forms.TextBox txtCheat;
+ internal System.Windows.Forms.Button btnGo;
+ private System.Windows.Forms.Label lblDescription;
+ private System.Windows.Forms.TextBox txtDescription;
+ }
+}
\ No newline at end of file
diff --git a/BizHawk.Client.EmuHawk/tools/GameShark.cs b/BizHawk.Client.EmuHawk/tools/GameShark.cs
new file mode 100644
index 0000000000..0aeab18b0a
--- /dev/null
+++ b/BizHawk.Client.EmuHawk/tools/GameShark.cs
@@ -0,0 +1,104 @@
+using System;
+using System.Windows.Forms;
+using BizHawk.Emulation.Common;
+//Using the GameBoy Core Directly, is an issue with the limitations for what this tool does.
+using BizHawk.Emulation.Cores.Nintendo.Gameboy;
+using BizHawk.Client.Common;
+using System.Globalization;
+
+namespace BizHawk.Client.EmuHawk
+{
+ public partial class GameShark : Form, IToolForm, IToolFormAutoConfig
+ {
+ //We are using Memory Domains, so we NEED this.
+ [RequiredService]
+ private IMemoryDomains MemoryDomains { get; set; }
+ //Since this is only using GameBoy at the moment, we do this.
+ //TODO:
+ //Expand this so that this tool supports ALL cores that are capable of using GameShark/CodeBreaker/Action Replay/Game Genie
+ [RequiredService]
+ private Gameboy GB { get; set; }
+ public GameShark()
+ {
+ InitializeComponent();
+ }
+
+ public bool UpdateBefore
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public bool AskSaveChanges()
+ {
+ return true;
+ }
+
+ public void FastUpdate()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Restart()
+ {
+
+ }
+
+ public void UpdateValues()
+ {
+
+ }
+
+ private void btnGo_Click(object sender, EventArgs e)
+ {
+ //This line ONLY applies to GB/GBC codes.
+ if (txtCheat.Text.Length != 8)
+ {
+ MessageBox.Show("All GameShark and CodeBreaker cheats need to be Eight characters in Length", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+ //Sample Input for GB/GBC:
+ //010FF6C1
+ //Becomes:
+ //Address C1F6
+ //Value 0F
+ string parseString = null;
+ string RAMAddress = null;
+ string RAMValue = null;
+ parseString = txtCheat.Text.Remove(0, 2);
+ //Now we need to break it down a little more.
+ RAMValue = parseString.Remove(2, 4);
+ parseString = parseString.Remove(0, 2);
+ //The issue is Endian... Time to get ultra clever. And Regret it.
+ //First Half
+ RAMAddress = parseString.Remove(0, 2);
+ RAMAddress = RAMAddress + parseString.Remove(2, 2);
+ //We now have our values.
+ //This part, is annoying...
+ //try
+ //{
+ //A Watch needs to be generated so we can make a cheat out of that. This is due to how the Cheat engine works.
+ //System Bus Domain, The Address to Watch, Byte size (Byte), Hex Display, Description. Not Big Endian.
+ var watch = Watch.GenerateWatch(MemoryDomains["System Bus"], long.Parse(RAMAddress, NumberStyles.HexNumber), Watch.WatchSize.Byte, Watch.DisplayType.Hex, txtDescription.Text, false);
+ //Take Watch, Add our Value we want, and it should be active when addded?
+ Global.CheatList.Add(new Cheat(watch, int.Parse(RAMValue, NumberStyles.HexNumber)));
+ //Clear old Inputs
+ txtCheat.Clear();
+ txtDescription.Clear();
+ /*}
+ catch
+ {
+ MessageBox.Show("An Error occured", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ } */
+ }
+
+ private void btnClear_Click(object sender, EventArgs e)
+ {
+ //Clear old Inputs
+ txtCheat.Clear();
+ txtDescription.Clear();
+ }
+ }
+}
diff --git a/BizHawk.Client.EmuHawk/tools/GameShark.resx b/BizHawk.Client.EmuHawk/tools/GameShark.resx
new file mode 100644
index 0000000000..45b6d9a8ef
--- /dev/null
+++ b/BizHawk.Client.EmuHawk/tools/GameShark.resx
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
+
+
+ AAABAAEAICAAAAEAGACoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAAAAGAAAABgAAAAAAAAAAAA
+ AAD////+///+///+/////////////////////////////////////////////v/+///+////////////
+ ////////////////////////////////////////////////////////////////////////////////
+ ///+/v77+/vq6urk5OTz8/P+/v7+/v7/////////////////////////////////////////////////
+ ///////////////////////////////////////+/v7k5OSJiYleXl5ERERGRkZFRUU5OTk4ODhNTU2R
+ kZHe3t7+/v7/////////////////////////////////////////////////////////////////////
+ ///6+vqSkpJra2uhoaG6urq9vb27u7u9vb3Dw8PFxcWwsLB9fX04ODhLS0u7u7v9/f3/////////////
+ ///////////////////////////////////////////////4+PiJiYmgoKCrq6tycnI7OzsZGRkHBwcG
+ BgYVFRUzMzNeXl6fn5/Ly8urq6tOTk5ERETMzMz/////////////////////////////////////////
+ //////////////+wsLCkpKRubm4QEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhISF3d3fKysqu
+ rq45OTl3d3f4+Pj////////////////////////////////////////////u7u6fn59SUlIAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXFxeGhobV1dV5eXk+Pj7m5ub/////////////
+ //////////////////////////+9vb1ubm4BAQEAAAAAAAAAAAAVFRVBQUFFRUUlJSUDAwMAAAAAAAAA
+ AAAAAAAAAAAAAAABAQE5OTnCwsKoqKgzMzORkZHq6ur////////////////////////////5+fmenp4a
+ GhoAAAAAAAAaGhqcnJzf39/f39/c3Nza2trIyMiJiYlKSkoHBwcAAAAAAAAAAAAAAAAAAAAUFBSioqJx
+ cXGBgYHh4eH////////////////////////////i4uJ9fX0CAgIBAQERERHJycnj4+Ph4eHe3t7c3Nza
+ 2trY2NjW1tbT09PExMRzc3MZGRkAAAACAgICAgIBAQFNTU26urqfn589PT3z8/P/////////////////
+ ///////S0tJdXV0SERESERFvb2/l5eXj4+Ph4eHe3t7c3Nza2trY2NjW1tbT09PQ0NDOzs7GxsZ2dnYT
+ ExMLCwtLS0u9vb28u7urqqqgoKBiYmL+/v7////////////////////Nzc1SUlEmJCQmJCSamprl5eXj
+ 4+Ph4eHe3t7c3Nza2trY2NitrKyRkJCPjo6WlZWwsLDIyMi5ubliYmK7u7u/v7+dnJwzMTHLyspoaGix
+ sbH///////////////////+4uLhMS0s4NTQ4NTOQjo3l5eXj4+Ph4eHe3t7c3Nza2trY2NiCgoIvLy8W
+ FRQmJCQ3NDNJR0V8enizs7LBwcG/v79tbW04NTNdW1nb29tCQkL09PT////////////////S0tI/Pz8Z
+ GBgcGhlpaGjl5eXj4+Ph4eHe3t7c3Nza2trY2NjW1tbS0tK4uLhubm4gHx85NjNHQz9LR0Srqqm/v7+E
+ hIQxLitHQz+dnJmhoaGNjY3////////////////t7e3Z2dnk5OTh4eHn5+fl5eXj4+Ph4eHe3t7c3Nza
+ 2trY2NjW1tbT09PQ0NDOzs69vb1ISEg0MS1WUUl+e3W/v7+8vLw8OztPSkNdWFHZ2dhNTU34+Pj/////
+ ///////7+/uenp51c3HMy8nk5OTl5eXj4+Ph4eHe3t7c3Nza2trY2NjW1tbT09PQ0NDOzs7MzMzIyMhj
+ Y2NAOzVlXlSrqqe9vb2kpKQqKCZgWk+hnZecnJyrq6v////////////////Hx8c2NTRsZVd0bF+FfnLa
+ 2dnh4eHe3t7c3Nza2trY2NjW1tbT09PQ0NDOzs7MzMzIyMjGxcV3cmdvZ1p6c2a0s7K5ubmPj48qKCV0
+ bWHe3d1paWn////////////////o6Oh1dXVLRTt6cWB6cWCinZHh4eHe3t7c3Nza2trY2NjW1tbT09PQ
+ 0NDOzs7MzMzAv72Ri354cF96cWB4cF+CemurqaS3traIiYgpJyS6uLVra2v9/f3////////////+/v7A
+ wMArKih9cl+GemSGemTEwbne3t7c3Nza2trY2NjW1tbNzc13d3eSjoWclISFemVuZVNiW06JfmlbVUeJ
+ fmpVTkKYkIGlop2Pj45nZmR7e3vh4eH////////////////p6emGhoY4MyqPgmePgmeUiG7Rz8rc3Nza
+ 2trY2NjW1tbT09O9vb1FRURHQTSVjHk9OzdzcW1sZFRbWlmKgWxWVVR+c1uPgmeQhGqkno61tbXFxcX/
+ ///////////////////Pz89KSkpjWUWZimmZimiUinXc3Nza2trY2NjW1tbT09PQ0NDOzs6Tk5NPTk6o
+ qKiPj49KSUatra1RTD+tra5EPjSZimiZimirn4XFxcW9vb3////////////////////39/e6urooJyZ/
+ clOMfl+6ubfc3Nza2trY2NjW1tbT09PQ0NDOzs7MzMzJycnGxsbCwsKdnZ2+vr5eXVy2trZvb29+cFKk
+ kmi2qIvJycnHx8f////////////////////////r6+upqakqKCa0s7He3t7c3Nza2trY2NjW1tbT09PQ
+ 0NDOzs7MzMzIyMjGxsbExMTBwcG/v7+srKyxsbG0tLRHQjitmWjEuJu9vr3m5ub/////////////////
+ ///////7+/uTk5O7u7vh4eHe3t7c3Nza2trY2NjV1dXS0tLQ0NDOzs7MzMzIyMjGxsbExMTBwcG/v7+8
+ vLy5ubm2trZ6enqAcUzUzLm6urr+/v7////////////////////p6emHh4fU1NTj4+Ph4eHe3t7c3NzZ
+ 2trTz8LFsH7GtInPzcjOzs7MzMzIyMjGxsbExMTBwcG/v7+9vb25ubm2tratra1NST7k49/S0tL/////
+ ///////////////////5+fnr6+vl5eXj4+Ph4eHd3d3JyclVU0+Tf0vFqWDHqV/HrWvLwajLy8vIyMnG
+ xsbExMSIiIiPj4+9vb25ubm2traurq50dHSqqqry8vL////////////////////////////////9/f37
+ +/v8/Pzu7u7Q0NCbm5ssLCw4MByTfkXLrFvOrlzNtXXKwajGxsXEw8Szs7O9vb29vb25ubm2traurq6j
+ o6NfX1/////////////////////////////////////////////////////6+vre3t7Pz8+RkZE3Njcg
+ GxBfUSqagkC9oE3RtWXNvY7BvK6/v7+8vLy5ubm2traurq6kpKRubm7k5OT/////////////////////
+ ///////////////////////////////////z8/Pe3t7W1ta4uLh7e3tEQ0MiIiIaGRcfHRokJCNaWlq9
+ vb3U1NTOzs7MzMzNzc3U1NT+/v7/////////////////////////////////////////////////////
+ ///////////29vbn5+fc3Nzc3Nze3t7g4ODh4eHk5OTm5ubn5+fr6+v29vb/////////////////////
+ ///////////////////////////////////////////////////////////////////+/v739/fx8fHw
+ 8PDx8fHy8vL19fX7+/v/////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////
+ //////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAH/AAAH/8AABwfgAAwA+AAAACAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+
+
+
\ No newline at end of file