public static void start(string[] args, Edio io) { edio = io; usb = new Usbio(edio); for (int i = 0; i < args.Length; i++) { string s = args[i].ToLower().Trim(); if (s.Equals("-reset")) { edio.hostReset(Edio.HOST_RST_SOFT); continue; } if (s.Equals("-recovery")) { cmd_recovery(); continue; } if (s.Equals("-appmode")) { cmd_exitServiceMode(); continue; } if (s.Equals("-sermode")) { cmd_enterServiceMode(); continue; } if (s.Equals("-flawr")) { cmd_flashWrite(args[i + 1], args[i + 2]); i += 2; continue; } if (s.Equals("-rtcset")) { edio.rtcSet(DateTime.Now); continue; } if (s.EndsWith(".rbf")) { cmd_loadFpga(args[i]); continue; } if (s.StartsWith("-memprint")) { cmd_memPrint(args[i + 1], args[i + 2]); i += 2; } if (s.StartsWith("-memwr")) { cmd_memWrite(args[i + 1], args[i + 2]); i += 2; } if (s.StartsWith("-memrd")) { cmd_memRead(args[i + 1], args[i + 2], args[i + 3]); i += 3; } if (s.Equals("-verify")) { cmd_verify(args[i + 1], args[i + 2], args[i + 3]); i += 3; continue; } if (s.EndsWith(".bin") || s.EndsWith(".gen") || s.EndsWith(".md") || s.EndsWith(".smd") || s.EndsWith(".32x") || s.EndsWith(".sms") || s.EndsWith(".nes")) { //cmdMemWrite(args[i], "0"); cmd_loadGame(s); continue; } if (s.Equals("-cp")) { usb.copyFile(args[i + 1], args[i + 2]); i += 2; continue; } if (s.Equals("-mkdir")) { usb.makeDir(args[i + 1]); i += 1; continue; } } edio.hostReset(Edio.HOST_RST_OFF); Console.WriteLine(""); }