private void DestoryEmulator() { if (_board != null) { _board.SystemClock.OnPhaseEnd -= _drive.DriveClock.Run; _board.OnLoadState -= _drive.ReadDeviceState; _board.OnSaveState -= _drive.WriteDeviceState; _board = null; _drive = null; _keyboard = null; } }
private void CreateEmulator() { lock (_syncRoot) { DestoryEmulator(); _board = new Board.Board(new GdiVideo(_videoOutput), _kernel, _basic, _charGen); _drive = new DiskDrive.CBM1541(_driveKernel, _board.Serial); _board.SystemClock.OnPhaseEnd += _drive.DriveClock.Run; _board.OnLoadState += _drive.ReadDeviceState; _board.OnSaveState += _drive.WriteDeviceState; _keyboard = new Input.Keyboard(_board.SystemCias[0].PortA, _board.SystemCias[0].PortB, null); _emulatorRunning = true; } }
private void DestoryEmulator() { if (_board != null) { _board.SystemClock.OnPhaseEnd -= _drive.DriveClock.Run; _board.OnLoadState -= _drive.ReadDeviceState; _board.OnSaveState -= _drive.WriteDeviceState; _board = null; _drive = null; _keyboard = null; } }
private void CreateEmulator() { lock (_syncRoot) { DestoryEmulator(); _board = new Board.Board(new GdiVideo(_videoOutput), _kernel, _basic, _charGen); _drive = new DiskDrive.CBM1541(_driveKernel, _board.Serial); _board.SystemClock.OnPhaseEnd += _drive.DriveClock.Run; _board.OnLoadState += _drive.ReadDeviceState; _board.OnSaveState += _drive.WriteDeviceState; _keyboard = new Input.Keyboard(_board.SystemCias[0].PortA, _board.SystemCias[0].PortB, null); _emulatorRunning = true; } }