Page 1 of 1

Warhammer 40,000: Space Marine .PCK Files

Posted: Wed Jan 18, 2012 8:13 am
by Arcalane
These files appear to contain a number of .wav files when scanned with certain applications, but extracted files are possibly encoded and unplayable, usually coming out as a mess of static.

This zip file contains four such .pck files, should anyone want to take a crack at figuring them out. Ultimate goal would be extracting the music since it seems to use the same archive and format.

Re: Warhammer 40,000: Space Marine .PCK Files

Posted: Wed Jan 18, 2012 1:05 pm
by aluigi

Code: Select all

# Warhammer 40000: Space Marine
# script for QuickBMS http://quickms.aluigi.org

math DIDX_OFF  = 0
math DIDX_SIZE = 0
math DATA_OFF  = 0
get PCK_SIZE asize
do
    getdstring SIGN 4
    get SIZE long
    savepos OFFSET
    if SIGN == "DIDX"
        math DIDX_OFF = OFFSET
        math DIDX_SIZE = SIZE
    elif SIGN == "DATA"
        math DATA_OFF = OFFSET
    endif
    math OFFSET += SIZE
    goto OFFSET
while OFFSET < PCK_SIZE

goto DIDX_OFF
math FILES = DIDX_SIZE
math FILES /= 12
for i = 0 < FILES
    get CRC long
    get OFFSET long
    get SIZE long
    math OFFSET += DATA_OFF
    log "" OFFSET SIZE
next i

Re: Warhammer 40,000: Space Marine .PCK Files

Posted: Wed Jan 18, 2012 1:25 pm
by Arcalane
Everything extracts alright, and it looks like the files can be rendered into playable .ogg files using hcs' ww2ogg app.

Thanks!

Re: Warhammer 40,000: Space Marine .PCK Files

Posted: Thu Sep 20, 2012 6:55 pm
by Researchman
Script dont work on the big files - extracts only small files from big .pcks(in_game_default, music_01).

WAVE Scanner from here viewtopic.php?f=13&p=74664#p74664 - extract all WAVEfmt data, but some music is cut to pieces, and ww2ogg decode with "scratches".