I have been researching ARC files from PS3 games such as Nascar, Ferrari TRE and Supercar Challenge.
They use a different compression compared to their X360 counterparts, but I can't figure out what it is.
The ARC header appears to be the same, with ZSIZE and SIZE @0x78
I'm uploading a small sample from Nascar'14 PS3:
NASCAR5_ALLOY0_X.ARC 287 KB
I've tried running the comtype_scan2 but none of the results seem viable.
Algorithms 95, 218 and 219 produce some strings, but I can't tell if they're random or corrupted.
EDIT: I have just tried comtype deflate and it works but so and so.
quickbms doesn't return any errors and the decompressed file has a standard ARC layout with a table at the beginning. However, no mater what file I try the decompressed stream is always 65536 in length, and obviously the file is incomplete.
Any ideas?
My goal is to make an updated "universal" script that will detect the compression type, extract the data and rebuild the file including the ARC header.
Code: Select all
idstring "ARC"
getdstring PLATFORM 1 #C=PC, E=X360, 3=PS3
if PLATFORM == "E"
endian big
elif PLATFORM == "3"
endian big
endif
get NAME basename
goto 0x76
get CTYPE short #0=uncompressed, 1=lzo1x, 3=unknown PS3
endian little #ZSIZE and SIZE are little endian regardless of platform
get ZSIZE long
get SIZE long
savepos OFFSET
log MEMORY_FILE 0 118
log MEMORY_FILE2 0 0
put 0x0 short MEMORY_FILE2
put 0x0 long MEMORY_FILE2
put 0x0 long MEMORY_FILE2
append
log MEMORY_FILE 0 10 MEMORY_FILE2
if CTYPE == 0
print "%NAME%.ARC is not compressed"
CleanExit
elif CTYPE == 1
comtype lzo1x
clog MEMORY_FILE OFFSET ZSIZE SIZE
elif CTYPE == 3
#comtype ...
#clog MEMORY_FILE OFFSET ZSIZE SIZE
else
print "Unknown compression algo %CTYPE% in %NAME%.ARC"
CleanExit
endif
append
get SIZE asize MEMORY_FILE
string NAME += "_decompressed.ARC"
log NAME 0 SIZE MEMORY_FILE
On a sidenote, is it possible to
append variables to a memory file?
I found that using
put VAR long MEMORY_FILE after
log MEMORY_FILE 0 118 writes the long at the very beginning of the memory file. Even if I use it between
append calls.