Rollcage 2 IMG: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Dinoguy1000
(update/cleanup)
Line 1: Line 1:
* [[GRAFs|Return to the list of games]]
{{GRAFPageHeader}}


Choose archive extension:
== IMG + IDX ==
{{GRAFPageMisc}}


== IMG + IDX ==  
=== Format Specifications ===
{{GRAFPageFormat|1={{BlockDescription| // IDX FILE }}
: {{BlockDescription| // for each file }}
:: uint32 {4}   - File Offset
:: uint32 {4}   - Compressed File Length
:: uint32 {4}   - Decompressed File Length
:: uint32 {4}   - ''Unused''


* ''' Format Type ''':   Archive <br>
{{BlockDescription| // IMG FILE }}
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>
: {{BlockDescription| // for each file }}
:: char {4}&nbsp;&nbsp;&nbsp;&nbsp; - File Header {{Constant|(GT20)}}
:: uint32 {4}&nbsp;&nbsp; - Decompressed File Length
:: uint32 {4}&nbsp;&nbsp; - ''Unused'' {{InlineComment|(Same as the Unused field in the IDX File)}}
:: uint32 {4}&nbsp;&nbsp; - Length of additional Information
:: char {X}&nbsp;&nbsp;&nbsp;&nbsp; - Additional Information
:: byte {X}&nbsp;&nbsp;&nbsp;&nbsp; - Compressed Data


Compressed Data:
: uint32 {4}&nbsp;&nbsp; - 'ControlBits'
: char {X}&nbsp;&nbsp;&nbsp;&nbsp; - Compressed Data
: uint32 {4}&nbsp;&nbsp; - 'ControlBits'
: char {X}&nbsp;&nbsp;&nbsp;&nbsp; - Compressed Data
: ..


=== Format Specifications ===
: The ControlBits say how to decompress the data.
:: Whether the Bit is 0 and the next Byte is not compressed,
:: or the Bit is 1 and the next Byte(s) is/are compressed.
:: If the next Byte(s) is/are compressed, the next ControlBit say how its compressed.
::: The Next Bit is 0:
:::: The decompressor reads the next Byte from the Data.
:::: This Byte OR FFFFFF00 (int32) say the decompressor how much bytes to go back.
:::: From that position the decompressor copies 2 bytes to the end of the already decompressed Data.
:::: If the next ControlBit is 1 the decompressor copies 2 additional Bytes.
:::: If the next ControlBit is 1 the decompressor copies 1 additional Byte.
::: The Next Bit is 1:
:::: The decompressor reads the two next Bytes.
:::: The first three bits of theese is the number of bytes to copy-2.
:::: The rest 13 bits OR FFFFE000 (int32) defines the position from where the bytes have to be copied.
:::: If the number of bytes to copy is 0, the decompressor reads also the next byte.
::::: The first bit of this byte indicates that 2^14 will be deducated from the position from where the bytes have to be copied.
::::: The rest is the number of bytes to copy-2. If this is again 0, the decompressor have to read the next 2 bytes, which is the number of bytes to copy.


<tt><b>
<font color="blue"> ''' // IDX FILE ''' </font> <br>
: <font color="blue"> ''' // for each file ''' </font> <br>
:: uint32 {4}&nbsp;&nbsp; - File Offset <br>
:: uint32 {4}&nbsp;&nbsp; - Compressed File Length <br>
:: uint32 {4}&nbsp;&nbsp; - Decompressed File Length <br>
:: uint32 {4}&nbsp;&nbsp; - '' Unused '' <br>
<br>
<font color="blue"> ''' // IMG FILE ''' </font> <br>
: <font color="blue"> ''' // for each file ''' </font> <br>
:: char {4}&nbsp;&nbsp;&nbsp;&nbsp; - File Header <font color="purple">(GT20)</font> <br>
:: uint32 {4}&nbsp;&nbsp; - Decompressed File Length <br>
:: uint32 {4}&nbsp;&nbsp; - '' Unused <font color="purple">(Same as the Unused field in the IDX File)</font> '' <br>
:: uint32 {4}&nbsp;&nbsp; - Length of additional Information <br>
:: char {X}&nbsp;&nbsp;&nbsp;&nbsp; - Additional Information <br>
:: byte {X}&nbsp;&nbsp;&nbsp;&nbsp; - Compressed Data <br>
<br>
Compressed Data: <br>
: uint32 {4}&nbsp;&nbsp; - 'ControlBits' <br>
: char {X}&nbsp;&nbsp;&nbsp;&nbsp; - Compressed Data <br>
: uint32 {4}&nbsp;&nbsp; - 'ControlBits' <br>
: char {X}&nbsp;&nbsp;&nbsp;&nbsp; - Compressed Data <br>
: .. <br>
<br>
: The ControlBits say how to decompress the data. <br>
:: Whether the Bit is 0 and the next Byte is not compressed, <br>
:: or the Bit is 1 and the next Byte(s) is/are compressed. <br>
:: If the next Byte(s) is/are compressed, the next ControlBit say how its compressed. <br>
::: The Next Bit is 0: <br>
:::: The decompressor reads the next Byte from the Data. <br>
:::: This Byte OR FFFFFF00 (int32) say the decompressor how much bytes to go back. <br>
:::: From that position the decompressor copies 2 bytes to the end of the already decompressed Data. <br>
:::: If the next ControlBit is 1 the decompressor copies 2 additional Bytes. <br>
:::: If the next ControlBit is 1 the decompressor copies 1 additional Byte. <br>
::: The Next Bit is 1: <br>
:::: The decompressor reads the two next Bytes. <br>
:::: The first three bits of theese is the number of bytes to copy-2. <br>
:::: The rest 13 bits OR FFFFE000 (int32) defines the position from where the bytes have to be copied. <br>
:::: If the number of bytes to copy is 0, the decompressor reads also the next byte. <br>
::::: The first bit of this byte indicates that 2^14 will be deducated from the position from where the bytes have to be copied. <br>
::::: The rest is the number of bytes to copy-2. If this is again 0, the decompressor have to read the next 2 bytes, which is the number of bytes to copy. <br>
<br>
Example:
Example:


</b></tt>
}}


=== MultiEx BMS ===  
=== MultiEx BMS ===
Not written yet


Not written yet<br><br>
=== Notes and Comments ===
* The *.IDX file contains the directory, the *.IMG file contains the data


=== Notes and Comments ===  
=== Supported Programs ===
* [[Game Extractor|Game Extractor]]


* The *.IDX file contains the directory, the *.IMG file contains the data<br>
{{GRAFPageFooter}}
<br>
=== Supported Programs ===


* [[Game Extractor|Game Extractor]]<br>
{{DEFAULTSORT:{{PAGENAME}}}}
[[Category:PC formats]]

Revision as of 18:03, 21 October 2011

Back to index | Edit this page

IMG + IDX

Format Specifications

// IDX FILE
// for each file
uint32 {4}   - File Offset
uint32 {4}   - Compressed File Length
uint32 {4}   - Decompressed File Length
uint32 {4}   - Unused

// IMG FILE

// for each file
char {4}     - File Header (GT20)
uint32 {4}   - Decompressed File Length
uint32 {4}   - Unused (Same as the Unused field in the IDX File)
uint32 {4}   - Length of additional Information
char {X}     - Additional Information
byte {X}     - Compressed Data

Compressed Data:

uint32 {4}   - 'ControlBits'
char {X}     - Compressed Data
uint32 {4}   - 'ControlBits'
char {X}     - Compressed Data
..
The ControlBits say how to decompress the data.
Whether the Bit is 0 and the next Byte is not compressed,
or the Bit is 1 and the next Byte(s) is/are compressed.
If the next Byte(s) is/are compressed, the next ControlBit say how its compressed.
The Next Bit is 0:
The decompressor reads the next Byte from the Data.
This Byte OR FFFFFF00 (int32) say the decompressor how much bytes to go back.
From that position the decompressor copies 2 bytes to the end of the already decompressed Data.
If the next ControlBit is 1 the decompressor copies 2 additional Bytes.
If the next ControlBit is 1 the decompressor copies 1 additional Byte.
The Next Bit is 1:
The decompressor reads the two next Bytes.
The first three bits of theese is the number of bytes to copy-2.
The rest 13 bits OR FFFFE000 (int32) defines the position from where the bytes have to be copied.
If the number of bytes to copy is 0, the decompressor reads also the next byte.
The first bit of this byte indicates that 2^14 will be deducated from the position from where the bytes have to be copied.
The rest is the number of bytes to copy-2. If this is again 0, the decompressor have to read the next 2 bytes, which is the number of bytes to copy.
Example:

MultiEx BMS

Not written yet

Notes and Comments

  • The *.IDX file contains the directory, the *.IMG file contains the data

Supported Programs

Navigation

Jump to a listing by...
All Formats - Common Formats - Standard Formats - Malformed Pages
Platforms
Microsoft:
Xbox
Xbox 360
Nintendo:
GameCube
DS
Desktop:
PC
Sega:
Dreamcast
Sony:
PlayStation
PlayStation 2
PlayStation 3
PlayStation Portable
Type
Animation - Archive - Audio - Image - Mesh - Miscellaneous - Model - Video
Endianness
Little-endian - Big-endian
BMS Scripts
Pages Without a BMS Script

All Pages with Scripts:
Recently Added Scripts

Program Support
No Known Support

MultiEx Commander - Game Extractor

Format Specification Completion
Work in Progress - Almost Done - Completed
Compression and Encryption
No Compression or Encryption Used - Unknown Compression or Encryption Used

One or Both Used:
Compression Used - Both Compression and Encryption Used