This is a fun one because the .woz file was created not by analyzing a flux image of an original disk, but by the original developer's master maker program. Several years ago, a "friend of Larry [Sherman]" posted a collection of floppies on eBay which included several maker disks, the source code to several of his games, and — somewhat amusingly — pirated copies of Locksmith, presumably used for testing his own games' protections. You can download the maker disk here:

mirrors.apple2.org.za/ftp.appl

BTW the copy protection is amazing and multi-layered and definitely written by a guy who knew everything about the hacking and cracking tools (hardware and software) that were available at the time. Structurally, it stores data on consecutive half-tracks, which is virtually impossible to copy without disk-specific knowledge of the data delimiters used on each chunk. But the game is a single-loader, so Larry knew he had to do more to defeat people with memory capture cards. So...

Randomly during gameplay, the game checksums part of the bootloader that persists in lower memory. This code is never used after boot, but he gives up an entire page of memory to keep it around anyway so he can checksum it repeatedly and make sure it's still there and hasn't been tampered with. Checksum failure means that you didn't boot from the original disk — which, instead of simply rebooting or displaying an error, triggers the code to jump to an uninitialized address in memory.

Later in gameplay, there is a second runtime check that sneakily uses an indexed read to check a single byte of the same bootloader code, and if that fails, to jump to a different uninitialized memory address.

After a game ends, there is a third runtime check that checks that the upper 16K of memory (if it exists, on a 64K+ machine) was cleared in the specific way that the original bootloader would have cleared it. On failure, the subroutine exits via $FC58, the standard HOME routine to clear the text screen. Except there's game code stored on the text screen, so the game crashes... later.

When I finally figured that out, I yelled at my screen, "Sir, I was using that. Sir, YOU were using that!"

Follow

@a2_4am That is pretty deliciously evil and clever at the same time

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
Cross Family's Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!