Beispiel #1
0
        static void cmdProcessor(string [] args)
        {
            string rom_path = null;
            string map_path = null;


            for (int i = 0; i < args.Length; i++)
            {
                string s = args[i].ToLower().Trim();

                if (s.Equals("-recovery"))
                {
                    cmd_recovery();
                }

                if (s.Equals("-appmode"))
                {
                    cmd_exitServiceMode();
                }

                if (s.Equals("-sermode"))
                {
                    cmd_enterServiceMode();
                }

                if (s.Equals("-diag"))
                {
                    cmd_diagnosics();
                }


                if (s.Equals("-mkdir"))
                {
                    usb.makeDir(args[i + 1]);
                    i += 1;
                    continue;
                }

                if (s.Equals("-rtcset"))
                {
                    edio.rtcSet(DateTime.Now);
                    continue;
                }

                if (s.Equals("-cp"))
                {
                    usb.copyFile(args[i + 1], args[i + 2]);
                    i += 2;
                    continue;
                }

                if (s.Equals("-flawr"))
                {
                    cmd_flashWrite(args[i + 1], args[i + 2]);
                    i += 2;
                    continue;
                }


                if (s.EndsWith(".nes") || s.EndsWith(".fds"))
                {
                    rom_path = args[i];
                    continue;
                }

                if (s.EndsWith(".rbf"))
                {
                    map_path = args[i];
                    continue;
                }
            }


            if (rom_path != null)
            {
                //edio.getConfig().print();
                loadROM(rom_path, map_path);
            }

            Console.WriteLine("");
        }