I also think this.deufeufeu said:You arm9 has to be loaded into memory so there's the limit of ram. I think it was his question.
DanTheManMS said:Commercial DS games have a built-in filesystem that works differently. The carts know to only load the first part and then stream data from the microSD card as the game requests it. DS homebrew *.nds files however do not run like this. Instead, the homebrew app is loaded entirely into DS RAM and then executed from there, so if your program is larger than 4 MB it will not run. The homebrew files I mentioned earlier get around this by executing directly from the GBA cartridge, something slot-1 cannot do, and because of that their limit is 32 MB since that's the limit for the total filesize of a GBA file.
Most DS applications nowadays however use microSD card access for storing files. When doing this, you load just the core data in a *.nds file that's less than 4 MB, and then you can access external files that let the program work correctly. This is how, for instance, Moonshell can play a 20 MB video file. Moonshell's *.nds file is less than 4 MB so it gets loaded into RAM and run, and then it streams the larger file from your card and works with that. Come to think of it, this method of loading data is very similar to the way commercial games work, just without packaging everything into a single executable file.
There actually was a way to embed your media files into Moonshell's *.nds file up until version 1.5, but again this was only useful for slot-2 users, especially ones with NOR-based carts that don't have filesystems, and you could only have up to about 30 MB of media files or you'd go over the GBA's 32 MB limit.
Morgawr said:I understand, but what I don't get is... why can commercial game work in a different way? I mean, we have done wonders in the homebrew sector (with passme and all that stuff) but still we can't replicate that file system the commercial games use? Or is there a way?
Like if I were to program a commercial-like game... is it impossible without resorting to tricks like the slot-2 thing or loading external files from the microSD?
FAST6191 said:Morgawr said:I understand, but what I don't get is... why can commercial game work in a different way? I mean, we have done wonders in the homebrew sector (with passme and all that stuff) but still we can't replicate that file system the commercial games use? Or is there a way?
Like if I were to program a commercial-like game... is it impossible without resorting to tricks like the slot-2 thing or loading external files from the microSD?
It can be done (why do you think the homebrew dev kit program ndstool works with commercial roms?) but the reason we do not replicate commercial roms is precisely because we have DLDI and what have you; imagine having to rebuild the homebrew every time you wanted a new video, music track..... and it also dodges kludges like overlays.
However if for some reason you do want a massive file like what DanTheManMS was speaking of then the technique was reborn for the DLDI era as FCSR, several ways to do it but the easiest is with DLDIrc:
http://dldi.drunkencoders.com/index.php?ti...LDI_Right_Click
The picodrive DS website has some info if you need it for whatever reason but I can be bothered to dig it up right now.
DanTheManMS said:Commercial DS games have a built-in filesystem that works differently. The carts know to only load the first part and then stream data from the microSD card as the game requests it. DS homebrew *.nds files however do not run like this. Instead, the homebrew app is loaded entirely into DS RAM and then executed from there, so if your program is larger than 4 MB it will not run. The homebrew files I mentioned earlier get around this by executing directly from the GBA cartridge, something slot-1 cannot do, and because of that their limit is 32 MB since that's the limit for the total filesize of a GBA file.
Most DS applications nowadays however use microSD card access for storing files. When doing this, you load just the core data in a *.nds file that's less than 4 MB, and then you can access external files that let the program work correctly. This is how, for instance, Moonshell can play a 20 MB video file. Moonshell's *.nds file is less than 4 MB so it gets loaded into RAM and run, and then it streams the larger file from your card and works with that. Come to think of it, this method of loading data is very similar to the way commercial games work, just without packaging everything into a single executable file.
There actually was a way to embed your media files into Moonshell's *.nds file up until version 1.5, but again this was only useful for slot-2 users, especially ones with NOR-based carts that don't have filesystems, and you could only have up to about 30 MB of media files or you'd go over the GBA's 32 MB limit.