Okay, it's double-post time.
What I can gather out of these DUMMY2(10-bit type) values are the following:
Code: Select all
0x00 value = FILES.DAT
0x08(08) value = FILES01.DAT
0x10(16) value = FILES02.DAT
0x18(24) value = FILES03.DAT
0x20(32) value = FILES04.DAT
Now divide these DUMMY2 values by 8. You can see that DUMMY2 is actually FILES_NUM.
Do be careful when there are DUMMY2/FILES_NUM values that end up greater than 4. In any case...
Code: Select all
if FILES_NUM != LAST_FILES_NUM
math LAST_FILES_NUM = FILES_NUM
if FILES_NUM == 0
string ARCHIVE_NAME p "files.dat"
elif FILES_NUM > 4
break
else
string ARCHIVE_NAME p "files%02d.dat" FILES_NUM
endif
open FDSE ARCHIVE_NAME 1
endif
Another thing I should mention is that there is an OFFSET field. It references the offset of the files based on each part of the archive files and treating them as the located offsets in these individual archives rather than treating said archives as one and having the offset fields being referenced as being the one and only archive file.
Let's take this .mss file, for example:
Code: Select all
.
. 0000000000000039
. 0000000000030dbc get DUMMY1 0x0000000000000048 4
. 0000000000030dc0 getbits NAME_OFF 0x0000000000005fe2 20
. 0000000000030dc3 getbits FILES_NUM 0x0000000000000018 10
. 0000000000030dc4 get OFFSET 0x0000000015eee000 4
. 00000000 putarr FILES_NUM 0x0000000000000003 0:57
. 0000000000005fe2 get NAME "extra_isa2_3925.mss" -1
An .mss file has an "MCSS" sign, followed by header information.
If we ever want to look out for that .mss file, then we need to look for the archive file that references the FILES_NUM part(FILES03.DAT) and then look out for the offset of that .mss file. The thing is, there is already an referenced offset for that, so by going to that offset in FILES03.DAT we already know where that .mss file is located. See where I'm going with this?
Here's an attached script which was based on your(aluigi) own work-in-progress script, and a -V -0 report for further reference.