ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat Jul 24, 2021 2:40 am

All times are UTC




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: DiRT 3(.WIM)
PostPosted: Fri Apr 03, 2015 12:34 pm 

Joined: Sun Aug 24, 2014 8:54 am
Posts: 157
Samples:
http://www60.zippyshare.com/v/372ulIx7/file.html


Top
   
 Post subject: Re: DiRT 3(.WIM)
PostPosted: Mon Apr 20, 2015 8:19 pm 

Joined: Sat Aug 09, 2014 11:21 am
Posts: 645
I'm also interested in this!
Supposedly the files can by decoded with http://www.moddb.com/games/dirt-3/downl ... audio-tool But the program won't start under Win 8...


Top
   
 Post subject: Re: DiRT 3(.WIM)
PostPosted: Sat Jun 06, 2015 12:48 am 

Joined: Sat Jun 06, 2015 12:41 am
Posts: 1
I know this is an old topic but:

Code:
 sox -t raw -e mu-law -r 96k _mus_fnd_quad01.ulaw test.wav


Works fine. I didn't even have to cheat and decompile the Ego Audio Tool (although I do wish people would release their source code)

The above sox command is right, but the proper sample rates can be found in the musicPlayer.xml.

See https://github.com/voltagex/Modest/tree/master


Top
   
 Post subject: Re: DiRT 3(.WIM)
PostPosted: Sun Jun 14, 2015 1:55 pm 

Joined: Sat Aug 09, 2014 11:21 am
Posts: 645
Thanks for this vital information! I didn't know what to make of the strange characer distribution of the streams. Now I know that this is μ-Law!:)
In this case you can use my wave header adder from http://forum.xentax.com/viewtopic.php?f ... 565#p71565 (set codec to 7, bits to 8 and blockalign to 2).


Top
   
 Post subject: Re: DiRT 3(.WIM)
PostPosted: Tue Aug 30, 2016 2:12 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12321
Oh, my surprise when I was looking for a way to play the WIM files of DiRT Showdown and found this topic on my forum :D

If you want to play the files directly with sox it's enough to use -d instead of the output file name... just in case someone wants to save space:
Code:
sox -t raw -e mu-law -r 96k YOUR_FILE.WIM -d


Instead if you want to add a RIFF/WAV header to the WIM file for playing them with various media player (for example Winamp or mplayer) you can use this script:
Code:
get SIZE asize
math CHANNELS = 1
math FREQUENCY = 96000
math BITS = 8
get NAME basename
string NAME + ".wav"
callfunction TOWAV_MULAW 1

startfunction TOWAV_MULAW
    set BLOCKALIGN long BITS
    set AVGBYTES long FREQUENCY
    math BLOCKALIGN / 8
    math BLOCKALIGN * CHANNELS
    math AVGBYTES * BLOCKALIGN

    log MEMORY_FILE 0 0
    putdstring "RIFF" 4 MEMORY_FILE
    put 0 long MEMORY_FILE
    putdstring "WAVE" 4 MEMORY_FILE
    putdstring "fmt " 4 MEMORY_FILE
    put 0 long MEMORY_FILE
    put 7 short MEMORY_FILE             # wFormatTag
    put CHANNELS short MEMORY_FILE      # wChannels
    put FREQUENCY long MEMORY_FILE      # dwSamplesPerSec
    put AVGBYTES long MEMORY_FILE       # dwAvgBytesPerSec
    put BLOCKALIGN short MEMORY_FILE    # wBlockAlign
    put BITS short MEMORY_FILE          # wBitsPerSample
    put 0x0 short MEMORY_FILE
    savepos TMP MEMORY_FILE
    math TMP - 0x14
    putvarchr MEMORY_FILE 0x10 TMP long

    putdstring "fact" 4 MEMORY_FILE
    put 4 long MEMORY_FILE
    put SIZE long MEMORY_FILE

    putdstring "data" 4 MEMORY_FILE
    put SIZE long MEMORY_FILE

    get RIFFSIZE asize MEMORY_FILE
    math RIFFSIZE + SIZE
    math RIFFSIZE - 8
    putvarchr MEMORY_FILE 4 RIFFSIZE long
    math RIFFSIZE - SIZE
    math RIFFSIZE + 8
    log NAME 0 RIFFSIZE MEMORY_FILE
    append
    log NAME OFFSET SIZE
    append
endfunction


It's easy to use it in batch with all the files from command-line:
Code:
quickbms.exe -F "{}win_mus{}.wim" 1.bms "C:\Program Files (x86)\Steam\SteamApps\common\DiRT Showdown\audio\dictionaries" c:\dirt_output


Top
   
 Post subject: Re: DiRT 3(.WIM)
PostPosted: Tue Aug 30, 2016 2:52 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12321
Just a small improvement of the previous script.


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