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 do you create the .raw.o format sound file from the.raw?

#64035 - rychan - Sun Dec 18, 2005 8:02 pm

Newbie developer here, used sox to create the .raw data file but It looks like there is a difference between that .raw file and the .raw.o file format.

Sorry If this is unclear. I'm just wandering if I need some form of utility again?

Think I've found the solution.....sorry to bother y'all


Last edited by rychan on Sun Dec 18, 2005 9:16 pm; edited 1 time in total

#64039 - JaJa - Sun Dec 18, 2005 9:06 pm

I refer you to this tutorial:
http://www.double.co.nz/nintendo_ds/nds_develop4.html
It explains how to convert the raw file to an object.

#64042 - rychan - Sun Dec 18, 2005 9:17 pm

Thank youuu, just posted when I edited :) Looks like it has a rather handy makefile there, ty very much

#65251 - rychan - Sun Jan 01, 2006 2:55 pm

Hmm, still no joy with the sound files yet, followed the tutorial, no joy though, arghhh :(

made some nice lil sprite class for the framebuffer though now, just need to figure out how to import actual bitmap data as opposed to manually creating sprites in textpad :)

I'm still rather new to C++ & C but Have made most of a lil graphical minesweeper game with the framebuffer ,touch and button input.

#65255 - Maverick - Sun Jan 01, 2006 3:59 pm

To convert a wave file using sox for use with the DS, use this on the command line:

Code:
sox -V sound.wav sound.raw
arm-elf-objcopy -I binary -O elf32-littlearm -B arm --rename-section .data=.rodata,readonly,data,contents,alloc sound.raw sound.o


Make a note of the bitrate and use this in your code.

To convert a picture graphic into something useable by the DS, there are many methods, but i use PCX files and convert them using PCX2SPRITE by Dovoto.

Simply make the picture to the right dimensions and save it as a 256 PCX file, drag and drop it onto this program and you'll get a .h file to include in your project.
_________________
http://downtou.ne1.net/