-
Notifications
You must be signed in to change notification settings - Fork 12
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
Jak 2 Header Differences #1
Comments
Yeah no idea, sorry, I haven't look at Jak 2/3 yet. I had a quick look at the disc and it looks to me like the file may be compressed with some basic LZSS-style compression? The first four bytes ("BlZo") make me think it possibly could be using LZO compression. |
Compression would make a lot of sense but kind of above my knowledge. I assume if it turns out to not be a standard type of compression than it will be a lot more difficult to figure out, probably more work than its worth. One thing I guess I'll add is I noticed that none of the files are <256kb, while Jak 1 has many files that are much smaller. Many of the files are exactly the same size at this 256kb, so maybe the files are padded? Maybe somewhat related to the compression? not sure. Thanks for taking a look! |
One of the files on the Jak 2 disc (DRIVERS/OVERLORD.IRX) has debug symbols mentioning miniLZO. I believe it would be possible to decompress the files, if you can find the length for each section, should be simple enough to put that length and the section into miniLZO's decompress function. Unfortunately, I don't know how to pick out the different sections, yet alone determine their lengths. |
Ya I've heard about the usage of miniLZO and I gave it a really quick shot one day and didn't have much success...however I was totally rushing it so its probably worth another attempt. An even easier way is to use the files off the PS3 collection as they are individually separated, uncompressed. On my fork (https://github.com/xTVaser/goaldis plenty of bugs still remain) I've been able to figure out the differences and disassemble all |
I started some work on this. I'm not completely sure about the buffer size, since when the second buffer is passed to decompress it crashes, but when I pass the file as a whole the decompression finds and eof at the buffer size, still working on that. |
Great news! |
@edgaralvarado Nice work! The decompressed .CGO files look very similar to the Jak 1 ones now. I also encounter crashes when attempting to disassemble them though :(. I wouldn't bother too much with my fork at this point, it only made edits to the disassembler to handle the PS3 files. On the PS3 releases the CGO/DGO files were not archived into a single zip-like file like on the ps2 releases. I was mostly trying to make a simple gui wrapper for the disassembler so it was more accessible. I'll see if I can help in identifying the underlying issue causing the crash. At this point I'm not sure if the crashes are caused by the same reason why the PS3 files could not be disassembled. If that's the case, then my fork resolved the issue for |
Initial investigation - Looks like the first file in So either something is not being properly initialized, or judging from this comment Lines 184 to 193 in a3a8987
|
Thanks for making this tool public. I've been trying to make it work for Jak 2 and potentially Jak 3 files but it seems like the headers are different than they are in Jak 1 and I haven't been able to make sense of it yet. Figured I would make an issue in case anyone else was also trying, or had any advice.
Instead of it being a simple 4-byte number for either the number of files in the .CGO or the length of the individual files there are many numbers before the .CGO's name none of which seem to correspond to either (the first 4-bytes seems to be common across all files though). Likewise the file names do not have reserved size but seem to just be whitespace delimited.
I've tried several of these numbers as 4-bytes and 2-bytes but nothing seems to pass through the file properly as it does in the Jak 1 files. Some output comparing the Jak 1 and 2 files.
The text was updated successfully, but these errors were encountered: