ZenHAX
https://zenhax.com/

Weird WAVE header (RTL Ski Springen 2002 / Skoki Narciarskie 2002)
https://zenhax.com/viewtopic.php?f=6&t=8242
Page 1 of 1

Author:  mtik333 [ Thu Jul 26, 2018 5:28 am ]
Post subject:  Weird WAVE header (RTL Ski Springen 2002 / Skoki Narciarskie 2002)

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.

Author:  aluigi [ Fri Jul 27, 2018 6:30 am ]
Post subject:  Re: Weird WAVE header (RTL Ski Springen 2002 / Skoki Narciarskie 2002)

Maybe upload that second sample file

Author:  mtik333 [ Fri Jul 27, 2018 9:02 pm ]
Post subject:  Re: Weird WAVE header (RTL Ski Springen 2002 / Skoki Narciarskie 2002)

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 13 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 11 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 8 times

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

Author:  aluigi [ Tue Jul 31, 2018 5:01 am ]
Post subject:  Re: Weird WAVE header (RTL Ski Springen 2002 / Skoki Narciarskie 2002)

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

Author:  mtik333 [ Tue Jul 31, 2018 4:57 pm ]
Post subject:  Re: Weird WAVE header (RTL Ski Springen 2002 / Skoki Narciarskie 2002)

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?)

Author:  aluigi [ Wed Aug 01, 2018 11:38 pm ]
Post subject:  Re: Weird WAVE header (RTL Ski Springen 2002 / Skoki Narciarskie 2002)

lz77wii, lzss, lzo1x and few others.
Please note that compression is meant as lossless data compression and not as audio codec.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/