New Ram Search - some more progress on settings and displaying values

This commit is contained in:
adelikat 2013-09-20 01:18:55 +00:00
parent 657d858b99
commit dfaf8084e7
6 changed files with 422 additions and 133 deletions

View File

@ -71,10 +71,16 @@
this._1ByteMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._2ByteMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._4ByteMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.CheckMisalignedMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.DisplayTypeSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.BigEndianMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.CheckMisalignedMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.DefinePreviousValueSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.previousFrameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Previous_LastSearchMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Previous_LastChangeMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Previous_OriginalMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.newSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
@ -94,7 +100,7 @@
this.definePreviousValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sinceLastSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.originalValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sinceLastFrameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Previous_LastFrameMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sinceLastChangeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.fastModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.previewModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -381,9 +387,11 @@
this.modeToolStripMenuItem,
this.MemoryDomainsSubMenu,
this.sizeToolStripMenuItem,
this.CheckMisalignedMenuItem,
this.toolStripSeparator8,
this.DisplayTypeSubMenu,
this.BigEndianMenuItem,
this.CheckMisalignedMenuItem});
this.DefinePreviousValueSubMenu,
this.BigEndianMenuItem});
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.settingsToolStripMenuItem.Text = "&Settings";
@ -395,21 +403,21 @@
this.DetailedMenuItem,
this.FastMenuItem});
this.modeToolStripMenuItem.Name = "modeToolStripMenuItem";
this.modeToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
this.modeToolStripMenuItem.Size = new System.Drawing.Size(188, 22);
this.modeToolStripMenuItem.Text = "&Mode";
this.modeToolStripMenuItem.DropDownOpened += new System.EventHandler(this.ModeSubMenu_DropDownOpened);
//
// DetailedMenuItem
//
this.DetailedMenuItem.Name = "DetailedMenuItem";
this.DetailedMenuItem.Size = new System.Drawing.Size(152, 22);
this.DetailedMenuItem.Size = new System.Drawing.Size(117, 22);
this.DetailedMenuItem.Text = "&Detailed";
this.DetailedMenuItem.Click += new System.EventHandler(this.DetailedMenuItem_Click);
//
// FastMenuItem
//
this.FastMenuItem.Name = "FastMenuItem";
this.FastMenuItem.Size = new System.Drawing.Size(152, 22);
this.FastMenuItem.Size = new System.Drawing.Size(117, 22);
this.FastMenuItem.Text = "&Fast";
this.FastMenuItem.Click += new System.EventHandler(this.FastMenuItem_Click);
//
@ -418,7 +426,7 @@
this.MemoryDomainsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripSeparator6});
this.MemoryDomainsSubMenu.Name = "MemoryDomainsSubMenu";
this.MemoryDomainsSubMenu.Size = new System.Drawing.Size(173, 22);
this.MemoryDomainsSubMenu.Size = new System.Drawing.Size(188, 22);
this.MemoryDomainsSubMenu.Text = "&Memory Domains";
this.MemoryDomainsSubMenu.DropDownOpened += new System.EventHandler(this.MemoryDomainsSubMenu_DropDownOpened);
//
@ -434,58 +442,103 @@
this._2ByteMenuItem,
this._4ByteMenuItem});
this.sizeToolStripMenuItem.Name = "sizeToolStripMenuItem";
this.sizeToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
this.sizeToolStripMenuItem.Size = new System.Drawing.Size(188, 22);
this.sizeToolStripMenuItem.Text = "&Size";
this.sizeToolStripMenuItem.DropDownOpened += new System.EventHandler(this.SizeSubMenu_DropDownOpened);
//
// _1ByteMenuItem
//
this._1ByteMenuItem.Name = "_1ByteMenuItem";
this._1ByteMenuItem.Size = new System.Drawing.Size(152, 22);
this._1ByteMenuItem.Size = new System.Drawing.Size(106, 22);
this._1ByteMenuItem.Text = "&1 Byte";
this._1ByteMenuItem.Click += new System.EventHandler(this._1ByteMenuItem_Click);
//
// _2ByteMenuItem
//
this._2ByteMenuItem.Name = "_2ByteMenuItem";
this._2ByteMenuItem.Size = new System.Drawing.Size(152, 22);
this._2ByteMenuItem.Size = new System.Drawing.Size(106, 22);
this._2ByteMenuItem.Text = "&2 Byte";
this._2ByteMenuItem.Click += new System.EventHandler(this._2ByteMenuItem_Click);
//
// _4ByteMenuItem
//
this._4ByteMenuItem.Name = "_4ByteMenuItem";
this._4ByteMenuItem.Size = new System.Drawing.Size(152, 22);
this._4ByteMenuItem.Size = new System.Drawing.Size(106, 22);
this._4ByteMenuItem.Text = "&4 Byte";
this._4ByteMenuItem.Click += new System.EventHandler(this._4ByteMenuItem_Click);
//
// CheckMisalignedMenuItem
//
this.CheckMisalignedMenuItem.Name = "CheckMisalignedMenuItem";
this.CheckMisalignedMenuItem.Size = new System.Drawing.Size(188, 22);
this.CheckMisalignedMenuItem.Text = "Check Mis-aligned";
this.CheckMisalignedMenuItem.Click += new System.EventHandler(this.CheckMisalignedMenuItem_Click);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(185, 6);
//
// DisplayTypeSubMenu
//
this.DisplayTypeSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripSeparator1});
this.DisplayTypeSubMenu.Name = "DisplayTypeSubMenu";
this.DisplayTypeSubMenu.Size = new System.Drawing.Size(173, 22);
this.DisplayTypeSubMenu.Size = new System.Drawing.Size(188, 22);
this.DisplayTypeSubMenu.Text = "&Display Type";
this.DisplayTypeSubMenu.DropDownOpened += new System.EventHandler(this.DisplayTypeSubMenu_DropDownOpened);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(57, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
//
// BigEndianMenuItem
//
this.BigEndianMenuItem.Name = "BigEndianMenuItem";
this.BigEndianMenuItem.Size = new System.Drawing.Size(173, 22);
this.BigEndianMenuItem.Size = new System.Drawing.Size(188, 22);
this.BigEndianMenuItem.Text = "&Big Endian";
this.BigEndianMenuItem.Click += new System.EventHandler(this.BigEndianMenuItem_Click);
//
// CheckMisalignedMenuItem
// DefinePreviousValueSubMenu
//
this.CheckMisalignedMenuItem.Name = "CheckMisalignedMenuItem";
this.CheckMisalignedMenuItem.Size = new System.Drawing.Size(173, 22);
this.CheckMisalignedMenuItem.Text = "Check Mis-aligned";
this.CheckMisalignedMenuItem.Click += new System.EventHandler(this.CheckMisalignedMenuItem_Click);
this.DefinePreviousValueSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.previousFrameToolStripMenuItem,
this.Previous_LastSearchMenuItem,
this.Previous_LastChangeMenuItem,
this.Previous_OriginalMenuItem});
this.DefinePreviousValueSubMenu.Name = "DefinePreviousValueSubMenu";
this.DefinePreviousValueSubMenu.Size = new System.Drawing.Size(188, 22);
this.DefinePreviousValueSubMenu.Text = "Define Previous Value";
this.DefinePreviousValueSubMenu.DropDownOpened += new System.EventHandler(this.DefinePreviousValueSubMenu_DropDownOpened);
//
// previousFrameToolStripMenuItem
//
this.previousFrameToolStripMenuItem.Name = "previousFrameToolStripMenuItem";
this.previousFrameToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.previousFrameToolStripMenuItem.Text = "&Previous Frame";
this.previousFrameToolStripMenuItem.Click += new System.EventHandler(this.Previous_LastFrameMenuItem_Click);
//
// Previous_LastSearchMenuItem
//
this.Previous_LastSearchMenuItem.Name = "Previous_LastSearchMenuItem";
this.Previous_LastSearchMenuItem.Size = new System.Drawing.Size(155, 22);
this.Previous_LastSearchMenuItem.Text = "Last &Search";
this.Previous_LastSearchMenuItem.Click += new System.EventHandler(this.Previous_LastSearchMenuItem_Click);
//
// Previous_LastChangeMenuItem
//
this.Previous_LastChangeMenuItem.Name = "Previous_LastChangeMenuItem";
this.Previous_LastChangeMenuItem.Size = new System.Drawing.Size(155, 22);
this.Previous_LastChangeMenuItem.Text = "Last &Change";
this.Previous_LastChangeMenuItem.Click += new System.EventHandler(this.Previous_LastChangeMenuItem_Click);
//
// Previous_OriginalMenuItem
//
this.Previous_OriginalMenuItem.Name = "Previous_OriginalMenuItem";
this.Previous_OriginalMenuItem.Size = new System.Drawing.Size(155, 22);
this.Previous_OriginalMenuItem.Text = "&Original";
this.Previous_OriginalMenuItem.Click += new System.EventHandler(this.Previous_OriginalMenuItem_Click);
//
// searchToolStripMenuItem
//
@ -642,7 +695,7 @@
this.definePreviousValueToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.sinceLastSearchToolStripMenuItem,
this.originalValueToolStripMenuItem,
this.sinceLastFrameToolStripMenuItem,
this.Previous_LastFrameMenuItem,
this.sinceLastChangeToolStripMenuItem});
this.definePreviousValueToolStripMenuItem.Enabled = false;
this.definePreviousValueToolStripMenuItem.Name = "definePreviousValueToolStripMenuItem";
@ -663,12 +716,12 @@
this.originalValueToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
this.originalValueToolStripMenuItem.Text = "Original value";
//
// sinceLastFrameToolStripMenuItem
// Previous_LastFrameMenuItem
//
this.sinceLastFrameToolStripMenuItem.Enabled = false;
this.sinceLastFrameToolStripMenuItem.Name = "sinceLastFrameToolStripMenuItem";
this.sinceLastFrameToolStripMenuItem.Size = new System.Drawing.Size(167, 22);
this.sinceLastFrameToolStripMenuItem.Text = "Since last Frame";
this.Previous_LastFrameMenuItem.Enabled = false;
this.Previous_LastFrameMenuItem.Name = "Previous_LastFrameMenuItem";
this.Previous_LastFrameMenuItem.Size = new System.Drawing.Size(167, 22);
this.Previous_LastFrameMenuItem.Text = "Since last Frame";
//
// sinceLastChangeToolStripMenuItem
//
@ -818,7 +871,7 @@
private System.Windows.Forms.ToolStripMenuItem pokeAddressToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem definePreviousValueToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem sinceLastSearchToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem sinceLastFrameToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem Previous_LastFrameMenuItem;
private System.Windows.Forms.ToolStripMenuItem previewModeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem originalValueToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem TruncateFromFileToolStripMenuItem;
@ -867,5 +920,11 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem BigEndianMenuItem;
private System.Windows.Forms.ToolStripMenuItem CheckMisalignedMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripMenuItem DefinePreviousValueSubMenu;
private System.Windows.Forms.ToolStripMenuItem previousFrameToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem Previous_LastSearchMenuItem;
private System.Windows.Forms.ToolStripMenuItem Previous_LastChangeMenuItem;
private System.Windows.Forms.ToolStripMenuItem Previous_OriginalMenuItem;
}
}

View File

@ -101,8 +101,11 @@ namespace BizHawk.MultiClient
public void UpdateValues()
{
Searches.Update();
WatchListView.Refresh();
if (Searches.Count > 0)
{
Searches.Update();
WatchListView.Refresh();
}
}
public void Restart()
@ -116,6 +119,7 @@ namespace BizHawk.MultiClient
private void NewSearch()
{
Searches = new RamSearchEngine(Settings);
Searches.Start();
SetTotal();
WatchListView.ItemCount = Searches.Count;
@ -207,6 +211,7 @@ namespace BizHawk.MultiClient
private void DoDisplayTypeClick(Watch.DisplayType type)
{
Settings.Type = type;
Searches.SetType(type);
}
#endregion
@ -274,6 +279,31 @@ namespace BizHawk.MultiClient
}
}
private void DefinePreviousValueSubMenu_DropDownOpened(object sender, EventArgs e)
{
Previous_LastSearchMenuItem.Checked = false;
Previous_LastChangeMenuItem.Checked = false;
Previous_LastFrameMenuItem.Checked = false;
Previous_OriginalMenuItem.Checked = false;
switch (Settings.PreviousType)
{
default:
case Watch.PreviousType.LastSearch:
Previous_LastSearchMenuItem.Checked = true;
break;
case Watch.PreviousType.LastChange:
Previous_LastChangeMenuItem.Checked = true;
break;
case Watch.PreviousType.LastFrame:
Previous_LastFrameMenuItem.Checked = true;
break;
case Watch.PreviousType.Original:
Previous_OriginalMenuItem.Checked = true;
break;
}
}
private void DetailedMenuItem_Click(object sender, EventArgs e)
{
Settings.Mode = RamSearchEngine.Settings.SearchMode.Detailed;
@ -299,16 +329,41 @@ namespace BizHawk.MultiClient
Settings.Size = Watch.WatchSize.DWord;
}
private void BigEndianMenuItem_Click(object sender, EventArgs e)
{
Settings.BigEndian = BigEndianMenuItem.Checked;
}
private void CheckMisalignedMenuItem_Click(object sender, EventArgs e)
{
Settings.CheckMisAligned = CheckMisalignedMenuItem.Checked;
}
private void Previous_LastFrameMenuItem_Click(object sender, EventArgs e)
{
Settings.PreviousType = Watch.PreviousType.LastFrame;
Searches.SetPreviousType(Watch.PreviousType.LastFrame);
}
private void Previous_LastSearchMenuItem_Click(object sender, EventArgs e)
{
Settings.PreviousType = Watch.PreviousType.LastSearch;
Searches.SetPreviousType(Watch.PreviousType.LastSearch);
}
private void Previous_LastChangeMenuItem_Click(object sender, EventArgs e)
{
Settings.PreviousType = Watch.PreviousType.LastChange;
Searches.SetPreviousType(Watch.PreviousType.LastChange);
}
private void Previous_OriginalMenuItem_Click(object sender, EventArgs e)
{
Settings.PreviousType = Watch.PreviousType.Original;
Searches.SetPreviousType(Watch.PreviousType.Original);
}
private void BigEndianMenuItem_Click(object sender, EventArgs e)
{
Settings.BigEndian = BigEndianMenuItem.Checked;
Searches.SetEndian(BigEndianMenuItem.Checked);
}
/*************Search***********************/
private void SearchSubMenu_DropDownOpened(object sender, EventArgs e)
{

View File

@ -8,7 +8,7 @@ namespace BizHawk.MultiClient
{
class RamSearchEngine
{
private List<MiniWatch> _watchList = new List<MiniWatch>();
private List<IMiniWatch> _watchList = new List<IMiniWatch>();
private Settings _settings;
#region Constructors
@ -29,21 +29,51 @@ namespace BizHawk.MultiClient
{
default:
case Watch.WatchSize.Byte:
for (int i = 0; i < _settings.Domain.Size; i++)
if (_settings.Mode == Settings.SearchMode.Detailed)
{
_watchList.Add(new MiniByteWatch(_settings.Domain, i));
for (int i = 0; i < _settings.Domain.Size; i++)
{
_watchList.Add(new MiniByteWatchDetailed(_settings.Domain, i));
}
}
else
{
for (int i = 0; i < _settings.Domain.Size; i++)
{
_watchList.Add(new MiniByteWatch(_settings.Domain, i));
}
}
break;
case Watch.WatchSize.Word:
for (int i = 0; i < _settings.Domain.Size; i += (_settings.CheckMisAligned ? 1 : 2))
if (_settings.Mode == Settings.SearchMode.Detailed)
{
_watchList.Add(new MiniWordWatch(_settings.Domain, i, _settings.BigEndian));
for (int i = 0; i < _settings.Domain.Size; i += (_settings.CheckMisAligned ? 1 : 2))
{
_watchList.Add(new MiniWordWatchDetailed(_settings.Domain, i, _settings.BigEndian));
}
}
else
{
for (int i = 0; i < _settings.Domain.Size; i += (_settings.CheckMisAligned ? 1 : 2))
{
_watchList.Add(new MiniWordWatch(_settings.Domain, i, _settings.BigEndian));
}
}
break;
case Watch.WatchSize.DWord:
for (int i = 0; i < _settings.Domain.Size; i += (_settings.CheckMisAligned ? 1 : 4))
if (_settings.Mode == Settings.SearchMode.Detailed)
{
_watchList.Add(new MiniDWordWatch(_settings.Domain, i, _settings.BigEndian));
for (int i = 0; i < _settings.Domain.Size; i += (_settings.CheckMisAligned ? 1 : 4))
{
_watchList.Add(new MiniDWordWatchDetailed(_settings.Domain, i, _settings.BigEndian));
}
}
else
{
for (int i = 0; i < _settings.Domain.Size; i += (_settings.CheckMisAligned ? 1 : 4))
{
_watchList.Add(new MiniDWordWatch(_settings.Domain, i, _settings.BigEndian));
}
}
break;
}
@ -56,15 +86,30 @@ namespace BizHawk.MultiClient
{
get
{
//TODO: must set prev value, change count, and display type!
return Watch.GenerateWatch(
_settings.Domain,
_watchList[index].Address,
_settings.Size,
_settings.Type,
_settings.BigEndian,
_watchList[index].Value,
_watchList[index].Value /*TODO*/);
if (_settings.Mode == Settings.SearchMode.Detailed)
{
return Watch.GenerateWatch(
_settings.Domain,
_watchList[index].Address,
_settings.Size,
_settings.Type,
_settings.BigEndian,
_watchList[index].Previous,
(_watchList[index] as IMiniWatchDetails).ChangeCount
);
}
else
{
return Watch.GenerateWatch(
_settings.Domain,
_watchList[index].Address,
_settings.Size,
_settings.Type,
_settings.BigEndian,
_watchList[index].Previous,
0
);
}
}
}
@ -83,7 +128,17 @@ namespace BizHawk.MultiClient
public void Update()
{
//TODO
if (_settings.Mode == Settings.SearchMode.Detailed)
{
foreach (IWatchDetails watch in _watchList)
{
watch.Update();
}
}
else
{
/*TODO*/
}
}
public void SetType(Watch.DisplayType type)
@ -103,6 +158,11 @@ namespace BizHawk.MultiClient
_settings.BigEndian = bigendian;
}
public void SetPreviousType(Watch.PreviousType type)
{
_settings.PreviousType = type;
}
#endregion
#region Comparisons
@ -137,58 +197,65 @@ namespace BizHawk.MultiClient
#endregion
#region Classes
private interface MiniWatch
private interface IMiniWatch
{
int Address { get; }
int Value { get; }
int Previous { get; }
}
private class MiniByteWatch : MiniWatch
private interface IMiniWatchDetails
{
int ChangeCount { get; }
void Update();
}
private class MiniByteWatch : IMiniWatch
{
public int Address { get; private set; }
private byte val;
private byte _previous;
public MiniByteWatch(MemoryDomain domain, int addr)
{
Address = addr;
val = domain.PeekByte(addr);
_previous = domain.PeekByte(addr);
}
public int Value
public int Previous
{
get { return val; }
get { return _previous; }
}
}
private class MiniWordWatch : MiniWatch
private class MiniWordWatch : IMiniWatch
{
public int Address { get; private set; }
private ushort val;
private ushort _previous;
public MiniWordWatch(MemoryDomain domain, int addr, bool bigEndian)
{
Address = addr;
if (bigEndian)
{
val = (ushort)((domain.PeekByte(addr) << 8) | (domain.PeekByte(addr + 1)));
_previous = (ushort)((domain.PeekByte(addr) << 8) | (domain.PeekByte(addr + 1)));
}
else
{
val = (ushort)((domain.PeekByte(addr)) | (domain.PeekByte(addr + 1) << 8));
_previous = (ushort)((domain.PeekByte(addr)) | (domain.PeekByte(addr + 1) << 8));
}
}
public int Value
public int Previous
{
get { return val; }
get { return _previous; }
}
}
public class MiniDWordWatch : MiniWatch
public class MiniDWordWatch : IMiniWatch
{
public int Address { get; private set; }
private uint val;
private uint _previous;
public MiniDWordWatch(MemoryDomain domain, int addr, bool bigEndian)
{
@ -196,23 +263,128 @@ namespace BizHawk.MultiClient
if (bigEndian)
{
val = (uint)((domain.PeekByte(addr) << 24)
_previous = (uint)((domain.PeekByte(addr) << 24)
| (domain.PeekByte(addr + 1) << 16)
| (domain.PeekByte(addr + 2) << 8)
| (domain.PeekByte(addr + 3) << 0));
}
else
{
val = (uint)((domain.PeekByte(addr) << 0)
_previous = (uint)((domain.PeekByte(addr) << 0)
| (domain.PeekByte(addr + 1) << 8)
| (domain.PeekByte(addr + 2) << 16)
| (domain.PeekByte(addr + 3) << 24));
}
}
public int Value
public int Previous
{
get { return (int) val; }
get { return (int) _previous; }
}
}
private class MiniByteWatchDetailed : IMiniWatch, IMiniWatchDetails
{
public int Address { get; private set; }
private byte _previous;
int _changecount = 0;
public MiniByteWatchDetailed(MemoryDomain domain, int addr)
{
Address = addr;
_previous = domain.PeekByte(addr);
}
public int Previous
{
get { return _previous; }
}
public int ChangeCount
{
get { return _changecount; }
}
public void Update()
{
/*TODO*/
}
}
private class MiniWordWatchDetailed : IMiniWatch, IMiniWatchDetails
{
public int Address { get; private set; }
private ushort _previous;
int _changecount = 0;
public MiniWordWatchDetailed(MemoryDomain domain, int addr, bool bigEndian)
{
Address = addr;
if (bigEndian)
{
_previous = (ushort)((domain.PeekByte(addr) << 8) | (domain.PeekByte(addr + 1)));
}
else
{
_previous = (ushort)((domain.PeekByte(addr)) | (domain.PeekByte(addr + 1) << 8));
}
}
public int Previous
{
get { return _previous; }
}
public int ChangeCount
{
get { return _changecount; }
}
public void Update()
{
/*TODO*/
}
}
public class MiniDWordWatchDetailed : IMiniWatch, IMiniWatchDetails
{
public int Address { get; private set; }
private uint _previous;
int _changecount = 0;
public MiniDWordWatchDetailed(MemoryDomain domain, int addr, bool bigEndian)
{
Address = addr;
if (bigEndian)
{
_previous = (uint)((domain.PeekByte(addr) << 24)
| (domain.PeekByte(addr + 1) << 16)
| (domain.PeekByte(addr + 2) << 8)
| (domain.PeekByte(addr + 3) << 0));
}
else
{
_previous = (uint)((domain.PeekByte(addr) << 0)
| (domain.PeekByte(addr + 1) << 8)
| (domain.PeekByte(addr + 2) << 16)
| (domain.PeekByte(addr + 3) << 24));
}
}
public int Previous
{
get { return (int)_previous; }
}
public int ChangeCount
{
get { return _changecount; }
}
public void Update()
{
/*TODO*/
}
}
@ -220,6 +392,7 @@ namespace BizHawk.MultiClient
{
/*Require restart*/
public enum SearchMode { Fast, Detailed }
public SearchMode Mode = SearchMode.Detailed;
public MemoryDomain Domain = Global.Emulator.MainMemory;
public Watch.WatchSize Size = Watch.WatchSize.Byte;
@ -228,7 +401,9 @@ namespace BizHawk.MultiClient
/*Can be changed mid-search*/
public Watch.DisplayType Type = Watch.DisplayType.Unsigned;
public bool BigEndian = false;
public Watch.PreviousType PreviousType = Watch.PreviousType.LastSearch;
}
#endregion
}
}

View File

@ -169,7 +169,7 @@
this.ShowDiffContextMenuItem,
this.ShowDomainContextMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(191, 324);
this.contextMenuStrip1.Size = new System.Drawing.Size(204, 324);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
//
// EditContextMenuItem
@ -177,7 +177,7 @@
this.EditContextMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.CutHS;
this.EditContextMenuItem.Name = "EditContextMenuItem";
this.EditContextMenuItem.ShortcutKeyDisplayString = "Ctrl+E";
this.EditContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.EditContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.EditContextMenuItem.Text = "&Edit";
this.EditContextMenuItem.Click += new System.EventHandler(this.editWatchToolStripMenuItem_Click);
//
@ -186,7 +186,7 @@
this.RemoveContextMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.RemoveContextMenuItem.Name = "RemoveContextMenuItem";
this.RemoveContextMenuItem.ShortcutKeyDisplayString = "Ctrl+R";
this.RemoveContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.RemoveContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.RemoveContextMenuItem.Text = "&Remove";
this.RemoveContextMenuItem.Click += new System.EventHandler(this.removeWatchToolStripMenuItem_Click);
//
@ -195,7 +195,7 @@
this.DuplicateContextMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Duplicate;
this.DuplicateContextMenuItem.Name = "DuplicateContextMenuItem";
this.DuplicateContextMenuItem.ShortcutKeyDisplayString = "Ctrl+D";
this.DuplicateContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.DuplicateContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.DuplicateContextMenuItem.Text = "&Duplicate";
this.DuplicateContextMenuItem.Click += new System.EventHandler(this.duplicateWatchToolStripMenuItem_Click);
//
@ -204,7 +204,7 @@
this.PokeContextMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.poke;
this.PokeContextMenuItem.Name = "PokeContextMenuItem";
this.PokeContextMenuItem.ShortcutKeyDisplayString = "Ctrl+P";
this.PokeContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.PokeContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.PokeContextMenuItem.Text = "&Poke";
this.PokeContextMenuItem.Click += new System.EventHandler(this.pokeAddressToolStripMenuItem_Click);
//
@ -213,7 +213,7 @@
this.FreezeContextMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Freeze;
this.FreezeContextMenuItem.Name = "FreezeContextMenuItem";
this.FreezeContextMenuItem.ShortcutKeyDisplayString = "Ctrl+F";
this.FreezeContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.FreezeContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.FreezeContextMenuItem.Text = "&Freeze";
this.FreezeContextMenuItem.Click += new System.EventHandler(this.freezeAddressToolStripMenuItem_Click);
//
@ -221,28 +221,28 @@
//
this.UnfreezeAllContextMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Unfreeze;
this.UnfreezeAllContextMenuItem.Name = "UnfreezeAllContextMenuItem";
this.UnfreezeAllContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.UnfreezeAllContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.UnfreezeAllContextMenuItem.Text = "Unfreeze &All";
this.UnfreezeAllContextMenuItem.Click += new System.EventHandler(this.UnfreezeAllContextMenuItem_Click);
//
// ViewInHexEditorContextMenuItem
//
this.ViewInHexEditorContextMenuItem.Name = "ViewInHexEditorContextMenuItem";
this.ViewInHexEditorContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.ViewInHexEditorContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.ViewInHexEditorContextMenuItem.Text = "View in Hex Editor";
this.ViewInHexEditorContextMenuItem.Click += new System.EventHandler(this.ViewInHexEditorContextMenuItem_Click);
//
// Separator6
//
this.Separator6.Name = "Separator6";
this.Separator6.Size = new System.Drawing.Size(187, 6);
this.Separator6.Size = new System.Drawing.Size(200, 6);
//
// InsertSeperatorContextMenuItem
//
this.InsertSeperatorContextMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InsertSeparator;
this.InsertSeperatorContextMenuItem.Name = "InsertSeperatorContextMenuItem";
this.InsertSeperatorContextMenuItem.ShortcutKeyDisplayString = "Ctrl+I";
this.InsertSeperatorContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.InsertSeperatorContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.InsertSeperatorContextMenuItem.Text = "&Insert Separator";
this.InsertSeperatorContextMenuItem.Click += new System.EventHandler(this.insertSeparatorToolStripMenuItem_Click);
//
@ -251,7 +251,7 @@
this.MoveUpContextMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveUp;
this.MoveUpContextMenuItem.Name = "MoveUpContextMenuItem";
this.MoveUpContextMenuItem.ShortcutKeyDisplayString = "Ctrl+Up";
this.MoveUpContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.MoveUpContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.MoveUpContextMenuItem.Text = "Move &Up";
this.MoveUpContextMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click);
//
@ -260,40 +260,40 @@
this.MoveDownContextMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveDown;
this.MoveDownContextMenuItem.Name = "MoveDownContextMenuItem";
this.MoveDownContextMenuItem.ShortcutKeyDisplayString = "Ctrl+Down";
this.MoveDownContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.MoveDownContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.MoveDownContextMenuItem.Text = "Move &Down";
this.MoveDownContextMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(187, 6);
this.toolStripSeparator4.Size = new System.Drawing.Size(200, 6);
//
// ShowPreviousValueContextMenuItem
//
this.ShowPreviousValueContextMenuItem.Name = "ShowPreviousValueContextMenuItem";
this.ShowPreviousValueContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.ShowPreviousValueContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.ShowPreviousValueContextMenuItem.Text = "Show Previous Value";
this.ShowPreviousValueContextMenuItem.Click += new System.EventHandler(this.showPreviousValueToolStripMenuItem_Click);
//
// ShowChangeCountsContextMenuItem
//
this.ShowChangeCountsContextMenuItem.Name = "ShowChangeCountsContextMenuItem";
this.ShowChangeCountsContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.ShowChangeCountsContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.ShowChangeCountsContextMenuItem.Text = "Show Change Counts";
this.ShowChangeCountsContextMenuItem.Click += new System.EventHandler(this.showChangeCountsToolStripMenuItem_Click);
//
// ShowDiffContextMenuItem
//
this.ShowDiffContextMenuItem.Name = "ShowDiffContextMenuItem";
this.ShowDiffContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.ShowDiffContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.ShowDiffContextMenuItem.Text = "Show Difference";
this.ShowDiffContextMenuItem.Click += new System.EventHandler(this.diffToolStripMenuItem_Click);
//
// ShowDomainContextMenuItem
//
this.ShowDomainContextMenuItem.Name = "ShowDomainContextMenuItem";
this.ShowDomainContextMenuItem.Size = new System.Drawing.Size(190, 22);
this.ShowDomainContextMenuItem.Size = new System.Drawing.Size(203, 22);
this.ShowDomainContextMenuItem.Text = "Show Domain";
this.ShowDomainContextMenuItem.Click += new System.EventHandler(this.domainToolStripMenuItem_Click);
//
@ -494,7 +494,7 @@
this.toolStripSeparator1,
this.exitToolStripMenuItem});
this.filesToolStripMenuItem.Name = "filesToolStripMenuItem";
this.filesToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
this.filesToolStripMenuItem.Size = new System.Drawing.Size(42, 20);
this.filesToolStripMenuItem.Text = "&Files";
this.filesToolStripMenuItem.DropDownOpened += new System.EventHandler(this.filesToolStripMenuItem_DropDownOpened);
//
@ -503,7 +503,7 @@
this.newListToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.NewFile;
this.newListToolStripMenuItem.Name = "newListToolStripMenuItem";
this.newListToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.newListToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
this.newListToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
this.newListToolStripMenuItem.Text = "&New List";
this.newListToolStripMenuItem.Click += new System.EventHandler(this.newListToolStripMenuItem_Click);
//
@ -512,7 +512,7 @@
this.openToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.OpenFile;
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.openToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
this.openToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
this.openToolStripMenuItem.Text = "&Open...";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
@ -521,7 +521,7 @@
this.saveToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.SaveAs;
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.saveToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
this.saveToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
this.saveToolStripMenuItem.Text = "&Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
@ -530,14 +530,14 @@
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
this.saveAsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.S)));
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
this.saveAsToolStripMenuItem.Text = "Save &As...";
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
//
// appendFileToolStripMenuItem
//
this.appendFileToolStripMenuItem.Name = "appendFileToolStripMenuItem";
this.appendFileToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
this.appendFileToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
this.appendFileToolStripMenuItem.Text = "A&ppend File...";
this.appendFileToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
@ -547,26 +547,26 @@
this.noneToolStripMenuItem});
this.recentToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Recent;
this.recentToolStripMenuItem.Name = "recentToolStripMenuItem";
this.recentToolStripMenuItem.Size = new System.Drawing.Size(193, 22);
this.recentToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
this.recentToolStripMenuItem.Text = "Recent";
this.recentToolStripMenuItem.DropDownOpened += new System.EventHandler(this.recentToolStripMenuItem_DropDownOpened);
//
// noneToolStripMenuItem
//
this.noneToolStripMenuItem.Name = "noneToolStripMenuItem";
this.noneToolStripMenuItem.Size = new System.Drawing.Size(99, 22);
this.noneToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.noneToolStripMenuItem.Text = "None";
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(190, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(192, 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(193, 22);
this.exitToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
this.exitToolStripMenuItem.Text = "&Close";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@ -588,7 +588,7 @@
this.moveDownToolStripMenuItem,
this.selectAllToolStripMenuItem});
this.watchesToolStripMenuItem.Name = "watchesToolStripMenuItem";
this.watchesToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.watchesToolStripMenuItem.Size = new System.Drawing.Size(64, 20);
this.watchesToolStripMenuItem.Text = "&Watches";
this.watchesToolStripMenuItem.DropDownOpened += new System.EventHandler(this.watchesToolStripMenuItem_DropDownOpened);
//
@ -597,7 +597,7 @@
this.memoryDomainsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.Separator2});
this.memoryDomainsToolStripMenuItem.Name = "memoryDomainsToolStripMenuItem";
this.memoryDomainsToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.memoryDomainsToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.memoryDomainsToolStripMenuItem.Text = "Memory Domains";
this.memoryDomainsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.memoryDomainsToolStripMenuItem_DropDownOpened);
//
@ -609,14 +609,14 @@
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(208, 6);
this.toolStripSeparator8.Size = new System.Drawing.Size(221, 6);
//
// newWatchToolStripMenuItem
//
this.newWatchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.FindHS;
this.newWatchToolStripMenuItem.Name = "newWatchToolStripMenuItem";
this.newWatchToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));
this.newWatchToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.newWatchToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.newWatchToolStripMenuItem.Text = "&New Watch";
this.newWatchToolStripMenuItem.Click += new System.EventHandler(this.newWatchToolStripMenuItem_Click);
//
@ -625,7 +625,7 @@
this.editWatchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.CutHS;
this.editWatchToolStripMenuItem.Name = "editWatchToolStripMenuItem";
this.editWatchToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
this.editWatchToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.editWatchToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.editWatchToolStripMenuItem.Text = "&Edit Watch";
this.editWatchToolStripMenuItem.Click += new System.EventHandler(this.editWatchToolStripMenuItem_Click);
//
@ -634,7 +634,7 @@
this.removeWatchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Delete;
this.removeWatchToolStripMenuItem.Name = "removeWatchToolStripMenuItem";
this.removeWatchToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
this.removeWatchToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.removeWatchToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.removeWatchToolStripMenuItem.Text = "&Remove Watch";
this.removeWatchToolStripMenuItem.Click += new System.EventHandler(this.removeWatchToolStripMenuItem_Click);
//
@ -643,7 +643,7 @@
this.duplicateWatchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Duplicate;
this.duplicateWatchToolStripMenuItem.Name = "duplicateWatchToolStripMenuItem";
this.duplicateWatchToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
this.duplicateWatchToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.duplicateWatchToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.duplicateWatchToolStripMenuItem.Text = "&Duplicate Watch";
this.duplicateWatchToolStripMenuItem.Click += new System.EventHandler(this.duplicateWatchToolStripMenuItem_Click);
//
@ -652,7 +652,7 @@
this.pokeAddressToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.poke;
this.pokeAddressToolStripMenuItem.Name = "pokeAddressToolStripMenuItem";
this.pokeAddressToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.P)));
this.pokeAddressToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.pokeAddressToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.pokeAddressToolStripMenuItem.Text = "Poke Address";
this.pokeAddressToolStripMenuItem.Click += new System.EventHandler(this.pokeAddressToolStripMenuItem_Click);
//
@ -661,7 +661,7 @@
this.freezeAddressToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Freeze;
this.freezeAddressToolStripMenuItem.Name = "freezeAddressToolStripMenuItem";
this.freezeAddressToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
this.freezeAddressToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.freezeAddressToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.freezeAddressToolStripMenuItem.Text = "Freeze Address";
this.freezeAddressToolStripMenuItem.Click += new System.EventHandler(this.freezeAddressToolStripMenuItem_Click);
//
@ -670,7 +670,7 @@
this.insertSeparatorToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.InsertSeparator;
this.insertSeparatorToolStripMenuItem.Name = "insertSeparatorToolStripMenuItem";
this.insertSeparatorToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
this.insertSeparatorToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.insertSeparatorToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.insertSeparatorToolStripMenuItem.Text = "Insert Separator";
this.insertSeparatorToolStripMenuItem.Click += new System.EventHandler(this.insertSeparatorToolStripMenuItem_Click);
//
@ -678,21 +678,21 @@
//
this.clearChangeCountsToolStripMenuItem.Name = "clearChangeCountsToolStripMenuItem";
this.clearChangeCountsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.C)));
this.clearChangeCountsToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.clearChangeCountsToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.clearChangeCountsToolStripMenuItem.Text = "&Clear Change Counts";
this.clearChangeCountsToolStripMenuItem.Click += new System.EventHandler(this.clearChangeCountsToolStripMenuItem_Click);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(208, 6);
this.toolStripSeparator3.Size = new System.Drawing.Size(221, 6);
//
// moveUpToolStripMenuItem
//
this.moveUpToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveUp;
this.moveUpToolStripMenuItem.Name = "moveUpToolStripMenuItem";
this.moveUpToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Up)));
this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.moveUpToolStripMenuItem.Text = "Move &Up";
this.moveUpToolStripMenuItem.Click += new System.EventHandler(this.moveUpToolStripMenuItem_Click);
//
@ -701,7 +701,7 @@
this.moveDownToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.MoveDown;
this.moveDownToolStripMenuItem.Name = "moveDownToolStripMenuItem";
this.moveDownToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Down)));
this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.moveDownToolStripMenuItem.Text = "Move &Down";
this.moveDownToolStripMenuItem.Click += new System.EventHandler(this.moveDownToolStripMenuItem_Click);
//
@ -709,7 +709,7 @@
//
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(224, 22);
this.selectAllToolStripMenuItem.Text = "Select &All";
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
//
@ -721,14 +721,14 @@
this.diffToolStripMenuItem,
this.domainToolStripMenuItem});
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
this.viewToolStripMenuItem.Size = new System.Drawing.Size(41, 20);
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.viewToolStripMenuItem.Text = "&View";
this.viewToolStripMenuItem.DropDownOpened += new System.EventHandler(this.viewToolStripMenuItem_DropDownOpened);
//
// showPreviousValueToolStripMenuItem
//
this.showPreviousValueToolStripMenuItem.Name = "showPreviousValueToolStripMenuItem";
this.showPreviousValueToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.showPreviousValueToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
this.showPreviousValueToolStripMenuItem.Text = "Previous Value";
this.showPreviousValueToolStripMenuItem.Click += new System.EventHandler(this.showPreviousValueToolStripMenuItem_Click);
//
@ -737,21 +737,21 @@
this.showChangeCountsToolStripMenuItem.Checked = true;
this.showChangeCountsToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.showChangeCountsToolStripMenuItem.Name = "showChangeCountsToolStripMenuItem";
this.showChangeCountsToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.showChangeCountsToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
this.showChangeCountsToolStripMenuItem.Text = "Change Counts";
this.showChangeCountsToolStripMenuItem.Click += new System.EventHandler(this.showChangeCountsToolStripMenuItem_Click);
//
// diffToolStripMenuItem
//
this.diffToolStripMenuItem.Name = "diffToolStripMenuItem";
this.diffToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.diffToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
this.diffToolStripMenuItem.Text = "Difference";
this.diffToolStripMenuItem.Click += new System.EventHandler(this.diffToolStripMenuItem_Click);
//
// domainToolStripMenuItem
//
this.domainToolStripMenuItem.Name = "domainToolStripMenuItem";
this.domainToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.domainToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
this.domainToolStripMenuItem.Text = "Domain";
this.domainToolStripMenuItem.Click += new System.EventHandler(this.domainToolStripMenuItem_Click);
//
@ -764,7 +764,7 @@
this.toolStripSeparator7,
this.restoreWindowSizeToolStripMenuItem});
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.optionsToolStripMenuItem.Text = "&Options";
this.optionsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.optionsToolStripMenuItem_DropDownOpened);
//
@ -775,54 +775,54 @@
this.lastChangeToolStripMenuItem,
this.originalToolStripMenuItem});
this.definePreviousValueAsToolStripMenuItem.Name = "definePreviousValueAsToolStripMenuItem";
this.definePreviousValueAsToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
this.definePreviousValueAsToolStripMenuItem.Text = "Define Previous Value As";
this.definePreviousValueAsToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
this.definePreviousValueAsToolStripMenuItem.Text = "Define Previous Value";
this.definePreviousValueAsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.definePreviousValueAsToolStripMenuItem_DropDownOpened);
//
// previousFrameToolStripMenuItem
//
this.previousFrameToolStripMenuItem.Name = "previousFrameToolStripMenuItem";
this.previousFrameToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.previousFrameToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.previousFrameToolStripMenuItem.Text = "Previous Frame";
this.previousFrameToolStripMenuItem.Click += new System.EventHandler(this.previousFrameToolStripMenuItem_Click);
//
// lastChangeToolStripMenuItem
//
this.lastChangeToolStripMenuItem.Name = "lastChangeToolStripMenuItem";
this.lastChangeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.lastChangeToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.lastChangeToolStripMenuItem.Text = "Last Change";
this.lastChangeToolStripMenuItem.Click += new System.EventHandler(this.lastChangeToolStripMenuItem_Click);
//
// originalToolStripMenuItem
//
this.originalToolStripMenuItem.Name = "originalToolStripMenuItem";
this.originalToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.originalToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.originalToolStripMenuItem.Text = "&Original";
this.originalToolStripMenuItem.Click += new System.EventHandler(this.originalToolStripMenuItem_Click);
//
// displayWatchesOnScreenToolStripMenuItem
//
this.displayWatchesOnScreenToolStripMenuItem.Name = "displayWatchesOnScreenToolStripMenuItem";
this.displayWatchesOnScreenToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
this.displayWatchesOnScreenToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
this.displayWatchesOnScreenToolStripMenuItem.Text = "Display Watches On Screen";
this.displayWatchesOnScreenToolStripMenuItem.Click += new System.EventHandler(this.displayWatchesOnScreenToolStripMenuItem_Click);
//
// saveWindowPositionToolStripMenuItem
//
this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem";
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position";
this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(203, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(214, 6);
//
// restoreWindowSizeToolStripMenuItem
//
this.restoreWindowSizeToolStripMenuItem.Name = "restoreWindowSizeToolStripMenuItem";
this.restoreWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(206, 22);
this.restoreWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(217, 22);
this.restoreWindowSizeToolStripMenuItem.Text = "Restore Default Settings";
this.restoreWindowSizeToolStripMenuItem.Click += new System.EventHandler(this.restoreWindowSizeToolStripMenuItem_Click);
//

View File

@ -1003,7 +1003,7 @@ namespace BizHawk.MultiClient
case Watch.PreviousType.LastChange:
lastChangeToolStripMenuItem.Checked = true;
break;
case Watch.PreviousType.OriginalValue:
case Watch.PreviousType.Original:
originalToolStripMenuItem.Checked = true;
break;
}
@ -1021,7 +1021,7 @@ namespace BizHawk.MultiClient
private void originalToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.RamWatchDefinePrevious = Watch.PreviousType.OriginalValue;
Global.Config.RamWatchDefinePrevious = Watch.PreviousType.Original;
}
private void displayWatchesOnScreenToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -8,7 +8,7 @@ namespace BizHawk.MultiClient
{
public enum WatchSize { Byte = 1, Word = 2, DWord = 4, Separator = 0 };
public enum DisplayType { Separator, Signed, Unsigned, Hex, Binary, FixedPoint_12_4, FixedPoint_20_12, Float };
public enum PreviousType { OriginalValue = 0, LastSearch = 1, LastFrame = 2, LastChange = 3 };
public enum PreviousType { Original = 0, LastSearch = 1, LastFrame = 2, LastChange = 3 };
public static string DisplayTypeToString(DisplayType type)
{
@ -606,7 +606,7 @@ namespace BizHawk.MultiClient
switch (Global.Config.RamWatchDefinePrevious)
{
case PreviousType.LastSearch: //TODO
case PreviousType.OriginalValue:
case PreviousType.Original:
/*Do Nothing*/
break;
case PreviousType.LastChange:
@ -813,7 +813,7 @@ namespace BizHawk.MultiClient
switch (Global.Config.RamWatchDefinePrevious)
{
case PreviousType.LastSearch: //TODO
case PreviousType.OriginalValue:
case PreviousType.Original:
/*Do Nothing*/
break;
case PreviousType.LastChange:
@ -1022,7 +1022,7 @@ namespace BizHawk.MultiClient
switch (Global.Config.RamWatchDefinePrevious)
{
case PreviousType.LastSearch: //TODO
case PreviousType.OriginalValue:
case PreviousType.Original:
/*Do Nothing*/
break;
case PreviousType.LastChange: