Class OzDosFormatDisk

  • All Implemented Interfaces:
    DirectoryEntry

    public class OzDosFormatDisk
    extends DosFormatDisk
    Manages a disk that is in OzDOS format. This is basically DOS 3.3 except that the disk has two volumes of each 400K. Logical disk one takes the first part of the block (bytes $000-$0FF) while the second logical disk takes the second part of a block (bytes $100-$1FF).
    Created on Dec 16, 2002.
    • Field Detail

      • OZDOS_DISK_1

        public static final int OZDOS_DISK_1
        Use this indicator to work with logical disk #1. It is essentially the offset into the block.
        See Also:
        Constant Field Values
      • OZDOS_DISK_2

        public static final int OZDOS_DISK_2
        Use this indicator to work with logical disk #2. It is essentially the offset into the block.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OzDosFormatDisk

        public OzDosFormatDisk​(java.lang.String filename,
                               ImageOrder imageOrder,
                               int logicalOffset)
        Constructor for OzDosFormatDisk.
    • Method Detail

      • create

        public static DosFormatDisk[] create​(java.lang.String filename,
                                             ImageOrder imageOrder)
        Create a OzDosFormatDisk.
      • getLogicalDiskNumber

        public int getLogicalDiskNumber()
        Returns the logical disk number. This can be used to identify between disks when a format supports multiple logical volumes.
        Overrides:
        getLogicalDiskNumber in class DosFormatDisk
      • readSector

        public byte[] readSector​(int track,
                                 int sector)
                          throws java.lang.IllegalArgumentException
        Retrieve the specified sector.
        Overrides:
        readSector in class Disk
        Throws:
        java.lang.IllegalArgumentException
      • writeSector

        public void writeSector​(int track,
                                int sector,
                                byte[] bytes)
                         throws java.lang.IllegalArgumentException
        Write the specified sector.
        Overrides:
        writeSector in class Disk
        Throws:
        java.lang.IllegalArgumentException
      • getBlockNumber

        protected int getBlockNumber​(int track,
                                     int sector)
        Compute the block number.