Hello guys, well I come here to ask for small help about this game, really I have a script and unpack some files, but when try unpack other files I got this small issue, maybe somebody can take a look into files?
# Main header IDString "GFAC" Get HEADER_1_1 long Get HEADER_1_2 long If HEADER_1_1 != 1 Print "Strange HEADER_1_1 = %HEADER_1_1%, may crash..." EndIf If HEADER_1_2 != 1 Print "Strange HEADER_1_2 = %HEADER_1_2%, may crash..." EndIf Get FILE_TABLE_OFFSET long Get FILE_TABLE_SIZE long Get DATA_OFFSET long Get DATA_SIZE long
# Read compressed data header GoTo DATA_OFFSET
IDString "GFCP" Get HEADER_1_1 long Get CTYPE long If HEADER_1_1 != 1 Print "Strange GFCP HEADER_1_1 = %HEADER_1_1%, may crash..." EndIf If CTYPE == 1 ComType bpe ElseIf CTYPE == 2 ComType lz77wii_raw30 Else Print "Unknown compression %CTYPE%" Exit EndIf
Get RAW_DATA_SIZE long Get COMPRESSED_DATA_SIZE long
Set CDATA_OFFSET DATA_OFFSET Math CDATA_OFFSET + 0x14
The good news is that it's not a problem of quickbms. The bad news is that I don't know how to decompress these chunks.
In fact most of the files use an unique compressed file-system and the script works, but other files don't. Take the file BOSS07_BULLET04.gfa, the compressed file-system starts from offset 0x94 but from offset 0x181c it's no longer compressed, in fact with bpe you can decompress the first 0x1788 bytes without problems. I thought it was chunked data but that's not possible because there are no chunk_sizes in the archive.