-
-
Notifications
You must be signed in to change notification settings - Fork 1
Techdoc Backup
All audio data in the Rockett series of games evaluated thus far are PCM audio data. In the majority of cases, it's mono, 8-bit signed integer PCM at 22050 Hz. There really isn't anything magical there. We can already extract a lot of game audio without a problem!
But one game (Tricky) features this gnarly, super rare compressed format (DPCM or ADPCM) that no one understands! It's called "SQS2". So, the rest of this article is dedicated to understanding SQS2.
- They're AIF-C files with a COMM chunk of "SQS2". We already know how to decode AIF-C files in general, it's just this magical COMM value no one understands.
- It shows up only in Tricky Decision, no other Purple Moon title evaluated thus far.
- It shows up in characters' "IDL" PRX archives and also SMF animations.
- "SQS2" is (most likely) a reference to the tool which was commonly used to generate data of this type, SquashSound, and not any indication of the mathematics used to decode it (e.g. "SDX2" corresponds to Square-Root-Delta). (XXX provide a pointer to the 3DO documentation I found)
- The 3DO company is definitely involved. The string "3DO" appears all over the place and, as far as we can tell, the SQS2 format is their invention.
- They're all mono, just like the uncompressed Rockett audio from other games.
- They're all played at 22050 Hz, just like the uncompressed Rockett audio from other games.
- How to decode them?!!
- Rockett's New School
- Rockett's Secret Invitation
- Rockett's Tricky Decision
A CLU file implements a color lookup table (sometimes called a CLUT). Every CLU file is exactly the same length (2056 bytes) because each one specifies the same number of colors (256).
XPK graphics rely on a CLU to determine the RGB values for a given pixel. The index is zero-based, thus each color in a CLU is numerically identified from 0 through 255.
- Rockett's New School
- Rockett's Tricky Decision
- Rockett's Secret Invitation
This is kinda interesting...
./Choice1.PRX 1: DIB -> [1000] [1082, 4, 0, 3270]
./Choice2.PRX 1: DIB -> [2000] [1082, 4, 0, 3270]
./Choice3.PRX 1: DIB -> [3000] [1082, 4, 0, 3270]
./Choice4.PRX 1: DIB -> [4000] [1082, 4, 0, 3270]
./Choice5a.PRX 1: DIB -> [5000] [1082, 4, 0, 3270]
./Choice5b.PRX 1: DIB -> [6000] [1082, 4, 0, 3270]
./Choice5c.PRX 1: DIB -> [7000] [1082, 4, 0, 3270]
./Choice6a.PRX 1: DIB -> [8000] [1082, 4, 0, 3270]
./Choice6b.PRX 1: DIB -> [9000] [1082, 4, 0, 3270]
./Credits.PRX 1: DIB -> [64000] [1082, 0, 0, 3270]
./Global.PRX 30: DIB -> [63000] [1082, 33, 0, 209924]
./IDBackPk.PRX ./IDGlobal.PRX
1: DIB -> [44000] [1082, 4, 0, 3270]
./IDL/Arno.PRX ./IDL/Arro.PRX ./IDL/Bo.PRX ./IDL/Chaz.PRX ./IDL/Clev.PRX ./IDL/Dana.PRX ./IDL/Gen.PRX ./IDL/Ging.PRX ./IDL/Jess.PRX ./IDL/Mavi.PRX ./IDL/Max.PRX ./IDL/Miko.PRX ./IDL/Naki.PRX ./IDL/Nico.PRX ./IDL/Rock.PRX ./IDL/Rube.PRX ./IDL/Shar.PRX ./IDL/Step.PRX ./IDL/Teac.PRX ./IDL/Viva.PRX ./IDL/Whit.PRX ./IDL/Wolf.PRX ./IDLounge.PRX ./IDNav.PRX ./IDYear.PRX
./Replay.PRX 1: DIB -> [700] [1082, 4, 0, 3270]
./Scene1.PRX 1: DIB -> [1000] [1082, 4, 0, 3270]
./Scene2.PRX 1: DIB -> [2000] [1082, 4, 0, 3270]
./Scene3.PRX 1: DIB -> [3000] [1082, 4, 0, 3270]
./Scene4.PRX 1: DIB -> [4000] [1082, 4, 0, 3270]
./Scene5a.PRX 1: DIB -> [5000] [1082, 4, 0, 3270]
./Scene5b.PRX 1: DIB -> [6000] [1082, 4, 0, 3270]
./Scene6a.PRX 1: DIB -> [8000] [1082, 4, 0, 3270]
./Scene6b.PRX 1: DIB -> [9000] [1082, 4, 0, 3270]
./Shared2.PRX
./Splash.PRX 1: DIB -> [500] [1082, 0, 0, 3270]
./Terminal.PRX 1: DIB -> [10000] [1082, 4, 0, 3270]
30: DIB -> [10100] [1082, 33, 0, 1307307]
33: DIB -> [10200] [1082, 0, 0, 7873409]
./Title.PRX 1: DIB -> [600] [1082, 0, 0, 3270]
-
Every DIB file is exactly 1082 bytes
-
They are almost exclusively the topmost entry in the XPK file they appear in
-
None of them appear in "character IDLs"
-
they consist of a 2-byte magic (66,67 == "BM") and exactly 270 instances of 3 numbers + nul
-
actually it's probably related to this https://en.wikipedia.org/wiki/BMP_file_format ... but why would there only be one per choice and one per scene
-
Does "BM" stand for "bitmap" ?
-
https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/ns-wingdi-tagbitmapfileheader
Rockett's New School is the only game in the Rockett series which stores all its content in combination PRD/PRS archives, rather than the combined PRX archives of the later games.
In essence, the PRD file is a header which specifies a table of contents and lists a bunch of offsets, and the PRS file contains the actual asset data.
The strategy involved in decoding PRD/PRS is almost identical to that of a PRX archive. Thus, the PRD part and the PRS part can effectively be concatenated to form a valid PRX file -- some modifications are required, of course (offsets will be all different, for starters) but the gist is definitely true.
- Rockett's New School ONLY
There's a difference between stuff that the character writes themselves, and stuff that other people write for the character.
For example, consider Viva (Tricky Decision):
$ strings Viva.PRX | grep Tviv
Tviv_j1_s1su
Tviv_j2_s3_2s
Tviv_j3_s3_3t
Tviv_j4_s5b_1m
Tviv_j5_s5b_2m
Tviv_j6_s5b_2s
Tviv_j7_s6a_2c
Tviv_j8_s6a_3g
Tviv_j9_s6b_1g # <-- end of the 'j' series
Tviv_n1_s1_1s # <-- beginning of the 'n' series
Tviv_n2_s3_3e
Tviv_n3_s3_3t
Tviv_n4_s3_3u
Tviv_n5_s5b_2m
Tviv_n6_s5b_2m
Tviv_n7_s5b_2s
Tviv_n8_s6a_1n
Tviv_n9_s6a_1n
Tviv_n10_s6a_2c
Tviv_n11_s6a_3g
Tviv_n12_s6b_1g
Here is Tviv_j9_s6b_1g
(a diary entry from Viva):
TXT^@<CC>Tviv_j9_s6b_1g^@^@^@ ^@^@<B0>^B^@^@Well, dear diary, I have only
one thing to say: if you're going to be an Explorer in life (which Arrow,
Ginger and I definitely are), you shouldn't wear satin! I had a really good
time at DuBois Grille. Wolf's parents are the coolest adult people I ever
met. And of course everyone really liked my dead queen costume. But when one
of the waiters went by me, he tripped and got gravy all over my skirt! Arrow
tried to make me feel better about it by saying it made my costume look even
spookier, like it was blood. But you have to admit that was NOT thrillingly
romantic! And that waiter? He looked a lot like Arnold Zeitbaum -- but that
isn't possible, is it?^M
And here is Tviv_n1_s1_1s
(a letter from Arrow to Viva):
TXT^@<D8>Tviv_n1_s1_1s^@^@^@^@^@^@}^A^@^@Hey Viva! ^MHappy Tuesday morning!
Only 4 more days till Wolf's party!! Soooooo-Meet me as soon as you can at
my locker after you get this. Because we need to discuss the Mission of the
Day: Which is to find that ROCKETT PERSON!! I think she might be good help
on the costume thing, don't you? ^MWe HAVE TO do something totally major
2-KEWL!! ^M Arrow^M
So the j
probably stands for "journal" and n
might stand for "note"?
FILE FORMAT
-
SOH
(ASCII 1, "^A") - (lots of zeroes!)
-
n
,\0
,n
,\0
,\0
,\0
SMF is "the" animation format in the Rockett series. They appear to contain a combination of graphical data and audio data. They presumably also contain timing data so that we know how long to display the current frame and when to move on to the next frame.
- They all have the same magic number.
- 1 SMF stream alternates between audio data and non-audio data (metadata and/or graphics.
- The format of the audio aligns with the rest of the audio used in the rest of the game. Specifically, it seems to be "SQS2"-ified in Tricky Decision but ordinary 8-bit mono PCM @ 22050 Hz in the other titles.
- How to decode them properly.
- Where the timing information for images is stored, if it even is stored here
- How to precisely identify where the audio regions are located, given the metadata at the beginning (there don't seem to be any offsets stored within)
- How to precisely identify where the non-audio regions are located, given the metadata at the beginning (there don't seem to be any offsets stored within)
- What the non-audio regions even contain -- are they XPK graphics, or something else?
An XPK file contains 1 or more raster graphics. When there are multiple "sub-images," they typically form one logical unit, either
- several "chunks," "sections" or "regions" of a larger image, or
- several frames of a single animation.
- They define 1 or more rasters of pixels.
- They specify the width and height of the image.
- Pixels are indexed with a corresponding color lookup table (CLU) -- XPK files do not "spell out" RGB values.
- A form of run-length encoding (RLE) is present, but it likely is not the only supported form of compression.
- How to properly decode them?
- How to definitively identify whether a given byte represents a color index, or a count for RLE purposes, or something else?
- Whether they're identical in nature throughout all Rockett titles