DTPKDump      An audio tool for Sega Dreamcast/NAOMI video games.

DTPKDump can be downloaded from here. New improved versions (code cleanup, better knowledge of sections, improving ease of use, etc) are being released about once every two weeks right now. I'll update this message when I'm "done" and stop making updates. Until that point, it's a good plan to check for updates before editing. This is still raw beta code: while workable, things will be getting significantly "better".

DTPKDump supports file inspection, audio injection, and audio extraction for most Sega-DTPK based Dreamcast or NAOMI games.

If there is a file or something that DTPKDump does not understand, please let me know what that specific game and file is so I can look into it. There are often temp/bad files on discs that aren't actually used: we of course want to ignore those because they are pointless. There are certain exotic variants of DTPK that we don't understand (such as the XBox ('xobx') versions: you're welcome to take our existing knowledge of DTPK to expand and understand those files.

This is a command line tool that can benefit from skilled usage. I've tried to enable support for most common scenarios. There are certain aspects of tinkering with the file (increasing playback rate, changing volume, etc) that DTPKDump will point you to (via offsets in the binary file) but not directly offer to change for you. You can use a binary/hex editor to update those as you want to.

DTPKDump has been tested against only a small subset of DTPK-based games. Those include Capcom vs SNK Pro (DC), Capcom vs SNK 2 (DC), Dead or Alive 2 (DC), Marvel vs Capcom 2 (DC), PowerStone 2 (DC), Street Fighter III: Third Strike (DC), Shenmue II (JPN DC), Virtua Tennis (DC), and Virtua Tennis (NAOMI). It should understand any normal files from any DTPK-based NAOMI or Dreamcast game: hit me up if you have any issues.

Quickest Possible Get Started Guide

  1. Download and install Python. I have been using Python version 3.12 but trying to avoid using any version-specific extensions. Note that the AIFF support in Python may be removed in Python 3.13, so when/if that ever comes out you probably do not want to upgrade.
  2. Download the current version of the DTPKDump script.
  3. Download and extract out the ROM for the game you care about. Save a copy of the game ZIP "just in case".
  4. Download whatever audio content you want to use and/or inject.
  5. Process the audio as you want using an audio tool such as Audacity or the old Microsoft Sound Recorder. DTPK solely supports mono or stereo 8bit or 16bit PCM audio. The intended range for DTPK is 4000Hz to 23000Hz, although it does support up to about 48000Hz. For space reasons, using mono is ideal. For space reasons, sticking to lower frequencies such as 11025 or 22050 is also ideal. Audio in DTPK can be imported as either uncompressed PCM WAV or uncompressed PCM AIFF. Frankly PCM WAV is a lot easier to work with and generate.
  6. Figure out what sample number you want to update.
  7. Use a super easy command line such as: python dtpkdump.py PL18_VOI.BIN -splicepcm 12 newsample.wav -o PL18_VOI_new.BIN That will open up PL18_VOI.BIN, changing the sample at slot 12 to "newsample.wav", saving the results as PL18_VOI_new.BIN.
  8. Once you have the results you like, copy that new DTPK file back to the target disc image. Repack the ROM.
  9. Load the image into your favorite emulator/console and have fun!

Guides

  • Read Me: overview of DTPKDump's options

Development / Contributing

Development is ongoing: the source code can be found on GitHub here. Hit me up on Twitter or GitHub with questions. I'm also on a few of the emulator / Dreamcast Discords.

History

DTPK usage started in about 1998 via the Sega software development kits (SDKs). Game developers would use Sega SoundFactory 2 on Mac. They would import MIDI (SMF) or PCM AIFF (the old standard Apple audio file, much as WAV was the old standard for Windows) files to the sample / music banks. They would then form tracks with those, and reference those tracks from the game. For example, for Marvel vs Capcom 2 the Capcom team created the basic general character template of tracks 0-9 being common event and attack sounds, tracks 10-19 being character quotes, and further tracks being sound effects. Any unused slot is filled by a track that simply uses the NULL system command event. A DTPK file can contain a large number of groups containing a large number of tracks that use a large number of samples.

Now that we had Dreamcast/NAOMI games with rocking soundtracks out there, people started wanting to extract those out so that they can listened to at will. You can find archives of most Dreamcast/NAOMI game soundtracks online. The work at this time was thanks to the wisdom and skills of Neil Corlett, R. Belmont, Richard Bannister, KingShriek, kode54, and many others. The Highly Theoretical (HT) and Audio Overload SDK from about 2008 still are the gold standard for standalone playback of content stored in DTPK archives.

The key old technique for extracting content from DTPK files was KingShriek's dsfdtpk tool. That would chop up the DTPK into "DSF" (Dreamcast Sound File) or miniDSF files that could be played by various tools that used the HT or AOSDK works. This is a wonderful tool: while it is focused on song bank (MIDI) entries, it can also be used for sound effect bank (PCM) entries with the "-a" flag. The design here is quite interesting in that instead of extracting out content, which would remove the playback tuning and tweaking that the game developers applied in the Track configuration, dsfdtpk maintains full fidelity by instead simply using miniDSFs to contain a sequencer command that is played back from the generated DSFLib. (Or in the case of a full DSF, within itself.) There is a very minor issue with the old old old version wherein it uses Group 0's track count for all groups: I have fixed that in the updated dsfdtpk version here.

Later, the Shenmue team, especially Sappharad and LemonHaze, put more work into DTPK. They created the very helpful DTPKUtil that lets you extract out DTPK sample bank entries to PCM WAV files. They also produced the helpful AM2 DTPK file format documentation that was a cornerstone of my own work.

In parallel, the Marvel vs Capcom 2 Dreamcast fandom had been modifying aspects of the game for a long time. We started with custom music, moved to custom colors via PalMod and Supabuu in 2007, and have blown the game open currently with custom stages and well really anything you want to spend the time to do. As part of this investigation, I decided to take the existing DTPK work out there, tweak it, and update it with a little more time and investigation. Through key assistance of the Shenmue team, everybody else I mentioned earlier, and VincentNL, we are now to the point where we can easily inject audio into games. It's still pretty power user and we're working through aspects, but -- hey we can do this now.