Offtopic: Into Commodore 64 (6502) coding, pixeling or music?
Xentax is looking for new members for the C64 activities!
Just drop us a message at forum@xentax.com and join the Scene Team!

Forum rules: Click here

Wolf Team *.xfs archive format.

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
napoleon321
advanced
Posts: 59
Joined: Tue Nov 16, 2010 12:11 pm
Has thanked: 9 times
Been thanked: 4 times

Wolf Team *.xfs archive format.

Post by napoleon321 » Fri Apr 17, 2015 7:51 am

Hello, I wonder have anyone of you skilled reverse engineers checked the archive file format of the game called Wolf Team (http://wolfteam.aeriagames.com/). The file format is .xfs, and so far i haven't seen anyone extracting it. I wonder can someone take a look at it? (and maybe write one of your those bms scripts?) The main archive file however is 2.2gb,(no worries, i have uploaded it on dropbox) also i have cut a piece of it with hex editor.
here's samle of the xfs file format:

http://www.mediafire.com/download/xp2xl ... /sound.xfs (70 Mb)

http://www.mediafire.com/download/z6p98 ... m_wolf.xfs (113 Mb)

and here's the 2,2 Gb file...

https://www.dropbox.com/s/znsyg9s5ys7tsw4/wolf.xfs?dl=0

I hope someone can figure out this format

Thanks for your time and understanding.

Gh0stBlade
Moderator
Posts: 683
Joined: Mon Jul 05, 2010 8:55 pm
Has thanked: 20 times
Been thanked: 328 times

Re: Wolf Team *.xfs archive format.

Post by Gh0stBlade » Fri Apr 17, 2015 1:50 pm

It's just chunks of zlib compressed data. offzip worked on it pretty well. It's odd that there's no file table info, perhaps it's stored in another file.
Click the thanks button if I helped!

napoleon321
advanced
Posts: 59
Joined: Tue Nov 16, 2010 12:11 pm
Has thanked: 9 times
Been thanked: 4 times

Re: Wolf Team *.xfs archive format.

Post by napoleon321 » Sat Apr 18, 2015 8:31 pm

I checked offzip.. but it extracts tones of 64kb files.. that's are in no use to me... I'm sure they are not supposed to be in this form.. maybe something is wrong...

User avatar
chrrox
Moderator
Posts: 2557
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1289 times

Re: Wolf Team *.xfs archive format.

Post by chrrox » Sat Apr 18, 2015 10:22 pm

use the -1 option to merge them.

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Re: Wolf Team *.xfs archive format.

Post by Mr.Mouse » Sun Apr 19, 2015 10:06 am

https://www.youtube.com/watch?v=ZBq29FJ ... GrVNJ2kS2f

Some more details in this Let's MultiEx :)

User avatar
chrrox
Moderator
Posts: 2557
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1289 times

Re: Wolf Team *.xfs archive format.

Post by chrrox » Sun Apr 19, 2015 3:12 pm

very annoying archive format.
Its recursive that is what those numbers are before the folder names.
Root
----am_br_dist_thun.wav
----br_rain.wav
----wt_snd
--------interface
------------chat_message.wav
------------msg_no_die_blue.wav
------------msg_round_exbase_red_start.wav
------------msg_round_first_kill.wav
------------popup_window_close.wav
------------box_animation.wav

so the path for box_animation.wav would be
Root\wt_snd\interface\box_animation.wav

napoleon321
advanced
Posts: 59
Joined: Tue Nov 16, 2010 12:11 pm
Has thanked: 9 times
Been thanked: 4 times

Re: Wolf Team *.xfs archive format.

Post by napoleon321 » Tue Apr 21, 2015 9:07 pm

Hello, I'm sorry for bumping the topic, but do you have any new development on the archive format? I'm not trying to rush you, I'm just hoping to see something new about it. :)
Thank you for your time and understanding.

napoleon321
advanced
Posts: 59
Joined: Tue Nov 16, 2010 12:11 pm
Has thanked: 9 times
Been thanked: 4 times

Re: Wolf Team *.xfs archive format.

Post by napoleon321 » Tue Apr 28, 2015 8:40 pm

Really big thanks to Luigi Auriemma, who wrote a bms scrip for the archive type after I have sent him the samples. :)

http://aluigi.altervista.org/papers/bms/xenesis.bms

Thanks again!

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Re: Wolf Team *.xfs archive format.

Post by Mr.Mouse » Tue Apr 28, 2015 9:26 pm

Nice work.

Here it is also:

Code: Select all

 
"# Xenesis File System
#   Wolf Team and maybe other AeriaGames titles
#
#   The archives are incrementally updated after every
#   patch and the new file table is appended at the end,
#   that's the reason why the total amount of extracted
#   files is minor than the original (big) archive size.
# script for QuickBMS http://quickbms.aluigi.org

get OFFSET long
# XFS2 uses a 32bit offset instead of 48 bit one so let's use a work-around to guess it
get TMP asize
if TMP u> 0xffffffff
    get OFFSET48 short 
    xmath OFFSET "OFFSET | (OFFSET48 << 32)"
endif
goto OFFSET
get ZSIZE byte
savepos OFFSET
clog MEMORY_FILE OFFSET ZSIZE 0x40

idstring MEMORY_FILE "XFS"
get XFS_VERSION byte MEMORY_FILE
get DUMMY long MEMORY_FILE
get ENTRIES long MEMORY_FILE
get ZERO long MEMORY_FILE
get XFS_OFFSET long MEMORY_FILE

math OFFSET + ZSIZE
goto OFFSET
if XFS_VERSION == ' '
    get INFO_SIZE threebyte
    get INFO_ZSIZE threebyte
else
    get INFO_ZSIZE threebyte
    xmath INFO_SIZE "ENTRIES * 0x80"
endif
savepos OFFSET
clog MEMORY_FILE OFFSET INFO_ZSIZE INFO_SIZE

if XFS_VERSION == ' '
    set PATH string ""
    set NAME string ""
    callfunction EXTRACT

elif XFS_VERSION == '2'
    for INFO_OFF = 0 < INFO_SIZE
        getdstring NAME 0x70 MEMORY_FILE
        get OFFSET long MEMORY_FILE
        get DUMMY long MEMORY_FILE  # 1
        get SIZE long MEMORY_FILE
        get ZSIZE long MEMORY_FILE
        savepos INFO_OFF MEMORY_FILE
        callfunction EXTRACT_FILE 1
    next

else
    print "Error: unknown XFS version %XFS_VERSION%"
    cleanexit
endif



startfunction EXTRACT
    string PATH + NAME
    string PATH + /
    get ENTRIES long MEMORY_FILE
    get NAMESZ byte MEMORY_FILE
    getdstring NAME NAMESZ MEMORY_FILE
    get OFFSET long MEMORY_FILE
    get OFFSET48 short MEMORY_FILE
    xmath OFFSET "OFFSET | (OFFSET48 << 32)"
    get SIZE long MEMORY_FILE
    get ZSIZE long MEMORY_FILE
    get IS_FILE byte MEMORY_FILE

    if IS_FILE != 0
        string NAME p "%s%s" PATH NAME
        callfunction EXTRACT_FILE 1
    endif

    for i = 0 < ENTRIES
        callfunction EXTRACT
    next i
endfunction



startfunction EXTRACT_FILE
    xmath END_OFFSET "OFFSET + ZSIZE"
    putvarchr MEMORY_FILE2 SIZE 0
    log MEMORY_FILE2 0 0
    append
    for OFFSET = OFFSET != END_OFFSET
        goto OFFSET
        get CHUNK_SIZE threebyte
        xmath FLAGS "CHUNK_SIZE >> 22"
        math CHUNK_SIZE & 0x3fffff

        if FLAGS & 2
            if FLAGS & 1
            else
                get CHUNK_ZSIZE threebyte
            endif
        endif
        if FLAGS == 0
            math CHUNK_ZSIZE = CHUNK_SIZE
            math CHUNK_SIZE = 0x10000
        endif
        get DUMMY short
        savepos OFFSET

        if FLAGS & 1
            log MEMORY_FILE2 OFFSET CHUNK_SIZE
            math OFFSET + CHUNK_SIZE
        else
            clog MEMORY_FILE2 OFFSET CHUNK_ZSIZE CHUNK_SIZE
            math OFFSET + CHUNK_ZSIZE
        endif
    next
    append
    log NAME 0 SIZE MEMORY_FILE2
endfunction

Post Reply