Index: include/instdsp.h
===================================================================
--- include/instdsp.h	(revision f40a3096572fd1b0696a7f7c717464e68652e655)
+++ include/instdsp.h	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
@@ -117,12 +117,12 @@
 
 	struct	pflent	*nextpf;	/* next entry pointer */
-	unsigned	pftrig;		/* trigger number */
-	unsigned	pfvpval;	/* voice / parameter number */
-	long		d1reg;		/* D1 register contents */
-	long		d2reg;		/* D2 register contents */
-	long		d4reg;		/* D4 register contents */
-	char		*a1reg;		/* A1 register contents */
-	char		*a2reg;		/* A2 register contents */
-	char		*a3reg;		/* A3 register contents */
+	uint16_t	pftrig;		/* trigger number */
+	uint16_t	pfvpval;	/* voice / parameter number */
+	int32_t		d1reg;		/* D1 register contents */
+	int32_t		d2reg;		/* D2 register contents */
+	int32_t		d4reg;		/* D4 register contents */
+	int8_t		*a1reg;		/* A1 register contents */
+	int8_t		*a2reg;		/* A2 register contents */
+	int8_t		*a3reg;		/* A3 register contents */
 };
 
@@ -135,10 +135,10 @@
 struct	instpnt	{	/* function point definition */
 
-	short	iptim;		/* time (packed) */
-	short	ipval;		/* value */
-	short	ipvmlt;		/* value multiplier */
-
-	char	ipvsrc;		/* value source */
-	char	ipact;		/* action code */
+	int16_t	iptim;		/* time (packed) */
+	int16_t	ipval;		/* value */
+	int16_t	ipvmlt;		/* value multiplier */
+
+	int8_t	ipvsrc;		/* value source */
+	int8_t	ipact;		/* action code */
 
 #define	AC_NULL		0	/* null action */
@@ -151,9 +151,9 @@
 #define	AC_UNDF		7	/* -- undefined - treated as AC_NULL -- */
 
-	char	ippar1;		/* action parameter 1  (point) */
-	char	ippar2;		/* action parameter 2  (count) */
-
-	char	ippar3;		/* action parameter 3  (counter) */
-	char	ippad;		/* padding for even boundary */
+	int8_t	ippar1;		/* action parameter 1  (point) */
+	int8_t	ippar2;		/* action parameter 2  (count) */
+
+	int8_t	ippar3;		/* action parameter 3  (counter) */
+	int8_t	ippad;		/* padding for even boundary */
 };
 
@@ -166,12 +166,12 @@
 struct	idfnhdr	{	/* function header */
 
-	short	idfpch;		/* pitch (used for freq1 only) */
-	short	idfmlt;		/* overall value multiplier (-1 .. +1) */
-
-	char	idfsrc;		/* overall value source */
-	char	idfpif;		/* points in the function */
-
-	char	idfpt1;		/* index of first point (0..NIPTS) */
-	char	idftmd;		/* trigger mode and control bits */
+	int16_t	idfpch;		/* pitch (used for freq1 only) */
+	int16_t	idfmlt;		/* overall value multiplier (-1 .. +1) */
+
+	int8_t	idfsrc;		/* overall value source */
+	int8_t	idfpif;		/* points in the function */
+
+	int8_t	idfpt1;		/* index of first point (0..NIPTS) */
+	int8_t	idftmd;		/* trigger mode and control bits */
 
 #define	I_TM_KEY	0x01	/* trigger on key closure */
@@ -181,8 +181,8 @@
 #define	I_VNSUBN	0x08	/* new value sub-n bit    (matches hardware) */
 
-	char	idfcpt;		/* index of current point (0..NIPTS) */
-	char	idfprm;		/* parameter associated with this function */
-
-	short	idftrg;		/* trigger that started the function */
+	int8_t	idfcpt;		/* index of current point (0..NIPTS) */
+	int8_t	idfprm;		/* parameter associated with this function */
+
+	int16_t	idftrg;		/* trigger that started the function */
 };
 
@@ -195,21 +195,21 @@
 struct	instdef	{	/* instrument definition */
 
-	short	idhflag;		/* flags */
-
-	char	idhname[MAXIDLN+1];	/* instrument name */
-	char	idhcom1[MAXIDLN+1];	/* first line of comments */
-	char	idhcom2[MAXIDLN+1];	/* second line of comments */
-	char	idhcom3[MAXIDLN+1];	/* third line of comments */
-
-	char	idhcfg;			/* configuration byte */
-	char	idhplft;		/* points unused */
-
-	char	idhwsa;			/* waveshape A library number */
-	char	idhwsb;			/* waveshape B library number */
-
-	char	idhos1c;		/* oscillator 1 controls */
-	char	idhos2c;		/* oscillator 2 controls */
-	char	idhos3c;		/* oscillator 3 controls */
-	char	idhos4c;		/* oscillator 4 controls */
+	int16_t	idhflag;		/* flags */
+
+	int8_t	idhname[MAXIDLN+1];	/* instrument name */
+	int8_t	idhcom1[MAXIDLN+1];	/* first line of comments */
+	int8_t	idhcom2[MAXIDLN+1];	/* second line of comments */
+	int8_t	idhcom3[MAXIDLN+1];	/* third line of comments */
+
+	int8_t	idhcfg;			/* configuration byte */
+	int8_t	idhplft;		/* points unused */
+
+	int8_t	idhwsa;			/* waveshape A library number */
+	int8_t	idhwsb;			/* waveshape B library number */
+
+	int8_t	idhos1c;		/* oscillator 1 controls */
+	int8_t	idhos2c;		/* oscillator 2 controls */
+	int8_t	idhos3c;		/* oscillator 3 controls */
+	int8_t	idhos4c;		/* oscillator 4 controls */
 
 #define	OC_MOD		0x0003		/* oscillator mode mask */
@@ -222,8 +222,8 @@
 #define	OC_SYN		0x0004		/* oscillator in sync mode */
 
-	short	idhos1v;		/* oscillator 1 value */
-	short	idhos2v;		/* oscillator 2 value */
-	short	idhos3v;		/* oscillator 3 value */
-	short	idhos4v;		/* oscillator 4 value */
+	int16_t	idhos1v;		/* oscillator 1 value */
+	int16_t	idhos2v;		/* oscillator 2 value */
+	int16_t	idhos3v;		/* oscillator 3 value */
+	int16_t	idhos4v;		/* oscillator 4 value */
 
 	struct	idfnhdr	idhfnc[NFINST];	/* function headers */
@@ -231,11 +231,11 @@
 	struct	instpnt	idhpnt[NIPNTS];	/* point table */
 
-	short	idhwvaf[NUMWPNT];	/* waveshape A final values */
-	short	idhwvao[NUMWPNT];	/* waveshape A offset values */
-	short	idhwvah[NUMHARM];	/* waveshape A harmonic values */
-
-	short	idhwvbf[NUMWPNT];	/* waveshape B final values */
-	short	idhwvbo[NUMWPNT];	/* waveshape B offset values */
-	short	idhwvbh[NUMHARM];	/* waveshape B harmonic values */
-
-};
+	int16_t	idhwvaf[NUMWPNT];	/* waveshape A final values */
+	int16_t	idhwvao[NUMWPNT];	/* waveshape A offset values */
+	int16_t	idhwvah[NUMHARM];	/* waveshape A harmonic values */
+
+	int16_t	idhwvbf[NUMWPNT];	/* waveshape B final values */
+	int16_t	idhwvbo[NUMWPNT];	/* waveshape B offset values */
+	int16_t	idhwvbh[NUMHARM];	/* waveshape B harmonic values */
+
+};
