gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Misc > why does homebrew need to use a ds.gba then renamed to .nds?

#81640 - adrian783 - Sun Apr 30, 2006 8:27 pm

im so confused, since homebrews often need to provide 2 or more files, one for flashcart? one for supercard or whatever. whats the difference really? is there no way to have one file that runs on everything?

#81641 - m2pt5 - Sun Apr 30, 2006 8:40 pm

Some flashcarts mangle the header when you flash an .nds straight to it, so the .ds.gba has an extra header for that purpose. (Also, some will not flash files that aren't .gba.)

The "Supercard version" is just a renamed .ds.gba... what everything else knows as .ds.gba, Supercard knows as .nds. Don't ask the homebrewers for help with this, ask Romman, the creator of the Supercard.
_________________
Don't sign your posts, it's dumb.

#81660 - agentq - Mon May 01, 2006 12:18 am

The .ds.gba file contains a piece of code to copy the executable part of the program into main RAM, and then jump to the start. The file is mapped to GBA rom space so can still be accessed to load data. This method is used on GBA flash carts. The GBAMP v2 doesn't have any memory in GBA rom space, so cannot support .ds.gba files. The Supercard/M3 can pretent to be a flash cart because they contain RAM which is mapped to the GBA memory space. The supercard calls .ds.gba files .nds, for no apparent reason.

An .nds file doesn't contain code to load the executable into RAM. In this case, the whole file is copied into memory by another program, for example, the BIOS on the GBAMP/M3/Supercard can do this, or the DS BIOS does this for Wireless Multiboot. In this way the code doesn't need to know about wireless, flash cards, etc. because by the time it starts it is already loaded. Of course, if the program needs to acess more data than just the .nds file it needs to be built with the FAT driver so it can access the card directly.

#81690 - Chetic - Mon May 01, 2006 9:46 am

People still use flashcarts? ;p
_________________
Packin':
Grey DS with FlashMe v7
1Gbit XG2T 2005 (Neoflash compatible)
GBAMP, Supercard CF, 512Mb Magic Key 3 and EZFA 256Mbit

#81694 - tepples - Mon May 01, 2006 1:08 pm

Chetic wrote:
People still use flashcarts? ;p

Some people started on the GBA.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#81821 - pepsiman - Tue May 02, 2006 8:50 am

agentq wrote:
An .nds file doesn't contain code to load the executable into RAM.

.nds files made with ndstool do contain code to load the executable into RAM.
The E3 demos do not.
Quote:
In this case, the whole file is copied into memory by another program, for example, the BIOS on the GBAMP/M3/Supercard can do this, or the DS BIOS does this for Wireless Multiboot.

The GBAMP firmware and the DS firmware do load .nds files into RAM.

The M3 and G6 can prepend a .nds loader to the .nds file when loading into the RAM on the cart, but they don't load directly into RAM.

The SuperCard cannot load proper .nds files (like E3 demos).