SCRNCH

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
m (Identification)
m (Software)
 
(9 intermediate revisions by one user not shown)
Line 5: Line 5:
 
|released=1988
 
|released=1988
 
}}
 
}}
'''SCRNCH''' is a file compression utility for DOS. It can do executable compression of [[DOS executable (.com)|.COM]] files, and can create self-extracting files. It was developed by Graeme W. McRae, and distributed as shareware.
+
'''SCRNCH''' is a data compression utility and toolkit for DOS. It was developed by Graeme W. McRae, and distributed as shareware.
 +
 
 +
It has two main modes of operations, which it calls Run Mode and Write Mode. Run Mode does [[executable compression]]. Write Mode creates various types of self-decompressing files.
 +
 
 +
== Discussion ==
 +
Run Mode compresses a [[DOS executable (.com)|COM]] file to a COM or (for v1.02) [[MS-DOS EXE|EXE]] file.
 +
 
 +
SCRNCH also provides a way to compress EXE files (to COM or EXE), with help from the included [[SCRE2B]] utility. This is not part of the main SCRNCH utility, though there is an included COMPRESS.BAT script to automate the process.
 +
 
 +
Write Mode compresses a file that is generally not executable, to a COM or EXE file. In the simplest case, it converts a text file to an executable file that prints the text to the screen. With effort, it can do other things, such as ask the user for a filename, then write the decompressed data to that file.
  
 
== Identification ==
 
== Identification ==
SCRNCHed files are [[DOS executable (.com)|.COM]] files. ''[More research needed. [[TrID]] has signatures (→ TrIDScan → TrID XML defs (7Z) → com-scrnch.trid.xml), but as of this writing, they don't seem very robust.]''
+
SCRNCH v1.00-compressed COM files (both modes) start with bytes {{magic|bb ff ff b4 4a cd 21 81 eb}}. The modes can be distinguished. For example, the byte at offset 37 seems to be <code>0x8c</code> for Run Mode, or <code>0xfc</code> for Write Mode.
 +
 
 +
SCRNCH v1.00-compressed EXE files (which must be Write Mode) have {{magic|bb ff ff b4 4a cd 21 81 eb}} at offset 512.
 +
 
 +
Based on analysis of the (decompressed) SCRNCH.COM file, a v1.02 SCRNCHed file contains one of six possible "signature" byte sequences:
 +
 
 +
eb 13 73 43 65 66 0c 03 ("sCef"): Run Mode, default for COM output
 +
eb 13 73 43 67 66 90 03 ("sCgf"): Run Mode
 +
eb 13 73 43 68 66 89 02 ("sChf"): Run Mode, default for EXE output
 +
eb 13 73 43 77 66 ba 03 ("sCwf"): Write Mode, default for COM output
 +
eb 13 73 43 79 66 b4 02 ("sCyf"): Write Mode, default for EXE output
 +
eb 20 73 43 7a 66 33 04 ("sCzf"): Write Mode
 +
 
 +
For COM format, the signature is at the start of the file. For EXE, it's at the start of the ''code image'' segment (refer to [[MS-DOS EXE#Special file positions]]), which is normally at offset 512.
 +
 
 +
Considering that SCRNCH plays fast and loose with converting between COM and EXE formats, it may be possible that all six signatures could appear in both COM and EXE files.
  
 
== Related formats ==
 
== Related formats ==
 +
* [[SCRE2B]]
 
* [[ZIP]] - Reportedly[{{CdTextfilesURL|rbbsv3n1/pool/pkpolicy.zip}}], ZIP's ''Reduce'' compression method is based on SCRNCH's compression method.
 
* [[ZIP]] - Reportedly[{{CdTextfilesURL|rbbsv3n1/pool/pkpolicy.zip}}], ZIP's ''Reduce'' compression method is based on SCRNCH's compression method.
  
Line 16: Line 41:
 
* {{CdTextfiles|carousel/013C/SCRNCH.ZIP|SCRNCH v1.00}} (1988-01-31)
 
* {{CdTextfiles|carousel/013C/SCRNCH.ZIP|SCRNCH v1.00}} (1988-01-31)
 
* {{CdTextfiles|simtel/simtel9510/disk2/DISC2/COMPRESS/SCRNC102.ZIP|SCRNCH v1.02}} (1988-03-28 / 1988-04-04)
 
* {{CdTextfiles|simtel/simtel9510/disk2/DISC2/COMPRESS/SCRNC102.ZIP|SCRNCH v1.02}} (1988-03-28 / 1988-04-04)
 +
* [{{SACFTPURL|pack|dese2b10.zip}} DeSCRE2B] - DOS utility to help decompress SCRNCHed files that were originally in EXE format
 +
 +
See [[Executable compression#Decompression software]] for some multi-format utilities that might be able to decompress Run Mode files. (See also the [[SCRE2B]] article.)
 +
 +
Write Mode files can decompress themselves. In a DOS environment, run the file with the special "<code>stdout</code>" parameter, with output redirected to a file. For example, using the SCRNCH documentation file:
 +
 +
SCRDOC.COM stdout &gt; SCRDOC.DOC
 +
 +
== Sample files ==
 +
v1.00 Run Mode:
 +
* {{CdTextfiles|gigabytesw/010b/sayclear.zip|sayclear.zip}} → SAY-DOC.COM
 +
 +
v1.02 Run Mode:
 +
* {{CdTextfiles|gigabytesw/027a/em87.zip|em87.zip}} → EM87.COM
 +
* {{CdTextfiles|simtel0692/MSDOS/DBASE/PCF501C.ZIP|PCF501C.ZIP}} → D0C.COM
 +
* {{CdTextfiles|smsharew/GENERAL/STARWARS.ZIP|STARWARS.ZIP}} → HARDCOPY.EXE
 +
* {{CdTextfiles|simtel0692/MSDOS/DBASE/PCF501B.ZIP|PCF501B.ZIP}} → DBRPT.EXE, FCONVERT.EXE, PCPACK.EXE
 +
 +
v1.02 Write Mode:
 +
* {{CdTextfiles|pcsig12/CLA/DISK1769.ZIP|DISK1769.ZIP}} → README.COM
 +
* {{CdTextfiles|gigabytesw/030a/grab57.zip|grab57.zip}} → README.COM
 +
* {{CdTextfiles|gigabytesw/030a/prodev1.zip|prodev1.zip}} → PRICEDOC.EXE
 +
* {{CdTextfiles|gigabytesw/030a/prodev3.zip|prodev3.zip}} → QUOTEDOC.EXE
 +
 +
Various:
 +
* SCRNCH.COM and SCRDOC.COM from the SCRNCH distribution

Latest revision as of 18:26, 7 January 2025

File Format
Name SCRNCH
Ontology
Released 1988

SCRNCH is a data compression utility and toolkit for DOS. It was developed by Graeme W. McRae, and distributed as shareware.

It has two main modes of operations, which it calls Run Mode and Write Mode. Run Mode does executable compression. Write Mode creates various types of self-decompressing files.

Contents

 [hide

[edit] Discussion

Run Mode compresses a COM file to a COM or (for v1.02) EXE file.

SCRNCH also provides a way to compress EXE files (to COM or EXE), with help from the included SCRE2B utility. This is not part of the main SCRNCH utility, though there is an included COMPRESS.BAT script to automate the process.

Write Mode compresses a file that is generally not executable, to a COM or EXE file. In the simplest case, it converts a text file to an executable file that prints the text to the screen. With effort, it can do other things, such as ask the user for a filename, then write the decompressed data to that file.

[edit] Identification

SCRNCH v1.00-compressed COM files (both modes) start with bytes bb ff ff b4 4a cd 21 81 eb. The modes can be distinguished. For example, the byte at offset 37 seems to be 0x8c for Run Mode, or 0xfc for Write Mode.

SCRNCH v1.00-compressed EXE files (which must be Write Mode) have bb ff ff b4 4a cd 21 81 eb at offset 512.

Based on analysis of the (decompressed) SCRNCH.COM file, a v1.02 SCRNCHed file contains one of six possible "signature" byte sequences:

eb 13 73 43 65 66 0c 03 ("sCef"): Run Mode, default for COM output
eb 13 73 43 67 66 90 03 ("sCgf"): Run Mode
eb 13 73 43 68 66 89 02 ("sChf"): Run Mode, default for EXE output
eb 13 73 43 77 66 ba 03 ("sCwf"): Write Mode, default for COM output
eb 13 73 43 79 66 b4 02 ("sCyf"): Write Mode, default for EXE output
eb 20 73 43 7a 66 33 04 ("sCzf"): Write Mode

For COM format, the signature is at the start of the file. For EXE, it's at the start of the code image segment (refer to MS-DOS EXE#Special file positions), which is normally at offset 512.

Considering that SCRNCH plays fast and loose with converting between COM and EXE formats, it may be possible that all six signatures could appear in both COM and EXE files.

[edit] Related formats

  • SCRE2B
  • ZIP - Reportedly[1], ZIP's Reduce compression method is based on SCRNCH's compression method.

[edit] Software

See Executable compression#Decompression software for some multi-format utilities that might be able to decompress Run Mode files. (See also the SCRE2B article.)

Write Mode files can decompress themselves. In a DOS environment, run the file with the special "stdout" parameter, with output redirected to a file. For example, using the SCRNCH documentation file:

SCRDOC.COM stdout > SCRDOC.DOC

[edit] Sample files

v1.00 Run Mode:

v1.02 Run Mode:

v1.02 Write Mode:

Various:

  • SCRNCH.COM and SCRDOC.COM from the SCRNCH distribution
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox