Quick agbplay tutorial

Any and all jibber-jabber goes in here!
Post Reply
User avatar
Sanqui
Donor
Posts: 243
Joined: 16 Aug 2010, 15:57

Quick agbplay tutorial

Post by Sanqui » 16 Apr 2017, 06:18

Hi,

since Tom has asked, I'm making a quick tutorial on how to do XQ music rips using agbplay. This is just a whirlwind explanation because anything more detailed I'd never get done. :)

What's an XQ rip? XQ stands for extra high quality. The term, I believe, was coined by ipatix.

GBA has little dedicated sound hardware. The Game Boy channels remain, but besides them, there's only a stereo FIFO. What this means is all the channels, instruments, effects, etc. have to be generated and mixed in software.
Nintendo provided a sound driver to developers which did this task. From my count about 70% games opted into using Nintendo's driver. The format is named mp2k/m4a and it's also been going around by the name Sappy.
Sadly the official driver is both inefficient and written in such a way that the mixing is done in low resolution. Hence many GBA games sound muddy and a lot of clarity is lost in its music.

Here's just one example, Route 123 from Pokémon Ruby. sound from GBA, agbplay.

agbplay is software written by ipatix which can play this GBA sound format "natively", bypassing the inefficient Nintendo driver. Thanks to that the sound it produces is crystal clear. You might remember GBAMusRiper, this is a significantly more accurate solution because it does not go through MIDI.

agbplay can be found here: https://github.com/ipatix/agbplay

It's Linux software. I don't know if it can be built on Windows. I don't have or use Windows. Sorry!

Building agbplay is pretty simple. First git clone or download the zip of agbplay. Adjacent to the agbplay/ directory, place and extract the latest version of Portaudio (pa_stable_v190600_20161030.tgz at time of writing). In the terminal, enter agbplay/ and run make. Hopefully agbplay will build!

Now you can run ./agbplay rom.gba and if the ROM uses the supported sound driver, you'll be presented with a cute terminal music player. I suggest you toy with the player for a bit to get a feel for the UI.

Now, we want to export all the music from a ROM. A feature to do that without the UI should probably be requested/added, but it's not such a big problem.
There is some vague playlist support via the .ini, but I haven't really used it. What I do is I just press A on every song I'd like to export, and when that is done, press R to export (render) them all into the wav/ directory.

Then it's just a question of converting to mp3 and tagging.

Have fun making GBA rips! And feel free to ask if you have any questions.
Last edited by Sanqui on 16 Apr 2017, 14:57, edited 3 times in total.

User avatar
Tom
Chiptune Specialist
Posts: 4043
Joined: 26 Feb 2010, 06:53

Re: Quick agbplay tutorial

Post by Tom » 16 Apr 2017, 11:55

Bookmarked! Thanks for making this. I look forward to trying it out when I have some time, and will let you know if I have questions.

User avatar
Rob
Founder
Posts: 8376
Joined: 15 Jan 2004, 08:51

Re: Quick agbplay tutorial

Post by Rob » 16 Apr 2017, 21:16

Thanks for making a writeup on this. :)

Post Reply