#107372 - 0xtob - Sun Oct 29, 2006 2:33 am
I have run out of ARM7 RAM, i.e. my ARM7 binary fills up nearly all of it and there's little space for additional code. So, I'm thinking about how to get more space for the ARM7 binary.
I already tried using the shared iwram as additional RAM, but as it lies before the ARM7 RAM, I needed to change the ARM7 entry point in the nds header which broke compatibility with every loading method except WMB. So, this is not an option.
Another thought would be to load the ARM7 binary into a VRAM bank and run it from there, but I'm not sure how this could be done.
This has kept me figuring for months now, so any help would be greatly appreciated!
Bye,
Tob
#107373 - tepples - Sun Oct 29, 2006 2:45 am
What is in your ARM7 bank? Can you break it down by kilobyte size?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#107374 - 0xtob - Sun Oct 29, 2006 3:01 am
I'm not sure I understand the question, but it's all code, so I cannot break it into pieces. I've tried everything to reduce the binary size, removed all unnecessary library dependencies, size-optimized where possible, but the binary is still not much smaller than 64k.
#107375 - gladius - Sun Oct 29, 2006 3:15 am
It shouldn't break compatibliity. I load pocketspc into the shared iwram on the arm7 and things seem to work great.
Check out the makefile/custom linkscript that I use here: http://tinyurl.com/shdv7
Edit: for some reason the url tag isn't working, maybe the https? Copy paste the entire thing (after the ! as well).
ModEdit: sometimes tinyurl can be helpful :)
#107377 - tepples - Sun Oct 29, 2006 3:44 am
The URL tag isn't working because of the ! and | characters.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#107381 - 0xtob - Sun Oct 29, 2006 5:16 am
gladius: Thanks for the link! I checked out your linkscript and the call to ndstool and tried again to adjust my environment accordingly (changed the iwram definition in the linkscript and added the correct arm7 address and entry point parameters to the ndstool call). The result is unfortunately the same as I had before: The program runs fine when launched through WMB, but when launched from GBAMP, it does not respond to input, which is most likely because the hacked GBAMP firmware ignores the entry point in the nds header and uses the default one instead.
I wonder why it works for you and not or me. Have I missed something?
#107396 - Lick - Sun Oct 29, 2006 10:36 am
What about putting them in the ARM9? Then at run-time, copy them to the MAIN RAM, so the ARM7 can access the data?
edit: Hmm.. Don't know if this was relevant after reading other posts.
_________________
http://licklick.wordpress.com
#107406 - wintermute - Sun Oct 29, 2006 1:04 pm
This is actually one of the changes I'm intending to make in r20 - moving the arm7 binary down into the shared iwram.
Lick: I had expressed that concern with chishm but he told me it shouldn't be a problem. Are you booting using the _boot_mp.nds method or are you using a launcher of some kind.
I also fixed the link given above to use tinyurl. Does anyone know if there's a limit on how long those last?
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#107436 - OOPMan - Sun Oct 29, 2006 6:29 pm
tepples mentioned the use of overlays with respect to DS coding in another thread in the DS Misc section (I think...)
Would this be of any use?
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#107465 - Lick - Sun Oct 29, 2006 10:25 pm
wintermute wrote: |
Lick: I had expressed that concern with chishm but he told me it shouldn't be a problem. Are you booting using the _boot_mp.nds method or are you using a launcher of some kind. |
You got me a bit confused here, WinterMute.. What concern are you talking about? (The one in the libfat topic?) Anyway, I'm trying to collect methods for resetting to the bootmenu on as many devices possible.
_________________
http://licklick.wordpress.com
#107476 - 0xtob - Sun Oct 29, 2006 11:58 pm
Yay, I fixed it! It turned out that my older version of the GBAMP firmware hack did not handle the new entry point correctly, because after flashing the newest version, it worked without problems! I can also verify that it works correctly with the M3 miniSD's loader and with WMB (tbble implementation). It also works with MightyMax's universal loader (for example used in DSOrganize or DSFTP).
Lick: You think that would be possible? I think running arm7 code form the main RAM would involve some evil linker hacks.
OOPMan: Thank for pointing that out. I wasn't aware of overlays. Maybe they'll come in handy if I run into any further size troubles.
Wintermute: So you want to make this default? I guess it would be better to verify compatibility with the most common cards first.
Anyway, this additional 32k should be enough for now :-)
#107761 - Payk - Wed Nov 01, 2006 8:34 pm
Ok GBAMP and M3SD worked for you.
For me SCSD.
SCSD is one of those which require a gbaloader code (ds.gba) and that works fine.
#107783 - KayH - Wed Nov 01, 2006 11:42 pm
0xtob: could you please note the versions of the firmware hack (2.11?) and the underlying original firmware? Thank you very much!
br,
KaY
#107797 - 0xtob - Thu Nov 02, 2006 1:45 am
KayH: My official GBAMP firmware version is V1.94. I only upgraded the firmware hack though. I don't know which old version I had, but the new version is 2.11 (the current one).
#107814 - OOPMan - Thu Nov 02, 2006 9:03 am
Payk wrote: |
Ok GBAMP and M3SD worked for you.
For me SCSD.
SCSD is one of those which require a gbaloader code (ds.gba) and that works fine. |
SC doesn't usually require gbaloader code anymore...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#107849 - tepples - Thu Nov 02, 2006 5:02 pm
If you're using a custom link script, you may need the ndsloader code. The built-in loader may work only for the default link script due to tradeoffs between size and generality.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.