#43360 - enliteneer - Sun May 22, 2005 7:42 pm
I compiled the 8ad sample program (chordbasic.wav) but the playback on both VBA and on the real hardware is extremely choppy (half-second pauses with no sound throughout). It even has a high pitch squeal thats not on the original wav file.
I tried using it with my own wave files (16bit, mono, 18157 hz) but they all sound corrupted at playback.
What am I doing wrong????
#43399 - tepples - Mon May 23, 2005 2:06 am
Which compiler toolchain are you using? The distribution is intended for DevKit Advance R5 beta 3 (outdated but it was newest when I made 8ad). If you're using devkitARM, replace the block in mk.bat marked === code === with this:
Code: |
echo === code ===
arm-elf-gcc -Wall -O -marm -mthumb-interwork -c isr.c
if errorlevel 1 goto end
arm-elf-gcc -Wall -O3 -marm -mthumb-interwork -c playad.iwram.c -o playad.iwram.o
if errorlevel 1 goto end
arm-elf-gcc -Wall -O -mthumb -mthumb-interwork -o 1.elf -DDEMO isr.o playad.iwram.o playad.c libgbfs.c --specs=gba.specs
if errorlevel 1 goto end
arm-elf-objcopy -O binary 1.elf 1.bin
|
And what does the "CPU time" line say? I get "12 scanlines" (hw) and "20 scanlines" (vba) with devkitARM R11.
Perhaps what's supposed to go in IWRAM isn't going in IWRAM. Try this at the command line:
Code: |
nm -n 1.elf > address.txt |
and paste the lines that start with "0300".
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#43420 - enliteneer - Mon May 23, 2005 8:00 am
When I tried to change the batchfile to use 'arm-elf-gcc' it couldnt find the exe. Im not sure why my install only had 'arm-agb-elf'? I can try doing a fresh install, although Im a little weary since everything else works fine.
Doing a version (-v) check on the arm-agb-elf I get:
Reading specs from /cygdrive/i/xport/DEVKIT~1/bin/../lib/gcc-lib/arm-agb-elf/3.2
.2/specs
Configured with: ../gcc-3.2.2/configure --prefix=/tmp/devkitadv-r5-beta-3 --targ
et=arm-agb-elf --without-local-prefix --disable-shared --enable-multilib --disab
le-threads --with-cpu=arm7tdmi --with-newlib --enable-interwork --disable-win32-
registry --enable-targets=arm-elf,arm-coff,arm-aout,arm-pe --enable-languages=c,
c++ -v
Thread model: single
gcc version 3.2.2 (DevKit Advance R5 Beta 3)
And Im using VBA 1.7.2.
The CPU time line says "13 scanlines" (hw) and "15 scanlines" (vba)
03000000 A __data_start
03000000 D __dso_handle
03000000 A __memmap_iwram_start
03000004 d p.0
03000008 D retraces
0300000c D keypresses
03000010 D want_reset
03000014 d cur_mixbuf
03000018 d impure_data
030001a0 D _impure_ptr
030001a4 A __data_end
030001a4 A __iwram_start
030001a4 T decode_ad
0300028c t ima9_step_indices
0300029c T ima_step_table
03000350 A __iwram_end
03000350 A __iwram_overlay_end
03000350 A __iwram_overlay_start
03000360 A __bss_start
03000360 b completed.1
03000364 b object.2
0300037c b mixbuf
030005e0 B ad
03000600 B saved_isr
03000620 B samples
03000624 A __bss_end
03000624 A __iwram_break
03007ffa a __soft_reset_direct
03007ffc a __interrupt_vector
03008000 A __memmap_iwram_end
In case it helps, this is my compiled playad.gba with no changes to the batch or source code:
http://s4.yousendit.com/d.aspx?id=1VXWU4PF09FD425M3OPRM9H7NS
#43433 - tepples - Mon May 23, 2005 2:13 pm
enliteneer wrote: |
When I tried to change the batchfile to use 'arm-elf-gcc' it couldnt find the exe. |
That's because you're using DevKit Advance R5 beta 3, which uses the "arm-agb-elf-" prefix. A lot of people have come here asking for help getting my older DevKit Advance-based apps to work in the newer devkitARM.
Quote: |
Im not sure why my install only had 'arm-agb-elf'? I can try doing a fresh install, although Im a little weary since everything else works fine. |
You might try installing devkitARM to a new folder. It's possible that it might generate faster code. Use devkitARM R11 if you can find it, or make sure you apply the crt0 fix posted here after you install it.
Quote: |
gcc version 3.2.2 (DevKit Advance R5 Beta 3) |
which is all I needed to know.
Quote: |
The CPU time line says "13 scanlines" (hw) and "15 scanlines" (vba) |
Expected. That's about how long it took on my setup.
Quote: |
030001a4 T decode_ad
0300028c t ima9_step_indices
0300029c T ima_step_table |
Also expected. What needs to be in IWRAM is in IWRAM.
I don't have time to look at it right now, but I'll try to get to it.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#43530 - enliteneer - Tue May 24, 2005 5:48 am
I took the exact .GBA file to another computer and it sounds fine!!!
So, I re-downloaded VBA, No$GBA, and BoycottAdvance on my computer but all audio playback on all of them is horrible. The sound has a high pitch squeal in the middle and is choppy throughout.
My computer (XP SP2, AMD 1800 1.5Ghz, 512 MB Ram) plays back MP3 and DivX movies with *NO* problems. What the heck could be going on here??????
ARGH!!
#43532 - tepples - Tue May 24, 2005 5:57 am
Have you tried cranking the frameskip up to 5 or so?
Do other GBA games with sound play OK on your troublesome box?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#46629 - MiGs - Tue Jun 28, 2005 10:28 am
I used to get that high pitched squeel when the sample rate or frequency was off or something, or saved as a different kind of PCM, not sure, but it sounded all fast and high pitched, so double check what you saved it as.