_ _ _ ___ ___/\ _________/\ /\_____________/\________________ ___ _ _ \/\______________ / _ \/ _________ / ______________________ / __________ / _/ __/ \ ____)___\/ \ \_/ \/\___________ \/_ \ \ \_ \ \_ \__ \_ \_ / / \______\ /____________/________________/_____________/____________/kP ú-------`------'---------------------------------------------------------ú AEGiS CoRP HSC iNTERFACE V1.1 ----------------------------- Well, this is another TPU file that allows you to use muzic in your Pascal productions... It only works with TP7. The HSC format is not as powerful as MOD, S3M, XM ... but there are some reasons why you should use it instead of MOD files: 1/ The player size : The TPU is just about 6Ko. 2/ The songs size : A MOD file is very BIG, like 50/200Ko, but a HSC file size is just about 15Ko and a HSP is 5Ko. 3/ Playing a HSC file does not requires a SoundBlaster/GUS, you just need an AdLib compatible soudcard. I added a little compressor in this package. HSCOMP.EXE will compress your HSC files to make .HSP (HSC/Packed). The AGSHSC.TPU Loadfile function is 100% compatible with HSC and HSP files. uSAGE ----- In your program, just add a line "uses agshsc;" and you will be able to use the AEGiS HSC interface. An example .PAS file is included in the package. If you wanna play a song linked in your EXE file, add this line of code before calling the startmusic procedure : LOADED:=TRUE; AVAiLABLE PRoCEDuRES aND FUNCTiONS ---------------------------------- Function loadfile(filename:string) : boolean; This function will load the HSC or HSP file given as "filename" into memory. If the file could not be loaded, the function result will be FALSE. Procedure playmusic; This procedure will play a previously loaded song. Procedure stopmusic; Hehe ... Guess ;) Procedure fademusic; This procedure fades out the music. Procedure freemusic; WARNING! ALWAYS USE THIS PROCEDURE BEFORE EXITING YOUR PROGRAM OR LOADING ANOTHER SONG! IF YOU DON'T DO IT, YOUR COMPUTER WILL CRASH! Procedure startmusic(music : pointer; oldirq : boolean); This will play a HSC file (Not a HSP!) loaded at "music". If you set oldirq mode, the background player will save the 08h and 1Ch interrupt vectors and will call them 18.2 times / seconds. I strongly suggest you to set this one ON! This procedure allows you to link a HSC file to your EXE and play it. Procedure getplayerstate; This procedure will update a record with some useful infos: playerstate.note : array[1..9] of byte; - This is an array of all notes being played on each of the 9 channels. playerstate.instr : array[1..9] of byte; - This is an array of all active intruments on each of the 9 channels. playerstate.equalizer : aray[1..9] of byte; - This is an array of all equalizer values (0 -> 15) on each channel. playerstate.effect : array[1..9] of byte; - This is an array of all current effects on each channels. Description of the effects (hexadecimal): 00 : Nothing 01 : Jump to next pattern 02 : Pause 03 : Set instrument 1? : Manual slide up 2? : Manual slide down A? : Set carrier volume B? : Set modulator volume C? : Set instrument volume F? : Set speed playerstate.pattern : byte; - The current pattern playerstate.track : byte; - The current track playerstate.position : byte; - The current position ;) playerstate.playing : byte; - 0:Not playing / 1:playing HSP FiLE FoRMAT --------------- The HSP file format is just a RLE compressed version of the HSC. Thre are two EXE files included to covert HSC <-> HSP. The average compression ratio is about 40% All compressor/decompressor source code are available, just ask me :) oTHER THiNGS ------------ Big greetz to Chicken / ECR for writing the HSCOBJ !! The AEGiS HSC iNTERFACE is compiled using the last vesion (1.6) of HSCOBJ. HSCOBJ was made by CHiCKEN / ECR. HSC Format is (c) Neo Software. No commercial use is allowed withoutTrrRRrrZZZzzzzz...RRrrrRRRrZzzzZZZzzZZz I just ask a little thing in exchange of your using of AGSHSC.TPU: Please greet me in any proggy using my interface. If you can, please upload it to my board :) [THE DEADLiNE +331-46486763] Have phun with it. Number Six / AEGiS