home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / midas / pas.inc < prev    next >
Text File  |  1994-08-06  |  24KB  |  673 lines

  1. ;*    PAS.INC
  2. ;*
  3. ;* Include files for Pro Audio Spectrum Sound Device, v1.00
  4. ;*
  5. ;* Copyright 1994 Petteri Kangaslampi and Jarno Paananen
  6. ;*
  7. ;* This file is part of the MIDAS Sound System, and may only be
  8. ;* used, modified and distributed under the terms of the MIDAS
  9. ;* Sound System license, LICENSE.TXT. By continuing to use,
  10. ;* modify or distribute this file you indicate that you have
  11. ;* read the license and understand and accept it fully.
  12. ;*
  13.  
  14.  
  15. ; The COMMON.INC and STATE.INC includes are from the PAS SDK, only
  16. ; converted to TASM IDEAL mode
  17.  
  18.  
  19. ;   /*\
  20. ;---|*|----====< COMMON.INC >====----
  21. ;---|*|
  22. ;---|*| This file contains the Media Vision hardware definition equates, and.
  23. ;---|*| the PC hardware environment.
  24. ;---|*|
  25. ;---|*| Copyright (c) 1991,1992 Media Vision, Inc.  All Rights Reserved.
  26. ;---|*|
  27. ;   \*/
  28.  
  29. ; Hardware associated with the PAS1/PAS2/CDPC
  30.  
  31. DEFAULT_BASE    EQU    00388h        ;; default base I/O address
  32. ALT_BASE_1    EQU    00384h        ;; first alternate address
  33. ALT_BASE_2    EQU    0038Ch        ;; second alternate address
  34. ALT_BASE_3    EQU    00288h        ;; third alternate address
  35. USE_ACTIVE_ADDR EQU    00000h        ;; uses what is currently active
  36.  
  37. DUALFM        EQU    1        ;; Dual FM chips
  38. DUALMIXER    EQU    1        ;; Dual mixers
  39. FILTER        EQU    1        ;; Has filter after input mixer
  40. VOLUME        EQU    1        ;; Has total volume control
  41.  
  42. TEXTVERSIONHI    EQU    '01'            ;; VERSION 01.00
  43. TEXTVERSIONLO    EQU    '00'
  44.  
  45. SYSSPKRTMR    EQU    00042h        ;; System Speaker Timer Address
  46. SYSTMRCTLR    EQU    00043h        ;; System Timer Control Register
  47. SYSSPKRREG    EQU    00061h        ;; System Speaker Register
  48. JOYSTICK    EQU    00201h        ;; Joystick Register
  49. LFMADDR     EQU    00388h        ;; Left  FM Synthesizer Address Register
  50. LFMDATA     EQU    00389h        ;; Left  FM Synthesizer Data Register
  51. RFMADDR     EQU    0038Ah        ;; Right FM Synthesizer Address Register
  52. RFMDATA     EQU    0038Bh        ;; Right FM Synthesizer Data Register
  53.  
  54. AUXADDR     EQU    00788h        ;; Auxiliary Register
  55. AUXDATA     EQU    00789h        ;; Auxiliary Register
  56. DFMADDR     EQU    00788h        ;; Dual  FM Synthesizer Address Register
  57. DFMDATA     EQU    00789h        ;; Dual  FM Synthesizer Data Register
  58.  
  59. pAUDIOMIXR    EQU    0078Bh        ;; Parallel interface Audio Mixer Reg
  60. AUDIOMIXR    EQU    00B88h        ;; Audio Mixer Control Register
  61. AUDIOFILT    EQU    00B8Ah        ;; Audio Filter Control Register
  62. INTRCTLRST    EQU    00B89h        ;; Interrupt Control Status Register
  63. INTRCTLR    EQU    00B8Bh        ;; Interrupt Control Register write
  64. INTRCTLRRB    EQU    00B8Bh        ;; Interrupt Control Register read back
  65. PCMDATA     EQU    00F88h        ;; PCM data I/O register (low byte)
  66. PCMDATAH    EQU    00F89h        ;; PCM data I/O register (high byte)
  67. CROSSCHANNEL    EQU    00F8Ah        ;; Cross Channel Register
  68. SAMPLERATE    EQU    01388h        ;; (t0) Sample Rate Timer Register
  69. SAMPLECNT    EQU    01389h        ;; (t1) Sample Count Register
  70. SPKRTMR     EQU    0138Ah        ;; (t2) Local Speaker Timer Address
  71. TMRCTLR     EQU    0138Bh        ;; Local Timer Control Register
  72. MDIRQVECT    EQU    01788H        ;; MIDI-0 IRQ Vector Register
  73. MDSYSCTLR    EQU    01789H        ;; MIDI-1 System Control Register
  74. MDSYSSTAT    EQU    0178AH        ;; MIDI-2 IRQ Status Register
  75. MDIRQCLR    EQU    0178BH        ;; MIDI-3 IRQ Clear Register
  76. MDGROUP4    EQU    01B88H        ;; MIDI-4 Group #1 Register (MDGROUP1)
  77. MDGROUP5    EQU    01B89H        ;; MIDI-5 Group #2 Register (MDGROUP2)
  78. MDGROUP6    EQU    01B8AH        ;; MIDI-6 Group #3 Register (MDGROUP3)
  79. MDGROUP7    EQU    01B8BH        ;; MIDI-7 Group #4 Register (MDGROUP4)
  80.  
  81. ;
  82. ; Factory Default Settings
  83. ;
  84. DEFAULTDMA    equ    1        ;; DMA channel 1
  85. DEFAULTIRQ    equ    7        ;; IRQ channel 7
  86. DEFAULTINT    equ    65h        ;; Interrupt # for software interface
  87.  
  88. ;
  89. ; mixer select
  90. ;
  91. OUTPUTMIXER    equ    00h        ;; output mixer H/W select
  92. INPUTMIXER    equ    40h        ;; input mixer select
  93. DEFMIXER    equ    -1        ;; use last mixer selected
  94. MIXERMAX    equ    1fh        ;; maximum mixer setting
  95.  
  96. MVVOLUMEMAX    equ    3fh        ;; MVA508 maximum mixer setting
  97. NSVOLUMEMAX    equ    28h        ;; National maximum mixer setting
  98.  
  99. EQUALIZERMAX    equ    0ch        ;; maximum equalizer setting
  100. EQUALIZERMID    equ    06h        ;; maximum mid setting
  101.  
  102. ;
  103. ;    Filter register bits
  104. ;
  105. fFIdatabits    equ    00011111B    ;; filter select and decode field bits
  106. fFImutebits    equ    00100000B    ;; filter mute field bits
  107. fFIpcmbits    equ    11000000B    ;; filter sample rate field bits
  108. bFImute     equ    00100000B    ;; filter mute bit
  109. bFIsrate    equ    01000000B    ;; filter sample rate timer mask
  110. bFIsbuff    equ    10000000B    ;; filter sample buffer counter mask
  111. FILTERMAX    equ    6        ;; six possible settings
  112.  
  113. ;
  114. ;    Cross Channel Bit definitions
  115. ;
  116. fCCcrossbits    EQU    00001111B    ;; cross channel bit field
  117. fCCpcmbits    EQU    11110000B    ;; pcm/dma control bit field
  118. bCCr2r        EQU    00000001B    ;; CROSSCHANNEL Right to Right
  119. bCCl2r        EQU    00000010B    ;; CROSSCHANNEL Left  to Right
  120. bCCr2l        EQU    00000100B    ;; CROSSCHANNEL Right to Right
  121. bCCl2l        EQU    00001000B    ;; CROSSCHANNEL Left  to Left
  122. bCCdac        EQU    00010000B    ;; DAC/ADC Control
  123. bCCmono     EQU    00100000B    ;; PCM Monaural Enable
  124. bCCenapcm    EQU    01000000B    ;; Enable PCM state machine
  125. bCCdrq        EQU    10000000B    ;; Enable DRQ bit
  126.  
  127. ;
  128. ;    Interrupt Control Register Bits
  129. ;
  130. fICintmaskbits    EQU    00011111B    ;; interrupt mask field bits
  131. fICrevbits    EQU    11100000B    ;; revision mask field bits
  132. fICidbits    EQU    11100000B    ;; Board revision ID field bits
  133. bICleftfm    EQU    00000001B    ;; Left FM interrupt enable
  134. bICritfm    EQU    00000010B    ;; Right FM interrupt enable
  135. bICsamprate    EQU    00000100B    ;; Sample Rate timer interrupt enable
  136. bICsampbuff    EQU    00001000B    ;; Sample buffer timer interrupt enable
  137. bICmidi     EQU    00010000B    ;; MIDI interrupt enable
  138.    fICrevshr    EQU    5        ;; rotate rev bits to lsb
  139.  
  140. ;
  141. ;    Interrupt Status Register Bits
  142. ;
  143. fISints     EQU    00011111B    ;; Interrupt bit field
  144. bISleftfm    EQU    00000001B    ;; Left FM interrupt active
  145. bISritfm    EQU    00000010B    ;; Right FM interrupt active
  146. bISsamprate    EQU    00000100B    ;; Sample Rate timer interrupt active
  147. bISsampbuff    EQU    00001000B    ;; Sample buffer timer interrupt active
  148. bISmidi     EQU    00010000B    ;; MIDI interrupt active
  149. bISPCMlr    EQU    00100000B    ;; PCM left/right active
  150. bISActive    EQU    01000000B    ;; Hardware is active (not in reset)
  151. bISClip     EQU    10000000B    ;; Sample Clipping has occured
  152.  
  153. ;
  154. ;    cross channel channel #s
  155. ;
  156. RIGHT2RIGHT    equ    00h        ;; right to right
  157. LEFT2RIGHT    equ    01h        ;; left  to right
  158. RIGHT2LEFT    equ    02h        ;; right to left
  159. LEFT2LEFT    equ    03h        ;; left  to left
  160.  
  161. ;
  162. ; left/right mixer channel selection
  163. ;
  164.  
  165. ;    left channel values
  166.  
  167. L_FM        equ    01h
  168. L_IMIXER    equ    02h
  169. L_EXT        equ    03h
  170. L_INT        equ    04h
  171. L_MIC        equ    05h
  172. L_PCM        equ    06h
  173. L_SPEAKER    equ    07h
  174. L_FREE        equ    00h
  175. L_SBDAC     equ    00h
  176.  
  177. ;    right channel values
  178.  
  179. R_FM        equ    08h
  180. R_IMIXER    equ    09h
  181. R_EXT        equ    0Ah
  182. R_INT        equ    0Bh
  183. R_MIC        equ    0Ch
  184. R_PCM        equ    0Dh
  185. R_SPEAKER    equ    0Eh
  186. R_FREE        equ    0Fh
  187. R_SBDAC     equ    0Fh
  188.  
  189. ;    Mixer register bits
  190.  
  191. fMImixerbits    EQU    00010111B    ;; mixer control bit fields
  192. fMIspkrbits    EQU    01000000B    ;; speaker integrator field bits
  193. bMIdata     EQU    00000001B    ;; data bit
  194. bMIclock    EQU    00000010B    ;; clock strobe
  195. bMImistrb    EQU    00000100B    ;; mixer output strobe
  196. bMIna1        EQU    00001000B    ;; not used
  197. bMIvol        EQU    00010000B    ;; total volume enabled
  198. bMIna2        EQU    00100000B    ;; not used
  199. bMIspkrint    EQU    01000000B    ;; speaker integrator
  200. bMImonofm    EQU    10000000B    ;; make both FMs mono
  201.  
  202. bMIfmreset    EQU    bMIdata     ;; OPL3 FM chip reset
  203. bMIdacreset    EQU    bMIclock    ;; CODEC reset
  204. bMIsbreset    EQU    bMImistrb    ;; SB microprocessor reset
  205. bMI508reset    EQU    bMIvol        ;; MVA508 reset
  206.  
  207. ;    volume control channel #s
  208.  
  209. VOLMUTE     equ    40h        ;; MUTE button
  210. VOLLOUDENH    equ    41h        ;; LOUDNESS and ENHANCED STEREO switch
  211. VOLBASS     equ    42h        ;; BASS level setting
  212. VOLTREBLE    equ    43h        ;; TREBLE level setting
  213. VOLLEFT     equ    44h        ;; MASTER LEFT LEVEL settting
  214. VOLRIGHT    equ    45h        ;; MASTER RIGHT LEVEL settting
  215. VOLMODE     equ    46h        ;; Model Select Left/Stereo/Right
  216.  
  217. bVOLEbass    equ    0001b        ;; enhanced bass bit
  218. bVOLEstereo    equ    0010b        ;; enhanced stereo bit
  219.  
  220. ;    output control
  221.  
  222. pmADDRSELECT    equ    80h        ;; Parallel mixer addr select
  223. pmDATASELECT    equ    00h        ;; Parallel mixer data select
  224.  
  225. ;    mixer channel programming selection
  226.  
  227. pmCHANNELLR    equ    00h        ;; Left/Right channel select
  228. pmCHANNELL    equ    20h        ;; Left  channel only select
  229. pmCHANNELR    equ    40h        ;; Right channel only select
  230.  
  231. ;    device select
  232.  
  233. pmMIXERSELECT    equ    10h        ;; Parallel Mixer device select
  234. pmVOLUMESELECT    equ    00h        ;; Parallel Volume device select
  235.  
  236. ;    Volume Device selects
  237.  
  238. pmVOLUMEA    equ    01h        ;; Left/Right channel select
  239. pmVOLUMEB    equ    02h        ;; Left/Right channel select
  240. pmVOLUMEBASS    equ    03h        ;; Left/Right channel select
  241. pmVOLUMETREB    equ    04h        ;; Left/Right channel select
  242. pmVOLUMEMODE    equ    05h        ;; Left/Right channel select
  243.  
  244. ;    mixer selection
  245.  
  246. pmOUTPUTMIXER    equ    00h        ;; Mixer-A selection
  247. pmINPUTMIXER    equ    20h        ;; Mixer-B selection
  248.  
  249. ;    mixer channel swap
  250.  
  251. pmCHSWAP    equ    40h        ;; Mixer channel reroute
  252.                     ;;
  253. ;    int 2F application ID codes
  254.  
  255. INT2FCODE1    equ    0BCH        ;; Bryan's initials
  256.  
  257. ;    int 2F ID (func 0) return register values
  258.  
  259. INT2FREGBX    equ    6D00h        ;; 'm '
  260. INT2FREGCX    equ    0076h        ;; ' v'
  261. INT2FREGDX    equ    2020h        ;; UPPERCASE XOR MASK
  262.  
  263. ; hardware specific equates for the MV101 (digital ASIC)
  264.  
  265. MASTERADDRP    equ    09a01h        ;; Master Address Pointer    (w)
  266. MIDIPRESCALE    equ    01788h        ;; MIDI prescale         (r/w)
  267. MIDITIMER    equ    01789h        ;; MIDI Timer             (r/w)
  268. MIDIDATA    equ    0178ah        ;; MIDI Data             (r/w)
  269. MIDICONTROL    equ    0178bh        ;; MIDI Control          (r/w)
  270. MIDISTATUS    equ    01b88h        ;; MIDI Status             (r/w)
  271. MIDIFIFOS    equ    01b89h        ;; MIDI Fifo Status         (r/w)
  272. MIDICOMPARE    equ    01b8ah        ;; MIDI Compare Time         (r/w)
  273. MIDITEST    equ    01b8bh        ;; MIDI Test             (w)
  274. MASTERCHIPR    equ    0ff88h        ;; Master Chip Rev         (r)
  275. SLAVECHIPR    equ    0ef88h        ;; Slave Chip Rev         (r)
  276. ENHANCEDSCSI    equ    07f89h        ;; Enhanced SCSI detect port
  277. SYSCONFIG1    equ    08388h        ;; System Config 1         (r/w)
  278. SYSCONFIG2    equ    08389h        ;; System Config 2         (r/w)
  279. SYSCONFIG3    equ    0838ah        ;; System Config 3         (r/w)
  280. SYSCONFIG4    equ    0838bh        ;; System Config 4         (r/w)
  281. IOCONFIG1    equ    0f388h        ;; I/O Config 1          (r/w)
  282. IOCONFIG2    equ    0f389h        ;; I/O Config 2          (r/w)
  283. IOCONFIG3    equ    0f38ah        ;; I/O Config 3          (r/w)
  284. IOCONFIG4    equ    0f38bh        ;; I/O Config 4          (r/w)
  285. COMPATREGE    equ    0f788h        ;; Compatible Rgister Enable (r/w)
  286. EMULADDRP    equ    0f789h        ;; Emulation Address Pointer (r/w)
  287. WAITSTATE    equ    0bf88h        ;; Wait State             (r/w)
  288. PUSHBUTTON    equ    0e388h        ;; Push Button (slave)         (???)
  289. AUXINTSTAT    equ    0e38ah        ;; Aux Int Status         (???)
  290. AUXINTENA    equ    0e38bh        ;; Aux Int Enable         (???)
  291. OVRSMPPRE    equ    0bf8ah        ;; Over Sample Prescale      (r/w)
  292. ANALSERD    equ    0bf89h        ;; Analog Chip Serial Data   (w)
  293. MASTERMODRD    equ    0ff8bh        ;; Master Mode Read         (r)
  294. SLAVEMODRD    equ    0ef8bh        ;; Slave Mode Read         (r)
  295. INTWATCHDOG    equ    0fb8bh        ;; Interrupt Watch Dog         (???)
  296. MASTERuPDATA    equ    0fb88h        ;; Master uP Data         (???)
  297. MASTERuPCMD    equ    0fb89h        ;; Master uP Command/Status  (???)
  298. MASTERuPRST    equ    0fb8ah        ;; Master uP Restart         (???)
  299. SLAVEuPDATA    equ    0eb88h        ;; Slave uP Data         (???)
  300. SLAVEuPCMD    equ    0eb88h        ;; Slave uP Command/Status   (???)
  301. SLAVEuPRST    equ    0eb88h        ;; Slave uP Restart         (???)
  302. CDTOCOUNTER    equ    04388h        ;; CD-ROM timeout counter    (r/w)
  303. CDTOSTAT    equ    04389h        ;; CD-ROM timeout status     (r/w)
  304. LEFTVURD    equ    02388h        ;; Left VU Read          (r)
  305. RITVURD     equ    02389h        ;; Right VU Read         (r)
  306.  
  307. SBRST        equ    00206h        ;; SB Reset             (w)
  308. SBDATA        equ    0020Ah        ;; SB Data Read          (r)
  309. SBCMD        equ    0020Ch        ;; SB CMD Write/Status Read  (r/w)
  310. SBSTAT        equ    0020Eh        ;; SB Data Status         (r)
  311. MPUDATA     equ    00300h        ;; MPU-401 data reg         (r/w)
  312. MPUCMD        equ    00301h        ;; MPU-401 command reg         (r/w)
  313.  
  314. ; Sys Config 1
  315.  
  316. bSC1timena    equ    00000001b    ;; shadow enable
  317. bSC1pcmemu    equ    00000010b    ;; PCM Emulation of PAS1
  318. bSC128mhz    equ    00000100b    ;; 28mhz clock divisor
  319. bSC1invcom    equ    00001000b    ;; invert COM port interrupt input
  320. bSC1stspea    equ    00010000b    ;; stereoize pc speaker
  321. bSC1realsnd    equ    00100000b    ;; smart real sound emulatio
  322. bSC1d6        equ    01000000b    ;;
  323. bSC1mstrst    equ    10000000b    ;; master chip reset
  324.  
  325. ; Sys Config 2
  326.  
  327. bSC2ovrsmp    equ    00000011b    ;; oversampling 0,1,2,4
  328. bSC216bit    equ    00000100b    ;; 16 bit audio
  329. bSC212bit    equ    00001000b    ;; 12 bit interleaving (d2 must be set too)
  330. bSC2msbinv    equ    00010000b    ;; invert MSB from standard method
  331. bSC2slavport    equ    01100000b    ;; slave port bits
  332. bSC2vcolock    equ    10000000b    ;; VCO locked (Sample Rate Clock Valid)
  333.  
  334. ; Sys Config 3
  335.  
  336. bSC328mhzfil    equ    00000001b    ;; PCM Rate uses 28mhz
  337. bSC31mhzsb    equ    00000010b    ;; 1mhz timer for SB sample rate
  338. bSC3vcoinv    equ    00000100b    ;; invert VCO output
  339. bSC3bclkinv    equ    00001000b    ;; invert BCLK form 16 bit DAC
  340. bSC3lrsync    equ    00010000b    ;; 0=L/R, 1 = Sync Pulse
  341. bSC3d5        equ    00100000b    ;;
  342. bSC3d6        equ    01000000b    ;;
  343. bSC3d7        equ    10000000b    ;;
  344.  
  345. ; Sys Config 4
  346.  
  347. bSC4drqahi    equ    00000001b    ;; DRQ from drive active high
  348. bSC4dackahi    equ    00000010b    ;; DRQ from drive active high
  349. bSC4intahi    equ    00000100b    ;; INT from drive active high
  350. bSC4drqvalid    equ    00001000b    ;; DRQ line valid from drive
  351. bSC4comena    equ    00010000b    ;; enable COM interrupt
  352. bSC4enascsi    equ    00100000b    ;; enable SCSI interrupt
  353. bSC4drqptr    equ    11000000b    ;; DRQ timing pointer bits
  354.  
  355. ; I/O Config 1
  356.  
  357. bIC1ps2ena    equ    00000001b    ;; Enable Chip (PS2 only)
  358. bIC1comdcd    equ    00000110b    ;; COM port decode pointer
  359. bIC1comint    equ    00111000b    ;; COM port interrupt pointer
  360. bIC1joyena    equ    01000000b    ;; Enable joystick read
  361. bIC1wporena    equ    10000000b    ;; Enable warm boot reset
  362.  
  363. ; I/O Config 2
  364.  
  365. bIC2dmaptr    equ    00000111b    ;; DMA channel select
  366.  
  367. ;;bIC28dmaptr    equ    00001111b    ;;  8 bit DMA channel select
  368. ;;bIC216dmaptr    equ    11110000b    ;; 16 bit DMA channel select
  369.  
  370. ; I/O Config 3
  371.  
  372. bIC3pcmint    equ    00001111b    ;; pcm IRQ channel select
  373. bIC3cdint    equ    11110000b    ;; cd  IRQ channel select
  374.  
  375. ; Compatibility Register
  376.  
  377. cpMPUEmulation    equ    00000001b    ;; MPU emuation is on bit
  378. cpSBEmulation    equ    00000010b    ;; SB emuation is on bit
  379.  
  380. ; Emulation Address Pointer
  381.  
  382. epSBptr     equ    00001111b    ;; bit field for SB emulation
  383. epMPUptr    equ    11110000b    ;; bit field for MPU emulation
  384.  
  385. ; Slave Mode Read
  386.  
  387. bSMRDdrvtyp    equ    00000011b    ;; drive interface type
  388. bSMRDfmtyp    equ    00000100b    ;; FM chip type
  389. bSMRDdactyp    equ    00001000b    ;; 16 bit dac (1) or 8 bit dac (0)
  390. bSMRDimidi    equ    00010000b    ;; use internal MIDI
  391. bSMRDswrep    equ    10000000b    ;; switch is auto repeating
  392.  
  393. ; Master Mode Read
  394.  
  395. bMMRDatps2    equ    00000001b    ;; AT(1) or PS2(0) bus
  396. bMMRDtmremu    equ    00000010b    ;; timer emulation enabled
  397. bMMRDmsmd    equ    00000100b    ;; master/slave mode
  398. bMMRDslave    equ    00001000b    ;; slave power on or device present
  399. bMMRDattim    equ    00010000b    ;; xt/at timing
  400. bMMRDmstrev    equ    11100000b    ;; master  rev level
  401.  
  402. ; MIDI Control Register
  403.  
  404. bMCRenatstmp    equ    00000001b    ;; MIDI enable time stamp interrupt
  405. bMCRenacmptm    equ    00000010b    ;; MIDI enable compare time interrupt
  406. bMCRenafifoi    equ    00000100b    ;; MIDI enable FIFO input interrupt
  407. bMCRenafifoo    equ    00001000b    ;; MIDI enable FIFO output interrupt
  408. bMCRenafifooh    equ    00010000b    ;; MIDI enable FIFO output half int
  409. bMCRrstfifoi    equ    00100000b    ;; MIDI reset Input FIFO pointer
  410. bMCRrstfifoo    equ    01000000b    ;; MIDI reset Output FIFO pointer
  411. bMCRechoio    equ    10000000b    ;; MIDI echo input to output (THRU)
  412.  
  413. ; MIDI Status Register
  414.  
  415. bMSRtimstamp    equ    00000001b    ;; MIDI time stamp interrupt
  416. bMSRcmptime    equ    00000010b    ;; MIDI compare time interrupt
  417. bMSRififo    equ    00000100b    ;; MIDI input FIFO data avail interrupt
  418. bMSRofifo    equ    00001000b    ;; MIDI output FIFO empty interrupt
  419. bMSRofifohalf    equ    00010000b    ;; MIDI output FIFO half empty interrupt
  420. bMSRififoovr    equ    00100000b    ;; MIDI input FIFO overrun error
  421. bMSRofifoovr    equ    01000000b    ;; MIDI output FIFO overrun error
  422. bMSRframeerr    equ    10000000b    ;; MIDI frame error
  423.  
  424. ; MIDI FIFO count
  425.  
  426. bMFCififo    equ    00001111b    ;; MIDI input FIFO count
  427. bMFCofifo    equ    11110000b    ;; MIDI output FIFO count
  428.  
  429. ; Aux interrupt status/enable
  430.  
  431. bAUfmrit    equ    00000001b    ;; FM right interrupt
  432. bAUpushb    equ    00000010b    ;; push button active
  433. bAUslavecpu    equ    00000100b    ;; slave coprocessor
  434. bAUaux0int    equ    00001000b    ;; aux 0 interrupt
  435. bAUaux1int    equ    00010000b    ;; aux 1 interrupt
  436. bAUaux2int    equ    00100000b    ;; aux 2 interrupt
  437. bAUaux3int    equ    01000000b    ;; aux 3 interrupt
  438. bAUmastrcpu    equ    10000000b    ;; master coprocessor or emulation active
  439.  
  440. ; Push Buttons on the Front Panel
  441.  
  442. bPSHmute    equ    00000001b    ;; mute on the front panel
  443. bPSHdnarrow    equ    00000010b    ;; down arrow on the front panel
  444. bPSHuparrow    equ    00000100b    ;; up arrow on the front panel
  445. bPSauxbit1    equ    00001000b    ;; unused bit...
  446. bPSauxbit2    equ    00010000b    ;; unused bit...
  447. bPSauxbit3    equ    00100000b    ;; unused bit...
  448. bPSauxbit4    equ    01000000b    ;; unused bit...
  449. bPSauxbit5    equ    10000000b    ;; unused bit...
  450.  
  451. ;---------------------------====< PC HARDWARE >====---------------------------
  452.  
  453. ; Interrupt Controller #1 Port Addresses and Interrupt Masks
  454.  
  455. IRQ1MASKREG    EQU    021h        ;; 8259 mask register
  456. IRQ1ACKREG    EQU    020h        ;; 8259 INT acknowledge register
  457.  
  458. INT0MSK     EQU    00000001B    ;; interrupt 0 mask
  459. INT1MSK     EQU    00000010B    ;; interrupt 1 mask
  460. INT2MSK     EQU    00000100B    ;; interrupt 2 mask
  461. INT3MSK     EQU    00001000B    ;; interrupt 3 mask
  462. INT4MSK     EQU    00010000B    ;; interrupt 4 mask
  463. INT5MSK     EQU    00100000B    ;; interrupt 5 mask
  464. INT6MSK     EQU    01000000B    ;; interrupt 6 mask
  465. INT7MSK     EQU    10000000B    ;; interrupt 7 mask
  466.  
  467. ; Interrupt Controller #2 Port Addresses and Interrupt Masks
  468.  
  469. IRQ2MASKREG    EQU    0A1h        ;; 8259 mask register
  470. IRQ2ACKREG    EQU    0A0h        ;; 8259 INT acknowledge register
  471.  
  472. INT8MSK     EQU    00000001B    ;; interrupt 8 mask
  473. INT9MSK     EQU    00000010B    ;; interrupt 9 mask
  474. INTAMSK     EQU    00000100B    ;; interrupt A mask
  475. INTBMSK     EQU    00001000B    ;; interrupt B mask
  476. INTCMSK     EQU    00010000B    ;; interrupt C mask
  477. INTDMSK     EQU    00100000B    ;; interrupt D mask
  478. INTEMSK     EQU    01000000B    ;; interrupt E mask
  479. INTFMSK     EQU    10000000B    ;; interrupt F mask
  480.  
  481. EOI        EQU    020h        ;; non specific end of interrupt
  482.  
  483. ; dma controller #1 port addresses
  484.  
  485. DMAC0ADDR    EQU    000h        ;; DMA channel 0 Base & Current Address
  486. DMAC0COUNT    EQU    001h        ;; DMA channel 0 Base & Current Count
  487. DMAC1ADDR    EQU    002h        ;; DMA channel 1 Base & Current Address
  488. DMAC1COUNT    EQU    003h        ;; DMA channel 1 Base & Current Count
  489. DMAC2ADDR    EQU    004h        ;; DMA channel 2 Base & Current Address
  490. DMAC2COUNT    EQU    005h        ;; DMA channel 2 Base & Current Count
  491. DMAC3ADDR    EQU    006h        ;; DMA channel 3 Base & Current Address
  492. DMAC3COUNT    EQU    007h        ;; DMA channel 3 Base & Current Count
  493.  
  494. DMA2C4ADDR    EQU    0C0h        ;; DMA channel 4 Base & Current Address
  495. DMA2C4COUNT    EQU    0C2h        ;; DMA channel 4 Base & Current Count
  496. DMA2C5ADDR    EQU    0C4h        ;; DMA channel 5 Base & Current Address
  497. DMA2C5COUNT    EQU    0C6h        ;; DMA channel 5 Base & Current Count
  498. DMA2C6ADDR    EQU    0C8h        ;; DMA channel 6 Base & Current Address
  499. DMA2C6COUNT    EQU    0CAh        ;; DMA channel 6 Base & Current Count
  500. DMA2C7ADDR    EQU    0CCh        ;; DMA channel 7 Base & Current Address
  501. DMA2C7COUNT    EQU    0CEh        ;; DMA channel 7 Base & Current Count
  502.  
  503. DMARDSTAT    EQU    008h        ;; DMA read status
  504. DMAWRCNTRL    EQU    008h        ;; DMA write command register
  505. DMAWREQ     EQU    009h        ;; DMA write request register
  506. DMAWRSMR    EQU    00Ah        ;; DMA write single mask register
  507. DMAWRMODE    EQU    00Bh        ;; DMA write mode register
  508. DMACLEAR    EQU    00Ch        ;; DMA clear low/high flip-flop
  509. DMARDTEMP    EQU    00Dh        ;; DMA read temp register
  510. DMAWRCLR    EQU    00Dh        ;; DMA write master clear
  511. DMACLRMSK    EQU    00Eh        ;; DMA clear mask register
  512. DMAWRALL    EQU    00Fh        ;; DMA write all mask register bits
  513.  
  514. DMA2RDSTAT    EQU    0D0h        ;; DMA read status
  515. DMA2WRCNTRL    EQU    0D0h        ;; DMA write command register
  516. DMA2WREQ    EQU    0D2h        ;; DMA write request register
  517. DMA2WRSMR    EQU    0D4h        ;; DMA write single mask register
  518. DMA2WRMODE    EQU    0D6h        ;; DMA write mode register
  519. DMA2CLEAR    EQU    0D8h        ;; DMA clear low/high flip-flop
  520. DMA2RDTEMP    EQU    0DAh        ;; DMA read temp register
  521. DMA2WRCLR    EQU    0DAh        ;; DMA write master clear
  522. DMA2CLRMSK    EQU    0DCh        ;; DMA clear mask register
  523. DMA2WRALL    EQU    0DEh        ;; DMA write all mask register bits
  524.  
  525. CH0PAGEREG    EQU    087h        ;; Channel 0 Page Register
  526. CH1PAGEREG    EQU    083h        ;; Channel 1 Page Register
  527. CH2PAGEREG    EQU    081h        ;; Channel 2 Page Register
  528. CH3PAGEREG    EQU    082h        ;; Channel 3 Page Register
  529.  
  530. CH5PAGEREG    EQU    08Bh        ;; Channel 5 Page Register
  531. CH6PAGEREG    EQU    089h        ;; Channel 6 Page Register
  532. CH7PAGEREG    EQU    08Ah        ;; Channel 7 Page Register
  533.  
  534. ;
  535. ;   /*\
  536. ;---|*| end of COMMON.INC
  537. ;   \*/
  538. ;
  539.  
  540.  
  541. ; STATE.INC
  542.  
  543. ;   /*\
  544. ;---|*|----====< Pro Audio Spectrum Hardware State Table >====----
  545. ;---|*|
  546. ;---|*| Media Vision, Inc. (c) Copyright 1991. All Rights Reserved
  547. ;---|*|
  548. ;   \*/
  549.  
  550. STRUC    MVState
  551.   _sysspkrtmr     db    0    ;    42 System Speaker Timer Address
  552.   _systmrctlr     db    0    ;    43 System Timer Control
  553.   _sysspkrreg     db    0    ;    61 System Speaker Register
  554.   _joystick     db    0    ;   201 Joystick Register
  555.   _lfmaddr     db    0    ;   388 Left  FM Synth Address
  556.   _lfmdata     db    0    ;   389 Left  FM Synth Data
  557.   _rfmaddr     db    0    ;   38A Right FM Synth Address
  558.   _rfmdata     db    0    ;   38B Right FM Synth Data
  559.   _dfmaddr     db    0    ;   788 Dual  FM Synthesizer Address Register
  560.   _dfmdata     db    0    ;   789 Dual  FM Synthesizer Data Register
  561.          db    0    ;    reserved for future use
  562.   _paudiomixr     db    0    ;   78B Paralllel Audio Mixer Control
  563.   _audiomixr     db    0    ;   B88 Audio Mixer Control
  564.   _intrctlrst     db    0    ;   B89 Interrupt Status
  565.   _audiofilt     db    0    ;   B8A Audio Filter Control
  566.   _intrctlr     db    0    ;   B8B Interrupt Control
  567.   _pcmdata     db    0    ;   F88 PCM Data I/O Register
  568.   _RESRVD2     db    0    ;    reserved
  569.   _crosschannel  db    0    ;   F8A Cross Channel
  570.   _RESRVD3     db    0    ;    reserved
  571.   _samplerate     dw    0    ;  1388 Sample Rate Timer
  572.   _samplecnt     dw    0    ;  1389 Sample Count Register
  573.   _spkrtmr     dw    0    ;  138A Shadow Speaker Timer Count
  574.   _tmrctlr     db    0    ;  138B Shadow Speaker Timer Control
  575.   _mdirqvect     db    0    ;  1788 MIDI IRQ Vector Register
  576.   _mdsysctlr     db    0    ;  1789 MIDI System Control Register
  577.   _mdsysstat     db    0    ;  178A MIDI IRQ Status Register
  578.   _mdirqclr     db    0    ;  178B MIDI IRQ Clear Register
  579.   _mdgroup1     db    0    ;  1B88 MIDI Group #1 Register
  580.   _mdgroup2     db    0    ;  1B89 MIDI Group #2 Register
  581.   _mdgroup3     db    0    ;  1B8A MIDI Group #3 Register
  582.   _mdgroup4     db    0    ;  1B8B MIDI Group #4 Register
  583. ENDS
  584.  
  585.  
  586. ;   /*\
  587. ;---|*| end of STATE.H
  588. ;   \*/
  589.  
  590.  
  591.  
  592. ;   /*\
  593. ;---|*|----====< TARGET.INC >====----
  594. ;---|*|
  595. ;---|*| This file defines which product is being compiled. This is used
  596. ;---|*| for the PAS software libraries, etc.
  597. ;---|*|
  598. ;---|*| Copyright (c) 1992, Media Vision, Inc.    All Rights Reserved.
  599. ;---|*|
  600. ;---|*| To use this code, you must define one of the following variable names.
  601. ;---|*|
  602. ;---|*|    BUILD_NONE - General assembly of header. No target product defined
  603. ;---|*|    BUILD_PAS1 - Original Pro Audio Spectrum.
  604. ;---|*|    BUILD_PAS2 - Pro Audio Spectrum Plus.
  605. ;---|*|    BUILD_PAS3 - Pro Audio Spectrum 16.
  606. ;---|*|    BUILD_CDPC - CDPC.
  607. ;---|*|
  608. ;   \*/
  609.  
  610. ;;
  611. ;; Each product will some/all of of these features
  612. ;;
  613.  
  614. bMVA508     =    0000000000000001b    ; MVA508(1) or National(0)
  615. bMVPS2        =    0000000000000010b    ; PS2 bus stuff
  616. bMVSLAVE    =    0000000000000100b    ; CDPC Slave device is present
  617. bMVSCSI     =    0000000000001000b    ; SCSI interface
  618. bMVENHSCSI    =    0000000000010000b    ; Enhanced SCSI interface
  619. bMVSONY     =    0000000000100000b    ; Sony 535 interface
  620. bMVDAC16    =    0000000001000000b    ; 16 bit DAC
  621. bMVSBEMUL    =    0000000010000000b    ; SB h/w emulation
  622. bMVMPUEMUL    =    0000000100000000b    ; MPU h/w emulation
  623. bMVOPL3     =    0000001000000000b    ; OPL3(1) or 3812(0)
  624. bMV101        =    0000010000000000b    ; MV101 ASIC
  625. bMV101_REV    =    0111100000000000b    ; MV101 Revision
  626. bMV101_MORE    =    1000000000000000b    ; more bits in BX
  627.  
  628. ;;
  629. ;; Define the ASIC versions
  630. ;;
  631.  
  632. ASIC_VERSION_B    =    0000000000000010b    ; revision B
  633. ASIC_VERSION_C    =    0000000000000011b    ; revision C
  634. ASIC_VERSION_D    =    0000000000000100b    ; revision D
  635. ASIC_VERSION_E    =    0000000000000101b    ; revision E
  636. ASIC_VERSION_F    =    0000000000000110b    ; revision F
  637.  
  638. ;;
  639. ;; First Pro Audio Spectrum feature list
  640. ;;
  641. PRODUCT_PROAUDIO    =    bMVSCSI
  642.  
  643. ;;
  644. ;; Pro Audio Plus feature list
  645. ;;
  646. PRODUCT_PROPLUS     =    bMV101+      \
  647.                 bMVSCSI+     \
  648.                 bMVENHSCSI+  \
  649.                 bMVSBEMUL+   \
  650.                 bMVOPL3
  651. ;;
  652. ;; Pro Audio Spectrum 16 feature list
  653. ;;
  654. PRODUCT_PRO16        =    bMV101+      \
  655.                 bMVA508+     \
  656.                 bMVSCSI+     \
  657.                 bMVENHSCSI+  \
  658.                 bMVSBEMUL+   \
  659.                 bMVDAC16+    \
  660.                 bMVOPL3
  661. ;;
  662. ;; CDPC feature list
  663. ;;
  664. PRODUCT_CDPC        =    bMV101+      \
  665.                 bMVSLAVE+    \
  666.                 bMVSONY+     \
  667.                 bMVSBEMUL+   \
  668.                 bMVDAC16+    \
  669.                 bMVOPL3
  670.  
  671.  
  672. ; STUFF REMOVED FROM TARGET.INC...
  673.