The Forum is up for sale: XeNTaX Forum looking for new owner

How to extracting files play archive?

Coders and would-be coders alike, this is the place to talk about programming.
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

Oke guys..... you will look this

[img=http://img373.imageshack.us/img373/9012 ... urc.th.png]

I still missed what with the selection game arhive ? Help to complete to the end plz :) .... According to the form you will say that light archive and plugin of script it will be fast written :roll:

Archive download here
http://rapidshare.de/files/9834773/reso ... t.zip.html
5271217 Bytes
:roll:

Thx
User avatar
friendsofwatto
VVIP member
VVIP member
Posts: 532
Joined: Wed Jun 30, 2004 3:01 pm
Location: Australia
Been thanked: 13 times
Contact:

Post by friendsofwatto »

Hi mate,

I have been out all night for christmas, and havn't really had much sleep, but the main thing to remember is that fields are usually 2, 4, or 8 bytes. So, the header would be 4 bytes (PXMD), the number of files and the version field would both be 2 bytes, etc.

I will have a better analysis in probably 12-ish hours - I need some sleep :)

WATTO
watto@watto.org
http://www.watto.org
Game Extractor - Read and write thousands of game archives!
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

Well, KorNet was right about the format. The IDString = PXMDY. followed by the number of resources.

Here's the whole BMS:

Code: Select all

ImpType Standard ;
IDString 0 PXMDY ;
Get RN Long 0 ;
For T = 1 To RN ;
SavePos FSO 0 ;
Get FS Long 0 ;
SavePos FOO 0 ;
Get FO Long 0 ;
Get NameSize Byte 0 ;
GetDString FileName NameSize 0 ;
Log FileName FO FS FOO FSO ;
Next T ;
Scroll down for the actual BMS.

Small explanation for those interested:

ImpType Standard;
(This tells MultiEx Commander (MexCom) that we can support replacement of resources in archives of this type as well. Standard means we can provide the offset of the resource offsets and resource sizes).

IDString 0 PXMDY ;
(this archive (file 0) is identified by the string "PXMDY")

Get RN Long 0 ;
(read the next 4 bytes (32-bit value or 'long' ) in file 0 and store it in the (new) variable 'RN' - these are the number of resources)

For T = 1 To RN ; (Create a loop that will repeat 'RN' times)

SavePos FSO 0 ; (Store the position the 'filepointer' (or 'filecursor') is at in file 0 in the variable 'FSO' - This is the position where MexCom can find the filesize of the current resource)

Get FS Long 0 ; (Get the 32-bit (long) value from file 0 and store it in 'FS' - this is the size of the current resource)

SavePos FOO 0 ;
(Store the current position in file 0 in the variable FOO - this is the offset of the current resource offset )

Get FO Long 0 ; (Get the 32-bit (long) value from file 0 and store it in 'FO' - this is the offset of the current resource in the archive)

Get NameSize Byte 0 ; (Get the 8-bit value (a byte) from file 0 and store it in 'NameSize' - this is the size of the filename string, so the number of characters in the filename)

GetDString FileName NameSize 0 ; (Get a string from file 0 that is NameSize in length, the D in the command stands for (pre)-Determined size - this is the filename of the current resource )

Log FileName FO FS FOO FSO ;
(Log all of this information for the current resource in the list that MexCom will need, so Log filename, the offset of the resource in the archive, the size of the resource in the archive, the offset of the resource offset variable and the offset of the resource size variable - Note that the latter are only needed in case we can support Importation with this archive , if we don't we can just fill in 0 and 0 there. )

Next T; (Repeat this loop, 'next T' and T will be upped with 1)
You do not have the required permissions to view the files attached to this post.
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

:eek: Thanks Mike :D
User avatar
friendsofwatto
VVIP member
VVIP member
Posts: 532
Joined: Wed Jun 30, 2004 3:01 pm
Location: Australia
Been thanked: 13 times
Contact:

Post by friendsofwatto »

Yeah, you are right :) - wow, this must be one of the rare exceptions :)

My specs are basically the same as Mr Mouses...

Code: Select all

+---------------------------------+
| Backspin Billiards Deluxe *.dat |
+---------------------------------+

5 - Header (PXMDY)
4 - Number Of Files

// for each file
  4 - File Length
  4 - File Offset
  1 - Filename Length
  X - Filename
  
X - File Data
WATTO
watto@watto.org
http://www.watto.org
Game Extractor - Read and write thousands of game archives!
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

hi guys .... Took here game one in it archives in size BIG - BIGF but it by what that not usual... Modified :oops:

Watto , Mike ?
You do not have the required permissions to view the files attached to this post.
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

And this archive in game Scratches RES file... I know guys you can help me :D
You do not have the required permissions to view the files attached to this post.
User avatar
Dinoguy1000
Site Admin
Posts: 786
Joined: Mon Sep 13, 2004 1:55 am
Has thanked: 154 times
Been thanked: 163 times

Post by Dinoguy1000 »

Mr.Mouse wrote:Small explanation for those interested:

ImpType Standard;
(This tells MultiEx Commander (MexCom) that we can support replacement of resources in archives of this type as well. Standard means we can provide the offset of the resource offsets and resource sizes).

IDString 0 PXMDY ;
(this archive (file 0) is identified by the string "PXMDY")
...
Heh... I've been wanting to start on writing a guide for dummies for BMScripting (Whoa, did I just coin a new word for you?), but haven't gotten around to starting... this little bit will just help me all the more when I decide to start.
Welcome to Xentax!

Rules | Requests | Wiki | Discord

If you run across a post that breaks the rules, please report the post - a mod or admin will handle it from there.
User avatar
friendsofwatto
VVIP member
VVIP member
Posts: 532
Joined: Wed Jun 30, 2004 3:01 pm
Location: Australia
Been thanked: 13 times
Contact:

Post by friendsofwatto »

This is the specs for the BIG(BIGF) file. Could you please tell what game this archive is from.

Code: Select all

+---------------+
| Unknown *.big |
+---------------+

// ARCHIVE HEADER
  4 - Header (BIGF)
  4 - Number Of Files
  4 - First File Offset
  4 - Padding Multiple (2048)
  20 - Description? Directory Name? (null)

// FILES DIRECTORY
  // for each file
    16 - Filename (null)
    4 - File Length
    4 - File Offset (relative to the start of the file data)

0-2047 - null Padding to a multiple of 2048 bytes

// FILE DATA  
  // for each file
    X - File Data
    0-2047 - null Padding to a multiple of 2048 bytes

The following 2 fields might be swapped - this would need to be checked against a larger archive.

Code: Select all

  4 - First File Offset
  4 - Padding Multiple (2048)
WATTO
watto@watto.org
http://www.watto.org
Game Extractor - Read and write thousands of game archives!
User avatar
friendsofwatto
VVIP member
VVIP member
Posts: 532
Joined: Wed Jun 30, 2004 3:01 pm
Location: Australia
Been thanked: 13 times
Contact:

Post by friendsofwatto »

Here is the specs for the RES file

Code: Select all

+-----------------+
| Scratches *.res |
+-----------------+

// ARCHIVE HEADER (256 bytes)
  20 - Header (SCream resource file)
  4 - Unknown
  4 - Unknown (14)
  4 - Version (1)
  224 - Junk Padding to offset 256

// DIRECTORY
  4 - Number Of Files
  
  // for each file (92 bytes per entry)
    16 - Filename (null)
    68 - Junk Padding
    4 - File Offset
    4 - File Length
    
// FILE DATA
  // for each file
    X - File Data

I have decided that many of the fields are just junk - they don't seem to have any real value relating to the archive. Some archives do use junk to pad out the files, so it could be that the filename has a maximum length of 84 bytes, although the null padding only goes to byte 16.

Hope this helps. I will make plugins for these games for the next update.

WATTO
watto@watto.org
http://www.watto.org
Game Extractor - Read and write thousands of game archives!
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 680 times
Contact:

Post by Mr.Mouse »

Dinoguy1000 wrote:
Mr.Mouse wrote:Small explanation for those interested:

ImpType Standard;
(This tells MultiEx Commander (MexCom) that we can support replacement of resources in archives of this type as well. Standard means we can provide the offset of the resource offsets and resource sizes).

IDString 0 PXMDY ;
(this archive (file 0) is identified by the string "PXMDY")
...
Heh... I've been wanting to start on writing a guide for dummies for BMScripting (Whoa, did I just coin a new word for you?), but haven't gotten around to starting... this little bit will just help me all the more when I decide to start.
:D Yeah...
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

Post by KorNet »

Sorry Watto immediately he did not say :( ...

Toca Race Driver 3 Honda Civic 2006

the same archives in the games

Colin McRae Rally 04
Colin McRae Rally 05
Toca Race Driver
Toca Race Driver 2
:roll:
Post Reply