#124977 - DS_LitE - Tue Apr 10, 2007 4:02 pm
Well believe me,ive heard of wifime and WMB
but is there a ds app and server type application that
streams a game to the ds, i have a flash cart and an ards
and can boot homebrew,but the flash cart is small and some
ds homebrew doesnt fit on it(e.g tickle girl,dslinux)
#124993 - DS_LitE - Tue Apr 10, 2007 7:52 pm
also when i use WifiLoader it just stays at the Loading at port:55
screen
Code: |
Wifi Loader Connected
Client IP:192.161.0.11
|
and just keeps doing that over and over again
#124994 - Lynx - Tue Apr 10, 2007 7:58 pm
Well, the DS only has 4MB of RAM.. if it doesn't fit on your flash card, it's not going to fit into the DSs RAM.
_________________
NDS Homebrew Roms & Reviews
#124995 - DS_LitE - Tue Apr 10, 2007 7:59 pm
ohh it goes to the RAM?? isn't there a way to just
stream it to it...
#124999 - simonjhall - Tue Apr 10, 2007 8:44 pm
Streaming an executable (without the running program knowing this is happening) would be pretty hard to do.
<ponders writing this>
Yeah, I reckon I know how to do this - you'd need to use the PU and some exception handlers to get this to work. You'd be better off writing some kind of network DLDI driver which accessed a remote filesystem in order to fetch the data files required by the program. This wouldn't allow you to stream an executable though...
_________________
Big thanks to everyone who donated for Quake2
#125003 - DS_LitE - Tue Apr 10, 2007 9:11 pm
it would still go to the RAM???
#125004 - simonjhall - Tue Apr 10, 2007 9:20 pm
DS_LitE wrote: |
it would still go to the RAM??? |
'it'?
You can't run a program without at least some of it being in memory. If you used exception handlers, only a small part of the program would be in memory.
If you used a network DLDI the whole program would be in memory, but the data files would be on another machine. This would be an alternative to using a program with an appended filesystem, like ticklegirl.
_________________
Big thanks to everyone who donated for Quake2
#125007 - DS_LitE - Tue Apr 10, 2007 9:29 pm
well i have a homebrew game and its 16MB
and all i have is a 64MB flash cart...
#125009 - simonjhall - Tue Apr 10, 2007 9:36 pm
64 MB > 16 MB
or is MB Mbit?
_________________
Big thanks to everyone who donated for Quake2
#125012 - DS_LitE - Tue Apr 10, 2007 9:46 pm
ya thats what i meant nothing above 8MB(gba 64MB) will fit
#125014 - tepples - Tue Apr 10, 2007 10:05 pm
simonjhall wrote: |
If you used a network DLDI the whole program would be in memory |
"Network DLDI"? You mean a DLDI driver that reads and writes a FAT-formatted block device over TCP, like an iSCSI initiator? Under iSCSI, you might have to devote a separate partition of your PC's hard drive to your DS.
Another solution is a separate file system (not libfat) that could mount an NFS, CIFS, HTTP, or FTP server as a drive, much like KDE's kioslave system. For instance, it would mount http://192.168.192.168 as a drive and then translate
Code: |
fopen("stuff.bin", "r"); |
into
Code: |
GET /stuff.bin HTTP/1.1
Host: 192.168.192.168 |
That's possible, but nobody seems to have the time to implement this.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#125016 - Lick - Tue Apr 10, 2007 10:30 pm
Why always override the standard functionnames? What if I want to use networking and regular FAT access at the same time?
_________________
http://licklick.wordpress.com
#125018 - tepples - Tue Apr 10, 2007 10:43 pm
Lick wrote: |
Why always override the standard functionnames? What if I want to use networking and regular FAT access at the same time? |
Your downloader app would probably mount the server as "http1:/" and the memory card as "fat:/".
fopen() is not a libfat function. It's a newlib function, which calls libfat through a function pointer table called "devoptab" that gets populated when you mount a file system. There would be no problem with simultaneously mounting a FAT volume in SLOT-1 as "fat1:/", a FAT volume in SLOT-2 as "fat2:/", an HTTP server at 192.168.192.168 as "http1:/", and an HTTP server at 10.3.2.1 as "http2:/", as long as they have different drive letters.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#125035 - DS_LitE - Wed Apr 11, 2007 12:15 am
so what do i need to do?
#125045 - HyperHacker - Wed Apr 11, 2007 12:35 am
Unless you're good at coding, you'll probably need a bigger flash cart. 8MB is very little.
BTW, don't confuse MB and mb (Megabytes and Megabits). 8mb = 1MB. And it gets even sillier when you get into metric ("1GB" on hard drive packaging is not the same as "1GB" in your operating system, because in fact it should say "1GiB" but for some reason they're allowed to get away with that...)
_________________
I'm a PSP hacker now, but I still <3 DS.
#125098 - Lick - Wed Apr 11, 2007 10:53 am
tepples wrote: |
Your downloader app would probably mount the server as "http1:/" and the memory card as "fat:/".
fopen() is not a libfat function. It's a newlib function, which calls libfat through a function pointer table called "devoptab" that gets populated when you mount a file system. There would be no problem with simultaneously mounting a FAT volume in SLOT-1 as "fat1:/", a FAT volume in SLOT-2 as "fat2:/", an HTTP server at 192.168.192.168 as "http1:/", and an HTTP server at 10.3.2.1 as "http2:/", as long as they have different drive letters. |
So you mean I would have to change all my fopen calls, adding a drivename to the query?
Code: |
fopen("http1://stuff.bin", "r"); |
Looks pretty neat, but I still prefer to have custom function names, as I don't see the point of reusing fopen.
_________________
http://licklick.wordpress.com
#125105 - tepples - Wed Apr 11, 2007 1:49 pm
Lick wrote: |
So you mean I would have to change all my fopen calls, adding a drivename to the query?
Code: | fopen("http1://stuff.bin", "r"); |
|
That or use chdir() before opening a bunch of files.
Quote: |
Looks pretty neat, but I still prefer to have custom function names, as I don't see the point of reusing fopen. |
Because the same code could load from a memory card or from the network, just by passing a different filename.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#125108 - Lick - Wed Apr 11, 2007 2:23 pm
Seriously, that's quite bad code design. If a function will work in completely different ways, it should be split and renamed.
Having the following code to access local files and remote files: Code: |
fopen("file", "r"); |
depending on chdir.. Is just lousy.
I might be arguing without real arguments here, but rethink it for a bit. It's not clean code design.
_________________
http://licklick.wordpress.com
#125109 - simonjhall - Wed Apr 11, 2007 2:30 pm
In the context I mentioned it (a DLDI driver), the program shouldn't know/care where the data's coming from. If you write a program which uses fopen do you care if the data comes from slot one or two?
Really I thought it could be for people who don't have flash cards and only run their executables via wifi - and this would allow these programs to 'just work' as their data files would be fetched over the air...
_________________
Big thanks to everyone who donated for Quake2
#125112 - kusma - Wed Apr 11, 2007 3:51 pm
I find the idea of a http-driver for DLDI really cool :)
A bit weird (and useless?), but cool :)
#125113 - Lick - Wed Apr 11, 2007 3:59 pm
DLDI would be cool, but to treat HTTP as a filesystem (and bind it to newlib) would not be. It's over-transparent programming-wise.
_________________
http://licklick.wordpress.com
#125115 - simonjhall - Wed Apr 11, 2007 4:10 pm
Yeah, http would be a bit heavy! I have no idea how you'd do fseek and so on! It's be gallons of POSTs and you'd send all the arguments as part of the URL, etc...
Nah, I was thinking more like a flat file on a remote system which you access as a filesystem (like a loop block device in Linux). The network protocol wouldn't be http, just some custom DS hoo-ha :-)
BTW I'm too lazy to write this, so all this chat is pretty academic! It would be really interesting to do though. Where would you put the wifi init code? In the DLDI driver?
Oh and to the OP: I think it's time you spent some cash if you are serious about doing DS homebrew. I think all your threads to date have been about getting programs onto your DS on the cheap ;-)
_________________
Big thanks to everyone who donated for Quake2
#125122 - Lynx - Wed Apr 11, 2007 4:39 pm
What would the impact of only a 2Mb connection be?
What about a slower (internet connection speeds) connection?
I mean, I could see a sweet server based front end that "we" have been talking about for a long time that would allow you to browse all the homebrew available, and then stream that homebrew to the DS.
In theory, the DS should be able to download at ~256KB/sec, right? Or did I do the math wrong?
2Mb x 1024 = 2048Kb
2048Kb / 8 = 256KB
Minus overhead of TCP/IP, etc.
I know i've downloaded from DragonMinded's homebrew database at around 100KB and 4MB came down pretty fast, so I don't think it would be an issue for either case, local or internet.
_________________
NDS Homebrew Roms & Reviews
#125127 - Lick - Wed Apr 11, 2007 5:00 pm
It would be interesting to see a Local Network DLDI with a custom DS-optimized protocol.
_________________
http://licklick.wordpress.com
#125155 - tepples - Wed Apr 11, 2007 8:07 pm
Lick wrote: |
Seriously, that's quite bad code design. If a function will work in completely different ways, it should be split and renamed. |
I see it as object-oriented in a way: multiple implementations (FAT, HTTP) of the same interface (open, read, write, close). Should people have to call different functions to read from FAT or NTFS or ext2? Heck, Microsoft Windows already implements this for CIFS and has done so since Windows 95.
Quote: |
Having the following code to access local files and remote files: Code: | fopen("file", "r"); | depending on chdir.. Is just lousy. |
"Network transparency is lousy." A lot of people have made the same complaint about X11.
simonjhall wrote: |
Yeah, http would be a bit heavy! I have no idea how you'd do fseek and so on! |
fseek() in HTTP is a resume.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#125156 - HyperHacker - Wed Apr 11, 2007 8:09 pm
Wifi DLDI = good. HTTP DLDI = bad. HTTP is not designed for this sort of thing.
_________________
I'm a PSP hacker now, but I still <3 DS.
#125168 - Lick - Wed Apr 11, 2007 10:00 pm
tepples wrote: |
I see it as object-oriented in a way: multiple implementations (FAT, HTTP) of the same interface (open, read, write, close). Should people have to call different functions to read from FAT or NTFS or ext2? Heck, Microsoft Windows already implements this for CIFS and has done so since Windows 95. |
Look, FAT NTFS ext2 are all local filesystems that more or less have the same interface. HTTP or any other networking protocol, does not work the same and to make it transparent would be plain stupid. (Think PALib. Easy, but stupid.) Documentating it well, still would not make any difference because it's just stupid code design.
If file system functions are going to wrap complete networking protocols.. I mean, why do we have socket libraries?
_________________
http://licklick.wordpress.com
Last edited by Lick on Wed Apr 11, 2007 10:51 pm; edited 1 time in total
#125170 - Lynx - Wed Apr 11, 2007 10:06 pm
Heh.. Lots of things are used outside of their design.
Take E-mail for example (not talking about spam, either).. it wasn't designed to be a file transfer protocal, yet every day someone is sending a 10MB attachment of some video to everyone in their office. They're called LINKS people! But nooo.. It's more fun to tie up 600MB of server space because "Dude.. this is funny!".
_________________
NDS Homebrew Roms & Reviews
#125195 - chishm - Thu Apr 12, 2007 1:39 am
One slight problem with a DLDI Wifi driver -- you'd have to somehow patch the ARM7 binary too.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com
#125253 - OOPMan - Thu Apr 12, 2007 11:02 am
Hehehe, all this talk of NFS-type stuff makes we wonder when someone will put together a funky little distributed computing app for the DS...
Seti@HomeDS? You never know ;-)
Well, okay, you do...
Still, it would be cool, although rather pointless...
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI
You can find my NDS homebrew projects here...
#125256 - simonjhall - Thu Apr 12, 2007 11:40 am
Well I always thought an ARM7 DLDI would be useful... Dunno how you'd fit the wifi code into the tiny space allocated to the driver though!
_________________
Big thanks to everyone who donated for Quake2
#125276 - DS_LitE - Thu Apr 12, 2007 3:28 pm
did i mention i have a flash cart,is this possible with that??
#125278 - DS_LitE - Thu Apr 12, 2007 3:29 pm
sry double post..^^^
#125286 - tepples - Thu Apr 12, 2007 3:41 pm
OOPMan wrote: |
Hehehe, all this talk of NFS-type stuff makes we wonder when someone will put together a funky little distributed computing app for the DS...
Seti@HomeDS? |
More like Resetti@Home.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#125456 - Puyo - Fri Apr 13, 2007 2:15 pm
Isn`t DLDI used for accessing raw sectors? And not the filesystem? Of course I suppose fatlib could deal with it, but it`s not really suited for this. I have written something similiar with use of devoptab. It`s still have some speed issues (writing/reading) mainly because of newlib voodoo tricks, like transparently breaking all the reads/writes in 1KB sizes.
I`m thinking about releasing it as library when I`ll have this problem solved.