Difference between revisions of "RAC file"
Jump to navigation
Jump to search
Strangerke (talk | contribs) (Fascination TODO- Add first elements of RAC file structure) |
Strangerke (talk | contribs) (Fascination TODO - RAC file: Add details on header) |
||
Line 2: | Line 2: | ||
it contains, for all the missing file, their name, address and size (between others). | it contains, for all the missing file, their name, address and size (between others). | ||
The structure of the file is the | The structure of the file is the following: | ||
'''Header:''' | '''Header:''' | ||
18 bytes, contains a version, arraysize1 and arraysize2 | 18 bytes, contains a version, arraysize1 and arraysize2 | ||
* 2 bytes: magic number, must be equal to 0x0300 | |||
* 2 bytes: arraySize1 | |||
* 2 bytes: arraySize2 | |||
* 4 bytes: dummy, overwritten in memory by array1 address (unused for Fascination) | |||
* 4 bytes: dummy, overwritten in memory by array2 address | |||
* 4 bytes: unused ? | |||
'''Body:''' | '''Body:''' | ||
* | * unknownArray: arraySize1 * 14 bytes (unused for Fascination), not encrypted | ||
* | * missingFileArray : arraySize2 * 30 bytes, encrypted | ||
The encryption of the missing file array is a simple XOR. | The encryption of the missing file array is a simple XOR. | ||
Line 16: | Line 22: | ||
missingFileArray[i] ^= (i * i); | missingFileArray[i] ^= (i * i); | ||
The structure of this array is then, for each 30 bytes in it: | The structure of this array is then, for each 30 bytes block in it: | ||
* 14 bytes: filename | * 14 bytes: filename | ||
* 10 bytes: unknown (containing the offset on the CDROM ?) | * 10 bytes: unknown (containing the offset on the CDROM ?) | ||
Line 23: | Line 29: | ||
It's interesting to notice that, in this RAC file, | It's interesting to notice that, in this RAC file, | ||
* Coktel used 'intro.stk' name instead of 'disk0.stk' in the other versions | * Coktel used 'intro.stk' name instead of 'disk0.stk' in the other versions of Fascination | ||
* the track audio is present and named 'FASCI1N.SON'. Of course, We don't need this file. | * the track audio is present and named 'FASCI1N.SON'. Of course, We don't need this file. |
Latest revision as of 08:51, 27 August 2010
The RAC file is the file used by Coktel for the protection in Fascination CD (deleted TOC). it contains, for all the missing file, their name, address and size (between others).
The structure of the file is the following:
Header: 18 bytes, contains a version, arraysize1 and arraysize2
- 2 bytes: magic number, must be equal to 0x0300
- 2 bytes: arraySize1
- 2 bytes: arraySize2
- 4 bytes: dummy, overwritten in memory by array1 address (unused for Fascination)
- 4 bytes: dummy, overwritten in memory by array2 address
- 4 bytes: unused ?
Body:
- unknownArray: arraySize1 * 14 bytes (unused for Fascination), not encrypted
- missingFileArray : arraySize2 * 30 bytes, encrypted
The encryption of the missing file array is a simple XOR.
for (int i = 0; i < (arraysize2 * 30); i++) missingFileArray[i] ^= (i * i);
The structure of this array is then, for each 30 bytes block in it:
- 14 bytes: filename
- 10 bytes: unknown (containing the offset on the CDROM ?)
- 4 bytes : size
- 2 bytes : unknown
It's interesting to notice that, in this RAC file,
- Coktel used 'intro.stk' name instead of 'disk0.stk' in the other versions of Fascination
- the track audio is present and named 'FASCI1N.SON'. Of course, We don't need this file.