.2DX Files

.2dx files pretty much consists of a bunch of wav files, each with a 2DX9 header.

Each song has a NAME.2dx with the background track and all the samples, and a NAME_pre.2dx with the 10s song select menu preview

Note: I'm not too familiar with how it works other than the basic layout.

FILENAME HEADER

The filename is written first (without the .2dx extension).

This segment takes up 8 bytes. If filename is >= 8 chars, this segment will take up 16 bytes.

JUNK I DIDN'T HIGHLIGHT

its mostly 0s here but for some songs theres a bunch of numbers here and idk what its all about...

Sample HeadCount

For each sample in this file, there is a 4 byte segment in this area. The four bytes read the position of the sample.

Get the pattern? Remember we're working in hexadecimal.

2DX9 Header #1

Easily identifiable because its first 4 bytes are "2DX9".

Not too sure what it does but it is pretty vital.

This header takes 24 bytes and is always followed by the actual wav file.

WAV File #1

The actual sound data for this sample.

Seems pretty standard but it must be MS-ADPCM format wav! Trying to use something like a PCM format wav will crash the game unfortunately.

Summary

That's pretty much it. Each 2DX9 header is followed by an MSADPCM WAV like so. Can't go into into too specific detail of .2dx cause I'm not too knowledgable on it...