home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: Street Fighter 2 PC Disk 1 / Lowe_StreetFighter2PCDisk1.img / ROLVARS.ASM < prev    next >
Encoding:
Assembly Source File  |  1992-10-09  |  3.6 KB  |  154 lines

  1. ;------------------------------------------------------------------------------
  2. ;
  3.  
  4.  
  5. BoardFlg    db 0    ;0 roland 1 for adlib
  6. mode_flag    db 0    ;0 for music.. 1 for fx
  7. Rsong_number    db 0    
  8. Asong_number    db 0
  9. loop_flag    dw 0
  10. curr_fx        dw 0
  11. ;------------------------------------------------------------------------------
  12. ; Roland LAPC-1 macros
  13. ;------------------------------------------------------------------------------
  14.  
  15. SnCmd    MACRO b
  16.     mov    al,b
  17.     call    TxLACom        ;send a command to LAPC-1
  18.     ENDM
  19.  
  20. SnDta    MACRO b
  21.     mov    al,b
  22.     call    TxLAData    ;send data to LAPC-1
  23.     ENDM
  24.  
  25. RxDta    MACRO 
  26.     mov    dx,LADataPort    ;receive data from LAPC-1
  27.     in    al,dx
  28.     ENDM
  29.  
  30. SnLA    MACRO p
  31.     mov    si,offset p
  32.     call    SendLAPCChange    ;write sys-ex MIDI string to LAPC-1
  33.     ENDM
  34.  
  35. ;------------------------------------------------------------------------------
  36. ;hardware definitions
  37. ;------------------------------------------------------------------------------
  38.  
  39. LADataPort    equ 330h
  40. LAComPort    equ 331h
  41. LAStatPort    equ 331h
  42. LADSR        equ 80h
  43. LADRR        equ 40h
  44.  
  45. ;------------------------------------------------------------------------------
  46.  
  47.  
  48. LAIntAddr    dw 0
  49. LAIntSeg    dw 0
  50.  
  51. LAPCNoInts    dw 0
  52.  
  53. MIDIStatus    db 0    ;running status
  54. MIDIChannel    db 0    ;channel
  55.  
  56. MIDIChanCount    dw 16 dup (0)
  57.  
  58. MIDIDataSiz    dw 0
  59. MIDIDataSizes    db 0    ;0    look up table
  60.         db 0    ;1
  61.         db 0    ;2
  62.         db 0    ;3
  63.         db 0    ;4
  64.         db 0    ;5
  65.         db 0    ;6
  66.         db 0    ;7
  67.         db 2    ;8    ;note off
  68.         db 2    ;9    ;note on
  69.         db 2    ;A    ;note after touch
  70.         db 2    ;B    ;control change
  71.         db 1    ;C    ;program change
  72.         db 1    ;D    ;channel after touch
  73.         db 2    ;E    ;pitch wheel
  74.         db 0    ;F    ;sys ex
  75.  
  76. ;------------------------------------------------------------------------------
  77. ;some patches etc.
  78. ;------------------------------------------------------------------------------
  79.  
  80. LAABass    equ 1    ;group 1
  81. LAEBass    equ 4    ;gr 1
  82. LAStr1    equ 48    ;gr 0
  83. LAStr2    equ 49    ;gr 0
  84. LAStr3    equ 50    ;gr 0
  85. LAVio2    equ 53    ;gr 0
  86. LAPiano    equ 1    ;gr 0
  87. LAElPi    equ 3    ;gr 0
  88. LAHkTk    equ 7    ;gr 0
  89. LAChor    equ 34    ;gr 0
  90. LAAtmos    equ 37    ;gr 0
  91. LAIcRn    equ 41    ;gr 0
  92. LAGtr    equ 59    ;gr 0
  93. LASax    equ 15    ;gr 1
  94. LATromb    equ 26    ;gr 1
  95. LATuba    equ 30    ;gr 1
  96. LABrs1    equ 31    ;gr 1
  97. LABrs2    equ 32    ;gr 1
  98. LAVibe1    equ 33    ;gr 1
  99. LASnBr2    equ 25    ;gr 0
  100. LASnBr3    equ 26    ;gr 0
  101.  
  102. Part1        db 03h,00h,00h,0,0,0,50,12,0,1,0,100,0FFh    ;set part 1 to 24, 1 octave down,fine tune,bender,assign,reverb
  103. Part2        db 03h,00h,10h,0,0,0,50,12,0,1,0,100,0FFh
  104. Part3        db 03h,00h,20h,0,0,0,50,12,0,1,0,100,0FFh
  105. Part4        db 03h,00h,30h,0,0,0,50,12,0,1,0,100,0FFh
  106. Part5        db 03h,00h,40h,0,0,0,50,12,0,1,0,100,0FFh
  107. Part6        db 03h,00h,50h,0,0,0,50,12,0,1,0,100,0FFh
  108. Part7        db 03h,00h,60h,0,0,0,50,12,0,1,0,100,0FFh
  109. Part8        db 03h,00h,70h,0,0,0,50,12,0,1,0,100,0FFh
  110. SetVol        db 10h,00h,16h,100,0FFh        ;set card to max vol.
  111. SetUpLAMIDI    db 14,16,16,16,1,2,3,4,5,6,7,0FFh    ;set up MIDI channels 0-7
  112.  
  113. MusicPlayFlg    db 0
  114.  
  115. RecordFlg    db 0
  116. DonePlay    db 0
  117.  
  118. MIDIBuffer    db 16 dup (0)
  119. MIDIInBytes    dw 0
  120.  
  121. TimeOver    dw 0
  122.  
  123. PlaySeg        dw 0
  124. PlayPtr        dw RecBuffer
  125. PlayLength    dw 0
  126. StartPtr    dw 0
  127.  
  128. RecBufSiz equ 16
  129. RecBuffer    db RecBufSiz dup (0)
  130. RecPtr        dw RecBuffer
  131.  
  132. ;     GLOBAL FX VARIABLES
  133. fx_number    db 0
  134. Tempo        dw 0    ;in beats per min
  135. fx_flag        db 0    ;interrupt to use fx driver
  136. int_flag    db 0    ;disable interrupt routine
  137. csb1        db 0    ;current status byte
  138. cel1        dw 0    ;current event length
  139. csb2        db 0    ;current status byte
  140. cel2        dw 0    ;current event length
  141. run1        db 0    ;which channel currently running
  142.  
  143.  
  144. ;   CHANNEL 1 FX VARS
  145. ch1_flag    db 0    ;1 = channel playing fx
  146. ch1_pattp    dw 0    ;offset pattern pointer for si/ch1
  147. ch1_intc    dw 0    ;count in 1/50ths
  148.  
  149. ;   CHANNEL 2 FX VARS
  150. ch2_flag    db 0    ;1 = channel playing fx
  151. ch2_pattp    dw 0    ;offset pattern pointer for si/ch1
  152. ch2_intc    dw 0    ;count in 1/50ths
  153.  
  154.