151 points · by pavel_lishin · 10y ago · 57 comments
Reading the description of the archive.org project at https://archive.org/details/apple_ii_library_4am&tab=about makes it clear that this effort intentionally deconstructs and documents the original copy protection.
Other than as an exploration of copy protection, though, I can't help but wonder if the simplest approach to preserve and run the same software today would involve an appropriate emulator, more accurate floppy drive emulation, and the unmodified original disk image. The crazy amount of self-decryption and obfuscated code wouldn't matter as long as it found what it expected on the disk; the modifications just let it run on real hardware using a copied disk.
Apart from allowing the use of the original unmodified disk, emulation would also avoid the possibility of missing more subtle copy protection schemes. This particular disk made things easier by just stopping the game at the start. Some of the worse copy protection mechanisms developed later would detect a copied game, leave it somewhat playable, but make it either exceptionally difficult or intentionally broken near the end. Sometimes they would include a more obvious copy protection scheme to defeat that prevented playing the game at all, so that a prospective cracker would think themselves successful once the game starts. See http://media.earthboundcentral.com/2011/05/earthbounds-copy-... for an example.
http://www.kryoflux.com/?page=kf_features
It's a USB floppy controller which allows you to image the raw magnetic state of the disk (subject to head step and width). It allows you to record the disk and then try to figure out what the format is. It's good enough to allow you to read CLV disks, such as Mac floppies, from an image taken from a CAV drive, such as a PC one. I don't know whether it supports half tracks --- probably --- but it will certainly support all the weird timing error tricks.
It's not what I would call user friendly but once you've figured it out the results are magical. I was able to image an ancient BBC Micro floppy disk once and then spend ages figuring out how to parse the sector layout and encoding density working with just the image. Not only does this avoid having to keep working with the fragile disk, but it's way faster!
http://info-coach.fr/atari/documents/_mydoc/IPF-Documentatio... http://www.archiveteam.org/index.php?title=Rescuing_Floppy_D...
Do you know if the authors of that code would consider releasing it under a FOSS-compatible license (e.g. MIT, LGPL, or GPL, depending on preferences about copyleft)? Failing that, do you know if a FOSS library exists to read and write the IPF image format?
Once I had about two weeks to spare on a protection system; it used a couple levels of decryption and some delaying tactics so that the title would crash minutes after starting.
A prolific Atari pirate lived in my apartment complex. After the cartridge shipped, I asked him about it. "Oh, that was a hard one. It took me and my friends three days to crack."
Time and numbers are not on the side of DRM. (I'm also unconvinced that Atari lost much money to copying).
I've often wondered about your last bit there.
The way it was in my little home town is a lot of people copied stuff. But, they barely could afford the computers too. Those who did have the bucks bought most of the stuff that ended up copied. You might be right, at least early on.
Later in the 80's, disk copying was massive. The C64 scene seemed to have buyers, but nearly everyone was on copied media in the Atari scene. Fewer machines, more copies, and it seemed like easier copies too... Some schemes were bad sector ones, and frankly, one could just count the beeps, open the door, wait for the error and continue. Not everyone checked the nature of the error, it seems.
It feels like writing the protection must have taken longer than developing the game itself.
If you're curious, here is the actual game:
https://www.youtube.com/watch?v=5wEWftbwSm4
Hard to imagine they went to that amount of trouble to protect it, but those were different days.
As I understand it, there were a variety of somewhat known tricks that were sort of pre-made (or at least were sort of design patterns that existed), and they'd vary the disk timings, track skip patterns, and combine various tricks for new major releases, so the copy cartridges and software would have to do a new release periodically to cover the new methods (and sometimes automated methods just didn't work, as it seems is the case here). So, while it seems like an incredible amount of work, it was likely merely repackaging existing work.
Edit: or maybe my brain is in dire need of a fsck. Checking some screenshots on mobygames makes me wonder if it was the NES version on emulator.
From what I remember there was no discussion of how to actually do copy protection in magazine articles, as in the early magazines that published reams of assembly or hex that you could type in, yet, concurrent with this era there were plenty of copy protection schemes, as evidenced. So it was not as if you could easily use a few well known tools and techniques to obfuscate code. People were very much on their own but the games companies would have been able to put resources into protection and learn how others do it. This know how must have travelled word of mouth between publishers and developers as copy protection was vital for revenue in an era when everything was instantly copied and shared as a matter of course. What else were games for?!?
Anyway I think that even though there was not a lot of published material on obfuscation there must have been those that were well connected enough to know a library of techniques for copy protection. These guys would have found work with games publishers, their work being integral to publication. This was by then just capitalism and the resultant specialisms in the marketplace.
Especially since many of the original crackers usually did not want to share all of the details, only just enough to aggrandize themselves without supporting others.
"Beneath Apple DOS" (and later ProDOS) were the cracker bibles back then. It's pretty much the only official documentation you could buy that described how the floppy drives work at the lowest levels. There was no internet and BBS were reserved for the most wealthy hackers. Basically, you were on your own to figure things out.
With the knowledge from this book, you could theoretically crack anything, but as the article shows, you also need to have total mastery of the 6502 and of the Apple ][ ROM layouts too.
May I ask how you know that?
Does this mean that the person actually cracked this game recently just to post such a write up?
Right after he put out the crack, I was working on a (hard-drive friendly) port to ProDOS based on it.
To send feedback, ask questions, or get notified of new releases, follow @a2_4am on Twitter.
;)
Would be interesting to analyze further possible differences in the language if the article would have been written in 1982.
Protection schemes tended to be reused for the whole panoply of games they produced.
Programmers expected to get paid for their hard work.
> In Which I'd Like To Add You
> To My Professional Network Of
> Linked Catalog Sectors
Priceless...How much wall clock time went into this?
> I'm beginning to suspect that this disk
> is nothing more than an infinite series
> of decryption routines with a game
> bolted on as an afterthought.Those apple copy protection schemes. Pirated software always had a "cracked by" load screen.
The most interesting thing to me were the hardware copy cards. Since most software fit in RAM, and the whole software would load at once, these cards let you push a button and make a bootable disk of whatever your computer was running.
When a disk failure meant trying to find another copy somewhere there was a legit fear of loosing your software.
central point software made some of these cards. A little info is available online. (Being before the internet took off, the names aren't search engine friendly.). Alaska Card Advert (why settle for copying the lower 48K.. Before they called it backup..)
https://s-media-cache-ak0.pinimg.com/736x/e2/70/cd/e270cdd90...
Bottom of this page has some interesting pictures and history of these card: http://retro.icequake.net/dob/
My favorite, and easiest, trick was to use the 64k extended memory of the 80-column card to overlay the regular memory, copy the ROM and a few low pages into it, then jump to the boot routine. Then when the disk stopped spinning, I'd hit the reset button which left me with a copy of the system at that point. Sometimes I just had to dump the program from the memory, other times I would use it to disassemble how it loaded. I had a Applied Engineering RAMWorks card (Dad heavily used AppleWorks) and I recall there being tricks around that but can't remember (rigged a couple of buttons for page swapping, I think).
Kudos to 4am, who has more patience than me. I'd probably have given up well before the third level of encryption.
We weren't connected back then. People got bored, no new software, so... why not hack on the stuff we've got?
[0]: http://fabiensanglard.net/prince_of_persia/pop_boot.php