[Coco] Truchet Tile Maze Generator

Barry Nelson barry.nelson at amobiledevice.com
Fri Aug 4 03:38:24 EDT 2017


The basic program and the compiled scroll.bin file are now available on a DSK image here: https://drive.google.com/file/d/0B8RnV5G0TZFZYTRmYTdwdWxRaE0/view?usp=sharing <https://drive.google.com/file/d/0B8RnV5G0TZFZYTRmYTdwdWxRaE0/view?usp=sharing>

I compiled it with lwasm

lwasm -9 -b -o scroll.bin -l scroll.asm
Then I used imgtool to copy it onto a CoCo DSK image.
imgtool put coco_jvc_rsdos tiles.dsk scroll.bin scroll.bin --ftype=binary --ascii=binary

> Andrew keeper63 at cox.net  <mailto:coco%40maltedmedia.com?Subject=Re%3A%20%5BCoco%5D%20Truchet%20Tile%20Maze%20Generator&In-Reply-To=%3C6f256b67-0855-c780-31c1-876328d92ca4%40cox.net%3E>
> Thu Aug 3 22:58:12 EDT 2017
> 
> Robert,
> 
> First off, thank you for taking the time to come up with this mod; I 
> would love to try it; it looks interesting. But I would hard pressed to 
> run in the emulator say EDTASM, and try to recall the commands to 
> assemble the code to build the executable. I honestly don't have the 
> time to dedicate to that task right now.
> 
> So...if anyone wants to take a crack at it, perhaps what might be better 
> (if possible) would be to mod this code to POKE the values somewhere 
> into memory and run it that way; add the DATA statements and POKE 
> routine to this code, plus maybe a little cleanup (take the inner loop, 
> and put it in a GOSUB routine; call it from the Y loop, then call it in 
> the endless loop as well - maybe that routine needs to be put at the top 
> of the code, with a GOTO to branch around it - not sure if the COCO 
> interpretor needs that kind of speed mod or not, though).
> 
> Until I can get done with my class (not until the end of October), I 
> don't really have time to dedicate to doing much on this, unfortunately. 
> But anyone else is welcome to try!
> 
> Thanks, and good luck!
> 
> Andrew
>> Robert Gault robert.gault at att.net  <mailto:coco%40maltedmedia.com?Subject=Re%3A%20%5BCoco%5D%20Truchet%20Tile%20Maze%20Generator&In-Reply-To=%3C59837F42.10101%40att.net%3E>
>> Thu Aug 3 15:53:38 EDT 2017
>> 
>> Andrew,
>> 
>> I think you wanted your pattern to scroll up the screen and the maze continued to grow. Run my mod 
>> to your very good program and see if it is what you wanted. :)
>> 
>> I'm assuming a disk system!
>> 
>> * Scroll most of the PMODE4 graphics screen and clear the last 8 lines by Robert Gault.
>> 
>> 	ORG	$7000
>> START	LDX	#$F00
>> 	LDY	#$E00
>> A@	LDD	,X++
>> 	STD	,Y++
>> 	CMPX	#$2600
>> 	BLS	A@
>> 	LEAY	-2,Y
>> 	LDD	#0
>> B@	STD	,Y++
>> 	CMPY	#$2600
>> 	BNE	B@
>> 	RTS
>> 	END	START
>> 
>> 10 PMODE 4:SCREEN 1:PCLS:CLEAR 256,&H7000:LOADM"SCROLL"
>> 20 FOR Y=0 TO 191 STEP 8
>> 30 FOR X=0 TO 255 STEP 8
>> 40 T=(RND(2)-1)*7
>> 50 LINE(X,Y+T)-(X+7,Y+7-T),PSET
>> 60 NEXT
>> 70 NEXT
>> 80 REM GOTO 10 : FOLLOWING MOD BY ROBERT GAULT ON Andrew Ayers program
>> 90 Y=Y-8
>> 100 EXEC
>> 110 FOR X=0 TO 255 STEP 8
>> 120 T=(RND(2)-1)*7
>> 130 LINE(X,Y+T)-(X+7,Y+7-T),PSET
>> 140 NEXT
>> 150 GOTO100
>> 
>> Robert


More information about the Coco mailing list