RyanMallon / TheLostVikingsTools

Reverse Engineered Tools/Library for the DOS game The Lost Vikings
Creative Commons Zero v1.0 Universal
73 stars 13 forks source link

Extracting XMI files with pack_tool not working? #1

Closed foxmulderssister closed 5 years ago

foxmulderssister commented 5 years ago

I am trying to get the XMI music files from Blackthorne's DATA.DAT file. I am using ./pack_tool --blackthorne --decompress-chunk=012:01.xmi ../share/DATA.DAT What I get isn't an xmi file. Also the output says "Extracting and decompressing chunk 000a to 01.xmi". Why chunk 000a? That's not HEX for 12... 01.zip

RyanMallon commented 5 years ago

Hi,

Glad the tools are of some use!

The index for the chunk is read using strtoul(arg, NULL, 0) (see pack_tool.c:arg_get_chunk_and_filename), so the base of index is determined from the first character. 012 gets interpreted as octal, which is why you ended up with 0xa.

This works for me:

./pack_tool --blackthorne --decompress-chunk=0x12:01.xmi DATA.DAT

The extracted data looks like an XMI file, but I don't have anything to test playback. I think the XMI files may depend on other instrument files?

Let me know if you manage to get it working.

foxmulderssister commented 5 years ago

Thank you, that was helpful. I used your info ang found that music starts at chunk=0x16 - the intro, 0x17 is the cinematic intro music, but not the same as 0x18 which is also the cinematic intro music, but as I am used to it. It's a regular XMI file, just like with MIDI files, one doesn't need instrument files. More: http://www.vgmpf.com/Wiki/index.php?title=XMI Chunks 0x12 and 0x13 have sound effects in them - not the digitized ones, XMI effects that are used when rolling on the floor, picking up items, pressing ESC, etc. - so you have different experience if you're using different sound card for music - even for some of the sound effects. Chunks 0x14 and 0x15 have some XMI music in them that I have never heard before. Or at least I can't remember hearing it while playing. Maybe it's something similar than with chunks 0x17 and 0x18 - different versions of the same music. Maybe one is meant to be used with General MIDI and the other one with GUS and another one with SB or something. Will investigate further. Thank you very much for this tool!! Now it does exactly what I wanted from it. 👍

EDIT: I now know that each song is presented 3 times. The third instance is what I am looking for - the General MIDI compatible one.

RyanMallon commented 5 years ago

Awesome. I didn't look too much at the sound/music files when reversing the games. Chunks starting at 0x38 are Creative Labs Voice format, which contain single sound effects. I can play those with VLC. What are you using to play the music files?

foxmulderssister commented 5 years ago

I am using foobar2000 with MIDI Player component (foo_midi): http://www.foobar2000.org/components/view/foo_midi It can play a lot of different MIDI type files. I use it with the built-in BASSMIDI SoundFont synthesizer with Arachno SoundFont: http://www.arachnosoft.com/main/soundfont.php