Parasite Eve 2 HED CDF: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
imported>Ikskoks
 
(36 intermediate revisions by the same user not shown)
Line 13: Line 13:
// HED file format
// HED file format


// header
// unknown entries (120 bytes)
128 bytes - unknown
num_of_entries *
{
  40 bytes - unknown
}




Line 27: Line 30:
</pre>
</pre>
</div>
</div>


=== Format Specifications (STAGE0.CDF) ===  
=== Format Specifications (STAGE0.CDF) ===  
Line 39: Line 41:
{
{
   x bytes - data block
   x bytes - data block
  x bytes - padding
}
}
</pre>
</pre>
</div>
</div>


=== Format Specifications (STAGE1 - STAGE3) ===  
=== Format Specifications (STAGE1 - STAGE3) ===  
Line 53: Line 55:
// valid for STAGE1-STAGE3 files
// valid for STAGE1-STAGE3 files


// TODO
// global TOC (2048 bytes)
num_of_entries *
{
  4 bytes (uint32) - ID
  4 bytes (uint32) - file size in sectors
                      // real_size = size * 2048
}
x bytes - padding
x bytes - unknown
x bytes - padding
 
 
num_of_entries *
{
  // local TOC (2048 bytes)
  num_of_entries *
  {
      4 bytes (uint32) - ID
      4 bytes (uint32) - file offset in sectors
                          // real_offset = offset * 2048
  }
  x bytes - padding
  x bytes - unknown
  x bytes - padding
 
 
  num_of_entries *
  {
      // data block
      16 bytes - data block header  // This header not always occurs!
                                    // Sometimes there is just raw data or sound data
      x bytes - data
  }
}
</pre>
</pre>
</div>
</div>
=== Data Blocks Types ===
First byte of the data block header can indicate type of the file stored inside this data block.<br>
Below table describe type mapping:<br>
{| class="wikitable sortable"
|-
!    File Type      !! File Description        !! Suggested File Extension   
|-
|    0              || Room package            || .pe2pkg
|-
|    1              || Image                  || .pe2img
|-
|    2              || CLUT                    || .pe2clut
|-
|    4              || CAP2 Text              || .pe2cap2
|-
|    5              || Room backgrounds        || .bs
|-
|    6              || SPK/MPK music program  || .spk
|-
|    7              || ASCII text              || .txt
|-
|    96              || Sounds                  || .pe2snd
|-
|}


=== MultiEx BMS Script ===  
=== MultiEx BMS Script ===  
Line 63: Line 126:
=== Notes and Comments ===  
=== Notes and Comments ===  


None.
* Files inside archive may be compressed with custom '''LZSS compression'''.


=== Games ===  
=== Games ===  
Line 71: Line 134:
=== Compatible Programs ===  
=== Compatible Programs ===  


None.
* [https://drive.google.com/file/d/1M28Ar9IORNZlYxuu7W8VZ_Nv5cH-E_1R/view?usp=sharing PE2 extractor + source code]
* [https://github.com/bartlomiejduda/Tools/blob/master/NEW%20Tools/Parasite%20Eve%202/Parasite_Eve_2_CDF_HED_Tool.py Parasite_Eve_2_CDF_HED_Tool.py]
* [https://drive.google.com/file/d/1HtjdshzO1i10APLOrsoHIJBoR29k1gar/view PE2BV]
<br/><br>
<br/><br>


Line 82: Line 147:
[[Category:Extension_cdf | Extension: cdf]]
[[Category:Extension_cdf | Extension: cdf]]
[[Category:BMS_None | BMS: None]]
[[Category:BMS_None | BMS: None]]
[[Category:LZSS compression]]
[[Category:File Format]]
[[Category:File Format]]

Latest revision as of 21:46, 9 May 2021

Back to index | Edit this page

HED, CDF


Format Specifications (STAGE0.HED)

// Parasite Eve 2
// HED file format

// unknown entries (120 bytes)
num_of_entries *
{
   40 bytes - unknown
}


num_of_entries *
{
   4 bytes (uint32) - entry ID
   4 bytes (uint32) - offset in sectors
                      // real_offset = offset * 2048
}

x bytes - padding  // 0xFF 0xFF...

Format Specifications (STAGE0.CDF)

// Parasite Eve 2
// STAGE0.CDF file format

num_of_blocks *
{
   x bytes - data block
   x bytes - padding
}

Format Specifications (STAGE1 - STAGE3)

// Parasite Eve 2
// CDF file format

// valid for STAGE1-STAGE3 files

// global TOC (2048 bytes)
num_of_entries *
{
   4 bytes (uint32) - ID
   4 bytes (uint32) - file size in sectors
                       // real_size = size * 2048
}
x bytes - padding
x bytes - unknown
x bytes - padding


num_of_entries *
{
   // local TOC (2048 bytes)
   num_of_entries *
   {
      4 bytes (uint32) - ID
      4 bytes (uint32) - file offset in sectors
                          // real_offset = offset * 2048
   }
   x bytes - padding
   x bytes - unknown
   x bytes - padding


   num_of_entries *
   {
      // data block
      16 bytes - data block header   // This header not always occurs!
                                     // Sometimes there is just raw data or sound data
      x bytes - data
   }
}

Data Blocks Types

First byte of the data block header can indicate type of the file stored inside this data block.
Below table describe type mapping:

File Type File Description Suggested File Extension
0 Room package .pe2pkg
1 Image .pe2img
2 CLUT .pe2clut
4 CAP2 Text .pe2cap2
5 Room backgrounds .bs
6 SPK/MPK music program .spk
7 ASCII text .txt
96 Sounds .pe2snd

MultiEx BMS Script

Not written yet.

Notes and Comments

  • Files inside archive may be compressed with custom LZSS compression.

Games

List of games using this file format:

  • Parasite Eve 2

Compatible Programs