home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: Amiga KQ 6 Levels Data / Lowe_AmigaKQ6LevelsData.adf / isle_of_wonder / kq6iow.s < prev   
Encoding:
Text File  |  1978-08-04  |  51.5 KB  |  2,860 lines

  1.  
  2.  
  3.  
  4.  
  5.     ;    DRIVER AND MUSIC REMAIN COPYRIGHT D.LOWE 
  6.  
  7.     ;       KINGS QUEST VI..Island Of Wonder
  8.     ;
  9.  
  10.  
  11.     ;music list
  12.  
  13.  
  14.         ;1]    beach
  15.         ;2]    dwarves walk on
  16.         ;3]    garden music
  17.         ;4]    snapdragons dance
  18.         ;5]    chess fanfare at gates
  19.         ;6]    chess queens tune
  20.         ;7]    bookworm tune
  21.         ;8]    nightingale
  22.         ;9]    alexanders flute
  23.         ;10]    dragged to sea..drown tune
  24.         ;11]    snap dragons snapping
  25.  
  26.  
  27.     ;FX LIST
  28.  
  29. ;        1]         clunk1
  30. ;        2]         clunk2
  31. ;        3]         score1
  32. ;        4]         score2
  33. ;        5]         score3
  34. ;        6]         score4
  35. ;        7]         score5
  36. ;        8]         magic_map
  37. ;        9]         danger            ;fx number 1
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.     ;  .....fade only affects music in this version
  45.  
  46.     ;    JEREMY
  47.     ;    devpac source code file... no macros.
  48.     ;       Its commented wherever needed
  49.     ;    The samples are incbin at the end,you will
  50.     ;    need to change the directory to your own.
  51.     ;    This source files contains a devpac pseudo op
  52.     ;    called set. it allows redefining of values
  53.     ;    you may need to change this to something else if
  54.     ;    using a different assembler.
  55.  
  56.     ;    It must be assembled with SYMBOLS CASE independent.
  57.  
  58.     ;       dont hesitate to ring with any problems
  59.  
  60.  
  61.  
  62.     ;        DAVE LOWE.....0723  870648
  63.  
  64.  
  65.  
  66. ;        **************************
  67.  
  68.     section issA,code_c    ;must be in low memory for dma access
  69.                 ;DEVPAC PSEUDO OP ..CAN BE DELETED
  70.  
  71.  
  72. ;*****************************************
  73.  
  74.  
  75. select_tunes    equ 0        ;for conditional assembly whilst testing
  76.                 ; zero to step tunes on mouse button
  77.                 ; can be deleted..not essential
  78.  
  79.         ;  ALL EQUs
  80.  
  81. a00  equ  508*2
  82. bb00  equ  480*2
  83. b00  equ  453*2
  84.  
  85. c01  equ  428*2
  86. db01  equ  404*2
  87. d01 equ  381*2
  88. eb01  equ  360*2
  89. e01  equ  339*2
  90. f01  equ  320*2
  91. gb01  equ  302*2
  92. g01  equ  285*2
  93. ab01 equ 269*2
  94. a01  equ  508
  95. bb01  equ  480
  96. b01  equ  453
  97.  
  98. c02  equ  428
  99. db02  equ  404
  100. d02  equ  381
  101. eb02  equ  360
  102. e02  equ  339
  103. f02  equ  320
  104. gb02  equ  302
  105. g02  equ  285
  106. ab02 equ 269
  107. a02  equ  254
  108. bb02  equ  240
  109. b02  equ  226
  110.  
  111. c03  equ  214
  112. db03  equ  202
  113. d03  equ  190
  114. eb03  equ  180
  115. e03  equ  170
  116. f03  equ  160
  117. gb03  equ  151
  118. g03  equ  143
  119. ab03 equ 135
  120. a03  equ  127
  121.  
  122. bb03  equ  480*2
  123. b03  equ  453*2
  124.  
  125. c04  equ  428*2
  126. db04  equ  404*2
  127. d04 equ  381*2
  128. eb04  equ  360*2
  129. e04  equ  339*2
  130. f04  equ  320*2
  131. gb04  equ  302*2
  132. g04  equ  285*2
  133. ab04 equ 269*2
  134. a04  equ  508
  135. bb04  equ  480
  136. b04  equ  453
  137.  
  138. c05  equ  428
  139. db05  equ  404
  140. d05  equ  381
  141. eb05  equ  360
  142. e05  equ  339
  143. f05  equ  320
  144. gb05  equ  302
  145. g05  equ  285
  146. ab05 equ 269
  147. a05  equ  254
  148. bb05  equ  240
  149. b05  equ  226
  150.  
  151. c06  equ  214
  152. db06  equ  202
  153. d06  equ  190
  154. eb06  equ  180
  155. e06  equ  170
  156. f06  equ  160
  157. gb06  equ  151
  158. g06  equ  143
  159. ab06 equ 135
  160. a06  equ  127
  161. bb06  equ  480*2
  162. b06  equ  453*2
  163.  
  164. c07  equ  428*2
  165. db07  equ  404*2
  166. d07 equ  381*2
  167. eb07  equ  360*2
  168. e07  equ  339*2
  169. f07  equ  320*2
  170. gb07  equ  302*2
  171. g07  equ  285*2
  172. ab07 equ 269*2
  173. a07  equ  508
  174. bb07  equ  480
  175. b07  equ  453
  176.  
  177. c08  equ  428
  178. db08  equ  404
  179. d08  equ  381
  180. eb08  equ  360
  181. e08  equ  339
  182. f08  equ  320
  183. gb08  equ  302
  184. g08  equ  285
  185. ab08 equ 269
  186. a08  equ  254
  187. bb08  equ  240
  188. b08  equ  226
  189.  
  190.  
  191. v equ 0
  192.  
  193. no_loop equ 0
  194. loop equ 0
  195. chann1reg   equ $dff0a0    
  196. chann2reg   equ $dff0b0
  197. chann3reg   equ $dff0c0
  198. chann4reg   equ $dff0d0
  199. dmacon     equ $dff096
  200. int_bf_int   equ   $dff01e
  201. int_bf_w    equ   $dff09a
  202. vhposr     equ   $dff006
  203. in_line    equ   0
  204. new_snd    equ   4
  205. end_song     equ   1
  206. end_patt    equ   8
  207. new_env    equ   12
  208. pbend     equ   16
  209.  
  210.  
  211.  
  212. hi: equ 223
  213. lo:  equ 446
  214.  
  215. r22    equ 134
  216. r20    equ 179        ;correctum
  217. r19    equ 150
  218. r18    equ 178
  219. r17    equ 200
  220. r16:    equ 227        ;correctum
  221. r15:    equ 249
  222. r14    equ 280
  223. r13:    equ 305
  224. r12:    equ 333
  225. r11:    equ 361
  226. r10:    equ 389
  227. r9:    equ 419
  228. r8:    equ 446
  229. r7:    equ 446+112
  230. r6:    equ 446+223
  231. r5:    equ 446+223+112
  232. r4:    equ 446*2
  233. r3:    equ 446*3
  234. r2:    equ 446*4
  235. r1:    equ 446*8
  236.  
  237.  
  238. filter: equ $bfe001
  239. filter_on equ 44
  240. filter_off equ 48
  241.  
  242. modon     equ   20
  243. pboff     equ   24
  244. modoff     equ   28
  245. rest     equ 32
  246. end_fxp  equ 36
  247. end_fx3  equ 36
  248. end_fx4  equ 40
  249. acc    equ 52
  250. repeat    equ 56
  251. down      equ   1
  252. up       equ   2
  253.  
  254. fx    equ 0
  255.  
  256.  
  257.  
  258. ;**************************************************************************
  259. ;**************************************************************************
  260.  
  261.  
  262.  ;    THIS IS THE CONTROL SECTION FOR TESTING AS A STAND ALONE PRG. 
  263.  
  264.     ;       AND CAN BE DELETED WHEN NOT REQUIRED
  265.  
  266.     move.l    #1,song_buffer
  267.     jsr select_new_song    ;set up tune..number 1
  268.  
  269. testloop:
  270.     jsr delay    ;wait for scan line  at 50hz on pal
  271.  
  272.     jsr driver    ;run driver at 50 hz for testing
  273.  
  274.         bra testloop    ;loop back
  275.  
  276.  
  277. ;--------
  278.  
  279.         ;these are all routines used during test/stand alone
  280.         ;        assembly
  281.  
  282. delay:
  283.     tst.w fxtimer
  284.     bne no_test
  285.     clr.l d0
  286.     move.b $bfe001,d0
  287.     btst #6,d0
  288.     bne no_test1
  289.     move.w #10,fxtimer
  290.     bra testfx4
  291. no_test
  292.     subq #1,fxtimer
  293. no_test1
  294.     clr.l d0
  295.         move.w vhposr,d0
  296.         andi.w #%1111111100000000,d0
  297.         cmpi.w #%1111111100000000,d0
  298.  
  299.     bne no_test1
  300.     rts
  301.  
  302. testfx4:  
  303.  
  304.     clr.l d0
  305.     move.b $bfe001,d0
  306.     btst #6,d0
  307.     beq testfx4
  308.  
  309.     move.l song_buffer,d0
  310.     addq.l #1,d0
  311.     cmp.l    max_songs,d0
  312.     bne nores
  313.     move.l #1,d0
  314. nores    move.l d0,song_buffer
  315.  
  316.  
  317.     ifeq    select_tunes
  318.  
  319.     jsr    select_new_song        ;new song on mouse button
  320.  
  321.  
  322.     endc
  323.  
  324.     move.l fx_last,d0
  325.     move.l d0,fx_kill
  326.  
  327.     jsr kill_loopfx            ;use only one fx at a time
  328.                     ;for testing
  329.  
  330. no_k
  331.         move.l fx_no,fx_number
  332.     move.l fx_no,fx_last
  333.     addq.l #1,fx_no
  334.     move.l    max_fx,d0
  335.         cmp.l fx_no,d0
  336.     bne noreset
  337.     move.l #1,fx_no    
  338. noreset: 
  339.  
  340.  
  341.     ifne    select_tunes
  342.  
  343.     jsr set_up_fx
  344.  
  345.     endc
  346.  
  347.     bra no_test    
  348.  
  349. fxtc:          dc.w 10
  350. fx_no:         dc.l  1
  351. fx_last        dc.l  0
  352.  
  353.  
  354. ;        END OF CONTROL (DELETABLE) SECTION
  355.  
  356. ;********************************************************************
  357. ;********************************************************************
  358.  
  359. ;    MAIN VARIABLES TO BE ACCESSED BY PROGRAMMER DURING RUNTIME
  360.  
  361.  
  362. fx_number:     dc.l 0 ;     number of fx required here
  363.  
  364.  
  365. fx_kill        dc.l 0 ;     number of fx to kill/used mainly
  366.                ;     to kill looping fx
  367.  
  368.  
  369. song_buffer     dc.l 1 ;     number of piece of music required here ie.1 to ?               ;     currently playing beach background..see list
  370.  
  371. music_disable:  dc.w 0 ;     1 = disable music
  372.  
  373. fx_disable:     dc.w 0 ;     1 = disable fx
  374.  
  375.  
  376. fade:        dc.w 0 ;      0 to 64..0 = full volume/64 = off
  377.  
  378.  
  379. ;    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  380.  
  381. ;  THESE VARIABLES ARE USED INTERNALLY BY THE DRIVER
  382. fxr1         dc.l 0  
  383. fxr2         dc.l 0  
  384. fxr3         dc.l 0  
  385. fxr4         dc.l 0  
  386. fxc1        dc.l 0
  387. fxc2          dc.l 0
  388. fxc3        dc.l 0
  389. fxc4          dc.l 0
  390. fx1_flag    dc.w 0
  391. fx2_flag    dc.w 0
  392. fx3_flag    dc.w 0
  393. fx4_flag    dc.w 0
  394. fxtimer        dc.w 0
  395. gen        dc.w 0
  396. int_disable    dc.w 0
  397. altpf         dc.w 0
  398. kill_flag    dc.w 0
  399. mode        dc.w 0
  400. ;  *******************************************************
  401.  
  402. ;  CALL THIS SUBROUTINE TO SET UP THE REQIURED FX
  403. ;  on entry it requires the fx number to be in "fx_number"(see above)
  404.  
  405.  
  406. set_up_fx
  407.     movem.l d5/a2,-(a7)    ;save used registers
  408.  
  409.     tst.l fxc4
  410.     bne check3
  411. use4:    
  412.     move.w #%0000000000001000,d5
  413.     lea chann4reg,a2
  414.     jsr end_fx4p
  415.     move.l fx_number,fxr4
  416.     move.l fx_number,fxc4
  417.     move.l #0,fx_number
  418.     bra no_fx
  419. check3:    tst.l fxc3
  420.     bne check2
  421. use3:
  422.     move.w #%0000000000000100,d5
  423.     lea chann3reg,a2
  424.     jsr end_fx3p
  425.     move.l fx_number,fxr3
  426.     move.l fx_number,fxc3
  427.     move.l #0,fx_number
  428.     bra no_fx
  429. check2:    tst.l fxc2
  430.     bne check1
  431. use2:
  432.     move.w #%0000000000000010,d5
  433.     lea chann2reg,a2
  434.     jsr end_fx2p
  435.     move.l fx_number,fxr2
  436.     move.l fx_number,fxc2
  437.     move.l #0,fx_number
  438.     bra no_fx
  439. check1:    tst.l fxc1
  440.     bne use3
  441. use1:
  442.     move.w #%0000000000000001,d5
  443.     lea chann1reg,a2
  444.     jsr end_fx1p
  445.     move.l fx_number,fxr1
  446.     move.l fx_number,fxc1
  447.     move.l #0,fx_number
  448. no_fx
  449.     movem.l (a7)+,d5/a2    ;restore registers
  450.     rts
  451.  
  452. ;*************************************************
  453. ;          CALL HERE TO KILL ANY FX...
  454. ;       after putting the number of the fx you want to kill
  455. ;            into fx_kill
  456.  
  457. kill_loopfx
  458.  
  459.     movem.l d5/a2,-(a7)    ;save used registers
  460.     move.l fx_kill,d5
  461.     cmp.l fxc1,d5
  462.     bne k2
  463.     move.w #%0000000000000001,d5
  464.     lea chann1reg,a2
  465.     jsr end_fx1p
  466.     bra error
  467. k2    cmp.l fxc2,d5
  468.     bne k3
  469.     move.w #%0000000000000010,d5
  470.     lea chann2reg,a2
  471.     jsr end_fx2p
  472.     bra error
  473. k3    cmp.l fxc3,d5
  474.     bne k4
  475.     move.w #%0000000000000100,d5
  476.     lea chann3reg,a2
  477.     jsr end_fx3p
  478.     bra error
  479. k4    cmp.l fxc4,d5
  480.     bne error
  481.     move.w #%0000000000001000,d5
  482.     lea chann2reg,a2
  483.     jsr end_fx4p
  484. error
  485.     clr.l fx_kill
  486.     movem.l (a7)+,d5/a2    ;restore registers
  487.     rts
  488. ;*************************************************
  489.  
  490.     ; CALL HERE TO KILL ANY SOUNDS LEFT ON CHIP
  491.  
  492. kill_chip:
  493.     move.w #%0000000000001111,dmacon
  494.     move.l rest_data,chann1reg
  495.     move.l rest_data,chann2reg
  496.     move.l rest_data,chann3reg
  497.     move.l rest_data,chann4reg
  498.     move.w #16,chann1reg+4    
  499.     move.w #16,chann2reg+4    
  500.     move.w #16,chann3reg+4    
  501.     move.w #16,chann4reg+4    
  502.     move.w #0,chann1reg+8
  503.     move.w #0,chann2reg+8
  504.     move.w #0,chann3reg+8
  505.     move.w #0,chann4reg+8
  506.     move.w #1,chann1reg+6
  507.     move.w #1,chann2reg+6
  508.     move.w #1,chann3reg+6
  509.     move.w #1,chann4reg+6
  510.     move.l #0,fxr1
  511.     move.l #0,fxr2
  512.     move.l #0,fxr3
  513.     move.l #0,fxr4
  514.     move.w #0,fx1_flag
  515.     move.w #0,fx2_flag
  516.     move.w #0,fx3_flag
  517.     move.w #0,fx4_flag
  518.     move.l #0,fxc1
  519.     move.l #0,fxc2
  520.     move.l #0,fxc3
  521.     move.l #0,fxc4
  522.     rts
  523. ;****************************************
  524.  
  525. ;  CALL HERE TO SELECT WHICH PIECE OF MUSIC TO PLAY
  526. ;  AFTER PLACING NUMBER (1 to ?) IN "SONG_BUFFER"..see above
  527. ;  a call to this routine will initiliase the driver/kill any sound etc.      
  528. ;  make sure this routine has been called before running the interrupt
  529. ;  driven section....see below
  530.  
  531. select_new_song:
  532.  
  533.     move.w #1,int_disable
  534.     movem.l d0/d1/a0/a1,-(a7)    ;save used registers
  535.     move.w music_disable,gen
  536.     move.w #1,music_disable
  537.         jsr kill_chip           
  538.     clr.l d0
  539.         move.w #204,d0
  540.         lea gvars,a0
  541. clloop: clr.w (a0)+        
  542.         dbra  d0,clloop
  543.     tst.l song_buffer
  544.     beq no_song
  545.         move.l song_buffer,d1
  546.     add.l d1,d1
  547.      add.l d1,d1
  548.      add.l d1,d1
  549.      add.l d1,d1
  550.         LEA  SONG_TABLE-16,A1
  551.  
  552.         add.l d1,a1      
  553.         MOVE.L (A1)+,WSONG1    
  554.         move.l (a1)+,wsong2    
  555.         move.l (a1)+,wsong3
  556.     move.l (a1),wsong4
  557.         MOVE.L #pstart,PATTR1
  558.         MOVE.L #pstart,PATTR2
  559.         MOVE.L #pstart,PATTR3
  560.     move.l #pstart,pattr4
  561.         move.l #sstart,songr1
  562.         MOVE.L #sstart,SONGR2
  563.         MOVE.L #sstart,SONGR3
  564.     move.l #sstart,songr4
  565. no_song
  566.     move.w #1,ch1vars
  567.     move.w #2,ch2vars
  568.     move.w #3,ch3vars
  569.     move.w #4,ch4vars
  570.     move.w #6,ch4fxvars
  571.     move.w #5,ch3fxvars
  572.     move.w #7,ch2fxvars
  573.     move.w #8,ch1fxvars
  574.     move.w gen,music_disable
  575.     clr.w int_disable
  576.     movem.l (a7)+,d0/d1/a0/a1    ;restore registers
  577.         rts
  578.  
  579. ;**************************************************
  580.  
  581.         ;This is the interrupt routine
  582.  
  583.  
  584. ;  CALL HERE ON A 50hz INTERRUPT DURING RUNTIME
  585. ;  TO PLAY FX AND TUNES
  586.  
  587. driver:  
  588.     tst.w int_disable
  589.     beq process_data
  590.     rts        
  591. process_data
  592.     movem.l d0-d6/a0-a6,-(a7)    ;save used registers
  593.  
  594.  
  595. ch1:
  596.     tst.w fx_disable
  597.     bne test_music1
  598.     tst.l fxr1
  599.     bne   ch1j1
  600.     tst.l fxc1
  601.     beq test_music1
  602.     bra ch1j3
  603. ch1j2    jsr run_dummy1
  604.     jsr run_fx1
  605.     bra ch2
  606. ch1j1
  607.     jsr set_up1
  608. ch1j3    tst.w music_disable    
  609.     beq ch1j2
  610.     jsr run_fx1
  611.     bra ch2
  612. test_music1
  613.     tst.w music_disable
  614.     bne ch2
  615.     jsr run_music1
  616.     bra ch2
  617.     ;***********************
  618.  
  619.     ; channel 1 subroutines
  620.  
  621. run_dummy1    
  622.      lea ch1vars,a0
  623.      lea dummy_reg,a2 
  624.      move.w #0,d5 
  625.      jsr sect1    
  626.     rts
  627.  
  628. set_up1    
  629.          move.l fxr1,d0
  630.          add d0,d0
  631.          add d0,d0
  632.          lea  fxjump_table-4,A1
  633.      add.l d0,a1
  634.          move.l (a1),currfx1
  635.       clr.l fxr1
  636.      clr.w fxintc1
  637.       rts
  638.   
  639.      
  640. run_fx1
  641.     lea ch1fxvars,a0
  642.        lea chann1reg,a2
  643.       move.w #%0000000000000001,d5 
  644.      move.w #%1000000000000001,d1 
  645.  
  646.     move.w    #1,mode
  647.      jsr sect1
  648.     rts
  649.  
  650. run_music1
  651.     lea ch1vars,a0
  652.        lea chann1reg,a2
  653.       move.w #%0000000000000001,d5 
  654.       move.w #%1000000000000001,d1 
  655.     move.w    #0,mode
  656.       jsr sect1     
  657.     rts
  658.  
  659.     ;  **************************
  660. ch2
  661.     tst.w fx_disable
  662.     bne test_music2
  663.     tst.l fxr2
  664.     bne   ch2j1
  665.     tst.l fxc2
  666.     beq test_music2
  667.     bra ch2j3
  668. ch2j2    jsr run_dummy2
  669.     jsr run_fx2
  670.     bra ch3
  671. ch2j1
  672.     jsr set_up2
  673. ch2j3    tst.w music_disable    
  674.     beq ch2j2
  675.     jsr run_fx2
  676.     bra ch3
  677.  
  678. test_music2
  679.     tst.w music_disable
  680.     bne ch3
  681.     jsr run_music2
  682.     bra ch3
  683.     ;***********************
  684.     ; channel 2 subroutines
  685. run_dummy2    
  686.      lea ch2vars,a0
  687.      lea dummy_reg,a2 
  688.      move.w #0,d5 
  689.      jsr sect1    
  690.     rts
  691.  
  692. set_up2    
  693.          move.l fxr2,d0
  694.          add d0,d0
  695.          add d0,d0
  696.          lea  fxjump_table-4,A1
  697.      add.l d0,a1
  698.          move.l (a1),currfx2
  699.       clr.l fxr2
  700.      clr.w fxintc2
  701.       rts
  702.   
  703.      
  704. run_fx2
  705.     lea ch2fxvars,a0
  706.        lea chann2reg,a2
  707.       move.w #%0000000000000010,d5 
  708.      move.w #%1000000000000010,d1 
  709.     move.w    #1,mode
  710.      jsr sect1
  711.     rts
  712.  
  713. run_music2
  714.     lea ch2vars,a0
  715.        lea chann2reg,a2
  716.       move.w #%0000000000000010,d5 
  717.       move.w #%1000000000000010,d1 
  718.     move.w    #0,mode
  719.       jsr sect1     
  720.     rts
  721.  
  722.     ;  **************************
  723.  
  724. ch3:
  725.     tst.w fx_disable
  726.     bne test_music3
  727.     tst.l fxr3
  728.     bne   ch3j1
  729.     tst.l fxc3
  730.     beq test_music3
  731.     bra ch3j3
  732. ch3j2    jsr run_dummy3
  733.     jsr run_fx3
  734.     bra ch4
  735. ch3j1
  736.     jsr set_up3
  737. ch3j3    tst.w music_disable    
  738.     beq ch3j2
  739.     jsr run_fx3
  740.     bra ch4
  741.  
  742. test_music3
  743.     tst.w music_disable
  744.     bne ch4
  745.     jsr run_music3
  746.     bra ch4
  747.  
  748.     ;***********************
  749.  
  750.     ; channel 3 subroutines
  751.  
  752. run_dummy3    
  753.      lea ch3vars,a0
  754.      lea dummy_reg,a2 
  755.      move.w #0,d5 
  756.      jsr sect1    
  757.     rts
  758.  
  759. set_up3    
  760.          move.l fxr3,d0
  761.          add d0,d0
  762.          add d0,d0
  763.          lea  fxjump_table-4,A1
  764.      add.l d0,a1
  765.          move.l (a1),currfx3
  766.       clr.l fxr3
  767.      clr.w fxintc3
  768.       rts
  769.   
  770.      
  771. run_fx3
  772.     lea ch3fxvars,a0
  773.        lea chann3reg,a2
  774.       move.w #%0000000000000100,d5 
  775.      move.w #%1000000000000100,d1 
  776.     move.w    #1,mode
  777.      jsr sect1
  778.     rts
  779.  
  780. run_music3
  781.     lea ch3vars,a0
  782.        lea chann3reg,a2
  783.       move.w #%0000000000000100,d5 
  784.       move.w #%1000000000000100,d1 
  785.     move.w    #0,mode
  786.       jsr sect1     
  787.     rts
  788.  
  789.     ;  **************************
  790.  
  791. ch4:
  792.     tst.w fx_disable
  793.     bne test_music4
  794.     tst.l fxr4
  795.     bne   ch4j1
  796.     tst.l fxc4
  797.     beq test_music4
  798.     bra ch4j3
  799. ch4j2    jsr run_dummy4
  800.     jsr run_fx4
  801.     bra no4
  802. ch4j1
  803.     jsr set_up4
  804. ch4j3    tst.w music_disable    
  805.     beq ch4j2
  806.     jsr run_fx4
  807.     bra no4
  808.  
  809. test_music4
  810.     tst.w music_disable
  811.     bne no4
  812.     jsr run_music4
  813. no4    
  814.     movem.l (a7)+,d0-d6/a0-a6    ;restore registers
  815.     rts
  816.  
  817.     ;***********************
  818.  
  819.     ; channel 4 subroutines
  820.  
  821. run_dummy4    
  822.      lea ch4vars,a0
  823.      lea dummy_reg,a2 
  824.      move.w #0,d5 
  825.      jsr sect1    
  826.     rts
  827.  
  828. set_up4    
  829.          move.l fxr4,d0
  830.          add d0,d0
  831.          add d0,d0
  832.          lea  fxjump_table-4,A1
  833.      add.l d0,a1
  834.          move.l (a1),currfx4
  835.       clr.l fxr4
  836.      clr.w fxintc4
  837.       rts
  838.   
  839.      
  840. run_fx4
  841.     lea ch4fxvars,a0
  842.        lea chann4reg,a2
  843.       move.w #%0000000000001000,d5 
  844.      move.w #%1000001000001000,d1 
  845.     move.w    #1,mode
  846.      jsr sect1
  847.     rts
  848.  
  849. run_music4
  850.     lea ch4vars,a0
  851.        lea chann4reg,a2
  852.       move.w #%0000000000001000,d5 
  853.       move.w #%1000001000001000,d1 
  854.     move.w    #0,mode
  855.       jsr sect1     
  856.     rts
  857.     ;  **************************
  858.  
  859. sect1: tst.w (a0)
  860.     bne s1j1
  861.     rts
  862.  
  863. s1j1:    tst.w 2(a0)
  864.         beq sect3       
  865.         cmpi.w #1,2(a0)
  866.         beq sect4
  867.  
  868.         cmpi.w #3,4(a0)    
  869.         beq part2       
  870.     
  871. mode_switch:  subq.w #1,2(a0)     
  872.  
  873. check_effects: clr.w altpf      
  874.         move.w 6(a0),d2    
  875.         tst.w 8(a0)      
  876.         beq check_mod
  877.         tst.w 14(a0)      
  878.         beq cont_bend
  879.         subq.w #1,14(a0)
  880.         bra check_mod
  881. cont_bend:   addq.w #1,altpf    
  882.         move.w 10(a0),d3    
  883.         move.w 12(a0),d4    
  884.         cmpi.w #1,8(a0)
  885.         beq pbup
  886.     
  887.         sub.w d3,d2
  888.         cmp.w d2,d4
  889.         bcs check_mod
  890.         bra fbend
  891.  
  892. pbup:     add.w d3,d2
  893.         cmp.w d2,d4
  894.         bcc check_mod
  895. fbend:     move.w d4,d2
  896.         clr.w 8(a0)      
  897. check_mod:   tst.w 16(a0)
  898.         beq send_alt_pitch
  899.    
  900.  
  901.     tst.w  58(a0)
  902.     beq st_ok
  903.     subq.w #1,58(a0)
  904.     bra send_alt_pitch
  905. st_ok:
  906.         tst.w 50(a0)
  907.         beq cont_mod
  908.         subq #1,50(a0)
  909.         bra send_alt_pitch
  910. cont_mod:    move.w 52(a0),50(a0)  
  911.         addq #1,altpf
  912.         cmpi #3,16(a0)
  913.         bcc addmod
  914.     
  915.         move.w 56(a0),d3 
  916.         sub.w d3,d2
  917.         addq.w #1,16(a0)  
  918.         bra send_alt_pitch
  919. addmod:
  920.  
  921.         move.w 54(a0),d3 
  922.         add.w d3,d2
  923.         addq.w #1,16(a0)
  924.         cmpi.w #5,16(a0)
  925.        bne send_alt_pitch
  926.         move.w #1,16(a0)  
  927.  
  928. send_alt_pitch: tst.w altpf
  929.         beq send_env
  930.         move.w d2,6(a0)  
  931.         move.w d2,6(a2)  
  932.  
  933. send_env: 
  934.  
  935. do_env_check:
  936.  
  937. norm_env:
  938.     move.l 18(a0),a1    
  939.         cmpi.w #255,(a1)
  940.         beq env_finished
  941.     ;cmpi.w #1,66(a0)    
  942.     ;bne    no_acc 
  943.  
  944. resu    clr.l d0
  945.     move.w (a1)+,d0
  946.     ;sub.w 64(a0),d0    
  947.  
  948.             ;test for mode here
  949.     tst.w mode
  950.     bne sete
  951.  
  952.     sub.w fade,d0
  953.     bcc sete
  954.  
  955.  
  956.     move.w #0,d0
  957.  
  958.  
  959. sete    move.w d0,8(a2)    
  960.     move.l a1,18(a0)
  961.     rts        
  962.  
  963.  
  964. no_acc:
  965. ;resu:  
  966. no_off
  967.     ;move.w (a1)+,d0
  968.     sub.w fade,d0
  969.     bcc sete2
  970.     move.w #0,d0
  971. sete2    move.w d0,8(a2)
  972.      move.w (a1)+,8(a2)
  973.    
  974. fint:   move.l a1,18(a0)    
  975.     rts
  976.  
  977. env_finished:
  978.     subq.l #2,a1    
  979.     bra resu
  980.     rts
  981.  
  982.  
  983.  
  984. one_shot_note: move.w #3,4(a0)     
  985.         move.l 38(a0),(a2)
  986.         move.w 42(a0),4(a2)
  987.         move.w d1,dmacon     
  988.         bra send_env
  989.  
  990.  
  991. part2:                         
  992.         move.l 44(a0),(a2)
  993.         move.w 48(a0),4(a2)
  994.         subq.w #1,2(a0)      
  995.         move.w #1,4(a0)
  996.         bra check_effects
  997.  
  998. sect3:
  999.     move.w #0,66(a0)    
  1000.  
  1001.     move.l 22(a0),a1  
  1002. control_ret: move.w (a1)+,d0  
  1003.     cmpi.w #100,d0   
  1004.     bls sect5   
  1005.   
  1006. acc_note:
  1007.     move.w d0,6(a0)  
  1008.     move.w d0,6(a2)  
  1009.     move.w (a1)+,2(a0) 
  1010.     subq.w #1,2(a0)  
  1011.     move.l a1,22(a0)  
  1012.     move.l 34(a0),18(a0) 
  1013.     move.w 60(a0),58(a0) 
  1014.  
  1015.  
  1016.     tst.w 16(a0)
  1017.     beq no_mod_res
  1018.     move.w #1,16(a0)
  1019. no_mod_res:
  1020.     cmpi.w #0,4(a0)
  1021.     beq do_loop
  1022.     bra one_shot_note    
  1023.  
  1024.  
  1025. do_loop:    move.w d1,dmacon   
  1026.         bra send_env
  1027.  
  1028. do_rest:
  1029.     move.w (a1)+,2(a0) 
  1030.     subq.w #1,2(a0)  
  1031.     move.l a1,22(a0)  
  1032.     move.l  #rest_env,18(a0)
  1033.  
  1034.         move.w #0,8(a2)
  1035.         bra send_env
  1036.    
  1037. sect4:
  1038.         cmpi.w #0,4(a0)
  1039.         beq noof
  1040.         move.w d5,dmacon   
  1041. noof:     subq.w #1,2(a0)
  1042.         bra check_effects
  1043.    
  1044. sect5:     move.l #jump_table,a3
  1045.         move.l (a3,d0),a4
  1046.         jmp (a4)
  1047.  
  1048. jump_table: 
  1049.     dc.l  in_line_data
  1050.         dc.l  nsound
  1051.         dc.l  patt_end
  1052.         dc.l  get_env
  1053.         dc.l  check_pbend
  1054.         dc.l  do_mod
  1055.         dc.l  bend_off
  1056.         dc.l  mod_off
  1057.         dc.l  do_rest
  1058.         dc.l  end_fx
  1059.         dc.l  end_fx
  1060.     dc.l  s_f_on
  1061.     dc.l  s_f_off
  1062.     dc.l  set_acc
  1063.     dc.l  rept
  1064.  
  1065. in_line_data:
  1066.  
  1067.         nop
  1068.         rts
  1069.  
  1070. rept:
  1071.     move.l (a1),a1
  1072.     bra control_ret
  1073.  
  1074. s_f_on: 
  1075.     bclr #1,filter
  1076.     bra control_ret
  1077. s_f_off:
  1078.     bset #1,filter
  1079.     bra control_ret
  1080.  
  1081. nsound:    move.l (a1)+,a3     
  1082.         cmpi.w #0,(a3)
  1083.         bne one_shot_sound
  1084.         move.w (a3)+,4(a0)    
  1085.         move.l (a3)+,(a2)     
  1086.         move.w (a3),4(a2)    
  1087.         jmp control_ret
  1088.  
  1089. one_shot_sound:
  1090.         move.w (a3)+,4(a0)
  1091.         move.l (a3)+,38(a0)   
  1092.         move.l (a3)+,42(a0)
  1093.         move.l (a3),46(a0)
  1094.         jmp control_ret
  1095.  
  1096. patt_end:
  1097.  
  1098.         move.l 26(a0),a1    
  1099.         cmpi.l #0,(a1)     
  1100.         beq song_control
  1101.         addq.l #4,26(a0)    
  1102.         move.l (a1),a1     
  1103.         jmp control_ret
  1104. get_env: 
  1105.        move.l (a1)+,a4 
  1106.     move.l (a4)+,62(a0)    
  1107.     
  1108.     move.l  a4,34(a0)    
  1109.     
  1110.         bra control_ret
  1111.  
  1112. check_pbend:
  1113.      move.l (a1)+,8(a0)
  1114.         move.l (a1)+,12(a0)
  1115.         bra control_ret
  1116.  
  1117. do_mod:    move.w #1,16(a0)  
  1118.         move.l (a1)+,50(a0)
  1119.         move.l (a1)+,54(a0)
  1120.         move.l (a1)+,58(a0)
  1121.         bra control_ret
  1122.  
  1123. bend_off:   clr.w 8(a0)
  1124.         bra control_ret
  1125.  
  1126. mod_off:    clr.w 16(a0)
  1127.         bra control_ret
  1128.  
  1129.  
  1130. end_fx:    
  1131.     cmpi.w #6,(a0)
  1132.     beq end_fx4p
  1133.     cmpi.w #5,(a0)
  1134.     beq end_fx3p
  1135.     cmpi.w #7,(a0)
  1136.     beq end_fx2p
  1137.  
  1138. end_fx1p:
  1139.         move.w d5,dmacon   
  1140.     move.w  #1,chann1reg+6
  1141.     move.w #0,8(a2)
  1142.     move.l #0,fxc1
  1143.     rts
  1144.  
  1145. end_fx2p:
  1146.     move.w d5,dmacon 
  1147.     move.w  #1,chann2reg+6
  1148.         move.w #0,8(a2) 
  1149.     move.l #0,fxc2
  1150.         rts
  1151.  
  1152.  
  1153. end_fx3p:
  1154.         move.w d5,dmacon   
  1155.     move.w  #1,chann3reg+6
  1156.     move.w #0,8(a2)
  1157.     move.l #0,fxc3
  1158.     rts
  1159.  
  1160. end_fx4p:
  1161.     move.w d5,dmacon 
  1162.     move.w  #1,chann4reg+6
  1163.         move.w #0,8(a2) 
  1164.     move.l #0,fxc4
  1165.         rts
  1166.  
  1167. set_acc: move.w #1,66(a0) 
  1168.     bra control_ret
  1169.  
  1170. song_control:
  1171.         addq.l #4,a1
  1172.         move.l 30(a0),26(a0)
  1173.         move.l 26(a0),a1
  1174.         addq.l #4,26(a0)
  1175.         move.l (a1),a1
  1176.         jmp control_ret
  1177.  
  1178.  
  1179.     ;"""""""""""""""""""""""""""""""""""""""""""""""""
  1180.         ;DATA HERE
  1181. ;------------
  1182.  
  1183.  
  1184.     ;;; DATA
  1185.  
  1186.  
  1187. max_songs    dc.l    12
  1188.  
  1189. song_table:
  1190.  
  1191.  
  1192.         dc.l s1_b,s2_b,s3_b,s4_b    ;beach
  1193.         dc.l s1_d,s2_d,s3_d,s4_d    ;dwarves walk on
  1194.         dc.l s1_g,s2_g,s3_g,s4_g    ;garden music
  1195.         dc.l s1_s,s2_s,s3_s,s4_s    ;snapdragons dance
  1196.         dc.l s1_f,s2_f,s3_f,s4_f    ;chess fanfare at gates
  1197.         dc.l s1_q,s2_q,s3_q,s4_q    ;chess queens tune
  1198.         dc.l s1_w,s2_w,s3_w,s4_w    ;bookworm tune
  1199.         dc.l s1_n,s2_n,s3_n,s4_n    ;nightingale
  1200.         dc.l s1_fl,s2_fl,s3_fl,s4_fl    ;alexanders flute
  1201.         dc.l s1_dr,s2_dr,s3_dr,s4_dr    ;dragged to sea..drown tune
  1202.         dc.l s1_sn,s2_sn,s3_sn,s4_sn    ;snap dragons snapping
  1203.  
  1204.  
  1205. ;************************************************************
  1206. gvars:
  1207. ch1vars     
  1208.     dc.w 0     
  1209.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1210. pattr1: dc.l 0    
  1211. songr1: dc.l 0    
  1212. wsong1: dc.l 0   
  1213.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1214.  
  1215. ch2vars     
  1216.     dc.w 0     
  1217.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1218. pattr2: dc.l 0    
  1219. songr2: dc.l 0    
  1220. wsong2: dc.l 0    
  1221.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1222.  
  1223. ch3vars 
  1224.     dc.w 0     
  1225.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1226. pattr3: dc.l 0    
  1227. songr3: dc.l 0    
  1228. wsong3: dc.l 0    
  1229.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1230.  
  1231. ch4vars 
  1232.     dc.w 0     
  1233.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1234. pattr4: dc.l 0    
  1235. songr4: dc.l 0    
  1236. wsong4: dc.l 0    
  1237.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1238.  
  1239.  
  1240. ch1fxvars 
  1241.     dc.w 0     
  1242. fxintc1:
  1243.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1244. currfx1:
  1245.     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    
  1246.  
  1247. ch2fxvars 
  1248.     dc.w 0     
  1249. fxintc2:
  1250.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1251. currfx2:
  1252.     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    
  1253.  
  1254.  
  1255. ch3fxvars
  1256.     dc.w 0     
  1257. fxintc3:
  1258.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1259. currfx3:
  1260.     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    
  1261.  
  1262. ch4fxvars 
  1263.     dc.w 0     
  1264. fxintc4:
  1265.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1266. currfx4:
  1267.     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    
  1268. ;************************************************************
  1269.  
  1270. dummy_reg dc.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1271.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1272.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1273.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1274. ;************************************************************
  1275.  
  1276. ;       THESE ARE THE FX PATTERNS................
  1277.  
  1278. ; The interrupt counter in these patterns is dependent on the
  1279. ; playback speed.The figure is calculated as follows
  1280. ; (length/playback speed) *50
  1281. ; the figure then needs rounding up to give a clear finish
  1282. ; if you have the count longer than needed it will cut
  1283. ; out the music on the relevent channel for longer than
  1284. ; neccessary and make it sound jerky
  1285. ; The fx table is below the patterns
  1286.  
  1287.  
  1288. ;fight:
  1289.       ;dc.w new_env
  1290.       ;dc.l fight_env
  1291.       ;dc.w new_snd
  1292.       ;dc.l fightp
  1293.     ;dc.w r8,8        ;r8=8000 playback speed/8=int counter
  1294.       ;dc.w end_fxp
  1295.  
  1296. ;fight_env:            dc.w 0,64,64,64,255
  1297.  
  1298. ;*************************
  1299. sined:
  1300. sine_datad:
  1301.              dc.w 127,80,50,25,0,-25,-50,-100,-127
  1302.              dc.w -127,-100,-50,-35,0,35,50,80,127
  1303.              dc.w 127,80,50,25,0,-25,-50,-100,-127
  1304.              dc.w -127,-100,-50,-35,0,35,50,80,127
  1305.  
  1306.  
  1307.  
  1308. fxp:
  1309.  
  1310. danger:
  1311.       dc.w new_env
  1312.       dc.l danger_env
  1313.       dc.w new_snd
  1314.       dc.l sinep
  1315. danger_loop:
  1316.     dc.w r16,4,r16,4,r16,4,r16,4
  1317.     dc.w repeat
  1318.     dc.l danger_loop
  1319.       dc.w end_fxp
  1320.  
  1321. danger_env:            dc.w 0,35,28,25,20,15,10,0,255
  1322.  
  1323. score1
  1324.       dc.w new_env
  1325.       dc.l score_env1
  1326.       dc.w new_snd
  1327.       dc.l sinep
  1328.     dc.w modon,1,1,2,2,1,1
  1329.     dc.w 130,50
  1330.       dc.w end_fxp
  1331.  
  1332.  
  1333. score2
  1334.       dc.w new_env
  1335.       dc.l score_envs
  1336.       dc.w new_snd
  1337.       dc.l sinep
  1338.     dc.w modon,1,1,1,1,1,1
  1339.     dc.w    a03,5,a02,5
  1340.       dc.w new_env
  1341.       dc.l score_env2
  1342.     dc.w e03,50
  1343.       dc.w end_fxp
  1344.  
  1345. score3
  1346.       dc.w new_env
  1347.       dc.l score_envs
  1348.       dc.w new_snd
  1349.       dc.l sinep
  1350.     dc.w modon,1,1,1,1,1,1
  1351.     dc.w    a03,4,a02,4
  1352.     dc.w    a03,4,a02,4
  1353.       dc.w new_env
  1354.       dc.l score_env2
  1355.     dc.w e03,50
  1356.       dc.w end_fxp
  1357.  
  1358. score4
  1359.       dc.w new_env
  1360.       dc.l score_envs
  1361.       dc.w new_snd
  1362.       dc.l sinep
  1363.     dc.w modon,1,1,1,1,1,1
  1364.     dc.w    c03,4,d03,4
  1365.     dc.w    e03,4,f03,4
  1366.     dc.w    g03,4
  1367.       dc.w new_env
  1368.       dc.l score_env2
  1369.     dc.w a03,50
  1370.       dc.w end_fxp
  1371.  
  1372. score5
  1373.       dc.w new_env
  1374.       dc.l score_envs
  1375.       dc.w new_snd
  1376.       dc.l sinep
  1377.     ;dc.w pbend,up,20,a03,1
  1378.     dc.w    a03,4,g03,4,a03,4,g03,4
  1379.     dc.w    a03,4,g03,4,a03,4,g03,4
  1380.     dc.w    a03,4,g03,4,a03,4,g03,4
  1381.       dc.w new_env
  1382.       dc.l score_env2
  1383.     dc.w    a03,50
  1384.       dc.w end_fxp
  1385.  
  1386.  
  1387. magic_map:
  1388.       dc.w new_env
  1389.       dc.l score_env1
  1390.       dc.w new_snd
  1391.       dc.l aguitp
  1392.     dc.w c02,4,d02,4,e02,4,f02,4,g02,4,a02,4,b02,4,c03,4
  1393.     dc.w d03,4,e03,4,f03,4,g03,4,a03,10
  1394.       dc.w end_fxp
  1395.  
  1396.  
  1397. clunk1
  1398.       dc.w new_env
  1399.       dc.l clunk_env
  1400.       dc.w new_snd
  1401.       dc.l snarep
  1402.     dc.w pbend,down,20,50000,1
  1403.     dc.w    r2,14
  1404.     dc.w    pboff
  1405.       dc.w end_fxp
  1406.  
  1407. clunk2
  1408.       dc.w new_env
  1409.       dc.l clunk_env
  1410.       dc.w new_snd
  1411.       dc.l snarep
  1412.     dc.w pbend,down,2,50000,1
  1413.     dc.w    r1,14
  1414.     dc.w    pboff
  1415.       dc.w end_fxp
  1416.  
  1417.  
  1418. score_envs:    dc.w 55,50,45,40,35,30,25,20,15,10,0,255
  1419.  
  1420. score_env:
  1421.         dc.w    64,64,63,62,60,61,60,59,58,57,56,55
  1422. clunk_env:
  1423. score_env1    dc.w    54,53,52,51,50,49,48,47,46,45,44
  1424. score_env2        dc.w     43,42,41,40,39,38,37,36,35,34,33,32,31,30
  1425.         dc.w    29,28,27,26,25,24,23,22,21,20,19,18,17,16
  1426.         dc.w    15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,255
  1427.  
  1428. sinep:
  1429.         dc.w 1  
  1430.              dc.l sined
  1431.              dc.w 16/2 
  1432.              dc.l sined
  1433.              dc.w 16/2
  1434.  
  1435.  
  1436.  
  1437.  
  1438. ;*************************
  1439.  
  1440.  
  1441. fxjump_table:  
  1442.     dc.l clunk1
  1443.     dc.l clunk2
  1444.     dc.l score1
  1445.     dc.l score2
  1446.     dc.l score3
  1447.     dc.l score4
  1448.     dc.l score5
  1449.     dc.l magic_map
  1450.     dc.l danger            ;fx number 1
  1451.  
  1452.  
  1453. max_fx    dc.l    10    ;number + 1 for test routines only
  1454. ;______________________________________________________________________
  1455.  
  1456.  
  1457. sstart: dc.l 0,end_song
  1458.  
  1459. pstart: dc.w end_patt
  1460.  
  1461.  
  1462. ;----------------------------------
  1463.  
  1464. ;;;;;;;;;;;;;;;;;;;;;   Music Data ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  1465.  
  1466. cr  set   24
  1467. q set  cr/2
  1468. sq set q/2
  1469. dsq set sq/4
  1470.  
  1471. tq1 set      7
  1472. tq2 set   6
  1473. tsq1 set  3
  1474. tsq2 set 4
  1475.  
  1476. ssilence:
  1477.     dc.l    pr
  1478.       dc.l     0,end_song
  1479.  
  1480.  
  1481. ;************************************************
  1482.  
  1483. songs:
  1484. ;--------
  1485.  
  1486. s1_n:
  1487.  
  1488.     dc.l    click_snd
  1489.     dc.l    ng_click
  1490.  
  1491.       dc.l     0,end_song
  1492. s2_n:
  1493.  
  1494.     dc.l    flute_sndq
  1495.     dc.l    ntune
  1496.  
  1497.         DC.L    0,end_song
  1498.  
  1499. s3_n:
  1500.  
  1501.     dc.l    pr
  1502.  
  1503.     dc.l     0,end_song
  1504.  
  1505. s4_n:
  1506.  
  1507.     dc.l    pr
  1508.  
  1509.     dc.l     0,end_song
  1510.  
  1511.  
  1512. ng_click:
  1513.     dc.w    4000,2,2000,2,rest,8,4000,1,2000,1,4000,1
  1514.     dc.w    4000,1,2000,1,4000,1,rest,6
  1515.     dc.w    end_patt
  1516.  
  1517. ntune:
  1518.     dc.    rest,cr
  1519.     dc.w    a03,cr,g03,cr*3,d03,cr,e03,cr*4,rest,cr*3
  1520.     dc.w    a03,cr,g03,cr*3,e03,cr,d03,cr,g03,cr,e03,cr*4
  1521.     dc.w    end_patt
  1522.  
  1523.  
  1524.  
  1525. ;        flute
  1526.  
  1527. s1_fl:
  1528.  
  1529.  
  1530.     dc.l    flute_snd
  1531.     dc.l    flute_tune
  1532.     dc.l    pri
  1533.  
  1534.       dc.l     0,end_song
  1535. s2_fl:
  1536.  
  1537.     dc.l    pr
  1538.         DC.L    0,end_song
  1539.  
  1540.  
  1541. s3_fl:
  1542.  
  1543.     dc.l    pr
  1544.         DC.L    0,end_song
  1545.  
  1546.  
  1547. s4_fl:
  1548.     dc.l    pr
  1549.     dc.l     0,end_song
  1550.  
  1551.  
  1552. flute_tune:
  1553.     dc.w modon,1,1,3,3,6,6
  1554.     dc.w    g03,cr+sq,gb03,5,g03,5,gb03,cr
  1555.     dc.w    eb03,cr,b02,cr,c03,cr,b02,5,c03,5,b02,cr*3
  1556.     dc.w end_patt
  1557.  
  1558.  
  1559. clickp
  1560.         dc.w 1  
  1561.              dc.l driver
  1562.              dc.w 16/2 
  1563.              dc.l driver
  1564.              dc.w 16/2
  1565.  
  1566. click_env:
  1567.         dc.w    15,10,5,4,3,2,2,1,0,255
  1568.  
  1569. click_snd
  1570.     dc.w    new_env
  1571.     dc.l    click_env
  1572.     dc.w    new_snd
  1573.     dc.l    clickp
  1574.     dc.w     end_patt
  1575.  
  1576.  
  1577.  
  1578. ;---------
  1579. s1_g:
  1580.  
  1581.     dc.l    aguitar_snd
  1582.     dc.l    gardenv1
  1583.  
  1584.  
  1585.       dc.l     0,end_song
  1586. s2_g:
  1587.  
  1588.     dc.l    aguitar_snd
  1589.     dc.l    gardenv2
  1590.         DC.L    0,end_song
  1591.  
  1592.  
  1593. s3_g:
  1594.  
  1595.     dc.l    aguitar_snd
  1596.     dc.l    gardenv3
  1597.  
  1598.     dc.l     0,end_song
  1599.  
  1600.  
  1601. s4_g:
  1602.     dc.l    flute_sndq
  1603.     dc.l    gardenv1x
  1604.     dc.l     0,end_song
  1605.  
  1606.  
  1607.  
  1608. patterns:
  1609.  
  1610. pr:
  1611.     dc.w rest,cr*4
  1612.     dc.w end_patt
  1613. ;-------------------
  1614.  
  1615.  
  1616. gardenv1:
  1617.     dc.w modon,1,1,2,2,6,6
  1618.     dc.w    rest,cr*2
  1619.     dc.w a02,$0048,a02,$0048,a02,$0048,a02,$0048,ab02,$0018
  1620.     dc.w a02,$0018,g02,$0018,f02,$0048,ab02,$0048,ab02,$0018
  1621.     dc.w f02,$0030,ab02,$0018,a02,$0018,g02,$0018,f02,$0048
  1622.     dc.w g02,$0048,g02,$0018,f02,$0150,a02,$0048,a02,$0048
  1623.     dc.w a02,$0048,a02,$0048,ab02,$0018,a02,$0018,g02,$0018
  1624.     dc.w f02,$0048,ab02,$0048,ab02,$0018,f02,$0030,ab02,$0018
  1625.     dc.w a02,$0018,g02,$0018,f02,$0048,g02,$0048,g02,$0018
  1626.     dc.w f02,$0168,a02,$0090,a02,$0090,a02,$0090,a02,$0090
  1627.     dc.w a02,$0090,a02,$0090,a02,$0048,a02,cr*6
  1628.     dc.w end_patt
  1629.  
  1630. gardenv1x:
  1631.     dc.w modon,1,1,2,2,6,6
  1632.     dc.w    rest,cr*2
  1633.  
  1634.     dc.w a03,$0048,a03,$0048,a03,$0048,a03,$0048,ab03,$0018
  1635.     dc.w a03,$0018,g03,$0018,f03,$0048,ab03,$0048,ab03,$0018
  1636.     dc.w f03,$0030,ab03,$0018,a03,$0018,g03,$0018,f03,$0048
  1637.     dc.w g03,$0048,g03,$0018,f03,$0150,a03,$0048,a03,$0048
  1638.     dc.w a03,$0048,a03,$0048,ab03,$0018,a03,$0018,g03,$0018
  1639.     dc.w f03,$0048,ab03,$0048,ab03,$0018,f03,$0030,ab03,$0018
  1640.     dc.w a03,$0018,g03,$0018,f03,$0048,g03,$0048,g03,$0018
  1641.     dc.w f03,$0168,a03,$0090,a03,$0090,a03,$0090,a03,$0090
  1642.     dc.w a03,$0090,a03,$0090,a03,$0048,a03,cr*6
  1643.     dc.w end_patt
  1644.  
  1645.  
  1646.  
  1647. gardenv2:
  1648.     dc.w modon,1,1,4,4,6,6
  1649.  
  1650.     dc.w e02,$0048,e02,$0048,eb02,$0048,eb02,$0048,e02,$0048
  1651.     dc.w e02,$0048,e02,$0048,e02,$00d8,e02,$0048,e02,$0060
  1652.     dc.w e02,$0018,d02,$0048,d02,$0018,e02,$0090,e02,$0048
  1653.     dc.w e02,$0048,eb02,$0048,eb02,$0048,e02,$0048,e02,$0048
  1654.     dc.w e02,$0048,e02,$00d8,e02,$0048,e02,$0060,e02,$0018
  1655.     dc.w d02,$0018,c02,$0030,b01,$0018,c02,$0090,e02,$0090
  1656.     dc.w eb02,$0090,d02,$0090,c02,$0090,e02,$0090,eb02,$0090
  1657.     dc.w d02,$0090,c02,cr*6
  1658.     dc.w end_patt
  1659.  
  1660.  
  1661.  
  1662.  
  1663. gardenv3:
  1664.     dc.w modon,1,1,4,4,6,6
  1665.     dc.w c02,$0048,c02,$0048,b01,$0048,b01,$0048
  1666.     dc.w c02,$0048,c02,$0048,b01,$0048,b01,$0048,c02,$0048
  1667.     dc.w c02,$0048,c02,$0048,c02,$0048,c02,$0048,c02,$0048
  1668.     dc.w b01,$0090,c02,$0048,c02,$0048,b01,$0048,b01,$0048
  1669.     dc.w c02,$0048,c02,$0048,b01,$0048,b01,$0048,c02,$0048
  1670.     dc.w c02,$0048,c02,$0048,c02,$0048,c02,$0048,c02,$0030
  1671.     dc.w b01,$0018,c02,$0090,c02,$0090,b01,$0090,bb01,$0090
  1672.     dc.w a01,$0090,c02,$0090,b01,$0090,bb01,$0090,a01,cr*6
  1673.     
  1674.     dc.w end_patt
  1675.  
  1676.  
  1677. ;--------------------
  1678.  
  1679. cr  set   40
  1680. q set  cr/2
  1681. sq set q/2
  1682. dsq set sq/4
  1683.  
  1684. tq1 set      7
  1685. tq2 set   6
  1686. tsq1 set  3
  1687. tsq2 set 4
  1688.  
  1689.  
  1690.  
  1691.             ;bookworm tune
  1692.  
  1693. s1_w:
  1694.  
  1695.     dc.l    bassoon_snd_short
  1696.     dc.l    wbassoon
  1697.       dc.l     0,end_song
  1698.  
  1699. s2_w:
  1700.     dc.l    pizzo_snd
  1701.     dc.l    wbass
  1702.       dc.l     0,end_song
  1703.  
  1704.  
  1705. s3_w:
  1706.  
  1707.     dc.l    pizzo_snd
  1708.     dc.l    wpizzo
  1709.       dc.l     0,end_song
  1710.  
  1711.  
  1712. s4_w:
  1713.     dc.l    flute_snd
  1714.     dc.l    wflute
  1715.       dc.l     0,end_song
  1716.  
  1717. ;-----------------
  1718.  
  1719. wbassoon:
  1720.     dc.w modon,1,1,2,2,6,6
  1721.     dc.w c01,$000a,d01,$0005,e01,$0005,f01,$0014
  1722.     dc.w c02,$0014,eb01,$0014,c02,$0014,db01,$0014,c02,$000a
  1723.     dc.w c01,$0014,c01,$000a,d01,$000a,e01,$000a,f01,$0014
  1724.     dc.w c02,$0014,eb01,$0014,c02,$0014,db01,$0014,c02,$000a
  1725.     dc.w c01,$0014,c01,$000a,d01,$000a,e01,$000a,f01,$0014
  1726.  
  1727.     dc.w f02,$000a,e02,$000a,f02,$0014,c02,$0014
  1728.  
  1729.     dc.w    new_snd
  1730.     dc.l    bassoonp
  1731.     dc.w db02,$001e
  1732.     dc.w    new_snd
  1733.     dc.l    bassoonsp
  1734.  
  1735.  
  1736.     dc.w eb02,$0005,db02,$0005,c02,$000a,bb01,$000a,ab01,$000a
  1737.     dc.w g01,$000a,ab01,$000a,c02,$000a,g01,$000a,c02,$000a
  1738.     dc.w f01,$000a,c02,$000a,e01,$000a,f01,$000a,g01,$000a
  1739.     dc.w f01,$000a,e01,$000a,db01,$000a,c01,$0014,c02,$0014
  1740.     dc.w f01,$0014,f02,$000a,e02,$000a,f02,$0014,c02,$0014
  1741.  
  1742.     dc.w    new_snd
  1743.     dc.l    bassoonp
  1744.     dc.w db02,$001e
  1745.     dc.w    new_snd
  1746.     dc.l    bassoonsp
  1747.  
  1748.     dc.w eb02,$0005,db02,$0005,c02,$000a,bb01,$000a
  1749.  
  1750.     dc.w ab01,$000a,g01,$000a,ab01,$000a,c02,$000a,g01,$000a
  1751.     dc.w c02,$000a,f01,$0014,e01,$0014,f01,$0050,f01,$0014
  1752.     dc.w f02,$000a,e02,$000a,f02,$0014,c02,$0014
  1753.     dc.w    new_snd
  1754.     dc.l    bassoonp
  1755.     dc.w db02,$001e
  1756.     dc.w    new_snd
  1757.     dc.l    bassoonsp
  1758.  
  1759.     dc.w eb02,$0005,db02,$0005,c02,$000a,bb01,$000a,ab01,$000a
  1760.     dc.w g01,$000a,ab01,$000a,c02,$000a,g01,$000a,c02,$000a
  1761.     dc.w f01,$000a,c02,$000a,e01,$000a,f01,$000a,g01,$000a
  1762.     dc.w f01,$000a,e01,$000a,db01,$000a,c01,$0014,c02,$0014
  1763.     dc.w f01,$0014,f02,$000a,e02,$000a,f02,$0014,c02,$0014
  1764.     dc.w    new_snd
  1765.     dc.l    bassoonp
  1766.  
  1767.     dc.w db02,$001e
  1768.     dc.w    new_snd
  1769.     dc.l    bassoonp
  1770.  
  1771.     dc.w eb02,$0005,db02,$0005,c02,$000a,bb01,$000a
  1772.     dc.w ab01,$000a,g01,$000a,ab01,$000a,c02,$000a,g01,$000a
  1773.     dc.w c02,$000a,f01,$0014,e01,$0014,f01,$0032,f01,$000a
  1774.     dc.w g01,$000a,a01,$000a,bb01,$0014,f02,$0014,ab01,$0014
  1775.     dc.w f02,$0014,gb01,$0014,f02,$000a,f01,$0014,f01,$000a
  1776.     dc.w g01,$000a,a01,$000a,bb01,$0014,f02,$0014,ab01,$0014
  1777.     dc.w f02,$0014,gb01,$0014,f02,$000a,f01,$0014,f01,$000a
  1778.     dc.w g01,$000a,a01,$000a,bb01,$0014,bb02,$000a,a02,$000a
  1779.     dc.w bb02,$0014,f02,$0014,gb02,$001e,ab02,$0005,gb02,$0005
  1780.     dc.w f02,$000a,eb02,$000a,db02,$000a,c02,$000a,db02,$000a
  1781.     dc.w f02,$000a,c02,$000a,f02,$000a,bb01,$000a,f02,$000a
  1782.     dc.w a01,$000a,bb01,$000a,c02,$000a,bb01,$000a,a01,$000a
  1783.     dc.w gb01,$000a,f01,$0014,f02,$0014,bb01,$0014,bb02,$000a
  1784.     dc.w a02,$000a,bb02,$0014,f02,$0014,gb02,$001e,ab02,$0005
  1785.     dc.w gb02,$0005,f02,$000a,eb02,$000a,db02,$000a,c02,$000a
  1786.     dc.w db02,$000a,f02,$000a,c02,$000a,f02,$000a,bb01,$0014
  1787.     dc.w a01,$0014,bb01,$00a0,f01,$0014,gb01,$0014,f01,$000a
  1788.     dc.w eb01,$000a,db01,$000a,c01,$000a,bb01,$0014,bb02,$000a
  1789.     dc.w a02,$000a,bb02,$0014,f02,$0014,gb02,$001e,ab02,$0005
  1790.     dc.w gb02,$0005,f02,$000a,eb02,$000a,db02,$000a,c02,$000a
  1791.     dc.w db02,$000a,f02,$000a,c02,$000a,f02,$000a,bb01,$000a
  1792.     dc.w f02,$000a,a01,$000a,bb01,$000a,c02,$000a,bb01,$000a
  1793.     dc.w a01,$000a,gb01,$000a,f01,$0014,f02,$0014,bb01,$0014
  1794.     dc.w bb02,$000a,a02,$000a,bb02,$0014,f02,$0014,gb02,$001e
  1795.     dc.w ab02,$0005,gb02,$0005,f02,$000a,eb02,$000a,db02,$000a
  1796.     dc.w c02,$000a,db02,$000a,f02,$000a,c02,$000a,f02,$000a
  1797.     dc.w bb01,$0014,a01,$0014,bb01,cr
  1798.     dc.w end_patt
  1799.  
  1800.  
  1801. wbass
  1802.     dc.w rest,cr*8-sq,c02,$000a,d02,$000a,e02,$000a,f02,$0028
  1803.     dc.w eb02,$0028,db02,$001e,c02,$0014,c02,$000a,d02,$000a
  1804.     dc.w e02,$000a,f02,$0028,c02,$0028,db02,$001e,c02,$0014
  1805.     dc.w c02,$000a,d02,$000a,e02,$000a,f02,$0028,eb02,$0028
  1806.     dc.w db02,$001e,c02,$0014,c02,$000a,d02,$000a,e02,$000a
  1807.     dc.w f02,$0028,c02,$0028,f02,$0050,f02,$0028,eb02,$0028
  1808.     dc.w db02,$001e,c02,$0014,c02,$000a,d02,$000a,e02,$000a
  1809.     dc.w f02,$0028,c02,$0028,db02,$001e,c02,$0014,c02,$000a
  1810.     dc.w d02,$000a,e02,$000a,f02,$0028,eb02,$0028,db02,$001e
  1811.     dc.w c02,$0014,c02,$000a,d02,$000a,e02,$000a,f02,$0028
  1812.     dc.w c02,$0028,f02,$0032,f01,$000a,g01,$000a,a01,$000a
  1813.     dc.w bb01,$0014,f02,$0014,ab01,$0014,f02,$0014,gb01,$0014
  1814.     dc.w f02,$000a,f01,$0014,f01,$000a,g01,$000a,a01,$000a
  1815.     dc.w bb01,$0014,f02,$0014,ab01,$0014,f02,$0014,gb01,$0014
  1816.     dc.w f02,$000a,f01,$0014,f01,$000a,g01,$000a,a01,$000a
  1817.     dc.w bb01,$0028,ab01,$0028,gb01,$001e,f01,$0014,f01,$000a
  1818.     dc.w g01,$000a,a01,$000a,bb01,$0028,f01,$0028,gb01,$001e
  1819.     dc.w f01,$0014,f01,$000a,g01,$000a,a01,$000a,bb01,$0028
  1820.     dc.w ab01,$0028,gb01,$001e,f01,$0014,f01,$000a,g01,$000a
  1821.     dc.w a01,$000a,bb01,$0028,f01,$0028,bb01,$0050,f02,$0028
  1822.     dc.w eb02,$0028,f02,$0014,gb02,$0014,f02,$000a,eb02,$000a
  1823.     dc.w db02,$000a,c02,$000a,bb01,$0028,ab01,$0028,gb01,$001e
  1824.     dc.w f01,$0014,f01,$000a,g01,$000a,a01,$000a,bb01,$0028
  1825.     dc.w f01,$0028,gb01,$001e,f01,$0014,f01,$000a,g01,$000a
  1826.     dc.w a01,$000a,bb01,$0028,ab01,$0028,gb01,$001e,f01,$0014
  1827.     dc.w f01,$000a,g01,$000a,a01,$000a,bb01,$0028,f01,$0028
  1828.     dc.w bb01,cr
  1829.     dc.w end_patt
  1830.  
  1831.  
  1832.  
  1833. wpizzo:
  1834.     dc.w rest,cr*24+q,f03,$0014,ab03,$0014,eb03,$0014,ab03,$0014
  1835.     dc.w db03,$0014,ab03,$000a,c03,$0014,c03,$000a,g03,$0014
  1836.     dc.w f02,$0014,f03,$0014,c03,$0014,g03,$0014,db03,$0014
  1837.     dc.w f03,$0014,g03,$0014,c03,$0014,f03,$0014,ab03,$0014
  1838.     dc.w eb03,$0014,ab03,$0014,db03,$0014,ab03,$000a,c03,$0014
  1839.     dc.w c03,$000a,g03,$0014,f02,$0014,f03,$0014,c03,$0014
  1840.     dc.w e03,$0014,f03,$0190,bb02,$0014,db03,$0014,ab02,$0014
  1841.     dc.w db03,$0014,gb02,$0014,db03,$000a,f02,$0014,f02,$000a
  1842.     dc.w c03,$0014,bb01,$0014,bb02,$0014,f02,$0014,c03,$0014
  1843.     dc.w gb02,$0014,bb02,$0014,c03,$0014,f02,$0014,bb02,$0014
  1844.     dc.w db03,$0014,ab02,$0014,db03,$0014,gb02,$0014,db03,$000a
  1845.     dc.w f02,$0014,f02,$000a,c03,$0014,bb01,$0014,bb02,$0014
  1846.     dc.w f02,$0014,a02,$0014,bb02,$00f0,bb02,$0014,db03,$0014
  1847.     dc.w ab02,$0014,db03,$0014,gb02,$0014,db03,$000a,f02,$0014
  1848.     dc.w f02,$000a,c03,$0014,bb01,$0014,bb02,$0014,f02,$0014
  1849.     dc.w c03,$0014,gb02,$0014,bb02,$0014,c03,$0014,f02,$0014
  1850.     dc.w bb02,$0014,db03,$0014,ab02,$0014,db03,$0014,gb02,$0014
  1851.     dc.w db03,$000a,f02,$0014,f02,$000a,c03,$0014,bb01,$0014
  1852.     dc.w bb02,$0014,f02,$0014,a02,$0014,bb02,cr
  1853.     dc.w end_patt
  1854.  
  1855.  
  1856.  
  1857. wflute:
  1858.     dc.w modon,1,1,3,3,6,6
  1859.     dc.w rest,cr*23+q
  1860.     ;dc.w e02,$0005,eb02,$0005,e02,$0005,eb02,$0005
  1861.     ;dc.w e02,4,rest,$03d0
  1862.  
  1863.     dc.w e03,5,eb03,5
  1864.     dc.w e03,5,eb03,5
  1865.     dc.w e03,5
  1866.  
  1867.     dc.w rest,$03d0+4-5
  1868.  
  1869.  
  1870.     dc.w f02,$0014,bb02,$0014,db03,$0014,f03,$0014
  1871.     dc.w e03,$0023,eb03,$0005,f03,$0028,f03,$0014,bb02,$0014
  1872.     dc.w a03,$0014,gb03,$0014,e03,$0005,f03,$0005,e03,$0005
  1873.     dc.w f03,$0005,e03,$0005,f03,$0005,eb03,$0005,e03,$0005
  1874.     dc.w f03,$0028,f02,$0014,bb02,$0014,db03,$0014,f03,$0014
  1875.     dc.w e03,$0023,eb03,$0005,f03,$0028,f03,$0014,eb03,$0014
  1876.     dc.w db03,$0014,c03,$0014,bb02,$0014
  1877.     
  1878.     dc.w e03,5
  1879.     dc.w f02,5,e02,5
  1880.     dc.w f02,5,e02,5,rest,cr*5-5
  1881.  
  1882.     dc.w f02,$0014
  1883.     dc.w bb02,$0014,db03,$0014,f03,$0014,e03,$0023,e03,$0005
  1884.     dc.w f03,$0028,f03,$0014,bb02,$0014,a03,$0014,gb03,$0014
  1885.     dc.w e03,$0005,f03,$0005,f03,$0005,e03,$0005,e03,$0005
  1886.     dc.w f03,$0005,eb03,$0005,e03,$0005,f03,$0028,f02,$0014
  1887.     dc.w bb02,$0014,db03,$0014,f03,$0014,e03,$0023,e03,$0005
  1888.     dc.w f03,$0028,f03,$0014,eb03,$0014,db03,$0014,c03,$0014
  1889.  
  1890.     dc.w pbend,down,5,bb01,8
  1891.  
  1892.     dc.w bb02,cr
  1893.     dc.w pboff
  1894.     dc.w end_patt
  1895. ;-------------------
  1896.  
  1897. cr  set   24
  1898. q set  cr/2
  1899. sq set q/2
  1900. dsq set sq/4
  1901.  
  1902. tq1 set      7
  1903. tq2 set   6
  1904. tsq1 set  3
  1905. tsq2 set 4
  1906.  
  1907.             ;snapdragons dance
  1908.  
  1909. s1_s:
  1910.  
  1911.     dc.l    flute_snd
  1912.     dc.l    sd1
  1913.       dc.l     0,end_song
  1914.  
  1915. s2_s:
  1916.     dc.l    snare_snd
  1917.     dc.l    sbeat
  1918.       dc.l     0,end_song
  1919.  
  1920.  
  1921. s3_s:
  1922.  
  1923.     dc.l    pizzo_snd
  1924.     dc.l    sbass
  1925.       dc.l     0,end_song
  1926.  
  1927.  
  1928. s4_s:
  1929.     dc.l    aguitar_sndq
  1930.     dc.l    sguit
  1931.       dc.l     0,end_song
  1932.  
  1933.  
  1934. sd1    
  1935.     dc.w modon,1,1,4,4,6,6
  1936.     dc.w    rest,cr,a03,cr,g03,cr+q,f03,q,e03,cr*4
  1937.     dc.w    rest,cr,a03,cr,g03,cr+q,f03,q,e03,cr*4
  1938.     dc.w    rest,cr,b02,q,c03,q,d03,q,c03,q,b02,q
  1939.     dc.w    c03,q,d03,cr*2-q,e03,sq,d03,sq,c03,cr*2
  1940.     dc.w    rest,cr,c03,cr,b02,cr*2-q,b02,q,a02,cr*4
  1941.     dc.w    end_patt
  1942. sbass
  1943.     dc.w    a02,cr
  1944.     dc.w    rest,cr*3
  1945.     dc.w    a02,cr*2-q,a02,q,g02,cr,g02,cr
  1946.     dc.w    a02,cr*2-q,a02,q,g02,cr,g02,cr
  1947.     dc.w    a02,cr*2-q,a02,q,g02,cr,g02,cr
  1948.     dc.w    a02,cr*2-q,a02,q,g02,cr,g02,cr
  1949.     dc.w    d02,cr*2-q,d02,q,a01,cr,a01,cr
  1950.     dc.w    d02,cr*2-q,d02,q,a01,cr,a01,cr
  1951.     dc.w    a02,cr*2-q,a02,q,g02,cr,g02,cr
  1952.     dc.w    end_patt
  1953.  
  1954. sguit
  1955.     dc.w modon,1,1,2,2,4,4
  1956.     dc.w    a02,cr
  1957.     dc.w    rest,cr*3
  1958.     dc.w    a02,q,c03,sq,e03,sq,c03,cr
  1959.     dc.w    g02,q,b02,sq,d03,sq,b02,cr
  1960.  
  1961.     dc.w    a02,q,c03,sq,e03,sq,c03,cr
  1962.     dc.w    g02,q,b02,sq,d03,sq,b02,cr
  1963.  
  1964.     dc.w    a02,q,c03,sq,e03,sq,c03,cr
  1965.     dc.w    g02,q,b02,sq,d03,sq,b02,cr
  1966.  
  1967.     dc.w    a02,q,c03,sq,e03,sq,c03,cr
  1968.     dc.w    g02,q,b02,sq,d03,sq,b02,cr
  1969.  
  1970.     dc.w    d02,q,f02,q,a02,q,f02,q
  1971.     dc.w    d02,q,f02,q,a02,q,f02,q
  1972.  
  1973.     dc.w    d02,q,f02,q,a02,q,f02,q
  1974.     dc.w    d02,q,f02,q,a02,q,f02,q
  1975.  
  1976.     dc.w    a02,q,c03,q,e03,q,c03,q
  1977.     dc.w    g02,q,b02,q,d03,q,b02,q
  1978.     dc.w    end_patt
  1979.  
  1980. sbeat    
  1981.     dc.w    130,q,138,3,136,3,134,3,132,3,130,q,130,q
  1982.     dc.w    rest,q,130,q,130,q,130,q
  1983.     dc.w    end_patt
  1984. ;-------------
  1985. cr  set   16
  1986. q set  cr/2
  1987. sq set q/2
  1988. dsq set sq/4
  1989.  
  1990. tq1 set      7
  1991. tq2 set   6
  1992. tsq1 set  3
  1993. tsq2 set 4
  1994.  
  1995.             ;snapdragons dance
  1996.  
  1997. s1_sn:
  1998.  
  1999.     dc.l    snare_snd
  2000.     dc.l    snap1
  2001.     dc.l    pri
  2002.       dc.l     0,end_song
  2003.  
  2004. s2_sn:
  2005.     dc.l    snare_snd
  2006.     dc.l    snap2
  2007.     dc.l    pri
  2008.       dc.l     0,end_song
  2009.  
  2010.  
  2011. s3_sn:
  2012.  
  2013.     dc.l    snare_snd
  2014.     dc.l    snap3
  2015.     dc.l    pri
  2016.       dc.l     0,end_song
  2017.  
  2018.  
  2019. s4_sn:
  2020.     dc.l    snare_snd
  2021.     dc.l    snap4
  2022.     dc.l    pri
  2023.       dc.l     0,end_song
  2024.  
  2025. snap1    
  2026.     dc.w    130,12,138,3,136,8,134,5,132,3,130,9,130,7
  2027.     dc.w    130,12,138,3,136,8,134,5,132,3,130,9,130,7
  2028.     dc.w    end_patt
  2029.  
  2030. snap2    
  2031.     dc.w    130,10,138,13,136,8,134,5,132,3,130,9,130,3
  2032.     dc.w    130,10,138,13,136,8,134,5,132,3,130,9,130,3
  2033.     dc.w    end_patt
  2034.  
  2035. snap3    
  2036.     dc.w    130,2,138,4,136,3,134,12,132,5,130,9,130,2
  2037.     dc.w    130,2,138,4,136,3,134,12,132,5,130,9,130,5
  2038.     dc.w    end_patt
  2039.  
  2040. snap4    
  2041.     dc.w    130,12,138,3,136,3,134,12,132,5,130,9,130,7
  2042.     dc.w    130,12,138,3,136,3,134,12,132,5,130,9,130,7
  2043.     dc.w    end_patt
  2044.  
  2045.  
  2046. ;-------------------
  2047.  
  2048.             ;chess queens
  2049. cr  set   40
  2050. q set  cr/2
  2051. sq set q/2
  2052. dsq set sq/4
  2053.  
  2054. trc1 set  0
  2055. tq1 set      0
  2056. tq2 set      0
  2057. tsq1 set  7
  2058. tsq2 set 6
  2059.  
  2060.  
  2061.  
  2062. s1_q:
  2063.  
  2064.  
  2065.     dc.l    fhorn_snd
  2066.     dc.l    qhorn
  2067.     dc.l    flute_snd
  2068.     dc.l    qhorn
  2069.       dc.l     0,end_song
  2070.  
  2071. s2_q:
  2072.     dc.l    flute_sndmq
  2073.     dc.l    qstrings
  2074.       dc.l     0,end_song
  2075.  
  2076.  
  2077. s3_q:
  2078.  
  2079.     dc.l    pizzo_snd
  2080.     dc.l    qpizzo
  2081.  
  2082.  
  2083.       dc.l     0,end_song
  2084.  
  2085.  
  2086. s4_q:
  2087.     dc.l    snare_sndq
  2088.     dc.l    qsnare
  2089.       dc.l     0,end_song
  2090.  
  2091. ;-----------------
  2092.  
  2093. qsnare:
  2094.     dc.w    rest,q
  2095.     dc.w    r16,tsq1,r16,tsq2,r16,tsq1,r16,cr+q
  2096.     dc.w    r16,tsq1,r16,tsq2,r16,tsq1,r16,cr
  2097.     dc.w end_patt
  2098.  
  2099. qpizzo
  2100.     dc.w f02,$0014,g02,$0014,a02,$0014,bb02,$0014
  2101.     dc.w c03,$0028,c02,$0028,d02,$0014,e02,$0014,f02,$0014
  2102.     dc.w g02,$0014,a02,$0028,a01,$0028,bb01,$0014,c02,$0014
  2103.     dc.w d02,$0014,e02,$0014,f02,$0028,f01,$0028,g01,$0014
  2104.     dc.w a01,$0014,b01,$0014,g01,$0014,c02,$0028,c03,$0028
  2105.     dc.w f02,$0014,g02,$0014,a02,$0014,bb02,$0014,c03,$0028
  2106.     dc.w c02,$0028,d02,$0014,e02,$0014,f02,$0014,g02,$0014
  2107.     dc.w a02,$0028,a01,$0028,bb01,$0014,c02,$0014,d02,$0014
  2108.     dc.w e02,$0014,f02,$0028,f01,$0028,c02,$0028,c03,$0028
  2109.     dc.w c03,$0014,bb02,$0014,a02,$0014,g02,$0014,f02,$0014
  2110.     dc.w g02,$0014,a02,$0014,bb02,$0014,c03,$0028,c02,$0028
  2111.     dc.w d02,$0014,e02,$0014,f02,$0014,g02,$0014,a02,$0028
  2112.     dc.w a01,$0028,bb01,$0014,c02,$0014,d02,$0014,e02,$0014
  2113.     dc.w f02,$0028,f01,$0028,g01,$0014,a01,$0014,bb01,$0014
  2114.     dc.w b01,$0014,c02,$0028,c03,$0028,f02,$0014,g02,$0014
  2115.     dc.w a02,$0014,bb02,$0014,c03,$0028,c02,$0028,d02,$0014
  2116.     dc.w e02,$0014,f02,$0014,g02,$0014,a02,$0028,a01,$0028
  2117.     dc.w bb01,$0014,c02,$0014,d02,$0014,e02,$0014,f02,$0028
  2118.     dc.w c02,$0028,f02,$0014,e02,$0014,d02,$0014,c02,$0014
  2119.     dc.w f02,cr*2
  2120.     dc.w end_patt
  2121.  
  2122.  
  2123. qhorn
  2124.     dc.w modon,1,1,2,2,20,20
  2125.     dc.w a02,$0050,g02,$0014,a02,$0014,bb02,$0014
  2126.     dc.w g02,$0014,f02,$0050,e02,$0014,f02,$0014,g02,$0014
  2127.     dc.w e02,$0014,d02,$0050,c02,$0014,d02,$0014,e02,$0014
  2128.     dc.w f02,$0014,g02,$003c,c02,$0014,c02,$0050,a02,$0050
  2129.     dc.w g02,$0014,a02,$0014,bb02,$0014,g02,$0014,f02,$0050
  2130.     dc.w e02,$0014,f02,$0014,g02,$0014,e02,$0014,d02,$0028
  2131.     dc.w bb02,$0028,a02,$0028,f02,$0028,g02,$00a0,a02,$0050
  2132.     dc.w g02,$0014,a02,$0014,bb02,$0014,g02,$0014,f02,$0050
  2133.     dc.w e02,$0014,f02,$0014,g02,$0014,e02,$0014,d02,$0050
  2134.     dc.w c02,$0014,d02,$0014,e02,$0014,f02,$0014,g02,$003c
  2135.     dc.w c02,$0014,c02,$0050,a02,$0050,g02,$0014,a02,$0014
  2136.     dc.w bb02,$0014,g02,$0014,f02,$0050,e02,$0014,f02,$0014
  2137.     dc.w g02,$0014,e02,$0014,d02,$0028,bb02,$0028,a02,$0028
  2138.     dc.w g02,$0028,g02,$003c,f02,$0014,f02,cr*2
  2139.     dc.w end_patt
  2140.  
  2141. qstrings
  2142.     dc.w modon,1,1,3,3,12,12
  2143.     dc.w rest,cr*8*4,c03,$000a,f02,$000a,c03,$000a,f02,$000a
  2144.     dc.w c03,$000a,f02,$000a,c03,$000a,f02,$000a,c03,$000a
  2145.     dc.w e02,$000a,c03,$000a,e02,$000a,c03,$000a,e02,$000a
  2146.     dc.w c03,$000a,e02,$000a,d03,$000a,f02,$000a,d03,$000a
  2147.     dc.w f02,$000a,d03,$000a,f02,$000a,d03,$000a,f02,$000a
  2148.     dc.w c03,$000a,e02,$000a,c03,$000a,e02,$000a,c03,$000a
  2149.     dc.w e02,$000a,c03,$000a,e02,$000a,d03,$000a,f02,$000a
  2150.     dc.w d03,$000a,f02,$000a,d03,$000a,f02,$000a,d03,$000a
  2151.     dc.w f02,$000a,c03,$000a,f02,$000a,c03,$000a,f02,$000a
  2152.     dc.w c03,$000a,f02,$000a,c03,$000a,f02,$000a,d03,$000a
  2153.     dc.w g02,$000a,d03,$000a,g02,$000a,d03,$000a,g02,$000a
  2154.     dc.w d03,$000a,g02,$000a,c03,$000a,e02,$000a,c03,$000a
  2155.     dc.w e02,$000a,c03,$000a,e02,$000a,c03,$000a,e02,$000a
  2156.     dc.w c03,$000a,f02,$000a,c03,$000a,f02,$000a,c03,$000a
  2157.     dc.w f02,$000a,c03,$000a,f02,$000a,c03,$000a,e02,$000a
  2158.     dc.w c03,$000a,e02,$000a,c03,$000a,e02,$000a,c03,$000a
  2159.     dc.w e02,$000a,d03,$000a,f02,$000a,d03,$000a,f02,$000a
  2160.     dc.w d03,$000a,f02,$000a,d03,$000a,f02,$000a,c03,$000a
  2161.     dc.w e02,$000a,c03,$000a,e02,$000a,c03,$000a,e02,$000a
  2162.     dc.w c03,$000a,e02,$000a,d03,$000a,f02,$000a,d03,$000a
  2163.     dc.w f02,$000a,d03,$000a,f02,$000a,d03,$000a,f02,$000a
  2164.     dc.w c03,$000a,f02,$000a,c03,$000a,f02,$000a,c03,$000a
  2165.     dc.w e02,$000a,c03,$000a,e02,$000a,c03,$000a,g02,$000a
  2166.     dc.w c03,$000a,g02,$000a,c03,$000a,g02,$000a,c03,$000a
  2167.     dc.w g02,$000a,c03,cr*2
  2168.     dc.w end_patt
  2169.  
  2170.  
  2171. ;-----------------
  2172.  
  2173.             ;chess fanfare
  2174. cr  set   24
  2175. q set  cr/2
  2176. sq set q/2
  2177. dsq set sq/4
  2178.  
  2179. tcr1 set  16
  2180. tq1 set      0
  2181. tq2 set      0
  2182. tsq1 set  7
  2183. tsq2 set 6
  2184.  
  2185.  
  2186. v1    equ  6
  2187. v2    equ  12
  2188. v3    equ  24
  2189.  
  2190. s1_f:
  2191.     dc.l    trumpet_snd
  2192.     dc.l    f1
  2193.     dc.l    pri
  2194.       dc.l     0,end_song
  2195.  
  2196. s2_f:
  2197.     dc.l    trumpet_snd
  2198.     dc.l    f2
  2199.     dc.l    pri
  2200.       dc.l     0,end_song
  2201.  
  2202.  
  2203. s3_f:
  2204.  
  2205.     dc.l    trumpet_snd
  2206.     dc.l    f3
  2207.     dc.l    pri
  2208.       dc.l     0,end_song
  2209.  
  2210.  
  2211. s4_f:
  2212.     dc.l    trumpet_snd
  2213.     dc.l    f4
  2214.     dc.l    pri
  2215.       dc.l     0,end_song
  2216.  
  2217.  
  2218. pri
  2219.     dc.w    rest,65000
  2220.     dc.w    rest,65000
  2221.     dc.w    rest,65000
  2222.     dc.w    rest,65000
  2223.     dc.w    rest,65000
  2224.     dc.w     end_patt
  2225.  
  2226.  
  2227.  
  2228. f1
  2229.     dc.w    c02,sq-2,rest,2,c02,sq,f02,cr*6,rest,40
  2230.     dc.w    d02,sq-2,rest,2,d02,sq
  2231.     dc.w    g02,tcr1,d02,tcr1,g02,tcr1    
  2232.     dc.w    b02,tcr1,g02,tcr1,b02,tcr1    
  2233.     dc.w    d03,tcr1+v1,b02,tcr1+v2,d03,tcr1+v3    
  2234.     dc.w    g03,cr*6,rest,cr*4
  2235.     dc.w     end_patt
  2236.  
  2237. f2
  2238.     dc.w    rest,1
  2239.     dc.w    c02,sq-2,rest,2,c02,sq,f02,cr*6,rest,40
  2240.     dc.w    d02,sq-2,rest,2,d02,sq
  2241.     dc.w    g02,tcr1,d02,tcr1,g02,tcr1    
  2242.     dc.w    b02,tcr1,g02,tcr1,b02,tcr1    
  2243.     dc.w    d03,tcr1+v1,b02,tcr1+v2,d03,tcr1+v3    
  2244.     dc.w    g03,cr*6-1,rest,cr*4
  2245.     dc.w     end_patt
  2246.  
  2247. f3
  2248.     dc.w    rest,2
  2249.     dc.w    a01,sq-2,rest,2,a01,sq,c02,cr*6,rest,40
  2250.     dc.w    b01,sq-2,rest,2,b01,sq
  2251.     dc.w    d02,tcr1,b01,tcr1,d02,tcr1    
  2252.     dc.w    g02,tcr1,d02,tcr1,g02,tcr1    
  2253.     dc.w    b02,tcr1+v1,g02,tcr1+v2,b02,tcr1+v3    
  2254.     dc.w    d03,cr*6-2,rest,cr*4
  2255.     dc.w     end_patt
  2256.  
  2257. f4
  2258.     dc.w    rest,3
  2259.     dc.w    f01,sq-2,rest,2,f01,sq,a02,cr*6,rest,40
  2260.     dc.w    g01,sq-2,rest,2,g01,sq
  2261.     dc.w    g02,tcr1,g02,tcr1,g02,tcr1    
  2262.     dc.w    g02,tcr1,g02,tcr1,g02,tcr1    
  2263.     dc.w    g02,tcr1+v1,g02,tcr1+v2,g02,tcr1+v3    
  2264.     dc.w    g01,cr*6-2,rest,cr*4
  2265.     dc.w     end_patt
  2266.  
  2267. ;----------------
  2268.  
  2269.  
  2270.             ;dwarves coming
  2271. cr  set   24
  2272. q set  cr/2
  2273. sq set q/2
  2274. dsq set sq/4
  2275.  
  2276. tcr1 set  16
  2277. tq1 set      8
  2278. tq2 set      8
  2279. tsq1 set  7
  2280. tsq2 set 6
  2281.  
  2282.  
  2283. s1_d:
  2284.     dc.l    pizzo_snd
  2285.     dc.l    dbass
  2286.       dc.l     0,end_song
  2287.  
  2288. s2_d:
  2289.     dc.l    snare_sndq
  2290.     dc.l    dsnare
  2291.       dc.l     0,end_song
  2292.  
  2293.  
  2294. s3_d:
  2295.  
  2296.     dc.l    flute_snd
  2297.     dc.l    dtune
  2298.     dc.l    dtune
  2299.     dc.l    drest
  2300.       dc.l     0,end_song
  2301.  
  2302.  
  2303. s4_d:
  2304.     dc.l    wave_sndl
  2305.     dc.l    wave
  2306.       dc.l     0,end_song
  2307.  
  2308. drest
  2309.     dc.w    rest,cr*16
  2310.     dc.w    end_patt
  2311.  
  2312.  
  2313. dbass
  2314.     dc.w modon,4,4,4,4,6,6
  2315.     dc.w    c02,cr,g01,cr,d02,cr,g01,cr
  2316.     dc.w    c02,cr,cr,b01,cr,a01,cr
  2317.     dc.w    g01,tq1,a01,tq2,b01,tq1
  2318.     dc.w     end_patt
  2319.  
  2320. dsnare    dc.w    r16,cr,r16,cr
  2321.     dc.w    r16,tq1,r16,tq2,r16,tq1
  2322.     dc.w    r16,cr
  2323.     dc.w    r16,tq1,r16,tq2,r16,tq1
  2324.     dc.w    r16,tq1,r16,tq2,r16,tq1
  2325.     dc.w    r16,tq1,r16,tq2,r16,tq1
  2326.     dc.w    r16,cr
  2327.     dc.w     end_patt
  2328.  
  2329. dtune
  2330.     dc.w modon,2,2,2,2,6,6
  2331.     dc.w    c03,cr-tq1,c03,tq1,e03,cr
  2332.     dc.w    f03,cr-tq1,f03,tq1,d03,cr
  2333.     dc.w    e03,cr*4
  2334.     dc.w    c03,cr-tq1,c03,tq1,e03,cr
  2335.     dc.w    d03,cr-tq1,d03,tq1,b02,cr
  2336.     dc.w    c03,cr*4
  2337.     dc.w     end_patt
  2338.  
  2339.  
  2340.  
  2341. ;----------------
  2342. cr  set   20
  2343. q set  cr/2
  2344. sq set q/2
  2345. dsq set sq/4
  2346.  
  2347. tcr1 set  16
  2348. tq1 set      8
  2349. tq2 set      8
  2350. tsq1 set  7
  2351. tsq2 set 6
  2352.  
  2353.             ;drown you bastard
  2354. s1_dr:
  2355.  
  2356.     dc.l    pr
  2357.     dc.l    flute_snd
  2358.     dc.l    die1
  2359.     dc.l    die2
  2360.     dc.l    die3
  2361.     dc.l    pri
  2362.  
  2363.       dc.l     0,end_song
  2364. s2_dr:
  2365.  
  2366.     dc.l    trumpet_snd
  2367.     dc.l    die1
  2368.     dc.l    die2
  2369.     dc.l    die2
  2370.     dc.l    die3
  2371.     dc.l    pri
  2372.  
  2373.         DC.L    0,end_song
  2374.  
  2375. s3_dr:
  2376.  
  2377.     dc.l    pizzo_snd
  2378.     dc.l    die_bass
  2379.     dc.l    die3
  2380.     dc.l    pri
  2381.  
  2382.     dc.l     0,end_song
  2383.  
  2384. s4_dr:
  2385.  
  2386.     dc.l    trumpet_snd
  2387.     dc.l    die_sus
  2388.     dc.l    die3
  2389.     dc.l    pri
  2390.  
  2391.     dc.l     0,end_song
  2392.  
  2393. die1:
  2394.     dc.w    c02,sq,d02,sq,eb02,sq,f02,sq
  2395.     dc.w end_patt
  2396. die2:
  2397.     dc.w    g02,sq,gb02,sq,g02,sq,gb02,sq,g02,sq,gb02,sq,g02,sq,gb02,sq
  2398.     dc.w    g02,sq,gb02,sq,g02,sq,gb02,sq,g02,sq,gb02,sq,g02,sq,gb02,sq
  2399.     dc.w    g02,sq,gb02,sq,g02,sq,gb02,sq,g02,sq,gb02,sq,g02,sq,gb02,sq
  2400.     dc.w    g02,sq,gb02,sq,g02,sq,gb02,sq,g02,sq,gb02,sq,g02,sq,gb02,sq
  2401.     dc.w end_patt
  2402.  
  2403.  
  2404. die3:
  2405.     dc.w    c03,sq,b02,sq,bb02,sq,a02,sq,ab02,sq,g02,sq,gb02,sq,f02,sq
  2406.     dc.w    e02,sq,eb02,sq,d02,sq,db02,sq,c02,sq
  2407.     dc.w    b01,sq,bb01,sq,a01,sq,ab01,sq,g01,sq,gb01,sq,f01,sq
  2408.     dc.w    e01,sq,db01,sq,c01,cr*4
  2409.     dc.w end_patt
  2410.  
  2411. die_bass:
  2412.     dc.w    c02,sq,d02,sq,eb02,sq,f02,sq
  2413.     dc.w    c01,cr*16
  2414.     dc.w end_patt
  2415. die_sus:
  2416.     dc.w    rest,sq*4,c01,cr*16
  2417.     dc.w end_patt
  2418.  
  2419. ;------
  2420. s1_b:
  2421.  
  2422.     dc.l    wave_snd
  2423.     dc.l    wave
  2424.  
  2425.       dc.l     0,end_song
  2426. s2_b:
  2427.  
  2428.     dc.l    wave_sndx
  2429.     dc.l    wavex
  2430.  
  2431.         DC.L    0,end_song
  2432.  
  2433. s3_b:
  2434.  
  2435.     dc.l    seagull1_snd
  2436.     dc.l    seagull1
  2437.     dc.l     0,end_song
  2438.  
  2439. s4_b:
  2440.  
  2441.     dc.l    seagull2_snd
  2442.     dc.l    seagull2
  2443.  
  2444.     dc.l     0,end_song
  2445. ;----------
  2446.  
  2447.  
  2448. wave
  2449.  
  2450.     dc.w    r4,150,r5,170,r3,180,r3,200,r2,190
  2451.     dc.w end_patt
  2452.  
  2453. wavex
  2454.     dc.w modon,4,4,8,8,6,6
  2455.     dc.w    r1,200
  2456.     ;dc.w    rest,12,r4,150,r5,170,r3,180,r3,200,r2,190-12
  2457.     dc.w end_patt
  2458.  
  2459. seagull1
  2460.     dc.w pbend,down,2,10000,1
  2461.     dc.w  a03,10,a03,12
  2462.     dc.w    rest,300
  2463.     dc.w  f03,16,a03,8
  2464.     dc.w  a03,8,g03,12
  2465.     dc.w    rest,250
  2466.  
  2467.     dc.w end_patt
  2468.  
  2469.  
  2470. seagull2
  2471.     dc.w pbend,down,1,10000,1
  2472.     dc.w  g03,5,rest,100,g03,15,f03,10
  2473.     dc.w    rest,200
  2474.     dc.w  e03,15,rest,100,e03,8,f03,10
  2475.     dc.w    rest,450
  2476.     dc.w end_patt
  2477. wavep:
  2478.         dc.w 1  
  2479.              dc.l waved+iff
  2480.              dc.w (9094-iff)/2 
  2481.              dc.l restd
  2482.              dc.w 16/2
  2483.  
  2484. seagull1_snd:
  2485.     dc.w    new_env
  2486.     dc.l    seagull_envvq
  2487.     dc.w    new_snd
  2488.     dc.l    flutep
  2489.     dc.w     end_patt
  2490.  
  2491. seagull2_snd:
  2492.     dc.w    new_env
  2493.     dc.l    seagull_envq
  2494.     dc.w    new_snd
  2495.     dc.l    flutep
  2496.     dc.w     end_patt
  2497. wave_snd:
  2498.     dc.w    new_env
  2499.     dc.l    wave_envq
  2500.     dc.w    new_snd
  2501.     dc.l    wavep
  2502.     dc.w     end_patt
  2503.  
  2504. sine_snd:
  2505.     dc.w    new_env
  2506.     dc.l    sine_env
  2507.     dc.w    new_snd
  2508.     dc.l    sinep
  2509.     dc.w     end_patt
  2510.  
  2511.  
  2512. wave_sndl:
  2513.     dc.w    new_env
  2514.     dc.l    wave_env
  2515.     dc.w    new_snd
  2516.     dc.l    wavep
  2517.     dc.w     end_patt
  2518.  
  2519. wave_sndx:
  2520.     dc.w    new_env
  2521.     dc.l    wave_envvq
  2522.     dc.w    new_snd
  2523.     dc.l    wavep
  2524.     dc.w     end_patt
  2525.  
  2526.  
  2527.  
  2528. seagull_envq:            dc.w 0,8,255
  2529. seagull_envvq:            dc.w 0,4,255
  2530. wave_envq:            dc.w 0,18,255
  2531. wave_env:            dc.w 0,48,255
  2532. wave_envvq:            dc.w 0,8,255
  2533.  
  2534. ;-----------------
  2535.  
  2536. sounds:
  2537.  
  2538. flute_snd:
  2539.     dc.w    new_env
  2540.     dc.l    flute_env
  2541.     dc.w    new_snd
  2542.     dc.l    flutep
  2543.     dc.w     end_patt
  2544.  
  2545. flute_sndq:
  2546.     dc.w    new_env
  2547.     dc.l    flute_envq
  2548.     dc.w    new_snd
  2549.     dc.l    flutep
  2550.     dc.w     end_patt
  2551.  
  2552. flute_sndmq:
  2553.     dc.w    new_env
  2554.     dc.l    flute_envmq
  2555.     dc.w    new_snd
  2556.     dc.l    flutep
  2557.     dc.w     end_patt
  2558.  
  2559.  
  2560. aguitar_snd:
  2561.     dc.w    new_env
  2562.     dc.l    aguitar_env
  2563.     dc.w    new_snd
  2564.     dc.l    aguitp
  2565.     dc.w     end_patt
  2566.  
  2567. aguitar_sndq:
  2568. aguitar_snd_quiet:
  2569.     dc.w    new_env
  2570.     dc.l    aguitar_env_quiet
  2571.     dc.w    new_snd
  2572.     dc.l    aguitp
  2573.     dc.w     end_patt
  2574.  
  2575.  
  2576. tamb_snd:
  2577.     dc.w    new_env
  2578.     dc.l    tamb_env
  2579.     dc.w    new_snd
  2580.     dc.l    tambp
  2581.     dc.w     end_patt
  2582.  
  2583.  
  2584.  
  2585. abass_snd:
  2586.     dc.w    new_env
  2587.     dc.l    abass_env
  2588.     dc.w    new_snd
  2589.     dc.l    abassp
  2590.     dc.w     end_patt
  2591.  
  2592. sitar_snd:
  2593.     dc.w    new_env
  2594.     dc.l    sitar_env
  2595.     dc.w    new_snd
  2596.     dc.l    sitarp
  2597.     dc.w     end_patt
  2598.  
  2599. bassoon_snd:
  2600.     dc.w    new_env
  2601.     dc.l    bassoon_env
  2602.     dc.w    new_snd
  2603.     dc.l    bassoonp
  2604.     dc.w     end_patt
  2605.  
  2606. bassoon_snd_short:
  2607.     dc.w    new_env
  2608.     dc.l    bassoon_env
  2609.     dc.w    new_snd
  2610.     dc.l    bassoonsp
  2611.     dc.w     end_patt
  2612.  
  2613. snare_snd:
  2614.     dc.w    new_env
  2615.     dc.l    snare_env
  2616.     dc.w    new_snd
  2617.     dc.l    snarep
  2618.     dc.w     end_patt
  2619.  
  2620. snare_sndq:
  2621.     dc.w    new_env
  2622.     dc.l    snare_envq
  2623.     dc.w    new_snd
  2624.     dc.l    snarep
  2625.     dc.w     end_patt
  2626.  
  2627. trumpet_snd:
  2628.     dc.w    new_env
  2629.     dc.l    trumpet_env
  2630.     dc.w    new_snd
  2631.     dc.l    trumpetp
  2632.     dc.w     end_patt
  2633.  
  2634. trumpet_sndq:
  2635.     dc.w    new_env
  2636.     dc.l    trumpet_envq
  2637.     dc.w    new_snd
  2638.     dc.l    trumpetp
  2639.     dc.w     end_patt
  2640.  
  2641. pizzo_snd:
  2642.     dc.w    new_env
  2643.     dc.l    pizzo_env
  2644.     dc.w    new_snd
  2645.     dc.l    pizzop
  2646.     dc.w     end_patt
  2647.  
  2648. pizzoh_snd:
  2649.     dc.w    new_env
  2650.     dc.l    pizzo_env
  2651.     dc.w    new_snd
  2652.     dc.l    pizzohp
  2653.     dc.w     end_patt
  2654.  
  2655.  
  2656. fhorn_snd:
  2657.     dc.w    new_env
  2658.     dc.l    fhorn_env
  2659.     dc.w    new_snd
  2660.     dc.l    fhornp
  2661.     dc.w     end_patt
  2662.  
  2663. fhorn_sndq:
  2664.     dc.w    new_env
  2665.     dc.l    fhorn_envq
  2666.     dc.w    new_snd
  2667.     dc.l    fhornp
  2668.     dc.w     end_patt
  2669.  
  2670.  
  2671.  
  2672. strings_snd:
  2673.     dc.w    new_env
  2674.     dc.l    strings_env
  2675.     dc.w    new_snd
  2676.     dc.l    stringsp
  2677.     dc.w     end_patt
  2678.  
  2679.  
  2680.  
  2681.  
  2682. ;***********************************************
  2683.  
  2684. parameters:
  2685.  
  2686. iff    equ 108
  2687.  
  2688.     ; sample parameters
  2689.  
  2690.  
  2691. snarep
  2692.         dc.w 1  
  2693.              dc.l snared
  2694.              dc.w 2240/2  
  2695.              dc.l restd
  2696.              dc.w 16/2
  2697.  
  2698.  
  2699. trumpetp
  2700.         dc.w 1  
  2701.              dc.l synbras1d
  2702.              dc.w 3338/2  
  2703.              dc.l synbras1d
  2704.              dc.w 3338/2  
  2705.  
  2706. abassp
  2707.         dc.w 1  
  2708.              dc.l abassd+iff
  2709.              dc.w 8000/2 
  2710.              dc.l restd
  2711.              dc.w 16/2
  2712.  
  2713. flutep
  2714.         dc.w 1  
  2715.              dc.l fluted+iff
  2716.              dc.w 7278/2
  2717.              dc.l fluted+4173+iff
  2718.              dc.w 3106/2
  2719.  
  2720. tambp
  2721.         dc.w 1  
  2722.              dc.l tambd
  2723.              dc.w 1457/2 
  2724.              dc.l restd
  2725.              dc.w 16/2
  2726.  
  2727. sitarp
  2728.         dc.w 1  
  2729.              dc.l sitard
  2730.              dc.w 7708/2 
  2731.              dc.l restd
  2732.              dc.w 16/2
  2733.  
  2734. aguitp
  2735.         dc.w 1  
  2736.              dc.l aguitd+iff
  2737.              dc.w 9576/2 
  2738.              dc.l restd
  2739.              dc.w 16/2
  2740.  
  2741. bassoonlp
  2742.         dc.w 1  
  2743.              dc.l bassoond+iff
  2744.              dc.w 4788/2 
  2745.              dc.l bassoond+iff+2033
  2746.              dc.w 2755/2
  2747.  
  2748.  
  2749. bassoonp
  2750.         dc.w 1  
  2751.              dc.l bassoond+iff
  2752.              dc.w 4788/2 
  2753.              dc.l restd
  2754.              dc.w 16/2
  2755.  
  2756. bassoonsp
  2757.         dc.w 1  
  2758.              dc.l bassoond+iff
  2759.              dc.w 4788/2-1000 
  2760.              dc.l restd
  2761.              dc.w 16/2
  2762.  
  2763. pizzop:
  2764.         dc.w 1  
  2765.              dc.l pizzod
  2766.              dc.w 5550/2 
  2767.              dc.l restd
  2768.              dc.w 16/2
  2769.  
  2770. pizzohp:
  2771.         dc.w 1  
  2772.              dc.l pizzohd
  2773.              dc.w 3796/2 
  2774.              dc.l restd
  2775.              dc.w 16/2
  2776.  
  2777. fhornp:
  2778.         dc.w 1  
  2779.              dc.l fhornd+iff
  2780.              dc.w (6684-iff)/2 
  2781.              dc.l fhornd+iff
  2782.              dc.w (6684-iff)/2
  2783.  
  2784. stringsp:
  2785.         dc.w 1  
  2786.              dc.l stringsd
  2787.              dc.w (8668)/2 
  2788.              dc.l restd
  2789.              dc.w 16/2
  2790.  
  2791.  
  2792.  
  2793. envelopes:
  2794.  
  2795.  
  2796. rest_env:            dc.w 0,0,0,0,0,0,0,0,255
  2797. flute_env:            dc.w 0,32,255
  2798. flute_envq:            dc.w 0,8,255
  2799. flute_envmq:            dc.w 0,18,255
  2800. tamb_env:            dc.w 0,62,255
  2801. aguitar_env:            dc.w 0,45,255
  2802. aguitar_env_quiet:        dc.w 0,30,255
  2803. sitar_env:            dc.w 0,42,255
  2804. abass_env:            dc.w 0,54,255
  2805. snare_env:            dc.w 0,35,255
  2806. snare_envq:            dc.w 0,15,255
  2807. trumpet_env:            dc.w 0,35,255
  2808. trumpet_envq:            dc.w 0,25,255
  2809. bassoon_env:            dc.w 0,40,255
  2810. pizzo_env:            dc.w 0,35,255
  2811. fhorn_env:            dc.w 0,40,255
  2812. fhorn_envq:            dc.w 0,28,255
  2813. strings_env:            dc.w 0,48,255
  2814. sine_env:            dc.w 0,48,255
  2815.  
  2816.  
  2817.  
  2818. ;guit.sam                    6191 rwed Today     01:27:11
  2819. ;tamb.sam                    1457 rwed Today     01:27:10
  2820. ;flute.sam                   8410 rwed Today     01:27:08
  2821. ;sitar.sam                   8993 rwed Today     01:27:07
  2822. ;bass.sam                    8583 rwed Today     01:27:05
  2823. ;7 files - 207 blocks used
  2824.  
  2825. ;**************************************************
  2826.  
  2827.  
  2828. aguitd            incbin c:instruments/aguit.sam 
  2829. tambd            ;incbin c:instruments/tamb.sam 
  2830. fluted            incbin c:instruments/flute.sam 
  2831. sitard            ;incbin c:instruments/sitar.sam 
  2832. abassd            ;incbin c:instruments/abass.sam 
  2833. snared            incbin c:instruments/snare.sam 
  2834. synbras1d        incbin c:instruments/hbrass3l.sam 
  2835. bassoond        incbin c:instruments/bassoonl.sam 
  2836. pizzod            incbin c:instruments/pizzo1.sam 
  2837. pizzohd            ;incbin c:instruments/pizzo2.sam 
  2838.  
  2839. fhornd            incbin c:instruments/fhorn.sam 
  2840. stringsd        ;incbin c:instruments/strings2.sam
  2841. waved            incbin c:instruments/wave.sam
  2842. ;********************************************
  2843.  
  2844.  
  2845. restd:
  2846. rest_data:
  2847.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  2848.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  2849.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  2850.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  2851.  
  2852.  
  2853. ;*************************************************
  2854.  
  2855.     end
  2856.  
  2857.  
  2858.  
  2859.     end
  2860.