[Coco] Example basic code for screen grid
mdelyea at gmail.com
Fri Feb 24 02:43:39 EST 2012
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
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.
> Coco mailing list
> Coco at maltedmedia.com
More information about the Coco