Klasse Rotation

java.lang.Object
libsidplay.components.c1541.Rotation

public abstract class Rotation extends Object
Disk rotation.
Autor:
Ken Händel
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    private long
    Count number of microbits (0..1000000) per second.
    private int
    Current bit count (0..7) of a byte, that have been read or written.
    private final GCR
    The GCR image.
    private int
    Last 10 bits that have passed under the read/write head.
    private byte
    Shift register for writing data.
    private static final Random
    Random to emulate magnetic flux changes.
    protected static final int[]
    Speed (in microbits per drive clock) of the disk in the 4 speed zones.
    private long
    Time, when the disk motor has been turned on.
    private int
    Current disk speed zone.
    private int
    Number of consequtive 0s in the stream.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Disk rotation support.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    protected abstract long
     
    protected abstract int
     
    protected final GCR
    Group Code Recording support.
    protected abstract VIA6522DC.Mode
     
    protected abstract boolean
     
    protected abstract void
    readData(byte readData)
     
    final void
     
    protected final void
    Rotate the disk according to system clock.
    protected final void
     
    protected abstract void
     
    protected final void
    setSpeedZone(int zone)
     
    protected final byte
    SYNC is detected whenever the last 10 bits are 1, and we aren't writing, or disk wasn't just being changed.
    protected abstract byte
     

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • RANDOM

      private static final Random RANDOM
      Random to emulate magnetic flux changes.
    • ROT_SPEED_BPC

      protected static final int[] ROT_SPEED_BPC
      Speed (in microbits per drive clock) of the disk in the 4 speed zones. The drive contains a 16.00 MHz crystal and these values are established by dividing by 16, 15, 14 and 13 and then by 4.
    • accum

      private long accum
      Count number of microbits (0..1000000) per second.
    • rotationLastClk

      private long rotationLastClk
      Time, when the disk motor has been turned on.
    • bitCounter

      private int bitCounter
      Current bit count (0..7) of a byte, that have been read or written.
    • speedZone

      private int speedZone
      Current disk speed zone.
    • lastReadData

      private int lastReadData
      Last 10 bits that have passed under the read/write head.
    • lastWriteData

      private byte lastWriteData
      Shift register for writing data.
    • zeroCount

      private int zeroCount
      Number of consequtive 0s in the stream.
    • gcr

      private final GCR gcr
      The GCR image.
  • Konstruktordetails

    • Rotation

      public Rotation()
      Disk rotation support.
  • Methodendetails

    • reset

      public final void reset()
    • setSpeedZone

      protected final void setSpeedZone(int zone)
    • rotationBegins

      protected final void rotationBegins()
    • rotateDisk

      protected final void rotateDisk()
      Rotate the disk according to system clock. While rotating, calculate read/write data on ths platter and note presence and absence of SYNC. The caller must check the precondition, if the drive motor is on.
    • syncFound

      protected final byte syncFound()
      SYNC is detected whenever the last 10 bits are 1, and we aren't writing, or disk wasn't just being changed.
      Gibt zurück:
      0 when found, 0x80 when not.
    • getGCR

      protected final GCR getGCR()
      Group Code Recording support.
      Gibt zurück:
      the GCR support
    • cpuClk

      protected abstract long cpuClk()
    • getReadWriteMode

      protected abstract VIA6522DC.Mode getReadWriteMode()
    • readData

      protected abstract void readData(byte readData)
    • writeData

      protected abstract byte writeData()
    • getCurrentTrackSize

      protected abstract int getCurrentTrackSize()
    • setDirty

      protected abstract void setDirty()
    • isDiskChangeInProgress

      protected abstract boolean isDiskChangeInProgress()