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 > Storage - FileSystem - VRAM

#128423 - Gendo Ikari - Fri May 11, 2007 11:37 am

I've read tons of tutorials and guide from all parts of web. However i didn't catch the general vision of nds dev, and i misunderstood some concepts (maybe because i'm not english).

So, i've got some concept questions to ask:

1) Storage.
Example. I've got my Slot-1 card, i've got my app in it, how much storage R/W i have? The data sheet of NDS got around the web tell me that i have 4 mb of Memory to store my app.
But the cards have gigabytes of storage. These numbers is related to different things? Explain me please.
2) FileSystem
I see many library about fs. But where is the "disk" where i put the filesystem? is the ram of NDS? Is in the slot-1 card? I've to put a gba card and use it to storage qwith a fs?

3) VRAM
I've understand that in NDS i've got bank of hardware ram, from A to I. That's simple.
But what is "mapping"? Why i have to map ram? What's the meaning of this table?
http://www.dev-scene.com/NDS/NDS_Tutorials_VramTable

Thank you for explanations :D

#128430 - Lick - Fri May 11, 2007 12:24 pm

1) Storage.
Your binary can have a maximum size of 4MiB (= Main RAM of DS). You can always load media files on-the-fly from the disk with 2).

2) FileSystem
Use "libfat" that comes with the latest DevKitPro version. It will give your software access to the Media device (SD card or whatever).

3) VRAM
I'm not sure why the VRAM has to be mapped, but seeing that the functions of the banks differ (some banks can't do 3D, some banks are for palettes), I'm guessing it has to do with the connections in the hardware.

#128434 - tepples - Fri May 11, 2007 1:09 pm

Gendo Ikari wrote:
1) Storage.
Example. I've got my Slot-1 card, i've got my app in it, how much storage R/W i have? The data sheet of NDS got around the web tell me that i have 4 mb of Memory to store my app.
But the cards have gigabytes of storage. These numbers is related to different things? Explain me please.

I'll explain by analogy to a PC.
My PC has 384 MiB of RAM, 64 MiB of VRAM, and a 40 GB hard drive.
Likewise, my DS has 4 MiB of RAM, 2/3 MiB of VRAM, and a 1 GB CF card.

Quote:
2) FileSystem
I see many library about fs. But where is the "disk" where i put the filesystem?

Photo of what I used to flash my DS Lite, with "disk" at bottom right and "drive" at bottom center.

Quote:
3) VRAM
I've understand that in NDS i've got bank of hardware ram, from A to I. That's simple.
But what is "mapping"? Why i have to map ram? What's the meaning of this table?
http://www.dev-scene.com/NDS/NDS_Tutorials_VramTable

You map RAM so that the hardware knows what to do with each bank. Common settings for 2D are A main bg, B main sprite, C sub bg, D sub sprite. In 3D, some games use A-D texture, E main bg, F main sprite, G texture palette, H sub bg, I sub sprite.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#128441 - Gendo Ikari - Fri May 11, 2007 2:11 pm

Thank you all.
About VRAM another question.
What is the relation between mode and vram mapped bank?