remove GBA cheat code that hasn't been ready for 5 years, easier to try to implement this in the re-architected code, so delete for now at least

This commit is contained in:
adelikat 2020-02-29 12:36:07 -06:00
parent 59f40ec3d5
commit bfe40f4090
1 changed files with 0 additions and 73 deletions

View File

@ -288,79 +288,6 @@ namespace BizHawk.Client.EmuHawk
if (cheat.Length == 12 && cheat.IndexOf(" ") != 8)
{
MessageBox.Show("Codebreaker/GameShark SP/Xploder codes are not supported by this tool.", "Tool error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
#if false
//WARNING!!
//This code is NOT ready yet.
//The GameShark Key
//09F4FBBD
//9681884A
//352027E9
//F3DEE5A7
//The CodeBreaker Key, for Advance Wars 2 (USA)
//911B9B36
//BC7C46FC
//CE58668D
//5C453661
//Four sets, and this guy...
//9D6E
//Sample Code
//Encyped: 6C2A1F51C2C0
//Decrypted: 82028048 FFFFFFFF
//GBACodeBreaker();
if (blnCodeBreaker == false)
{
parseString = SingleCheat;
UInt32 op1 = 0;
UInt32 op2 = 0;
UInt32 sum = 0xC6EF3720;
string test1;
string test2;
test1 = parseString.Remove(5, 6);
test2 = parseString.Remove(0, 6);
MessageBox.Show(test1.ToString());
MessageBox.Show(test2.ToString());
op1 = UInt32.Parse(parseString.Remove(5, 6), NumberStyles.HexNumber);
op2 = UInt32.Parse(parseString.Remove(0, 6), NumberStyles.HexNumber);
//Tiny Encryption Algorithm
int i;
for (i = 0; i < 32; ++i)
{
op2 -= ((op1 << 4) + GBAGameSharkSeeds[2]) ^ (op1 + sum) ^ ((op1 >> 5) + GBAGameSharkSeeds[3]);
op1 -= ((op2 << 4) + GBAGameSharkSeeds[0]) ^ (op2 + sum) ^ ((op2 >> 5) + GBAGameSharkSeeds[1]);
sum -= 0x9E3779B9;
}
//op1 has the Address
//op2 has the Value
//Sum, is pointless?
RAMAddress = $"{op1:X8}";
//RAMAddress = RAMAddress.Remove(0, 1);
RAMValue = $"{op2:X8}";
// && RAMAddress[6] == '0'
}
if (blnCodeBreaker)
{
//We got a Valid Code Breaker Code. Hopefully.
AddGBA();
return;
}
if (SingleCheat.IndexOf(" ") != 8 && SingleCheat.Length != 12)
{
MessageBox.Show("ALL Codes for Action Replay, Action Replay MAX, Codebreaker, GameShark Advance, GameShark SP, Xploder have a Space after the 8th character.", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
//We have a code
if (blnNoCode == false)
{
}
#endif
}
}
}