Fix width for SNES Action Replay cheatcode decoder, add test case

This commit is contained in:
YoshiRulz 2024-11-12 02:41:17 +10:00
parent ae6ff1dac9
commit f9d3d91d34
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,7 @@ namespace BizHawk.Client.Common.cheats
return new DecodeResult
{
Size = WatchSize.Word,
Size = WatchSize.Byte,
Address = int.Parse(code.Remove(6, 2), NumberStyles.HexNumber),
Value = int.Parse(code.Remove(0, 6), NumberStyles.HexNumber)
};

View File

@ -52,6 +52,7 @@ namespace BizHawk.Tests.Client.Common.cheats
new object?[] { VSystemID.Raw.GB, "BE0-37B-08C", 0x4037, 0xBE, 0xB9, WatchSize.Byte },
new object?[] { VSystemID.Raw.GBA, "4012F5B7 3B7801A6", 0x00000006, 0xB7, NO_COMPARE, WatchSize.Byte },
new object?[] { VSystemID.Raw.GBA, "686D7FC3 24B5B832", 0x00000032, 0x7FC3, NO_COMPARE, WatchSize.Word },
new object?[] { VSystemID.Raw.SNES, "7E1F2801", 0x7E1F28, 0x01, NO_COMPARE, WatchSize.Byte },
};
[DataTestMethod]