[Coco] Over heard at the CoCo Fest

Lee Patterson lee at 8bitcoder.com
Sun May 1 13:42:28 EDT 2016


This is the first time I have ever been able to play with the Orch-90 and SSC packs, both in an MPI! Totally cool. Here is a little Hello World for the Orch-90. So far this thing is easy to play with, at both low and high speed on the Coco 3. 

Hopefully the formatting will be okay.

####################################################################################################
# Test the Orch-90 cart	by outputting a	sound on each channel
# By Lee Patterson www.8BitCoder.com
####################################################################################################

# lwasm	-9 -b -o sndorch.bin sndorch.asm && writecocofile --verbose sound.dsk sndorch.bin && coco3 `pwd`/sound.dsk sndorch

SPEAKER_LEFT	equ	$FF7A
SPEAKER_RIGHT	equ	$FF7B

		org	$3F00
		
start		ldx	#msg		point to our message
lee		lda	,x+		get current ASCII character
		beq	x@		exit if	its the	NULL-terminator
		jsr	[40962]		print the character using stdout hook
		bra	lee		keep printing
x@		jsr	init

		ldd	#SPEAKER_LEFT
		jsr	makesnd
		ldd	#SPEAKER_RIGHT
		jsr	makesnd

		rts

msg		fcc	"MAKING	A SOUND"
		fcb	13,0

####################################################################################################
makesnd
		ldx	#chan2
		std	1,x
		ldx	#chan1
		std	1,x
		jsr	maket
		rts
		
####################################################################################################
maket		
maket_loop2	ldx	#tonemap
maket_loop1	

		* sound	off
		lda	#0
chan2		sta	$FF7B
		bsr	maket_delay

		* sound	on
		lda	,x+
chan1		sta	$FF7B
		bsr	maket_delay

		cmpx	#tonemapend
		bne	maket_loop1
		
		rts

maket_delay	ldy	#$1F4		# how long of a	delay
maket_wait	leay	-1,y
		bne	maket_wait	
		rts

tonemap		fcb	10,20,30,40,50,60,70,80,90,100,130,160,190,220,255,255,220,190,160,130,100,90,80,70,60,50,40,30,20,10
tonemapend	fcb	0


####################################################################################################
init		
		rts			; do nothing
		
		ldx	#$ffd9		; high speed on	coco3
		sta	,x
		rts

####################################################################################################

		end	start


--- -- -  -
www.8BitCoder.com




More information about the Coco mailing list