Extracting wav files from afs on Linux
Here's a quick tutorial for getting WAV files from AFS files on Linux.
Confused yet?
Rephrasing: If you're running Linux, this guide will show you how to extract the sounds and music found in Gust's games, without needing to run Windows-based software.
In PS2 Gust games you can find the AFS files directly on the game disks (just pop it into your DVD drive and browse), but for PS3 games you'll need special software to access the game disc files (eg: PS3 jailbreak). After which you'll also be able to browse the disc files and find the AFS files.
This guide should also work on other operating systems with some small adjustments, but I haven't tested it.
The main downside of this approach is that the original filenames won't be preserved, so you'll end up with a bunch of files like this:
bgm.afs_00000.adx.wav bgm.afs_00001.adx.wav bgm.afs_00002.adx.wav
Which you'll need to play through one by one to look for specific tracks. The Windows AFS tools are better if you want to keep the original filenames during extraction from AFS (like ev_leprekia.adx).
Some basic terms:
- adxplay: A set of freeware tools for working with ADX, AFS, etc files. You need to compile the C code first before you can use the tools.
- ADX: A sound file format used in Playstation games. This needs to be converted to WAV before you can play it in regular players.
- AFS: A file that contains several ADX files in it. You need to run a tool to extract the ADX files.
And, here we go with the instructions:
1. Download adxplay from here:
http://www.brothersoft.com/adxplay-192927.html
2. Extract adxplay-20040501.tar.gz
3. Take a quick look at the README file.
4. Install the pmake building tool, eg:
sudo apt-get install pmake
3. Build the tools, eg:
cd /tmp/adxplay-20040501 pmake
4. Copy over the AFS file you want to extract the ADX files from.
5. Use the afx_extract tool to extract all the ADX files from, eg:
./afs_extract bgm.afs
6. Convert one of the ADX files to wav:
./adx2wav bgm.afs_00080.adx
Then you should be able to play the new wav fine, eg:
sudo apt-get install sox play bgm.afs_00080.adx.wav
And you can of course use some basic shell commands to mass-convert the extracted ADX files to WAV, eg:
for F in $(ls *.adx); do echo $F; ./adx2wav $F; done
Have fun :-)