[Coco] Example basic code for screen grid

haywire666 at aol.com haywire666 at aol.com
Fri Feb 24 03:56:43 EST 2012


Mike,


Yes thats much simpler and may be perfect...


Is CHR$(32) just a blank character or space? 


@250, and @300 what does that control? Vertical? How can I control both the horizontal and vertical so I can more accurately control 
where the box displays, and how can I then recolor a box black?


Also the boxes seem to be green that its printing on the screen, can I make them white?

Thanks so much for your help! 


Steven


-----Original Message-----
From: mike delyea <mdelyea at gmail.com>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Fri, Feb 24, 2012 2:43 am
Subject: Re: [Coco] Example basic code for screen grid


Have you thought about just using the 32 column text screen?  You could
then have a grid of 32 x 16 squares that you can turn on and off by using
print@ commands.

10 cls0
20 print at 250,chr$(32);
30 print at 300,chr$(32);

Just an example, but you have to remember the semicolon or it won't work
right.  You could also poke 32 into your black screen to turn on the dots
(can't remember the screen addresses off the top of my head) and 128 to
turn them off.  The poke method would work better as you don't need to use
a semicolon and won't scroll the screen accidentally.  You can also pick
different colours to light the squares.  Poking a 255 into a screen
location will give you an orange dot instead of a green one for example.

I'd use the text screen rather than a semigraphics screen because the coco
3 can't use the semigraphics screen.

On Fri, Feb 24, 2012 at 12:31 AM, Darren A <mechacoco at gmail.com> wrote:

> > 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.
> >
> >
> > 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?
> >
> ---
>
> Sounds like the semi graphics screen should fit your needs.
>
> CLS0 will black out the screen and keep the black border.
>
> SET(X,Y,5)  where X ranges from 0 to 63 and Y ranges from 0 to 31 will
> make pixels white.  RESET(X,Y) will revert them to black.
>
> You could also use POKE with addresses ranging from 1024 to 1535 to
> control a four pixel block (2x2) in one operation.
>
> Darren
>
> --
> 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