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.

Coding > want rom/ram+file system

#135900 - Ant6n - Fri Jul 27, 2007 7:23 am

hey
I'd like to have access to a file system, prefably some fat device, but i could work with an appended file system, too; but I also would like to be able to execute from gba rom and i need the flashram.
I understand libfat runs only with a multiboot program, but i want all of the ewram as data space for my program.
I see there is gbfs out there, which appends files. But is there something similar out there that would allow me to write to the file system by storing all writes in sram?
Is there a different way to access a fat device, but still have the rom/ram?
thank you

#136217 - Ant6n - Mon Jul 30, 2007 6:51 am

Ok, simplified question

How can i get access to some sort of file system (read+some write) plus flash rom and ram, without using up any ewram?
libfat only seems to work when compiling as multiboot, which takes ewram.

#136264 - tepples - Mon Jul 30, 2007 8:28 pm

The only way to do this without using any EWRAM would be to put the disc_io drivers in IWRAM or VRAM and modify each card's disc_io driver to use the card's registers for switching between file system mode and ROM mode.

Does your code need to read and write the GBA serial port or to display on a television? There's a way to expand EWRAM by a factor of 16 if you don't need those two features.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#136316 - Ant6n - Tue Jul 31, 2007 5:26 am

thanks for the input
tepples wrote:
The only way to do this without using any EWRAM would be to put the disc_io drivers in IWRAM or VRAM and modify each card's disc_io driver to use the card's registers for switching between file system mode and ROM mode.

Do you mean the drivers from libfat? or write my own drivers. I am new to filesystems on gba, so i am not sure where to start.

Quote:
Does your code need to read and write the GBA serial port or to display on a television? There's a way to expand EWRAM by a factor of 16 if you don't need those two features.

i was planning to use the gbaccelerometer as a sort of mouse. I am still intruiged though, what way are you referring to?

#136318 - Dwedit - Tue Jul 31, 2007 7:36 am

Ant6n wrote:
Quote:
Does your code need to read and write the GBA serial port or to display on a television? There's a way to expand EWRAM by a factor of 16 if you don't need those two features.

i was planning to use the gbaccelerometer as a sort of mouse. I am still intruiged though, what way are you referring to?


Sounds to me like a sarcastic way of saying "Get a DS".
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#136325 - tepples - Tue Jul 31, 2007 11:24 am

Dwedit is right. If you target the DS Motion Card or DS Motion Pak instead of the GBAccelerometer, you can use the DS's 4 MiB EWRAM.

Until then, I'd like to know what you're using all 256 KiB of EWRAM for, and what you're using the file system for. There may be a way to make your program's use of memory more efficient, allowing you to break up your code better.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.