Package libsidplay.components.c1541
Klasse Rotation
java.lang.Object
libsidplay.components.c1541.Rotation
Disk rotation.
- Autor:
- Ken Händel
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprivate longCount number of microbits (0..1000000) per second.private intCurrent bit count (0..7) of a byte, that have been read or written.private final GCRThe GCR image.private intLast 10 bits that have passed under the read/write head.private byteShift register for writing data.private static final RandomRandom to emulate magnetic flux changes.protected static final int[]Speed (in microbits per drive clock) of the disk in the 4 speed zones.private longTime, when the disk motor has been turned on.private intCurrent disk speed zone.private intNumber of consequtive 0s in the stream. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected abstract longcpuClk()protected abstract intprotected final GCRgetGCR()Group Code Recording support.protected abstract VIA6522DC.Modeprotected abstract booleanprotected abstract voidreadData(byte readData) final voidreset()protected final voidRotate the disk according to system clock.protected final voidprotected abstract voidsetDirty()protected final voidsetSpeedZone(int zone) protected final byteSYNC is detected whenever the last 10 bits are 1, and we aren't writing, or disk wasn't just being changed.protected abstract byte
-
Felddetails
-
RANDOM
Random to emulate magnetic flux changes. -
ROT_SPEED_BPC
protected static final int[] ROT_SPEED_BPCSpeed (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 accumCount number of microbits (0..1000000) per second. -
rotationLastClk
private long rotationLastClkTime, when the disk motor has been turned on. -
bitCounter
private int bitCounterCurrent bit count (0..7) of a byte, that have been read or written. -
speedZone
private int speedZoneCurrent disk speed zone. -
lastReadData
private int lastReadDataLast 10 bits that have passed under the read/write head. -
lastWriteData
private byte lastWriteDataShift register for writing data. -
zeroCount
private int zeroCountNumber of consequtive 0s in the stream. -
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
Group Code Recording support.- Gibt zurück:
- the GCR support
-
cpuClk
protected abstract long cpuClk() -
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()
-