private static void LaunchEmulator() { Chip8 chip8 = new Chip8(); chip8.Reset(); chip8.LoadRomFromFile(romPath); chip8.Start(); MainWindow mainWindow = new MainWindow(chip8); mainWindow.SoundEnabled = soundEnabled; mainWindow.Run(); }
public WinformOTKRenderer(Chip8 chip8) { InitializeComponent(); this.Text = String.Format("{0} {1} Codename {2}", Chip8.emulator, Chip8.version, Chip8.codename); _chip8 = chip8; _chip8.Reset(); SetBlackAndWhiteColorPixel(); _chip8.Cpu.PlaySound += new EventHandler<EventArgs>(Chip8PlaySound_Event); }
public static void Main(string [] args) { if (args.Length > 0) { if (File.Exists(args[0])) { Chip8 chip8 = new Chip8(); chip8.Reset(); chip8.LoadRomFromFile(args[0]); chip8.Start(); OtkWindow emu = new OtkWindow(chip8); emu.Run(); } else Console.WriteLine("Le Fichier n'existe pas"); } else Console.WriteLine("Usage: SharpChip8.exe nomRom.ch8"); }