MDCD

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Software)
m (Change telparia.com samples link to template)
 
(One intermediate revision by one user not shown)
Line 16: Line 16:
  
 
== Identification ==
 
== Identification ==
Files begin with the ASCII signature "{{magic|MDmd}}".
+
* Files begin with the ASCII signature "{{magic|MDmd}}".
 +
* Offset 5 should always be {{magic|0x01}} (the header type).
 +
* Offset 6 and 7 have the bytes {{magic|0x7a 0x00}}, which is a word telling you that the whole header sizes 122 bytes.
 +
* Offset 24 has the byte {{magic|0x00}} (uncompressed) or {{magic|0x01}} (compressed) for the stored content. If uncompressed, two following pairs of 4 bytes must be identical (same file size for original and compressed). If compressed, the former should always be bigger than the latter, because MDCD will never store compressed files which turn out bigger than their original.
  
 
== Specifications ==
 
== Specifications ==
* For information about the header format, see the source code, MDCD.PAS, look for "FileHeader = Record".
+
* For information about the header format, see the source code, MDCD.PAS, look for "FileHeader = Record". As per Pascal for DOS the record is byte aligned, sizing 122 bytes in total (in FreePascal you'd need to define it as "Packed Record"). Type "DirStr" is a "String[67]" from the DOS unit. All "String[]" types store their length in a preceding byte, so "String[12]" means 13 bytes in total.
  
 
== Software ==
 
== Software ==
* {{CdTextfiles|megarom/megarom1/ARC_LBR/MDCD10.ZIP|MDCD v1.0}} - DOS binary + source code
+
* {{CdTextfiles|megarom/megarom1/ARC_LBR/MDCD10.ZIP|MDCD v1.0}} - DOS binary   source code
 
* {{Deark}}
 
* {{Deark}}
  
 
== Sample files ==
 
== Sample files ==
* https://telparia.com/fileFormatSamples/archive/mdcd/
+
* {{DexvertSamples|archive/mdcd}}
 
* {{CdTextfiles|swextrav8/swextrav8-6/wingame2/lcd95.zip|lcd95.zip}} → CDGRAPHI.LZ
 
* {{CdTextfiles|swextrav8/swextrav8-6/wingame2/lcd95.zip|lcd95.zip}} → CDGRAPHI.LZ
 
* {{CdTextfiles|ccbgames1994/golf/links108.zip|links108.zip}} → *.TIL
 
* {{CdTextfiles|ccbgames1994/golf/links108.zip|links108.zip}} → *.TIL

Latest revision as of 02:54, 28 December 2023

File Format
Name MDCD
Ontology
Extension(s) .md, .cd, others
Released 1988

MDCD is a compressed archiving utility, and its associated native file format. It was developed by Mike Davenport.

It was apparently used in some capacity by the Links 386 Pro video game.

Contents

[edit] Format details

The compression scheme is LZW with an 8K table, possibly identical to that used by Zoo. The CRC algorithm is CRC-16/XMODEM.

[edit] Identifiers

The default filename extension is .md, though some of the example commands inexplicably use .cd instead.

[edit] Identification

  • Files begin with the ASCII signature "MDmd".
  • Offset 5 should always be 0x01 (the header type).
  • Offset 6 and 7 have the bytes 0x7a 0x00, which is a word telling you that the whole header sizes 122 bytes.
  • Offset 24 has the byte 0x00 (uncompressed) or 0x01 (compressed) for the stored content. If uncompressed, two following pairs of 4 bytes must be identical (same file size for original and compressed). If compressed, the former should always be bigger than the latter, because MDCD will never store compressed files which turn out bigger than their original.

[edit] Specifications

  • For information about the header format, see the source code, MDCD.PAS, look for "FileHeader = Record". As per Pascal for DOS the record is byte aligned, sizing 122 bytes in total (in FreePascal you'd need to define it as "Packed Record"). Type "DirStr" is a "String[67]" from the DOS unit. All "String[]" types store their length in a preceding byte, so "String[12]" means 13 bytes in total.

[edit] Software

[edit] Sample files

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox