Shockwave .DCR file format
From Computers Wiki
Jump to navigationJump to search
These are some WIP notes on the Shockwave .DCR file format.
Format
- 0000-0003:
RIFX
(little) orXFIR
(big) - 0004-0007: Size of file minus 8, always little-endian (? was LE on a BE file (Hannah and the Ice Caves))
- 0008-000b:
MDGF
(? for BE -- assuming this isFGDM
for LE?) - 000c-000f:
revF
(Fver
for LE?) - 0010-001f: Binary data, followed by a human-readable version string (for HatIC:
0f8a 0101 8e3a 0938 2e35 2e31 2331 3034 .....:.8.5.1#104
) - 0020-0023:
rdcF
(Fcdr
for LE?)
Fcdr
is then followed by a variable-length integer. This appears to mark the compressed size of the following data. On HatIC, this is 0x813a, which becomes 0xba (186 decimal) according to the following algorithm.[1]
public int ReadVarInt()
{
int value = 0;
byte b;
do
{
b = ReadByte();
value = (value << 7) + (b & 0x7F);
}
while (b >> 7 != 0);
return value;
}
The tool offzip decompresses this to 257 bytes of data.[2]
00000000: 0300 04e9 99ac 7000 360b 0000 0800 0737 ......p.6......7 00000010: 7a34 2e98 99ac 5d00 500d 0000 0800 0737 z4....].P......7 00000020: 7a34 89a8 0472 d0af cf11 a222 00a0 2453 z4...r....."..$S 00000030: 444c 4d61 6372 6f6d 6564 6961 207a 6970 DLMacromedia zip 00000040: 6c69 6220 636f 6d70 7265 7373 696f 6e2c lib compression, 00000050: 2063 6f6e 7461 6374 204d 6163 726f 6d65 contact Macrome 00000060: 6469 612c 2049 6e63 2e2c 2053 616e 2046 dia, Inc., San F 00000070: 7261 6e63 6973 636f 2c20 4341 004d 6163 rancisco, CA.Mac 00000080: 726f 6d65 6469 6120 6e75 6c6c 2043 6f6d romedia null Com 00000090: 7072 6573 736f 7200 5357 4120 4465 636f pressor.SWA Deco 000000a0: 6d70 7265 7373 6f72 2058 7472 6120 6672 mpressor Xtra fr 000000b0: 6f6d 204d 6163 726f 6d65 6469 612c 2049 om Macromedia, I 000000c0: 6e63 2e20 2028 6874 7470 3a2f 2f77 7777 nc. (http://www 000000d0: 2e6d 6163 726f 6d65 6469 612e 636f 6d2c .macromedia.com, 000000e0: 2063 6f6e 7461 6374 2073 7570 706f 7274 contact support 000000f0: 406d 6163 726f 6d65 6469 612e 636f 6d29 @macromedia.com) 00000100: 00
- 00e0-00e3:
PMBA
(ABMP
for LE?) - 00e4-00e8: Unsure, is
a842 00de 13
offzip then detects 5183 bytes of compressed data (12051 uncompressed) starting at 00e9