Anonymous

Changes

From Final Fantasy Inside

FF7/LGP format

124 bytes added, 06:53, 27 August 2022
Section 2: Section formerly designated as "CRC Code"
|}
==== Section 2: Section formerly designated as "CRC Code " ====
This code is used to validate the LGP archive. The bad news is I have no idea how to make it (I've figured out how to decode it, ie. find out whether the archive section is valid, but I can't create my own)3600 bytes. The good news It is you don't need to! The only thing this CRC is based on is the number 30 sets of files in the archive 30 entries containing two 16-bit words each (maybe the filenames too, haven't checked that30 x 30 x 2 x 2 = 3600). Anyway, the TOC is the only thing this check relates to. So if you're replicating an archive from FF7 for use in the game with the same number of files and filenames you can just copy the CRC section from an existing file.
Normally itThe sets contain file-group information which is based on the first two letters of each file name. The first letter, minus the value for ascii 'a's 3602 bytes long (one archive may be different0x61) is the index of the set to which the file belongs. The second letter, possibly MAGIC.LGPminus the value for ascii ' ' ' (0x60)is the index of the entry within the set. Anyway, one normally-safe way Since the second letter in all of calculating the CRC size file names is to find ascii 'a' or greater, it means that the end of lowest entry index is 1, so the TOC and first entry (at index 0) in every group is always zero (0x0000). Each entry is two words. The first word is the beginning 1-based index of the directory entry for the first filein the set. Anything  The second word is the number of files in between is probably CRC code the set, most of which are 0x003c (60). There are a few entries after the bulk which have fewer entries. The meaning of these sets and why they're divided in this manner is not guaranteed yet to workbe determined. It works  There is one 16-bit word with "official" archives but editors - such as [http://www.ficedula.com/ LGP Editor] - can alter the TOC value of 0 (0x0000) at the end of this data which may belong to achieve extra things)this section or the next.
==== Section 3: Actual Data ====
10
edits