-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Identify remaining unknown file formats #3
Comments
I misunderstood what CHK.CDB is - it actually contains two files which are just simple strings. The first is "GALERIANS DISCn" where n is the disc number. The second is "GENTEI". I was confused by the presence of a bunch of garbage data, including generic debug strings, in the first sector of the database after the end of the header. The file in GE.CDB, on the other hand, is actually a Japanese string database of debug strings that don't appear in the Japanese version of the game. I had to copy it into a Japan-version project to be able to view them. |
I've done a little work on MOT.CDB. The files in this archive appear to be archives themselves which contain all animations for a specific character. Character animation indexes appear to be standardized; there can be gaps (zeroes) at certain indexes in the header if a particular character doesn't have that animation. Known indexes are:
Indexes in MOT.CDB of particular characters' animation archives:
The format of the animations themselves is still not understood. |
DISPLAY.CDB[3] and MENU.CDB[55] are menu files containing images and layout information for the option menu and the inventory, respectively. By extracting some positioning information from the exe, the option menu can be reproduced very close to how it appears in game. The inventory menu seems much more hard-coded, but it's still possible to extract icons and labels. Interestingly, the rotating G A L E R I A N S text that appears on loading screens is stored in the option menu file. Also, the Yes/No prompt in the option menu file seems to be used for all Yes/No prompts in the game. There are still a few fields in these files whose purpose I'm not completely sure about, but I feel they've been decoded well enough to check them off the list. |
Animations have been decoded. They consist of a series of frames each consisting of a model-level translation, rotations for the first 15 segments of the model, and a flag word. There are still a couple remaining issues (see issue #6 ), but I think they're related to hard-coded game logic and not the format of the animation files, so I'm checking MOT.CDB off the list. |
I've looked into the last undecoded file in DISPLAY.CDB a bit more. It contains a total of 66 entries. The size values in the header are strange because they leave gaps between entries, and the data doesn't look like it stops at the size boundaries. I decided to split the file apart ignoring the sizes and treating each entry as if it spanned from its offset to the next offset. For the first three entries, which are different from all the others, the first two are very similar, differing only by a few bits in a handful of bytes. The third one is a bit shorter and more different. The rest of the entries all start with the 88 40 magic number and range in size from 1-26 KB. There seems to be a header of some sort including the magic number; the first 8 bytes seem formulaic in all the files I've looked at. Some files also have similarly structured values through the first ~18 bytes. After that it's just dense binary data with no structure that I've been able to discern, so it's possibly compressed. Given that all the other files in DISPLAY.CDB are images (at least in the Japanese version), I would expect these to be images as well. Unfortunately, I wasn't able to find anywhere in the game that loads this file. If the game does use it, it's either loaded in an unusual way or loaded by a module. |
By chance, I discovered that module 128 (in the US version) loads this last file. It turns out it's graphics for the credits screen (and I believe module 128 runs the credits screen). The images are compressed using some compression scheme that identifies common substrings in the data. With that, all files in the US and Japanese retail versions of the game have been decoded. |
Most files in the game have been decoded at this point, but there are some that I still haven't figured out:
b'\x88\x40'
.The text was updated successfully, but these errors were encountered: