Klasse D64


public final class D64 extends DiskImage
Autor:
Ken Händel
  • Felddetails

    • D64_FILE_SIZE_35

      private static final int D64_FILE_SIZE_35
      D64 image byte size (35 tracks).
      Siehe auch:
    • D64_SECTOR_SIZE

      private static final int D64_SECTOR_SIZE
      D64 sector byte size.
      Siehe auch:
    • GCR_SECTOR_SIZE_WITH_HEADER

      private static final int GCR_SECTOR_SIZE_WITH_HEADER
      GCR byte size of a whole sector.
      Siehe auch:
    • GAPS_BETWEEN_SECTORS

      private static final int[] GAPS_BETWEEN_SECTORS
      Number of gap bytes between sectors of the speedzones 0-3.
    • SECTOR_MAP_D64

      private static final int[] SECTOR_MAP_D64
      Number of sectors per track of the speedzones 0-3.
    • diskID1

      private byte diskID1
      Disk ID.
    • diskID2

      private byte diskID2
      Disk ID.
    • errorInfo

      private byte[] errorInfo
      Error in each sector appended to the D64 disk image.
  • Konstruktordetails

  • Methodendetails

    • attach

      protected void attach() throws IOException
      Detect 35..42 track d64 image, determine image parameters. Walk from 35 to 42, calculate expected image file size for each track, and compare this with the size of the given image.
      Angegeben von:
      attach in Klasse DiskImage
      Löst aus:
      IOException - disk image file read error
    • readSector

      private DOSErrorCodes readSector(byte[] sectorBytes, int sectorBytesPos, int track, int sector) throws IOException
      Read sector of disk image.
      Parameter:
      sectorBytes - sector bytes read from track
      sectorBytesPos - offset with the start of the sector bytes
      track - track
      sector - sector
      Gibt zurück:
      DOS error code of the sector to read
      Löst aus:
      IOException - error reading disk image
    • getSectorCount

      private int getSectorCount(int track, int sector)
      Count sectors up to the given location.
      Parameter:
      track - track
      sector - sector
      Gibt zurück:
      sector number
    • gcrDataWriteback

      public void gcrDataWriteback(int track) throws IOException
      Beschreibung aus Klasse kopiert: DiskImage
      Write back unsaved disk image data.
      Angegeben von:
      gcrDataWriteback in Klasse DiskImage
      Parameter:
      track - dirty track
      Löst aus:
      IOException
    • driveExtendDiskImage

      private void driveExtendDiskImage() throws IOException
      Extend disk image to 42 tracks.
      Löst aus:
      IOException - disk image write error
    • gcrDataWritebackSector

      private void gcrDataWritebackSector(int offset, int track, int sector) throws IOException
      Write back dirty sector into the disk image.
      Parameter:
      offset - offset of the GCR data
      track - track
      sector - sector
      Löst aus:
      IOException - disk image write error
    • writeSector

      private void writeSector(byte[] sectorBytes, int sectorBytesPos, int track, int sector) throws IOException
      Write a sector.
      Parameter:
      sectorBytes - sector bytes to write
      sectorBytesPos - offset of the sector bytes
      track - track
      sector - sector
      Löst aus:
      IOException - disk image write error