home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: Some FX Samples Do Not Format / Lowe_SomeFXSamplesDoNotFormat.img / BM.ZIP / BARCELM.S next >
Encoding:
Text File  |  1980-01-01  |  33.2 KB  |  1,955 lines

  1.  
  2.  
  3.         ;BARCELONA MANAGEMENT FX
  4.  
  5.  
  6. ;        DAVE LOWE.....0723  870648
  7.  
  8.  
  9. ;        **************************
  10.  
  11.  
  12.     section issA,code_c    ;must be in low memory for dma access
  13.                 ;DEVPAC PSEUDO OP ...
  14. a00  equ  508*2
  15. bb00  equ  480*2
  16. b00  equ  453*2
  17.  
  18. c01  equ  428*2
  19. db01  equ  404*2
  20. d01 equ  381*2
  21. eb01  equ  360*2
  22. e01  equ  339*2
  23. f01  equ  320*2
  24. gb01  equ  302*2
  25. g01  equ  285*2
  26. ab01 equ 269*2
  27. a01  equ  508
  28. bb01  equ  480
  29. b01  equ  453
  30.  
  31. c02  equ  428
  32. db02  equ  404
  33. d02  equ  381
  34. eb02  equ  360
  35. e02  equ  339
  36. f02  equ  320
  37. gb02  equ  302
  38. g02  equ  285
  39. ab02 equ 269
  40. a02  equ  254
  41. bb02  equ  240
  42. b02  equ  226
  43.  
  44. c03  equ  214
  45. db03  equ  202
  46. d03  equ  190
  47. eb03  equ  180
  48. e03  equ  170
  49. f03  equ  160
  50. gb03  equ  151
  51. g03  equ  143
  52. ab03 equ 135
  53. a03  equ  127
  54.  
  55. bb03  equ  480*2
  56. b03  equ  453*2
  57.  
  58. c04  equ  428*2
  59. db04  equ  404*2
  60. d04 equ  381*2
  61. eb04  equ  360*2
  62. e04  equ  339*2
  63. f04  equ  320*2
  64. gb04  equ  302*2
  65. g04  equ  285*2
  66. ab04 equ 269*2
  67. a04  equ  508
  68. bb04  equ  480
  69. b04  equ  453
  70.  
  71. c05  equ  428
  72. db05  equ  404
  73. d05  equ  381
  74. eb05  equ  360
  75. e05  equ  339
  76. f05  equ  320
  77. gb05  equ  302
  78. g05  equ  285
  79. ab05 equ 269
  80. a05  equ  254
  81. bb05  equ  240
  82. b05  equ  226
  83.  
  84. c06  equ  214
  85. db06  equ  202
  86. d06  equ  190
  87. eb06  equ  180
  88. e06  equ  170
  89. f06  equ  160
  90. gb06  equ  151
  91. g06  equ  143
  92. ab06 equ 135
  93. a06  equ  127
  94. bb06  equ  480*2
  95. b06  equ  453*2
  96.  
  97. c07  equ  428*2
  98. db07  equ  404*2
  99. d07 equ  381*2
  100. eb07  equ  360*2
  101. e07  equ  339*2
  102. f07  equ  320*2
  103. gb07  equ  302*2
  104. g07  equ  285*2
  105. ab07 equ 269*2
  106. a07  equ  508
  107. bb07  equ  480
  108. b07  equ  453
  109.  
  110. c08  equ  428
  111. db08  equ  404
  112. d08  equ  381
  113. eb08  equ  360
  114. e08  equ  339
  115. f08  equ  320
  116. gb08  equ  302
  117. g08  equ  285
  118. ab08 equ 269
  119. a08  equ  254
  120. bb08  equ  240
  121. b08  equ  226
  122.  
  123.  
  124. v equ 0
  125. a00x  equ  508*2+v
  126. bb00x  equ  480*2+v
  127. b00x  equ  453*2+v
  128.  
  129.  
  130. c01x  equ  428*2+v
  131. db01x  equ  404*2+v
  132. d01x equ  381*2+v
  133. eb01x  equ  360*2+v
  134. e01x  equ  339*2+v
  135. f01x  equ  320*2+v
  136. gb01x  equ  302*2+v
  137. g01x  equ  285*2+v
  138. ab01x equ 269*2+v
  139. a01x  equ  508+v
  140.  
  141. bb01x  equ  480+v
  142. b01x  equ  453+v
  143.  
  144. c02x  equ  428+v
  145. db02x  equ  404+v
  146. d02x  equ  381+v
  147. eb02x  equ  360+v
  148. e02x  equ  339+v
  149. f02x  equ  320+v
  150. gb02x  equ  302+v
  151. g02x  equ  285+v
  152. ab02x equ 269+v
  153. a02x  equ  254+v
  154. bb02x  equ  240+v
  155. b02x  equ  226+v
  156.  
  157. c03x  equ  214+v
  158. db03x  equ  202+v
  159. d03x  equ  190+v
  160. eb03x  equ  180+v
  161. e03x  equ  170+v
  162. f03x  equ  160+v
  163. gb03x  equ  151+v
  164. g03x  equ  143+v
  165. ab03x equ 135
  166. a03x  equ  127+v
  167. bb03x  equ  480*2+v
  168. b03x  equ  453*2+v
  169.  
  170. c04x  equ  428*2+v
  171. db04x  equ  404*2+v
  172. d04x equ  381*2+v
  173. eb04x  equ  360*2+v
  174. e04x  equ  339*2+v
  175. f04x  equ  320*2+v
  176. gb04x  equ  302*2+v
  177. g04x  equ  285*2+v
  178. ab04x equ 269*2+v
  179. a04x  equ  508+v
  180. bb04x  equ  480+v
  181. b04x  equ  453+v
  182.  
  183. c05x  equ  428+v
  184. db05x  equ  404+v
  185. d05x  equ  381+v
  186. eb05x  equ  360+v
  187. e05x  equ  339+v
  188. f05x  equ  320+v
  189. gb05x  equ  302+v
  190. g05x  equ  285+v
  191. ab05x equ 269+v
  192. a05x  equ  254+v
  193. bb05x  equ  240+v
  194. b05x  equ  226+v
  195.  
  196. c06x  equ  214+v
  197. db06x  equ  202+v
  198. d06x  equ  190+v
  199. eb06x  equ  180+v
  200. e06x  equ  170+v
  201. f06x  equ  160+v
  202. gb06x  equ  151+v
  203. g06x  equ  143+v
  204. ab06x equ 135
  205. a06x  equ  127+v
  206. bb06x  equ  480*2+v
  207. b06x  equ  453*2+v
  208.  
  209. c07x  equ  428*2+v
  210. db07x  equ  404*2+v
  211. d07x equ  381*2+v
  212. eb07x  equ  360*2+v
  213. e07x  equ  339*2+v
  214. f07x  equ  320*2+v
  215. gb07x  equ  302*2+v
  216. g07x  equ  285*2+v
  217. ab07x equ 269*2+v
  218. a07x  equ  508+v
  219. bb07x  equ  480+v
  220. b07x  equ  453+v
  221.  
  222. c08x  equ  428+v
  223. db08x  equ  404+v
  224. d08x  equ  381+v
  225. eb08x  equ  360+v
  226. e08x  equ  339+v
  227. f08x  equ  320+v
  228. gb08x  equ  302+v
  229. g08x  equ  285+v
  230. ab08x equ 269+v
  231. a08x  equ  254+v
  232. bb08x  equ  240+v
  233. b08x  equ  226+v
  234.  
  235. no_loop equ 0
  236. loop equ 0
  237. chann1reg   equ $dff0a0    
  238. chann2reg   equ $dff0b0
  239. chann3reg   equ $dff0c0
  240. chann4reg   equ $dff0d0
  241. dmacon     equ $dff096
  242. int_bf_int   equ   $dff01e
  243. int_bf_w    equ   $dff09a
  244. vhposr     equ   $dff006
  245. in_line    equ   0
  246. new_snd    equ   4
  247. end_song     equ   1
  248. end_patt    equ   8
  249. new_env    equ   12
  250. pbend     equ   16
  251.  
  252.  
  253.  
  254. cr  equ   16
  255. q equ cr/2
  256. sq equ q/2
  257. dsq equ sq/2
  258. m  equ cr*2
  259. sb equ cr*4
  260. dcr equ cr+q
  261. dq  equ q+sq
  262. r14 equ 264
  263. dm  equ m+cr
  264. tcr1      equ    11        ;;;;13
  265. tcr2    equ    10        ;;;;14
  266. tq1 equ     5         ;;;;7
  267. tq2 equ     6        ;;;;6
  268. tsq1 equ     3        ;;;;3 
  269. tsq2 equ     2        ;;;;4
  270. dsb equ sb+m
  271.  
  272.  
  273.  
  274. hi: equ 223
  275. lo:  equ 446
  276.  
  277. r22    equ 134
  278. r20    equ 143
  279. r19    equ 150
  280. r18    equ 178
  281. r17    equ 200
  282. r16:    equ 222
  283. r15:    equ 249
  284. r13:    equ 305
  285. r12:    equ 333
  286. r11:    equ 361
  287. r10:    equ 389
  288. r9:    equ 419
  289. r8:    equ 446
  290. r7:    equ 446+112
  291. r6:    equ 446+223
  292. r5:    equ 446+223+112
  293. r4:    equ 446*2
  294. r3:    equ 446*3
  295. r2:    equ 446*4
  296. r1:    equ 446*8
  297.  
  298.  
  299. filter: equ $bfe001
  300. filter_on equ 44
  301. filter_off equ 48
  302.  
  303. modon     equ   20
  304. pboff     equ   24
  305. modoff     equ   28
  306. rest     equ 32
  307. end_fxp  equ 36
  308. end_fx3  equ 36
  309. end_fx4  equ 40
  310. acc    equ 52
  311. repeat    equ 56
  312. down      equ   1
  313. up       equ   2
  314.  
  315.  
  316.  
  317.  
  318.  
  319. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  320.  
  321.  
  322.  
  323.  ;    THIS IS THE CONTROL SECTION FOR TESTING ANED CAN BE DELETED
  324.     ;        WHEN NOT REQUIRED
  325.  
  326.  
  327.     jsr select_new_song
  328.  
  329. testloop:
  330.     jsr delay    ;wait for scan line  at 50hz on pal
  331.  
  332.     jsr driver
  333.  
  334.         bra testloop
  335.  
  336.  
  337. delay:
  338.     tst.w fxtimer
  339.     bne no_test
  340.     clr.l d0
  341.     move.b $bfe001,d0
  342.     btst #6,d0
  343.     bne no_test1
  344.     move.w #10,fxtimer
  345.     bra testfx4
  346. no_test
  347.     subq #1,fxtimer
  348. no_test1
  349.     clr.l d0
  350.         move.w vhposr,d0
  351.         andi.w #%1111111100000000,d0
  352.         cmpi.w #%1111111100000000,d0
  353.  
  354.     bne no_test1
  355.     rts
  356.  
  357. testfx4:  
  358.  
  359.     clr.l d0
  360.     move.b $bfe001,d0
  361.     btst #6,d0
  362.     beq testfx4
  363.  
  364.  
  365.     ;move.l song_buffer,d0
  366.     ;add.l #1,d0
  367.     ;cmp.l #4,d0
  368.     ;bne no_s
  369.     ;move.l #1,d0
  370. no_s    ;move.l d0,song_buffer
  371.     ;jsr select_new_song
  372.  
  373.  
  374.  
  375.  
  376.  
  377.     move.l fx_last,d0
  378.     cmp.l #max_fx,d0
  379.     ;beq no_k
  380.     ;bcs no_k
  381.     move.l d0,fx_kill
  382.  
  383.     jsr kill_loopfx
  384.     move.w #1,music_disable
  385.     jsr kill_chip
  386.  
  387.  
  388. no_k
  389.         move.l fx_no,fx_number
  390.     move.l fx_no,fx_last
  391.     addq.l #1,fx_no
  392.     move.l    max_fx,d0
  393.         cmp.l fx_no,d0
  394.     bne noreset
  395.     move.l #1,fx_no    
  396. noreset: 
  397.     jsr set_up_fx
  398.     bra no_test    
  399.  
  400. fxtc:          dc.w 10
  401. fx_no:         dc.l  1
  402. fx_last        dc.l  0
  403.  
  404.  
  405. ;        END OF CONTROL (DELETABLE) SECTION
  406.  
  407. ;    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  408.  
  409. ;    MAIN VARIABLES TO BE ACCESSED BY PROGRAMMER DURING RUNTIME
  410.  
  411.  
  412. fx_number:     dc.l 0 ;     number of fx required here...see list
  413. fx_kill        dc.l 0 ;     number of fx to kill/only needed for looped fx
  414.  
  415. song_buffer     dc.l 1 ;     number of piece of music required here ie.1 to 3
  416.  
  417.  
  418. music_disable:  dc.w 1 ;     1 = disable music
  419. fx_disable:     dc.w 0 ;     1 = disable fx
  420.  
  421. ;    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  422.  
  423. ;  THESE VARIABLES ARE USED INTERNALLY BY THE DRIVER
  424. fxr1         dc.l 0  
  425. fxr2         dc.l 0  
  426. fxr3         dc.l 0  
  427. fxr4         dc.l 0  
  428. fxc1        dc.l 0
  429. fxc2          dc.l 0
  430. fxc3        dc.l 0
  431. fxc4          dc.l 0
  432. fx1_flag    dc.w 0
  433. fx2_flag    dc.w 0
  434. fx3_flag    dc.w 0
  435. fx4_flag    dc.w 0
  436. fxtimer        dc.w 0
  437. gen        dc.w 0
  438. int_disable    dc.w 0
  439. altpf         dc.w 0
  440. ;  *******************************************************
  441.  
  442. ;  CALL THIS SUBROUTINE TO SET UP THE REQIURED FX
  443. ;  on entry it requires the fx number to be in "fx_number"(see above)
  444. ;  
  445.  
  446. set_up_fx
  447.     movem.l d5/a2,-(a7)    ;save used registers
  448.     tst.l fxc4
  449.     bne check3
  450. use4:    
  451.     move.w #%0000000000001000,d5
  452.     lea chann4reg,a2
  453.     jsr end_fx4p
  454.     move.l fx_number,fxr4
  455.     move.l fx_number,fxc4
  456.     move.l #0,fx_number
  457.     bra no_fx
  458. check3:    tst.l fxc3
  459.     bne check2
  460. use3:
  461.     move.w #%0000000000000100,d5
  462.     lea chann3reg,a2
  463.     jsr end_fx3p
  464.     move.l fx_number,fxr3
  465.     move.l fx_number,fxc3
  466.     move.l #0,fx_number
  467.     bra no_fx
  468. check2:    tst.l fxc2
  469.     bne check1
  470. use2:
  471.     move.w #%0000000000000010,d5
  472.     lea chann2reg,a2
  473.     jsr end_fx2p
  474.     move.l fx_number,fxr2
  475.     move.l fx_number,fxc2
  476.     move.l #0,fx_number
  477.     bra no_fx
  478. check1:    tst.l fxc1
  479.     bne use4
  480. use1:
  481.     move.w #%0000000000000001,d5
  482.     lea chann1reg,a2
  483.     jsr end_fx1p
  484.     move.l fx_number,fxr1
  485.     move.l fx_number,fxc1
  486.     move.l #0,fx_number
  487. no_fx
  488.     movem.l (a7)+,d5/a2    ;restore registers
  489.     rts
  490.  
  491. ;*************************************************
  492. ;          CALL HERE TO KILL ANY LOOPED FX...
  493. ;       after putting the number of the fx you want to kill
  494. ;            into fx_kill
  495.  
  496. kill_loopfx
  497.  
  498.     movem.l d5/a2,-(a7)    ;save used registers
  499.     move.l fx_kill,d5
  500.     cmp.l fxc1,d5
  501.     bne k2
  502.     move.w #%0000000000000001,d5
  503.     lea chann1reg,a2
  504.     jsr end_fx1p
  505.     bra error
  506. k2    cmp.l fxc2,d5
  507.     bne k3
  508.     move.w #%0000000000000010,d5
  509.     lea chann2reg,a2
  510.     jsr end_fx2p
  511.     bra error
  512. k3    cmp.l fxc3,d5
  513.     bne k4
  514.     move.w #%0000000000000100,d5
  515.     lea chann3reg,a2
  516.     jsr end_fx3p
  517.     bra error
  518. k4    cmp.l fxc4,d5
  519.     bne error
  520.     move.w #%0000000000001000,d5
  521.     lea chann2reg,a2
  522.     jsr end_fx4p
  523. error
  524.     clr.l fx_kill
  525.     movem.l (a7)+,d5/a2    ;restore registers
  526.     rts
  527. ;*************************************************
  528.  
  529.     ; CALL HERE TO KILL ANY SOUND for whatever reason
  530.  
  531. kill_chip:
  532.  
  533.     move.w #%0000000000001111,dmacon
  534.     move.l rest_data,chann1reg
  535.     move.l rest_data,chann2reg
  536.     move.l rest_data,chann3reg
  537.     move.l rest_data,chann4reg
  538.     move.w #16,chann1reg+4    
  539.     move.w #16,chann2reg+4    
  540.     move.w #16,chann3reg+4    
  541.     move.w #16,chann4reg+4    
  542.     move.w #0,chann1reg+8
  543.     move.w #0,chann2reg+8
  544.     move.w #0,chann3reg+8
  545.     move.w #0,chann4reg+8
  546.     move.w #1,chann1reg+6
  547.     move.w #1,chann2reg+6
  548.     move.w #1,chann3reg+6
  549.     move.w #1,chann4reg+6
  550.     move.l #0,fxr1
  551.     move.l #0,fxr2
  552.     move.l #0,fxr3
  553.     move.l #0,fxr4
  554.     move.w #0,fx1_flag
  555.     move.w #0,fx2_flag
  556.     move.w #0,fx3_flag
  557.     move.w #0,fx4_flag
  558.     move.l #0,fxc1
  559.     move.l #0,fxc2
  560.     move.l #0,fxc3
  561.     move.l #0,fxc4
  562.     rts
  563. ;****************************************
  564.  
  565. ;  CALL HERE TO SELECT WHICH PIECE OF MUSIC TO PLAY
  566. ;  AFTER PLACING NUMBER (1 to 3) IN "SONG_BUFFER"..see above
  567. ;  a call to this routine will initiliase the driver/kill any sound etc.      
  568. ;  make sure this routine has been called before running the interrupt
  569. ;  driven section....see below
  570.  
  571. select_new_song:
  572.  
  573.     move.w #1,int_disable
  574.     movem.l d0/d1/a0/a1,-(a7)    ;save used registers
  575.     move.w music_disable,gen
  576.     move.w #1,music_disable
  577.         jsr kill_chip           
  578.     clr.l d0
  579.         move.w #204,d0
  580.         lea gvars,a0
  581. clloop: clr.w (a0)+        
  582.         dbra  d0,clloop
  583.     tst.l song_buffer
  584.     beq no_song
  585.         move.l song_buffer,d1
  586.     add.l d1,d1
  587.      add.l d1,d1
  588.      add.l d1,d1
  589.      add.l d1,d1
  590.         LEA  SONG_TABLE-16,A1
  591.         add.l d1,a1      
  592.         MOVE.L (A1)+,WSONG1    
  593.         move.l (a1)+,wsong2    
  594.         move.l (a1)+,wsong3
  595.     move.l (a1),wsong4
  596.         MOVE.L #pstart,PATTR1
  597.         MOVE.L #pstart,PATTR2
  598.         MOVE.L #pstart,PATTR3
  599.     move.l #pstart,pattr4
  600.         move.l #sstart,songr1
  601.         MOVE.L #sstart,SONGR2
  602.         MOVE.L #sstart,SONGR3
  603.     move.l #sstart,songr4
  604. no_song
  605.     move.w #1,ch1vars
  606.     move.w #2,ch2vars
  607.     move.w #3,ch3vars
  608.     move.w #4,ch4vars
  609.     move.w #6,ch4fxvars
  610.     move.w #5,ch3fxvars
  611.     move.w #7,ch2fxvars
  612.     move.w #8,ch1fxvars
  613.     move.w gen,music_disable
  614.     clr.w int_disable
  615.     movem.l (a7)+,d0/d1/a0/a1    ;restore registers
  616.         rts
  617.  
  618. ;**************************************************
  619.  
  620. ;  CALL HERE ON A 50hz INTERRUPT DURING RUNTIME
  621. ;  TO PLAY FX AND TUNES
  622.  
  623. driver:  
  624.     tst.w int_disable
  625.     beq process_data
  626.     rts        
  627. process_data
  628.     movem.l d0-d6/a0-a6,-(a7)    ;save used registers
  629.  
  630.  
  631. ch1:
  632.     tst.w fx_disable
  633.     bne test_music1
  634.     tst.l fxr1
  635.     bne   ch1j1
  636.     tst.l fxc1
  637.     beq test_music1
  638.     bra ch1j3
  639. ch1j2    jsr run_dummy1
  640.     jsr run_fx1
  641.     bra ch2
  642. ch1j1
  643.     jsr set_up1
  644. ch1j3    tst.w music_disable    
  645.     beq ch1j2
  646.     jsr run_fx1
  647.     bra ch2
  648. test_music1
  649.     tst.w music_disable
  650.     bne ch2
  651.     jsr run_music1
  652.     bra ch2
  653.     ;***********************
  654.  
  655.     ; channel 1 subroutines
  656.  
  657. run_dummy1    
  658.      lea ch1vars,a0
  659.      lea dummy_reg,a2 
  660.      move.w #0,d5 
  661.      jsr sect1    
  662.     rts
  663.  
  664. set_up1    
  665.          move.l fxr1,d0
  666.          add d0,d0
  667.          add d0,d0
  668.          lea  fxjump_table-4,A1
  669.      add.l d0,a1
  670.          move.l (a1),currfx1
  671.       clr.l fxr1
  672.      clr.w fxintc1
  673.       rts
  674.   
  675.      
  676. run_fx1
  677.     lea ch1fxvars,a0
  678.        lea chann1reg,a2
  679.       move.w #%0000000000000001,d5 
  680.      move.w #%1000001000000001,d1 
  681.      jsr sect1
  682.     rts
  683.  
  684. run_music1
  685.     lea ch1vars,a0
  686.        lea chann1reg,a2
  687.       move.w #%0000000000000001,d5 
  688.       move.w #%1000001000000001,d1 
  689.       jsr sect1     
  690.     rts
  691.  
  692.     ;  **************************
  693.  
  694. ch2
  695.     tst.w fx_disable
  696.     bne test_music2
  697.     tst.l fxr2
  698.     bne   ch2j1
  699.     tst.l fxc2
  700.     beq test_music2
  701.     bra ch2j3
  702. ch2j2    jsr run_dummy2
  703.     jsr run_fx2
  704.     bra ch3
  705. ch2j1
  706.     jsr set_up2
  707. ch2j3    tst.w music_disable    
  708.     beq ch2j2
  709.     jsr run_fx2
  710.     bra ch3
  711.  
  712. test_music2
  713.     tst.w music_disable
  714.     bne ch3
  715.     jsr run_music2
  716.     bra ch3
  717.  
  718.     ;***********************
  719.  
  720.     ; channel 2 subroutines
  721.  
  722. run_dummy2    
  723.      lea ch2vars,a0
  724.      lea dummy_reg,a2 
  725.      move.w #0,d5 
  726.      jsr sect1    
  727.     rts
  728.  
  729. set_up2    
  730.          move.l fxr2,d0
  731.          add d0,d0
  732.          add d0,d0
  733.          lea  fxjump_table-4,A1
  734.      add.l d0,a1
  735.          move.l (a1),currfx2
  736.       clr.l fxr2
  737.      clr.w fxintc2
  738.       rts
  739.   
  740.      
  741. run_fx2
  742.     lea ch2fxvars,a0
  743.        lea chann2reg,a2
  744.       move.w #%0000000000000010,d5 
  745.      move.w #%1000001000000010,d1 
  746.      jsr sect1
  747.     rts
  748.  
  749. run_music2
  750.     lea ch2vars,a0
  751.        lea chann2reg,a2
  752.       move.w #%0000000000000010,d5 
  753.       move.w #%1000001000000010,d1 
  754.       jsr sect1     
  755.     rts
  756.  
  757.     ;  **************************
  758.  
  759. ch3:
  760.     tst.w fx_disable
  761.     bne test_music3
  762.     tst.l fxr3
  763.     bne   ch3j1
  764.     tst.l fxc3
  765.     beq test_music3
  766.     bra ch3j3
  767. ch3j2    jsr run_dummy3
  768.     jsr run_fx3
  769.     bra ch4
  770. ch3j1
  771.     jsr set_up3
  772. ch3j3    tst.w music_disable    
  773.     beq ch3j2
  774.     jsr run_fx3
  775.     bra ch4
  776.  
  777. test_music3
  778.     tst.w music_disable
  779.     bne ch4
  780.     jsr run_music3
  781.     bra ch4
  782.  
  783.     ;***********************
  784.  
  785.     ; channel 3 subroutines
  786.  
  787. run_dummy3    
  788.      lea ch3vars,a0
  789.      lea dummy_reg,a2 
  790.      move.w #0,d5 
  791.      jsr sect1    
  792.     rts
  793.  
  794. set_up3    
  795.          move.l fxr3,d0
  796.          add d0,d0
  797.          add d0,d0
  798.          lea  fxjump_table-4,A1
  799.      add.l d0,a1
  800.          move.l (a1),currfx3
  801.       clr.l fxr3
  802.      clr.w fxintc3
  803.       rts
  804.   
  805.      
  806. run_fx3
  807.     lea ch3fxvars,a0
  808.        lea chann3reg,a2
  809.       move.w #%0000000000000100,d5 
  810.      move.w #%1000001000000100,d1 
  811.      jsr sect1
  812.     rts
  813.  
  814. run_music3
  815.     lea ch3vars,a0
  816.        lea chann3reg,a2
  817.       move.w #%0000000000000100,d5 
  818.       move.w #%1000001000000100,d1 
  819.       jsr sect1     
  820.     rts
  821.  
  822.     ;  **************************
  823.  
  824.  
  825.  
  826. ch4:
  827.     tst.w fx_disable
  828.     bne test_music4
  829.     tst.l fxr4
  830.     bne   ch4j1
  831.     tst.l fxc4
  832.     beq test_music4
  833.     bra ch4j3
  834. ch4j2    jsr run_dummy4
  835.     jsr run_fx4
  836.     bra no4
  837. ch4j1
  838.     jsr set_up4
  839. ch4j3    tst.w music_disable    
  840.     beq ch4j2
  841.     jsr run_fx4
  842.     bra no4
  843.  
  844. test_music4
  845.     tst.w music_disable
  846.     bne no4
  847.     jsr run_music4
  848. no4    
  849.     movem.l (a7)+,d0-d6/a0-a6    ;restore registers
  850.     rts
  851.  
  852.     ;***********************
  853.  
  854.     ; channel 4 subroutines
  855.  
  856. run_dummy4    
  857.      lea ch4vars,a0
  858.      lea dummy_reg,a2 
  859.      move.w #0,d5 
  860.      jsr sect1    
  861.     rts
  862.  
  863. set_up4    
  864.          move.l fxr4,d0
  865.          add d0,d0
  866.          add d0,d0
  867.          lea  fxjump_table-4,A1
  868.      add.l d0,a1
  869.          move.l (a1),currfx4
  870.       clr.l fxr4
  871.      clr.w fxintc4
  872.       rts
  873.   
  874.      
  875. run_fx4
  876.     lea ch4fxvars,a0
  877.        lea chann4reg,a2
  878.       move.w #%0000000000001000,d5 
  879.      move.w #%1000001000001000,d1 
  880.      jsr sect1
  881.     rts
  882.  
  883. run_music4
  884.     lea ch4vars,a0
  885.        lea chann4reg,a2
  886.       move.w #%0000000000001000,d5 
  887.       move.w #%1000001000001000,d1 
  888.       jsr sect1     
  889.     rts
  890.     ;  **************************
  891.  
  892. sect1: tst.w 0(a0)
  893.     bne s1j1
  894.     rts
  895.  
  896. s1j1:    tst.w 2(a0)
  897.         beq sect3       
  898.         cmpi.w #1,2(a0)
  899.         beq sect4
  900.  
  901.         cmpi.w #3,4(a0)    
  902.         beq part2       
  903.     
  904. mode_switch:  subq.w #1,2(a0)     
  905.  
  906. check_effects: clr.w altpf      
  907.         move.w 6(a0),d2    
  908.         tst.w 8(a0)      
  909.         beq check_mod
  910.         tst.w 14(a0)      
  911.         beq cont_bend
  912.         subq.w #1,14(a0)
  913.         bra check_mod
  914. cont_bend:   addq.w #1,altpf    
  915.         move.w 10(a0),d3    
  916.         move.w 12(a0),d4    
  917.         cmpi.w #1,8(a0)
  918.         beq pbup
  919.     
  920.         sub.w d3,d2
  921.         cmp.w d2,d4
  922.         bcs check_mod
  923.         bra fbend
  924.  
  925. pbup:     add.w d3,d2
  926.         cmp.w d2,d4
  927.         bcc check_mod
  928. fbend:     move.w d4,d2
  929.         clr.w 8(a0)      
  930. check_mod:   tst.w 16(a0)
  931.         beq send_alt_pitch
  932.    
  933.  
  934.     tst.w  58(a0)
  935.     beq st_ok
  936.     subq.w #1,58(a0)
  937.     bra send_alt_pitch
  938. st_ok:
  939.         tst.w 50(a0)
  940.         beq cont_mod
  941.         subq #1,50(a0)
  942.         bra send_alt_pitch
  943. cont_mod:    move.w 52(a0),50(a0)  
  944.         addq #1,altpf
  945.         cmpi #3,16(a0)
  946.         bcc addmod
  947.     
  948.         move.w 56(a0),d3 
  949.         sub.w d3,d2
  950.         addq.w #1,16(a0)  
  951.         bra send_alt_pitch
  952. addmod:
  953.  
  954.         move.w 54(a0),d3 
  955.         add.w d3,d2
  956.         addq.w #1,16(a0)
  957.         cmpi.w #5,16(a0)
  958.        bne send_alt_pitch
  959.         move.w #1,16(a0)  
  960.  
  961. send_alt_pitch: tst.w altpf
  962.         beq send_env
  963.         move.w d2,6(a0)  
  964.         move.w d2,6(a2)  
  965.  
  966. send_env: 
  967.  
  968.     cmpi #6,(a0)
  969.     beq norm_env    
  970.     cmpi #5,(a0)
  971.     bne do_env_check
  972.  
  973.     tst.w fx4_flag
  974.     beq norm_env
  975.     bra low_vol
  976.  
  977. do_env_check:
  978.     move.w fx3_flag,d0
  979.     or.w fx4_flag,d0
  980.     cmpi.w  #0,d0
  981.     beq norm_env
  982. low_vol:    
  983.     move.l 18(a0),a1    
  984.         cmpi.w #255,(a1)
  985.         beq evj1
  986.     move.w (a1)+,d0
  987. evj2:    sub.w  62(a0),d0
  988.     bcc no_over
  989.     move.w 0,d0
  990. no_over:
  991.         move.w d0,8(a2) 
  992.     bra fint        
  993.  
  994. evj1:   subq.l #2,a1
  995.     move.w (a1)+,d0
  996.     bra evj2
  997.  
  998. norm_env:
  999.     move.l 18(a0),a1    
  1000.         cmpi.w #255,(a1)
  1001.         beq env_finished
  1002.     cmpi.w #1,66(a0)    
  1003.     bne    no_acc 
  1004.  
  1005.     clr.l d0
  1006.     move.w (a1)+,d0
  1007.     add.w 64(a0),d0    
  1008.     move.w d0,8(a2)    
  1009.     move.l a1,18(a0)
  1010.     rts        
  1011.  
  1012. no_acc:
  1013. resu:   move.w (a1)+,8(a2)   
  1014. fint:   move.l a1,18(a0)    
  1015.     rts
  1016.  
  1017. env_finished:
  1018.      subq.l #2,a1    
  1019.      bra resu
  1020.  
  1021.  
  1022. one_shot_note: move.w #3,4(a0)     
  1023.         move.l 38(a0),(a2)
  1024.         move.w 42(a0),4(a2)
  1025.         move.w d1,dmacon     
  1026.         bra send_env
  1027.  
  1028.  
  1029. part2:                         
  1030.         move.l 44(a0),(a2)
  1031.         move.w 48(a0),4(a2)
  1032.         subq.w #1,2(a0)      
  1033.         move.w #1,4(a0)
  1034.         bra check_effects
  1035.  
  1036. sect3:
  1037.     move.w 0,66(a0)    
  1038.  
  1039.     move.l 22(a0),a1  
  1040. control_ret: move.w (a1)+,d0  
  1041.     cmpi.w #100,d0   
  1042.     bls sect5   
  1043.   
  1044. acc_note:
  1045.     move.w d0,6(a0)  
  1046.     move.w d0,6(a2)  
  1047.     move.w (a1)+,2(a0) 
  1048.     subq.w #1,2(a0)  
  1049.     move.l a1,22(a0)  
  1050.     move.l 34(a0),18(a0) 
  1051.     move.w 60(a0),58(a0) 
  1052.  
  1053.  
  1054.     tst.w 16(a0)
  1055.     beq no_mod_res
  1056.     move.w #1,16(a0)
  1057. no_mod_res:
  1058.     cmpi.w #0,4(a0)
  1059.     beq do_loop
  1060.     bra one_shot_note    
  1061.  
  1062.  
  1063. do_loop:    move.w d1,dmacon   
  1064.         bra send_env
  1065.  
  1066. do_rest:
  1067.     move.w (a1)+,2(a0) 
  1068.     subq.w #1,2(a0)  
  1069.     move.l a1,22(a0)  
  1070.     move.l  #rest_env,18(a0)
  1071.  
  1072.         move.w #0,8(a2)
  1073.         bra send_env
  1074.    
  1075. sect4:
  1076.         cmpi.w #0,4(a0)
  1077.         beq noof
  1078.         move.w d5,dmacon   
  1079. noof:     subq.w #1,2(a0)
  1080.         bra check_effects
  1081.    
  1082. sect5:     move.l #jump_table,a3
  1083.         move.l (a3,d0),a4
  1084.         jmp (a4)
  1085.  
  1086. jump_table: 
  1087.     dc.l  in_line_data
  1088.         dc.l  nsound
  1089.         dc.l  patt_end
  1090.         dc.l  get_env
  1091.         dc.l  check_pbend
  1092.         dc.l  do_mod
  1093.         dc.l  bend_off
  1094.         dc.l  mod_off
  1095.         dc.l  do_rest
  1096.         dc.l  end_fx
  1097.         dc.l  end_fx
  1098.     dc.l  s_f_on
  1099.     dc.l  s_f_off
  1100.     dc.l  set_acc
  1101.     dc.l  rept
  1102.  
  1103. in_line_data:
  1104.  
  1105.         nop
  1106.         rts
  1107.  
  1108. rept:
  1109.     move.l (a1),a1
  1110.     bra control_ret
  1111.  
  1112. s_f_on: 
  1113.     bclr #1,filter
  1114.     bra control_ret
  1115. s_f_off:
  1116.     bset #1,filter
  1117.     bra control_ret
  1118.  
  1119. nsound:    move.l (a1)+,a3     
  1120.         cmpi.w #0,(a3)
  1121.         bne one_shot_sound
  1122.         move.w (a3)+,4(a0)    
  1123.         move.l (a3)+,(a2)     
  1124.         move.w (a3),4(a2)    
  1125.         jmp control_ret
  1126.  
  1127. one_shot_sound:
  1128.         move.w (a3)+,4(a0)
  1129.         move.l (a3)+,38(a0)   
  1130.         move.l (a3)+,42(a0)
  1131.         move.l (a3),46(a0)
  1132.         jmp control_ret
  1133.  
  1134. patt_end:
  1135.  
  1136.         move.l 26(a0),a1    
  1137.         cmpi.l #0,(a1)     
  1138.         beq song_control
  1139.         addq.l #4,26(a0)    
  1140.         move.l (a1),a1     
  1141.         jmp control_ret
  1142. get_env: 
  1143.        move.l (a1)+,a4 
  1144.     move.l (a4)+,62(a0)    
  1145.     
  1146.     move.l  a4,34(a0)    
  1147.     
  1148.         bra control_ret
  1149.  
  1150. check_pbend:
  1151.      move.l (a1)+,8(a0)
  1152.         move.l (a1)+,12(a0)
  1153.         bra control_ret
  1154.  
  1155. do_mod:    move.w #1,16(a0)  
  1156.         move.l (a1)+,50(a0)
  1157.         move.l (a1)+,54(a0)
  1158.         move.l (a1)+,58(a0)
  1159.         bra control_ret
  1160.  
  1161. bend_off:   clr.w 8(a0)
  1162.         bra control_ret
  1163.  
  1164. mod_off:    clr.w 16(a0)
  1165.         bra control_ret
  1166.  
  1167.  
  1168. end_fx:    
  1169.     cmpi.w #6,(a0)
  1170.     beq end_fx4p
  1171.     cmpi.w #5,(a0)
  1172.     beq end_fx3p
  1173.     cmpi.w #7,(a0)
  1174.     beq end_fx2p
  1175.  
  1176. end_fx1p:
  1177.         move.w d5,dmacon   
  1178.     move.w  #1,chann1reg+6
  1179.     move.w #0,8(a2)
  1180.     move.l #0,fxc1
  1181.     rts
  1182.  
  1183. end_fx2p:
  1184.     move.w d5,dmacon 
  1185.     move.w  #1,chann2reg+6
  1186.         move.w #0,8(a2) 
  1187.     move.l #0,fxc2
  1188.         rts
  1189.  
  1190.  
  1191. end_fx3p:
  1192.         move.w d5,dmacon   
  1193.     move.w  #1,chann3reg+6
  1194.     move.w #0,8(a2)
  1195.     move.l #0,fxc3
  1196.     rts
  1197.  
  1198. end_fx4p:
  1199.     move.w d5,dmacon 
  1200.     move.w  #1,chann4reg+6
  1201.         move.w #0,8(a2) 
  1202.     move.l #0,fxc4
  1203.         rts
  1204.  
  1205. set_acc: move.w #1,66(a0) 
  1206.     bra control_ret
  1207.  
  1208. song_control:
  1209.         addq.l #4,a1
  1210.         move.l 30(a0),26(a0)
  1211.         move.l 26(a0),a1
  1212.         addq.l #4,26(a0)
  1213.         move.l (a1),a1
  1214.         jmp control_ret
  1215.  
  1216.  
  1217.     ;"""""""""""""""""""""""""""""""""""""""""""""""""
  1218.  
  1219.     ;;; DATA
  1220.  
  1221. song_table:
  1222.  
  1223. ;************************************************************
  1224. gvars:
  1225. ch1vars     
  1226.     dc.w 0     
  1227.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1228. pattr1: dc.l 0    
  1229. songr1: dc.l 0    
  1230. wsong1: dc.l 0   
  1231.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1232.  
  1233. ch2vars     
  1234.     dc.w 0     
  1235.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1236. pattr2: dc.l 0    
  1237. songr2: dc.l 0    
  1238. wsong2: dc.l 0    
  1239.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1240.  
  1241. ch3vars 
  1242.     dc.w 0     
  1243.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1244. pattr3: dc.l 0    
  1245. songr3: dc.l 0    
  1246. wsong3: dc.l 0    
  1247.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1248.  
  1249. ch4vars 
  1250.     dc.w 0     
  1251.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1252. pattr4: dc.l 0    
  1253. songr4: dc.l 0    
  1254. wsong4: dc.l 0    
  1255.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1256.  
  1257.  
  1258. ch1fxvars 
  1259.     dc.w 0     
  1260. fxintc1:
  1261.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1262. currfx1:
  1263.     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    
  1264.  
  1265. ch2fxvars 
  1266.     dc.w 0     
  1267. fxintc2:
  1268.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1269. currfx2:
  1270.     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    
  1271.  
  1272.  
  1273. ch3fxvars
  1274.     dc.w 0     
  1275. fxintc3:
  1276.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1277. currfx3:
  1278.     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    
  1279.  
  1280. ch4fxvars 
  1281.     dc.w 0     
  1282. fxintc4:
  1283.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1284. currfx4:
  1285.     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    
  1286. ;************************************************************
  1287.  
  1288. dummy_reg dc.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1289.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1290.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1291.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1292. ;************************************************************
  1293.  
  1294. ;PISTOL.CON                  4026 rwed Future    00:24:00
  1295. ;HEARTWHI.CON                 180 rwed Future    00:20:00
  1296. ;HEARBLIP.CON                1748 rwed Future    00:17:00
  1297. ;XRAY.CON                    4908 rwed Future    00:06:00
  1298. ;BOOKSHUF.CON               11124 rwed Future    00:03:00
  1299. ;SCOPE1.CON                  3750 rwed Future    00:01:00
  1300. ;SCOPE.CON                   3750 rwed Future    00:01:00
  1301. ;DOC.CON                    12548 rwed Future    00:03:00
  1302. ;DOOROPEN.CON                8604 rwed Future    01:49:00
  1303. ;HOOPSWIS.CON                9520 rwed Future    01:30:00
  1304. ;PLANT.CON                   7334 rwed Future    01:28:00
  1305. ;EXERCIS2.CON                4864 rwed Future    01:21:00
  1306. ;EXERCIS1.CON                4864 rwed Future    01:21:00
  1307. ;FDRAWER.CON                 4700 rwed Future    01:15:00
  1308. ;BIN.CON                     9682 rwed Future    01:01:00
  1309. ;FANLOOP2.CON                2618 rwed Future    00:59:00
  1310. ;FANLOOP.CON                 3532 rwed Future    00:58:00
  1311. ;MONIZIP.CON                 5390 rwed Future    00:56:00
  1312. ;BOOKCLUN.CON                3708 rwed Future    00:53:00
  1313. ;PENRATTL.CON                6400 rwed Future    00:53:00
  1314. ;CLACK.CON                   2004 rwed Future    00:23:00
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320. ;       fx patterns here
  1321.  
  1322. fxjump_table:   
  1323.  
  1324.     dc.l    clackp
  1325.     dc.l    pen_rattlep
  1326.     dc.l    book_openp
  1327.     dc.l    mon_zipp
  1328.     dc.l    fanp
  1329.     dc.l    binp
  1330.     dc.l    leafp
  1331.     dc.l    calc_zipp
  1332.     dc.l    filingp
  1333.     dc.l    ex1p
  1334.     dc.l    ex2p
  1335.     dc.l    hoopsp
  1336.     dc.l    doorp
  1337.     dc.l    docp
  1338.     dc.l    micupp
  1339.     dc.l    micdownp
  1340.     dc.l    book_shelfp
  1341.     dc.l    xrayp
  1342.     dc.l    hmachine
  1343.  
  1344.     dc.l    iconplus
  1345.     dc.l    iconminus
  1346.     dc.l    auto_select
  1347.     dc.l    manual_select
  1348.  
  1349.     dc.l    pistolp
  1350.  
  1351.  
  1352. max_fx    dc.l    25
  1353.  
  1354. ;************************************
  1355.  
  1356.  
  1357. clackp:
  1358.                         dc.w  new_env
  1359.                         dc.l  clack_env
  1360.             dc.w    new_snd
  1361.             dc.l    clack
  1362.             dc.w    r16,8
  1363.                            dc.w    end_fxp
  1364.  
  1365. clack_env    dc.w    0,64,255
  1366.  
  1367. *********************************
  1368.  
  1369.  
  1370. pen_rattlep:
  1371.                         dc.w  new_env
  1372.                         dc.l  penr_env
  1373.             dc.w    new_snd
  1374.             dc.l    penrattl
  1375.             dc.w    r16,20
  1376.                            dc.w    end_fxp
  1377.  
  1378. penr_env    dc.w    0,64,255
  1379.  
  1380. *********************************
  1381.  
  1382.  
  1383. book_openp:
  1384.                         dc.w  new_env
  1385.                         dc.l  bo_env
  1386.             dc.w    new_snd
  1387.             dc.l    bookclun
  1388.             dc.w    r16,13
  1389.                            dc.w    end_fxp
  1390.  
  1391. bo_env        dc.w    0,64,255
  1392.  
  1393. *********************************
  1394.  
  1395.  
  1396. mon_zipp:
  1397.                         dc.w  new_env
  1398.                         dc.l  mz_env
  1399.             dc.w    new_snd
  1400.             dc.l    monizip
  1401.             dc.w    r16,18
  1402.                            dc.w    end_fxp
  1403.  
  1404. mz_env    dc.w    0,64,255
  1405.  
  1406. *********************************
  1407.  
  1408.  
  1409. fanp:
  1410.                         dc.w  new_env
  1411.                         dc.l  fan_env
  1412.             dc.w    new_snd
  1413.             dc.l    fanloop
  1414.             dc.w    r4,65000
  1415.                            dc.w    end_fxp
  1416.  
  1417. fan_env    dc.w    0,64,255
  1418.  
  1419. *********************************
  1420.  
  1421. binp:
  1422.                         dc.w  new_env
  1423.                         dc.l  bin_env
  1424.             dc.w    new_snd
  1425.             dc.l    bin
  1426.             dc.w    r16,32
  1427.                            dc.w    end_fxp
  1428.  
  1429. bin_env    dc.w    0,64,255
  1430.  
  1431. *********************************
  1432.  
  1433. leafp:
  1434.                         dc.w  new_env
  1435.                         dc.l  leaf_env
  1436.             dc.w    new_snd
  1437.             dc.l    plant
  1438.             dc.w    r12,35
  1439.                            dc.w    end_fxp
  1440.  
  1441. leaf_env    dc.w    0,64,255
  1442.  
  1443. *********************************
  1444.  
  1445.  
  1446.  
  1447.  
  1448. calc_zipp:
  1449.                         dc.w  new_env
  1450.                         dc.l  mz_env
  1451.             dc.w    new_snd
  1452.             dc.l    monizip
  1453.             dc.w    r20,10
  1454.                            dc.w    end_fxp
  1455.  
  1456. cz_env    dc.w    0,64,255
  1457.  
  1458. *********************************
  1459.  
  1460. filingp:
  1461.                         dc.w  new_env
  1462.                         dc.l  fc_env
  1463.             dc.w    new_snd
  1464.             dc.l    fdrawer
  1465.             dc.w    r8,32
  1466.                            dc.w    end_fxp
  1467.  
  1468. fc_env    dc.w    0,64,255
  1469.  
  1470.  
  1471. *********************************
  1472.  
  1473. ex1p:
  1474.                         dc.w  new_env
  1475.                         dc.l  ex1_env
  1476.             dc.w    new_snd
  1477.             dc.l    exercis1
  1478.             dc.w    r8,32
  1479.                            dc.w    end_fxp
  1480.  
  1481. ex1_env    dc.w    0,64,255
  1482.  
  1483.  
  1484. *********************************
  1485.  
  1486. ex2p:
  1487.                         dc.w  new_env
  1488.                         dc.l  ex2_env
  1489.             dc.w    new_snd
  1490.             dc.l    exercis2
  1491.             dc.w    r8,32
  1492.                            dc.w    end_fxp
  1493.  
  1494. ex2_env    dc.w    0,64,255
  1495.  
  1496.  
  1497. *********************************
  1498.  
  1499.  
  1500. hoopsp:
  1501.                         dc.w  new_env
  1502.                         dc.l  h_env
  1503.             dc.w    new_snd
  1504.             dc.l    hoopswis
  1505.             dc.w    r8,65
  1506.                            dc.w    end_fxp
  1507.  
  1508. h_env    dc.w    0,64,255
  1509.  
  1510.  
  1511. *********************************
  1512.  
  1513.  
  1514. doorp:
  1515.                         dc.w  new_env
  1516.                         dc.l  do_env
  1517.             dc.w    new_snd
  1518.             dc.l    dooropen
  1519.             dc.w    r8,55
  1520.                            dc.w    end_fxp
  1521.  
  1522. do_env    dc.w    0,64,255
  1523.  
  1524.  
  1525. *********************************
  1526.  
  1527.  
  1528. docp:
  1529.                         dc.w  new_env
  1530.                         dc.l  doc_env
  1531.             dc.w    new_snd
  1532.             dc.l    doc
  1533.             dc.w    r10,62
  1534.             dc.w pbend,down,1,60000,1
  1535.             dc.w    r10,50
  1536.             dc.w    pboff
  1537.                            dc.w    end_fxp
  1538.  
  1539. doc_env    dc.w    0,64,255
  1540.  
  1541.  
  1542. *********************************
  1543.  
  1544. micupp:
  1545.                         dc.w  new_env
  1546.                         dc.l  m_env
  1547.             dc.w    new_snd
  1548.             dc.l    scope
  1549.             dc.w    r16,15
  1550.                            dc.w    end_fxp
  1551.  
  1552. m_env    dc.w    0,44,255
  1553.  
  1554.  
  1555. *********************************
  1556.  
  1557. micdownp:
  1558.                         dc.w  new_env
  1559.                         dc.l  m_env
  1560.             dc.w    new_snd
  1561.             dc.l    scope1
  1562.             dc.w    r16,15
  1563.                            dc.w    end_fxp
  1564.  
  1565.  
  1566.  
  1567. *********************************
  1568.  
  1569. book_shelfp:
  1570.                         dc.w  new_env
  1571.                         dc.l  bs_env
  1572.             dc.w    new_snd
  1573.             dc.l    bookshuf
  1574.             dc.w    r16,38
  1575.                            dc.w    end_fxp
  1576.  
  1577. bs_env    dc.w    0,64,255
  1578.  
  1579.  
  1580. *********************************
  1581.  
  1582. xrayp:
  1583.                         dc.w  new_env
  1584.                         dc.l  xr_env
  1585.             dc.w    new_snd
  1586.             dc.l    xray
  1587.             dc.w    r16,18
  1588.                            dc.w    end_fxp
  1589.  
  1590. xr_env    dc.w    0,64,255
  1591.  
  1592.  
  1593. *********************************
  1594.  
  1595.  
  1596. hmachine:
  1597. hrpt                    dc.w  new_env
  1598.                         dc.l  whirr_env
  1599.             dc.w    new_snd
  1600.             dc.l    heartwhi
  1601.             dc.w    r8,60
  1602.  
  1603.                         dc.w  new_env
  1604.                         dc.l  blip_env
  1605.             dc.w    new_snd
  1606.             dc.l    hearblip
  1607.             dc.w    r16,5
  1608.             dc.w    repeat
  1609.             dc.l    hrpt
  1610.  
  1611.  
  1612.                            dc.w    end_fxp
  1613.  
  1614.  
  1615. blip_env    dc.w    0,64,255
  1616. whirr_env    dc.w    0,8,255
  1617.  
  1618.  
  1619. *********************************
  1620.  
  1621. iconplus:
  1622.                         dc.w  new_env
  1623.                         dc.l  ip_env
  1624.             dc.w    new_snd
  1625.             dc.l    sined
  1626.             dc.w    r20,50
  1627.                            dc.w    end_fxp
  1628.  
  1629. ip_env    dc.w    0,64,255
  1630.  
  1631.  
  1632. *********************************
  1633.  
  1634. iconminus:
  1635.                         dc.w  new_env
  1636.                         dc.l  ip_env
  1637.             dc.w    new_snd
  1638.             dc.l    sined
  1639.             dc.w    r12,50
  1640.                            dc.w    end_fxp
  1641.  
  1642.  
  1643.  
  1644. *********************************
  1645.  
  1646. manual_select:
  1647.                         dc.w  new_env
  1648.                         dc.l  ip_env
  1649.             dc.w    new_snd
  1650.             dc.l    sined
  1651.             dc.w    r20,2,r8,2,r20,2,r8,2
  1652.             dc.w    r20,2,r8,2,r20,2,r8,2
  1653.             dc.w    r20,2,r8,2,r20,2,r8,2
  1654.             dc.w    r20,2,r8,2,r20,2,r8,2
  1655.             dc.w    r20,2,r8,2,r20,2,r8,2
  1656.             dc.w    r20,2,r8,2,r20,2,r8,2
  1657.                            dc.w    end_fxp
  1658.  
  1659.  
  1660. *********************************
  1661.  
  1662.  
  1663. auto_select:
  1664.                         dc.w  new_env
  1665.                         dc.l  ip_env
  1666.             dc.w    new_snd
  1667.             dc.l    sined
  1668.             dc.w pbend,down,20,60000,1
  1669.             dc.w    c01,50
  1670.             dc.w     pboff
  1671.                       dc.w    end_fxp
  1672.  
  1673.  
  1674. *********************************
  1675.  
  1676.  
  1677. pistolp:
  1678.                         dc.w  new_env
  1679.                         dc.l  pist_env
  1680.             dc.w    new_snd
  1681.             dc.l    pistol
  1682.             dc.w    r12,20
  1683.                            dc.w    end_fxp
  1684.  
  1685. pist_env    dc.w    0,64,255
  1686.  
  1687. *********************************
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693. sstart: dc.l 0,end_song
  1694.  
  1695. pstart: dc.w end_patt
  1696.  
  1697.  
  1698. ;----------------------------------
  1699.  
  1700.  
  1701.  
  1702. pr: 
  1703.       dc.w rest,cr*4
  1704.       dc.w end_patt
  1705.  
  1706. prf      dc.w rest,cr*500
  1707.       dc.w end_patt
  1708.  
  1709.  
  1710.  
  1711.  
  1712. ;**************************************
  1713.  
  1714.  
  1715. PISTOL
  1716.  
  1717.         dc.w 1  
  1718.              dc.l PISTOLd
  1719.              dc.w  4026/2
  1720.              dc.l rest_data
  1721.              dc.w 16/2 
  1722.  
  1723. HEARTWHI
  1724.         dc.w 1  
  1725.              dc.l HEARTWHId
  1726.              dc.w  180/2 
  1727.              dc.l HEARTWHId
  1728.              dc.w  180/2 
  1729.  
  1730.  
  1731. HEARBLIP
  1732.         dc.w 1  
  1733.              dc.l HEARBLIPd
  1734.              dc.w  1748/2
  1735.              dc.l rest_data
  1736.              dc.w 16/2 
  1737.  
  1738. XRAY
  1739.         dc.w 1  
  1740.              dc.l XRAYd
  1741.              dc.w  4908/2 
  1742.              dc.l rest_data
  1743.              dc.w 16/2 
  1744.  
  1745.  
  1746. BOOKSHUF
  1747.         dc.w 1  
  1748.              dc.l BOOKSHUFd
  1749.              dc.w  11124/2 
  1750.              dc.l rest_data
  1751.              dc.w 16/2 
  1752.  
  1753. SCOPE1
  1754.         dc.w 1  
  1755.              dc.l SCOPE1d
  1756.              dc.w  3750/2 
  1757.              dc.l rest_data
  1758.              dc.w 16/2 
  1759.  
  1760. SCOPE
  1761.         dc.w 1  
  1762.              dc.l SCOPEd
  1763.              dc.w  3750/2 
  1764.              dc.l rest_data
  1765.              dc.w 16/2 
  1766.  
  1767. DOC
  1768.         dc.w 1  
  1769.              dc.l DOCd
  1770.              dc.w  12548/2 
  1771.              dc.l rest_data
  1772.              dc.w 16/2 
  1773.  
  1774. DOOROPEN
  1775.         dc.w 1  
  1776.              dc.l DOOROPENd
  1777.              dc.w  8604/2 
  1778.              dc.l rest_data
  1779.              dc.w 16/2 
  1780.  
  1781.  
  1782. HOOPSWIS
  1783.         dc.w 1  
  1784.              dc.l HOOPSWISd
  1785.              dc.w  9520/2 
  1786.              dc.l rest_data
  1787.              dc.w 16/2 
  1788.  
  1789.  
  1790. PLANT
  1791.         dc.w 1  
  1792.              dc.l PLANTd
  1793.              dc.w  7334/2 
  1794.              dc.l rest_data
  1795.              dc.w 16/2 
  1796.  
  1797. EXERCIS2
  1798.         dc.w 1  
  1799.              dc.l EXERCIS2d
  1800.              dc.w  4864/2 
  1801.              dc.l rest_data
  1802.              dc.w 16/2 
  1803.  
  1804. EXERCIS1
  1805.         dc.w 1  
  1806.              dc.l EXERCIS1d
  1807.              dc.w  4864/2 
  1808.              dc.l rest_data
  1809.              dc.w 16/2 
  1810.  
  1811. FDRAWER
  1812.         dc.w 1  
  1813.              dc.l FDRAWERd
  1814.              dc.w  4700/2 
  1815.              dc.l rest_data
  1816.              dc.w 16/2 
  1817.  
  1818.  
  1819. BIN
  1820.         dc.w 1  
  1821.              dc.l BINd
  1822.              dc.w  9682/2 
  1823.              dc.l rest_data
  1824.              dc.w 16/2 
  1825.  
  1826. FANLOOP
  1827.         dc.w 1  
  1828.              dc.l FANLOOPd
  1829.              dc.w  2618/2 
  1830.              dc.l FANLOOPd
  1831.              dc.w  2618/2 
  1832.  
  1833. MONIZIP
  1834.         dc.w 1  
  1835.              dc.l MONIZIPd
  1836.              dc.w 3532/2 
  1837.              dc.l rest_data
  1838.              dc.w 16/2 
  1839.  
  1840.  
  1841. BOOKCLUN
  1842.         dc.w 1  
  1843.              dc.l BOOKCLUNd
  1844.              dc.w   3708/2 
  1845.              dc.l rest_data
  1846.              dc.w 16/2 
  1847.  
  1848. PENRATTL
  1849.         dc.w 1  
  1850.              dc.l PENRATTLd
  1851.              dc.w   6400/2 
  1852.              dc.l rest_data
  1853.              dc.w 16/2 
  1854.  
  1855. CLACK
  1856.         dc.w 1  
  1857.              dc.l CLACKd
  1858.              dc.w  2004/2 
  1859.              dc.l rest_data
  1860.              dc.w 16/2 
  1861.  
  1862. sined         
  1863.         dc.w 1  
  1864.              dc.l sine_datad
  1865.              dc.w 32/2 
  1866.              dc.l sine_datad
  1867.              dc.w 32/2 
  1868.  
  1869.  
  1870.  
  1871. rest_data
  1872.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1873.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1874.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1875.              dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1876.  
  1877.  
  1878.  
  1879. sine_datad:
  1880.              dc.w 127,100,50,25,0,-25,-50,-100,-127
  1881.              dc.w -127,-100,-50,-25,0,25,50,100,127
  1882.  
  1883.  
  1884.  
  1885.  
  1886. rest_env:    dc.w     0,0,0,0,0,0,0,0,255
  1887.  
  1888. ;**************************************************
  1889.  
  1890. PISTOLd                incbin ram:PISTOL.CON
  1891. HEARTWHId            incbin ram:HEARTWHI.CON
  1892. HEARBLIPd            incbin ram:HEARBLIP.CON
  1893. XRAYd                incbin ram:XRAY.CON
  1894. BOOKSHUFd            incbin ram:BOOKSHUF.CON
  1895. SCOPE1d                incbin ram:SCOPE1.CON
  1896. SCOPEd                incbin ram:SCOPE.CON
  1897. DOCd                incbin ram:DOC.CON
  1898. DOOROPENd            incbin ram:DOOROPEN.CON
  1899. HOOPSWISd            incbin ram:HOOPSWIS.CON
  1900. PLANTd                incbin ram:HOOPSWIS.CON
  1901. EXERCIS2d            incbin ram:EXERCIS2.CON
  1902. EXERCIS1d            incbin ram:EXERCIS1.CON
  1903. FDRAWERd            incbin ram:FDRAWER.CON
  1904. BINd                incbin ram:BIN.CON
  1905. FANLOOP2d            incbin ram:FANLOOP2.CON
  1906. FANLOOPd            incbin ram:FANLOOP.CON
  1907. MONIZIPd            incbin ram:MONIZIP.CON
  1908. BOOKCLUNd            incbin ram:BOOKCLUN.CON
  1909. PENRATTLd            incbin ram:PENRATTL.CON
  1910. CLACKd                incbin ram:CLACK.CON
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.           END
  1919.  
  1920.  
  1921.     ;;    dc.w modon,1,1,8,8,6,6
  1922.     ;dc.w pbend,down,20,60000,1
  1923.     ;dc.w    c01,cr*32
  1924.  
  1925.  
  1926. myfile                     empty rwed Today     22:54:09
  1927. PISTOL.CON                  4026 rwed Future    00:24:00
  1928. HEARTWHI.CON                 180 rwed Future    00:20:00
  1929. HEARBLIP.CON                1748 rwed Future    00:17:00
  1930. XRAY.CON                    4908 rwed Future    00:06:00
  1931. BOOKSHUF.CON               11124 rwed Future    00:03:00
  1932. SCOPE1.CON                  3750 rwed Future    00:01:00
  1933. SCOPE.CON                   3750 rwed Future    00:01:00
  1934. DOC.CON                    12548 rwed Future    00:03:00
  1935. DOOROPEN.CON                8604 rwed Future    01:49:00
  1936. HOOPSWIS.CON                9520 rwed Future    01:30:00
  1937. PLANT.CON                   7334 rwed Future    01:28:00
  1938. EXERCIS2.CON                4864 rwed Future    01:21:00
  1939. EXERCIS1.CON                4864 rwed Future    01:21:00
  1940. FDRAWER.CON                 4700 rwed Future    01:15:00
  1941. BIN.CON                     9682 rwed Future    01:01:00
  1942. FANLOOP2.CON                2618 rwed Future    00:59:00
  1943. FANLOOP.CON                 3532 rwed Future    00:58:00
  1944. MONIZIP.CON                 5390 rwed Future    00:56:00
  1945. BOOKCLUN.CON                3708 rwed Future    00:53:00
  1946. PENRATTL.CON                6400 rwed Future    00:53:00
  1947. CLACK.CON                   2004 rwed Future    00:23:00
  1948. 22 files - 258 blocks used
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.