diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 5d12e5f0a4..d8ff6ff961 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -3979,8 +3979,6 @@ namespace BizHawk.Client.EmuHawk private void gameSharkConverterToolStripMenuItem_Click(object sender, EventArgs e) { - //TODO: - //Wire up the Connection to the Object GlobalWin.Tools.Load(); } diff --git a/BizHawk.Client.EmuHawk/tools/GameShark.Designer.cs b/BizHawk.Client.EmuHawk/tools/GameShark.Designer.cs index fdeafa3c3f..843dbb5bba 100644 --- a/BizHawk.Client.EmuHawk/tools/GameShark.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/GameShark.Designer.cs @@ -50,7 +50,7 @@ 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.TabIndex = 4; this.btnClear.Text = "Clear"; this.btnClear.UseVisualStyleBackColor = true; this.btnClear.Click += new System.EventHandler(this.btnClear_Click); @@ -69,14 +69,14 @@ 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; + this.txtCheat.TabIndex = 2; // // 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.TabIndex = 3; this.btnGo.Text = "Convert"; this.btnGo.UseVisualStyleBackColor = true; this.btnGo.Click += new System.EventHandler(this.btnGo_Click); @@ -95,7 +95,7 @@ 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; + this.txtDescription.TabIndex = 1; // // GameShark // diff --git a/BizHawk.Client.EmuHawk/tools/GameShark.cs b/BizHawk.Client.EmuHawk/tools/GameShark.cs index 037f20ba34..3ac98d6e56 100644 --- a/BizHawk.Client.EmuHawk/tools/GameShark.cs +++ b/BizHawk.Client.EmuHawk/tools/GameShark.cs @@ -1,8 +1,6 @@ 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; @@ -14,7 +12,6 @@ namespace BizHawk.Client.EmuHawk //We are using Memory Domains, so we NEED this. [RequiredService] private IMemoryDomains MemoryDomains { get; set; } - public GameShark() { InitializeComponent(); @@ -35,7 +32,7 @@ namespace BizHawk.Client.EmuHawk public void FastUpdate() { - throw new NotImplementedException(); + } public void Restart() @@ -74,8 +71,8 @@ namespace BizHawk.Client.EmuHawk RAMAddress = RAMAddress + parseString.Remove(2, 2); //We now have our values. //This part, is annoying... - //try - //{ + 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); @@ -84,11 +81,11 @@ namespace BizHawk.Client.EmuHawk //Clear old Inputs txtCheat.Clear(); txtDescription.Clear(); - /*} - catch + } + catch (Exception ex) { - MessageBox.Show("An Error occured", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } */ + MessageBox.Show("An Error occured:" + ex.GetType().ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } private void btnClear_Click(object sender, EventArgs e)