Analyser: Complex Copylock Variant


There was some missing functionality required to support a Copylock ST variant as described in the previous wip. This has now been implemented to fully support the geometry based Copylock variant, mainly:

  • The ability to remove any group(s) of segments from the pre-processed data if they match a pattern, and then restart the analysation process. This makes it possible to remove data that is for example misaligned on purpose and script it with ad hoc geometry entries instead.
  • Add any kind of clocking violation as part of an ad hoc geometry description.

The protection itself is very clever; it uses two key blocks that are embedded into each other. Reading one block reads the marks from the next block as data while reading the other shifts the content by one bit. Since clock and data bits alternate, this makes it possible to read both the clock as well as the data bits correctly, which is not supported by the controller as it only returns the data bits read. The second block also contains a key that can be later used to among other things, decrypt some data by the program or simply check its value.

Finally, a small overlapping area of both blocks should return the same data. This is of course only possible if the clock and the data bits are the same.

This data is impossible to write through any MFM hardware as it would insert clock bits that would fail the protection checks even if shifting the second key block by just a clock bit was possible, which it is not.

This work means that 40 images we could previously not verify now resolve just fine.