Talk:PAT0 (File Format)
@Wiimm, I'm not sure about 6 sections here. I know that's the only way that our system works, but from what I've seen, the item at address 0x20 into the file is a length, and at 0x24 always seems to be 0. Only the first two pointers actually seem to be sections (though the next two also sort of work sometimes).
Chadderz 15:26, 28 June 2011 (CEST)
Some Statistics
Group Offsets
The are the values of the 6 group/section offsets taken from 5828 PAT0 files:
count grp #0 grp #1 grp #2 grp #3 grp #4 grp #5 ----------------------------------------------------------------- 4444 3c 70 74 74 78 0 108 3c 88 90 90 98 0 60 3c 90 98 98 a0 0 15 3c 90 9c 9c a8 0 41 3c 98 a4 a4 b0 0 36 3c 98 a8 a8 b8 0 74 3c a0 a8 a8 b0 0 709 3c a0 ac ac b8 0 1 3c a0 b0 b0 c0 0 5 3c a8 b4 b4 c0 0 32 3c a8 b8 b8 c8 0 8 3c a8 bc bc d0 0 6 3c b0 c0 c0 d0 0 2 3c b0 cc cc e8 0 1 3c b8 c4 c4 d0 0 6 3c b8 c8 c8 d8 0 1 3c b8 cc cc e0 0 9 3c b8 d8 d8 f8 0 27 3c c0 cc cc d8 0 4 3c c0 d0 d0 e0 0 9 3c c0 d4 d4 e8 0 1 3c c0 d8 d8 f0 0 14 3c c0 e0 e0 100 0 1 3c c8 d8 d8 e8 0 1 3c c8 dc dc f0 0 1 3c d0 dc dc e8 0 3 3c d0 e0 e0 f0 0 1 3c d0 e4 e4 f8 0 2 3c d0 f4 f4 118 0 88 3c d8 e8 e8 f8 0 24 3c d8 ec ec 100 0 2 3c d8 108 108 138 0 1 3c e0 ec ec f8 0 8 3c e0 f0 f0 100 0 72 3c f4 104 104 114 0 2 3c f4 10c 10c 124 0 2 3c f8 10c 10c 120 0 1 3c 108 11c 11c 130 0 2 3c 108 120 120 138 0 2 3c 134 150 150 16c 0 2 3c 16c 19c 19c 1cc 0 -----------------------------------------------------------------
- Group #0 starts always at offset 0x3c
- Group #2 and #3 point always to the same data.
- Group #5 is never used.
Wiimm 12:31, 29 June 2011 (CEST)
- It does look a bit like there are 4 sections; #0,#1,#2,#4. That doesn't make much sense though, because certainly from what I know of the format, only #0 and #1 are used. Maybe it's cross game compatibility.
- Chadderz 23:15, 29 June 2011 (CEST)
- Group #4 is always empty because it points always to the end of the file.
- Wiimm 16:14, 30 June 2011 (CEST)
Different PAT0 format
Today I have analysed PAT0 again and I think, section 0 is total different from the description. I will goon with the analysis in the next days and will then write down my results. But I will ask, if anyone can confirm or disagree the current description.
-- Wiimm (talk) 00:36, 9 April 2015 (UTC)
- I disagree with the current description also. Just looking at my unfinished PAT0 editor for CTools, I seem to parse a BRRES Index Group at section #0 offset. This then points to entries which match the format described in the section 0 section on the page. I then parse the rest of the file by looking at NSTR and reading that many values from section 1 and section 3. A comment in my code says "Something is wrong with these; misinformation?" so obviously I found a problem when I wrote it. I resolve section 1 values to strings, but I don't do anything further with section 3 values. I ignore section 2.
- Chadderz (talk) 05:37, 9 April 2015 (UTC)