Own ROM file finder for libfilesystem

Got something cool to help make the toolchains better? Post it here.
Post Reply
dop3j0e
Posts: 2
Joined: Mon Mar 30, 2009 9:35 pm

Own ROM file finder for libfilesystem

Post by dop3j0e » Mon Mar 30, 2009 9:45 pm

G'day,

As part of my current pet project, I wrote code to find the own ROM file (for NitroFS access) if the flash linker used doesn't support argv handling. Features:

- well written and short, no useless bloat
- uses standard functions (namely ftw() which is not a part of libnds/newlib AFAIK, but provided in an extra file)
- prints output to the user when it's searching (so he/she doesn't think the DS crashed)
- saves the found name in the ROM file to not have to search again
- safe against false positive findings through compiled-in timestamp (no extra build tools needed)

If you guys are interested, I'd be happy to see this code incorporated into libfilesystem or wherever you see fit -- I just don't know where I should send the code. Any hints?

Cheers,
dop3j0e

WinterMute
Site Admin
Posts: 1860
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Own ROM file finder for libfilesystem

Post by WinterMute » Mon Apr 06, 2009 3:22 pm

Not interested, sorry.

One of the purposes of libfilesystem is to encourage support of the argv protocol used to find the nitroFS via FAT. Searching for the nds file on startup is a bad idea, even worse is saving the path of the nds file in the app. There are two scenarios where this approach will fail dramatically - when the user rearranges the filesystem so the nds file is no longer in the same place and when the user renames the nds file.
Help keep devkitPro toolchains free, Donate today

Personal Blog

dop3j0e
Posts: 2
Joined: Mon Mar 30, 2009 9:35 pm

Re: Own ROM file finder for libfilesystem

Post by dop3j0e » Wed May 06, 2009 9:59 pm

Oh, in that case my code will just find it can't open the file (or if it can, find the fingerprint doesn't match) and rescan.

But I agree -- getting the linkers to support argv is the way to go, and searching the ROM is a kludge, so I understand your position.

I'd like to post my code to the public anyway; somewhere where others can easily find it. I'm rather new to the scene -- is there a good site where DS coders put up their code or should I just put it on my personal page and rely on Google?

Thanks for your reply and keep up the good work!
dop3j0e

WinterMute
Site Admin
Posts: 1860
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Own ROM file finder for libfilesystem

Post by WinterMute » Thu May 07, 2009 7:44 pm

Please don't post the code anywhere. There's already a basic menu system in SVN that supports argv, this will be extended further in due course. Scanning directories on startup is a bad idea.
Help keep devkitPro toolchains free, Donate today

Personal Blog

User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

Re: Own ROM file finder for libfilesystem

Post by vuurrobin » Thu May 07, 2009 10:09 pm

WinterMute, could you please tell me why you (or any of the moderators) removed my post without warning or message or anything? afaik, I didn't break any rules, the post was ontopic and it answers a question somebody has plus showing him/her a part of the ds community. if you disagree with my post, than you can state that, but deleting a post just because you disagree with it is wrong and abuse of your admin powers.

having a forum where you can't freely discuss things is counterproductive and not good for the community.

WinterMute
Site Admin
Posts: 1860
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Own ROM file finder for libfilesystem

Post by WinterMute » Fri May 08, 2009 3:34 am

Having a forum where bad advice and inappropriate answers to questions remain is counterproductive and bad for the community.

Code to scan directories for an nds file which may or may not exist is a ridiculous waste of resources. Some users have the biggest SD cards they can lay their hands on, filled with as many games as they can find - these users will experience extreme delays on startup due to scanning.

The only appropriate solution to that problem is the argv protocol as supported by the basic homebrew menu in SVN.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest