Changeset 5289d7c in buchla-68k
- Timestamp:
- 11/12/2017 07:35:23 PM (7 years ago)
- Branches:
- master
- Children:
- 908b6ab
- Parents:
- 3fcb810
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/msl.c
r3fcb810 r5289d7c 57 57 struct s_entry *ep; 58 58 int16_t i, ti, val; 59 uint16_t chan, crel, oldsr, port, trg, trig, vel; 59 uint16_t crel, oldsr; 60 int16_t chan, port, trg, trig, vel; 60 61 int16_t esi, newsig, oldclk, oldrec; 61 62 int32_t fctemp; … … 251 252 ep->e_time = t_cur; 252 253 ep->e_type = EV_ANVL; 253 ep->e_data1 = i;254 ep->e_data1 = (int8_t)i; 254 255 ep->e_dn = (struct s_entry *)((int32_t)val << 16); 255 256 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd; … … 286 287 ep->e_time = t_cur; 287 288 ep->e_type = EV_ANVL; 288 ep->e_data1 = 0x0010 | i;289 ep->e_data1 = (int8_t)(0x0010 | i); 289 290 ep->e_dn = (struct s_entry *)((int32_t)val << 16); 290 291 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd; … … 329 330 ep->e_time = t_cur; 330 331 ep->e_type = EV_ANVL; 331 ep->e_data1 = 0x0020 | i;332 ep->e_data1 = (int8_t)(0x0020 | i); 332 333 ep->e_dn = (struct s_entry *)((int32_t)val << 16); 333 334 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd; … … 393 394 ti = (int16_t)( (19200000L / ti) - 1); 394 395 #endif 395 TIME_T2H = ti >> 8;396 TIME_T2L = ti & 0x00FF;396 TIME_T2H = (uint8_t)(ti >> 8); 397 TIME_T2L = (uint8_t)(ti & 0x00FF); 397 398 398 399 if (tmpomlt EQ 50) { /* 0 */ … … 476 477 case 76: /* amplitude */ 477 478 478 aval += aval >> 2;479 480 if (aval > 127)481 aval = 127;482 483 amplval = (aval << 9) ^0x8000;479 aval += aval >> 2; 480 481 if (aval > 127) 482 aval = 127; 483 484 amplval = (aval << 9) ^ (int16_t)0x8000; 484 485 sendval(0, 0, amplval); 485 486 break; … … 502 503 ep->e_time = t_cur; 503 504 ep->e_type = EV_ANVL; 504 ep->e_data1 = 0x0040 | i;505 ep->e_data1 = (int8_t)(0x0040 | i); 505 506 ep->e_dn = (struct s_entry *)((int32_t)val << 16); 506 507 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd; … … 538 539 ep->e_time = t_cur; 539 540 ep->e_type = EV_ANVL; 540 ep->e_data1 = 0x0030 | i;541 ep->e_data1 = (int8_t)(0x0030 | i); 541 542 ep->e_dn = (struct s_entry *)((int32_t)val << 16); 542 543 p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
Note:
See TracChangeset
for help on using the changeset viewer.