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 > Loading Images

#35239 - WillyWonka - Tue Feb 01, 2005 11:23 pm

I've noticed a lot of programs that turn graphics into .h files and some that use raw binaries and build them in at a later time. Which way is better? Do the .h files remain in memory at all times?

I haven't quite got my head around how the memory on this thing works. I know there is a limited amount of sprite ram but the cart is so much larger. I don't want to be wasting ram.

#35241 - poslundc - Tue Feb 01, 2005 11:37 pm

WillyWonka wrote:
I've noticed a lot of programs that turn graphics into .h files and some that use raw binaries and build them in at a later time. Which way is better? Do the .h files remain in memory at all times?


You should avoid using .h files for data purposes, as this is not their intended use and can be the source of many, many headaches even as a project is just beginning to grow out of its infancy. This thread talks a bit about why this is the case.

Quote:
I haven't quite got my head around how the memory on this thing works. I know there is a limited amount of sprite ram but the cart is so much larger. I don't want to be wasting ram.


The cart has room for many, many images. From there, you can copy them into Sprite VRAM as you need them, and only keep the ones in VRAM that you need to display at any given time.

Dan.