Fixing Bugs In Ancient BASIC Games

Before everyone learned programming on Stack Exchange, things were much different. Computer magazines had BASIC programs in them, which readers would type out, line by line, and hit RUN. In theory, this is a terrible way to learn programming; it’s simply rote recitation without any insight into what the code is actually doing. Of course, copying and pasting from Stack Exchange is exactly the same thing, so maybe these magazines were ahead of the curve.

[0xA000] recently came across one of his old computer magazines containing the type-in listing for Blindganger, a game where you wander a maze blindly. When [0xA000] typed this game into his C64 back in 1988, the game didn’t work. Thirty years later, he decided to give it another go and ended up fixing bugs in an old computer game.

When [0xA000] typed this game into his computer back in 1988, the map just didn’t work, and the final screen revealed a maze where the walls were where they shouldn’t be. A quick Google turned up a disk image of the same game that had the same problem. This bug was obviously in the section of code that draws the map at the end of the game, so [0xA000] started looking there. The offending typo in the code was an $F4 instead of an $F5, or 244 instead of 255. This shifted the colors of the map by 11 positions, meaning the locations marked as visited in the final screen were wrong. Whether this bug cropped up in development or was just a simple typo when typesetting the magazine doesn’t really matter now; after 29 years, this bug is fixed.

36 thoughts on “Fixing Bugs In Ancient BASIC Games

  1. I hope someone fixes that “snake” game.
    Every time it eats an apple the snake gets longer, and you end up losing the game because the program interprets the snake itself as a wall.

          1. I’m glad you approve. I need to change my handle and create an .io page though. Soon…
            You’ll get to see a total n00b learn linux!

  2. Those magazine-based “rote-typed games” weren’t nearly as bad for learning as it might seem – more often than not at least one typo sneaked in somewhere, and with a little luck you were immediately forced to understand everything you just typed in an attempt to figure out why you can only turn left but not right…

    1. As far as I know, the programs inside most of these magazines were never intended to learn people how to program (for that they had special sections/articles handling a specific function or problem). Paper was simply cheaper then adding disks or tapes and most programs were not that big anyway (in the beginning). But years later computer programs were grown so big that it became impractical to type and people lost interest. With the prices of the media dropping enough to open up a market for magazines with a tape or disk attached to the cover magazines the times changed…

      1. Agreed, the listings were simply the only way to distribute the code back then economically. Learning was done by RTFM (still have a soft spot for the Sinclair Basic manuals).

        The listings did get ridiculous, especially when more and more started to incorporate machine code segments. Literally typing in pages of hex just to see your speccy hang or restart. Then pray the tape save worked ok…

      2. Lazy kids..
        I wrote a lot of 10 page+ Casio Basic programs for my Casio CFX-9850GC Plus, it was the first programming language that I learned, and after a couple months using my maths and physics class’s as copy time I started to make my own programs, more than not, variations of games and helper programs for tests, in the end I teached my maths and physics teachers how to program their calcs.

    2. I tend to agree about magazine code transcription being not so bad for learning for beginners — the forced concentration in typing can make you accidentally understand the code and expose you to new coding techniques.

      As to the bugs, yes they did abound. Same later with Dr Dobbs articles; caveat programmer.

      Somewhat OT, electronics articles often had booboos in schematics — my inner conspiracy theorist believes this was to stimulate sales of the kits.

    3. I remember that one magazine had a special “type-in” program just for typing in programs. Once you got that one BASIC program entered, you could enter in new programs using just numbers, and there was some sort of checksum or CRC at the end to make sure that there were no errors. A bit clumsy, but every program worked.

    1. I had a professor in college who gave his intro comp sci students lab assignments that were deliberately designed to lead us into integer overflow bugs or tempt us into hilariously bad design decisions. He’d let everyone struggle for fifteen minutes or so before going all Teachable Moment on our asses. The idea was that these are the kind of obnoxious bugs where you never forget the first time you get burned, so he’d structure it so we’d make those mistakes while he was present. You learn better than just being told, and waste less time than if you ran into the same issues naturally.

      Another professor did this with homework assignments, and man was that annoying.

      1. I (and my group) once got credit in a LARP (Live Action Role-Playing Game) for correcting the error in a set of clues (read – simulated gene-sequencing results) to produce insulin. A real doctor wrote the game and we walked through our solution which didn’t match his pre-written answer key on this puzzle.

  3. Typing stuff from something line Compute! or RUN or Antic was by it’s very nature different from the copy-paste culture we currently live in, you made a typing error, often subtle, and figured it out… Good luck with that now.

    1. I learned a lot from typing code for the Vic-20 from mags like Compute! and Family Computing. I still remember basic Basic commands and when I fire up my Apple IIc, I can still write programs from memory.

      1. Ha, exactly this!

        If not for my uncle bestowing upon me his unused VIC-20 sans storage device (after he upgraded to a C64), I would be several years behind on my programming education. I loved typing (and hacking) the BASIC programs from manuals and magazines back in ’83…and later x86 hex or assembly listings in the late 80’s on my Tandy 1000!

      2. Are you both from Australia. I have never heard of a “VIC-20” outside of Australia. The foreign equivalent seems to have been called a Comodore 16 or is that a different system to the VIC-20?

        1. The C16 is an entirely different beast. It was intended to be the ultimate cheap computer that could compete with the other cheap models from other companies already around. In other words, to kill the competition in the cheap computer market segment.
          But because of bad management of Commodore this design was eventually presented as the next best thing for way the price of a normal home computer (not a super cheap one). Because of it’s price it could not compete and therefore could not kill the competition in that market segment. Because of it’s poor gaming abilities (no sprites, no SID) it could not replace the C64.

          Anyway, the C16 has nothing to do with the VIC20, google for more info about it’s place in the commodore products timeline. The VIC-20 was available in many places around the world but because VIC sounded like something inappropriate in German, it was there changed into VC-20 in German speaking countries.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s