Exemple #1
0
        public void StartEmulation(string romFilePath)
        {
            _registerBank.Initialise();
            _display.Initialise();
            try
            {
                _fileHandler.LoadFileIntoMemory(romFilePath);
            }
            catch (Exception)
            {
                throw new Exception("Unable to load ROM");
            }

            EmulationRunning = true;

            RunEmulationThread();
            RunDecrementTimersThread();
            RunUpdateDisplayThread();
            RunBenchmarkThread();

            if (EmulationStarted != null)
            {
                EmulationStarted.Invoke(null, null);
            }
        }
 private void OnEmulationStarted(EventArgs e) => EmulationStarted?.Invoke(this, e);