Changeset 572daa7 in buchla-68k
- Timestamp:
- 11/11/2017 10:25:27 PM (7 years ago)
- Branches:
- master
- Children:
- 5c977dd
- Parents:
- 8cc57e6
- Location:
- ram
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/ptselbx.c
r8cc57e6 r572daa7 111 111 int16_t fpuetab[] = { 11, 1, 2, 3, 9 }; 112 112 113 int16_t dfsttab[] = { 0x0000, 0x8000, 0x1100, 0x1180 };113 uint16_t dfsttab[] = { 0x0000, 0x8000, 0x1100, 0x1180 }; 114 114 115 115 int16_t defcols[] = { 2, 6, 7, 8}; /* def data entry columns */ … … 459 459 } 460 460 461 stim = ltemp - 1;461 stim = (int16_t)(ltemp - 1); 462 462 463 463 if (port EQ 2) { … … 480 480 } 481 481 482 chan = ltemp - 1;482 chan = (int16_t)(ltemp - 1); 483 483 } 484 484 485 485 if (n) 486 ptestm = (ptestm & 0x8000) | (port << 11) | (chan << 7) | stim; 486 ptestm = (ptestm & 0x8000) | ((uint16_t)port << 11) | 487 ((uint16_t)chan << 7) | (uint16_t)stim; 487 488 else 488 ptedef = (ptedef & 0x8000) | (port << 11) | (chan << 7) | stim; 489 ptedef = (ptedef & 0x8000) | ((uint16_t)port << 11) | 490 ((uint16_t)chan << 7) | (uint16_t)stim; 489 491 490 492 } else if ((port EQ 2) AND (chan EQ 2)) { /* Trig */ … … 503 505 } 504 506 505 stim = ltemp - 1;507 stim = (int16_t)(ltemp - 1); 506 508 507 509 if (n) 508 ptestm = 0x1100 | stim;510 ptestm = 0x1100 | (uint16_t)stim; 509 511 else 510 ptedef = 0x1100 | stim;512 ptedef = 0x1100 | (uint16_t)stim; 511 513 512 514 } else if ((port EQ 2) AND (chan EQ 3)) { /* Pulse */ … … 521 523 } 522 524 523 stim = ltemp - 1;525 stim = (int16_t)(ltemp - 1); 524 526 525 527 if (n) 526 ptestm = 0x1180 | stim;528 ptestm = 0x1180 | (uint16_t)stim; 527 529 else 528 ptedef = 0x1180 | stim;530 ptedef = 0x1180 | (uint16_t)stim; 529 531 530 532 } else { … … 585 587 } 586 588 587 stim = ltemp - 1;589 stim = (int16_t)(ltemp - 1); 588 590 ltemp = 0; 589 591 left = 36; … … 599 601 } 600 602 601 chan = ltemp - 1;603 chan = (int16_t)(ltemp - 1); 602 604 603 605 if (ptdebuf[34] EQ 'L') { … … 611 613 } 612 614 613 ptesuba = ( port << 11) | (chan << 7) |stim;615 ptesuba = ((uint16_t)port << 11) | ((uint16_t)chan << 7) | (uint16_t)stim; 614 616 break; 615 617 … … 629 631 } 630 632 631 stim = ltemp - 1;632 ptesuba = 0x1100 | stim;633 stim = (int16_t)(ltemp - 1); 634 ptesuba = 0x1100 | (uint16_t)stim; 633 635 break; 634 636 635 637 case 2: /* pulse */ 636 638 637 ptesuba = ptdebuf[34] - '1';639 ptesuba = (uint16_t)(ptdebuf[34] - '1'); 638 640 break; 639 641 640 642 case 3: /* led */ 641 643 642 ptesuba = ptdebuf[32] - 'A';644 ptesuba = (uint16_t)(ptdebuf[32] - 'A'); 643 645 break; 644 646 … … 658 660 } 659 661 660 ptesuba = ltemp - 1;662 ptesuba = (uint16_t)(ltemp - 1); 661 663 break; 662 664 … … 683 685 684 686 --stim; 685 ptesuba = stim << 8;687 ptesuba = (uint16_t)stim << 8; 686 688 break; 687 689 688 690 case 8: /* vlt */ 689 691 690 ptesuba = ptdebuf[32] - '0';692 ptesuba = (uint16_t)(ptdebuf[32] - '0'); 691 693 break; 692 694 … … 706 708 707 709 --stim; 708 ptesuba = ( stim << 8) |(ptdebuf[32] - '0');710 ptesuba = ((uint16_t)stim << 8) | (uint16_t)(ptdebuf[32] - '0'); 709 711 break; 710 712 … … 895 897 } 896 898 897 ptedat2 = i;899 ptedat2 = (uint16_t)i; 898 900 epatch(); /* enter -- multiplier */ 899 901 return(SUCCESS); … … 938 940 ltemp = -ltemp; 939 941 940 ptedat2 = ltemp << 5;942 ptedat2 = (uint16_t)(ltemp << 5); 941 943 epatch(); /* enter -- value */ 942 944 return(SUCCESS); … … 959 961 ltemp = -ltemp; 960 962 961 ptedat2 = ltemp << 1;963 ptedat2 = (uint16_t)(ltemp << 1); 962 964 epatch(); /* enter -- interval */ 963 965 return(SUCCESS); … … 965 967 case 5: /* ratio -- 9/9 */ 966 968 967 ptedat2 = ndvals[ptdebuf[42] - '0'] -968 ndvals[ptdebuf[44] - '0'];969 ptedat2 = (uint16_t)(ndvals[ptdebuf[42] - '0'] - 970 ndvals[ptdebuf[44] - '0']); 969 971 970 972 epatch(); /* enter -- ratio */ … … 983 985 } 984 986 985 ptedat2 = ltemp << 1;987 ptedat2 = (uint16_t)(ltemp << 1); 986 988 epatch(); /* enter -- frequency */ 987 989 return(SUCCESS); … … 997 999 } 998 1000 999 ptedat2 = cents;1001 ptedat2 = (uint16_t)cents; 1000 1002 epatch(); /* enter - pitch */ 1001 1003 return(SUCCESS); … … 1038 1040 } 1039 1041 1040 ptedat2 = ltemp;1042 ptedat2 = (uint16_t)ltemp; 1041 1043 epatch(); /* enter -- register | value */ 1042 1044 return(SUCCESS); … … 1049 1051 ltemp = (ltemp * 10) + (ptdebuf[i] - '0'); 1050 1052 1051 ptedat1 = ltemp;1053 ptedat1 = (uint16_t)ltemp; 1052 1054 epatch(); /* enter -- sequence line */ 1053 1055 return(SUCCESS); … … 1062 1064 ltemp = (ltemp << 2) | (ptdebuf[i] - '0'); 1063 1065 1064 ptedat1 = ltemp << 8;1066 ptedat1 = (uint16_t)(ltemp << 8); 1065 1067 1066 1068 } else { … … 1069 1071 ltemp = (ltemp << 2) | (ptdebuf[i] - '0'); 1070 1072 1071 ptedat1 = ltemp << 10;1073 ptedat1 = (uint16_t)(ltemp << 10); 1072 1074 } 1073 1075 … … 1087 1089 } 1088 1090 1089 ptedat1 = ltemp;1091 ptedat1 = (uint16_t)ltemp; 1090 1092 epatch(); /* enter -- instrument number */ 1091 1093 return(SUCCESS); … … 1102 1104 } 1103 1105 1104 ptedat1 = ltemp;1106 ptedat1 = (uint16_t)ltemp; 1105 1107 epatch(); /* enter -- waveshape number */ 1106 1108 return(SUCCESS); … … 1117 1119 } 1118 1120 1119 ptedat1 = ltemp;1121 ptedat1 = (uint16_t)ltemp; 1120 1122 epatch(); /* enter -- configuration number */ 1121 1123 return(SUCCESS); … … 1123 1125 case 18: /* tuning table number */ 1124 1126 1125 ptedat1 = ptdebuf[42] - '0';1127 ptedat1 = (uint16_t)(ptdebuf[42] - '0'); 1126 1128 epatch(); /* enter -- tuning table number */ 1127 1129 return(SUCCESS); … … 1210 1212 ptbflag = TRUE; 1211 1213 1212 ptedat2 = datasrc[box - 36];1214 ptedat2 = (uint16_t)datasrc[box - 36]; 1213 1215 1214 1216 strcpy(&ptdebuf[42], smdata[ptedat2]); … … 1235 1237 ptedest = destfmt[i]; 1236 1238 ptedata = datafmt[i]; 1237 ptespec = ptt;1239 ptespec = (uint16_t)ptt; 1238 1240 ptesuba = 0x0000; 1239 1241 ptedat1 = 0x0000; … … 1243 1245 1244 1246 if (ptd & 1) 1245 ptedat1 = desdat1[i];1247 ptedat1 = (uint16_t)desdat1[i]; 1246 1248 1247 1249 if (ptd & 2) 1248 ptedat2 = desdat2[i];1250 ptedat2 = (uint16_t)desdat2[i]; 1249 1251 } 1250 1252 … … 1271 1273 ptbflag = TRUE; 1272 1274 1273 ptedat1 = omtabl[i];1274 ptedat2 = omdtab[i];1275 ptedat1 = (uint16_t)omtabl[i]; 1276 ptedat2 = (uint16_t)omdtab[i]; 1275 1277 1276 1278 ptedata = omftab[i]; … … 1304 1306 ptbflag = TRUE; 1305 1307 1306 ptedat1 = i;1307 ptedat2 = fpudtab[i];1308 ptedat1 = (uint16_t)i; 1309 ptedat2 = (uint16_t)fpudtab[i]; 1308 1310 1309 1311 ptedata = fpuetab[i]; -
ram/ptselbx.x
r8cc57e6 r572daa7 25 25 extern int8_t destfmt[]; 26 26 extern int16_t destype[]; 27 extern int16_tdfsttab[];27 extern uint16_t dfsttab[]; 28 28 extern int16_t dfsttp[]; 29 29 extern int16_t dstcols[];
Note:
See TracChangeset
for help on using the changeset viewer.