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 > Storing graphics on cart

#24475 - ravenq - Wed Aug 04, 2004 10:32 am

I'm sure this is probably mentioned somewhere on the board, so if someone has already answered this, then please feel free to post a link ^^

Basically, a couple of the tutorials and posts I've seen have stated that once you get used to coding for the GBA, you won't want to use graphics in array format, instead creating binary data and including it in the rom.

My question basically is, what's the best way to go about this? Do I simply tack the data on to the end of the rom image? Have binary files I compile into the code?

The basic idea I'm working on here is I'm going to create a level editor (I'm working on a 2d platform game as a university assignment), which will provide the ability to export level data and graphics into a format I simply can use in a final rom, and ideally readd into a game without having to recompile (effectively like having files I guess, so I guess what I'm asking is a way to create a readable filesystem on a GBA).

As I've said, if the question has already been answered, feel free to post a link, but any insight into this would be appreciated.

Regards,
Tim Crockford
_________________
The Game is Nothing.
The Playing of it Everything

#24485 - yaustar - Wed Aug 04, 2004 3:02 pm

I think you have to link the binaries when compiling so it still comes out as one ROM image.
_________________
[Blog] [Portfolio]

#24490 - dagamer34 - Wed Aug 04, 2004 3:44 pm

Several choices:

1) Use GBFS to include binary files.
2) Use bin2s to generate an asm file.
3) Use the GAS .incbin asm opcode to include raw binaries (search the forums for it)

I personally use way #3. Post here if you need help with these ways, I know I didn't really explain them enough.
[/code]
_________________
Little kids and Playstation 2's don't mix. :(

#24505 - ravenq - Wed Aug 04, 2004 6:17 pm

Thanks for the replies so far guys, I'll have to look into those methods to work out which one I should use.

Also, just thought of this now, and it's probably just a graphical frontend to one of these methods, but would it be possible to create a gba image, and then be able to create an editor that will view the 'contents' of the image a la windows explorer? (With the ability to move data in and out freely).

Heh, anyway, it's late, so I don't know if that made much sense, but in any case, I'll look into those other methods. Feel free to keep posting suggestions however!
_________________
The Game is Nothing.
The Playing of it Everything