PcmHacks
PcmHacks copied to clipboard
Seed/Key Algo
Hi,
There is nothing wrong with the 0x934D - byteswap(seed)
. It's because the calculator you're using (http://www.calculator.net/hex-calculator.html) is showing signed values not unsigned (showing negative values).
You should be using uint16 in your code (Unsigned 16bit Integer) and the value will roll. You can see this if you fire up Windows Calculator and do the hex calc. The result will be 0xFFFFFFFFFFFFA6D6
which in uint16 is 0xA6D6
Or use this (http://calc.penjee.com/) and set it to 16 bit and unsigned it will be correct
static void Main(string[] args)
{
UInt16 seed = UInt16.Parse(args[0], System.Globalization.NumberStyles.HexNumber);
UInt16 key = 0x934D; //Initial Value
seed = (UInt16)((seed << 8) + (seed >> 8)); //Byteswap
key -= seed;
Console.WriteLine(key.ToString("X4"));
}
Think you might find some of the keys are wrong though but works on most with your algo as its not 100% correct ;)
Thanks! I'm reopening this issue to make sure it is taken into consideration as we work on the new app.
I'll leave this here.... https://github.com/jezzab/GMSeedKey