Changeset f70aaad in buchla-68k


Ignore:
Timestamp:
11/12/2017 08:18:52 PM (6 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
f798356
Parents:
a4bd34f
Message:

Fixed instdstp.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/instdsp.c

    ra4bd34f rf70aaad  
    186186        register struct instpnt *pt1, *pt2;
    187187        register int16_t i, npt1, npt2, xp;
    188         register uint16_t color;
    189188        int16_t np, ptx, pty, ptc;
    190189
     
    201200        pt1 = &ip->idhpnt[fp->idfpt1];          /* left endpoint of line */
    202201        pt2 = pt1 + 1;                          /* right endpoint of line */
    203 
    204         color = exp_c(pen);     /* replicate 4 bit 'pen' for 16 bit 'color' */
    205 
    206202
    207203        ptx = ttox(timeto(fn, npt1), wn);
     
    257253                        lseg(ttox(timeto(fn, npt1), wn),
    258254                                vtoy((pt1->ipval >> 5), wn),
    259                                 ptx, pty, color);
     255                                ptx, pty, pen);
    260256
    261257                        if (wn EQ 12) {
     
    349345void dosync(int16_t vce)
    350346{
    351         register int16_t sync;
    352         register struct instdef *ip;
     347        uint16_t sync;
     348        struct instdef *ip;
    353349
    354350        ip = &vbufs[vce];
    355         sync = ip->idhcfg << 8;
     351        sync = (uint16_t)ip->idhcfg << 8;
    356352
    357353        if (ip->idhos1c & OC_SYN)
     
    364360                sync |= 0x8000;
    365361
    366         *(io_fpu + vce + (int32_t)FPU_OCFG) = sync;
     362        *(io_fpu + vce + FPU_OCFG) = sync;
    367363}
    368364
     
    413409
    414410                        cnvc2p(idbuf, (frq >> 1));
    415                         idbuf[0] += '0';
    416                         idbuf[1] += 'A';
     411                        idbuf[0] = (int8_t)(idbuf[0] + '0');
     412                        idbuf[1] = (int8_t)(idbuf[1] + 'A');
    417413                        idbuf[2] = sfdsp[idbuf[2]];
    418                         idbuf[3] += '0';
    419                         idbuf[4] += '0';
     414                        idbuf[3] = (int8_t)(idbuf[3] + '0');
     415                        idbuf[4] = (int8_t)(idbuf[4] + '0');
    420416                        idbuf[5] = '\0';
    421417                        break;
     
    442438
    443439                x = 382 + (i >> 1);
    444                 y = 348 - ((ws[i] ^ 0x8000) / 676);
     440                y = 348 - ((int16_t)(ws[i] ^ 0x8000) / 676);
    445441
    446442                idpoint(x, y, pen);
     
    459455        int8_t *s1;
    460456        int32_t tt, sc;
    461         register int16_t cx, pnt, par;
     457        uint16_t cx;
     458        register int16_t pnt, par;
    462459        register struct instdef *ip;
    463460        register struct idfnhdr *fp;
     
    477474        pp = &ip->idhpnt[curpnt];
    478475
    479         cx = idbox[n][5];
    480         cx |= cx << 4;
    481         cx |= cx << 8;
     476        cx = exp_c(idbox[n][5]);
    482477
    483478        /* first, fill the box with the background color */
     
    550545                sc = 1000L;
    551546                tt = timeto(curfunc, subj);
    552                 th = tt / sc;
    553                 tl = tt - (th * sc);
     547                th = (int16_t)(tt / sc);
     548                tl = (int16_t)(tt - (th * sc));
    554549
    555550                sprintf(bfs, "%02d.%03d", th, tl);
Note: See TracChangeset for help on using the changeset viewer.