public OpenTKRenderer(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);
        }
Beispiel #2
0
        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();
        }