Changeset 7258c6a in buchla-68k for ram/im700.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/im700.c

    r0292fbb r7258c6a  
    4444#include "wsdsp.h"
    4545
    46 extern  unsigned        tofpu(unsigned time);
     46extern  uint16_t        tofpu(uint16_t time);
    4747
    4848extern  void    nokey(void);
    49 extern  short   nonf(short k);
     49extern  int16_t nonf(int16_t k);
    5050extern  void    stdmkey(void);
    5151extern  void    cxkstd(void);
     
    5454extern  void    cygen(void);
    5555extern  void    cmvgen(void);
    56 extern  short   stdctp2(void);
    57 
    58 extern  short   blakpal[16][3];
     56extern  int16_t stdctp2(void);
     57
     58extern  int16_t blakpal[16][3];
    5959
    6060extern  LPF     t_prmtr[];
    6161
    62 extern  char    *funcndx[256][2];
    63 
    64 extern  char    keystat[24];
    65 extern  char    ldcmnt[38];
    66 extern  char    ldfile[9];
    67 extern  char    loadedc[NLTYPES][37];
    68 extern  char    loadedf[NLTYPES][8];
    69 extern  char    masens[3];
    70 extern  char    mctlval[NCTRLS];
    71 extern  char    mdbyte[3];
    72 extern  char    mpsust[48];
    73 extern  char    mrstat[3];
    74 extern  char    trgtab[NTRIGS];
    75 
    76 extern  short   fnoff[];
    77 
    78 extern  short   articen[12];            /* voice articulation enable status */
    79 extern  short   grpmode[12];            /* group mode - 0 = play, 1 = stdby, 2 = rec */
    80 extern  short   grpsel[12];             /* group select status for instrument selection */
    81 extern  short   grpstat[12];            /* group status - 0 = off, non-0 = on */
    82 extern  short   gtctab[12];             /* group to color table */
    83 extern  short   lastvce[12];            /* last voice assigned in each group */
    84 extern  short   lastvel[12];            /* last velocity sent to group */
    85 extern  short   mpbend[48];             /* MIDI pitch bend data, by port and channel */
    86 extern  short   msmstv[3];              /* MIDI state machine state variables */
    87 extern  short   prstab[NTRIGS];         /* pressure */
    88 extern  short   vce2trg[12];            /* voice to trigger map (-1 EQ NULL) */
    89 extern  short   veltab[NTRIGS];         /* velocity */
     62extern  int8_t  *funcndx[256][2];
     63
     64extern  int8_t  keystat[24];
     65extern  int8_t  ldcmnt[38];
     66extern  int8_t  ldfile[9];
     67extern  int8_t  loadedc[NLTYPES][37];
     68extern  int8_t  loadedf[NLTYPES][8];
     69extern  int8_t  masens[3];
     70extern  int8_t  mctlval[NCTRLS];
     71extern  int8_t  mdbyte[3];
     72extern  int8_t  mpsust[48];
     73extern  int8_t  mrstat[3];
     74extern  int8_t  trgtab[NTRIGS];
     75
     76extern  int16_t fnoff[];
     77
     78extern  int16_t articen[12];            /* voice articulation enable status */
     79extern  int16_t grpmode[12];            /* group mode - 0 = play, 1 = stdby, 2 = rec */
     80extern  int16_t grpsel[12];             /* group select status for instrument selection */
     81extern  int16_t grpstat[12];            /* group status - 0 = off, non-0 = on */
     82extern  int16_t gtctab[12];             /* group to color table */
     83extern  int16_t lastvce[12];            /* last voice assigned in each group */
     84extern  int16_t lastvel[12];            /* last velocity sent to group */
     85extern  int16_t mpbend[48];             /* MIDI pitch bend data, by port and channel */
     86extern  int16_t msmstv[3];              /* MIDI state machine state variables */
     87extern  int16_t prstab[NTRIGS];         /* pressure */
     88extern  int16_t vce2trg[12];            /* voice to trigger map (-1 EQ NULL) */
     89extern  int16_t veltab[NTRIGS];         /* velocity */
    9090
    9191/*
     
    9797
    9898extern  void    (*curmove)(void);       /* cursor move function */
    99 extern  short   (*curtype)(void);       /* cursor type function */
     99extern  int16_t (*curtype)(void);       /* cursor type function */
    100100extern  void    (*cx_key)(void);        /* x rate calculation */
    101101extern  void    (*cx_upd)(void);        /* x update */
    102102extern  void    (*cy_key)(void);        /* y rate calculation */
    103103extern  void    (*cy_upd)(void);        /* y update */
    104 extern  void    (*d_key)(short k);      /* in-field data key processor */
     104extern  void    (*d_key)(int16_t k);    /* in-field data key processor */
    105105extern  void    (*e_key)(void);         /* E key processor */
    106106extern  void    (*m_key)(void);         /* M key processor */
    107 extern  short   (*not_fld)(short k);    /* not-in-field data key processor */
     107extern  int16_t (*not_fld)(int16_t k);  /* not-in-field data key processor */
    108108extern  void    (*premove)(void);       /* cursor pre-move function */
    109109extern  void    (*pstmove)(void);       /* cursor post-move function */
     
    112112extern  void    (*xy_up)(void);         /* cursor - finger off (up) */
    113113
    114 extern  short   *cratex;                /* cursor x rate table pointer */
    115 extern  short   *cratey;                /* cursor x rate table pointer */
    116 
    117 short   admctl;                 /* assignment display submenu control variable */
    118 short   adnamsw;                /* assignment display virtual typewriter flag */
    119 short   aflag;                  /* analog activity flag */
    120 short   aform;                  /* action buffer format */
    121 short   amplval;                /* amplitude */
    122 short   ancmsw;                 /* analog variable r/p control source */
    123 short   angroup;                /* analog variable group being shown */
    124 short   asgfks;                 /* first key selected */
    125 short   asghit;                 /* row hit / assignment in progress */
    126 short   asgmod;                 /* assignment number or table modified */
    127 short   asig;                   /* analog signal number */
    128 short   asmode;                 /* panel assignment mode */
    129 short   astat;                  /* analog signal status */
    130 short   auxctl;                 /* aux control flag */
    131 short   aval;                   /* analog signal value */
    132 short   bform;                  /* oscillator data buffer format */
    133 short   catin;                  /* catalog read in flag */
    134 short   cents;                  /* pitch to cents conversion buffer */
    135 short   chtime;                 /* horizontal cursor counter */
    136 short   chwait;                 /* horizontal cursor wait time */
    137 short   cflag;                  /* accidental flag */
    138 short   clkctl;                 /* clock control */
    139 short   clkrun;                 /* clock status */
    140 short   clksrc;                 /* clock source */
    141 short   cmfirst;                /* first cursor motion switch */
    142 short   cmtype;                 /* cursor motion type */
    143 short   cnote;                  /* note value at cursor */
    144 short   ctrsw;                  /* scupd center update switch */
    145 short   curasg;                 /* current assignment table */
    146 short   curfunc;                /* current function number */
    147 short   curgrp;                 /* current group */
    148 short   curinst;                /* current instrument number */
    149 short   curmop;                 /* current MIDI output port */
    150 short   curpnt;                 /* current point number (absolute) */
    151 short   curpos;                 /* cursor pad position for current axis */
    152 short   cursbox;                /* currently selected box */
    153 short   curscor;                /* Current score number */
    154 short   cursect;                /* current section */
    155 short   curslim;                /* cursor type change point */
    156 short   curtun;                 /* current tuning table */
    157 short   curvce;                 /* current voice number */
    158 short   curwave;                /* current waveshape library slot */
    159 short   curwdth;                /* current waveshape cursor width */
    160 short   curwfnl;                /* current waveshape final value */
    161 short   curwhrm;                /* current waveshape harmonic number */
    162 short   curwhrv;                /* current waveshape harmonic value */
    163 short   curwoff;                /* current waveshape offset value */
    164 short   curwpnt;                /* current waveshape point number */
    165 short   curwslt;                /* current waveshape instrument slot */
    166 short   cvtime;                 /* vertical cursor counter */
    167 short   cvwait;                 /* veritcal cursor wait time */
    168 short   cxrate;                 /* cursor x rate */
    169 short   cxval;                  /* graphic cursor x value */
    170 short   cyrate;                 /* cursor y rate */
    171 short   cyval;                  /* graphic cursor y value */
    172 short   debugne;                /* debug flag for note entry */
    173 short   defect;                 /* defect code */
    174 short   dferror;                /* error code from BIOS or XBIOS */
    175 short   dfsides;                /* number of sides */
    176 short   dftype;                 /* disk type code */
    177 short   dsp_ok;                 /* display update OK this cycle flag */
    178 short   dubsw;                  /* overdub / replace switch */
    179 short   ebflag;                 /* edit buffer data flag */
    180 short   editss;                 /* edit panel switch state */
    181 short   editsw;                 /* edit mode switch */
    182 short   endflg;                 /* !end flag */
    183 short   ext_cv1;                /* CV-1 value */
    184 short   ext_cv2;                /* CV-2 value */
    185 short   ext_cv3;                /* CV-3 value */
    186 short   ext_cv4;                /* CV-4 value */
    187 short   ext_mod;                /* Aux Signal Mod value */
    188 short   gomode;                 /* go to mode */
    189 short   grptran;                /* group translation value */
    190 short   gtmsel;                 /* group transpose/map select */
    191 short   hitbox;                 /* box we just hit */
    192 short   hitcx;                  /* x of cursor when we hit the box */
    193 short   hitcy;                  /* y of cursor when we hit the box */
    194 short   idcfsw;                 /* copy / fetch menu switch */
    195 short   idimsw;                 /* instrument display instrument menu switch */
    196 short   idintmp;                /* temporary for instrument number */
    197 short   idnamsw;                /* typewriter switch */
    198 short   idsrcsw;                /* source menu switch */
    199 short   idtdat;                 /* current instrument vtyper data entry string */
    200 short   imflag;                 /* instrument modified flag */
    201 short   initcfg;                /* initial configuration */
    202 short   insmode;                /* score insert mode */
    203 short   ismode;                 /* instrument select mode */
    204 short   lampio;                 /* LCD timeout disable switch state at I/O time */
    205 short   lampsw;                 /* LCD timeout disable switch */
    206 short   lasgsw;                 /* assignments store switch */
    207 short   lastam;                 /* last assignment menu base */
    208 short   ldelsw;                 /* delete switch */
    209 short   lderrsw;                /* error message displayed switch */
    210 short   ldidsiz;                /* getcat() did showsiz() switch */
    211 short   ldkind;                 /* fetch file type */
    212 short   ldpass;                 /* librarian load state variable */
    213 short   ldrow;                  /* fetch select row */
    214 short   ldslot;                 /* fetch select slot */
    215 short   legato;                 /* execkey() "legato" mode switch */
    216 short   lksel;                  /* librarian key slot selector */
    217 short   lmwtype;                /* librarian message window type */
    218 short   loadrow;                /* librarian row selected for load letter */
    219 short   loadsw;                 /* panel "Load" mode state */
    220 short   lorchl;                 /* load hi (TRUE) / lo (FALSE) orchestra */
    221 short   lorchsw;                /* hi orchestra (21 - 40) store switch */
    222 short   lorclsw;                /* lo orchestra (01 - 20) store switch */
    223 short   lpatsw;                 /* patch table store switch */
    224 short   lrasw;                  /* append (TRUE) / replace (FALSE) score */
    225 short   lscrsw;                 /* score store switch */
    226 short   lselsw;                 /* fetch select switch */
    227 short   lseqsw;                 /* sequence table store switch */
    228 short   lstbgnc;                /* last note begin entry table index */
    229 short   lstendc;                /* last note end entry table index */
    230 short   lstflag;                /* last note list end switch */
    231 short   lstrsw;                 /* store state switch */
    232 short   lstwoff;                /* last waveshape offset value */
    233 short   lstwpnt;                /* last waveshape point number */
    234 short   ltagged;                /* load tag switch */
    235 short   ltunsw;                 /* tunings store switch */
    236 short   lwavsw;                 /* waveshapes store switch */
    237 short   mascntr;                /* MIDI active sensing timeout counter */
    238 short   mdb1;                   /* current MIDI data byte 1 */
    239 short   mdb2;                   /* current MIDI data byte 2 */
    240 short   michan;                 /* current MIDI channel */
    241 short   midiclk;                /* MIDI clock switch */
    242 short   midigo;                 /* MIDI run switch */
    243 short   mistat;                 /* current MIDI status */
    244 short   nchwait;                /* next chwait value */
    245 short   ncvwait;                /* next cvwait value */
    246 short   ndisp;                  /* current display number */
    247 short   newflag;                /* new data entered while t_cur EQ t_ctr */
    248 short   nkdown;                 /* number of keys down */
    249 short   notenum;                /* note number */
    250 short   noteop;                 /* pending note operation code */
    251 short   notepit;                /* note pitch */
    252 short   notesel;                /* note selection state */
    253 short   npts;                   /* number of points in function */
    254 short   nxtflag;                /* next score flag */
    255 short   oldltag;                /* previous load tag for tagslot */
    256 short   oldpk;                  /* previous pkctrl state */
    257 short   oldsl;                  /* previous sliders state */
    258 short   pchsw;                  /* punch-in enable switch */
    259 short   pecase;                 /* point edit case variable */
    260 short   pkctrl;                 /* local performance key state */
    261 short   pntsv;                  /* point selection state variable */
    262 short   prgchan;                /* MIDI program change channel  (port 1) */
    263 short   ps_dpth;                /* phase shifter -- depth */
    264 short   ps_intn;                /* phase shifter -- intensity */
    265 short   ps_rate;                /* phase shifter -- rate */
    266 short   pulsclk;                /* pulse clock state */
    267 short   recsw;                  /* record / play switch */
    268 short   runit;                  /* run switch for main scan loop */
    269 short   sbase;                  /* score VSDD RAM scroll offset */
    270 short   scmctl;                 /* score submenu control flag */
    271 short   scrlpot;                /* scroll pot state */
    272 short   sd;                     /* score display direction */
    273 short   se;                     /* score execution direction */
    274 short   sdmcol;                 /* score menu - saved stccol */
    275 short   sdmctl;                 /* score menu - control variable */
    276 short   sdmrow;                 /* score menu - saved stcrow */
    277 short   secop;                  /* pending score section operation */
    278 short   secopok;                /* section operation OK flag */
    279 short   sgcsw;                  /* graphic cursor display switch */
    280 short   sgoflag;                /* section number relative column 0..3 */
    281 short   sharp;                  /* sharp flag */
    282 short   sliders;                /* slider and switch state */
    283 short   soffset;                /* score scroll offset */
    284 short   ss_ptsw;                /* smooth scroll patch scroll switch */
    285 short   ss_sqsw;                /* smooth scroll sequence scroll switch */
    286 short   stccol;                 /* score cursor col */
    287 short   stcrow;                 /* score cursor row */
    288 short   stepclk;                /* note entry - step clock state */
    289 short   stepenb;                /* note entry - step enable flag */
    290 short   stepint;                /* note entry - note interval */
    291 short   stepwgt;                /* note entry - note weight */
    292 short   subj;                   /* edited point number (relative) */
    293 short   submenu;                /* submenu active switch */
    294 short   swctrl;                 /* scroll wheel 'srolling' flag */
    295 short   swdelta;                /* scroll wheel change while touched */
    296 short   swdir;                  /* scroll wheel direction */
    297 short   swfiin;                 /* scroll wheel fifo input pointer */
    298 short   swflag;                 /* scroll wheel touched flag */
    299 short   swlast;                 /* scroll wheel last value */
    300 short   swstop;                 /* scroll wheel stop flag */
    301 short   swndx;                  /* scroll wheel look back index */
    302 short   tagslot;                /* tagged load slot */
    303 short   tdnamsw;                /* tuning editor displaying typewriter */
    304 short   temax;                  /* time upper limit */
    305 short   temin;                  /* time lower limit */
    306 short   testing;                /* test level */
    307 short   tglclk;                 /* clock on/off toggle flag */
    308 short   tglpch;                 /* punch in/out toggle flag */
    309 short   thescore;               /* score selected from sqscan */
    310 short   timemlt;                /* time scaling */
    311 short   tkctrl;                 /* trackball active flag */
    312 short   tmpomlt;                /* tempo multiplier */
    313 short   tmpoval;                /* tempo value */
    314 short   trkball;                /* trackball selected switch */
    315 short   ttcmdsv;                /* tuning editor edit state variable */
    316 short   ttsel1;                 /* tuning editor key select variable 1 */
    317 short   ttsel2;                 /* tuning editor key select variable 2 */
    318 short   ttsel3;                 /* tuning editor key select variable 3 */
    319 short   tuneval;                /* fine tuning */
    320 short   tunmod;                 /* tuning table modified */
    321 short   tunval;                 /* tuning editor increment / transpose  value */
    322 short   txfiin;                 /* trackball x fifo input pointer */
    323 short   txflag;                 /* trackball x axis active flag */
    324 short   txlast;                 /* trackball x axis last value */
    325 short   txstop;                 /* trackball x axis filter counter */
    326 short   tyfiin;                 /* trackball y fifo input pointer */
    327 short   tyflag;                 /* trackball y axis active flag */
    328 short   tylast;                 /* trackball y axis last value */
    329 short   tystop;                 /* trackball y axis filter counter */
    330 short   velflag;                /* velocity display flag */
    331 short   verbose;                /* verbose output switch */
    332 short   vlbtype;                /* type of message window display */
    333 short   vrbw08;                 /* score display video reset detail word */
    334 short   vrbw09;                 /* score display video reset detail word */
    335 short   vrbw10;                 /* score display video reset detail word */
    336 short   vrbw11;                 /* score display video reset detail word */
    337 short   vrbw12;                 /* score display video reset detail word */
    338 short   vrbw13;                 /* score display video reset detail word */
    339 short   vrbw14;                 /* score display video reset detail word */
    340 short   vrbw15;                 /* score display video reset detail word */
    341 short   vrcw;                   /* score display video reset control word */
    342 short   vtccol;                 /* virtual typewriter cursor column */
    343 short   vtcrow;                 /* virtual typewriter cursor row */
    344 char    vtdechr;                /* virtual typewriter data entry character */
    345 short   vtdecol;                /* virtual typewriter data entry column */
    346 short   vtpcol;                 /* virtual typewriter column */
    347 short   vtprow;                 /* virtual typewriter row */
    348 short   vtwcol;                 /* virtual typewriter window left column */
    349 short   vtwrow;                 /* virtual typewriter window top row */
    350 short   vtxval;                 /* virtual typewriter cursor x value */
    351 short   vtyval;                 /* virtual typewriter cursor y value */
    352 short   wcflag;                 /* ws/cf menu select flag (cf=0, ws=1) */
    353 short   wcmcol;                 /* ws/cf menu label column */
    354 short   wcmrow;                 /* ws/cf menu label row */
    355 short   wcpage;                 /* ws/cf menu page */
    356 short   wdupdfl;                /* waveshape display needs updated flag */
    357 short   wmcsel;                 /* ws menu ws a/b select */
    358 short   wmctag;                 /* ws/cf display update flag */
    359 short   wplast;                 /* last point for interpolate operation */
    360 short   wpntsv;                 /* waveshape point selection state variable */
    361 short   wshmax;                 /* waveshape maximum value */
    362 short   wvlast;                 /* last value for interpolate operation */
    363 short   xkcount;                /* cursor x key on count */
    364 short   xkstat;                 /* cursor x key status */
    365 short   xycntr;                 /* xy center for cursor pad */
    366 short   ykcount;                /* cursor y key on count */
    367 short   ykstat;                 /* cursor y key status */
    368 
    369 short   anrs[8][16];                    /* analog variable resolution */
    370 short   grp2prt[12][2];                 /* group to port and channel table */
    371 short   sctctab[10][64];                /* score background color table */
    372 short   sigtab[128][2];                 /* signals:  [0] = value, [1] = switch */
    373 short   tunlib[NTUNS][128];             /* tuning table library */
    374 short   varmode[8][16];                 /* analog variable record mode */
    375 short   wsnmod[12][2];                  /* waveshape number / data modified */
     114extern  int16_t *cratex;                /* cursor x rate table pointer */
     115extern  int16_t *cratey;                /* cursor x rate table pointer */
     116
     117int16_t admctl;                 /* assignment display submenu control variable */
     118int16_t adnamsw;                /* assignment display virtual typewriter flag */
     119int16_t aflag;                  /* analog activity flag */
     120int16_t aform;                  /* action buffer format */
     121int16_t amplval;                /* amplitude */
     122int16_t ancmsw;                 /* analog variable r/p control source */
     123int16_t angroup;                /* analog variable group being shown */
     124int16_t asgfks;                 /* first key selected */
     125int16_t asghit;                 /* row hit / assignment in progress */
     126int16_t asgmod;                 /* assignment number or table modified */
     127int16_t asig;                   /* analog signal number */
     128int16_t asmode;                 /* panel assignment mode */
     129int16_t astat;                  /* analog signal status */
     130int16_t auxctl;                 /* aux control flag */
     131int16_t aval;                   /* analog signal value */
     132int16_t bform;                  /* oscillator data buffer format */
     133int16_t catin;                  /* catalog read in flag */
     134int16_t cents;                  /* pitch to cents conversion buffer */
     135int16_t chtime;                 /* horizontal cursor counter */
     136int16_t chwait;                 /* horizontal cursor wait time */
     137int16_t cflag;                  /* accidental flag */
     138int16_t clkctl;                 /* clock control */
     139int16_t clkrun;                 /* clock status */
     140int16_t clksrc;                 /* clock source */
     141int16_t cmfirst;                /* first cursor motion switch */
     142int16_t cmtype;                 /* cursor motion type */
     143int16_t cnote;                  /* note value at cursor */
     144int16_t ctrsw;                  /* scupd center update switch */
     145int16_t curasg;                 /* current assignment table */
     146int16_t curfunc;                /* current function number */
     147int16_t curgrp;                 /* current group */
     148int16_t curinst;                /* current instrument number */
     149int16_t curmop;                 /* current MIDI output port */
     150int16_t curpnt;                 /* current point number (absolute) */
     151int16_t curpos;                 /* cursor pad position for current axis */
     152int16_t cursbox;                /* currently selected box */
     153int16_t curscor;                /* Current score number */
     154int16_t cursect;                /* current section */
     155int16_t curslim;                /* cursor type change point */
     156int16_t curtun;                 /* current tuning table */
     157int16_t curvce;                 /* current voice number */
     158int16_t curwave;                /* current waveshape library slot */
     159int16_t curwdth;                /* current waveshape cursor width */
     160int16_t curwfnl;                /* current waveshape final value */
     161int16_t curwhrm;                /* current waveshape harmonic number */
     162int16_t curwhrv;                /* current waveshape harmonic value */
     163int16_t curwoff;                /* current waveshape offset value */
     164int16_t curwpnt;                /* current waveshape point number */
     165int16_t curwslt;                /* current waveshape instrument slot */
     166int16_t cvtime;                 /* vertical cursor counter */
     167int16_t cvwait;                 /* veritcal cursor wait time */
     168int16_t cxrate;                 /* cursor x rate */
     169int16_t cxval;                  /* graphic cursor x value */
     170int16_t cyrate;                 /* cursor y rate */
     171int16_t cyval;                  /* graphic cursor y value */
     172int16_t debugne;                /* debug flag for note entry */
     173int16_t defect;                 /* defect code */
     174int16_t dferror;                /* error code from BIOS or XBIOS */
     175int16_t dfsides;                /* number of sides */
     176int16_t dftype;                 /* disk type code */
     177int16_t dsp_ok;                 /* display update OK this cycle flag */
     178int16_t dubsw;                  /* overdub / replace switch */
     179int16_t ebflag;                 /* edit buffer data flag */
     180int16_t editss;                 /* edit panel switch state */
     181int16_t editsw;                 /* edit mode switch */
     182int16_t endflg;                 /* !end flag */
     183int16_t ext_cv1;                /* CV-1 value */
     184int16_t ext_cv2;                /* CV-2 value */
     185int16_t ext_cv3;                /* CV-3 value */
     186int16_t ext_cv4;                /* CV-4 value */
     187int16_t ext_mod;                /* Aux Signal Mod value */
     188int16_t gomode;                 /* go to mode */
     189int16_t grptran;                /* group translation value */
     190int16_t gtmsel;                 /* group transpose/map select */
     191int16_t hitbox;                 /* box we just hit */
     192int16_t hitcx;                  /* x of cursor when we hit the box */
     193int16_t hitcy;                  /* y of cursor when we hit the box */
     194int16_t idcfsw;                 /* copy / fetch menu switch */
     195int16_t idimsw;                 /* instrument display instrument menu switch */
     196int16_t idintmp;                /* temporary for instrument number */
     197int16_t idnamsw;                /* typewriter switch */
     198int16_t idsrcsw;                /* source menu switch */
     199int16_t idtdat;                 /* current instrument vtyper data entry string */
     200int16_t imflag;                 /* instrument modified flag */
     201int16_t initcfg;                /* initial configuration */
     202int16_t insmode;                /* score insert mode */
     203int16_t ismode;                 /* instrument select mode */
     204int16_t lampio;                 /* LCD timeout disable switch state at I/O time */
     205int16_t lampsw;                 /* LCD timeout disable switch */
     206int16_t lasgsw;                 /* assignments store switch */
     207int16_t lastam;                 /* last assignment menu base */
     208int16_t ldelsw;                 /* delete switch */
     209int16_t lderrsw;                /* error message displayed switch */
     210int16_t ldidsiz;                /* getcat() did showsiz() switch */
     211int16_t ldkind;                 /* fetch file type */
     212int16_t ldpass;                 /* librarian load state variable */
     213int16_t ldrow;                  /* fetch select row */
     214int16_t ldslot;                 /* fetch select slot */
     215int16_t legato;                 /* execkey() "legato" mode switch */
     216int16_t lksel;                  /* librarian key slot selector */
     217int16_t lmwtype;                /* librarian message window type */
     218int16_t loadrow;                /* librarian row selected for load letter */
     219int16_t loadsw;                 /* panel "Load" mode state */
     220int16_t lorchl;                 /* load hi (TRUE) / lo (FALSE) orchestra */
     221int16_t lorchsw;                /* hi orchestra (21 - 40) store switch */
     222int16_t lorclsw;                /* lo orchestra (01 - 20) store switch */
     223int16_t lpatsw;                 /* patch table store switch */
     224int16_t lrasw;                  /* append (TRUE) / replace (FALSE) score */
     225int16_t lscrsw;                 /* score store switch */
     226int16_t lselsw;                 /* fetch select switch */
     227int16_t lseqsw;                 /* sequence table store switch */
     228int16_t lstbgnc;                /* last note begin entry table index */
     229int16_t lstendc;                /* last note end entry table index */
     230int16_t lstflag;                /* last note list end switch */
     231int16_t lstrsw;                 /* store state switch */
     232int16_t lstwoff;                /* last waveshape offset value */
     233int16_t lstwpnt;                /* last waveshape point number */
     234int16_t ltagged;                /* load tag switch */
     235int16_t ltunsw;                 /* tunings store switch */
     236int16_t lwavsw;                 /* waveshapes store switch */
     237int16_t mascntr;                /* MIDI active sensing timeout counter */
     238int16_t mdb1;                   /* current MIDI data byte 1 */
     239int16_t mdb2;                   /* current MIDI data byte 2 */
     240int16_t michan;                 /* current MIDI channel */
     241int16_t midiclk;                /* MIDI clock switch */
     242int16_t midigo;                 /* MIDI run switch */
     243int16_t mistat;                 /* current MIDI status */
     244int16_t nchwait;                /* next chwait value */
     245int16_t ncvwait;                /* next cvwait value */
     246int16_t ndisp;                  /* current display number */
     247int16_t newflag;                /* new data entered while t_cur EQ t_ctr */
     248int16_t nkdown;                 /* number of keys down */
     249int16_t notenum;                /* note number */
     250int16_t noteop;                 /* pending note operation code */
     251int16_t notepit;                /* note pitch */
     252int16_t notesel;                /* note selection state */
     253int16_t npts;                   /* number of points in function */
     254int16_t nxtflag;                /* next score flag */
     255int16_t oldltag;                /* previous load tag for tagslot */
     256int16_t oldpk;                  /* previous pkctrl state */
     257int16_t oldsl;                  /* previous sliders state */
     258int16_t pchsw;                  /* punch-in enable switch */
     259int16_t pecase;                 /* point edit case variable */
     260int16_t pkctrl;                 /* local performance key state */
     261int16_t pntsv;                  /* point selection state variable */
     262int16_t prgchan;                /* MIDI program change channel  (port 1) */
     263int16_t ps_dpth;                /* phase shifter -- depth */
     264int16_t ps_intn;                /* phase shifter -- intensity */
     265int16_t ps_rate;                /* phase shifter -- rate */
     266int16_t pulsclk;                /* pulse clock state */
     267int16_t recsw;                  /* record / play switch */
     268int16_t runit;                  /* run switch for main scan loop */
     269int16_t sbase;                  /* score VSDD RAM scroll offset */
     270int16_t scmctl;                 /* score submenu control flag */
     271int16_t scrlpot;                /* scroll pot state */
     272int16_t sd;                     /* score display direction */
     273int16_t se;                     /* score execution direction */
     274int16_t sdmcol;                 /* score menu - saved stccol */
     275int16_t sdmctl;                 /* score menu - control variable */
     276int16_t sdmrow;                 /* score menu - saved stcrow */
     277int16_t secop;                  /* pending score section operation */
     278int16_t secopok;                /* section operation OK flag */
     279int16_t sgcsw;                  /* graphic cursor display switch */
     280int16_t sgoflag;                /* section number relative column 0..3 */
     281int16_t sharp;                  /* sharp flag */
     282int16_t sliders;                /* slider and switch state */
     283int16_t soffset;                /* score scroll offset */
     284int16_t ss_ptsw;                /* smooth scroll patch scroll switch */
     285int16_t ss_sqsw;                /* smooth scroll sequence scroll switch */
     286int16_t stccol;                 /* score cursor col */
     287int16_t stcrow;                 /* score cursor row */
     288int16_t stepclk;                /* note entry - step clock state */
     289int16_t stepenb;                /* note entry - step enable flag */
     290int16_t stepint;                /* note entry - note interval */
     291int16_t stepwgt;                /* note entry - note weight */
     292int16_t subj;                   /* edited point number (relative) */
     293int16_t submenu;                /* submenu active switch */
     294int16_t swctrl;                 /* scroll wheel 'srolling' flag */
     295int16_t swdelta;                /* scroll wheel change while touched */
     296int16_t swdir;                  /* scroll wheel direction */
     297int16_t swfiin;                 /* scroll wheel fifo input pointer */
     298int16_t swflag;                 /* scroll wheel touched flag */
     299int16_t swlast;                 /* scroll wheel last value */
     300int16_t swstop;                 /* scroll wheel stop flag */
     301int16_t swndx;                  /* scroll wheel look back index */
     302int16_t tagslot;                /* tagged load slot */
     303int16_t tdnamsw;                /* tuning editor displaying typewriter */
     304int16_t temax;                  /* time upper limit */
     305int16_t temin;                  /* time lower limit */
     306int16_t testing;                /* test level */
     307int16_t tglclk;                 /* clock on/off toggle flag */
     308int16_t tglpch;                 /* punch in/out toggle flag */
     309int16_t thescore;               /* score selected from sqscan */
     310int16_t timemlt;                /* time scaling */
     311int16_t tkctrl;                 /* trackball active flag */
     312int16_t tmpomlt;                /* tempo multiplier */
     313int16_t tmpoval;                /* tempo value */
     314int16_t trkball;                /* trackball selected switch */
     315int16_t ttcmdsv;                /* tuning editor edit state variable */
     316int16_t ttsel1;                 /* tuning editor key select variable 1 */
     317int16_t ttsel2;                 /* tuning editor key select variable 2 */
     318int16_t ttsel3;                 /* tuning editor key select variable 3 */
     319int16_t tuneval;                /* fine tuning */
     320int16_t tunmod;                 /* tuning table modified */
     321int16_t tunval;                 /* tuning editor increment / transpose  value */
     322int16_t txfiin;                 /* trackball x fifo input pointer */
     323int16_t txflag;                 /* trackball x axis active flag */
     324int16_t txlast;                 /* trackball x axis last value */
     325int16_t txstop;                 /* trackball x axis filter counter */
     326int16_t tyfiin;                 /* trackball y fifo input pointer */
     327int16_t tyflag;                 /* trackball y axis active flag */
     328int16_t tylast;                 /* trackball y axis last value */
     329int16_t tystop;                 /* trackball y axis filter counter */
     330int16_t velflag;                /* velocity display flag */
     331int16_t verbose;                /* verbose output switch */
     332int16_t vlbtype;                /* type of message window display */
     333int16_t vrbw08;                 /* score display video reset detail word */
     334int16_t vrbw09;                 /* score display video reset detail word */
     335int16_t vrbw10;                 /* score display video reset detail word */
     336int16_t vrbw11;                 /* score display video reset detail word */
     337int16_t vrbw12;                 /* score display video reset detail word */
     338int16_t vrbw13;                 /* score display video reset detail word */
     339int16_t vrbw14;                 /* score display video reset detail word */
     340int16_t vrbw15;                 /* score display video reset detail word */
     341int16_t vrcw;                   /* score display video reset control word */
     342int16_t vtccol;                 /* virtual typewriter cursor column */
     343int16_t vtcrow;                 /* virtual typewriter cursor row */
     344int8_t  vtdechr;                /* virtual typewriter data entry character */
     345int16_t vtdecol;                /* virtual typewriter data entry column */
     346int16_t vtpcol;                 /* virtual typewriter column */
     347int16_t vtprow;                 /* virtual typewriter row */
     348int16_t vtwcol;                 /* virtual typewriter window left column */
     349int16_t vtwrow;                 /* virtual typewriter window top row */
     350int16_t vtxval;                 /* virtual typewriter cursor x value */
     351int16_t vtyval;                 /* virtual typewriter cursor y value */
     352int16_t wcflag;                 /* ws/cf menu select flag (cf=0, ws=1) */
     353int16_t wcmcol;                 /* ws/cf menu label column */
     354int16_t wcmrow;                 /* ws/cf menu label row */
     355int16_t wcpage;                 /* ws/cf menu page */
     356int16_t wdupdfl;                /* waveshape display needs updated flag */
     357int16_t wmcsel;                 /* ws menu ws a/b select */
     358int16_t wmctag;                 /* ws/cf display update flag */
     359int16_t wplast;                 /* last point for interpolate operation */
     360int16_t wpntsv;                 /* waveshape point selection state variable */
     361int16_t wshmax;                 /* waveshape maximum value */
     362int16_t wvlast;                 /* last value for interpolate operation */
     363int16_t xkcount;                /* cursor x key on count */
     364int16_t xkstat;                 /* cursor x key status */
     365int16_t xycntr;                 /* xy center for cursor pad */
     366int16_t ykcount;                /* cursor y key on count */
     367int16_t ykstat;                 /* cursor y key status */
     368
     369int16_t anrs[8][16];                    /* analog variable resolution */
     370int16_t grp2prt[12][2];                 /* group to port and channel table */
     371int16_t sctctab[10][64];                /* score background color table */
     372int16_t sigtab[128][2];                 /* signals:  [0] = value, [1] = switch */
     373int16_t tunlib[NTUNS][128];             /* tuning table library */
     374int16_t varmode[8][16];                 /* analog variable record mode */
     375int16_t wsnmod[12][2];                  /* waveshape number / data modified */
    376376
    377377struct  EXFILE  mphead;         /* MIDAS-VII program header */
     
    436436struct  s_entry *seclist[N_SCORES][N_SECTS];    /* Section pointer table */
    437437
    438 unsigned        *asgob;         /* assignment display object pointer */
    439 unsigned        *consl;         /* constant slice pointer */
    440 unsigned        *cursl;         /* current (center) slice pointer */
    441 unsigned        *instob;        /* instrument object pointer */
    442 unsigned        *librob;        /* librarian display object pointer */
    443 unsigned        *menuob;        /* menu display object pointer */
    444 unsigned        *nxtsl;         /* next (right edge) slice pointer */
    445 unsigned        *obj0;          /* object  0 VSDD RAM pointer */
    446 unsigned        *obj1;          /* object  1 VSDD RAM pointer */
    447 unsigned        *obj2;          /* object  2 VSDD RAM pointer */
    448 unsigned        *obj3;          /* object  3 VSDD RAM pointer */
    449 unsigned        *obj4;          /* object  4 VSDD RAM pointer */
    450 unsigned        *obj5;          /* object  5 VSDD RAM pointer */
    451 unsigned        *obj6;          /* object  6 VSDD RAM pointer */
    452 unsigned        *obj7;          /* object  7 VSDD RAM pointer */
    453 unsigned        *obj8;          /* object  8 VSDD RAM pointer */
    454 unsigned        *obj9;          /* object  9 VSDD RAM pointer */
    455 unsigned        *obj10;         /* object 10 VSDD RAM pointer */
    456 unsigned        *obj11;         /* object 11 VSDD RAM pointer */
    457 unsigned        *obj12;         /* object 12 VSDD RAM pointer */
    458 unsigned        *obj13;         /* object 13 VSDD RAM pointer */
    459 unsigned        *obj14;         /* object 14 VSDD RAM pointer */
    460 unsigned        *obj15;         /* object 15 VSDD RAM pointer */
    461 unsigned        *prvsl;         /* previous (left edge) slice pointer */
    462 unsigned        *saddr;         /* score VSDD RAM base pointer */
    463 unsigned        *tunob;         /* tuning table display object pointer */
    464 unsigned        *vtobj;         /* virtual typewriter display object pointer */
    465 unsigned        *waveob;        /* waveshape display object pointer */
    466 
    467 unsigned        curintp;        /* current interpolate time (FPU format) */
    468 unsigned        scrl;           /* score VSDD object scroll register image */
    469 unsigned        vtbgval;        /* virtual typewriter data background color */
    470 unsigned        vtfgval;        /* virtual typewriter data foreground color */
    471 
    472 unsigned        dfbuf[4096];    /* track formatting buffer */
    473 unsigned        slices[896];    /* score display slices */
     438uint16_t        *asgob;         /* assignment display object pointer */
     439uint16_t        *consl;         /* constant slice pointer */
     440uint16_t        *cursl;         /* current (center) slice pointer */
     441uint16_t        *instob;        /* instrument object pointer */
     442uint16_t        *librob;        /* librarian display object pointer */
     443uint16_t        *menuob;        /* menu display object pointer */
     444uint16_t        *nxtsl;         /* next (right edge) slice pointer */
     445uint16_t        *obj0;          /* object  0 VSDD RAM pointer */
     446uint16_t        *obj1;          /* object  1 VSDD RAM pointer */
     447uint16_t        *obj2;          /* object  2 VSDD RAM pointer */
     448uint16_t        *obj3;          /* object  3 VSDD RAM pointer */
     449uint16_t        *obj4;          /* object  4 VSDD RAM pointer */
     450uint16_t        *obj5;          /* object  5 VSDD RAM pointer */
     451uint16_t        *obj6;          /* object  6 VSDD RAM pointer */
     452uint16_t        *obj7;          /* object  7 VSDD RAM pointer */
     453uint16_t        *obj8;          /* object  8 VSDD RAM pointer */
     454uint16_t        *obj9;          /* object  9 VSDD RAM pointer */
     455uint16_t        *obj10;         /* object 10 VSDD RAM pointer */
     456uint16_t        *obj11;         /* object 11 VSDD RAM pointer */
     457uint16_t        *obj12;         /* object 12 VSDD RAM pointer */
     458uint16_t        *obj13;         /* object 13 VSDD RAM pointer */
     459uint16_t        *obj14;         /* object 14 VSDD RAM pointer */
     460uint16_t        *obj15;         /* object 15 VSDD RAM pointer */
     461uint16_t        *prvsl;         /* previous (left edge) slice pointer */
     462uint16_t        *saddr;         /* score VSDD RAM base pointer */
     463uint16_t        *tunob;         /* tuning table display object pointer */
     464uint16_t        *vtobj;         /* virtual typewriter display object pointer */
     465uint16_t        *waveob;        /* waveshape display object pointer */
     466
     467uint16_t        curintp;        /* current interpolate time (FPU format) */
     468uint16_t        scrl;           /* score VSDD object scroll register image */
     469uint16_t        vtbgval;        /* virtual typewriter data background color */
     470uint16_t        vtfgval;        /* virtual typewriter data foreground color */
     471
     472uint16_t        dfbuf[4096];    /* track formatting buffer */
     473uint16_t        slices[896];    /* score display slices */
    474474
    475475/*
     
    479479/* initialized variables */
    480480
    481 short   debugsw = DEBUGVAL;     /* debug output switch */
    482 
    483 short   swback  = SWBACK;       /* scroll wheel look back count */
    484 short   swthr   = SWTHR;        /* scroll wheel movement threshold */
    485 short   swtime  = SWTIME;       /* scroll wheel timer scan time */
    486 short   swwait  = SWWAIT;       /* scroll wheel wait count */
    487 
    488 short   tkback  = TKBACK;       /* trackball FIFO look back count */
    489 short   tkrmin  = TKRMIN;       /* trackball rate threshold */
    490 short   tkthr   = TKTHR;        /* trackball movement threshold */
    491 short   tktime  = TKTIME;       /* trackball timer scan time */
    492 short   tkwait  = TKWAIT;       /* trackball wait count */
    493 
    494 short   curhold = CURHOLD;      /* cursor hold time */
    495 short   hcwval  = HCWVAL;       /* graphics cursor X wait time */
    496 short   thcwval = THCWVAL;      /* text cursor H wait time */
    497 short   tvcwval = TVCWVAL;      /* text cursor V wait time */
    498 short   vcwval  = VCWVAL;       /* graphics cursor Y wait time */
    499 
    500 /*
    501 
    502 */
    503 
    504 short   tmultab[] = {           /* time multiplier table - indexed by voltage */
     481int16_t debugsw = DEBUGVAL;     /* debug output switch */
     482
     483int16_t swback  = SWBACK;       /* scroll wheel look back count */
     484int16_t swthr   = SWTHR;        /* scroll wheel movement threshold */
     485int16_t swtime  = SWTIME;       /* scroll wheel timer scan time */
     486int16_t swwait  = SWWAIT;       /* scroll wheel wait count */
     487
     488int16_t tkback  = TKBACK;       /* trackball FIFO look back count */
     489int16_t tkrmin  = TKRMIN;       /* trackball rate threshold */
     490int16_t tkthr   = TKTHR;        /* trackball movement threshold */
     491int16_t tktime  = TKTIME;       /* trackball timer scan time */
     492int16_t tkwait  = TKWAIT;       /* trackball wait count */
     493
     494int16_t curhold = CURHOLD;      /* cursor hold time */
     495int16_t hcwval  = HCWVAL;       /* graphics cursor X wait time */
     496int16_t thcwval = THCWVAL;      /* text cursor H wait time */
     497int16_t tvcwval = TVCWVAL;      /* text cursor V wait time */
     498int16_t vcwval  = VCWVAL;       /* graphics cursor Y wait time */
     499
     500/*
     501
     502*/
     503
     504int16_t tmultab[] = {           /* time multiplier table - indexed by voltage */
    505505
    506506        0xFFFF, 0xFAFA, 0xF627, 0xF182, 0xED09,         /*   0 */
     
    531531*/
    532532
    533 short   crate0[] = {                    /* cursor rate table 1 */
     533int16_t crate0[] = {                    /* cursor rate table 1 */
    534534
    535535         0,  0,  0,  0,  0,  0,  0,  0,         /* 0..7 */
     
    543543};
    544544
    545 short   crate1[] = {                    /* cursor rate table 1 */
     545int16_t crate1[] = {                    /* cursor rate table 1 */
    546546
    547547         0,  0,  0,  0,  0,  0,  0,  0,         /* 0..7 */
     
    555555};
    556556
    557 short crate2[] = {                      /* cursor rate table 2 */
     557int16_t crate2[] = {                    /* cursor rate table 2 */
    558558
    559559          0,  0,  0,  0,  0,  0,  0,  0,        /* 0..7 */
     
    571571*/
    572572
    573 short   loctab[9] = {
     573int16_t loctab[9] = {
    574574
    575575        0,              /* 0 - left */
     
    598598*/
    599599
    600 short valof(short srcv)
     600int16_t valof(int16_t srcv)
    601601{
    602602        switch (srcv) {
     
    645645void inismtb(void)
    646646{
    647         register short i, oldi;
     647        register int16_t i, oldi;
    648648
    649649        oldi = setipl(FPU_DI);
     
    690690void clrpfl(void)
    691691{
    692         register short i;
     692        register int16_t i;
    693693
    694694        memsetw(&pfents[0], 0, (NPFENTS * sizeof (struct pflent))/2);
     
    713713void im700(void)
    714714{
    715         register short i, j, k;
    716         register char *ioadr;
     715        register int16_t i, j, k;
     716        register int8_t *ioadr;
    717717        register struct instdef *ip;
    718718
Note: See TracChangeset for help on using the changeset viewer.