Index: ram/ptselbx.c
===================================================================
--- ram/ptselbx.c	(revision 572daa7c12f5c9498343313d6d5350492c787d9e)
+++ ram/ptselbx.c	(revision f537c488e3ca6b17dfadd4ee520aa9bb0c36d7ae)
@@ -58,7 +58,7 @@
 struct patch	ptebuf;		/* pte buffer -- patch table format */
 
-int8_t	ptdebuf[50];		/* patch edit buffer */
-
-int8_t	*rawdfst[] = {		/* def/stm field initial contents */
+int8_t		ptdebuf[50];	/* patch edit buffer */
+
+int8_t		*rawdfst[] = {		/* def/stm field initial contents */
 
 	"Key 001 1 01",
@@ -68,5 +68,5 @@
 };
 
-int8_t	*rawdest[] = {		/* destination field initial contents */
+int8_t		*rawdest[] = {		/* destination field initial contents */
 
 	"??????? 00 ??",	/* ??????	00 */
@@ -99,22 +99,22 @@
 };
 
-int8_t	*rawmode[] = { "Frq ",  "Pch ",   "Int ",  "Rat " };	/* oscillator modes */
-int8_t	*rawmdat[] = { "00.1 ", "0C 00",  "+0000", "1/1  " };	/* oscillator data */
-
-int16_t	omtabl[]   = { PSO_FRQ, PSO_PCH, PSO_INT, PSO_RAT };	/* oscillator modes */
-int16_t	omdtab[]   = { 2,       320,     0,       0       };	/* oscillator data */
-int16_t	omftab[]   = { 6,       7,       4,       5       };	/* mode data format */
-
-int8_t	*rawfpud[] = { "PchWh", "+0.00", "00001", "\2400.00", "Start" };
-
-int16_t	fpudtab[]  = { SM_HTPW,       0,          1,       0,	    1 };
-int16_t	fpuetab[]  = {      11,       1,          2,       3,       9 };
+int8_t		*rawmode[] = { "Frq ",  "Pch ",   "Int ",  "Rat " };	/* oscillator modes */
+int8_t		*rawmdat[] = { "00.1 ", "0C 00",  "+0000", "1/1  " };	/* oscillator data */
+
+uint16_t	omtabl[]   = { PSO_FRQ, PSO_PCH, PSO_INT, PSO_RAT };	/* oscillator modes */
+uint16_t	omdtab[]   = { 2,       320,     0,       0       };	/* oscillator data */
+int16_t		omftab[]   = { 6,       7,       4,       5       };	/* mode data format */
+
+int8_t		*rawfpud[] = { "PchWh", "+0.00", "00001", "\2400.00", "Start" };
+
+uint16_t	fpudtab[]  = { SM_HTPW,       0,          1,       0,	    1 };
+int16_t		fpuetab[]  = {      11,       1,          2,       3,       9 };
 
 uint16_t	dfsttab[] = { 0x0000, 0x8000, 0x1100, 0x1180 };
 
-int16_t	defcols[] = {  2,  6,  7,  8};	/* def data entry columns */
-int16_t	stmcols[] = { 15, 19, 20, 21};	/* stm data entry columns */
-
-int16_t	dstcols[] = {			/* destination data entry columns */
+int16_t		defcols[] = {  2,  6,  7,  8};	/* def data entry columns */
+int16_t		stmcols[] = { 15, 19, 20, 21};	/* stm data entry columns */
+
+int16_t		dstcols[] = {			/* destination data entry columns */
 
 /*	-1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10	*/
@@ -122,7 +122,7 @@
 };
 
-int16_t	dfsttp[] = { 1,  1,  2,  3 };	/* def/stm formats */
-
-int16_t	datasrc[] = {
+int16_t		dfsttp[] = { 1,  1,  2,  3 };	/* def/stm formats */
+
+uint16_t	datasrc[] = {
 
 	SM_HTPW,  SM_VTMW,  SM_LPBR,  SM_PED1,  SM_CTL1,
@@ -130,5 +130,5 @@
 };
 
-int16_t	destype[] = {			/* destination type table */
+int16_t		destype[] = {			/* destination type table */
 
 	PA_KEY,		-1,		PA_TRG,		PA_PLS,		PA_LED,
@@ -143,5 +143,5 @@
 };
 
-int8_t	destfmt[] = {		/* destination data entry format table */
+int8_t		destfmt[] = {		/* destination data entry format table */
 
 	 0,	-1,	 1,	 2,	 3,	/*  1 ..  5 */
@@ -153,5 +153,5 @@
 };
 
-int8_t	datafmt[] = {		/* datum data entry format table */
+int8_t		datafmt[] = {		/* datum data entry format table */
 
 	8,		-1,		9,		8,		14,
@@ -163,5 +163,5 @@
 };
 
-int8_t	desdatf[] = {		/* data entry default flags */
+int8_t		desdatf[] = {		/* data entry default flags */
 
 	2,		0,		2,		2,		1,
@@ -173,5 +173,5 @@
 };
 
-int16_t	desdat1[] = {		/* data word 1 defaults */
+uint16_t	desdat1[] = {		/* data word 1 defaults */
 
 	0,		0,		0,		0,		0,
@@ -183,5 +183,5 @@
 };
 
-int16_t	desdat2[] = {		/* data word 2 defaults */
+uint16_t	desdat2[] = {		/* data word 2 defaults */
 
 	0,		0,		1,		0,		0,
@@ -193,5 +193,5 @@
 };
 
-int8_t	*rawdata[] = {
+int8_t		*rawdata[] = {
 
 	"Trans",	"     ",	"Start",	"Trans",	"000  ",
@@ -203,5 +203,5 @@
 };
 
-int8_t	hilitab[][8] = {		/* submenu highlight table */
+int8_t		hilitab[][8] = {		/* submenu highlight table */
 
 	/* start, width, row1, row2, row3, row4, row5, pad */
@@ -1212,5 +1212,5 @@
 				ptbflag = TRUE;
 
-				ptedat2 = (uint16_t)datasrc[box - 36];
+				ptedat2 = datasrc[box - 36];
 
 				strcpy(&ptdebuf[42], smdata[ptedat2]);
@@ -1245,8 +1245,8 @@
 
 					if (ptd & 1)
-						ptedat1 = (uint16_t)desdat1[i];
+						ptedat1 = desdat1[i];
 
 					if (ptd & 2)
-						ptedat2 = (uint16_t)desdat2[i];
+						ptedat2 = desdat2[i];
 				}
 
@@ -1273,6 +1273,6 @@
 				ptbflag = TRUE;
 
-				ptedat1 = (uint16_t)omtabl[i];
-				ptedat2 = (uint16_t)omdtab[i];
+				ptedat1 = omtabl[i];
+				ptedat2 = omdtab[i];
 
 				ptedata = omftab[i];
