[Coco] ASM Coders - Round two!

Andrew keeper63 at cox.net
Wed Aug 30 11:31:48 EDT 2006


Curiosity is killing me again...

Years ago I wrote a library for the PC to use with QBASIC, 
QuickBasic/PDS, and PowerBASIC called the Blast! Library. The goal of it 
was to create a very easy to use set of routines to allow a BASIC 
programmer the ability to create high-speed, flicker-free graphics 
without a lot of effort - to go beyond what you could do with LINE and 
GET/PUT. I had such things as "sprites" with a definable "invisible" 
color (to eliminate logic masking) and multiple pages in the 320 x 200 
screen.

All of this was callable from BASIC - the code would POKE the values in 
and then you could call the routines from your BASIC code to use them. 
People loved it, and even after I stopped using DOS BASICs, others were 
expanding on the idea and rolling their own libraries (I don't claim to 
be the first, either - there were other assembler libraries for game 
creation under DOS at the time, but mine was the first to target BASIC 
and come with a ton of interesting routines).

I have always wanted to port that code (or something similar) to the 
CoCo 3, or put it in someone's capable hands to do so as well (really, 
it should still be floating around out there - check under the All Basic 
Code archives, where I published a lot of BASIC stuff), but I could look 
and pull the "latest" version from my own archive if you are interested...

My biggest issues have been two-fold: getting it ported, and getting it 
to work while keeping BASIC in place.

On a 512K machine it seems real easy to get two pages of graphics screen 
in the 320x200x16 mode, because you have enough contiguous memory to 
play with (indeed, it should be possible to dynamically patch BASIC to 
cause it to use the regular drawing routines on a hidden page then 
"flip" that page forward using a blit routine), but on a 128K machine, 
while there is enough memory, it is mapped all wrong.

But then it hit me - just now - after reading (again) about David's 
experience and the suggestions he has been given to create a fire plasma 
routine (these are fun - did a small one in QBASIC once) in 6809 assembler:

Since the CoCo 3 is in all-ram mode, is it possible to relocate both 
BASIC and the graphics screen start locations at the same time and gain 
enough room to do this? It seems like there is enough RAM to have two 
320x200x16 screens, provided you can shuffle and patch everything, and 
still leave enough room for BASIC code and the assembler routines. Even 
if all I could get in place was a blit routine to page flip, that would 
be enough (although I would love a better and faster sprite/mask system).

Does anyone else think this is possible? How much patching would be 
involved to BASIC to shift it out of the way yet still run and be able 
to use the new graphics locations? Furthermore, how would you go about 
doing this (seems like a ton of GIME register manipulation and copying 
would be likely, and a ton of POKE/LPOKES to patch the BASIC)? It has 
been a while since I have done any assembler coding, and ages since I 
touched 6809 stuff - and I know the CoCo isn't an easy beast to work 
with. However, I know there are people here who are likely interested in 
such a library, and could even do the assembler coding. Like I said, I 
would love to do so myself - currently, the thing holding me back is the 
ton of other projects on my plate (some involving the CoCo, others 
involving other things).

Is anyone interested in a project like this? Something else that would 
be nice would be to get such a thing working under a BASIC compiler like 
CBASIC-3 or something - but maybe that is for another day...

--- Andrew L. Ayers
     Glendale (Phoenix), Arizona



More information about the Coco mailing list