**
**  $Filename: misc/EaglePlayer.i
**  $Release: 1.50 $
**  $Revision: 11$
**  $Date: 09/30/93$
**
** Definitions and Macros for creating EaglePlayer Playermodules
**
**	(C) Copyright 1993 by DEFECT
**	    All Rights Reserved
**
**

	IFND	EAGLEPLAYER_I
EAGLEPLAYER_I	SET	1

	IFND	Exec_Types_i
		Include	"Exec/Types.i"
	ENDC

	IFND	DeliTracker_Player_i
		Include	"Misc/DeliPlayer.i"
	ENDC


EAGLEVERSION	EQU	6			;Current Version of EaglePlayer


*--------------------------- New EaglePlayer Tags ----------------------------*
EP_TagBase	EQU	TAG_USER+"EP"


	ENUM	EP_TagBase		;EaglePlayer-TagBase

	EITEM	EP_Get_ModuleInfo	;get Pointer to Moduleinfo Taglist
	EITEM	EP_Free_ModuleInfo	;free Taglist (e.g. Free Mem)
	EITEM	EP_Voices		;Set the Voices
	EITEM	EP_SampleInit		;not used yet
	EITEM	EP_SampleEnd		;not used yet
	EITEM	EP_Save
	EITEM	EP_ModuleChange
	EITEM	EP_ModuleRestore
	EITEM	EP_StructInit		;Return Pointer to Userprg.Struct (UPS_)
	EITEM	EP_StructEnd		;Free Struct (e.g. Free allocated Mem)
	EITEM	EP_LoadPlConfig		;Load Config of Player
	EITEM	EP_SavePlConfig		;Save Config of Player
	EITEM	EP_GetPositionNr	;return Patternnumber (in D0.l)
	EITEM	EP_SetSpeed		;Set Speed (for Players with own Timer)
					;Value submitted in D0
	EITEM	EP_Flags		;see below
	EITEM	EP_KickVersion		;min Kickstartversion
	EITEM	EP_PlayerVersion	;min EP-Version
	EITEM	EP_CheckModule		;Checks the module (d0=Error or zero)
	EITEM	EP_EjectPlayer
	EITEM	EP_Date			;Creator-Date (e.g 11.05.1993
					;11.b, 05.b, 1993.w )
	EITEM	EP_Check3
	EITEM	EP_SaveAsPT		;Save Module as Protrackermodule

	EITEM	EP_NewModuleInfo	;TI_Data -> Pointer to Moduleinfo Taglist



*********** end of player interface enumeration for EaglePlayer ***********



*------------------------- EaglePlayer EP_Flags --------------------------*
*    if you use EP_Flags, please set all functions your player offers     *

EPF_Songend	EQU	1			;Songend
EPF_Restart	EQU	2			;Player restartable
EPF_Disable	EQU	3			;Player disabled (1=yes)
EPF_NextSong	EQU	4			;
EPF_PrevSong	EQU	5			;
EPF_NextPatt	EQU	6			;
EPF_PrevPatt	EQU	7			;
EPF_Volume	EQU	8			;
EPF_Balance	EQU	9			;
EPF_Voices	EQU	10			;
EPF_Save	EQU	11			;
EPF_Analyzer	EQU	12			;
EPF_ModuleInfo	EQU	13			;
EPF_SampleInfo	EQU	14			;
EPF_Packable	EQU	15			;
EPF_VolVoices	EQU	16			;
EPF_InternalUPSStructure EQU	17			;

EPB_Songend	EQU	1<<EPF_Songend
EPB_Restart	EQU	1<<EPF_Restart
EPB_Disable	EQU	1<<EPF_Disable
EPB_NextSong	EQU	1<<EPF_NextSong
EPB_PrevSong	EQU	1<<EPF_PrevSong
EPB_NextPatt	EQU	1<<EPF_NextPatt
EPB_PrevPatt	EQU	1<<EPF_PrevPatt
EPB_Volume	EQU	1<<EPF_Volume
EPB_Balance	EQU	1<<EPF_Balance	
EPB_Voices	EQU	1<<EPF_Voices
EPB_Save	EQU	1<<EPF_Save
EPB_Analyzer	EQU	1<<EPF_Analyzer
EPB_ModuleInfo	EQU	1<<EPF_ModuleInfo
EPB_SampleInfo	EQU	1<<EPF_SampleInfo
EPB_Packable	EQU	1<<EPF_Packable
EPB_VolVoices	EQU	1<<EPF_VolVoices
EPB_InternalUPSStructure EQU 1<<EPF_InternalUPSStructure

*---------------------------- Module-Info Tags -------------------------------*
MI_TagBase	EQU TAG_USER+"MI"

	ENUM	MI_TagBase			; TagBase

	EITEM	MI_SongName			;Pointer to Songname
	EITEM	MI_AuthorName			;Pointer to Authorname
	EITEM	MI_SubSongs			;Subsongs
	EITEM	MI_Pattern			;highest PatternNr
	EITEM	MI_MaxPattern			;Max Patterm (SoundTr. 64)
	EITEM	MI_Length			;Length of Module
	EITEM	MI_MaxLength			;Max Length (SoundTr. 128)
	EITEM	MI_Steps			;Steps (SoundMon)
	EITEM	MI_MaxSteps			;Max Steps
	EITEM	MI_Samples			;Number of used Samples
	EITEM	MI_MaxSamples			;Max Samples (SoundTr 31)
	EITEM	MI_SynthSamples			;Number of used SynthSamples
	EITEM	MI_MaxSynthSamples		;Max SynthSamples
	EITEM	MI_Songsize			;Songsize in Bytes
	EITEM	MI_SamplesSize			;Samplessize in Bytes
	EITEM	MI_ChipSize			;needed Chip-Size in Bytes
	EITEM	MI_OtherSize			;FastRam (MDAT-Files) in Bytes
	EITEM	MI_Calcsize			;calculated length of module in Bytes
	EITEM	MI_SpecialInfo			;Pointer to InfoText
	EITEM	MI_LoadSize			;Loadsize (TFMX,Startrekker) in Bytes
	EITEM	MI_Unpacked			;Unpacked Size (e.g. Noise-
						;Packer) in Bytes
	EITEM	MI_UnPackedSystem		;MIUS (see below) or APTR
						;to Soundsysname
	EITEM	MI_Prefix			;Save-Prefix (e.g. "MOD." or
						;"Mdat.")
	EITEM	MI_About			;TI_Data points on a string
						;telling something about this
						;Soundsystem
	EITEM	MI_MaxSubSongs			;Max SubSongs
	EITEM	MI_Voices			;used Voices
	EITEM	MI_MaxVoices			;Max Voices



*--------- Unpacked Soundsystems (intern),more follow ---------------------*
MIUS_OldSoundTracker	EQU	1
MIUS_SoundTracker	EQU	2
MIUS_NoiseTracker	EQU	3
MIUS_ProTracker		EQU	4
MIUS_SizeOF		EQU	4


*------------------------------ Sample-Info Tags --------------------------*
*   only as example, Sampleinfo is for Future Use in EaglePlayer, private  *

 STRUCTURE EP_Sampletable,0

	APTR	EPS_NextSample			; Next SampleTag-Structure
	APTR	EPS_Name			; Name of Sample
	ULONG	EPS_Adr				; Adr of sample
	ULONG	EPS_Length			; Length of sample
	ULONG	EPS_Repeat			; Repeat
	ULONG	EPS_Replen			; Replen
	ULONG	EPS_Period			; default Sampleperiod
	ULONG	EPS_Volume			; default Volume
	UWORD	EPS_Type			; SampleType
	UWORD	EPS_Flags			; Flags for this Samplestructure

	LABEL	EPS_SizeOF			; to be extended !!!!!!



*------------------------------- Sample types ------------------------------*
USITY_RAW		EQU	0
USITY_IFF		EQU	1
USITY_FMSynth		EQU	2
USITY_AMSynth		EQU	3
USITY_Unknown		EQU	4

*--------------- Sample-Flags for one SampleInfo-TagStructure --------------*
USIF_Playable		EQU	0
USIF_Saveable		EQU	1

USIB_Playable		EQU	1<<USIF_Playable
USIB_Saveable		EQU	1<<USIF_Saveable


*--------- User-Program-Structure (every player should be use this) ---------*
*--------------- no Taglist used for higher access speed --------------------*
* how to use:                                                                *
* the player sets everytime it accesses the audio-hardware these following   *
* values ; the UPS_VoiceXPer is most important, is it 0 means it that no new *
* note was played, is it different from 0 , all current Userprograms use this* 
* as a new note ; the minimum to see something in the analyzers is period in *
* connection with Volume (should be easy), additionally Address and Length   *
* are recommended for the Quadra/Stereo/MonoScope ; don`t forget to set the  *
* flags, see below                                                           *

 STRUCTURE UPS_USER,0
						;for Voice 1
	APTR	UPS_Voice1Adr			;Adr of Samplestart
	UWORD	UPS_Voice1Len			;Size of Sample
	UWORD	UPS_Voice1Per			;Periode of Sample
	UWORD	UPS_Voice1Vol			;Volume of Sample
	UWORD	UPS_Voice1Note			;Note (unused)
	UWORD	UPS_Voice1SampleNr		;SampleNr
	UWORD	UPS_Voice1SampleType		;SampleType
	UWORD	UPS_Voice1Repeat		;Repeat on

	LABEL	UPS_Modulo			;MemSize for one Voice

						;for Voice2
	APTR	UPS_Voice2Adr			;Adr of Samplestart
	UWORD	UPS_Voice2Len			;Length of Sample
	UWORD	UPS_Voice2Per			;Periode of Sample
	UWORD	UPS_Voice2Vol			;Volume of Sample
	UWORD	UPS_Voice2Note			;Note (unused)
	UWORD	UPS_Voice2SampleNr		;SampleNr
	UWORD	UPS_Voice2SampleType		;SampleType
	UWORD	UPS_Voice2Repeat		;Repeat on

						;for Voice3
	APTR	UPS_Voice3Adr			;Adr of Samplestart
	UWORD	UPS_Voice3Len			;Length of Sample
	UWORD	UPS_Voice3Per			;Periode of Sample
	UWORD	UPS_Voice3Vol			;Volume of Sample
	UWORD	UPS_Voice3Note			;Note (unused)
	UWORD	UPS_Voice3SampleNr		;SampleNr
	UWORD	UPS_Voice3SampleType		;SampleType
	UWORD	UPS_Voice3Repeat		;Repeat on

						;for Voice4
	APTR	UPS_Voice4Adr			;Adr of Samplestart
	UWORD	UPS_Voice4Len			;Length of Sample
	UWORD	UPS_Voice4Per			;Periode of Sample
	UWORD	UPS_Voice4Vol			;Volume of Sample
	UWORD	UPS_Voice4Note			;Note (unused)
	UWORD	UPS_Voice4SampleNr		;SampleNr
	UWORD	UPS_Voice4SampleType		;SampleType
	UWORD	UPS_Voice4Repeat		;Repeat on

	UWORD	UPS_DMACon			;Voices on/off 15=all on
						;Name irritating, better was
						;VoicesStaus, Use like the
						;real Dmacon, Bit x set,
						;Voice x on

	UWORD	UPS_Flags			;Flags , see below
	UWORD	UPS_Enabled			;Zero = Read enabled
	UWORD	UPS_Reserved			;unused

	LABEL	UPS_SizeOF

*--------------------------- Flags to UPS_Flags ---------------------------*
* these Flags tell, which analyzerfunctions the actual player is able to do*

UPSFL_Adr	EQU	0		;submits Sampleaddress
UPSFL_Len	EQU	1		;submits Samplesize
UPSFL_Per	EQU	2		;submits Period (important !)
UPSFL_Vol	EQU	3		;submits Volume
UPSFL_Note	EQU	4		;corrently not used
UPSFL_SNr	EQU	5		;corrently not used
UPSFL_STy	EQU	6		;corrently not used
UPSFL_DMACon	EQU	7		;submits which Voices are on/off
UPSFL_Res	EQU	8

UPSB_Adr	EQU	1<<UPSFL_Adr
UPSB_Len	EQU	1<<UPSFL_Len
UPSB_Per	EQU	1<<UPSFL_Per
UPSB_Vol	EQU	1<<UPSFL_Vol
UPSB_Note	EQU	1<<UPSFL_Note
UPSB_SNr	EQU	1<<UPSFL_SNr
UPSB_STy	EQU	1<<UPSFL_STy
UPSB_DMACon	EQU	1<<UPSFL_DMACon
UPSB_Res	EQU	1<<UPSFL_Res

**----------------------- User-Program-Start-Structure -----------------**
**	This Structure must be initialized in the executable file	**
**	EUS_Next,EUS_UserNr don`t use, important !!!			**
**	EUS_Flags,EUS_WinX,EUS_WinY,EUS_Special can be initialized      **
**      (will be changed if prefs are loaded :)-=-=  )                  **

 STRUCTURE USERPRG_START,0
	UWORD	EUS_Jmp			;bra.s (bra.b) to the real start of the
					;userprogram (usually direct after this
					;struct  (MUST be a BRA.S !!!!!)
	STRUCT	EUS_Identifier,10	;Identifier "EP-USERPRG"
	APTR	EUS_Next		;Don`t Use !!! only for Eagleplayer
	UWORD	EUS_UserNr		;don`t change, only for Eagleplayer

	APTR	EUS_EPBase		;Pointer to the Eagleplayerglobals
	APTR	EUS_Unused1		;Future use (don't change)
	APTR	EUS_Unused2		;Future use (don't change)

	APTR	EUS_PName		;Processname of this UserPrg
					;e.g. 'Analyzer.Task'
	APTR	EUS_Creator		;Creatorname e.g. "BUGGS"
	APTR	EUS_AboutUPRG		;tells something about this Userprg.
	UWORD	EUS_KickStart		;min Kickversion 0=All , 37 = OS 2.0
	ULONG	EUS_EPVersion		;min. EagleplayerVersion
	UWORD	EUS_Version		;Userprg. Version  eg. 37 \not very
	UWORD	EUS_Revision		;Userprg. Revision eg.175 /important
	APTR	EUS_UserName		;Name for PullDownMenu (max.14 Chars)
	UWORD	EUS_WinX		;User-Window X-Position
	UWORD	EUS_WinY		;User-Window Y-Position
	UWORD	EUS_Flags		;Flags (Iconify/ZipWindow,Window Open),
					;see below
	ULONG	EUS_Special		;SpecialInfos (e.g. AnalyzerMode)

	ULONG	EUS_CreatorDate		;Creatordate (e.g 14.b 6. 1993.w)
	UBYTE	EUS_Priority		;TaskPriority of UserPrg
	UBYTE	EUS_Reserved1		;set zero, don`t change
	UWORD	EUS_Reserved2		;set zero, don`t change
	ULONG	EUS_Reserved3		;set zero, don`t change
	ULONG	EUS_Reserved4		;set zero, don`t change

	LABEL	EUS_SizeOF



*------------------------------- EUS-Flags -------------------------------*
EUSF_Openwin	EQU	0	;Window to be opened when started ?
				;Bit set = yes
EUSF_Zipwin	EQU	1	;Zipwindow/Iconify when started ?
				;Bit set = yes
EUSB_Openwin	EQU	1<<EUSF_Openwin
EUSB_Zipwin	EQU	1<<EUSF_Zipwin

*------------ Special Informations for Analyzer (EUS_special) ---------------*
;First Byte: 00 = Scroller off   01 = Scroller on
;Second Byte:01..07,$f0,$f1,$ef,$e2 - Modes
;Third Byte: 01 = standard Peek on 
;            02 = extended Peek on (falling down)
;            00 = Peek off

*---------------------- EagleUserProgram-Identifier ----------------------*
EUSN_Identifier MACRO
		dc.b	'EP-USERPRG'
		ENDM

*---------------- Analyzer and Eagleplayer Message-Structure -------------*
 STRUCTURE UM_Message,0
	STRUCT	UM_ExecMessage,20	;Exec-Message
	APTR	UM_TaskAdr		;UserPrg-TaskAdr
	ULONG	UM_Signal		;UserPrg-Signal for Interrupt-Signal
	ULONG	UM_Type			;MessageType
	UWORD	UM_Class		;Message-Class
	APTR	UM_StructAdr		;UPS_StructAdr
	APTR	UM_UserPort		;Pointer to UserProgram-Port
	UWORD	UM_UserNr		;UserPrg-Nr
	UWORD	UM_Enabled		;1=Enable (Window close->no Signal)
	ULONG	UM_Command		;Command from Userprog to EP
	ULONG	UM_ArgString		;Argument to Command (EPT-Struct or 0)
	ULONG	UM_Result		;Returned Errornumber (0=no error)
	APTR	UM_UserWindow		;Pointer to Window of Userprogram
	LABEL	UM_SizeOF

*------------------------------- Messagetypes -----------------------------*
USM_Userprg		EQU	1	;Message from UserPrg to EP
USM_Eagleplayer		EQU	2	;Message from Eagleplayer to ...
USM_Externalprg		EQU	3	;Message from an External Program to EP

*----------------------------- Message-Classes ----------------------------*
USClass_Dummy		EQU	0	;no class (maybe new StructAdr)
USClass_Activate	EQU	1	;Start Work e.g. Open Window
USClass_DeActivate	EQU	2	;e.g. Close Window (just Pause,NO Exit!)
USClass_Exit		EQU	3	;Exit UserPrg (only to UserPrg)
USClass_Zipwin		EQU	4
USClass_Unzipwin	EQU	5
USClass_NewUserPrg	EQU	6	;Return-Message bei UserPrg-Start
USClass_GetConfig	EQU	7	;EUS_Flags,EUS_Winx,EUS_Winy,EUS_special have
					;to be initialized by Userprogram  before
					;replying the Message
USClass_NewConfig	EQU	8	;EUS_Flags,EUS_Winx,EUS_Winy,EUS_special
					;countain new Values (the Userprogram has to
					;utilize this new datas)
USClass_LockEP		EQU	9	;Eagleplayer sets Waiting Pointer and
					;does nothing until USCLASS_UNLOCKEP
					;comes, be shure to unlock the EP
					;again (be carefully, call UnLock only
					;as often as you called Lock)
USClass_UnLockEP	EQU	10	;Free Eagleplayer to work on
USClass_Command		EQU	11	;Command to Eagleplayer, future
					;use (e.g. NextPattern,Stop)
USClass_Answer		EQU	12	;Command came back, in UM_Arg and
					;UM_Arg2 results
USClass_QuitEagle	EQU	13	;Makes the Eagleplayer quit

*---------------------------------------------------------------------------*
 STRUCTURE EaglePlayerText,0
	APTR	EPT_Next		;Pointer to Next EPT-Struct
	LONG	EPT_Result1		;Arg or Returnvalue
	LONG	EPT_Result2		;Arg or Returnvalue
	LONG	EPT_StringSize		;Size of allocated Mem (Struct+String)
	LABEL	EPT_String		;String Itself


*------------------------- Userprogram-Commandos ---------------------------*
UCM_Status		EQU	1		;String
UCM_LoadModuleNr	EQU	2		;-1 = Filerequester
UCM_CloseAllOtherUserPrg EQU	3
UCM_OpenAllOtherUserPrg	EQU	4
UCM_PubScreen		EQU	5
UCM_Quit		EQU	6		;Quit Eagleplayer
UCM_AboutEP		EQU	7
UCM_ScrollText		EQU	8
UCM_Iconify		EQU	9
UCM_HelpMode		EQU	10		;not imlemented
UCM_HelpMe		EQU	11		;not imlemented
UCM_DeleteFile		EQU	12
UCM_UserPrg		EQU	13
UCM_LoadConfig		EQU	14
UCM_SaveConfig		EQU	15
UCM_AddUserPrg		EQU	16
UCM_HelpFile		EQU	17		;not imlemented
UCM_NewFont		EQU	18
UCM_LoadModule		EQU	19
UCM_SaveModule		EQU	20
UCM_Eject		EQU	21
UCM_PrevSong		EQU	22
UCM_NextSong		EQU	23
;UCM_PlaySong		EQU	24		;not implemented
UCM_PrevPatt		EQU	25
UCM_NextPatt		EQU	26
UCM_PrevModule		EQU	27
UCM_NextModule		EQU	28
UCM_Pause		EQU	29
UCM_Play		EQU	30
UCM_Stop		EQU	31
UCM_ReplaySong		EQU	32
UCM_AboutModule		EQU	33
UCM_OpenMainWindow	EQU	34
UCM_OpenPlWindow	EQU	35
;UCM_OpenSIWindow	EQU	36		;not imlemented
;UCM_OpenMIWindow	EQU	37		;not imlemented
UCM_CloseMainWindow	EQU	38
UCM_ClosePlWindow	EQU	39
;UCM_CloseSIWindow	EQU	40		;not imlemented
;UCM_CloseMIWindow	EQU	41		;not imlemented
UCM_AddPlayer		EQU	42
UCM_AddPlDir		EQU	43
UCM_DelPlayer		EQU	44
UCM_DeleteAll		EQU	45
UCM_Enable		EQU	46
UCM_Disable		EQU	47
UCM_LoadPlConfig	EQU	48
UCM_SavePlConfig	EQU	49
UCM_DefaultSpeed	EQU	50
UCM_SlowerSpeed		EQU	51
UCM_FasterSpeed		EQU	52
UCM_Filter		EQU	53
UCM_FadeOut		EQU	54
UCM_FadeIn		EQU	55
UCM_QuickStart		EQU	56
UCM_SetProgramMode	EQU	57
UCM_SongEnd		EQU	58
UCM_TimeOut		EQU	59
UCM_ScrollInfos		EQU	60
UCM_LoadDir		EQU	61
UCM_AutoDir		EQU	62
UCM_FlashPointer	EQU	63
UCM_RandomSong		EQU	64
UCM_MasterVolume	EQU	65
UCM_Overwrite		EQU	66
UCM_LoadAlways		EQU	67
UCM_UseSongName		EQU	68
UCM_GetModList		EQU	69		;not imlemented
UCM_GetPlList		EQU	70		;not imlemented
UCM_GetUserPrgList	EQU	71		;not imlemented
UCM_GetSampleList	EQU	72		;not imlemented
UCM_SetIconifyMode	EQU	73
UCM_AutoSubSong		EQU	74
UCM_ShowDirNames	EQU	75
UCM_SetCrunchMode	EQU	76
UCM_GetPassword		EQU	77
UCM_AutomaticSave	EQU	78
UCM_SetSaveDir		EQU	79
UCM_SSDir		EQU	80
UCM_SampleMode		EQU	81
UCM_SaveAsProT		EQU	82
UCM_SetFileReqMode	EQU	83		;not imlemented
UCM_SetSpeed		EQU	84
UCM_Volume		EQU	85
UCM_Balance		EQU	86
UCM_Voice		EQU	87	;in Arg 1 Number,Arg 2 State 0=on 1=off
UCM_VolVoice		EQU	88	;in Arg 1 Number,Arg 2 Volume
UCM_FileRequest		EQU	89
UCM_QuitSurface		EQU	90
UCM_PlayMem		EQU	91	;in Arg 1 Address,in Arg 2 Size, ...
UCM_GetModuleData	EQU	92	;in Arg 1 Address,in Arg 2 Size, ...
UCM_GetEPBase		EQU	93
UCM_ClearList		EQU	94
UCM_AddList		EQU	95
UCM_AddListEntry	EQU	96		;not implemented
UCM_HideAll		EQU	97
UCM_UseEPDir		EQU	98
UCM_SaveT		EQU	99
UCM_LoadBefore		EQU	100
UCM_QuitEagle		EQU	101
UCM_SmallModule		EQU	102
UCM_Protect		EQU	103
UCM_PBits		EQU	104
UCM_ChangeXPKName	EQU	105
UCM_AutoPassword	EQU	106
UCM_BigModule		EQU	107
UCM_ModuleFault		EQU	108
UCM_SafeSave		EQU	109
UCM_Hide		EQU	110
UCM_AddUserDir		EQU	111
UCM_RescanDir		EQU	112
UCM_Notify		EQU	113
UCM_ScanAlways		EQU	114
UCM_UsePrefix		EQU	115
UCM_Dirmemsize		EQU	116
UCM_Checkdifference	EQU	117		;not implemented
UCM_EntriesPerMenu	EQU	118
UCM_EjectPlayer		EQU	119
UCM_EjectUserPrg	EQU	120
UCM_EPBatch		EQU	121
UCM_UPrgBatch		EQU	122		;not implemented
UCM_LoadEPBatch		EQU	123
UCM_LoadUPrgBatch	EQU	124		;not implemented



*-------- Errornumbers for Tags with Error-Returns, for UserPrograms -------*
*-------- & for Subprograms (e.g. EPG_NewLoadFile)		     -------*
EPR_UnknownFormat	EQU	1
EPR_FileNotFound	EQU	2
EPR_ErrorInFile		EQU	3
EPR_NotEnoughMem	EQU	4
EPR_CorruptModule	EQU	5
EPR_ErrorInstallPlayer	EQU	6
EPR_EagleRunning	EQU	7
EPR_CantAllocCia	EQU	8
EPR_CantAllocAudio	EQU	9
EPR_CantFindReq		EQU	10
EPR_NoModuleLoaded	EQU	11
EPR_ErrorInString	EQU	12
EPR_CantAllocSerial	EQU	13
EPR_ErrorDecrunching	EQU	14
EPR_ErrorExtLoad	EQU	15
EPR_ErrorAddPlayer	EQU	16
EPR_SaveError		EQU	17
EPR_LoadError		EQU	18
EPR_CantOpenWin		EQU	19
EPR_PlayerExists	EQU	20
EPR_WriteError		EQU	21
EPR_XPKError		EQU	22
EPR_XPKMasterNotFound	EQU	23
EPR_PPNotFound		EQU	24
EPR_LHNotFound		EQU	25
EPR_ErrorAddUserPrg	EQU	26
EPR_NoMoreUserPrgs	EQU	27
EPR_ModuleTooShort	EQU	28
EPR_CantDeletingPlayer	EQU	29
EPR_ErrorLoadingInstruments EQU	30
EPR_NoMoreEntries	EQU	31
EPR_ErrorLoadingDir	EQU	32
EPR_DirIsEmpty		EQU	33
EPR_BufferFull		EQU	34
EPR_UnknownError	EQU	35
EPR_FunctionNotEnabled	EQU	36
EPR_Passwordfailed	EQU	37
EPR_CommandError	EQU	38
EPR_ErrorInArguments	EQU	39
EPR_NotImplemented	EQU	40
EPR_FileIsNotExecutable	EQU	41
EPR_NotEnoughArguments	EQU	42
EPR_Functionaborted	EQU	43
EPR_InvalidNr		EQU	44
EPR_FileReqCancelled	EQU	45
EPR_ErrorDeletingFile	EQU	46
EPR_ErrorLoadingFont	EQU	47
EPR_NeedHigherKickstart	EQU	48
EPR_CrunchAborted	EQU	49
EPR_DirNotChanged	EQU	50
EPR_NoHelpFile		EQU	51
EPR_CrmNotFound		EQU	52
EPR_CantFindReqTools	EQU	53
EPR_CantFindASL		EQU	54
EPR_CantLoadLHA		EQU	55

*------------------------------ Global Variables ----------------------------*
 STRUCTURE EaglePlayerGlobals,0

	STRUCT	OLDDeliTrackerGlobals,dtg_Reserved3+4
	FPTR	EPG_FTPRReserved1
	FPTR	EPG_FTPRReserved2
	FPTR	EPG_FTPRReserved3
	FPTR	EPG_SaveMem		;Save Mem to Disk
	FPTR	EPG_FileRequest		;FileRequester
	FPTR	EPG_TextRequest		;Own Textrequester
	FPTR	EPG_LoadExecutable	;Load % Decrunch
	FPTR	EPG_NewLoadFile		;new DTG_LoadFile with Parameters
	FPTR	EPG_ScrollText		;Scroll Text
	FPTR	EPG_LoadPlConfig	;Loads a Config from Env:Eagleplayer/..
	FPTR	EPG_SavePlConfig	;Saves a Config to EnvArc:Eagleplayer/..
	FPTR	EPG_FindTag		;Finds a Tag in Tagliste
	FPTR	EPG_FindAuthor		;Find Authorname for Soundtracker-
					;compatibles
	FPTR	EPG_Hexdez		;Convert Dual to Dezimal (Ascii)
	FPTR	EPG_TypeText		;Print Text into the Mainwindow
	FPTR	EPG_ModuleChange	;Change Playroutine in Module
	FPTR	EPG_ModuleRestore	;Restore Playroutine in Module

	FPTR	EPG_NewJumpTab		;Pointer to extended Jumptab

	APTR	EPG_XPKBase		;librarybase (don`t close) or zero
	APTR	EPG_LHBase		;librarybase (don`t close) or zero
	APTR	EPG_PPBase		;librarybase (don`t close) or zero
	APTR	EPG_DiskFontBase	;librarybase (don`t close) or zero
	APTR	EPG_ReqToolsBase	;librarybase (don`t close) or zero
	APTR	EPG_ReqBase		;librarybase (don`t close) or zero
	APTR	EPG_ARPBase		;librarybase (don`t close) or zero
	APTR	EPG_WorkBenchBase	;librarybase (don`t close) or zero
	APTR	EPG_RexxSysBase		;librarybase (don`t close) or zero
	APTR	EPG_Commoditiesbase	;librarybase (don`t close) or zero
	APTR	EPG_Iconbase		;librarybase (don`t close) or zero
	APTR	EPG_ReservedBase1

	APTR	EPG_WinHandle		;MainWindow or zero (don`t close)
	APTR	EPG_PlWinHandle		;PlayerWindow or zero (don`t close)
	APTR	EPG_MiWinHandle		;ModuleInfoWindow or zero (don`t close)
	APTR	EPG_SiWinHandle		;SampleInfoWindow or zero (don`t close)
	APTR	EPG_ReservedWinHandle	;zero (don`t use)
	APTR	EPG_Reserved2WinHandle	;zero (don`t use)

	APTR	EPG_PubScreen		;Pointer to PubScreenname or zero
	APTR	EPG_CiaBBase		;Ciab.Resource-Base or zero
	APTR	EPG_UPS_Structure	;Private UPS_Structure, don't change
	APTR	EPG_ModuleInfoTagList	;Pointer to ModuleInfo-TagList
	APTR	EPG_APTRReserved3

	LONG	EPG_Identifier		;Longword="EPGL" --> Eagleplayer used
	LONG	EPG_EagleVersion
	WORD	EPG_Speed

	LONG	EPG_ARGN			;Anz. of Parameters

	LONG	EPG_ARG1		;\
	LONG	EPG_ARG2		; \
	LONG	EPG_ARG3		;  \	Parameter-Buffer for SubProggys
	LONG	EPG_ARG4		;   \_\ You must use this. You must set
	LONG	EPG_ARG5		;   / /	ArgN (max. used Parameters)
	LONG	EPG_ARG6		;  /	--> New SubProggys can use
	LONG	EPG_ARG7		; /	more Parameters !!!!
	LONG	EPG_ARG8		;/ don`t use in interrupts !!!!

	UWORD	EPG_Voices

	UWORD	EPG_Voice1Vol
	UWORD	EPG_Voice2Vol
	UWORD	EPG_Voice3Vol
	UWORD	EPG_Voice4Vol
	UWORD	EPG_Voice5Vol		;unused
	UWORD	EPG_Voice6Vol		;unused
	UWORD	EPG_Voice7Vol		;unused
	UWORD	EPG_Voice8Vol		;unused

	ULONG	EPG_SomePrefs		;Bits you find above the Globals
	ULONG	EPG_Timeout		;Timeout in Secs ; 0 = No Timeout

	WORD	EPG_FirstSnd	;first Subsong Nr. (-1 for unknown)
	WORD	EPG_SubSongs	;Subsong Range (-1 for unknown)
	ULONG	EPG_MODNr	;Actual Module in List (Nr) ; 0 = No Mod.
	ULONG	EPG_MODS	;Number of Modules in List (Nr); 0 = No List

	APTR	EPG_PlayerTagList	;Pointer to actual PlayerTaglist
	APTR	EPG_TextFont		;Pointer to actual Font-Structure

	UWORD	EPG_DVoice1Vol
	UWORD	EPG_DVoice2Vol
	UWORD	EPG_DVoice3Vol
	UWORD	EPG_DVoice4Vol
	UWORD	EPG_DVoice5Vol		;unused
	UWORD	EPG_DVoice6Vol		;unused
	UWORD	EPG_DVoice7Vol		;unused
	UWORD	EPG_DVoice8Vol		;unused

	WORD	EPG_WORDReserved1
	WORD	EPG_WORDReserved2
	WORD	EPG_WORDReserved3
	WORD	EPG_WORDReserved4
	WORD	EPG_WORDReserved5
	WORD	EPG_WORDReserved6
	WORD	EPG_WORDReserved7
	WORD	EPG_WORDReserved8

	LONG	EPG_Dirs
	LONG	EPG_LoadedFiles		;loaded files by DTG/EPG_LoadFile
	LONG	EPG_LONGReserved3
	LONG	EPG_LONGReserved4

	STRUCT	EPG_PlayerBuffer,500	;Buffer for playeruse (500 Bytes)

	LABEL	EPG_SizeOf		;to be extended


	*------------- Eagleplayer Globals Preferences-Flags ------------*
EGPRF_Fadein		EQU	0
EGPRF_Fadeout		EQU	1
EGPRF_Songend		EQU	2
EGPRF_Loadnext		EQU	3
EGPRF_Randommodule	EQU	4
EGPRF_Mastervolume	EQU	5
EGPRF_NowPlay		EQU	6
EGPRF_Surfacequit	EQU	7
EGPRF_LoadPrev		EQU	8

EGPRB_Fadein		EQU	1<<EGPRF_Fadein
EGPRB_Fadeout		EQU	1<<EGPRF_Fadeout
EGPRB_Songend		EQU	1<<EGPRF_Songend
EGPRB_Loadnext		EQU	1<<EGPRF_Loadnext
EGPRB_Randommodule	EQU	1<<EGPRF_Randommodule
EGPRB_Mastervolume	EQU	1<<EGPRF_Mastervolume
EGPRB_NowPlay		EQU	1<<EGPRF_NowPlay
EGPRB_Surfacequit	EQU	1<<EGPRF_Surfacequit
EGPRB_LoadPrev		EQU	1<<EGPRF_LoadPrev



*------------------------------ New JumpTab -------------------------------*
*---- If You use they, please check in Your Replayer EPG_Indentifier ------*
*----------------- not implemented yet, don't use it ----------------------*
*--------------------------------------------------------------------------*

 STRUCTURE NewJumpTab,0
	STRUCT	ENPP_AllocSampleMem,6
	STRUCT	ENPP_FreeSampleMem,6
	STRUCT	ENPP_NewLoadFile2,6		;You must Freemem it !!!
	STRUCT	ENPP_MakeDirCorrect,6
	STRUCT	ENPP_TestAufHide,6

	LABEL	ENPP_SizeOf		;to be extended




*-------------------------- Eagleplayer Helpfile --------------------------*
*---------		CommandList-Documentation is secret	    -------*
*--------------------------------------------------------------------------*
 STRUCTURE EPH_HelpFile,0
	STRUCT	EPH_HelpHeader,24		; Help Identifier + StartupCode
	APTR	EPH_CommandList			; Ptr to CommandList
	LONG	EPH_Date			; Creator-Date
	APTR	EPH_Creator			; Ptr to Creator
	APTR	EPH_Language			; Ptr to String "Deutsch"
	LONG	EPH_EPVersion			; min EPVersion
	LONG	EPH_MaxCommands			; max documented Commands
	APTR	EPH_Gadget			; Ptr to EPGadget-Structures
	APTR	EPH_NotImplemented		; Ptr to String "Not implemeted"
	APTR	EPH_NotDocumented		; Ptr to String "Not documented"
	APTR	EPH_RequesterName		; Ptr to Requester name
	APTR	EPH_Reserved1
	APTR	EPH_Reserved2
	LABEL	EPH_SizeOf



*---------------------- Eaglehelpfile-Identifier --------------------------*
EPHN_HelpHeader MACRO
		moveq	#-1,d0
		rts
		dc.b	"Eagleplayer-Helpfile"		;Identifier
		ENDM



*------------- Eagleplayer GadgetStrukture for EPP_Textrequest -------------*
 STRUCTURE EPGG_Gadget,0
		APTR	EPGG_NextGadget
		APTR	EPGG_GadgetName
		UBYTE	EPGG_Keys1
		UBYTE	EPGG_Keys2
		UBYTE	EPGG_Keys3
		UBYTE	EPGG_Keys4



*----------------------------- Ron Klaren Header -----------------------------*
KLARENHEADER MACRO
	moveq	#-1,d0				; this should return an error
	rts					; in case someone tried to
						; run it
	dc.l	\1				; Size of Ron Klaren Module,im-
						; portant !!!
	dc.b	"RON_KLAREN_SOUNDMODULE!",0	; identifier
	ENDM


	ENDC	; EAGLEPLAYER_I

