public async void Run() { Chip8.Initialize(); Chip8.Load("breakout.ch8"); while (true) { await Chip8.Execute(); } }
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); } }