NfS Shift .BFF files

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
dijotp
n00b
Posts: 10
Joined: Sat Jun 20, 2009 2:47 pm
Has thanked: 4 times

NfS Shift .BFF files

Post by dijotp » Wed Sep 16, 2009 6:49 pm

Hi.
Anybody know how to extract these .BFF files?

Samples: http://66.7.218.134/~usaportu/pub/BFFs.rar

demolos
advanced
Posts: 65
Joined: Mon Mar 12, 2007 3:38 pm
Has thanked: 5 times
Been thanked: 4 times

Re: NfS Shift .BFF files

Post by demolos » Fri Sep 18, 2009 4:30 pm

this game use zlib compression i looking into shift.exe with hexadecimal and i found zlib:

Error decompressing asset (zlib inflate): %s in pakfile %s

also i suppose the bff archives contain xml files
you can try to use Jaeder Naub to scan and rip the files inside bff archives

User avatar
aluigi
VVIP member
VVIP member
Posts: 1917
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 650 times
Contact:

Re: NfS Shift .BFF files

Post by aluigi » Fri Sep 18, 2009 7:10 pm

no, it's not zlib.
the most probable hypothesis it's that it uses chunks of 0x800 bytes compressed with a lzx-like algorithm.
this is the max I can say without the game.

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Re: NfS Shift .BFF files

Post by Savage » Sat Sep 19, 2009 9:54 am

Image

User avatar
aluigi
VVIP member
VVIP member
Posts: 1917
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 650 times
Contact:

Re: NfS Shift .BFF files

Post by aluigi » Sat Sep 19, 2009 12:16 pm

I have started to work on it this morning.
I have already figured almost all the fields included the rc4 encryption used in some bffs.
the compression algorithm should be called XMemDecompress and I guess it's referred to a cross-platform xbox function.
I will keep you update if there are news

dijotp
n00b
Posts: 10
Joined: Sat Jun 20, 2009 2:47 pm
Has thanked: 4 times

Re: NfS Shift .BFF files

Post by dijotp » Sat Sep 19, 2009 12:49 pm

Thank you Bugtest, you rock. :keke:

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Re: NfS Shift .BFF files

Post by Savage » Sat Sep 19, 2009 1:25 pm

I found some info about Xmemcompress http://forums.gtamodding.ru/index.php?showtopic=10
Image

User avatar
aluigi
VVIP member
VVIP member
Posts: 1917
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 650 times
Contact:

Re: NfS Shift .BFF files

Post by aluigi » Sat Sep 19, 2009 2:13 pm

good news, I did it :)
so stay tuned for a new version of QuickBMS and the needed script when all the tests will be finished completely

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Re: NfS Shift .BFF files

Post by Savage » Sat Sep 19, 2009 3:31 pm

:eek:
Image

User avatar
aluigi
VVIP member
VVIP member
Posts: 1917
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 650 times
Contact:

Re: NfS Shift .BFF files

Post by aluigi » Sat Sep 19, 2009 9:54 pm

new version of quickbms: http://aluigi.org/papers.htm#quickbms
and the needed script for Need for Speed Shift: http://aluigi.org/papers/bms/nfsshift.bms

User avatar
japamd
advanced
Posts: 41
Joined: Sat Sep 19, 2009 10:26 pm
Has thanked: 3 times
Been thanked: 8 times

Re: NfS Shift .BFF files

Post by japamd » Sat Sep 19, 2009 10:50 pm

Bugtest wrote:new version of quickbms: http://aluigi.org/papers.htm#quickbms
and the needed script for Need for Speed Shift: http://aluigi.org/papers/bms/nfsshift.bms
Wonderful job!

If the string are translated, how do I put the files together again?

Thanks!

User avatar
aluigi
VVIP member
VVIP member
Posts: 1917
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 650 times
Contact:

Re: NfS Shift .BFF files

Post by aluigi » Sat Sep 19, 2009 11:09 pm

I make only the extractors.

if someone wants to write a quick rebuilder I suggest to use X12d equal to 0 (no encryption) and ever type 0 for each file so that it's not needed to use the compression.
the crc calculated on the files is just the simple classic one:

Code: Select all

unsigned int crtable[...0x77073096 polynomial...];
unsigned int crc = 0xffffffff;
for(i = 0; i < len; i++) {
    crc = crctable[(data[i] ^ crc) & 0xff] ^ (crc >> 8);
}
return(crc);

zeeh
beginner
Posts: 30
Joined: Sun Jul 26, 2009 2:10 am
Has thanked: 1 time
Been thanked: 1 time

Re: NfS Shift .BFF files

Post by zeeh » Sat Sep 19, 2009 11:44 pm

Cool :) I hope soon we should have compiler working, good job!

User avatar
japamd
advanced
Posts: 41
Joined: Sat Sep 19, 2009 10:26 pm
Has thanked: 3 times
Been thanked: 8 times

Re: NfS Shift .BFF files

Post by japamd » Sun Sep 20, 2009 4:55 am

zeeh wrote:Cool :) I hope soon we should have compiler working, good job!
Are you making one? It would be great!

Simon
mega-veteran
mega-veteran
Posts: 180
Joined: Sun Sep 20, 2009 5:41 pm
Has thanked: 31 times
Been thanked: 20 times

Re: NfS Shift .BFF files

Post by Simon » Sun Sep 20, 2009 6:39 pm

Don't know if this is against the Rules here but ...

I bet please please create a BFF Rebuilder because Shift don't reads extracted files and I want to start modding :)

Post Reply