home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
ADVHSC18.ZIP
/
ADVHSC.DOC
next >
Wrap
Text File
|
1994-11-04
|
13KB
|
348 lines
ANTARES DEMO DiViSiON DOCUMENTATION - HSC PLAYER PASCAL VERSION
May 13 1994 - Version 1.5 - Written By Access/ADV [PUBLiC RELEASE]
June 18 1994 - Version 1.6 - Functions Added
July 2 1994 - Version 1.7 - Bugfix / Functions Added
August 28 1994 - Version 1.8 - CleanUp / Correction Of Documentation
A N T A R E S
H.S.C. P L A Y E R
F O R T U R B O P A S C A L 7
FM Music Power !
Version 1.8
Coding & Packaging By Access/ADV
Original Object Player By Chicken/ECR
══════════════════════════════════════════════════════════════════════════════
1 ) H.S.C. ??????
H.S.C. Is The Name Of The Format Used By The FM Tracker Of
Chicken/ECR. This Unit Allow You To Easily Replay These
Module In Your Production Without The Need Of Using Assembler.
Even Beginner Should Normaly Able To Use This Piece Of Code (
If Not, Return To Your Joystick And Play Doom ;)
The Advantage Of The Music is in his Size : A Module Took Only +- 15Ko
This is little in comparaison of SoundTracker Module !
══════════════════════════════════════════════════════════════════════════════
2 ) Package
Normaly, The ZIP Contain The Following Files :
ADVHSC.TPU - The Main TPU Used By The Player.
EXAMPLE.PAS - A Example Of How To Use These TPU In IRQ Mode
EXAMPLE.EXE - The Compiled Version Of The First Example
EXAMPLE2.PAS - A Example Of How To Use These TPU In Polling Mode
EXAMPLE2.EXE - The Compiled Version Of The Second Example
EXAMPLE3.PAS - Another Example To Show You How To Do Raster & Music
EXAMPLE3.EXE - The Compiled Version Of The Third Example
EQUAL.PAS - Show The Use Of The GetPlayerState Function
EQUAL.EXE - The Compiled Version Of The Equalizer Demo
ADVHSC.DOC - This File.
MUZIK.HSC - A Little HSC File If You Don't Have The HSCTracker
Package.
ANTARES.EXE - A Little Information File For Our Group
( Music By Our TPU )
It's Possible ( And Probable :) That You Will Find Some Other Files Inside
The Archive ( BBS Addy, Group Addy ). Simply Note That These
Files Are *NOT* From Us.
══════════════════════════════════════════════════════════════════════════════
3 ) The TPU : ADVHSC.TPU
Note : A ## Symbol Indicate Modification Since The Last Version.
This TPU Contain All The Functions You Need To Replay Correctly HSC Files.
FUNCTION DETECTADLIB(SUGGESTEDPORT:WORD):WORD;
This Function Tell You About The Presence Of A Compatible
Adlib Card In Your System. The Function Return The Base Port Of
The Card Or FFh If A Error As Occured During The AutoDetect Process
( No Card For Example :). SUGGESTEDPORT Is Your Suggestion
About A Possible Port ( Useful If You Have 2 SoundCards ).
If SUGGESTEDPORT=0 Then Auto Detection Is Used.
This Function Is For Your Information Only, The Player Have His Own
Adlib Detection Routine.
PROCEDURE TOGGLERASTER;
This Procedure Toggle The Raster Bar At The Top Of The Screen.
This Raster Show You The Time Used By The Player To Do His
Work. If You Don't Understand : Try! :)
The Procedure Works Like A On/Off Switch.
FUNCTION LOADSONG(FILENAME:STRING):BOOLEAN;
## Now, LOADSONG iS A *FUNCTION* !!!!
This Function Allocate Memory And Load A SongFile Into
Memory.
## Now, Some Error Checking iS Done : If The File Don't Exist Or
## There iS Not Enough Memory To Load The Module, The Function Return
## FALSE. If All Was Done Correctly ( Module Loaded) A TRUE iS
## Returned.
FILENAME Is A Valid DOS Filename ( Don't Forget To Include The
Extension ! )
PROCEDURE CLEARMEM;
This Procedure De-Allocate Memory Allocated By LOADSONG. You
*NEED* To Call This Procedure Before Exiting ! ( Otherwise, Serious
Crash Can Occur ! )
N.B. Only Needed If You Have Used The LOADSONG Procedure.
PROCEDURE SETMODE(MODE:BYTE;OLDINT:BYTE);
This Procedure Setup The Replay Mode Of The Player.
MODE = 0 : The Player Will Use IRQ To Play The Music. ( Default )
= 1 : The Player Need To Be Called Throught The Polling Procedure
This Approach Is Better Is You Use Raster, Scroll Or Other
Things Like That. ( SEE EXAMPLE2.PAS )
OLDINT = 0 : The Old Int 1Ch Is Called By The Player ( Probably Used By
Another Program. This is The Default Setting ).
= 1 : Don't Call The Old Interrupt.
PROCEDURE PLAYSONG;
This Procedure Play The Song Previously Loaded By LOADSONG.
PROCEDURE PLAYSONGMEMORY(SONG:POINTER);
This Procedure Play A Song Located Somewhere In Memory. SONG
Is A 32 Bit Pointer To This Song. Useful If You Have HardCoded
The Music In Your Executable With Utility Like BINOBJ Or
ZIP2OBJ.
TIPS : Using BINOBJ ->
Your MuZik File = MUSIC.HSC
Use :
BINOBJ MUSIC.HSC MUSIC.OBJ MUSICDATA
In Your Program :
{$F+}
{$L MUSIC.OBJ}
Procedure MUSICDATA; External; Far;
{$F-}
To Play Music :
PLAYSONGMEMORY( @MUSICDATA );
Great, No ? =)
PROCEDURE POLLMUSIC;
This Procedure Is Used Only If You Have Put The Player Into
POLL Mode ( See The SETMODE Procedure ). It *MUST* Be Called
At Least 18 Time Per Second ( More Is Not A Problem ).
See Examples For More Information...
PROCEDURE SETUSERIRQ(LINK:BOOLEAN;ROUTINE:POINTER);
This Procedure Permit To Link The Player Interrupt To A User
Own Made Routine. That Will Mean That Each Time The IRQ Is
Called, The User Routine Will Be Called Too. The User Routine
Must End With a RETF Instruction. This One iS Great For Making
Equalizer For Example.
Parameters :
LINK = TRUE : Call The User Routine
= FALSE : Don't Call Any User Routine
ROUTINE : A 32 Bit Pointer To The User Routine
Tips: To Obtain The Pointer, Use
SETUSERIRQ(TRUE,@USERIRQ);
Where USERIRQ Is The Name Of Your Procedure To Call During IRQ.
PROCEDURE FADESONG;
This Procedure Turn The Volume Down To Produce A Fade Out Of The Music.
WARNING! The Procedure Didn't Wait The End Of The Process.
So You Need To Wait A Little Before Stopping The Music. A
Delay Of 2-3 Seconds Seem To Be Good.
Example : FADESONG;
DELAY(3000);
STOPSONG;
PROCEDURE STOPSONG;
This Procedure Stop All Playing.
WARNING! Memory Is *NOT* Released. You Must Do It By Calling CLEARMEM.
Tips: You Could Play A Song Again After Stopping... Simply Call
PLAYSONG Again :)
PROCEDURE GETPLAYERSTATE;
This Procedure Give You Some Information About The Playing Of The
FM Module. All The Information Are Returned Into A Array Called
PLAYERSTATE . Here is the Definition Of The Array :
Type PlayerStateType = Record
Note : Array[1..9] Of Byte; { Note }
Instr : Array[1..9] Of Byte; { Instrument Number }
Equalizer : Array[1..9] Of Byte; { Equalizer Value }
Peak : Array[1..9] Of Byte; { No Music : 0, Music : $FF }
Pattern : Byte; { Current Pattern }
Track : Byte; { Current Track }
Position : Byte; { Current Position }
Playing : Byte; { Is There Music Currently Playing? 0=No,1=Yes }
End;
Var PlayerState : PlayerStateType;
The Variable is Declared INTO The TPU, So You *DON'T* To Do It
Yourself. For More Information, See The Example File Called
EQUAL.PAS.
FUNCTION SONGSIZE:LONGINT;
This Function Return The Size In Byte Of The Loaded Song.
══════════════════════════════════════════════════════════════════════════════
## 4) Technical Note
Please Note That There iS No More A Second TPU ... Thanks To
Chicken For Debugging HiS HSCOBJ !
══════════════════════════════════════════════════════════════════════════════
5 ) Disclaimer
The Author Cannot Be Held Responsible For Any Damage Due To
The Use Of This Product. You Use It At Your Own Risk.
So, If You Put The Cat Into The Fridge While Programming or There
is Radioactive MushRoom Waving In Your PC During Playing, It's Not
My Fault...OKay ?
Don't Forget That I Do Coding For *FUN* Only !
*No Commercial Use Without Written Permission Of The Author*
Bla...
Bla..
Bla.
And If You Are *NOT* Happy With This Thingy, DO IT YOURSELF ! |^>
══════════════════════════════════════════════════════════════════════════════
6 ) Contacting Antares & The Creator Of ADVHSC ...
So You Want To Join The Antares Fan Club ? Hum... We Have
Already A Lots Of People And I Begin To Be Difficult To Manage
All These Fans... :) Try Anyway ...
Write To : Or Give A Call To The Antares WHQ :
Access / Antares ULTiMAT BBS - ANTARES WHQ
( Main OrganiZer ) + 32-2-375.56.51
Rue Du Millénaire 3 Open 24H A Day / 2400->19200
7080 Frameries ZyXel - SysOp : Cobra/ADV
Belgium
If Ya Want To Chat With Me, Call +32-65-66.70.40
Only *FRENCH* & *ENGLISH* Please !
( Decent Hour - Ask For Francois )
Our Group iS Always Looking For New Members... So, If You Feel
That You Will Have Fun With Us, Contact Me !
- GFX ARE WELCOME ! -
══════════════════════════════════════════════════════════════════════════════
9 ) Some Greets Flying To :
The NFF Crew - Hi Spinal! Hope You Will Not See This Things Like A
Offense To Your Own TPU. ;)
Your VV MiniTro iS Great!
Imphobia/Cascada - When Speed Mean Something... ;)
HyperNova - Raytrace Rules!
The iMAGiNE Crew - You Did It! her her her Kwel! ;)
Babylon -5- - WiRED ... We Did it!
The Orme - We want more !
Blue Adonis / Traxx - Traxx Members are Real animals! ;)
The UnderTaker/Tragedy - My Favorite Belgian House Maker! HardCore RuleZ!!!
The Planet E DiskZine - No More Issue ?
Extented Architecture - Hi Markus! Keep In Touch !
Sub-Normal - RTBF Rules! ;) Waiting For Your Report
N-Factor - Tseng Labs Rules!
Melting Pots - Houba! Houba! ;)
$PA - 3DS For Ever!
Tragedy - Bam! Bam! wow! ;)
Outlaws - Better Than LD Party No ? :)
TFL / TDV - Da Belgian Scene iS Alive!
Radical - Autodesk Animator Power! <g>
Nice Meeting You! Waiting For Your Report
And To All People Who Attended WiRED'94... See ya Next Year And
Don't Miss The CD-Rom!
And Of Course To All SysOp & CoSysOp Of Antares HQ & DiSTro !
Sorry For All The Forgotten ...
══════════════════════════════════════════════════════════════════════════════
10 ) REVISION HISTORY
Version 1.0ß - First Version
Added PlaySongMemory,StopSong,FadeSong
PERSONAL USE ONLY
Version 1.0 - Added LoadSong,ClearMem,SongSize
FOR ANTARES MEMBER ONLY
Version 1.5 - First Public Release
May 1994 Added SetUserIRQ,ToggleRaster,DetectAdlib,SetMode,PollMusic
Rewrite Of The Assembly Part Of HSCOBJ.TPU.
Some Experiment With GetPlayerState
Version 1.6 - LoadSong ReWritted
June 1994 Some Debugging...
GetPlayerState Removed
Size Shrinked Down To ...... 2 Ko Of Code !
Version 1.7 - LoadSong One More Time ReWritted (*FIXED* This Time)
July 94 GetPlayerState Re-Added ! Now Equalizer Information!
No More 2 Tpu !
We Are Now Using The *NEW* HSCOBJ Version 1.5!
*EVEN* Smaller ! ( thanks Chicken!! )
More Examples...
Version 1.8 - Documentation Corrected
August 94 Code OptimiZation & CleanUp
══════════════════════════════════════════════════════════════════════════════