예제 #1
0
        // Note: this also handles Game Gear due to shared hardware
        private void Sms(string code)
        {
            // Game Genie
            if (code.LastIndexOf("-") == 7 && code.IndexOf("-") == 3)
            {
                var result = GbGgGameGenieDecoder.Decode(code);
                AddCheat(code, result);
            }

            // Action Replay
            else if (code.IndexOf("-") == 3 && code.Length == 9)
            {
                var result = SmsActionReplayDecoder.Decode(code);
                AddCheat(code, result);
            }

            InputError($"Unknown code type: {code}");
        }
예제 #2
0
        private void GameBoy(string code)
        {
            // Game Genie
            if (code.LastIndexOf("-") == 7 && code.IndexOf("-") == 3)
            {
                var result = GbGgGameGenieDecoder.Decode(code);
                AddCheat(code, result);
            }

            // Game Shark codes
            if (code.Length == 8 && !code.Contains("-"))
            {
                var result = GbGameSharkDecoder.Decode(code);
                AddCheat(code, result);
            }

            InputError($"Unknown code type: {code}");
        }