예제 #1
0
 public void InsertDisk(string name, Stream stream, bool isWriteProtected)
 {
     DebugService.WriteMessage("Inserting disk '{0}'", name);
     FlushTrack();
     _disk        = Disk525.CreateDisk(name, stream, isWriteProtected);
     _trackLoaded = false;
 }
예제 #2
0
        public override void LoadState(BinaryReader reader, Version version)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            _trackLoaded  = reader.ReadBoolean();
            _trackChanged = reader.ReadBoolean();
            _trackNumber  = reader.ReadInt32();
            _trackOffset  = reader.ReadInt32();
            if (_trackLoaded)
            {
                reader.Read(_trackData, 0, _trackData.Length);
            }
            if (reader.ReadBoolean())
            {
                DebugService.WriteMessage("Loading machine '{0}'", typeof(Disk525).Name);
                _disk = Disk525.LoadState(reader, version);
            }
            else
            {
                _disk = null;
            }
        }