pouët.net

Accurate .mod playback on Game Boy Advance

category: code [glöplog]
 
We have been trying to get ApexAudio to play mod's on GBA but are unlucky to get it work. Compiling is unsuccessful. Is AAS too ancient against the last DevkitPro GBA? The error is:

$ make
conv2aas /Z/AAS_Data/---------------------------------------------\
| Conv2AAS 1.01 WAV, RAW & MOD -> AAS |
| Copyright (c) 2003, Apex Designs |
\---------------------------------------------/Adding WAV Ambulance.wav...Done!Adding RAW Boom.raw...Done!Adding MOD FlatOutLies.mod...Done!
Unsupported effects:
0: Arpeggio (1)
song_length:32 last_pattern:23Writing AAS_SampleData (Unique:31 Actual:31 Length:155828)...Done!
Writing AAS_ModPatternData (Unique:24 Actual:24 Length:24576)...Done!AAS_Data.s
arm-none-eabi-gcc -MMD -MP -MF /Z/build/AAS_Data.d -x assembler-with-cpp -mthumb -mthumb-interwork -c AAS_Data.s -o AAS_Data.o
AASExample.c
arm-none-eabi-gcc -MMD -MP -MF /Z/build/AASExample.d -g -Wall -O2 -fabi-version=0 -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/Z/include -I/opt/devkitpro/libgba/include -I/opt/devkitpro/libAAS/include -I/Z/build -c /Z/source/AASExample.c -o AASExample.o
echo /opt/devkitpro/libAAS
/opt/devkitpro/libAAS
linking cartridge
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: error: Source object C:/devkitPro/libAAS/lib\libAAS.a(AASLogo.o) has EABI version 0, but target Z:/Z.elf has EABI version 5
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/devkitPro/libAAS/lib\libAAS.a(AASLogo.o)
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: error: Source object C:/devkitPro/libAAS/lib\libAAS.a(AASMain.o) has EABI version 0, but target Z:/Z.elf has EABI version 5
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/devkitPro/libAAS/lib\libAAS.a(AASMain.o)
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: error: Source object C:/devkitPro/libAAS/lib\libAAS.a(AASLocal.o) has EABI version 0, but target Z:/Z.elf has EABI version 5
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/devkitPro/libAAS/lib\libAAS.a(AASLocal.o)
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: error: Source object C:/devkitPro/libAAS/lib\libAAS.a(AASSFX.o) has EABI version 0, but target Z:/Z.elf has EABI version 5
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/devkitPro/libAAS/lib\libAAS.a(AASSFX.o)
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: error: Source object C:/devkitPro/libAAS/lib\libAAS.a(AASMixer.o) has EABI version 0, but target Z:/Z.elf has EABI version 5
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/8.1.0/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:/devkitPro/libAAS/lib\libAAS.a(AASMixer.o)
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/devkitARM/gba_rules:25: /Z/Z.elf] Error 1
make: *** [Makefile:128: build] Error 2I used the a classic sample to play music

Downgrading to EABI from 5 to 0 is also unsuccessful (It's a parameter in the Makfile)

The developer of AAS does not seem reachable anymore (at least there are no answers).

What is the best way to play back .mod's on GBA these days, possibly with low CPU usage so there is CPU left for other actions too. The neim0d player doesn't seem to be official around the net, which we would consider another option.

Any hints would be very much appreciated!

See you guys hopefully again at Revision 2019!
added on the 2018-06-02 10:23:11 by Kojote Kojote
I'm of course biased here, but there's always pimpmobile ;)
added on the 2018-06-02 11:24:16 by kusma kusma
thanks for your hint kusma - we will check it out!
added on the 2018-06-02 20:16:33 by Kojote Kojote
Personally i wouldn´t go with all the overhead of someone elses library, but implement my own mod-player!
Just get the Amiga-SourceCode and port it! ;)
I don´t know if this is outdated but here´s an example of the amiga-replayer-code.
I didn´t investigate for now, just wanted to post an example! ;) So with some googling you should find an up-to-date-sourceCode for sure, porting it shouldn´t be too complicated!
Since the GBA doesn't have a proper sound chip, porting an Amiga player isn't enough. You also need to write a software mixer.
added on the 2018-06-02 22:41:30 by absence absence
Oh, i assumed the GBA-Soundchip is superior to Paula, as it got released a lot later in time! I thought it was capable of playing Samples on the fly, but now that you said it i realized i seldomly heard any samples on GBA!
Quote:
The GBA contains two DMA sound channels (A and B), each allowing to replay digital sound (signed 8bit data, ie. -128..+127). Data can be transferred from INTERNAL memory (not sure if EXTERNAL memory works also ?) to FIFO by using DMA channel 1 or 2, the sample rate is generated by using one of the Timers.
added on the 2018-06-03 10:24:24 by the_Ye-Ti the_Ye-Ti
It was always fun trading channels and playback rate with game coders back in the day, ended up using the old GB emulation a lot to get some more sounds in. (I don't think any of the modern players do that though?)
added on the 2018-06-03 12:44:32 by 4mat 4mat
Quote:
Oh, i assumed the GBA-Soundchip is superior to Paula, as it got released a lot later in time! I thought it was capable of playing Samples on the fly, but now that you said it i realized i seldomly heard any samples on GBA!

They probably skimped on the audio capabilities to save battery life. Most music and sound effects on GBA use samples, but they're software mixed, and usually the sound quality is very bad.
added on the 2018-06-03 15:47:15 by absence absence

login