Help with DAT archive extraction [NFS Carbon]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Help with DAT archive extraction [NFS Carbon]

Post by Kratos9999 »

Hi aluigi, currently my NFS Carbon translation for portuguese is going better, but there are some text files into the archive attached, the nfsu bun script is compatible with many .dat files, but with this an error is showed: "Get block type LONG 115 line".
Can you adapt the script for extract this DAT archive in particular?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with DAT archive extraction

Post by aluigi »

That file is not a bun archive.
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with DAT archive extraction

Post by Kratos9999 »

So, you can make a script made for me to extract the contents of this archive?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with DAT archive extraction

Post by aluigi »

It's not an archive at all.
Use a hex editor maybe.
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with DAT archive extraction

Post by Kratos9999 »

Do you say cut the texts in hex editor, translate them, and paste in same local with hex editor?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with DAT archive extraction

Post by aluigi »

If you want to translate that file you can use the hex editor directly on the text strings you see there by "overwriting" the current bytes that compose each string.
Just remember to use strings shorter/equal than the originals and put ever a 0x00 byte at their end.
It should work.
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with DAT archive extraction

Post by Kratos9999 »

Understood, I'll try here
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with DAT archive extraction

Post by Kratos9999 »

Talking about limitations size, Aluigi, you can write a tool for me in this post: Tool for Export/Import BIN files in NFS Carbon, I think you the better people to make a tool like this, you know the JDLZ, HUFF and COMP algorithms.
Is why is impossible translate a text for other language and keep the same size, the tendency is for the file to get larger and this is one of the biggest obstacles in my translation. I would be
very grateful if you would
make this program for me
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with DAT archive extraction

Post by aluigi »

What bin files you mean?
The script already covers all the archive formats I found.
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with DAT archive extraction

Post by Kratos9999 »

Is the ZZDATA.BIN files, the script works fine for extract and reimport them, but when a file become larger than original, the reimport is not possible, if the filesize is 200Kb, and after translated the new size is 201Kb, it is not possible to make the reimport properly. The only way is rebuild the container to edit the reserved space for new file and update de infos in Zdir.bin, I belive that Zdir.bin contains the offsets for the files in ZZDATA archives.
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with DAT archive extraction

Post by Kratos9999 »

Hi aluigi, I finally solved my problems with ZZDATA archives, I reimport the big file modified with the option "force" of quickbms, and after this I make a patch with the ppf-o matic between the original ZZDATA and the modified. In final, I apply the patch in original ZZDATA and the game works perfectly, same using the "force" mode in reimport.
This topic can be closed, and this can be deleted:
"Tool for export/import ZZDATA.BIN files"
Thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help with DAT archive extraction

Post by aluigi »

Don't worry, we can leave them open :)
gledson999
Posts: 11
Joined: Fri Jan 27, 2017 1:07 pm

Re: Help with DAT archive extraction [NFS Carbon]

Post by gledson999 »

If you use "force" with files bigger than original, example: replace 355kb to 322kb, the file will be truncated and cause crash in some part of game randomly, need to edit the header file or allocate to end of file.

I made a brazilian translation for this game with this BMS, thanks . and @swuforce!
https://gledson999.blogspot.com.br/2017/03/ps2-lancamento-need-for-speed-carbon.html
Kratos9999
Posts: 129
Joined: Mon Aug 22, 2016 10:30 am

Re: Help with DAT archive extraction [NFS Carbon]

Post by Kratos9999 »

Hi gledson999, I don't knew it that you have made a translation for this game. So, I think you can help me, my problem now is: the text files in game are 3, but it seems be repeated, 6. I replace 3 of them, but the game continues in english and when I see in hex editor, there is my texts translated and the same texts in english, but the BMS don't extract this repeated files, they are as a second layer, more or less.
How do you make for extract them?