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 > [Fixored] GBFS -> Works in Dualis, but not on Hardware...

#76944 - JessTicular - Sun Mar 26, 2006 5:46 pm

Hey guy's and gals,

I've spent the better part of a day trying to get the GBFS to work, but finally got it running nice and smooth on the latest version of Dualis.

After a small dance and clap, I figured I'd give it a shot on hardware.
Unfortunatly... It doesn't work! :(


All I'm trying to do is print out how many files are stored in the system, which is pretty straight forward in the code as:
Code:
  GBFS_FILE const* gbfs_file = find_first_gbfs_file((void*)0x08000000);
  iprintf("\x1b[1;1HTotal GBFS Files: %i\n", (*gbfs_file).dir_nmemb);


Dualis reports the correct number (1), but the hardware reports a silly number of 58771.


The basic run down of what I'm doing is:

Create normal .ds.gba & .nds files,
create a gbfs file system,
pad out to 256,
append system to .ds.gba & .nds files


( I figured out what to do from Chris's tutorials ( double.co.nz/nintendo_ds ), the example with DevKit, and various Forum Posts + Readme files )


Here's my workspace for everyone to gawk at and possibly laugh at me (hey, I'm new to the DS, cut me a break :P);
http://jt0.org/dl/ds/gbfs.rar

To get it going, simply run the makeall.bat file ( Does a clean, builds the app, then appends the gbfs ).


Thanks for any and all help as to why it's being silly!


Cheers,
Jess.


Last edited by JessTicular on Mon Mar 27, 2006 5:45 am; edited 1 time in total

#76945 - tepples - Sun Mar 26, 2006 6:22 pm

JessTicular wrote:
I've spent the better part of a day trying to get the GBFS to work, but finally got it running nice and smooth on the latest version of Dualis.

After a small dance and clap, I figured I'd give it a shot on hardware.
Unfortunatly... It doesn't work! :(

What kind of hardware? The find_first_gbfs_file() function does not work with FlashMe+WMB or with GBAMP. In those environments, you'll have to create the GBFS file, bin2s it, add it to your project, and then use that instead of find_first_gbfs_file().
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#76962 - genfish - Sun Mar 26, 2006 11:06 pm

Check out this thread of mine, i had the same issue. LAst post is of me solving it :)

Im using a neoflash magickey 3, so ya know :)

Linky
_________________
there is no rl only afk

#76969 - JessTicular - Mon Mar 27, 2006 12:50 am

genfish,
Yeah, already checked that out during my countless forum searches; It helped, but since I'm running a normal makefile, THEN appending the data to both the .nds and .ds.gba files, it doesn't apply.
Thanks anyway, mate.

Tepples,
An EFAII (1Gb) - I have used FlashMe, so would reverting to the old firmware fix it?
At any rate, I assume bin2s makes a header file, giving me the pointer to the appended data, and from there, I can still use the functions for getting file objects? or is there another way to determine where files begin and end?

Cheers for the help guys,
Jess.

[EDIT]
As an aditional: Wouldn't using the bin2s mean that it is compiled as part of the source, and thus I cannot exceed the 4MB memory limit of the DS?
That could be a real bummer in time to come when I add sound + 3D models and textures.
Is there any other File System alternative ( or a personal implimentation of find_first_gbfs_file() ) That could be used?
[/EDIT]

#76983 - tepples - Mon Mar 27, 2006 3:57 am

JessTicular wrote:
An EFAII (1Gb) - I have used FlashMe, so would reverting to the old firmware fix it?

FlashMe has nothing to do with it.

Quote:
At any rate, I assume bin2s makes a header file, giving me the pointer to the appended data, and from there, I can still use the functions for getting file objects? or is there another way to determine where files begin and end?

bin2s makes an assembly language file to be added to your project. A file named "data.gbfs" becomes an object called data_gbfs.

Quote:
As an aditional: Wouldn't using the bin2s mean that it is compiled as part of the source, and thus I cannot exceed the 4MB memory limit of the DS?

Correct. If your storage device cannot use ds.gba files, then it is limited to 4 MB unless file I/O is possible.

Quote:
That could be a real bummer in time to come when I add sound + 3D models and textures.

The Windows game ".kkrieger" is 96 KB.

Quote:
Is there any other File System alternative ( or a personal implimentation of find_first_gbfs_file() ) That could be used?

There may be a library that you can use to read and write files on the MK2, MK3, NinjaDS, or similar SLOT-1 SD adapters. These libraries generally implement an interface similar to that of the standard C library's fopen() and friends.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#76991 - JessTicular - Mon Mar 27, 2006 5:35 am

Alrighty, sweet.

Thanks for the helpful info!

My cart runs .ds.gba fine, so I should be right with the size limit :)

And, .kkreiger? Haha, I wish I was good a procedural generation! Those guy's are working on Spore now - Talent that has anything but gone to waste :)

At any rate, thanks for the help, mate.

Jess.