Absolutely amazing work, Sappharad! D3T should have hired you to help finish working on the music!
I think someone there already had the right idea, but they couldn't use it for reasons yet unknown.
I was curious as to two things:
- Why do Dreamcast format songs even work in this port of the Xbox version after the samples have been converted? The file formats are different enough that they'd need two separate playback engines.
- Are those the only two formats supported, or can I shove something else in there?
To answer #2, I started disassembling the EXE and found the answer to another mystery from Page 1. Remember how I mentioned there were already DC format songs in the game data? I believe the game already has a complete set of audio in both formats. The function that builds the music paths actually builds two different paths: /SCENE/nn/SOUND/<filename>.snd and /SCENE/nn/SOUND/<filename>_dc.snd
Then it eventually continues and uses the .snd version of the file. I haven't figured out where it makes the decision to do that yet, but I managed to hijack the result at a breakpoint and force it to use the _dc version just once. The result? It loaded the Dreamcast version of the song as expected and it sounds as good as the video above.
In short, the game already contains the Dreamcast soundtrack and can even toggle between DC or the poorly supported Xbox version. What I haven't figured out yet is where it decides to use the .snd file instead of _dc.snd because it knows about both. I tried to cheat and change both paths to the _dc one but that just resulted in a crash, so I need to trace further upstream to wherever it decides to go with the one it does. If this works we don't need to distribute pre-modded files, just a small patch to the game.
Outstanding questions:
1. Since the game already has the DC soundtrack built in, how complete is it? Was this an option they were planning to include but it got cut before the game was finished?
If anyone else wants to look further before I get back to it, here are useful places to stick breakpoints:
Shenmue2.exe+57c886 - Append snd suffix
Shenmue2.exe+3d81cc - If _dc version is in memory here, it will be used. Some sort of load method called for most files.