- Timestamp:
- 11/12/2017 08:06:17 PM (7 years ago)
- Branches:
- master
- Children:
- 2da8254
- Parents:
- 7f5fa1b
- Location:
- ram
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/ptfield.c
r7f5fa1b ra3eb131 180 180 void ptxkey(void) 181 181 { 182 register int16_t i, cp, pp, sp, stm; 182 int16_t i, cp, pp, sp; 183 uint16_t stm; 183 184 184 185 if (NOT astat) /* only on key closures ... */ … … 401 402 { 402 403 static int8_t buf[32]; 403 uint16_t sgn, vp1, vp2; 404 int16_t sgn, vp1, vp2; 405 uint16_t vp3; 404 406 int16_t val; 405 407 406 val = pp->padat2;408 val = (int16_t)pp->padat2; 407 409 408 410 switch (pp->padat1) { … … 452 454 } 453 455 454 sprintf(buf, "%c% u.%02u", sgn, vp1, vp2);456 sprintf(buf, "%c%d.%02d", sgn, vp1, vp2); 455 457 break; 456 458 457 459 case PSA_TIM: /* time */ 458 460 459 vp 1 = fromfpu(val);460 461 sprintf(buf, "%5u", vp 1);461 vp3 = fromfpu((uint16_t)val); 462 463 sprintf(buf, "%5u", vp3); 462 464 break; 463 465 … … 488 490 */ 489 491 490 void pafpu1(int8_t *bf, int8_t *ad, uint16_t gt, uint16_t gn, struct patch *pp)492 void pafpu1(int8_t *bf, int8_t *ad, int16_t gt, int16_t gn, struct patch *pp) 491 493 { 492 494 sprintf(bf, "%s %s %c%c %s", ad, stdata[pp->padat1], gt, gn, dfpdat(pp)); … … 501 503 */ 502 504 503 void pafpu2(int8_t *bf, int8_t *ad, uint16_t os, uint16_t gt, uint16_t gn, struct patch *pp)505 void pafpu2(int8_t *bf, int8_t *ad, int16_t os, int16_t gt, int16_t gn, struct patch *pp) 504 506 { 505 507 sprintf(bf, "%s %d %s %c%c %s", ad, os, stdata[pp->padat1], gt, gn, dfpdat(pp)); … … 527 529 void dspdest(int8_t *buf, struct patch *pp) 528 530 { 529 uint16_t chan, osc, port, stim, vg, vgt, vgn, vp1, vp2, sgn;531 int16_t chan, osc, port, stim, vg, vgt, vgn, vp1, vp2, sgn; 530 532 int16_t val; 531 533 int8_t buf2[16], *rtype; … … 535 537 stim = pp->pasuba & 0x007F; 536 538 537 vg = ( pp->pasuba >> 8) & 0x00FF;/* for vg types */538 osc = ( pp->pasuba & 0x00FF) + 1;539 vg = (int16_t)((pp->pasuba >> 8) & 0x00FF); /* for vg types */ 540 osc = (int16_t)((pp->pasuba & 0x00FF) + 1); 539 541 540 542 if (vg > 11) { … … 549 551 } 550 552 551 vgn = vgn + ((vgn > 9) ? '\242' : '0');553 vgn = vgn + ((vgn > 9) ? (uint8_t)'\242' : '0'); 552 554 553 555 … … 642 644 } else { 643 645 644 if ((val = pp->padat2) < 0) {646 if ((val = (int16_t)pp->padat2) < 0) { 645 647 646 648 sgn = '-'; … … 668 670 case PA_OSC: 669 671 670 val = pp->padat2 >> 1;672 val = (int16_t)(pp->padat2 >> 1); 671 673 672 674 switch (pp->padat1) { -
ram/ptfield.x
r7f5fa1b ra3eb131 33 33 extern void dspdest(int8_t *buf, struct patch *pp); 34 34 extern void dspdfst(int8_t *buf, uint16_t val); 35 extern void pafpu1(int8_t *bf, int8_t *ad, uint16_t gt, uint16_t gn, struct patch *pp);36 extern void pafpu2(int8_t *bf, int8_t *ad, uint16_t os, uint16_t gt, uint16_t gn, struct patch *pp);35 extern void pafpu1(int8_t *bf, int8_t *ad, int16_t gt, int16_t gn, struct patch *pp); 36 extern void pafpu2(int8_t *bf, int8_t *ad, int16_t os, int16_t gt, int16_t gn, struct patch *pp); 37 37 extern void pafpu3(int8_t *bf, int8_t *ad, struct patch *pp); 38 38 extern void ptekey(void);
Note:
See TracChangeset
for help on using the changeset viewer.