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.

Weird WAVE header (RTL Ski Springen 2002 / Skoki Narciarskie 2002)

Featured Replies

  • Author
  • Localization

mtik333, posted Thu Jul 26, 2018 5:28 am (37022)


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
  • Localization

aluigi, posted Fri Jul 27, 2018 6:30 am (37038)


Maybe upload that second sample file
  • Author
  • Localization

mtik333, posted Fri Jul 27, 2018 9:02 pm (37054)


I'm not sure if it's OK to provide attachments here or upload it on external link, but there it is.

In file 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 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):

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

aluigi, posted Tue Jul 31, 2018 5:01 am (37121)


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
  • Localization

mtik333, posted Tue Jul 31, 2018 4:57 pm (37133)


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
  • Localization

aluigi, posted Wed Aug 01, 2018 11:38 pm (37149)


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

mtik333, posted Sun Sep 08, 2019 8:57 am (50643)


Sorry for "unearthing" this thread, but I decided to go again working on this stuff. Apparently, I managed to get correct WAV file from demo (ENGELBERG_PL.wav) and its representation in full version of the game (wave412.wav). I also changed the header in wave412.wav to the one from original, so it can be opened in Audacity (engelberg.wav).

What I know is that some files were produced with Sound Forge 4.5 as the reference is present in original PAK file, however I don't think this software could do this kind of conversion. Finally, the game manages to play it without all kind of "chks" and "clicks" that are present in the file that I fetched, so there must be some kind of code that manages to find out, which bits should be used and which not (I have no idea how it could look like in 2001 though, DirectMusic or something like this could do this maybe).

Once comparing the data, it is visible that some chunks of data are correct while other seem to be replaced when loading the data (see the screenshots in ZIP file).

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.