public abstract class Datasette extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Datasette.Control
Controls of the datasette.
|
static class |
Datasette.DatasetteStatus |
protected static class |
Datasette.GapDir
Return value of method fetchGap.
|
Modifier and Type | Field and Description |
---|---|
protected Tap |
currentImage
Attached TAP tape image.
|
protected long |
lastTap
Pointer and length of the tapBuffer.
|
protected long |
lastWriteClk
Last time we have recorded a flux change.
|
protected Datasette.Control |
mode
Which mode is activated (RECORD/START/...)?
|
protected boolean |
motor
State of the datasette motor.
|
protected long |
nextTap
Pointer and length of the tapBuffer.
|
Constructor and Description |
---|
Datasette(EventScheduler ctx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
control(Datasette.Control command)
Triggered by GUI: RECORD/START...
|
void |
ejectTape()
Eject tape image.
|
protected void |
forward()
Fast forward on tape.
|
int |
getCounter() |
boolean |
getMotor() |
float |
getProgress() |
Datasette.DatasetteStatus |
getStatus()
Get a status icon to display the floppies activity.
|
TapeImage |
getTapeImage() |
boolean |
getTapeSense()
Read state of button press.
|
void |
insertTape(File tapeFile)
Insert a tape image into the datasette.
|
protected void |
internalReset()
Internal reset datasette.
|
protected void |
readBit()
Read bit.
|
void |
reset()
Reset datasette.
|
protected void |
resetCounter()
Reset counter value.
|
protected void |
rewind()
Rewind on tape.
|
abstract void |
setFlag(boolean flag)
Signal interrupt flag.
|
void |
setMotor(boolean flag)
Triggered by c64pla_config_changed.
|
void |
setTapeImage(Tap image)
Sets the TAP image to work with.
|
protected void |
startMotor()
Start datasette motor.
|
void |
toggleWriteBit(boolean writeBit)
Triggered by CPU port update at PHI2.
|
protected void |
updateCounter()
Update datasette counter value.
|
protected Datasette.Control mode
protected Tap currentImage
protected long nextTap
protected long lastTap
protected boolean motor
protected long lastWriteClk
public Datasette(EventScheduler ctx)
ctx
- event contextpublic final void insertTape(File tapeFile) throws IOException
tapeFile
- filename of the tape imageIOException
- cannot read tapepublic final void ejectTape() throws IOException
IOException
- cannot write tape imageprotected void updateCounter()
protected void resetCounter()
protected void readBit() throws IOException
IOException
- tape image read errorpublic final void setTapeImage(Tap image) throws IOException
image
- TAP imageIOException
- tape image read errorprotected void forward()
protected void rewind()
protected void internalReset() throws IOException
IOException
- error reading TAP imagepublic final void reset()
protected void startMotor() throws IOException
IOException
- tape image read errorpublic final void control(Datasette.Control command)
command
- triggered datasette controlpublic final void setMotor(boolean flag)
flag
- motor on/offpublic final void toggleWriteBit(boolean writeBit)
writeBit
- toggle statepublic boolean getMotor()
public int getCounter()
public float getProgress()
public boolean getTapeSense()
public abstract void setFlag(boolean flag)
flag
- interrupt flagpublic Datasette.DatasetteStatus getStatus()
public TapeImage getTapeImage()
Copyright © 2018 Ken Händel. All rights reserved.