SNES Game Genie Encoder/Decoder, first "big" commit, hopefully I got everything

If there is anything wrong, let me know so I know what to do next time!
This commit is contained in:
masterofpuppets152001 2013-04-23 09:09:49 +00:00
parent 107040955f
commit 0df9dbde13
9 changed files with 1901 additions and 842 deletions

View File

@ -387,6 +387,12 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SNESTools\SNESGameGenie.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SNESTools\SNESGameGenie.Designer.cs">
<DependentUpon>SNESGameGenie.cs</DependentUpon>
</Compile>
<Compile Include="SNESTools\SNESGraphicsDebugger.cs">
<SubType>Form</SubType>
</Compile>
@ -566,6 +572,10 @@
<EmbeddedResource Include="SMStools\SMSGraphicsConfig.resx">
<DependentUpon>SMSGraphicsConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SNESTools\SNESGameGenie.resx">
<DependentUpon>SNESGameGenie.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SNESTools\SNESGraphicsDebugger.resx">
<DependentUpon>SNESGraphicsDebugger.cs</DependentUpon>
</EmbeddedResource>

View File

@ -574,6 +574,12 @@ namespace BizHawk.MultiClient
public int NESGGWndx = -1;
public int NESGGWndy = -1;
// SNES Game Genie Encoder/Decoder
public bool SNESGGAutoload = false;
public bool SNESGGSaveWindowPosition = true;
public int SNESGGWndx = -1;
public int SNESGGWndy = -1;
//Movie Settings
public RecentFiles RecentMovies = new RecentFiles(8);
public bool AutoLoadMostRecentMovie = false;

File diff suppressed because it is too large Load Diff

View File

@ -3308,8 +3308,16 @@ namespace BizHawk.MultiClient
public void LoadGameGenieEC()
{
NESGameGenie gg = new NESGameGenie();
gg.Show();
if (Global.Emulator is NES)
{
NESGameGenie gg = new NESGameGenie();
gg.Show();
}
else if (Global.Emulator is LibsnesCore)
{
SNESGameGenie gg = new SNESGameGenie();
gg.Show();
}
}
public void LoadSNESGraphicsDebugger()
@ -3515,7 +3523,7 @@ namespace BizHawk.MultiClient
}
else
{
FormBorderStyle = FormBorderStyle.FixedSingle;
FormBorderStyle = FormBorderStyle.Sizable;
WindowState = FormWindowState.Normal;
MainMenuStrip.Visible = true;
StatusSlot0.Visible = Global.Config.DisplayStatusBar;
@ -5048,5 +5056,12 @@ namespace BizHawk.MultiClient
return EMUVERSION;
}
}
private void SNESgameGenieCodesToolStripMenuItem_Click(object sender, EventArgs e)
{
LoadGameGenieEC();
}
}
}

View File

@ -0,0 +1,521 @@
namespace BizHawk.MultiClient
{
partial class SNESGameGenie
{
/// <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()
{
this.GameGenieCode = new System.Windows.Forms.TextBox();
this.GameGenieCodeBox = new System.Windows.Forms.GroupBox();
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.ValueBox = new BizHawk.HexTextBox();
this.AddressBox = new BizHawk.HexTextBox();
this.AddCheat = new System.Windows.Forms.Button();
this.ButtonPanel = new System.Windows.Forms.Panel();
this.BF = new System.Windows.Forms.Button();
this.BD = new System.Windows.Forms.Button();
this.BB = new System.Windows.Forms.Button();
this.B9 = new System.Windows.Forms.Button();
this.B7 = new System.Windows.Forms.Button();
this.B5 = new System.Windows.Forms.Button();
this.B3 = new System.Windows.Forms.Button();
this.BE = new System.Windows.Forms.Button();
this.B6 = new System.Windows.Forms.Button();
this.B1 = new System.Windows.Forms.Button();
this.BC = new System.Windows.Forms.Button();
this.BA = new System.Windows.Forms.Button();
this.B8 = new System.Windows.Forms.Button();
this.B4 = new System.Windows.Forms.Button();
this.B2 = new System.Windows.Forms.Button();
this.B0 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.ClearButton = new System.Windows.Forms.Button();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autoloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.GameGenieCodeBox.SuspendLayout();
this.ButtonPanel.SuspendLayout();
this.groupBox1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// GameGenieCode
//
this.GameGenieCode.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.GameGenieCode.Location = new System.Drawing.Point(8, 23);
this.GameGenieCode.Margin = new System.Windows.Forms.Padding(4);
this.GameGenieCode.MaxLength = 8;
this.GameGenieCode.Name = "GameGenieCode";
this.GameGenieCode.Size = new System.Drawing.Size(113, 22);
this.GameGenieCode.TabIndex = 20;
this.GameGenieCode.TextChanged += new System.EventHandler(this.GameGenieCode_TextChanged);
this.GameGenieCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GameGenieCode_KeyDown);
this.GameGenieCode.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.GameGenieCode_KeyPress);
//
// GameGenieCodeBox
//
this.GameGenieCodeBox.Controls.Add(this.GameGenieCode);
this.GameGenieCodeBox.Location = new System.Drawing.Point(41, 127);
this.GameGenieCodeBox.Margin = new System.Windows.Forms.Padding(4);
this.GameGenieCodeBox.Name = "GameGenieCodeBox";
this.GameGenieCodeBox.Padding = new System.Windows.Forms.Padding(4);
this.GameGenieCodeBox.Size = new System.Drawing.Size(153, 66);
this.GameGenieCodeBox.TabIndex = 1;
this.GameGenieCodeBox.TabStop = false;
this.GameGenieCodeBox.Text = "Game Genie Code";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(11, 56);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 5;
this.label3.Text = "Value";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(11, 20);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(60, 17);
this.label1.TabIndex = 3;
this.label1.Text = "Address";
//
// ValueBox
//
this.ValueBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.ValueBox.Location = new System.Drawing.Point(140, 51);
this.ValueBox.Margin = new System.Windows.Forms.Padding(4);
this.ValueBox.MaxLength = 2;
this.ValueBox.Name = "ValueBox";
this.ValueBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.ValueBox.Size = new System.Drawing.Size(35, 22);
this.ValueBox.TabIndex = 23;
this.ValueBox.TextChanged += new System.EventHandler(this.ValueBox_TextChanged);
//
// AddressBox
//
this.AddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.AddressBox.Location = new System.Drawing.Point(100, 16);
this.AddressBox.Margin = new System.Windows.Forms.Padding(4);
this.AddressBox.MaxLength = 6;
this.AddressBox.Name = "AddressBox";
this.AddressBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.AddressBox.Size = new System.Drawing.Size(75, 22);
this.AddressBox.TabIndex = 21;
this.AddressBox.TextChanged += new System.EventHandler(this.AddressBox_TextChanged);
//
// AddCheat
//
this.AddCheat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.AddCheat.Location = new System.Drawing.Point(268, 257);
this.AddCheat.Margin = new System.Windows.Forms.Padding(4);
this.AddCheat.Name = "AddCheat";
this.AddCheat.Size = new System.Drawing.Size(92, 26);
this.AddCheat.TabIndex = 33;
this.AddCheat.Text = "&Add Cheat";
this.AddCheat.UseVisualStyleBackColor = true;
this.AddCheat.Click += new System.EventHandler(this.AddCheat_Click);
//
// ButtonPanel
//
this.ButtonPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.ButtonPanel.Controls.Add(this.BF);
this.ButtonPanel.Controls.Add(this.BD);
this.ButtonPanel.Controls.Add(this.BB);
this.ButtonPanel.Controls.Add(this.B9);
this.ButtonPanel.Controls.Add(this.B7);
this.ButtonPanel.Controls.Add(this.B5);
this.ButtonPanel.Controls.Add(this.B3);
this.ButtonPanel.Controls.Add(this.BE);
this.ButtonPanel.Controls.Add(this.B6);
this.ButtonPanel.Controls.Add(this.B1);
this.ButtonPanel.Controls.Add(this.BC);
this.ButtonPanel.Controls.Add(this.BA);
this.ButtonPanel.Controls.Add(this.B8);
this.ButtonPanel.Controls.Add(this.B4);
this.ButtonPanel.Controls.Add(this.B2);
this.ButtonPanel.Controls.Add(this.B0);
this.ButtonPanel.Location = new System.Drawing.Point(41, 37);
this.ButtonPanel.Margin = new System.Windows.Forms.Padding(4);
this.ButtonPanel.Name = "ButtonPanel";
this.ButtonPanel.Size = new System.Drawing.Size(319, 82);
this.ButtonPanel.TabIndex = 4;
//
// BF
//
this.BF.Location = new System.Drawing.Point(275, 43);
this.BF.Margin = new System.Windows.Forms.Padding(4);
this.BF.Name = "BF";
this.BF.Size = new System.Drawing.Size(35, 28);
this.BF.TabIndex = 16;
this.BF.Text = "F";
this.BF.UseVisualStyleBackColor = true;
this.BF.Click += new System.EventHandler(this.Keypad_Click);
//
// BD
//
this.BD.Location = new System.Drawing.Point(199, 43);
this.BD.Margin = new System.Windows.Forms.Padding(4);
this.BD.Name = "BD";
this.BD.Size = new System.Drawing.Size(35, 28);
this.BD.TabIndex = 14;
this.BD.Text = "D";
this.BD.UseVisualStyleBackColor = true;
this.BD.Click += new System.EventHandler(this.Keypad_Click);
//
// BB
//
this.BB.Location = new System.Drawing.Point(121, 43);
this.BB.Margin = new System.Windows.Forms.Padding(4);
this.BB.Name = "BB";
this.BB.Size = new System.Drawing.Size(35, 28);
this.BB.TabIndex = 12;
this.BB.Text = "B";
this.BB.UseVisualStyleBackColor = true;
this.BB.Click += new System.EventHandler(this.Keypad_Click);
//
// B9
//
this.B9.Location = new System.Drawing.Point(45, 43);
this.B9.Margin = new System.Windows.Forms.Padding(4);
this.B9.Name = "B9";
this.B9.Size = new System.Drawing.Size(35, 28);
this.B9.TabIndex = 10;
this.B9.Text = "9";
this.B9.UseVisualStyleBackColor = true;
this.B9.Click += new System.EventHandler(this.Keypad_Click);
//
// B7
//
this.B7.Location = new System.Drawing.Point(275, 6);
this.B7.Margin = new System.Windows.Forms.Padding(4);
this.B7.Name = "B7";
this.B7.Size = new System.Drawing.Size(35, 28);
this.B7.TabIndex = 8;
this.B7.Text = "7";
this.B7.UseVisualStyleBackColor = true;
this.B7.Click += new System.EventHandler(this.Keypad_Click);
//
// B5
//
this.B5.Location = new System.Drawing.Point(199, 7);
this.B5.Margin = new System.Windows.Forms.Padding(4);
this.B5.Name = "B5";
this.B5.Size = new System.Drawing.Size(35, 28);
this.B5.TabIndex = 6;
this.B5.Text = "5";
this.B5.UseVisualStyleBackColor = true;
this.B5.Click += new System.EventHandler(this.Keypad_Click);
//
// B3
//
this.B3.Location = new System.Drawing.Point(121, 7);
this.B3.Margin = new System.Windows.Forms.Padding(4);
this.B3.Name = "B3";
this.B3.Size = new System.Drawing.Size(35, 28);
this.B3.TabIndex = 4;
this.B3.Text = "3";
this.B3.UseVisualStyleBackColor = true;
this.B3.Click += new System.EventHandler(this.Keypad_Click);
//
// BE
//
this.BE.Location = new System.Drawing.Point(237, 43);
this.BE.Margin = new System.Windows.Forms.Padding(4);
this.BE.Name = "BE";
this.BE.Size = new System.Drawing.Size(35, 28);
this.BE.TabIndex = 15;
this.BE.Text = "E";
this.BE.UseVisualStyleBackColor = true;
this.BE.Click += new System.EventHandler(this.Keypad_Click);
//
// B6
//
this.B6.Location = new System.Drawing.Point(237, 6);
this.B6.Margin = new System.Windows.Forms.Padding(4);
this.B6.Name = "B6";
this.B6.Size = new System.Drawing.Size(35, 28);
this.B6.TabIndex = 7;
this.B6.Text = "6";
this.B6.UseVisualStyleBackColor = true;
this.B6.Click += new System.EventHandler(this.Keypad_Click);
//
// B1
//
this.B1.Location = new System.Drawing.Point(45, 7);
this.B1.Margin = new System.Windows.Forms.Padding(4);
this.B1.Name = "B1";
this.B1.Size = new System.Drawing.Size(35, 28);
this.B1.TabIndex = 2;
this.B1.Text = "1";
this.B1.UseVisualStyleBackColor = true;
this.B1.Click += new System.EventHandler(this.Keypad_Click);
//
// BC
//
this.BC.Location = new System.Drawing.Point(161, 43);
this.BC.Margin = new System.Windows.Forms.Padding(4);
this.BC.Name = "BC";
this.BC.Size = new System.Drawing.Size(35, 28);
this.BC.TabIndex = 13;
this.BC.Text = "C";
this.BC.UseVisualStyleBackColor = true;
this.BC.Click += new System.EventHandler(this.Keypad_Click);
//
// BA
//
this.BA.Location = new System.Drawing.Point(84, 43);
this.BA.Margin = new System.Windows.Forms.Padding(4);
this.BA.Name = "BA";
this.BA.Size = new System.Drawing.Size(35, 28);
this.BA.TabIndex = 11;
this.BA.Text = "A";
this.BA.UseVisualStyleBackColor = true;
this.BA.Click += new System.EventHandler(this.Keypad_Click);
//
// B8
//
this.B8.Location = new System.Drawing.Point(8, 43);
this.B8.Margin = new System.Windows.Forms.Padding(4);
this.B8.Name = "B8";
this.B8.Size = new System.Drawing.Size(35, 28);
this.B8.TabIndex = 9;
this.B8.Text = "8";
this.B8.UseVisualStyleBackColor = true;
this.B8.Click += new System.EventHandler(this.Keypad_Click);
//
// B4
//
this.B4.Location = new System.Drawing.Point(161, 7);
this.B4.Margin = new System.Windows.Forms.Padding(4);
this.B4.Name = "B4";
this.B4.Size = new System.Drawing.Size(35, 28);
this.B4.TabIndex = 5;
this.B4.Text = "4";
this.B4.UseVisualStyleBackColor = true;
this.B4.Click += new System.EventHandler(this.Keypad_Click);
//
// B2
//
this.B2.Location = new System.Drawing.Point(84, 7);
this.B2.Margin = new System.Windows.Forms.Padding(4);
this.B2.Name = "B2";
this.B2.Size = new System.Drawing.Size(35, 28);
this.B2.TabIndex = 3;
this.B2.Text = "2";
this.B2.UseVisualStyleBackColor = true;
this.B2.Click += new System.EventHandler(this.Keypad_Click);
//
// B0
//
this.B0.Location = new System.Drawing.Point(8, 6);
this.B0.Margin = new System.Windows.Forms.Padding(4);
this.B0.Name = "B0";
this.B0.Size = new System.Drawing.Size(35, 28);
this.B0.TabIndex = 1;
this.B0.Text = "0";
this.B0.UseVisualStyleBackColor = true;
this.B0.Click += new System.EventHandler(this.Keypad_Click);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.AddressBox);
this.groupBox1.Controls.Add(this.ValueBox);
this.groupBox1.Location = new System.Drawing.Point(41, 201);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
this.groupBox1.Size = new System.Drawing.Size(183, 114);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(116, 56);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(22, 17);
this.label6.TabIndex = 9;
this.label6.Text = "0x";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(76, 20);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(22, 17);
this.label4.TabIndex = 7;
this.label4.Text = "0x";
//
// ClearButton
//
this.ClearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ClearButton.Location = new System.Drawing.Point(288, 201);
this.ClearButton.Margin = new System.Windows.Forms.Padding(4);
this.ClearButton.Name = "ClearButton";
this.ClearButton.Size = new System.Drawing.Size(72, 28);
this.ClearButton.TabIndex = 32;
this.ClearButton.Text = "&Clear";
this.ClearButton.UseVisualStyleBackColor = true;
this.ClearButton.Click += new System.EventHandler(this.ClearButton_Click);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.optionsToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Padding = new System.Windows.Forms.Padding(8, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(403, 28);
this.menuStrip1.TabIndex = 8;
this.menuStrip1.Text = "menuStrip1";
//
// optionsToolStripMenuItem
//
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.autoloadToolStripMenuItem,
this.saveWindowPositionToolStripMenuItem,
this.toolStripSeparator1,
this.exitToolStripMenuItem});
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
this.optionsToolStripMenuItem.Text = "&Options";
this.optionsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.optionsToolStripMenuItem_DropDownOpened);
//
// autoloadToolStripMenuItem
//
this.autoloadToolStripMenuItem.Name = "autoloadToolStripMenuItem";
this.autoloadToolStripMenuItem.Size = new System.Drawing.Size(225, 24);
this.autoloadToolStripMenuItem.Text = "Auto-load";
this.autoloadToolStripMenuItem.Click += new System.EventHandler(this.autoloadToolStripMenuItem_Click);
//
// saveWindowPositionToolStripMenuItem
//
this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem";
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(225, 24);
this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position";
this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(222, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.exitToolStripMenuItem.Size = new System.Drawing.Size(225, 24);
this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// SNESGameGenie
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(403, 315);
this.Controls.Add(this.ClearButton);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.ButtonPanel);
this.Controls.Add(this.AddCheat);
this.Controls.Add(this.GameGenieCodeBox);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(4);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(413, 354);
this.MinimumSize = new System.Drawing.Size(413, 354);
this.Name = "SNESGameGenie";
this.ShowIcon = false;
this.Text = "Game Genie Encoder / Decoder";
this.GameGenieCodeBox.ResumeLayout(false);
this.GameGenieCodeBox.PerformLayout();
this.ButtonPanel.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox GameGenieCode;
private System.Windows.Forms.GroupBox GameGenieCodeBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private HexTextBox ValueBox;
private HexTextBox AddressBox;
private System.Windows.Forms.Button AddCheat;
private System.Windows.Forms.Panel ButtonPanel;
private System.Windows.Forms.Button B6;
private System.Windows.Forms.Button B4;
private System.Windows.Forms.Button B2;
private System.Windows.Forms.Button B0;
private System.Windows.Forms.Button BE;
private System.Windows.Forms.Button BC;
private System.Windows.Forms.Button BA;
private System.Windows.Forms.Button B8;
private System.Windows.Forms.Button BF;
private System.Windows.Forms.Button BD;
private System.Windows.Forms.Button BB;
private System.Windows.Forms.Button B9;
private System.Windows.Forms.Button B7;
private System.Windows.Forms.Button B5;
private System.Windows.Forms.Button B3;
private System.Windows.Forms.Button B1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button ClearButton;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem autoloadToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveWindowPositionToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
}
}

View File

@ -0,0 +1,354 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Globalization;
namespace BizHawk.MultiClient
{
public partial class SNESGameGenie : Form
{
public int Address = 0x000000;
public int Value = 0x00;
private readonly Dictionary<char, int> GameGenieTable = new Dictionary<char, int>();
private bool Decoding = false;
private bool Encoding = false;
public SNESGameGenie()
{
InitializeComponent();
Closing += (o, e) => SaveConfigSettings();
//including transposition
//Code: D F 4 7 0 9 1 5 6 B C 8 A 2 3 E
//Hex: 0 1 2 3 4 5 6 7 8 9 A B C D E F
GameGenieTable.Add('D', 0); //0000
GameGenieTable.Add('F', 1); //0001
GameGenieTable.Add('4', 2); //0010
GameGenieTable.Add('7', 3); //0011
GameGenieTable.Add('0', 4); //0100
GameGenieTable.Add('9', 5); //0101
GameGenieTable.Add('1', 6); //0110
GameGenieTable.Add('5', 7); //0111
GameGenieTable.Add('6', 8); //1000
GameGenieTable.Add('B', 9); //1001
GameGenieTable.Add('C', 10); //1010
GameGenieTable.Add('8', 11); //1011
GameGenieTable.Add('A', 12); //1100
GameGenieTable.Add('2', 13); //1101
GameGenieTable.Add('3', 14); //1110
GameGenieTable.Add('E', 15); //1111
}
private void SNESGameGenie_Load(object sender, EventArgs e)
{
AddCheat.Enabled = false;
if (Global.Config.SNESGGSaveWindowPosition && Global.Config.SNESGGWndx >= 0 && Global.Config.SNESGGWndy >= 0)
Location = new Point(Global.Config.SNESGGWndx, Global.Config.SNESGGWndy);
}
private void SaveConfigSettings()
{
Global.Config.SNESGGWndx = Location.X;
Global.Config.SNESGGWndy = Location.Y;
}
private void GameGenieCode_KeyPress(object sender, KeyPressEventArgs e)
{
//Make uppercase
if (e.KeyChar >= 97 && e.KeyChar < 123)
e.KeyChar -= (char)32;
if (!(GameGenieTable.ContainsKey(e.KeyChar)))
{
if (e.KeyChar != (char)Keys.Back || e.KeyChar == '\b' || e.KeyChar == 22 || e.KeyChar == 1 || e.KeyChar == 3)
{
e.Handled = true;
}
}
}
public void SNESDecodeGameGenieCode(string code)
{
//Code: D F 4 7 0 9 1 5 6 B C 8 A 2 3 E
//Hex: 0 1 2 3 4 5 6 7 8 9 A B C D E F
//XXYY-YYYY, where XX is the value, and YY-YYYY is the address.
//Char # | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
//Bit # |3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|
//maps to| Value |i|j|k|l|q|r|s|t|o|p|a|b|c|d|u|v|w|x|e|f|g|h|m|n|
//order | Value |a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|
//Decoding = true;
int x;
byte[] val = { 0, 0};
// Getting Value
if (code.Length > 0)
{
GameGenieTable.TryGetValue(code[0], out x);
Value = x << 4;
}
if (code.Length > 1)
{
GameGenieTable.TryGetValue(code[1], out x);
Value |= x;
}
//Address
if (code.Length > 2)
{
GameGenieTable.TryGetValue(code[2], out x);
Address = (x << 12);
}
if (code.Length > 3)
{
GameGenieTable.TryGetValue(code[3], out x);
Address |= (x << 4);
}
if (code.Length > 4)
{
GameGenieTable.TryGetValue(code[4], out x);
Address |= ((x & 0xC) << 6);
Address |= ((x & 0x3) << 22);
}
if (code.Length > 5)
{
GameGenieTable.TryGetValue(code[5], out x);
Address |= ((x & 0xC) << 18);
Address |= ((x & 0x3) << 2);
}
if (code.Length > 6)
{
GameGenieTable.TryGetValue(code[6], out x);
Address |= ((x & 0xC) >> 2);
Address |= ((x & 0x3) << 18);
}
if (code.Length > 7)
{
GameGenieTable.TryGetValue(code[7], out x);
Address |= ((x & 0xC) << 14);
Address |= ((x & 0x3) << 10);
}
SetProperties();
}
private void SetProperties()
{
if (Address >= 0)
AddressBox.Text = String.Format("{0:X6}", Address);
else
AddressBox.Text = "";
if (Value >= 0)
ValueBox.Text = String.Format("{0:X2}", Value);
}
private void ClearProperties()
{
Address = -1;
Value = -1;
AddressBox.Text = "";
ValueBox.Text = "";
AddCheat.Enabled = false;
//Decoding = false;
}
private void GameGenieCode_TextChanged(object sender, EventArgs e)
{
if (Encoding == false)
{
if (GameGenieCode.Text.Length > 0)
{
Decoding = true;
SNESDecodeGameGenieCode(GameGenieCode.Text);
}
else
ClearProperties();
}
TryEnableAddCheat();
Decoding = false;
}
private void Keypad_Click(object sender, EventArgs e)
{
if (GameGenieCode.Text.Length < 8)
{
string code = "";
if (sender == B0) code = "0";
if (sender == B1) code += "1";
if (sender == B2) code += "2";
if (sender == B3) code += "3";
if (sender == B4) code += "4";
if (sender == B5) code += "5";
if (sender == B6) code += "6";
if (sender == B7) code += "7";
if (sender == B8) code += "8";
if (sender == B9) code += "9";
if (sender == BA) code += "A";
if (sender == BB) code += "B";
if (sender == BC) code += "C";
if (sender == BD) code += "D";
if (sender == BE) code += "E";
if (sender == BF) code += "F";
int x = GameGenieCode.SelectionStart;
GameGenieCode.Text = GameGenieCode.Text.Insert(x, code);
GameGenieCode.SelectionStart = x + 1;
}
}
private void AddressBox_TextChanged(object sender, EventArgs e)
{
if (Decoding == false)
{
if (AddressBox.Text.Length > 0 )
{
Address = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
if (ValueBox.Text.Length > 0)
Value = int.Parse(ValueBox.Text, NumberStyles.HexNumber);
else
Value = 0;
Encoding = true;
SNESEncodeGameGenie();
Encoding = false;
}
}
TryEnableAddCheat();
}
private void TryEnableAddCheat()
{
if (AddressBox.Text.Length == 6 && ValueBox.Text.Length == 2)
AddCheat.Enabled = true;
else
AddCheat.Enabled = false;
}
private void ValueBox_TextChanged(object sender, EventArgs e)
{
if (Decoding == false)
{
if (ValueBox.Text.Length > 0)
{
if (AddressBox.Text.Length > 0)
Address = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
else
Address = 0x000000;
Value = int.Parse(ValueBox.Text, NumberStyles.HexNumber);
Encoding = true;
SNESEncodeGameGenie();
Encoding = false;
}
}
TryEnableAddCheat();
}
private void SNESEncodeGameGenie()
{
//Code: D F 4 7 0 9 1 5 6 B C 8 A 2 3 E
//Hex: 0 1 2 3 4 5 6 7 8 9 A B C D E F
//Char # | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
//Bit # |3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|
//maps to| Value |i|j|k|l|q|r|s|t|o|p|a|b|c|d|u|v|w|x|e|f|g|h|m|n|
//order | Value |a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|
char[] letters = { 'D', 'F', '4', '7', '0', '9', '1', '5', '6', 'B', 'C', '8', 'A', '2', '3', 'E' };
GameGenieCode.Text = "";
int[] num = { 0, 0, 0, 0, 0, 0, 0, 0 };
num[0] = (Value & 0xF0) >>4;
num[1] = Value & 0x0F;
num[2] = (Address & 0x00F000) >> 12; //ijkl
num[3] = (Address & 0x0000F0) >> 4; //qrst
num[4] = ((Address & 0x000300) >> 6) | ((Address & 0xC00000) >> 22); //opab
num[5] = ((Address & 0x300000) >> 18) | ((Address & 0x00000C) >>2); //cduv
num[6] = ((Address & 0x000003) << 2)| ((Address & 0x0C0000) >> 18);//wxef
num[7] = ((Address & 0x030000) >> 14) | ((Address & 0x000C00) >> 10);//ghmn*/
for (int x = 0; x < 8; x++)
GameGenieCode.Text += letters[num[x]];
}
private void ClearButton_Click(object sender, EventArgs e)
{
ClearProperties();
GameGenieCode.Text = "";
}
private void AddCheat_Click(object sender, EventArgs e)
{
AddCheatClick();
}
private void AddCheatClick()
{
Cheat c = new Cheat {name = GameGenieCode.Text};
if (String.IsNullOrWhiteSpace(AddressBox.Text))
{
return;
}
else if (String.IsNullOrWhiteSpace(ValueBox.Text))
{
return;
}
c.address = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
c.value = byte.Parse(ValueBox.Text, NumberStyles.HexNumber);
c.compare = null;
c.domain = Global.Emulator.MemoryDomains[1]; //System Bus only
c.Enable();
Global.MainForm.Cheats1.AddCheat(c);
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Close();
}
private void saveWindowPositionToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.SNESGGSaveWindowPosition ^= true;
}
private void autoloadToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.SNESGGAutoload ^= true;
}
private void optionsToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
autoloadToolStripMenuItem.Checked = Global.Config.SNESGGAutoload;
saveWindowPositionToolStripMenuItem.Checked = Global.Config.SNESGGSaveWindowPosition;
}
private void GameGenieCode_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData == Keys.Enter)
{
if (AddCheat.Enabled)
{
AddCheatClick();
}
}
}
}
}

View File

@ -0,0 +1,123 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -1,33 +1,33 @@
namespace BizHawk.MultiClient
{
partial class ToolBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
partial class ToolBox
{
/// <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);
}
/// <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
#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()
{
/// <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(ToolBox));
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
@ -36,6 +36,7 @@
this.toolStripButton4 = new System.Windows.Forms.ToolStripButton();
this.HexEditor = new System.Windows.Forms.ToolStripButton();
this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton6 = new System.Windows.Forms.ToolStripButton();
this.TAStudioButton = new System.Windows.Forms.ToolStripButton();
this.NESDebugger = new System.Windows.Forms.ToolStripButton();
this.NESPPU = new System.Windows.Forms.ToolStripButton();
@ -44,7 +45,7 @@
this.KeypadTool = new System.Windows.Forms.ToolStripButton();
this.GameboyDebuggerTool = new System.Windows.Forms.ToolStripButton();
this.SNESGraphicsDebuggerButton = new System.Windows.Forms.ToolStripButton();
this.toolStripButton6 = new System.Windows.Forms.ToolStripButton();
this.SNESGameGenie = new System.Windows.Forms.ToolStripButton();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
@ -53,25 +54,26 @@
this.toolStrip1.BackColor = System.Drawing.SystemColors.Control;
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.toolStripButton2,
this.toolStripButton3,
this.toolStripButton4,
this.HexEditor,
this.toolStripButton5,
this.toolStripButton6,
this.TAStudioButton,
this.NESDebugger,
this.NESPPU,
this.NESNameTable,
this.NESGameGenie,
this.KeypadTool,
this.GameboyDebuggerTool,
this.SNESGraphicsDebuggerButton});
this.toolStripButton1,
this.toolStripButton2,
this.toolStripButton3,
this.toolStripButton4,
this.HexEditor,
this.toolStripButton5,
this.toolStripButton6,
this.TAStudioButton,
this.NESDebugger,
this.NESPPU,
this.NESNameTable,
this.NESGameGenie,
this.KeypadTool,
this.GameboyDebuggerTool,
this.SNESGraphicsDebuggerButton,
this.SNESGameGenie});
this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table;
this.toolStrip1.Location = new System.Drawing.Point(9, 11);
this.toolStrip1.Location = new System.Drawing.Point(12, 14);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(100, 348);
this.toolStrip1.Size = new System.Drawing.Size(123, 431);
this.toolStrip1.TabIndex = 0;
this.toolStrip1.TabStop = true;
//
@ -80,7 +82,7 @@
this.toolStripButton1.Image = global::BizHawk.MultiClient.Properties.Resources.Freeze;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(63, 20);
this.toolStripButton1.Size = new System.Drawing.Size(73, 24);
this.toolStripButton1.Text = "Cheats";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
@ -89,7 +91,7 @@
this.toolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.FindHS;
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(88, 20);
this.toolStripButton2.Size = new System.Drawing.Size(105, 24);
this.toolStripButton2.Text = "Ram Watch";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
//
@ -98,7 +100,7 @@
this.toolStripButton3.Image = global::BizHawk.MultiClient.Properties.Resources.search;
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton3.Name = "toolStripButton3";
this.toolStripButton3.Size = new System.Drawing.Size(89, 20);
this.toolStripButton3.Size = new System.Drawing.Size(107, 24);
this.toolStripButton3.Text = "Ram Search";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click);
//
@ -107,7 +109,7 @@
this.toolStripButton4.Image = global::BizHawk.MultiClient.Properties.Resources.poke;
this.toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton4.Name = "toolStripButton4";
this.toolStripButton4.Size = new System.Drawing.Size(80, 20);
this.toolStripButton4.Size = new System.Drawing.Size(95, 24);
this.toolStripButton4.Text = "Ram Poke";
this.toolStripButton4.Click += new System.EventHandler(this.toolStripButton4_Click);
//
@ -116,7 +118,7 @@
this.HexEditor.Image = global::BizHawk.MultiClient.Properties.Resources.poke;
this.HexEditor.ImageTransparentColor = System.Drawing.Color.Magenta;
this.HexEditor.Name = "HexEditor";
this.HexEditor.Size = new System.Drawing.Size(81, 20);
this.HexEditor.Size = new System.Drawing.Size(99, 24);
this.HexEditor.Text = "Hex Editor";
this.HexEditor.Click += new System.EventHandler(this.HexEditor_Click);
//
@ -125,16 +127,25 @@
this.toolStripButton5.Image = global::BizHawk.MultiClient.Properties.Resources.textdoc;
this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton5.Name = "toolStripButton5";
this.toolStripButton5.Size = new System.Drawing.Size(92, 20);
this.toolStripButton5.Size = new System.Drawing.Size(109, 24);
this.toolStripButton5.Text = "Lua Console";
this.toolStripButton5.Click += new System.EventHandler(this.toolStripButton5_Click);
//
// toolStripButton6
//
this.toolStripButton6.Image = global::BizHawk.MultiClient.Properties.Resources.TAStudio;
this.toolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton6.Name = "toolStripButton6";
this.toolStripButton6.Size = new System.Drawing.Size(90, 24);
this.toolStripButton6.Text = "TAStudio";
this.toolStripButton6.Click += new System.EventHandler(this.TAStudioButton_Click);
//
// TAStudioButton
//
this.TAStudioButton.Image = global::BizHawk.MultiClient.Properties.Resources.GameController;
this.TAStudioButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.TAStudioButton.Name = "TAStudioButton";
this.TAStudioButton.Size = new System.Drawing.Size(86, 20);
this.TAStudioButton.Size = new System.Drawing.Size(103, 24);
this.TAStudioButton.Text = "VirtualPads";
this.TAStudioButton.Click += new System.EventHandler(this.TAStudioButton_Click_1);
//
@ -143,7 +154,7 @@
this.NESDebugger.Image = global::BizHawk.MultiClient.Properties.Resources.NESControllerIcon;
this.NESDebugger.ImageTransparentColor = System.Drawing.Color.Magenta;
this.NESDebugger.Name = "NESDebugger";
this.NESDebugger.Size = new System.Drawing.Size(79, 20);
this.NESDebugger.Size = new System.Drawing.Size(96, 24);
this.NESDebugger.Text = "Debugger";
this.NESDebugger.Click += new System.EventHandler(this.NESDebugger_Click);
//
@ -152,7 +163,7 @@
this.NESPPU.Image = global::BizHawk.MultiClient.Properties.Resources.NESControllerIcon;
this.NESPPU.ImageTransparentColor = System.Drawing.Color.Magenta;
this.NESPPU.Name = "NESPPU";
this.NESPPU.Size = new System.Drawing.Size(49, 20);
this.NESPPU.Size = new System.Drawing.Size(55, 24);
this.NESPPU.Text = "PPU";
this.NESPPU.Click += new System.EventHandler(this.NESPPU_Click);
//
@ -161,7 +172,7 @@
this.NESNameTable.Image = global::BizHawk.MultiClient.Properties.Resources.NESControllerIcon;
this.NESNameTable.ImageTransparentColor = System.Drawing.Color.Magenta;
this.NESNameTable.Name = "NESNameTable";
this.NESNameTable.Size = new System.Drawing.Size(85, 20);
this.NESNameTable.Size = new System.Drawing.Size(103, 24);
this.NESNameTable.Text = "Nametable";
this.NESNameTable.Click += new System.EventHandler(this.NESNameTable_Click);
//
@ -170,7 +181,7 @@
this.NESGameGenie.Image = global::BizHawk.MultiClient.Properties.Resources.NESControllerIcon;
this.NESGameGenie.ImageTransparentColor = System.Drawing.Color.Magenta;
this.NESGameGenie.Name = "NESGameGenie";
this.NESGameGenie.Size = new System.Drawing.Size(91, 20);
this.NESGameGenie.Size = new System.Drawing.Size(110, 24);
this.NESGameGenie.Text = "Game Genie";
this.NESGameGenie.Click += new System.EventHandler(this.NESGameGenie_Click);
//
@ -179,7 +190,7 @@
this.KeypadTool.Image = global::BizHawk.MultiClient.Properties.Resources.calculator;
this.KeypadTool.ImageTransparentColor = System.Drawing.Color.Magenta;
this.KeypadTool.Name = "KeypadTool";
this.KeypadTool.Size = new System.Drawing.Size(66, 20);
this.KeypadTool.Size = new System.Drawing.Size(79, 24);
this.KeypadTool.Text = "Keypad";
this.KeypadTool.Click += new System.EventHandler(this.KeyPadTool_Click);
//
@ -193,27 +204,28 @@
this.SNESGraphicsDebuggerButton.Image = global::BizHawk.MultiClient.Properties.Resources.SNESControllerIcon;
this.SNESGraphicsDebuggerButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.SNESGraphicsDebuggerButton.Name = "SNESGraphicsDebuggerButton";
this.SNESGraphicsDebuggerButton.Size = new System.Drawing.Size(99, 20);
this.SNESGraphicsDebuggerButton.Size = new System.Drawing.Size(122, 24);
this.SNESGraphicsDebuggerButton.Text = "Gfx Debugger";
this.SNESGraphicsDebuggerButton.Click += new System.EventHandler(this.SNESGraphicsDebuggerButton_Click);
//
// toolStripButton6
// SNESGameGenie
//
this.toolStripButton6.Image = global::BizHawk.MultiClient.Properties.Resources.TAStudio;
this.toolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton6.Name = "toolStripButton6";
this.toolStripButton6.Size = new System.Drawing.Size(76, 20);
this.toolStripButton6.Text = "TAStudio";
this.toolStripButton6.Click += new System.EventHandler(this.TAStudioButton_Click);
this.SNESGameGenie.Image = global::BizHawk.MultiClient.Properties.Resources.SNESControllerIcon;
this.SNESGameGenie.ImageTransparentColor = System.Drawing.Color.Magenta;
this.SNESGameGenie.Name = "SNESGameGenie";
this.SNESGameGenie.Size = new System.Drawing.Size(110, 24);
this.SNESGameGenie.Text = "Game Genie";
this.SNESGameGenie.Click += new System.EventHandler(this.SNESGameGenie_Click);
//
// ToolBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(116, 338);
this.ClientSize = new System.Drawing.Size(213, 416);
this.Controls.Add(this.toolStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimumSize = new System.Drawing.Size(130, 64);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MinimumSize = new System.Drawing.Size(167, 68);
this.Name = "ToolBox";
this.Text = "Tool Box";
this.Load += new System.EventHandler(this.ToolBox_Load);
@ -222,26 +234,27 @@
this.ResumeLayout(false);
this.PerformLayout();
}
}
#endregion
#endregion
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.ToolStripButton toolStripButton2;
private System.Windows.Forms.ToolStripButton toolStripButton3;
private System.Windows.Forms.ToolStripButton toolStripButton4;
private System.Windows.Forms.ToolStripButton HexEditor;
private System.Windows.Forms.ToolStripButton toolStripButton5;
private System.Windows.Forms.ToolStripButton NESPPU;
private System.Windows.Forms.ToolStripButton NESDebugger;
private System.Windows.Forms.ToolStripButton NESGameGenie;
private System.Windows.Forms.ToolStripButton NESNameTable;
private System.Windows.Forms.ToolStripButton KeypadTool;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.ToolStripButton toolStripButton2;
private System.Windows.Forms.ToolStripButton toolStripButton3;
private System.Windows.Forms.ToolStripButton toolStripButton4;
private System.Windows.Forms.ToolStripButton HexEditor;
private System.Windows.Forms.ToolStripButton toolStripButton5;
private System.Windows.Forms.ToolStripButton NESPPU;
private System.Windows.Forms.ToolStripButton NESDebugger;
private System.Windows.Forms.ToolStripButton NESGameGenie;
private System.Windows.Forms.ToolStripButton NESNameTable;
private System.Windows.Forms.ToolStripButton KeypadTool;
private System.Windows.Forms.ToolStripButton TAStudioButton;
private System.Windows.Forms.ToolStripButton GameboyDebuggerTool;
private System.Windows.Forms.ToolStripButton SNESGraphicsDebuggerButton;
private System.Windows.Forms.ToolStripButton SNESGameGenie;
private System.Windows.Forms.ToolStripButton toolStripButton6;
}
}
}

View File

@ -56,10 +56,12 @@ namespace BizHawk.MultiClient
if (Global.Emulator is LibsnesCore)
{
SNESGraphicsDebuggerButton.Visible = true;
SNESGameGenie.Visible = true;
}
else
{
SNESGraphicsDebuggerButton.Visible = false;
SNESGameGenie.Visible = false;
}
Size = new Size(Size.Width, toolStrip1.Size.Height + 50);
@ -141,5 +143,10 @@ namespace BizHawk.MultiClient
{
Global.MainForm.LoadVirtualPads();
}
private void SNESGameGenie_Click(object sender, EventArgs e)
{
Global.MainForm.LoadGameGenieEC();
}
}
}