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 > LibFat & G6 lite

#128732 - Risine - Mon May 14, 2007 5:41 pm

I'm trying to use libfat with a G6 lite stuff, but fatInitDefault() always returns false.
I have tried to launch the DLDI Tester from Chism, with no more success, just says "initing FAT...fail". :(
Any idea?

#128762 - Risine - Mon May 14, 2007 11:24 pm

Quite strange indeed, fatInitDefault() :
I call it at the very beginning of the program.
- it fails if just after something like Game=new Game();
- it works if just before.
If someone has an idea about that, I'd be glad to hear it :)

One more thing, I was wondering as everything is in ROM space, is there a way to get data bytes address directly rather than using fread ( I did that before when using GBFS but had to change due to GBFS data size limitation )?

#128774 - tepples - Tue May 15, 2007 4:10 am

Risine wrote:
One more thing, I was wondering as everything is in ROM space, is there a way to get data bytes address directly rather than using fread ( I did that before when using GBFS but had to change due to GBFS data size limitation )?

What GBFS data size limitation? The only limitation on GBFS data size is the 32 MB of GBA ROM. If you have more than 32 MB, then everything isn't in ROM space. G6 contains 32 MB of RAM plus a naked NAND flash chip (the same thing as an xD-Picture Card).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#128795 - Risine - Tue May 15, 2007 10:40 am

Well, as you said, 32 MB size limitation.
I have to 'stream' a big file on my xx Gb card, and past the 32 MB limit, everything goes wrong. It seems I misunderstand things about ROM space and all that stuff. I thought xx GB WAS ROM space, am I wrong? How does it work?

#128806 - tepples - Tue May 15, 2007 12:53 pm

Risine wrote:
It seems I misunderstand things about ROM space and all that stuff. I thought xx GB WAS ROM space, am I wrong?

No, it's a solid state disk implemented with flash memory.

Quote:
How does it work?

The main memory in a G6 Flash card handles like an xD-Picture Card. Like CF and SD cards, xD-Picture Cards are block devices. A program can copy a sector at a time to or from RAM, and libfat abstracts block device access into (more convenient) file access by implementing the devoptab interface.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.