	SECTION	TEXT
	OPT		D+
	*	Ok there is the first version of the 50 Khz player STE
	*	It runs on 520, but have just 2 channels
	*	I think this is not interresting
	*	Watch for the second version (1 meg or + required)
	MOVE.L	4(SP),A0
	MOVE.L	$C(A0),D0
	ADD.L	$14(A0),D0
	ADD.L	$1C(A0),D0
	AND.L	#-2,D0
	LEA		STACK(PC),A7
	MOVE.L	D0,-(SP)
	MOVE.L	A0,-(SP)
	CLR		-(SP)
	MOVE	#$4A,-(SP)
	TRAP	#1
	LEA		12(SP),SP
	TST.L	D0
	BNE		GO_OUT

	CLR.L	-(SP)
	MOVE	#$20,-(SP)
	TRAP	#1
	LEA		6(SP),SP
	LEA		SAVE_STACK(PC),A0
	MOVE.L	D0,(A0)

	JSR		SAVE_INTERRUPTS(PC)
	JSR		MAIN(PC)
EXIT
	JSR		REINSTALL_INTERRUPTS(PC)
	DC.W		$a009
	MOVE.L	SAVE_STACK(PC),-(SP)
	MOVE	#$20,-(SP)
	TRAP	#1
	LEA		6(SP),SP

GO_OUT
	CLR		-(SP)
	TRAP	#1

SAVE_INTERRUPTS
	LEA		SAVE_INT(PC),A1
	LEA		$FFFF8200.W,A0
	MOVEP	$1(A0),D0
	MOVE	D0,4(A1)
	MOVE.L		$70,SVBL
	RTS

REINSTALL_INTERRUPTS
	MOVE.L		SVBL,$70
	MOVE.W 	#0,$FF8900
	RTS

MAIN	MOVE.B		#0,$484
	JSR		LOAD_MODULE(PC)
	JSR		INIT_MUZEXX(PC)
	JSR		PLAY_MUZEXX(PC)
	JSR		REINSTALL_INTERRUPTS(PC)
	JMP		MAIN(PC)

LOAD_MODULE
	LEA		INS(PC),A0
	MOVEQ	#32*4-1,D0
CLR_INS
	CLR.L	(A0)+
	DBRA	D0,CLR_INS
	LEA		VOICE0(PC),A0
	MOVEQ	#7,D0
CLR_VOICE0
	CLR.L	(A0)+
	DBRA	D0,CLR_VOICE0
	LEA		VOICE1(PC),A0
	MOVEQ	#7,D0
CLR_VOICE1
	CLR.L	(A0)+
	DBRA	D0,CLR_VOICE1
	LEA		VOICE2(PC),A0
	MOVEQ	#7,D0
CLR_VOICE2
	CLR.L	(A0)+
	DBRA	D0,CLR_VOICE2
	LEA		VOICE3(PC),A0
	MOVEQ	#7,D0
CLR_VOICE3
	CLR.L	(A0)+
	DBRA	D0,CLR_VOICE3
	LEA		FILENAME(PC),A0
	MOVE.B	#40,(A0)+
	MOVE.B	#0,(A0)+
	MOVEQ	#9,D0
CLR_FILENAME
	CLR.L	(A0)+
	DBRA	D0,CLR_FILENAME
	PEA		INDICATION(PC)
	MOVE	#9,-(SP)
	TRAP	#1
	LEA		6(SP),SP
	MOVEQ		#0,D1
	PEA		FILENAME(PC)
	MOVE	#$A,-(SP)
	TRAP	#1
	LEA		6(SP),SP
	LEA		2+FILENAME(PC),A0
	CMP.L	#'YEAH',(A0)	
	BEQ		EXIT	
	CMP.L	#'yeah',(A0)	
	BEQ		EXIT	
	MOVE.W		D0,D1
	ADD.L		D1,A0
	MOVE.B		#'.',(A0)+
	MOVE.B		#'*',(A0)+
	MOVE.B		#0,(A0)
CON1	LEA		2+FILENAME(PC),A0
	CMP.B		#' ',(A0)
	BNE CONT
	MOVE.B		1(A0),(A0)
	MOVE.B		2(A0),1(A0)
	MOVE.B		3(A0),2(A0)
	MOVE.B		4(A0),3(A0)
	MOVE.B		5(A0),4(A0)
	MOVE.B		6(A0),5(A0)
	MOVE.B		7(A0),6(A0)
	MOVE.B		8(A0),7(A0)
	MOVE.B		9(A0),8(A0)
	MOVE.B		10(A0),9(A0)
	MOVE.B		11(A0),10(A0)
	MOVE.B		12(A0),11(A0)
	BRA CON1
CONT	CLR		-(SP)
	PEA		FILENAME+2(PC)
	MOVE	#$3D,-(SP)
	TRAP	#1
	LEA		8(SP),SP
	MOVE.L	D0,D7
	TST.W	D0
	BMI		WRONG_MODULE_NAME
	PEA		MUZEXX
	MOVE.L	#$FFFFF,-(SP)
	MOVE	D7,-(SP)
	MOVE	#$3F,-(SP)
	TRAP	#1
	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A0
	MOVEQ	#0,D0
	MOVE	4+SAVE_INT(PC),D0
	LSL.L	#8,D0
	SUB.L	#$8000,D0
	MOVE.L	D0,A2
	MOVE	NBR_INS(PC),D0
	SUBQ	#1,D0
REVERSE
	MOVE.L	(A0),D1
	BEQ		END_REVERSE_THIS_INS
	SUBQ.L	#1,D1
	MOVE.L	D1,D2
	MOVE.L	4(A0),A3
REV_1
	MOVE.B	(A3)+,(A2)+
	
	;sub.B		#$80,(A2)+
	DBRA	D1,REV_1
	MOVE.L	4(A0),A3
REV_2
	MOVE.B	-(A2),(A3)+
	DBRA	D2,REV_2
END_REVERSE_THIS_INS
	LEA		16(A0),A0
	DBRA	D0,REVERSE

	LEA 		MU,A0
	MOVE.W		#2520,D0
CCLR	MOVE.L 	#0,(A0)+
	DBF		D0,CCLR
 	
	MOVE.W	#3,$FF8920   ;sound-mode
				;00 6250hz
				;1  12517hz
				;2  25033hz
				;3  50066hz
				; mono +128 

	LEA		MUSIQUE_END,A0	
	MOVE.L		A0,D0
	MOVE.W		D0,$FF8912
	ROR.L		#8,D0
	MOVE.W		D0,$FF8910
	ROR.L		#8,D0
	MOVE.W		D0,$FF890E

	LEA		MU,A0
	MOVE.L		A0,D0
	MOVE.W		D0,$FF8906
	ROR.L		#8,D0
	MOVE.W		D0,$FF8904
	ROR.L		#8,D0
	MOVE.W		D0,$FF8902
	MOVE.L		#$33fc0003,rt
	MOVE.L		#$00ff8900,rt+4	
	;MOVE.W 	#3,$FF8900
	; control : 0:off
	;           1:one play
	;	     2: loop				
	RTS


PLAY_MUZEXX
ON	
	MOVE	#6,SPD+2
	MOVE.B	#6,SPEED
	MOVE.B	#1,POS
	LEA		MUZEXX,A0
	ADD		SEQ(PC),A0
	LEA		-2(A0),A0
	MOVE.B	(A0)+,TRK
	MOVE.L	A0,MUS+2
	LEA		OFF(PC),A0
	LEA		OFF(PC),A1
	LEA		OFF(PC),A2
	LEA		OFF(PC),A3
	MOVEQ	#0,D0
	MOVEQ	#0,D1
	MOVEQ	#0,D2
	MOVEQ	#0,D3
	CLR.L	V0+2
	CLR.L	V1+2
	CLR.L	V2+2
	CLR.L	V3+2
	CLR.L	F0+2
	CLR.L	F1+2
	CLR.L	F2+2
	CLR.L	F3+2
	PEA	NAME
	MOVE.W #9,-(A7)
	TRAP #01
	ADDQ.L #6,A7
	PEA	MUZEXX
	MOVE.W #9,-(A7)
	TRAP #01
	ADDQ.L #6,A7
	MOVE.W	#20160/4,D0
	LEA	MU,A0
CLRR	MOVE.L #0,(A0)+
	DBF D0,CLRR

	MOVE.L	#VBL,$70.W
PROGRAM			

	CMP.B	#$39,$FFFFFC02
	BEQ		END_OF_MUZEXX
	BRA		PROGRAM



MUSC		DC.L	MU,MU+2016,MU+4032,MU+6048,MU+8064,MU+10080,MU+12096
		DC.L	MU+14112,MU+16128,MU+18144,MU+20160,MU+22176,MU+24192
		DC.L	MU+26208,MU+28224,MU+30240,MU+32256,MU+34272,MU+36288
		DC.L	MU+38304

AMIGA	
	MOVE.B		MUSI,D7
	ADDQ.B		#4,D7
	CMP.B		#80,D7
	BNE.S		AM3
	MOVEQ.B	#0,D7
AM3
	MOVE.B		D7,MUSI
	MOVE.L		MUSC(PC,D7.W),A4
AMM
	MOVEQ		#0,D7
	MOVE.W		#1008,D6
AM2
	SWAP		D0					;2 DOUBLE CYCLES	
	SWAP		D1					;2
V0	SUB.L		#0,D0					;8
	BMI.S		L0					;4
V1	SUB.L		#0,D1					;8
	BMI.S		L1	
	
OUT	SWAP		D0					;2
	SWAP		D1					;2
	MOVE.B		0(A0,D0),(a4)+				;7
	MOVE.B		0(A1,D1),(a4)+			;7
	DBF D6,AM2						;5
rt	MOVE.W 	#3,$FF8900
	MOVE.W		#$4E75,rt
	RTS	
	even
V2	SUB.L		#0,D2					;8
V3	SUB.L		#0,D3					;8
	even
L0	MOVE.L		#0,D0
F0	MOVE.L		#0,V0+2
	BRA		V1
L1	MOVE.L		#0,D1
F1	MOVE.L		#0,V1+2
	BRA		V2
L2	MOV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,D1.W),(A4)
	MOVE.L	4(A2,D1.W),4(A4)
	MOVE.L	8(A2,D1.W),8(A4)
	BNE.S	REPEAT
	CLR.L	16(A4)
REPEAT
COMMAND?
	MOVE	(A0)+,D0
	MOVE.B	D0,D1
	AND		#$F00,D0
	LSR		#6,D0
	MOVE.L	(A3,D0.W),A5
	JMP		(A5)

NO_COMMAND
	RTS

ARPEGGIO
	TST.B	D1
	BEQ.S	NO_ARPEGGIO
	MOVE.B	#0,22(A4)
	MOVE.B	D1,23(A4)
	MOVE.B	#1,21(A4)		*ARPEGGIO COUNTER
	MOVE	#1,30(A4)
NO_ARPEGGIO
	RTS

PORTAMENTO_UP
	MOVE.B	#1,22(A4)
	MOVE.B	D1,23(A4)
	MOVE	#1,30(A4)
	RTS

PORTAMENTO_DOWN
	MOVE.B	#2,22(A4)
	MOVE.B	D1,23(A4)
	MOVE	#1,30(A4)
	RTS

POSITION_JUMP
	LEA		MUZEXX,A5
	ADD		SEQ(PC),A5
	LEA		-1(A5),A5
	MOVE.B	#1,POS
	MOVE.L	A5,D0
	ADD.L	D1,D0
	MOVE.L	D0,MUS+2
	MOVE.B	-1(A5),D0
	SUB		D1,D0
	MOVE.B	D0,TRK
	RTS

SET_VOLUME
	TST.B	D1
	BNE.S	NO_CHANGE			*NO REAL TIME VOLUME VARIATION
	CLR.L	12(A4)				*IN THIS VERSION! MAYBE
	MOVE.B	#1,20(A4)			*SOME OTHER DAY...
NO_CHANGE
	RTS

PATTERN_BREAK
	MOVE.B	#1,POS
	RTS

SET_FILTER
	RTS

SET_SPEED
	MOVE.B	D1,SPD+3
	MOVE.B	D1,SPEED
	RTS

COMMAND		DC.L	ARPEGGIO,PORTAMENTO_UP,PORTAMENTO_DOWN,NO_COMMAND
			DC.L	NO_COMMAND,NO_COMMAND,NO_COMMAND,NO_COMMAND
			DC.L	NO_COMMAND,NO_COMMAND,NO_COMMAND,POSITION_JUMP
			DC.L	SET_VOLUME,PATTERN_BREAK,SET_FILTER,SET_SPEED

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	F3+2
	BRA		PLAY

END_OF_MUZEXX
	RTS


	SECTION	DATA
INDICATION		DC.B		$1B,'E'
			DC.B		$0D,$0A
			DC.B ' Here is the  ST Connexion Soundtracker ',$d,$a,$d,$a
			DC.B '       Adapted for STE by Axel F.	    ',$d,$a
			DC.B '        (MCS / French Alliance)	    ',$d,$a
			DC.B '         V1.5          11/4/90	    ',$d,$a,$d,$a
			DC.B '  Stereo  ,    50 KHZ  ,   2 Channels   ',$d,$a
			DC.B '   Better quality of sound than  STF    ',$d,$a
			DC.B '     15 %  of the time machine left     ',$d,$a
			;DC.B ' Compatible with the best soundtrackers ',$d,$a
			;DC.B '           existing on  AMIGA           ',$d,$a
			DC.B ' All registers and timers are also left ',$d,$a
			DC.B '   (The red/blue bars on the top show   ',$d,$a
			DC.B '    the lenght of the soundtrack rout)  ',$d,$a
			;DC.B '        (Sorry there is no white)       ',$d,$a,$d,$a
			DC.B 'Did he says AMIGA ?'
			DC.B		$0D,$0A,$0D,$0A
			DC.B		'Module loaded : ',0
			EVEN
NAME			DC.B $d,$a,'Module named  : ',0
			EVEN

FILENAME	DC.B	40,0
			DS.B	40
OFF			DC.L	0
SPEED		DC.B	0
POS			DC.B	0
TRK			DC.B	0
SEQ			DS.W	1
PAT			DS.W	1
NBR_INS		DS.W	1
FRQ			incbin '50_khz.frq',0
ARPEGGIO_DATA	DC.W	$0358,$0328,$02FA,$02D0,$02A6,$0280,$025C
				DC.W	$023A,$021A,$01FC,$01E0,$01C5,$01AC,$0194,$017D
				DC.W	$0168,$0153,$0140,$012E,$011D,$010D,$00FE,$00F0
				DC.W	$00E2,$00D6,$00CA,$00BE,$00B4,$00AA,$00A0,$0097
				DC.W	$008F,$0087,$007F,$0078,$0071,$0000,$0000,$0000

	SECTION	BSS
SAVE_INT	DS.L	17
SVBL		DS.L	0
TIMERA		DS.L	1
SAVE_STACK	DS.L	1
			DS.L	128
STACK
SWITCH		DS.W	1
KEY_PRESS	DS.W	1
VOICE0		DS.L	8
VOICE1		DS.L	8
VOICE2		DS.L	8
VOICE3		DS.L	8
ADD_IN_PAT	DS.L	1
REGIS		DS.L	14
MUSI			DS.L		0
INS			DS.L	32*4
MU			DS.W 		20160
MUSIQUE_END		DS.L		10
MUZEXX
	END
