Oh, that's an interesting way to look at it. It was kind of odd that the first integer for each entry was pretty much increasing linearly, while there was a whole bunch of null bytes everywhere in the data portion. I guess the data is rather spread out, seeing how I compressed the archive to 15% original size.
I wonder if a lot of PS2 games are bloated this way lol
I guess the number of files is determined by (first offset * 0x800) / 64, which should be fine since the entries appear to be listed sequentially anyways. Even if there are less files than that, at least I'm not MISSING files.
Code: Select all
#D.Gray-Man PS2 Unpack
# get number of files
# assumes the first entry is the first file stored in the archive
get FILES long
math FILES *= 0x800
math FILES /= 64
# parse entries
goto 0
for i = 0 < FILES
get OFFSET long
get SIZE long
getdstring NAME 56
math OFFSET *= 0x800
log NAME OFFSET SIZE
next i
This version assumes there are ALWAYS null bytes after the last entry. That means the offset I read will be 0, which is impossible for a valid data file.
Code: Select all
#D.Gray-Man PS2 Unpack
# just keep parsing
for i = i
get OFFSET long
if OFFSET == 0
cleanexit
endif
get SIZE long
getdstring NAME 56
math OFFSET *= 0x800
log NAME OFFSET SIZE
next i
Now to figure out the TIPS image format(s), which don't look TOO bad except the fact that a single TIPS file may contain dozens of images (I guess it's like storing a series of images to form an animation)