Re: Splinter Cell 2 .SS0 Music
Posted: Tue Jul 22, 2008 5:13 pm
The contents of this post was deleted because of possible forum rules violation.
Well, thanks for the infomation. I'll try harder this time.OrangeC wrote:Well the SS0 is 1gb for double agent PC so its too big to post here.
But i had to extract all tracks inside of it, it only happens when i extract tracks in a batch or one by one in the file, And it does only on some files, not all.
So if i want to extract files i have to select everything and it will extract them with no errors, weird.
I am always glad to help other people. Thank you for your feedback.RonHayter wrote:Thanks very much, Zench, for your work decoding UbiSoft's sound formats. I've been looking at Myst III for PlayStation 2, another UbiSoft game, and your info has been invaluable.
Yes, *.SM? files do contain audio (typically sound effects) as well as directory information. I should write a program that actually parses the directory information, but it varies from game to game. The segment you posted is not any UbiSoft audio format which I've seen. Keep in mind UbiSoft uses raw audio and platform specific codecs in their audio files (for example XMA on the Xbox platform). I am not very familiar with Playstation audio, though. Ahh... yes! I just tried this file in PSound (I can't remember where I found it) and it worked.RonHayter wrote:Your DecUbiSndGui application figured out that STRM.SM1 contains 38 simple streams of the version 3 variety, all of the music in the game. I know that part of MAPS.SM1 is directory information. In particular, I've figured out how MAPS.SM1 describes the 38 streams in STRM.SM1. However, MAPS.SM1 is much too big to be only directory info. I'm sure that it must also contain audio data for the game's non-musical sounds. If so, it's in a format not recognized by me or by DecUbiSndGui.
If anyone is interested in looking at an example of a piece of MAPS.SM1 that I believe is audio data, here's the 8 KB chunk between a couple of the dozen or so directories scattered throughout MAPS.SM1:
http://homepage.mac.com/rshayter/MAPS-000bc800.bin.zip
Brilliant! You're absolutely right -- PSound found 280 sounds in MAPS.SM1. Thanks for the help! Next step: google for a description of the PS2 sound format.Zench wrote:Keep in mind UbiSoft uses raw audio and platform specific codecs in their audio files (for example XMA on the Xbox platform). I am not very familiar with Playstation audio, though. Ahh... yes! I just tried this file in PSound (I can't remember where I found it) and it worked.
Code: Select all
Header at 0x0000:
uint32 {4} - Unknown
uint32 {4} - Offset to root directory
uint32 {4} - Number of root directory entries, each 48 bytes long
Root directory entries:
{
uint32 {4} - Unknown (always 0)
uint32 {4} - Unknown (always 0)
uint32 {4} - Offset to subdirectory
uint32 {4} - Length of subdirectory
char {32} - Subdirectory name, zero-padded
}
Subdirectory:
uint32 {4} - Unknown (always 0)
uint32 {4} - Offset to unknown table X (always 0x0024)
uint32 {4} - Number of X entries, each 52 bytes long
uint32 {4} - Offset to streamed sound table
uint32 {4} - Number of streamed sound entries, each 112 bytes long
uint32 {4} - Offset to unknown table Y
uint32 {4} - Number of Y entries? (usually 1)
uint32 {4} - Offset to unknown table Z
uint32 {4} - Number of Z entries
Streamed sound entries (apparently valid only if the length field at offset 0x0038 is non-zero):
{
uint16 {2} - Sound ID, minor component?
uint16 {2} - Sound ID, major component?
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Offset of version 3 simple stream in STRM.SM1, only if length > 0
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Number of channels (always 2 when length > 0)
uint32 {4} - Sample rate (always 44,100 when length > 0)
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Length of version 3 simple stream in STRM.SM1
uint32 {4} - Unknown
uint32 {4} - Unknown
char {8} - File containing streamed sound (always "STRM.SM1" when length > 0)
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
}
Following almost every subdirectory and its tables are PS2-native sequenced sounds.
Nice work! The general structure is very similar to the other *.SM? files I've seen, except that this one has lots of padding an the other ones don't. That's probably just a Playstation thing, though. I should post the format of the Splinter Cell 1 PC .SM0 file so you can see how similar they are. I should also add a bunch of UbiSoft audio formats to the wiki. I already started adding a few but I didn't finish. If you want to add this format and know how, go ahead; otherwise I can do it.RonHayter wrote:Here's my interpretation of the directory information inside MAPS.SM1. All values are little-endian.
We're glad to have you back!Mirrodin wrote:Arg! finally able to log back into xentax! (changed emails took forever to get reactivated).
Please do. There's no hurry, though. I'm curious but I don't have that game.Zench wrote:I should post the format of the Splinter Cell 1 PC .SM0 file so you can see how similar they are.
If you're sure you don't mind, I'd appreciate that.Zench wrote:If you want to add this format and know how, go ahead; otherwise I can do it.
Code: Select all
uint16 {2} - Signature (7)
uint16 {2} - Unknown
uint32 {4} - Root directory offset
uint32 {4} - Directory count
For each directory {
uint32 {4} - Unknown (mostly null)
uint32 {4} - Unknown (mostly null)
uint32 {4} - Directory offset
uint32 {4} - Directory size
char {32} - Directory name
}
At the directory offset {
uint32 {4} - Unknown (always null)
uint32 {4} - Offset to directory 1
uint32 {4} - Number of directory 1 entries
uint32 {4} - Offset to directory 2
uint32 {4} - Number of directory 2 entries
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
uint32 {4} - Unknown
For each entry in directory 1 {
uint32 {4} - Resource ID
byte {84} - Unknown
}
For each entry in directory 2 (each entry is 128 bytes){
uint32 {4} - Resource ID
uint32 {4} - Type (1 - 15)
uint32 {4} - Unknown (always 1)
If Type is 1 {
uint32 {4} - Size
uint32 {4} - Unknown (always 0)
uint32 {4} - External Offset (0 if the data is in MAPS.SM0)
uint32 {4} - Unknown
uint32 {4} - Unknown (always 1)
uint32 {4} - Unknown (0 or 1)
uint32 {4} - Unknown (always 1)
uint32 {4} - Location (0 for internal, 1 for external)
uint32 {4} - Wierd Flag
uint32 {4} - Size
uint32 {4} - Size/2
If Wierd Flag is 1 {
uint32 {4} - Size
uint32 {4} - Size/2
} Else {
uint32 {4} - null
uint32 {4} - null
}
uint32 {4} - Bitrate
uint32 {4} - Sample rate
uint16 {2} - Bits
uint16 {2} - Channels
uint32 {4} - Type (1 is raw PCM, 2 is SC1-type audio, 3?, 4 is Old Simple Stream)
char {40} - Filename (external if location is 1)
uint32 {4} - Unknown (1)
uint32 {4} - Unknown (padding?)
}
If type is 13 {
uint32 {4} - Size
uint32 {4} - Unknown
uint32 {4} - External Offset
uint32 {4} - null
uint32 {4} - null
uint32 {4} - Unknown
uint32 {4} - Unknown (3)
uint32 {4} - null
uint32 {4} - null
uint32 {4} - Unknown (1)
char {40} - External Filename
uint32 {4} - Unknown
uint32 {4} - null
uint32 {4} - Size
uint32 {4} - null
uint32 {4} - null
uint32 {4} - Unknown (0)
uint32 {4} - Unknown (0)
uint32 {4} - Unknown (1)
uint32 {4} - Unknown (padding?)
}
If type is anything else {
byte {116} - Unknown
}
}
}
It's likely. I've been thinking about adding a few new features (like layer extract). I was also thinking about how I can get it to read .SM? files, if possible. I'm not sure if I fixed the bug you mentioned yet. It isn't high priority, though.OrangeC wrote:Hey zerichs will we see another version of the GUI?
You're right, there are many similarities with the format of MAPS.SM1 from Myst III for PS2. Thanks.Zench wrote:Here is the .SM0 format from Splinter Cell 1 and 2: