CDF: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
Note: Formats are aligned to sectors. Any change to files may require full rebuild of whole image. This is typical of PS1 games. | Note: Formats are aligned to sectors. Any change to files may require full rebuild of whole image. This is typical of PS1 games. | ||
There may be a pattern for how files are stored and accessed. At the start of each sector, after the CD-XA header, if the sector is the start of a new file, there will be 16-bytes in front of it first. First 4-bytes with a random number. Then a single byte which represents how many sectors this file will occupy. The rest is zeroed out. With this, I was able to write a program that would go sector-by-sector looking for this header than matched. I was able to extract 1,049 background images in full. | There may be a pattern for how files are stored and accessed. At the start of each sector, after the CD-XA header, if the sector is the start of a new file, there will be 16-bytes in front of it first. First 4-bytes with a random number. Then a single byte which represents how many sectors this file will occupy. The rest is zeroed out. With this, I was able to write a program that would go sector-by-sector looking for this header than matched. I was able to extract 1,049 background images in full. |
Revision as of 03:12, 30 July 2018
Used in the following games:
- Parasite Eve II (PSX)
Note: Formats are aligned to sectors. Any change to files may require full rebuild of whole image. This is typical of PS1 games.
There may be a pattern for how files are stored and accessed. At the start of each sector, after the CD-XA header, if the sector is the start of a new file, there will be 16-bytes in front of it first. First 4-bytes with a random number. Then a single byte which represents how many sectors this file will occupy. The rest is zeroed out. With this, I was able to write a program that would go sector-by-sector looking for this header than matched. I was able to extract 1,049 background images in full.
File Formats | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | Temp | Occurrences (Disk1) | Occurrences (Disk2) | |||||||||||
05FF0008 | BS Format (Backgrounds) | ? | ? | |||||||||||
07FF0008 | String (1byte)? | ? | ? | |||||||||||
02010008 | Unknown | ? | ? | |||||||||||
01010008 | Unknown | ? | ? | |||||||||||
06010008 | Unknown | ? | ? |
Temp: 2018/03/05 From what I have gathered, CDF does not have any type of index in itself however each entry has an identifier at the start of the data portion of the sector that is 16 bytes in length. This contains a unique identifier that is used to determine the content type followed by at least 1 byte that indicates how many frames the data occupies. This goes along with my original findings long ago but now it seems more clear. The only issue may be certain sectors that are in a different mode so the data portion of the sector may be a different length. Scanning a raw dump of the disc might work out better as certain data types such as FMV or audio may use this other CD-XA mode so the structure of the sector is different. My tool will need to be able to handle both paths. One where you scan the CDF directy but may have to skip any file types that require sectors with data greater than 2048 and one that can scan a bin file and handle those special cases. I still need to find an index for the game. The HED file and PE_DISK.01 and .02 are byte-for-byte identical on each disc.