Hacker News new | ask | show | jobs
by OnlyMortal 766 days ago
Good point about 8bit self modifying code.

The UK C64 disk for “Skate or Die” had copy protection that did exactly that, as an example.

1 comments

It's pretty much best practice on the 6502. Loading code from disk or tape is basically the sane thing too.
With Skate or Die, it’d pull a byte off the genuine disk and use it to decrypt (xor) a loop immediately after the current PC.

I think it went through about five iterations.

My crack was to step it with the original disk to decrypt the encrypted part and modify the code to jump over the decryption. It was pretty sophisticated for the day.

To another extreme, Ocean disk games had a “IsGenuineDisk” style function. It returned 1 or 0 in the accumulator. I could crack it in under a minute with a disk sector editor.

Oddly, I ended up doing Mac copy protection years later.