ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Jan 26, 2021 9:19 pm

All times are UTC




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Fri Jan 08, 2021 1:46 pm 
User avatar

Joined: Fri Jan 08, 2021 1:43 pm
Posts: 6
EDIT: I've figured out how to extract all of these in playable forms, so I'll explain how I did it for other people who are interested! Note that this was all done with the PAL PS4 version of JoJo's Bizarre Adventure: Eyes of Heaven, though this process should work with other versions of the game as well as other CyberConnect2 games that use the same formats.

SOFTWARE USED:

PROCESS:

When you start off, you should have a few CPK files from the game. These are CriWare pack files. If you drag and drop a CPK onto the executable for YACpkTool, it will extract them to a new subfolder named after the CPK itself, in the folder where the CPK is.

The CPK files we are interested in for this process are:
  • sound0.cpk: contains BGM (in ACB/AWB format) and general battle/common sound effects (in XFBIN format)
  • sound1.cpk: contains sound gallery voice clips and all main story mode voice clips (all in ACB/AWB format)
  • stream0.cpk: contains character combat voice clips (e.g. attack noises, pain sounds) (in XFBIN format) and in-game character voice clips (in ACB/AWB format)

ACB/AWB Archives

To rip audio from ACB/AWB archives (another CriWare format, seemingly specifically as audio banks):
  • Open VGMToolbox.
  • In the side panel, under the "VGMToolbox" section, open up "Misc. Tools" -> "Extraction Tools" -> "Common Archives".
  • Select the "CRI ACB/AWB Archive Extractor".
  • Drag an ACB file (NOT THE AWB! The ACB file has all the file names and whatnot, so it must be used instead) onto the blank space of the window.
  • VGMToolbox should extract the files to a subfolder within the folder where the ACB was.
  • Inside should be HCA files. You can open these in foobar2000 if you've installed the vgmstream component.
  • By right-clicking on a file/files you've selected in foobar's playlist, you can select convert and convert them all to generic WAV files for use/conversion in other programs.

XFBIN Files

This is where the process gets a little tricky. XFBIN files are used all over this game as general containers. Most people seem to believe that it is not possible to rip audio from the audio container variants, as they use NUS3BANK containers, but... honestly, I'm not sure where that information came from. The raw file data for each audio file is just kind of in here, and you can yank it out with certain BMS scripts, for example.

As far as I can tell, audio-XFBIN files in this game contain two filetypes: BNSF (a Bandai Namco sound format) and AT3 RIFF (a compressed Sony audio format).

To check if a particular XFBIN file has either one of these, open it in HxD (or any other hex editor) and Find (Ctrl + F) both "BNSF" and "RIFF". If you find either one, it should be an audio-XFBIN, and should work with the following BMS script.

To export BNSF & AT3 files from XFBIN archives with their original file names, first copy this BMS script (by DKDave, found as an attachment a few posts down) into a TXT or BMS file and save it to your computer.
Code:
# ================================================================================
# JoJo's Bizarre Adventure: Eyes Of Heaven
# XFBIN extract
# QuickBMS script by Dave, 2021
# ================================================================================

IDString "NUCC"

FindLoc OFFSET String "TONE" 0 ""

If OFFSET = ""
   Break
Endif

Goto OFFSET
Get JUNK Long

FindLoc TONE_TABLE String "TONE" 0 ""            # 2nd occurence is the actual file table

If TONE_TABLE = ""
   Print "File table not found"
   Break
Endif

Goto TONE_TABLE
Get JUNK Long

FindLoc PACK_DATA String "PACK" 0 ""            # audio data

If PACK_DATA = ""
   Print "Data block not found"
   Break
Endif


Goto TONE_TABLE
Get JUNK Long
Get JUNK Long
Get ENTRIES Long
SavePos TONE_ENTRY

For A = 1 To ENTRIES
   Goto TONE_ENTRY
   Get INFO_OFFSET Long
   Get INFO_SIZE Long
   XMath INFO_OFFSET "INFO_OFFSET + TONE_TABLE + 12"
   Goto INFO_OFFSET
   Get FILE_TYPE Short
   Get JUNK Short
   Get JUNK Long
   Get TEXT_LEN Byte
   GetDString FILENAME TEXT_LEN

   Padding 4

   Get JUNK1 Long
   Get JUNK2 Long

   If FILE_TYPE = 0xFFFF
      Get OFFSET Long
      XMath OFFSET "OFFSET + PACK_DATA + 8"
      Get SIZE Long

      If SIZE > 0
         Goto OFFSET
         GetDString FILE_ID 4

         If FILE_ID = "BNSF"
            String FILENAME + ".bnsf"
         Elif FILE_ID = "RIFF"
            String FILENAME + ".at3"
         Endif

         Log FILENAME OFFSET SIZE

      Endif

   Endif

   Math TONE_ENTRY + 8
Next A


Once you have the BMS script saved, the extraction process can begin:
  • When prompted by QuickBMS, select the TXT or BMS file you saved DKDave's XFBIN script into.
  • Select the XFBIN archive that contains BNSF/AT3 files that you want to extract.
  • Select the folder you wish to extract the files into.
  • Voila! It should dump the BNSF and/or AT3 files with their original names. (If it says 0 files found, confirm that the XFBIN file you are extracting from does in fact have BNSF and/or AT3 files).
  • You can open these BNSF/AT3 files in foobar2000 if you've installed the vgmstream component.
  • By right-clicking on a file/files you've selected in foobar's playlist, you can select convert and convert them all to generic WAV files for use/conversion in other programs.

That should be all! If I missed anything or if you have any questions, feel free to ask and I'll try my best to help out. :D

Here are some sample files:
"battle.xfbin", which contains both BNSF files and AT3 files: https://mega.nz/file/mG4VUQgK#q5rAlcbRdiBGfjZkJ4yEKmnAry7fQ0elxwDote33VxA
"gimmick.xfbin", which only contains AT3 files: https://mega.nz/file/KagVTKIR#-BxBhOySCT8Vxwxqbr7ID5cScuHvnW_NEX2AJDODEsk


Last edited by Quasi-Detective on Fri Jan 08, 2021 5:58 pm, edited 3 times in total.

Top
   
PostPosted: Fri Jan 08, 2021 2:51 pm 
User avatar

Joined: Fri Jan 08, 2021 1:43 pm
Posts: 6
After using AlphaTwentyThree's WAVE Format Scanner BMS script on battle.xfbin, I managed to get the WAVE files out.

New problem: the codec is "undefined". The most I can gather is that they may be non-PCM and/or compressed? They all have a "fact" chunk.
We're so close! :cry:

One of the extracted WAVE files: https://mega.nz/file/SaYkHTKC#ALubFWtufILezWMbcnTv_ACAbjBU2pfeaCR8wXdJUVw


Top
   
PostPosted: Fri Jan 08, 2021 4:03 pm 
User avatar

Joined: Mon Nov 23, 2020 6:01 pm
Posts: 28
The .wav files are ATRAC3 audio (based on wav GUID value)

Here's my crappy script that should extract all the files with proper filenames.


Attachments:
xfbin.bms [1.25 KiB]
Downloaded 15 times

_________________
"You now stand on the cusp of two realities, about to leave all that you know behind. I have called many mortals here in ages past to call forth judgement and test the spirit in the hearts of men."
Top
   
PostPosted: Fri Jan 08, 2021 4:24 pm 
User avatar

Joined: Fri Jan 08, 2021 1:43 pm
Posts: 6
DKDave wrote:
The .wav files are ATRAC3 audio (based on wav GUID value)

Here's my crappy script that should extract all the files with proper filenames.


Thank you so much!! This is just what I was looking for!

Do you mind if I edit the guide I wrote on my technique to include this script and usage instructions for others? :D


Top
   
PostPosted: Fri Jan 08, 2021 4:36 pm 
User avatar

Joined: Mon Nov 23, 2020 6:01 pm
Posts: 28
Yeah, that's fine.

Ideally the script would parse the file properly, but it seems to work ok. Let me know if you find any archives that it doesn't work with.

_________________
"You now stand on the cusp of two realities, about to leave all that you know behind. I have called many mortals here in ages past to call forth judgement and test the spirit in the hearts of men."


Top
   
PostPosted: Fri Jan 08, 2021 4:36 pm 
User avatar

Joined: Fri Jan 08, 2021 1:43 pm
Posts: 6
DKDave wrote:
Yeah, that's fine.

Ideally the script would parse the file properly, but it seems to work ok. Let me know if you find any archives that it doesn't work with.


Will do, thanks again! :D


Top
   
PostPosted: Fri Jan 08, 2021 5:15 pm 
User avatar

Joined: Mon Nov 23, 2020 6:01 pm
Posts: 28
I've just updated my script to fix a few little errors, to ignore files with zero size, etc.


Attachments:
xfbin.bms [1.43 KiB]
Downloaded 17 times

_________________
"You now stand on the cusp of two realities, about to leave all that you know behind. I have called many mortals here in ages past to call forth judgement and test the spirit in the hearts of men."
Top
   
PostPosted: Fri Jan 08, 2021 6:01 pm 
User avatar

Joined: Fri Jan 08, 2021 1:43 pm
Posts: 6
DKDave wrote:
I've just updated my script to fix a few little errors, to ignore files with zero size, etc.


Updated the guide.
Yeah, I was just about to point out that a lot of the files in the player battle voice XFBINs were coming out as 0 bytes... Is that intentional, or are they meant to have data? I've attached one of said files as an example. Most of them are fine, but a decent chunk of them export as 0 byte files. :?:
https://mega.nz/file/DHxwGRBC#8jeetoYpJ6ngKMrjnL9JqWEUd4tgyLw4OhCB7IfmTGo


Top
   
PostPosted: Fri Jan 08, 2021 6:18 pm 
User avatar

Joined: Mon Nov 23, 2020 6:01 pm
Posts: 28
They're empty files, so nothing to extract. The extracted data is about the same size as the archive, so they're just remnants of what might have been there once.

_________________
"You now stand on the cusp of two realities, about to leave all that you know behind. I have called many mortals here in ages past to call forth judgement and test the spirit in the hearts of men."


Top
   
PostPosted: Fri Jan 08, 2021 6:22 pm 
User avatar

Joined: Fri Jan 08, 2021 1:43 pm
Posts: 6
DKDave wrote:
They're empty files, so nothing to extract. The extracted data is about the same size as the archive, so they're just remnants of what might have been there once.


Ah, gotcha. That sounds about right lol
Thanks for clarifying. :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 10 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited