I’m Old, Part XLVIII: Leprosy

I spent a great deal of my youth hacking on the Apple II. I wrote games that used the low resolution graphics first and then later hires. Applesoft BASIC came with a brief vocabulary of commands for drawing in HIRES. You could plot points, draw lines, and there was also a very simple vector-based shapes that you could define. I had some trouble understanding the awful manuals, but my dad spent some time explaining it to me and then my brother Pat wrote a shape maker program that would let you draw the shapes out and get the data for you.

I wrote space games for the most part. Most of the games we had were space games and I took my inspiration from them (Jupiter Express by Gary Shannon, Star Cruiser by Nasir Gebelli, Rocket Pilot and Star Wars by Bob Bishop, Tranquility Base by Bill Budge). I found writing games in BASIC frustrating. The shape tables drawing routines were quick, but if you tried to do any kind of animation, the game flickered badly from the erasing and redrawing. Plus there were two shape drawing commands – DRAW which used paint drawing and XDRAW which used Exclusive-OR (XOR) drawing. For XDRAW you could draw and erase since two identical XDRAW commands are an identity operation. In this way, you could get cursors, for example, that moved over existing drawing on the screen without damaging it.

Interesting side note – the XOR drawing process was patented in 1980, but it was already in use on the Apple II at that time.

The problem with XOR drawing is that if you use XOR to move things around, you have have to be super careful if you’re using other drawing because you’ll end up with unexpected junk left behind. I figured this out early and gave up on it. I moved onto to using bit mapped shapes and custom blitters to draw them on the screen. You could use XOR here too, but for the most part I used a direct write – less to do per pixel and faster as a result.

One day after school, I biked to Summit to Stonehenge Computing to see what was new and to show off hacks. When I got there, there was another guy trying to get some help on his program. He had gotten a book on Apple graphics and was working his way through the examples and tried extending them. He had a program that made a stork walk across the screen from right to left while animating the legs. “I need some help with my code – my bird has leprosy.” I stepped in, “are you using XDRAW for the body and HPLOT for the legs?” “Yes” “OK – you can’t do that if they overlap, it will leave bits behind where they overlap. You need to use DRAW for the body and change the color to erase and draw.”

And this is how I met Jim Gittelson. Jim was a few years older than me and went to a private school. We started hacking together. We learned how to crack software protection on published games. For the most part, I dug though code to figure out where the game lived and what did what so we could end up with a minimal set of hunks that could be saved out and loaded back in again. Jim liked to figure out the track patterns to get Locksmith or Nibbles Away to copy them. Later, Jim started making dedicated hardware to help the tasks. For example, he built a peripheral card which had some ROM and ton of RAM on it. When you pushed a magic button, it took over the machine and copied chunks of system memory to his card. Then he reset the machine and wrote the memory out to disk. In essence, he was creating a snapshot of memory which could be loaded back. Clever.

At one point, we discovered RLE encoding and wrote some code the compress a ton of HIRES images onto disk (far more than could fit uncompressed) and then knocked together some code that would run in a loop loading each file in using RWTS (Read/Write Track/Sector) routines to pull in the data and decompress it live into the screen, along with code that was playing two voice music. It was a glorious hack.

Jim and I also were fans of the arcade game Defender. We made routine trips to local arcades to find the games and spend every quarter on them. Well, not quite. Jim collected Bicentennial quarters and always set those aside. The last time I contacted Jim, he had purchased a used Defender machine and had modified it so that it had a pause switch, that way he could start a game, pause it and come back to it later. Nice. I asked him if he still collected Bicentennial quarters. Yup. Still.

I still think it’s funny that a long friendship started because his bird had leprosy.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.