home *** CD-ROM | disk | FTP | other *** search
/ Audio 4.94 - Over 11,000 Files / audio-11000.iso / msdos / sndbords / proaudio / fddmairq / fddmairq.bat < prev    next >
DOS Batch File  |  1993-01-19  |  2KB  |  64 lines

  1. @echo off
  2. if "%debug%" == "yes" echo on
  3.  
  4.     :: fddmairq.bat - find valid dma/irq combos
  5.     :: this .bat file calls itself 
  6.     :: when started with the name of a sound file, it calls itself
  7.     :: for every dma/irq combination
  8.  
  9.     :: if no arguments, display syntax
  10.  
  11.     if "%1" == ""         goto syntax
  12.  
  13.     :: if not 3 arguments, then generate dma/irq combos
  14.  
  15.     if "%3" == ""        goto gencmdline
  16.  
  17.     :: program card with dma/irq combo
  18.     :: if not a valid combo, quit
  19.     :: play the sound
  20.     :: if no looping, echo GOOD
  21.  
  22.     proas d:%1 q:%2 | grep -Q.nz \x07
  23.     if errorlevel 1     goto quit
  24.     tpcm %3
  25.     if not errorlevel 1     echo DMA:%1 IRQ:%2 is GOOD!
  26.                 goto quit
  27.  
  28. :gencmdline
  29.     :: verify tsr's are not loaded
  30.     :: we reprogram the card, so they can't be loaded
  31.  
  32.     pcm -s
  33.     if errorlevel 1        goto uhohpcm
  34.     pcmfun -s
  35.     if errorlevel 1        goto uhohpcmfun
  36.  
  37.     :: foreach dma
  38.     :: foreach irq
  39.     :: run the .bat file with dma/irq combo and the sound file name
  40.  
  41.     fe dma ( [0-6] ) do fe irq ( [01-15] ) do call %0 $dma $irq %1 
  42.                 goto quit
  43.  
  44. :syntax
  45.     echo Syntax: fddmairq sound.wav
  46.     echo Use this program to locate valid DMA/IRQ channels
  47.     echo Requires that "pcm.com" and "pcmfun.com" NOT be loaded.
  48.     echo Requires "proas.exe", "tpcm.exe" and "pcm.com" in the PATH.
  49.     goto quit
  50.  
  51. :uhohpcm
  52.     echo Sorry, "pcm.com" must NOT be loaded, as we are changing IRQ/DMA on the fly.
  53.     goto quit
  54.  
  55. :uhohpcmfun
  56.     echo Sorry, "pcmfun.com" must NOT be loaded, as we are changing IRQ/DMA on the fly.
  57.     goto quit
  58.  
  59. :quit
  60.     cat nul
  61.  
  62.  
  63.  
  64.