Animal Crossing (GCN) JaiSeq by aerorime at 2:03 AM EDT on June 6, 2024
Hey so I was looking into trying to make a rip of Animal Crossing for the Gamecube, but I'm stuck trying to figure out how to extract the Jai Sequence files from this file called audiorom.img.

I figured out that audiorom.img contains a bunch of these sequences from the beginning of the file to 0xAA82F, but I cannot confirm whether those sequences are bms or not, because I could not find a header anywhere in audiorom.img or in any of the other files. I tried testing a few of the sequences with BMS_DEC to see if I could output a midi from any of them, but the tool did not output anything with these sequences, so I do not know anything about them.

In main.dol for the game, I found out that the samples are located in a JaiSeq file called "nintendo_hi_0.aw" somewhere in the game. Simlarly, I found the .aw file in audiorom.img from offset 0x137380 to the very end of the file. I extracted it and played it raw through audacity (~0.20 times the speed at 44100hz), and can almost clearly hear the instruments despite the static (it still needs to be decoded).

Now I'm guessing that there's supposed to be an initializer file (i.e. JaiInit.aaf) for playing the sequences or ripping the singular sound bank, because I've used tools like GCTools and JaiSeqX for other JaiSeq games like Pikmin or Wind Waker. However the only thing I found between 0xAA820 and 0x13737F of audiorom.img was this weird section that starts with "== MML PASS CHECK ==" followed by something I cannot read (I'm guessing the Jai stuff starts around 0xCF700, but I do not know since it's still kinda formatted in a crazy way).

Is there anyone who's an expert on JaiSeq stuff that can look into audiorom.img? I did not find any documentation relating to bms sequences in Animal Crossing for the Gamecube, but I wanted to look in a few places around the fourm before staring a thread here:
https://hcs64.com/mboard/forum.php?showthread=52608&showpage=0#post_52612
https://hcs64.com/mboard/forum.php?showthread=7156

Let me know if you need me to upload any of the files. I'm new around here and do not know the best method to upload any of the files in question!


edited 7:14 PM EDT June 6, 2024
So it does not use JaiSeq by aerorime at 4:40 PM EDT on June 18, 2024
So I was trying out more tools to rip the music from Animal Crossing, and I unfortunately found out that it does not use JaiSeq.

nintendo_hi_0.aw is not in audiorom.img. It's embedded in main.dol along with an unnamed .bx file. I figured this out when I was comparing the IBNK portion of the .bx file with pikiseq.bx from Pikmin 1. After using IBNKTool and WSYSTool from the JamTool website created by XAYRGA, I found and extracted the two wavs that play on boot.

All the sequences in audiorom.img are n64 sequences. I used the standalone version of seq64 (version 2.3.2), to extract some of the sequences (I was able to extract 237 of them, but idk if that's all of them yet...) Other than the sequences being n64 sequences, I have not been able to figure out what to do with the unknown waveforms containing all the samples in the game, and still cannot make out the stuff between the sequences and the waveforms.

Since Animal Crossing does not use JaiSeq outside of just the boot, I'm going to stop there for now. I do not know anything about anything about the "== MML PASS CHECK ==" part of audiorom.img other than that it probably has to do with foresta.rel interacting with the file. I booted the game up on Dolphin out of curiosity to see if I could trace where the music and sounds were being played through the logs, but only found a section of hexadecimals in foresta.rel that I cannot make out. Hopefully whoever is doing the decomp on the game can figure out how to "emulate" the music and sounds that are being played in-game assuming that the sound system used for this port is custom-made.

JaiSeq extracts
sequences
Unknown waveform

Let me know if the links are not working.
by Xayrga at 11:35 PM EDT on September 5, 2024
Wow! Even I didn't know this about this game, I didn't look too much into it. I knew it used a jaiseq shim, but I completely glanced over the WSYS / IBNK / Seq. Impressive!

The audio system you're referencing is called "neos" and it was used for the n64, since animal crossing is just an n64 game that's been shimmed and cross-compiled to run on gamecube.

The links in this case aren't working -- but if I had to ASSUME, the game has been retrofitted to use ADPCM 4-bit/9 byte window size.

You could probably make just the n64 tools work on the n64 version of the rom, it's called "animal forest" instead. (You might need to find the offset of the audiorom in it, i haven't looked)

But otherwise, you could convert the waveforms to wav if you know their samplerate / frame size probably.
by MoldyPond at 7:18 PM EDT on September 6, 2024
@Xayrga The thing about that is that there’s a bunch of songs that were added to the GCN version that aren’t available in Animal Forest and therefore unfortunately can’t be ripped from it.
by aerorime at 9:46 PM EDT on September 6, 2024
So I'm going to resend the links for both the JaiSeq and the different sections of audiorom.img. I just want to put everything here to document what's been done so far, and also so anyone interested can help with ripping music from the GameCube Version of Animal Crossing.

JaiSeq Files

AudioRom Files


The bx file (I named it acBoot_sndBank.bx) contains an Instrument Bank (IBNK), a WaveSystem (WS), the scene (the bx file calls it Nintendo_hi_0.aw), and a bms sequence that is embedded in the bx file just before the IBNK (I called it acBoot_seq.bms). The bms sequence does not work with any of the tools that I've used, so I'm just going to leave it here for anyone to try and figure out how to get it to play some notes ("Nintendo...choo-choooooooo~").


As for the audiorom file, I was getting some help from @Xayrga and he figured out that audiorom is divided into 3 different sections:

0x0000000 - 0xCF7000 = SEQUENCE
0x0CF7000 - 0x0137380 = TABLE
0x0137380 - 0x07EA760 = WAVE

The first section includes the sequences, as well as a section of hexadecimal that includes some other things under "== MML PASS CHECK ==". The second section contains some wavetable information that is used to describe the size and length for the third section of the file, which has the compressed waveforms (GC compression).

For right now, I'm still trying to make out the table to look for all the offsets. There are some breaks in the compressed waveforms, but the best I can do is play around with the sample rate and speed using Audacity until I can barely make out the sample. Any input regarding the sound table or a compression algorithm for decoding the waveforms would be very helpful.

edited 9:47 PM EDT September 6, 2024

edited 9:48 PM EDT September 6, 2024

edited 9:49 PM EDT September 6, 2024

edited 11:27 PM EDT September 6, 2024

edited 11:28 PM EDT September 6, 2024
by WDLmaster at 12:07 PM EDT on September 7, 2024
Here are the decoded samples.

Decoding them requires complete parsing of the SoundBank (IBNK in later versions of the format) to find the index of the wavetable and the VADPCM predictor coefficients which are for some nonsensical reason separate from waveform data.

The samplerate of each sample is 32000 but correct tuning information is inside the soundbank in form of a 32 bit floating point number. I didn't bother to apply this tuning to any samples because multiple instruments can tune the same sample individually (and in case of drums even multiple times in a single instrument) so there's not one single way to discern the actual samplerate.
by aerorime at 6:42 PM EDT on September 8, 2024
@WDLmaster Thank you very much for decoding the samples! The samples all sound great after giving them a good listen.


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