Re: [cc65] Bank Switching

Date view Thread view Subject view

From: Fredrik Olsson (dec_at_sui-generis.org)
Date: 2002-09-20 20:42:13


On Fri, 20 Sep 2002, Shawn Jefferson wrote:

> >>
> >>You will have to use a customized linker config file, segments, and some
> >>manual work. Please have a look at the linker docs, which discuss these
> >>issues. If you have some specific questions, don't hesitate to ask.
> >
> >Ok, I took a look at the linker config file.  Would setting up the memory
> >areas like this work?
> >
> >MEMORY {
> >    ZP: start = $82, size = $7E, type = rw;
> >    HEADER: start = $0000, size = $6, file = %O;
> >    RAM1: start = $2000, size = $2000, file = %O;
> >    BANK: start = $4000, size = $3FFF, type = empty;
> >    RAM2: start = $8000, size = $3C1F, file = %0;
> >}
> >SEGMENTS {
> >    EXEHDR: load = HEADER, type = wprot;
> >    CODE: load = RAM1, type = wprot, define = yes;
> >    RODATA: load = RAM2, type = wprot;
> >    DATA: load = RAM2, type = rw;
> >    BSS: load = RAM2, type = bss, define = yes;
> >    ZEROPAGE: load = ZP, type = zp;
> >    AUTOSTRT: load = RAM1, type = wprot;
> >}
>
> Ok, two problems: one the linker complains about the type = empty, saying
> that "a type is expected", changed it to rw. Second, the executable does not
> work when compiled with this config file. The only executables I've been
> able to use have been with a plain vanilla config file.
>
> What am I doing wrong here?

Maybe you should try to replace the "file = %0" in RAM2 with "file = %O"?

/Fredrik

----------------------------------------------------------------------
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-20 20:42:39 CEST