Changeset 8325447 in buchla-68k for ram/procpfl.s
- Timestamp:
- 08/07/2017 02:04:35 PM (7 years ago)
- Branches:
- master
- Children:
- 27c8d40
- Parents:
- 84c0125
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/procpfl.s
r84c0125 r8325447 5 5 .text 6 6 7 .xdef _procpfl7 .xdef procpfl 8 8 9 9 .xdef _curpf_f | current function (v/p) … … 11 11 .xdef _curpf_t | current trigger 12 12 13 .xref _irand14 .xref _xgetran15 16 .xref _expbit17 .xref _funcndx18 .xref _pflist19 .xref _pfqhdr20 .xref _prstab21 .xref _ptoftab22 .xref _timemlt23 .xref _trgtab24 .xref _valents25 .xref _vce2grp26 .xref _vce2trg27 .xref _veltab13 .xref irand 14 .xref xgetran 15 16 .xref expbit 17 .xref funcndx 18 .xref pflist 19 .xref pfqhdr 20 .xref prstab 21 .xref ptoftab 22 .xref timemlt 23 .xref trgtab 24 .xref valents 25 .xref vce2grp 26 .xref vce2trg 27 .xref veltab 28 28 29 29 .page … … 196 196 .page 197 197 | ------------------------------------------------------------------------------ 198 | _procpfl() -- process pendant functions198 | procpfl() -- process pendant functions 199 199 200 200 | void … … 208 208 | ------------------------------------------------------------------------------ 209 209 210 _procpfl: nop | FOR DEBUGGING PATCH210 procpfl: nop | FOR DEBUGGING PATCH 211 211 212 212 link a6,#0 | allocate stack frame … … 218 218 move.w TRIG(a6),d6 | get trigger we're processing 219 219 move.w d6,_curpf_t | ... 220 movea.l # _pflist,RPRV | point at 'previous' pflist entry220 movea.l #pflist,RPRV | point at 'previous' pflist entry 221 221 bra pfscan | go scan the chain 222 222 … … 241 241 242 242 pfnext: move.l (RCUR),(RPRV) | remove entry from pflist 243 move.l _pfqhdr,(RCUR) | chain entry to free list244 move.l RCUR, _pfqhdr | ...243 move.l pfqhdr,(RCUR) | chain entry to free list 244 move.l RCUR,pfqhdr | ... 245 245 bra pfscan | go look at next entry 246 246 … … 319 319 move.w d3,d0 | extract mantissa 320 320 andi.w #MSK_MNT,d0 | ... 321 mulu _timemlt,d0 | multiply by panel time pot value321 mulu timemlt,d0 | multiply by panel time pot value 322 322 lsr.l #8,d0 | ... and scale it 323 323 lsr.l #7,d0 | ... … … 325 325 andi.w #MSK_EXP,d3 | extract exponent code 326 326 add.w d3,d3 | look up decoded exponent 327 lea _expbit,a0 | ... in expbit327 lea expbit,a0 | ... in expbit 328 328 move.w 0(a0,d3.W),F_EXP(a3,d1.W) | send exponent to FPU 329 329 move.w PT_VAL(a2,d2.W),d3 | get the function value … … 348 348 movem.l d1-d2/a0-a2,-(a7) | preserve registers around call 349 349 move.w PT_VMLT(a2,d2.W),-(a7) | pass multiplier to xgetran() 350 jsr _xgetran| call for a random number350 jsr xgetran | call for a random number 351 351 tst.w (a7)+ | clean up stack 352 352 movem.l (a7)+,d1-d2/a0-a2 | restore registers … … 364 364 lsr.w #6,d0 | shift to a word index 365 365 andi.w #0x01FE,d0 | mask out extraneous bits 366 lea _ptoftab,a0 | get entry from ptoftab[]366 lea ptoftab,a0 | get entry from ptoftab[] 367 367 move.w 0(a0,d0.W),d5 | ... 368 368 bra applym | go apply the multiplier … … 385 385 move.w FH_TRG(a1),d0 | get the trigger number 386 386 add.w d0,d0 | ... as a word index 387 lea _veltab,a0 | ... into veltab[]387 lea veltab,a0 | ... into veltab[] 388 388 move.w 0(a0,d0.W),d5 | get the velocity from veltab[trg] 389 389 bra applym | go apply the multiplier … … 397 397 move.w FH_TRG(a1),d0 | get the trigger number 398 398 add.w d0,d0 | ... as a word index 399 lea _prstab,a0 | ... into prstab[]399 lea prstab,a0 | ... into prstab[] 400 400 move.w 0(a0,d0.W),d5 | get the pressure from prstab[trg] 401 401 bra applym | go apply the multiplier … … 405 405 | all other sources come out of the valents[] array 406 406 | ------------------------------------------------------------------------------ 407 srctyp4: lea _vce2grp,a0 | point at vce2grp[]407 srctyp4: lea vce2grp,a0 | point at vce2grp[] 408 408 move.w _curpf_f,d5 | get voice number in d5 409 409 lsr.w #3,d5 | ... … … 417 417 lsl.w #2,d0 | ... via shift and add) 418 418 add.w d5,d0 | ... 419 lea _valents,a0 | get base of valents[]419 lea valents,a0 | get base of valents[] 420 420 move.w VT_VAL(a0,d0.W),d5 | get value 421 421 … … 559 559 lsr.w #3,d0 | ... 560 560 andi.w #0x001E,d0 | ... 561 lea _vce2trg,a0 | check to see if voice is free561 lea vce2trg,a0 | check to see if voice is free 562 562 move.w 0(a0,d0.W),d0 | ... 563 563 cmpi.w #-1,d0 | ... … … 570 570 bne act0 | ... 571 571 572 lea _trgtab,a0 | check trigger table entry572 lea trgtab,a0 | check trigger table entry 573 573 tst.b 0(a0,d0.W) | ... 574 574 bne act0 | if trigger is active, continue … … 606 606 movem.l d1-d2/a0-a2,-(a7) | get ranged random number 607 607 move.w d0,-(a7) | ... 608 jsr _irand | ...608 jsr irand | ... 609 609 tst.w (a7)+ | ... 610 610 movem.l (a7)+,d1-d2/a0-a2 | ... … … 630 630 lsr.w #3,d0 | ... 631 631 andi.w #0x001E,d0 | ... 632 lea _vce2trg,a0 | check to see if voice is free632 lea vce2trg,a0 | check to see if voice is free 633 633 move.w 0(a0,d0.W),d0 | ... 634 634 cmpi.w #-1,d0 | ... … … 641 641 bne act0 | ... 642 642 643 lea _trgtab,a0 | check trigger table entry643 lea trgtab,a0 | check trigger table entry 644 644 tst.b 0(a0,d0.W) | see if the trigger is active 645 645 beq act3 | if not, do the jump … … 655 655 lsr.w #3,d0 | ... 656 656 andi.w #0x001E,d0 | ... 657 lea _vce2trg,a0 | check to see if voice is free657 lea vce2trg,a0 | check to see if voice is free 658 658 move.w 0(a0,d0.W),d0 | ... 659 659 cmpi.w #-1,d0 | ... … … 666 666 bne act3 | ... 667 667 668 lea _trgtab,a0 | check trigger table entry668 lea trgtab,a0 | check trigger table entry 669 669 tst.b 0(a0,d0.W) | see if the trigger is active 670 670 bne act3 | if so, do the jump … … 682 682 lsr.w #3,d0 | ... 683 683 andi.w #0x001E,d0 | ... 684 lea _vce2trg,a0 | point at voice to trigger table684 lea vce2trg,a0 | point at voice to trigger table 685 685 move.w 0(a0,d0.W),d0 | get trigger table entry 686 686 cmpi.w #-1,d0 | see if voice is free … … 693 693 bne act1a | sustain if so 694 694 695 lea _trgtab,a0 | point at trigger table695 lea trgtab,a0 | point at trigger table 696 696 tst.b 0(a0,d0.W) | check trigger status 697 697 beq act0 | continue if not active 698 698 699 act1a: move.l _pfqhdr,d3 | see if any pflist entries remain699 act1a: move.l pfqhdr,d3 | see if any pflist entries remain 700 700 beq act0 | no-op if not (shouldn't happen ...) 701 701 … … 709 709 addi.w #PT_LEN,d2 | update point index 710 710 movea.l d3,a0 | acquire a new pflist entry 711 move.l (a0), _pfqhdr | ...712 move.l _pflist,(a0) | ...713 move.l a0, _pflist | ...711 move.l (a0),pfqhdr | ... 712 move.l pflist,(a0) | ... 713 move.l a0,pflist | ... 714 714 move.w FH_TRG(a1),PF_TRIG(a0) | set trigger number in entry 715 715 move.w _curpf_f,PF_FUNC(a0) | set v/p word in entry
Note:
See TracChangeset
for help on using the changeset viewer.