[Coco] clearing memory for other uses

Robert Gault robert.gault at att.net
Fri Jan 29 22:51:46 EST 2016


Jason M wrote:
> Sorry if this is a double post, I originally posted this morning as a
> followup to Robert's question asking if it is possible to disable SECB on a
> coco3, but it doesn't look like it went through ...
>
> Along these same lines, what else could be cleared out to make the most
> room for game program and data ?
>
> I came across this nobasic.c program (
> http://perso.b2b2c.ca/sarrazip/dev/nobasic.c) which made me start to wonder
> what else could go ...
>
> I'm planning to use high res graphics so I know (think) i need those 4 8k
> pages - and I think I read there are some things in the top end of of
> memory that are necessary - is everything else fair game ?
>
> thanks,
> JasonM
>

Jason,

If you are going to write your game and make no use whatsoever of any Basic ROM 
code, you can use ALL of RAM for your game and graphics. While you have not been 
very clear about this, it reads as if you want to use some of the ROM code but 
not all of it. That being the case, you do have the option of running the ROM 
code while in mixed RAM/ROM mode and running your game in all RAM mode.

It is simple enough to have a routine in low RAM that switches between the two 
memory modes as needed. You could also make dram at $FE00-$FEFF constant and use 
that for your routine to switch between memory modes as needed.

In short, all you need to retain to use Basic routines is some of the RAM from 
$00-$0A00 depending on what ROM code you want to use. You will get better 
answers to your questions as you become more explicit about what you are trying 
to accomplish. "Make the most room for game program and data" isn't even close 
to being specific enough. :)

Robert



More information about the Coco mailing list