Read sbk files with foobar

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
amgb
Posts: 44
Joined: Tue Jun 22, 2021 8:38 pm

Read sbk files with foobar

Post by amgb »

Hi guys,

I have extracted the audio files of The Force Unleashed game (ps2 version) and I have sbk files my computer recognizes as audio files but I can't read them. I get the message :

Unable to open item for playback (Unsupported format or corrupted file):
"E:\Users\Alexis\Desktop\tfu\ps2\fin\csvo001_07_00_p03scfr.sbk"

Here is in attachment a sample of the audio files I have. Does anybody know how I can open them ?

Thanks in advance !
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: Read sbk files with foobar

Post by BloodRaynare »

This should go to Audio/Video section, but oh well...
Here's a txth scripts to play your sbk files
Save these text below as ".sbk.txth"

Code: Select all

codec = PSX
channels = @0x04
name_offset = 0x10
start_offset = @0x30
data_size = @0x34
sample_rate = @0x38$2
num_samples = data_size


Then just drag the sbk files to foobar.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Read sbk files with foobar

Post by AlphaTwentyThree »

Or use this script I've quickly written to produce files playable by vgmstream:

Code: Select all

idstring "SB01"
get CH long
goto 0x10
getDstring NAME 0x20
goto 0x38
get FREQ short
set OFFSET 0x60
get SIZE asize
math SIZE -= OFFSET
if CH == 1
   callfunction VAG 1
else
   callfunction SS2 1
endif

startfunction SS2
   xmath PSIZE "SIZE += 0x28"
   putVarChr MEMORY_FILE2 PSIZE 0
   log MEMORY_FILE2 0 0
   set MEMORY_FILE binary "\x53\x53\x68\x64\x18\x00\x00\x00\x10\x00\x00\x00\xb0\x36\x00\x00\x02\x00\x00\x00\xc0\x2f\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x53\x53\x62\x64\x00\xe8\x11\x00"
   append
   log MEMORY_FILE OFFSET SIZE
   append
   putVarChr MEMORY_FILE 0x24 SIZE long
   putVarChr MEMORY_FILE 0xc FREQ long
   putVarChr MEMORY_FILE 0x14 INTERLEAVE long
   putVarChr MEMORY_FILE 0x10 CH byte
   get SIZE asize MEMORY_FILE
   string NAME += ".ss2"
   log NAME 0 SIZE MEMORY_FILE
endfunction

startfunction VAG
   xmath PSIZE "SIZE += 0x30"
   putVarChr MEMORY_FILE PSIZE 0
   log MEMORY_FILE 0 0
   set MEMORY_FILE binary "\x56\x41\x47\x70\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x04\x50\x00\x00\x22\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
   append
   log MEMORY_FILE OFFSET SIZE
   append
   endian big
   putVarChr MEMORY_FILE 0xc SIZE long
   putVarChr MEMORY_FILE 0x10 FREQ long
   get SIZE asize MEMORY_FILE
   string NAME += ".vag"
   log NAME 0 SIZE MEMORY_FILE
endfunction VAG


Only works for mono files for now, need a stereo example to adjust the script. Just run the script on all kinds of files and send me the ones that turn up with an *.ss2 ending.
amgb
Posts: 44
Joined: Tue Jun 22, 2021 8:38 pm

Re: Read sbk files with foobar

Post by amgb »

Thanks for the txth script, it works. Where shall use the big script ? I am not familiar with vgmstream. If you want, here are all the files I extracted (only the RKV files from the ps2 iso). https://we.tl/t-WBCRR91ugd
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Read sbk files with foobar

Post by AlphaTwentyThree »

foobar2000 plus the vgmstream plugin can play those files. Google it. ;)
What do you mean by "big script"?
amgb
Posts: 44
Joined: Tue Jun 22, 2021 8:38 pm

Re: Read sbk files with foobar

Post by amgb »

I meant the second one in I received in this forum.