Re: [cc65] "overlay" files

From: Groepaz <groepaz1gmx.net>
Date: 2009-07-27 17:14:17
On Sonntag 05 Juli 2009, silverdr@wfmh.org.pl wrote:
> Hello,
>
> due to memory limitations, I shall have to use some "overlaying" to
> load the required code from disk on demand. Now I start wondering what
> would be the best method to do this. Of course I can do everything "by
> hand" in assembler but I would prefer to use some of the smart cc65
> features if possible. I shall need at least two things:
>
> 1. Free the RAM occupied by the startup initialisation routines (mine,
> not CC65's) as those won't be needed after setting things up.
>
> I would like to place those next to a larger data buffer, so that once
> the code is no longer needed, I would get a continuous memory chunk
> for the data buffer. I guess this can be done with a smart linker
> instructions.
>
> 2. Load appropriate "drivers" on demand into a static address space.
>
> The "drivers" would all implement the same "protocol" (as it is called
> in Obj-C), i. e. a set of routines serving the same purpose but
> varying in implementation of course, probably with a jump table at the
> beginning.
>
> Any quick hints / pointers?

look at how the library implements loadable drivers, this is pretty much 
exactly what you want.

for example look at libsrc/em/em_load.c as an example on how to use modules 
with a common interface using libsrc/common/modload.s

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

I regard NASCAR the same way I regard gay porn: I know it exists and I know 
some guys like it; I just don't want to see it.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Jul 27 17:14:23 2009

This archive was generated by hypermail 2.1.8 : 2009-07-27 17:14:25 CEST