Using overlays in my program

Post Reply
Tomdev
Posts: 82
Joined: Thu Jan 08, 2009 9:15 pm

Using overlays in my program

Post by Tomdev » Fri Jan 22, 2010 2:27 pm

Hey everyone,

First I tried to keep my binary small with a plugin loader, but unfortunately it wasn't working really well. I saw somewhere in a post that using overlays is better on the nds, but if I look in the examples folder I don't see an example with overlays. So how can I use overlays in my program? What modifications are needed in the makefile and how do I need to structure my code?

Tomdev

elhobbs
Posts: 354
Joined: Thu Jul 02, 2009 1:19 pm

Re: Using overlays in my program

Post by elhobbs » Fri Jan 22, 2010 6:03 pm

your questions are non-trivial. if you are using that much code there is not going to be much room for data... why do you think you need to use overlays in the first place?

Tomdev
Posts: 82
Joined: Thu Jan 08, 2009 9:15 pm

Re: Using overlays in my program

Post by Tomdev » Fri Jan 22, 2010 6:47 pm

I need overlays because I have much code, but not every piece of code is needed at the same time. From what I understood is that you've to load the overlays when you need them.

Tomdev

and sorry for the english...
edit:
I found this post about overlays on gbadev.org:http://forum.gbadev.org/viewtopic.php?t=14707
but the explanation of how to use them was not working for me, when I did what there was said I got the message:

Code: Select all

D:\devkitPro\examples\nds\templates\arm9>make
linking arm9.elf
d:/devkitpro/devkitarm/bin/../lib/gcc/arm-eabi/4.4.2/../../../../arm-eabi/lib/ds
_arm9.ld:204: nonconstant expression for load base
collect2: ld returned 1 exit status
make[1]: *** [/d/devkitPro/examples/nds/templates/arm9/arm9.elf] Error 1
make: *** [build] Error 2
does someone know why, I don't know much about linker script files...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest