Jump to content

Metal Gear Solid 2 - Type 1 audio


Go to solution Solved by bnnm,

Recommended Posts

Probably an old query for some, but just for my own knowledge to understand this format.  MGS2 on the PS2 has two different audio formats - type 0 is standard PSX ADPCM, but type 1 is some other format.  It looks like some sort of PCM8, with some sources saying it should be XOR'd by 0x07 first, and some saying it's IMA.  I've tried the data both raw and XOR'd but I can never get it to play correctly, trying various interleave values as well.  I might just be missing something obvious if anyone can enlighten me.

I've attached a couple of samples of these type 1 files from DEMO.DAT - they include the 16-byte header and then the raw audio data.

 

Thanks.

 

type1_samples.zip

Link to comment
Share on other sites

Seem like custom 8-bit DPCM to me. The 0x07s over data is probably a table index rather than something to be xor'd. Would be hard to figure out without reversing the exe though.

Link to comment
Share on other sites

1 hour ago, bnnm said:

Seem like custom 8-bit DPCM to me. The 0x07s over data is probably a table index rather than something to be xor'd. Would be hard to figure out without reversing the exe though.

Thanks!  It's one that's annoyed me for a while, but I could never find anything definite about that format.

I might have to resort to some extensive reversing to see what it's actually doing.

 

Link to comment
Share on other sites

Poked at the decompilation a bit and seems more like a custom-but-regular pcm8, rather odd. Could probably add to TXTH later but meanwhile:

mgs2-type1-to-pcm16.py

IIRC the (old) PC version used MSADPCM and would have better quality though.

Edited by bnnm
Link to comment
Share on other sites

1 hour ago, bnnm said:

Poked at the decompilation a bit and seems more like a custom-but-regular pcm8, rather odd. Could probably add to TXTH later but meanwhile:

mgs2-type1-to-pcm16.py 652 B · 0 downloads

IIRC the (old) PC version used MSADPCM and would have better quality though.

That was quick.  Excellent stuff!  Starting to sound like it should without all the harsh background noise.

I just wanted to rip everything in playable format for completion purposes (an obsession of mine lol), as this was the only audio that I couldn't play properly.

Thanks!

 

Link to comment
Share on other sites

Files seemed a bit quiet, on a closer inspection this may be doing some extra stuff with the values to get better output. I'll see if I can figure out and add to TXTH later.

Link to comment
Share on other sites

29 minutes ago, bnnm said:

updated vgmstream, txth:

codec = DPCM_KCEJ
sample_rate = @0x06:BE$2
channels = @0x08$1
start_offset = 0x10
num_samples = data_size

 

Fantastic!  Works perfectly.  Thanks for adding it, it's definitely a rare format.

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...