Page 3 of 6

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Thu Mar 29, 2012 11:18 pm
by Rick
You should take a look at the LZMA SDK, ie in C\LzmaEnc.h.

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Fri Mar 30, 2012 10:14 am
by leroyjenkins
Rick wrote:You should take a look at the LZMA SDK, ie in C\LzmaEnc.h.
Thank you, I've found the correct parameters to encode correctly. It just use the default parameters and level 1 to encode. Thanks again :)

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Fri Mar 30, 2012 11:47 am
by ethanhunt
leroyjenkins wrote:Is SFAR an acronym for SFx ARchive?
Yes sfx archive is only that tool to extract the sfar file.There are more game not need to extract just click and play.

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Sat Mar 31, 2012 3:19 pm
by Scorpick
Rick wrote:You should take a look at the LZMA SDK, ie in C\LzmaEnc.h.
Hello, I successfully used Rick's tool to decompress the sfar file, but I don't know how to compress the output then, because it's a folder and the LZMA SDK can only compress a file.
Any ideas? Thanks.

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Sun Apr 01, 2012 2:04 pm
by leroyjenkins
I'm having problems using the LZMA.Compress to compress data above 16mb. Anybody knows what kind of functions are inside lzma_32(64).dll?

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Mon Apr 02, 2012 12:02 am
by Rick
leroyjenkins wrote:I'm having problems using the LZMA.Compress to compress data above 16mb. Anybody knows what kind of functions are inside lzma_32(64).dll?
If you mean my native DLLs, they're straight up exported LzmaCompress/LzmaUncompress from LzmaLib.c.

Edit: wait, why are you even trying to compress data sizes that large? The default maximum block size is 0x010000 bytes.

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Mon Apr 02, 2012 1:39 am
by leroyjenkins
Rick wrote:wait, why are you even trying to compress data sizes that large? The default maximum block size is 0x010000 bytes.
Yes I know that the max block size is 65536 Bytes. I've found a solution for that problem and I created a "sfar like" packer. It's sfar like because it copy the structure of the sfar file that I learned looking inside the From Ashes DLC sfar file and the code of the unpackSFXArchive. The problem is that the created sfar doesn't work in the game, it always gives me an error when it checks the downloadable content.

Also I don't know how to process the compressed blocks that are bigger than the uncompressed blocks.
i.e. when I compress \DLC_OnlinePassHidCE_ITA.afc

Code: Select all

    blocknum: 298
    block: 65536 B, tlen: 985647 B, filepos: 65536 B, csize 61865 B
    blocknum: 299
    block: 65536 B, tlen: 920111 B, filepos: 131072 B, csize 62495 B
    blocknum: 300
    block: 65536 B, tlen: 854575 B, filepos: 196608 B, csize 61755 B
    blocknum: 301
    block: 65536 B, tlen: 789039 B, filepos: 262144 B, csize 61806 B
    blocknum: 302
    block: 65536 B, tlen: 723503 B, filepos: 327680 B, csize 61536 B
    blocknum: 303
    block: 65536 B, tlen: 657967 B, filepos: 393216 B, csize 56386 B
    blocknum: 304
    block: 65536 B, tlen: 592431 B, filepos: 458752 B, csize 61428 B
    blocknum: 305
    block: 65536 B, tlen: 526895 B, filepos: 524288 B, csize 61383 B
    blocknum: 306
    block: 65536 B, tlen: 461359 B, filepos: 589824 B, csize 62324 B
    blocknum: 307
    block: 65536 B, tlen: 395823 B, filepos: 655360 B, csize 60677 B
    blocknum: 308
    block: 65536 B, tlen: 330287 B, filepos: 720896 B, csize 62094 B
    blocknum: 309
    block: 65536 B, tlen: 264751 B, filepos: 786432 B, csize 61656 B
    blocknum: 310
    block: 65536 B, tlen: 199215 B, filepos: 851968 B, csize 61342 B
    blocknum: 311
    block: 65536 B, tlen: 133679 B, filepos: 917504 B, csize 61237 B
    blocknum: 312
    block: 65536 B, tlen: 68143 B, filepos: 983040 B, csize 62964 B
    blocknum: 313
    block: 65536 B, tlen: 2607 B, filepos: 1048576 B, csize 61497 B
    blocknum: 314
    block: 2607 B, tlen: 0 B, filepos: 1051183 B, csize 2612 B
   Total Uncompressed: 1051183 B, Total Compressed: 985057 B
the last compressed block (2612 Bytes) is larger than the uncompressed block (2607 Bytes), which one should i write into the file? If I leave the compressed block the unpackSFXArchive gives me a InputEOF error:

Code: Select all

error: InputEof
uncompressedSize: 2607, actalUncompressedSize: 2567, compressedSize: 2607, actualCompressedSize 2607

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Tue Apr 03, 2012 1:14 pm
by leroyjenkins
I've almost succeeded to create a sfar packer exe! If I pack the DLC_OnlinePassHidCE (the N7 DLC) it works without problems, but when I repack the "From Ashes" DLC the game freezes after I load a previous game. Notice that the game doesn't warn me anymore when it loads the file! If you want to try I'm posting this link http://www.mediafire.com/?edn4p6okkq24jl9
Any help and advice is useful, thanks :)

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Wed Apr 04, 2012 9:46 am
by leroyjenkins
Anybody knows what's the structure of PCConsoleTOC.bin? I think it's connected to the problem I have because using a hex editor to open it i saw a list of files related to the files inside the dlc.

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Wed Apr 04, 2012 11:14 am
by mnn
leroyjenkins: Modifying PCConsoleTOC.bin shouldn't be necessary to modify/repack Default.sfar.

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Wed Apr 04, 2012 2:05 pm
by Rick
If you change any file sizes you definitely need to update PCConsoleTOC.bin, as sizes are listed there, if the size is wrong the game will fail to load the file properly.

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Wed Apr 04, 2012 3:47 pm
by mnn
Rick: Well, I'm not updating PCConsoleTOC.bin, but I am modifying a file within SFAR file (thus different filesize), and the game works as it should.

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Wed Apr 04, 2012 3:57 pm
by leroyjenkins
The odd thing that happens to me is if I unpack/repack the N7 DLC (about 56mb, no videos inside) the game works, but if I do the same thing on the From Ashes the game crashes after I load a savegame... Maybe it's only me, that's why I ask you, if you have tried my repacker does it the same trick to you?

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Wed Apr 04, 2012 7:03 pm
by Scorpick
I tried to unpack/repack DLCs.
DLC_OnlinePassHidCE works fine.
DLC_HEN_PR doesn't work. The game crashes during downloadable content check.

I noticed that after unpack/repack the size of sfar file is different, maybe there is a problem.
I can't help you in this because I am no programmer.
But why the other DLC works? Have you tried it in multiplayer?

Re: [PC] Mass Effect 3 DLC (sfar)

Posted: Wed Apr 04, 2012 9:50 pm
by ballsofsteel
How can I update/edit PCConsoleTOC.bin? With hex editor?