Index: ram/wsdsp.c
===================================================================
--- ram/wsdsp.c	(revision 0c834c599f225d78f3cee559f0421011b124be6d)
+++ ram/wsdsp.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
@@ -24,16 +24,16 @@
 /* things defined elsewhere */
 
-extern	unsigned	exp_c(unsigned c);
-
-extern	void	(*point)(short x, short y, short pen);
-
-extern	unsigned	*obj0;
-
-extern	char	bfs[];
-
-extern	char	*wdbxlb0[];
-extern	char	*wdbxlb1[];
-
-extern	short	wdbox[][8];
+extern	uint16_t	exp_c(uint16_t c);
+
+extern	void	(*point)(int16_t x, int16_t y, int16_t pen);
+
+extern	uint16_t	*obj0;
+
+extern	int8_t	bfs[];
+
+extern	int8_t	*wdbxlb0[];
+extern	int8_t	*wdbxlb1[];
+
+extern	int16_t	wdbox[][8];
 
 extern	struct	instdef	vbufs[];
@@ -43,32 +43,32 @@
 */
 
-extern	short	curinst;
-extern	short	curvce;
-extern	short	curwave;	/* current waveshape library slot */
-extern	short	curwdth;	/* current waveshape cursor width */
-extern	short	curwfnl;	/* current waveshape final value */
-extern	short	curwhrm;	/* current waveshape harmonic number */
-extern	short	curwhrv;	/* current waveshape harmonic value */
-extern	short	curwpnt;	/* current waveshape point number */
-extern	short	curwoff;	/* current waveshape offset value */
-extern	short	curwslt;	/* current waveshape instrument slot */
-extern	short	cxval;
-extern	short	cyval;
-extern	short	lstwoff;
-extern	short	lstwpnt;
-extern	short	stccol;
-extern	short	stcrow;
-extern	short	wpntsv;		/* waveshape point selection state variable */
-extern	short	wplast;
-extern	short	wvlast;
-
-extern	short	vmtab[NUMHARM];		/* harmonic table */
-extern	short	wsbuf[NUMWPCAL];	/* waveshape generation buffer */
-
-extern	long	vknm[NUMHARM][NUMWPCAL];	/* scaled harmonics */
-
-extern	unsigned *waveob;		/* waveshape display object pointer */
-
-extern	short	wsnmod[12][2];		/* waveshape number or data modified */
+extern	int16_t	curinst;
+extern	int16_t	curvce;
+extern	int16_t	curwave;	/* current waveshape library slot */
+extern	int16_t	curwdth;	/* current waveshape cursor width */
+extern	int16_t	curwfnl;	/* current waveshape final value */
+extern	int16_t	curwhrm;	/* current waveshape harmonic number */
+extern	int16_t	curwhrv;	/* current waveshape harmonic value */
+extern	int16_t	curwpnt;	/* current waveshape point number */
+extern	int16_t	curwoff;	/* current waveshape offset value */
+extern	int16_t	curwslt;	/* current waveshape instrument slot */
+extern	int16_t	cxval;
+extern	int16_t	cyval;
+extern	int16_t	lstwoff;
+extern	int16_t	lstwpnt;
+extern	int16_t	stccol;
+extern	int16_t	stcrow;
+extern	int16_t	wpntsv;		/* waveshape point selection state variable */
+extern	int16_t	wplast;
+extern	int16_t	wvlast;
+
+extern	int16_t	vmtab[NUMHARM];		/* harmonic table */
+extern	int16_t	wsbuf[NUMWPCAL];	/* waveshape generation buffer */
+
+extern	int32_t	vknm[NUMHARM][NUMWPCAL];	/* scaled harmonics */
+
+extern	uint16_t *waveob;		/* waveshape display object pointer */
+
+extern	int16_t	wsnmod[12][2];		/* waveshape number or data modified */
 
 extern	struct	wstbl	wslib[NUMWAVS];	/* waveshape library */
@@ -78,11 +78,11 @@
 /* forward references */
 
-void	wdpoint(short x, short y, short pen);
-
-/* 
-
-*/
-
-short	wavpal[16][3] = {	/* waveshape display color palette */
+void	wdpoint(int16_t x, int16_t y, int16_t pen);
+
+/* 
+
+*/
+
+int16_t	wavpal[16][3] = {	/* waveshape display color palette */
 
 	{0, 0, 0},	/* 0 */
@@ -116,5 +116,5 @@
 void advwcur(void)
 {
-	register short newcol;
+	register int16_t newcol;
 
 	newcol = stccol + 1;
@@ -134,7 +134,7 @@
 */
 
-void hdraw(short *hv, short h)
-{
-	register short  bc, bx, by, j;
+void hdraw(int16_t *hv, int16_t h)
+{
+	register int16_t  bc, bx, by, j;
 
 	bx = (h << 4) + 4;
@@ -168,10 +168,10 @@
 */
 
-void dsws(short how)
+void dsws(int16_t how)
 {
 	register struct instdef *ip;
-	register short *fv, *hv, *ov;
-	register short i;
-	short cx;
+	register int16_t *fv, *hv, *ov;
+	register int16_t i;
+	int16_t cx;
 
 	cx = exp_c(wdbox[0][0]);
@@ -221,8 +221,8 @@
 */
 
-void wdswin(short n)
-{
-	register short cx, wval;
-	register char wsgn;
+void wdswin(int16_t n)
+{
+	register int16_t cx, wval;
+	register int8_t wsgn;
 
 	cx = wdbox[n][5];
@@ -373,5 +373,5 @@
 void wwins(void)
 {
-	register short i;
+	register int16_t i;
 
 	for (i = 0; i < 6; i++)
@@ -385,5 +385,5 @@
 */
 
-void wdpoint(short x, short y, short pen)
+void wdpoint(int16_t x, int16_t y, int16_t pen)
 {
 	if (v_regs[5] & 0x0180)
@@ -473,5 +473,5 @@
 void iniwslb(void)
 {
-	register short i, j;
+	register int16_t i, j;
 
 	memsetw(wsnmod, FALSE, (sizeof wsnmod) / 2);
