Users browsing this thread: 2 Guest(s)
Paper Mario TTYD File Research: samp
#3
Quote:Haven't gotten around to playing the game yet. I want to get the Dolphin developers to see if maybe they can see what's wrong first.

In the meanwhile, here's something.

Star Fox Adventures uses MusyX for sound and music playback. The musyxbin directory contains the output of MUCONV tool that's included in the MusyX SDK.

According to the documentation for the tool:


.proj Project data. This file contains the actual structure of
the converted project.
.pool Pool data. Contains macros and tables needed by the
converted project.
.sdir Sample directory. A file which contains a “directory”
describing all of the samples used in the project. Does
not contain sample data.
.samp Sample data.
Note that song files do not use the basename. These files use the
names assigned by their composers and have a .song extension.



These five different kinds of files are still in the folder, but for some reason someone decided to trim the last letter of each file extension. So instead of .pool, the game's version of the file is .poo for example (lol).

Also generated is a header file that allows the programmer to implement the music/sound data into the game.

All the data is "trimmed and compressed" so that it's optimized for the Gamecube automatically. They say their format is proprietary, so I don't know what format they compress it in. I have the SDK for MusyX, but I can't find anything to convert the converted data back or tools that can analyze the format (but I understand why that would normally be unnecessary, lol).

I don't know if there's a way to get everything back to a MusyX project file. It'd be nice because that way we can listen to Star Fox's music. For Dinosaur Planet's case though, I have no clue what they use for play back. According to DLLS.bin they use something called AMSEQ/AMSFX.

FWIW, the SDK comes with a converter to convert MIDI to the SONG format.

I found this by pure chance in a thread about Dinosaur Planet (N64) and the inclusion of some of its data in a Starfox Adventures demo disc. It doesn't really tell me anything about converting the data to a usable format but at least it confirms that pmario.proj and pmario.pool aren't really what I'm looking for so I figure I might as well drop those from investigation.

Also, current details on the sdir 32-byte block format:
[Image: lxFlOjp.png]
Code:
--------------------------------------------------------
|  Size   | Type  | Purpose                            |
| 2 bytes | Short | Index number, pointer?             |
| 2 bytes | ???   | Unknown, always 0x00               |
| 4 bytes | Int   | Offset to data in pmario.samp      |
| 4 bytes | ???   | Unknown, always 0x00               |
| 2 bytes | ???   | Often 0x3C00, sometimes varies     |
| 2 bytes | Short | Sample rate, often 16000Hz         |
| 4 bytes | Int?  | Unknown                            |
| 4 bytes | Int?  | Unknown                            |
| 4 bytes | Int?  | Unknown                            |
| 4 bytes | Int   | Offset to other structure in sdir  |
--------------------------------------------------------
There doesn't seem to be any filesize information (that I can make out) in this 32-byte block yet or in the 40-byte block pointed to by the last 4 bytes in the 32-byte block but I figure it's not strictly needed since the any offset data n can have its filesize determined by: size[n+1]-size[n], n being the current index's offset addr and 1 essentially being 32 bytes (1 block).

I'm also trying to see if there is any filename index information that I can point to a name in pmario.stbl or pmario.etbl but I haven't found anything concrete yet. I might try to make a program to parse the pmario.samp file using the data in pmario.sdir and retrieve each sample (over 1,200(!) in total, though) but I might see if vgmstream supports converting headerless raw sample data so I can also try converting them to WAV, too. I will do some research on that note, soon.

On a semi-related note, here are all of the filenames in the tbl files without the junk following them. Not sure why there's ~300 more filenames in the table compared to the number of sample chunks. This is why I want to find some sort of index data if possible because I could end up with wrong names.

On the note of pmario.slib though, I noticed that it also seems to be a huge collection of smaller chunks of data (or perhaps files). The first four bytes of the file appear to be an integer that shows how long the chunk/file (including the 4 byte size) following it is. After each chunk, this 4-bytes-then-data thing repeats, albeit with a differing size.

For example, the first four bytes in the file are 0x000FC0 (4032 bytes); sure enough, when you highlight the first 4032 bytes including the 0x000FC0, the length comes out to be 0x0FC0, or 3KB. I have no idea what the data could be yet but at least I figured that one out. The file is ended with a sequence of 0xFFFFFFFF.
Thanked by:


Messages In This Thread
Paper Mario TTYD File Research: samp - by Phaze - 02-06-2014, 07:19 PM
RE: Paper Mario TTYD File Research: samp - by Phaze - 02-08-2014, 03:17 PM

Forum Jump: