ScummVM API documentation
Freescape::Copylock Class Reference

#include <copylock.h>

Static Public Member Functions

static Common::SeekableReadStreamunwrap (Common::SeekableReadStream *file)
 
static bool isProtected (Common::SeekableReadStream *file)
 

Detailed Description

Removal of the Rob Northen Copylock wrapper found on several Amiga and Atari ST releases.

The protection reads a serial from a specially formatted track of the original disk and decrypts the wrapped program with it. The ciphertext is however produced once, when the release is mastered, so the key is a constant of that release: every copy carries the same encrypted program and the key disk only lets the protection check the serial at run time. That is why the wrapper can be removed here without the disk, and without executing any 68000 code.

Everything but the key is read from the file: the protection is located by its signature, its own code is decoded (the Trace Vector Decoder used for the loops is static), and the decoding routine found in there tells which cipher wraps the program, and where it is.

Both the GEMDOS programs of the Atari ST releases and the hunk executables of the Amiga ones are handled.

Member Function Documentation

◆ unwrap()

static Common::SeekableReadStream* Freescape::Copylock::unwrap ( Common::SeekableReadStream file)
static

Unwrap a Copylock protected program.

Returns the wrapped program on success, or nullptr when the file is not protected (it can then be used as is) or when the release is unknown. The caller owns the returned stream; the input stream is left untouched.

◆ isProtected()

static bool Freescape::Copylock::isProtected ( Common::SeekableReadStream file)
static

Whether the file carries a wrapper this class recognizes.


The documentation for this class was generated from the following file: