Changeset 5289d7c in buchla-68k


Ignore:
Timestamp:
11/12/2017 07:35:23 PM (6 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
908b6ab
Parents:
3fcb810
Message:

Fixed msl.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/msl.c

    r3fcb810 r5289d7c  
    5757        struct s_entry *ep;
    5858        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;
    6061        int16_t esi, newsig, oldclk, oldrec;
    6162        int32_t fctemp;
     
    251252                                                                                ep->e_time = t_cur;
    252253                                                                                ep->e_type = EV_ANVL;
    253                                                                                 ep->e_data1 = i;
     254                                                                                ep->e_data1 = (int8_t)i;
    254255                                                                                ep->e_dn = (struct s_entry *)((int32_t)val << 16);
    255256                                                                                p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
     
    286287                                                                                ep->e_time = t_cur;
    287288                                                                                ep->e_type = EV_ANVL;
    288                                                                                 ep->e_data1 = 0x0010 | i;
     289                                                                                ep->e_data1 = (int8_t)(0x0010 | i);
    289290                                                                                ep->e_dn = (struct s_entry *)((int32_t)val << 16);
    290291                                                                                p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
     
    329330                                                                                ep->e_time = t_cur;
    330331                                                                                ep->e_type = EV_ANVL;
    331                                                                                 ep->e_data1 = 0x0020 | i;
     332                                                                                ep->e_data1 = (int8_t)(0x0020 | i);
    332333                                                                                ep->e_dn = (struct s_entry *)((int32_t)val << 16);
    333334                                                                                p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
     
    393394                                        ti  = (int16_t)( (19200000L / ti) - 1);
    394395#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);
    397398
    398399                                        if (tmpomlt EQ 50) {    /* 0 */
     
    476477                                case 76:                /* amplitude */
    477478
    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;
    484485                                        sendval(0, 0, amplval);
    485486                                        break;
     
    502503                                                                                ep->e_time = t_cur;
    503504                                                                                ep->e_type = EV_ANVL;
    504                                                                                 ep->e_data1 = 0x0040 | i;
     505                                                                                ep->e_data1 = (int8_t)(0x0040 | i);
    505506                                                                                ep->e_dn = (struct s_entry *)((int32_t)val << 16);
    506507                                                                                p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
     
    538539                                                                                ep->e_time = t_cur;
    539540                                                                                ep->e_type = EV_ANVL;
    540                                                                                 ep->e_data1 = 0x0030 | i;
     541                                                                                ep->e_data1 = (int8_t)(0x0030 | i);
    541542                                                                                ep->e_dn = (struct s_entry *)((int32_t)val << 16);
    542543                                                                                p_cur = e_ins(ep, ep_adj(p_cur, 0, t_cur))->e_fwd;
Note: See TracChangeset for help on using the changeset viewer.