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