I was bored, so I did a litle investigating.
data.ttarch is an uncompressed archive of thousands of smaller files, ranging in size from 48 bytes to just over 4 megabytes. I don't know how to make sense of any of the files inside, but I know how to extract them.
The format inside is:
A DWORD giving the number of "paths"
(they seem to be subfolders of some sort, eg ".\textures" or ".\animations", but don't seem to correspond
to anything in the Boneville folder. I think they might correspond to different types of file in the archive)
The paths follow straight after. They consist of a DWORD for the path length, followed by a STRING
of that length containing the path.
Then there is a DWORD giving the number of files in the archive.
The file info follows straight after. I think they're listed in alphabetical order.
It consists of:
A DWORD for the filename length, followed by a STRING of that length containing the filename
A DWORD which is always zero
A DWORD containing the file's offset in the archive data
A DWORD containing the file's length
Then there is a DWORD for the offset of the beginning of the archive data in the file
Then there is a DWORD for the length of the archive data
The archive data follows straight after.Sorry if that's hard to follow :)
This FreeBASIC (
http://www.freebasic.net) program will extract the files into c:\bonedata.
I've preset the archive data offset to 0x3111D in the program, but you might want to run it through once without extracting the files, to make sure that your copy of data.ttarch has the same value.
option explicit
dim numpaths as long
dim pathlength as long, path as string
dim numfiles as long
dim filenamelength as long, filename as string
dim zero as long, filelength as long, fileoffset as long
dim filedata() as byte
dim dataoffset as long
dim datalength as long
dim seek1 as long
dim i as long
dim extractfiles as string * 1
'presetting dataoffset:
dataoffset = &h0003111d
input "Extract files? ", extractfiles
extractfiles = lcase$(extractfiles)
if extractfiles = "y" then shell "md c:\bonedata"
open "C:\Program Files\Out from Boneville\Pack\data.ttarch" for binary access read as #1
get #1, 1, numpaths
print "Number of paths:"; numpaths
for i = 1 to numpaths
get #1, , pathlength
path = space$(pathlength)
get #1, , path
print path
next i
get #1, , numfiles
print
print "Number of files:"; numfiles
for i = 1 to numfiles
get #1, , filenamelength
filename = space$(filenamelength)
get #1, , filename: print filename
get #1, , zero: print right$("00000000" + hex$(zero), 8),
get #1, , fileoffset: print right$("00000000" + hex$(fileoffset), 8),
get #1, , filelength: print right$("00000000" + hex$(filelength), 8)
seek1 = seek(1)
if extractfiles = "y" then
open "c:\bonedata\" + filename for binary access write as #2
redim filedata(0 to filelength - 1)
get #1, dataoffset + fileoffset + 1, filedata()
put #2, 1, filedata()
close #2
end if
seek #1, seek1
next i
get #1, , dataoffset
get #1, , datalength
print
print "data offset: "; right$("00000000" + hex$(dataoffset), 8)
print "data length: "; right$("00000000" + hex$(datalength), 8)
close
sleep