Klasse NetSIDClient

java.lang.Object
builder.netsiddev.NetSIDClient

public class NetSIDClient extends Object
  • 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

      private NetSIDDevConnection connection
    • version

      private static byte version
    • context

      private final EventScheduler context
    • commands

      private final List<NetSIDPkg> commands
    • tryWrite

      private TryWrite tryWrite
    • readResult

      private byte readResult
    • configName

      private String configName
    • lastSIDWriteTime

      private long lastSIDWriteTime
    • fastForwardFactor

      private int fastForwardFactor
    • event

      private final Event event
  • Konstruktordetails

    • NetSIDClient

      public NetSIDClient(EventScheduler context, IEmulationSection emulationSection)
      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

      private AbstractMap.SimpleImmutableEntry<ChipModel,String> sendReceiveConfig(NetSIDPkg cmd)
    • sendReceive

      private byte sendReceive(NetSIDPkg cmd)
    • addAndSend

      final void addAndSend(NetSIDPkg cmd)
    • add

      final boolean add(NetSIDPkg cmd)
    • 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:
      InterruptedException
      IOException
    • flush

      private Response flush(boolean giveUpIfBusy) throws IOException, InterruptedException
      Löst aus:
      IOException
      InterruptedException
    • readResponse

      private byte readResponse() throws IOException
      Löst aus:
      IOException
    • sleepDependingOnCyclesSent

      private void sleepDependingOnCyclesSent() throws InterruptedException
      Löst aus:
      InterruptedException
    • maybeSendWritesToServer

      private Response maybeSendWritesToServer() throws IOException, InterruptedException
      Flush writes after a bit of buffering
      Löst aus:
      IOException
      InterruptedException
    • 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()