This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import struct | |
import os | |
def ReadEntry(): | |
filename = str(fd.read(0x20)).strip('\x00') | |
offset = struct.unpack('>Q', fd.read(8))[0] | |
entrySize = struct.unpack('>Q', fd.read(8))[0] | |
fd.seek(0x10, 1) # unk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Looks like the internet is completely empty now on all the data about PS3 big-endian coalesced BIN files. For example: | |
the popular ME3Explorer tool expect completely different structure. Another example provides of exporting and importing files with AutoIt3 script by swuforce. AutoIt? Really... | |
Therefore given example of SHGAME\COOKEDPS3\COALESCED_INT.BIN gives this structure: | |
BIG-ENDIAN | |
uint fileCount | |
sint abs(fileNameSize*2) | |
wchar fileName[abs(fileNameSize)] //includes null terminator. fileNameSize corresponds to real bytes rather than wchar count. Therefore "game" in wchar/unicode is actually 8 bytes | |
uint fileSize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import struct | |
_5d4 = [4,5,9,12,13,14,15,21,22,23,24,26, 29,32,33,34,35,36,39,40,50,53,55,61,62,63,64,65,66,67,68,69,70, 71,72,73,75,78,82,83,85,86,87,88,89,90,91,94,96,97,98,99,100,105, 106,121,122,123,124,125,126,127,135,138,141,144,145,148,149,150,151,158,160] | |
_5d8 = [0,1,2,3,6,7,10,11,17,18,25,27,28,38,41,42,43,47,49,57,58,59,60,74,76,77,80,81,84,93,95,101,102,103,104,109,110,111,112,113,114,115,116,117,118,119,120,128,129,130,131,132,133,134,139,140,143,146,152,153,154,155,156,159,161,162] | |
fd = open(sys.argv[1], 'rb') | |
stageid = int(sys.argv[1][5:8]) | |
if stageid in _5d4: | |
fd.seek(0x5d4, 0) |