[Coco] Example basic code for screen grid

haywire666 at aol.com haywire666 at aol.com
Sat Feb 25 00:36:27 EST 2012


I forgot to mention, I was able to get 8x8 squares by changing the step to 24, but that left some area on the right side of the sreen empty.


Maybe thats better that area of the screen can be used for input or sensor readings?

Thanks, going off to try and make more changes, just need to get rid of white border around the screen and the white frame around the squares.


If you have any ideas on that, thank you!


Steven



-----Original Message-----
From: haywire666 <haywire666 at aol.com>
To: coco <coco at maltedmedia.com>
Sent: Sat, Feb 25, 2012 12:14 am
Subject: Re: [Coco] Example basic code for screen grid


Thats almost perfect, but can you tell me how I can make the border around the 
sides of the screen black not white, and make the grid  8x8 squares?


And is there a way to remove the white border of the squares so that its only 
active when the block is colored white?

Thanks for your help, I'll try modifying some values to see If I can do this 
things. I have to dig through my old stuff 
and find those getting started and going ahead books, I'm sure I have a set some 
where, its very frustrating forgetting more
than I remember about this stuff. Thanks for your help!


best regards,

Steven


-----Original Message-----
From: Andrew <keeper63 at cox.net>
To: coco <coco at maltedmedia.com>
Sent: Fri, Feb 24, 2012 11:59 pm
Subject: Re: [Coco] Example basic code for screen grid


> Message: 1
> Date: Thu, 23 Feb 2012 23:38:52 -0500 (EST)
> From: haywire666 at aol.com
> Subject: Re: [Coco] Example basic code for screen grid
> To: coco at maltedmedia.com
> Message-ID:<8CEC0C5580EBAED-1118-76583 at Webmail-d107.sysops.aol.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Andrew, yes it works. Thats almost exactly what I need but I need no white 
outline around the grid and
> I need about 1/4 of the squares as you have here. Like it needs to be about 
1/4 of the squares and bigger.

Try this for fewer squares (I just modified the step rate to be 4 times 
larger, so the grid s/b 8 x 6 now):

10 PMODE 4,1
20 PCLS
30 SCREEN 1,1
40 FOR Y=0 TO 191 STEP 32
50 FOR X=0 TO 255 STEP 32
60 REM LINE(X,Y)-(X+8,Y+8),PSET,BF: REM FILLED WITH WHITE
70 REM LINE(X,Y)-(X+8,Y+8),PRESET,BF: REM FILLED WITH BLACK
80 LINE(X,Y)-(X+8,Y+8),PSET,B: REM UNFILLED (WHITE GRID)
90 NEXT X
100 NEXT Y
110 GOTO 110

> I'll play with this and see what I can do. Thanks so much thats pretty 
impressive you did that from memory!
>
> Also, Can I get this to be black bordered instead of white bordered?

By "white bordered" do you mean the "thick white" surrounding border on 
this screen? If so, I don't know off the top of my head how to do this; 
I think it is a special POKE or something - maybe someone else has an idea?

If you mean something else, let us know!

> Thanks so much for a fantastic program!

You're welcome!

> This is for an idea I have for home automation using the coco. The screen will 

be attached to a board that sits in front of
> the monitor and has photocells. To turn something on, the square on the screen 

corresponding to each photocell can be turned
> on (white) or off (black)

Hmm - are you expecting there to be user input or such on the screen? 
What controls the squares turning on/off? If you need on-screen user 
input, then the above would require a ton of extra work (you'd have to 
create a graphical font using DRAW statements, plus create a custom 
input polling routing using INKEY$ in a loop, plus some other 
modifications); not impossible, but more than just the above simple 
script...

> Any help getting this program to be black bordered and larger squares would be 

great appreciated! I think 64 squares total on
> the screen would be all I can get with the size or average small photocells. I 

really want to get this to work I'm sure I can build all the
> photocell circuits but the software side, I've been away from coco too long!

Let us know what you mean exactly (re: my questions above), and I am 
sure something can be figured out... :)

Andrew L. Ayers
Glendale, Arizona

--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco

 

--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco

 



More information about the Coco mailing list