home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: The Developer …nd Blaster Series Disk 2 / Lowe_TheDeveloperKitForSoundBlasterSeriesDisk2.img / TPASCAL / GENERAL / SBCBLST.PAS next >
Encoding:
Pascal/Delphi Source File  |  1991-09-26  |  2.4 KB  |  72 lines

  1. { ------------------------------------------------------------------------ }
  2. {  @@ Source Documentation                           *** TP6 Version ***   }
  3. {                                                                          }
  4. {  Copyright (c) Creative Technology Pte Ltd, 1991. All rights reserved.   }
  5. {                                                                          }
  6. {   TITLE       : SBCBLST.PAS                                              }
  7. {                                                                          }
  8. {   DESCRIPTION :                                                          }
  9. {       The program checks the BLASTER environment variable for the Card   }
  10. {       settings. It also performs a test based on the BLASTER environment }
  11. {       settings to ensure they tally with the hardware settings on the    }
  12. {       Card.                                                              }
  13. { ------------------------------------------------------------------------ }
  14.  
  15. program sbcblst;
  16.  
  17. { Include the SBC Unit, and any other units needed }
  18. uses sbc_tp6;
  19.  
  20.  
  21. { ------------------------------------------------------------------------ }
  22.  
  23. { main function }
  24.  
  25. const
  26.     CardType: array[0..2] of string[18] = (
  27.         'Sound Blaster',
  28.         'Sound Blaster Pro',
  29.         'Sound Blaster 2.0'
  30.     );
  31.  
  32. var
  33.     wFeature : word;
  34.  
  35. begin  { program body }
  36.  
  37.     if GetEnvSetting = 0 then begin
  38.  
  39.         wFeature := sbc_check_card;
  40.  
  41.         if wFeature <> 0 then begin
  42.  
  43.             if Boolean(sbc_test_int) then begin
  44.  
  45.                 if sbc_test_dma >= 0 then begin
  46.  
  47.                     writeln(CardType[_wCardID-1],' card installed at :');
  48.                     writeln('    Interrupt   : ', _ct_int_num);
  49.                     writeln('    DMA Channel : ', _ct_dma_channel);
  50.                     writeln;
  51.  
  52.                     if Boolean(wFeature and $0002) then
  53.                         writeln('FM music available.');
  54.  
  55.                     if Boolean(wFeature and $0004) then
  56.                         writeln('Creative voice available.');
  57.  
  58.                 end
  59.                 else
  60.                     writeln('Error on DMA channel.');
  61.             end
  62.             else
  63.                 writeln('Error on interrupt.');
  64.         end
  65.         else
  66.             writeln('Sound Blaster card not found or wrong I/O setting.');
  67.     end
  68.     else
  69.         writeln('BLASTER environment variable not set or incomplete or invalid.');
  70. end.
  71.  
  72.