Changeset 7258c6a in buchla-68k for ram/swinit.c


Ignore:
Timestamp:
07/09/2017 04:45:34 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
8618599
Parents:
0292fbb
Message:

Use standard integer types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/swinit.c

    r0292fbb r7258c6a  
    2222#include "wsdsp.h"
    2323
    24 extern  short   swctrl;
    25 extern  short   swdir;
    26 extern  short   swfiin;
    27 extern  short   swflag;
    28 
    29 extern  short   swfifo[NSWFIFO];
     24extern  int16_t swctrl;
     25extern  int16_t swdir;
     26extern  int16_t swfiin;
     27extern  int16_t swflag;
     28
     29extern  int16_t swfifo[NSWFIFO];
    3030
    3131/*
     
    4141
    4242void    (*curmove)(void);       /* cursor move function */
    43 short   (*curtype)(void);       /* cursor type function */
     43int16_t (*curtype)(void);       /* cursor type function */
    4444void    (*cx_key)(void);        /* x rate calculation */
    4545void    (*cx_upd)(void);        /* x update */
    4646void    (*cy_key)(void);        /* y rate calculation */
    4747void    (*cy_upd)(void);        /* y update */
    48 void    (*d_key)(short k);      /* in-field data key processor */
     48void    (*d_key)(int16_t k);    /* in-field data key processor */
    4949void    (*e_key)(void);         /* E key processor */
    5050void    (*m_key)(void);         /* M key processor */
    51 void    (*itxput)(short row, short col, char *txt, short tag);
     51void    (*itxput)(int16_t row, int16_t col, int8_t *txt, int16_t tag);
    5252                                /* instrument menu text put function */
    53 short   (*not_fld)(short k);    /* not-in-field data key processor */
    54 void    (*olddkey)(short k);    /* saved d_key value */
     53int16_t (*not_fld)(int16_t k);  /* not-in-field data key processor */
     54void    (*olddkey)(int16_t k);  /* saved d_key value */
    5555void    (*oldekey)(void);       /* saved e_key value */
    5656void    (*oldmkey)(void);       /* saved m_key value */
     
    6262void    (*vt_cdn)(void);        /* vtyper data cursor down function */
    6363void    (*vt_cup)(void);        /* vtyper data cursor up function */
    64 void    (*vt_dsp)(unsigned *obj, unsigned fg, unsigned bg, short row, short col, char *buf);
     64void    (*vt_dsp)(uint16_t *obj, uint16_t fg, uint16_t bg, int16_t row, int16_t col, int8_t *buf);
    6565                                /* vtyper display function */
    6666void    (*vt_stop)(void);       /* vtyper exit function */
     
    6969void    (*xy_up)(void);         /* cursor - finger off (up) */
    7070
    71 short   *cratex;                /* cursor x rate table pointer */
    72 short   *cratey;                /* cursor x rate table pointer */
    73 
    74 short   BotEdge;                /* configuration box bottom edge */
    75 short   LftEdge;                /* configuration box left edge */
    76 short   RgtEdge;                /* configuration box right edge */
    77 short   TopEdge;                /* configuration box top edge */
    78 
    79 short   BarBcur[14];            /* current bottom-zero bar values */
    80 short   BarCcur[14];            /* current centered-zero bar values */
    81 short   BGeq[14];               /* current EQ bar settings */
    82 short   BGother[14];            /* current other pot bar settings */
    83 short   BGprmtr[14];            /* current parameter pot bar settings */
    84 
    85 short   articen[12];            /* voice articulation enable status */
    86 short   grpdyn[12];             /* group dynamics table (0..9) */
    87 short   grploc[12];             /* group location table (0..8) */
    88 short   grpmode[12];            /* group mode - 0 = play, 1 = stdby, 2 = rec */
    89 short   grpsel[12];             /* group select status for instrument selection */
    90 short   grpstat[12];            /* group status - 0 = off, non-0 = on */
    91 short   grptmap[12];            /* group map */
    92 short   gtctab[12];             /* group to color table */
    93 short   ins2grp[12];            /* instrument to group table (00..NINST-1) */
    94 short   instmod[12];            /* intrument data modified */
    95 short   key2grp[88];            /* port 1 key to group assignment table */
    96 short   lastart[16];            /* last articulation values (by parameter) */
    97 short   lastvce[12];            /* last voice assigned in each group */
    98 short   lastvel[12];            /* last velocity sent to group */
    99 short   ldmap[N_SCORES];        /* gather read map */
    100 short   mctlnum[4];             /* MIDI controller number table (-1, 00..99) */
    101 short   mpbend[48];             /* MIDI pitch bend data, by port and channel */
    102 short   msmstv[3];              /* MIDI state machine state variables */
    103 short   offsets[NUMWPCAL];      /* offsets for current waveshape */
    104 short   oldtun[128];            /* previous tuning table for undo */
    105 short   prstab[NTRIGS];         /* pressure */
    106 short   s_inst[12];             /* instrument selections */
    107 short   s_trns[12];             /* current transposition values */
    108 short   swfifo[NSWFIFO];        /* scroll wheel fifo */
    109 short   txfifo[NTKFIFO];        /* trackball X fifo */
    110 short   tyfifo[NTKFIFO];        /* trackball Y fifo */
    111 short   tuntab[128];            /* current tuning table */
    112 short   vce2grp[12];            /* voice to group table (-1, 1..12)*/
    113 short   vce2trg[12];            /* voice to trigger map (-1 EQ NULL) */
    114 short   veltab[NTRIGS];         /* velocity */
    115 short   vmtab[NUMHARM];         /* harmonics for current waveshape */
    116 short   wsbuf[NUMWPCAL];        /* final values for current waveshape */
    117 
    118 /*
    119 
    120 */
    121 
    122 char    *lmln22;                /* message window line 22 */
    123 char    *lmln23;                /* message window line 23 */
    124 char    *lmln24;                /* message window line 24 */
    125 char    *vtdeptr;               /* virtual typewriter data entry pointer */
    126 
    127 char    *funcndx[256][2];       /* function header pointers */
    128 char    *vlbptr[3];             /* variable label pointers */
    129 
    130 char    bfs[128];               /* display generation buffer */
    131 char    caname[16];             /* current assignment table name */
    132 char    dspbuf[65];             /* display generation buffer */
    133 char    ebuf[MAXEBUF+1];        /* edit data entry buffer */
    134 char    errbuf[65];             /* error message build area */
    135 char    idbuf[65];              /* display format conversion work area */
    136 char    keystat[24];            /* front panel key status */
    137 char    ldcmnt[38];             /* comment field */
    138 char    ldfile[9];              /* file name field */
    139 char    ldmsg1[65];             /* messsage build area 1 */
    140 char    ldmsg2[65];             /* messsage build area 2 */
    141 char    ldmsg3[65];             /* messsage build area 3 */
    142 char    loadedc[NLTYPES][37];   /* loaded file comments */
    143 char    loadedf[NLTYPES][8];    /* loaded file names */
    144 char    masens[3];              /* MIDI port active sensing flags */
    145 char    mctlval[NCTRLS];        /* MIDI controller values */
    146 char    mdbyte[3];              /* MIDI data byte buffers */
    147 char    mpsust[48];             /* MIDI sustain status, by port and channel */
    148 char    mrstat[3];              /* MIDI running status */
    149 char    scname[N_SCORES][16];   /* Score names */
    150 char    trgtab[NTRIGS];         /* trigger status */
    151 char    tuncurn[33];            /* current tuning table name */
    152 char    tunname[NTUNS][32];     /* tuning table names */
    153 
    154 /*
    155 
    156 */
    157 
    158 long    *pspool;                /* Score storage pool pointer */
    159 
    160 long    afi;                    /* analog processor FIFO value */
    161 long    curtime;                /* current sqscan time */
    162 long    ctime;                  /* time at cursor */
    163 long    dvwork;                 /* divide work area */
    164 long    frags;                  /* Score storage pool fragment count */
    165 long    iotime;                 /* saved lcdtime value */
    166 long    lcdontm;                /* LCD backlight on time */
    167 long    lcdtime;                /* LCD backlight timer */
    168 long    lcsum;                  /* library checksum */
    169 long    ndbytes;                /* bytes needed for storage */
    170 long    noteoff;                /* note off time */
    171 long    noteon;                 /* note on time */
    172 long    noteper;                /* note period */
    173 long    noteval;                /* note value */
    174 long    nrest;                  /* number of rests */
    175 long    schksum;                /* Score checksum */
    176 long    se1_cnt;                /* Score - free list E_SIZE1 entry count */
    177 long    se2_cnt;                /* Score - free list E_SIZE2 entry count */
    178 long    se3_cnt;                /* Score - free list E_SIZE3 entry count */
    179 long    snbreq;                 /* Score - disk bytes required */
    180 long    snlreq;                 /* Score - score bytes required */
    181 long    sntbreq;                /* Score - total disk bytes required */
    182 long    sntlreq;                /* Score - total score bytes required */
    183 long    spcount;                /* Score - storage pool free entry count */
    184 long    swcount;                /* scroll wheel counter */
    185 long    swrate;                 /* scroll wheel rate */
    186 long    swtemp;                 /* scroll wheel work area */
    187 long    t_bak;                  /* time at p_bak */
    188 long    t_cbgn;                 /* time at p_cbgn */
    189 long    t_cend;                 /* time at p_cend */
    190 long    t_cur;                  /* time at p_cur */
    191 long    t_ctr;                  /* time at p_ctr */
    192 long    t_fwd;                  /* time at p_fwd */
    193 long    t_ins;                  /* time at peg */
    194 long    t_note;                 /* note duration between p_nbeg and p_nend */
    195 long    t_sbgn;                 /* time at p_sbgn */
    196 long    t_sec1;                 /* time at p_sec1 */
    197 long    t_sec2;                 /* time at p_sec2 */
    198 long    t_sect;                 /* section time */
    199 long    t_send;                 /* time at p_send */
    200 long    wshfac;                 /* waveshape scale factor */
    201 
    202 long    hwave[NUMWPCAL];        /* harmonic waveshape generation buffer */
    203 long    nlpersc[N_SCORES];      /* number of longs per score */
    204 long    scsums[N_SCORES];       /* score checksums */
    205 long    spool[MAX_SE];          /* Score storage pool */
    206 
    207 long    vknm[NUMHARM][NUMWPCAL];        /* scaled harmonics for current ws */
    208 
    209 long    swrmin = SWRMIN;                /* scroll wheel rate threshold */
     71int16_t *cratex;                /* cursor x rate table pointer */
     72int16_t *cratey;                /* cursor x rate table pointer */
     73
     74int16_t BotEdge;                /* configuration box bottom edge */
     75int16_t LftEdge;                /* configuration box left edge */
     76int16_t RgtEdge;                /* configuration box right edge */
     77int16_t TopEdge;                /* configuration box top edge */
     78
     79int16_t BarBcur[14];            /* current bottom-zero bar values */
     80int16_t BarCcur[14];            /* current centered-zero bar values */
     81int16_t BGeq[14];               /* current EQ bar settings */
     82int16_t BGother[14];            /* current other pot bar settings */
     83int16_t BGprmtr[14];            /* current parameter pot bar settings */
     84
     85int16_t articen[12];            /* voice articulation enable status */
     86int16_t grpdyn[12];             /* group dynamics table (0..9) */
     87int16_t grploc[12];             /* group location table (0..8) */
     88int16_t grpmode[12];            /* group mode - 0 = play, 1 = stdby, 2 = rec */
     89int16_t grpsel[12];             /* group select status for instrument selection */
     90int16_t grpstat[12];            /* group status - 0 = off, non-0 = on */
     91int16_t grptmap[12];            /* group map */
     92int16_t gtctab[12];             /* group to color table */
     93int16_t ins2grp[12];            /* instrument to group table (00..NINST-1) */
     94int16_t instmod[12];            /* intrument data modified */
     95int16_t key2grp[88];            /* port 1 key to group assignment table */
     96int16_t lastart[16];            /* last articulation values (by parameter) */
     97int16_t lastvce[12];            /* last voice assigned in each group */
     98int16_t lastvel[12];            /* last velocity sent to group */
     99int16_t ldmap[N_SCORES];        /* gather read map */
     100int16_t mctlnum[4];             /* MIDI controller number table (-1, 00..99) */
     101int16_t mpbend[48];             /* MIDI pitch bend data, by port and channel */
     102int16_t msmstv[3];              /* MIDI state machine state variables */
     103int16_t offsets[NUMWPCAL];      /* offsets for current waveshape */
     104int16_t oldtun[128];            /* previous tuning table for undo */
     105int16_t prstab[NTRIGS];         /* pressure */
     106int16_t s_inst[12];             /* instrument selections */
     107int16_t s_trns[12];             /* current transposition values */
     108int16_t swfifo[NSWFIFO];        /* scroll wheel fifo */
     109int16_t txfifo[NTKFIFO];        /* trackball X fifo */
     110int16_t tyfifo[NTKFIFO];        /* trackball Y fifo */
     111int16_t tuntab[128];            /* current tuning table */
     112int16_t vce2grp[12];            /* voice to group table (-1, 1..12)*/
     113int16_t vce2trg[12];            /* voice to trigger map (-1 EQ NULL) */
     114int16_t veltab[NTRIGS];         /* velocity */
     115int16_t vmtab[NUMHARM];         /* harmonics for current waveshape */
     116int16_t wsbuf[NUMWPCAL];        /* final values for current waveshape */
     117
     118/*
     119
     120*/
     121
     122int8_t  *lmln22;                /* message window line 22 */
     123int8_t  *lmln23;                /* message window line 23 */
     124int8_t  *lmln24;                /* message window line 24 */
     125int8_t  *vtdeptr;               /* virtual typewriter data entry pointer */
     126
     127int8_t  *funcndx[256][2];       /* function header pointers */
     128int8_t  *vlbptr[3];             /* variable label pointers */
     129
     130int8_t  bfs[128];               /* display generation buffer */
     131int8_t  caname[16];             /* current assignment table name */
     132int8_t  dspbuf[65];             /* display generation buffer */
     133int8_t  ebuf[MAXEBUF+1];        /* edit data entry buffer */
     134int8_t  errbuf[65];             /* error message build area */
     135int8_t  idbuf[65];              /* display format conversion work area */
     136int8_t  keystat[24];            /* front panel key status */
     137int8_t  ldcmnt[38];             /* comment field */
     138int8_t  ldfile[9];              /* file name field */
     139int8_t  ldmsg1[65];             /* messsage build area 1 */
     140int8_t  ldmsg2[65];             /* messsage build area 2 */
     141int8_t  ldmsg3[65];             /* messsage build area 3 */
     142int8_t  loadedc[NLTYPES][37];   /* loaded file comments */
     143int8_t  loadedf[NLTYPES][8];    /* loaded file names */
     144int8_t  masens[3];              /* MIDI port active sensing flags */
     145int8_t  mctlval[NCTRLS];        /* MIDI controller values */
     146int8_t  mdbyte[3];              /* MIDI data byte buffers */
     147int8_t  mpsust[48];             /* MIDI sustain status, by port and channel */
     148int8_t  mrstat[3];              /* MIDI running status */
     149int8_t  scname[N_SCORES][16];   /* Score names */
     150int8_t  trgtab[NTRIGS];         /* trigger status */
     151int8_t  tuncurn[33];            /* current tuning table name */
     152int8_t  tunname[NTUNS][32];     /* tuning table names */
     153
     154/*
     155
     156*/
     157
     158int32_t *pspool;                /* Score storage pool pointer */
     159
     160int32_t afi;                    /* analog processor FIFO value */
     161int32_t curtime;                /* current sqscan time */
     162int32_t ctime;                  /* time at cursor */
     163int32_t dvwork;                 /* divide work area */
     164int32_t frags;                  /* Score storage pool fragment count */
     165int32_t iotime;                 /* saved lcdtime value */
     166int32_t lcdontm;                /* LCD backlight on time */
     167int32_t lcdtime;                /* LCD backlight timer */
     168int32_t lcsum;                  /* library checksum */
     169int32_t ndbytes;                /* bytes needed for storage */
     170int32_t noteoff;                /* note off time */
     171int32_t noteon;                 /* note on time */
     172int32_t noteper;                /* note period */
     173int32_t noteval;                /* note value */
     174int32_t nrest;                  /* number of rests */
     175int32_t schksum;                /* Score checksum */
     176int32_t se1_cnt;                /* Score - free list E_SIZE1 entry count */
     177int32_t se2_cnt;                /* Score - free list E_SIZE2 entry count */
     178int32_t se3_cnt;                /* Score - free list E_SIZE3 entry count */
     179int32_t snbreq;                 /* Score - disk bytes required */
     180int32_t snlreq;                 /* Score - score bytes required */
     181int32_t sntbreq;                /* Score - total disk bytes required */
     182int32_t sntlreq;                /* Score - total score bytes required */
     183int32_t spcount;                /* Score - storage pool free entry count */
     184int32_t swcount;                /* scroll wheel counter */
     185int32_t swrate;                 /* scroll wheel rate */
     186int32_t swtemp;                 /* scroll wheel work area */
     187int32_t t_bak;                  /* time at p_bak */
     188int32_t t_cbgn;                 /* time at p_cbgn */
     189int32_t t_cend;                 /* time at p_cend */
     190int32_t t_cur;                  /* time at p_cur */
     191int32_t t_ctr;                  /* time at p_ctr */
     192int32_t t_fwd;                  /* time at p_fwd */
     193int32_t t_ins;                  /* time at peg */
     194int32_t t_note;                 /* note duration between p_nbeg and p_nend */
     195int32_t t_sbgn;                 /* time at p_sbgn */
     196int32_t t_sec1;                 /* time at p_sec1 */
     197int32_t t_sec2;                 /* time at p_sec2 */
     198int32_t t_sect;                 /* section time */
     199int32_t t_send;                 /* time at p_send */
     200int32_t wshfac;                 /* waveshape scale factor */
     201
     202int32_t hwave[NUMWPCAL];        /* harmonic waveshape generation buffer */
     203int32_t nlpersc[N_SCORES];      /* number of longs per score */
     204int32_t scsums[N_SCORES];       /* score checksums */
     205int32_t spool[MAX_SE];          /* Score storage pool */
     206
     207int32_t vknm[NUMHARM][NUMWPCAL];        /* scaled harmonics for current ws */
     208
     209int32_t swrmin = SWRMIN;                /* scroll wheel rate threshold */
    210210
    211211/*
Note: See TracChangeset for help on using the changeset viewer.