Page 1 of 1

What is .twl ?

Posted: Thu Jan 17, 2019 11:13 pm
by PypeBros
Hello there.

I am trying to recompile my homebrew with the latest devkitarm (r50, gcc-8.2.0)/libnds(1.7.3.1) I downloaded and I was surprised most of my tools inflated over 4MiB. My investigations point to a .twl section that has a physical address of 0x2400000 and gets effectively mapped at 0x400xxx in the final .NDS, although the section itself is pretty small.

I suspect something wrong with my setup / build rules as NDS examples seems to build just fine.

What is the role of that section ? I don't see any such thing in my previous setup.

Re: What is .twl ?

Posted: Fri Jan 18, 2019 1:12 am
by WinterMute
The .twl sections contain DSi specific code and all binaries are now hybrid.

Chances are you're still using the very, very old method of flattening the elf to a binary & passing that to ndstool. This will no longer work. Check the templates and other examples, ndstool takes elf files although it will still accept flat binaries since that can be used for extracting and reconstructing .nds files from components.

Re: What is .twl ?

Posted: Fri Jan 18, 2019 10:46 pm
by PypeBros
okay. that worked, as you said.
I suppose there is a good reason to keep the .elf -> .arm9 in ds_rules anyway...