Metal Gear Solid 2 PC: Need help trying to extract the contents of BGM.dat by E3245 at 8:38 PM EDT on March 24, 2017
Hello all. I'm trying to extract the contents of BGM.dat of the PC copy of Metal Gear Solid 2 so I can get the loop points of the music, but demux_dat and demux_dat_be does not work with this archive. It keeps saying: unknown block type 700 at 0.
Here's the header of the BGM.dat, the first 288 bytes (The actual file is about 300MBs): BGM.dat header
Sorry, I don't know exactly where the loop points are stored, but Turfster's Solidus tool can handle MGS2 PC's bgm.dat. You can select the option "Keep MS ADPCM WAV." That might help.
There doesn't seem to be much to the header. The audio data starts roughly around offset 0x9DF (or maybe a little before at 0x700 if the null data is supposed to be part of it).
I know that BGM.dat doesn't contain the loop points, but the individual files inside of the archive does. For example, MGS3/4 had *.mtaf/*.mta2 files within their respective BGM.dat archives that contain the audio and the loop points that the game uses. I think I read somewhere that MGS2 PC uses streamed audio, similar to MGS3 and 4, while the PS2 version uses a different format.
Anyways, would it be better just to upload the entire BGM.dat, or if possible, just cut the file up to a certain offset that would be useful to others?
It's just a bunch of files mashed together. Each file has a mini header, with sample rate/channels/etc and it has loop points (at 0x0c and 0x10, in total sample values).
I'm having trouble to understand how they are split though (the first value in the header looks like the size in bytes, but it's not exact). Is there any companion BGM.something file or such?
If it's like MGS1, the size near the beginning is the size of the payload. Everything is stored in many blocks per data type. See voxhound for my incomplete work on that. Basically a 4-byte header with the first byte being type, 1 is audio, F0 is end of file. There's a metadata block at the beginning with payload size (actual bytes of audio data within all blocks), codec, etc, don't recall the type.