[3ae31e9] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | scordsp.c -- MIDAS score display driver
|
---|
| 4 | Version 136 -- 1988-12-08 -- D.N. Lynx Crowe
|
---|
| 5 | =============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #include "stddefs.h"
|
---|
| 9 | #include "biosdefs.h"
|
---|
| 10 | #include "glcdefs.h"
|
---|
| 11 | #include "glcfns.h"
|
---|
| 12 | #include "graphdef.h"
|
---|
| 13 | #include "lcdline.h"
|
---|
| 14 | #include "memory.h"
|
---|
| 15 | #include "secops.h"
|
---|
| 16 | #include "vsdd.h"
|
---|
| 17 | #include "vsddsw.h"
|
---|
| 18 | #include "vsddvars.h"
|
---|
| 19 | #include "hwdefs.h"
|
---|
| 20 | #include "cmeta.h"
|
---|
| 21 | #include "macros.h"
|
---|
| 22 | #include "panel.h"
|
---|
| 23 | #include "smdefs.h"
|
---|
| 24 |
|
---|
| 25 | #include "midas.h"
|
---|
| 26 | #include "score.h"
|
---|
| 27 | #include "scdsp.h"
|
---|
| 28 | #include "scfns.h"
|
---|
| 29 | #include "secdefs.h"
|
---|
| 30 | #include "neddefs.h"
|
---|
| 31 |
|
---|
| 32 | /* |
---|
| 33 |
|
---|
| 34 | */
|
---|
| 35 |
|
---|
| 36 | extern unsigned exp_c();
|
---|
| 37 |
|
---|
| 38 | /* variables defined elsewhere */
|
---|
| 39 |
|
---|
| 40 | extern short (*point)();
|
---|
| 41 |
|
---|
| 42 | extern unsigned *obj0, *obj2, *obj3, *obj8, *obj11, *obj13, *obj14, *obj15;
|
---|
| 43 |
|
---|
| 44 | extern unsigned *consl; /* constant slice pointer */
|
---|
| 45 | extern unsigned *saddr; /* score VSDD RAM base pointer */
|
---|
| 46 |
|
---|
| 47 | extern unsigned scrl; /* score VSDD object scroll register image */
|
---|
| 48 |
|
---|
| 49 | extern short ancmsw; /* analog variable r/p control source */
|
---|
| 50 | extern short angroup; /* analog variable group being shown */
|
---|
| 51 | extern short clkctl; /* clock control */
|
---|
| 52 | extern short clkrun; /* clock run switch */
|
---|
| 53 | extern short clksrc; /* clock source */
|
---|
| 54 | extern short cxval; /* cursor x */
|
---|
| 55 | extern short cyval; /* cursor y */
|
---|
| 56 | extern short dubsw; /* overdub / replace switch */
|
---|
| 57 | extern short insmode; /* insert switch */
|
---|
| 58 | extern short lastam; /* last assignment menu page */
|
---|
| 59 | extern short ndisp; /* display number */
|
---|
| 60 | extern short pchsw; /* punch-in enable switch */
|
---|
| 61 | extern short recsw; /* record / play switch */
|
---|
| 62 | extern short sbase; /* score VSDD RAM scroll offset */
|
---|
| 63 | extern short scmctl; /* score submenu #2 state */
|
---|
| 64 | extern short sd; /* score scroll direction */
|
---|
| 65 | extern short sdmctl; /* score submenu #1 state */
|
---|
| 66 | extern short secop; /* section operation */
|
---|
| 67 | extern short sgcsw; /* score graphic / text cursor switch */
|
---|
| 68 | extern short sliders; /* slider function */
|
---|
| 69 | extern short soffset; /* score scroll offset */
|
---|
| 70 | extern short stccol; /* text cursor column */
|
---|
| 71 | extern short stcrow; /* text cursor row */
|
---|
| 72 | extern short submenu; /* submenu cursor switch */
|
---|
| 73 | extern short velflag; /* velocity display enable flag */
|
---|
| 74 |
|
---|
| 75 | extern char bfs[]; /* display generation buffer */
|
---|
| 76 |
|
---|
| 77 | extern char *nedlbl[]; /* note edit labels */
|
---|
| 78 |
|
---|
| 79 | extern short kbobj[]; /* keyboard icon */
|
---|
| 80 |
|
---|
| 81 | extern short grpmode[]; /* group mode - 0 = play, 1 = stdby, 2 = rec */
|
---|
| 82 | extern short grpstat[]; /* group status - 0 = off, non-0 = on */
|
---|
| 83 | extern short lastvel[]; /* last velocity sent to group */
|
---|
| 84 |
|
---|
| 85 | extern short anrs[][16]; /* analog variable resolution */
|
---|
| 86 | extern short varmode[][16]; /* analog variable record mode */
|
---|
| 87 |
|
---|
| 88 | extern unsigned slices[]; /* score display slices */
|
---|
| 89 |
|
---|
| 90 | extern struct valent valents[]; /* s/m value table */
|
---|
| 91 |
|
---|
| 92 | /* |
---|
| 93 |
|
---|
| 94 | */
|
---|
| 95 |
|
---|
| 96 | /* initialized stuff */
|
---|
| 97 |
|
---|
| 98 | short var2src[6] = { /* analog variable map */
|
---|
| 99 |
|
---|
| 100 | SM_HTPW, SM_VTMW, SM_LPBR, SM_CTL1, SM_PED1, SM_KPRS
|
---|
| 101 | };
|
---|
| 102 |
|
---|
| 103 | short simled[3] = { /* simulated LED colors for group modes */
|
---|
| 104 |
|
---|
| 105 | 0x00A2, /* play mode = green */
|
---|
| 106 | 0x0062, /* standby mode = yellow */
|
---|
| 107 | 0x0052 /* record mode = red */
|
---|
| 108 | };
|
---|
| 109 |
|
---|
| 110 | char nsvtab[] = { /* note value modifier (accidental) table */
|
---|
| 111 |
|
---|
| 112 | 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, /* 21 .. 32 -- A0 .. G#0 */
|
---|
| 113 | 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, /* 33 .. 44 -- A1 .. G#1 */
|
---|
| 114 | 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, /* 45 .. 56 -- A2 .. G#2 */
|
---|
| 115 | 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, /* 57 .. 68 -- A3 .. G#3 */
|
---|
| 116 | 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, /* 69 .. 80 -- A4 .. G#4 */
|
---|
| 117 | 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, /* 81 .. 92 -- A5 .. G#5 */
|
---|
| 118 | 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, /* 93 .. 104 -- A6 .. G#6 */
|
---|
| 119 | 0, 1, 0, 0 /* 105 .. 108 -- A7 .. C7 */
|
---|
| 120 | };
|
---|
| 121 |
|
---|
| 122 | short scorpal[16][3] = { /* score palette */
|
---|
| 123 |
|
---|
| 124 | {0, 0, 0}, /* 0 - black */
|
---|
| 125 | {2, 3, 3}, /* 1 - white */
|
---|
| 126 | {0, 0, 1}, /* 2 - dark blue #1 */
|
---|
| 127 | {2, 0, 2}, /* 3 - dark violet */
|
---|
| 128 | {0, 0, 3}, /* 4 - dark blue #2 */
|
---|
| 129 | {3, 0, 0}, /* 5 - red */
|
---|
| 130 | {3, 3, 0}, /* 6 - yellow */
|
---|
| 131 | {1, 2, 0}, /* 7 - dark green */
|
---|
| 132 | {0, 3, 3}, /* 8 - light blue */
|
---|
| 133 | {3, 2, 0}, /* 9 - tan */
|
---|
| 134 | {0, 3, 0}, /* 10 - light green */
|
---|
| 135 | {3, 1, 2}, /* 11 - light violet */
|
---|
| 136 | {0, 2, 3}, /* 12 - medium blue */
|
---|
| 137 | {2, 0, 0}, /* 13 - dark red */
|
---|
| 138 | {2, 2, 1}, /* 14 - ivory */
|
---|
| 139 | {3, 3, 3} /* 15 - bright white */
|
---|
| 140 | };
|
---|
| 141 |
|
---|
| 142 | /* |
---|
| 143 |
|
---|
| 144 | */
|
---|
| 145 |
|
---|
| 146 | char *clklbl[] = { /* clock control and scource labels */
|
---|
| 147 |
|
---|
| 148 | "Local", /* 0 - CK_LOCAL */
|
---|
| 149 | "MIDI ", /* 1 - CK_MIDI */
|
---|
| 150 | "SMPTE", /* 2 - CK_SMPTE */
|
---|
| 151 | "PLS24", /* 3 - CK_PLS24 */
|
---|
| 152 | "PLS48", /* 4 - CK_PLS48 */
|
---|
| 153 | "PLS96", /* 5 - CK_PLS96 */
|
---|
| 154 | "Step " /* 6 - CK_STEP */
|
---|
| 155 | };
|
---|
| 156 |
|
---|
| 157 | char *sdisp[] = { /* score display fixed text strings */
|
---|
| 158 |
|
---|
| 159 | /* 0 */ "\230\231\232\233 ", /* Interpolate */
|
---|
| 160 |
|
---|
| 161 | /* 1 */ "\200\201\202\203 1 2 3 4 5 6 7 8 9 \254 \255 \256 ",
|
---|
| 162 | /* Group / Instrument */
|
---|
| 163 |
|
---|
| 164 | /* 2 */ "\220\221\222\223 Pch/Hor Mod/Vrt Brth/LP GPC/CV1 Pedal 1 Key Prs Group",
|
---|
| 165 | /* Analog Source */
|
---|
| 166 |
|
---|
| 167 | /* 3 */ "\015\016\017 Play Recrd OvrDub PunchIn ",
|
---|
| 168 | /* Rec Mode */
|
---|
| 169 |
|
---|
| 170 | /* 4 */ "\204\205\206\207", /* Transpose */
|
---|
| 171 |
|
---|
| 172 | /* 5 */ "\210\211\212\213 / / / / / / / / / / / / ",
|
---|
| 173 | /* Dynamics / Location */
|
---|
| 174 |
|
---|
| 175 | /* 6 */ "\214\215\216\217", /* Velocity */
|
---|
| 176 |
|
---|
| 177 | /* 7 */ "\224\225\226\227 0/+00.0 0/+00.0 0/+00.0 0/+00.0 0/+00.0 0/+00.0 # 00 ",
|
---|
| 178 | /* Resolution / Value */
|
---|
| 179 |
|
---|
| 180 | /* 8 */ " "
|
---|
| 181 |
|
---|
| 182 |
|
---|
| 183 | };
|
---|
| 184 |
|
---|
| 185 | /* |
---|
| 186 |
|
---|
| 187 | */
|
---|
| 188 |
|
---|
| 189 | /*
|
---|
| 190 | =============================================================================
|
---|
| 191 | makeln(lnc, lec) -- create the constant slice at 'consl'.
|
---|
| 192 | make the line object color 'lnc', and ledger line color 'lec',
|
---|
| 193 | =============================================================================
|
---|
| 194 | */
|
---|
| 195 |
|
---|
| 196 | makeln(lnc, lew)
|
---|
| 197 | register unsigned lnc, lew;
|
---|
| 198 | {
|
---|
| 199 | register unsigned *lp, *cp;
|
---|
| 200 | register short i;
|
---|
| 201 | register unsigned lbg;
|
---|
| 202 |
|
---|
| 203 | lp = obj15; /* setup line object pointer */
|
---|
| 204 | cp = consl; /* setup constant slice pointer */
|
---|
| 205 |
|
---|
| 206 | lew = exp_c(lew); /* create ledger line constant */
|
---|
| 207 |
|
---|
| 208 | lnc &= 0x000F; /* mask cursor line color */
|
---|
| 209 |
|
---|
| 210 | /* |
---|
| 211 |
|
---|
| 212 | */
|
---|
| 213 | for (i = 0; i < 224; i++) {
|
---|
| 214 |
|
---|
| 215 | /* stuff data into line object */
|
---|
| 216 |
|
---|
| 217 | if ((i EQ 42) OR /* top ledger line */
|
---|
| 218 | (i EQ 50) OR /* top ledger line */
|
---|
| 219 | (i EQ 58) OR /* top ledger line */
|
---|
| 220 | (i EQ 66) OR /* top ledger line */
|
---|
| 221 | (i EQ 162) OR /* bottom ledger line */
|
---|
| 222 | (i EQ 170) OR /* bottom ledger line */
|
---|
| 223 | (i EQ 178) OR /* bottom ledger line */
|
---|
| 224 | (i EQ 186)) {
|
---|
| 225 |
|
---|
| 226 | lbg = lew;
|
---|
| 227 | *lp++ = lbg & 0xFFF0;
|
---|
| 228 | *lp++ = lbg;
|
---|
| 229 | *lp++ = lbg;
|
---|
| 230 | *lp++ = lbg;
|
---|
| 231 |
|
---|
| 232 | } else if (i > 209) { /* new data area */
|
---|
| 233 |
|
---|
| 234 | lbg = 0;
|
---|
| 235 | *lp++ = lbg & 0xFFF0;
|
---|
| 236 | *lp++ = lbg;
|
---|
| 237 | *lp++ = lbg;
|
---|
| 238 | *lp++ = lbg;
|
---|
| 239 |
|
---|
| 240 | } else {
|
---|
| 241 |
|
---|
| 242 | lbg = 0;
|
---|
| 243 | *lp++ = lbg & 0xFFF0;
|
---|
| 244 | *lp++ = lbg;
|
---|
| 245 | *lp++ = (lbg & 0xFFF0) | lnc;
|
---|
| 246 | *lp++ = lbg;
|
---|
| 247 | }
|
---|
| 248 |
|
---|
| 249 | *cp++ = 0; /* clear a line in the constant slice */
|
---|
| 250 | }
|
---|
| 251 |
|
---|
| 252 | /* |
---|
| 253 |
|
---|
| 254 | */
|
---|
| 255 |
|
---|
| 256 | consl[74] = lew; /* constant slice treble clef lines */
|
---|
| 257 | consl[82] = lew;
|
---|
| 258 | consl[90] = lew;
|
---|
| 259 | consl[98] = lew;
|
---|
| 260 | consl[106] = lew;
|
---|
| 261 |
|
---|
| 262 | consl[122] = lew; /* constant slice bass clef lines */
|
---|
| 263 | consl[130] = lew;
|
---|
| 264 | consl[138] = lew;
|
---|
| 265 | consl[146] = lew;
|
---|
| 266 | consl[154] = lew;
|
---|
| 267 |
|
---|
| 268 | consl[210] = exp_c(NDMC); /* constant slice new data margin line */
|
---|
| 269 | }
|
---|
| 270 |
|
---|
| 271 | /* |
---|
| 272 |
|
---|
| 273 | */
|
---|
| 274 |
|
---|
| 275 | /*
|
---|
| 276 | =============================================================================
|
---|
| 277 | ds_vmod() -- display velocity mode
|
---|
| 278 | =============================================================================
|
---|
| 279 | */
|
---|
| 280 |
|
---|
| 281 | ds_vmod()
|
---|
| 282 | {
|
---|
| 283 | if (ndisp NE 2)
|
---|
| 284 | return;
|
---|
| 285 |
|
---|
| 286 | if (v_regs[5] & 0x0180)
|
---|
| 287 | vbank(0);
|
---|
| 288 |
|
---|
| 289 | vputs(obj8, 5, 0, sdisp[6],
|
---|
| 290 | velflag ? ((SD_CHNG << 4) | SDBG11) : SDW11ATR);
|
---|
| 291 | }
|
---|
| 292 |
|
---|
| 293 | /*
|
---|
| 294 | =============================================================================
|
---|
| 295 | ds_vel() -- display velocities
|
---|
| 296 | =============================================================================
|
---|
| 297 | */
|
---|
| 298 |
|
---|
| 299 | ds_vel()
|
---|
| 300 | {
|
---|
| 301 | register short i;
|
---|
| 302 | char buf[6];
|
---|
| 303 |
|
---|
| 304 | if (ndisp NE 2)
|
---|
| 305 | return;
|
---|
| 306 |
|
---|
| 307 | if (v_regs[5] & 0x0180)
|
---|
| 308 | vbank(0);
|
---|
| 309 |
|
---|
| 310 | ds_vmod();
|
---|
| 311 |
|
---|
| 312 | for (i = 0; i < 12; i++) {
|
---|
| 313 |
|
---|
| 314 | sprintf(buf, "%03d", lastvel[i] / 252);
|
---|
| 315 | vputs(obj8, 5, (i * 5) + 6, buf, SDW11ATR);
|
---|
| 316 | }
|
---|
| 317 | }
|
---|
| 318 |
|
---|
| 319 | /* |
---|
| 320 |
|
---|
| 321 | */
|
---|
| 322 |
|
---|
| 323 | /*
|
---|
| 324 | =============================================================================
|
---|
| 325 | dsvmode() -- display variable mode
|
---|
| 326 | =============================================================================
|
---|
| 327 | */
|
---|
| 328 |
|
---|
| 329 | dsvmode(n)
|
---|
| 330 | short n;
|
---|
| 331 | {
|
---|
| 332 | if (ndisp NE 2)
|
---|
| 333 | return;
|
---|
| 334 |
|
---|
| 335 | if (v_regs[5] & 0x0180)
|
---|
| 336 | vbank(0);
|
---|
| 337 |
|
---|
| 338 | vputc(obj8, 6, 5 + (n * 9), '*', simled[varmode[n][abs(angroup) - 1]]);
|
---|
| 339 | }
|
---|
| 340 |
|
---|
| 341 |
|
---|
| 342 | /*
|
---|
| 343 | =============================================================================
|
---|
| 344 | ds_anmd() -- display mode for all variables
|
---|
| 345 | =============================================================================
|
---|
| 346 | */
|
---|
| 347 |
|
---|
| 348 | ds_anmd()
|
---|
| 349 | {
|
---|
| 350 | register short i;
|
---|
| 351 |
|
---|
| 352 | if (ndisp NE 2)
|
---|
| 353 | return;
|
---|
| 354 |
|
---|
| 355 | for (i = 0; i < 6; i++)
|
---|
| 356 | dsvmode(i);
|
---|
| 357 | }
|
---|
| 358 |
|
---|
| 359 | /* |
---|
| 360 |
|
---|
| 361 | */
|
---|
| 362 |
|
---|
| 363 | /*
|
---|
| 364 | =============================================================================
|
---|
| 365 | ds_angr() -- display analog variable group number
|
---|
| 366 | =============================================================================
|
---|
| 367 | */
|
---|
| 368 |
|
---|
| 369 | ds_angr()
|
---|
| 370 | {
|
---|
| 371 | char buf[4];
|
---|
| 372 |
|
---|
| 373 | if (ndisp NE 2)
|
---|
| 374 | return;
|
---|
| 375 |
|
---|
| 376 | if (v_regs[5] & 0x0180)
|
---|
| 377 | vbank(0);
|
---|
| 378 |
|
---|
| 379 | sprintf(buf, "# %2.2d", abs(angroup));
|
---|
| 380 | vputs(obj8, 7, 59, buf, SDW12ATR);
|
---|
| 381 | }
|
---|
| 382 |
|
---|
| 383 | /* |
---|
| 384 |
|
---|
| 385 | */
|
---|
| 386 |
|
---|
| 387 | /*
|
---|
| 388 | =============================================================================
|
---|
| 389 | ds_anrs() -- display analog resolution
|
---|
| 390 | =============================================================================
|
---|
| 391 | */
|
---|
| 392 |
|
---|
| 393 | ds_anrs()
|
---|
| 394 | {
|
---|
| 395 | register short i;
|
---|
| 396 | char buf[3];
|
---|
| 397 |
|
---|
| 398 | if (ndisp NE 2)
|
---|
| 399 | return;
|
---|
| 400 |
|
---|
| 401 | if (v_regs[5] & 0x0180)
|
---|
| 402 | vbank(0);
|
---|
| 403 |
|
---|
| 404 | buf[1] = '/';
|
---|
| 405 | buf[2] = '\0';
|
---|
| 406 |
|
---|
| 407 | for (i = 0; i < 6; i++) {
|
---|
| 408 |
|
---|
| 409 | buf[0] = '0' + anrs[i][abs(angroup) - 1];
|
---|
| 410 | vputs(obj8, 7, 6 + (i * 9), buf, SDW12ATR);
|
---|
| 411 | }
|
---|
| 412 | }
|
---|
| 413 |
|
---|
| 414 | /* |
---|
| 415 |
|
---|
| 416 | */
|
---|
| 417 |
|
---|
| 418 | /*
|
---|
| 419 | =============================================================================
|
---|
| 420 | dsanval() -- display analog value
|
---|
| 421 | =============================================================================
|
---|
| 422 | */
|
---|
| 423 |
|
---|
| 424 | dsanval(var)
|
---|
| 425 | short var;
|
---|
| 426 | {
|
---|
| 427 | register short tmp, val, v1, v2;
|
---|
| 428 | char buf[16];
|
---|
| 429 |
|
---|
| 430 | if (ndisp NE 2)
|
---|
| 431 | return;
|
---|
| 432 |
|
---|
| 433 | if (v_regs[5] & 0x0180)
|
---|
| 434 | vbank(0);
|
---|
| 435 |
|
---|
| 436 | val = valents[((abs(angroup) - 1) << 4) | var2src[var]].val >> 5;
|
---|
| 437 | tmp = abs(val);
|
---|
| 438 | v1 = tmp / 100;
|
---|
| 439 | v2 = (tmp - (v1 * 100)) / 10;
|
---|
| 440 | sprintf(buf, "%c%02d.%1d", ((val < 0) ? '-' : '+'), v1, v2);
|
---|
| 441 | vputs(obj8, 7, 8 + (var * 9), buf, SDW12ATR);
|
---|
| 442 | }
|
---|
| 443 |
|
---|
| 444 | /*
|
---|
| 445 | =============================================================================
|
---|
| 446 | ds_anvl() -- display analog values
|
---|
| 447 | =============================================================================
|
---|
| 448 | */
|
---|
| 449 |
|
---|
| 450 | ds_anvl()
|
---|
| 451 | {
|
---|
| 452 | register short i;
|
---|
| 453 |
|
---|
| 454 | if (ndisp NE 2)
|
---|
| 455 | return;
|
---|
| 456 |
|
---|
| 457 | for (i = 0; i < 6; i++)
|
---|
| 458 | dsanval(i);
|
---|
| 459 | }
|
---|
| 460 |
|
---|
| 461 | /* |
---|
| 462 |
|
---|
| 463 | */
|
---|
| 464 |
|
---|
| 465 | /*
|
---|
| 466 | =============================================================================
|
---|
| 467 | uclk() -- underline clock label
|
---|
| 468 | =============================================================================
|
---|
| 469 | */
|
---|
| 470 |
|
---|
| 471 | uclk()
|
---|
| 472 | {
|
---|
| 473 | if (sliders NE LS_VOICE) {
|
---|
| 474 |
|
---|
| 475 | point = GLCplot;
|
---|
| 476 |
|
---|
| 477 | GLCcurs(G_ON);
|
---|
| 478 |
|
---|
| 479 | if (clkrun)
|
---|
| 480 | lseg(CK_XL, CK_Y, CK_XR, CK_Y, 1); /* clock on */
|
---|
| 481 | else
|
---|
| 482 | lseg(CK_XL, CK_Y, CK_XR, CK_Y, 0); /* clock off */
|
---|
| 483 |
|
---|
| 484 | GLCcurs(G_OFF);
|
---|
| 485 | }
|
---|
| 486 | }
|
---|
| 487 |
|
---|
| 488 | /* |
---|
| 489 |
|
---|
| 490 | */
|
---|
| 491 |
|
---|
| 492 | /*
|
---|
| 493 | =============================================================================
|
---|
| 494 | dclkmd() -- display clock mode
|
---|
| 495 | =============================================================================
|
---|
| 496 | */
|
---|
| 497 |
|
---|
| 498 | dclkmd()
|
---|
| 499 | {
|
---|
| 500 | uclk();
|
---|
| 501 |
|
---|
| 502 | if (ndisp NE 2)
|
---|
| 503 | return;
|
---|
| 504 |
|
---|
| 505 | if (v_regs[5] & 0x0180)
|
---|
| 506 | vbank(0);
|
---|
| 507 |
|
---|
| 508 | vputs(obj8, 0, 29, "Clock",
|
---|
| 509 | clkrun ? ((SD_CHNG << 4) | SDBG02) : SDW02ATR);
|
---|
| 510 | }
|
---|
| 511 |
|
---|
| 512 | /* |
---|
| 513 |
|
---|
| 514 | */
|
---|
| 515 |
|
---|
| 516 | /*
|
---|
| 517 | =============================================================================
|
---|
| 518 | dsclk() -- display clock status, control, and source
|
---|
| 519 | =============================================================================
|
---|
| 520 | */
|
---|
| 521 |
|
---|
| 522 | dsclk()
|
---|
| 523 | {
|
---|
| 524 | short atr[26];
|
---|
| 525 |
|
---|
| 526 | uclk();
|
---|
| 527 |
|
---|
| 528 | if (ndisp NE 2)
|
---|
| 529 | return;
|
---|
| 530 |
|
---|
| 531 | memsetw(atr, SDW02ATR, 26);
|
---|
| 532 |
|
---|
| 533 | if (clkrun)
|
---|
| 534 | memsetw(atr, (SDBG02 | (SD_CHNG << 4)), 5);
|
---|
| 535 |
|
---|
| 536 | sprintf(bfs, "Clock Con %5.5s Src %5.5s ",
|
---|
| 537 | clklbl[clkctl], clklbl[clksrc]);
|
---|
| 538 |
|
---|
| 539 | if (v_regs[5] & 0x0180)
|
---|
| 540 | vbank(0);
|
---|
| 541 |
|
---|
| 542 | vputsa(obj8, 0, 29, bfs, atr);
|
---|
| 543 | }
|
---|
| 544 |
|
---|
| 545 | /* |
---|
| 546 |
|
---|
| 547 | */
|
---|
| 548 |
|
---|
| 549 | /*
|
---|
| 550 | =============================================================================
|
---|
| 551 | dssect() -- display current score section
|
---|
| 552 | =============================================================================
|
---|
| 553 | */
|
---|
| 554 |
|
---|
| 555 | dssect()
|
---|
| 556 | {
|
---|
| 557 | if (ndisp NE 2)
|
---|
| 558 | return;
|
---|
| 559 |
|
---|
| 560 | sprintf(bfs, "%02d", cursect + 1);
|
---|
| 561 |
|
---|
| 562 | if (v_regs[5] & 0x0180)
|
---|
| 563 | vbank(0);
|
---|
| 564 |
|
---|
| 565 | vputs(obj8, 0, 6, bfs, SDW01ATR);
|
---|
| 566 | }
|
---|
| 567 |
|
---|
| 568 | /* |
---|
| 569 |
|
---|
| 570 | */
|
---|
| 571 |
|
---|
| 572 | /*
|
---|
| 573 | =============================================================================
|
---|
| 574 | dslocn() -- display current score location
|
---|
| 575 | =============================================================================
|
---|
| 576 | */
|
---|
| 577 |
|
---|
| 578 | dslocn()
|
---|
| 579 | {
|
---|
| 580 | register long curfr, beat;
|
---|
| 581 | register short frame;
|
---|
| 582 |
|
---|
| 583 | if (ndisp NE 2)
|
---|
| 584 | return;
|
---|
| 585 |
|
---|
| 586 | curfr = t_ctr;
|
---|
| 587 | beat = curfr / 48;
|
---|
| 588 | frame = curfr % 48;
|
---|
| 589 |
|
---|
| 590 | sprintf(bfs, "%05ld F %02d", beat, frame);
|
---|
| 591 |
|
---|
| 592 | if (v_regs[5] & 0x0180)
|
---|
| 593 | vbank(0);
|
---|
| 594 |
|
---|
| 595 | vputs(obj8, 0, 11, bfs, SDW00ATR);
|
---|
| 596 | }
|
---|
| 597 |
|
---|
| 598 | /* |
---|
| 599 |
|
---|
| 600 | */
|
---|
| 601 |
|
---|
| 602 | /*
|
---|
| 603 | =============================================================================
|
---|
| 604 | dnedmod() -- display note edit mode
|
---|
| 605 | =============================================================================
|
---|
| 606 | */
|
---|
| 607 |
|
---|
| 608 | dnedmod()
|
---|
| 609 | {
|
---|
| 610 | if (ndisp NE 2)
|
---|
| 611 | return;
|
---|
| 612 |
|
---|
| 613 | if (v_regs[5] & 0x0180)
|
---|
| 614 | vbank(0);
|
---|
| 615 |
|
---|
| 616 | vputs(obj8, 0, 55, nedlbl[noteop],
|
---|
| 617 | (notesel ? ((SD_CHNG << 4) | SDBG03) : SDW03ATR) |
|
---|
| 618 | (noteop EQ NOP_NUL ? 0 : C_BLINK));
|
---|
| 619 | }
|
---|
| 620 |
|
---|
| 621 | /*
|
---|
| 622 | =============================================================================
|
---|
| 623 | dsmem() -- display remaining memory 'units' (long words)
|
---|
| 624 | =============================================================================
|
---|
| 625 | */
|
---|
| 626 |
|
---|
| 627 | dsmem()
|
---|
| 628 | {
|
---|
| 629 | if (ndisp NE 2)
|
---|
| 630 | return;
|
---|
| 631 |
|
---|
| 632 | sprintf(bfs, "M %05ld", evleft());
|
---|
| 633 |
|
---|
| 634 | if (v_regs[5] & 0x0180)
|
---|
| 635 | vbank(0);
|
---|
| 636 |
|
---|
| 637 | vputs(obj8, 8, 57, bfs, SDW15ATR);
|
---|
| 638 | }
|
---|
| 639 |
|
---|
| 640 | /* |
---|
| 641 |
|
---|
| 642 | */
|
---|
| 643 |
|
---|
| 644 | /*
|
---|
| 645 | =============================================================================
|
---|
| 646 | dsgstat() -- display group status
|
---|
| 647 | =============================================================================
|
---|
| 648 | */
|
---|
| 649 |
|
---|
| 650 | dsgstat(n)
|
---|
| 651 | short n;
|
---|
| 652 | {
|
---|
| 653 | char c;
|
---|
| 654 |
|
---|
| 655 | if (ndisp NE 2)
|
---|
| 656 | return;
|
---|
| 657 |
|
---|
| 658 | if (v_regs[5] & 0x0180)
|
---|
| 659 | vbank(0);
|
---|
| 660 |
|
---|
| 661 | c = 1 + n + (grpstat[n] ? ((n > 8) ? 162 : '0') : 192);
|
---|
| 662 | vputc(obj8, 2, 5 + (n * 5), c, (((n + 3) << 4) | 2));
|
---|
| 663 | }
|
---|
| 664 |
|
---|
| 665 | /*
|
---|
| 666 | =============================================================================
|
---|
| 667 | dsgmode() -- display group mode
|
---|
| 668 | =============================================================================
|
---|
| 669 | */
|
---|
| 670 |
|
---|
| 671 | dsgmode(n)
|
---|
| 672 | short n;
|
---|
| 673 | {
|
---|
| 674 | if (ndisp NE 2)
|
---|
| 675 | return;
|
---|
| 676 |
|
---|
| 677 | if (v_regs[5] & 0x0180)
|
---|
| 678 | vbank(0);
|
---|
| 679 |
|
---|
| 680 | vputc(obj8, 2, 6 + (n * 5), '*', simled[grpmode[n]]);
|
---|
| 681 | }
|
---|
| 682 |
|
---|
| 683 | /* |
---|
| 684 |
|
---|
| 685 | */
|
---|
| 686 |
|
---|
| 687 | /*
|
---|
| 688 | =============================================================================
|
---|
| 689 | dsgmods() -- display mode and status for all groups
|
---|
| 690 | =============================================================================
|
---|
| 691 | */
|
---|
| 692 |
|
---|
| 693 | dsgmods()
|
---|
| 694 | {
|
---|
| 695 | register short i;
|
---|
| 696 |
|
---|
| 697 | if (ndisp NE 2)
|
---|
| 698 | return;
|
---|
| 699 |
|
---|
| 700 | for (i = 0; i < 12; i++) {
|
---|
| 701 |
|
---|
| 702 | dsgstat(i);
|
---|
| 703 | dsgmode(i);
|
---|
| 704 | }
|
---|
| 705 | }
|
---|
| 706 |
|
---|
| 707 | /*
|
---|
| 708 | =============================================================================
|
---|
| 709 | dsgmodz() -- display modes for all groups and variables
|
---|
| 710 | =============================================================================
|
---|
| 711 | */
|
---|
| 712 |
|
---|
| 713 | dsgmodz()
|
---|
| 714 | {
|
---|
| 715 | register short i;
|
---|
| 716 |
|
---|
| 717 | if (ndisp NE 2)
|
---|
| 718 | return;
|
---|
| 719 |
|
---|
| 720 | for (i = 0; i < 12; i++) /* group modes */
|
---|
| 721 | dsgmode(i);
|
---|
| 722 |
|
---|
| 723 | for (i = 0; i < 6; i++) /* variable modes */
|
---|
| 724 | dsvmode(i);
|
---|
| 725 | }
|
---|
| 726 |
|
---|
| 727 | /* |
---|
| 728 |
|
---|
| 729 | */
|
---|
| 730 |
|
---|
| 731 | /*
|
---|
| 732 | =============================================================================
|
---|
| 733 | dsrpmod() -- display record / play modes
|
---|
| 734 | =============================================================================
|
---|
| 735 | */
|
---|
| 736 |
|
---|
| 737 | dsrpmod()
|
---|
| 738 | {
|
---|
| 739 | short atr[25];
|
---|
| 740 |
|
---|
| 741 | switch (sliders) {
|
---|
| 742 |
|
---|
| 743 | case LS_PRMTR:
|
---|
| 744 | case LS_OTHER:
|
---|
| 745 | case LS_EQ:
|
---|
| 746 | case LS_NGRP:
|
---|
| 747 |
|
---|
| 748 | point = GLCplot;
|
---|
| 749 |
|
---|
| 750 | GLCcurs(G_ON);
|
---|
| 751 |
|
---|
| 752 | if (recsw) {
|
---|
| 753 |
|
---|
| 754 | lseg(RP_RL, RP_Y, RP_RR, RP_Y, 1); /* record */
|
---|
| 755 | lseg(RP_PL, RP_Y, RP_PR, RP_Y, 0);
|
---|
| 756 |
|
---|
| 757 | } else {
|
---|
| 758 |
|
---|
| 759 | lseg(RP_RL, RP_Y, RP_RR, RP_Y, 0); /* play */
|
---|
| 760 | lseg(RP_PL, RP_Y, RP_PR, RP_Y, 1);
|
---|
| 761 | }
|
---|
| 762 |
|
---|
| 763 | GLCcurs(G_OFF);
|
---|
| 764 | }
|
---|
| 765 | /* |
---|
| 766 |
|
---|
| 767 | */
|
---|
| 768 | if (ndisp NE 2)
|
---|
| 769 | return;
|
---|
| 770 |
|
---|
| 771 | memsetw(atr, SDW14ATR, 25);
|
---|
| 772 |
|
---|
| 773 | if (recsw) /* record */
|
---|
| 774 | memsetw(&atr[5], (C_BLINK | SDBG14 | (SD_CHNG << 4)), 5);
|
---|
| 775 | else /* play */
|
---|
| 776 | memsetw(&atr[0], (SDBG14 | (SD_CHNG << 4)), 4);
|
---|
| 777 |
|
---|
| 778 | if (dubsw) /* overdub */
|
---|
| 779 | memsetw(&atr[11], (SDBG14 | (SD_CHNG << 4)), 6);
|
---|
| 780 |
|
---|
| 781 | if (pchsw) /* punch in enable */
|
---|
| 782 | memsetw(&atr[18], (SDBG14 | (SD_CHNG << 4)), 7);
|
---|
| 783 |
|
---|
| 784 | if (v_regs[5] & 0x0180)
|
---|
| 785 | vbank(0);
|
---|
| 786 |
|
---|
| 787 | vputsa(obj8, 8, 31, "Play Recrd OvrDub PunchIn", atr);
|
---|
| 788 | }
|
---|
| 789 |
|
---|
| 790 | /* |
---|
| 791 |
|
---|
| 792 | */
|
---|
| 793 |
|
---|
| 794 | /*
|
---|
| 795 | =============================================================================
|
---|
| 796 | dsimode() -- display insert mode
|
---|
| 797 | =============================================================================
|
---|
| 798 | */
|
---|
| 799 |
|
---|
| 800 | dsimode()
|
---|
| 801 | {
|
---|
| 802 | short atr[7];
|
---|
| 803 |
|
---|
| 804 | if (ndisp NE 2)
|
---|
| 805 | return;
|
---|
| 806 |
|
---|
| 807 | if (insmode)
|
---|
| 808 | memsetw(atr, (SDBG01 | (SD_CHNG << 4)), 7);
|
---|
| 809 | else
|
---|
| 810 | memsetw(atr, SDW01ATR, 7);
|
---|
| 811 |
|
---|
| 812 | if (v_regs[5] & 0x0180)
|
---|
| 813 | vbank(0);
|
---|
| 814 |
|
---|
| 815 | vputsa(obj8, 0, 22, "Insert ", atr);
|
---|
| 816 | }
|
---|
| 817 |
|
---|
| 818 | /* |
---|
| 819 |
|
---|
| 820 | */
|
---|
| 821 |
|
---|
| 822 | /*
|
---|
| 823 | =============================================================================
|
---|
| 824 | sdwin() -- fill in a score display window
|
---|
| 825 | =============================================================================
|
---|
| 826 | */
|
---|
| 827 |
|
---|
| 828 | sdwin(n)
|
---|
| 829 | short n;
|
---|
| 830 | {
|
---|
| 831 | short atr[64], atrib, i;
|
---|
| 832 |
|
---|
| 833 | if (ndisp NE 2) /* only if score is selected */
|
---|
| 834 | return;
|
---|
| 835 |
|
---|
| 836 | if (v_regs[5] & 0x0180) /* select bank 0 */
|
---|
| 837 | vbank(0);
|
---|
| 838 |
|
---|
| 839 | switch (n) { /* dispatch off of window number */
|
---|
| 840 |
|
---|
| 841 | case 0: /* score location */
|
---|
| 842 |
|
---|
| 843 | vputs(obj8, 0, 0,
|
---|
| 844 | ac_code EQ N_SHARP ? "\250 " : "\251 ",
|
---|
| 845 | SDW00ATR);
|
---|
| 846 |
|
---|
| 847 | vputs(obj8, 0, 2, "Sec ", SDW01ATR);
|
---|
| 848 | vputs(obj8, 0, 9, "B F ", SDW00ATR);
|
---|
| 849 |
|
---|
| 850 | dssect(); /* display current section */
|
---|
| 851 | dslocn(); /* display score location */
|
---|
| 852 | return;
|
---|
| 853 |
|
---|
| 854 | case 1: /* insert mode */
|
---|
| 855 |
|
---|
| 856 | dsimode(); /* display score insert mode */
|
---|
| 857 | return;
|
---|
| 858 |
|
---|
| 859 | case 2: /* clock */
|
---|
| 860 |
|
---|
| 861 | dsclk(); /* display clock status */
|
---|
| 862 | return;
|
---|
| 863 |
|
---|
| 864 | case 3: /* note edit */
|
---|
| 865 |
|
---|
| 866 | dnedmod();
|
---|
| 867 | return;
|
---|
| 868 | /* |
---|
| 869 |
|
---|
| 870 | */
|
---|
| 871 | case 4: /* assignment */
|
---|
| 872 |
|
---|
| 873 | vputs(obj8, 1, 0, "Assignment ", SDW04ATR);
|
---|
| 874 | rd_ioas(0); /* display assignment table number */
|
---|
| 875 | return;
|
---|
| 876 |
|
---|
| 877 | case 5: /* tuning */
|
---|
| 878 |
|
---|
| 879 | vputs(obj8, 1, 14, "Tune ", SDW05ATR);
|
---|
| 880 | rd_tune(0); /* display tuning table number */
|
---|
| 881 | return;
|
---|
| 882 |
|
---|
| 883 | case 6: /* tempo */
|
---|
| 884 |
|
---|
| 885 | vputs(obj8, 1, 21, "Tempo ", SDW06ATR);
|
---|
| 886 | rd_tmpo(0); /* display tempo */
|
---|
| 887 | return;
|
---|
| 888 |
|
---|
| 889 | case 7: /* interpolate */
|
---|
| 890 |
|
---|
| 891 | vputs(obj8, 1, 31, "Int ", SDW07ATR);
|
---|
| 892 | rd_intp(0);
|
---|
| 893 | return;
|
---|
| 894 |
|
---|
| 895 | case 8: /* stop/next */
|
---|
| 896 |
|
---|
| 897 | vputs(obj8, 1, 40, "Stop/Next ", SDW08ATR);
|
---|
| 898 | return;
|
---|
| 899 | /* |
---|
| 900 |
|
---|
| 901 | */
|
---|
| 902 |
|
---|
| 903 | case 9: /* punch in/out */
|
---|
| 904 |
|
---|
| 905 | vputs(obj8, 1, 50, "In/Out ", SDW09ATR);
|
---|
| 906 | return;
|
---|
| 907 |
|
---|
| 908 | case 10: /* output */
|
---|
| 909 |
|
---|
| 910 | vputs(obj8, 1, 57, "Output ", SDW10ATR);
|
---|
| 911 | return;
|
---|
| 912 |
|
---|
| 913 | case 11: /* group/instr, transposition, dyn/loc, velocity */
|
---|
| 914 |
|
---|
| 915 | vputs(obj8, 2, 0, sdisp[1], SDW11ATR);
|
---|
| 916 | dsgmods(); /* display mode and status for all groups */
|
---|
| 917 | ds_inst(); /* display instruments */
|
---|
| 918 |
|
---|
| 919 | vputs(obj8, 3, 4, sdisp[8], SDW11ATR);
|
---|
| 920 | vputs(obj8, 3, 0, sdisp[4], SDW11ATR);
|
---|
| 921 | ds_trns(); /* display transpositions */
|
---|
| 922 |
|
---|
| 923 | vputs(obj8, 4, 4, sdisp[8], SDW11ATR); /* dyn/loc */
|
---|
| 924 | vputs(obj8, 4, 0, sdisp[5], SDW11ATR);
|
---|
| 925 | ds_dyn(); /* display dynamics */
|
---|
| 926 | ds_loc(); /* display locations */
|
---|
| 927 |
|
---|
| 928 | vputs(obj8, 5, 4, sdisp[8], SDW11ATR); /* velocity */
|
---|
| 929 | vputs(obj8, 5, 0, sdisp[6], SDW11ATR);
|
---|
| 930 | ds_vel(); /* display velocities */
|
---|
| 931 |
|
---|
| 932 | return;
|
---|
| 933 | /* |
---|
| 934 |
|
---|
| 935 | */
|
---|
| 936 | case 12: /* analog variables */
|
---|
| 937 |
|
---|
| 938 | vputs(obj8, 6, 0, sdisp[2], SDW12ATR);
|
---|
| 939 | vputs(obj8, 7, 0, sdisp[7], SDW12ATR);
|
---|
| 940 |
|
---|
| 941 | if (angroup < 0)
|
---|
| 942 | atrib = SDW12ATR;
|
---|
| 943 | else
|
---|
| 944 | atrib = (SD_CHNG << 4) | SDBG12;
|
---|
| 945 |
|
---|
| 946 | for (i = 0; i < 4; i++)
|
---|
| 947 | vputa(obj8, 7, i, atrib);
|
---|
| 948 |
|
---|
| 949 | if (ancmsw)
|
---|
| 950 | atrib = (SD_CHNG << 4) | SDBG12;
|
---|
| 951 | else
|
---|
| 952 | atrib = SDW12ATR;
|
---|
| 953 |
|
---|
| 954 | for (i = 0; i < 4; i++)
|
---|
| 955 | vputa(obj8, 6, i, atrib);
|
---|
| 956 |
|
---|
| 957 | ds_anmd();
|
---|
| 958 | ds_angr();
|
---|
| 959 | ds_anrs();
|
---|
| 960 | ds_anvl();
|
---|
| 961 |
|
---|
| 962 | return;
|
---|
| 963 |
|
---|
| 964 | case 13: /* score */
|
---|
| 965 |
|
---|
| 966 | sprintf(bfs, "Score %02.2d %16.16s ",
|
---|
| 967 | curscor + 1, scname[curscor]);
|
---|
| 968 |
|
---|
| 969 | vputs(obj8, 8, 0, bfs, SDW13ATR);
|
---|
| 970 | return;
|
---|
| 971 |
|
---|
| 972 | case 14: /* record/play, overdub, punchin */
|
---|
| 973 |
|
---|
| 974 | vputs(obj8, 8, 27, sdisp[3], SDW14ATR); /* Rec Mode */
|
---|
| 975 | dsrpmod(); /* display rec/play modes */
|
---|
| 976 | return;
|
---|
| 977 |
|
---|
| 978 | case 15: /* memory */
|
---|
| 979 |
|
---|
| 980 | dsmem(); /* display available events */
|
---|
| 981 | return;
|
---|
| 982 | }
|
---|
| 983 | }
|
---|
| 984 |
|
---|
| 985 | /* |
---|
| 986 |
|
---|
| 987 | */
|
---|
| 988 |
|
---|
| 989 | /*
|
---|
| 990 | =============================================================================
|
---|
| 991 | sdwins() -- display all score windows
|
---|
| 992 | =============================================================================
|
---|
| 993 | */
|
---|
| 994 |
|
---|
| 995 | sdwins()
|
---|
| 996 | {
|
---|
| 997 | register short i;
|
---|
| 998 |
|
---|
| 999 | if (ndisp NE 2) /* only if score display is selected */
|
---|
| 1000 | return;
|
---|
| 1001 |
|
---|
| 1002 | for (i = 0; i < 17; i++) /* refresh each of the windows */
|
---|
| 1003 | sdwin(i);
|
---|
| 1004 | }
|
---|
| 1005 |
|
---|
| 1006 | /* |
---|
| 1007 |
|
---|
| 1008 | */
|
---|
| 1009 |
|
---|
| 1010 | /*
|
---|
| 1011 | =============================================================================
|
---|
| 1012 | sdsetup() -- setup the score display
|
---|
| 1013 | =============================================================================
|
---|
| 1014 | */
|
---|
| 1015 |
|
---|
| 1016 | sdsetup()
|
---|
| 1017 | {
|
---|
| 1018 | dswap(); /* clear the video display */
|
---|
| 1019 |
|
---|
| 1020 | sd = D_FWD; /* display direction = forward */
|
---|
| 1021 | noteop = NOP_NUL; /* no pending note edit operation */
|
---|
| 1022 | notesel = FALSE; /* no note selected */
|
---|
| 1023 | secop = SOP_NUL; /* no pending section edit operation */
|
---|
| 1024 | scmctl = -1; /* no area 1 menu up */
|
---|
| 1025 | sdmctl = -1; /* no area 2 menu up */
|
---|
| 1026 | submenu = FALSE; /* submenu cursor not enabled */
|
---|
| 1027 | lastam = 0; /* reset assignment menu page */
|
---|
| 1028 |
|
---|
| 1029 | clrsctl(); /* clear out the slices */
|
---|
| 1030 |
|
---|
| 1031 | /* setup object pointers */
|
---|
| 1032 |
|
---|
| 1033 | obj0 = v_curs0; /* 0 - cursor (arrow) */
|
---|
| 1034 | obj2 = v_tcur; /* 2 - cursor (typewriter) */
|
---|
| 1035 | obj3 = v_cur; /* 3 - cursor (underline) */
|
---|
| 1036 | obj8 = v_ct0; /* 8 - character text */
|
---|
| 1037 | obj11 = v_win0; /* 11 - window */
|
---|
| 1038 | obj13 = v_kbobj; /* 13 - keyboard */
|
---|
| 1039 | obj14 = v_score; /* 14 - score */
|
---|
| 1040 | obj15 = v_lnobj; /* 15 - line */
|
---|
| 1041 |
|
---|
| 1042 | /* ---------------- initialize object table -------------------- */
|
---|
| 1043 | /* obj, typ, bnk, base, xpix, ypix, x0, y0, flags, pri */
|
---|
| 1044 |
|
---|
| 1045 | SetObj( 0, 0, 1, obj0, 16, 16, C1X, C1Y, OBFL_00, -1);
|
---|
| 1046 | SetObj(TTCURS, 0, 1, obj2, 16, 16, 0, 0, TTCCFL, -1);
|
---|
| 1047 | SetObj( 3, 0, 1, obj3, 512, 18, 0, 0, OBFL_01, -1);
|
---|
| 1048 | SetObj( 8, 1, 0, obj8, 512, 108, 0, 0, OBFL_08, -1);
|
---|
| 1049 | SetObj( 11, 0, 1, obj11, 512, 224, 0, 14, OBFL_11, -1);
|
---|
| 1050 | SetObj( 13, 0, 1, obj13, 16, 224, 0, 14, OBFL_13, -1);
|
---|
| 1051 | SetObj( 14, 0, 0, obj14, 512, 224, 0, 14, OBFL_14, -1);
|
---|
| 1052 | SetObj( 15, 0, 1, obj15, 16, 224, 248, 14, OBFL_15, -1);
|
---|
| 1053 |
|
---|
| 1054 | if (v_regs[5] & 0x0180) /* select bank 0 */
|
---|
| 1055 | vbank(0);
|
---|
| 1056 |
|
---|
| 1057 | memsetw(obj14, 0, 32767); /* clear score object */
|
---|
| 1058 | memsetw(obj14+32767L, 0, 24577);
|
---|
| 1059 |
|
---|
| 1060 | vbank(1); /* select bank 1 */
|
---|
| 1061 |
|
---|
| 1062 | stcset(); /* setup text cursor colors */
|
---|
| 1063 | stcclr(); /* clear text cursors */
|
---|
| 1064 | arcurs(SDCURSR); /* setup arrow cursor */
|
---|
| 1065 | ttcini(SDCURSR); /* setup typewriter cursor */
|
---|
| 1066 |
|
---|
| 1067 | /* |
---|
| 1068 |
|
---|
| 1069 | */
|
---|
| 1070 | if ((v_regs[5] & 0x0180) NE 0x0100)
|
---|
| 1071 | vbank(1); /* select bank 1 */
|
---|
| 1072 |
|
---|
| 1073 | memcpyw(obj13, kbobj, 896); /* setup 'keyboard' object */
|
---|
| 1074 | makeln(LN_VRT, LN_HOR); /* setup 'lines' object */
|
---|
| 1075 | sdwins(); /* fill in the windows */
|
---|
| 1076 |
|
---|
| 1077 | /* display some objects */
|
---|
| 1078 |
|
---|
| 1079 | SetPri( 3, 12); /* Underline cursors */
|
---|
| 1080 | objclr(12);
|
---|
| 1081 | objon(12, 12, 2); /* ... row 0 */
|
---|
| 1082 | objon(12, 250, 2); /* ... row 17 */
|
---|
| 1083 | objon(12, 264, 2); /* ... row 18 */
|
---|
| 1084 | objon(12, 278, 2); /* ... row 19 */
|
---|
| 1085 | objon(12, 292, 2); /* ... row 20 */
|
---|
| 1086 | objon(12, 306, 2); /* ... row 21 */
|
---|
| 1087 | objon(12, 320, 2); /* ... row 22 */
|
---|
| 1088 | objon(12, 334, 2); /* ... row 23 */
|
---|
| 1089 | objon(12, 348, 2); /* ... row 24 */
|
---|
| 1090 |
|
---|
| 1091 | SetPri( 8, 7); /* Character Text */
|
---|
| 1092 | objclr(7);
|
---|
| 1093 | objon(7, 0, 12); /* ... row 0 */
|
---|
| 1094 | objon(7, 238, 12); /* ... row 17 */
|
---|
| 1095 | objon(7, 252, 12); /* ... row 18 */
|
---|
| 1096 | objon(7, 266, 12); /* ... row 19 */
|
---|
| 1097 | objon(7, 280, 12); /* ... row 20 */
|
---|
| 1098 | objon(7, 294, 12); /* ... row 21 */
|
---|
| 1099 | objon(7, 308, 12); /* ... row 22 */
|
---|
| 1100 | objon(7, 322, 12); /* ... row 23 */
|
---|
| 1101 | objon(7, 336, 12); /* ... row 24 */
|
---|
| 1102 |
|
---|
| 1103 | SetPri(13, 2); /* Keyboard object */
|
---|
| 1104 | SetPri(14, 1); /* Score object */
|
---|
| 1105 | SetPri(15, 0); /* Line object */
|
---|
| 1106 |
|
---|
| 1107 | vsndpal(scorpal); /* set the palette */
|
---|
| 1108 |
|
---|
| 1109 | SetPri( 0, 15); /* Turn on arrow cursor */
|
---|
| 1110 | setgc(C1X, C1Y);
|
---|
| 1111 |
|
---|
| 1112 | sc_refr(t_cur); /* position the score on the display */
|
---|
| 1113 | }
|
---|