xdanieldzd / Scarlet

Game data conversion/export/import helper libraries - UNMAINTAINED
Other
97 stars 22 forks source link

Add Dreamcast PAC image format, GDPA64BY container format, and fix two bugs #15

Open darkstar opened 6 years ago

darkstar commented 6 years ago

The PAC format is kinda historic, I only know of two games that use it. The (rather simple) GDPA64BY container is (as far as I know) only used in .dat files in the PS3 game Oreimo.

The first fixed bug is related to PSSG files where more complex files would misinterpret data nodes as non-data, which would throw off the reader.

The second bug is related to P5bustupBIN, which incorrectly detects some files from Disgaea3 (PS3) as P5 bin archives. The detection still is not solid (I just kinda assumed that each file is >0 bytes in those containers) but it works a bit better now.

In my opinion, the format detection function should be run with an AND, not with an OR, when combined with the other attributes... I.e. if no FilenamePattern matches, then ignore the file, even if the FormatDetection identifies a positive match. See my recent comment on issue #14 .

darkstar commented 6 years ago

Do you have any repo where I can upload some sample files, for e.g. UnitTests?

xdanieldzd commented 6 years ago

There's no repo for sample files, although it would be a good idea to have one. I only have some unorganized directories of files locally, almost none of which are immediately useful for ex. unit tests. There's one with around 50 Vita GXT files - most of which in some way used to cause problems with Scarlet, or were otherwise interesting - which might be somewhat useful in this regard.

I'll have a closer look at the actual PR later today or over the weekend.

darkstar commented 6 years ago

Rebased onto current master and fixed the exception that gets thrown in case of an invalid element index in the GPDA container format.