Difficult request: Is anyone willing to help decode the GBA "GAX" Engine? by birdmanager6 at 8:15 PM EDT on September 20, 2015
Most people say that 90% of Game Boy Advance games all use the M4A sound engine (which is the only one we really know about), and there are only a few exceptions.

That is a lie! Here is an extensive list of games, NONE of which use the M4A sound engine. In fact, they all use the same sound engine.

http://pastebin.com/h2PSKQrf

This sound engine is Shin'En's custom sound engine, known as the GAX sound engine. All of the games that use this engine had their audio exclusively done in-house by Shin'En, and was only available to third-party developers.

The audio branch is supposedly a branch of the Amiga audio format. One of the most notable games to use it is the first Earthworm Jim (the second one isn't listed, so I don't know if it uses GAX or not). Other titles that stick out to me are the infamous Mortal Kombat Advance, Comix Zone (which has awesome music and hasn't even been ripped in the GSF format yet), and several SpongeBob SquarePants games.

Of course, this isn't the only other sound engine that GBA games use. There's also Krawall Advance, the "other" version of M4A supposedly used in Nintendo's later games, and RAREWARE's unknown driver. But it's pretty much the second-most common sound engine, so we should really learn more about it, so we can eventually make a tool that can extract all the audio out of it in its full, unfiltered quality, in MIDI/soundfont or WAV files, in the same manner of that of what GBA2MIDI or gbamusriper does with the M4A engine, or in a MOD-based format like XM. I suspect GSF would be harder to create, though.

There actually HAS been some learning about it. Someone figured out some specifications about it on a Crash Bandicoot game. However, nothing has been done since December of last year, so it's probably a dead project.

So, I'm not trying to push it, or anything, but is anyone willing to continue to work on it, or even finish it, using the specifications on it that are known from that post as a start? I couldn't, as I wouldn't be able to understand any of that code at all. And I understand that this really isn't easy, as apparently the way the code is loaded sometimes is different. But I would really like to see that happen.

http://www.pokecommunity.com/archive/index.php/t-335312.html

Hopefully, there will also be work on the other sound engines that I listed sometime (Krawall Advance should be easiest to make a converter for, at least in the MOD-based format), but I don't want to ask for too much at once. It's such a shame that the only sound engine we've figured out is the worst one. :(
by RebeccaSugar at 5:53 PM EDT on September 26, 2015
Damn it feels good to be a gangster
by birdmanager6 at 1:02 AM EDT on October 2, 2015
@RebeccaSugar
What the heck is that supposed to mean?
by guest at 10:08 AM EDT on October 2, 2015
My mind is playing tricks on me.
by birdmanager6 at 12:28 AM EDT on October 9, 2015
Anyone interested in this at all?
by TheUltimateKoopa at 12:32 PM EDT on October 9, 2015
Judging by the severe lack of responses, I think the general opinion, is either:
"We do care, we just don't know how"

OR

"We don't give a single piece of flying fecal matter"

Probably the first one.
by birdmanager6 at 5:21 PM EST on November 15, 2015
@TheUltimateKoopa

I don't know...there aren't that many POPULAR games to use the GAX engine, so I really don't know which one of the two.

But if it's any help, I have managed to extract the GAX sound engine, music sequences, and sample tables from Earthworm Jim, so that might be useful. I found the starting point of each song with the song title in quotation marks and (C) Manfred Liznzer in a text screen, and the GAX header was also easy to spot. As for the sample tables, I had to rely on Audacity for a lot of it, so they may not be extracted 100% in the exact location. There are two sample tables: one for sound effects, and one for music instruments.

https://drive.google.com/file/d/0B_zYoz3nVdW_akZKM3FKb01SRW8/view?usp=sharing
by Team Fail at 12:28 AM EST on November 19, 2015
Ah, that was my work you had found on PokéCommunity there I see. As soon as I had seen this thread I knew I had to reply to it haha.

It's not really a dead project, I've just been far too occupied with school and work to dedicate time to pretty much any of my projects, otherwise, I'd be busy working on this. If you want, feel free to post any of your findings in my thread, perhaps I'll see if I can find some spare time to peek back into my notes and do some more digging and whatnot in the coming months.
by Team Fail at 12:53 PM EST on November 20, 2015
Also if you want anything on the Krawall engine, it's completely open-sourced here:

https://github.com/sebknzl/krawall
by birdmanager6 at 2:25 PM EST on November 28, 2015
@Team Fail
Thanks for the help, Team Fail. I'll try to do so. I also know about Krawall being open-source already, and in fact, I've been trying to build the converter on Windows for possible projects for the GBA I might work on, but I've had no success, yet.
And I also answered my own question about EWJ2. It doesn't use the GAX engine, but instead, uses the GBA version of MusyX, accirding to the opening screen. I wonder if someone (not you) could also figure out that version of MusyX, considering a MIDI converter for the GameCube version exists on this very website. I'm also curious as to what other games use MusyX on the GBA.
by Munckeyz at 10:51 AM EDT on June 20, 2016
Anything still going on with this project? I'm interested in hearing the soundtracks of the 3 Tony Hawk GBA ports in full unfiltered quality.
by RebeccaSugar at 11:00 PM EDT on July 26, 2016
There is, but, unfortunately, progress is very slow.
Unless someone coughs up a bit of dough to support development, it's going to be like this for a while.

by Team Fail at 7:59 PM EDT on August 22, 2016
Thought I'd give an update on this, but over the last few days I decided to try another crack at this to make at least some headway at this, and I managed to figure out the compression on the streamed audio aspect of this engine, and furthermore, implement a custom stream that the game willingly accepted and played:

https://twitter.com/TeamFail/status/767848467477647360

It uses signed 8-bit PCM mono little-endian data, and the sample rate can vary, although the samples I had were at 12000 Hz and 8000 Hz. If you go to the gsf joshw page and look for "Crash Bandicoot - The Huge Adventure", there's an unused song in there (Called "Unused - Crash Bandy Kuu~!!.gsf") that makes use of these stream formats, and the song is actually split into two different streams - the intro portion, and the looping portion. The intro is 8000 Hz, the loop is 12000, but it is fully streamed. I'm working on finding all the switches and whatnot to make this work, and that tweet of mine shows this. I took the GSF and built it back into a ROM to do this research without all the garbage in the way, so hopefully if you want to look at it, that is a great start.
by RebeccaSugar at 7:56 PM EDT on September 10, 2016
Well, that is certainly something! Thank you for the input.
Props on the GBA Project! by Miles Quickster at 9:08 PM EDT on September 19, 2020
Just stopping by submit that I'm really interested to see how this project turns out. Unfortunately, I can't really do much to help, as I'm busy with university and my time is spread thin. I'm just eager to understand how sounds are programmed into GBA systems (and that's only 1 of many that have captured my interest).

While the state of soundfonts is pretty cool as it is right now, I still have yet to understand the way particular effects are generated; for instance the LFO effect that so far I've only seen Sonic Battle and Sonic Advance 3 (see Night Babylon from the SB OST and Special Stage from the SA3 OST, where in both tracks, the 8-bit instruments oscillate at particular points of the intro).

It's unfortunate that less popular games have seen interest in this kind of development, since we are still stuck with Sappy 2006 (which leaves MUCH to be desired) to tackle more obscure games, (where GBAMusRiper couldn't) like Sonic Battle and Yoshi's Island GBA. At least with Nitro Studio, (a tool made for parsing SDAT file systems in DS games) it actually tells you the settings configured on 8-bit channels, somewhat.

Anyway, it seems the Poké Community are still active, so that's quite promising. I'll leave this with you all. Thank you for the work and engagement you guys have committed so far.

edited 9:11 PM EDT September 19, 2020
GAX2 Research by Droolie at 9:55 AM EDT on October 22, 2020
Hey everyone,

I'm working on a map viewer for various Rayman games, and we recently added support for Rayman Raving Rabbids GBA. On the side I also made a function to export the music data... which uses the GAX2 engine.

I was able to export both the samples (as wav files) and create MIDI files for all of the songs (with the wrong tempo, as that doesn't seem to be part of the song data...)

The sequence data is in a fairly easy format and I would have put more work into exporting as XM/MOD/MIDI+SF2 if those formats were easy to write... but I tried looking into those and they were way too complicated (way more than the GAX data, haha!), so I gave up on being able to play these MIDI tracks with their proper soundfont.

However I will leave a link here to the structures I implemented, so that someone can create a better program for them: Ray1Map - GAX formats

If anyone wants to try this out, they need the Rayman Raving Rabbids GBA ROM of course and follow the tutorial on the main page of the repository to set up the project.

Oh, I should credit loveemu as they have created this gist with GAX research notes here, which I sadly discovered after I'd implemented it but used to give better names to some classes and fields: loveemu's GAX research notes

edited 9:57 AM EDT October 22, 2020
More GAX2 Research by Droolie at 11:29 AM EDT on October 24, 2020
Well, I ended up still working on this, but I'm officially defeated by the instrument pitch. I just cannot get that right.

You can compare my results to a recording here:
XM files exported from Ray1Map
Recording of soundtrack from an emulator

Since listening to broken music all day was driving me insane, I'll just leave getting this right to the next person to look into the GAX engine. In the meantime, my code can be found here:
Ray1Map - GAX formats
Ray1Map - GAX to XM converter

edit > A bit off-topic for GAX, but I also did a bit of research on the MusyX engine for GBA. Two Rayman games use this (Rayman Advance and Rayman Hoodlums' Revenge), and this can read and export sample data for both. The song data is also read, but not parsed. Presumably, this is very similar to the MusyX song data on other platforms like Gamecube. I'll contact the creator of Amuse to check if they want to look into it.

Anyway, the classes I implemented:
Ray1Map - MusyX formats

edited 11:03 AM EDT October 25, 2020
by loveemu at 11:23 AM EDT on April 21, 2021
Updated Research Note: Shin'en GAX Sound Engine V3 (GBA)
Standalone GAX -> XM converter by Droolie at 1:58 AM EST on December 20, 2021
My GAX code was part of Ray1Map before, but I separated it from there now. You can find it in:

- BinarySerializer.GBA.Audio, a library for reading GBA audio structs (GAX & MusyX) using our serializer system.

- GaXM, my GAX -> XM converter. This standalone version of it is much improved and should support all versions of GAX. The XM conversions are far from perfect sometimes, and 100% accurate other times (e.g. most tracks in Rayman Raving Rabbids) :D

I hope people will use this work to create a fully accurate GAX player someday. I don't think I have it in me to go beyond XM conversions ^^'

edited 3:08 AM EST December 20, 2021
by loveemu at 9:11 AM EST on December 23, 2021
Wow! I love your work so much! ♥


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source