Changed the Byte Detection method for N46 Cheats.
This commit is contained in:
parent
afa4ec30b6
commit
3596407791
|
@ -117,19 +117,28 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//We need to determine what kind of cheat this is.
|
//We need to determine what kind of cheat this is.
|
||||||
|
//I need to determine if this is a Byte or Word.
|
||||||
|
Boolean isByte = false;
|
||||||
string testo = txtCheat.Text.Remove(2, 11);
|
string testo = txtCheat.Text.Remove(2, 11);
|
||||||
//MessageBox.Show(testo);
|
|
||||||
switch (testo)
|
switch (testo)
|
||||||
{
|
{
|
||||||
//80 and 81 are the most common, so let's not get all worried.
|
//80 and 81 are the most common, so let's not get all worried.
|
||||||
case "80":
|
case "80":
|
||||||
|
//Byte
|
||||||
|
isByte = true;
|
||||||
break;
|
break;
|
||||||
case "81":
|
case "81":
|
||||||
|
//Word
|
||||||
|
isByte = false;
|
||||||
break;
|
break;
|
||||||
//Case A0 and A1 means "Write to Uncached address.
|
//Case A0 and A1 means "Write to Uncached address.
|
||||||
case "A0":
|
case "A0":
|
||||||
|
//Byte
|
||||||
|
isByte = true;
|
||||||
break;
|
break;
|
||||||
case "A1":
|
case "A1":
|
||||||
|
//Word
|
||||||
|
isByte = false;
|
||||||
break;
|
break;
|
||||||
//Do we support the GameShark Button? No. But these cheats, can be toggled. Which "Counts"
|
//Do we support the GameShark Button? No. But these cheats, can be toggled. Which "Counts"
|
||||||
//<Ocean_Prince> Consequences be damned!
|
//<Ocean_Prince> Consequences be damned!
|
||||||
|
@ -189,16 +198,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
RAMAddress = parseString.Remove(6, 5);
|
RAMAddress = parseString.Remove(6, 5);
|
||||||
//Get RAM Value
|
//Get RAM Value
|
||||||
RAMValue = parseString.Remove(0, 7);
|
RAMValue = parseString.Remove(0, 7);
|
||||||
//I need to determine if this is a Byte or Word.
|
|
||||||
//TODO: Make this suck less? I feel it's sloppy as is and it may be false-postive.
|
|
||||||
Boolean isByte = false;
|
|
||||||
string firstTwo = null;
|
|
||||||
firstTwo = RAMValue.Remove(2, 2);
|
|
||||||
//MessageBox.Show(firstTwo);
|
|
||||||
if (firstTwo == "00")
|
|
||||||
{
|
|
||||||
isByte = true;
|
|
||||||
}
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//A Watch needs to be generated so we can make a cheat out of that. This is due to how the Cheat engine works.
|
//A Watch needs to be generated so we can make a cheat out of that. This is due to how the Cheat engine works.
|
||||||
|
|
Loading…
Reference in New Issue