home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / TUCPL13.ZIP / TUCGPLAY.ZIP / TUCGPLAY.REF < prev    next >
Encoding:
Text File  |  1995-07-06  |  15.2 KB  |  348 lines

  1. TGP v1.3 ■ Quick Reference Chart ■ by Freaker / Tuc Underworld Corporation
  2. ------------------------------------------------------------------------------
  3.  
  4.  ■ TGP is Copyright (c)1994,95 by Gunther Voet, alias: Freaker / TuC'95.
  5.  
  6.  
  7. ┌─────────────────────────────────────────────────────────────────────────────┐
  8. │ 1.0  ░▒▓  Current installed devices in TGP.                             ▓▒░ │
  9. └─────────────────────────────────────────────────────────────────────────────┘
  10.  
  11.  Device 0 = Autodetect best soundcard
  12.         1 = Speaker
  13.         2 = DAC
  14.         3 = SB
  15.         4 = SB / PRO
  16.         5 = SB / 16
  17.         6 = GUS                           [Gravis ultrasound + MAX]
  18.  
  19.  
  20. ┌─────────────────────────────────────────────────────────────────────────────┐
  21. │ 2.0  ░▒▓  Information record of TGP.                                    ▓▒░ │
  22. └─────────────────────────────────────────────────────────────────────────────┘
  23.  
  24. TYPE TGPI = 
  25.       RECORD
  26.  
  27.         VOLUME : BYTE;                                (* Current volume     *)
  28.  
  29.         DETECT : 
  30.           RECORD
  31.             DEVICE : ARRAY[1..6] OF                   (* Current device det *)
  32.                      RECORD
  33.                        PRESENT: BOOLEAN;              (* Device present ?   *)
  34.                        IRQ    : BYTE;                 (* Interrupt          *)
  35.                        PORT   : WORD;                 (* Port               *)
  36.                        DMA    : BYTE;                 (* DMA channel        *)
  37.                      END;
  38.           END;
  39.  
  40.         BESTCARD :                                    (* Best card installed
  41.                                                          in the system      *) 
  42.           RECORD
  43.             DEVICE : BYTE;                            (* Best devicenumber  *)
  44.             IRQ    : BYTE;                            (* irq number         *)
  45.             PORT   : WORD;                            (* port number        *)
  46.             DMA    : BYTE;                            (* DMA channel        *)
  47.           END;
  48.  
  49.           FORCED :                                    (* Forced device (you)*)
  50.           RECORD
  51.             IRQ    : BYTE;                            (* irq number         *)
  52.             PORT   : WORD;                            (* port number        *)
  53.             DMA    : BYTE;                            (* dma channel        *)
  54.             DEVICE : BYTE;                            (* device number      *)
  55.             FREQ   : WORD;                            (* Frequency          *)
  56.           END;
  57.       END;
  58.  
  59. VAR INFO : TGPI;
  60.  
  61.  
  62. ┌─────────────────────────────────────────────────────────────────────────────┐
  63. │ 3.0  ░▒▓  Main variables and TGP directives.                            ▓▒░ │
  64. └─────────────────────────────────────────────────────────────────────────────┘
  65.  
  66.    FILENAME  : STRING;                                (* Filename to play   *)
  67.  
  68.    DEBUGMODE : BOOLEAN;                               (* Debug mode         *)
  69.  
  70. (* This modus will give more information when loading or getting errors.
  71.    it doesn't disturb the user with unusefull information. Default is off   *)
  72.  
  73.  
  74.    FORCEALL : BOOLEAN;                                (* Force all          *)
  75.  
  76. (* This modus will FORCE the player to do what YOU want with the player.
  77.    This means: No errorchecking, and totally no debug messages.             *)
  78.  
  79. ┌─────────────────────────────────────────────────────────────────────────────┐
  80. │ 3.1  ░▒▓  Main constant declarations.                                   ▓▒░ │
  81. └─────────────────────────────────────────────────────────────────────────────┘
  82.  
  83.    CURVOL = 255;    {Used in TGP.VOLUME , exp: TGP.VOLUME(CURVOL) will return
  84.                      the current volume}
  85.  
  86.    CURFREQ = 65535; {Used in TGP.FREQ , exp: TGP.FREQ(CURFREQ) will return
  87.                      the current frequency}
  88.  
  89.    CURPOS = 65535;  {Used in TGP.POSITION , exp: TGP.POSITION(CURPOS) will
  90.                      return the current mod position}
  91.  
  92. ┌─────────────────────────────────────────────────────────────────────────────┐
  93. │ 4.0  ░▒▓  Main procedures and functions of TGP.                         ▓▒░ │
  94. └─────────────────────────────────────────────────────────────────────────────┘
  95.  
  96. ┌─────────────────────────────────────────────────────────────────────────────┐
  97. │ 4.1  ░▒▓  PROCEDURE TGP.QUICKSETUP;                                     ▓▒░ │
  98. └─────────────────────────────────────────────────────────────────────────────┘
  99. function: Asks for setup information.
  100.       in: n/a
  101.      out: n/a
  102.    notes: Can be used with LOADFILE, LOADOVL, LOADMEM.
  103.  
  104.  
  105. ┌─────────────────────────────────────────────────────────────────────────────┐
  106. │ 4.2  ░▒▓  PROCEDURE TGP.READCARDS;                                      ▓▒░ │
  107. └─────────────────────────────────────────────────────────────────────────────┘
  108. function: Read all installed cards on software - detection.
  109.       in: n/a
  110.      out: n/a
  111.    notes: This routine will initialize the INFO record of tgp.
  112.  
  113.  
  114. ┌─────────────────────────────────────────────────────────────────────────────┐
  115. │ 4.3  ░▒▓  PROCEDURE TGP.QUICKLOAD(AFILENAME: STRING;REASK : BOOLEAN);   ▓▒░ │
  116. └─────────────────────────────────────────────────────────────────────────────┘
  117. function: Quick load filename with interface.
  118.       in: AFILENAME : filename to load.
  119.           REASK: re-ask options for card-settings.
  120.      out: n/a
  121.    notes: After this procedure, you must still start the module.
  122.  
  123.  
  124. ┌─────────────────────────────────────────────────────────────────────────────┐
  125. │ 4.4  ░▒▓  PROCEDURE TGP.FASTUNINIT;                                     ▓▒░ │
  126. └─────────────────────────────────────────────────────────────────────────────┘
  127. function: Fast - stop music & uninitialize.
  128.       in: n/a
  129.      out: n/a
  130.    notes: n/a
  131.  
  132.  
  133. ┌─────────────────────────────────────────────────────────────────────────────┐
  134. │ 4.5  ░▒▓  FUNCTION TGP.INITDRV: BYTE;                                   ▓▒░ │
  135. └─────────────────────────────────────────────────────────────────────────────┘
  136. function: Initialize drivers currently installed in TGP
  137.       in: n/a
  138.      out: Current drivers present in TGP
  139.    notes: n/a
  140.  
  141.  
  142. ┌─────────────────────────────────────────────────────────────────────────────┐
  143. │ 4.6  ░▒▓  FUNCTION TGP.LOADFILE(FILENAME:STRING):INTEGER;               ▓▒░ │
  144. └─────────────────────────────────────────────────────────────────────────────┘
  145. function: Load a filename.
  146.       in: PATH+FILENAME.
  147.      out: 0 if load successfull, 1 if non successfull.
  148.    notes: n/a
  149.  
  150.  
  151. ┌─────────────────────────────────────────────────────────────────────────────┐
  152. │ 4.7  ░▒▓  FUNCTION TGP.LOADOVL(POSPNTR:LONGINT):INTEGER;                ▓▒░ │
  153. └─────────────────────────────────────────────────────────────────────────────┘
  154. function: Load from overlay position.
  155.       in: Position in current file. (pointer)
  156.      out: 0 if load successfull, 1 if non successfull.
  157.    notes: n/a
  158.  
  159.  
  160. ┌─────────────────────────────────────────────────────────────────────────────┐
  161. │ 4.8  ░▒▓  FUNCTION TGP.LOADMEM(POSPNTR:POINTER):INTEGER;                ▓▒░ │
  162. └─────────────────────────────────────────────────────────────────────────────┘
  163. function: Load from memory.
  164.       in: Position (pointer).
  165.      out: 0 if load successfull, 1 if non successfull.
  166.    notes: n/a
  167.  
  168.  
  169. ┌─────────────────────────────────────────────────────────────────────────────┐
  170. │ 4.9  ░▒▓  PROCEDURE TGP.UNLOADMUS;                                      ▓▒░ │
  171. └─────────────────────────────────────────────────────────────────────────────┘
  172. function: Unloads the music.
  173.       in: n/a
  174.      out: n/a
  175.    notes: This will automatically stop the music and unitialize it.
  176.  
  177.  
  178. ┌─────────────────────────────────────────────────────────────────────────────┐
  179. │ 4.10 ░▒▓  FUNCTION TGP.INITCARD:INTEGER;                                ▓▒░ │
  180. └─────────────────────────────────────────────────────────────────────────────┘
  181. function: Initialize the card (after INITPLAYER, before STARTMUS)
  182.       in: n/a
  183.      out: Errorcode.
  184.    notes: n/a
  185.  
  186.  
  187. ┌─────────────────────────────────────────────────────────────────────────────┐
  188. │ 4.11 ░▒▓  PROCEDURE TGP.POLLBUFFER;                                     ▓▒░ │
  189. └─────────────────────────────────────────────────────────────────────────────┘
  190. function: Poll buffer (not necessary, but can be called) (4k buffer)
  191.           (calculate frame for 1/50 sec or 50hz in a 4k buffer)
  192.       in: n/a
  193.      out: n/a
  194.    notes: TGP has autopolling from now on, so call this procedure ONLY if
  195.           you use processor intensive procedures that requires +50hz a sec.
  196.           POLLBUFFER will poll for 4k ipo 1k.
  197.  
  198.  
  199. ┌─────────────────────────────────────────────────────────────────────────────┐
  200. │ 4.12 ░▒▓  PROCEDURE TGP.POLLMUSIC;                                      ▓▒░ │
  201. └─────────────────────────────────────────────────────────────────────────────┘
  202. function: Poll music (not necessary, but can be called) (1k buffer).
  203.           (calculate frame for 1/50 sec or 50hz)
  204.       in: n/a
  205.      out: n/a
  206.    notes: TGP has autopolling from now on, so call this procedure ONLY if
  207.           you use processor intensive procedures that requires +50hz a sec.
  208.           Look also to POLLBUFFER.
  209.  
  210.  
  211. ┌─────────────────────────────────────────────────────────────────────────────┐
  212. │ 4.13 ░▒▓  PROCEDURE TGP.STARTMUS;                                       ▓▒░ │
  213. └─────────────────────────────────────────────────────────────────────────────┘
  214. function: Starts the music (duh)
  215.       in: n/a
  216.      out: n/a
  217.    notes: n/a
  218.  
  219.  
  220. ┌─────────────────────────────────────────────────────────────────────────────┐
  221. │ 4.13 ░▒▓  PROCEDURE TGP.STOPMUS;                                        ▓▒░ │
  222. └─────────────────────────────────────────────────────────────────────────────┘
  223. function: Stops the music
  224.       in: n/a
  225.      out: n/a
  226.    notes: n/a
  227.  
  228.  
  229. ┌─────────────────────────────────────────────────────────────────────────────┐
  230. │ 4.14 ░▒▓                                                                    │
  231. │    FUNCTION TGP.INITPLAYER(VAR DEVICE,PORT:WORD;VAR IRQ,DMA:BYTE):INTEGER;  │
  232. │      ▓▒░                                                                    │
  233. └─────────────────────────────────────────────────────────────────────────────┘
  234. function: Initialize TGP. (player)
  235.       in: DEVICE: device (1..6)
  236.           PORT: BASE PORT IN WORD.
  237.           IRQ: Interrupt (only SB, SB/PRO, SB16)
  238.           DMA: Dma port (only SB16)
  239.      out: Errorcode
  240.    notes: n/a
  241.  
  242.  
  243. ┌─────────────────────────────────────────────────────────────────────────────┐
  244. │ 4.15 ░▒▓  FUNCTION TGP.VOLUME(NEWVOL:BYTE):BYTE;                        ▓▒░ │
  245. └─────────────────────────────────────────────────────────────────────────────┘
  246. function: Change and/or returns the current volume.
  247.       in: NEWVOL: 'CURVOL' if 'get' Volume, or any digit for change Volume.
  248.  example: VOLUME(CURVOL) = GIVE CURRENT VOLUME
  249.      out: Current Volume.
  250.    notes: VOLUME(255) will give the current position without changing.
  251.  
  252.  
  253. ┌─────────────────────────────────────────────────────────────────────────────┐
  254. │ 4.16 ░▒▓  PROCEDURE TGP.POSITION(NEWPOS:WORD):WORD;                     ▓▒░ │
  255. └─────────────────────────────────────────────────────────────────────────────┘
  256. function: Change and/or returns position of modfile.
  257.       in: NEWPOS: 'CURPOS' if 'get' position, or any digit for change position
  258.  example: POSITION(CURPOS) = GIVE CURRENT POSITION
  259.      out: Current position.
  260.    notes: POSITION(65535) will give the current position without changing.
  261.  
  262.  
  263. ┌─────────────────────────────────────────────────────────────────────────────┐
  264. │ 4.17 ░▒▓  FUNCTION TGP.REALEXESIZE:LONGINT;                             ▓▒░ │
  265. └─────────────────────────────────────────────────────────────────────────────┘
  266. function: Returns real EXE size of current file.
  267.       in: n/a
  268.      out: Longint - size of executable/
  269.    notes: You can pklite, lzexe, ... files without knowing the real exe
  270.           size. Direct read from exe header.
  271.      !!!: Do NOT modify header if you use this FUNCTION TGP.REALEXESIZE !
  272.  
  273.  
  274. ┌─────────────────────────────────────────────────────────────────────────────┐
  275. │ 4.17 ░▒▓  FUNCTION TGP.BESTCARD:BYTE;                                   ▓▒░ │
  276. └─────────────────────────────────────────────────────────────────────────────┘
  277. function: Returns the best card currently installed in your system.
  278.       in: n/a
  279.      out: Device number (1=SPK,2=DAC,3=SB,4=SBPRO,5=SB16,6=GUS)
  280.    notes: n/a
  281.  
  282.  
  283. ┌─────────────────────────────────────────────────────────────────────────────┐
  284. │ 4.18 ░▒▓  FUNCTION TGP.DETECTGUS:WORD;                                  ▓▒░ │
  285. └─────────────────────────────────────────────────────────────────────────────┘
  286. function: Detects GUS base address (hardware)
  287.       in: n/a
  288.      out: hardware port (byte).
  289.    notes: To convert to hex, use function "TGP.WORD2HEX"
  290.  
  291. ┌─────────────────────────────────────────────────────────────────────────────┐
  292. │ 4.18b░▒▓  FUNCTION TGP.DETECTSB:WORD;                                   ▓▒░ │
  293. └─────────────────────────────────────────────────────────────────────────────┘
  294. function: Detects SB base address (hardware)
  295.       in: n/a
  296.      out: hardware port (byte).
  297.    notes: To convert to hex, use function "TGP.WORD2HEX"
  298.  
  299.  
  300. ┌─────────────────────────────────────────────────────────────────────────────┐
  301. │ 4.19 ░▒▓  FUNCTION TGP.WORD2HEX(BASE:WORD):WORD;                        ▓▒░ │
  302. └─────────────────────────────────────────────────────────────────────────────┘
  303. function: Convert WORD variable to HEXADECIMAL.
  304.       in: base address (like 220)
  305.      out: hexadecimal type of base.
  306.    notes: n/a
  307.  
  308.  
  309. ┌─────────────────────────────────────────────────────────────────────────────┐
  310. │ 4.20 ░▒▓  PROCEDURE TGP.SHOWDRV;                                        ▓▒░ │
  311. └─────────────────────────────────────────────────────────────────────────────┘
  312. function: Shows current installed drivers in TGP with devicenumber.
  313.       in: n/a
  314.      out: n/a
  315.    notes: This procedure does only make a writeln of the devices.
  316.  
  317.  
  318. ┌─────────────────────────────────────────────────────────────────────────────┐
  319. │ 4.21 ░▒▓  FUNCTION TGP.FREQ(FREQSET:WORD):WORD;                         ▓▒░ │
  320. └─────────────────────────────────────────────────────────────────────────────┘
  321. function: Change (and/or returns current) frequency.
  322.       in: FREQSET: Set frequency.
  323.      out: Current frequency/changed frequency.
  324.    notes: Can only be done BEFORE initplayer !
  325.           The current frequency can be get by using "TGP.FREQ(65535" or
  326.           "TGP.FREQ(CURFREQ)".
  327.  
  328. ┌─────────────────────────────────────────────────────────────────────────────┐
  329. │ 4.22  ░▒▓                                                                   │
  330. │ PROCEDURE TGP.FASTINIT(filename:string;DEVICE:word;                         │
  331. │                                          IRQ,DMA:BYTE;PORT,FREQ:WORD);  ▓▒░ │
  332. └─────────────────────────────────────────────────────────────────────────────┘
  333. function: Fast initialize and load modfile.
  334.       in: filename: modfile to load with path.
  335.           device: device to use.
  336.           irq: interrupt to use.
  337.           dma: dma channel to use.
  338.           port: port to use.
  339.           freq: frequency to use.
  340.      out: n/a
  341.    notes: You need to use TGP.STARTMUS to start the music !
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348. -EOF- 05/07/95   05:50