This section needs a lot of research.
Research on how the header works and how the file interacts is needed.
Format
We found BIN files sharing the same file length (USA/NTSC version):
- 432 - 198 files
- 864 - 10 files
- 7840 - 209 files
Then we found 150 different files length with less than 10 occurencies.
BIN files GCD is equal to 4.
Header
Magic number "STIH" point to HITS files (big endian) :
- gets.pzz -> 008, 009, 010
- stxx.pzz -> 001, 002, 003
- hitxxx.bin -> (all 54 files)
- Header: (0x8 bytes)
- 4 bytes - STIH
- 4 bytes - file_length - total length of the file
- Section 0: (0x20 octets)
- 4 bytes [2] - Unknown - not an offset, maybe a length (500 ?)
- 4 bytes [2] - Unknown - not an offset, maybe a length (42 ?)
- 4 bytes [2] - signed int (-11000 ?)
- 4 bytes - Unknown (32 ?)
- 4 bytes - offset data block 2 - end of data block 1 - relative to header end address (8)
- Relocations table
- 4 bytes [3528]
- All addresses are relative to header end address (8) and point to Data Block 1.
- Data block 1
- Contains small structures (4 - 8 - 12 ... bytes) with offsets of Data Block 2 - adresses are relatives to start of Data block 2. Every offsets series are ended with FF FF FF FF (-1). We check this easily and rigourously using a script on all DB1 values showing that the max value found (except FF FF FF FF = -1) added to the Data block 2 point just before the end of the Data block 2. Some of the entries are empty (-1), so we deduce that all of the Data block 1 structures correspond to something existing (Model? And so on.).
- Data block 2
- We notice use of the CC CC CC CC value which is unusual. It's probably used to avoid the FF FF FF FF use in all the block and tell the end of something (end of structure? end of datas?).