Exemplo n.º 1
0
 private void bReset_Click(object sender, EventArgs e)
 {
     if (cbConfirmReset.Checked)
     {
         var result = MessageBox.Show("Reset Ultimate 64, are you sure?", "Confirmation", MessageBoxButtons.OKCancel);
         if (result == DialogResult.Cancel)
         {
             return;
         }
     }
     Ultimate64Commands.SendReset(cfg);
 }
Exemplo n.º 2
0
        static int Main(string[] args)
        {
            try
            {
                if (args.Length == 0)
                {
                    Usage();
                }

                string ip    = args[0];
                string cmd   = args[1];
                string param = "";
                if (args.Length >= 3)
                {
                    param = args[2];
                }

                Config config = new Config(ip, 64);
                byte[] data   = null;

                switch (cmd)
                {
                case "reset":
                    Ultimate64Commands.SendReset(config);
                    break;

                case "type":
                    Type(config, args);
                    break;

                case "poke":
                    Poke(config, param, args);
                    break;

                case "write":
                case "load":
                    data = File.ReadAllBytes(param);
                    Ultimate64Commands.WriteMemoryWithAddress(config, data);
                    break;

                case "run":
                    data = File.ReadAllBytes(param);
                    Ultimate64Commands.SendRamAndRun(config, data);
                    break;

                case "jump":
                    data = File.ReadAllBytes(param);
                    Ultimate64Commands.SendRamAndJump(config, data);
                    break;

                default:
                    Usage();
                    break;
                }
            }
            catch (Exception e)
            {
                Handle(e);
            }

            return(0);
        }