Package builder.hardsid
Schnittstelle HardSID
- Alle Superschnittstellen:
com.sun.jna.Library
public interface HardSID
extends com.sun.jna.Library
Thanks to Wilfred for his excellent explanation:
Now-a-days there are SID chips that can act as 2 SID chips, like the SIDKick
Pico which the USBSID device supports. With this you have the same kind of
situation like with the HardSID devices that can have 1, 2 or 4 SID chips per
device. So for the USBSID, you can have 2 devices per SID socket. The USBSID
has 2 sockets and installing 2 SIDKick Pico SIDs, in theory you can have 4
SIDs playing.
In ACID64 for the HardSID device, I have 2 different functions which are
wrappers of the HardSID library:
get_dev_count
get_sid_count(dev_id)
One you know the device count, you can retrieve the number of SIDs of the
device by doing a get_sid_count and passing the device id.
Internally, I make a map of devices of all HardSID devices and all the
available SID sockets. The player just uses device ids and it is not aware of
multiple sockets on one device.
To make it more clear, when e.g. a HardSID 4U and a HardSID UPlay is
connected, the player will see 6 devices with there specific ID:
0: HardSID 4U SID1 1: HardSID 4U SID2 2: HardSID 4U SID3 3: HardSID 4U SID4
4: HardSID UPlay SID1 5: HardSID UPlay SID2
So when the player uses ID 5, I check the map and know that HardSID UPlay
device should be used and I have to write to SID2.
If you do this in Vice, Vice just needs to know the device IDs, and your
library will internally handle which device and socket you need to write to.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen com.sun.jna.Library
com.sun.jna.Library.Handler -
Feldübersicht
Von Schnittstelle geerbte Felder com.sun.jna.Library
OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungshortVeraltet.byteVeraltet.shortHardSID_Clock(byte DeviceID, byte preset) voidHardSID_Delay(byte DeviceID, short Cycles) bytebyteHardSID_ExternalTiming(byte DeviceID) voidHardSID_Filter(byte DeviceID, boolean filter) voidHardSID_Flush(byte DeviceID) Empties the devices FIFO without playing it (if supported)booleanHardSID_Group(byte deviceID, boolean enable, byte groupID) Add SID to group when enable is true.booleanHardSID_Lock(byte DeviceID) Lock SID to applicationvoidHardSID_Mute(byte DeviceID, byte voice, boolean mute) voidHardSID_Mute2(byte DeviceID, byte channel, boolean mute, boolean manual) Support whether the channel change was a request from the user or the program (auto or manual respectively).voidHardSID_MuteAll(byte DeviceID, boolean mute) voidEnable support for non hardsid hardware (e.g.byteHardSID_Read(byte DeviceID, short Cycles, byte SID_reg) voidHardSID_Reset(byte DeviceID) voidHardSID_Reset2(byte DeviceID, byte volume) Click reductionbyteHardSID_SIDCount(byte DeviceID) voidHardSID_SoftFlush(byte DeviceID) voidHardSID_Sync(byte DeviceID) Empties the devices FIFO by playing it (if supported)HardSID_Try_Write(byte DeviceID, short Cycles, byte SID_reg, byte data) If the hardware buffer is full then HardSID_Try_Write should return HSID_USB_WSTATE_BUSY.voidFree resources for dead-end functionsvoidHardSID_Unlock(byte DeviceID) shortInternal version number for this DLL e.g. 0x0202 (2.02)voidHardSID_Write(byte DeviceID, short Cycles, byte SID_reg, byte data) voidVeraltet.voidMuteHardSID(byte deviceID, byte channel, boolean mute) Veraltet.voidMuteHardSID_Line(boolean mute) Veraltet.voidMuteHardSIDAll(byte deviceID, boolean mute) Veraltet.byteReadFromHardSID(byte DeviceID, byte SID_reg) Veraltet.voidsetDebug(boolean enabled) Veraltet.voidWriteToHardSID(byte DeviceID, byte SID_reg, byte data) Veraltet.
-
Methodendetails
-
HardSID_Delay
void HardSID_Delay(byte DeviceID, short Cycles) -
HardSID_Devices
byte HardSID_Devices() -
HardSID_Filter
void HardSID_Filter(byte DeviceID, boolean filter) -
HardSID_Flush
void HardSID_Flush(byte DeviceID) Empties the devices FIFO without playing it (if supported) -
HardSID_Mute
void HardSID_Mute(byte DeviceID, byte voice, boolean mute) -
HardSID_MuteAll
void HardSID_MuteAll(byte DeviceID, boolean mute) -
HardSID_Read
byte HardSID_Read(byte DeviceID, short Cycles, byte SID_reg) -
HardSID_Reset
void HardSID_Reset(byte DeviceID) -
HardSID_Sync
void HardSID_Sync(byte DeviceID) Empties the devices FIFO by playing it (if supported) -
HardSID_Write
void HardSID_Write(byte DeviceID, short Cycles, byte SID_reg, byte data) -
HardSID_Version
short HardSID_Version()Internal version number for this DLL e.g. 0x0202 (2.02) -
GetHardSIDCount
Veraltet. -
InitHardSID_Mapper
Veraltet. -
MuteHardSID_Line
Veraltet. -
ReadFromHardSID
Veraltet. -
setDebug
Veraltet. -
WriteToHardSID
Veraltet. -
GetDLLVersion
Veraltet. -
MuteHardSID
Veraltet. -
MuteHardSIDAll
Veraltet. -
HardSID_Reset2
void HardSID_Reset2(byte DeviceID, byte volume) Click reduction- Seit:
- 2.04
-
HardSID_Lock
boolean HardSID_Lock(byte DeviceID) Lock SID to application- Seit:
- 2.04
-
HardSID_Unlock
void HardSID_Unlock(byte DeviceID) - Seit:
- 2.04
-
HardSID_Group
boolean HardSID_Group(byte deviceID, boolean enable, byte groupID) Add SID to group when enable is true. SID can only be added or moved to an existing group. If deviceID = groupID then a new group is created with the SID device becoming group master. Only writes to the master are played on the other grouped SIDs.- Seit:
- 2.04
-
HardSID_Mute2
void HardSID_Mute2(byte DeviceID, byte channel, boolean mute, boolean manual) Support whether the channel change was a request from the user or the program (auto or manual respectively). External mixers can use this to prioritize requests- Seit:
- 2.07
-
HardSID_OtherHardware
void HardSID_OtherHardware()Enable support for non hardsid hardware (e.g. Catweasel MK3/4)- Seit:
- 2.08
-
HardSID_Clock
short HardSID_Clock(byte DeviceID, byte preset) - Seit:
- 2.09
-
HardSID_SoftFlush
void HardSID_SoftFlush(byte DeviceID) - Seit:
- 2.09
-
HardSID_Try_Write
If the hardware buffer is full then HardSID_Try_Write should return HSID_USB_WSTATE_BUSY. Acid64 then keeps calling this method in a loop (with a certain delay of course) until HardSID_Try_Write returns any other state. You should return HSID_USB_WSTATE_OK when the buffer is send successfully to the hardware. The following states it can return: typedef enum {HSID_USB_WSTATE_OK = 1, HSID_USB_WSTATE_BUSY, HSID_USB_WSTATE_ERROR, HSID_USB_WSTATE_END} Also make sure in your implementation to kill the hardware buffer when HardSID_Flush is called.- Seit:
- 2.09
-
HardSID_Uninitialize
void HardSID_Uninitialize()Free resources for dead-end functions- Seit:
- 2.03
-
HardSID_SIDCount
byte HardSID_SIDCount(byte DeviceID) -
HardSID_ExternalTiming
byte HardSID_ExternalTiming(byte DeviceID) - Seit:
- 3.01
-