ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed Oct 24, 2018 2:24 am

All times are UTC




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu Jul 26, 2018 5:28 am 

Joined: Thu Jul 26, 2018 5:15 am
Posts: 3
Hello.
I wanted to extract WAVE files from packfile.pak inside RTL Ski Springen 2002 installation dir that contains almost all data used by this game. I tried using 49games.bms but it returns wrong signature exception (expected PACK, saw q...).

The thing is that some WAVE contents in this .pak have OK headers, but some not (or I can't understand them). Example of good header:
Code:
52 49 46 46 - RIFF
7E 00 00 57 - chunk size (1459617918)
57 41 56 45 66 6D 74 20 - WAVEfmt
10 00 00 00 - subchunk1 size (16)
01 00 - audio format (1 pcm)
01 00 - num channels (1)
80 3E 00 00 - sample rate (16k)
00 7D 00 00 - byte rate (32k)
02 00 - block align (2)
10 00 - bits per sample (16)
64 61 74 61 - DATA
1E 7E 00 00 - subchunk 2 size (‭32286‬)

Second file has values like below which I do not understand
Code:
52 49 46 46 - RIFF
DA FA 22 09 - chunk size (‭153287386‬)
57 41 56 45 66 6D 74 20 - WAVEfmt
10 23 C0 01 - subchunk1 size (‭29369104‬)
00 02 - audio format (2 - compression?)
80 3E - num channels (‭16000‬ - is it possible?)
23 01 7D 22 - sample rate (‭578617635‬)
C8 02 00 06 - byte rate (‭100664008‬)
64 61 74 61 - DATA (where's the block align and bits per sample?)
B6 FA 20 FF - subchunk2 size (‭4280351414‬)


I can upload part of this .pak file, but now I was wondering if it's possible for WAVE header to miss block align or bits per sample?
Thanks.


Top
   
PostPosted: Fri Jul 27, 2018 6:30 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9077
Maybe upload that second sample file


Top
   
PostPosted: Fri Jul 27, 2018 9:02 pm 

Joined: Thu Jul 26, 2018 5:15 am
Posts: 3
I'm not sure if it's OK to provide attachments here or upload it on external link, but there it is.

In file
Attachment:
File comment: Weird WAVE header
start_plus_weird_wave.pak [454.01 KiB]
Downloaded 17 times
I included beginning of this .pak file + a couple of weird WAVE headers and data content. The one I mentioned in post starts at 26809 (HEX) / 157705 (DEC) and seems to end at 35008 (HEX) / 217096 (DEC)

In file
Attachment:
File comment: Wave content that seems to be OK.
good_wave.pak [74.01 KiB]
Downloaded 15 times
I included two WAVE headers along with its data content. Header I mentioned starts at 0, but there's a second good one starting at 8000 (HEX) / 32768 (DEC).

UPDATE
When I tried to replace the content of weird header from "WAVEfmt " to "data" with the good one and tried to get sound from it, the result is following (replace extension: .test with .wav):
Attachment:
File comment: Wave with lot of noise
start_plus_weird_wave.txt [300.01 KiB]
Downloaded 12 times

I would expect to hear clean voices there of course - not sure if it's possible to recover it in any way.


Top
   
PostPosted: Tue Jul 31, 2018 5:01 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9077
The reason is that these files are compressed.
I didn't find the compression algorithm, I didn't scan them but I just tried 5 of them I had in mind and they failed.
This is the work-in-progress script that canNOT be used until someone finds the correct comtype:
Code:
comtype ???
for
    get ZSIZE long
    get OFFSET long
    get DUMMY long
    get SIZE long
    getdstring NAME 0x40
    if NAME == ""
        break
    endif
    math OFFSET * 0x800
    if SIZE == ZSIZE
        log NAME OFFSET SIZE
    else
        # skip duplicated 64bit SIZE
        math OFFSET + 8
        math ZSIZE  - 8
        clog NAME OFFSET ZSIZE SIZE
    endif
next


Top
   
PostPosted: Tue Jul 31, 2018 4:57 pm 

Joined: Thu Jul 26, 2018 5:15 am
Posts: 3
Can you tell me which compression algorithms you tried? I asked Sound Designer of this game and he was mentioning potentially ADPCM (game was released on PS1 as well https://problemkaputt.de/psx-spx.htm#spuadpcmsamples, but these samples are from PC version) or Ogg stored as WAVE (is this even possible?)


Top
   
PostPosted: Wed Aug 01, 2018 11:38 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9077
lz77wii, lzss, lzo1x and few others.
Please note that compression is meant as lossless data compression and not as audio codec.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 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