; include file
#dontinclude

	opt	forwardrefmax
#include	coco\main_lib.txt
#include	coco\disk_lib.txt
#include	coco\pmode4_lib.txt
#include	coco\sid_mml.txt

#memstart	15904	;$3e20
	org	$4500	;mem start?
start

	createsinetable()
	std	sine_table
	cg6_display(#1)
	cg6_cls(#0,#0,#0)
	cg6_cls(#1,#0,#0)

	disk_buffer()
	std	dsk_buffer
	disk_bytes16()
	std	dsk_byte16
	disk_granuals()
	std	dsk_gran

	disk_loadm(#0,#filename1,#$2600,dsk_buffer,dsk_gran,dsk_byte16)
;	disk_savem(#0,#1,#filename1,#$2600,#$3e00,dsk_buffer,dsk_gran,dsk_byte16)	
	lda	#1
	sta	page

	init_sidmml()

	playsid_mml(#1,#3,#2,#2,#music1_1$)
	playsid_mml(#2,#4,#2,#2,#music1_2$)
	playsid_mml(#3,#8,#2,#2,#music1_3$)

dostart
;	cg6_scroll_down(page,#1)
	cg6_print(page,#0,#8,#10,#10,#filename)

	cg6_nosync(page)
	lbra	dostart


def	page	byte
def	sine_table	word


def	dsk_buffer	word
def	dsk_byte16	word
def	dsk_gran	word

filename
	fcn	'DUCKHUNTBIN'


filename1
	fcn	'DUCKHUN2BIN'


music1_1$

	fcc	'T9L2O7CDEFGABCDEFGABCT4DEFGABO6CDEFGABO5CDEFGABP1'


	fcb 0
music1_2$
	FCC	'T2O4L8AP8AP8T3BP8AP8CDP8'


	fcb 0

music1_3$
	FCC	'T0O7L4AP4O2AT4P4AP8A'


	fcb 0


; end of program
cocoromend

;INSTRUMENT	1=TRIANGLE
;		2=SAWTOOTH
;		3=TRI+SAW
;		4=PULSE
;		5=PULSE+TRI
;		6=PULSE+SAW
;		7=TRI+SAW+PULSE
;		8=NOISE



	end	start





