1 #ifndef GSID_H 2 #define GSID_H 3 4 #define NUMSIDREGS 0x19 5 #define SIDWRITEDELAY 14 // lda $xxxx,x 4 cycles, sta $d400,x 5 cycles, dex 2 cycles, bpl 3 cycles 6 7 #ifdef __cplusplus 8 extern "C" { 9 #endif 10 11 typedef struct 12 { 13 float distortionrate; 14 float distortionpoint; 15 float distortioncfthreshold; 16 float type3baseresistance; 17 float type3offset; 18 float type3steepness; 19 float type3minimumfetresistance; 20 float type4k; 21 float type4b; 22 float voicenonlinearity; 23 } FILTERPARAMS; 24 25 void sid_init(int speed, unsigned m, unsigned ntsc, unsigned interpolate, unsigned customclockrate, unsigned usefp); 26 int sid_fillbuffer(short *ptr, int samples); 27 unsigned char sid_getorder(unsigned char index); 28 29 #ifndef GSID_C 30 extern unsigned char sidreg[NUMSIDREGS]; 31 extern FILTERPARAMS filterparams; 32 #endif 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 #endif 39