示例#1
0
        public async void Run()
        {
            Chip8.Initialize();

            Chip8.Load("breakout.ch8");

            while (true)
            {
                await Chip8.Execute();
            }
        }
示例#2
0
        static void Main(string[] args)
        {
            try
            {
                Console.Write(">");
                var gamePath = Console.ReadLine();

                var chip8 = new Chip8();
                chip8.Load(gamePath);
                chip8.Run();
            }
            catch (Exception ex)
            {
                Console.BackgroundColor = ConsoleColor.Black;
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex);
                Console.WriteLine("Press any key to exit . . .");
                Console.ReadKey(true);
            }
        }