Author Topic: TH1 - 5 PMD Extraction Tools  (Read 6116 times)

Dark Kitsune

  • Code Fox
TH1 - 5 PMD Extraction Tools
« on: July 08, 2013, 12:00:12 AM »
(If this is breaking any rules, please tell me)

Summary:
After looking for hours and hours, I got really annoyed to find almost no instructions on how to actually extract music from TH1 - TH5, let alone tools that will do it for me. I eventually did figure it out after translating several obscure Japanese websites, but I thought I might as well compile the information I gathered into English instructions.
So here's a sort of shabby guide and toolkit to extract (and play) the music from the game files.

Here's the set of tools you'll need:
http://www.mediafire.com/?a8x81udh32ht72e

Instructions:
(I'll add images later)
Step 1: Set up the applications you need.
 - Double-click the included "Open Workstation.bat" file to start everything.
    Follow any instructions that may appear, but leave the File Open window alone for now.

Step 2: Extract the music database from the game image.
 - Switch to the File Open window for DiskExplorer and navigate to the .hdi file for your PC98 Touhou game.
    Double-click the file and press OK on the message that should appear.
     A file tree should now be displayed. Find the music .dat file; it should be called either "MUSIC.DAT" or "<random characters>ED.DAT"
      Right click the .dat file and click extract. Then save it somewhere you will remember.

Step 3: Extract a song from the .dat file.
 - This is where it gets a bit tricky. Find and open the newly extracted .dat file with HxD, the included hex editor.
    Press Ctrl+F to open the search window. Do a text search for the first english word in the song you want.
     If nothing is found, try the second word, and so on.
      Once you find something, set the cursor there. Then press Ctrl+F again, and do a Backward search for the hex values 00 1A 00.
       Set the cursor to the first 00 in the found values like this ->  |00 1A 00  , and drag your cursor down until you find the title of the song again.
        Continue to drag your cursor to the end of the 00 00 values just before the next 00 1A 00 values, like this ->  00 00| 00 1A 00
         Your selection should now extend from way before the title, to a few lines after it.
          Now, copy these values and click File -> New in the toolbar. Paste your selection into the brand new, completely blank file.
           Click File -> Save As and save the new file somewhere, with .M as the file extension. (E.G. Tabula Rasa.M)

Step 4 (Optional): Play/test the newly extracted song.

 - Now let's listen to the .M file you extracted from the game files.
    Switch to the FMPMD2000 window and click File -> Open File and find the .M song file.
     Double-click it, and if you extracted it correctly, the song should immediately start playing in all it's PMD glory!
      If you get an error, you did something wrong. Either get angry and give up, or go back and try again.

Tools for converting PMD music to MIDI music!
http://www.shrinemaiden.org/forum/index.php/topic,15106.msg994508.html#msg994508
« Last Edit: July 08, 2013, 04:36:27 AM by Ran Yakumo »

Drake

  • *
Re: TH1 - 5 PMD Tools
« Reply #1 on: July 08, 2013, 01:25:47 AM »
Not to be a downer on your efforts, but I do have the PC98 music rips and a player already over in the Projects thread.

http://www.mediafire.com/?13djmzdwnnn

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Dark Kitsune

  • Code Fox
Re: TH1 - 5 PMD Tools
« Reply #2 on: July 08, 2013, 01:56:39 AM »
Not to be a downer on your efforts, but I do have the PC98 music rips and a player already over in the Projects thread.

http://www.mediafire.com/?13djmzdwnnn
Oh, really? Well, I still think people should know how to do it manually too.

Arcorann

  • hey catgirl
  • Surprisingly unkempt
Re: TH1 - 5 PMD Extraction Tools
« Reply #3 on: July 08, 2013, 09:08:39 AM »
Wouldn't it be easier to use thtk?

Dark Kitsune

  • Code Fox
Re: TH1 - 5 PMD Extraction Tools
« Reply #4 on: July 08, 2013, 03:09:30 PM »
Wouldn't it be easier to use thtk?
I couldn't get thtk to work on any of the PC98 games. It just kept having offset errors.

And look at my last post...