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 > HBMenu questions

#173701 - SifJar - Sat Apr 24, 2010 7:42 pm

I am interested in HBMenu, but I have a couple of questions:

1. What is ARGV? I have looked around, but can't find much. A link to some information would be great. From what I HAVE found, it seems to be a method of passing arguments to a NDS binary, but i have also read some stuff about it being a replacement for EFS, and I don't get how it is both? Also, is ARGV support dependent on the card, or just the launcher?

2. Why do I need a bootstrap? Can I not just DLDI patch the HBMenu binary and set IT as the default firmware on my card (I use a Max Media Dock, so this would just involve renaming it bootme.nds), rather than do the same to a bootstrap, which would I think just slow down the boot process?

3. Will return to loader work on any card HBMenu works on? Is there a homebrew that uses it I can test with?

Thanks to anyone who answers my questions, I think that's all for now...

#173702 - Dwedit - Sat Apr 24, 2010 8:27 pm

ARGV is just passing parameters to a NDS file, nothing more. It also includes the parameter of the NDS file's own path, so stuff that used to need to scan the whole filesystem to find itself can now just look at the first argument and find itself instantly.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#173703 - SifJar - Sat Apr 24, 2010 8:32 pm

OK, thanks for the info.

#173705 - vuurrobin - Sat Apr 24, 2010 11:15 pm

1. argv are the parameters that are passed to the main function, including the path to the nds file. libfilesystem is a replacement for EFS, but it needs argv to work. and it depends on the launcher.
see http://www.learncpp.com/cpp-tutorial/713-command-line-arguments/ for more information.

2. the return to loader executes a specific file who's name is hardcoded in the loader (normally called _BOOT_DS.NDS). if you change the name of the homebrewmenu, the return to loader wont work anymore (unless you change the name in it to). the bootstrap is to avoid recompiling the menu for each card, just to put the correct name in it.

3. if the homebrewmenu works and has the correct name, then return to loader will work. you can test it with any one of the examples build with the latest devkitPro.
_________________
my blog:
http://vuurrobin.100webcustomers.com/

#173712 - SifJar - Sun Apr 25, 2010 12:12 pm

OK, all makes sense now I think. Thanks for your help.

#174173 - SifJar - Fri May 21, 2010 6:57 pm

OK, I finally got around to trying out HBMenu. There's a problem: FAT Init keeps failing. Both in the bootstrap and in HBMenu itself (loaded via DSOrganize as the bootstrap wasn't working), I get a FAT Init failed message. I have DLDI patched both NDS files as I have with other homebrew and they all work fine. I am using a Max Media Dock. Other FAT-using programs like DSOrganize work fine, any ideas what the problem is? Has a recent update to devkitPro somehow killed MMD support or something? I would post this at the devkitPro forums, but they seem to be down atm...

EDIT: I remembered reading on the HBMenu wiki page that it needed an ARM7 DLDI patch, and thought that may be the issue, so I modified the patch according to the instructions here: http://www.teamcyclops.com/forum/showpost.php?p=43223&postcount=3 , but still no luck. Other apps like DSOrganize still work with the new patch though...

#174188 - ninjalj - Sat May 22, 2010 8:14 pm

The Max Media Dock is a slot 2 device, right? I _think_ that newer devkitPro and libfat may have problems with slot 2 devices, see http://forum.gbadev.org/viewtopic.php?p=174110&highlight=#174110.

#174207 - SifJar - Sun May 23, 2010 7:00 pm

Yeah it is a slot2 device, and that sucks. Don't a fair amount of people still use slot2 devices? Well, thanks for the info anyway... Any idea if it'd work if I compiled with an old libfat? Or would that stop HBMenu working correctly? Dunno if I'd even be able to do it.