Ram Search - misc fix ups
This commit is contained in:
parent
7430a35806
commit
9c625df425
|
@ -660,6 +660,7 @@
|
||||||
// ModuloRadio
|
// ModuloRadio
|
||||||
//
|
//
|
||||||
this.ModuloRadio.AutoSize = true;
|
this.ModuloRadio.AutoSize = true;
|
||||||
|
this.ModuloRadio.Enabled = false;
|
||||||
this.ModuloRadio.Location = new System.Drawing.Point(7, 153);
|
this.ModuloRadio.Location = new System.Drawing.Point(7, 153);
|
||||||
this.ModuloRadio.Name = "ModuloRadio";
|
this.ModuloRadio.Name = "ModuloRadio";
|
||||||
this.ModuloRadio.Size = new System.Drawing.Size(60, 17);
|
this.ModuloRadio.Size = new System.Drawing.Size(60, 17);
|
||||||
|
@ -672,6 +673,7 @@
|
||||||
// DifferentByRadio
|
// DifferentByRadio
|
||||||
//
|
//
|
||||||
this.DifferentByRadio.AutoSize = true;
|
this.DifferentByRadio.AutoSize = true;
|
||||||
|
this.DifferentByRadio.Enabled = false;
|
||||||
this.DifferentByRadio.Location = new System.Drawing.Point(7, 134);
|
this.DifferentByRadio.Location = new System.Drawing.Point(7, 134);
|
||||||
this.DifferentByRadio.Name = "DifferentByRadio";
|
this.DifferentByRadio.Name = "DifferentByRadio";
|
||||||
this.DifferentByRadio.Size = new System.Drawing.Size(83, 17);
|
this.DifferentByRadio.Size = new System.Drawing.Size(83, 17);
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace BizHawk.MultiClient
|
||||||
string systemID = "NULL";
|
string systemID = "NULL";
|
||||||
List<Watch> searchList = new List<Watch>();
|
List<Watch> searchList = new List<Watch>();
|
||||||
List<Watch> undoList = new List<Watch>();
|
List<Watch> undoList = new List<Watch>();
|
||||||
List<Watch> weedOutList = new List<Watch>(); //When addresses are weeded out, the new list goes here, before going into searchList
|
List<Watch> weededList = new List<Watch>(); //When addresses are weeded out, the new list goes here, before going into searchList
|
||||||
|
|
||||||
public enum SCompareTo { PREV, VALUE, ADDRESS, CHANGES };
|
public enum SCompareTo { PREV, VALUE, ADDRESS, CHANGES };
|
||||||
public enum SOperator { LESS, GREATER, LESSEQUAL, GREATEREQUAL, EQUAL, NOTEQUAL, DIFFBY, MODULUS };
|
public enum SOperator { LESS, GREATER, LESSEQUAL, GREATEREQUAL, EQUAL, NOTEQUAL, DIFFBY, MODULUS };
|
||||||
|
@ -238,6 +238,7 @@ namespace BizHawk.MultiClient
|
||||||
searchList[x].address = x + startaddress;
|
searchList[x].address = x + startaddress;
|
||||||
searchList[x].prev = searchList[x].value = Global.Emulator.MainMemory.PeekByte(x);
|
searchList[x].prev = searchList[x].value = Global.Emulator.MainMemory.PeekByte(x);
|
||||||
}
|
}
|
||||||
|
OutputLabel.Text = "New search started";
|
||||||
DisplaySearchList();
|
DisplaySearchList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,9 +386,8 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void ReplaceSearchListWithWeedOutList()
|
private void ReplaceSearchListWithWeedOutList()
|
||||||
{
|
{
|
||||||
//TODO: if weedoutlist = 0, prompt user then reset search? Think about this
|
searchList = new List<Watch>(weededList);
|
||||||
searchList = new List<Watch>(weedOutList);
|
weededList.Clear();
|
||||||
weedOutList.Clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||||
|
@ -395,7 +395,7 @@ namespace BizHawk.MultiClient
|
||||||
if (GenerateWeedOutList())
|
if (GenerateWeedOutList())
|
||||||
{
|
{
|
||||||
SaveUndo();
|
SaveUndo();
|
||||||
OutputLabel.Text = (searchList.Count - weedOutList.Count).ToString() + " addresses removed"; //TODO: address if only 1
|
OutputLabel.Text = (searchList.Count - weededList.Count).ToString() + " addresses removed"; //TODO: address if only 1
|
||||||
ReplaceSearchListWithWeedOutList();
|
ReplaceSearchListWithWeedOutList();
|
||||||
DisplaySearchList();
|
DisplaySearchList();
|
||||||
}
|
}
|
||||||
|
@ -403,11 +403,6 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Generates the new search list based on user criteria
|
|
||||||
/// Does not replace the old list
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
private SCompareTo GetCompareTo()
|
private SCompareTo GetCompareTo()
|
||||||
{
|
{
|
||||||
if (PreviousValueRadio.Checked)
|
if (PreviousValueRadio.Checked)
|
||||||
|
@ -480,8 +475,6 @@ namespace BizHawk.MultiClient
|
||||||
if (!i) return -1;
|
if (!i) return -1;
|
||||||
|
|
||||||
int x = int.Parse(SpecificAddressBox.Text.ToUpper().Trim(), NumberStyles.HexNumber);
|
int x = int.Parse(SpecificAddressBox.Text.ToUpper().Trim(), NumberStyles.HexNumber);
|
||||||
if (x < searchList[0].address || x > searchList[searchList.Count - 1].address) return -1;
|
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,26 +491,52 @@ namespace BizHawk.MultiClient
|
||||||
switch (GetOperator())
|
switch (GetOperator())
|
||||||
{
|
{
|
||||||
case SOperator.LESS:
|
case SOperator.LESS:
|
||||||
|
for (int x = 0; x < searchList.Count; x++)
|
||||||
|
{
|
||||||
|
if (searchList[x].address < address)
|
||||||
|
weededList.Add(searchList[x]);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SOperator.GREATER:
|
case SOperator.GREATER:
|
||||||
|
for (int x = 0; x < searchList.Count; x++)
|
||||||
|
{
|
||||||
|
if (searchList[x].address > address)
|
||||||
|
weededList.Add(searchList[x]);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SOperator.LESSEQUAL:
|
case SOperator.LESSEQUAL:
|
||||||
|
for (int x = 0; x < searchList.Count; x++)
|
||||||
|
{
|
||||||
|
if (searchList[x].address <= address)
|
||||||
|
weededList.Add(searchList[x]);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SOperator.GREATEREQUAL:
|
case SOperator.GREATEREQUAL:
|
||||||
|
for (int x = 0; x < searchList.Count; x++)
|
||||||
|
{
|
||||||
|
if (searchList[x].address >= address)
|
||||||
|
weededList.Add(searchList[x]);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SOperator.EQUAL:
|
case SOperator.EQUAL:
|
||||||
for (int x = 0; x < searchList.Count; x++)
|
for (int x = 0; x < searchList.Count; x++)
|
||||||
{
|
{
|
||||||
if (searchList[x].address == address)
|
if (searchList[x].address == address)
|
||||||
weedOutList.Add(searchList[x]);
|
weededList.Add(searchList[x]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SOperator.NOTEQUAL:
|
case SOperator.NOTEQUAL:
|
||||||
|
for (int x = 0; x < searchList.Count; x++)
|
||||||
|
{
|
||||||
|
if (searchList[x].address != address)
|
||||||
|
weededList.Add(searchList[x]);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SOperator.DIFFBY:
|
case SOperator.DIFFBY:
|
||||||
|
//TODO
|
||||||
break;
|
break;
|
||||||
case SOperator.MODULUS:
|
case SOperator.MODULUS:
|
||||||
|
//TODO
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -171,9 +171,6 @@
|
||||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>259, 17</value>
|
<value>259, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>358, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
@ -205,6 +202,9 @@
|
||||||
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
|
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
|
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>358, 17</value>
|
||||||
|
</metadata>
|
||||||
<data name="DataSizetoolStripSplitButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="DataSizetoolStripSplitButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
|
Loading…
Reference in New Issue