Example #1
0
 /// <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);
 }
Example #2
0
 /// <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);
 }
Example #3
0
 /// <summary>
 /// Resets the tape device
 /// </summary>
 public void Reset()
 {
     TapeProvider?.Reset();
     _tapePlayer  = null;
     _currentMode = TapeOperationMode.Passive;
     _savePhase   = SavePhase.None;
     _micBitState = true;
 }
Example #4
0
 /// <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();
 }
Example #5
0
        /// <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);
        }
Example #6
0
        /// <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);
        }
Example #7
0
 /// <summary>
 /// Leaves the save mode. Stops recording MIC pulses
 /// </summary>
 private void LeaveSaveMode()
 {
     _currentMode = TapeOperationMode.Passive;
     TapeProvider?.FinalizeTapeFile();
     LeftSaveMode?.Invoke(this, EventArgs.Empty);
 }
Example #8
0
 /// <summary>
 /// Leaves the save mode. Stops recording MIC pulses
 /// </summary>
 private void LeaveSaveMode()
 {
     _currentMode = TapeOperationMode.Passive;
     LeftSaveMode?.Invoke(this, new SaveModeEventArgs(TapeSaveProvider?.GetFullFileName()));
 }
Example #9
0
 /// <summary>
 /// Leaves the save mode. Stops recording MIC pulses
 /// </summary>
 private void LeaveSaveMode()
 {
     _currentMode = TapeOperationMode.Passive;
     SaveToTapeProvider?.FinalizeTapeFile();
 }