Klasse DiskImage

java.lang.Object
libsidplay.components.c1541.DiskImage
Bekannte direkte Unterklassen:
D64, G64

public abstract class DiskImage extends Object
Support of disk images.
Autor:
Ken Händel
  • Felddetails

    • DIR_TRACK_1541

      public static final int DIR_TRACK_1541
      Track containing the directory.
      Siehe auch:
    • MIN_TRACKS_1541

      public static final int MIN_TRACKS_1541
      Minimum tracks of a disk.
      Siehe auch:
    • EXT_TRACKS_1541

      protected static final int EXT_TRACKS_1541
      Maximum tracks of a D64 disk, that can be written.
      Siehe auch:
    • MAX_TRACKS_1541

      protected static final int MAX_TRACKS_1541
      Maximum tracks of a disk, that can be accessed.
      Siehe auch:
    • RAW_TRACK_SIZE

      protected static final int[] RAW_TRACK_SIZE
      Standard settings: Number of bytes per track in the speedzones 0-3.
    • SPEED_MAP_1541

      protected static final int[] SPEED_MAP_1541
      Standard settings: Track (1-42) to speedzone (0-3) map.
    • trackSize

      protected int[] trackSize
      Size of the GCR data of each track.
    • fd

      protected RandomAccessFile fd
      Recently attached file handle.
    • fileName

      protected String fileName
      Recently attached file name.
    • readOnly

      protected boolean readOnly
      Attach mode read-only.
    • tracks

      protected int tracks
      Track count of this image.
    • gcr

      protected GCR gcr
      Group Code Recording support.
    • extendImageListener

      protected IExtendImageListener extendImageListener
      40 tracks disk image extension policy.
    • MAX_SECTORS_PER_TRACK

      private static final int MAX_SECTORS_PER_TRACK
      Absolute max nr of sectors per track for supported disk formats.
      Siehe auch:
    • MAX_OVERALL_SECTORS

      public static final int MAX_OVERALL_SECTORS
      Nr of tracks * max sectors per track.
      Siehe auch:
  • Konstruktordetails

  • Methodendetails

    • attach

      public static final DiskImage attach(GCR gcr, File file) throws IOException
      Attach an disk image file to drive.
      Parameter:
      gcr - group code recording support
      file - file of the image
      Gibt zurück:
      disk image
      Löst aus:
      IOException - disk image file could not be attached
    • attach

      protected abstract void attach() throws IOException
      Attach disk image to drive.
      Löst aus:
      IOException - error reading disk image
    • detach

      public final void detach() throws IOException
      Detach disk image from drive.
      Löst aus:
      IOException - disk image file write error
    • setExtendImagePolicy

      public final void setExtendImagePolicy(IExtendImageListener listener)
      Set policy how to deal with disks up to 40 tracks.
      Parameter:
      listener - listener to ask about the policy
    • gcrDataWriteback

      public abstract void gcrDataWriteback(int track) throws IOException
      Write back unsaved disk image data.
      Parameter:
      track - dirty track
      Löst aus:
      IOException
    • isReadOnly

      public final boolean isReadOnly()
      Is the disk image mounted read-only?
      Gibt zurück:
      True if the mounted disk image is read-only; false otherwise.
    • getDiskSector

      public boolean getDiskSector(int track, int sector, byte[] currSector)
    • save

      public final boolean save(File file, byte startTrack, byte startSector) throws IOException
      Löst aus:
      IOException