[Coco] Example basic code for screen grid

Arthur Flexser flexser at fiu.edu
Sat Feb 25 04:34:27 EST 2012


I don't think that the PMODE graphics screen border is changeable on a
CoCo 1/2 (as it may be on a CoCo 3, though this might only apply to
the 40/80 column text screen and HMODE graphics).  I recall writing a
patch to Telewriter-64 long ago that made it print white on a black
background instead of the reverse, but I was stuck with the white
border, which somewhat ruined the effect.

If the text screen is used rather than the PMODE graphics screen, you
can change the border color to be either green or black if it is a
CoCo 2 equipped with real lowercase (as indicated by a model number
ending in 'B').  My memory is a bit hazy on this, but I think you can
also get something like red text with a white background and border if
you use SCREEN 0,1 or something like that.

Art

On Sat, Feb 25, 2012 at 12:58 AM, Andrew <keeper63 at cox.net> wrote:
>> Message: 8
>> Date: Sat, 25 Feb 2012 00:14:17 -0500 (EST)
>>
>> From: haywire666 at aol.com
>> Subject: Re: [Coco] Example basic code for screen grid
>> To: coco at maltedmedia.com
>> Message-ID:<8CEC19374D15C28-1010-41E9 at webmail-d149.sysops.aol.com>
>> Content-Type: text/plain; charset="us-ascii"
>>
>>
>> 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!
>
>
> Here's 8 x 8, alternating checkerboard (not a "grid"):
>
>
> 10 PMODE 4,1
> 20 PCLS
> 30 SCREEN 1,1
> 35 I=0
> 40 FOR Y=0 TO 191 STEP 24
>
> 50 FOR X=0 TO 255 STEP 32
> 60 IF I=0 THEN LINE(X,Y)-(X+8,Y+8),PSET,BF: REM FILLED WITH WHITE
> 70 IF I=1 THEN LINE(X,Y)-(X+8,Y+8),PRESET,BF: REM FILLED WITH BLACK
> 80 REM LINE(X,Y)-(X+8,Y+8),PSET,B: REM UNFILLED (WHITE GRID)
> 85 I=1-I
>
> 90 NEXT X
> 100 NEXT Y
> 110 GOTO 110
>
> Again, I am not sure what to do about the large border around the sides; on
> the CoCo 3, IIRC, it can be altered via a PALETTE statement (I think?) - but
> on the CoCo 1/2, it is a function of the VDG/SAM chip - I seem to recall it
> being possible to alter it via a POKE, but I am not absolutely certain
> there...?
>
>
> Andrew L. Ayers
> Glendale, Arizona
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco



More information about the Coco mailing list