gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > GBFS dat size limitation?

#127049 - Risine - Sun Apr 29, 2007 4:58 pm

I'm wondering if there is some data size limitation when using gbfs on the DS?
If I have a 4Gb card, can I add and use a (4Gb-sizeoftheprogram) big data file?

#127050 - Lick - Sun Apr 29, 2007 5:03 pm

I think it's 4MB minus sizeof(ARM9 binary). Not sure, but makes sense.
_________________
http://licklick.wordpress.com

#127057 - Sektor - Sun Apr 29, 2007 5:32 pm

If it's embedded then it's approx 4MB, if it's appended then 32MB and will only work on devices with 32MB of RAM. If you want 4GB, use libfat.
_________________
GTAMP.com/DS

#127088 - Risine - Sun Apr 29, 2007 11:15 pm

Is there no way to "change" the code of GBFS to allow 4Gb access?

#127093 - tepples - Sun Apr 29, 2007 11:38 pm

GBFS in theory supports archives up to 4 GiB, but the current implementation is restricted to EWRAM space (256 KiB on GBA, 4 MiB on DS) plus GBA ROM space (32 MiB). It would be possible to extend GBFS to support libfat:
  1. When opening a GBFS file, load its header and directory into memory.
  2. Add functions that scan the directory, malloc() a block of memory, and load the objects using fseek()/fread().
If I need such an extension to GBFS during the development of project DX, I'll write it.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.