home *** CD-ROM | disk | FTP | other *** search
- TGP v1.3 ■ Quick Reference Chart ■ by Freaker / Tuc Underworld Corporation
- ------------------------------------------------------------------------------
-
- ■ TGP is Copyright (c)1994,95 by Gunther Voet, alias: Freaker / TuC'95.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 1.0 ░▒▓ Current installed devices in TGP. ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
-
- Device 0 = Autodetect best soundcard
- 1 = Speaker
- 2 = DAC
- 3 = SB
- 4 = SB / PRO
- 5 = SB / 16
- 6 = GUS [Gravis ultrasound + MAX]
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 2.0 ░▒▓ Information record of TGP. ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
-
- TYPE TGPI =
- RECORD
-
- VOLUME : BYTE; (* Current volume *)
-
- DETECT :
- RECORD
- DEVICE : ARRAY[1..6] OF (* Current device det *)
- RECORD
- PRESENT: BOOLEAN; (* Device present ? *)
- IRQ : BYTE; (* Interrupt *)
- PORT : WORD; (* Port *)
- DMA : BYTE; (* DMA channel *)
- END;
- END;
-
- BESTCARD : (* Best card installed
- in the system *)
- RECORD
- DEVICE : BYTE; (* Best devicenumber *)
- IRQ : BYTE; (* irq number *)
- PORT : WORD; (* port number *)
- DMA : BYTE; (* DMA channel *)
- END;
-
- FORCED : (* Forced device (you)*)
- RECORD
- IRQ : BYTE; (* irq number *)
- PORT : WORD; (* port number *)
- DMA : BYTE; (* dma channel *)
- DEVICE : BYTE; (* device number *)
- FREQ : WORD; (* Frequency *)
- END;
- END;
-
- VAR INFO : TGPI;
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 3.0 ░▒▓ Main variables and TGP directives. ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
-
- FILENAME : STRING; (* Filename to play *)
-
- DEBUGMODE : BOOLEAN; (* Debug mode *)
-
- (* This modus will give more information when loading or getting errors.
- it doesn't disturb the user with unusefull information. Default is off *)
-
-
- FORCEALL : BOOLEAN; (* Force all *)
-
- (* This modus will FORCE the player to do what YOU want with the player.
- This means: No errorchecking, and totally no debug messages. *)
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 3.1 ░▒▓ Main constant declarations. ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
-
- CURVOL = 255; {Used in TGP.VOLUME , exp: TGP.VOLUME(CURVOL) will return
- the current volume}
-
- CURFREQ = 65535; {Used in TGP.FREQ , exp: TGP.FREQ(CURFREQ) will return
- the current frequency}
-
- CURPOS = 65535; {Used in TGP.POSITION , exp: TGP.POSITION(CURPOS) will
- return the current mod position}
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.0 ░▒▓ Main procedures and functions of TGP. ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.1 ░▒▓ PROCEDURE TGP.QUICKSETUP; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Asks for setup information.
- in: n/a
- out: n/a
- notes: Can be used with LOADFILE, LOADOVL, LOADMEM.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.2 ░▒▓ PROCEDURE TGP.READCARDS; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Read all installed cards on software - detection.
- in: n/a
- out: n/a
- notes: This routine will initialize the INFO record of tgp.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.3 ░▒▓ PROCEDURE TGP.QUICKLOAD(AFILENAME: STRING;REASK : BOOLEAN); ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Quick load filename with interface.
- in: AFILENAME : filename to load.
- REASK: re-ask options for card-settings.
- out: n/a
- notes: After this procedure, you must still start the module.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.4 ░▒▓ PROCEDURE TGP.FASTUNINIT; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Fast - stop music & uninitialize.
- in: n/a
- out: n/a
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.5 ░▒▓ FUNCTION TGP.INITDRV: BYTE; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Initialize drivers currently installed in TGP
- in: n/a
- out: Current drivers present in TGP
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.6 ░▒▓ FUNCTION TGP.LOADFILE(FILENAME:STRING):INTEGER; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Load a filename.
- in: PATH+FILENAME.
- out: 0 if load successfull, 1 if non successfull.
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.7 ░▒▓ FUNCTION TGP.LOADOVL(POSPNTR:LONGINT):INTEGER; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Load from overlay position.
- in: Position in current file. (pointer)
- out: 0 if load successfull, 1 if non successfull.
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.8 ░▒▓ FUNCTION TGP.LOADMEM(POSPNTR:POINTER):INTEGER; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Load from memory.
- in: Position (pointer).
- out: 0 if load successfull, 1 if non successfull.
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.9 ░▒▓ PROCEDURE TGP.UNLOADMUS; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Unloads the music.
- in: n/a
- out: n/a
- notes: This will automatically stop the music and unitialize it.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.10 ░▒▓ FUNCTION TGP.INITCARD:INTEGER; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Initialize the card (after INITPLAYER, before STARTMUS)
- in: n/a
- out: Errorcode.
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.11 ░▒▓ PROCEDURE TGP.POLLBUFFER; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Poll buffer (not necessary, but can be called) (4k buffer)
- (calculate frame for 1/50 sec or 50hz in a 4k buffer)
- in: n/a
- out: n/a
- notes: TGP has autopolling from now on, so call this procedure ONLY if
- you use processor intensive procedures that requires +50hz a sec.
- POLLBUFFER will poll for 4k ipo 1k.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.12 ░▒▓ PROCEDURE TGP.POLLMUSIC; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Poll music (not necessary, but can be called) (1k buffer).
- (calculate frame for 1/50 sec or 50hz)
- in: n/a
- out: n/a
- notes: TGP has autopolling from now on, so call this procedure ONLY if
- you use processor intensive procedures that requires +50hz a sec.
- Look also to POLLBUFFER.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.13 ░▒▓ PROCEDURE TGP.STARTMUS; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Starts the music (duh)
- in: n/a
- out: n/a
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.13 ░▒▓ PROCEDURE TGP.STOPMUS; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Stops the music
- in: n/a
- out: n/a
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.14 ░▒▓ │
- │ FUNCTION TGP.INITPLAYER(VAR DEVICE,PORT:WORD;VAR IRQ,DMA:BYTE):INTEGER; │
- │ ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Initialize TGP. (player)
- in: DEVICE: device (1..6)
- PORT: BASE PORT IN WORD.
- IRQ: Interrupt (only SB, SB/PRO, SB16)
- DMA: Dma port (only SB16)
- out: Errorcode
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.15 ░▒▓ FUNCTION TGP.VOLUME(NEWVOL:BYTE):BYTE; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Change and/or returns the current volume.
- in: NEWVOL: 'CURVOL' if 'get' Volume, or any digit for change Volume.
- example: VOLUME(CURVOL) = GIVE CURRENT VOLUME
- out: Current Volume.
- notes: VOLUME(255) will give the current position without changing.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.16 ░▒▓ PROCEDURE TGP.POSITION(NEWPOS:WORD):WORD; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Change and/or returns position of modfile.
- in: NEWPOS: 'CURPOS' if 'get' position, or any digit for change position
- example: POSITION(CURPOS) = GIVE CURRENT POSITION
- out: Current position.
- notes: POSITION(65535) will give the current position without changing.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.17 ░▒▓ FUNCTION TGP.REALEXESIZE:LONGINT; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Returns real EXE size of current file.
- in: n/a
- out: Longint - size of executable/
- notes: You can pklite, lzexe, ... files without knowing the real exe
- size. Direct read from exe header.
- !!!: Do NOT modify header if you use this FUNCTION TGP.REALEXESIZE !
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.17 ░▒▓ FUNCTION TGP.BESTCARD:BYTE; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Returns the best card currently installed in your system.
- in: n/a
- out: Device number (1=SPK,2=DAC,3=SB,4=SBPRO,5=SB16,6=GUS)
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.18 ░▒▓ FUNCTION TGP.DETECTGUS:WORD; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Detects GUS base address (hardware)
- in: n/a
- out: hardware port (byte).
- notes: To convert to hex, use function "TGP.WORD2HEX"
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.18b░▒▓ FUNCTION TGP.DETECTSB:WORD; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Detects SB base address (hardware)
- in: n/a
- out: hardware port (byte).
- notes: To convert to hex, use function "TGP.WORD2HEX"
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.19 ░▒▓ FUNCTION TGP.WORD2HEX(BASE:WORD):WORD; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Convert WORD variable to HEXADECIMAL.
- in: base address (like 220)
- out: hexadecimal type of base.
- notes: n/a
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.20 ░▒▓ PROCEDURE TGP.SHOWDRV; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Shows current installed drivers in TGP with devicenumber.
- in: n/a
- out: n/a
- notes: This procedure does only make a writeln of the devices.
-
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.21 ░▒▓ FUNCTION TGP.FREQ(FREQSET:WORD):WORD; ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Change (and/or returns current) frequency.
- in: FREQSET: Set frequency.
- out: Current frequency/changed frequency.
- notes: Can only be done BEFORE initplayer !
- The current frequency can be get by using "TGP.FREQ(65535" or
- "TGP.FREQ(CURFREQ)".
-
- ┌─────────────────────────────────────────────────────────────────────────────┐
- │ 4.22 ░▒▓ │
- │ PROCEDURE TGP.FASTINIT(filename:string;DEVICE:word; │
- │ IRQ,DMA:BYTE;PORT,FREQ:WORD); ▓▒░ │
- └─────────────────────────────────────────────────────────────────────────────┘
- function: Fast initialize and load modfile.
- in: filename: modfile to load with path.
- device: device to use.
- irq: interrupt to use.
- dma: dma channel to use.
- port: port to use.
- freq: frequency to use.
- out: n/a
- notes: You need to use TGP.STARTMUS to start the music !
-
-
-
-
-
-
- -EOF- 05/07/95 05:50