Beispiel #1
0
 internal void ReadDiskHeader()
 {
     if (DiskInfo == null || AllocationMap == null)
     {
         DiskInfo      = new OS9DiskInfo(ReadSector(IdentificationSector));
         AllocationMap = new OS9AllocationMap(ReadSector(AllocationMapSector), DiskInfo.AllocationMapSize);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Event handler for the SectorWritten event of the associated disk object.
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="e"></param>
        private void SectorWrittenHandler(Object obj, SectorWrittenEventArgs e)
        {
            int lsn = SectorToLsn(e.Head, e.Track, e.Sector);

            if (lsn == IdentificationSector || lsn == AllocationMapSector)
            {
                DiskInfo      = null;
                AllocationMap = null;
            }
        }
Beispiel #3
0
        public OS9(IDisk disk, bool iswriteable)
        {
            if (disk == null)
            {
                throw new ArgumentNullException();
            }

            Disk        = disk;
            IsWriteable = iswriteable;

            DiskInfo = new OS9DiskInfo(Disk.ReadSector(0, 0, 1));

            Tracks              = Disk.Tracks;
            Sectors             = DiskInfo.Sectors * Disk.Heads;
            Disk.SectorWritten += SectorWrittenHandler;
        }
Beispiel #4
0
        public OS9(IDisk disk, bool iswriteable)
        {
            if (disk == null) throw new ArgumentNullException();

            Disk = disk;
            IsWriteable = iswriteable;

            DiskInfo = new OS9DiskInfo(Disk.ReadSector(0, 0, 1));

            Tracks = Disk.Tracks;
            Sectors = DiskInfo.Sectors * Disk.Heads;
            Disk.SectorWritten += SectorWrittenHandler;
        }
Beispiel #5
0
 /// <summary>
 /// Event handler for the SectorWritten event of the associated disk object.  
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="e"></param>
 private void SectorWrittenHandler(Object obj, SectorWrittenEventArgs e)
 {
     int lsn = SectorToLsn(e.Head, e.Track, e.Sector);
     if (lsn == IdentificationSector || lsn == AllocationMapSector)
     {
         DiskInfo = null;
         AllocationMap = null;
     }
 }
Beispiel #6
0
 internal void ReadDiskHeader()
 {
     if (DiskInfo == null || AllocationMap == null)
     {
         DiskInfo = new OS9DiskInfo(ReadSector(IdentificationSector));
         AllocationMap = new OS9AllocationMap(ReadSector(AllocationMapSector), DiskInfo.AllocationMapSize);
     }
 }