#134008 - Dood77 - Tue Jul 10, 2007 2:22 am
I though up an idea that would let everyone define for themselves where external files used by homebrew apps/games are put.
I posted in another thread but it was a little off-topic and I want more people to see it. Heres what I posted, copied and pasted from this thread:
Dood77 wrote: |
What I kinda meant was that every program that wanted customizable directories could use the same file, called something like paths.cfg, and it would have its own syntax for paths, etc. Users could edit the .cfg themselves, or the programs could edit them when the user uses the settings menu in the program.
Example:
Code:
Obviously proprietary paths for other programs could be things like locations for resources, etc.
Now the problem is standardizing.
|
EDIT: hmmm... my code tags got screwed up in the quote, lemme take them out:
Code: |
//File paths for nds binaries
[dschannels.nds] //program
_nds = "/programs/dschannels/dschannels.nds" //location of binary /* examples of
_cfg = "/programs/dschannels/dschannels.cfg" //location of config file standard paths *\
_media = "/programs/lmp-ng/lmp-ng102.nds" /*examples of program
_user1 = "/games/quake/quakeDS.nds" proprietary paths *\ |
Obviously for this to work, lots of major homebrew programs need to adopt this, and I know most of you who are doing major work have other things to spend time on. But I think its a good idea... thoughts?
Oh, and whats the syntax for putting a link to the quoted text in the quote tag for BBcode? e.g. it says 'in this post, <blah> wrote:' where the words ' this post' are a hyperlink to the original post.
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
Last edited by Dood77 on Tue Jul 10, 2007 11:36 pm; edited 2 times in total
#134012 - tepples - Tue Jul 10, 2007 3:17 am
This looks like .ini format, and the standard is already to put hardcoded paths inside the /data folder, so why not call it /data/paths.ini ?
As for citation of quoted text, the syntax is as follows:
Code: |
[quote="In [url=http://www.example.com/]example[/url], Nemo"]I just had a nightmare that I was a fish![/quote]
Go back to sleep, Nemo.
|
This produces the following:
In example, Nemo wrote: |
I just had a nightmare that I was a fish! |
Go back to sleep, Nemo.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#134046 - melw - Tue Jul 10, 2007 9:20 am
No. Please, no.
What we really need is devkitARM R21 with argc/argv support and homebrew applications using their working directories instead of polluting the root directory of any given flash adapter. And judging by what Wintermute has said lately, the R21 release is just around the corner. Patience!
#134073 - Noda - Tue Jul 10, 2007 1:06 pm
Or don't bother using external data files and use an embedded FS like my EFS system ;-)
#134081 - Lick - Tue Jul 10, 2007 2:32 pm
melw: it still requires a "standard" homebrew browser/launcher because the current launchers don't support the argc/argv yet.
_________________
http://licklick.wordpress.com
#134132 - JLsoft - Tue Jul 10, 2007 10:22 pm
I like ComicBookDS' method of 'Just search every directory until the files needed are found'
Lets you put anything anywhere, even the skin files :/ ...and it's not anywhere as slow as it sounds. :)
#134144 - Dood77 - Tue Jul 10, 2007 11:30 pm
EDIT: fixed up first my post a little.
tepples wrote: |
This looks like .ini format, and the standard is already to put hardcoded paths inside the /data folder, so why not call it /data/paths.ini ? |
Sure thing, I don't know much about formatting these kinds of markups, someone else can do that. Just the same basic idea. And where ever people think it should be put works alright, I really don't mind.
---------------------------
tepples wrote: |
As for citation of quoted text, the syntax is as follows:
Code: | [quote="In [url=http://www.example.com/]example[/url], Nemo"]I just had a nightmare that I was a fish![/quote]
Go back to sleep, Nemo.
|
This produces the following:
In example, Nemo wrote: | I just had a nightmare that I was a fish! |
Go back to sleep, Nemo. |
Ah, I get it now, thanks.
---------------------------
melw wrote: |
No. Please, no.
What we really need is devkitARM R21 with argc/argv support and homebrew applications using their working directories instead of polluting the root directory of any given flash adapter. And judging by what Wintermute has said lately, the R21 release is just around the corner. Patience! |
Lick wrote: |
it still requires a "standard" homebrew browser/launcher because the current launchers don't support the argc/argv yet. |
What he said!
---------------------------
Noda wrote: |
Or don't bother using external data files and use an embedded FS like my EFS system ;-) |
I'm gonna do another what he said: melw wrote: |
No. Please, no. |
In this post (modified a little), Dood77 wrote: |
No offense Noda, but ick... Requires too much work to modify files and everything. As it is, I can edit .cfg files, copy files, etc. with DSOrganize very easily. |
---------------------------
JLsoft wrote: |
I like ComicBookDS' method of 'Just search every directory until the files needed are found'
Lets you put anything anywhere, even the skin files :/ ...and it's not anywhere as slow as it sounds. :) |
I dunno how many folders you have, but I've got a lot. my 1GB card is almost full, and I can't really name one thing that takes up the majority of the space. I've used ComicBookDS, and I don't know how slow your description sounds to you, but when I was using it, it took a good 15-20 seconds to get able to select which .cbds file I wanted to browse. LMP-ng also does this, and takes around the same time. Sometimes I just want to get my music playing and start doing whatever I'm gonna do while I listen to music but I gotta sit there looking like a nerd (okay, maybe thats not too out of the ordinary) for a half a minute before I can close my DS and put it in my pocket.
Meh, this isn't just for me, I think it's the most efficient way to please all the users. I didn't think my chances of getting this actually implemented were that great, but the idea still stands for anyone who wants to use it, I guess it would still need to be documented though.
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#134160 - dantheman - Wed Jul 11, 2007 4:22 am
Dood77 wrote: |
I dunno how many folders you have, but I've got a lot. my 1GB card is almost full, and I can't really name one thing that takes up the majority of the space. I've used ComicBookDS, and I don't know how slow your description sounds to you, but when I was using it, it took a good 15-20 seconds to get able to select which .cbds file I wanted to browse. LMP-ng also does this, and takes around the same time. Sometimes I just want to get my music playing and start doing whatever I'm gonna do while I listen to music but I gotta sit there looking like a nerd (okay, maybe thats not too out of the ordinary) for a half a minute before I can close my DS and put it in my pocket. |
For what it's worth, I have a 2 GB miniSD card that's nearly full and has about 100 folders total (14 on the root), and it only takes about 2 seconds max before LMP-ng is ready to use. On another board, it was suggested that a reformat could speed up a slow access time, which appeared to work for some users. It's worth a try.
That said though, this does sound like a good idea if people adopt the method.
#134168 - melw - Wed Jul 11, 2007 8:08 am
Dood77, there's nothing wrong with the idea itself, but it'd require 1) a lot of developers start using something like this, not to mention 2) for them to use it correctly. This doesn't change the fact that lot of problems with scattered files all around flash cards comes from developers not being able to tell what their working directory. Like Lick said, we still need a launcher for passing the arguments, but at least I'm placing my bets here.
Also Noda has a point - don't use external files unless you absolutely need to. And I'm not talking about DSOrganize, emulators or anything like that - most of the homebrew applications could be easily standalone .nds's with some extra thought put into it.
#134179 - Dood77 - Wed Jul 11, 2007 10:20 am
melw wrote: |
Like Lick said, we still need a launcher for passing the arguments, but at least I'm placing my bets here. |
So we all petition to get each and every one of our flashcart's firmwares updated to support new launch code? Or am I misunderstanding the term 'launcher'?
melw wrote: |
And I'm not talking about DSOrganize, emulators or anything like that - most of the homebrew applications could be easily standalone .nds's with some extra thought put into it. |
I wasn't referring to using an embedded filesystem with DSOrganize either, in the post I partially quoted, I was referring to QuakeDS, where I could edit and move the files with DSOrganize as I please, because they weren't embedded. Most of the homebrew I use anyway wouldn't work with an embedded filesystem, or at least it would make things more difficult. A few off the top of my head:
LemmingsDS
QuakeDS
LMP-ng
NesDS
SnemulDS
Beup
DoomDS
Nitrotracker
Warcraft: Tower Defense
I'm sure theres more but I don't have my card at the moment. All of them have filesystems that I would like to be able to edit without unpacking an embedded filesystem, and some of them to be able to edit them on the DS itself. (okay beup is a little bit of a stretch, but I do want to add a new avatar occasionally.) The only time I really wouldn't mind an embedded filesystem is if it was an original homebrew where I wouldn't care about external resources that I downloaded with the app/game.
Heck, if one person used my idea and documented it, and one other followed suit I'd be happy.
Oh and dantheman, you're right I should try a defragment... plus I'm not exactly sure I'm using the most recent version.
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#134191 - Lick - Wed Jul 11, 2007 1:28 pm
I would recommend scanning for the directory 3 levels deep. This gives room for <root>/data/Category/<yourapp> which is more than enough. To speed this up (as a user) you'd simply minimize the amount of directories in the root and in the second and third depthlevel directories. It should be fast enough like this.
Of course this is the case where argc/argv are invalid.
_________________
http://licklick.wordpress.com
#134267 - Dood77 - Thu Jul 12, 2007 4:03 am
You mean scanning to find the file that stores the information for paths? Or scanning for the .nds? The user would have to keep the name constant, unless some kind of a hash was used. But then hashes would be different with different dldi patches, wouldn't it?
If you mean to scan for the path config file, I meant for all homebrew programs to use the same file. If the syntax was used like in my above posts, each program would just have to scan the file for its section, a programmer-defined name in square brackets. From there various programmer-defined variables could be user-defined. It kinda just dawned on me that you could store more than paths here, but I don't know if that would make the file too long or cluttered.
You mentioned, Lick, in your DSLiveWeather thread that you were programming a "directory locating procedure" for it. What did you mean by this?
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#134290 - Mrshlee - Thu Jul 12, 2007 9:17 am
Placing the *.NDS on the root of the card
with /data/nameofsoftware for storing any additional files.
This would sure clear alot of stuff up - just make sure you give the option to set paths for important things.
EG: the 3 different megadrive emulators should be able to share the same roms.
root://roms/sega/megadrive/
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia
#134301 - Lick - Thu Jul 12, 2007 10:33 am
I mean by "Directory Locating Procedure" a procedure that searches for a directory. ;)
Like you tell it to find "Program Files" in "C:\" and it returns "C:\Program Files\". Or another example, you have a "/data/apps/DSLiveWeather" directory and you tell it to find "DSLiveWeather".
I wrote a draft last night and it seemed pretty quick to scan a lot of directories. About ~70 directories <150 ms. It's still a bit buggy though.
_________________
http://licklick.wordpress.com
#134431 - Dood77 - Fri Jul 13, 2007 2:41 am
So it searches for the directory every time it's used? Or if it stores the path, where does it store it?
_________________
If I use a term wrong or something then feel free to correct, I?m not much of a programmer.
Original DS Phat obtained on day of release + flashme v7
Supercard: miniSD, Kingston 1GB, Kingston 2GB
Ralink chipset PCI NIC
#134443 - Lick - Fri Jul 13, 2007 5:09 am
It doesn't store the path, but there's no need to since the path is found in < 200ms. Faster most of the time.
_________________
http://licklick.wordpress.com