Subscribe to my space and sci-fi newsletter

When you sign up for my newsletter, you'll get a free sci-fi short story: Starfarer, monthly updates on space science and sci-fi, and updates on my writing projects!

    I won't send you spam or share your email with anyone. Unsubscribe at any time.


    Popular blog posts

  • Total Share: Personal Computer Market Share 1975-2010
  • Celebration
  • Monarch Thing-A-Day Challenge!
  • I love Korean Starcraft
  • Why HTML 5 sucks!
  • Recent forum posts

  • Online Assignment Help in Ireland
  • Micro History Episode 2 is up!
  • My article on the history of public messaging is up on Ars Technica!
  • Micro History Episode 0 is up!
  • How to find the best fiction ghostwriter?
  • Discussion Forum

    Discussion forum

    Emulating the past: a digital visit from my teenaged self

    Blog post

    Author
    Message

    Jeremy Reimer
    Posts: 9350
    Posted on: 2021-07-09 23:54:14.000


    Last week I read an abolutely amazing article on retro computing. The author took a trip through the world of emulation, making stops at significant signposts in computing history such as the Amiga, LISP machines, and the NeXT computer. In doing so, he also found a way back to his childhood. I was deeply moved by this article and it inspired me to do a little emulating of my own.

    But first, a little backstory. My father introduced me to computers for the first time, teaching me the basics of BASIC when I was just six years old, sitting on his knee in front of a terminal connected to the VGH mainframe. But it was my uncle, Allan Symonds, who provided a portal to personal computers. He had a mysterious all-in-one machine called a Heathkit H-89, and I fell in love with the big grey beast. I remember, with perfect clarity, one morning in December of 1979. We had celebrated Christmas at Uncle Allan’s house, and I had spent most of my time on the computer. My father tried to tell me we had to go. I pleaded for more time-- when else would I ever get to use this computer again?

    "You can use it again when you get home," my father said. "That’s not Uncle Allan’s computer. That’s your computer."

    My jaw dropped. My seven year-old brain couldn’t even comprehend it.

    But it was true.

    I had that Heathkit between the ages of seven and seventeen, and I absolutely loved it. It was an oddball sort of computer, running an operating system called CP/M by this tiny company known as Digital Research. There weren’t that many games for it: my uncle gave me copies of Space Invaders, Missile Command, Space Pirates, and a Pac-Man-like game called Munchkin. Those were almost all the games that existed for that machine. I wanted more, but I figured I would have to write them myself. This was hard. I tried to learn assembly language, the only language fast enough to write games for such a slow machine, but I didn’t have the patience. I tried to learn C and Pascal, but compiling a simple "Hello, World" took about twenty disk swaps in the single floppy drive. There was only one language that I felt I could work with, and it was one that I already knew. It was from a tiny company as well, an outfit known back then as Micro-Soft.

    Micro-Soft’s BASIC, or MBASIC for short, was an interpreted language that only took up about 25 kilobytes out of a 95 kb floppy. That left plenty of room for a game, but there were drawbacks. Being interpreted meant it was slow. Extremely slow. Fortunately, the manual had all sorts of helpful hints for increasing speed, such as typing DEFINT A-Z to force all variables to be integers. Who had time for floating point?

    I figured out other optimization strategies over time. The Heathkit was a monochrome machine, and it had no bitmapped graphics. Instead, you could use a special escape code, CHR$(27);"F", to go into "graphics mode". In this mode, lower-case letters were displayed as a series of shapes: "y" was a diagonal line, "p" was a small rectangle, and so forth. You could use "reverse video" to flip the shapes’ pixels between light and dark. Other escape codes let you position the cursor anywhere on the 80 column by 25 line display. It wasn’t much, but it was enough to make crude games, and that’s all I ever wanted.

    I asked Uncle Allan for help with writing my games in BASIC, and he taught me all about the Main Loop, the basic structure of all game programming that is still around today. Thanks to him, I was able to move on from just drawing pictures and start writing actual games.



    I started many games in those years, but I finished relatively few. One of the ones I did finish was a Star Trek game where you commanded the USS Enterprise through a galaxy full of angry Klingons. It was insanely difficult. You had to time your commands perfectly to raise and lower shields, maneuver at impulse and jump to warp speed. Klingons would swarm you and could hit you from any direction, whereas you could only shoot forward. Even with your shields up, if you got hit you would lose energy, and if you ran out of energy you would die. If you tried to quickly warp out without knowing what was ahead of you, you would probably run into a star.



    I remember beating it with great difficulty back then and feeling quite proud of myself. I can’t beat it today without modifying the code to make it a little less insane.

    One of the last games I ever wrote on the Heathkit was based on the TV show Max Headroom, a series that I was completely in love with back then and still am today. I only ever completed the first stage: a daring helicopter run to Network 23. I wanted this game to have the best graphics I’d ever seen on a Heathkit. I wanted three-way parallax scrolling, so the buildings in the foreground would scroll more quickly. I wanted the helicopter to be superimposed on these scrolling buildings, and gunfire on top of that.

    This was completely impossible and insane to even think about doing in interpreted BASIC on a 2 MHz 8-bit computer that was driving a 9600 baud terminal as its display. To the best of my knowledge, nobody ever did graphics like this on a Heathkit, not even using assembly language.

    But I found a way. I used the terminal’s "delete" functions to scroll as fast as the display was able. I stored the buildings and the helicopter in string arrays, and defined them at the beginning of the program so they would be faster for the interpreter to recall. I only repainted bits of the helicopter that were broken by the scrolling boundaries. I cheated a bit and paused the action when the gun fired, then repainted the building bits.



    It was a bit slow, but it was a fully functional game. You would want to stay at a high altitude to avoid the guns, but nearly-invisible barriers forced you to fly lower. Your best bet was to wait for the gun to fire, then fly up and right as quickly as possible. The gun would move in an arc, so you could anticipate where it would fire next.

    Not long after I wrote this game, my Heathkit died. The company itself went out of business, so repairs were impossible. I moved on to PCs, running an operating system called DOS that to me looked strangely familiar. All my old games were stored on decaying floppy disks, and I thought I would never get to see them run again. Decades passed, but I hung on to those floppies out of nostalgia if nothing else.

    A couple of years ago, I found a H-89 emulator written by Mark Garlanger. I emailed him and he told me he had some success recovering images from floppy disks, so if I would like to mail him mine he would try to save what he could. I didn’t hold out much hope. I remembered my Heathkit would have problems reading disks after a few years, and it had been decades. But I mailed them out anyway.

    Mark was able to recover almost 95 percent of my data.

    My grandfather died in 2001, and I saw my uncle at the funeral. My father died a year later, and I didn’t see Uncle Allan there, or any time since. I have been unable to get in touch with him. The Internet and even close family members have come up with nothing. He might still be alive, but with each passing year I start to doubt it more and more. All these important people in my life are disappearing one by one, and there is nothing I can do about it.

    But thanks to Mark, those years of my life, the results of all the things my father and my uncle taught me, are preserved forever with perfect fidelity. It is as if no time has passed at all. My awkward teenaged self is calling out to me, wanting to show me this cool game he just made. I wish I could call him back and tell him that everything is going to be all right, that he’ll find his way eventually, that he’ll find the love of his life and he’ll get to write novels and work for game companies and have a good life.

    But maybe, somehow, he knows.


    SlugTrap
    Posts: 1
    Posted on: 2015-06-08 10:50:45.000
    Wow. You touched the soul of this Commodore Vic 20 user. Thanks for that.


    Views: 9568