Package builder.netsiddev
Klasse NetSIDClient
java.lang.Object
builder.netsiddev.NetSIDClient
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprivate static final intprivate Stringprivate NetSIDDevConnectionprivate final EventSchedulerprivate static final intprivate final Eventprivate intprivate longprivate static final intprivate static final intprivate byteprivate static final intprivate TryWriteprivate static byte -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungNetSIDClient(EventScheduler context, IEmulationSection emulationSection) Establish a single instance connection to a NetworkSIDDevice. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung(Package privat) final boolean(Package privat) final voidaddAndSend(NetSIDPkg cmd) private voidAdd setting all SidModels to the first available configuration to the command queue to initialize server side properly.private intprivate longeventuallyDelay(byte sidNum) voidprivate Responseflush(boolean giveUpIfBusy) intbytevoidinit(byte volume) Initialize: Drop unprocessed writes and add flush and reset to the command queuebooleanprivate ResponseFlush writes after a bit of bufferingvoidbyteread(byte sidNum, byte addr) private byteprivate bytesendReceive(NetSIDPkg cmd) private void(Package privat) voidvoidstart()private bytetryRead(byte sidNum, int cycles, byte addr) Add a SID read to the ring buffer, then immediately send it to NetworkSIDDevice to be queued there and executed, since a SID read is implemented to be always the last command after a series of writesprivate ResponsetryWrite(byte sidNum, int cycles, byte reg, byte data) Add a SID write to the buffer, until it is full, then send it to NetworkSIDDevice to be queued there and executedvoidwrite(byte sidNum, byte addr, byte data)
-
Felddetails
-
CYCLES_TO_MILLIS
private static final int CYCLES_TO_MILLIS- Siehe auch:
-
MAX_WRITE_CYCLES
private static final int MAX_WRITE_CYCLES- Siehe auch:
-
MAX_BUFFER_SIZE
private static final int MAX_BUFFER_SIZE- Siehe auch:
-
BUFFER_NEAR_FULL
private static final int BUFFER_NEAR_FULL- Siehe auch:
-
REGULAR_DELAY
private static final int REGULAR_DELAY- Siehe auch:
-
connection
-
version
private static byte version -
context
-
commands
-
tryWrite
-
readResult
private byte readResult -
configName
-
lastSIDWriteTime
private long lastSIDWriteTime -
fastForwardFactor
private int fastForwardFactor -
event
-
-
Konstruktordetails
-
NetSIDClient
Establish a single instance connection to a NetworkSIDDevice. Always MAX_SIDS are reserved.- Parameter:
context- event context
-
-
Methodendetails
-
getVersion
public byte getVersion() -
addSetSidModels
private void addSetSidModels()Add setting all SidModels to the first available configuration to the command queue to initialize server side properly. -
init
public void init(byte volume) Initialize: Drop unprocessed writes and add flush and reset to the command queue- Parameter:
volume- volume for reset
-
read
public byte read(byte sidNum, byte addr) -
write
public void write(byte sidNum, byte addr, byte data) -
sendReceiveConfig
-
sendReceive
-
addAndSend
-
add
-
softFlush
void softFlush() -
tryRead
private byte tryRead(byte sidNum, int cycles, byte addr) Add a SID read to the ring buffer, then immediately send it to NetworkSIDDevice to be queued there and executed, since a SID read is implemented to be always the last command after a series of writes -
tryWrite
private Response tryWrite(byte sidNum, int cycles, byte reg, byte data) throws InterruptedException, IOException Add a SID write to the buffer, until it is full, then send it to NetworkSIDDevice to be queued there and executed- Löst aus:
InterruptedExceptionIOException
-
flush
- Löst aus:
IOExceptionInterruptedException
-
readResponse
- Löst aus:
IOException
-
sleepDependingOnCyclesSent
- Löst aus:
InterruptedException
-
maybeSendWritesToServer
Flush writes after a bit of buffering- Löst aus:
IOExceptionInterruptedException
-
clocksSinceLastAccess
private int clocksSinceLastAccess() -
eventuallyDelay
private long eventuallyDelay(byte sidNum) -
start
public void start() -
fastForward
public void fastForward() -
normalSpeed
public void normalSpeed() -
isFastForward
public boolean isFastForward() -
getFastForwardBitMask
public int getFastForwardBitMask()
-