[solved] 4mb limit
-
- Posts: 24
- Joined: Tue Jun 23, 2009 7:19 pm
[solved] 4mb limit
Hi all,
I'm aware that our .nds files are limited to 4mb, so if need be we can put all our assets in a folder on the flashcart and load it at runtime, but I had a thought... If pirate roms exist, then it must be possible to package all the assets into our .nds file.
Apologies if this has already been said before, I did try searching, but I had an idea from my Operating System development days. Couldn't we create a .nds file, padd it out with 0s until it's the full 4 megabytes long, and then join on the asset data at the end of the file, then use far pointers to get to the data.
Hmm though that's just made me realise, that wouldn't be possible would it, as only the first 4megs would be stored in memory.. But anyway, you can see the idea forming, is there any way we can break the 4meg limit without loading from folders on the flashcart? Just figure if official roms can run from 1 .nds file, surely there's a way?
Cheers
Spec
I'm aware that our .nds files are limited to 4mb, so if need be we can put all our assets in a folder on the flashcart and load it at runtime, but I had a thought... If pirate roms exist, then it must be possible to package all the assets into our .nds file.
Apologies if this has already been said before, I did try searching, but I had an idea from my Operating System development days. Couldn't we create a .nds file, padd it out with 0s until it's the full 4 megabytes long, and then join on the asset data at the end of the file, then use far pointers to get to the data.
Hmm though that's just made me realise, that wouldn't be possible would it, as only the first 4megs would be stored in memory.. But anyway, you can see the idea forming, is there any way we can break the 4meg limit without loading from folders on the flashcart? Just figure if official roms can run from 1 .nds file, surely there's a way?
Cheers
Spec
Last edited by spectre1989 on Sat Jun 27, 2009 11:07 pm, edited 1 time in total.
Re: 4mb limit
I think the NitroFS stuff can put things into the .nds file, but I haven't ever used this kind of stuff.
Re: 4mb limit
there are already some libraries out there that does this. EFS is the most used one (I think), but libfilesystem comes with devkitPro.
-
- Posts: 24
- Joined: Tue Jun 23, 2009 7:19 pm
Re: 4mb limit
Thanks for the replies guys, rather relieved that it's already been done! EFS looks like the best bet from what I can see.
-
- Site Admin
- Posts: 2003
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: 4mb limit
libfilesystem is the best, EFS is an unsupported 3rd party library.
-
- Posts: 24
- Joined: Tue Jun 23, 2009 7:19 pm
Re: 4mb limit
Ah ha, I didn't realise libfilesystem could also break the 4meg limit, for some reason I was under the impression it could only read from files on the flashcart, but checked out the examples and it's awesome!WinterMute wrote:libfilesystem is the best, EFS is an unsupported 3rd party library.
-
- Posts: 24
- Joined: Tue Jun 23, 2009 7:19 pm
Re: 4mb limit
In order to use nitroFS with libfilesystem, am I right in thinking I still need to include the nitroFS header files and link with the nitroFS libs? The only nitro related function I could find in the existing header files was just to init nitroFS, so I'm somewhat at a loss as to how to open a file through nitro..
Cheers
Spec
Cheers
Spec
-
- Site Admin
- Posts: 2003
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: 4mb limit
just like fatInitDefault(), everything after nitroFSInit() is just standard file IO.
Re: 4mb limit
Just to expand on this a little, libfilesytem IS nitroFS... you don't use nitroFS with libfilesystem. Let me correct myself there, libfilesystem is a modified version of nitroFS. You only need to include the existing header and like WinterMute said, once you init, it's regular file io afterwards.spectre1989 wrote:In order to use nitroFS with libfilesystem, am I right in thinking I still need to include the nitroFS header files and link with the nitroFS libs? The only nitro related function I could find in the existing header files was just to init nitroFS, so I'm somewhat at a loss as to how to open a file through nitro..
Cheers
Spec
-
- Posts: 24
- Joined: Tue Jun 23, 2009 7:19 pm
Re: 4mb limit
Yeah I got it working, now on my way to my first homebrew, woo!
Who is online
Users browsing this forum: No registered users and 1 guest