Re: [cc65] Bank Switching

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-09-21 00:44:32


On Fri, Sep 20, 2002 at 03:37:48PM -0700, Shawn Jefferson wrote:
> I guess I could write a small header in asm to do this moving around, and
> then jmp to the proper init/run address after that.  That way I would still
> have a small executable and avoid using the bank section.  Sound feasible?

Yes, but please note that the obvious solution (loading all the stuff into
memory and then moving the part that should go into RAM2) is wrong, because
BANK is overwritten when the whole file is loaded.

As far as I remember, the Atari is able to have separate chunks in an
executable file, where each chunk has it's own header, and is loaded to a
different address. The last one of these headers has a special marker. If so,
the solution would be to slightly modify the standard startup script. Just
include both headers (place the second header into a segment named HEADER2 or
similar). Then change the linker config so that each one of the RAM1 and RAM2
memory areas has its own header.

Maybe one of the Atari guys can comment on this in more detail (or correct me
if I got this wrong).

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-09-21 00:44:29 CEST