*	sound stuff	*
soundstarth:	equ	2
soundstartm:	equ	4
soundstartl:	equ	6
soundendh:	equ	$e
soundendm:	equ	$10
soundendl:	equ	$12
soundmode:	equ	$20
sounddma:	equ	0

putsounds:
	move.w	#$7ff,$ff8924
settreb:
	cmpi.w	#$7ff,$ff8924
	bne	settreb
	move.w	#%0000010010001100,d0		;010 for treb vol
	move.w	d0,$ff8922			;send data

setbass:
	cmpi.w	#$7ff,$ff8924
	bne	setbass
	move.w	#%0000010001000000,d0		;010 for treb vol
	move.w	d0,$ff8922			;send data

	move.l	#mybell,$5ac
	move.l	#mykey,$5b0
	rts

mybell:
	move.l	#bellstart,d0
	move.l	#bellend,d1
	bra.s	dosound
*****************************************
*	new sound chip stuff		*
*	pass sound start in d0		*
*	and sound end in d1		*
*****************************************
dosound:
	lea	$ff8900,a0	;sound register base address
	move.w	#0,sounddma(a0)
	move.w	d0,soundstartl(a0)
	lsr.l	#8,d0
	move.w	d0,soundstartm(a0)
	lsr.l	#8,d0
	move.w	d0,soundstarth(a0)
	move.w	d1,soundendl(a0)
	lsr.l	#8,d1
	move.w	d1,soundendm(a0)
	lsr.l	#8,d1
	move.w	d1,soundendh(a0)
	move.w	#%0000000010000000,soundmode(a0)
	move.w	#%0000000000000001,sounddma(a0)
dsback:
	rts

