home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
sources
/
custplay
/
readme.doc
< prev
Wrap
Text File
|
1997-08-13
|
3KB
|
100 lines
ASSEMBLER CUSTOM PLAYER V1.1
MIKAEL LUND, JANUARY 1997 - CODED IN ASMONE
Introduction:
This is an assembler source for using delitracker custom-modules in your own
code. It works almost like any other player where you need to call Init, Play
and End routines.
Usage:
In the top of your source you should include "custplay.i". Then you must set
the variables and call the subroutines explained below.
The custom-module you wish to use must NOT contain any hunks - which they
normally do. Therefore you must use a resource program that can convert these
hunks into source sections. Then place the source-version of the module in your
own source and label it CP_DATA.
Also you could load the custum-module as an object (RO in asm-one) and then
point CP_DATA to the first loaded address.
Variables:
CP_DATA This is the address where you must place your 'dehunked' custum
module.
CP_SPEED <byte>
This address controls the play-speed. 1 is fastest.
CP_SUBSONG <word>
Here the subsong is set (if any).
Subroutines:
CP_GETDATA Reads some important data from the custom-module. You should
call this subroutine before anything else.
CP_INIT Initializes soundroutine - Must be called before starting any
interrupts. Also it must be called when changing subsong.
Before calling this you should set the variables.
CP_PLAY Playing sound - Call from your interrupt.
CP_STARTI Some modules have their own interrupt-routine. If this is the
case you should not use the CP_PLAY call but simply call
CP_STARTI once.
CP_STOPI Stops the custom-interrupt routine. Call this when you want
to end the interrupt started with CP_STARTI
CP_END End-(stop)routine. Call this when you are finished playing.
Otherdata:
CP_MINSONG <byte>
Minimum sub-song number
CP_MAXSONG <byte>
Maximun sub-song number
CP_INTERRUPT <longword>
The address for the playroutine. = 0 if the module have it's own
interrupt.
CP_STARTINT <longword>
The address for the custom-interrupt. = 0 if the module must be
played using CP_PLAY
In rare cases the module contains both CP_INTERRUPT and
CP_STARTINT addresses. Here you must try which one works best.
An example is "cust.the_plague"
History:
1.1 · Examples now in pure ASCII-format
· Example 1 made shorter (different module)
1.0 · First release on Aminet
If you can make any additions to ACustplay, then feel free to do so - spread
it as much as you like. Just remember to send me a copy too.
Mail me if you're using ACustPlay in your productions - It would be nice to
know if someone is actually using this package:)
Author:
adr: Mikael Lund
Mannerupvej 5
4000 Roskilde
Denmark
e-mail: ki9656@unidhp.uni-c.dk
phn: +45 46496115