(DAT/CSPACK): support version 1. #477
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for early CatSystem archive version
CsPack1inArcDAT.cs.Changes
"CsPack". Version is then calculated/validated from the byte at offset 6:'1'or'2'(Signatureproperty remains unchanged).12or24bytes.0is now explicitly allowed (as it's supported and has been observed in CatSystem releases).CsNameDecryptorrequires an additional argument:extension_pos. This replaces usage of0x10for extension check (which is specific to theCsPack2version).About CsPack1 and version differences
Research is based off early CatSystem trial games: Purupuru Magic and Remel
CsPack1archives never use.datextensions, and instead use extensions that reflect the contents of the archive. It's safer to say its extension is a wildcard:*(whileCsPack2still always uses.datextension).CsPackarchives may contain 0 entries, as observed with Cradle Song trial/cs_vl.dat.CsPack1andCsPack2archive versions are identical with exception to entry size and name decoding constants.CsPack1uses an8.3filename.CsPack2uses a (very broken)16.3(/26.0) filename.CsPack1filename decoding is broken in newer engines supportingCsPack2(so it cannot be reliably confirmed from them)