Page 28 of 31
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Wed Jan 27, 2016 5:09 am
by rajasrijan
michalss wrote:rajasrijan wrote:Hi all
I'm trying to create packer for TR, this is what i'm doing.
Unpacking:
1) Read the SFAT header, get entries pointing to DRM.
2) Read the DRM header, get pointers to CDRM.
3) Extract CDRM
Packing:
1) Create new bigfile.004.tiger, increment file count in SFAT header .
2) Read content from disk, zip it if needed.
3) Store it in new bigfile at the end.
3) Modify the offset in DRM header.
This is working for textures (didn't test on meshes). I tried replacing textures in game start menu and its working.
I'm stuck at finding all the CDRM entries, as there are a lot of CDRM entries which cannot be reached from headers.
Anyone figure out this problem?
I'll put code in github when i have a working not crashing code

or by sat
Nice, i was working on same thing, i have completed working repacker... problem is that it will repack only files not contains any CDRM...
Can you please share your code ? Privately ?
Sure.
I'm little busy now

. Ill send you ASAP.
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Sun Feb 14, 2016 7:41 am
by rajasrijan
Repacker code uploaded on github
https://github.com/rajasrijan/TRExplorer.
Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.
Please backup game before using tool.
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Sun Feb 14, 2016 9:54 am
by michalss
rajasrijan wrote:Repacker code uploaded on github
https://github.com/rajasrijan/TRExplorer.
Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.
Please backup game before using tool.
Thx, but is this for 2016 or 2013 ?
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Sun Feb 14, 2016 10:49 am
by rajasrijan
michalss wrote:rajasrijan wrote:Repacker code uploaded on github
https://github.com/rajasrijan/TRExplorer.
Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.
Please backup game before using tool.
Thx, but is this for 2016 or 2013 ?
It's 2013. I don't have 2016 yet.

But format should be similar. I dought they will completely reinvent format.
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Sun Feb 14, 2016 2:05 pm
by Gh0stBlade
Repacking Tiger files should be easy if you can unpack them. What exactly is the issue?
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Sun Feb 14, 2016 2:25 pm
by rajasrijan
Gh0stBlade wrote:Repacking Tiger files should be easy if you can unpack them. What exactly is the issue?
Complete format is not known.
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Sun Feb 14, 2016 3:02 pm
by Gh0stBlade
rajasrijan wrote:Gh0stBlade wrote:Repacking Tiger files should be easy if you can unpack them. What exactly is the issue?
Complete format is not known.
Which parts are unknown? To my knowledge the entire tiger format is known. Entire CDRM format is known. DRM should be fully known except parts of the duplicated section data at the EOF (I should check that actually).
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Sun Feb 14, 2016 3:27 pm
by rajasrijan
Gh0stBlade wrote:rajasrijan wrote:Gh0stBlade wrote:Repacking Tiger files should be easy if you can unpack them. What exactly is the issue?
Complete format is not known.
Which parts are unknown? To my knowledge the entire tiger format is known. Entire CDRM format is known. DRM should be fully known except parts of the duplicated section data at the EOF (I should check that actually).
Can you point me to the format

. I dont have the complete DRM format and there are some some CDRMs not reachable from the table at the begenning, those CDRMs are hard to replace.
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Mon Feb 15, 2016 1:07 pm
by shadowlonely1989
rajasrijan wrote:Repacker code uploaded on github
https://github.com/rajasrijan/TRExplorer.
Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.
Please backup game before using tool.
Thanks for your tool! How to use this tool?
I use this command:
TRExplorer bigfile_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
Not working!
F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>TRExplorer big
file_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
rajasrijan's tiger decoder.
Tiger Header
Magic :53464154
Version :3
Parts :1
DRMs :8618
Base Path :pc-w
Loading data entries...success
Invalid operation.
F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>pause
Press any key to continue . . .
Terminate batch job (Y/N)?
Thanks!
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Mon Feb 15, 2016 1:56 pm
by rajasrijan
shadowlonely1989 wrote:rajasrijan wrote:Repacker code uploaded on github
https://github.com/rajasrijan/TRExplorer.
Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.
Please backup game before using tool.
Thanks for your tool! How to use this tool?
I use this command:
TRExplorer bigfile_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
Not working!
F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>TRExplorer big
file_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
rajasrijan's tiger decoder.
Tiger Header
Magic :53464154
Version :3
Parts :1
DRMs :8618
Base Path :pc-w
Loading data entries...success
Invalid operation.
F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>pause
Press any key to continue . . .
Terminate batch job (Y/N)?
Thanks!
Try with small letters "unpack". Ill put a fix when I get home
P.S. Updated readme
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Mon Feb 15, 2016 2:04 pm
by Gh0stBlade
rajasrijan wrote:
Can you point me to the format

. I dont have the complete DRM format and there are some some CDRMs not reachable from the table at the begenning, those CDRMs are hard to replace.
The DRM format is very close to Tomb Raider Underworld's contains the exact same components except the duplicated DRM Section info at the end of the DRM which is new. The only unknown field is the last 32-bit unsigned integer of the second DRM Section info, everything else is known. The value itself could be related to struct relocation or memory mapping.
I checked the code for your tool. I think the offset calculation is wrong. Also the game needs all hashes to be ordered in ascending order or it will crash.
Regards.
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Mon Feb 15, 2016 2:09 pm
by shadowlonely1989
rajasrijan wrote:shadowlonely1989 wrote:rajasrijan wrote:Repacker code uploaded on github
https://github.com/rajasrijan/TRExplorer.
Unpacker is working correctly but there a lot of bugs in packer. Feel free to have a look. Ill put binary when its stable enough.
Please backup game before using tool.
Thanks for your tool! How to use this tool?
I use this command:
TRExplorer bigfile_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
Not working!
F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>TRExplorer big
file_ENGLISH.000.tiger UNPACK patch_ENGLISH.000.tiger
rajasrijan's tiger decoder.
Tiger Header
Magic :53464154
Version :3
Parts :1
DRMs :8618
Base Path :pc-w
Loading data entries...success
Invalid operation.
F:\Program Files (x86)\Eidos Interactive\Tomb Raider GOTY Edition>pause
Press any key to continue . . .
Terminate batch job (Y/N)?
Thanks!
Try with small letters "unpack". Ill put a fix when I get home

Thanks! How to unpack text from bigfile_ENGLISH.000.tiger pc-w\local\locals.bin?
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Mon Feb 15, 2016 2:25 pm
by rajasrijan
Gh0stBlade wrote:rajasrijan wrote:
Can you point me to the format

. I dont have the complete DRM format and there are some some CDRMs not reachable from the table at the begenning, those CDRMs are hard to replace.
The DRM format is very close to Tomb Raider Underworld's contains the exact same components except the duplicated DRM Section info at the end of the DRM which is new. The only unknown field is the last 32-bit unsigned integer of the second DRM Section info, everything else is known. The value itself could be related to struct relocation or memory mapping.
I checked the code for your tool. I think the offset calculation is wrong. Also the game needs all hashes to be ordered in ascending order or it will crash.
Regards.
This was working with the vanilla game, without any updates, now its not. I thought there was more CDRM sections needed in new file to stop the crash(they seem to be loading 0x8000 bytes at ones and doing some switch case logic. So I thought more sections, still learning

).I fixed one offset calculation in NEXT section, I hope that's the one you're talking about.
You mean the hashes in the tiger header right?
If ascending order is needed then complete file repack will be required or a binary patch if its a simple security check. What do you think?
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Mon Feb 15, 2016 2:41 pm
by Gh0stBlade
rajasrijan wrote:
So I thought more sections, still learning

).I fixed one offset calculation in NEXT section, I hope that's the one you're talking about.
I mean the direct offset for both tiger->drm and drm->cdrm is wrong. (Try it on patch.000.tiger it's very likely your tool will crash)
rajasrijan wrote:
This was working with the vanilla game, without any updates, now its not.
Save yourself the trouble and work with the patched version of the game. By doing so, you can simply modify the patch.*.tiger file which is much smaller. Adding new DRM files to those means they are loaded instead of the ones in the original Bigfile.
rajasrijan wrote:
I thought there was more CDRM sections needed in new file to stop the crash(they seem to be loading 0x8000 bytes at ones and doing some switch case logic.
I'm not sure what you mean by this, could you explain it further please? If i recall correctly, CDRM files are not always compressed. That is very important, take a look at my tools here:
https://github.com/Gh0stblade/cdcEngineTools those are for TR8 though.
rajasrijan wrote:
You mean the hashes in the tiger header right?
If ascending order is needed then complete file repack will be required or a binary patch if its a simple security check. What do you think?
Yep, hashes in the tiger header must be sorted by ascending order or the engine will crash. I wrote an injector years ago and couldn't figure out why I kept getting crashes, turns out that was the problem. If you just work with the patch files then repacking will be much easier. From a technical perspective you shouldn't be altering the Bigfile.000.tiger since effectively, if you alter a file in there which has been patched in patch.000.tiger it will have no effect.
Regards.
Re: Tomb Raider (2013) (PC) (PS3) (XBOX) (*.tiger)
Posted: Sun Feb 21, 2016 6:25 am
by rajasrijan
Hi,
Save yourself the trouble and work with the patched version of the game. By doing so, you can simply modify the patch.*.tiger file which is much smaller. Adding new DRM files to those means they are loaded instead of the ones in the original Bigfile.
Patch files seem to contain a lot of RDEF files. Any idea what those are?
I mean the direct offset for both tiger->drm and drm->cdrm is wrong. (Try it on patch.000.tiger it's very likely your tool will crash)
fixed. now it should work with all files
regards