Man Writes a Graphical Game for (and on) a 35-Year-Old Kaypro 2/84

Cameron Coward
2 years agoGaming

Kaypro was a fairly obscure American manufacturer of home computers in the ’80s, and the computers they made were never even close to being as popular as competitors like the Sinclair ZX Spectrum or Radio Shack TRS-80. But, like those models, the Kaypro 2/84 used a Z80 processor that, theoretically at least, makes it compatible with a lot of the code used on the more common computers. Chris Fenton was able to take advantage of that fact to create a graphical game for his vintage Kaypro.

The game Fenton chose to make is actually a port of a game he wrote for the Arduboy called Deep Dish 9 (which, in turn, was based on a planetary simulation Fenton created for a Teensy). The goal of the game is to navigate your space ship to a particular planet to deliver a pizza, while taking advantage of orbital mechanics to deliver it on time. It’s a quirky game, and Fenton thought it would work well given the Arduboy and Kaypro 2/84’s relatively similar specs.

As you’d expect, however, actually making that happen was more difficult than he had originally intended. First, to rewrite the code, Fenton turned to Turbo Pascal, which is a complete Pascal IDE (integrated development environment) that’s remarkably lightweight at just 26KB. The original Deep Dish 9 was written in C++ (because the Arduboy is built on an Arduino), so a lot of syntax changes were required. But, Fenton was able to get the game running without too much trouble.

The only problem was that it was running very slowly—just 0.25 FPS. That was being caused by two major factors: the cycle-heavy floating point math used for orbital mechanics, and the way the graphics were being drawn to the CRT. To fix that, Fenton switched to simpler (but slightly less accurate) math equations, and moved from redrawing the entire screen to just the necessary pixels. After optimization, Deep Dish 9 now runs at comfortable 3–4 FPS of graphical gaming glory on the Kaypro 2/84.

Related articles
Sponsored articles
Related articles