
                            * CapaPlay ][ 1.6b *
            (c) Copyright 1993-1995 Heikki Ylinen (flap / Capacala)

         CapaPlay ][ may freely be used in any production as long as
      credits are given to its author Heikki Ylinen (flap / Capacala).


*************************** History of CapaPlay ][ ****************************


   Date       Version
12.11.1995	0.1b	Original version.
			MOD and S3M supported.

14.11.1995	0.2b	Many bugs fixed and some effects changed
		
16.11.1995	0.3b	Fixed bugs in loader
			Optimized the instrument information memory usage

17.11.1995	0.4b	Fixed a bug in row system
			Some changes with sample playing routines
			
30.11.1995	0.5b	Fixed a bug in S3M default panning
			Fixed a bug in S3M effect converter
			
10.12.1995	0.6b	First version of XM loader
			  (no envelopes nor autovibratos)
			Fixed a period convert bug in MOD loader
			Big changes in the main player routine

11.12.1995	0.7b	Linear frequency table supported
			Changes in frequency calculation system

14.12.1995	0.8b	Fadeout supported
			Autovibrato supported
			Changes in volume calculation system
			Fixed a bug in 16-bit sample load

17.12.1995	0.9b	Volume and panning envelopes supported
			Fixed a bug in portamento with linear frequency table
			Fixed a bug in XM sample loader
			Fixed a bug in 16-bit sample player
			Fixed a bug in vibrato

19.12.1995	1.0b	Fixed a bug in XM pattern loader

23.12.1995	1.1b	Fixed a bug in XM portamento
			Fixed a bug in sample mute
			Fixed a bug in break pattern
			Changes in the sample loader
			  if there isn't room for 16-bit sample, it'll be
			  converted into 8-bits
			Fixed a bug in pattern delay
			Fixed a bug in jump to loop
			Added global jump to loop (for S3Ms)
			Added effect set envelope position
			Fixed a bug in envelopes
			Fixed a bug in 16-bit sample loader
			Added support for MOD-like delay note

 8. 1.1996	1.2b	Fixed a bug in module identifier
 			Only the used part of sample is now loaded to GUS
 			  this fixes problems with some looping samples
 
15. 1.1996	1.3b	Fixed a bug in key off with set volume
			Fixed a bug in S3M Sxx effect repeat

21. 1.1996	1.4b	Support for DMA transfer
			Fixed a bug with sample loop length 0 (XMs)
			Fixed a bug in volume envelope with samples above 6

 5. 2.1996	1.5b	Fixed a bug if only new sample is given (MODs)
			Optimizes the channel usage with all modules
			Fixes in DMA transfer
			Fixed a bug in vibratos
			  especially with linear frequency table
			Fixed a bug in tempo calculation
			Fixed a bug in sample offset

 6. 2.1996	1.6b	Fixed an irritating bug in sample offset


************************** Some Info on CapaPlay ][ ***************************


   The assembler part of CapaPlay ][ (CP2ASM.OBJ) is compiled in large model.
 The code and data resides in the same segment.

   Most of the commands are pretty obvious, but there are a few commands that
 require a little explanation.


 * CP_GetIRQ(), CP_GetDMA() and CP_GetBasePort() 

 Value returned is the one determined by the ULTRASND envrionment variable


 * CP_LoadModule(char *ModName,dword ReadPoint,byte TransferMode) and
   CP_LoadPatterns(char *ModName,dword ReadPoint,byte TransferMode)

 ReadPoint	- offset of module data in file
 TransferMode	- 1=DMA, 0=manual

 Value returned is as follows:

 	0	No error 
 	1	File not found
 	2	File read error
 	3	Out of memory
 	4	Unknown module format
	5	Unknown module version


 * CP_StartModule(byte Amplification,byte DefaultPanning,byte TimerMode)

 TimerMode	- 1=GUS IRQ, 0=system timer


 * CP_GetModuleType()

 Value returned is as follows: 1=MOD, 2=S3M, 3=XM


 * CP_PlaySample(byte ChannelNum,int InstrumentNum,int SampleNum,byte Note,byte Octave)

 ChannelNum must be above CP_GetNumOfUsedChannels and 
 CP_GetNumOfUsedChannels must be below 16 to use this command

 
 * CP_GetChannelEffect(int ChannelNum)
 
 Value returned is as follows:

 00	Arpeggio			20	Tremor
 01	Slide Up			21	Extra Fine Slide Up
 02	Slide Down			22	Extra Fine Slide Down
 03	Tone Portamento			23	Set Global Volume
 04	Vibrato				24	Fine Vibrato
 05	Tone Portamento + Volume Slide	25	Global Volume Slide
 06	Vibrato + VolumeSlide		26	Set Envelope Position
 07	Tremolo				27		-
 08	Set Panning			28		-
 09	Set Sample Offset		29		-
 0A	Volume Slide			2A		-
 0B	Position Jump			2B		-
 0C	Set Volume			2C		-
 0D	Pattern Break			2D		-
 0E	Set Tempo			2E		-
 0F	Set Speed			2F		-
 10 x	Set Filter			30		-
 11	Fine Slide Up			31		-
 12	Fine Slide Down			32		-
 13	Glissando Control		33		-
 14	Set Vibrato Waveform		34		-
 15	Set Fine Tune			35		-
 16 1)	Jump to Loop			36		-
 17	Set Tremolo Waveform		37		-
 18	Panning Slide			38		-
 19	Retrig Note			39		-
 1A	Fine Volume Slide Up		3A		-
 1B	Fine Volume Slide Down		3B		-
 1C	Cut Note			3C		-
 1D 2)	Delay Note			3D		-
 1E	Delay Pattern			3E		-
 1F x	Invert Loop			3F		-

 40-7F -
 
 x = not supported
 1) If bit 7 of effect parameters is set, jump to loop is handled as channel
    independent (S3Ms)
 2) If bit 7 of effect parameters is set, new volume for channel will be set
    immediately (MODs)

