Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Kung Fu Panda - PS2 [WBK]

Featured Replies

  • Author
  • Localization

Warthog1336, posted Wed Aug 29, 2018 9:25 pm (37932)


Hi! I need a script for unpacking this WBK archive format (not the same as Spider-Man 2 WAVEBK), please.

Samples: PS2

Thanks!
  • Author
  • Localization

aluigi, posted Thu Aug 30, 2018 9:45 am (37950)


There is a "NSLB" magic at the beginning and PS adpcm data from offset 0x10000 but didn't investigate the format because it's not very simple.
  • Author
  • Localization

JackTheRipper, posted Mon Jan 10, 2022 3:25 am (68950)


For now, with newer VGMStream builds it can support WBKs with NSLB

Alternately, you can use VGMToolBox on Sony ADPCM extractor.
  • Author
  • Localization

AlphaTwentyThree, posted Mon Jan 10, 2022 2:10 pm (68976)


Here's the script I just wrote but just for that single file. I set all streams to mono but there may be other wbk files that contain stereo files and have the interleave saved in the specs area. Let me know if it works.
Code:
# Kung Fu Panda (PS2) - *.wbk extractor

# (c) 2022-01-10 by AlphaTwentyThree of Zenhax
# script for QuickBMS http://quickbms.aluigi.org

idstring "NSLB"
goto 0x24
get LISTOFF long # stream specs
goto 0x2c
get HEADER long
goto 0x34
get BASEOFF long
goto 0x3c
get FSIZE long
xmath ENTRIES "(HEADER - LISTOFF) / 0x50"
xmath FILES "(LISTOFF - 0x80) / 0x14"
goto 0x80
for i = 0 < FILES
   get NAMEPOS long
   math NAMEPOS = HEADER
   savepos MYOFF
   goto NAMEPOS
   get NAME string
   putArray 0 i NAME
   goto MYOFF
next i
for i = 0 < ENTRIES2
   get SPECSOFF long
   math SPECSOFF = LISTOFF
   get OFFSET long
   math OFFSET = BASEOFF
   get SIZE long
   get UNK2 long
   getArray NAME 0 i
   savepos MYOFF
   goto SPECSOFF
   get FREQ short
   set CH 1
   set INTERLEAVE 0x10
   callfunction SS2 1
   goto MYOFF
next i

startfunction SS2
   xmath PSIZE "SIZE 0x28"
   putVarChr MEMORY_FILE SIZE 0
   log MEMORY_FILE 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
  • Author
  • Localization

AlphaTwentyThree, posted Tue Jan 11, 2022 7:22 am (68984)


Something is wrong - those archives have a really strange quirk when they contain a stereo file: The stereo file's offset isn't listed in the TOC anymore but in the header. Additionally, offsets of the other files in the TOC get some shift when they lie where the stereo file also occupies space. Why on earth they would program it this way is absolutely unintelligible...
Seems possible to adjust though.
  • Author
  • Localization

AlphaTwentyThree, posted Tue Jan 11, 2022 8:11 am (68987)


Ok, I've adjusted the script to a single wbk file, moved over to the next and all the offsets were wrong again. This is really frustrating. Need to find a new strategy. I'm suspecting that I need to put everything into an array, sort it and somehow calculate the offset shift after the stereo file another way. For that one file it was 0x20000 at least but it wasn't stated inside the header anywhere.
  • Author
  • Localization

AlphaTwentyThree, posted Tue Jan 11, 2022 8:41 am (68988)


I'm on the brink of giving up to be honest. I've tried to find some system where to add or subtract some value from the offset and could find any. Here's a screenshot of a random file where I automatically marked where the offset is wrong:
Image

the colums show file number, offset where the specs can be found, offset, size and some unknown value. There seems to rhyme or reason behind which files are wrong as you can see.
I don't know if I'll continue very far from here any more...
I could try to get the correct files where the offset is correct and upload the script if you want though. The first file in the list seems to be the music at least it seems.
  • Author
  • Localization

AlphaTwentyThree, posted Tue Jan 11, 2022 9:20 am (68992)


Checking again with another file reveals that even more offsets point to the wrong files. I'm pretty much lost here...
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.