Rob Northen copylock

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Rob Northen Copylock is a copy-protection system to prevent disk duplication with standard floppy disk drives on the Amiga, Atari ST and PC DOS platforms. It was used mainly to copy-protect games from being copied by regular users.

A Copylocked floppy disk contains one long track known as the Copylock Serial Track which can be read on a standard floppy drive but are impossible to write without a sophisticated disk duplication machine. The disk contains a special loader which is heavily encrypted, which can read and decode the Copylock Serial Track. The encrypted code verifies that the disk is authentic, that the disk has the correct Copylock Serial Track, which differs from game to game.

Typically on the earlier Series 1 Copylock, the Copylock Serial Key which is specific to that particular title, is passed in register D0, and also stored at address $24. Inventive programmers could use this serial key for specific purposes to force the would-be cracker to have to remove the additional checks in the game. However, on lots of early Atari ST and Amiga titles, programmers typically just did a check for the serial key which was obvious to easy to find in a program, thus rendering the protection neutered.

Another Series 1 Copylock was the 'Wrapper' type. This was where boot routines, or the code to start the game off was encrypted, and then included with the Copylock code. All checking of the disks validity would be checked by the Copylock code, if successful the trace vector decoding of the Copylock would extend to the boot routines or file that was encrypted, the data would then be moved to its final destination and then executed.

This type of Series 1 Copylock was very often used in the early days of the Amiga for games that loaded in one hit (i.e. didn't need to touch the disk drive again), but this meant that the security offered by Copylock was rendered useless once the game was decrypted, as then the game could be ripped from memory and saved out to a disk and then made to work independently of the Copylock routines. This was known as 'single filing' a game.

Series 1 was succeeded by the Series 2 Copylock. Series 1 had problems on faster processors of the Amiga, and games were getting bigger, very few loaded everything in one hit anymore, so early Series 1 was now dead and so was the wrapper type Series 1.

Series 2 was an evolution of the first version of the Series 1, and again, early version of this Copylock were incredibly easy to circumvent, simply reading the serial key from the Copylock Serial Track and then checking it was correct was all that many programmers bothered to do. In lots of cases, crackers didn't even need the information from the Copylock itself, because the check for disk authenticity was so poorly implemented, they could clearly see what the Serial Key number was by the code checking for it!

However, after some requests from programmers that were keen to implement Copylock properly (namely The Bitmap Brothers), Copylock started getting more complex.

Whilst many people understood how Copylock worked, very few had bothered to take the time to work out how to actually decode one, because they previously didn't need to bother. But now, Rob Northen was adding extra stuff to Copylock. Passing parameters to Copylock before it executed meant that Copylock could now write more than just the Serial Key, it could write specific game related values into the contents of registers passed to Copylock, or simply write values to a list of pre-known address values which would make the game operate correctly.

As the typical way of cracking a Copylock was to get the serial key, modify the header of the Copylock to put the correct serial key into register D0, and then bypass all the reading and decoding stuff, this would mean the special case stuff in the Copylock would never be executed, which would mean the game wouldn't work just by use of the Serial Key alone.

On the machine language level the copylock works by using Motorola 68000 trace mode that causes the processor to execute a specific trace vector before each instruction in the main program. The trace vector decodes the machine language code just-in-time before it is executed and re-encrypts it after it has been executed, so that no more than just one or two instructions are decrypted in the physical memory at any given time. This is called a trace vector decoder. The trace vector decoder system was originally implemented on the Atari ST platform and afterwards copied to early Amiga models, which share the same processor architecture.

It was later brought to the PC (circa 1990) as the x86 supports the trace vector the same as the 68000 processor does. (INT 1) It manifested itself in a slightly different way in that the game's executable code was encrypted and "wrapped" by the Copylock loader. At runtime this loader would read 4 sectors from the floppy, and generate checksums from them. These in turn would be used as the keys to decrypt the game code. Once the decryption was done, the loader transferred control to the game program.

External links[edit]