Important information: this site is currently scheduled to go offline indefinitely by end of the year.

LADA Racing Club *.BIN

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
KorNet
VVIP member
VVIP member
Posts: 444
Joined: Tue Apr 12, 2005 11:36 am
Been thanked: 4 times

LADA Racing Club *.BIN

Post by KorNet »

The contents of this post was deleted because of possible forum rules violation.
Infinity
n00b
Posts: 11
Joined: Sat Sep 09, 2006 4:42 pm
Been thanked: 1 time

Post by Infinity »

The contents of this post was deleted because of possible forum rules violation.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post by Mr.Mouse »

.PACK archives:

Code: Select all

# LADA Racing .PACK format
# By Mr.Mouse July 2007
# Standard imporation type (offsets and sizes are in the archive).
ImpType Standard ;

# --- GET HEADER ---
# MAGIC word {8}
# Number of files {4}
# Relative offset of Resource Tables 
Get MW1 Long 0;
Get MW2 Long 0 ;
Get FNum Long 0 ;
Get RDPos Long 0 ;
SavePos INPos 0 ;

# --- PREPARE VARIABLES ---
# Calculate the actual offset (include header size)
Math RDPos += 16 ;
# Calculate the offset of the filename string table
Set FNPos Long FNum ;
Math FNPos *= 16 ;
Math FNPos += RDPos ;
# Go there because we need to get the size of that baby to...
GoTo FNPos 0 ;
Get RNSize Long 0 ;
# ...calculate the offset of the Relative FilenameOffset Table 
SavePos FNStart 0 ;
Set FNT Long FNStart ;
Math FNT += RNSize ;

# --- MAIN LOOP ---
For T = 1 To FNum ;
# For each file in the archive:
# Go to the main resource table and get: 
# 1. Offset of internal file marker in the list (comes after the header)
# 2. Absolute Offset of the file (save the position of this variable too)
# 3. Size of the file (save the position of this variable too)
# 4. A reserved 32-bit variable 
# Then go to the filename offset table and get the relative offset 
# of the filename in the filename string table
# Calculate the absolute offset 
# Go there and get the null-terminated string at this location
# All set, log the important variables for MexCom. 
GoTo RDPos 0 ;
Get IOff Long 0 ;
SavePos FOO 0 ;
Get FO Long 0 ;
SavePos FSO 0 ;
Get FS Long 0 ;
Get Reserved Long 0 ;
SavePos RDPos 0 ;
GoTo FNT 0 ;
Get RFNOff Long 0 ;
Math RFNOff += FNStart ;
GoTo FNStart 0 ;
Get FN String 0 ;
SavePos FNStart 0 ;
Log FN FO FS FOO FSO ;
Next T ;
You do not have the required permissions to view the files attached to this post.
Mr.Mouse
Site Admin
Posts: 4073
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 450 times
Been thanked: 682 times
Contact:

Post by Mr.Mouse »

For PAK format (e.g. moscow.pak)

Code: Select all

# LADA Racing .PAK format
# By Mr.Mouse July 2007
# Standard imporation type (offsets and sizes are in the archive).
ImpType Standard ;

# --- GET HEADER ---
# MAGIC word {4}
# Size of tables {4}
# Number of files
Get MW1 Long 0;
Get TSize Long 0 ;
Get FNum Long 0 ;
SavePos RDPos 0 ;

# --- MAIN LOOP ---
For T = 1 To FNum ;
# For each file in the archive:
# Go to the main resource table and get: 
# 1. Relative Offset of the filename string 
# 2. Absolute Offset of the file (save the position of this variable too)
# 3. Size of the file (save the position of this variable too)
# Then go to the filename string table and get a null-terminated string
# All set, log the important variables for MexCom. 
GoTo RDPos 0 ;
Get FNOff Long 0 ;
SavePos FOO 0 ;
Get FO Long 0 ;
SavePos FSO 0 ;
Get FS Long 0 ;
SavePos RDPos 0 ;
# Add the headersize (12) to get the absolute offset 
Math FNOff += 12 ;
GoTo FNOff 0 ;
Get FN String 0 ;
Log FN FO FS FOO FSO ;
Next T ;
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 »

WoW :eek: Respect Mr.Mouse :D
Post Reply