/* */ #include #include #include #include #include #include /* starting address of xt rom f000:6000 */ /* add 100h for data, 300h for address */ unsigned int seg=0xF000; unsigned int offst=0x6000; void chkbd(void); void updtt0(void); void updtt1(void); void updtt2(void); void updtv0(void); void updtv1(void); void updtv2(void); int gch,gchs,gch2; int n=0,c,cv,ct; int csv0,csv1,csv2; int c0,c1,c2,c3,c4,c5; int c0t,c1t,c2t,c3t,c4t,c5t; int cv0,cv1,cv2,cv3,cv4,cv5; int ca0=1,ca1=1,ca2=1; int dvu,dv,vib,rt; main() {offst=readfil(); clrscr(); printf("Keyboard -- Ver 1.85b by Larry Battraw (c) 1990"); senddt0(7,248); senddt1(7,248); silence(); /* initialize channels for zero volume */ printf("\n\n\nDecay value (larger increases time)? "); scanf("%d",&dv); dvu=dv*8; /* printf("\nVRise time? "); scanf("%d",&rt); */ rt=dv*3/2; printf("\nVibrato value? "); scanf("%d",&vib); clrscr(); printf("Keyboard -- Ver 1.85b by Larry Battraw (c) 1990"); do { if(csv0>0) {csv0=csv0-1; cv0=csv0/dv; ch0v(cv0); ch3v(cv0); c0t=c0t+ca0; if(c0t>c0+vib || c0t0) {csv1=csv1-1; cv1=csv1/dv; ch1v(cv1); ch4v(cv1); c1t=c1t+ca1; if(c1t>c1+vib || c1t0) {csv2=csv2-1; cv2=csv2/dv; ch2v(cv2); ch5v(cv2); c2t=c2t+ca2; if(c2t>c2+vib || c2t0) {if(cv1>0) {if(cv2>0) {c0t=ct; updtt0(); if(csv0