| 1 | #pragma once
|
|---|
| 2 |
|
|---|
| 3 | #include "asgdsp.h"
|
|---|
| 4 | #include "fields.h"
|
|---|
| 5 | #include "instdsp.h"
|
|---|
| 6 | #include "libdsp.h"
|
|---|
| 7 | #include "objdefs.h"
|
|---|
| 8 | #include "score.h"
|
|---|
| 9 | #include "slice.h"
|
|---|
| 10 | #include "smdefs.h"
|
|---|
| 11 | #include "stdint.h"
|
|---|
| 12 | #include "vsdd.h"
|
|---|
| 13 | #include "wsdsp.h"
|
|---|
| 14 |
|
|---|
| 15 | /*
|
|---|
| 16 | =============================================================================
|
|---|
| 17 | im700.c -- global variables
|
|---|
| 18 | =============================================================================
|
|---|
| 19 | */
|
|---|
| 20 |
|
|---|
| 21 | extern int16_t admctl;
|
|---|
| 22 | extern int16_t adnamsw;
|
|---|
| 23 | extern struct octent *adoct;
|
|---|
| 24 | extern int16_t aflag;
|
|---|
| 25 | extern int16_t aform;
|
|---|
| 26 | extern int16_t amplval;
|
|---|
| 27 | extern int16_t ancmsw;
|
|---|
| 28 | extern int16_t angroup;
|
|---|
| 29 | extern int16_t anrs[8][16];
|
|---|
| 30 | extern int16_t asgfks;
|
|---|
| 31 | extern int16_t asghit;
|
|---|
| 32 | extern int16_t asgmod;
|
|---|
| 33 | extern uint16_t *asgob;
|
|---|
| 34 | extern struct asgent asgtab[100];
|
|---|
| 35 | extern int16_t asig;
|
|---|
| 36 | extern int16_t asmode;
|
|---|
| 37 | extern int16_t astat;
|
|---|
| 38 | extern int16_t auxctl;
|
|---|
| 39 | extern int16_t aval;
|
|---|
| 40 | extern int16_t bform;
|
|---|
| 41 | extern int16_t catin;
|
|---|
| 42 | extern int16_t cents;
|
|---|
| 43 | extern struct fet *cfetp;
|
|---|
| 44 | extern int16_t cflag;
|
|---|
| 45 | extern int16_t chtime;
|
|---|
| 46 | extern int16_t chwait;
|
|---|
| 47 | extern int16_t clkctl;
|
|---|
| 48 | extern int16_t clkrun;
|
|---|
| 49 | extern int16_t clksrc;
|
|---|
| 50 | extern int16_t cmfirst;
|
|---|
| 51 | extern int16_t cmtype;
|
|---|
| 52 | extern int16_t cnote;
|
|---|
| 53 | extern uint16_t *consl;
|
|---|
| 54 | extern int16_t crate0[];
|
|---|
| 55 | extern int16_t crate1[];
|
|---|
| 56 | extern int16_t crate2[];
|
|---|
| 57 | extern struct selbox *csbp;
|
|---|
| 58 | extern int16_t ctrsw;
|
|---|
| 59 | extern int16_t curasg;
|
|---|
| 60 | extern struct selbox *curboxp;
|
|---|
| 61 | extern struct fet *curfet;
|
|---|
| 62 | extern int16_t curfunc;
|
|---|
| 63 | extern int16_t curgrp;
|
|---|
| 64 | extern int16_t curhold;
|
|---|
| 65 | extern int16_t curinst;
|
|---|
| 66 | extern uint16_t curintp;
|
|---|
| 67 | extern int16_t curmop;
|
|---|
| 68 | extern int16_t curpnt;
|
|---|
| 69 | extern int16_t curpos;
|
|---|
| 70 | extern int16_t cursbox;
|
|---|
| 71 | extern int16_t curscor;
|
|---|
| 72 | extern int16_t cursect;
|
|---|
| 73 | extern uint16_t *cursl;
|
|---|
| 74 | extern int16_t curslim;
|
|---|
| 75 | extern int16_t curtun;
|
|---|
| 76 | extern int16_t curvce;
|
|---|
| 77 | extern int16_t curwave;
|
|---|
| 78 | extern int16_t curwdth;
|
|---|
| 79 | extern int16_t curwfnl;
|
|---|
| 80 | extern int16_t curwhrm;
|
|---|
| 81 | extern int16_t curwhrv;
|
|---|
| 82 | extern int16_t curwoff;
|
|---|
| 83 | extern int16_t curwpnt;
|
|---|
| 84 | extern int16_t curwslt;
|
|---|
| 85 | extern int16_t cvtime;
|
|---|
| 86 | extern int16_t cvwait;
|
|---|
| 87 | extern int16_t cxrate;
|
|---|
| 88 | extern int16_t cxval;
|
|---|
| 89 | extern int16_t cyrate;
|
|---|
| 90 | extern int16_t cyval;
|
|---|
| 91 | extern int16_t debugne;
|
|---|
| 92 | extern int16_t debugsw;
|
|---|
| 93 | extern int16_t defect;
|
|---|
| 94 | extern uint16_t dfbuf[4096];
|
|---|
| 95 | extern int16_t dferror;
|
|---|
| 96 | extern int16_t dfsides;
|
|---|
| 97 | extern int16_t dftype;
|
|---|
| 98 | extern int16_t dsp_ok;
|
|---|
| 99 | extern int16_t dubsw;
|
|---|
| 100 | extern int16_t ebflag;
|
|---|
| 101 | extern int16_t editss;
|
|---|
| 102 | extern int16_t editsw;
|
|---|
| 103 | extern int16_t endflg;
|
|---|
| 104 | extern int16_t ext_cv1;
|
|---|
| 105 | extern int16_t ext_cv2;
|
|---|
| 106 | extern int16_t ext_cv3;
|
|---|
| 107 | extern int16_t ext_cv4;
|
|---|
| 108 | extern int16_t ext_mod;
|
|---|
| 109 | extern struct fcat filecat[20];
|
|---|
| 110 | extern struct gdsel *gdfsep;
|
|---|
| 111 | extern struct gdsel gdfsl[256];
|
|---|
| 112 | extern struct gdsel *gdstbc[17];
|
|---|
| 113 | extern struct gdsel *gdstbn[17];
|
|---|
| 114 | extern struct gdsel *gdstbp[17];
|
|---|
| 115 | extern int16_t gomode;
|
|---|
| 116 | extern int16_t grp2prt[12][2];
|
|---|
| 117 | extern int16_t grptran;
|
|---|
| 118 | extern int16_t gtmsel;
|
|---|
| 119 | extern int16_t hcwval;
|
|---|
| 120 | extern int16_t hitbox;
|
|---|
| 121 | extern int16_t hitcx;
|
|---|
| 122 | extern int16_t hitcy;
|
|---|
| 123 | extern struct s_entry *hplist[20][12];
|
|---|
| 124 | extern int16_t idcfsw;
|
|---|
| 125 | extern struct instdef idefs[41];
|
|---|
| 126 | extern int16_t idimsw;
|
|---|
| 127 | extern int16_t idintmp;
|
|---|
| 128 | extern int16_t idnamsw;
|
|---|
| 129 | extern struct octent *idoct;
|
|---|
| 130 | extern int16_t idsrcsw;
|
|---|
| 131 | extern int16_t idtdat;
|
|---|
| 132 | extern int16_t imflag;
|
|---|
| 133 | extern struct fet *infetp;
|
|---|
| 134 | extern int16_t initcfg;
|
|---|
| 135 | extern int16_t insmode;
|
|---|
| 136 | extern uint16_t *instob;
|
|---|
| 137 | extern int16_t ismode;
|
|---|
| 138 | extern int16_t lampio;
|
|---|
| 139 | extern int16_t lampsw;
|
|---|
| 140 | extern int16_t lasgsw;
|
|---|
| 141 | extern int16_t lastam;
|
|---|
| 142 | extern int16_t ldelsw;
|
|---|
| 143 | extern int16_t lderrsw;
|
|---|
| 144 | extern struct mlibhdr ldhead;
|
|---|
| 145 | extern int16_t ldidsiz;
|
|---|
| 146 | extern int16_t ldkind;
|
|---|
| 147 | extern struct octent *ldoct;
|
|---|
| 148 | extern int16_t ldpass;
|
|---|
| 149 | extern int16_t ldrow;
|
|---|
| 150 | extern int16_t ldslot;
|
|---|
| 151 | extern int16_t legato;
|
|---|
| 152 | extern uint16_t *librob;
|
|---|
| 153 | extern struct s_entry *libsp;
|
|---|
| 154 | extern int16_t lksel;
|
|---|
| 155 | extern int16_t lmwtype;
|
|---|
| 156 | extern int16_t loadrow;
|
|---|
| 157 | extern int16_t loadsw;
|
|---|
| 158 | extern int16_t loctab[9];
|
|---|
| 159 | extern int16_t lorchl;
|
|---|
| 160 | extern int16_t lorchsw;
|
|---|
| 161 | extern int16_t lorclsw;
|
|---|
| 162 | extern int16_t lpatsw;
|
|---|
| 163 | extern int16_t lrasw;
|
|---|
| 164 | extern int16_t lscrsw;
|
|---|
| 165 | extern int16_t lselsw;
|
|---|
| 166 | extern int16_t lseqsw;
|
|---|
| 167 | extern int16_t lstbgnc;
|
|---|
| 168 | extern struct n_entry *lstbgns[48];
|
|---|
| 169 | extern int16_t lstendc;
|
|---|
| 170 | extern struct n_entry *lstends[48];
|
|---|
| 171 | extern int16_t lstflag;
|
|---|
| 172 | extern int16_t lstrsw;
|
|---|
| 173 | extern int16_t lstwoff;
|
|---|
| 174 | extern int16_t lstwpnt;
|
|---|
| 175 | extern int16_t ltagged;
|
|---|
| 176 | extern int16_t ltunsw;
|
|---|
| 177 | extern int16_t lwavsw;
|
|---|
| 178 | extern int16_t mascntr;
|
|---|
| 179 | extern int16_t mdb1;
|
|---|
| 180 | extern int16_t mdb2;
|
|---|
| 181 | extern struct octent *mdoct;
|
|---|
| 182 | extern uint16_t *menuob;
|
|---|
| 183 | extern int16_t michan;
|
|---|
| 184 | extern int16_t midiclk;
|
|---|
| 185 | extern int16_t midigo;
|
|---|
| 186 | extern int16_t mistat;
|
|---|
| 187 | extern struct EXFILE mphead;
|
|---|
| 188 | extern int16_t nchwait;
|
|---|
| 189 | extern int16_t ncvwait;
|
|---|
| 190 | extern int16_t ndisp;
|
|---|
| 191 | extern struct nevent *nefree;
|
|---|
| 192 | extern struct nevent *nelist;
|
|---|
| 193 | extern struct nevent nevents[32];
|
|---|
| 194 | extern int16_t newflag;
|
|---|
| 195 | extern int16_t nkdown;
|
|---|
| 196 | extern int16_t notenum;
|
|---|
| 197 | extern int16_t noteop;
|
|---|
| 198 | extern int16_t notepit;
|
|---|
| 199 | extern int16_t notesel;
|
|---|
| 200 | extern int16_t npts;
|
|---|
| 201 | extern int16_t nxtflag;
|
|---|
| 202 | extern uint16_t *nxtsl;
|
|---|
| 203 | extern uint16_t *obj0;
|
|---|
| 204 | extern uint16_t *obj1;
|
|---|
| 205 | extern uint16_t *obj10;
|
|---|
| 206 | extern uint16_t *obj11;
|
|---|
| 207 | extern uint16_t *obj12;
|
|---|
| 208 | extern uint16_t *obj13;
|
|---|
| 209 | extern uint16_t *obj14;
|
|---|
| 210 | extern uint16_t *obj15;
|
|---|
| 211 | extern uint16_t *obj2;
|
|---|
| 212 | extern uint16_t *obj3;
|
|---|
| 213 | extern uint16_t *obj4;
|
|---|
| 214 | extern uint16_t *obj5;
|
|---|
| 215 | extern uint16_t *obj6;
|
|---|
| 216 | extern uint16_t *obj7;
|
|---|
| 217 | extern uint16_t *obj8;
|
|---|
| 218 | extern uint16_t *obj9;
|
|---|
| 219 | extern int16_t oldltag;
|
|---|
| 220 | extern int16_t oldpk;
|
|---|
| 221 | extern int16_t oldsl;
|
|---|
| 222 | extern struct s_entry *p_bak;
|
|---|
| 223 | extern struct s_entry *p_cbgn;
|
|---|
| 224 | extern struct s_entry *p_cend;
|
|---|
| 225 | extern struct s_entry *p_ctr;
|
|---|
| 226 | extern struct s_entry *p_cur;
|
|---|
| 227 | extern struct s_entry *p_fwd;
|
|---|
| 228 | extern struct n_entry *p_nbeg;
|
|---|
| 229 | extern struct n_entry *p_nend;
|
|---|
| 230 | extern struct s_entry *p_sbgn;
|
|---|
| 231 | extern struct s_entry *p_sec1;
|
|---|
| 232 | extern struct s_entry *p_sec2;
|
|---|
| 233 | extern struct s_entry *p_send;
|
|---|
| 234 | extern int16_t pchsw;
|
|---|
| 235 | extern int16_t pecase;
|
|---|
| 236 | extern struct s_entry *peg;
|
|---|
| 237 | extern struct pflent pfents[336];
|
|---|
| 238 | extern struct pflent *pflist;
|
|---|
| 239 | extern struct pflent *pfqhdr;
|
|---|
| 240 | extern int16_t pkctrl;
|
|---|
| 241 | extern struct instpnt *pntptr;
|
|---|
| 242 | extern int16_t pntsv;
|
|---|
| 243 | extern int16_t prgchan;
|
|---|
| 244 | extern uint16_t *prvsl;
|
|---|
| 245 | extern int16_t ps_dpth;
|
|---|
| 246 | extern int16_t ps_intn;
|
|---|
| 247 | extern int16_t ps_rate;
|
|---|
| 248 | extern int16_t pulsclk;
|
|---|
| 249 | extern int16_t recsw;
|
|---|
| 250 | extern int16_t runit;
|
|---|
| 251 | extern uint16_t *saddr;
|
|---|
| 252 | extern int16_t sbase;
|
|---|
| 253 | extern int16_t scmctl;
|
|---|
| 254 | extern struct s_entry *scores[20];
|
|---|
| 255 | extern struct s_entry *scp;
|
|---|
| 256 | extern uint16_t scrl;
|
|---|
| 257 | extern int16_t scrlpot;
|
|---|
| 258 | extern int16_t sctctab[10][64];
|
|---|
| 259 | extern int16_t sd;
|
|---|
| 260 | extern int16_t sdmcol;
|
|---|
| 261 | extern int16_t sdmctl;
|
|---|
| 262 | extern int16_t sdmrow;
|
|---|
| 263 | extern int16_t se;
|
|---|
| 264 | extern struct s_entry *seclist[20][20];
|
|---|
| 265 | extern int16_t secop;
|
|---|
| 266 | extern int16_t secopok;
|
|---|
| 267 | extern int16_t sgcsw;
|
|---|
| 268 | extern int16_t sgoflag;
|
|---|
| 269 | extern int16_t sharp;
|
|---|
| 270 | extern int16_t sigtab[128][2];
|
|---|
| 271 | extern struct scndx sindex[20];
|
|---|
| 272 | extern struct s_entry *size1;
|
|---|
| 273 | extern struct s_entry *size2;
|
|---|
| 274 | extern struct s_entry *size3;
|
|---|
| 275 | extern uint16_t slices[896];
|
|---|
| 276 | extern int16_t sliders;
|
|---|
| 277 | extern struct sment sments[192];
|
|---|
| 278 | extern int16_t soffset;
|
|---|
| 279 | extern int16_t ss_ptsw;
|
|---|
| 280 | extern int16_t ss_sqsw;
|
|---|
| 281 | extern int16_t stccol;
|
|---|
| 282 | extern int16_t stcrow;
|
|---|
| 283 | extern int16_t stepclk;
|
|---|
| 284 | extern int16_t stepenb;
|
|---|
| 285 | extern int16_t stepint;
|
|---|
| 286 | extern int16_t stepwgt;
|
|---|
| 287 | extern struct s_time stimes[20][20];
|
|---|
| 288 | extern int16_t subj;
|
|---|
| 289 | extern int16_t submenu;
|
|---|
| 290 | extern int16_t swback;
|
|---|
| 291 | extern int16_t swctrl;
|
|---|
| 292 | extern int16_t swdelta;
|
|---|
| 293 | extern int16_t swdir;
|
|---|
| 294 | extern int16_t swfiin;
|
|---|
| 295 | extern int16_t swflag;
|
|---|
| 296 | extern int16_t swlast;
|
|---|
| 297 | extern int16_t swndx;
|
|---|
| 298 | extern int16_t swstop;
|
|---|
| 299 | extern int16_t swthr;
|
|---|
| 300 | extern int16_t swtime;
|
|---|
| 301 | extern int16_t swwait;
|
|---|
| 302 | extern int16_t tagslot;
|
|---|
| 303 | extern int16_t tdnamsw;
|
|---|
| 304 | extern struct octent *tdoct;
|
|---|
| 305 | extern int16_t temax;
|
|---|
| 306 | extern int16_t temin;
|
|---|
| 307 | extern int16_t testing;
|
|---|
| 308 | extern int16_t tglclk;
|
|---|
| 309 | extern int16_t tglpch;
|
|---|
| 310 | extern int16_t thcwval;
|
|---|
| 311 | extern int16_t thescore;
|
|---|
| 312 | extern int16_t timemlt;
|
|---|
| 313 | extern int16_t tkback;
|
|---|
| 314 | extern int16_t tkctrl;
|
|---|
| 315 | extern int16_t tkrmin;
|
|---|
| 316 | extern int16_t tkthr;
|
|---|
| 317 | extern int16_t tktime;
|
|---|
| 318 | extern int16_t tkwait;
|
|---|
| 319 | extern int16_t tmpomlt;
|
|---|
| 320 | extern int16_t tmpoval;
|
|---|
| 321 | extern uint16_t tmultab[];
|
|---|
| 322 | extern int16_t trkball;
|
|---|
| 323 | extern int16_t ttcmdsv;
|
|---|
| 324 | extern int16_t ttsel1;
|
|---|
| 325 | extern int16_t ttsel2;
|
|---|
| 326 | extern int16_t ttsel3;
|
|---|
| 327 | extern int16_t tuneval;
|
|---|
| 328 | extern int16_t tunlib[10][128];
|
|---|
| 329 | extern int16_t tunmod;
|
|---|
| 330 | extern uint16_t *tunob;
|
|---|
| 331 | extern int16_t tunval;
|
|---|
| 332 | extern int16_t tvcwval;
|
|---|
| 333 | extern int16_t txfiin;
|
|---|
| 334 | extern int16_t txflag;
|
|---|
| 335 | extern int16_t txlast;
|
|---|
| 336 | extern int16_t txstop;
|
|---|
| 337 | extern int16_t tyfiin;
|
|---|
| 338 | extern int16_t tyflag;
|
|---|
| 339 | extern int16_t tylast;
|
|---|
| 340 | extern int16_t tystop;
|
|---|
| 341 | extern struct valent valents[12 << 4];
|
|---|
| 342 | extern int16_t varmode[8][16];
|
|---|
| 343 | extern struct instdef vbufs[12];
|
|---|
| 344 | extern int16_t vcwval;
|
|---|
| 345 | extern int16_t velflag;
|
|---|
| 346 | extern int16_t verbose;
|
|---|
| 347 | extern int16_t vlbtype;
|
|---|
| 348 | extern struct sment *vpsms[192];
|
|---|
| 349 | extern int16_t vrbw08;
|
|---|
| 350 | extern int16_t vrbw09;
|
|---|
| 351 | extern int16_t vrbw10;
|
|---|
| 352 | extern int16_t vrbw11;
|
|---|
| 353 | extern int16_t vrbw12;
|
|---|
| 354 | extern int16_t vrbw13;
|
|---|
| 355 | extern int16_t vrbw14;
|
|---|
| 356 | extern int16_t vrbw15;
|
|---|
| 357 | extern int16_t vrcw;
|
|---|
| 358 | extern uint16_t vtbgval;
|
|---|
| 359 | extern int16_t vtccol;
|
|---|
| 360 | extern int16_t vtcrow;
|
|---|
| 361 | extern int8_t vtdechr;
|
|---|
| 362 | extern int16_t vtdecol;
|
|---|
| 363 | extern uint16_t vtfgval;
|
|---|
| 364 | extern uint16_t *vtobj;
|
|---|
| 365 | extern int16_t vtpcol;
|
|---|
| 366 | extern int16_t vtprow;
|
|---|
| 367 | extern int16_t vtwcol;
|
|---|
| 368 | extern int16_t vtwrow;
|
|---|
| 369 | extern int16_t vtxval;
|
|---|
| 370 | extern int16_t vtyval;
|
|---|
| 371 | extern uint16_t *waveob;
|
|---|
| 372 | extern int16_t wcflag;
|
|---|
| 373 | extern int16_t wcmcol;
|
|---|
| 374 | extern int16_t wcmrow;
|
|---|
| 375 | extern int16_t wcpage;
|
|---|
| 376 | extern struct octent *wdoct;
|
|---|
| 377 | extern int16_t wdupdfl;
|
|---|
| 378 | extern int16_t wmcsel;
|
|---|
| 379 | extern int16_t wmctag;
|
|---|
| 380 | extern int16_t wplast;
|
|---|
| 381 | extern int16_t wpntsv;
|
|---|
| 382 | extern int16_t wshmax;
|
|---|
| 383 | extern struct wstbl wslib[20];
|
|---|
| 384 | extern int16_t wsnmod[12][2];
|
|---|
| 385 | extern int16_t wvlast;
|
|---|
| 386 | extern int16_t xkcount;
|
|---|
| 387 | extern int16_t xkstat;
|
|---|
| 388 | extern int16_t xycntr;
|
|---|
| 389 | extern int16_t ykcount;
|
|---|
| 390 | extern int16_t ykstat;
|
|---|
| 391 |
|
|---|
| 392 | /*
|
|---|
| 393 | =============================================================================
|
|---|
| 394 | im700.c -- global functions
|
|---|
| 395 | =============================================================================
|
|---|
| 396 | */
|
|---|
| 397 |
|
|---|
| 398 | extern void clrpfl(void);
|
|---|
| 399 | extern void im700(void);
|
|---|
| 400 | extern void inismtb(void);
|
|---|
| 401 | extern int16_t valof(int16_t srcv);
|
|---|
| 402 |
|
|---|