home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: SSF2 PC Disk Speech Samples / Lowe_SSF2PCDiskSpeechSamples.img / TESTDRIV.S < prev    next >
Encoding:
Text File  |  1995-12-12  |  30.1 KB  |  1,671 lines

  1.  
  2.     ;Richard,
  3.     ;    The bin files are NAME.BIN  for music
  4.     ;        and NAME_S.BIN for speech
  5.  
  6.     ; I think the driver is commented where needed ????
  7.  
  8.  
  9. ;**********************************************************************
  10.  
  11.  
  12.     ;        DRIVER REMAINS COPYRIGHT D.LOWE 
  13.  
  14.     ;       DRIVER TO RUN RELOCATABLE DATA BLKS
  15.     ;
  16.     ;  .....fade only affects music in this version
  17.  
  18.     ;    devpac source code file... no macros.
  19.  
  20.     ;    It must be assembled with SYMBOLS CASE independent.
  21.  
  22.     ;       dont hesitate to ring with any problems
  23.  
  24.  
  25.  
  26.     ;        DAVE LOWE.....0723  870648
  27.  
  28.  
  29.  
  30. ;        **************************
  31.  
  32.     section issA,code_c    ;must be in low memory for dma access
  33.                 ;DEVPAC PSEUDO OP ..CAN BE DELETED
  34.  
  35.  
  36. ;*****************************************
  37.  
  38.  
  39.                 ; zero to step tunes on mouse button
  40.                 ; can be deleted..not essential
  41.  
  42.         ;  ALL EQUs
  43.  
  44.  
  45.  
  46.  
  47. v equ 0
  48. no_loop equ 0
  49. loop equ 0
  50. chann1reg   equ $dff0a0    
  51. chann2reg   equ $dff0b0
  52. chann3reg   equ $dff0c0
  53. chann4reg   equ $dff0d0
  54. dmacon     equ $dff096
  55. int_bf_int   equ   $dff01e
  56. int_bf_w    equ   $dff09a
  57. vhposr     equ   $dff006
  58. in_line    equ   0
  59. new_snd    equ   4
  60. end_song     equ   1
  61. end_patt    equ   8
  62. new_env    equ   12
  63. pbend     equ   16
  64. hi: equ 223
  65. lo:  equ 446
  66. r22    equ 134
  67. r20    equ 179        ;correctum
  68. r19    equ 150
  69. r18    equ 178
  70. r17    equ 200
  71. r16:    equ 227        ;correctum
  72. r15:    equ 249
  73. r14    equ 280
  74. r13:    equ 305
  75. r12:    equ 333
  76. r11:    equ 361
  77. r10:    equ 389
  78. r9:    equ 419
  79. r8:    equ 446
  80. r7:    equ 446+112
  81. r6:    equ 446+223
  82. r5:    equ 446+223+112
  83. r4:    equ 446*2
  84. r3:    equ 446*3
  85. r2:    equ 446*4
  86. r1:    equ 446*8
  87. filter: equ $bfe001
  88. filter_on equ 44
  89. filter_off equ 48
  90. modon     equ   20
  91. pboff     equ   24
  92. modoff     equ   28
  93. rest     equ 32
  94. end_fxp  equ 36
  95. end_fx3  equ 36
  96. end_fx4  equ 40
  97. acc    equ 52
  98. repeat    equ 56
  99. down      equ   1
  100. up       equ   2
  101. fx    equ 0
  102. ;------------------------------------
  103.  
  104.         ;some test equ settings
  105.  
  106. which_bank    equ    0    ;test identification for fx banks
  107. demo    equ 1        ;set to 0 to make returnable demo        
  108. select_tunes    equ 1   ; set to 0 for selecting music on mouse button
  109.  
  110. ;**************************************************************************
  111. ;**************************************************************************
  112.  
  113.  
  114.  
  115.  ;    THIS IS THE CONTROL SECTION FOR TESTING AS A STAND ALONE PRG. 
  116.  
  117.     ;       AND CAN BE DELETED WHEN NOT REQUIRED
  118.  
  119.     ; it shows the relevent calls for playing music fx/speech etc
  120.  
  121.  
  122.  
  123.  
  124.  
  125. ;                       OVERVIEW
  126.  
  127. ;  the driver can address 5 seperate data blks,these are
  128.  
  129. ;    music_data_blk        the current tune
  130. ;    fx_data_blk        the general fx data
  131. ;    speech_bank1        one bank of character speech
  132. ;    speech_bank2        one bank of character speech
  133. ;    jingle_bank        the jingles
  134.  
  135. ; this allows it to play one tune (either a main tune or a jingle)
  136. ; and up to 4 fx (speech or general fx) from any of the banks simultaneously.
  137. ; to do this it overwrites the music channels as and when it needs to.
  138.  
  139. ; to start a tune the tune number must be placed in SONG_BUFFER (see below)
  140. ; and the routine  SELECT_NEW_SONG is then called,this sets the
  141. ; pointers up to play the tune starting on the next 50th
  142. ; only music OR jingles can be selected..not both 
  143. ; and if switching between them the address set up routines must be
  144. ; called to reset the base address before SELECT_NEW_SONG IS CALLED
  145.  
  146. ;   NB.... if a music or jingle file is not being loaded ie. if
  147. ;   using only speech and fx; then the MUSIC_DISABLE (see below)
  148. ;   variable must be set to 1 
  149.  
  150.  
  151. ;        ----------------------------
  152.  
  153. ;to start an fx/speech the fx number must be placed in FX_NUMBER (see below)
  154. ;the bank number must be placed in BANK_NUMBER (see below) and the routine
  155. ; SET_UP_FX must be called.
  156.             
  157. ;        The bank numbers are  0 = general fx
  158. ;                      1 = speech bank 1
  159. ;                      2 = speech bank 2
  160.  
  161. ;  this will start the selected fx on the next 50th
  162. ;  up to 4 may be set by the main programme at once
  163. ;  if more than four are set running at once then the subsequent ones will
  164. ;  overwrite the first one.
  165.  
  166. ;    ------------------------------------
  167.  
  168.     ;;; do this call at the start to set up pointers etc
  169.  
  170.  
  171.         jsr  initiliase_driver
  172.  
  173.  
  174. ;    ------------------------------------
  175.  
  176.  
  177.     ;the calls demonstrated below set up the relevent
  178.     ;base address of each bank or data blk
  179.  
  180.  
  181.     ; the binary data blks can be anywhere in low memory
  182.     ; but the address must be passed to the driver as below.
  183.     ; this must be done before attempting to select tunes or fx
  184.  
  185.  
  186.  
  187.     ; ....these test addresses are labels at the end of this file
  188.  
  189.  
  190.     lea music_data_blk,a0        ;test address for music files
  191.     jsr set_up_music_address
  192.  
  193.  
  194.     ;lea jingle_data_blk,a0        ;test address for jingle files
  195.     ;jsr set_up_jingle_address    ;ONLY ONE of the music banks
  196.                     ;music or jingles can be selected
  197.                     ;at once
  198.  
  199.  
  200.     lea fx_data_blk,a0        ;test address for general fx
  201.     jsr set_up_fx_address
  202.  
  203.     lea speech_bank1,a0        ;test address for speech bank1
  204.     jsr set_up_speech1_address
  205.  
  206.     lea speech_bank2,a0        ;test address for speech bank2
  207.     jsr set_up_speech2_address
  208.  
  209. ;----------------------------------------------------
  210.  
  211.      ;; These commands will select tune 1 (if jingles) or the tune in the
  212.      ;;        music_data_blk  ready for playing
  213.  
  214.     move.l    #1,song_buffer
  215.     jsr select_new_song    ;set up tune..numnber 1
  216.  
  217. ;-----------------------------------------------------
  218.  
  219.     ; This section pretends to be an interrupt
  220.     ; and calls the driver every 50th
  221.     ; whilst triggering fx/tunes etc with the left mouse button
  222.  
  223.  
  224. testloop:
  225.     jsr delay    ;wait for scan line  at 50hz on pal
  226.     tst.w endf
  227.     beq noend
  228.     jsr kill_chip   ;stop the sound before finishing
  229.     rts        ;finish
  230.  
  231. endf    dc.w 0
  232.  
  233. noend
  234.     jsr driver    ;run driver at 50 hz for testing
  235.  
  236.         bra testloop    ;loop back
  237.  
  238. finish    
  239.     move.w #1,endf
  240.     rts
  241.  
  242. ;------------------------------------------------------------
  243.  
  244.         ;these are all routines used during test/stand alone
  245.         ;assembly
  246.         ;and trigger fx/tunes/speech etc. 
  247.  
  248.  
  249. delay:
  250.     tst.w fxtimer
  251.     bne no_test
  252.     clr.l d0
  253.     move.b $bfe001,d0
  254.     btst #6,d0
  255.     bne no_test1
  256.     move.w #10,fxtimer
  257.     bra testfx4
  258. no_test
  259.     subq #1,fxtimer
  260. no_test1
  261.     clr.l d0
  262.         move.w vhposr,d0
  263.         andi.w #%1111111100000000,d0
  264.         cmpi.w #%1111111100000000,d0
  265.  
  266.     bne no_test1
  267.     rts
  268.  
  269. testfx4:  
  270.  
  271.     clr.l d0
  272.     move.b $bfe001,d0
  273.     btst #6,d0
  274.     beq testfx4
  275.  
  276.     move.l song_buffer,d0
  277.     addq.l #1,d0
  278.     cmp.l    max_songs,d0
  279.     bne nores
  280.     move.l #1,d0
  281. nores    move.l d0,song_buffer
  282.  
  283.  
  284. ;-----------------------------
  285.  
  286.     ifeq    demo
  287.     bra finish            ;end on mouse button
  288.     endc
  289.  
  290. ;----------------------------
  291.  
  292.     ifeq    select_tunes
  293.  
  294.     jsr    select_new_song        ;new song on mouse button
  295.  
  296.     endc
  297. ;--------------------------
  298.  
  299.                     ;run fx on mouse button
  300.     move.l fx_last,d0
  301.  
  302.     move.l d0,fx_kill
  303.  
  304.     ;jsr kill_loopfx        ;use only one fx at a time
  305.                     ;for testing
  306.  
  307. no_k
  308.         move.l fx_no,fx_number
  309.     move.l fx_no,fx_last
  310.     addq.l #1,fx_no
  311.     move.l    max_fx,d0
  312.         cmp.l fx_no,d0
  313.     bne noreset
  314.     move.l #1,fx_no    
  315. noreset: 
  316.  
  317.     move.w #which_bank,fx_bank    ;select which fx bank to pick from
  318.  
  319.     ifne    select_tunes
  320.  
  321.     jsr set_up_fx
  322.  
  323.     endc
  324.  
  325.     bra no_test    
  326.  
  327. fxtc:          dc.w 10
  328. fx_no:         dc.l  1
  329. fx_last        dc.l  0
  330. max_songs    dc.l  4
  331. max_fx        dc.l  19
  332.  
  333.  
  334. ;        END OF CONTROL (DELETABLE) SECTION
  335.  
  336. ;********************************************************************
  337. ;********************************************************************
  338.  
  339. ;    MAIN VARIABLES TO BE ACCESSED BY PROGRAMMER DURING RUNTIME
  340.  
  341.  
  342. fx_number:     dc.l 0 ;     number of fx/speech required here
  343.  
  344. fx_bank        dc.w 0 ;     fx bank here. 0 to 3 for genfx/speech1/speech2
  345.  
  346. fx_kill        dc.l 0 ;     number of fx to kill/used mainly
  347.                ;     to kill looping fx
  348.  
  349.  
  350. song_buffer     dc.l 0 ;     number of piece of music/jingle required here
  351.                ;     all ingame tunes are number 1
  352.  
  353.  
  354.  
  355. music_disable:  dc.w 0 ;     1 = disable music..must be disabled if not
  356.                ;     loading or playing music/jingles
  357.  
  358. fx_disable:     dc.w 0 ;     1 = disable fx
  359.  
  360.  
  361. fade:        dc.w 0 ;      0 to 64..0 = full volume/64 = off
  362.                ;      this can only be used to fade music
  363.                ;      fairly rapidly as it does not scale the
  364.                ;      current envelope values due to the processor
  365.                ;      time involved...do not use to hold the music
  366.                ;      at a set level 
  367.  
  368.  
  369. ;    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  370.  
  371. ;  THESE VARIABLES ARE USED INTERNALLY BY THE DRIVER
  372. fxr1         dc.l 0  
  373. fxr2         dc.l 0  
  374. fxr3         dc.l 0  
  375. fxr4         dc.l 0  
  376. fxc1        dc.l 0
  377. fxc2          dc.l 0
  378. fxc3        dc.l 0
  379. fxc4          dc.l 0
  380. fx1_flag    dc.w 0
  381. fx2_flag    dc.w 0
  382. fx3_flag    dc.w 0
  383. fx4_flag    dc.w 0
  384. fxtimer        dc.w 0
  385. gen        dc.w 0
  386. int_disable    dc.w 0
  387. altpf         dc.w 0
  388. kill_flag    dc.w 0
  389. mode        dc.w 0
  390.  
  391. music_base_address    dc.l 0
  392. fx_base_address        dc.l 0
  393. bank1_base_address    dc.l 0
  394. bank2_base_address    dc.l 0
  395. jingles_base_address    dc.l 0
  396. curr_base_address    dc.l 0
  397. speech_bank1_address    dc.l 0
  398. speech_bank2_address    dc.l 0
  399. ch1fx_ident        dc.w 0
  400. ch2fx_ident        dc.w 0
  401. ch3fx_ident        dc.w 0
  402. ch4fx_ident        dc.w 0
  403. globalfx_ident        dc.w 0
  404. ch1_curr_base        dc.l 0
  405. ch2_curr_base        dc.l 0
  406. ch3_curr_base        dc.l 0
  407. ch4_curr_base        dc.l 0
  408.  
  409.  
  410.  
  411. tempo_counter    dc.l 0
  412. song_tempo    dc.l 0
  413. play_flag    dc.w    0
  414.  
  415.  
  416. ;*********************************
  417. set_up_music_address:
  418.  
  419.     move.w #1,int_disable
  420.     move.l a0,music_base_address
  421.     clr.w int_disable
  422.     rts
  423.  
  424. set_up_fx_address:
  425.     move.w #1,int_disable
  426.     move.l a0,fx_base_address
  427.     clr.w int_disable
  428.     rts
  429.  
  430. set_up_speech1_address:
  431.     move.w #1,int_disable
  432.     move.l a0,speech_bank1_address
  433.     clr.w int_disable
  434.     rts
  435.  
  436. set_up_speech2_address:
  437.     move.w #1,int_disable
  438.     move.l a0,speech_bank2_address
  439.     clr.w int_disable
  440.     rts
  441.  
  442. set_up_jingle_address:
  443.     move.w #1,int_disable
  444.     move.l a0,music_base_address
  445.     clr.w int_disable
  446.     rts
  447.  
  448.  
  449. ;  *******************************************************
  450.  
  451. ;  CALL THIS SUBROUTINE TO SET UP THE REQIURED FX
  452. ;on entry it requires the fx number to be in "fx_number"(long word see above)
  453. ;and the bank number to be in "fx_bank" (word..see above)
  454.  
  455. set_up_fx
  456.  
  457.     move.w #1,int_disable
  458.     movem.l d5/a2,-(a7)    ;save used registers
  459.  
  460.     tst.l fxc4
  461.     bne check3
  462. use4:    
  463.     move.w #%0000000000001000,d5
  464.     lea chann4reg,a2
  465.     jsr end_fx4p
  466.     move.l fx_number,fxr4
  467.     move.l fx_number,fxc4
  468.     move.w fx_bank,ch4fx_ident
  469.     move.l #0,fx_number
  470.     bra no_fx
  471. check3:    tst.l fxc3
  472.     bne check2
  473. use3:
  474.     move.w #%0000000000000100,d5
  475.     lea chann3reg,a2
  476.     jsr end_fx3p
  477.     move.l fx_number,fxr3
  478.     move.l fx_number,fxc3
  479.     move.w fx_bank,ch3fx_ident
  480.     move.l #0,fx_number
  481.     bra no_fx
  482. check2:    tst.l fxc2
  483.     bne check1
  484. use2:
  485.     move.w #%0000000000000010,d5
  486.     lea chann2reg,a2
  487.     jsr end_fx2p
  488.     move.l fx_number,fxr2
  489.     move.l fx_number,fxc2
  490.     move.w fx_bank,ch2fx_ident
  491.     move.l #0,fx_number
  492.     bra no_fx
  493. check1:    tst.l fxc1
  494.     bne use3
  495. use1:
  496.     move.w #%0000000000000001,d5
  497.     lea chann1reg,a2
  498.     jsr end_fx1p
  499.     move.l fx_number,fxr1
  500.     move.l fx_number,fxc1
  501.     move.w fx_bank,ch1fx_ident
  502.     move.l #0,fx_number
  503. no_fx
  504.     movem.l (a7)+,d5/a2    ;restore registers
  505.     clr.w int_disable
  506.     rts
  507.  
  508. ;*************************************************
  509. ;          CALL HERE TO KILL ANY FX...
  510. ;       after putting the number of the fx you want to kill
  511. ;            into fx_kill
  512.  
  513. kill_loopfx
  514.  
  515.     movem.l d5/a2,-(a7)    ;save used registers
  516.     move.l fx_kill,d5
  517.     cmp.l fxc1,d5
  518.     bne k2
  519.     move.w #%0000000000000001,d5
  520.     lea chann1reg,a2
  521.     jsr end_fx1p
  522.     bra error
  523. k2    cmp.l fxc2,d5
  524.     bne k3
  525.     move.w #%0000000000000010,d5
  526.     lea chann2reg,a2
  527.     jsr end_fx2p
  528.     bra error
  529. k3    cmp.l fxc3,d5
  530.     bne k4
  531.     move.w #%0000000000000100,d5
  532.     lea chann3reg,a2
  533.     jsr end_fx3p
  534.     bra error
  535. k4    cmp.l fxc4,d5
  536.     bne error
  537.     move.w #%0000000000001000,d5
  538.     lea chann2reg,a2
  539.     jsr end_fx4p
  540. error
  541.     clr.l fx_kill
  542.     movem.l (a7)+,d5/a2    ;restore registers
  543.     rts
  544. ;*************************************************
  545.  
  546.     ; CALL HERE TO KILL ANY SOUNDS LEFT ON CHIP
  547.  
  548. kill_chip:
  549.     move.w #%0000000000001111,dmacon
  550.     move.l arest_data,chann1reg
  551.     move.l arest_data,chann2reg
  552.     move.l arest_data,chann3reg
  553.     move.l arest_data,chann4reg
  554.     move.w #16,chann1reg+4    
  555.     move.w #16,chann2reg+4    
  556.     move.w #16,chann3reg+4    
  557.     move.w #16,chann4reg+4    
  558.     move.w #0,chann1reg+8
  559.     move.w #0,chann2reg+8
  560.     move.w #0,chann3reg+8
  561.     move.w #0,chann4reg+8
  562.     move.w #1,chann1reg+6
  563.     move.w #1,chann2reg+6
  564.     move.w #1,chann3reg+6
  565.     move.w #1,chann4reg+6
  566.     move.l #0,fxr1
  567.     move.l #0,fxr2
  568.     move.l #0,fxr3
  569.     move.l #0,fxr4
  570.     move.w #0,fx1_flag
  571.     move.w #0,fx2_flag
  572.     move.w #0,fx3_flag
  573.     move.w #0,fx4_flag
  574.     move.l #0,fxc1
  575.     move.l #0,fxc2
  576.     move.l #0,fxc3
  577.     move.l #0,fxc4
  578.     rts
  579.  
  580. arestd:
  581. arest_data:
  582.     dc.w    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  583.  
  584. ;***************************************
  585.  
  586.             ;SUBROUTINES TO MANIPULATE FILTER INGAME
  587.  
  588. turn_filter_on: 
  589.     bclr #1,filter
  590.     rts
  591.  
  592.  
  593. turn_filter_off:
  594.     bset #1,filter
  595.     rts
  596.  
  597. ;****************************************
  598.  
  599.  
  600. ;;;;    THIS ROUTINE WILL INITILIASE THE DRIVER 
  601. ;;;;    AND SHOULD BE CALLED BEFORE USING ANY OF THE
  602. ;;;;    DRIVER FUNCTIONS
  603.  
  604.  
  605. initiliase_driver
  606.  
  607.     clr.l    song_buffer
  608.     move.w #1,music_disable
  609.     jsr select_new_song
  610.     clr.w music_disable
  611.     rts
  612.  
  613.  
  614. ;*****************************************
  615.  
  616.  
  617. ;  CALL HERE TO SELECT WHICH PIECE OF MUSIC TO PLAY
  618. ;  AFTER PLACING NUMBER (1 to ?) IN "SONG_BUFFER"..see above
  619. ;  a call to this routine will initiliase the driver/kill any sound etc.      
  620. ;  make sure this routine has been called before running the interrupt
  621. ;  driven section....see below
  622.  
  623. select_new_song:
  624.  
  625.     move.w #1,int_disable
  626.     movem.l d0/d1/a0/a1,-(a7)    ;save used registers
  627.     move.w music_disable,gen
  628.     move.w #1,music_disable
  629.         jsr kill_chip           
  630.     clr.l d0
  631.         move.w #204,d0
  632.         lea gvars,a0
  633. clloop: clr.w (a0)+        
  634.         dbra  d0,clloop
  635.     tst.l song_buffer
  636.     beq no_song
  637.         move.l song_buffer,d1
  638.     add.l d1,d1
  639.      add.l d1,d1
  640.      add.l d1,d1
  641.      add.l d1,d1
  642.      add.l d1,d1
  643.  
  644. ;-----------------
  645.     movea.l (music_base_address),a1
  646.     move.w (a1),d0        ;word offset to song_table
  647.     lea (a1,d0),a1
  648.     sub.l #32,a1
  649. ;-----------------
  650.         ;LEA  SONG_TABLE-16,A1
  651.  
  652.         add.l d1,a1         ;a1 points to song table in data blk     
  653.  
  654.  
  655.     movea.l (music_base_address),a2    ;sort tempo
  656.         MOVE.L (A1)+,(song_tempo)
  657. ;        ---------------------------------
  658.  
  659.     movea.l (music_base_address),a2
  660.         MOVE.L (A1)+,d0
  661.     add.l d0,a2
  662.     move.l a2,wsong1    
  663.  
  664.     movea.l (music_base_address),a2
  665.         MOVE.L (A1)+,d0
  666.     add.l d0,a2
  667.     move.l a2,wsong2    
  668.  
  669.     movea.l (music_base_address),a2
  670.         MOVE.L (A1)+,d0
  671.     add.l d0,a2
  672.     move.l a2,wsong3
  673.  
  674.     movea.l (music_base_address),a2
  675.         MOVE.L (A1),d0
  676.     add.l d0,a2
  677.     move.l a2,wsong4    
  678.  
  679.  
  680.  
  681.  
  682.         MOVE.L #pstart,PATTR1
  683.         MOVE.L #pstart,PATTR2
  684.         MOVE.L #pstart,PATTR3
  685.     move.l #pstart,pattr4
  686.         move.l #sstart,songr1
  687.         MOVE.L #sstart,SONGR2
  688.         MOVE.L #sstart,SONGR3
  689.     move.l #sstart,songr4
  690. no_song
  691.     move.w #1,ch1vars
  692.     move.w #2,ch2vars
  693.     move.w #3,ch3vars
  694.     move.w #4,ch4vars
  695.     move.w #6,ch4fxvars
  696.     move.w #5,ch3fxvars
  697.     move.w #7,ch2fxvars
  698.     move.w #8,ch1fxvars
  699.     move.w gen,music_disable
  700.     clr.w int_disable
  701.     movem.l (a7)+,d0/d1/a0/a1    ;restore registers
  702.         rts
  703.  
  704.  
  705. sstart:        dc.l 0,1
  706. pstart:        dc.w 8
  707.  
  708.  
  709. ;********************************************************************
  710. ;********************************************************************
  711.  
  712.         ;This is the actual interrupt routine
  713.  
  714.  
  715. ;  CALL HERE ON A 50hz INTERRUPT DURING RUNTIME
  716. ;  TO PLAY FX AND TUNES
  717.  
  718. driver:  
  719.     tst.w int_disable
  720.     beq process_data
  721.     rts        
  722. ;------------------------------
  723.  
  724. process_data
  725.  
  726.     move.l #1,d0
  727.     add.l (tempo_counter),d0
  728.     move.l d0,(tempo_counter)
  729.     cmp.l (song_tempo),d0
  730.     bls process_data1
  731.  
  732.     move.w #1,play_flag    ;inhibit music play this frame
  733.     clr.l tempo_counter
  734.  
  735.  
  736. process_data1
  737.  
  738.     movem.l d0-d6/a0-a6,-(a7)    ;save used registers
  739.  
  740.  
  741. ch1:
  742.     tst.w fx_disable
  743.     bne test_music1
  744.     tst.l fxr1
  745.     bne   ch1j1
  746.     tst.l fxc1
  747.     beq test_music1
  748.     bra ch1j3
  749. ch1j2    jsr run_dummy1
  750.     jsr run_fx1
  751.     bra ch2
  752. ch1j1
  753.     jsr set_up1
  754. ch1j3    tst.w music_disable    
  755.     beq ch1j2
  756.     jsr run_fx1
  757.     bra ch2
  758. test_music1
  759.     tst.w music_disable
  760.     bne ch2
  761.     jsr run_music1
  762.     bra ch2
  763.     ;***********************
  764.  
  765.     ; channel 1 subroutines
  766.  
  767. run_dummy1    
  768.  
  769.  
  770.  
  771.     tst.w play_flag
  772.     beq rd1
  773.     rts
  774. rd1
  775.  
  776.     move.l (music_base_address),(curr_base_address)
  777.  
  778.  
  779.      lea ch1vars,a0
  780.      lea dummy_reg,a2 
  781.      move.w #0,d5 
  782.      jsr sect1    
  783.     rts
  784.  
  785. set_up1    
  786.     move.w ch1fx_ident,d0
  787.     jsr sort_fx_bank    ;move.l (fx_base_address),a1
  788.     move.l a1,ch1_curr_base
  789.     
  790.     move.l a1,-(a7)
  791.     move.w 2(a1),d0
  792.     add.w d0,a1
  793.     sub.l #4,a1        ;pointer to jumptable
  794.         move.l fxr1,d0
  795.         add d0,d0
  796.         add d0,d0
  797.     add.l d0,a1        ;pointer to fx offset within table
  798.     move.l (a1),d0
  799.  
  800.     move.l (a7)+,a1        ;get base address from stack
  801.  
  802.     add.l d0,a1
  803.     move.l a1,currfx1    ;store address
  804.      clr.l fxr1
  805.     clr.w fxintc1
  806.      rts
  807.      
  808. run_fx1
  809.  
  810.     move.l (ch1_curr_base),(curr_base_address)
  811.  
  812.     lea ch1fxvars,a0
  813.        lea chann1reg,a2
  814.       move.w #%0000000000000001,d5 
  815.      move.w #%1000000000000001,d1 
  816.  
  817.     move.w    #1,mode
  818.      jsr sect1
  819.     rts
  820.  
  821. run_music1
  822.  
  823.     tst.w play_flag
  824.     beq rm1
  825.     rts
  826. rm1
  827.     move.l (music_base_address),(curr_base_address)
  828.  
  829.  
  830.     lea ch1vars,a0
  831.        lea chann1reg,a2
  832.       move.w #%0000000000000001,d5 
  833.       move.w #%1000000000000001,d1 
  834.     move.w    #0,mode
  835.       jsr sect1     
  836.     rts
  837.  
  838.     ;  **************************
  839. ch2
  840.     tst.w fx_disable
  841.     bne test_music2
  842.     tst.l fxr2
  843.     bne   ch2j1
  844.     tst.l fxc2
  845.     beq test_music2
  846.     bra ch2j3
  847. ch2j2    jsr run_dummy2
  848.     jsr run_fx2
  849.     bra ch3
  850. ch2j1
  851.     jsr set_up2
  852. ch2j3    tst.w music_disable    
  853.     beq ch2j2
  854.     jsr run_fx2
  855.     bra ch3
  856.  
  857. test_music2
  858.     tst.w music_disable
  859.     bne ch3
  860.     jsr run_music2
  861.     bra ch3
  862.     ;***********************
  863.     ; channel 2 subroutines
  864. run_dummy2    
  865.  
  866.     tst.w play_flag
  867.     beq rd2
  868.     rts
  869. rd2
  870.  
  871.     move.l (music_base_address),(curr_base_address)
  872.  
  873.      lea ch2vars,a0
  874.      lea dummy_reg,a2 
  875.      move.w #0,d5 
  876.      jsr sect1    
  877.     rts
  878.  
  879. set_up2    
  880.     move.w ch2fx_ident,d0
  881.     jsr sort_fx_bank    ;move.l (fx_base_address),a1
  882.     move.l a1,ch2_curr_base
  883.     
  884.     move.l a1,-(a7)
  885.     move.w 2(a1),d0
  886.     add.w d0,a1
  887.     sub.l #4,a1        ;pointer to jumptable
  888.         move.l fxr2,d0
  889.         add d0,d0
  890.         add d0,d0
  891.     add.l d0,a1        ;pointer to fx offset within table
  892.     move.l (a1),d0
  893.  
  894.     move.l (a7)+,a1        ;get base address from stack
  895.  
  896.     add.l d0,a1
  897.     move.l a1,currfx2    ;store address
  898.      clr.l fxr2
  899.     clr.w fxintc2
  900.      rts
  901.      
  902. run_fx2
  903.  
  904.     move.l (ch2_curr_base),(curr_base_address)
  905.  
  906.     lea ch2fxvars,a0
  907.        lea chann2reg,a2
  908.       move.w #%0000000000000010,d5 
  909.      move.w #%1000000000000010,d1 
  910.     move.w    #1,mode
  911.      jsr sect1
  912.     rts
  913.  
  914. run_music2
  915.     tst.w play_flag
  916.     beq rm2
  917.     rts
  918. rm2
  919.     move.l (music_base_address),(curr_base_address)
  920.  
  921.     lea ch2vars,a0
  922.        lea chann2reg,a2
  923.       move.w #%0000000000000010,d5 
  924.       move.w #%1000000000000010,d1 
  925.     move.w    #0,mode
  926.       jsr sect1     
  927.     rts
  928.  
  929.     ;  **************************
  930.  
  931. ch3:
  932.     tst.w fx_disable
  933.     bne test_music3
  934.     tst.l fxr3
  935.     bne   ch3j1
  936.     tst.l fxc3
  937.     beq test_music3
  938.     bra ch3j3
  939. ch3j2    jsr run_dummy3
  940.     jsr run_fx3
  941.     bra ch4
  942. ch3j1
  943.     jsr set_up3
  944. ch3j3    tst.w music_disable    
  945.     beq ch3j2
  946.     jsr run_fx3
  947.     bra ch4
  948.  
  949. test_music3
  950.     tst.w music_disable
  951.     bne ch4
  952.     jsr run_music3
  953.     bra ch4
  954.  
  955.     ;***********************
  956.  
  957.     ; channel 3 subroutines
  958.  
  959. run_dummy3    
  960.     tst.w play_flag
  961.     beq rd3
  962.     rts
  963. rd3
  964.  
  965.     move.l (music_base_address),(curr_base_address)
  966.  
  967.      lea ch3vars,a0
  968.      lea dummy_reg,a2 
  969.      move.w #0,d5 
  970.      jsr sect1    
  971.     rts
  972.  
  973. set_up3    
  974.     move.w ch3fx_ident,d0
  975.     jsr sort_fx_bank    
  976.     move.l a1,ch3_curr_base
  977.     
  978.     move.l a1,-(a7)
  979.     move.w 2(a1),d0
  980.     add.w d0,a1
  981.     sub.l #4,a1        ;pointer to jumptable
  982.         move.l fxr3,d0
  983.         add d0,d0
  984.         add d0,d0
  985.     add.l d0,a1        ;pointer to fx offset within table
  986.     move.l (a1),d0
  987.  
  988.     move.l (a7)+,a1        ;get base address from stack
  989.  
  990.     add.l d0,a1
  991.     move.l a1,currfx3    ;store address
  992.      clr.l fxr3
  993.     clr.w fxintc3
  994.      rts
  995.   
  996.      
  997. run_fx3
  998.     move.l (ch3_curr_base),(curr_base_address)
  999.  
  1000.     lea ch3fxvars,a0
  1001.        lea chann3reg,a2
  1002.       move.w #%0000000000000100,d5 
  1003.      move.w #%1000000000000100,d1 
  1004.     move.w    #1,mode
  1005.      jsr sect1
  1006.     rts
  1007.  
  1008. run_music3
  1009.  
  1010.     tst.w play_flag
  1011.     beq rm3
  1012.     rts
  1013. rm3
  1014.  
  1015.     move.l (music_base_address),(curr_base_address)
  1016.  
  1017.     lea ch3vars,a0
  1018.        lea chann3reg,a2
  1019.       move.w #%0000000000000100,d5 
  1020.       move.w #%1000000000000100,d1 
  1021.     move.w    #0,mode
  1022.       jsr sect1     
  1023.     rts
  1024.  
  1025.     ;  **************************
  1026.  
  1027. ch4:
  1028.     tst.w fx_disable
  1029.     bne test_music4
  1030.     tst.l fxr4
  1031.     bne   ch4j1
  1032.     tst.l fxc4
  1033.     beq test_music4
  1034.     bra ch4j3
  1035. ch4j2    jsr run_dummy4
  1036.     jsr run_fx4
  1037.     bra no4
  1038. ch4j1
  1039.     jsr set_up4
  1040. ch4j3    tst.w music_disable    
  1041.     beq ch4j2
  1042.     jsr run_fx4
  1043.     bra no4
  1044.  
  1045. test_music4
  1046.     tst.w music_disable
  1047.     bne no4
  1048.     jsr run_music4
  1049. no4    
  1050.  
  1051.     clr.w play_flag            ;inhibit music tempo play
  1052.  
  1053.     movem.l (a7)+,d0-d6/a0-a6    ;restore registers
  1054.     rts
  1055.  
  1056.     ;***********************
  1057.  
  1058.     ; channel 4 subroutines
  1059.  
  1060. run_dummy4    
  1061.  
  1062.     tst.w play_flag
  1063.     beq rd4
  1064.     rts
  1065. rd4
  1066.  
  1067.  
  1068.     move.l (music_base_address),(curr_base_address)
  1069.  
  1070.      lea ch4vars,a0
  1071.      lea dummy_reg,a2 
  1072.      move.w #0,d5 
  1073.      jsr sect1    
  1074.     rts
  1075.  
  1076. set_up4    
  1077.     move.w ch4fx_ident,d0
  1078.     jsr sort_fx_bank    ;move.l (fx_base_address),a1
  1079.     move.l a1,ch4_curr_base
  1080.     
  1081.     move.l a1,-(a7)
  1082.     move.w 2(a1),d0
  1083.     add.w d0,a1
  1084.     sub.l #4,a1        ;pointer to jumptable
  1085.         move.l fxr4,d0
  1086.         add d0,d0
  1087.         add d0,d0
  1088.     add.l d0,a1        ;pointer to fx offset within table
  1089.     move.l (a1),d0
  1090.  
  1091.     move.l (a7)+,a1        ;get base address from stack
  1092.  
  1093.     add.l d0,a1
  1094.     move.l a1,currfx4    ;store address
  1095.      clr.l fxr4
  1096.     clr.w fxintc4
  1097.      rts
  1098.      
  1099. run_fx4
  1100.  
  1101.     move.l (ch4_curr_base),(curr_base_address)
  1102.  
  1103.     lea ch4fxvars,a0
  1104.        lea chann4reg,a2
  1105.       move.w #%0000000000001000,d5 
  1106.      move.w #%1000001000001000,d1 
  1107.     move.w    #1,mode
  1108.      jsr sect1
  1109.     rts
  1110.  
  1111. run_music4
  1112.  
  1113.     tst.w play_flag
  1114.     beq rm4
  1115.     rts
  1116. rm4
  1117.     move.l (music_base_address),(curr_base_address)
  1118.  
  1119.  
  1120.     lea ch4vars,a0
  1121.        lea chann4reg,a2
  1122.       move.w #%0000000000001000,d5 
  1123.       move.w #%1000001000001000,d1 
  1124.     move.w    #0,mode
  1125.       jsr sect1     
  1126.     rts
  1127. ;---------------------------------------
  1128.  
  1129.  
  1130. sort_fx_bank:            ;d0 contains bank ident
  1131.                 ;0 = gen fx
  1132.                 ;1 = speech bank1
  1133.                 ;2 = speech bank 2
  1134.  
  1135.     tst.w d0
  1136.     beq    set_gen
  1137.     cmp.w #1,d0
  1138.     beq    set_speech1
  1139.  
  1140.     move.l (speech_bank2_address),a1        ;set speech 2
  1141.     rts
  1142.  
  1143. set_gen
  1144.     move.l (fx_base_address),a1
  1145.     rts
  1146.  
  1147. set_speech1
  1148.     move.l (speech_bank1_address),a1
  1149.     rts
  1150.  
  1151.  
  1152.     ;  **************************
  1153.  
  1154. sect1: tst.w (a0)
  1155.     bne s1j1
  1156.     rts
  1157.  
  1158. s1j1:    tst.w 2(a0)
  1159.         beq sect3       
  1160.         cmpi.w #1,2(a0)
  1161.         beq sect4
  1162.  
  1163.         cmpi.w #3,4(a0)    
  1164.         beq part2       
  1165.     
  1166. mode_switch:  subq.w #1,2(a0)     
  1167.  
  1168. check_effects: clr.w altpf      
  1169.         move.w 6(a0),d2    
  1170.         tst.w 8(a0)      
  1171.         beq check_mod
  1172.         tst.w 14(a0)      
  1173.         beq cont_bend
  1174.         subq.w #1,14(a0)
  1175.         bra check_mod
  1176. cont_bend:   addq.w #1,altpf    
  1177.         move.w 10(a0),d3    
  1178.         move.w 12(a0),d4    
  1179.         cmpi.w #1,8(a0)
  1180.         beq pbup
  1181.     
  1182.         sub.w d3,d2
  1183.         cmp.w d2,d4
  1184.         bcs check_mod
  1185.         bra fbend
  1186.  
  1187. pbup:     add.w d3,d2
  1188.         cmp.w d2,d4
  1189.         bcc check_mod
  1190. fbend:     move.w d4,d2
  1191.         clr.w 8(a0)      
  1192. check_mod:   tst.w 16(a0)
  1193.         beq send_alt_pitch
  1194.    
  1195.  
  1196.     tst.w  58(a0)
  1197.     beq st_ok
  1198.     subq.w #1,58(a0)
  1199.     bra send_alt_pitch
  1200. st_ok:
  1201.         tst.w 50(a0)
  1202.         beq cont_mod
  1203.         subq #1,50(a0)
  1204.         bra send_alt_pitch
  1205. cont_mod:    move.w 52(a0),50(a0)  
  1206.         addq #1,altpf
  1207.         cmpi #3,16(a0)
  1208.         bcc addmod
  1209.     
  1210.         move.w 56(a0),d3 
  1211.         sub.w d3,d2
  1212.         addq.w #1,16(a0)  
  1213.         bra send_alt_pitch
  1214. addmod:
  1215.  
  1216.         move.w 54(a0),d3 
  1217.         add.w d3,d2
  1218.         addq.w #1,16(a0)
  1219.         cmpi.w #5,16(a0)
  1220.        bne send_alt_pitch
  1221.         move.w #1,16(a0)  
  1222.  
  1223. send_alt_pitch: tst.w altpf
  1224.         beq send_env
  1225.         move.w d2,6(a0)  
  1226.         move.w d2,6(a2)  
  1227.  
  1228. send_env: 
  1229.  
  1230. do_env_check:
  1231.  
  1232. norm_env:
  1233.     move.l 18(a0),a1    
  1234.         cmpi.w #255,(a1)
  1235.         beq env_finished
  1236.  
  1237. resu    clr.l d0
  1238.     move.w (a1)+,d0
  1239.  
  1240.             ;test for mode here
  1241.     tst.w mode
  1242.     bne sete
  1243.  
  1244.     sub.w fade,d0
  1245.     bcc sete
  1246.  
  1247.  
  1248.     move.w #0,d0
  1249.  
  1250.  
  1251. sete    move.w d0,8(a2)    
  1252.     move.l a1,18(a0)
  1253.     rts        
  1254.  
  1255.  
  1256. no_acc:
  1257. ;resu:  
  1258. no_off
  1259.     ;move.w (a1)+,d0
  1260.     sub.w fade,d0
  1261.     bcc sete2
  1262.     move.w #0,d0
  1263. sete2    move.w d0,8(a2)
  1264.      move.w (a1)+,8(a2)
  1265.    
  1266. fint:   move.l a1,18(a0)    
  1267.     rts
  1268.  
  1269. env_finished:
  1270.     subq.l #2,a1    
  1271.     bra resu
  1272.     rts
  1273.  
  1274.  
  1275.  
  1276. one_shot_note: move.w #3,4(a0)     
  1277.         move.l 38(a0),(a2)
  1278.         move.w 42(a0),4(a2)
  1279.         move.w d1,dmacon     
  1280.         bra send_env
  1281.  
  1282.  
  1283. part2:                         
  1284.         move.l 44(a0),(a2)
  1285.         move.w 48(a0),4(a2)
  1286.         subq.w #1,2(a0)      
  1287.         move.w #1,4(a0)
  1288.         bra check_effects
  1289.  
  1290. sect3:
  1291.     move.w #0,66(a0)    
  1292.  
  1293.     move.l 22(a0),a1  
  1294. control_ret: move.w (a1)+,d0  
  1295.     cmpi.w #100,d0   
  1296.     bls sect5   
  1297.   
  1298. acc_note:
  1299.     move.w d0,6(a0)  
  1300.     move.w d0,6(a2)  
  1301.     move.w (a1)+,2(a0) 
  1302.     subq.w #1,2(a0)  
  1303.     move.l a1,22(a0)  
  1304.     move.l 34(a0),18(a0) 
  1305.     move.w 60(a0),58(a0) 
  1306.  
  1307.  
  1308.     tst.w 16(a0)
  1309.     beq no_mod_res
  1310.     move.w #1,16(a0)
  1311. no_mod_res:
  1312.     cmpi.w #0,4(a0)
  1313.     beq do_loop
  1314.     bra one_shot_note    
  1315.  
  1316.  
  1317. do_loop:    move.w d1,dmacon   
  1318.         bra send_env
  1319.  
  1320. do_rest:
  1321.     move.w (a1)+,2(a0) 
  1322.     subq.w #1,2(a0)  
  1323.     move.l a1,22(a0)  
  1324.     move.l  #drest_env,18(a0)
  1325.  
  1326.         move.w #0,8(a2)
  1327.         bra send_env
  1328.    
  1329. sect4:
  1330.         cmpi.w #0,4(a0)
  1331.         beq noof
  1332.         move.w d5,dmacon   
  1333. noof:     subq.w #1,2(a0)
  1334.         bra check_effects
  1335.    
  1336. sect5:     move.l #jump_table,a3
  1337.         move.l (a3,d0),a4
  1338.         jmp (a4)
  1339.  
  1340. jump_table: 
  1341.     dc.l  in_line_data
  1342.         dc.l  nsound
  1343.         dc.l  patt_end
  1344.         dc.l  get_env
  1345.         dc.l  check_pbend
  1346.         dc.l  do_mod
  1347.         dc.l  bend_off
  1348.         dc.l  mod_off
  1349.         dc.l  do_rest
  1350.         dc.l  end_fx
  1351.         dc.l  end_fx
  1352.     dc.l  s_f_on
  1353.     dc.l  s_f_off
  1354.     dc.l  set_acc
  1355.     dc.l  rept
  1356.  
  1357. in_line_data:
  1358.  
  1359.         nop
  1360.         rts
  1361.  
  1362. rept:
  1363.     move.l (a1),d0
  1364.     move.l (curr_base_address),a1
  1365.     add.l    d0,a1
  1366.     bra control_ret
  1367.  
  1368. s_f_on: 
  1369.     bclr #1,filter
  1370.     bra control_ret
  1371. s_f_off:
  1372.     bset #1,filter
  1373.     bra control_ret
  1374.  
  1375. nsound:
  1376. ;----------------------------
  1377.     move.l (a1)+,d0        ;sound offset
  1378.     move.l (curr_base_address),a3
  1379.     add.l d0,a3
  1380. ;----------------------------
  1381.         ;move.l (a1)+,a3     
  1382.  
  1383.         cmpi.w #0,(a3)
  1384.         bne one_shot_sound
  1385.  
  1386. xxx
  1387.         move.w (a3)+,4(a0)        ;length    
  1388.  
  1389. ;-----------------
  1390.     move.l (curr_base_address),a6
  1391.     move.l (a3)+,d0
  1392.     add.l d0,a6
  1393.     move.l a6,(a2)
  1394. ;--------------------
  1395.         ;move.l (a3)+,(a2)     
  1396.  
  1397.         move.w (a3),4(a2)    
  1398.         jmp control_ret
  1399.  
  1400. one_shot_sound:
  1401.         move.w (a3)+,4(a0)        ;type of sound
  1402. ;-----------
  1403.     move.l (curr_base_address),a6
  1404.     move.l (a3)+,d0
  1405.     add.l d0,a6
  1406.     move.l a6,38(a0)        ;address sample 1
  1407. ;---------------
  1408.         move.w (a3)+,42(a0)        ;length sample 1
  1409. ;---------------------
  1410.     move.l (curr_base_address),a6
  1411.     move.l (a3)+,d0
  1412.     add.l d0,a6
  1413.     move.l a6,44(a0)
  1414.  
  1415. ;---------------------
  1416.     ;add.l #4,a3
  1417.         move.w (a3),48(a0)
  1418.         jmp control_ret
  1419.  
  1420. patt_end:
  1421.  
  1422.         move.l 26(a0),a1    
  1423.         cmpi.l #0,(a1)     
  1424.         beq song_control        ;end of song
  1425.         addq.l #4,26(a0)            ;get next pattern address
  1426. ;-----------------------
  1427.     move.l (a1),d0        ;offset
  1428.     move.l (curr_base_address),a1
  1429.     add.l d0,a1        ;new pattern
  1430.  
  1431. ;------------------------
  1432.         ;move.l (a1),a1     
  1433.         jmp control_ret
  1434. get_env:
  1435. ;-----------------------
  1436.     move.l (a1)+,d0        ;env offset
  1437.     move.l (curr_base_address),a4
  1438.     add.l d0,a4     
  1439. ;--------------------------
  1440.     ;move.l (a1)+,a4 
  1441.  
  1442.     move.l (a4)+,62(a0)    
  1443.     
  1444.     move.l  a4,34(a0)    
  1445.     
  1446.         bra control_ret
  1447.  
  1448. check_pbend:
  1449.      move.l (a1)+,8(a0)
  1450.         move.l (a1)+,12(a0)
  1451.         bra control_ret
  1452.  
  1453. do_mod:    move.w #1,16(a0)  
  1454.         move.l (a1)+,50(a0)
  1455.         move.l (a1)+,54(a0)
  1456.         move.l (a1)+,58(a0)
  1457.         bra control_ret
  1458.  
  1459. bend_off:   clr.w 8(a0)
  1460.         bra control_ret
  1461.  
  1462. mod_off:    clr.w 16(a0)
  1463.         bra control_ret
  1464.  
  1465.  
  1466. end_fx:    
  1467.     cmpi.w #6,(a0)
  1468.     beq end_fx4p
  1469.     cmpi.w #5,(a0)
  1470.     beq end_fx3p
  1471.     cmpi.w #7,(a0)
  1472.     beq end_fx2p
  1473.  
  1474. end_fx1p:
  1475.         move.w d5,dmacon   
  1476.     move.w  #1,chann1reg+6
  1477.     move.w #0,8(a2)
  1478.     move.l #0,fxc1
  1479.     rts
  1480.  
  1481. end_fx2p:
  1482.     move.w d5,dmacon 
  1483.     move.w  #1,chann2reg+6
  1484.         move.w #0,8(a2) 
  1485.     move.l #0,fxc2
  1486.         rts
  1487.  
  1488.  
  1489. end_fx3p:
  1490.         move.w d5,dmacon   
  1491.     move.w  #1,chann3reg+6
  1492.     move.w #0,8(a2)
  1493.     move.l #0,fxc3
  1494.     rts
  1495.  
  1496. end_fx4p:
  1497.     move.w d5,dmacon 
  1498.     move.w  #1,chann4reg+6
  1499.         move.w #0,8(a2) 
  1500.     move.l #0,fxc4
  1501.         rts
  1502.  
  1503. set_acc: move.w #1,66(a0) 
  1504.     bra control_ret
  1505.  
  1506. song_control:
  1507.         addq.l #4,a1
  1508.         move.l 30(a0),26(a0)
  1509.         move.l 26(a0),a1
  1510.         addq.l #4,26(a0)
  1511. ;------------------
  1512.     move.l (curr_base_address),a6
  1513.     move.l (a1),d0
  1514.     add.l d0,a6
  1515.     move.l a6,a1
  1516. ;-----------------------
  1517.         ;move.l (a1),a1
  1518.         jmp control_ret
  1519.  
  1520.  
  1521. ;"""""""""""""""""""""""""""""""""""""""""""""""""
  1522. ;************************************************************
  1523. gvars:
  1524. ch1vars     
  1525.     dc.w 0     
  1526.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1527. pattr1: dc.l 0    
  1528. songr1: dc.l 0    
  1529. wsong1: dc.l 0   
  1530.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1531.  
  1532. ch2vars     
  1533.     dc.w 0     
  1534.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1535. pattr2: dc.l 0    
  1536. songr2: dc.l 0    
  1537. wsong2: dc.l 0    
  1538.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1539.  
  1540. ch3vars 
  1541.     dc.w 0     
  1542.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1543. pattr3: dc.l 0    
  1544. songr3: dc.l 0    
  1545. wsong3: dc.l 0    
  1546.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1547.  
  1548. ch4vars 
  1549.     dc.w 0     
  1550.         dc.w 0,0,0,0,0,0,0,0,0,0     
  1551. pattr4: dc.l 0    
  1552. songr4: dc.l 0    
  1553. wsong4: dc.l 0    
  1554.         dc.w 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0   
  1555.  
  1556.  
  1557. ch1fxvars 
  1558.     dc.w 0     
  1559. fxintc1:
  1560.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1561. currfx1:
  1562.     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    
  1563.  
  1564. ch2fxvars 
  1565.     dc.w 0     
  1566. fxintc2:
  1567.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1568. currfx2:
  1569.     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    
  1570.  
  1571.  
  1572. ch3fxvars
  1573.     dc.w 0     
  1574. fxintc3:
  1575.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1576. currfx3:
  1577.     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    
  1578.  
  1579. ch4fxvars 
  1580.     dc.w 0     
  1581. fxintc4:
  1582.     dc.w 0,0,0,0,0,0,0,0,0,0     
  1583. currfx4:
  1584.     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    
  1585. ;************************************************************
  1586.  
  1587. drest_env    dc.w  0,0,0,0,0,0,0,0,255
  1588.  
  1589.  
  1590.  
  1591. dummy_reg dc.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1592.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1593.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1594.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1595.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1596.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1597.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1598.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1599.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1600.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1601.         dc.l  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  1602.  
  1603. ;*******************************************************
  1604.     even
  1605.  
  1606.  
  1607. fx_data_blk:    ;test place for getting the general fx data blk in
  1608.  
  1609.  
  1610.     incbin c:sf2d/gfx.bin
  1611.  
  1612. ;***********************************************************
  1613.     even
  1614.  
  1615. speech_bank1    ;test place for speech1
  1616.  
  1617.  
  1618.     incbin c:sf2d/speech/chun_speech.bin
  1619.     
  1620.  
  1621. ;*********************************************
  1622.  
  1623.     even
  1624.  
  1625. speech_bank2    ;test place for speech2
  1626.  
  1627.  
  1628.     incbin c:sf2d/speech/guile_speech.bin
  1629.  
  1630. ;**********************************************
  1631.  
  1632.     even
  1633.  
  1634. music_data_blk: ;test place for music data blk
  1635.  
  1636.     
  1637.     ;incbin c:sf2d/ken.bin
  1638.     ;incbin c:sf2d/ryu.bin
  1639.     ;incbin c:sf2d/honda.bin
  1640.     ;incbin c:sf2d/chun.bin
  1641.     ;incbin c:sf2d/blanka.bin
  1642.     ;incbin c:sf2d/zangief.bin
  1643.     ;incbin c:sf2d/guile.bin
  1644.     ;incbin c:sf2d/dhal.bin
  1645.     ;incbin c:sf2d/mbison.bin
  1646.     ;incbin c:sf2d/balrog.bin
  1647.     ;incbin c:sf2d/sagat.bin
  1648.     incbin c:sf2d/feilong.bin
  1649.     ;incbin c:sf2d/vega.bin
  1650.     ;incbin c:sf2d/cammy.bin
  1651.     ;incbin c:sf2d/thawk.bin
  1652.     ;incbin c:sf2d/deejay.bin
  1653.  
  1654.  
  1655. ;***********************************************************
  1656.  
  1657.     even
  1658.  
  1659. jingle_data_blk:    ;test place for the jingle data blk
  1660.  
  1661.     
  1662.     incbin c:sf2d/jingles3.bin
  1663.  
  1664.  
  1665. ;***********************************************************
  1666.  
  1667.     end
  1668.  
  1669.  
  1670.  
  1671.