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 > Debug a Plugin

#112166 - chuckstudios - Wed Dec 13, 2006 10:45 pm

Hi guys, through Firon I have obtained the new AAC plugin for Moonshell. It compiles, but freezes on the first frame of decoding. I'm bad at coding, Firon can't code at all, and Moonlight can't figure it out. So we need your help.

Source code

#112167 - Firon - Wed Dec 13, 2006 10:47 pm

The function that hangs when called is faacDecDecode, which is in arm9\source\plug_aac.c. It may not be the root of the problem, though.

If you want to compile and test it, you need devkitARM r17. 19b won't work (if you can figure out why, that'd also be nice).
Don't forget to edit the paths in setenv_devkitPror17.bat

#112189 - HyperHacker - Thu Dec 14, 2006 6:18 am

I'm definitely going to want to know if you get this working.
_________________
I'm a PSP hacker now, but I still <3 DS.

#112403 - Firon - Fri Dec 15, 2006 11:42 pm

Test of the AAC decoder.

http://mdxonlinemirror.dyndns.org/stdaacdec.zip

This is a stand-alone decoder. Creates aacfile.wav from aacfile.aac.

>const char AdapterDetect[13]="Adapter:MPCF\0";
Change this to your adapter ID in \arm9\source\gba_nds_fat_2006-09-08\disc_io.c

When compiled (and this one will compile with devkitARM r19b), it will output _BOOT_MP.nds

Perhaps this stand-alone version will make it a little easier to debug.

#112458 - oofrab - Sat Dec 16, 2006 4:59 pm

Not that I have any info on the problem, but to compile the above source on linux, which is case sensitive, I had to fix a few source files. Stuff like
Code:
#include <NDS.h>
failed, since the file, in my DevkitPro, is in lower case, nds.h.

#112626 - Firon - Mon Dec 18, 2006 8:13 pm

http://mdxonlinemirror.dyndns.org/moonshell/mspfiles/mspv10_aac_20061218.7z

It's been sort of fixed. It decodes, but you can't seek. It's a start though!

Edit: spoke too soon. It plays back, but with a horrible clicking noise.

#112665 - HyperHacker - Tue Dec 19, 2006 8:39 am

That's probably a simple buffer-related glitch or some bad hardware settings. You're at least double-buffering right? ;-)
_________________
I'm a PSP hacker now, but I still <3 DS.