On Thu, 29 Oct 2015 14:02:16 -0500
Karl Kirch <karlk...@gmail.com> wrote:

> Currently trying to get SDCC up and running on some gameboy dev and am
> trying to get multi bank support working.
> I can get code up and running in a single bank and can get the compiler to
> generate the correct code segment code using `#pragma bank 1` (will
> generate `.area _CODE_1`.
> The problem I'm seeing is at the linking stage. I want to put the bank 1
> code outside of the 0xFFFF address space so that it can later be swapped in
> by the MBC. When I go to set the location via `-Wl-b_CODE_1=0x10000` all
> this does is wrap the code location back to 0x0000. Even when I don't set
> the location explicitly I end up getting a location of 0xC131 which causes
> makebin to explode because the rom size is > 32kb
> 
> Am I missing something here? or are >32kb roms just unsupported by SDCC?

I never managed to figure that out for gbz80 either, however if they are
not then I've got some small patches to the compiler that handle full
transparent code banking for Z80, plus some disgusting hacks to the
linker. If it turns out gbz80 doesn't support > 32K ROM then I'd be happy
to work with you as someone who knows the gameboy dev stuff to fix my
patches/hacks to work on gbz80 as well.

Some day I'll submit the bits to SDCC proper but right now while the
compiler patches are clean the linker stuff is not fit for submission.

Alan

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to