Changeset fa50076 in buchla-68k for ram/initi.c


Ignore:
Timestamp:
11/12/2017 07:08:44 PM (6 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
26553e2
Parents:
c93e44d
Message:

Fixed initi.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/initi.c

    rc93e44d rfa50076  
    5858*/
    5959
    60 int16_t segtime(int16_t pn, uint16_t ptime)
     60uint16_t segtime(int16_t pn, uint16_t ptime)
    6161{
    6262        register struct instpnt *pp;
     
    102102*/
    103103
    104 int16_t timeto(int16_t fn, int16_t pj)
     104uint16_t timeto(int16_t fn, int16_t pj)
    105105{
    106106        register struct instdef *ip;
    107107        register struct instpnt *pt;
    108         register int16_t tf, pm, pn;
     108        register int16_t pm, pn;
     109        uint16_t tf;
    109110
    110111        ip = &vbufs[curvce];
     
    423424void initi(struct instdef *ip)
    424425{
    425         register int16_t i, mintfpu, rb;
     426        int16_t i, rb;
     427        uint16_t mintfpu;
    426428
    427429        memsetw(ip, 0, sizeof (struct instdef) / 2);
     
    433435
    434436        ip->idhplft = NIPNTS - NFINST;
    435         ip->idhcfg = (initcfg >> 8) & 0x00FF;
     437        ip->idhcfg = (int8_t)((initcfg >> 8) & 0x00FF);
    436438        mintfpu = tofpu(1);
    437439
     
    442444                rb = ((i < 4) AND (i NE 0)) ? 0 : I_NRATIO;
    443445                ip->idhfnc[i].idfpif = 1;
    444                 ip->idhfnc[i].idfpt1 = i;
    445                 ip->idhfnc[i].idftmd = (I_TM_KEY | 0x0010) | rb;
     446                ip->idhfnc[i].idfpt1 = (int8_t)i;
     447                ip->idhfnc[i].idftmd = (int8_t)((I_TM_KEY | 0x0010) | rb);
    446448
    447449                /* initialize the first point in the function */
     
    453455        for (i = 0; i < NUMWPNT; i++) {
    454456
    455                 ip->idhwvaf[i] = (ip->idhwvao[i] = 0x8000 ^ ((i + 1) << 8));
    456                 ip->idhwvbf[i] = (ip->idhwvbo[i] = 0x8000 ^ ((i + 1) << 8));
     457                ip->idhwvaf[i] = (ip->idhwvao[i] = (int16_t)0x8000 ^ ((i + 1) << 8));
     458                ip->idhwvbf[i] = (ip->idhwvbo[i] = (int16_t)0x8000 ^ ((i + 1) << 8));
    457459        }
    458460}
Note: See TracChangeset for help on using the changeset viewer.