#175247 - gameporter - Thu Oct 14, 2010 9:31 pm
I'm new to GBA programming and I have some experience creating mod's, xm's, s3m's, and it's with ModPlug Tracker. How do I get these into my game?
#175248 - Dwedit - Fri Oct 15, 2010 2:52 am
Look at the DevkitPro GBA examples.
After you install Devkitpro, look in
C:\devkitPro\examples\gba\audio\maxmod\basic_sound
This uses the MaxMod audio library. MaxMod doesn't directly play mod files, instead it runs them through a converter. It combines a bunch of mod files and wav files into one big soundbank, and that gets included in your gba file. The conversion part of the process is included in that makefile, so you don't need to pre-convert anything. But you need to copy that part out when you create your own makefile, it doesn't come standard with the default makefiles.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#175249 - gameporter - Fri Oct 15, 2010 5:55 pm
Do the files have to be mods? I like .xm or .it much better.
#175250 - Dwedit - Fri Oct 15, 2010 7:24 pm
I don't think they need to be mods. MaxMod is the name of the library, but it accepts other types of files too.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#175251 - wintermute - Fri Oct 15, 2010 8:45 pm
#175565 - gameporter - Tue Dec 28, 2010 10:28 pm
More ?s:
Does the GBA support 16-bit samples through MaxMod?
What is the max sample rate the GBA supports?
#175575 - wintermute - Thu Dec 30, 2010 3:06 am
No, the GBA hardware can only handle 8bit samples.
maxmod supports up to 21KHz playback for the final mix but obviously that's going to cost you in terms of cpu usage.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#175604 - gameporter - Mon Jan 03, 2011 4:42 pm
Does MaxMod/GBA set another other limits on mods like sample size, file size, # of channels, etc.?
#175608 - Dwedit - Tue Jan 04, 2011 4:25 am
Seems to be a 2MB limit per mod file, and it seems to have trouble with many non-MOD files I threw at it.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
Last edited by Dwedit on Tue Jan 04, 2011 4:31 am; edited 1 time in total
#175609 - gameporter - Tue Jan 04, 2011 4:26 am
Really? That's no problem.
Any others?
#175610 - Dwedit - Tue Jan 04, 2011 4:33 am
Seems to crash when it plays more than 8 channels. Edit: Seems that's because I was editing the demo program that init-ed for 8 channels. Trying again...
Edit again, seems to have no problems playing some huge IT file I'm throwing at it now. (Dancing Mad IT file by Virt, 4MB in size). So don't init it for too few channels, and no more problems.
It downsamples all samples to 8-bit, so when I thought there was a size limit, it's because it was shrinking 4MB down to 2MB.
one more edit: NO$GBA screws up when switching between RUN and DEBUG mode. No clue why.
So to summarize:
* This thing works beautifully. Apologies for the hasty comments eariler.
* Don't allocate too few channels for the mod file you're playing or it crashes.
* It downsamples stuff from 16-bit to 8 bit, shrinking some files to about half their size
* It probably has no size limit besides the 32MB size limit of a GBA file.
* It's screwy on NO$GBA debug edition when you stop the emulator then resume it.
edit: Seems to screw up on a few of the patterns on Dancing Mad by virt, like it's missing the skip to next pattern command or something.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#175614 - gameporter - Tue Jan 04, 2011 4:37 pm
I'll crank out a mod for you. Can you see if it works for me?
#175615 - gameporter - Wed Jan 05, 2011 1:47 am
Here it is (and only 31 KB!). Would this work?
http://www.box.net/shared/9jfc9zdirx
#175616 - Dwedit - Wed Jan 05, 2011 3:53 am
Works fine. If you want to test this stuff, just mess around with the example player that comes with the devkitPro examples.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#175617 - gameporter - Wed Jan 05, 2011 4:34 am
Thank you all for your help!