/// <summary> /// Leaves the load mode. Stops the device that playes EAR pulses /// </summary> private void LeaveLoadMode() { _currentMode = TapeOperationMode.Passive; _tapePlayer = null; ContentProvider?.Reset(); HostVm.BeeperDevice.SetTapeOverride(false); }
/// <summary> /// Leaves the load mode. Stops the device that playes EAR pulses /// </summary> private void LeaveLoadMode() { _currentMode = TapeOperationMode.Passive; _tapePlayer = null; TapeProvider?.Reset(); HostVm.BeeperDevice.SetTapeOverride(false); LeftLoadMode?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Resets the tape device /// </summary> public void Reset() { TapeProvider?.Reset(); _tapePlayer = null; _currentMode = TapeOperationMode.Passive; _savePhase = SavePhase.None; _micBitState = true; }
/// <summary> /// Puts the device in save mode. From now on, every MIC pulse is recorded /// </summary> private void EnterSaveMode() { _currentMode = TapeOperationMode.Save; _savePhase = SavePhase.None; _micBitState = true; _lastMicBitActivityTact = _cpu.Tacts; _pilotPulseCount = 0; _prevDataPulse = MicPulseType.None; _dataBlockCount = 0; SaveToTapeProvider?.CreateTapeFile(); }
/// <summary> /// Puts the device in load mode. From now on, EAR pulses are played by a device /// </summary> private void EnterLoadMode() { _currentMode = TapeOperationMode.Load; var contentReader = ContentProvider?.GetTapeContent(); if (contentReader == null) { return; } // --- Play the content _tapePlayer = new CommonTapeFilePlayer(contentReader); _tapePlayer.ReadContent(); _tapePlayer.InitPlay(_cpu.Tacts); HostVm.BeeperDevice.SetTapeOverride(true); }
/// <summary> /// Puts the device in load mode. From now on, EAR pulses are played by a device /// </summary> private void EnterLoadMode() { _currentMode = TapeOperationMode.Load; EnteredLoadMode?.Invoke(this, EventArgs.Empty); var contentReader = TapeLoadLoadProvider?.GetTapeContent(); if (contentReader == null) { return; } // --- Play the content _tapePlayer = new CommonTapeFilePlayer(contentReader); _tapePlayer.ReadContent(); contentReader.Dispose(); _tapePlayer.InitPlay(_cpu.Tacts); HostVm.BeeperDevice.SetTapeOverride(true); }
/// <summary> /// Leaves the save mode. Stops recording MIC pulses /// </summary> private void LeaveSaveMode() { _currentMode = TapeOperationMode.Passive; TapeProvider?.FinalizeTapeFile(); LeftSaveMode?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Leaves the save mode. Stops recording MIC pulses /// </summary> private void LeaveSaveMode() { _currentMode = TapeOperationMode.Passive; LeftSaveMode?.Invoke(this, new SaveModeEventArgs(TapeSaveProvider?.GetFullFileName())); }
/// <summary> /// Leaves the save mode. Stops recording MIC pulses /// </summary> private void LeaveSaveMode() { _currentMode = TapeOperationMode.Passive; SaveToTapeProvider?.FinalizeTapeFile(); }