BCSAR: Difference between revisions
No edit summary |
|||
Line 87: | Line 87: | ||
==== Header ==== | ==== Header ==== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 104: | Line 103: | ||
| 0x8 | | 0x8 | ||
| 0x4 | | 0x4 | ||
| | | String table type magic (always 0x2400) | ||
|- | |- | ||
| 0xC | | 0xC | ||
| 0x4 | | 0x4 | ||
| | | This + 8 points to the string table (always 0x10) | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
| 0x4 | | 0x4 | ||
| | | String table lookup type magic (always 0x2401) | ||
|- | |- | ||
| 0x14 | | 0x14 | ||
| 0x4 | | 0x4 | ||
| This + 8 points to | | This + 8 points to the string lookup table | ||
|- | |- | ||
| 0x18 | | 0x18 | ||
| 0x4 | | 0x4 | ||
| | | Filename count | ||
|- | |||
| 0x1C | |||
| 0xC * count | |||
| String offset table | |||
|- | |- | ||
|} | |} | ||
==== | ==== String offset table entry ==== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 134: | Line 137: | ||
| 0x0 | | 0x0 | ||
| 0x4 | | 0x4 | ||
| Type of the node | | Type of the node (should be 0x1F01) | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
| 0x4 | | 0x4 | ||
| Offset to | | Offset to data from the end of the STRG header (sizeof 0x18) | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
| 0x4 | | 0x4 | ||
| Length of | | Length of the data buffer (includes NUL terminator) | ||
|- | |- | ||
|} | |} | ||
Then every filename is rawly setted. You can set up a dictionary that contains, using a simple counter, the size of every filename in order. Then, using the same type of counter, get the values of the size of the filename in a correct order. | |||
===== | ==== String lookup table ==== | ||
===== | ===== Header ===== | ||
* | {| class="wikitable" border="1" | ||
|- | |||
! OFFSET | |||
! SIZE | |||
! DESCRIPTION | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| Index of the root entry | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| Entry count | |||
|- | |||
| 0x8 | |||
| 0x14 * count | |||
| Lookup entry | |||
|- | |||
|} | |||
===== Entry ===== | |||
{| class="wikitable" border="1" | |||
|- | |||
! OFFSET | |||
! SIZE | |||
! DESCRIPTION | |||
|- | |||
| 0x0 | |||
| 0x2 | |||
| Is 1 if contains data | |||
|- | |||
| 0x2 | |||
| 0x2 | |||
| Unknown | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| Next index? (-1 if invalid) | |||
|- | |||
| 0x8 | |||
| 0x4 | |||
| Data index? (-1 if invalid) | |||
|- | |||
| 0xC | |||
| 0x8 | |||
| Unknown data, -1 if contains no data | |||
|- | |||
|} | |||
=== INFO === | === INFO === | ||
Line 178: | Line 224: | ||
| 0x4 | | 0x4 | ||
| Length of INFO partition (also in CSAR header) | | Length of INFO partition (also in CSAR header) | ||
|- | |||
| 0x8 | |||
| 0x4 | |||
| Unknown magic 0x2100 | |||
|- | |||
| 0xC | |||
| 0x4 | |||
| This + 8 points to unknown | |||
|- | |||
| 0x10 | |||
| 0x4 | |||
| Unknown magic 0x2104 | |||
|- | |||
| 0x14 | |||
| 0x4 | |||
| This + 8 points to unknown | |||
|- | |||
| 0x18 | |||
| 0x4 | |||
| Unknown magic 0x2101 | |||
|- | |||
| 0x1C | |||
| 0x4 | |||
| This + 8 points to unknown | |||
|- | |||
| 0x20 | |||
| 0x4 | |||
| Unknown magic 0x2103 | |||
|- | |||
| 0x24 | |||
| 0x4 | |||
| This + 8 points to unknown | |||
|- | |||
| 0x28 | |||
| 0x4 | |||
| Unknown magic 0x2105 | |||
|- | |||
| 0x2C | |||
| 0x4 | |||
| This + 8 points to unknown | |||
|- | |||
| 0x30 | |||
| 0x4 | |||
| Unknown magic 0x2102 | |||
|- | |||
| 0x34 | |||
| 0x4 | |||
| This + 8 points to unknown | |||
|- | |||
| 0x38 | |||
| 0x4 | |||
| Unknown magic 0x2106 | |||
|- | |||
| 0x3C | |||
| 0x4 | |||
| This + 8 points to unknown | |||
|- | |||
| 0x40 | |||
| 0x4 | |||
| Unknown magic 0x220B | |||
|- | |||
| 0x44 | |||
| 0x4 | |||
| This + 8 points to unknown | |||
|- | |- | ||
|} | |} |