[Coco] Truchet Tile Maze Generator

Andrew keeper63 at cox.net
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

On 08/03/2017 12:53 PM, Robert Gault wrote:
> Andrew wrote:
>> Some of you may have seen the one-liner maze generator for the
>> Commodore 64. Today I tried to create
>> something similar for the CoCo 2. Maybe this has been done before? I
>> don't know. Anyhow, enjoy!
>>
>> https://github.com/andrew-ayers/color-computer/blob/master/TruchetTiles.md
>>
>>
>
> 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