Bloody Roar 3 (PS2) "WFP" FILES

Codecs, formats, encoding/decoding of game audio, video and music
pepodmc
Posts: 36
Joined: Wed Mar 11, 2015 6:40 am

Bloody Roar 3 (PS2) "WFP" FILES

Post by pepodmc »

.

WFP files can be found in the DAT File (when you decompress it) together with a CFG...


FOR EXAMPLE:

STG01.WFP
STG01.CFG



LINK:

https://mega.co.nz/#!igJEwb5K!pNMcDU5sx ... ICYd5x7EzE



I need a script that can both extract and re-import custom files into this archives, if someone can help me it would be great! :D (If it's possible)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by aluigi »

WFP are audio (mono).
pepodmc
Posts: 36
Joined: Wed Mar 11, 2015 6:40 am

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by pepodmc »

aluigi wrote:WFP are audio (mono).



and how can i modify them? because each WFP contains 8 sounds of the game or more. (voices or sound effects) and when I tried to open them with the program "Awave Studio", it give me an error message.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by aluigi »

Code: Select all

open FDDE "CFG"
open FDDE "WFP" 1

findloc OFFSET binary "IECSigaV"
math BASE_OFF = OFFSET
math OFFSET += 8
goto OFFSET
get DUMMY long
get FILES long
math FILES += 1
for i = 0 < FILES
    get OFFSET long
    savepos TMP
    math OFFSET += BASE_OFF
    goto OFFSET
    get OFFSET long
    get FREQ threebyte
    get DUMMY byte
    goto TMP
    putarray 0 i OFFSET
    putarray 1 i FREQ
next i

    getarray OFFSET 0 0
    getarray FREQ   1 0
for i = 1 <= FILES
    if i == FILES
        get NEXT_OFFSET asize 1
    else
        getarray NEXT_OFFSET 0 i
        getarray NEXT_FREQ   1 i
    endif
    xmath SIZE "NEXT_OFFSET - OFFSET"

    endian big
    log MEMORY_FILE 0 0
    putdstring "VAGp" 4 MEMORY_FILE
    put 32 long MEMORY_FILE
    put 0 long MEMORY_FILE
    put SIZE long MEMORY_FILE
    put FREQ long MEMORY_FILE
    for x = 0 < 12
        put 0 byte MEMORY_FILE
    next x
    string NAME p= "%016x" i
    putdstring NAME 16 MEMORY_FILE
    for x = 0 < 16
        put 0 byte MEMORY_FILE
    next x
    append
    log MEMORY_FILE OFFSET SIZE 1
    append
    endian little

    string NAME += ".vag"
    get SIZE asize MEMORY_FILE
    log NAME 0 SIZE MEMORY_FILE

    math OFFSET = NEXT_OFFSET
    math FREQ = NEXT_FREQ
next i
pepodmc
Posts: 36
Joined: Wed Mar 11, 2015 6:40 am

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by pepodmc »

aluigi wrote:

Code: Select all

open FDDE "CFG"
open FDDE "WFP" 1

findloc OFFSET binary "IECSigaV"
math BASE_OFF = OFFSET
math OFFSET += 8
goto OFFSET
get DUMMY long
get FILES long
math FILES += 1
for i = 0 < FILES
    get OFFSET long
    savepos TMP
    math OFFSET += BASE_OFF
    goto OFFSET
    get OFFSET long
    get FREQ threebyte
    get DUMMY byte
    goto TMP
    putarray 0 i OFFSET
    putarray 1 i FREQ
next i

    getarray OFFSET 0 0
    getarray FREQ   1 0
for i = 1 <= FILES
    if i == FILES
        get NEXT_OFFSET asize 1
    else
        getarray NEXT_OFFSET 0 i
        getarray NEXT_FREQ   1 i
    endif
    xmath SIZE "NEXT_OFFSET - OFFSET"

    endian big
    log MEMORY_FILE 0 0
    putdstring "VAGp" 4 MEMORY_FILE
    put 32 long MEMORY_FILE
    put 0 long MEMORY_FILE
    put SIZE long MEMORY_FILE
    put FREQ long MEMORY_FILE
    for x = 0 < 12
        put 0 byte MEMORY_FILE
    next x
    string NAME p= "%016x" i
    putdstring NAME 16 MEMORY_FILE
    for x = 0 < 16
        put 0 byte MEMORY_FILE
    next x
    append
    log MEMORY_FILE OFFSET SIZE 1
    append
    endian little

    string NAME += ".vag"
    get SIZE asize MEMORY_FILE
    log NAME 0 SIZE MEMORY_FILE

    math OFFSET = NEXT_OFFSET
    math FREQ = NEXT_FREQ
next i




YOU ARE AMAzING MAN!! and so quick (you are the autor of QuickBMS so it's understandable xd ) :mrgreen: :mrgreen: :mrgreen: :mrgreen: , now with "MF Audio" I can convert the VAG files into wav and modify them or put new sounds into the WFP files. 8-)

Thanks really :D :mrgreen:
pepodmc
Posts: 36
Joined: Wed Mar 11, 2015 6:40 am

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by pepodmc »

aluigi wrote:

Code: Select all

open FDDE "CFG"
open FDDE "WFP" 1

findloc OFFSET binary "IECSigaV"
math BASE_OFF = OFFSET
math OFFSET += 8
goto OFFSET
get DUMMY long
get FILES long
math FILES += 1
for i = 0 < FILES
    get OFFSET long
    savepos TMP
    math OFFSET += BASE_OFF
    goto OFFSET
    get OFFSET long
    get FREQ threebyte
    get DUMMY byte
    goto TMP
    putarray 0 i OFFSET
    putarray 1 i FREQ
next i

    getarray OFFSET 0 0
    getarray FREQ   1 0
for i = 1 <= FILES
    if i == FILES
        get NEXT_OFFSET asize 1
    else
        getarray NEXT_OFFSET 0 i
        getarray NEXT_FREQ   1 i
    endif
    xmath SIZE "NEXT_OFFSET - OFFSET"

    endian big
    log MEMORY_FILE 0 0
    putdstring "VAGp" 4 MEMORY_FILE
    put 32 long MEMORY_FILE
    put 0 long MEMORY_FILE
    put SIZE long MEMORY_FILE
    put FREQ long MEMORY_FILE
    for x = 0 < 12
        put 0 byte MEMORY_FILE
    next x
    string NAME p= "%016x" i
    putdstring NAME 16 MEMORY_FILE
    for x = 0 < 16
        put 0 byte MEMORY_FILE
    next x
    append
    log MEMORY_FILE OFFSET SIZE 1
    append
    endian little

    string NAME += ".vag"
    get SIZE asize MEMORY_FILE
    log NAME 0 SIZE MEMORY_FILE

    math OFFSET = NEXT_OFFSET
    math FREQ = NEXT_FREQ
next i



I have a problem. Even if I don't do any modification and only extract the vag files from the WFP, when i Tried to Reimport the Vag files (unmodified) an error message appears:





With QuicBMS editor GUI V2.0 this appears:


- c_structs: "xmath" "SIZE" "NEXT_OFFSET - OFFSET"






And with the normal option of Reimport.bat this appears:



Script invalid for reimporting, it uses MEMORY_FILEs".


-----------------------------------------------------------------------------------------------------


I need a new script for reimport the VAG files?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by aluigi »

You are using an old version of quickbms:
http://quickbms.aluigi.org

Reimporting of the vag file is not possible because the script generates the vag from raw data, what I can do is dumping the raw data but then you have to manually remove the VAG header (the first 0x40 bytes) before reimporting.
pepodmc
Posts: 36
Joined: Wed Mar 11, 2015 6:40 am

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by pepodmc »

aluigi wrote:You are using an old version of quickbms:
http://quickbms.aluigi.org

Reimporting of the vag file is not possible because the script generates the vag from raw data, what I can do is dumping the raw data but then you have to manually remove the VAG header (the first 0x40 bytes) before reimporting.


Can you explain to me how to do that? with a Hex Editor i must delete the first four or five lines?

Image



and this too (if you dont mind please)...

what I can do is dumping the raw data
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by aluigi »

The first 4 lines.

While for the script use this one:

Code: Select all

open FDDE "CFG"
open FDDE "WFP" 1

findloc OFFSET binary "IECSigaV"
math BASE_OFF = OFFSET
math OFFSET += 8
goto OFFSET
get DUMMY long
get FILES long
math FILES += 1
for i = 0 < FILES
    get OFFSET long
    savepos TMP
    math OFFSET += BASE_OFF
    goto OFFSET
    get OFFSET long
    get FREQ threebyte
    get DUMMY byte
    goto TMP
    putarray 0 i OFFSET
    putarray 1 i FREQ
next i

    getarray OFFSET 0 0
    getarray FREQ   1 0
for i = 1 <= FILES
    if i == FILES
        get NEXT_OFFSET asize 1
    else
        getarray NEXT_OFFSET 0 i
        getarray NEXT_FREQ   1 i
    endif
    xmath SIZE "NEXT_OFFSET - OFFSET"

    string NAME p= "%016x" i
    string NAME += ".vag"
    log NAME OFFSET SIZE 1

    math OFFSET = NEXT_OFFSET
    math FREQ = NEXT_FREQ
next i

*edit* script fixed
pepodmc
Posts: 36
Joined: Wed Mar 11, 2015 6:40 am

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by pepodmc »

aluigi wrote:The first 4 lines.



Can you try reimport the VAG ? please, because , perhaps i'm doing something wrong




This is a link with the unmodified files, modified files (removed header) and the WFP:

https://mega.co.nz/#!jtBjVSZD!iBpnCzJOs ... CPbghoE9d4
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by aluigi »

My fault, I forgot 2 lines of script that generated a wrong filename.
I have edited the previous post with the correct script, now it should work correctly.
pepodmc
Posts: 36
Joined: Wed Mar 11, 2015 6:40 am

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by pepodmc »

aluigi wrote:My fault, I forgot 2 lines of script that generated a wrong filename.
I have edited the previous post with the correct script, now it should work correctly.


It work!!

Thanks!! :mrgreen:
pepodmc
Posts: 36
Joined: Wed Mar 11, 2015 6:40 am

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by pepodmc »

aluigi wrote:My fault, I forgot 2 lines of script that generated a wrong filename.
I have edited the previous post with the correct script, now it should work correctly.



Is there a way of reimport bigger files than the original? or it's impossible?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Bloody Roar 3 (PS2) "WFP" FILES

Post by aluigi »

I guess you know the answer.
It's called "reimporting" but it's just a "reinjection"