[Coco] help with drawing

Andrew keeper63 at cox.net
Sat Feb 19 01:37:54 EST 2005


> Message: 2
> Date: Sat, 19 Feb 2005 10:40:29 -0600
> From: "XYZ" <xyz at wireweb.net>
> Subject: [Coco] help with drawing
> To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
> Message-ID: <000401c516a1$bc4436e0$f7a7ea42 at homemain>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> 	reply-type=response
> 
> I am looking for a way to draw in the background without seeing it then 
> using the hget hput to put it on the screen
> I am using a coco3 on the hscreen2 does any body know of a way to do this 

Unfortunately, I don't know how you could do this, but I hope that maybe 
somebody here will, so I want to further the discussion with a couple of 
ways how *I* would go about doing it if I had such a need:

1 - Difficult:

Get a the CoCo 3 SUPER EXTENDED BASIC ROM dump, and find where all the 
routines are for the screen commands (HSCREEN, HSET, HGET, HPUT, etc) - 
then look and see if/where/how they reference the standard location for 
the regular HSCREEN (2, in this case) - how it is set up. I would 
imagine there is some kind of table, and register(s) are loaded by a 
lookup into that table - which affects all of the commands. Then, all 
you need to do is figure out a way to change that table or register via 
a POKE (or LPOKE) to an offscreen area (should be room on a 128K CoCo 
3), then draw your stuff, then HGET it, then change the register back, 
then HPUT it...

2 - More Difficult:

Drop the standard SBASIC routines entirely, and code up your own. I did 
this once for QuickBASIC/QBASIC several years back for a library I wrote 
for the PC called the BLAST! Library. Written in 8086 assembler, poked 
into memory via QuickBASIC/QBASIC - allowed a lot of funky things for 
the Mode 13h screen (320x200x256 color) screen (low-res VGA) for game 
sprites, etc. This approach would, of course, be much more difficult, 
but it would allow you to do things that HGET/HPUT don't allow...

Something that I have been trying to do on occasion is HGET/HPUT sprite 
masking - but it is like the boolean operators don't work correctly for 
the mask. I should be able to make a black and white mask of the sprite, 
lay the mask down with HPUT via an AND, then lay the sprite down via an 
OR - but it has yet to never work - anybody know what I am doing wrong, 
or what I am wrongly assumming?

Let's crack these problems!

Andrew L. Ayers
Phoenix/Glendale, Arizona



More information about the Coco mailing list