source: buchla-68k/ram/execkey.s@ cbe2c15

Last change on this file since cbe2c15 was 4f508e6, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Converted assembly language files.

  • Property mode set to 100644
File size: 100.4 KB
RevLine 
[4f508e6]1| ------------------------------------------------------------------------------
2| execkey.s -- execute key -- FPU function start subroutine
3| Version 15 -- 1988-08-29 -- D.N. Lynx Crowe
4| Hand optimized version of execkey() and fnstart() from C compiler output
5| ------------------------------------------------------------------------------
[f40a309]6 .text
[4f508e6]7
8LOC_EOR = 0
9LOC_SUB = 1
10
[f40a309]11 .xdef _execkey
[4f508e6]12
[f40a309]13 .xref _xgetran
[4f508e6]14
[f40a309]15 .xref _rsntab
16 .xref _expbit
17 .xref _io_fpu
18 .xref _legato
19 .xref _prstab
20 .xref _ptoftab
21 .xref _timemlt
22 .xref _valents
23 .xref _vbufs
24 .xref _vce2grp
25 .xref _vce2trg
26 .xref _veltab
27 .xref _vpsms
[4f508e6]28
29 .page
30
31| Offsets for execkey() parameters
32| --------------------------------
33TRG = 8 | WORD -- trigger
34PCH = 10 | WORD -- pitch
35VCE = 12 | WORD -- voice (0..11)
36TAG = 14 | WORD -- I_TM_... inversion tag
37
38| Register variables
39| ------------------
40A_FP = A5 | LONG -- struct idfnhdr |
41A_FPU = A4 | LONG -- FPU base address
42A_SMP = A3 | LONG -- struct sment |
43
44R_FPMANT = D7 | WORD -- FPU time mantissa
45R_FPEXP = D6 | WORD -- FPU time exponent
46R_FPCTL = D5 | WORD -- FPU control word
47R_I = D4 | WORD -- loop index
48R_FPVAL = D3 | WORD -- FPU value
49
50| Local (stack) variables
51| -----------------------
52PT = -4 | LONG -- instpnt |
53VEP = -8 | LONG -- struct valent |
54OLDI = -10 | WORD -- old IPL (sr)
55OCTYPE = -12 | WORD -- oscillator 1 mode / scratch
56VP = -14 | WORD -- voice # + function # index
57SRCNUM = -16 | WORD -- general source #
58SRCVAL = -18 | WORD -- general source value
59TSRCVAL = -20 | WORD -- temporary general source value
60MLTVAL = -22 | WORD -- general source multiplier
61TFPVAL = -24 | WORD -- temporary FPU value
62LTMP = -28 | LONG -- long temporary
63IP = -32 | LONG -- struct instdef |
64GROUP = -34 | WORD -- group number << 4
65
66| Symbolic constants
67| ------------------
68LASTLOCL = GROUP | last local on the stack
69
70FPU_DI = 0x2200 | sr value for disabling FPU interrupts
71PITCHMAX = 21920 | maximum pitch value
72VALMAX = 0x00007D00 | maximum FPU value
73VALMIN = 0xFFFF8300 | minimum FPU value
74VBLEN = 3938 | length of a voice buffer
75LSPCH = 2 | left shift for pitch sources
76
77 .page
78
79| execkey(trg, pch, vce)
80| short trg, pch, vce;
81| {
82
[f40a309]83_execkey: link A6,#LASTLOCL
84 movem.l D2-R_FPMANT/A_SMP-A_FP,-(sp)
[4f508e6]85
86| ip = &vbufs[vce];
87
[f40a309]88 move.w VCE(A6),D0
89 asl.w #2,D0
90 lea vbtab,A0
91 move.l 0(A0,D0.W),IP(A6)
[4f508e6]92
93| vce2trg[vce] = trg;
94
[f40a309]95 lsr.w #1,D0
96 lea _vce2trg,A0
97 move.w TRG(A6),0(A0,D0.W)
[4f508e6]98
99| group = (vce2grp[vce] - 1) << 4;
100
[f40a309]101 move.w VCE(A6),A0
102 add.l A0,A0
103 move.l #_vce2grp,A1
104 clr.l D0
105 move.w 0(A0,A1.l),D0
106 sub.w #1,D0
107 asl.w #4,D0
108 move.w D0,GROUP(A6)
[4f508e6]109
110 .page
111| ------------------------------------------------------------------------------
112| Start function 0 -- Frq 1
113| ------------------------------------------------------------------------------
114
115| if (ip->idhfnc[0].idftmd & I_TM_KEY) {
116
[f40a309]117 move.l IP(A6),A0
118 move.b 93(A0),D0
119 move.w TAG(A6),D1
120 eor.w D1,D0
121 btst #0,D0
122 bne FN00A
[4f508e6]123
[f40a309]124 jmp FN01
[4f508e6]125
126| vp = (vce << 4) + 1;
127
[f40a309]128FN00A: move VCE(A6),D0
129 asl #4,D0
130 add.w #1,D0
131 move D0,VP(A6)
[4f508e6]132
133| fpu = io_fpu + FPU_OFNC + (vp << 4);
134
[f40a309]135 asl #5,D0
136 ext.l D0
137 move.l D0,A_FPU
[4f508e6]138 add.l #_io_fpu+0x4000,A_FPU
139
140| fp = &ip->idhfnc[0];
141
[f40a309]142 move.l IP(A6),A_FP
143 add.l #86,A_FP
[4f508e6]144
145| pt = &ip->idhpnt[fp->idfpt1];
146
[f40a309]147 clr.l D0
148 move.b 6(A_FP),D0
149 lsl.l #2,D0
150 move.l D0,D1
151 add.l D0,D0
152 add.l D1,D0
153 add.l IP(A6),D0
154 add.l #242,D0
155 move.l D0,PT(A6)
[4f508e6]156
[f40a309]157 .page
[4f508e6]158
159| srcnum = group | fp->idfsrc;
160
[f40a309]161 move.w GROUP(A6),D0
162 ext.l D0
163 clr.l D1
164 move.b 4(A_FP),D1
165 or D1,D0
166 move D0,SRCNUM(A6)
[4f508e6]167
168| vep = &valents[srcnum];
169
[f40a309]170 add.l D0,D0
171 move.l D0,D1
172 lsl.l #2,D0
173 add.l D1,D0
174 add.l #_valents,D0
175 move.l D0,VEP(A6)
[4f508e6]176
177| smp = vpsms[vp];
178
[f40a309]179 move VP(A6),A0
180 add.l A0,A0
181 add.l A0,A0
182 add.l #_vpsms,A0
183 move.l (A0),A_SMP
[4f508e6]184
185| if (srcnum NE smp->sm) {
186
[f40a309]187 clr D0
188 move 10(A_SMP),D0
189 cmp SRCNUM(A6),D0
190 beq F00L113
[4f508e6]191
192| (smp->prv)->nxt = smp->nxt;
193
[f40a309]194 move.l 4(A_SMP),A0
195 move.l (A_SMP),(A0)
[4f508e6]196
197| (smp->nxt)->prv = smp->prv;
198
[f40a309]199 move.l (A_SMP),A0
200 move.l 4(A_SMP),4(A0)
[4f508e6]201
202| smp->prv = (struct sment |)vep;
203
[f40a309]204 move.l VEP(A6),4(A_SMP)
[4f508e6]205
206| smp->nxt = vep->nxt;
207
[f40a309]208 move.l VEP(A6),A0
209 move.l (A0),(A_SMP)
[4f508e6]210
211| (vep->nxt)->prv = smp;
212
[f40a309]213 move.l VEP(A6),A0
214 move.l (A0),A0
215 move.l A_SMP,4(A0)
[4f508e6]216
217| vep->nxt = smp;
218
[f40a309]219 move.l VEP(A6),A0
220 move.l A_SMP,(A0)
[4f508e6]221
222| smp->sm = srcnum;
223
[f40a309]224 move SRCNUM(A6),10(A_SMP)
[4f508e6]225
226| }
227
228| mltval = fp->idfmlt;
229
[f40a309]230F00L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]231
[f40a309]232 .page
[4f508e6]233
234| switch (fp->idfsrc) {
235
[f40a309]236 move.b 4(A_FP),D0
237 ext.w d0
238 cmp #10,D0
239 bhi F00L122
[4f508e6]240
[f40a309]241 asl #2,D0
242 lea F00L123,A0
243 movea.l 0(A0,D0.W),A0
244 jmp (A0)
[4f508e6]245
246| case SM_NONE:
247| mltval = 0;
248
[f40a309]249F00L116: clr MLTVAL(A6)
[4f508e6]250
251| tsrcval = 0;
252
[f40a309]253 clr TSRCVAL(A6)
[4f508e6]254
255| break;
256
[f40a309]257 bra F00L114
[4f508e6]258
259| case SM_RAND:
260| tsrcval = xgetran(mltval);
261
[f40a309]262F00L117: move MLTVAL(A6),(sp)
263 jsr _xgetran
264 move D0,TSRCVAL(A6)
[4f508e6]265
266| break;
267
[f40a309]268 bra F00L114
[4f508e6]269
270| case SM_PTCH:
271| tsrcval = pch;
272
[f40a309]273F00L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]274
275| break;
276
[f40a309]277 bra F00L114
[4f508e6]278
[f40a309]279 .page
[4f508e6]280
281| case SM_FREQ:
282| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
283
[f40a309]284F00L119: move.w PCH(A6),D0
285 asr.w #7,D0
[4f508e6]286 and.w #0x00FF,D0
[f40a309]287 move.w D0,A0
288 add.l A0,A0
289 add.l #_ptoftab,A0
290 move.w (A0),TSRCVAL(A6)
[4f508e6]291
292| break;
293
[f40a309]294 bra F00L114
[4f508e6]295
296| case SM_KVEL:
297| tsrcval = veltab[trg];
298
[f40a309]299F00L120: move.w TRG(A6),A0
300 add.l A0,A0
301 add.l #_veltab,A0
302 move.w (A0),TSRCVAL(A6)
[4f508e6]303
304| break;
305
[f40a309]306 bra F00L114
[4f508e6]307
308| case SM_KPRS:
309| tsrcval = prstab[trg];
310
[f40a309]311F00L121: move.w TRG(A6),A0
312 add.l A0,A0
313 add.l #_prstab,A0
314 move.w (A0),TSRCVAL(A6)
[4f508e6]315
316| break;
317
[f40a309]318 bra F00L114
[4f508e6]319
320| default:
321| tsrcval = vep->val;
322
[f40a309]323F00L122: move.l VEP(A6),A0
324 move.w 8(A0),TSRCVAL(A6)
[4f508e6]325
326| }
327
[f40a309]328 .page
[4f508e6]329
330| srcval = addpch(tsrcval, 0);
331
[f40a309]332F00L114: move.w TSRCVAL(A6),D0
333 ext.l D0
334 asr.l #5,D0
[4f508e6]335| sub.l #500,D0
[f40a309]336 asl.l #LSPCH,D0
337 cmp.l #PITCHMAX,D0
338 ble F00L129A
[4f508e6]339
[f40a309]340 move.l #PITCHMAX,D0
[4f508e6]341
[f40a309]342F00L129A: move D0,SRCVAL(A6)
[4f508e6]343
[f40a309]344 .page
[4f508e6]345
346| if (pt->ipvsrc) {
347
[f40a309]348F00L124: move.l PT(A6),A0
349 tst.b 6(A0)
350 beq F00L136
[4f508e6]351
352| switch (pt->ipvsrc) {
353
[f40a309]354 move.l PT(A6),A0
355 move.b 6(A0),D0
356 ext.w D0
357 sub #1,D0
358 cmp #9,D0
359 bhi F00L144
[4f508e6]360
[f40a309]361 asl #2,D0
362 lea F00L145,A0
363 move.l 0(A0,D0.W),A0
364 jmp (A0)
[4f508e6]365
366| case SM_RAND:
367| ltmp = xgetran(pt_>ipvmlt);
368
[f40a309]369F00L139: move.l PT(A6),A0
370 move 4(A0),(sp)
371 jsr _xgetran
372 ext.l D0
373 move.l D0,LTMP(A6)
[4f508e6]374
375| break;
376
[f40a309]377 bra F00L137
[4f508e6]378
379| case SM_PTCH:
380| ltmp = pch;
381
[f40a309]382F00L140: move PCH(A6),A0
383 move.l A0,LTMP(A6)
[4f508e6]384
385| break;
386
[f40a309]387 bra F00L137
[4f508e6]388
[f40a309]389 .page
[4f508e6]390
391| case SM_FREQ:
392| ltmp = ptoftab[(pch >> 7) & 0x00FF];
393
[f40a309]394F00L141: move PCH(A6),D0
395 asr #7,D0
396 and #255,D0
397 move D0,A0
398 add.l A0,A0
399 move.l #_ptoftab,A1
400 move 0(A0,A1.l),D0
401 ext.l D0
402 move.l D0,LTMP(A6)
[4f508e6]403
404| break;
405
[f40a309]406 bra F00L137
[4f508e6]407
408| case SM_KVEL:
409| ltmp = veltab[trg];
410
[f40a309]411F00L142: move TRG(A6),A0
412 add.l A0,A0
413 move.l #_veltab,A1
414 move 0(A0,A1.l),D0
415 ext.l D0
416 move.l D0,LTMP(A6)
[4f508e6]417
418| break;
419
[f40a309]420 bra F00L137
[4f508e6]421
[f40a309]422 .page
[4f508e6]423
424| case SM_KPRS:
425| ltmp = prstab[trg];
426
[f40a309]427F00L143: move TRG(A6),A0
428 add.l A0,A0
429 move.l #_prstab,A1
430 move 0(A0,A1.l),D0
431 ext.l D0
432 move.l D0,LTMP(A6)
[4f508e6]433
434| break;
435
[f40a309]436 bra F00L137
[4f508e6]437
[f40a309]438 .page
[4f508e6]439
440| default:
441| ltmp = valents[group | pt->ipvsrc].val;
442
[f40a309]443F00L144: move.l PT(A6),A0
444 clr.l D0
445 move.b 6(A0),D0
446 or.w GROUP(A6),D0
447 add.l D0,D0
448 move.l D0,D1
449 lsl.l #2,D0
450 add.l D1,D0
451 move.l D0,A0
452 move.l #_valents,A1
453 clr.l D0
454 move 8(A0,A1.l),D0
455 move.l D0,LTMP(A6)
[4f508e6]456
457| }
458
459
460 .page
461
462| ltmp = (ltmp | pt->ipvmlt) >> 15;
463
[f40a309]464F00L137: move.l PT(A6),A0
465 move.w 4(A0),D0
466 move.w LTMP+2(A6),D1
467 muls D1,D0
468 move.l #15,D1
469 asr.l D1,D0
470 move.l D0,LTMP(A6)
[4f508e6]471
472| ltmp += (long)pt->ipval;
473
[f40a309]474 move.l PT(A6),A0
475 move 2(A0),D0
476 ext.l D0
477 add.l D0,LTMP(A6)
[4f508e6]478
479| if (ltmp GT (long)VALMAX)
480| ltmp = (long)VALMAX;
481
[f40a309]482 cmp.l #VALMAX,LTMP(A6)
483 ble F00L146
[4f508e6]484
[f40a309]485 move.l #VALMAX,LTMP(A6)
486 bra F00L147
[4f508e6]487
488| else if (ltmp LT (long)VALMIN)
489| ltmp = (long)VALMIN;
490
[f40a309]491F00L146: cmp.l #VALMIN,LTMP(A6)
492 bge F00L147
[4f508e6]493
[f40a309]494 move.l #VALMIN,LTMP(A6)
[4f508e6]495
496| tfpval = (short)ltmp;
497
[f40a309]498F00L147: move.w LTMP+2(A6),TFPVAL(A6)
499 bra F00L149
[4f508e6]500
501| } else {
502
503| tfpval = pt->ipval;
504
[f40a309]505F00L136: move.l PT(A6),A0
506 move 2(A0),TFPVAL(A6)
[4f508e6]507
508| }
509
510 .page
511
512| fpmant = (((long)pt->iptim & 0x0000FFF0L)
513| | ((long)timemlt & 0x0000FFFFL)) >> 15;
514
[f40a309]515F00L149: move.l PT(A6),A0
516 move.w (A0),D0
517 move.w D0,D2
[4f508e6]518 andi.w #0xFFF0,D0
[f40a309]519 move.w _timemlt,D1
520 muls D1,D0
521 move.l #15,D1
522 asr.l D1,D0
523 move D0,R_FPMANT
[4f508e6]524
525| fpexp = expbit[pt->iptim & 0x000F];
526
527 and #0x000F,D2
[f40a309]528 move D2,A0
529 add.l A0,A0
530 add.l #_expbit,A0
531 move (A0),R_FPEXP
[4f508e6]532
[f40a309]533 .page
[4f508e6]534
535| octype = ip->idhos1c & OC_MOD;
536
[f40a309]537F00L152: move.l IP(A6),A0
538 move.b 74(A0),D0
539 and #3,D0
[4f508e6]540
541| if ((octype EQ OC_FRQ) OR (octype EQ OC_PCH))
542
[f40a309]543 cmp #2,D0
544 beq F00L1001
[4f508e6]545
[f40a309]546 cmp #3,D0
547 bne F00L153
[4f508e6]548
549| fp->idfpch = ip->idhos1v;
550
[f40a309]551F00L1001: move.l IP(A6),A0
552 move 78(A0),(A_FP)
553 bra F00L154
[4f508e6]554
555| else
556| fp->idfpch = pch + ip->idhos1v;
557
[f40a309]558F00L153: move.w PCH(A6),D0
559 ext.l D0
560 move.w 78(A0),D1
561 ext.l D1
562 add.l d1,d0
[4f508e6]563
564| if (fp->idfpch > PITCHMAX)
565| fp->idfpch = PITCHMAX;
566
[f40a309]567 cmp.l #PITCHMAX,d0
568 ble F00153A
[4f508e6]569
[f40a309]570 move.l #PITCHMAX,d0
[4f508e6]571
[f40a309]572F00153A: move.w d0,(A_FP)
[4f508e6]573
574| fpval = addpch(tfpval, fp->idfpch);
575
[f40a309]576F00L154: move.w TFPVAL(A6),D1
577 ext.l D1
578 asr.l #5,D1
579 sub.l #500,D1
580 asl.l #LSPCH,D1
581 move.w (A_FP),D0
582 ext.l D0
583 add.l D1,D0
584 cmp.l #PITCHMAX,D0
585 ble F00L154A
[4f508e6]586
[f40a309]587 move.l #PITCHMAX,D0
[4f508e6]588
[f40a309]589F00L154A: move D0,R_FPVAL
[4f508e6]590
[f40a309]591 .page
[4f508e6]592
[f40a309]593 move.b 5(A_FP),D0
594 ext.w D0
595 sub.w #1,D0
596 movea.l PT(A6),A0
[4f508e6]597
598| oldi = setipl(FPU_DI);
599
[f40a309]600 move sr,OLDI(A6)
601 move #FPU_DI,sr
[4f508e6]602
[f40a309]603F00L168: clr.b 10(A0)
604 add.l #12,A0
605 dbra D0,F00L168
[4f508e6]606
[f40a309]607 .page
[4f508e6]608
609| fp->idftmd ^= I_NVBITS;
610
[f40a309]611F00L165: eor.b #24,7(A_FP)
[4f508e6]612
613| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
614
[f40a309]615 move.b 7(A_FP),R_FPCTL
616 and #28,R_FPCTL
617 or #3,R_FPCTL
[4f508e6]618
619| fp->idfcpt = fp->idfpt1;
620
[f40a309]621 move.b 6(A_FP),8(A_FP)
[4f508e6]622
623| fp->idftmd |= I_ACTIVE;
624
[f40a309]625 or.b #2,7(A_FP)
[4f508e6]626
627| fp->idftrf = trg;
628
[f40a309]629 move TRG(A6),10(A_FP)
[4f508e6]630
631| |(fpu + (long)FPU_TCV1) = srcval;
632
633 move SRCVAL(A6),0x8(A_FPU)
634
635| ++octype;
636
[f40a309]637 add #1,OCTYPE(A6)
[4f508e6]638
639| |(fpu + (long)FPU_TSF1) = mltval;
640
641 move MLTVAL(A6),0xA(A_FPU)
642
643| ++octype;
644
[f40a309]645 add #1,OCTYPE(A6)
[4f508e6]646
647| |(fpu + (long)FPU_TMNT) = fpmant;
648
649 move R_FPMANT,0x14(A_FPU)
650
651| ++octype;
652
[f40a309]653 add #1,OCTYPE(A6)
[4f508e6]654
655| |(fpu + (long)FPU_TEXP) = fpexp;
656
657 move R_FPEXP,0x16(A_FPU)
658
659| ++octype;
660
[f40a309]661 add #1,OCTYPE(A6)
[4f508e6]662
[f40a309]663 .page
[4f508e6]664
665| if (fp->idftmd & I_VNSUBN)
666
[f40a309]667 btst #3,7(A_FP)
668 beq F00L169
[4f508e6]669
670| |(fpu + (long)FPU_TNV1) = fpval;
671
672 move R_FPVAL,0x1C(A_FPU)
[f40a309]673 bra F00L170
[4f508e6]674
675| else
676| |(fpu + (long)FPU_TNV0) = fpval;
677
[f40a309]678F00L169: move R_FPVAL,2(A_FPU)
[4f508e6]679
680| ++octype;
681
[f40a309]682F00L170: add #1,OCTYPE(A6)
[4f508e6]683
684| |(fpu + (long)FPU_TCTL) = fpctl;
685
[f40a309]686 move R_FPCTL,(A_FPU)
[4f508e6]687
688| setipl(oldi);
689
[f40a309]690 move OLDI(A6),sr
[4f508e6]691| }
692
693 .page
694| ------------------------------------------------------------------------------
695| Start function 1 -- Frq 2
696| ------------------------------------------------------------------------------
697| if (legato) {
698
699| legato = 0;
700| return;
701| }
[f40a309]702FN01: tst.w _legato
703 beq FN01AA
[4f508e6]704
[f40a309]705 clr.w _legato
706 bra FNEXIT
[4f508e6]707
708| if (ip->idhfnc[1].idftmd & I_TM_KEY) {
709
[f40a309]710FN01AA: move.l IP(A6),A0
711 move.b 105(A0),D0
712 move.w TAG(A6),D1
713 eor.w D1,D0
714 btst #0,D0
715 bne FN01A
[4f508e6]716
[f40a309]717 jmp FN02
[4f508e6]718
719| vp = (vce << 4) + 3;
720
[f40a309]721FN01A: move VCE(A6),D0
722 asl #4,D0
723 add.w #3,D0
724 move D0,VP(A6)
[4f508e6]725
726| fpu = io_fpu + FPU_OFNC + (vp << 4);
727
[f40a309]728 asl #5,D0
729 ext.l D0
730 move.l D0,A_FPU
[4f508e6]731 add.l #_io_fpu+0x4000,A_FPU
732
733| fp = &ip->idhfnc[1];
734
[f40a309]735 move.l #12,A_FP
736 add.l IP(A6),A_FP
737 add.l #86,A_FP
[4f508e6]738
739| pt = &ip->idhpnt[fp->idfpt1];
740
[f40a309]741 clr.l D0
742 move.b 6(A_FP),D0
743 lsl.l #2,D0
744 move.l D0,D1
745 add.l D0,D0
746 add.l D1,D0
747 add.l IP(A6),D0
748 add.l #242,D0
749 move.l D0,PT(A6)
[4f508e6]750
[f40a309]751 .page
[4f508e6]752
753| srcnum = group | fp->idfsrc;
754
[f40a309]755 move.w GROUP(A6),D0
756 ext.l D0
757 clr.l D1
758 move.b 4(A_FP),D1
759 or D1,D0
760 move D0,SRCNUM(A6)
[4f508e6]761
762| vep = &valents[srcnum];
763
[f40a309]764 add.l D0,D0
765 move.l D0,D1
766 lsl.l #2,D0
767 add.l D1,D0
768 add.l #_valents,D0
769 move.l D0,VEP(A6)
[4f508e6]770
771| smp = vpsms[vp];
772
[f40a309]773 move VP(A6),A0
774 add.l A0,A0
775 add.l A0,A0
776 add.l #_vpsms,A0
777 move.l (A0),A_SMP
[4f508e6]778
779| if (srcnum NE smp->sm) {
780
[f40a309]781 clr D0
782 move 10(A_SMP),D0
783 cmp SRCNUM(A6),D0
784 beq F01L113
[4f508e6]785
786| (smp->prv)->nxt = smp->nxt;
787
[f40a309]788 move.l 4(A_SMP),A0
789 move.l (A_SMP),(A0)
[4f508e6]790
791| (smp->nxt)->prv = smp->prv;
792
[f40a309]793 move.l (A_SMP),A0
794 move.l 4(A_SMP),4(A0)
[4f508e6]795
796| smp->prv = (struct sment |)vep;
797
[f40a309]798 move.l VEP(A6),4(A_SMP)
[4f508e6]799
800| smp->nxt = vep->nxt;
801
[f40a309]802 move.l VEP(A6),A0
803 move.l (A0),(A_SMP)
[4f508e6]804
805| (vep->nxt)->prv = smp;
806
[f40a309]807 move.l VEP(A6),A0
808 move.l (A0),A0
809 move.l A_SMP,4(A0)
[4f508e6]810
811| vep->nxt = smp;
812
[f40a309]813 move.l VEP(A6),A0
814 move.l A_SMP,(A0)
[4f508e6]815
816| smp->sm = srcnum;
817
[f40a309]818 move SRCNUM(A6),10(A_SMP)
[4f508e6]819
820| }
821
822| mltval = fp->idfmlt;
823
[f40a309]824F01L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]825
[f40a309]826 .page
[4f508e6]827
828| switch (fp->idfsrc) {
829
[f40a309]830 move.b 4(A_FP),D0
831 ext.w d0
832 cmp #10,D0
833 bhi F01L122
[4f508e6]834
[f40a309]835 asl #2,D0
836 lea F01L123,A0
837 movea.l 0(A0,D0.W),A0
838 jmp (A0)
[4f508e6]839
840| case SM_NONE:
841| mltval = 0;
842
[f40a309]843F01L116: clr MLTVAL(A6)
[4f508e6]844
845| tsrcval = 0;
846
[f40a309]847 clr TSRCVAL(A6)
[4f508e6]848
849| break;
850
[f40a309]851 bra F01L114
[4f508e6]852
853| case SM_RAND:
854| tsrcval = xgetran(mltval);
855
[f40a309]856F01L117: move MLTVAL(A6),(sp)
857 jsr _xgetran
858 move D0,TSRCVAL(A6)
[4f508e6]859
860| break;
861
[f40a309]862 bra F01L114
[4f508e6]863
864| case SM_PTCH:
865| tsrcval = pch;
866
[f40a309]867F01L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]868
869| break;
870
[f40a309]871 bra F01L114
[4f508e6]872
[f40a309]873 .page
[4f508e6]874
875| case SM_FREQ:
876| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
877
[f40a309]878F01L119: move PCH(A6),D0
879 asr #7,D0
880 and #255,D0
881 move D0,A0
882 add.l A0,A0
883 add.l #_ptoftab,A0
884 move (A0),TSRCVAL(A6)
[4f508e6]885
886| break;
887
[f40a309]888 bra F01L114
[4f508e6]889
890| case SM_KVEL:
891| tsrcval = veltab[trg];
892
[f40a309]893F01L120: move TRG(A6),A0
894 add.l A0,A0
895 add.l #_veltab,A0
896 move (A0),TSRCVAL(A6)
[4f508e6]897
898| break;
899
[f40a309]900 bra F01L114
[4f508e6]901
902| case SM_KPRS:
903| tsrcval = prstab[trg];
904
[f40a309]905F01L121: move TRG(A6),A0
906 add.l A0,A0
907 add.l #_prstab,A0
908 move (A0),TSRCVAL(A6)
[4f508e6]909
910| break;
911
[f40a309]912 bra F01L114
[4f508e6]913
914| default:
915| tsrcval = vep->val;
916
[f40a309]917F01L122: move.l VEP(A6),A0
918 move 8(A0),TSRCVAL(A6)
[4f508e6]919
920| }
921
[f40a309]922 .page
[4f508e6]923
924| srcval = addpch(tsrcval, 0);
925
[f40a309]926F01L114: move.w TSRCVAL(A6),D0
927 ext.l D0
928 asr.l #5,D0
[4f508e6]929| sub.l #500,D0
[f40a309]930 asl.l #LSPCH,D0
931 cmp.l #PITCHMAX,D0
932 ble F01L129A
[4f508e6]933
[f40a309]934 move.l #PITCHMAX,D0
[4f508e6]935
[f40a309]936F01L129A: move D0,SRCVAL(A6)
[4f508e6]937
[f40a309]938 .page
[4f508e6]939
940| if (pt->ipvsrc) {
941
[f40a309]942F01L124: move.l PT(A6),A0
943 tst.b 6(A0)
944 beq F01L136
[4f508e6]945
946| switch (pt->ipvsrc) {
947
[f40a309]948 move.l PT(A6),A0
949 move.b 6(A0),D0
950 ext.w D0
951 sub #1,D0
952 cmp #9,D0
953 bhi F01L144
[4f508e6]954
[f40a309]955 asl #2,D0
956 lea F01L145,A0
957 move.l 0(A0,D0.W),A0
958 jmp (A0)
[4f508e6]959
960| case SM_RAND:
961| ltmp = xgetran(pt_>ipvmlt);
962
[f40a309]963F01L139: move.l PT(A6),A0
964 move 4(A0),(sp)
965 jsr _xgetran
966 ext.l D0
967 move.l D0,LTMP(A6)
[4f508e6]968
969| break;
970
[f40a309]971 bra F01L137
[4f508e6]972
973| case SM_PTCH:
974| ltmp = pch;
975
[f40a309]976F01L140: move PCH(A6),A0
977 move.l A0,LTMP(A6)
[4f508e6]978
979| break;
980
[f40a309]981 bra F01L137
[4f508e6]982
[f40a309]983 .page
[4f508e6]984
985| case SM_FREQ:
986| ltmp = ptoftab[(pch >> 7) & 0x00FF];
987
[f40a309]988F01L141: move PCH(A6),D0
989 asr #7,D0
990 and #255,D0
991 move D0,A0
992 add.l A0,A0
993 move.l #_ptoftab,A1
994 move 0(A0,A1.l),D0
995 ext.l D0
996 move.l D0,LTMP(A6)
[4f508e6]997
998| break;
999
[f40a309]1000 bra F01L137
[4f508e6]1001
1002| case SM_KVEL:
1003| ltmp = veltab[trg];
1004
[f40a309]1005F01L142: move TRG(A6),A0
1006 add.l A0,A0
1007 move.l #_veltab,A1
1008 move 0(A0,A1.l),D0
1009 ext.l D0
1010 move.l D0,LTMP(A6)
[4f508e6]1011
1012| break;
1013
[f40a309]1014 bra F01L137
[4f508e6]1015
[f40a309]1016 .page
[4f508e6]1017
1018| case SM_KPRS:
1019| ltmp = prstab[trg];
1020
[f40a309]1021F01L143: move TRG(A6),A0
1022 add.l A0,A0
1023 move.l #_prstab,A1
1024 move 0(A0,A1.l),D0
1025 ext.l D0
1026 move.l D0,LTMP(A6)
[4f508e6]1027
1028| break;
1029
[f40a309]1030 bra F01L137
[4f508e6]1031
[f40a309]1032 .page
[4f508e6]1033
1034| default:
1035| ltmp = valents[group | pt->ipvsrc].val;
1036
[f40a309]1037F01L144: move.l PT(A6),A0
1038 clr.l D0
1039 move.b 6(A0),D0
1040 or.w GROUP(A6),D0
1041 add.l D0,D0
1042 move.l D0,D1
1043 lsl.l #2,D0
1044 add.l D1,D0
1045 move.l D0,A0
1046 move.l #_valents,A1
1047 clr.l D0
1048 move 8(A0,A1.l),D0
1049 move.l D0,LTMP(A6)
[4f508e6]1050
1051| }
1052
1053
1054 .page
1055
1056| ltmp = (ltmp | pt->ipvmlt) >> 15;
1057
[f40a309]1058F01L137: move.l PT(A6),A0
1059 move.w 4(A0),D0
1060 move.w LTMP+2(A6),D1
1061 muls D1,D0
1062 move.l #15,D1
1063 asr.l D1,D0
1064 move.l D0,LTMP(A6)
[4f508e6]1065
1066| ltmp += (long)pt->ipval;
1067
[f40a309]1068 move.l PT(A6),A0
1069 move 2(A0),D0
1070 ext.l D0
1071 add.l D0,LTMP(A6)
[4f508e6]1072
1073| if (ltmp GT (long)VALMAX)
1074| ltmp = (long)VALMAX;
1075
[f40a309]1076 cmp.l #VALMAX,LTMP(A6)
1077 ble F01L146
[4f508e6]1078
[f40a309]1079 move.l #VALMAX,LTMP(A6)
1080 bra F01L147
[4f508e6]1081
1082| else if (ltmp LT (long)VALMIN)
1083| ltmp = (long)VALMIN;
1084
[f40a309]1085F01L146: cmp.l #VALMIN,LTMP(A6)
1086 bge F01L147
[4f508e6]1087
[f40a309]1088 move.l #VALMIN,LTMP(A6)
[4f508e6]1089
1090| tfpval = (short)ltmp;
1091
[f40a309]1092F01L147: move.w LTMP+2(A6),TFPVAL(A6)
1093 bra F01L149
[4f508e6]1094
1095| } else {
1096
1097| tfpval = pt->ipval;
1098
[f40a309]1099F01L136: move.l PT(A6),A0
1100 move 2(A0),TFPVAL(A6)
[4f508e6]1101
1102| }
1103
1104 .page
1105
1106| fpmant = (((long)pt->iptom & 0x0000FFF0L)
1107| | ((long)timemlt & 0x0000FFFFL)) >> 15;
1108
[f40a309]1109F01L149: move.l PT(A6),A0
1110 move.w (A0),D0
1111 move.w D0,D2
[4f508e6]1112 andi.w #0xFFF0,D0
[f40a309]1113 move.w _timemlt,D1
1114 muls D1,D0
1115 move.l #15,D1
1116 asr.l D1,D0
1117 move D0,R_FPMANT
[4f508e6]1118
1119| fpexp = expbit[pt->iptim & 0x000F];
1120
1121 and #0x000F,D2
[f40a309]1122 move D2,A0
1123 add.l A0,A0
1124 add.l #_expbit,A0
1125 move (A0),R_FPEXP
[4f508e6]1126
[f40a309]1127 .page
[4f508e6]1128
1129| fp->idfpch = ip->idhos2v;
1130
[f40a309]1131F01L155: move.l IP(A6),A0
1132 move.w 80(A0),(A_FP)
[4f508e6]1133
1134| fpval = addpch(tfpval, fp_>idfpch);
1135
[f40a309]1136 move.w TFPVAL(A6),D1
1137 ext.l D1
1138 asr.l #5,D1
1139 sub.l #500,D1
1140 asl.l #LSPCH,D1
1141 move.w (A_FP),D0
1142 ext.l D0
1143 add.l D1,D0
1144 cmp.l #PITCHMAX,D0
1145 ble F01L155A
[4f508e6]1146
[f40a309]1147 move.l #PITCHMAX,D0
[4f508e6]1148
[f40a309]1149F01L155A: move D0,R_FPVAL
[4f508e6]1150
[f40a309]1151 .page
[4f508e6]1152
[f40a309]1153 move.b 5(A_FP),D0
1154 ext.w D0
1155 sub.w #1,D0
1156 movea.l PT(A6),A0
[4f508e6]1157
1158| oldi = setipl(FPU_DI);
1159
[f40a309]1160 move sr,OLDI(A6)
1161 move #FPU_DI,sr
[4f508e6]1162
[f40a309]1163F01L168: clr.b 10(A0)
1164 add.l #12,a0
1165 dbra D0,F01L168
[4f508e6]1166
[f40a309]1167 .page
[4f508e6]1168
1169| fp->idftmd ^= I_NVBITS;
1170
[f40a309]1171F01L165: eor.b #24,7(A_FP)
[4f508e6]1172
1173| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
1174
[f40a309]1175 move.b 7(A_FP),R_FPCTL
1176 and #28,R_FPCTL
1177 or #3,R_FPCTL
[4f508e6]1178
1179| fp->idfcpt = fp->idfpt1;
1180
[f40a309]1181 move.b 6(A_FP),8(A_FP)
[4f508e6]1182
1183| fp->idftmd |= I_ACTIVE;
1184
[f40a309]1185 or.b #2,7(A_FP)
[4f508e6]1186
1187| fp->idftrf = trg;
1188
[f40a309]1189 move TRG(A6),10(A_FP)
[4f508e6]1190
1191| |(fpu + (long)FPU_TCV1) = srcval;
1192
1193 move SRCVAL(A6),0x8(A_FPU)
1194
1195| ++octype;
1196
[f40a309]1197 add #1,OCTYPE(A6)
[4f508e6]1198
1199| |(fpu + (long)FPU_TSF1) = mltval;
1200
1201 move MLTVAL(A6),0xA(A_FPU)
1202
1203| ++octype;
1204
[f40a309]1205 add #1,OCTYPE(A6)
[4f508e6]1206
1207| |(fpu + (long)FPU_TMNT) = fpmant;
1208
1209 move R_FPMANT,0x14(A_FPU)
1210
1211| ++octype;
1212
[f40a309]1213 add #1,OCTYPE(A6)
[4f508e6]1214
1215| |(fpu + (long)FPU_TEXP) = fpexp;
1216
1217 move R_FPEXP,0x16(A_FPU)
1218
1219| ++octype;
1220
[f40a309]1221 add #1,OCTYPE(A6)
[4f508e6]1222
[f40a309]1223 .page
[4f508e6]1224
1225| if (fp->idftmd & I_VNSUBN)
1226
[f40a309]1227 btst #3,7(A_FP)
1228 beq F01L169
[4f508e6]1229
1230| |(fpu + (long)FPU_TNV1) = fpval;
1231
1232 move R_FPVAL,0x1C(A_FPU)
[f40a309]1233 bra F01L170
[4f508e6]1234
1235| else
1236| |(fpu + (long)FPU_TNV0) = fpval;
1237
[f40a309]1238F01L169: move R_FPVAL,2(A_FPU)
[4f508e6]1239
1240| ++octype;
1241
[f40a309]1242F01L170: add #1,OCTYPE(A6)
[4f508e6]1243
1244| |(fpu + (long)FPU_TCTL) = fpctl;
1245
[f40a309]1246 move R_FPCTL,(A_FPU)
[4f508e6]1247
1248| setipl(oldi);
1249
[f40a309]1250 move OLDI(A6),sr
[4f508e6]1251
1252 .page
1253| ------------------------------------------------------------------------------
1254| Start function 2 -- Frq 3
1255| ------------------------------------------------------------------------------
1256
1257| if (ip->idhfnc[2].idftmd & I_TM_KEY) {
1258
[f40a309]1259FN02: move.l IP(A6),A0
1260 move.b 117(A0),D0
1261 move.w TAG(A6),D1
1262 eor.w D1,D0
1263 btst #0,D0
1264 bne FN02A
[4f508e6]1265
[f40a309]1266 jmp FN03
[4f508e6]1267
1268| vp = (vce << 4) + 5;
1269
[f40a309]1270FN02A: move VCE(A6),D0
1271 asl #4,D0
1272 add.w #5,D0
1273 move D0,VP(A6)
[4f508e6]1274
1275| fpu = io_fpu + FPU_OFNC + (vp << 4);
1276
[f40a309]1277 asl #5,D0
1278 ext.l D0
1279 move.l D0,A_FPU
[4f508e6]1280 add.l #_io_fpu+0x4000,A_FPU
1281
1282| fp = &ip->idhfnc[2];
1283
[f40a309]1284 move.l #24,A_FP
1285 add.l IP(A6),A_FP
1286 add.l #86,A_FP
[4f508e6]1287
1288| pt = &ip->idhpnt[fp->idfpt1];
1289
[f40a309]1290 clr.l D0
1291 move.b 6(A_FP),D0
1292 lsl.l #2,D0
1293 move.l D0,D1
1294 add.l D0,D0
1295 add.l D1,D0
1296 add.l IP(A6),D0
1297 add.l #242,D0
1298 move.l D0,PT(A6)
[4f508e6]1299
[f40a309]1300 .page
[4f508e6]1301
1302| srcnum = group | fp->idfsrc;
1303
[f40a309]1304 move.w GROUP(A6),D0
1305 ext.l D0
1306 clr.l D1
1307 move.b 4(A_FP),D1
1308 or D1,D0
1309 move D0,SRCNUM(A6)
[4f508e6]1310
1311| vep = &valents[srcnum];
1312
[f40a309]1313 add.l D0,D0
1314 move.l D0,D1
1315 lsl.l #2,D0
1316 add.l D1,D0
1317 add.l #_valents,D0
1318 move.l D0,VEP(A6)
[4f508e6]1319
1320| smp = vpsms[vp];
1321
[f40a309]1322 move VP(A6),A0
1323 add.l A0,A0
1324 add.l A0,A0
1325 add.l #_vpsms,A0
1326 move.l (A0),A_SMP
[4f508e6]1327
1328| if (srcnum NE smp->sm) {
1329
[f40a309]1330 clr D0
1331 move 10(A_SMP),D0
1332 cmp SRCNUM(A6),D0
1333 beq F02L113
[4f508e6]1334
1335| (smp->prv)->nxt = smp->nxt;
1336
[f40a309]1337 move.l 4(A_SMP),A0
1338 move.l (A_SMP),(A0)
[4f508e6]1339
1340| (smp->nxt)->prv = smp->prv;
1341
[f40a309]1342 move.l (A_SMP),A0
1343 move.l 4(A_SMP),4(A0)
[4f508e6]1344
1345| smp->prv = (struct sment |)vep;
1346
[f40a309]1347 move.l VEP(A6),4(A_SMP)
[4f508e6]1348
1349| smp->nxt = vep->nxt;
1350
[f40a309]1351 move.l VEP(A6),A0
1352 move.l (A0),(A_SMP)
[4f508e6]1353
1354| (vep->nxt)->prv = smp;
1355
[f40a309]1356 move.l VEP(A6),A0
1357 move.l (A0),A0
1358 move.l A_SMP,4(A0)
[4f508e6]1359
1360| vep->nxt = smp;
1361
[f40a309]1362 move.l VEP(A6),A0
1363 move.l A_SMP,(A0)
[4f508e6]1364
1365| smp->sm = srcnum;
1366
[f40a309]1367 move SRCNUM(A6),10(A_SMP)
[4f508e6]1368
1369| }
1370
1371| mltval = fp->idfmlt;
1372
[f40a309]1373F02L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]1374
[f40a309]1375 .page
[4f508e6]1376
1377| switch (fp->idfsrc) {
1378
[f40a309]1379 move.b 4(A_FP),D0
1380 ext.w d0
1381 cmp #10,D0
1382 bhi F02L122
[4f508e6]1383
[f40a309]1384 asl #2,D0
1385 lea F02L123,A0
1386 movea.l 0(A0,D0.W),A0
1387 jmp (A0)
[4f508e6]1388
1389| case SM_NONE:
1390| mltval = 0;
1391
[f40a309]1392F02L116: clr MLTVAL(A6)
[4f508e6]1393
1394| tsrcval = 0;
1395
[f40a309]1396 clr TSRCVAL(A6)
[4f508e6]1397
1398| break;
1399
[f40a309]1400 bra F02L114
[4f508e6]1401
1402| case SM_RAND:
1403| tsrcval = xgetran(mltval);
1404
[f40a309]1405F02L117: move MLTVAL(A6),(sp)
1406 jsr _xgetran
1407 move D0,TSRCVAL(A6)
[4f508e6]1408
1409| break;
1410
[f40a309]1411 bra F02L114
[4f508e6]1412
1413| case SM_PTCH:
1414| tsrcval = pch;
1415
[f40a309]1416F02L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]1417
1418| break;
1419
[f40a309]1420 bra F02L114
[4f508e6]1421
[f40a309]1422 .page
[4f508e6]1423
1424| case SM_FREQ:
1425| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
1426
[f40a309]1427F02L119: move PCH(A6),D0
1428 asr #7,D0
1429 and #255,D0
1430 move D0,A0
1431 add.l A0,A0
1432 add.l #_ptoftab,A0
1433 move (A0),TSRCVAL(A6)
[4f508e6]1434
1435| break;
1436
[f40a309]1437 bra F02L114
[4f508e6]1438
1439| case SM_KVEL:
1440| tsrcval = veltab[trg];
1441
[f40a309]1442F02L120: move TRG(A6),A0
1443 add.l A0,A0
1444 add.l #_veltab,A0
1445 move (A0),TSRCVAL(A6)
[4f508e6]1446
1447| break;
1448
[f40a309]1449 bra F02L114
[4f508e6]1450
1451| case SM_KPRS:
1452| tsrcval = prstab[trg];
1453
[f40a309]1454F02L121: move TRG(A6),A0
1455 add.l A0,A0
1456 add.l #_prstab,A0
1457 move (A0),TSRCVAL(A6)
[4f508e6]1458
1459| break;
1460
[f40a309]1461 bra F02L114
[4f508e6]1462
1463| default:
1464| tsrcval = vep->val;
1465
[f40a309]1466F02L122: move.l VEP(A6),A0
1467 move 8(A0),TSRCVAL(A6)
[4f508e6]1468
1469| }
1470
[f40a309]1471 .page
[4f508e6]1472
1473| srcval = addpch(tsrcval, 0);
1474
[f40a309]1475F02L114: move.w TSRCVAL(A6),D0
1476 ext.l D0
1477 asr.l #5,D0
[4f508e6]1478| sub.l #500,D0
[f40a309]1479 asl.l #LSPCH,D0
1480 cmp.l #PITCHMAX,D0
1481 ble F02L129A
[4f508e6]1482
[f40a309]1483 move.l #PITCHMAX,D0
[4f508e6]1484
[f40a309]1485F02L129A: move D0,SRCVAL(A6)
[4f508e6]1486
[f40a309]1487 .page
[4f508e6]1488
1489| if (pt->ipvsrc) {
1490
[f40a309]1491F02L124: move.l PT(A6),A0
1492 tst.b 6(A0)
1493 beq F02L136
[4f508e6]1494
1495| switch (pt->ipvsrc) {
1496
[f40a309]1497 move.l PT(A6),A0
1498 move.b 6(A0),D0
1499 ext.w D0
1500 sub #1,D0
1501 cmp #9,D0
1502 bhi F02L144
[4f508e6]1503
[f40a309]1504 asl #2,D0
1505 lea F02L145,A0
1506 move.l 0(A0,D0.W),A0
1507 jmp (A0)
[4f508e6]1508
1509| case SM_RAND:
1510| ltmp = xgetran(pt_>ipvmlt);
1511
[f40a309]1512F02L139: move.l PT(A6),A0
1513 move 4(A0),(sp)
1514 jsr _xgetran
1515 ext.l D0
1516 move.l D0,LTMP(A6)
[4f508e6]1517
1518| break;
1519
[f40a309]1520 bra F02L137
[4f508e6]1521
1522| case SM_PTCH:
1523| ltmp = pch;
1524
[f40a309]1525F02L140: move PCH(A6),A0
1526 move.l A0,LTMP(A6)
[4f508e6]1527
1528| break;
1529
[f40a309]1530 bra F02L137
[4f508e6]1531
[f40a309]1532 .page
[4f508e6]1533
1534| case SM_FREQ:
1535| ltmp = ptoftab[(pch >> 7) & 0x00FF];
1536
[f40a309]1537F02L141: move PCH(A6),D0
1538 asr #7,D0
1539 and #255,D0
1540 move D0,A0
1541 add.l A0,A0
1542 move.l #_ptoftab,A1
1543 move 0(A0,A1.l),D0
1544 ext.l D0
1545 move.l D0,LTMP(A6)
[4f508e6]1546
1547| break;
1548
[f40a309]1549 bra F02L137
[4f508e6]1550
1551| case SM_KVEL:
1552| ltmp = veltab[trg];
1553
[f40a309]1554F02L142: move TRG(A6),A0
1555 add.l A0,A0
1556 move.l #_veltab,A1
1557 move 0(A0,A1.l),D0
1558 ext.l D0
1559 move.l D0,LTMP(A6)
[4f508e6]1560
1561| break;
1562
[f40a309]1563 bra F02L137
[4f508e6]1564
[f40a309]1565 .page
[4f508e6]1566
1567| case SM_KPRS:
1568| ltmp = prstab[trg];
1569
1570F02L143: move TRG(A6),A0
[f40a309]1571 add.l A0,A0
1572 move.l #_prstab,A1
1573 move 0(A0,A1.l),D0
1574 ext.l D0
1575 move.l D0,LTMP(A6)
[4f508e6]1576
1577| break;
1578
[f40a309]1579 bra F02L137
[4f508e6]1580
[f40a309]1581 .page
[4f508e6]1582
1583| default:
1584| ltmp = valents[group | pt->ipvsrc].val;
1585
[f40a309]1586F02L144: move.l PT(A6),A0
1587 clr.l D0
1588 move.b 6(A0),D0
1589 or.w GROUP(A6),D0
1590 add.l D0,D0
1591 move.l D0,D1
1592 lsl.l #2,D0
1593 add.l D1,D0
1594 move.l D0,A0
1595 move.l #_valents,A1
1596 clr.l D0
1597 move 8(A0,A1.l),D0
1598 move.l D0,LTMP(A6)
[4f508e6]1599
1600| }
1601
1602
1603 .page
1604
1605| ltmp = (ltmp | pt->ipvmlt) >> 15;
1606
[f40a309]1607F02L137: move.l PT(A6),A0
1608 move.w 4(A0),D0
1609 move.w LTMP+2(A6),D1
1610 muls D1,D0
1611 move.l #15,D1
1612 asr.l D1,D0
1613 move.l D0,LTMP(A6)
[4f508e6]1614
1615| ltmp += (long)pt->ipval;
1616
[f40a309]1617 move.l PT(A6),A0
1618 move 2(A0),D0
1619 ext.l D0
1620 add.l D0,LTMP(A6)
[4f508e6]1621
1622| if (ltmp GT (long)VALMAX)
1623| ltmp = (long)VALMAX;
1624
[f40a309]1625 cmp.l #VALMAX,LTMP(A6)
1626 ble F02L146
[4f508e6]1627
[f40a309]1628 move.l #VALMAX,LTMP(A6)
1629 bra F02L147
[4f508e6]1630
1631| else if (ltmp LT (long)VALMIN)
1632| ltmp = (long)VALMIN;
1633
[f40a309]1634F02L146: cmp.l #VALMIN,LTMP(A6)
1635 bge F02L147
[4f508e6]1636
[f40a309]1637 move.l #VALMIN,LTMP(A6)
[4f508e6]1638
1639| tfpval = (short)ltmp;
1640
[f40a309]1641F02L147: move.w LTMP+2(A6),TFPVAL(A6)
1642 bra F02L149
[4f508e6]1643
1644| } else {
1645
1646| tfpval = pt->ipval;
1647
[f40a309]1648F02L136: move.l PT(A6),A0
1649 move 2(A0),TFPVAL(A6)
[4f508e6]1650
1651| }
1652
1653 .page
1654
1655| fpmant = (((long)pt->iptom & 0x0000FFF0L)
1656| | ((long)timemlt & 0x0000FFFFL)) >> 15;
1657
[f40a309]1658F02L149: move.l PT(A6),A0
1659 move.w (A0),D0
1660 move.w D0,D2
[4f508e6]1661 andi.w #0xFFF0,D0
[f40a309]1662 move.w _timemlt,D1
1663 muls D1,D0
1664 move.l #15,D1
1665 asr.l D1,D0
1666 move D0,R_FPMANT
[4f508e6]1667
1668| fpexp = expbit[pt->iptim & 0x000F];
1669
1670 and #0x000F,D2
[f40a309]1671 move D2,A0
1672 add.l A0,A0
1673 add.l #_expbit,A0
1674 move (A0),R_FPEXP
[4f508e6]1675
[f40a309]1676 .page
[4f508e6]1677
1678| fp->idfpch = ip->idhos3v;
1679
[f40a309]1680F02L156: move.l IP(A6),A0
1681 move.w 82(A0),(A_FP)
[4f508e6]1682
1683| fpval = addpch(tfpval, fp->idfpch);
1684
[f40a309]1685 move.w TFPVAL(A6),D1
1686 ext.l D1
1687 asr.l #5,D1
1688 sub.l #500,D1
1689 asl.l #LSPCH,D1
1690 move.w (A_FP),D0
1691 ext.l D0
1692 add.l D1,D0
1693 cmp.l #PITCHMAX,D0
1694 ble F02L156A
[4f508e6]1695
[f40a309]1696 move.l #PITCHMAX,D0
[4f508e6]1697
[f40a309]1698F02L156A: move D0,R_FPVAL
[4f508e6]1699
[f40a309]1700 .page
[4f508e6]1701
[f40a309]1702 move.b 5(A_FP),D0
1703 ext.w D0
1704 sub.w #1,D0
1705 movea.l PT(A6),A0
[4f508e6]1706
1707| oldi = setipl(FPU_DI);
1708
[f40a309]1709 move sr,OLDI(A6)
1710 move #FPU_DI,sr
[4f508e6]1711
[f40a309]1712F02L168: clr.b 10(A0)
1713 add.l #12,a0
1714 dbra D0,F02L168
[4f508e6]1715
[f40a309]1716 .page
[4f508e6]1717
1718| fp->idftmd ^= I_NVBITS;
1719
[f40a309]1720F02L165: eor.b #24,7(A_FP)
[4f508e6]1721
1722| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
1723
[f40a309]1724 move.b 7(A_FP),R_FPCTL
1725 and #28,R_FPCTL
1726 or #3,R_FPCTL
[4f508e6]1727
1728| fp->idfcpt = fp->idfpt1;
1729
[f40a309]1730 move.b 6(A_FP),8(A_FP)
[4f508e6]1731
1732| fp->idftmd |= I_ACTIVE;
1733
[f40a309]1734 or.b #2,7(A_FP)
[4f508e6]1735
1736| fp->idftrf = trg;
1737
[f40a309]1738 move TRG(A6),10(A_FP)
[4f508e6]1739
1740| |(fpu + (long)FPU_TCV1) = srcval;
1741
1742 move SRCVAL(A6),0x8(A_FPU)
1743
1744| ++octype;
1745
[f40a309]1746 add #1,OCTYPE(A6)
[4f508e6]1747
1748| |(fpu + (long)FPU_TSF1) = mltval;
1749
1750 move MLTVAL(A6),0xA(A_FPU)
1751
1752| ++octype;
1753
[f40a309]1754 add #1,OCTYPE(A6)
[4f508e6]1755
1756| |(fpu + (long)FPU_TMNT) = fpmant;
1757
1758 move R_FPMANT,0x14(A_FPU)
1759
1760| ++octype;
1761
[f40a309]1762 add #1,OCTYPE(A6)
[4f508e6]1763
1764| |(fpu + (long)FPU_TEXP) = fpexp;
1765
1766 move R_FPEXP,0x16(A_FPU)
1767
1768| ++octype;
1769
[f40a309]1770 add #1,OCTYPE(A6)
[4f508e6]1771
[f40a309]1772 .page
[4f508e6]1773
1774| if (fp->idftmd & I_VNSUBN)
1775
[f40a309]1776 btst #3,7(A_FP)
1777 beq F02L169
[4f508e6]1778
1779| |(fpu + (long)FPU_TNV1) = fpval;
1780
1781 move R_FPVAL,0x1C(A_FPU)
[f40a309]1782 bra F02L170
[4f508e6]1783
1784| else
1785| |(fpu + (long)FPU_TNV0) = fpval;
1786
[f40a309]1787F02L169: move R_FPVAL,2(A_FPU)
[4f508e6]1788
1789| ++octype;
1790
[f40a309]1791F02L170: add #1,OCTYPE(A6)
[4f508e6]1792
1793| |(fpu + (long)FPU_TCTL) = fpctl;
1794
[f40a309]1795 move R_FPCTL,(A_FPU)
[4f508e6]1796
1797| setipl(oldi);
1798
[f40a309]1799 move OLDI(A6),sr
[4f508e6]1800
1801 .page
1802| ------------------------------------------------------------------------------
1803| Start function 3 -- Frq 4
1804| ------------------------------------------------------------------------------
1805
1806| if (ip->idhfnc[3].idftmd & I_TM_KEY) {
1807
[f40a309]1808FN03: move.l IP(A6),A0
1809 move.b 129(A0),D0
1810 move.w TAG(A6),D1
1811 eor.w D1,D0
1812 btst #0,D0
1813 bne FN03A
[4f508e6]1814
[f40a309]1815 jmp FN04
[4f508e6]1816
1817| vp = (vce << 4) + 7;
1818
[f40a309]1819FN03A: move VCE(A6),D0
1820 asl #4,D0
1821 add.w #7,D0
1822 move D0,VP(A6)
[4f508e6]1823
1824| fpu = io_fpu + FPU_OFNC + (vp << 4);
1825
[f40a309]1826 asl #5,D0
1827 ext.l D0
1828 move.l D0,A_FPU
[4f508e6]1829 add.l #_io_fpu+0x4000,A_FPU
1830
1831| fp = &ip->idhfnc[3];
1832
[f40a309]1833 move.l #36,A_FP
1834 add.l IP(A6),A_FP
1835 add.l #86,A_FP
[4f508e6]1836
1837| pt = &ip->idhpnt[fp->idfpt1];
1838
[f40a309]1839 clr.l D0
1840 move.b 6(A_FP),D0
1841 lsl.l #2,D0
1842 move.l D0,D1
1843 add.l D0,D0
1844 add.l D1,D0
1845 add.l IP(A6),D0
1846 add.l #242,D0
1847 move.l D0,PT(A6)
[4f508e6]1848
[f40a309]1849 .page
[4f508e6]1850
1851| srcnum = group | fp->idfsrc;
1852
[f40a309]1853 move.w GROUP(A6),D0
1854 ext.l D0
1855 clr.l D1
1856 move.b 4(A_FP),D1
1857 or D1,D0
1858 move D0,SRCNUM(A6)
[4f508e6]1859
1860| vep = &valents[srcnum];
1861
[f40a309]1862 add.l D0,D0
1863 move.l D0,D1
1864 lsl.l #2,D0
1865 add.l D1,D0
1866 add.l #_valents,D0
1867 move.l D0,VEP(A6)
[4f508e6]1868
1869| smp = vpsms[vp];
1870
[f40a309]1871 move VP(A6),A0
1872 add.l A0,A0
1873 add.l A0,A0
1874 add.l #_vpsms,A0
1875 move.l (A0),A_SMP
[4f508e6]1876
1877| if (srcnum NE smp->sm) {
1878
[f40a309]1879 clr D0
1880 move 10(A_SMP),D0
1881 cmp SRCNUM(A6),D0
1882 beq F03L113
[4f508e6]1883
1884| (smp->prv)->nxt = smp->nxt;
1885
[f40a309]1886 move.l 4(A_SMP),A0
1887 move.l (A_SMP),(A0)
[4f508e6]1888
1889| (smp->nxt)->prv = smp->prv;
1890
[f40a309]1891 move.l (A_SMP),A0
1892 move.l 4(A_SMP),4(A0)
[4f508e6]1893
1894| smp->prv = (struct sment |)vep;
1895
[f40a309]1896 move.l VEP(A6),4(A_SMP)
[4f508e6]1897
1898| smp->nxt = vep->nxt;
1899
[f40a309]1900 move.l VEP(A6),A0
1901 move.l (A0),(A_SMP)
[4f508e6]1902
1903| (vep->nxt)->prv = smp;
1904
[f40a309]1905 move.l VEP(A6),A0
1906 move.l (A0),A0
1907 move.l A_SMP,4(A0)
[4f508e6]1908
1909| vep->nxt = smp;
1910
[f40a309]1911 move.l VEP(A6),A0
1912 move.l A_SMP,(A0)
[4f508e6]1913
1914| smp->sm = srcnum;
1915
[f40a309]1916 move SRCNUM(A6),10(A_SMP)
[4f508e6]1917
1918| }
1919
1920| mltval = fp->idfmlt;
1921
[f40a309]1922F03L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]1923
[f40a309]1924 .page
[4f508e6]1925
1926| switch (fp->idfsrc) {
1927
[f40a309]1928 move.b 4(A_FP),D0
1929 ext.w d0
1930 cmp #10,D0
1931 bhi F03L122
[4f508e6]1932
[f40a309]1933 asl #2,D0
1934 lea F03L123,A0
1935 movea.l 0(A0,D0.W),A0
1936 jmp (A0)
[4f508e6]1937
1938| case SM_NONE:
1939| mltval = 0;
1940
[f40a309]1941F03L116: clr MLTVAL(A6)
[4f508e6]1942
1943| tsrcval = 0;
1944
[f40a309]1945 clr TSRCVAL(A6)
[4f508e6]1946
1947| break;
1948
[f40a309]1949 bra F03L114
[4f508e6]1950
1951| case SM_RAND:
1952| tsrcval = xgetran(mltval);
1953
[f40a309]1954F03L117: move MLTVAL(A6),(sp)
1955 jsr _xgetran
1956 move D0,TSRCVAL(A6)
[4f508e6]1957
1958| break;
1959
[f40a309]1960 bra F03L114
[4f508e6]1961
1962| case SM_PTCH:
1963| tsrcval = pch;
1964
[f40a309]1965F03L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]1966
1967| break;
1968
[f40a309]1969 bra F03L114
[4f508e6]1970
[f40a309]1971 .page
[4f508e6]1972
1973| case SM_FREQ:
1974| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
1975
[f40a309]1976F03L119: move PCH(A6),D0
1977 asr #7,D0
1978 and #255,D0
1979 move D0,A0
1980 add.l A0,A0
1981 add.l #_ptoftab,A0
1982 move (A0),TSRCVAL(A6)
[4f508e6]1983
1984| break;
1985
[f40a309]1986 bra F03L114
[4f508e6]1987
1988| case SM_KVEL:
1989| tsrcval = veltab[trg];
1990
[f40a309]1991F03L120: move TRG(A6),A0
1992 add.l A0,A0
1993 add.l #_veltab,A0
1994 move (A0),TSRCVAL(A6)
[4f508e6]1995
1996| break;
1997
[f40a309]1998 bra F03L114
[4f508e6]1999
2000| case SM_KPRS:
2001| tsrcval = prstab[trg];
2002
[f40a309]2003F03L121: move TRG(A6),A0
2004 add.l A0,A0
2005 add.l #_prstab,A0
2006 move (A0),TSRCVAL(A6)
[4f508e6]2007
2008| break;
2009
[f40a309]2010 bra F03L114
[4f508e6]2011
2012| default:
2013| tsrcval = vep->val;
2014
[f40a309]2015F03L122: move.l VEP(A6),A0
2016 move 8(A0),TSRCVAL(A6)
[4f508e6]2017
2018| }
2019
[f40a309]2020 .page
[4f508e6]2021
2022| srcval = addpch(tsrcval, 0);
2023
[f40a309]2024F03L114: move.w TSRCVAL(A6),D0
2025 ext.l D0
2026 asr.l #5,D0
[4f508e6]2027| sub.l #500,D0
[f40a309]2028 asl.l #LSPCH,D0
2029 cmp.l #PITCHMAX,D0
2030 ble F03L129A
[4f508e6]2031
[f40a309]2032 move.l #PITCHMAX,D0
2033
2034F03L129A: move D0,SRCVAL(A6)
[4f508e6]2035
[f40a309]2036 .page
[4f508e6]2037
2038| if (pt->ipvsrc) {
2039
[f40a309]2040F03L124: move.l PT(A6),A0
2041 tst.b 6(A0)
2042 beq F03L136
[4f508e6]2043
2044| switch (pt->ipvsrc) {
2045
[f40a309]2046 move.l PT(A6),A0
2047 move.b 6(A0),D0
2048 ext.w D0
2049 sub #1,D0
2050 cmp #9,D0
2051 bhi F03L144
[4f508e6]2052
[f40a309]2053 asl #2,D0
2054 lea F03L145,A0
2055 move.l 0(A0,D0.W),A0
2056 jmp (A0)
[4f508e6]2057
2058| case SM_RAND:
2059| ltmp = xgetran(pt_>ipvmlt);
2060
[f40a309]2061F03L139: move.l PT(A6),A0
2062 move 4(A0),(sp)
2063 jsr _xgetran
2064 ext.l D0
2065 move.l D0,LTMP(A6)
[4f508e6]2066
2067| break;
2068
[f40a309]2069 bra F03L137
[4f508e6]2070
2071| case SM_PTCH:
2072| ltmp = pch;
2073
[f40a309]2074F03L140: move PCH(A6),A0
2075 move.l A0,LTMP(A6)
[4f508e6]2076
2077| break;
2078
[f40a309]2079 bra F03L137
[4f508e6]2080
[f40a309]2081 .page
[4f508e6]2082
2083| case SM_FREQ:
2084| ltmp = ptoftab[(pch >> 7) & 0x00FF];
2085
[f40a309]2086F03L141: move PCH(A6),D0
2087 asr #7,D0
2088 and #255,D0
2089 move D0,A0
2090 add.l A0,A0
2091 move.l #_ptoftab,A1
2092 move 0(A0,A1.l),D0
2093 ext.l D0
2094 move.l D0,LTMP(A6)
[4f508e6]2095
2096| break;
2097
[f40a309]2098 bra F03L137
[4f508e6]2099
2100| case SM_KVEL:
2101| ltmp = veltab[trg];
2102
[f40a309]2103F03L142: move TRG(A6),A0
2104 add.l A0,A0
2105 move.l #_veltab,A1
2106 move 0(A0,A1.l),D0
2107 ext.l D0
2108 move.l D0,LTMP(A6)
[4f508e6]2109
2110| break;
2111
[f40a309]2112 bra F03L137
[4f508e6]2113
[f40a309]2114 .page
[4f508e6]2115
2116| case SM_KPRS:
2117| ltmp = prstab[trg];
2118
[f40a309]2119F03L143: move TRG(A6),A0
2120 add.l A0,A0
2121 move.l #_prstab,A1
2122 move 0(A0,A1.l),D0
2123 ext.l D0
2124 move.l D0,LTMP(A6)
[4f508e6]2125
2126| break;
2127
[f40a309]2128 bra F03L137
[4f508e6]2129
[f40a309]2130 .page
[4f508e6]2131
2132| default:
2133| ltmp = valents[group | pt->ipvsrc].val;
2134
[f40a309]2135F03L144: move.l PT(A6),A0
2136 clr.l D0
2137 move.b 6(A0),D0
2138 or.w GROUP(A6),D0
2139 add.l D0,D0
2140 move.l D0,D1
2141 lsl.l #2,D0
2142 add.l D1,D0
2143 move.l D0,A0
2144 move.l #_valents,A1
2145 clr.l D0
2146 move 8(A0,A1.l),D0
2147 move.l D0,LTMP(A6)
[4f508e6]2148
2149| }
2150
2151
2152 .page
2153
2154| ltmp = (ltmp | pt->ipvmlt) >> 15;
2155
[f40a309]2156F03L137: move.l PT(A6),A0
2157 move.w 4(A0),D0
2158 move.w LTMP+2(A6),D1
2159 muls D1,D0
2160 move.l #15,D1
2161 asr.l D1,D0
2162 move.l D0,LTMP(A6)
[4f508e6]2163
2164| ltmp += (long)pt->ipval;
2165
[f40a309]2166 move.l PT(A6),A0
2167 move 2(A0),D0
2168 ext.l D0
2169 add.l D0,LTMP(A6)
[4f508e6]2170
2171| if (ltmp GT (long)VALMAX)
2172| ltmp = (long)VALMAX;
2173
[f40a309]2174 cmp.l #VALMAX,LTMP(A6)
2175 ble F03L146
[4f508e6]2176
[f40a309]2177 move.l #VALMAX,LTMP(A6)
2178 bra F03L147
[4f508e6]2179
2180| else if (ltmp LT (long)VALMIN)
2181| ltmp = (long)VALMIN;
2182
[f40a309]2183F03L146: cmp.l #VALMIN,LTMP(A6)
2184 bge F03L147
[4f508e6]2185
[f40a309]2186 move.l #VALMIN,LTMP(A6)
[4f508e6]2187
2188| tfpval = (short)ltmp;
2189
[f40a309]2190F03L147: move.w LTMP+2(A6),TFPVAL(A6)
2191 bra F03L149
[4f508e6]2192
2193| } else {
2194
2195| tfpval = pt->ipval;
2196
[f40a309]2197F03L136: move.l PT(A6),A0
2198 move 2(A0),TFPVAL(A6)
[4f508e6]2199
2200| }
2201
2202 .page
2203
2204| fpmant = (((long)pt->iptom & 0x0000FFF0L)
2205| | ((long)timemlt & 0x0000FFFFL)) >> 15;
2206
[f40a309]2207F03L149: move.l PT(A6),A0
2208 move.w (A0),D0
2209 move.w D0,D2
[4f508e6]2210 andi.w #0xFFF0,D0
[f40a309]2211 move.w _timemlt,D1
2212 muls D1,D0
2213 move.l #15,D1
2214 asr.l D1,D0
2215 move D0,R_FPMANT
[4f508e6]2216
2217| fpexp = expbit[pt->iptim & 0x000F];
2218
2219 and #0x000F,D2
[f40a309]2220 move D2,A0
2221 add.l A0,A0
2222 add.l #_expbit,A0
2223 move (A0),R_FPEXP
[4f508e6]2224
[f40a309]2225 .page
[4f508e6]2226
2227| fp->idfpch = ip->idhos4v;
2228
[f40a309]2229F03L157: move.l IP(A6),A0
2230 move.w 84(A0),(A_FP)
[4f508e6]2231
2232| fpval = addpch(tfpval, fp->idfpch);
2233
[f40a309]2234 move.w TFPVAL(A6),D1
2235 ext.l D1
2236 asr.l #5,D1
2237 sub.l #500,D1
2238 asl.l #LSPCH,D1
2239 move.w (A_FP),D0
2240 ext.l D0
2241 add.l D1,D0
2242 cmp.l #PITCHMAX,D0
2243 ble F03L157A
[4f508e6]2244
[f40a309]2245 move.l #PITCHMAX,D0
[4f508e6]2246
[f40a309]2247F03L157A: move D0,R_FPVAL
[4f508e6]2248
[f40a309]2249 .page
[4f508e6]2250
[f40a309]2251 move.b 5(A_FP),D0
2252 ext.w D0
2253 sub.w #1,D0
2254 movea.l PT(A6),A0
[4f508e6]2255
2256| oldi = setipl(FPU_DI);
2257
[f40a309]2258 move sr,OLDI(A6)
2259 move #FPU_DI,sr
[4f508e6]2260
[f40a309]2261F03L168: clr.b 10(A0)
2262 add.l #12,a0
2263 dbra D0,F03L168
[4f508e6]2264
[f40a309]2265 .page
[4f508e6]2266
2267| fp->idftmd ^= I_NVBITS;
2268
[f40a309]2269F03L165: eor.b #24,7(A_FP)
[4f508e6]2270
2271| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
2272
[f40a309]2273 move.b 7(A_FP),R_FPCTL
2274 and #28,R_FPCTL
2275 or #3,R_FPCTL
[4f508e6]2276
2277| fp->idfcpt = fp->idfpt1;
2278
[f40a309]2279 move.b 6(A_FP),8(A_FP)
[4f508e6]2280
2281| fp->idftmd |= I_ACTIVE;
2282
[f40a309]2283 or.b #2,7(A_FP)
[4f508e6]2284
2285| fp->idftrf = trg;
2286
[f40a309]2287 move TRG(A6),10(A_FP)
[4f508e6]2288
2289| |(fpu + (long)FPU_TCV1) = srcval;
2290
2291 move SRCVAL(A6),0x8(A_FPU)
2292
2293| ++octype;
2294
[f40a309]2295 add #1,OCTYPE(A6)
[4f508e6]2296
2297| |(fpu + (long)FPU_TSF1) = mltval;
2298
2299 move MLTVAL(A6),0xA(A_FPU)
2300
2301| ++octype;
2302
[f40a309]2303 add #1,OCTYPE(A6)
[4f508e6]2304
2305| |(fpu + (long)FPU_TMNT) = fpmant;
2306
2307 move R_FPMANT,0x14(A_FPU)
2308
2309| ++octype;
2310
[f40a309]2311 add #1,OCTYPE(A6)
[4f508e6]2312
2313| |(fpu + (long)FPU_TEXP) = fpexp;
2314
2315 move R_FPEXP,0x16(A_FPU)
2316
2317| ++octype;
2318
2319 add #1,OCTYPE(A6)
2320
[f40a309]2321 .page
[4f508e6]2322
2323| if (fp->idftmd & I_VNSUBN)
2324
[f40a309]2325 btst #3,7(A_FP)
2326 beq F03L169
[4f508e6]2327
2328| |(fpu + (long)FPU_TNV1) = fpval;
2329
2330 move R_FPVAL,0x1C(A_FPU)
[f40a309]2331 bra F03L170
[4f508e6]2332
2333| else
2334| |(fpu + (long)FPU_TNV0) = fpval;
2335
[f40a309]2336F03L169: move R_FPVAL,2(A_FPU)
[4f508e6]2337
2338| ++octype;
2339
[f40a309]2340F03L170: add #1,OCTYPE(A6)
[4f508e6]2341
2342| |(fpu + (long)FPU_TCTL) = fpctl;
2343
[f40a309]2344 move R_FPCTL,(A_FPU)
[4f508e6]2345
2346| setipl(oldi);
2347
[f40a309]2348 move OLDI(A6),sr
[4f508e6]2349
2350 .page
2351| ------------------------------------------------------------------------------
2352| Start function 4 -- Filtr
2353| ------------------------------------------------------------------------------
2354
2355| if (ip->idhfnc[4].idftmd & I_TM_KEY) {
2356
[f40a309]2357FN04: move.l IP(A6),A0
2358 move.b 141(A0),D0
2359 move.w TAG(A6),D1
2360 eor.w D1,D0
2361 btst #0,D0
2362 bne FN04A
[4f508e6]2363
[f40a309]2364 jmp FN05
[4f508e6]2365
2366| vp = (vce << 4) + 10;
2367
[f40a309]2368FN04A: move VCE(A6),D0
2369 asl #4,D0
2370 add.w #10,D0
2371 move D0,VP(A6)
[4f508e6]2372
2373| fpu = io_fpu + FPU_OFNC + (vp << 4);
2374
[f40a309]2375 asl #5,D0
2376 ext.l D0
2377 move.l D0,A_FPU
[4f508e6]2378 add.l #_io_fpu+0x4000,A_FPU
2379
2380| fp = &ip->idhfnc[4];
2381
[f40a309]2382 move.l #48,A_FP
2383 add.l IP(A6),A_FP
2384 add.l #86,A_FP
[4f508e6]2385
[f40a309]2386 .page
[4f508e6]2387
2388| Added code:
2389
2390| output resonance via table lookup with FPU interrupts off
2391
[f40a309]2392 lea _rsntab,A0
2393 clr.w D0
2394 move.b 9(A_FP),D0
2395 add.w D0,D0
2396 move.w 0(A0,D0.W),D1
2397 move.w VCE(A6),D0
2398 asl.w #4,d0
2399 add.w #6,d0
2400 asl.w #5,D0
2401 ext.l D0
2402 move.l D0,A0
[4f508e6]2403 add.l #_io_fpu+0x4000,A0
[f40a309]2404 move.w sr,OLDI(A6)
2405 move.w #FPU_DI,sr
2406 move.w d1,2(A0)
2407 add.w #1,OCTYPE(A6)
[4f508e6]2408 move.w d1,0x1C(A0)
[f40a309]2409 add.w #1,OCTYPE(A6)
[4f508e6]2410 move.w #0x0015,(A0)
[f40a309]2411 move.w OLDI(A6),sr
[4f508e6]2412
2413| pt = &ip->idhpnt[fp->idfpt1];
2414
[f40a309]2415 clr.l D0
2416 move.b 6(A_FP),D0
2417 lsl.l #2,D0
2418 move.l D0,D1
2419 add.l D0,D0
2420 add.l D1,D0
2421 add.l IP(A6),D0
2422 add.l #242,D0
2423 move.l D0,PT(A6)
[4f508e6]2424
[f40a309]2425 .page
[4f508e6]2426
2427| srcnum = group | fp->idfsrc;
2428
[f40a309]2429 move.w GROUP(A6),D0
2430 ext.l D0
2431 clr.l D1
2432 move.b 4(A_FP),D1
2433 or D1,D0
2434 move D0,SRCNUM(A6)
[4f508e6]2435
2436| vep = &valents[srcnum];
2437
[f40a309]2438 add.l D0,D0
2439 move.l D0,D1
2440 lsl.l #2,D0
2441 add.l D1,D0
2442 add.l #_valents,D0
2443 move.l D0,VEP(A6)
[4f508e6]2444
2445| smp = vpsms[vp];
2446
[f40a309]2447 move VP(A6),A0
2448 add.l A0,A0
2449 add.l A0,A0
2450 add.l #_vpsms,A0
2451 move.l (A0),A_SMP
[4f508e6]2452
2453| if (srcnum NE smp->sm) {
2454
[f40a309]2455 clr D0
2456 move 10(A_SMP),D0
2457 cmp SRCNUM(A6),D0
2458 beq F04L113
[4f508e6]2459
2460| (smp->prv)->nxt = smp->nxt;
2461
[f40a309]2462 move.l 4(A_SMP),A0
2463 move.l (A_SMP),(A0)
[4f508e6]2464
2465| (smp->nxt)->prv = smp->prv;
2466
[f40a309]2467 move.l (A_SMP),A0
2468 move.l 4(A_SMP),4(A0)
[4f508e6]2469
2470| smp->prv = (struct sment |)vep;
2471
[f40a309]2472 move.l VEP(A6),4(A_SMP)
[4f508e6]2473
2474| smp->nxt = vep->nxt;
2475
[f40a309]2476 move.l VEP(A6),A0
2477 move.l (A0),(A_SMP)
[4f508e6]2478
2479| (vep->nxt)->prv = smp;
2480
[f40a309]2481 move.l VEP(A6),A0
2482 move.l (A0),A0
2483 move.l A_SMP,4(A0)
[4f508e6]2484
2485| vep->nxt = smp;
2486
[f40a309]2487 move.l VEP(A6),A0
2488 move.l A_SMP,(A0)
[4f508e6]2489
2490| smp->sm = srcnum;
2491
[f40a309]2492 move SRCNUM(A6),10(A_SMP)
[4f508e6]2493
2494| }
2495
2496| mltval = fp->idfmlt;
2497
[f40a309]2498F04L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]2499
[f40a309]2500 .page
[4f508e6]2501
2502| switch (fp->idfsrc) {
2503
[f40a309]2504 move.b 4(A_FP),D0
2505 ext.w d0
2506 cmp #10,D0
2507 bhi F04L122
[4f508e6]2508
[f40a309]2509 asl #2,D0
2510 lea F04L123,A0
2511 movea.l 0(A0,D0.W),A0
2512 jmp (A0)
[4f508e6]2513
2514| case SM_NONE:
2515| mltval = 0;
2516
[f40a309]2517F04L116: clr MLTVAL(A6)
[4f508e6]2518
2519| tsrcval = 0;
2520
[f40a309]2521 clr TSRCVAL(A6)
[4f508e6]2522
2523| break;
2524
[f40a309]2525 bra F04L114
[4f508e6]2526
2527| case SM_RAND:
2528| tsrcval = xgetran(mltval);
2529
[f40a309]2530F04L117: move MLTVAL(A6),(sp)
2531 jsr _xgetran
2532 move D0,TSRCVAL(A6)
[4f508e6]2533
2534| break;
2535
[f40a309]2536 bra F04L114
[4f508e6]2537
2538| case SM_PTCH:
2539| tsrcval = pch;
2540
[f40a309]2541F04L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]2542
2543| break;
2544
[f40a309]2545 bra F04L114
[4f508e6]2546
[f40a309]2547 .page
[4f508e6]2548
2549| case SM_FREQ:
2550| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
2551
[f40a309]2552F04L119: move PCH(A6),D0
2553 asr #7,D0
2554 and #255,D0
2555 move D0,A0
2556 add.l A0,A0
2557 add.l #_ptoftab,A0
2558 move (A0),TSRCVAL(A6)
[4f508e6]2559
2560| break;
2561
[f40a309]2562 bra F04L114
[4f508e6]2563
2564| case SM_KVEL:
2565| tsrcval = veltab[trg];
2566
[f40a309]2567F04L120: move TRG(A6),A0
2568 add.l A0,A0
2569 add.l #_veltab,A0
2570 move (A0),TSRCVAL(A6)
[4f508e6]2571
2572| break;
2573
[f40a309]2574 bra F04L114
[4f508e6]2575
2576| case SM_KPRS:
2577| tsrcval = prstab[trg];
2578
[f40a309]2579F04L121: move TRG(A6),A0
2580 add.l A0,A0
2581 add.l #_prstab,A0
2582 move (A0),TSRCVAL(A6)
[4f508e6]2583
2584| break;
2585
[f40a309]2586 bra F04L114
[4f508e6]2587
2588| default:
2589| tsrcval = vep->val;
2590
[f40a309]2591F04L122: move.l VEP(A6),A0
2592 move 8(A0),TSRCVAL(A6)
[4f508e6]2593
2594| }
2595
[f40a309]2596 .page
[4f508e6]2597
2598| ltmp = ((long)tsrcval >> 1) + ((long)tsrcval >> 2);
2599
[f40a309]2600F04L114: move TSRCVAL(A6),D0
2601 ext.l D0
2602 asr.l #1,D0
2603 move TSRCVAL(A6),D1
2604 ext.l D1
2605 asr.l #2,D1
2606 add.l D1,D0
2607 move.l D0,LTMP(A6)
[4f508e6]2608
2609| if (ltmp GT (long)VALMAX)
2610| ltmp = (long)VALMAX;
2611
[f40a309]2612 cmp.l #VALMAX,LTMP(A6)
2613 ble F04L131
[4f508e6]2614
[f40a309]2615 move.l #VALMAX,LTMP(A6)
2616 bra F04L132
[4f508e6]2617
2618| else if (ltmp LT (long)VALMIN)
2619| ltmp = (long)VALMIN;
2620
[f40a309]2621F04L131: cmp.l #VALMIN,LTMP(A6)
2622 bge F04L132
[4f508e6]2623
[f40a309]2624 move.l #VALMIN,LTMP(A6)
[4f508e6]2625
2626| srcval = (short)ltmp;
2627
[f40a309]2628F04L132: move.l LTMP(A6),D0
2629 move D0,SRCVAL(A6)
[4f508e6]2630
[f40a309]2631 .page
[4f508e6]2632
2633| if (pt->ipvsrc) {
2634
[f40a309]2635F04L124: move.l PT(A6),A0
2636 tst.b 6(A0)
2637 beq F04L136
[4f508e6]2638
2639| switch (pt->ipvsrc) {
2640
[f40a309]2641 move.l PT(A6),A0
2642 move.b 6(A0),D0
2643 ext.w D0
2644 sub #1,D0
2645 cmp #9,D0
2646 bhi F04L144
[4f508e6]2647
[f40a309]2648 asl #2,D0
2649 lea F04L145,A0
2650 move.l 0(A0,D0.W),A0
2651 jmp (A0)
[4f508e6]2652
2653| case SM_RAND:
2654| ltmp = xgetran(pt_>ipvmlt);
2655
[f40a309]2656F04L139: move.l PT(A6),A0
2657 move 4(A0),(sp)
2658 jsr _xgetran
2659 ext.l D0
2660 move.l D0,LTMP(A6)
[4f508e6]2661
2662| break;
2663
[f40a309]2664 bra F04L137
[4f508e6]2665
2666| case SM_PTCH:
2667| ltmp = pch;
2668
[f40a309]2669F04L140: move PCH(A6),A0
2670 move.l A0,LTMP(A6)
[4f508e6]2671
2672| break;
2673
[f40a309]2674 bra F04L137
[4f508e6]2675
[f40a309]2676 .page
[4f508e6]2677
2678| case SM_FREQ:
2679| ltmp = ptoftab[(pch >> 7) & 0x00FF];
2680
[f40a309]2681F04L141: move PCH(A6),D0
2682 asr #7,D0
2683 and #255,D0
2684 move D0,A0
2685 add.l A0,A0
2686 move.l #_ptoftab,A1
2687 move 0(A0,A1.l),D0
2688 ext.l D0
2689 move.l D0,LTMP(A6)
[4f508e6]2690
2691| break;
2692
[f40a309]2693 bra F04L137
[4f508e6]2694
2695| case SM_KVEL:
2696| ltmp = veltab[trg];
2697
[f40a309]2698F04L142: move TRG(A6),A0
2699 add.l A0,A0
2700 move.l #_veltab,A1
2701 move 0(A0,A1.l),D0
2702 ext.l D0
2703 move.l D0,LTMP(A6)
[4f508e6]2704
2705| break;
2706
[f40a309]2707 bra F04L137
[4f508e6]2708
[f40a309]2709 .page
[4f508e6]2710
2711| case SM_KPRS:
2712| ltmp = prstab[trg];
2713
[f40a309]2714F04L143: move TRG(A6),A0
2715 add.l A0,A0
2716 move.l #_prstab,A1
2717 move 0(A0,A1.l),D0
2718 ext.l D0
2719 move.l D0,LTMP(A6)
[4f508e6]2720
2721| break;
2722
[f40a309]2723 bra F04L137
[4f508e6]2724
[f40a309]2725 .page
[4f508e6]2726
2727| default:
2728| ltmp = valents[group | pt->ipvsrc].val;
2729
[f40a309]2730F04L144: move.l PT(A6),A0
2731 clr.l D0
2732 move.b 6(A0),D0
2733 or.w GROUP(A6),D0
2734 add.l D0,D0
2735 move.l D0,D1
2736 lsl.l #2,D0
2737 add.l D1,D0
2738 move.l D0,A0
2739 move.l #_valents,A1
2740 clr.l D0
2741 move 8(A0,A1.l),D0
2742 move.l D0,LTMP(A6)
[4f508e6]2743
2744| }
2745
2746
2747 .page
2748
2749| ltmp = (ltmp | pt->ipvmlt) >> 15;
2750
[f40a309]2751F04L137: move.l PT(A6),A0
2752 move.w 4(A0),D0
2753 move.w LTMP+2(A6),D1
2754 muls D1,D0
2755 move.l #15,D1
2756 asr.l D1,D0
2757 move.l D0,LTMP(A6)
[4f508e6]2758
2759| ltmp += (long)pt->ipval;
2760
[f40a309]2761 move.l PT(A6),A0
2762 move 2(A0),D0
2763 ext.l D0
2764 add.l D0,LTMP(A6)
[4f508e6]2765
2766| if (ltmp GT (long)VALMAX)
2767| ltmp = (long)VALMAX;
2768
[f40a309]2769 cmp.l #VALMAX,LTMP(A6)
2770 ble F04L146
[4f508e6]2771
[f40a309]2772 move.l #VALMAX,LTMP(A6)
2773 bra F04L147
[4f508e6]2774
2775| else if (ltmp LT (long)VALMIN)
2776| ltmp = (long)VALMIN;
2777
[f40a309]2778F04L146: cmp.l #VALMIN,LTMP(A6)
2779 bge F04L147
[4f508e6]2780
[f40a309]2781 move.l #VALMIN,LTMP(A6)
[4f508e6]2782
2783| tfpval = (short)ltmp;
2784
[f40a309]2785F04L147: move.w LTMP+2(A6),TFPVAL(A6)
2786 bra F04L149
[4f508e6]2787
2788| } else {
2789
2790| tfpval = pt->ipval;
2791
[f40a309]2792F04L136: move.l PT(A6),A0
2793 move 2(A0),TFPVAL(A6)
[4f508e6]2794
2795| }
2796
2797 .page
2798
2799| fpmant = (((long)pt->iptom & 0x0000FFF0L)
2800| | ((long)timemlt & 0x0000FFFFL)) >> 15;
2801
[f40a309]2802F04L149: move.l PT(A6),A0
2803 move.w (A0),D0
2804 move.w D0,D2
[4f508e6]2805 andi.w #0xFFF0,D0
[f40a309]2806 move.w _timemlt,D1
2807 muls D1,D0
2808 move.l #15,D1
2809 asr.l D1,D0
2810 move D0,R_FPMANT
[4f508e6]2811
2812| fpexp = expbit[pt->iptim & 0x000F];
2813
2814 and #0x000F,D2
[f40a309]2815 move D2,A0
2816 add.l A0,A0
2817 add.l #_expbit,A0
2818 move (A0),R_FPEXP
[4f508e6]2819
[f40a309]2820 .page
[4f508e6]2821
2822| fp->idfpch = pch;
2823
[f40a309]2824F04L158: move PCH(A6),(A_FP)
[4f508e6]2825
2826| ltmp = ((long)tfpval >> 1) + ((longtfpval >>2)
2827| + (long)fp->idfpch;
2828
[f40a309]2829 move TFPVAL(A6),D0
2830 ext.l D0
2831 asr.l #1,D0
2832 move TFPVAL(A6),D1
2833 ext.l D1
2834 asr.l #2,D1
2835 add.l D1,D0
2836 move (A_FP),D1
2837 ext.l D1
2838 add.l D1,D0
2839 move.l D0,LTMP(A6)
[4f508e6]2840
2841| if (ltmp GT (long)VALMAX)
2842| ltmp = (long)VALMAX;
2843
[f40a309]2844 cmp.l #VALMAX,LTMP(A6)
2845 ble F04L159
[4f508e6]2846
[f40a309]2847 move.l #VALMAX,LTMP(A6)
2848 bra F04L160
[4f508e6]2849
2850| else if (ltmp LT (long)VALMIN)
2851| ltmp = (long)VALMIN;
2852
[f40a309]2853F04L159: cmp.l #VALMIN,LTMP(A6)
2854 bge F04L160
[4f508e6]2855
[f40a309]2856 move.l #VALMIN,LTMP(A6)
[4f508e6]2857
2858| fpval = (short)ltmp;
2859
[f40a309]2860F04L160: move.l LTMP(A6),D0
2861 move D0,R_FPVAL
[4f508e6]2862
[f40a309]2863 .page
[4f508e6]2864
[f40a309]2865 move.b 5(A_FP),D0
2866 ext.w D0
2867 sub.w #1,D0
2868 movea.l PT(A6),A0
[4f508e6]2869
2870| oldi = setipl(FPU_DI);
2871
[f40a309]2872 move sr,OLDI(A6)
2873 move #FPU_DI,sr
[4f508e6]2874
[f40a309]2875F04L168: clr.b 10(A0)
2876 add.l #12,a0
2877 dbra D0,F04L168
[4f508e6]2878
[f40a309]2879 .page
[4f508e6]2880
2881| fp->idftmd ^= I_NVBITS;
2882
[f40a309]2883F04L165: eor.b #24,7(A_FP)
[4f508e6]2884
2885| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
2886
[f40a309]2887 move.b 7(A_FP),R_FPCTL
2888 and #28,R_FPCTL
2889 or #3,R_FPCTL
[4f508e6]2890
2891| fp->idfcpt = fp->idfpt1;
2892
[f40a309]2893 move.b 6(A_FP),8(A_FP)
[4f508e6]2894
2895| fp->idftmd |= I_ACTIVE;
2896
[f40a309]2897 or.b #2,7(A_FP)
[4f508e6]2898
2899| fp->idftrf = trg;
2900
[f40a309]2901 move TRG(A6),10(A_FP)
[4f508e6]2902
2903| |(fpu + (long)FPU_TCV1) = srcval;
2904
2905 move SRCVAL(A6),0x8(A_FPU)
2906
2907| ++octype;
2908
[f40a309]2909 add #1,OCTYPE(A6)
[4f508e6]2910
2911| |(fpu + (long)FPU_TSF1) = mltval;
2912
2913 move MLTVAL(A6),0xA(A_FPU)
2914
2915| ++octype;
2916
[f40a309]2917 add #1,OCTYPE(A6)
[4f508e6]2918
2919| |(fpu + (long)FPU_TMNT) = fpmant;
2920
2921 move R_FPMANT,0x14(A_FPU)
2922
2923| ++octype;
2924
[f40a309]2925 add #1,OCTYPE(A6)
[4f508e6]2926
2927| |(fpu + (long)FPU_TEXP) = fpexp;
2928
2929 move R_FPEXP,0x16(A_FPU)
2930
2931| ++octype;
2932
[f40a309]2933 add #1,OCTYPE(A6)
[4f508e6]2934
[f40a309]2935 .page
[4f508e6]2936
2937| if (fp->idftmd & I_VNSUBN)
2938
[f40a309]2939 btst #3,7(A_FP)
2940 beq F04L169
[4f508e6]2941
2942| |(fpu + (long)FPU_TNV1) = fpval;
2943
2944 move R_FPVAL,0x1C(A_FPU)
[f40a309]2945 bra F04L170
[4f508e6]2946
2947| else
2948| |(fpu + (long)FPU_TNV0) = fpval;
2949
[f40a309]2950F04L169: move R_FPVAL,2(A_FPU)
[4f508e6]2951
2952| ++octype;
2953
[f40a309]2954F04L170: add #1,OCTYPE(A6)
[4f508e6]2955
2956| |(fpu + (long)FPU_TCTL) = fpctl;
2957
[f40a309]2958 move R_FPCTL,(A_FPU)
[4f508e6]2959
2960| setipl(oldi);
2961
[f40a309]2962 move OLDI(A6),sr
[4f508e6]2963
2964 .page
2965| ------------------------------------------------------------------------------
2966| Start function 5 -- Loctn
2967| ------------------------------------------------------------------------------
2968
2969| if (ip->idhfnc[5].idftmd & I_TM_KEY) {
2970
[f40a309]2971FN05: move.l IP(A6),A0
2972 move.b 153(A0),D0
2973 move.w TAG(A6),D1
2974 eor.w D1,D0
2975 btst #0,D0
2976 bne FN05A
[4f508e6]2977
[f40a309]2978 jmp FN06
[4f508e6]2979
2980| vp = (vce << 4) + 4;
2981
[f40a309]2982FN05A: move VCE(A6),D0
2983 asl #4,D0
2984 add.w #4,D0
2985 move D0,VP(A6)
[4f508e6]2986
2987| fpu = io_fpu + FPU_OFNC + (vp << 4);
2988
[f40a309]2989 asl #5,D0
2990 ext.l D0
2991 move.l D0,A_FPU
[4f508e6]2992 add.l #_io_fpu+0x4000,A_FPU
2993
2994| fp = &ip->idhfnc[5];
2995
[f40a309]2996 move.l #60,A_FP
2997 add.l IP(A6),A_FP
2998 add.l #86,A_FP
[4f508e6]2999
3000| pt = &ip->idhpnt[fp->idfpt1];
3001
[f40a309]3002 clr.l D0
3003 move.b 6(A_FP),D0
3004 lsl.l #2,D0
3005 move.l D0,D1
3006 add.l D0,D0
3007 add.l D1,D0
3008 add.l IP(A6),D0
3009 add.l #242,D0
3010 move.l D0,PT(A6)
[4f508e6]3011
[f40a309]3012 .page
[4f508e6]3013
3014| srcnum = group | fp->idfsrc;
3015
[f40a309]3016 move.w GROUP(A6),D0
3017 ext.l D0
3018 clr.l D1
3019 move.b 4(A_FP),D1
3020 or D1,D0
3021 move D0,SRCNUM(A6)
[4f508e6]3022
3023| vep = &valents[srcnum];
3024
[f40a309]3025 add.l D0,D0
3026 move.l D0,D1
3027 lsl.l #2,D0
3028 add.l D1,D0
3029 add.l #_valents,D0
3030 move.l D0,VEP(A6)
[4f508e6]3031
3032| smp = vpsms[vp];
3033
[f40a309]3034 move VP(A6),A0
3035 add.l A0,A0
3036 add.l A0,A0
3037 add.l #_vpsms,A0
3038 move.l (A0),A_SMP
[4f508e6]3039
3040| if (srcnum NE smp->sm) {
3041
[f40a309]3042 clr D0
3043 move 10(A_SMP),D0
3044 cmp SRCNUM(A6),D0
3045 beq F05L113
[4f508e6]3046
3047| (smp->prv)->nxt = smp->nxt;
3048
[f40a309]3049 move.l 4(A_SMP),A0
3050 move.l (A_SMP),(A0)
[4f508e6]3051
3052| (smp->nxt)->prv = smp->prv;
3053
[f40a309]3054 move.l (A_SMP),A0
3055 move.l 4(A_SMP),4(A0)
[4f508e6]3056
3057| smp->prv = (struct sment |)vep;
3058
[f40a309]3059 move.l VEP(A6),4(A_SMP)
[4f508e6]3060
3061| smp->nxt = vep->nxt;
3062
[f40a309]3063 move.l VEP(A6),A0
3064 move.l (A0),(A_SMP)
[4f508e6]3065
3066| (vep->nxt)->prv = smp;
3067
[f40a309]3068 move.l VEP(A6),A0
3069 move.l (A0),A0
3070 move.l A_SMP,4(A0)
[4f508e6]3071
3072| vep->nxt = smp;
3073
[f40a309]3074 move.l VEP(A6),A0
3075 move.l A_SMP,(A0)
[4f508e6]3076
3077| smp->sm = srcnum;
3078
3079 move SRCNUM(A6),10(A_SMP)
3080
3081| }
3082
3083| mltval = fp->idfmlt;
3084
[f40a309]3085F05L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]3086
[f40a309]3087 .page
[4f508e6]3088
3089| switch (fp->idfsrc) {
3090
[f40a309]3091 move.b 4(A_FP),D0
3092 ext.w d0
3093 cmp #10,D0
3094 bhi F05L122
[4f508e6]3095
[f40a309]3096 asl #2,D0
3097 lea F05L123,A0
3098 movea.l 0(A0,D0.W),A0
3099 jmp (A0)
[4f508e6]3100
3101| case SM_NONE:
3102| mltval = 0;
3103
[f40a309]3104F05L116: clr MLTVAL(A6)
[4f508e6]3105
3106| tsrcval = 0;
3107
[f40a309]3108 clr TSRCVAL(A6)
[4f508e6]3109
3110| break;
3111
[f40a309]3112 bra F05L114
[4f508e6]3113
3114| case SM_RAND:
3115| tsrcval = xgetran(mltval);
3116
[f40a309]3117F05L117: move MLTVAL(A6),(sp)
3118 jsr _xgetran
3119 move D0,TSRCVAL(A6)
[4f508e6]3120
3121| break;
3122
[f40a309]3123 bra F05L114
[4f508e6]3124
3125| case SM_PTCH:
3126| tsrcval = pch;
3127
[f40a309]3128F05L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]3129
3130| break;
3131
[f40a309]3132 bra F05L114
[4f508e6]3133
[f40a309]3134 .page
[4f508e6]3135
3136| case SM_FREQ:
3137| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
3138
[f40a309]3139F05L119: move PCH(A6),D0
3140 asr #7,D0
3141 and #255,D0
3142 move D0,A0
3143 add.l A0,A0
3144 add.l #_ptoftab,A0
3145 move (A0),TSRCVAL(A6)
[4f508e6]3146
3147| break;
3148
[f40a309]3149 bra F05L114
[4f508e6]3150
3151| case SM_KVEL:
3152| tsrcval = veltab[trg];
3153
[f40a309]3154F05L120: move TRG(A6),A0
3155 add.l A0,A0
3156 add.l #_veltab,A0
3157 move (A0),TSRCVAL(A6)
[4f508e6]3158
3159| break;
3160
[f40a309]3161 bra F05L114
[4f508e6]3162
3163| case SM_KPRS:
3164| tsrcval = prstab[trg];
3165
[f40a309]3166F05L121: move TRG(A6),A0
3167 add.l A0,A0
3168 add.l #_prstab,A0
3169 move (A0),TSRCVAL(A6)
[4f508e6]3170
3171| break;
3172
[f40a309]3173 bra F05L114
[4f508e6]3174
3175| default:
3176| tsrcval = vep->val;
3177
[f40a309]3178F05L122: move.l VEP(A6),A0
3179 move 8(A0),TSRCVAL(A6)
[4f508e6]3180
3181| }
3182
[f40a309]3183 .page
[4f508e6]3184
3185| srcval = tsrcval;
3186
[f40a309]3187F05L114: move TSRCVAL(A6),SRCVAL(A6)
[4f508e6]3188
[f40a309]3189 .page
[4f508e6]3190
3191| if (pt->ipvsrc) {
3192
[f40a309]3193F05L124: move.l PT(A6),A0
3194 tst.b 6(A0)
3195 beq F05L136
[4f508e6]3196
3197| switch (pt->ipvsrc) {
3198
[f40a309]3199 move.l PT(A6),A0
3200 move.b 6(A0),D0
3201 ext.w D0
3202 sub #1,D0
3203 cmp #9,D0
3204 bhi F05L144
[4f508e6]3205
[f40a309]3206 asl #2,D0
3207 lea F05L145,A0
3208 move.l 0(A0,D0.W),A0
3209 jmp (A0)
[4f508e6]3210
3211| case SM_RAND:
3212| ltmp = xgetran(pt_>ipvmlt);
3213
[f40a309]3214F05L139: move.l PT(A6),A0
3215 move 4(A0),(sp)
3216 jsr _xgetran
3217 ext.l D0
3218 move.l D0,LTMP(A6)
[4f508e6]3219
3220| break;
3221
[f40a309]3222 bra F05L137
[4f508e6]3223
3224| case SM_PTCH:
3225| ltmp = pch;
3226
[f40a309]3227F05L140: move PCH(A6),A0
3228 move.l A0,LTMP(A6)
[4f508e6]3229
3230| break;
3231
[f40a309]3232 bra F05L137
[4f508e6]3233
[f40a309]3234 .page
[4f508e6]3235
3236| case SM_FREQ:
3237| ltmp = ptoftab[(pch >> 7) & 0x00FF];
3238
[f40a309]3239F05L141: move PCH(A6),D0
3240 asr #7,D0
3241 and #255,D0
3242 move D0,A0
3243 add.l A0,A0
3244 move.l #_ptoftab,A1
3245 move 0(A0,A1.l),D0
3246 ext.l D0
3247 move.l D0,LTMP(A6)
[4f508e6]3248
3249| break;
3250
[f40a309]3251 bra F05L137
[4f508e6]3252
3253| case SM_KVEL:
3254| ltmp = veltab[trg];
3255
[f40a309]3256F05L142: move TRG(A6),A0
3257 add.l A0,A0
3258 move.l #_veltab,A1
3259 move 0(A0,A1.l),D0
3260 ext.l D0
3261 move.l D0,LTMP(A6)
[4f508e6]3262
3263| break;
3264
[f40a309]3265 bra F05L137
[4f508e6]3266
[f40a309]3267 .page
[4f508e6]3268
3269| case SM_KPRS:
3270| ltmp = prstab[trg];
3271
[f40a309]3272F05L143: move TRG(A6),A0
3273 add.l A0,A0
3274 move.l #_prstab,A1
3275 move 0(A0,A1.l),D0
3276 ext.l D0
3277 move.l D0,LTMP(A6)
[4f508e6]3278
3279| break;
3280
[f40a309]3281 bra F05L137
[4f508e6]3282
[f40a309]3283 .page
[4f508e6]3284
3285| default:
3286| ltmp = valents[group | pt->ipvsrc].val;
3287
[f40a309]3288F05L144: move.l PT(A6),A0
3289 clr.l D0
3290 move.b 6(A0),D0
3291 or.w GROUP(A6),D0
3292 add.l D0,D0
3293 move.l D0,D1
3294 lsl.l #2,D0
3295 add.l D1,D0
3296 move.l D0,A0
3297 move.l #_valents,A1
3298 clr.l D0
3299 move 8(A0,A1.l),D0
3300 move.l D0,LTMP(A6)
[4f508e6]3301
3302| }
3303
3304
3305 .page
3306
3307| ltmp = (ltmp | pt->ipvmlt) >> 15;
3308
[f40a309]3309F05L137: move.l PT(A6),A0
3310 move.w 4(A0),D0
3311 move.w LTMP+2(A6),D1
3312 muls D1,D0
3313 move.l #15,D1
3314 asr.l D1,D0
3315 move.l D0,LTMP(A6)
[4f508e6]3316
3317| ltmp += (long)pt->ipval;
3318
[f40a309]3319 move.l PT(A6),A0
3320 move 2(A0),D0
3321 ext.l D0
3322 add.l D0,LTMP(A6)
[4f508e6]3323
3324| if (ltmp GT (long)VALMAX)
3325| ltmp = (long)VALMAX;
3326
[f40a309]3327 cmp.l #VALMAX,LTMP(A6)
3328 ble F05L146
[4f508e6]3329
[f40a309]3330 move.l #VALMAX,LTMP(A6)
3331 bra F05L147
[4f508e6]3332
3333| else if (ltmp LT (long)VALMIN)
3334| ltmp = (long)VALMIN;
3335
[f40a309]3336F05L146: cmp.l #VALMIN,LTMP(A6)
3337 bge F05L147
[4f508e6]3338
[f40a309]3339 move.l #VALMIN,LTMP(A6)
[4f508e6]3340
3341| tfpval = (short)ltmp;
3342
[f40a309]3343F05L147: move.w LTMP+2(A6),TFPVAL(A6)
3344 bra F05L149
[4f508e6]3345
3346| } else {
3347
3348| tfpval = pt->ipval;
3349
[f40a309]3350F05L136: move.l PT(A6),A0
3351 move 2(A0),TFPVAL(A6)
[4f508e6]3352
3353| }
3354
3355 .page
3356
3357| fpmant = (((long)pt->iptom & 0x0000FFF0L)
3358| | ((long)timemlt & 0x0000FFFFL)) >> 15;
3359
[f40a309]3360F05L149: move.l PT(A6),A0
3361 move.w (A0),D0
3362 move.w D0,D2
[4f508e6]3363 andi.w #0xFFF0,D0
[f40a309]3364 move.w _timemlt,D1
3365 muls D1,D0
3366 move.l #15,D1
3367 asr.l D1,D0
3368 move D0,R_FPMANT
[4f508e6]3369
3370| fpexp = expbit[pt->iptim & 0x000F];
3371
3372 and #0x000F,D2
[f40a309]3373 move D2,A0
3374 add.l A0,A0
3375 add.l #_expbit,A0
3376 move (A0),R_FPEXP
[4f508e6]3377
[f40a309]3378 .page
[4f508e6]3379
3380| fp->idfpch = pch;
3381
[f40a309]3382F05L163: move PCH(A6),(A_FP)
[4f508e6]3383
3384| if (tfpval > VALMAX)
3385| tfpval = VALMAX;
3386| else if (tfpval < 0)
3387| tfpval = 0;
3388
[f40a309]3389 move.w TFPVAL(A6),D0
[4f508e6]3390 cmp.w #0x7D00,D0
[f40a309]3391 ble F05L163B
[4f508e6]3392
3393 move.w #0x7D00,D0
[f40a309]3394 bra F05L163A
[4f508e6]3395
[f40a309]3396F05L163B: tst.w D0
3397 bpl F05L163A
[4f508e6]3398
[f40a309]3399 clr.w D0
[4f508e6]3400
3401|#if LOC_EOR
3402| fpval = (tfpval << 1) ^ 0x8000;
3403|#endif
3404
[f40a309]3405 .ifne LOC_EOR
3406F05L163A: add.w D0,D0
[4f508e6]3407 eor.w #0x8000,D0
[f40a309]3408 .endc
[4f508e6]3409
3410|#if LOC_SUB
3411| fpval = ((tfpval >> 5) - 500) << 6;
3412|#endif
3413
[f40a309]3414 .ifne LOC_SUB
3415F05L163A: asr.w #5,D0
3416 sub.w #500,D0
3417 asl.w #6,D0
3418 .endc
[4f508e6]3419
[f40a309]3420 move.w D0,R_FPVAL
[4f508e6]3421
[f40a309]3422 .page
[4f508e6]3423
[f40a309]3424 move.b 5(A_FP),D0
3425 ext.w D0
3426 sub.w #1,D0
3427 movea.l PT(A6),A0
[4f508e6]3428
3429| oldi = setipl(FPU_DI);
3430
[f40a309]3431 move sr,OLDI(A6)
3432 move #FPU_DI,sr
[4f508e6]3433
[f40a309]3434F05L168: clr.b 10(A0)
3435 add.l #12,a0
3436 dbra D0,F05L168
[4f508e6]3437
[f40a309]3438 .page
[4f508e6]3439
3440| fp->idftmd ^= I_NVBITS;
3441
[f40a309]3442F05L165: eor.b #24,7(A_FP)
[4f508e6]3443
3444| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
3445
[f40a309]3446 move.b 7(A_FP),R_FPCTL
3447 and #28,R_FPCTL
3448 or #3,R_FPCTL
[4f508e6]3449
3450| fp->idfcpt = fp->idfpt1;
3451
[f40a309]3452 move.b 6(A_FP),8(A_FP)
[4f508e6]3453
3454| fp->idftmd |= I_ACTIVE;
3455
[f40a309]3456 or.b #2,7(A_FP)
[4f508e6]3457
3458| fp->idftrf = trg;
3459
[f40a309]3460 move TRG(A6),10(A_FP)
[4f508e6]3461
3462| |(fpu + (long)FPU_TCV1) = srcval;
3463
3464 move SRCVAL(A6),0x8(A_FPU)
3465
3466| ++octype;
3467
[f40a309]3468 add #1,OCTYPE(A6)
[4f508e6]3469
3470| |(fpu + (long)FPU_TSF1) = mltval;
3471
3472 move MLTVAL(A6),0xA(A_FPU)
3473
3474| ++octype;
3475
[f40a309]3476 add #1,OCTYPE(A6)
[4f508e6]3477
3478| |(fpu + (long)FPU_TMNT) = fpmant;
3479
3480 move R_FPMANT,0x14(A_FPU)
3481
3482| ++octype;
3483
[f40a309]3484 add #1,OCTYPE(A6)
[4f508e6]3485
3486| |(fpu + (long)FPU_TEXP) = fpexp;
3487
3488 move R_FPEXP,0x16(A_FPU)
3489
3490| ++octype;
3491
[f40a309]3492 add #1,OCTYPE(A6)
[4f508e6]3493
[f40a309]3494 .page
[4f508e6]3495
3496| if (fp->idftmd & I_VNSUBN)
3497
[f40a309]3498 btst #3,7(A_FP)
3499 beq F05L169
[4f508e6]3500
3501| |(fpu + (long)FPU_TNV1) = fpval;
3502
3503 move R_FPVAL,0x1C(A_FPU)
[f40a309]3504 bra F05L170
[4f508e6]3505
3506| else
3507| |(fpu + (long)FPU_TNV0) = fpval;
3508
[f40a309]3509F05L169: move R_FPVAL,2(A_FPU)
[4f508e6]3510
3511| ++octype;
3512
[f40a309]3513F05L170: add #1,OCTYPE(A6)
[4f508e6]3514
3515| |(fpu + (long)FPU_TCTL) = fpctl;
3516
[f40a309]3517 move R_FPCTL,(A_FPU)
[4f508e6]3518
3519| setipl(oldi);
3520
[f40a309]3521 move OLDI(A6),sr
[4f508e6]3522
3523 .page
3524| ------------------------------------------------------------------------------
3525| Start function 6 -- Ind 1
3526| ------------------------------------------------------------------------------
3527
3528| if (ip->idhfnc[2].idftmd & I_TM_KEY) {
3529
[f40a309]3530FN06: move.l IP(A6),A0
3531 move.b 165(A0),D0
3532 move.w TAG(A6),D1
3533 eor.w D1,D0
3534 btst #0,D0
3535 bne FN06A
[4f508e6]3536
[f40a309]3537 jmp FN07
[4f508e6]3538
3539| vp = (vce << 4) + 9;
3540
[f40a309]3541FN06A: move VCE(A6),D0
3542 asl #4,D0
3543 add.w #9,D0
3544 move D0,VP(A6)
[4f508e6]3545
3546| fpu = io_fpu + FPU_OFNC + (vp << 4);
3547
[f40a309]3548 asl #5,D0
3549 ext.l D0
3550 move.l D0,A_FPU
[4f508e6]3551 add.l #_io_fpu+0x4000,A_FPU
3552
3553| fp = &ip->idhfnc[6];
3554
[f40a309]3555 move.l #72,A_FP
3556 add.l IP(A6),A_FP
3557 add.l #86,A_FP
[4f508e6]3558
3559| pt = &ip->idhpnt[fp->idfpt1];
3560
[f40a309]3561 clr.l D0
3562 move.b 6(A_FP),D0
3563 lsl.l #2,D0
3564 move.l D0,D1
3565 add.l D0,D0
3566 add.l D1,D0
3567 add.l IP(A6),D0
3568 add.l #242,D0
3569 move.l D0,PT(A6)
[4f508e6]3570
[f40a309]3571 .page
[4f508e6]3572
3573| srcnum = group | fp->idfsrc;
3574
[f40a309]3575 move.w GROUP(A6),D0
3576 ext.l D0
3577 clr.l D1
3578 move.b 4(A_FP),D1
3579 or D1,D0
3580 move D0,SRCNUM(A6)
[4f508e6]3581
3582| vep = &valents[srcnum];
3583
[f40a309]3584 add.l D0,D0
3585 move.l D0,D1
3586 lsl.l #2,D0
3587 add.l D1,D0
3588 add.l #_valents,D0
3589 move.l D0,VEP(A6)
[4f508e6]3590
3591| smp = vpsms[vp];
3592
[f40a309]3593 move VP(A6),A0
3594 add.l A0,A0
3595 add.l A0,A0
3596 add.l #_vpsms,A0
3597 move.l (A0),A_SMP
[4f508e6]3598
3599| if (srcnum NE smp->sm) {
3600
[f40a309]3601 clr D0
3602 move 10(A_SMP),D0
3603 cmp SRCNUM(A6),D0
3604 beq F06L113
[4f508e6]3605
3606| (smp->prv)->nxt = smp->nxt;
3607
[f40a309]3608 move.l 4(A_SMP),A0
3609 move.l (A_SMP),(A0)
[4f508e6]3610
3611| (smp->nxt)->prv = smp->prv;
3612
[f40a309]3613 move.l (A_SMP),A0
3614 move.l 4(A_SMP),4(A0)
[4f508e6]3615
3616| smp->prv = (struct sment |)vep;
3617
[f40a309]3618 move.l VEP(A6),4(A_SMP)
[4f508e6]3619
3620| smp->nxt = vep->nxt;
3621
[f40a309]3622 move.l VEP(A6),A0
3623 move.l (A0),(A_SMP)
[4f508e6]3624
3625| (vep->nxt)->prv = smp;
3626
[f40a309]3627 move.l VEP(A6),A0
3628 move.l (A0),A0
3629 move.l A_SMP,4(A0)
[4f508e6]3630
3631| vep->nxt = smp;
3632
[f40a309]3633 move.l VEP(A6),A0
3634 move.l A_SMP,(A0)
[4f508e6]3635
3636| smp->sm = srcnum;
3637
[f40a309]3638 move SRCNUM(A6),10(A_SMP)
[4f508e6]3639
3640| }
3641
3642| mltval = fp->idfmlt;
3643
[f40a309]3644F06L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]3645
[f40a309]3646 .page
[4f508e6]3647
3648| switch (fp->idfsrc) {
3649
[f40a309]3650 move.b 4(A_FP),D0
3651 ext.w d0
3652 cmp #10,D0
3653 bhi F06L122
[4f508e6]3654
[f40a309]3655 asl #2,D0
3656 lea F06L123,A0
3657 movea.l 0(A0,D0.W),A0
3658 jmp (A0)
[4f508e6]3659
3660| case SM_NONE:
3661| mltval = 0;
3662
[f40a309]3663F06L116: clr MLTVAL(A6)
[4f508e6]3664
3665| tsrcval = 0;
3666
[f40a309]3667 clr TSRCVAL(A6)
[4f508e6]3668
3669| break;
3670
[f40a309]3671 bra F06L114
[4f508e6]3672
3673| case SM_RAND:
3674| tsrcval = xgetran(mltval);
3675
[f40a309]3676F06L117: move MLTVAL(A6),(sp)
3677 jsr _xgetran
3678 move D0,TSRCVAL(A6)
[4f508e6]3679
3680| break;
3681
[f40a309]3682 bra F06L114
[4f508e6]3683
3684| case SM_PTCH:
3685| tsrcval = pch;
3686
[f40a309]3687F06L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]3688
3689| break;
3690
[f40a309]3691 bra F06L114
[4f508e6]3692
[f40a309]3693 .page
[4f508e6]3694
3695| case SM_FREQ:
3696| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
3697
[f40a309]3698F06L119: move PCH(A6),D0
3699 asr #7,D0
3700 and #255,D0
3701 move D0,A0
3702 add.l A0,A0
3703 add.l #_ptoftab,A0
3704 move (A0),TSRCVAL(A6)
[4f508e6]3705
3706| break;
3707
[f40a309]3708 bra F06L114
[4f508e6]3709
3710| case SM_KVEL:
3711| tsrcval = veltab[trg];
3712
[f40a309]3713F06L120: move TRG(A6),A0
3714 add.l A0,A0
3715 add.l #_veltab,A0
3716 move (A0),TSRCVAL(A6)
[4f508e6]3717
3718| break;
3719
[f40a309]3720 bra F06L114
[4f508e6]3721
3722| case SM_KPRS:
3723| tsrcval = prstab[trg];
3724
[f40a309]3725F06L121: move TRG(A6),A0
3726 add.l A0,A0
3727 add.l #_prstab,A0
3728 move (A0),TSRCVAL(A6)
[4f508e6]3729
3730| break;
3731
[f40a309]3732 bra F06L114
[4f508e6]3733
3734| default:
3735| tsrcval = vep->val;
3736
[f40a309]3737F06L122: move.l VEP(A6),A0
3738 move 8(A0),TSRCVAL(A6)
[4f508e6]3739
3740| }
3741
[f40a309]3742 .page
[4f508e6]3743
3744| srcval = tsrcval;
3745
[f40a309]3746F06L114: move TSRCVAL(A6),SRCVAL(A6)
[4f508e6]3747
[f40a309]3748 .page
[4f508e6]3749
3750| if (pt->ipvsrc) {
3751
[f40a309]3752F06L124: move.l PT(A6),A0
3753 tst.b 6(A0)
3754 beq F06L136
[4f508e6]3755
3756| switch (pt->ipvsrc) {
3757
[f40a309]3758 move.l PT(A6),A0
3759 move.b 6(A0),D0
3760 ext.w D0
3761 sub #1,D0
3762 cmp #9,D0
3763 bhi F06L144
[4f508e6]3764
[f40a309]3765 asl #2,D0
3766 lea F06L145,A0
3767 move.l 0(A0,D0.W),A0
3768 jmp (A0)
[4f508e6]3769
3770| case SM_RAND:
3771| ltmp = xgetran(pt_>ipvmlt);
3772
[f40a309]3773F06L139: move.l PT(A6),A0
3774 move 4(A0),(sp)
3775 jsr _xgetran
3776 ext.l D0
3777 move.l D0,LTMP(A6)
[4f508e6]3778
3779| break;
3780
[f40a309]3781 bra F06L137
[4f508e6]3782
3783| case SM_PTCH:
3784| ltmp = pch;
3785
[f40a309]3786F06L140: move PCH(A6),A0
3787 move.l A0,LTMP(A6)
[4f508e6]3788
3789| break;
3790
[f40a309]3791 bra F06L137
[4f508e6]3792
[f40a309]3793 .page
[4f508e6]3794
3795| case SM_FREQ:
3796| ltmp = ptoftab[(pch >> 7) & 0x00FF];
3797
[f40a309]3798F06L141: move PCH(A6),D0
3799 asr #7,D0
3800 and #255,D0
3801 move D0,A0
3802 add.l A0,A0
3803 move.l #_ptoftab,A1
3804 move 0(A0,A1.l),D0
3805 ext.l D0
3806 move.l D0,LTMP(A6)
[4f508e6]3807
3808| break;
3809
[f40a309]3810 bra F06L137
[4f508e6]3811
3812| case SM_KVEL:
3813| ltmp = veltab[trg];
3814
[f40a309]3815F06L142: move TRG(A6),A0
3816 add.l A0,A0
3817 move.l #_veltab,A1
3818 move 0(A0,A1.l),D0
3819 ext.l D0
3820 move.l D0,LTMP(A6)
[4f508e6]3821
3822| break;
3823
3824 bra F06L137
3825
[f40a309]3826 .page
[4f508e6]3827
3828| case SM_KPRS:
3829| ltmp = prstab[trg];
3830
[f40a309]3831F06L143: move TRG(A6),A0
3832 add.l A0,A0
3833 move.l #_prstab,A1
3834 move 0(A0,A1.l),D0
3835 ext.l D0
3836 move.l D0,LTMP(A6)
[4f508e6]3837
3838| break;
3839
[f40a309]3840 bra F06L137
[4f508e6]3841
[f40a309]3842 .page
[4f508e6]3843
3844| default:
3845| ltmp = valents[group | pt->ipvsrc].val;
3846
[f40a309]3847F06L144: move.l PT(A6),A0
3848 clr.l D0
3849 move.b 6(A0),D0
3850 or.w GROUP(A6),D0
3851 add.l D0,D0
3852 move.l D0,D1
3853 lsl.l #2,D0
3854 add.l D1,D0
3855 move.l D0,A0
3856 move.l #_valents,A1
3857 clr.l D0
3858 move 8(A0,A1.l),D0
3859 move.l D0,LTMP(A6)
[4f508e6]3860
3861| }
3862
3863
3864 .page
3865
3866| ltmp = (ltmp | pt->ipvmlt) >> 15;
3867
[f40a309]3868F06L137: move.l PT(A6),A0
3869 move.w 4(A0),D0
3870 move.w LTMP+2(A6),D1
3871 muls D1,D0
3872 move.l #15,D1
3873 asr.l D1,D0
3874 move.l D0,LTMP(A6)
[4f508e6]3875
3876| ltmp += (long)pt->ipval;
3877
[f40a309]3878 move.l PT(A6),A0
3879 move 2(A0),D0
3880 ext.l D0
3881 add.l D0,LTMP(A6)
[4f508e6]3882
3883| if (ltmp GT (long)VALMAX)
3884| ltmp = (long)VALMAX;
3885
[f40a309]3886 cmp.l #VALMAX,LTMP(A6)
3887 ble F06L146
[4f508e6]3888
[f40a309]3889 move.l #VALMAX,LTMP(A6)
3890 bra F06L147
[4f508e6]3891
3892| else if (ltmp LT (long)VALMIN)
3893| ltmp = (long)VALMIN;
3894
[f40a309]3895F06L146: cmp.l #VALMIN,LTMP(A6)
3896 bge F06L147
[4f508e6]3897
[f40a309]3898 move.l #VALMIN,LTMP(A6)
[4f508e6]3899
3900| tfpval = (short)ltmp;
3901
[f40a309]3902F06L147: move.w LTMP+2(A6),TFPVAL(A6)
3903 bra F06L149
[4f508e6]3904
3905| } else {
3906
3907| tfpval = pt->ipval;
3908
[f40a309]3909F06L136: move.l PT(A6),A0
3910 move 2(A0),TFPVAL(A6)
[4f508e6]3911
3912| }
3913
3914 .page
3915
3916| fpmant = (((long)pt->iptom & 0x0000FFF0L)
3917| | ((long)timemlt & 0x0000FFFFL)) >> 15;
3918
[f40a309]3919F06L149: move.l PT(A6),A0
3920 move.w (A0),D0
3921 move.w D0,D2
[4f508e6]3922 andi.w #0xFFF0,D0
[f40a309]3923 move.w _timemlt,D1
3924 muls D1,D0
3925 move.l #15,D1
3926 asr.l D1,D0
3927 move D0,R_FPMANT
[4f508e6]3928
3929| fpexp = expbit[pt->iptim & 0x000F];
3930
3931 and #0x000F,D2
[f40a309]3932 move D2,A0
3933 add.l A0,A0
3934 add.l #_expbit,A0
3935 move (A0),R_FPEXP
[4f508e6]3936
[f40a309]3937 .page
[4f508e6]3938
3939| fp->idfpch = pch;
3940
[f40a309]3941F06L163: move PCH(A6),(A_FP)
[4f508e6]3942
3943| fpval = tfpval;
3944
[f40a309]3945 move TFPVAL(A6),R_FPVAL
[4f508e6]3946
[f40a309]3947 .page
[4f508e6]3948
[f40a309]3949 move.b 5(A_FP),D0
3950 ext.w D0
3951 sub.w #1,D0
3952 movea.l PT(A6),A0
[4f508e6]3953
3954| oldi = setipl(FPU_DI);
3955
[f40a309]3956 move sr,OLDI(A6)
3957 move #FPU_DI,sr
[4f508e6]3958
[f40a309]3959F06L168: clr.b 10(A0)
3960 add.l #12,a0
3961 dbra D0,F06L168
[4f508e6]3962
[f40a309]3963 .page
[4f508e6]3964
3965| fp->idftmd ^= I_NVBITS;
3966
[f40a309]3967F06L165: eor.b #24,7(A_FP)
[4f508e6]3968
3969| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
3970
[f40a309]3971 move.b 7(A_FP),R_FPCTL
3972 and #28,R_FPCTL
3973 or #3,R_FPCTL
[4f508e6]3974
3975| fp->idfcpt = fp->idfpt1;
3976
[f40a309]3977 move.b 6(A_FP),8(A_FP)
[4f508e6]3978
3979| fp->idftmd |= I_ACTIVE;
3980
[f40a309]3981 or.b #2,7(A_FP)
[4f508e6]3982
3983| fp->idftrf = trg;
3984
[f40a309]3985 move TRG(A6),10(A_FP)
[4f508e6]3986
3987| |(fpu + (long)FPU_TCV1) = srcval;
3988
3989 move SRCVAL(A6),0x8(A_FPU)
3990
3991| ++octype;
3992
[f40a309]3993 add #1,OCTYPE(A6)
[4f508e6]3994
3995| |(fpu + (long)FPU_TSF1) = mltval;
3996
3997 move MLTVAL(A6),0xA(A_FPU)
3998
3999| ++octype;
4000
[f40a309]4001 add #1,OCTYPE(A6)
[4f508e6]4002
4003| |(fpu + (long)FPU_TMNT) = fpmant;
4004
4005 move R_FPMANT,0x14(A_FPU)
4006
4007| ++octype;
4008
[f40a309]4009 add #1,OCTYPE(A6)
[4f508e6]4010
4011| |(fpu + (long)FPU_TEXP) = fpexp;
4012
4013 move R_FPEXP,0x16(A_FPU)
4014
4015| ++octype;
4016
[f40a309]4017 add #1,OCTYPE(A6)
[4f508e6]4018
[f40a309]4019 .page
[4f508e6]4020
4021| if (fp->idftmd & I_VNSUBN)
4022
[f40a309]4023 btst #3,7(A_FP)
4024 beq F06L169
[4f508e6]4025
4026| |(fpu + (long)FPU_TNV1) = fpval;
4027
4028 move R_FPVAL,0x1C(A_FPU)
[f40a309]4029 bra F06L170
[4f508e6]4030
4031| else
4032| |(fpu + (long)FPU_TNV0) = fpval;
4033
[f40a309]4034F06L169: move R_FPVAL,2(A_FPU)
[4f508e6]4035
4036| ++octype;
4037
[f40a309]4038F06L170: add #1,OCTYPE(A6)
[4f508e6]4039
4040| |(fpu + (long)FPU_TCTL) = fpctl;
4041
[f40a309]4042 move R_FPCTL,(A_FPU)
[4f508e6]4043
4044| setipl(oldi);
4045
[f40a309]4046 move OLDI(A6),sr
[4f508e6]4047
4048 .page
4049| ------------------------------------------------------------------------------
4050| Start function 7 -- Ind 2
4051| ------------------------------------------------------------------------------
4052
4053| if (ip->idhfnc[7].idftmd & I_TM_KEY) {
4054
[f40a309]4055FN07: move.l IP(A6),A0
4056 move.b 177(A0),D0
4057 move.w TAG(A6),D1
4058 eor.w D1,D0
4059 btst #0,D0
4060 bne FN07A
[4f508e6]4061
[f40a309]4062 jmp FN08
[4f508e6]4063
4064| vp = (vce << 4) + 11;
4065
[f40a309]4066FN07A: move VCE(A6),D0
4067 asl #4,D0
4068 add.w #11,D0
4069 move D0,VP(A6)
[4f508e6]4070
4071| fpu = io_fpu + FPU_OFNC + (vp << 4);
4072
[f40a309]4073 asl #5,D0
4074 ext.l D0
4075 move.l D0,A_FPU
[4f508e6]4076 add.l #_io_fpu+0x4000,A_FPU
4077
4078| fp = &ip->idhfnc[7];
4079
[f40a309]4080 move.l #84,A_FP
4081 add.l IP(A6),A_FP
4082 add.l #86,A_FP
[4f508e6]4083
4084| pt = &ip->idhpnt[fp->idfpt1];
4085
[f40a309]4086 clr.l D0
4087 move.b 6(A_FP),D0
4088 lsl.l #2,D0
4089 move.l D0,D1
4090 add.l D0,D0
4091 add.l D1,D0
4092 add.l IP(A6),D0
4093 add.l #242,D0
4094 move.l D0,PT(A6)
[4f508e6]4095
[f40a309]4096 .page
[4f508e6]4097
4098| srcnum = group | fp->idfsrc;
4099
[f40a309]4100 move.w GROUP(A6),D0
4101 ext.l D0
4102 clr.l D1
4103 move.b 4(A_FP),D1
4104 or D1,D0
4105 move D0,SRCNUM(A6)
[4f508e6]4106
4107| vep = &valents[srcnum];
4108
[f40a309]4109 add.l D0,D0
4110 move.l D0,D1
4111 lsl.l #2,D0
4112 add.l D1,D0
4113 add.l #_valents,D0
4114 move.l D0,VEP(A6)
[4f508e6]4115
4116| smp = vpsms[vp];
4117
[f40a309]4118 move VP(A6),A0
4119 add.l A0,A0
4120 add.l A0,A0
4121 add.l #_vpsms,A0
4122 move.l (A0),A_SMP
[4f508e6]4123
4124| if (srcnum NE smp->sm) {
4125
[f40a309]4126 clr D0
4127 move 10(A_SMP),D0
4128 cmp SRCNUM(A6),D0
4129 beq F07L113
[4f508e6]4130
4131| (smp->prv)->nxt = smp->nxt;
4132
[f40a309]4133 move.l 4(A_SMP),A0
4134 move.l (A_SMP),(A0)
[4f508e6]4135
4136| (smp->nxt)->prv = smp->prv;
4137
[f40a309]4138 move.l (A_SMP),A0
4139 move.l 4(A_SMP),4(A0)
[4f508e6]4140
4141| smp->prv = (struct sment |)vep;
4142
[f40a309]4143 move.l VEP(A6),4(A_SMP)
[4f508e6]4144
4145| smp->nxt = vep->nxt;
4146
[f40a309]4147 move.l VEP(A6),A0
4148 move.l (A0),(A_SMP)
[4f508e6]4149
4150| (vep->nxt)->prv = smp;
4151
[f40a309]4152 move.l VEP(A6),A0
4153 move.l (A0),A0
4154 move.l A_SMP,4(A0)
[4f508e6]4155
4156| vep->nxt = smp;
4157
[f40a309]4158 move.l VEP(A6),A0
4159 move.l A_SMP,(A0)
[4f508e6]4160
4161| smp->sm = srcnum;
4162
[f40a309]4163 move SRCNUM(A6),10(A_SMP)
[4f508e6]4164
4165| }
4166
4167| mltval = fp->idfmlt;
4168
[f40a309]4169F07L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]4170
[f40a309]4171 .page
[4f508e6]4172
4173| switch (fp->idfsrc) {
4174
[f40a309]4175 move.b 4(A_FP),D0
4176 ext.w d0
4177 cmp #10,D0
4178 bhi F07L122
[4f508e6]4179
[f40a309]4180 asl #2,D0
4181 lea F07L123,A0
4182 movea.l 0(A0,D0.W),A0
4183 jmp (A0)
[4f508e6]4184
4185| case SM_NONE:
4186| mltval = 0;
4187
[f40a309]4188F07L116: clr MLTVAL(A6)
[4f508e6]4189
4190| tsrcval = 0;
4191
[f40a309]4192 clr TSRCVAL(A6)
[4f508e6]4193
4194| break;
4195
[f40a309]4196 bra F07L114
[4f508e6]4197
4198| case SM_RAND:
4199| tsrcval = xgetran(mltval);
4200
[f40a309]4201F07L117: move MLTVAL(A6),(sp)
4202 jsr _xgetran
4203 move D0,TSRCVAL(A6)
[4f508e6]4204
4205| break;
4206
[f40a309]4207 bra F07L114
[4f508e6]4208
4209| case SM_PTCH:
4210| tsrcval = pch;
4211
[f40a309]4212F07L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]4213
4214| break;
4215
[f40a309]4216 bra F07L114
[4f508e6]4217
[f40a309]4218 .page
[4f508e6]4219
4220| case SM_FREQ:
4221| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
4222
[f40a309]4223F07L119: move PCH(A6),D0
4224 asr #7,D0
4225 and #255,D0
4226 move D0,A0
4227 add.l A0,A0
4228 add.l #_ptoftab,A0
4229 move (A0),TSRCVAL(A6)
[4f508e6]4230
4231| break;
4232
[f40a309]4233 bra F07L114
[4f508e6]4234
4235| case SM_KVEL:
4236| tsrcval = veltab[trg];
4237
[f40a309]4238F07L120: move TRG(A6),A0
4239 add.l A0,A0
4240 add.l #_veltab,A0
4241 move (A0),TSRCVAL(A6)
[4f508e6]4242
4243| break;
4244
[f40a309]4245 bra F07L114
[4f508e6]4246
4247| case SM_KPRS:
4248| tsrcval = prstab[trg];
4249
[f40a309]4250F07L121: move TRG(A6),A0
4251 add.l A0,A0
4252 add.l #_prstab,A0
4253 move (A0),TSRCVAL(A6)
[4f508e6]4254
4255| break;
4256
[f40a309]4257 bra F07L114
[4f508e6]4258
4259| default:
4260| tsrcval = vep->val;
4261
[f40a309]4262F07L122: move.l VEP(A6),A0
4263 move 8(A0),TSRCVAL(A6)
[4f508e6]4264
4265| }
4266
[f40a309]4267 .page
[4f508e6]4268
4269| srcval = tsrcval;
4270
[f40a309]4271F07L114: move TSRCVAL(A6),SRCVAL(A6)
[4f508e6]4272
[f40a309]4273 .page
[4f508e6]4274
4275| if (pt->ipvsrc) {
4276
[f40a309]4277F07L124: move.l PT(A6),A0
4278 tst.b 6(A0)
4279 beq F07L136
[4f508e6]4280
4281| switch (pt->ipvsrc) {
4282
[f40a309]4283 move.l PT(A6),A0
4284 move.b 6(A0),D0
4285 ext.w D0
4286 sub #1,D0
4287 cmp #9,D0
4288 bhi F07L144
[4f508e6]4289
[f40a309]4290 asl #2,D0
4291 lea F07L145,A0
4292 move.l 0(A0,D0.W),A0
4293 jmp (A0)
[4f508e6]4294
4295| case SM_RAND:
4296| ltmp = xgetran(pt_>ipvmlt);
4297
[f40a309]4298F07L139: move.l PT(A6),A0
4299 move 4(A0),(sp)
4300 jsr _xgetran
4301 ext.l D0
4302 move.l D0,LTMP(A6)
[4f508e6]4303
4304| break;
4305
[f40a309]4306 bra F07L137
[4f508e6]4307
4308| case SM_PTCH:
4309| ltmp = pch;
4310
[f40a309]4311F07L140: move PCH(A6),A0
4312 move.l A0,LTMP(A6)
[4f508e6]4313
4314| break;
4315
[f40a309]4316 bra F07L137
[4f508e6]4317
[f40a309]4318 .page
[4f508e6]4319
4320| case SM_FREQ:
4321| ltmp = ptoftab[(pch >> 7) & 0x00FF];
4322
[f40a309]4323F07L141: move PCH(A6),D0
4324 asr #7,D0
4325 and #255,D0
4326 move D0,A0
4327 add.l A0,A0
4328 move.l #_ptoftab,A1
4329 move 0(A0,A1.l),D0
4330 ext.l D0
4331 move.l D0,LTMP(A6)
[4f508e6]4332
4333| break;
4334
[f40a309]4335 bra F07L137
[4f508e6]4336
4337| case SM_KVEL:
4338| ltmp = veltab[trg];
4339
[f40a309]4340F07L142: move TRG(A6),A0
4341 add.l A0,A0
4342 move.l #_veltab,A1
4343 move 0(A0,A1.l),D0
4344 ext.l D0
4345 move.l D0,LTMP(A6)
[4f508e6]4346
4347| break;
4348
[f40a309]4349 bra F07L137
[4f508e6]4350
[f40a309]4351 .page
[4f508e6]4352
4353| case SM_KPRS:
4354| ltmp = prstab[trg];
4355
[f40a309]4356F07L143: move TRG(A6),A0
4357 add.l A0,A0
4358 move.l #_prstab,A1
4359 move 0(A0,A1.l),D0
4360 ext.l D0
4361 move.l D0,LTMP(A6)
[4f508e6]4362
4363| break;
4364
[f40a309]4365 bra F07L137
[4f508e6]4366
[f40a309]4367 .page
[4f508e6]4368
4369| default:
4370| ltmp = valents[group | pt->ipvsrc].val;
4371
[f40a309]4372F07L144: move.l PT(A6),A0
4373 clr.l D0
4374 move.b 6(A0),D0
4375 or.w GROUP(A6),D0
4376 add.l D0,D0
4377 move.l D0,D1
4378 lsl.l #2,D0
4379 add.l D1,D0
4380 move.l D0,A0
4381 move.l #_valents,A1
4382 clr.l D0
4383 move 8(A0,A1.l),D0
4384 move.l D0,LTMP(A6)
[4f508e6]4385
4386| }
4387
4388
4389 .page
4390
4391| ltmp = (ltmp | pt->ipvmlt) >> 15;
4392
[f40a309]4393F07L137: move.l PT(A6),A0
4394 move.w 4(A0),D0
4395 move.w LTMP+2(A6),D1
4396 muls D1,D0
4397 move.l #15,D1
4398 asr.l D1,D0
4399 move.l D0,LTMP(A6)
[4f508e6]4400
4401| ltmp += (long)pt->ipval;
4402
[f40a309]4403 move.l PT(A6),A0
4404 move 2(A0),D0
4405 ext.l D0
4406 add.l D0,LTMP(A6)
[4f508e6]4407
4408| if (ltmp GT (long)VALMAX)
4409| ltmp = (long)VALMAX;
4410
[f40a309]4411 cmp.l #VALMAX,LTMP(A6)
4412 ble F07L146
[4f508e6]4413
[f40a309]4414 move.l #VALMAX,LTMP(A6)
4415 bra F07L147
[4f508e6]4416
4417| else if (ltmp LT (long)VALMIN)
4418| ltmp = (long)VALMIN;
4419
[f40a309]4420F07L146: cmp.l #VALMIN,LTMP(A6)
4421 bge F07L147
[4f508e6]4422
[f40a309]4423 move.l #VALMIN,LTMP(A6)
[4f508e6]4424
4425| tfpval = (short)ltmp;
4426
[f40a309]4427F07L147: move.w LTMP+2(A6),TFPVAL(A6)
4428 bra F07L149
[4f508e6]4429
4430| } else {
4431
4432| tfpval = pt->ipval;
4433
[f40a309]4434F07L136: move.l PT(A6),A0
4435 move 2(A0),TFPVAL(A6)
[4f508e6]4436
4437| }
4438
4439 .page
4440
4441| fpmant = (((long)pt->iptom & 0x0000FFF0L)
4442| | ((long)timemlt & 0x0000FFFFL)) >> 15;
4443
[f40a309]4444F07L149: move.l PT(A6),A0
4445 move.w (A0),D0
4446 move.w D0,D2
[4f508e6]4447 andi.w #0xFFF0,D0
[f40a309]4448 move.w _timemlt,D1
4449 muls D1,D0
4450 move.l #15,D1
4451 asr.l D1,D0
4452 move D0,R_FPMANT
[4f508e6]4453
4454| fpexp = expbit[pt->iptim & 0x000F];
4455
4456 and #0x000F,D2
[f40a309]4457 move D2,A0
4458 add.l A0,A0
4459 add.l #_expbit,A0
4460 move (A0),R_FPEXP
[4f508e6]4461
[f40a309]4462 .page
[4f508e6]4463
4464| fp->idfpch = pch;
4465
[f40a309]4466F07L163: move PCH(A6),(A_FP)
[4f508e6]4467
4468| fpval = tfpval;
4469
[f40a309]4470 move TFPVAL(A6),R_FPVAL
[4f508e6]4471
[f40a309]4472 .page
[4f508e6]4473
[f40a309]4474 move.b 5(A_FP),D0
4475 ext.w D0
4476 sub.w #1,D0
4477 movea.l PT(A6),A0
[4f508e6]4478
4479| oldi = setipl(FPU_DI);
4480
[f40a309]4481 move sr,OLDI(A6)
4482 move #FPU_DI,sr
[4f508e6]4483
[f40a309]4484F07L168: clr.b 10(A0)
4485 add.l #12,a0
4486 dbra D0,F07L168
[4f508e6]4487
[f40a309]4488 .page
[4f508e6]4489
4490| fp->idftmd ^= I_NVBITS;
4491
[f40a309]4492F07L165: eor.b #24,7(A_FP)
[4f508e6]4493
4494| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
4495
[f40a309]4496 move.b 7(A_FP),R_FPCTL
4497 and #28,R_FPCTL
4498 or #3,R_FPCTL
[4f508e6]4499
4500| fp->idfcpt = fp->idfpt1;
4501
[f40a309]4502 move.b 6(A_FP),8(A_FP)
[4f508e6]4503
4504| fp->idftmd |= I_ACTIVE;
4505
[f40a309]4506 or.b #2,7(A_FP)
[4f508e6]4507
4508| fp->idftrf = trg;
4509
[f40a309]4510 move TRG(A6),10(A_FP)
[4f508e6]4511
4512| |(fpu + (long)FPU_TCV1) = srcval;
4513
4514 move SRCVAL(A6),0x8(A_FPU)
4515
4516| ++octype;
4517
[f40a309]4518 add #1,OCTYPE(A6)
[4f508e6]4519
4520| |(fpu + (long)FPU_TSF1) = mltval;
4521
4522 move MLTVAL(A6),0xA(A_FPU)
4523
4524| ++octype;
4525
[f40a309]4526 add #1,OCTYPE(A6)
[4f508e6]4527
4528| |(fpu + (long)FPU_TMNT) = fpmant;
4529
4530 move R_FPMANT,0x14(A_FPU)
4531
4532| ++octype;
4533
[f40a309]4534 add #1,OCTYPE(A6)
[4f508e6]4535
4536| |(fpu + (long)FPU_TEXP) = fpexp;
4537
4538 move R_FPEXP,0x16(A_FPU)
4539
4540| ++octype;
4541
[f40a309]4542 add #1,OCTYPE(A6)
[4f508e6]4543
[f40a309]4544 .page
[4f508e6]4545
4546| if (fp->idftmd & I_VNSUBN)
4547
[f40a309]4548 btst #3,7(A_FP)
4549 beq F07L169
[4f508e6]4550
4551| |(fpu + (long)FPU_TNV1) = fpval;
4552
4553 move R_FPVAL,0x1C(A_FPU)
[f40a309]4554 bra F07L170
[4f508e6]4555
4556| else
4557| |(fpu + (long)FPU_TNV0) = fpval;
4558
[f40a309]4559F07L169: move R_FPVAL,2(A_FPU)
[4f508e6]4560
4561| ++octype;
4562
[f40a309]4563F07L170: add #1,OCTYPE(A6)
[4f508e6]4564
4565| |(fpu + (long)FPU_TCTL) = fpctl;
4566
[f40a309]4567 move R_FPCTL,(A_FPU)
[4f508e6]4568
4569| setipl(oldi);
4570
[f40a309]4571 move OLDI(A6),sr
[4f508e6]4572
4573 .page
4574| ------------------------------------------------------------------------------
4575| Start function 8 -- Ind 3
4576| ------------------------------------------------------------------------------
4577
4578| if (ip->idhfnc[8].idftmd & I_TM_KEY) {
4579
[f40a309]4580FN08: move.l IP(A6),A0
4581 move.b 189(A0),D0
4582 move.w TAG(A6),D1
4583 eor.w D1,D0
4584 btst #0,D0
4585 bne FN08A
[4f508e6]4586
[f40a309]4587 jmp FN09
[4f508e6]4588
4589| vp = (vce << 4) + 12;
4590
[f40a309]4591FN08A: move VCE(A6),D0
4592 asl #4,D0
4593 add.w #12,D0
4594 move D0,VP(A6)
[4f508e6]4595
4596| fpu = io_fpu + FPU_OFNC + (vp << 4);
4597
[f40a309]4598 asl #5,D0
4599 ext.l D0
4600 move.l D0,A_FPU
[4f508e6]4601 add.l #_io_fpu+0x4000,A_FPU
4602
4603| fp = &ip->idhfnc[8];
4604
[f40a309]4605 move.l #96,A_FP
4606 add.l IP(A6),A_FP
4607 add.l #86,A_FP
[4f508e6]4608
4609| pt = &ip->idhpnt[fp->idfpt1];
4610
[f40a309]4611 clr.l D0
4612 move.b 6(A_FP),D0
4613 lsl.l #2,D0
4614 move.l D0,D1
4615 add.l D0,D0
4616 add.l D1,D0
4617 add.l IP(A6),D0
4618 add.l #242,D0
4619 move.l D0,PT(A6)
[4f508e6]4620
[f40a309]4621 .page
[4f508e6]4622
4623| srcnum = group | fp->idfsrc;
4624
[f40a309]4625 move.w GROUP(A6),D0
4626 ext.l D0
4627 clr.l D1
4628 move.b 4(A_FP),D1
4629 or D1,D0
4630 move D0,SRCNUM(A6)
[4f508e6]4631
4632| vep = &valents[srcnum];
4633
[f40a309]4634 add.l D0,D0
4635 move.l D0,D1
4636 lsl.l #2,D0
4637 add.l D1,D0
4638 add.l #_valents,D0
4639 move.l D0,VEP(A6)
[4f508e6]4640
4641| smp = vpsms[vp];
4642
[f40a309]4643 move VP(A6),A0
4644 add.l A0,A0
4645 add.l A0,A0
4646 add.l #_vpsms,A0
4647 move.l (A0),A_SMP
[4f508e6]4648
4649| if (srcnum NE smp->sm) {
4650
[f40a309]4651 clr D0
4652 move 10(A_SMP),D0
4653 cmp SRCNUM(A6),D0
4654 beq F08L113
[4f508e6]4655
4656| (smp->prv)->nxt = smp->nxt;
4657
[f40a309]4658 move.l 4(A_SMP),A0
4659 move.l (A_SMP),(A0)
[4f508e6]4660
4661| (smp->nxt)->prv = smp->prv;
4662
[f40a309]4663 move.l (A_SMP),A0
4664 move.l 4(A_SMP),4(A0)
[4f508e6]4665
4666| smp->prv = (struct sment |)vep;
4667
[f40a309]4668 move.l VEP(A6),4(A_SMP)
[4f508e6]4669
4670| smp->nxt = vep->nxt;
4671
[f40a309]4672 move.l VEP(A6),A0
4673 move.l (A0),(A_SMP)
[4f508e6]4674
4675| (vep->nxt)->prv = smp;
4676
[f40a309]4677 move.l VEP(A6),A0
4678 move.l (A0),A0
4679 move.l A_SMP,4(A0)
[4f508e6]4680
4681| vep->nxt = smp;
4682
[f40a309]4683 move.l VEP(A6),A0
4684 move.l A_SMP,(A0)
[4f508e6]4685
4686| smp->sm = srcnum;
4687
[f40a309]4688 move SRCNUM(A6),10(A_SMP)
[4f508e6]4689
4690| }
4691
4692| mltval = fp->idfmlt;
4693
[f40a309]4694F08L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]4695
[f40a309]4696 .page
[4f508e6]4697
4698| switch (fp->idfsrc) {
4699
[f40a309]4700 move.b 4(A_FP),D0
4701 ext.w d0
4702 cmp #10,D0
4703 bhi F08L122
[4f508e6]4704
[f40a309]4705 asl #2,D0
4706 lea F08L123,A0
4707 movea.l 0(A0,D0.W),A0
4708 jmp (A0)
[4f508e6]4709
4710| case SM_NONE:
4711| mltval = 0;
4712
[f40a309]4713F08L116: clr MLTVAL(A6)
[4f508e6]4714
4715| tsrcval = 0;
4716
[f40a309]4717 clr TSRCVAL(A6)
[4f508e6]4718
4719| break;
4720
[f40a309]4721 bra F08L114
[4f508e6]4722
4723| case SM_RAND:
4724| tsrcval = xgetran(mltval);
4725
[f40a309]4726F08L117: move MLTVAL(A6),(sp)
4727 jsr _xgetran
4728 move D0,TSRCVAL(A6)
[4f508e6]4729
4730| break;
4731
[f40a309]4732 bra F08L114
[4f508e6]4733
4734| case SM_PTCH:
4735| tsrcval = pch;
4736
[f40a309]4737F08L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]4738
4739| break;
4740
[f40a309]4741 bra F08L114
[4f508e6]4742
[f40a309]4743 .page
[4f508e6]4744
4745| case SM_FREQ:
4746| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
4747
[f40a309]4748F08L119: move PCH(A6),D0
4749 asr #7,D0
4750 and #255,D0
4751 move D0,A0
4752 add.l A0,A0
4753 add.l #_ptoftab,A0
4754 move (A0),TSRCVAL(A6)
[4f508e6]4755
4756| break;
4757
[f40a309]4758 bra F08L114
[4f508e6]4759
4760| case SM_KVEL:
4761| tsrcval = veltab[trg];
4762
[f40a309]4763F08L120: move TRG(A6),A0
4764 add.l A0,A0
4765 add.l #_veltab,A0
4766 move (A0),TSRCVAL(A6)
[4f508e6]4767
4768| break;
4769
[f40a309]4770 bra F08L114
[4f508e6]4771
4772| case SM_KPRS:
4773| tsrcval = prstab[trg];
4774
[f40a309]4775F08L121: move TRG(A6),A0
4776 add.l A0,A0
4777 add.l #_prstab,A0
4778 move (A0),TSRCVAL(A6)
[4f508e6]4779
4780| break;
4781
[f40a309]4782 bra F08L114
[4f508e6]4783
4784| default:
4785| tsrcval = vep->val;
4786
[f40a309]4787F08L122: move.l VEP(A6),A0
4788 move 8(A0),TSRCVAL(A6)
[4f508e6]4789
4790| }
4791
[f40a309]4792 .page
[4f508e6]4793
4794| srcval = tsrcval;
4795
[f40a309]4796F08L114: move TSRCVAL(A6),SRCVAL(A6)
[4f508e6]4797
[f40a309]4798 .page
[4f508e6]4799
4800| if (pt->ipvsrc) {
4801
[f40a309]4802F08L124: move.l PT(A6),A0
4803 tst.b 6(A0)
4804 beq F08L136
[4f508e6]4805
4806| switch (pt->ipvsrc) {
4807
[f40a309]4808 move.l PT(A6),A0
4809 move.b 6(A0),D0
4810 ext.w D0
4811 sub #1,D0
4812 cmp #9,D0
4813 bhi F08L144
[4f508e6]4814
[f40a309]4815 asl #2,D0
4816 lea F08L145,A0
4817 move.l 0(A0,D0.W),A0
4818 jmp (A0)
[4f508e6]4819
4820| case SM_RAND:
4821| ltmp = xgetran(pt_>ipvmlt);
4822
[f40a309]4823F08L139: move.l PT(A6),A0
4824 move 4(A0),(sp)
4825 jsr _xgetran
4826 ext.l D0
4827 move.l D0,LTMP(A6)
[4f508e6]4828
4829| break;
4830
[f40a309]4831 bra F08L137
[4f508e6]4832
4833| case SM_PTCH:
4834| ltmp = pch;
4835
[f40a309]4836F08L140: move PCH(A6),A0
4837 move.l A0,LTMP(A6)
[4f508e6]4838
4839| break;
4840
[f40a309]4841 bra F08L137
[4f508e6]4842
[f40a309]4843 .page
[4f508e6]4844
4845| case SM_FREQ:
4846| ltmp = ptoftab[(pch >> 7) & 0x00FF];
4847
[f40a309]4848F08L141: move PCH(A6),D0
4849 asr #7,D0
4850 and #255,D0
4851 move D0,A0
4852 add.l A0,A0
4853 move.l #_ptoftab,A1
4854 move 0(A0,A1.l),D0
4855 ext.l D0
4856 move.l D0,LTMP(A6)
[4f508e6]4857
4858| break;
4859
[f40a309]4860 bra F08L137
[4f508e6]4861
4862| case SM_KVEL:
4863| ltmp = veltab[trg];
4864
[f40a309]4865F08L142: move TRG(A6),A0
4866 add.l A0,A0
4867 move.l #_veltab,A1
4868 move 0(A0,A1.l),D0
4869 ext.l D0
4870 move.l D0,LTMP(A6)
[4f508e6]4871
4872| break;
4873
[f40a309]4874 bra F08L137
[4f508e6]4875
[f40a309]4876 .page
[4f508e6]4877
4878| case SM_KPRS:
4879| ltmp = prstab[trg];
4880
[f40a309]4881F08L143: move TRG(A6),A0
4882 add.l A0,A0
4883 move.l #_prstab,A1
4884 move 0(A0,A1.l),D0
4885 ext.l D0
4886 move.l D0,LTMP(A6)
[4f508e6]4887
4888| break;
4889
[f40a309]4890 bra F08L137
[4f508e6]4891
[f40a309]4892 .page
[4f508e6]4893
4894| default:
4895| ltmp = valents[group | pt->ipvsrc].val;
4896
[f40a309]4897F08L144: move.l PT(A6),A0
4898 clr.l D0
4899 move.b 6(A0),D0
4900 or.w GROUP(A6),D0
4901 add.l D0,D0
4902 move.l D0,D1
4903 lsl.l #2,D0
4904 add.l D1,D0
4905 move.l D0,A0
4906 move.l #_valents,A1
4907 clr.l D0
4908 move 8(A0,A1.l),D0
4909 move.l D0,LTMP(A6)
[4f508e6]4910
4911| }
4912
4913
4914 .page
4915
4916| ltmp = (ltmp | pt->ipvmlt) >> 15;
4917
[f40a309]4918F08L137: move.l PT(A6),A0
4919 move.w 4(A0),D0
4920 move.w LTMP+2(A6),D1
4921 muls D1,D0
4922 move.l #15,D1
4923 asr.l D1,D0
4924 move.l D0,LTMP(A6)
[4f508e6]4925
4926| ltmp += (long)pt->ipval;
4927
[f40a309]4928 move.l PT(A6),A0
4929 move 2(A0),D0
4930 ext.l D0
4931 add.l D0,LTMP(A6)
[4f508e6]4932
4933| if (ltmp GT (long)VALMAX)
4934| ltmp = (long)VALMAX;
4935
[f40a309]4936 cmp.l #VALMAX,LTMP(A6)
4937 ble F08L146
[4f508e6]4938
[f40a309]4939 move.l #VALMAX,LTMP(A6)
4940 bra F08L147
[4f508e6]4941
4942| else if (ltmp LT (long)VALMIN)
4943| ltmp = (long)VALMIN;
4944
[f40a309]4945F08L146: cmp.l #VALMIN,LTMP(A6)
4946 bge F08L147
[4f508e6]4947
[f40a309]4948 move.l #VALMIN,LTMP(A6)
[4f508e6]4949
4950| tfpval = (short)ltmp;
4951
[f40a309]4952F08L147: move.w LTMP+2(A6),TFPVAL(A6)
4953 bra F08L149
[4f508e6]4954
4955| } else {
4956
4957| tfpval = pt->ipval;
4958
[f40a309]4959F08L136: move.l PT(A6),A0
4960 move 2(A0),TFPVAL(A6)
[4f508e6]4961
4962| }
4963
4964 .page
4965
4966| fpmant = (((long)pt->iptom & 0x0000FFF0L)
4967| | ((long)timemlt & 0x0000FFFFL)) >> 15;
4968
[f40a309]4969F08L149: move.l PT(A6),A0
4970 move.w (A0),D0
4971 move.w D0,D2
[4f508e6]4972 andi.w #0xFFF0,D0
[f40a309]4973 move.w _timemlt,D1
4974 muls D1,D0
4975 move.l #15,D1
4976 asr.l D1,D0
4977 move D0,R_FPMANT
[4f508e6]4978
4979| fpexp = expbit[pt->iptim & 0x000F];
4980
4981 and #0x000F,D2
[f40a309]4982 move D2,A0
4983 add.l A0,A0
4984 add.l #_expbit,A0
4985 move (A0),R_FPEXP
[4f508e6]4986
[f40a309]4987 .page
[4f508e6]4988
4989| fp->idfpch = pch;
4990
[f40a309]4991F08L163: move PCH(A6),(A_FP)
[4f508e6]4992
4993| fpval = tfpval;
4994
[f40a309]4995 move TFPVAL(A6),R_FPVAL
[4f508e6]4996
[f40a309]4997 .page
[4f508e6]4998
[f40a309]4999 move.b 5(A_FP),D0
5000 ext.w D0
5001 sub.w #1,D0
5002 movea.l PT(A6),A0
[4f508e6]5003
5004| oldi = setipl(FPU_DI);
5005
[f40a309]5006 move sr,OLDI(A6)
5007 move #FPU_DI,sr
[4f508e6]5008
[f40a309]5009F08L168: clr.b 10(A0)
5010 add.l #12,a0
5011 dbra D0,F08L168
[4f508e6]5012
[f40a309]5013 .page
[4f508e6]5014
5015| fp->idftmd ^= I_NVBITS;
5016
[f40a309]5017F08L165: eor.b #24,7(A_FP)
[4f508e6]5018
5019| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
5020
[f40a309]5021 move.b 7(A_FP),R_FPCTL
5022 and #28,R_FPCTL
5023 or #3,R_FPCTL
[4f508e6]5024
5025| fp->idfcpt = fp->idfpt1;
5026
[f40a309]5027 move.b 6(A_FP),8(A_FP)
[4f508e6]5028
5029| fp->idftmd |= I_ACTIVE;
5030
[f40a309]5031 or.b #2,7(A_FP)
[4f508e6]5032
5033| fp->idftrf = trg;
5034
[f40a309]5035 move TRG(A6),10(A_FP)
[4f508e6]5036
5037| |(fpu + (long)FPU_TCV1) = srcval;
5038
5039 move SRCVAL(A6),0x8(A_FPU)
5040
5041| ++octype;
5042
[f40a309]5043 add #1,OCTYPE(A6)
[4f508e6]5044
5045| |(fpu + (long)FPU_TSF1) = mltval;
5046
5047 move MLTVAL(A6),0xA(A_FPU)
5048
5049| ++octype;
5050
[f40a309]5051 add #1,OCTYPE(A6)
[4f508e6]5052
5053| |(fpu + (long)FPU_TMNT) = fpmant;
5054
5055 move R_FPMANT,0x14(A_FPU)
5056
5057| ++octype;
5058
[f40a309]5059 add #1,OCTYPE(A6)
[4f508e6]5060
5061| |(fpu + (long)FPU_TEXP) = fpexp;
5062
5063 move R_FPEXP,0x16(A_FPU)
5064
5065| ++octype;
5066
[f40a309]5067 add #1,OCTYPE(A6)
[4f508e6]5068
[f40a309]5069 .page
[4f508e6]5070
5071| if (fp->idftmd & I_VNSUBN)
5072
[f40a309]5073 btst #3,7(A_FP)
5074 beq F08L169
[4f508e6]5075
5076| |(fpu + (long)FPU_TNV1) = fpval;
5077
5078 move R_FPVAL,0x1C(A_FPU)
[f40a309]5079 bra F08L170
[4f508e6]5080
5081| else
5082| |(fpu + (long)FPU_TNV0) = fpval;
5083
[f40a309]5084F08L169: move R_FPVAL,2(A_FPU)
[4f508e6]5085
5086| ++octype;
5087
[f40a309]5088F08L170: add #1,OCTYPE(A6)
[4f508e6]5089
5090| |(fpu + (long)FPU_TCTL) = fpctl;
5091
[f40a309]5092 move R_FPCTL,(A_FPU)
[4f508e6]5093
5094| setipl(oldi);
5095
[f40a309]5096 move OLDI(A6),sr
[4f508e6]5097
5098 .page
5099| ------------------------------------------------------------------------------
5100| Start function 9 -- Ind 4
5101| ------------------------------------------------------------------------------
5102
5103| if (ip->idhfnc[9].idftmd & I_TM_KEY) {
5104
[f40a309]5105FN09: move.l IP(A6),A0
5106 move.b 201(A0),D0
5107 move.w TAG(A6),D1
5108 eor.w D1,D0
5109 btst #0,D0
5110 bne FN09A
[4f508e6]5111
[f40a309]5112 jmp FN10
[4f508e6]5113
5114| vp = (vce << 4) + 13;
5115
[f40a309]5116FN09A: move VCE(A6),D0
5117 asl #4,D0
5118 add.w #13,D0
5119 move D0,VP(A6)
[4f508e6]5120
5121| fpu = io_fpu + FPU_OFNC + (vp << 4);
5122
[f40a309]5123 asl #5,D0
5124 ext.l D0
5125 move.l D0,A_FPU
[4f508e6]5126 add.l #_io_fpu+0x4000,A_FPU
5127
5128| fp = &ip->idhfnc[9];
5129
[f40a309]5130 move.l #108,A_FP
5131 add.l IP(A6),A_FP
5132 add.l #86,A_FP
[4f508e6]5133
5134| pt = &ip->idhpnt[fp->idfpt1];
5135
[f40a309]5136 clr.l D0
5137 move.b 6(A_FP),D0
5138 lsl.l #2,D0
5139 move.l D0,D1
5140 add.l D0,D0
5141 add.l D1,D0
5142 add.l IP(A6),D0
5143 add.l #242,D0
5144 move.l D0,PT(A6)
[4f508e6]5145
[f40a309]5146 .page
[4f508e6]5147
5148| srcnum = group | fp->idfsrc;
5149
[f40a309]5150 move.w GROUP(A6),D0
5151 ext.l D0
5152 clr.l D1
5153 move.b 4(A_FP),D1
5154 or D1,D0
5155 move D0,SRCNUM(A6)
[4f508e6]5156
5157| vep = &valents[srcnum];
5158
[f40a309]5159 add.l D0,D0
5160 move.l D0,D1
5161 lsl.l #2,D0
5162 add.l D1,D0
5163 add.l #_valents,D0
5164 move.l D0,VEP(A6)
[4f508e6]5165
5166| smp = vpsms[vp];
5167
[f40a309]5168 move VP(A6),A0
5169 add.l A0,A0
5170 add.l A0,A0
5171 add.l #_vpsms,A0
5172 move.l (A0),A_SMP
[4f508e6]5173
5174| if (srcnum NE smp->sm) {
5175
[f40a309]5176 clr D0
5177 move 10(A_SMP),D0
5178 cmp SRCNUM(A6),D0
5179 beq F09L113
[4f508e6]5180
5181| (smp->prv)->nxt = smp->nxt;
5182
[f40a309]5183 move.l 4(A_SMP),A0
5184 move.l (A_SMP),(A0)
[4f508e6]5185
5186| (smp->nxt)->prv = smp->prv;
5187
[f40a309]5188 move.l (A_SMP),A0
5189 move.l 4(A_SMP),4(A0)
[4f508e6]5190
5191| smp->prv = (struct sment |)vep;
5192
[f40a309]5193 move.l VEP(A6),4(A_SMP)
[4f508e6]5194
5195| smp->nxt = vep->nxt;
5196
[f40a309]5197 move.l VEP(A6),A0
5198 move.l (A0),(A_SMP)
[4f508e6]5199
5200| (vep->nxt)->prv = smp;
5201
[f40a309]5202 move.l VEP(A6),A0
5203 move.l (A0),A0
5204 move.l A_SMP,4(A0)
[4f508e6]5205
5206| vep->nxt = smp;
5207
[f40a309]5208 move.l VEP(A6),A0
5209 move.l A_SMP,(A0)
[4f508e6]5210
5211| smp->sm = srcnum;
5212
[f40a309]5213 move SRCNUM(A6),10(A_SMP)
[4f508e6]5214
5215| }
5216
5217| mltval = fp->idfmlt;
5218
[f40a309]5219F09L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]5220
[f40a309]5221 .page
[4f508e6]5222
5223| switch (fp->idfsrc) {
5224
[f40a309]5225 move.b 4(A_FP),D0
5226 ext.w d0
5227 cmp #10,D0
5228 bhi F09L122
[4f508e6]5229
[f40a309]5230 asl #2,D0
5231 lea F09L123,A0
5232 movea.l 0(A0,D0.W),A0
5233 jmp (A0)
[4f508e6]5234
5235| case SM_NONE:
5236| mltval = 0;
5237
[f40a309]5238F09L116: clr MLTVAL(A6)
[4f508e6]5239
5240| tsrcval = 0;
5241
[f40a309]5242 clr TSRCVAL(A6)
[4f508e6]5243
5244| break;
5245
[f40a309]5246 bra F09L114
[4f508e6]5247
5248| case SM_RAND:
5249| tsrcval = xgetran(mltval);
5250
[f40a309]5251F09L117: move MLTVAL(A6),(sp)
5252 jsr _xgetran
5253 move D0,TSRCVAL(A6)
[4f508e6]5254
5255| break;
5256
[f40a309]5257 bra F09L114
[4f508e6]5258
5259| case SM_PTCH:
5260| tsrcval = pch;
5261
[f40a309]5262F09L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]5263
5264| break;
5265
[f40a309]5266 bra F09L114
[4f508e6]5267
[f40a309]5268 .page
[4f508e6]5269
5270| case SM_FREQ:
5271| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
5272
[f40a309]5273F09L119: move PCH(A6),D0
5274 asr #7,D0
5275 and #255,D0
5276 move D0,A0
5277 add.l A0,A0
5278 add.l #_ptoftab,A0
5279 move (A0),TSRCVAL(A6)
[4f508e6]5280
5281| break;
5282
[f40a309]5283 bra F09L114
[4f508e6]5284
5285| case SM_KVEL:
5286| tsrcval = veltab[trg];
5287
[f40a309]5288F09L120: move TRG(A6),A0
5289 add.l A0,A0
5290 add.l #_veltab,A0
5291 move (A0),TSRCVAL(A6)
[4f508e6]5292
5293| break;
5294
[f40a309]5295 bra F09L114
[4f508e6]5296
5297| case SM_KPRS:
5298| tsrcval = prstab[trg];
5299
[f40a309]5300F09L121: move TRG(A6),A0
5301 add.l A0,A0
5302 add.l #_prstab,A0
5303 move (A0),TSRCVAL(A6)
[4f508e6]5304
5305| break;
5306
[f40a309]5307 bra F09L114
[4f508e6]5308
5309| default:
5310| tsrcval = vep->val;
5311
[f40a309]5312F09L122: move.l VEP(A6),A0
5313 move 8(A0),TSRCVAL(A6)
[4f508e6]5314
5315| }
5316
[f40a309]5317 .page
[4f508e6]5318
5319| srcval = tsrcval;
5320
[f40a309]5321F09L114: move TSRCVAL(A6),SRCVAL(A6)
[4f508e6]5322
[f40a309]5323 .page
[4f508e6]5324
5325| if (pt->ipvsrc) {
5326
[f40a309]5327F09L124: move.l PT(A6),A0
5328 tst.b 6(A0)
5329 beq F09L136
[4f508e6]5330
5331| switch (pt->ipvsrc) {
5332
[f40a309]5333 move.l PT(A6),A0
5334 move.b 6(A0),D0
5335 ext.w D0
5336 sub #1,D0
5337 cmp #9,D0
5338 bhi F09L144
[4f508e6]5339
[f40a309]5340 asl #2,D0
5341 lea F09L145,A0
5342 move.l 0(A0,D0.W),A0
5343 jmp (A0)
[4f508e6]5344
5345| case SM_RAND:
5346| ltmp = xgetran(pt_>ipvmlt);
5347
[f40a309]5348F09L139: move.l PT(A6),A0
5349 move 4(A0),(sp)
5350 jsr _xgetran
5351 ext.l D0
5352 move.l D0,LTMP(A6)
[4f508e6]5353
5354| break;
5355
[f40a309]5356 bra F09L137
[4f508e6]5357
5358| case SM_PTCH:
5359| ltmp = pch;
5360
[f40a309]5361F09L140: move PCH(A6),A0
5362 move.l A0,LTMP(A6)
[4f508e6]5363
5364| break;
5365
[f40a309]5366 bra F09L137
[4f508e6]5367
[f40a309]5368 .page
[4f508e6]5369
5370| case SM_FREQ:
5371| ltmp = ptoftab[(pch >> 7) & 0x00FF];
5372
[f40a309]5373F09L141: move PCH(A6),D0
5374 asr #7,D0
5375 and #255,D0
5376 move D0,A0
5377 add.l A0,A0
5378 move.l #_ptoftab,A1
5379 move 0(A0,A1.l),D0
5380 ext.l D0
5381 move.l D0,LTMP(A6)
[4f508e6]5382
5383| break;
5384
[f40a309]5385 bra F09L137
[4f508e6]5386
5387| case SM_KVEL:
5388| ltmp = veltab[trg];
5389
[f40a309]5390F09L142: move TRG(A6),A0
5391 add.l A0,A0
5392 move.l #_veltab,A1
5393 move 0(A0,A1.l),D0
5394 ext.l D0
5395 move.l D0,LTMP(A6)
[4f508e6]5396
5397| break;
5398
[f40a309]5399 bra F09L137
[4f508e6]5400
[f40a309]5401 .page
[4f508e6]5402
5403| case SM_KPRS:
5404| ltmp = prstab[trg];
5405
[f40a309]5406F09L143: move TRG(A6),A0
5407 add.l A0,A0
5408 move.l #_prstab,A1
5409 move 0(A0,A1.l),D0
5410 ext.l D0
5411 move.l D0,LTMP(A6)
[4f508e6]5412
5413| break;
5414
[f40a309]5415 bra F09L137
[4f508e6]5416
[f40a309]5417 .page
[4f508e6]5418
5419| default:
5420| ltmp = valents[group | pt->ipvsrc].val;
5421
[f40a309]5422F09L144: move.l PT(A6),A0
5423 clr.l D0
5424 move.b 6(A0),D0
5425 or.w GROUP(A6),D0
5426 add.l D0,D0
5427 move.l D0,D1
5428 lsl.l #2,D0
5429 add.l D1,D0
5430 move.l D0,A0
5431 move.l #_valents,A1
5432 clr.l D0
5433 move 8(A0,A1.l),D0
5434 move.l D0,LTMP(A6)
[4f508e6]5435
5436| }
5437
5438
5439 .page
5440
5441| ltmp = (ltmp | pt->ipvmlt) >> 15;
5442
[f40a309]5443F09L137: move.l PT(A6),A0
5444 move.w 4(A0),D0
5445 move.w LTMP+2(A6),D1
5446 muls D1,D0
5447 move.l #15,D1
5448 asr.l D1,D0
5449 move.l D0,LTMP(A6)
[4f508e6]5450
5451| ltmp += (long)pt->ipval;
5452
[f40a309]5453 move.l PT(A6),A0
5454 move 2(A0),D0
5455 ext.l D0
5456 add.l D0,LTMP(A6)
[4f508e6]5457
5458| if (ltmp GT (long)VALMAX)
5459| ltmp = (long)VALMAX;
5460
[f40a309]5461 cmp.l #VALMAX,LTMP(A6)
5462 ble F09L146
[4f508e6]5463
[f40a309]5464 move.l #VALMAX,LTMP(A6)
5465 bra F09L147
[4f508e6]5466
5467| else if (ltmp LT (long)VALMIN)
5468| ltmp = (long)VALMIN;
5469
[f40a309]5470F09L146: cmp.l #VALMIN,LTMP(A6)
5471 bge F09L147
[4f508e6]5472
[f40a309]5473 move.l #VALMIN,LTMP(A6)
[4f508e6]5474
5475| tfpval = (short)ltmp;
5476
[f40a309]5477F09L147: move.w LTMP+2(A6),TFPVAL(A6)
5478 bra F09L149
[4f508e6]5479
5480| } else {
5481
5482| tfpval = pt->ipval;
5483
[f40a309]5484F09L136: move.l PT(A6),A0
5485 move 2(A0),TFPVAL(A6)
[4f508e6]5486
5487| }
5488
5489 .page
5490
5491| fpmant = (((long)pt->iptom & 0x0000FFF0L)
5492| | ((long)timemlt & 0x0000FFFFL)) >> 15;
5493
[f40a309]5494F09L149: move.l PT(A6),A0
5495 move.w (A0),D0
5496 move.w D0,D2
[4f508e6]5497 andi.w #0xFFF0,D0
[f40a309]5498 move.w _timemlt,D1
5499 muls D1,D0
5500 move.l #15,D1
5501 asr.l D1,D0
5502 move D0,R_FPMANT
[4f508e6]5503
5504| fpexp = expbit[pt->iptim & 0x000F];
5505
5506 and #0x000F,D2
[f40a309]5507 move D2,A0
5508 add.l A0,A0
5509 add.l #_expbit,A0
5510 move (A0),R_FPEXP
[4f508e6]5511
[f40a309]5512 .page
[4f508e6]5513
5514| fp->idfpch = pch;
5515
[f40a309]5516F09L163: move PCH(A6),(A_FP)
[4f508e6]5517
5518| fpval = tfpval;
5519
[f40a309]5520 move TFPVAL(A6),R_FPVAL
[4f508e6]5521
[f40a309]5522 .page
[4f508e6]5523
[f40a309]5524 move.b 5(A_FP),D0
5525 ext.w D0
5526 sub.w #1,D0
5527 movea.l PT(A6),A0
[4f508e6]5528
5529| oldi = setipl(FPU_DI);
5530
[f40a309]5531 move sr,OLDI(A6)
5532 move #FPU_DI,sr
[4f508e6]5533
[f40a309]5534F09L168: clr.b 10(A0)
5535 add.l #12,a0
5536 dbra D0,F09L168
[4f508e6]5537
[f40a309]5538 .page
[4f508e6]5539
5540| fp->idftmd ^= I_NVBITS;
5541
[f40a309]5542F09L165: eor.b #24,7(A_FP)
[4f508e6]5543
5544| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
5545
[f40a309]5546 move.b 7(A_FP),R_FPCTL
5547 and #28,R_FPCTL
5548 or #3,R_FPCTL
[4f508e6]5549
5550| fp->idfcpt = fp->idfpt1;
5551
[f40a309]5552 move.b 6(A_FP),8(A_FP)
[4f508e6]5553
5554| fp->idftmd |= I_ACTIVE;
5555
[f40a309]5556 or.b #2,7(A_FP)
[4f508e6]5557
5558| fp->idftrf = trg;
5559
[f40a309]5560 move TRG(A6),10(A_FP)
[4f508e6]5561
5562| |(fpu + (long)FPU_TCV1) = srcval;
5563
5564 move SRCVAL(A6),0x8(A_FPU)
5565
5566| ++octype;
5567
[f40a309]5568 add #1,OCTYPE(A6)
[4f508e6]5569
5570| |(fpu + (long)FPU_TSF1) = mltval;
5571
5572 move MLTVAL(A6),0xA(A_FPU)
5573
5574| ++octype;
5575
[f40a309]5576 add #1,OCTYPE(A6)
[4f508e6]5577
5578| |(fpu + (long)FPU_TMNT) = fpmant;
5579
5580 move R_FPMANT,0x14(A_FPU)
5581
5582| ++octype;
5583
[f40a309]5584 add #1,OCTYPE(A6)
[4f508e6]5585
5586| |(fpu + (long)FPU_TEXP) = fpexp;
5587
5588 move R_FPEXP,0x16(A_FPU)
5589
5590| ++octype;
5591
[f40a309]5592 add #1,OCTYPE(A6)
[4f508e6]5593
[f40a309]5594 .page
[4f508e6]5595
5596| if (fp->idftmd & I_VNSUBN)
5597
[f40a309]5598 btst #3,7(A_FP)
5599 beq F09L169
[4f508e6]5600
5601| |(fpu + (long)FPU_TNV1) = fpval;
5602
5603 move R_FPVAL,0x1C(A_FPU)
[f40a309]5604 bra F09L170
[4f508e6]5605
5606| else
5607| |(fpu + (long)FPU_TNV0) = fpval;
5608
[f40a309]5609F09L169: move R_FPVAL,2(A_FPU)
[4f508e6]5610
5611| ++octype;
5612
[f40a309]5613F09L170: add #1,OCTYPE(A6)
[4f508e6]5614
5615| |(fpu + (long)FPU_TCTL) = fpctl;
5616
[f40a309]5617 move R_FPCTL,(A_FPU)
[4f508e6]5618
5619| setipl(oldi);
5620
[f40a309]5621 move OLDI(A6),sr
[4f508e6]5622
5623 .page
5624| ------------------------------------------------------------------------------
5625| Start function 10 -- Ind 5
5626| ------------------------------------------------------------------------------
5627
5628| if (ip->idhfnc[10].idftmd & I_TM_KEY) {
5629
[f40a309]5630FN10: move.l IP(A6),A0
5631 move.b 213(A0),D0
5632 move.w TAG(A6),D1
5633 eor.w D1,D0
5634 btst #0,D0
5635 bne FN10A
[4f508e6]5636
[f40a309]5637 jmp FN11
[4f508e6]5638
5639| vp = (vce << 4) + 14;
5640
[f40a309]5641FN10A: move VCE(A6),D0
5642 asl #4,D0
5643 add.w #14,D0
5644 move D0,VP(A6)
[4f508e6]5645
5646| fpu = io_fpu + FPU_OFNC + (vp << 4);
5647
[f40a309]5648 asl #5,D0
5649 ext.l D0
5650 move.l D0,A_FPU
[4f508e6]5651 add.l #_io_fpu+0x4000,A_FPU
5652
5653| fp = &ip->idhfnc[10];
5654
[f40a309]5655 move.l #120,A_FP
5656 add.l IP(A6),A_FP
5657 add.l #86,A_FP
[4f508e6]5658
5659| pt = &ip->idhpnt[fp->idfpt1];
5660
[f40a309]5661 clr.l D0
5662 move.b 6(A_FP),D0
5663 lsl.l #2,D0
5664 move.l D0,D1
5665 add.l D0,D0
5666 add.l D1,D0
5667 add.l IP(A6),D0
5668 add.l #242,D0
5669 move.l D0,PT(A6)
[4f508e6]5670
[f40a309]5671 .page
[4f508e6]5672
5673| srcnum = group | fp->idfsrc;
5674
[f40a309]5675 move.w GROUP(A6),D0
5676 ext.l D0
5677 clr.l D1
5678 move.b 4(A_FP),D1
5679 or D1,D0
5680 move D0,SRCNUM(A6)
[4f508e6]5681
5682| vep = &valents[srcnum];
5683
[f40a309]5684 add.l D0,D0
5685 move.l D0,D1
5686 lsl.l #2,D0
5687 add.l D1,D0
5688 add.l #_valents,D0
5689 move.l D0,VEP(A6)
[4f508e6]5690
5691| smp = vpsms[vp];
5692
[f40a309]5693 move VP(A6),A0
5694 add.l A0,A0
5695 add.l A0,A0
5696 add.l #_vpsms,A0
5697 move.l (A0),A_SMP
[4f508e6]5698
5699| if (srcnum NE smp->sm) {
5700
[f40a309]5701 clr D0
5702 move 10(A_SMP),D0
5703 cmp SRCNUM(A6),D0
5704 beq F10L113
[4f508e6]5705
5706| (smp->prv)->nxt = smp->nxt;
5707
[f40a309]5708 move.l 4(A_SMP),A0
5709 move.l (A_SMP),(A0)
[4f508e6]5710
5711| (smp->nxt)->prv = smp->prv;
5712
[f40a309]5713 move.l (A_SMP),A0
5714 move.l 4(A_SMP),4(A0)
[4f508e6]5715
5716| smp->prv = (struct sment |)vep;
5717
[f40a309]5718 move.l VEP(A6),4(A_SMP)
[4f508e6]5719
5720| smp->nxt = vep->nxt;
5721
[f40a309]5722 move.l VEP(A6),A0
5723 move.l (A0),(A_SMP)
[4f508e6]5724
5725| (vep->nxt)->prv = smp;
5726
[f40a309]5727 move.l VEP(A6),A0
5728 move.l (A0),A0
5729 move.l A_SMP,4(A0)
[4f508e6]5730
5731| vep->nxt = smp;
5732
[f40a309]5733 move.l VEP(A6),A0
5734 move.l A_SMP,(A0)
[4f508e6]5735
5736| smp->sm = srcnum;
5737
[f40a309]5738 move SRCNUM(A6),10(A_SMP)
[4f508e6]5739
5740| }
5741
5742| mltval = fp->idfmlt;
5743
[f40a309]5744F10L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]5745
[f40a309]5746 .page
[4f508e6]5747
5748| switch (fp->idfsrc) {
5749
[f40a309]5750 move.b 4(A_FP),D0
5751 ext.w d0
5752 cmp #10,D0
5753 bhi F10L122
[4f508e6]5754
[f40a309]5755 asl #2,D0
5756 lea F10L123,A0
5757 movea.l 0(A0,D0.W),A0
5758 jmp (A0)
[4f508e6]5759
5760| case SM_NONE:
5761| mltval = 0;
5762
[f40a309]5763F10L116: clr MLTVAL(A6)
[4f508e6]5764
5765| tsrcval = 0;
5766
[f40a309]5767 clr TSRCVAL(A6)
[4f508e6]5768
5769| break;
5770
[f40a309]5771 bra F10L114
[4f508e6]5772
5773| case SM_RAND:
5774| tsrcval = xgetran(mltval);
5775
[f40a309]5776F10L117: move MLTVAL(A6),(sp)
5777 jsr _xgetran
5778 move D0,TSRCVAL(A6)
[4f508e6]5779
5780| break;
5781
[f40a309]5782 bra F10L114
[4f508e6]5783
5784| case SM_PTCH:
5785| tsrcval = pch;
5786
[f40a309]5787F10L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]5788
5789| break;
5790
[f40a309]5791 bra F10L114
[4f508e6]5792
[f40a309]5793 .page
[4f508e6]5794
5795| case SM_FREQ:
5796| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
5797
[f40a309]5798F10L119: move PCH(A6),D0
5799 asr #7,D0
5800 and #255,D0
5801 move D0,A0
5802 add.l A0,A0
5803 add.l #_ptoftab,A0
5804 move (A0),TSRCVAL(A6)
[4f508e6]5805
5806| break;
5807
[f40a309]5808 bra F10L114
[4f508e6]5809
5810| case SM_KVEL:
5811| tsrcval = veltab[trg];
5812
[f40a309]5813F10L120: move TRG(A6),A0
5814 add.l A0,A0
5815 add.l #_veltab,A0
5816 move (A0),TSRCVAL(A6)
[4f508e6]5817
5818| break;
5819
[f40a309]5820 bra F10L114
[4f508e6]5821
5822| case SM_KPRS:
5823| tsrcval = prstab[trg];
5824
[f40a309]5825F10L121: move TRG(A6),A0
5826 add.l A0,A0
5827 add.l #_prstab,A0
5828 move (A0),TSRCVAL(A6)
[4f508e6]5829
5830| break;
5831
[f40a309]5832 bra F10L114
[4f508e6]5833
5834| default:
5835| tsrcval = vep->val;
5836
[f40a309]5837F10L122: move.l VEP(A6),A0
5838 move 8(A0),TSRCVAL(A6)
[4f508e6]5839
5840| }
5841
[f40a309]5842 .page
[4f508e6]5843
5844| srcval = tsrcval;
5845
[f40a309]5846F10L114: move TSRCVAL(A6),SRCVAL(A6)
[4f508e6]5847
[f40a309]5848 .page
[4f508e6]5849
5850| if (pt->ipvsrc) {
5851
[f40a309]5852F10L124: move.l PT(A6),A0
5853 tst.b 6(A0)
5854 beq F10L136
[4f508e6]5855
5856| switch (pt->ipvsrc) {
5857
[f40a309]5858 move.l PT(A6),A0
5859 move.b 6(A0),D0
5860 ext.w D0
5861 sub #1,D0
5862 cmp #9,D0
5863 bhi F10L144
[4f508e6]5864
[f40a309]5865 asl #2,D0
5866 lea F10L145,A0
5867 move.l 0(A0,D0.W),A0
5868 jmp (A0)
[4f508e6]5869
5870| case SM_RAND:
5871| ltmp = xgetran(pt_>ipvmlt);
5872
[f40a309]5873F10L139: move.l PT(A6),A0
5874 move 4(A0),(sp)
5875 jsr _xgetran
5876 ext.l D0
5877 move.l D0,LTMP(A6)
[4f508e6]5878
5879| break;
5880
[f40a309]5881 bra F10L137
[4f508e6]5882
5883| case SM_PTCH:
5884| ltmp = pch;
5885
[f40a309]5886F10L140: move PCH(A6),A0
5887 move.l A0,LTMP(A6)
[4f508e6]5888
5889| break;
5890
[f40a309]5891 bra F10L137
[4f508e6]5892
[f40a309]5893 .page
[4f508e6]5894
5895| case SM_FREQ:
5896| ltmp = ptoftab[(pch >> 7) & 0x00FF];
5897
[f40a309]5898F10L141: move PCH(A6),D0
5899 asr #7,D0
5900 and #255,D0
5901 move D0,A0
5902 add.l A0,A0
5903 move.l #_ptoftab,A1
5904 move 0(A0,A1.l),D0
5905 ext.l D0
5906 move.l D0,LTMP(A6)
[4f508e6]5907
5908| break;
5909
[f40a309]5910 bra F10L137
[4f508e6]5911
5912| case SM_KVEL:
5913| ltmp = veltab[trg];
5914
[f40a309]5915F10L142: move TRG(A6),A0
5916 add.l A0,A0
5917 move.l #_veltab,A1
5918 move 0(A0,A1.l),D0
5919 ext.l D0
5920 move.l D0,LTMP(A6)
[4f508e6]5921
5922| break;
5923
[f40a309]5924 bra F10L137
[4f508e6]5925
[f40a309]5926 .page
[4f508e6]5927
5928| case SM_KPRS:
5929| ltmp = prstab[trg];
5930
[f40a309]5931F10L143: move TRG(A6),A0
5932 add.l A0,A0
5933 move.l #_prstab,A1
5934 move 0(A0,A1.l),D0
5935 ext.l D0
5936 move.l D0,LTMP(A6)
[4f508e6]5937
5938| break;
5939
[f40a309]5940 bra F10L137
[4f508e6]5941
[f40a309]5942 .page
[4f508e6]5943
5944| default:
5945| ltmp = valents[group | pt->ipvsrc].val;
5946
[f40a309]5947F10L144: move.l PT(A6),A0
5948 clr.l D0
5949 move.b 6(A0),D0
5950 or.w GROUP(A6),D0
5951 add.l D0,D0
5952 move.l D0,D1
5953 lsl.l #2,D0
5954 add.l D1,D0
5955 move.l D0,A0
5956 move.l #_valents,A1
5957 clr.l D0
5958 move 8(A0,A1.l),D0
5959 move.l D0,LTMP(A6)
[4f508e6]5960
5961| }
5962
5963
5964 .page
5965
5966| ltmp = (ltmp | pt->ipvmlt) >> 15;
5967
[f40a309]5968F10L137: move.l PT(A6),A0
5969 move.w 4(A0),D0
5970 move.w LTMP+2(A6),D1
5971 muls D1,D0
5972 move.l #15,D1
5973 asr.l D1,D0
5974 move.l D0,LTMP(A6)
[4f508e6]5975
5976| ltmp += (long)pt->ipval;
5977
[f40a309]5978 move.l PT(A6),A0
5979 move 2(A0),D0
5980 ext.l D0
5981 add.l D0,LTMP(A6)
[4f508e6]5982
5983| if (ltmp GT (long)VALMAX)
5984| ltmp = (long)VALMAX;
5985
[f40a309]5986 cmp.l #VALMAX,LTMP(A6)
5987 ble F10L146
[4f508e6]5988
[f40a309]5989 move.l #VALMAX,LTMP(A6)
5990 bra F10L147
[4f508e6]5991
5992| else if (ltmp LT (long)VALMIN)
5993| ltmp = (long)VALMIN;
5994
[f40a309]5995F10L146: cmp.l #VALMIN,LTMP(A6)
5996 bge F10L147
[4f508e6]5997
[f40a309]5998 move.l #VALMIN,LTMP(A6)
[4f508e6]5999
6000| tfpval = (short)ltmp;
6001
[f40a309]6002F10L147: move.w LTMP+2(A6),TFPVAL(A6)
6003 bra F10L149
[4f508e6]6004
6005| } else {
6006
6007| tfpval = pt->ipval;
6008
[f40a309]6009F10L136: move.l PT(A6),A0
6010 move 2(A0),TFPVAL(A6)
[4f508e6]6011
6012| }
6013
6014 .page
6015
6016| fpmant = (((long)pt->iptom & 0x0000FFF0L)
6017| | ((long)timemlt & 0x0000FFFFL)) >> 15;
6018
[f40a309]6019F10L149: move.l PT(A6),A0
6020 move.w (A0),D0
6021 move.w D0,D2
[4f508e6]6022 andi.w #0xFFF0,D0
[f40a309]6023 move.w _timemlt,D1
6024 muls D1,D0
6025 move.l #15,D1
6026 asr.l D1,D0
6027 move D0,R_FPMANT
[4f508e6]6028
6029| fpexp = expbit[pt->iptim & 0x000F];
6030
6031 and #0x000F,D2
[f40a309]6032 move D2,A0
6033 add.l A0,A0
6034 add.l #_expbit,A0
6035 move (A0),R_FPEXP
[4f508e6]6036
[f40a309]6037 .page
[4f508e6]6038
6039| fp->idfpch = pch;
6040
[f40a309]6041F10L163: move PCH(A6),(A_FP)
[4f508e6]6042
6043| fpval = tfpval;
6044
[f40a309]6045 move TFPVAL(A6),R_FPVAL
[4f508e6]6046
[f40a309]6047 .page
[4f508e6]6048
[f40a309]6049 move.b 5(A_FP),D0
6050 ext.w D0
6051 sub.w #1,D0
6052 movea.l PT(A6),A0
[4f508e6]6053
6054| oldi = setipl(FPU_DI);
6055
[f40a309]6056 move sr,OLDI(A6)
6057 move #FPU_DI,sr
[4f508e6]6058
[f40a309]6059F10L168: clr.b 10(A0)
6060 add.l #12,a0
6061 dbra D0,F10L168
[4f508e6]6062
[f40a309]6063 .page
[4f508e6]6064
6065| fp->idftmd ^= I_NVBITS;
6066
[f40a309]6067F10L165: eor.b #24,7(A_FP)
[4f508e6]6068
6069| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
6070
[f40a309]6071 move.b 7(A_FP),R_FPCTL
6072 and #28,R_FPCTL
6073 or #3,R_FPCTL
[4f508e6]6074
6075| fp->idfcpt = fp->idfpt1;
6076
[f40a309]6077 move.b 6(A_FP),8(A_FP)
[4f508e6]6078
6079| fp->idftmd |= I_ACTIVE;
6080
[f40a309]6081 or.b #2,7(A_FP)
[4f508e6]6082
6083| fp->idftrf = trg;
6084
[f40a309]6085 move TRG(A6),10(A_FP)
[4f508e6]6086
6087| |(fpu + (long)FPU_TCV1) = srcval;
6088
6089 move SRCVAL(A6),0x8(A_FPU)
6090
6091| ++octype;
6092
[f40a309]6093 add #1,OCTYPE(A6)
[4f508e6]6094
6095| |(fpu + (long)FPU_TSF1) = mltval;
6096
6097 move MLTVAL(A6),0xA(A_FPU)
6098
6099| ++octype;
6100
[f40a309]6101 add #1,OCTYPE(A6)
[4f508e6]6102
6103| |(fpu + (long)FPU_TMNT) = fpmant;
6104
6105 move R_FPMANT,0x14(A_FPU)
6106
6107| ++octype;
6108
[f40a309]6109 add #1,OCTYPE(A6)
[4f508e6]6110
6111| |(fpu + (long)FPU_TEXP) = fpexp;
6112
6113 move R_FPEXP,0x16(A_FPU)
6114
6115| ++octype;
6116
[f40a309]6117 add #1,OCTYPE(A6)
[4f508e6]6118
[f40a309]6119 .page
[4f508e6]6120
6121| if (fp->idftmd & I_VNSUBN)
6122
[f40a309]6123 btst #3,7(A_FP)
6124 beq F10L169
[4f508e6]6125
6126| |(fpu + (long)FPU_TNV1) = fpval;
6127
6128 move R_FPVAL,0x1C(A_FPU)
[f40a309]6129 bra F10L170
[4f508e6]6130
6131| else
6132| |(fpu + (long)FPU_TNV0) = fpval;
6133
[f40a309]6134F10L169: move R_FPVAL,2(A_FPU)
[4f508e6]6135
6136| ++octype;
6137
[f40a309]6138F10L170: add #1,OCTYPE(A6)
[4f508e6]6139
6140| |(fpu + (long)FPU_TCTL) = fpctl;
6141
[f40a309]6142 move R_FPCTL,(A_FPU)
[4f508e6]6143
6144| setipl(oldi);
6145
[f40a309]6146 move OLDI(A6),sr
[4f508e6]6147
6148 .page
6149| ------------------------------------------------------------------------------
6150| Start function 11 -- Ind 6
6151| ------------------------------------------------------------------------------
6152
6153| if (ip->idhfnc[11].idftmd & I_TM_KEY) {
6154
[f40a309]6155FN11: move.l IP(A6),A0
6156 move.b 225(A0),D0
6157 move.w TAG(A6),D1
6158 eor.w D1,D0
6159 btst #0,D0
6160 bne FN11A
[4f508e6]6161
[f40a309]6162 jmp FN12
[4f508e6]6163
6164| vp = (vce << 4) + 15;
6165
[f40a309]6166FN11A: move VCE(A6),D0
6167 asl #4,D0
6168 add.w #15,D0
6169 move D0,VP(A6)
[4f508e6]6170
6171| fpu = io_fpu + FPU_OFNC + (vp << 4);
6172
[f40a309]6173 asl #5,D0
6174 ext.l D0
6175 move.l D0,A_FPU
[4f508e6]6176 add.l #_io_fpu+0x4000,A_FPU
6177
6178| fp = &ip->idhfnc[11];
6179
[f40a309]6180 move.l #132,A_FP
6181 add.l IP(A6),A_FP
6182 add.l #86,A_FP
[4f508e6]6183
6184| pt = &ip->idhpnt[fp->idfpt1];
6185
[f40a309]6186 clr.l D0
6187 move.b 6(A_FP),D0
6188 lsl.l #2,D0
6189 move.l D0,D1
6190 add.l D0,D0
6191 add.l D1,D0
6192 add.l IP(A6),D0
6193 add.l #242,D0
6194 move.l D0,PT(A6)
[4f508e6]6195
[f40a309]6196 .page
[4f508e6]6197
6198| srcnum = group | fp->idfsrc;
6199
[f40a309]6200 move.w GROUP(A6),D0
6201 ext.l D0
6202 clr.l D1
6203 move.b 4(A_FP),D1
6204 or D1,D0
6205 move D0,SRCNUM(A6)
[4f508e6]6206
6207| vep = &valents[srcnum];
6208
[f40a309]6209 add.l D0,D0
6210 move.l D0,D1
6211 lsl.l #2,D0
6212 add.l D1,D0
6213 add.l #_valents,D0
6214 move.l D0,VEP(A6)
[4f508e6]6215
6216| smp = vpsms[vp];
6217
[f40a309]6218 move VP(A6),A0
6219 add.l A0,A0
6220 add.l A0,A0
6221 add.l #_vpsms,A0
6222 move.l (A0),A_SMP
[4f508e6]6223
6224| if (srcnum NE smp->sm) {
6225
[f40a309]6226 clr D0
6227 move 10(A_SMP),D0
6228 cmp SRCNUM(A6),D0
6229 beq F11L113
[4f508e6]6230
6231| (smp->prv)->nxt = smp->nxt;
6232
[f40a309]6233 move.l 4(A_SMP),A0
6234 move.l (A_SMP),(A0)
[4f508e6]6235
6236| (smp->nxt)->prv = smp->prv;
6237
[f40a309]6238 move.l (A_SMP),A0
6239 move.l 4(A_SMP),4(A0)
[4f508e6]6240
6241| smp->prv = (struct sment |)vep;
6242
[f40a309]6243 move.l VEP(A6),4(A_SMP)
[4f508e6]6244
6245| smp->nxt = vep->nxt;
6246
[f40a309]6247 move.l VEP(A6),A0
6248 move.l (A0),(A_SMP)
[4f508e6]6249
6250| (vep->nxt)->prv = smp;
6251
[f40a309]6252 move.l VEP(A6),A0
6253 move.l (A0),A0
6254 move.l A_SMP,4(A0)
[4f508e6]6255
6256| vep->nxt = smp;
6257
[f40a309]6258 move.l VEP(A6),A0
6259 move.l A_SMP,(A0)
[4f508e6]6260
6261| smp->sm = srcnum;
6262
[f40a309]6263 move SRCNUM(A6),10(A_SMP)
[4f508e6]6264
6265| }
6266
6267| mltval = fp->idfmlt;
6268
[f40a309]6269F11L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]6270
[f40a309]6271 .page
[4f508e6]6272
6273| switch (fp->idfsrc) {
6274
[f40a309]6275 move.b 4(A_FP),D0
6276 ext.w d0
6277 cmp #10,D0
6278 bhi F11L122
[4f508e6]6279
[f40a309]6280 asl #2,D0
6281 lea F11L123,A0
6282 movea.l 0(A0,D0.W),A0
6283 jmp (A0)
[4f508e6]6284
6285| case SM_NONE:
6286| mltval = 0;
6287
[f40a309]6288F11L116: clr MLTVAL(A6)
[4f508e6]6289
6290| tsrcval = 0;
6291
[f40a309]6292 clr TSRCVAL(A6)
[4f508e6]6293
6294| break;
6295
[f40a309]6296 bra F11L114
[4f508e6]6297
6298| case SM_RAND:
6299| tsrcval = xgetran(mltval);
6300
[f40a309]6301F11L117: move MLTVAL(A6),(sp)
6302 jsr _xgetran
6303 move D0,TSRCVAL(A6)
[4f508e6]6304
6305| break;
6306
[f40a309]6307 bra F11L114
[4f508e6]6308
6309| case SM_PTCH:
6310| tsrcval = pch;
6311
[f40a309]6312F11L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]6313
6314| break;
6315
[f40a309]6316 bra F11L114
[4f508e6]6317
[f40a309]6318 .page
[4f508e6]6319
6320| case SM_FREQ:
6321| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
6322
[f40a309]6323F11L119: move PCH(A6),D0
6324 asr #7,D0
6325 and #255,D0
6326 move D0,A0
6327 add.l A0,A0
6328 add.l #_ptoftab,A0
6329 move (A0),TSRCVAL(A6)
[4f508e6]6330
6331| break;
6332
[f40a309]6333 bra F11L114
[4f508e6]6334
6335| case SM_KVEL:
6336| tsrcval = veltab[trg];
6337
[f40a309]6338F11L120: move TRG(A6),A0
6339 add.l A0,A0
6340 add.l #_veltab,A0
6341 move (A0),TSRCVAL(A6)
[4f508e6]6342
6343| break;
6344
[f40a309]6345 bra F11L114
[4f508e6]6346
6347| case SM_KPRS:
6348| tsrcval = prstab[trg];
6349
[f40a309]6350F11L121: move TRG(A6),A0
6351 add.l A0,A0
6352 add.l #_prstab,A0
6353 move (A0),TSRCVAL(A6)
[4f508e6]6354
6355| break;
6356
[f40a309]6357 bra F11L114
[4f508e6]6358
6359| default:
6360| tsrcval = vep->val;
6361
[f40a309]6362F11L122: move.l VEP(A6),A0
6363 move 8(A0),TSRCVAL(A6)
[4f508e6]6364
6365| }
6366
[f40a309]6367 .page
[4f508e6]6368
6369| srcval = tsrcval;
6370
[f40a309]6371F11L114: move TSRCVAL(A6),SRCVAL(A6)
[4f508e6]6372
[f40a309]6373 .page
[4f508e6]6374
6375| if (pt->ipvsrc) {
6376
[f40a309]6377F11L124: move.l PT(A6),A0
6378 tst.b 6(A0)
6379 beq F11L136
[4f508e6]6380
6381| switch (pt->ipvsrc) {
6382
[f40a309]6383 move.l PT(A6),A0
6384 move.b 6(A0),D0
6385 ext.w D0
6386 sub #1,D0
6387 cmp #9,D0
6388 bhi F11L144
[4f508e6]6389
[f40a309]6390 asl #2,D0
6391 lea F11L145,A0
6392 move.l 0(A0,D0.W),A0
6393 jmp (A0)
[4f508e6]6394
6395| case SM_RAND:
6396| ltmp = xgetran(pt_>ipvmlt);
6397
[f40a309]6398F11L139: move.l PT(A6),A0
6399 move 4(A0),(sp)
6400 jsr _xgetran
6401 ext.l D0
6402 move.l D0,LTMP(A6)
[4f508e6]6403
6404| break;
6405
[f40a309]6406 bra F11L137
[4f508e6]6407
6408| case SM_PTCH:
6409| ltmp = pch;
6410
[f40a309]6411F11L140: move PCH(A6),A0
6412 move.l A0,LTMP(A6)
[4f508e6]6413
6414| break;
6415
[f40a309]6416 bra F11L137
[4f508e6]6417
[f40a309]6418 .page
[4f508e6]6419
6420| case SM_FREQ:
6421| ltmp = ptoftab[(pch >> 7) & 0x00FF];
6422
[f40a309]6423F11L141: move PCH(A6),D0
6424 asr #7,D0
6425 and #255,D0
6426 move D0,A0
6427 add.l A0,A0
6428 move.l #_ptoftab,A1
6429 move 0(A0,A1.l),D0
6430 ext.l D0
6431 move.l D0,LTMP(A6)
[4f508e6]6432
6433| break;
6434
[f40a309]6435 bra F11L137
[4f508e6]6436
6437| case SM_KVEL:
6438| ltmp = veltab[trg];
6439
[f40a309]6440F11L142: move TRG(A6),A0
6441 add.l A0,A0
6442 move.l #_veltab,A1
6443 move 0(A0,A1.l),D0
6444 ext.l D0
6445 move.l D0,LTMP(A6)
[4f508e6]6446
6447| break;
6448
[f40a309]6449 bra F11L137
[4f508e6]6450
[f40a309]6451 .page
[4f508e6]6452
6453| case SM_KPRS:
6454| ltmp = prstab[trg];
6455
[f40a309]6456F11L143: move TRG(A6),A0
6457 add.l A0,A0
6458 move.l #_prstab,A1
6459 move 0(A0,A1.l),D0
6460 ext.l D0
6461 move.l D0,LTMP(A6)
[4f508e6]6462
6463| break;
6464
[f40a309]6465 bra F11L137
[4f508e6]6466
[f40a309]6467 .page
[4f508e6]6468
6469| default:
6470| ltmp = valents[group | pt->ipvsrc].val;
6471
[f40a309]6472F11L144: move.l PT(A6),A0
6473 clr.l D0
6474 move.b 6(A0),D0
6475 or.w GROUP(A6),D0
6476 add.l D0,D0
6477 move.l D0,D1
6478 lsl.l #2,D0
6479 add.l D1,D0
6480 move.l D0,A0
6481 move.l #_valents,A1
6482 clr.l D0
6483 move 8(A0,A1.l),D0
6484 move.l D0,LTMP(A6)
[4f508e6]6485
6486| }
6487
6488
6489 .page
6490
6491| ltmp = (ltmp | pt->ipvmlt) >> 15;
6492
[f40a309]6493F11L137: move.l PT(A6),A0
6494 move.w 4(A0),D0
6495 move.w LTMP+2(A6),D1
6496 muls D1,D0
6497 move.l #15,D1
6498 asr.l D1,D0
6499 move.l D0,LTMP(A6)
[4f508e6]6500
6501| ltmp += (long)pt->ipval;
6502
[f40a309]6503 move.l PT(A6),A0
6504 move 2(A0),D0
6505 ext.l D0
6506 add.l D0,LTMP(A6)
[4f508e6]6507
6508| if (ltmp GT (long)VALMAX)
6509| ltmp = (long)VALMAX;
6510
[f40a309]6511 cmp.l #VALMAX,LTMP(A6)
6512 ble F11L146
[4f508e6]6513
[f40a309]6514 move.l #VALMAX,LTMP(A6)
6515 bra F11L147
[4f508e6]6516
6517| else if (ltmp LT (long)VALMIN)
6518| ltmp = (long)VALMIN;
6519
[f40a309]6520F11L146: cmp.l #VALMIN,LTMP(A6)
6521 bge F11L147
[4f508e6]6522
[f40a309]6523 move.l #VALMIN,LTMP(A6)
[4f508e6]6524
6525| tfpval = (short)ltmp;
6526
[f40a309]6527F11L147: move.w LTMP+2(A6),TFPVAL(A6)
6528 bra F11L149
[4f508e6]6529
6530| } else {
6531
6532| tfpval = pt->ipval;
6533
[f40a309]6534F11L136: move.l PT(A6),A0
6535 move 2(A0),TFPVAL(A6)
[4f508e6]6536
6537| }
6538
6539 .page
6540
6541| fpmant = (((long)pt->iptom & 0x0000FFF0L)
6542| | ((long)timemlt & 0x0000FFFFL)) >> 15;
6543
[f40a309]6544F11L149: move.l PT(A6),A0
6545 move.w (A0),D0
6546 move.w D0,D2
[4f508e6]6547 andi.w #0xFFF0,D0
[f40a309]6548 move.w _timemlt,D1
6549 muls D1,D0
6550 move.l #15,D1
6551 asr.l D1,D0
6552 move D0,R_FPMANT
[4f508e6]6553
6554| fpexp = expbit[pt->iptim & 0x000F];
6555
6556 and #0x000F,D2
[f40a309]6557 move D2,A0
6558 add.l A0,A0
6559 add.l #_expbit,A0
6560 move (A0),R_FPEXP
[4f508e6]6561
[f40a309]6562 .page
[4f508e6]6563
6564| fp->idfpch = pch;
6565
[f40a309]6566F11L163: move PCH(A6),(A_FP)
[4f508e6]6567
6568| fpval = tfpval;
6569
[f40a309]6570 move TFPVAL(A6),R_FPVAL
[4f508e6]6571
[f40a309]6572 .page
[4f508e6]6573
[f40a309]6574 move.b 5(A_FP),D0
6575 ext.w D0
6576 sub.w #1,D0
6577 movea.l PT(A6),A0
[4f508e6]6578
6579| oldi = setipl(FPU_DI);
6580
[f40a309]6581 move sr,OLDI(A6)
6582 move #FPU_DI,sr
[4f508e6]6583
[f40a309]6584F11L168: clr.b 10(A0)
6585 add.l #12,a0
6586 dbra D0,F11L168
[4f508e6]6587
[f40a309]6588 .page
[4f508e6]6589
6590| fp->idftmd ^= I_NVBITS;
6591
[f40a309]6592F11L165: eor.b #24,7(A_FP)
[4f508e6]6593
6594| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
6595
[f40a309]6596 move.b 7(A_FP),R_FPCTL
6597 and #28,R_FPCTL
6598 or #3,R_FPCTL
[4f508e6]6599
6600| fp->idfcpt = fp->idfpt1;
6601
[f40a309]6602 move.b 6(A_FP),8(A_FP)
[4f508e6]6603
6604| fp->idftmd |= I_ACTIVE;
6605
[f40a309]6606 or.b #2,7(A_FP)
[4f508e6]6607
6608| fp->idftrf = trg;
6609
[f40a309]6610 move TRG(A6),10(A_FP)
[4f508e6]6611
6612| |(fpu + (long)FPU_TCV1) = srcval;
6613
6614 move SRCVAL(A6),0x8(A_FPU)
6615
6616| ++octype;
6617
[f40a309]6618 add #1,OCTYPE(A6)
[4f508e6]6619
6620| |(fpu + (long)FPU_TSF1) = mltval;
6621
6622 move MLTVAL(A6),0xA(A_FPU)
6623
6624| ++octype;
6625
[f40a309]6626 add #1,OCTYPE(A6)
[4f508e6]6627
6628| |(fpu + (long)FPU_TMNT) = fpmant;
6629
6630 move R_FPMANT,0x14(A_FPU)
6631
6632| ++octype;
6633
[f40a309]6634 add #1,OCTYPE(A6)
[4f508e6]6635
6636| |(fpu + (long)FPU_TEXP) = fpexp;
6637
6638 move R_FPEXP,0x16(A_FPU)
6639
6640| ++octype;
6641
[f40a309]6642 add #1,OCTYPE(A6)
[4f508e6]6643
[f40a309]6644 .page
[4f508e6]6645
6646| if (fp->idftmd & I_VNSUBN)
6647
[f40a309]6648 btst #3,7(A_FP)
6649 beq F11L169
[4f508e6]6650
6651| |(fpu + (long)FPU_TNV1) = fpval;
6652
6653 move R_FPVAL,0x1C(A_FPU)
[f40a309]6654 bra F11L170
[4f508e6]6655
6656| else
6657| |(fpu + (long)FPU_TNV0) = fpval;
6658
[f40a309]6659F11L169: move R_FPVAL,2(A_FPU)
[4f508e6]6660
6661| ++octype;
6662
[f40a309]6663F11L170: add #1,OCTYPE(A6)
[4f508e6]6664
6665| |(fpu + (long)FPU_TCTL) = fpctl;
6666
[f40a309]6667 move R_FPCTL,(A_FPU)
[4f508e6]6668
6669| setipl(oldi);
6670
[f40a309]6671 move OLDI(A6),sr
[4f508e6]6672
6673 .page
6674| ------------------------------------------------------------------------------
6675| Start function 12 -- Level
6676| ------------------------------------------------------------------------------
6677
6678| if (ip->idhfnc[12].idftmd & I_TM_KEY) {
6679
[f40a309]6680FN12: move.l IP(A6),A0
6681 move.b 237(A0),D0
6682 move.w TAG(A6),D1
6683 eor.w D1,D0
6684 btst #0,D0
6685 bne FN12A
[4f508e6]6686
[f40a309]6687 jmp FNEXIT
[4f508e6]6688
6689| vp = (vce << 4) + 2;
6690
[f40a309]6691FN12A: move VCE(A6),D0
6692 asl #4,D0
6693 add.w #2,D0
6694 move D0,VP(A6)
[4f508e6]6695
6696| fpu = io_fpu + FPU_OFNC + (vp << 4);
6697
[f40a309]6698 asl #5,D0
6699 ext.l D0
6700 move.l D0,A_FPU
[4f508e6]6701 add.l #_io_fpu+0x4000,A_FPU
6702
6703| fp = &ip->idhfnc[12];
6704
[f40a309]6705 move.l #144,A_FP
6706 add.l IP(A6),A_FP
6707 add.l #86,A_FP
[4f508e6]6708
6709| pt = &ip->idhpnt[fp->idfpt1];
6710
[f40a309]6711 clr.l D0
6712 move.b 6(A_FP),D0
6713 lsl.l #2,D0
6714 move.l D0,D1
6715 add.l D0,D0
6716 add.l D1,D0
6717 add.l IP(A6),D0
6718 add.l #242,D0
6719 move.l D0,PT(A6)
[4f508e6]6720
[f40a309]6721 .page
[4f508e6]6722
6723| srcnum = group | fp->idfsrc;
6724
[f40a309]6725 move.w GROUP(A6),D0
6726 ext.l D0
6727 clr.l D1
6728 move.b 4(A_FP),D1
6729 or D1,D0
6730 move D0,SRCNUM(A6)
[4f508e6]6731
6732| vep = &valents[srcnum];
6733
[f40a309]6734 add.l D0,D0
6735 move.l D0,D1
6736 lsl.l #2,D0
6737 add.l D1,D0
6738 add.l #_valents,D0
6739 move.l D0,VEP(A6)
[4f508e6]6740
6741| smp = vpsms[vp];
6742
[f40a309]6743 move VP(A6),A0
6744 add.l A0,A0
6745 add.l A0,A0
6746 add.l #_vpsms,A0
6747 move.l (A0),A_SMP
[4f508e6]6748
6749| if (srcnum NE smp->sm) {
6750
[f40a309]6751 clr D0
6752 move 10(A_SMP),D0
6753 cmp SRCNUM(A6),D0
6754 beq F12L113
[4f508e6]6755
6756| (smp->prv)->nxt = smp->nxt;
6757
[f40a309]6758 move.l 4(A_SMP),A0
6759 move.l (A_SMP),(A0)
[4f508e6]6760
6761| (smp->nxt)->prv = smp->prv;
6762
[f40a309]6763 move.l (A_SMP),A0
6764 move.l 4(A_SMP),4(A0)
[4f508e6]6765
6766| smp->prv = (struct sment |)vep;
6767
[f40a309]6768 move.l VEP(A6),4(A_SMP)
[4f508e6]6769
6770| smp->nxt = vep->nxt;
6771
[f40a309]6772 move.l VEP(A6),A0
6773 move.l (A0),(A_SMP)
[4f508e6]6774
6775| (vep->nxt)->prv = smp;
6776
[f40a309]6777 move.l VEP(A6),A0
6778 move.l (A0),A0
6779 move.l A_SMP,4(A0)
[4f508e6]6780
6781| vep->nxt = smp;
6782
[f40a309]6783 move.l VEP(A6),A0
6784 move.l A_SMP,(A0)
[4f508e6]6785
6786| smp->sm = srcnum;
6787
[f40a309]6788 move SRCNUM(A6),10(A_SMP)
[4f508e6]6789
6790| }
6791
6792| mltval = fp->idfmlt;
6793
[f40a309]6794F12L113: move 2(A_FP),MLTVAL(A6)
[4f508e6]6795
[f40a309]6796 .page
[4f508e6]6797
6798| switch (fp->idfsrc) {
6799
[f40a309]6800 move.b 4(A_FP),D0
6801 ext.w d0
6802 cmp #10,D0
6803 bhi F12L122
[4f508e6]6804
[f40a309]6805 asl #2,D0
6806 lea F12L123,A0
6807 movea.l 0(A0,D0.W),A0
6808 jmp (A0)
[4f508e6]6809
6810| case SM_NONE:
6811| mltval = 0;
6812
[f40a309]6813F12L116: clr MLTVAL(A6)
[4f508e6]6814
6815| tsrcval = 0;
6816
[f40a309]6817 clr TSRCVAL(A6)
[4f508e6]6818
6819| break;
6820
[f40a309]6821 bra F12L114
[4f508e6]6822
6823| case SM_RAND:
6824| tsrcval = xgetran(mltval);
6825
[f40a309]6826F12L117: move MLTVAL(A6),(sp)
6827 jsr _xgetran
6828 move D0,TSRCVAL(A6)
[4f508e6]6829
6830| break;
6831
[f40a309]6832 bra F12L114
[4f508e6]6833
6834| case SM_PTCH:
6835| tsrcval = pch;
6836
[f40a309]6837F12L118: move PCH(A6),TSRCVAL(A6)
[4f508e6]6838
6839| break;
6840
[f40a309]6841 bra F12L114
[4f508e6]6842
[f40a309]6843 .page
[4f508e6]6844
6845| case SM_FREQ:
6846| tsrcval = ptoftab[(pch >> 7) & 0x00FF];
6847
[f40a309]6848F12L119: move PCH(A6),D0
6849 asr #7,D0
6850 and #255,D0
6851 move D0,A0
6852 add.l A0,A0
6853 add.l #_ptoftab,A0
6854 move (A0),TSRCVAL(A6)
[4f508e6]6855
6856| break;
6857
[f40a309]6858 bra F12L114
[4f508e6]6859
6860| case SM_KVEL:
6861| tsrcval = veltab[trg];
6862
[f40a309]6863F12L120: move TRG(A6),A0
6864 add.l A0,A0
6865 add.l #_veltab,A0
6866 move (A0),TSRCVAL(A6)
[4f508e6]6867
6868| break;
6869
[f40a309]6870 bra F12L114
[4f508e6]6871
6872| case SM_KPRS:
6873| tsrcval = prstab[trg];
6874
[f40a309]6875F12L121: move TRG(A6),A0
6876 add.l A0,A0
6877 add.l #_prstab,A0
6878 move (A0),TSRCVAL(A6)
[4f508e6]6879
6880| break;
6881
[f40a309]6882 bra F12L114
[4f508e6]6883
6884| default:
6885| tsrcval = vep->val;
6886
[f40a309]6887F12L122: move.l VEP(A6),A0
6888 move 8(A0),TSRCVAL(A6)
[4f508e6]6889
6890| }
6891
[f40a309]6892 .page
[4f508e6]6893
6894| srcval = tsrcval;
6895
[f40a309]6896F12L114: move TSRCVAL(A6),SRCVAL(A6)
[4f508e6]6897
[f40a309]6898 .page
[4f508e6]6899
6900| if (pt->ipvsrc) {
6901
[f40a309]6902F12L124: move.l PT(A6),A0
6903 tst.b 6(A0)
6904 beq F12L136
[4f508e6]6905
6906| switch (pt->ipvsrc) {
6907
[f40a309]6908 move.l PT(A6),A0
6909 move.b 6(A0),D0
6910 ext.w D0
6911 sub #1,D0
6912 cmp #9,D0
6913 bhi F12L144
[4f508e6]6914
[f40a309]6915 asl #2,D0
6916 lea F12L145,A0
6917 move.l 0(A0,D0.W),A0
6918 jmp (A0)
[4f508e6]6919
6920| case SM_RAND:
6921| ltmp = xgetran(pt_>ipvmlt);
6922
[f40a309]6923F12L139: move.l PT(A6),A0
6924 move 4(A0),(sp)
6925 jsr _xgetran
6926 ext.l D0
6927 move.l D0,LTMP(A6)
[4f508e6]6928
6929| break;
6930
[f40a309]6931 bra F12L137
[4f508e6]6932
6933| case SM_PTCH:
6934| ltmp = pch;
6935
[f40a309]6936F12L140: move PCH(A6),A0
6937 move.l A0,LTMP(A6)
[4f508e6]6938
6939| break;
6940
[f40a309]6941 bra F12L137
[4f508e6]6942
[f40a309]6943 .page
[4f508e6]6944
6945| case SM_FREQ:
6946| ltmp = ptoftab[(pch >> 7) & 0x00FF];
6947
[f40a309]6948F12L141: move PCH(A6),D0
6949 asr #7,D0
6950 and #255,D0
6951 move D0,A0
6952 add.l A0,A0
6953 move.l #_ptoftab,A1
6954 move 0(A0,A1.l),D0
6955 ext.l D0
6956 move.l D0,LTMP(A6)
[4f508e6]6957
6958| break;
6959
[f40a309]6960 bra F12L137
[4f508e6]6961
6962| case SM_KVEL:
6963| ltmp = veltab[trg];
6964
[f40a309]6965F12L142: move TRG(A6),A0
6966 add.l A0,A0
6967 move.l #_veltab,A1
6968 move 0(A0,A1.l),D0
6969 ext.l D0
6970 move.l D0,LTMP(A6)
[4f508e6]6971
6972| break;
6973
[f40a309]6974 bra F12L137
[4f508e6]6975
[f40a309]6976 .page
[4f508e6]6977
6978| case SM_KPRS:
6979| ltmp = prstab[trg];
6980
[f40a309]6981F12L143: move TRG(A6),A0
6982 add.l A0,A0
6983 move.l #_prstab,A1
6984 move 0(A0,A1.l),D0
6985 ext.l D0
6986 move.l D0,LTMP(A6)
[4f508e6]6987
6988| break;
6989
[f40a309]6990 bra F12L137
[4f508e6]6991
[f40a309]6992 .page
[4f508e6]6993
6994| default:
6995| ltmp = valents[group | pt->ipvsrc].val;
6996
[f40a309]6997F12L144: move.l PT(A6),A0
6998 clr.l D0
6999 move.b 6(A0),D0
7000 or.w GROUP(A6),D0
7001 add.l D0,D0
7002 move.l D0,D1
7003 lsl.l #2,D0
7004 add.l D1,D0
7005 move.l D0,A0
7006 move.l #_valents,A1
7007 clr.l D0
7008 move 8(A0,A1.l),D0
7009 move.l D0,LTMP(A6)
[4f508e6]7010
7011| }
7012
7013
7014 .page
7015
7016| ltmp = (ltmp | pt->ipvmlt) >> 15;
7017
[f40a309]7018F12L137: move.l PT(A6),A0
7019 move.w 4(A0),D0
7020 move.w LTMP+2(A6),D1
7021 muls D1,D0
7022 move.l #15,D1
7023 asr.l D1,D0
7024 move.l D0,LTMP(A6)
[4f508e6]7025
7026| ltmp += (long)pt->ipval;
7027
[f40a309]7028 move.l PT(A6),A0
7029 move 2(A0),D0
7030 ext.l D0
7031 add.l D0,LTMP(A6)
[4f508e6]7032
7033| if (ltmp GT (long)VALMAX)
7034| ltmp = (long)VALMAX;
7035
[f40a309]7036 cmp.l #VALMAX,LTMP(A6)
7037 ble F12L146
[4f508e6]7038
[f40a309]7039 move.l #VALMAX,LTMP(A6)
7040 bra F12L147
[4f508e6]7041
7042| else if (ltmp LT (long)VALMIN)
7043| ltmp = (long)VALMIN;
7044
[f40a309]7045F12L146: cmp.l #VALMIN,LTMP(A6)
7046 bge F12L147
[4f508e6]7047
[f40a309]7048 move.l #VALMIN,LTMP(A6)
[4f508e6]7049
7050| tfpval = (short)ltmp;
7051
[f40a309]7052F12L147: move.w LTMP+2(A6),TFPVAL(A6)
7053 bra F12L149
[4f508e6]7054
7055| } else {
7056
7057| tfpval = pt->ipval;
7058
[f40a309]7059F12L136: move.l PT(A6),A0
7060 move 2(A0),TFPVAL(A6)
[4f508e6]7061
7062| }
7063
7064 .page
7065
7066| fpmant = (((long)pt->iptom & 0x0000FFF0L)
7067| | ((long)timemlt & 0x0000FFFFL)) >> 15;
7068
[f40a309]7069F12L149: move.l PT(A6),A0
7070 move.w (A0),D0
7071 move.w D0,D2
[4f508e6]7072 andi.w #0xFFF0,D0
[f40a309]7073 move.w _timemlt,D1
7074 muls D1,D0
7075 move.l #15,D1
7076 asr.l D1,D0
7077 move D0,R_FPMANT
[4f508e6]7078
7079| fpexp = expbit[pt->iptim & 0x000F];
7080
7081 and #0x000F,D2
[f40a309]7082 move D2,A0
7083 add.l A0,A0
7084 add.l #_expbit,A0
7085 move (A0),R_FPEXP
[4f508e6]7086
[f40a309]7087 .page
[4f508e6]7088
7089| fp->idfpch = pch;
7090
[f40a309]7091F12L162: move PCH(A6),(A_FP)
[4f508e6]7092
7093| fpval = ((tfpval >> 5) - 500) << 6;
7094
[f40a309]7095 move TFPVAL(A6),R_FPVAL
7096 asr #5,R_FPVAL
7097 add #-500,R_FPVAL
7098 asl #6,R_FPVAL
[4f508e6]7099
[f40a309]7100 .page
[4f508e6]7101
[f40a309]7102 move.b 5(A_FP),D0
7103 ext.w D0
7104 sub.w #1,D0
7105 movea.l PT(A6),A0
[4f508e6]7106
7107| oldi = setipl(FPU_DI);
7108
[f40a309]7109 move sr,OLDI(A6)
7110 move #FPU_DI,sr
[4f508e6]7111
[f40a309]7112F12L168: clr.b 10(A0)
7113 add.l #12,a0
7114 dbra D0,F12L168
[4f508e6]7115
[f40a309]7116 .page
[4f508e6]7117
7118| fp->idftmd ^= I_NVBITS;
7119
[f40a309]7120F12L165: eor.b #24,7(A_FP)
[4f508e6]7121
7122| fpctl = (fp->idftmd & (I_NRATIO | I_NVBITS)) | 0x0003;
7123
[f40a309]7124 move.b 7(A_FP),R_FPCTL
7125 and #28,R_FPCTL
7126 or #3,R_FPCTL
[4f508e6]7127
7128| fp->idfcpt = fp->idfpt1;
7129
[f40a309]7130 move.b 6(A_FP),8(A_FP)
[4f508e6]7131
7132| fp->idftmd |= I_ACTIVE;
7133
[f40a309]7134 or.b #2,7(A_FP)
[4f508e6]7135
7136| fp->idftrf = trg;
7137
[f40a309]7138 move TRG(A6),10(A_FP)
[4f508e6]7139
7140| |(fpu + (long)FPU_TCV1) = srcval;
7141
7142 move SRCVAL(A6),0x8(A_FPU)
7143
7144| ++octype;
7145
[f40a309]7146 add #1,OCTYPE(A6)
[4f508e6]7147
7148| |(fpu + (long)FPU_TSF1) = mltval;
7149
7150 move MLTVAL(A6),0xA(A_FPU)
7151
7152| ++octype;
7153
[f40a309]7154 add #1,OCTYPE(A6)
[4f508e6]7155
7156| |(fpu + (long)FPU_TMNT) = fpmant;
7157
7158 move R_FPMANT,0x14(A_FPU)
7159
7160| ++octype;
7161
[f40a309]7162 add #1,OCTYPE(A6)
[4f508e6]7163
7164| |(fpu + (long)FPU_TEXP) = fpexp;
7165
7166 move R_FPEXP,0x16(A_FPU)
7167
7168| ++octype;
7169
[f40a309]7170 add #1,OCTYPE(A6)
[4f508e6]7171
[f40a309]7172 .page
[4f508e6]7173
7174| if (fp->idftmd & I_VNSUBN)
7175
[f40a309]7176 btst #3,7(A_FP)
7177 beq F12L169
[4f508e6]7178
7179| |(fpu + (long)FPU_TNV1) = fpval;
7180
7181 move R_FPVAL,0x1C(A_FPU)
[f40a309]7182 bra F12L170
[4f508e6]7183
7184| else
7185| |(fpu + (long)FPU_TNV0) = fpval;
7186
[f40a309]7187F12L169: move R_FPVAL,2(A_FPU)
[4f508e6]7188
7189| ++octype;
7190
[f40a309]7191F12L170: add #1,OCTYPE(A6)
[4f508e6]7192
7193| |(fpu + (long)FPU_TCTL) = fpctl;
7194
[f40a309]7195 move R_FPCTL,(A_FPU)
[4f508e6]7196
7197| setipl(oldi);
7198
[f40a309]7199 move OLDI(A6),sr
[4f508e6]7200
7201| }
7202
[f40a309]7203 .page
[4f508e6]7204
[f40a309]7205FNEXIT: tst.l (sp)+
7206 movem.l (sp)+,R_FPVAL-R_FPMANT/A_SMP-A_FP
7207 unlk A6
7208 rts
[4f508e6]7209
7210| }
7211
[f40a309]7212 .page
[4f508e6]7213
[f40a309]7214 .data
[4f508e6]7215
7216| Jump tables for switch statements
7217| ---------------------------------
7218
[f40a309]7219F00L123: .dc.l F00L116
7220 .dc.l F00L117
7221 .dc.l F00L122
7222 .dc.l F00L122
7223 .dc.l F00L122
7224 .dc.l F00L118
7225 .dc.l F00L121
7226 .dc.l F00L120
7227 .dc.l F00L122
7228 .dc.l F00L122
7229 .dc.l F00L119
[4f508e6]7230
[f40a309]7231F00L145: .dc.l F00L139
7232 .dc.l F00L144
7233 .dc.l F00L144
7234 .dc.l F00L144
7235 .dc.l F00L140
7236 .dc.l F00L143
7237 .dc.l F00L142
7238 .dc.l F00L144
7239 .dc.l F00L144
7240 .dc.l F00L141
[4f508e6]7241
[f40a309]7242F01L123: .dc.l F01L116
7243 .dc.l F01L117
7244 .dc.l F01L122
7245 .dc.l F01L122
7246 .dc.l F01L122
7247 .dc.l F01L118
7248 .dc.l F01L121
7249 .dc.l F01L120
7250 .dc.l F01L122
7251 .dc.l F01L122
7252 .dc.l F01L119
[4f508e6]7253
[f40a309]7254F01L145: .dc.l F01L139
7255 .dc.l F01L144
7256 .dc.l F01L144
7257 .dc.l F01L144
7258 .dc.l F01L140
7259 .dc.l F01L143
7260 .dc.l F01L142
7261 .dc.l F01L144
7262 .dc.l F01L144
7263 .dc.l F01L141
[4f508e6]7264
[f40a309]7265F02L123: .dc.l F02L116
7266 .dc.l F02L117
7267 .dc.l F02L122
7268 .dc.l F02L122
7269 .dc.l F02L122
7270 .dc.l F02L118
7271 .dc.l F02L121
7272 .dc.l F02L120
7273 .dc.l F02L122
7274 .dc.l F02L122
7275 .dc.l F02L119
[4f508e6]7276
[f40a309]7277F02L145: .dc.l F02L139
7278 .dc.l F02L144
7279 .dc.l F02L144
7280 .dc.l F02L144
7281 .dc.l F02L140
7282 .dc.l F02L143
7283 .dc.l F02L142
7284 .dc.l F02L144
7285 .dc.l F02L144
7286 .dc.l F02L141
[4f508e6]7287
[f40a309]7288F03L123: .dc.l F03L116
7289 .dc.l F03L117
7290 .dc.l F03L122
7291 .dc.l F03L122
7292 .dc.l F03L122
7293 .dc.l F03L118
7294 .dc.l F03L121
7295 .dc.l F03L120
7296 .dc.l F03L122
7297 .dc.l F03L122
7298 .dc.l F03L119
[4f508e6]7299
[f40a309]7300F03L145: .dc.l F03L139
7301 .dc.l F03L144
7302 .dc.l F03L144
7303 .dc.l F03L144
7304 .dc.l F03L140
7305 .dc.l F03L143
7306 .dc.l F03L142
7307 .dc.l F03L144
7308 .dc.l F03L144
7309 .dc.l F03L141
[4f508e6]7310
[f40a309]7311F04L123: .dc.l F04L116
7312 .dc.l F04L117
7313 .dc.l F04L122
7314 .dc.l F04L122
7315 .dc.l F04L122
7316 .dc.l F04L118
7317 .dc.l F04L121
7318 .dc.l F04L120
7319 .dc.l F04L122
7320 .dc.l F04L122
7321 .dc.l F04L119
[4f508e6]7322
[f40a309]7323F04L145: .dc.l F04L139
7324 .dc.l F04L144
7325 .dc.l F04L144
7326 .dc.l F04L144
7327 .dc.l F04L140
7328 .dc.l F04L143
7329 .dc.l F04L142
7330 .dc.l F04L144
7331 .dc.l F04L144
7332 .dc.l F04L141
[4f508e6]7333
[f40a309]7334F05L123: .dc.l F05L116
7335 .dc.l F05L117
7336 .dc.l F05L122
7337 .dc.l F05L122
7338 .dc.l F05L122
7339 .dc.l F05L118
7340 .dc.l F05L121
7341 .dc.l F05L120
7342 .dc.l F05L122
7343 .dc.l F05L122
7344 .dc.l F05L119
[4f508e6]7345
[f40a309]7346F05L145: .dc.l F05L139
7347 .dc.l F05L144
7348 .dc.l F05L144
7349 .dc.l F05L144
7350 .dc.l F05L140
7351 .dc.l F05L143
7352 .dc.l F05L142
7353 .dc.l F05L144
7354 .dc.l F05L144
7355 .dc.l F05L141
[4f508e6]7356
[f40a309]7357F06L123: .dc.l F06L116
7358 .dc.l F06L117
7359 .dc.l F06L122
7360 .dc.l F06L122
7361 .dc.l F06L122
7362 .dc.l F06L118
7363 .dc.l F06L121
7364 .dc.l F06L120
7365 .dc.l F06L122
7366 .dc.l F06L122
7367 .dc.l F06L119
[4f508e6]7368
[f40a309]7369F06L145: .dc.l F06L139
7370 .dc.l F06L144
7371 .dc.l F06L144
7372 .dc.l F06L144
7373 .dc.l F06L140
7374 .dc.l F06L143
7375 .dc.l F06L142
7376 .dc.l F06L144
7377 .dc.l F06L144
7378 .dc.l F06L141
[4f508e6]7379
[f40a309]7380F07L123: .dc.l F07L116
7381 .dc.l F07L117
7382 .dc.l F07L122
7383 .dc.l F07L122
7384 .dc.l F07L122
7385 .dc.l F07L118
7386 .dc.l F07L121
7387 .dc.l F07L120
7388 .dc.l F07L122
7389 .dc.l F07L122
7390 .dc.l F07L119
[4f508e6]7391
[f40a309]7392F07L145: .dc.l F07L139
7393 .dc.l F07L144
7394 .dc.l F07L144
7395 .dc.l F07L144
7396 .dc.l F07L140
7397 .dc.l F07L143
7398 .dc.l F07L142
7399 .dc.l F07L144
7400 .dc.l F07L144
7401 .dc.l F07L141
[4f508e6]7402
[f40a309]7403F08L123: .dc.l F08L116
7404 .dc.l F08L117
7405 .dc.l F08L122
7406 .dc.l F08L122
7407 .dc.l F08L122
7408 .dc.l F08L118
7409 .dc.l F08L121
7410 .dc.l F08L120
7411 .dc.l F08L122
7412 .dc.l F08L122
7413 .dc.l F08L119
[4f508e6]7414
[f40a309]7415F08L145: .dc.l F08L139
7416 .dc.l F08L144
7417 .dc.l F08L144
7418 .dc.l F08L144
7419 .dc.l F08L140
7420 .dc.l F08L143
7421 .dc.l F08L142
7422 .dc.l F08L144
7423 .dc.l F08L144
7424 .dc.l F08L141
[4f508e6]7425
[f40a309]7426F09L123: .dc.l F09L116
7427 .dc.l F09L117
7428 .dc.l F09L122
7429 .dc.l F09L122
7430 .dc.l F09L122
7431 .dc.l F09L118
7432 .dc.l F09L121
7433 .dc.l F09L120
7434 .dc.l F09L122
7435 .dc.l F09L122
7436 .dc.l F09L119
[4f508e6]7437
[f40a309]7438F09L145: .dc.l F09L139
7439 .dc.l F09L144
7440 .dc.l F09L144
7441 .dc.l F09L144
7442 .dc.l F09L140
7443 .dc.l F09L143
7444 .dc.l F09L142
7445 .dc.l F09L144
7446 .dc.l F09L144
7447 .dc.l F09L141
[4f508e6]7448
[f40a309]7449F10L123: .dc.l F10L116
7450 .dc.l F10L117
7451 .dc.l F10L122
7452 .dc.l F10L122
7453 .dc.l F10L122
7454 .dc.l F10L118
7455 .dc.l F10L121
7456 .dc.l F10L120
7457 .dc.l F10L122
7458 .dc.l F10L122
7459 .dc.l F10L119
[4f508e6]7460
[f40a309]7461F10L145: .dc.l F10L139
7462 .dc.l F10L144
7463 .dc.l F10L144
7464 .dc.l F10L144
7465 .dc.l F10L140
7466 .dc.l F10L143
7467 .dc.l F10L142
7468 .dc.l F10L144
7469 .dc.l F10L144
7470 .dc.l F10L141
[4f508e6]7471
[f40a309]7472F11L123: .dc.l F11L116
7473 .dc.l F11L117
7474 .dc.l F11L122
7475 .dc.l F11L122
7476 .dc.l F11L122
7477 .dc.l F11L118
7478 .dc.l F11L121
7479 .dc.l F11L120
7480 .dc.l F11L122
7481 .dc.l F11L122
7482 .dc.l F11L119
[4f508e6]7483
[f40a309]7484F11L145: .dc.l F11L139
7485 .dc.l F11L144
7486 .dc.l F11L144
7487 .dc.l F11L144
7488 .dc.l F11L140
7489 .dc.l F11L143
7490 .dc.l F11L142
7491 .dc.l F11L144
7492 .dc.l F11L144
7493 .dc.l F11L141
[4f508e6]7494
[f40a309]7495F12L123: .dc.l F12L116
7496 .dc.l F12L117
7497 .dc.l F12L122
7498 .dc.l F12L122
7499 .dc.l F12L122
7500 .dc.l F12L118
7501 .dc.l F12L121
7502 .dc.l F12L120
7503 .dc.l F12L122
7504 .dc.l F12L122
7505 .dc.l F12L119
[4f508e6]7506
[f40a309]7507F12L145: .dc.l F12L139
7508 .dc.l F12L144
7509 .dc.l F12L144
7510 .dc.l F12L144
7511 .dc.l F12L140
7512 .dc.l F12L143
7513 .dc.l F12L142
7514 .dc.l F12L144
7515 .dc.l F12L144
7516 .dc.l F12L141
[4f508e6]7517
7518| vbtab -- vbuf pointer table -- indexed by voice number
7519| ----- ---------------------------------------------
[f40a309]7520vbtab: .dc.l _vbufs
7521 .dc.l _vbufs+VBLEN
7522 .dc.l _vbufs+(2*VBLEN)
7523 .dc.l _vbufs+(3*VBLEN)
7524 .dc.l _vbufs+(4*VBLEN)
7525 .dc.l _vbufs+(5*VBLEN)
7526 .dc.l _vbufs+(6*VBLEN)
7527 .dc.l _vbufs+(7*VBLEN)
7528 .dc.l _vbufs+(8*VBLEN)
7529 .dc.l _vbufs+(9*VBLEN)
7530 .dc.l _vbufs+(10*VBLEN)
7531 .dc.l _vbufs+(11*VBLEN)
[4f508e6]7532
[f40a309]7533 .end
Note: See TracBrowser for help on using the repository browser.