public class NibbleOrder extends DosOrder
Supports disk images stored in nibbilized DOS physical order.

  • Field Details

    • DOS_SECTOR_SKEW

      public static final int[] DOS_SECTOR_SKEW
      This maps a DOS 3.3 sector to a physical sector. (readSector and writeSector work off of the DOS 3.3 sector numbering.)
  • Constructor Details

  • Method Details

    • readTrackData

      protected byte[] readTrackData(int track)
      Read nibbilized track data.
    • writeTrackData

      protected void writeTrackData(int track, byte[] trackData)
      Write nibbilized track data.
    • readSector

      public byte[] readSector(int track, int dosSector) throws IllegalArgumentException
      Retrieve the specified sector. The primary source of information for this process is directly from Beneath Apple DOS, chapter 3.
      Overrides:
      readSector in class DosOrder
      Throws:
      IllegalArgumentException
    • writeSector

      public void writeSector(int track, int dosSector, byte[] sectorData) throws IllegalArgumentException
      Write the specified sector.
      Overrides:
      writeSector in class DosOrder
      Throws:
      IllegalArgumentException
    • getTracksPerDisk

      public int getTracksPerDisk()
      Answer with the number of tracks on this device.
      Overrides:
      getTracksPerDisk in class ImageOrder
    • getSectorsPerTrack

      public int getSectorsPerTrack()
      Answer with the number of sectors per track on this device.
      Overrides:
      getSectorsPerTrack in class ImageOrder
    • getBlocksOnDevice

      public int getBlocksOnDevice()
      Answer with the number of blocks on this device. This cannot be computed since the physical size relates to disk bytes (6+2 encoded) instead of a full 8-bit byte.
      Overrides:
      getBlocksOnDevice in class ImageOrder
    • format

      public void format()
      Format the media. Formatting at the ImageOrder level deals with low-level issues. A typical ordering just needs to have the image "wiped," and that is the assumed implementation. However, specialized orders - such as a nibbilized disk - need to lay down track and sector markers.
      Overrides:
      format in class ImageOrder