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 > How to add data and access it?

#95707 - smoothingeye - Sun Jul 30, 2006 8:09 pm

How do i add my 3d data sound or image files into my program?

#95712 - tepples - Sun Jul 30, 2006 8:14 pm

Using which memory card? It matters. There's the GBAMP method and then there's the ds.gba method.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#95718 - smoothingeye - Sun Jul 30, 2006 8:24 pm

I am using Datel MMD CF

#95877 - DynamicStability - Mon Jul 31, 2006 11:36 am

rename them to .bin and put them in the data/ directory? The default template has something in it's makefile to make bins I think.

arm9/Makefile
Code:

#---------------------------------------------------------------------------------
# you need a rule like this for each extension you use as binary data
#---------------------------------------------------------------------------------
%.bin.o :   %.bin
#---------------------------------------------------------------------------------
    @echo $(notdir $<)
    @$(bin2o)


-include $(DEPENDS)


And then include them in your project with #include "filename_bin.h"
_________________
Framebuffer is dead.
DynaStab.DrunkenCoders.com