Pure3d P3D: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
imported>Ikskoks
 
(16 intermediate revisions by the same user not shown)
Line 13: Line 13:
// main chunk
// main chunk
4 bytes (char) - signature // "P3D\xFF"
4 bytes (char) - signature // "P3D\xFF"
4 bytes (uint32) - chunk header size  // always 12
4 bytes (uint32) - chunk size without subchunks // always 12
4 bytes (uint32) - file size / main chunk size
4 bytes (uint32) - archive size / main chunk size


// subchunks  
// subchunks  
Line 22: Line 22:
                                   //  0x01 0x90 0x01 0x00 / 102401 - image
                                   //  0x01 0x90 0x01 0x00 / 102401 - image
                                   //  etc.
                                   //  etc.
   4 bytes (uint32) - chunk header size
   4 bytes (uint32) - chunk size without subchunks
   4 bytes (uint32) - chunk size
   4 bytes (uint32) - chunk size with subchunks
   x bytes - chunk data  // it can contain other subchunks
   x bytes - chunk data  // it can contain other subchunks
}   
}   
Line 130: Line 130:


* This file format occurs in games made by '''Radical Entertainment'''.
* This file format occurs in games made by '''Radical Entertainment'''.
* Whole P3D file may be compressed with custom '''LZ compression''' method.


=== Games ===  
=== Games ===  
List of games using this file format:
List of games using this file format:
* Crash Mind Over Mutant
* Crash Mind Over Mutant (*.P3D)
* The Simpsons Hit & Run
* The Simpsons Hit & Run (*.P3D)
* The Simpsons: Road Rage (*.P3D)


=== Compatible Programs ===  
=== Compatible Programs ===  
Line 141: Line 143:
* P3DExplorer
* P3DExplorer
* P3DDiff
* P3DDiff
=== See Also ===
* [https://docs.donutteam.com/docs/pure3d/intro P3D file format]
* [https://docs.donutteam.com/docs/pure3d/chunk-types/all-types All P3D chunk types]
<br/><br>
<br/><br>


Line 146: Line 153:
[[Category:Complete Almost Done|Pure3d P3D]]
[[Category:Complete Almost Done|Pure3d P3D]]
[[Category:Platform PC|Pure3d P3D]]
[[Category:Platform PC|Pure3d P3D]]
[[Category:Platform PSP|Pure3d P3D]]
[[Category:CE None|Pure3d P3D]]
[[Category:CE None|Pure3d P3D]]
[[Category:Format_Archive | Type: Archive]]
[[Category:Format_Archive | Type: Archive]]
[[Category:Extension_p3d | Extension: p3d]]
[[Category:Extension_p3d | Extension: p3d]]
[[Category:BMS_None | BMS: None]]
[[Category:BMS_None | BMS: None]]
[[Category:LZ compression]]
[[Category:File Format]]
[[Category:File Format]]

Latest revision as of 14:13, 24 August 2021

Back to index | Edit this page

P3D

  • Format Type : Archive
  • Endian Order : Little Endian
  • Signature : P3D


Format Specifications

// main chunk
4 bytes (char) - signature // "P3D\xFF"
4 bytes (uint32) - chunk size without subchunks  // always 12
4 bytes (uint32) - archive size / main chunk size

// subchunks 
num_of_subchunks *
{
   4 bytes (uint32) - chunk type   //   0x00 0x90 0x01 0x00 / 102400 - texture
                                   //   0x01 0x90 0x01 0x00 / 102401 - image
                                   //   etc.
   4 bytes (uint32) - chunk size without subchunks
   4 bytes (uint32) - chunk size with subchunks
   x bytes - chunk data   // it can contain other subchunks
}  

Subchunks Specifications

// Texture subchunk data
// 0x00 0x90 0x01 0x00 / 102400

1 byte (uint8) - filename length
32 bytes (char) - filename   // e.g. "C1L2A1-14_residentwindow1.tga"
4 bytes (uint32) - version  // e.g. 14000
4 bytes (uint32) - width
4 bytes (uint32) - height
4 bytes (uint32) - bpp
4 bytes (uint32) - alpha depth
4 bytes (uint32) - mipmaps count
4 bytes (uint32) - texture type  // e.g. 8
4 bytes (uint32) - usage  // e.g. 0
4 bytes (uint32) - priority // e.g. 0
x bytes - data


// Image subchunk data
// 0x01 0x90 0x01 0x00 / 102401

1 byte (uint8) - filename length
32 bytes (char) - filename   // e.g. "C1L2A1-14_residentwindow1.tga"
4 bytes (uint32) - version  // e.g. 14000
4 bytes (uint32) - width
4 bytes (uint32) - height
4 bytes (uint32) - bpp
4 bytes (uint32) - is_palettized flag
4 bytes (uint32) - has_alpha flag
4 bytes (uint32) - image format  // e.g. 10
x bytes - data


// ImageData subchunk data
// 0x02 0x90 0x01 0x00 / 102402

4 bytes (uint32) - image data size
x bytes - data


// Shader subchunk data
// 0x00 0x10 0x01 0x00 / 69632

1 byte (uint8) - filename length
32 bytes (char) - filename   // e.g. "pure3dReflectShader3"
4 bytes (uint32) - version  // e.g. 0
1 byte (uint8) - shader name length
x bytes (char) - shader name  // e.g. "environment"
4 bytes (uint32) - has_transparency flag
4 bytes (uint32) - vertex needs 
4 bytes (int32) - vertex mask
4 bytes (uint32) - params count
x bytes - data


// ShaderTextureParam subchunk data
// 0x02 0x10 0x01 0x00 / 69634

4 bytes (char) - parameter name // e.g. "TEX\x00" or "REFL"
1 byte (uint8) - filename length
32 bytes (char) - filename   // e.g. "pure3dReflectShader3"


// ShaderIntParam subchunk data
// 0x03 0x10 0x01 0x00 / 69634

4 bytes (char) - parameter name // e.g. "LIT\x00"
4 bytes (uint32) - parameter value

MultiEx BMS Script

Not written yet.

Notes and Comments

  • This file format occurs in games made by Radical Entertainment.
  • Whole P3D file may be compressed with custom LZ compression method.

Games

List of games using this file format:

  • Crash Mind Over Mutant (*.P3D)
  • The Simpsons Hit & Run (*.P3D)
  • The Simpsons: Road Rage (*.P3D)

Compatible Programs

See Also