Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Jan 16, 2018 1:39 pm

All times are UTC

Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Nov 14, 2017 4:45 am 

Joined: Fri Mar 10, 2017 7:23 am
Posts: 27
Guys, I'm trying to mod the audio files of PS2 version of GTA SA (more specifically, I want to mod the radio commercials).

There's a set of tools which does extracting and repacking the audio archives as well encoding and decoding the audio files (You can find it by searching "Pack Extract-Rebuild Radio GTA S-A" on google). But, the encoder only works for radio station songs (not to mention the program sometimes crash when converting files). Basically, the encoder splits your audio into 3 parts (intro, middle, and the outro of the songs) and I wanted the files to be converted into single audio.

Because of that, I figured how about I convert the audio myself with the help from MFAudio + Hex Editor?
So, I start to examine the content of the files. For example, I extracted the ADVERTS.PAK with one of the tools (Stream_PAK.exe) and examine one of the extracted files (FILE0000.VAG) with the hex editor (I use HxD).

At the start of the files there's 4 bytes of "0xFF" dunno what is this, probably some kind of IDString, but what I needed for help is actually on the offset 0x1F40.

As you can see on the image above, there's information about the files (They appeared twice). However, the only thing I could figure out is the frequencies of the audio (at offset 0x1F54 and 0x1F5C, there's hex value of C0 5D 00 00 which when converted to decimal is 24000, so the audio freq is 24000 Hz). I don't know what the rest of the value are (Probably sample lengths or something?).

After that at offset 0x1F64 (or 0x1F74?) is where the audio data starts. The audio data was stored with PS2 Compressed ADPCM format. And, some interesting bits about the audio data. At the start of audio data (or 0x10) and on the next 0x20000 (Like 0x21000, 0x42000 and so on...) offset there's 0x1000 of garbage audio data (sounds like rewind?).

Make the audio data is easier since I just need the convert the audio, split the converted audio to 128kb (131072 bytes), take the garbage audio data, paste to each splitted files, and combine the files again.

Here's the sample files if you guys needed to study the files (It's on the attachment)
Who knows maybe you guys can make it into BMS script or even the standalone tools.

FILE0000.rar [1.41 MiB]
Downloaded 13 times
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited