home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: Midwin Amiga / Lowe_MidwinAmiga.adf / finfite.s < prev    next >
Encoding:
Text File  |  1978-07-05  |  29.4 KB  |  1,712 lines

  1.  
  2.     ;    DRIVER AND MUSIC REMAIN COPYRIGHT D.LOWE 
  3.  
  4.     ;         F15II INGAME TUNES and FX
  5.  
  6.  
  7.     ; MIKE
  8.     ; 
  9.     ; I think I have commented everything you need to know
  10.     ; to get it running but dont hesitate to ring if something
  11.     ; is unclear.
  12.  
  13.  
  14.     ;        DAVE LOWE.....0723  870648
  15.  
  16.  
  17. ;        **************************
  18.  
  19.     section issA,code_c    ;must be in low memory for dma access
  20.                 ;DEVPAC PSEUDO OP ..CAN BE DELETED
  21.  
  22.  
  23. ;*****************************************
  24.  
  25.         ;  ALL EQUs
  26.  
  27. a00  equ  508*2
  28. bb00  equ  480*2
  29. b00  equ  453*2
  30.  
  31. c01  equ  428*2
  32. db01  equ  404*2
  33. d01 equ  381*2
  34. eb01  equ  360*2
  35. e01  equ  339*2
  36. f01  equ  320*2
  37. gb01  equ  302*2
  38. g01  equ  285*2
  39. ab01 equ 269*2
  40. a01  equ  508
  41. bb01  equ  480
  42. b01  equ  453
  43.  
  44. c02  equ  428
  45. db02  equ  404
  46. d02  equ  381
  47. eb02  equ  360
  48. e02  equ  339
  49. f02  equ  320
  50. gb02  equ  302
  51. g02  equ  285
  52. ab02 equ 269
  53. a02  equ  254
  54. bb02  equ  240
  55. b02  equ  226
  56.  
  57. c03  equ  214
  58. db03  equ  202
  59. d03  equ  190
  60. eb03  equ  180
  61. e03  equ  170
  62. f03  equ  160
  63. gb03  equ  151
  64. g03  equ  143
  65. ab03 equ 135
  66. a03  equ  127
  67.  
  68. bb03  equ  480*2
  69. b03  equ  453*2
  70.  
  71. c04  equ  428*2
  72. db04  equ  404*2
  73. d04 equ  381*2
  74. eb04  equ  360*2
  75. e04  equ  339*2
  76. f04  equ  320*2
  77. gb04  equ  302*2
  78. g04  equ  285*2
  79. ab04 equ 269*2
  80. a04  equ  508
  81. bb04  equ  480
  82. b04  equ  453
  83.  
  84. c05  equ  428
  85. db05  equ  404
  86. d05  equ  381
  87. eb05  equ  360
  88. e05  equ  339
  89. f05  equ  320
  90. gb05  equ  302
  91. g05  equ  285
  92. ab05 equ 269
  93. a05  equ  254
  94. bb05  equ  240
  95. b05  equ  226
  96.  
  97. c06  equ  214
  98. db06  equ  202
  99. d06  equ  190
  100. eb06  equ  180
  101. e06  equ  170
  102. f06  equ  160
  103. gb06  equ  151
  104. g06  equ  143
  105. ab06 equ 135
  106. a06  equ  127
  107. bb06  equ  480*2
  108. b06  equ  453*2
  109.  
  110. c07  equ  428*2
  111. db07  equ  404*2
  112. d07 equ  381*2
  113. eb07  equ  360*2
  114. e07  equ  339*2
  115. f07  equ  320*2
  116. gb07  equ  302*2
  117. g07  equ  285*2
  118. ab07 equ 269*2
  119. a07  equ  508
  120. bb07  equ  480
  121. b07  equ  453
  122.  
  123. c08  equ  428
  124. db08  equ  404
  125. d08  equ  381
  126. eb08  equ  360
  127. e08  equ  339
  128. f08  equ  320
  129. gb08  equ  302
  130. g08  equ  285
  131. ab08 equ 269
  132. a08  equ  254
  133. bb08  equ  240
  134. b08  equ  226
  135.  
  136.  
  137. v equ 0
  138.  
  139. no_loop equ 0
  140. loop equ 0
  141. chann1reg   equ $dff0a0    
  142. chann2reg   equ $dff0b0
  143. chann3reg   equ $dff0c0
  144. chann4reg   equ $dff0d0
  145. dmacon     equ $dff096
  146. int_bf_int   equ   $dff01e
  147. int_bf_w    equ   $dff09a
  148. vhposr     equ   $dff006
  149. in_line    equ   0
  150. new_snd    equ   4
  151. end_song     equ   1
  152. end_patt    equ   8
  153. new_env    equ   12
  154. pbend     equ   16
  155.  
  156. ;cr  equ   16
  157. ;tq1 equ 7
  158. ;tq2 equ 6
  159. ;tq equ 8
  160. ;q equ cr/2
  161. ;sq equ q/2
  162.  
  163. hi: equ 223
  164. lo:  equ 446
  165.  
  166. r22    equ 134
  167. r20    equ 179        ;correctum
  168. r19    equ 150
  169. r18    equ 178
  170. r17    equ 200
  171. r16:    equ 227        ;correctum
  172. r15:    equ 249
  173. r14:    equ 275
  174. r13:    equ 305
  175. r12:    equ 333
  176. r11:    equ 361
  177. r10:    equ 389
  178. r9:    equ 419
  179. r8:    equ 446
  180. r7:    equ 446+112
  181. r6:    equ 446+223
  182. r5:    equ 446+223+112
  183. r4:    equ 446*2
  184. r3:    equ 446*3
  185. r2:    equ 446*4
  186. r1:    equ 446*8
  187.  
  188.  
  189. filter: equ $bfe001
  190. filter_on equ 44
  191. filter_off equ 48
  192.  
  193. modon     equ   20
  194. pboff     equ   24
  195. modoff     equ   28
  196. rest     equ 32
  197. end_fxp  equ 36
  198. end_fx3  equ 36
  199. end_fx4  equ 40
  200. acc    equ 52
  201. repeat    equ 56
  202. down      equ   1
  203. up       equ   2
  204.  
  205. ;***************************************************************
  206.  
  207.  
  208.  ;    THIS IS THE CONTROL SECTION FOR TESTING AS A STAND ALONE PRG. 
  209.  
  210.     ;       AND CAN BE DELETED WHEN NOT REQUIRED
  211.  
  212.  
  213.     jsr select_new_song
  214.  
  215. testloop:
  216.     jsr delay    ;wait for scan line  at 50hz on pal
  217.  
  218.     jsr driver
  219.  
  220.         bra testloop
  221.  
  222.  
  223. delay:
  224.     tst.w fxtimer
  225.     bne no_test
  226.     clr.l d0
  227.     move.b $bfe001,d0
  228.     btst #6,d0
  229.     bne no_test1
  230.     move.w #10,fxtimer
  231.     bra testfx4
  232. no_test
  233.     subq #1,fxtimer
  234. no_test1
  235.     clr.l d0
  236.         move.w vhposr,d0
  237.         andi.w #%1111111100000000,d0
  238.         cmpi.w #%1111111100000000,d0
  239.  
  240.     bne no_test1
  241.     rts
  242.  
  243. testfx4:  
  244.  
  245.     jsr    kill_chip
  246.     move.w #1,int_disable
  247.     clr.l d0
  248.     move.b $bfe001,d0
  249.     btst #6,d0
  250.     beq testfx4
  251.  
  252.     move.l song_buffer,d0
  253.     addq.l #1,d0
  254.     cmp.l    #3,d0
  255.     bne nores
  256.     move.l #1,d0
  257. nores    move.l d0,song_buffer
  258.     jsr    select_new_song
  259.  
  260.  
  261.     ;move.l fx_last,d0
  262.     ;move.l d0,fx_kill
  263.  
  264.     ;jsr kill_loopfx        ;only one fx at a time
  265.  
  266.  
  267. no_k
  268.         move.l fx_no,fx_number
  269.     move.l fx_no,fx_last
  270.     addq.l #1,fx_no
  271.     move.l    max_fx,d0
  272.         cmp.l fx_no,d0
  273.     bne noreset
  274.     move.l #1,fx_no    
  275. noreset: 
  276.     jsr set_up_fx
  277.     bra no_test    
  278.  
  279. fxtc:          dc.w 10
  280. fx_no:         dc.l  1
  281. fx_last        dc.l  0
  282.  
  283.  
  284. ;        END OF CONTROL (DELETABLE) SECTION
  285.  
  286. ;**********************************************************
  287.  
  288. ; --------------------------------------------------------------
  289.  
  290. ;    MAIN VARIABLES TO BE ACCESSED BY PROGRAMMER DURING RUNTIME
  291.  
  292.  
  293. fx_number:     dc.l 0 ;     number of fx required here...see list
  294. fx_kill        dc.l 0 ;     number of fx to kill/only needed for looped fx
  295.  
  296. song_buffer     dc.l 2 ;     number of piece of music required here ie.1 to 5
  297.  
  298. music_disable:  dc.w 0 ;     1 = disable music
  299. fx_disable:     dc.w 1 ;     1 = disable fx  (currently disabled)
  300.  
  301.             ;These flags disable the individual channels
  302.             ;when set to 1.
  303.             ;the music driver uses channel 4 least
  304.             ;3 next least etc...
  305.  
  306.  
  307. fxc1        dc.l 0    ;1=disable 0 to re-enable/channel 1
  308. fxc2          dc.l 0    ;1=disable 0 to re-enable/channel 2
  309. fxc3        dc.l 0    ;1=disable 0 to re-enable/channel 3
  310. fxc4          dc.l 0    ;1=disable 0 to re-enable/channel 4
  311.  
  312.  
  313.  
  314.  
  315.  
  316. ;    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  317.  
  318. ;  THESE VARIABLES ARE USED INTERNALLY BY THE DRIVER
  319. fxr1         dc.l 0  
  320. fxr2         dc.l 0  
  321. fxr3         dc.l 0  
  322. fxr4         dc.l 0  
  323. fx1_flag    dc.w 0
  324. fx2_flag    dc.w 0
  325. fx3_flag    dc.w 0
  326. fx4_flag    dc.w 0
  327. fxtimer        dc.w 0
  328. gen        dc.w 0
  329. int_disable    dc.w 0
  330. altpf         dc.w 0
  331. kill_flag    dc.w 0
  332. ;  *******************************************************
  333.  
  334. ;  CALL THIS SUBROUTINE TO SET UP THE REQIURED FX
  335. ;  on entry it requires the fx number to be in "fx_number"(see above)
  336. ;  
  337.  
  338. set_up_fx
  339.     movem.l d5/a2,-(a7)    ;save used registers
  340.     move.l #1,d0
  341.     cmp fx_number,d0
  342.     bne check3        ;engine to 4
  343.  
  344.     tst.l fxc4
  345.     bne check3
  346. use4:    
  347.     move.w #%0000000000001000,d5
  348.     lea chann4reg,a2
  349.     jsr end_fx4p
  350.     move.l fx_number,fxr4
  351.     move.l fx_number,fxc4
  352.     move.l #0,fx_number
  353.     bra no_fx
  354. check3:    tst.l fxc3
  355.     bne check2
  356. use3:
  357.     move.w #%0000000000000100,d5
  358.     lea chann3reg,a2
  359.     jsr end_fx3p
  360.     move.l fx_number,fxr3
  361.     move.l fx_number,fxc3
  362.     move.l #0,fx_number
  363.     bra no_fx
  364. check2:    tst.l fxc2
  365.     bne check1
  366. use2:
  367.     move.w #%0000000000000010,d5
  368.     lea chann2reg,a2
  369.     jsr end_fx2p
  370.     move.l fx_number,fxr2
  371.     move.l fx_number,fxc2
  372.     move.l #0,fx_number
  373.     bra no_fx
  374. check1:    tst.l fxc1
  375.     bne use3
  376. use1:
  377.     move.w #%0000000000000001,d5
  378.     lea chann1reg,a2
  379.     jsr end_fx1p
  380.     move.l fx_number,fxr1
  381.     move.l fx_number,fxc1
  382.     move.l #0,fx_number
  383. no_fx
  384.     movem.l (a7)+,d5/a2    ;restore registers
  385.     rts
  386.  
  387. ;*************************************************
  388. ;          CALL HERE TO KILL ANY LOOPED FX...
  389. ;       after putting the number of the fx you want to kill
  390. ;            into fx_kill
  391.  
  392. kill_loopfx
  393.  
  394.     movem.l d5/a2,-(a7)    ;save used registers
  395.     move.l fx_kill,d5
  396.     cmp.l fxc1,d5
  397.     bne k2
  398.     move.w #%0000000000000001,d5
  399.     lea chann1reg,a2
  400.     jsr end_fx1p
  401.     bra error
  402. k2    cmp.l fxc2,d5
  403.     bne k3
  404.     move.w #%0000000000000010,d5
  405.     lea chann2reg,a2
  406.     jsr end_fx2p
  407.     bra error
  408. k3    cmp.l fxc3,d5
  409.     bne k4
  410.     move.w #%0000000000000100,d5
  411.     lea chann3reg,a2
  412.     jsr end_fx3p
  413.     bra error
  414. k4    cmp.l fxc4,d5
  415.     bne error
  416.     move.w #%0000000000001000,d5
  417.     lea chann2reg,a2
  418.     jsr end_fx4p
  419. error
  420.     clr.l fx_kill
  421.     movem.l (a7)+,d5/a2    ;restore registers
  422.     rts
  423. ;*************************************************
  424.  
  425.     ; CALL HERE TO KILL ANY SOUND for whatever reason
  426.  
  427. kill_chip:
  428.     move.w #%0000000000001111,dmacon
  429.     move.l rest_data,chann1reg
  430.     move.l rest_data,chann2reg
  431.     move.l rest_data,chann3reg
  432.     move.l rest_data,chann4reg
  433.     move.w #16,chann1reg+4    
  434.     move.w #16,chann2reg+4    
  435.     move.w #16,chann3reg+4    
  436.     move.w #16,chann4reg+4    
  437.     move.w #0,chann1reg+8
  438.     move.w #0,chann2reg+8
  439.     move.w #0,chann3reg+8
  440.     move.w #0,chann4reg+8
  441.     move.w #1,chann1reg+6
  442.     move.w #1,chann2reg+6
  443.     move.w #1,chann3reg+6
  444.     move.w #1,chann4reg+6
  445.     move.l #0,fxr1
  446.     move.l #0,fxr2
  447.     move.l #0,fxr3
  448.     move.l #0,fxr4
  449.     move.w #0,fx1_flag
  450.     move.w #0,fx2_flag
  451.     move.w #0,fx3_flag
  452.     move.w #0,fx4_flag
  453.     move.l #0,fxc1
  454.     move.l #0,fxc2
  455.     move.l #0,fxc3
  456.     move.l #0,fxc4
  457.     rts
  458. ;****************************************
  459.  
  460. ;  CALL HERE TO SELECT WHICH PIECE OF MUSIC TO PLAY
  461. ;  AFTER PLACING NUMBER (1 to 3) IN "SONG_BUFFER"..see above
  462. ;  a call to this routine will initiliase the driver/kill any sound etc.      
  463. ;  make sure this routine has been called before running the interrupt
  464. ;  driven section....see below
  465.  
  466. select_new_song:
  467.  
  468.     move.w #1,int_disable
  469.     movem.l d0/d1/a0/a1,-(a7)    ;save used registers
  470.     move.w music_disable,gen
  471.     move.w #1,music_disable
  472.         jsr kill_chip           
  473.     clr.l d0
  474.         move.w #204,d0
  475.         lea gvars,a0
  476. clloop: clr.w (a0)+        
  477.         dbra  d0,clloop
  478.     tst.l song_buffer
  479.     beq no_song
  480.         move.l song_buffer,d1
  481.     add.l d1,d1
  482.      add.l d1,d1
  483.      add.l d1,d1
  484.      add.l d1,d1
  485.         LEA  SONG_TABLE-16,A1
  486.         add.l d1,a1      
  487.         MOVE.L (A1)+,WSONG1    
  488.         move.l (a1)+,wsong2    
  489.         move.l (a1)+,wsong3
  490.     move.l (a1),wsong4
  491.         MOVE.L #pstart,PATTR1
  492.         MOVE.L #pstart,PATTR2
  493.         MOVE.L #pstart,PATTR3
  494.     move.l #pstart,pattr4
  495.         move.l #sstart,songr1
  496.         MOVE.L #sstart,SONGR2
  497.         MOVE.L #sstart,SONGR3
  498.     move.l #sstart,songr4
  499. no_song
  500.     move.w #1,ch1vars
  501.     move.w #2,ch2vars
  502.     move.w #3,ch3vars
  503.     move.w #4,ch4vars
  504.     move.w #6,ch4fxvars
  505.     move.w #5,ch3fxvars
  506.     move.w #7,ch2fxvars
  507.     move.w #8,ch1fxvars
  508.     move.w gen,music_disable
  509.     clr.w int_disable
  510.     movem.l (a7)+,d0/d1/a0/a1    ;restore registers
  511.         rts
  512.  
  513. ;**************************************************
  514.  
  515. ;  CALL HERE ON A 50hz INTERRUPT DURING RUNTIME
  516. ;  TO PLAY FX AND TUNES
  517.  
  518. driver:  
  519.     tst.w int_disable
  520.     beq process_data
  521.     rts        
  522. process_data
  523.     movem.l d0-d6/a0-a6,-(a7)    ;save used registers
  524.  
  525.  
  526. ch1:
  527.     tst.w fx_disable
  528.     bne test_music1
  529.     tst.l fxr1
  530.     bne   ch1j1
  531.     tst.l fxc1
  532.     beq test_music1
  533.     bra ch1j3
  534. ch1j2    jsr run_dummy1
  535.     jsr run_fx1
  536.     bra ch2
  537. ch1j1
  538.     jsr set_up1
  539. ch1j3    tst.w music_disable    
  540.     beq ch1j2
  541.     jsr run_fx1
  542.     bra ch2
  543. test_music1
  544.     tst.w music_disable
  545.     bne ch2
  546.     jsr run_music1
  547.     bra ch2
  548.     ;***********************
  549.  
  550.     ; channel 1 subroutines
  551.  
  552. run_dummy1    
  553.      lea ch1vars,a0
  554.      lea dummy_reg,a2 
  555.      move.w #0,d5 
  556.      jsr sect1    
  557.     rts
  558.  
  559. set_up1    
  560.          move.l fxr1,d0
  561.          add d0,d0
  562.          add d0,d0
  563.          lea  fxjump_table-4,A1
  564.      add.l d0,a1
  565.          move.l (a1),currfx1
  566.       clr.l fxr1
  567.      clr.w fxintc1
  568.       rts
  569.   
  570.      
  571. run_fx1
  572.     lea ch1fxvars,a0
  573.        lea chann1reg,a2
  574.       move.w #%0000000000000001,d5 
  575.      move.w #%1000001000000001,d1 
  576.      jsr sect1
  577.     rts
  578.  
  579. run_music1
  580.     lea ch1vars,a0
  581.        lea chann1reg,a2
  582.       move.w #%0000000000000001,d5 
  583.       move.w #%1000001000000001,d1 
  584.       jsr sect1     
  585.     rts
  586.  
  587.     ;  **************************
  588. ch2
  589.     tst.w fx_disable
  590.     bne test_music2
  591.     tst.l fxr2
  592.     bne   ch2j1
  593.     tst.l fxc2
  594.     beq test_music2
  595.     bra ch2j3
  596. ch2j2    jsr run_dummy2
  597.     jsr run_fx2
  598.     bra ch3
  599. ch2j1
  600.     jsr set_up2
  601. ch2j3    tst.w music_disable    
  602.     beq ch2j2
  603.     jsr run_fx2
  604.     bra ch3
  605.  
  606. test_music2
  607.     tst.w music_disable
  608.     bne ch3
  609.     jsr run_music2
  610.     bra ch3
  611.     ;***********************
  612.     ; channel 2 subroutines
  613. run_dummy2    
  614.      lea ch2vars,a0
  615.      lea dummy_reg,a2 
  616.      move.w #0,d5 
  617.      jsr sect1    
  618.     rts
  619.  
  620. set_up2    
  621.          move.l fxr2,d0
  622.          add d0,d0
  623.          add d0,d0
  624.          lea  fxjump_table-4,A1
  625.      add.l d0,a1
  626.          move.l (a1),currfx2
  627.       clr.l fxr2
  628.      clr.w fxintc2
  629.       rts
  630.   
  631.      
  632. run_fx2
  633.     lea ch2fxvars,a0
  634.        lea chann2reg,a2
  635.       move.w #%0000000000000010,d5 
  636.      move.w #%1000001000000010,d1 
  637.      jsr sect1
  638.     rts
  639.  
  640. run_music2
  641.     lea ch2vars,a0
  642.        lea chann2reg,a2
  643.       move.w #%0000000000000010,d5 
  644.       move.w #%1000001000000010,d1 
  645.       jsr sect1     
  646.     rts
  647.  
  648.     ;  **************************
  649.  
  650. ch3:
  651.     tst.w fx_disable
  652.     bne test_music3
  653.     tst.l fxr3
  654.     bne   ch3j1
  655.     tst.l fxc3
  656.     beq test_music3
  657.     bra ch3j3
  658. ch3j2    jsr run_dummy3
  659.     jsr run_fx3
  660.     bra ch4
  661. ch3j1
  662.     jsr set_up3
  663. ch3j3    tst.w music_disable    
  664.     beq ch3j2
  665.     jsr run_fx3
  666.     bra ch4
  667.  
  668. test_music3
  669.     tst.w music_disable
  670.     bne ch4
  671.     jsr run_music3
  672.     bra ch4
  673.  
  674.     ;***********************
  675.  
  676.     ; channel 3 subroutines
  677.  
  678. run_dummy3    
  679.      lea ch3vars,a0
  680.      lea dummy_reg,a2 
  681.      move.w #0,d5 
  682.      jsr sect1    
  683.     rts
  684.  
  685. set_up3    
  686.          move.l fxr3,d0
  687.          add d0,d0
  688.          add d0,d0
  689.          lea  fxjump_table-4,A1
  690.      add.l d0,a1
  691.          move.l (a1),currfx3
  692.       clr.l fxr3
  693.      clr.w fxintc3
  694.       rts
  695.   
  696.      
  697. run_fx3
  698.     lea ch3fxvars,a0
  699.        lea chann3reg,a2
  700.       move.w #%0000000000000100,d5 
  701.      move.w #%1000001000000100,d1 
  702.      jsr sect1
  703.     rts
  704.  
  705. run_music3
  706.     lea ch3vars,a0
  707.        lea chann3reg,a2
  708.       move.w #%0000000000000100,d5 
  709.       move.w #%1000001000000100,d1 
  710.       jsr sect1     
  711.     rts
  712.  
  713.     ;  **************************
  714.  
  715. ch4:
  716.     tst.w fx_disable
  717.     bne test_music4
  718.     tst.l fxr4
  719.     bne   ch4j1
  720.     tst.l fxc4
  721.     beq test_music4
  722.     bra ch4j3
  723. ch4j2    jsr run_dummy4
  724.     jsr run_fx4
  725.     bra no4
  726. ch4j1
  727.     jsr set_up4
  728. ch4j3    tst.w music_disable    
  729.     beq ch4j2
  730.     jsr run_fx4
  731.     bra no4
  732.  
  733. test_music4
  734.     tst.w music_disable
  735.     bne no4
  736.     jsr run_music4
  737. no4    
  738.     movem.l (a7)+,d0-d6/a0-a6    ;restore registers
  739.     rts
  740.  
  741.     ;***********************
  742.  
  743.     ; channel 4 subroutines
  744.  
  745. run_dummy4    
  746.      lea ch4vars,a0
  747.      lea dummy_reg,a2 
  748.      move.w #0,d5 
  749.      jsr sect1    
  750.     rts
  751.  
  752. set_up4    
  753.          move.l fxr4,d0
  754.          add d0,d0
  755.          add d0,d0
  756.          lea  fxjump_table-4,A1
  757.      add.l d0,a1
  758.          move.l (a1),currfx4
  759.       clr.l fxr4
  760.      clr.w fxintc4
  761.       rts
  762.   
  763.      
  764. run_fx4
  765.     lea ch4fxvars,a0
  766.        lea chann4reg,a2
  767.       move.w #%0000000000001000,d5 
  768.      move.w #%1000001000001000,d1 
  769.      jsr sect1
  770.     rts
  771.  
  772. run_music4
  773.     lea ch4vars,a0
  774.        lea chann4reg,a2
  775.       move.w #%0000000000001000,d5 
  776.       move.w #%1000001000001000,d1 
  777.       jsr sect1     
  778.     rts
  779.     ;  **************************
  780.  
  781. sect1: tst.w 0(a0)
  782.     bne s1j1
  783.     rts
  784.  
  785. s1j1:    tst.w 2(a0)
  786.         beq sect3       
  787.         cmpi.w #1,2(a0)
  788.         beq sect4
  789.  
  790.         cmpi.w #3,4(a0)    
  791.         beq part2       
  792.     
  793. mode_switch:  subq.w #1,2(a0)     
  794.  
  795. check_effects: clr.w altpf      
  796.         move.w 6(a0),d2    
  797.         tst.w 8(a0)      
  798.         beq check_mod
  799.         tst.w 14(a0)      
  800.         beq cont_bend
  801.         subq.w #1,14(a0)
  802.         bra check_mod
  803. cont_bend:   addq.w #1,altpf    
  804.         move.w 10(a0),d3    
  805.         move.w 12(a0),d4    
  806.         cmpi.w #1,8(a0)
  807.         beq pbup
  808.     
  809.         sub.w d3,d2
  810.         cmp.w d2,d4
  811.         bcs check_mod
  812.         bra fbend
  813.  
  814. pbup:     add.w d3,d2
  815.         cmp.w d2,d4
  816.         bcc check_mod
  817. fbend:     move.w d4,d2
  818.         clr.w 8(a0)      
  819. check_mod:   tst.w 16(a0)
  820.         beq send_alt_pitch
  821.    
  822.  
  823.     tst.w  58(a0)
  824.     beq st_ok
  825.     subq.w #1,58(a0)
  826.     bra send_alt_pitch
  827. st_ok:
  828.         tst.w 50(a0)
  829.         beq cont_mod
  830.         subq #1,50(a0)
  831.         bra send_alt_pitch
  832. cont_mod:    move.w 52(a0),50(a0)  
  833.         addq #1,altpf
  834.         cmpi #3,16(a0)
  835.         bcc addmod
  836.     
  837.         move.w 56(a0),d3 
  838.         sub.w d3,d2
  839.         addq.w #1,16(a0)  
  840.         bra send_alt_pitch
  841. addmod:
  842.  
  843.         move.w 54(a0),d3 
  844.         add.w d3,d2
  845.         addq.w #1,16(a0)
  846.         cmpi.w #5,16(a0)
  847.        bne send_alt_pitch
  848.         move.w #1,16(a0)  
  849.  
  850. send_alt_pitch: tst.w altpf
  851.         beq send_env
  852.         move.w d2,6(a0)  
  853.         move.w d2,6(a2)  
  854.  
  855. send_env: 
  856.  
  857.     cmpi #6,(a0)
  858.     beq norm_env    
  859.     cmpi #5,(a0)
  860.     bne do_env_check
  861.  
  862.     tst.w fx4_flag
  863.     beq norm_env
  864.     bra low_vol
  865.  
  866. do_env_check:
  867.     move.w fx3_flag,d0
  868.     or.w fx4_flag,d0
  869.     cmpi.w  #0,d0
  870.     beq norm_env
  871. low_vol:    
  872.     move.l 18(a0),a1    
  873.         cmpi.w #255,(a1)
  874.         beq evj1
  875.     move.w (a1)+,d0
  876. evj2:    sub.w  62(a0),d0
  877.     bcc no_over
  878.     move.w 0,d0
  879. no_over:
  880.         move.w d0,8(a2) 
  881.     bra fint        
  882.  
  883. evj1:   subq.l #2,a1
  884.     move.w (a1)+,d0
  885.     bra evj2
  886.  
  887. norm_env:
  888.     move.l 18(a0),a1    
  889.         cmpi.w #255,(a1)
  890.         beq env_finished
  891.     cmpi.w #1,66(a0)    
  892.     bne    no_acc 
  893.  
  894.     clr.l d0
  895.     move.w (a1)+,d0
  896.     add.w 64(a0),d0    
  897.     move.w d0,8(a2)    
  898.     move.l a1,18(a0)
  899.     rts        
  900.  
  901. no_acc:
  902. resu:   move.w (a1)+,8(a2)   
  903. fint:   move.l a1,18(a0)    
  904.     rts
  905.  
  906. env_finished:
  907.      subq.l #2,a1    
  908.      bra resu
  909.  
  910.  
  911. one_shot_note: move.w #3,4(a0)     
  912.         move.l 38(a0),(a2)
  913.         move.w 42(a0),4(a2)
  914.         move.w d1,dmacon     
  915.         bra send_env
  916.  
  917.  
  918. part2:                         
  919.         move.l 44(a0),(a2)
  920.         move.w 48(a0),4(a2)
  921.         subq.w #1,2(a0)      
  922.         move.w #1,4(a0)
  923.         bra check_effects
  924.  
  925. sect3:
  926.     move.w 0,66(a0)    
  927.  
  928.     move.l 22(a0),a1  
  929. control_ret: move.w (a1)+,d0  
  930.     cmpi.w #100,d0   
  931.     bls sect5   
  932.   
  933. acc_note:
  934.     move.w d0,6(a0)  
  935.     move.w d0,6(a2)  
  936.     move.w (a1)+,2(a0) 
  937.     subq.w #1,2(a0)  
  938.     move.l a1,22(a0)  
  939.     move.l 34(a0),18(a0) 
  940.     move.w 60(a0),58(a0) 
  941.  
  942.  
  943.     tst.w 16(a0)
  944.     beq no_mod_res
  945.     move.w #1,16(a0)
  946. no_mod_res:
  947.     cmpi.w #0,4(a0)
  948.     beq do_loop
  949.     bra one_shot_note    
  950.  
  951.  
  952. do_loop:    move.w d1,dmacon   
  953.         bra send_env
  954.  
  955. do_rest:
  956.     move.w (a1)+,2(a0) 
  957.     subq.w #1,2(a0)  
  958.     move.l a1,22(a0)  
  959.     move.l  #rest_env,18(a0)
  960.  
  961.         move.w #0,8(a2)
  962.         bra send_env
  963.    
  964. sect4:
  965.         cmpi.w #0,4(a0)
  966.         beq noof
  967.         move.w d5,dmacon   
  968. noof:     subq.w #1,2(a0)
  969.         bra check_effects
  970.    
  971. sect5:     move.l #jump_table,a3
  972.         move.l (a3,d0),a4
  973.         jmp (a4)
  974.  
  975. jump_table: 
  976.     dc.l  in_line_data
  977.         dc.l  nsound
  978.         dc.l  patt_end
  979.         dc.l  get_env
  980.         dc.l  check_pbend
  981.         dc.l  do_mod
  982.         dc.l  bend_off
  983.         dc.l  mod_off
  984.         dc.l  do_rest
  985.         dc.l  end_fx
  986.         dc.l  end_fx
  987.     dc.l  s_f_on
  988.     dc.l  s_f_off
  989.     dc.l  set_acc
  990.     dc.l  rept
  991.  
  992. in_line_data:
  993.  
  994.         nop
  995.         rts
  996.  
  997. rept:
  998.     move.l (a1),a1
  999.     bra control_ret
  1000.  
  1001. s_f_on: 
  1002.     bclr #1,filter
  1003.     bra control_ret
  1004. s_f_off:
  1005.     bset #1,filter
  1006.     bra control_ret
  1007.  
  1008. nsound:    move.l (a1)+,a3     
  1009.         cmpi.w #0,(a3)
  1010.         bne one_shot_sound
  1011.         move.w (a3)+,4(a0)    
  1012.         move.l (a3)+,(a2)     
  1013.         move.w (a3),4(a2)    
  1014.         jmp control_ret
  1015.  
  1016. one_shot_sound:
  1017.         move.w (a3)+,4(a0)
  1018.         move.l (a3)+,38(a0)   
  1019.         move.l (a3)+,42(a0)
  1020.         move.l (a3),46(a0)
  1021.         jmp control_ret
  1022.  
  1023. patt_end:
  1024.  
  1025.         move.l 26(a0),a1    
  1026.         cmpi.l #0,(a1)     
  1027.         beq song_control
  1028.         addq.l #4,26(a0)    
  1029.         move.l (a1),a1     
  1030.         jmp control_ret
  1031. get_env: 
  1032.        move.l (a1)+,a4 
  1033.     move.l (a4)+,62(a0)    
  1034.     
  1035.     move.l  a4,34(a0)    
  1036.     
  1037.         bra control_ret
  1038.  
  1039. check_pbend:
  1040.      move.l (a1)+,8(a0)
  1041.         move.l (a1)+,12(a0)
  1042.         bra control_ret
  1043.  
  1044. do_mod:    move.w #1,16(a0)  
  1045.         move.l (a1)+,50(a0)
  1046.         move.l (a1)+,54(a0)
  1047.         move.l (a1)+,58(a0)
  1048.         bra control_ret
  1049.  
  1050. bend_off:   clr.w 8(a0)
  1051.         bra control_ret
  1052.  
  1053. mod_off:    clr.w 16(a0)
  1054.         bra control_ret
  1055.  
  1056.  
  1057. end_fx:    
  1058.     cmpi.w #6,(a0)
  1059.     beq end_fx4p
  1060.     cmpi.w #5,(a0)
  1061.     beq end_fx3p
  1062.     cmpi.w #7,(a0)
  1063.     beq end_fx2p
  1064.  
  1065. end_fx1p:
  1066.         move.w d5,dmacon   
  1067.     move.w  #1,chann1reg+6
  1068.     move.w #0,8(a2)
  1069.     move.l #0,fxc1
  1070.     rts
  1071.  
  1072. end_fx2p:
  1073.     move.w d5,dmacon 
  1074.     move.w  #1,chann2reg+6
  1075.         move.w #0,8(a2) 
  1076.     move.l #0,fxc2
  1077.         rts
  1078.  
  1079.  
  1080. end_fx3p:
  1081.         move.w d5,dmacon   
  1082.     move.w  #1,chann3reg+6
  1083.     move.w #0,8(a2)
  1084.     move.l #0,fxc3
  1085.     rts
  1086.  
  1087. end_fx4p:
  1088.     move.w d5,dmacon 
  1089.     move.w  #1,chann4reg+6
  1090.         move.w #0,8(a2) 
  1091.     move.l #0,fxc4
  1092.         rts
  1093.  
  1094. set_acc: move.w #1,66(a0) 
  1095.     bra control_ret
  1096.  
  1097. song_control:
  1098.         addq.l #4,a1
  1099.         move.l 30(a0),26(a0)
  1100.         move.l 26(a0),a1
  1101.         addq.l #4,26(a0)
  1102.         move.l (a1),a1
  1103.         jmp control_ret
  1104.  
  1105.  
  1106.     ;"""""""""""""""""""""""""""""""""""""""""""""""""
  1107.  
  1108.     ;;; DATA
  1109.  
  1110. song_table:
  1111.     dc.l s1,s2,s3,s4    
  1112.     dc.l s5,s6,s7,s8    
  1113.  
  1114.  
  1115. ;************************************************************
  1116. gvars:
  1117. ch1vars     
  1118.     dc.w 0     
  1119.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1120. pattr1: dc.l 0    
  1121. songr1: dc.l 0    
  1122. wsong1: dc.l 0   
  1123.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1124.  
  1125. ch2vars     
  1126.     dc.w 0     
  1127.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1128. pattr2: dc.l 0    
  1129. songr2: dc.l 0    
  1130. wsong2: dc.l 0    
  1131.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1132.  
  1133. ch3vars 
  1134.     dc.w 0     
  1135.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1136. pattr3: dc.l 0    
  1137. songr3: dc.l 0    
  1138. wsong3: dc.l 0    
  1139.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1140.  
  1141. ch4vars 
  1142.     dc.w 0     
  1143.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1144. pattr4: dc.l 0    
  1145. songr4: dc.l 0    
  1146. wsong4: dc.l 0    
  1147.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1148.  
  1149.  
  1150. ch1fxvars 
  1151.     dc.w 0     
  1152. fxintc1:
  1153.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1154. currfx1:
  1155.     dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0    
  1156.  
  1157. ch2fxvars 
  1158.     dc.w 0     
  1159. fxintc2:
  1160.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1161. currfx2:
  1162.     dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0    
  1163.  
  1164.  
  1165. ch3fxvars
  1166.     dc.w 0     
  1167. fxintc3:
  1168.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1169. currfx3:
  1170.     dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0    
  1171.  
  1172. ch4fxvars 
  1173.     dc.w 0     
  1174. fxintc4:
  1175.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1176. currfx4:
  1177.     dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0    
  1178. ;************************************************************
  1179.  
  1180. dummy_reg dc.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1181.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1182.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1183.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1184. ;************************************************************
  1185.  
  1186.  
  1187.  
  1188. ;       fx patterns here
  1189.  
  1190. fxjump_table:  
  1191.  
  1192. max_fx    dc.l    0
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198. ;*******************************************************************
  1199.  
  1200. sstart: dc.l 0,end_song
  1201.  
  1202. pstart: dc.w filter_on,pboff,modoff,end_patt
  1203.  
  1204.  
  1205.  
  1206. ;;;;;;;;;;;;;;;;;;;;;    FINAL FIGHT  Music Data ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1207.  
  1208.  
  1209. CR      set 20
  1210. Q       set cr/2
  1211. SQ      set cr/4
  1212.  
  1213. s1:
  1214.     dc.l    p1a,p1,pa1,p1,pb1,p1a,p2
  1215.       dc.l     0,end_song
  1216.  
  1217. s2:
  1218.     dc.l    p3,p3,p3,p3
  1219.         DC.L    0,end_song
  1220.  
  1221. s3:
  1222.     dc.l    p10,p10,p10,p10
  1223.     dc.l     0,end_song
  1224. s4:
  1225.     dc.l    prv,prv,prv,prv
  1226.     dc.l    p1t,pa1a,p1t,pb1a
  1227.     dc.l    prv,prv,prv,prv
  1228.     dc.l     0,end_song
  1229.  
  1230. prv:
  1231.       dc.w rest,cr*4
  1232.       dc.w end_patt
  1233. p1a:
  1234.       dc.w new_snd
  1235.       dc.l sax2
  1236.       dc.w new_env
  1237.       dc.l q_env
  1238.       dc.w modon,1,1
  1239.       dc.w 22,22,44,44
  1240. ;      dc.w pbend,down,0
  1241. ;      dc.w d04,15
  1242.     dc.w D04,cr*16
  1243.       dc.w end_patt
  1244. p1:
  1245.       dc.w new_env
  1246.       dc.l org_env
  1247.       dc.w modon,1,1
  1248.       dc.w 4,4,8,8
  1249.     dc.w A05,sq,G05,sq,A05,sq,C06,cr*7+sq
  1250.     dc.w A05,sq,G05,sq,F05,sq,D05,cr*7+sq
  1251.     dc.w A05,sq,G05,sq,A05,sq,C06,cr*7+q
  1252.       dc.w end_patt
  1253. p1t:
  1254.     dc.w rest,cr*24+sq
  1255.       dc.w end_patt
  1256. pa1:
  1257.     dc.w new_snd
  1258.     dc.l sax2
  1259.       dc.w new_env
  1260.       dc.l org_env
  1261.     dc.w A05,sq,C06,sq,Db06,sq,D06,cr*7
  1262.       dc.w end_patt
  1263. pb1:
  1264.     dc.w A05,sq,C06,sq,Db06,sq,D06,cr*8
  1265.       dc.w end_patt
  1266. pa1a:
  1267.     dc.w new_snd
  1268.     dc.l sax2
  1269.       dc.w new_env
  1270.       dc.l org_env
  1271.     dc.w A05,sq,G05,sq,F05,sq,D05,cr*7
  1272.       dc.w end_patt
  1273. pb1a:
  1274.       dc.w A05,sq,G05,sq,F05,sq,D05,cr*8,rest,cr*35
  1275.     dc.w end_patt
  1276. p2:
  1277.     dc.w new_snd
  1278.     dc.l clv2
  1279.       dc.w new_env
  1280.       dc.l flt1_env
  1281.       dc.w modon,1,1
  1282.       dc.w 3,3,4,4
  1283.     dc.w C05,sq,C05,sq,A04,sq,C05,sq*3,A04,q
  1284.     dc.w C05,q,D05,sq,rest,sq,D05,sq
  1285.     dc.w new_snd
  1286.     dc.l tom1
  1287.     dc.w r16,sq,r14,sq,r12,sq
  1288.     dc.w new_snd
  1289.     dc.l sax2
  1290.       dc.w new_env
  1291.       dc.l org_env
  1292.     dc.w F05,cr,D05,cr,C05,cr,D05,cr
  1293.     dc.w new_snd
  1294.     dc.l clv2
  1295.       dc.w new_env
  1296.       dc.l flt1_env
  1297.     dc.w C05,sq,C05,sq,A04,sq,C05,sq*3,A04,q
  1298.     dc.w C05,q,D05,sq,rest,sq,D05,sq
  1299.     dc.w new_snd
  1300.     dc.l tom1
  1301.     dc.w r16,sq,r14,sq,r12,sq
  1302.     dc.w new_snd
  1303.     dc.l sax2
  1304.       dc.w new_env
  1305.       dc.l org_env
  1306.     dc.w A05,cr,G05,cr,F05,sq,G05,sq,F05,q,D05,q,rest,q
  1307.     dc.w new_snd
  1308.     dc.l clv2
  1309.       dc.w new_env
  1310.       dc.l flt1_env
  1311.     dc.w C05,sq,C05,sq,A04,sq,C05,sq*3,A04,q
  1312.     dc.w C05,q,D05,sq,rest,sq,D05,sq
  1313.     dc.w new_snd
  1314.     dc.l tom1
  1315.     dc.w r16,sq,r14,sq,r12,sq    ;20 cr
  1316.     dc.w new_snd
  1317.     dc.l sax2
  1318.       dc.w new_env
  1319.       dc.l org_env
  1320.     dc.w F05,cr,D05,cr,C05,cr,D05,cr
  1321.     dc.w new_snd
  1322.     dc.l clv2
  1323.       dc.w new_env
  1324.       dc.l flt1_env
  1325.     dc.w C05,sq,C05,sq,A04,sq,C05,sq*3,A04,q
  1326.     dc.w C05,q,D05,sq,rest,sq,D05,sq
  1327.     dc.w new_snd
  1328.     dc.l tom1
  1329.     dc.w r16,sq,r14,sq,r12,sq    ;28
  1330.     dc.w new_snd
  1331.     dc.l sax2
  1332.       dc.w new_env
  1333.       dc.l org_env
  1334.     dc.w A05,cr,G05,cr,F05,sq,G05,sq,F05,q,D05,q    ;31.5
  1335.       dc.w new_env
  1336.       dc.l kick_env
  1337.       dc.w new_snd
  1338.       dc.l snr1
  1339.       dc.w r4,q*7
  1340.      dc.w end_patt
  1341. pdd:
  1342.       dc.w new_env
  1343.       dc.l kick_env
  1344.       dc.w new_snd
  1345.       dc.l snr1
  1346.       dc.w r4,cr*4
  1347.      dc.w end_patt
  1348. p3:
  1349.       dc.w new_env
  1350.       dc.l kick_env
  1351.       dc.w new_snd
  1352.       dc.l fingbl
  1353.     dc.w C03,sq,A02,sq,C03,sq,D03,sq*3,A02,q
  1354.     dc.w C03,q,G02,q,A02,q,F02,q
  1355.       dc.w end_patt
  1356. p10:     
  1357.       dc.w new_env
  1358.     dc.l kick_env
  1359.       dc.w new_snd
  1360.       dc.l kik1
  1361.       dc.w r16,sQ,r16,sq,r16,sQ,r16,Q,rest,sq*3
  1362.       dc.w r16,sQ,r16,sq,r16,sQ
  1363.       dc.w new_snd
  1364.       dc.l snr1
  1365.       dc.w r16,cr+sq
  1366.       dc.w new_snd
  1367.       dc.l kik1
  1368.       dc.w r16,sQ,r16,sq,r16,sQ,r16,Q,rest,sq*3
  1369.       dc.w r16,sQ,r16,sq,r16,sQ
  1370.       dc.w new_snd
  1371.       dc.l snr1
  1372.       dc.w r16,Q+sq,r14,q
  1373.       dc.w end_patt
  1374.  
  1375. CR      set 24
  1376. Q       set cr/2
  1377. SQ      set cr/4
  1378.  
  1379. s5:
  1380.     dc.l    pr2,p1z,p1z,p1z,p2z
  1381.     dc.l    p1z,p1z,p1z,pr
  1382.     dc.l    p1z,p1z,p1z,p1az
  1383.     dc.l    p1z,p1z,p1z,p2z,p3z
  1384.       dc.l     0,end_song
  1385.  
  1386. s6:
  1387.     dc.l    pr2,p4z,p4z,p4z,p4az,p5z
  1388.     dc.l    p4z,p4z,p4z,p4z,p3az
  1389.         DC.L    0,end_song
  1390.  
  1391. s7:
  1392.     dc.l    p6z,p10z,p10z,p10z,p11z
  1393.     dc.l    p10z,p10z,p10z,p11z
  1394.     dc.l    p10z,p10z,p10z,p11z
  1395.     dc.l    p10z,p10z,p10z,p11z,p11z
  1396.     dc.l     0,end_song
  1397. s8:
  1398.     dc.l    p22,pr,pr,p23
  1399.     dc.l    pr,pr,pr,p23
  1400.     dc.l    pr,pr,pr,p23
  1401.     dc.l    pr,pr,pr,p23,pr2,p6z
  1402.     dc.l     0,end_song
  1403.  
  1404. pr:
  1405.       dc.w rest,cr*4
  1406.       dc.w end_patt
  1407. pr2:
  1408.       dc.w rest,cr*2
  1409.       dc.w end_patt
  1410.  
  1411. p1z:
  1412.       dc.w new_snd
  1413.       dc.l sax2
  1414.       dc.w new_env
  1415.       dc.l org_env
  1416.     dc.w F05,sq,Eb05,sq,Eb05,sq,Eb05,sq
  1417.     dc.w F05,sq,D05,sq,D05,sq,Eb05,sq
  1418.     dc.w Eb05,sq,D05,sq,D05,sq,Eb05,sq
  1419.     dc.w F05,sq,F05,sq,Eb05,sq,D05,sq
  1420.       dc.w end_patt
  1421. p1az:
  1422.       dc.w new_env
  1423.       dc.l org_env
  1424.       dc.w modon,2,2
  1425.       dc.w 10,10,20,20
  1426.     dc.w F05,cr*4
  1427.       dc.w end_patt
  1428. p2z:
  1429.     dc.w F05,sq,Ab05,sq,Bb05,sq,B05,sq
  1430.     dc.w C06,sq,Eb06,sq,F06,sq,Eb06,sq
  1431.     dc.w F06,sq,Eb06,sq,C06,sq,B05,sq
  1432.     dc.w Bb05,sq,Ab05,sq,F05,sq,Eb05,sq
  1433.       dc.w end_patt
  1434. p3z:
  1435.       dc.w new_env
  1436.       dc.l org_env
  1437.       dc.w modon,1,1
  1438.       dc.w 3,3,4,4
  1439.     dc.w Ab05,sq,F05,sq,Ab05,sq,Bb05,sq
  1440.     dc.w Ab05,sq,F05,sq,Eb05,q
  1441.     dc.w F05,sq,Ab05,sq,Bb05,sq,C06,sq
  1442.     dc.w Eb06,sq,F06,sq,Ab06,sq,Bb05,sq
  1443.      dc.w end_patt
  1444. p3az:
  1445.       dc.w new_snd
  1446.       dc.l sax2
  1447.       dc.w new_env
  1448.       dc.l org_env
  1449.       dc.w modon,1,1
  1450.       dc.w 3,3,4,4
  1451.     dc.w rest,cr*2
  1452.     dc.w C05,sq,Eb05,sq,F05,sq,Ab05,sq
  1453.     dc.w Bb05,sq,C06,sq,Eb06,sq,F06,sq
  1454.      dc.w end_patt
  1455. ;p4z:
  1456.       dc.w new_snd
  1457.       dc.l fingbl
  1458.       dc.w new_env
  1459.       dc.l kick_env
  1460.     dc.w F02,3,rest,3,F02,sq,Eb02,q,F02,q,Eb02,sq,F02,q,F02,sq
  1461.     dc.w Ab02,q,Bb02,q,Ab02,q
  1462.     dc.w F02,3,rest,3,F02,sq,Eb02,q,F02,q,Eb02,sq,F02,q,F02,sq
  1463.     dc.w C02,q,Eb02,q,E02,q
  1464.       dc.w end_patt
  1465. ;p4az:
  1466.       dc.w new_env
  1467.       dc.l kick_env
  1468.     dc.w F02,3,rest,3,F02,sq,Eb02,q,F02,q,Eb02,sq,F02,q,F02,sq
  1469.     dc.w Ab02,q,Bb02,q,Ab02,sq
  1470.       dc.w end_patt
  1471. p6z:
  1472.       dc.w new_snd
  1473.       dc.l tom1
  1474.       dc.w new_env
  1475.       dc.l kick_env
  1476.     dc.w rest,q,r16,sq,r16,sq
  1477.     dc.w r14,sq,r14,sq,r12,sq,r12,sq
  1478.       dc.w end_patt
  1479. p4z:
  1480.       dc.w new_snd
  1481.       dc.l fingbl
  1482.       dc.w new_env
  1483.       dc.l kick_env
  1484.     dc.w F03,sq,F03,sq,Eb03,q,F03,q,Eb03,sq,F03,q,F03,sq
  1485.     dc.w Ab03,q,Bb03,q,Ab03,q
  1486.     dc.w F03,sq,F03,sq,Eb03,q,F03,q,Eb03,sq,F03,q,F03,sq
  1487.     dc.w C03,q,Eb03,q,E03,q
  1488.       dc.w end_patt
  1489. p4az:
  1490.       dc.w new_env
  1491.       dc.l kick_env
  1492.     dc.w F03,sq,F03,sq,Eb03,q,F03,q,Eb03,sq,F03,q,F03,sq
  1493.     dc.w Ab03,q,Bb03,q,Ab03,sq
  1494.       dc.w end_patt
  1495. p5z:
  1496.       dc.w new_env
  1497.       dc.l kick_env
  1498.     dc.w F03,q,F03,sq,Eb03,q,C03,sq,C03,sq,Bb02,q,Ab02,sq,Bb02,q,F02,sq*5
  1499.       dc.w end_patt
  1500. p10z:     
  1501.       dc.w new_env
  1502.     dc.l kick_env
  1503.       dc.w new_snd
  1504.       dc.l kik1
  1505.       dc.w r16,cr
  1506.       dc.w new_snd
  1507.       dc.l snr1
  1508.       dc.w r16,q
  1509.       dc.w new_snd
  1510.       dc.l kik1
  1511.       dc.w r16,sQ,r16,sq,r16,cr
  1512.       dc.w new_snd
  1513.       dc.l snr1
  1514.       dc.w r16,Q,r14,q
  1515.       dc.w end_patt
  1516. p11z:     
  1517.       dc.w new_env
  1518.     dc.l kick_env
  1519.       dc.w new_snd
  1520.       dc.l kik1
  1521.       dc.w r16,sq,r16,sq,r16,sq,r16,sq
  1522.       dc.w new_snd
  1523.       dc.l snr1
  1524.       dc.w r16,q
  1525.       dc.w new_snd
  1526.       dc.l kik1
  1527.       dc.w r16,sQ,r16,sq,r16,sq,r16,sq
  1528.       dc.w new_snd
  1529.       dc.l snr1
  1530.       dc.w r16,Q
  1531.       dc.w new_snd
  1532.       dc.l kik1
  1533.       dc.w r16,sQ,r16,sq
  1534.       dc.w new_snd
  1535.       dc.l snr1
  1536.       dc.w r16,Q
  1537.       dc.w end_patt
  1538. p22:     
  1539.       dc.w new_env
  1540.     dc.l kick_env
  1541.       dc.w new_snd
  1542.       dc.l snr1
  1543.       dc.w r5,cr*6
  1544.       dc.w end_patt
  1545. p23:     
  1546.       dc.w new_snd
  1547.       dc.l cow
  1548.       dc.w rest,q*5,r14,sq,r14,sq
  1549.       dc.w rest,q,r14,sq,r14,sq
  1550.       dc.w end_patt
  1551.  
  1552.  
  1553.  
  1554.  
  1555. ;****************************************************************
  1556.  
  1557. ;;;;;;;;;;;;;;;;;;;;;    Guide  Music Data ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1558.  
  1559. ;    dc.w pbend,up,13,f05,2
  1560. ;    dc.w f04,cr*3
  1561.  
  1562.     ; sample parameters
  1563. hatcl        dc.w 1
  1564.              dc.l hatcd
  1565.              dc.w 665/2 
  1566.              dc.l restd
  1567.              dc.w 16/2
  1568. cow
  1569.         dc.w 1  
  1570.              dc.l cowd
  1571.              dc.w 355/2    ;;;1938/2 
  1572.              dc.l restd
  1573.              dc.w 16/2 
  1574. clv2
  1575.         dc.w 1  
  1576.              dc.l clv2d
  1577.              dc.w 1632/2 
  1578.              dc.l restd
  1579.              dc.w 16/2
  1580. ;bas4
  1581. ;        dc.w 1  
  1582. ;             dc.l bas4d
  1583. ;             dc.w 1801/2 
  1584. ;             dc.l restd
  1585. ;             dc.w 16/2
  1586. kik1
  1587.         dc.w 1  
  1588.              dc.l kik1d
  1589.              dc.w 3801/2 
  1590.              dc.l restd
  1591.              dc.w 16/2
  1592. snr1
  1593.         dc.w 1  
  1594.              dc.l snr1d
  1595.              dc.w 6325/2 
  1596.              dc.l restd
  1597.              dc.w 16/2
  1598. tom1
  1599.         dc.w 1  
  1600.              dc.l tom1d
  1601.              dc.w 2630/2 
  1602.              dc.l restd
  1603.              dc.w 16/2
  1604. ;orglp2
  1605. ;        dc.w 1  
  1606. ;             dc.l orglp2d
  1607. ;             dc.w 5408/2 
  1608. ;        dc.l orglp2d
  1609. ;             dc.w 5408/2 
  1610. ;shak
  1611. ;        dc.w 1  
  1612. ;             dc.l shakd
  1613. ;             dc.w 6237/2 
  1614. ;        dc.l shakd
  1615. ;             dc.w 6237/2 
  1616. fingbl
  1617.         dc.w 1  
  1618.              dc.l fingbld
  1619.              dc.w 12896/2 
  1620.              dc.l restd
  1621.              dc.w 16/2
  1622. ;chord1
  1623. ;        dc.w 1  
  1624. ;             dc.l chord1d
  1625. ;             dc.w 3394/2 
  1626. ;             dc.l restd
  1627. ;             dc.w 16/2
  1628. ;chord2
  1629. ;        dc.w 1  
  1630. ;             dc.l chord2d
  1631. ;             dc.w 2037/2 
  1632. ;             dc.l restd
  1633. ;             dc.w 16/2
  1634. sax2
  1635.         dc.w 1  
  1636.              dc.l sax2d
  1637.              dc.w 6073/2 
  1638.         dc.l sax2d
  1639.              dc.w 6073/2 
  1640. ;bas5
  1641. ;        dc.w 1  
  1642. ;             dc.l bas5d
  1643. ;             dc.w 3394/2 
  1644. ;             dc.l restd
  1645. ;             dc.w 16/2
  1646.  
  1647. ;sine
  1648. ;        dc.w 1  
  1649. ;             dc.l sine_datad
  1650. ;             dc.w 18/2 
  1651. ;             dc.l sine_datad
  1652. ;             dc.w 18/2
  1653.  
  1654.  
  1655. restd:
  1656. rest_data:
  1657.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1658.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1659.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1660.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1661.  
  1662. sine_datad:
  1663.              dc.w 127,100,50,25,0,-25,-50,-100,-127
  1664.              dc.w -127,-100,-50,-25,0,25,50,100,127
  1665.  
  1666. bas5_env        dc.w 0,45,255
  1667. bas5_env2        dc.w 0,45,45,45,45,45,45,40,35,0,255
  1668. og            dc.w 0,35,255
  1669. kick_env        dc.w 0,64,255
  1670. x_env:            dc.w 0,54,255
  1671. q_env:            dc.w 0,20,255
  1672. guit_env        dc.w 0,44,255
  1673. shak_env:        dc.w 0,25,25,25,0,0,0,25,25,255
  1674. flt1_env:        dc.w 0,35,255
  1675. org_env:        dc.w 0,25,255
  1676. jet_env            dc.w 0,64,64,59,54,49,44,40
  1677.             dc.w 35,30,25,20,15,255
  1678.             dc.w 10,10,11,12,13,255
  1679. sax_env            dc.w 0,34,34,29,29,24,24
  1680.             dc.w 20,20,17,15
  1681.             dc.w 10,10,9,8,7,0,255
  1682. rest_env:        dc.w 0,0,0,0,0,0,0,0,255
  1683.  
  1684.  
  1685. ;**************************************************
  1686. hatcd            incbin df1:hatc124.sam
  1687. ;orglp2d            incbin df1:orglp2.sam
  1688. kik1d            incbin df1:kik1.sam
  1689. snr1d            incbin df1:snr1.sam
  1690. tom1d:            incbin df1:tom1.sam
  1691. cowd            incbin df1:cow2.sam  
  1692. clv2d            incbin df1:clv2.sam
  1693. ;bas4d            incbin df1:bas4.sam
  1694. fingbld            incbin df1:fingbl.sam
  1695. ;bas5d            incbin df1:bas5.sam
  1696. sax2d            incbin df1:sax2.sam
  1697. ;chord1d            incbin df1:chord1.sam
  1698. ;chord2d            incbin df1:chord2.sam
  1699. ;shakd            incbin df1:shakuhac.sam
  1700.  
  1701. ;*************************************************
  1702.  
  1703.  
  1704.  
  1705.     end
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.