The MAD Magazine Type-In Program

One of the essences of comedy and humor is a shared context between participants. When a joke is made both the teller and the hearer must know what’s being spoken of, and how the elements fit together in relation to each other, if the funny ha-ha is to occur.

Which is why I find the creation of The MAD Computer Program interesting. Published on issue 258 in BASIC for four of the microcomputer platforms of the time, Atari 8-bit, Apple II, Commodore 64 and IBM PC, it was obviously MAD’s bid to maintain technically relevant to that brief moment in computing history. Setting aside whether it’s actually funny or not (it’s not), it means that MAD’s editors must have decided that home computers were common enough that they could waste some of their precious print pages on catering to their owners. Anyone without one of those computers would find them to be four pages of wasted content.

The four programs have a lead-in that reads in a set of data (using READ commands to get vector coordinates from DATA statements, of course). The lead-in part is different for each platform, but the lines with the DATA statements are the same, and so are only printed once in the magazine. That’s also the least interesting part of the ordeal of entering type-in programs: tables of raw data, numbers without context, sequences of values that will put your monkey brain to sleep, yet will surely cause your code to fail catastrophically if entered incorrectly. There’s 140 lines of them to enter here, plus some more if you’re using a C64. As my eyes brush over them, childhood trauma from entering type-ins from computer magazines cause them to water involuntarily. I miss the age of magazine-supplied type-in programs, but not that part of it.

What do you get when you spend a grueling half-hour typing in two pages of numbers written by a group who describes themselves as a gang of idiots? Something genuine useful like Compute’s Speedscript word processor? A unique and interesting two-player game like Basketball Sam & Ed or Laser Chess? The author of the text of the piece is coy about what the result will be, but encourages readers to send a printout to the MAD offices. I wonder how many did? Probably not too many; a thread on the AtariAge forums implies that there’s an error in the listing that causes the program to crash about two-thirds the way into its run. One participant remembers that MAD published a correction a few issues later, but if they actually did I can’t say.

If someone does get it to work, what then? If you’re familiar with MAD you might can already guess what the result, a picture drawn in hi-res on your screen, will be, but to save you the effort of setting up an emulator and entering over a thousand numbers one at a time, here’s a Youtube video of the program in action:

The preview gives it away. WHAT, ME WORRY? It’s a pretty good representation!

The video links to the blog post on Meatfigher.net that I learned about the program from. Meatfighter’s a pretty cool little blog and it’s worth rummaging through their archives! atariprojects.org offers an emulator disk image with the program already entered for you. dougx.net offers a version of the program written in Javascript that renders its output in your browser window. Without the (relatively) low resolution of the ancient computers that ran the original programs I feel the result loses something, but at least you don’t have to type it in yourself.

The MAD Computer Program (meatfighter.net)
Video of output from the MAD Computer Program (Youtube, 1 1/2 minutes)

Hare Basic for the Commodore 64

Our friend Robin at 8-Bit Show And Tell lets us know of this cool and free Commodore 64 BASIC 2.0 extension, of a sort, called Hare Basic. It’s a successor to an earlier version called Bunny Basic. Here’s the video, 48 minutes long. My comments on it follow below, which you can read either after having watched the video, or before, depending on of you have most of an hour to spare right now.

Here are the downloads, which are hosted on the creator’s Dropbox, so availability may fluctuate.

Commodore BASIC is, in many ways, the worst of all worlds. It’s a slow interpreted language, a variant of infamous Microsoft BASIC, and it has almost no machine-specific features, but it comes with the machine, and it’s burned into ROM. You can swap it out for extra RAM if you have a replacement OS or are running something in pure machine code.

I could go on for a long time about the problems with Commodore BASIC 2.0, a language I’m quite familiar with having spent much of my teens programming in it. Sometimes it feels like it was designed especially to run slowly. One example: it supports floating point math, which ordinarily would be a good thing, right? Use integer math for performance, and just use floats when you need decimals, right? But no: internally, Commodore BASIC converts integer variables into floats when doing any math with them, and converts them back to store as integers when it’s done. Wilberforce Trafalgar Franklin?! Why?! It does these unnecessary extra steps to do all arithmetic as floating point even when it doesn’t need do, and doesn’t offer a way to do performant integer math at all! Need I remind you that Microsoft BASIC is based upon software written by Bill Gates himself? I suspect that I don’t!

Hare Basic is a highly optimized subset of Commodore BASIC that can be switched on and off as needed. It has to be coded in a special way which might throw beginners for a loop: Hare Basic can’t abide whitespace, for example, only allows for variables of one letter in length, has no support for modifying strings, and contrary to Commodore BASIC can only do integer math. There’s lots of other differences too, and if you want to play around with it it’s essential that you study the manual.

But once you get used to it, it runs blazingly fast, sometimes as much as 10 times faster! And the best part is you don’t have to use it for everything. You can start out with a standard Commodore BASIC program, then enter into Hare Basic mode with a USR function call. You could write your whole program in Hare if you’re up for it, or just loops, or other places where performance is necessary.

Of course, this is ultimately an enhancement for a programming language that runs on a home computer made in 1984. It’s not what one might consider of universal interest. But it might be of interest to the kinds of people who read this site. It’s interesting to me, at least. Maybe I should dust off VICE and see what I can do with it? I haven’t coded on a ’64 in nearly three decades, maybe I should get back into that….

Wheeler Dealers Has Been Preserved

The news comes to us by way of Apple cracker 4am’s Mastodon account. Wheeler Dealers was a cassette release, a format not as well understood as the Apple II floppy disk formats, but it’s playable on its Internet Archive page.

Its title screen gives it a copyright date of 1978, making it only slightly younger than the Atari VCS/2600. Wheeler Dealers was the first published game by M.U.L.E. creator Dani Bunten. Designed for four players, it came with a special controller to allow four players to participate in auctions on an equal footing. If played in an emulator, they often have settings to allow the buttons to be remapped to joystick directions, and from there to specific keyboard buttons.

It’s a stock trading game, written in BASIC, and much less polished than M.U.L.E. would be. It barely has graphics and has no single-player mode. I find it hard to control in the IA’s web-based Apple emulator. Basic stock trading games seem really simple these days. I think Wheeler Dealers (or “Wheeler Dealer$,” according to the title screen) is mostly interesting these days has a herald for M.U.L.E., which I find holds up really well to current-day tastes. Dani’s real-time auction mechanism would be honed to a fine edge in M.U.L.E., which to this day is probably still the best multiplayer auction mechanism in any game.

Dani Bunten left us long ago now, back in 1998, but her absence is still keenly felt. One of her last projects was a Sega Genesis/Mega Drive port update of M.U.L.E., which was infamously scuttled when publisher Electronic Arts insisted, as a condition of publishing, a mechanism by which players could directly attack other players with weapons. It is far from the only terrible action that EA would be responsible for, but it’s certainly one of the worst.

Famicom Family BASIC

I love BASIC! I don’t make a secret of it. It was the product, even before DOS, that launched Microsoft. It was invented to be the language to bring programming to the masses, and, for a short time, it fulfilled that function. (These days, if you want to learn coding, I suggest Python. Not only is it a lot more capable and modern, but you can actually get a job writing it.)

Used to be if you had a new computer you wanted families to buy, you had to have a version of BASIC to ship with it. The Apple II had two, one written by Steve Wozniak himself. Right off the top of my head, computer systems with BASIC, go! Altair, Apple II, Commodore Pet, Vic-20, 64, 128, Plus-4, 16, Atari 8-bit, TRS-80, MS-DOS, Windows (Visual BASIC carried the torch for many years), and, most improbably, the Atari VCS/2600, in its BASIC Programming cartridge, an effectively useless cart for its stated purpose that’s nonetheless an excellent hack. The machine has 128 bytes of RAM, but it can still run BASIC, by jove.

The Famicom has a version of BASIC too, coming in at the end of the language’s heyday. Over on the Peertube instance diode.zone, user RE:Enthused did a two-part introduction to it that may be of interested to people who still think in terms of FOR/NEXT loops.

Let’s look at Family Basic on the Famicom, Part 1 (8 minutes) and Part 2 (17 minutes).

Reimplementations of the Contents of BASIC Computer Games

When we talk about the old days in computers, there’s easily several eras we could be talking about. There are people who consider the Wii/PS3 era to be the Ancient Times, for after all they were both released in 2006, 17 years ago. They’re almost old enough to drive!

I consider the “modern era” of gaming to have begun with the Dreamcast/Playstation 2/Gamecube era, for in my view that was when, with skilled art design and coding, and modest requirements, one could reasonably generate a realistic scene. Take a look at Crazy Taxi and Soulcalibur on the Dreamcast, both have graphics that seem a little simple now but easily hold up, while the Nintendo 64/Playstation generation has to cut too many corners with their 3D graphics generally.

You can from there go back through the generations: the 16-bit era, the NES/SMS era, then the Atari VCS/Intellivision/Odyssey2/Colecovision era. There’s also the era of home microcomputers, Apple IIs, Commodore 64s and Atari 8-bits, among others, a time that really has no comparison before or since.

But even that wasn’t the beginning of computer gaming. Know, oh prince, that between the years when the oceans drank Atari and the gleaming manufacturers, there was an age undreamed of, when shining timeshare systems lay spread across the world like Big Blue mantles beneath the stars. That was when computing may well have not even meant using a monitor, but instead entering data through a kind of typewriter, with your text appearing on paper, and the machine’s output would also appear on that paper. While that was a time where computing was still new and expensive, and people rented time on big mainframe machines with, at the time, ludicrous resources. The IBM System/370 Model 145 had 500 whole kilobytes of memory, and 255 megabytes of disk space. Such a machine would be partitioned out to many users, who each had accounts on it, and would be served by the processor concurrently. And they liked it!

Two covers for BASIC Computer Games, the common later “Microcomputer Edition” and an earlier one.

And before even teletype machines, there were punchcard systems, and the oscilloscope screen on which Tennis For Two was played, but for this post that’s going back a little too far.

This was the time in which David Ahl’s book, BASIC Computer Games*, appeared on store shelves. It was first published in 1973. When I was younger I had a copy of it, given to me by a relative, but it was already a relic by then. I once spotted it on a store shelf, gamely offered for sale despite it being probably around 1991 at the time, a good lifespan in a genre of book nowadays considered disposable. Remember, Pong debuted at Al Capp’s Bar in 1972**. There was a thriving culture of computer gaming even before the first commercial video games were sold.

(* Note 1: While it’s often forgotten now, BASIC is properly written with capital letters. It’s an acronym that stands for Beginner’s All-purpose Symbolic Instruction Code. That’s not as tortured as, say, “GNU’s Not Unix.”)

(** Note 2: Pong wasn’t the first commercial video game. That was likely the Odyssey, or Nutting Associates’ Computer Space. I don’t want to get into it here. This comment is here largely to satisfy my own obsessive/compulsiveness.)

Super Star Trek. The text of the book indicates that versions of the Star Trek text game existed since “the late sixties.” Remember, the show aired in the late sixties. People were playing Star Trek on computers while Star Trek was airing on television in first broadcast.

BASIC Computer Games, and its sequels More BASIC Computer Games and Big Computer Games, record, as program listings, a couple hundred old computer games and other entertainments much as they existed at the time, which makes it an incredibly important book for software preservation and computer historians, I’d think anyway. It has listings for a version of the “Star Trek” text game that was popular at the time, and that even once inspired a vectorscan arcade game from Sega, as well as a good number of other amusements.

I say game design doesn’t go obsolete, but it’s true that current expectations of what computer programs should do, let alone games, are not met well by the programs in the books. Still, they can be fun to interact with, for a while at least, and a project exists on Github to update all of the programs to a variety of current (I refuse to say modern) programming languages.

You can also obtain the software in .bas files compatible with Vintage BASIC, a reimplementation of classic Microsoft BASIC for current OSes including Windows, Mac and Linux.

PDF of Basic Computer Games (annarchive.com)

Compilation of programs from BASIC Computer Games converted to current languages (github)

Vision BASIC for the Commodore 64

The Commodore 64 was, for its time, quite a wonder, an inexpensive home computer with 64K of RAM and excellent for its time graphics and sound capabilities. Sadly, it came with one of the more limited versions of Microsoft BASIC out there.

Microsoft BASIC had its strengths, but many of them were not a good match for its hardware. The C64 had no commands to take advantage of any of its terrific features. To do nearly anything on the machine besides PRINTing and manipulating data, you had to refer to a small number of cryptic-yet-essential commands: POKE for putting values into arbitrary memory addresses, PEEK for reading values out of them, READ and DATA to read in lists of numbers representing machine language routines, and SYS to activate them.

And getting the values to do those things required obtaining and poring over manuals and the venerable C64 Programmer’s Reference Guide. Even then, Microsoft BASIC was notably slow, especially when doing work with numbers, due to its dogged insistence of converting all values, including integers, into floating point before doing any math on them. So while BASIC supported integers, which required less memory to store, actually slowed the machine down due to the need to convert to and from floating point whenever an operation needed to be performed on them. This doesn’t even begin to get into the many inefficiencies of being an interpreted language.

Vision BASIC, an upcoming commercial compiled language for the Commodore 64, looks to remedy many of these faults. The above video is a nearly 40-minute explainer and demonstration of the system. It requires the purchase of a memory expansion unit in order to be used on a physical machine, but it can produce executable code that can be run on a stock C64 as it came out of the box.

It’s not free, and at $59 for the basic package it may seem a little high for a system for developing software on a 40-year-old computer, but that price includes the software on floppy disk and a USB drive. It’s certainly capable, and runs much faster than many other compiled languages on the system. It’s definitely something to look into for people looking to make games on the system without digging deep into assembly, and if you have a desire to do that it has a built-in assembler for producing in-line machine code too! It is an intriguing new option for Commodore development.

Commodore Basic 2.0 for Other Systems

Say what you will about Commodore BASIC 2.0, the built-in programming language and makeshift shell for the Commodore 64, written by Microsoft employees and descending from code written by Bill Gates himself, it’s certainly, um, basic. Nearly everything that takes advantage of that machine’s graphics or sound features involves POKEing values into memory at various locations, requiring a programmer to memorize a long list of important numbers.

Because it doesn’t interface with the system’s unique features to any great extent, it’s a very generic version of BASIC. But this means it can be ported to other systems without tremendous effort. Fancy-pants commands don’t have to be converted to another architecture’s norms, because there aren’t any! And lots of systems used the instruction set and general capabilities of the MOS 6502, upon which the Commodore 64 is based, so now we have versions of its BASIC that work on the Nintendo Entertainment System and the Atari 800. They’re both based off of Project 64, an annotated disassembly of the C64’s BASIC and Kernal ROM code.

The NES port should be able to run on actual hardware, but you’ll need the Family Keyboard that was made to work with the Famicom’s own official BASIC to use it, which was only released in Japan.

By the way, the reason that I write BASIC in all-caps is, it’s an acronym! It stands for Beginners’ All-purpose Symbolic Instruction Code.