007 James Bond Blood Stone PS3 (pak) tool

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Vito
Posts: 55
Joined: Sat Nov 12, 2016 10:21 am

007 James Bond Blood Stone PS3 (pak) tool

Post by Vito »

Hi :)

I want to translate the 007 James Bond Blood Stone. How can I open this pak file? I tried it with Dragon unpacker, but it didn't open the file. I tried blur script, but it not work for me.

I'm waiting for your help.

http://www.mediafire.com/file/p5aenazia ... medata.rar
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by aluigi »

Use the new script 0.3.3 http://aluigi.org/bms/blur.bms but first edit the WORK_AROUND variable in it with a text editor for setting it to 1.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by AlphaTwentyThree »

Hm, this doesn't work for the PC version: https://mega.nz/#!e0cGRZLZ!vuTOq4Hn5sWM ... SJCPm4H7KY
Another update maybe? ;)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by aluigi »

Just checked it and it's a waste of time. Sorry.
rkthelegend
Posts: 56
Joined: Wed Jun 20, 2018 7:57 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by rkthelegend »

aluigi wrote:Just checked it and it's a waste of time. Sorry.


Waste of time? No no
I extracted the blur and blood stone .pak archive with blur.bms. 0.3.3 and there was different file specially the audio file are in .baf archive so tell me how to extract data from .baf file. Both games using same extension. Blur and 007 blood stone.
Mr Aluigi can you write a script for .baf archive pf pc version?
I'm waiting for your response.

Thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by aluigi »

I try to explain it better: the format of the archive used in the sample provided by AlphaTwentyThree will NOT be supported.
rkthelegend
Posts: 56
Joined: Wed Jun 20, 2018 7:57 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by rkthelegend »

aluigi wrote:I try to explain it better: the format of the archive used in the sample provided by AlphaTwentyThree will NOT be supported.


Yeah i know that but what I'm trying to say is how to extract sound from .baf archive??
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by aluigi »

Upload a baf sample, if it's very big use the filecutter script.
rkthelegend
Posts: 56
Joined: Wed Jun 20, 2018 7:57 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by rkthelegend »

aluigi wrote:Upload a baf sample, if it's very big use the filecutter script.


Here is an example of baf archive from blur
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by aluigi »

@AlphaTwentyThree
Can you check what's the codec used there?
It's not PCM (8/16), not adpcm, not ulaw (7), not vag, what else?

Testing script:

Code: Select all

math i = 0
get BAF_SIZE asize
for CHUNK_OFF = 0 != BAF_SIZE
    getdstring CHUNK_NAME 4
    get CHUNK_SIZE long

    if CHUNK_NAME u== "BANK"
        # nothing
    elif CHUNK_NAME u== "WAVE"
        get DUMMY long  # 7
        getdstring NAME 0x20
        get OFFSET long
        get SIZE  long
        get DUMMY float # 1.0
        get DUMMY long  # 0x19
        get ZERO  long
        get FREQUENCY long
        #putarray 0 -1 NAME

        math CHANNELS = 1
        math BITS = 8
        string NAME + ".wav"
        callfunction TOWAV 1

    elif CHUNK_NAME u== "DATA"
        /*
        getarray NAME 0 i
        math i + 1
        savepos OFFSET
        xmath SIZE "CHUNK_SIZE - (OFFSET - CHUNK_OFF)"
        log NAME OFFSET SIZE
        */
    endif

    math CHUNK_OFF + CHUNK_SIZE
    goto CHUNK_OFF
next

# Requirements: BITS, FREQUENCY, CHANNELS, OFFSET, SIZE and NAME
startfunction TOWAV
    set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"

    set RIFFSIZE long SIZE
    math RIFFSIZE + 36
    set BLOCKALIGN long BITS
    set AVGBYTES long FREQUENCY
    math BLOCKALIGN / 8
    math BLOCKALIGN * CHANNELS
    math AVGBYTES * BLOCKALIGN

    putvarchr MEMORY_FILE 4 RIFFSIZE long
    putvarchr MEMORY_FILE 20 1 short          # wFormatTag: Microsoft PCM Format (0x0001)
    putvarchr MEMORY_FILE 22 CHANNELS short   # wChannels
    putvarchr MEMORY_FILE 24 FREQUENCY long   # dwSamplesPerSec
    putvarchr MEMORY_FILE 28 AVGBYTES long    # dwAvgBytesPerSec
    putvarchr MEMORY_FILE 32 BLOCKALIGN short # wBlockAlign
    putvarchr MEMORY_FILE 34 BITS short       # wBitsPerSample
    putvarchr MEMORY_FILE 40 SIZE long

    log NAME 0 44 MEMORY_FILE
    append
    log NAME OFFSET SIZE
    append
endfunction
rkthelegend
Posts: 56
Joined: Wed Jun 20, 2018 7:57 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by rkthelegend »

aluigi wrote:@AlphaTwentyThree
Can you check what's the codec used there?
It's not PCM (8/16), not adpcm, not ulaw (7), not vag, what else?

Testing script:

Code: Select all

math i = 0
get BAF_SIZE asize
for CHUNK_OFF = 0 != BAF_SIZE
    getdstring CHUNK_NAME 4
    get CHUNK_SIZE long

    if CHUNK_NAME u== "BANK"
        # nothing
    elif CHUNK_NAME u== "WAVE"
        get DUMMY long  # 7
        getdstring NAME 0x20
        get OFFSET long
        get SIZE  long
        get DUMMY float # 1.0
        get DUMMY long  # 0x19
        get ZERO  long
        get FREQUENCY long
        #putarray 0 -1 NAME

        math CHANNELS = 1
        math BITS = 8
        string NAME + ".wav"
        callfunction TOWAV 1

    elif CHUNK_NAME u== "DATA"
        /*
        getarray NAME 0 i
        math i + 1
        savepos OFFSET
        xmath SIZE "CHUNK_SIZE - (OFFSET - CHUNK_OFF)"
        log NAME OFFSET SIZE
        */
    endif

    math CHUNK_OFF + CHUNK_SIZE
    goto CHUNK_OFF
next

# Requirements: BITS, FREQUENCY, CHANNELS, OFFSET, SIZE and NAME
startfunction TOWAV
    set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"

    set RIFFSIZE long SIZE
    math RIFFSIZE + 36
    set BLOCKALIGN long BITS
    set AVGBYTES long FREQUENCY
    math BLOCKALIGN / 8
    math BLOCKALIGN * CHANNELS
    math AVGBYTES * BLOCKALIGN

    putvarchr MEMORY_FILE 4 RIFFSIZE long
    putvarchr MEMORY_FILE 20 1 short          # wFormatTag: Microsoft PCM Format (0x0001)
    putvarchr MEMORY_FILE 22 CHANNELS short   # wChannels
    putvarchr MEMORY_FILE 24 FREQUENCY long   # dwSamplesPerSec
    putvarchr MEMORY_FILE 28 AVGBYTES long    # dwAvgBytesPerSec
    putvarchr MEMORY_FILE 32 BLOCKALIGN short # wBlockAlign
    putvarchr MEMORY_FILE 34 BITS short       # wBitsPerSample
    putvarchr MEMORY_FILE 40 SIZE long

    log NAME 0 44 MEMORY_FILE
    append
    log NAME OFFSET SIZE
    append
endfunction



This script can extract .wav from .baf but i cant hear it clearly there is some noise in .wav files

Also the reimport process also not working.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by aluigi »

Reimporting works correctly, quickbms will tell you to use the -. option for enabling that mode with this script. If it doesn't it ask you anything it means you are using an old version.

And yes, it's normal that you hear noise because I asked the other user to analyze the file and find the correct codec.
In fact the script was meant for him :)
rkthelegend
Posts: 56
Joined: Wed Jun 20, 2018 7:57 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by rkthelegend »

Ok. So we should wait till they find correct codec for it
Game Ripper
Posts: 123
Joined: Sat Sep 02, 2017 12:56 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by Game Ripper »

Hi, may I ask someone to look into this? I'm unpacking files from Blood Stone PS3 & the script (blur.bms with edited WORK_AROUND variable) works with most PAKs but this one.
I tried both quickbms.exe & quickbms_4gb_files.exe but result is always the same: the program extracts 1 file and stops because there's a memory allocation problem.

Bye and thanks in advance!
rkthelegend
Posts: 56
Joined: Wed Jun 20, 2018 7:57 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by rkthelegend »

I think no one can help.
rkthelegend
Posts: 56
Joined: Wed Jun 20, 2018 7:57 pm

Re: 007 James Bond Blood Stone PS3 (pak) tool

Post by rkthelegend »

aluigi wrote:@AlphaTwentyThree
Can you check what's the codec used there?
It's not PCM (8/16), not adpcm, not ulaw (7), not vag, what else?

Testing script:

Code: Select all

math i = 0
get BAF_SIZE asize
for CHUNK_OFF = 0 != BAF_SIZE
    getdstring CHUNK_NAME 4
    get CHUNK_SIZE long

    if CHUNK_NAME u== "BANK"
        # nothing
    elif CHUNK_NAME u== "WAVE"
        get DUMMY long  # 7
        getdstring NAME 0x20
        get OFFSET long
        get SIZE  long
        get DUMMY float # 1.0
        get DUMMY long  # 0x19
        get ZERO  long
        get FREQUENCY long
        #putarray 0 -1 NAME

        math CHANNELS = 1
        math BITS = 8
        string NAME + ".wav"
        callfunction TOWAV 1

    elif CHUNK_NAME u== "DATA"
        /*
        getarray NAME 0 i
        math i + 1
        savepos OFFSET
        xmath SIZE "CHUNK_SIZE - (OFFSET - CHUNK_OFF)"
        log NAME OFFSET SIZE
        */
    endif

    math CHUNK_OFF + CHUNK_SIZE
    goto CHUNK_OFF
next

# Requirements: BITS, FREQUENCY, CHANNELS, OFFSET, SIZE and NAME
startfunction TOWAV
    set MEMORY_FILE binary "\x52\x49\x46\x46\x00\x00\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x61\x74\x61\x00\x00\x00\x00"

    set RIFFSIZE long SIZE
    math RIFFSIZE + 36
    set BLOCKALIGN long BITS
    set AVGBYTES long FREQUENCY
    math BLOCKALIGN / 8
    math BLOCKALIGN * CHANNELS
    math AVGBYTES * BLOCKALIGN

    putvarchr MEMORY_FILE 4 RIFFSIZE long
    putvarchr MEMORY_FILE 20 1 short          # wFormatTag: Microsoft PCM Format (0x0001)
    putvarchr MEMORY_FILE 22 CHANNELS short   # wChannels
    putvarchr MEMORY_FILE 24 FREQUENCY long   # dwSamplesPerSec
    putvarchr MEMORY_FILE 28 AVGBYTES long    # dwAvgBytesPerSec
    putvarchr MEMORY_FILE 32 BLOCKALIGN short # wBlockAlign
    putvarchr MEMORY_FILE 34 BITS short       # wBitsPerSample
    putvarchr MEMORY_FILE 40 SIZE long

    log NAME 0 44 MEMORY_FILE
    append
    log NAME OFFSET SIZE
    append
endfunction



The Codec for Ps3 is At3 (Sony Playstation Portable Format) Can you please Undate The script to add At3 Header on it.

Atrac3
Format/Info : Adaptive Transform Acoustic Coding 3
here is an example from another Ps3 Game, see the header.