Technology1 min read

A great old-timey game-programming hack (2013)

By · Published by Everything Blog

In short

Developers in the 1980s encountered major technical hurdles when converting arcade titles to home computers that lacked hardware-accelerated visuals. The central processor was forced to render entire environments byte by byte, which introduced severe slowdown despite typical code optimizations like loop unrolling. Rendering background scenery consumed the majority of processing power on a 320-by-240-pixel screen buffer. The system's 6809 processor relied on 16-bit index registers to copy 28-by-28-pixel tiles just four pixels at a time.

Key points

  • Home computers in the 1980s lacked specialized graphics acceleration and required process…: Home computers in the 1980s lacked specialized graphics acceleration and required processors to draw graphics manually.
  • Constant background redrawing consumed most of the processing power during side-scrolling…: Constant background redrawing consumed most of the processing power during side-scrolling gameplay.
  • Handling 28-by-28-pixel tiles four pixels at a time placed extreme strain on 16-bit index…: Handling 28-by-28-pixel tiles four pixels at a time placed extreme strain on 16-bit index registers.

Sources checked by our analysis pipeline: 1

A long time ago, when I was a college undergrad, I spent some time working on computer video games. This was in the 8-bit PC era, when the gaming hardware was almost impossibly slow by today’s standards.

It might not surprise you, then, to learn that game programmers of yore did all sorts of crazy things to make their games run at playable speeds. Crazy, crazy things.

This is a story about one of those things.

While I’ve done my best to recall the important details, I may have gotten some things wrong. If I have, please forgive me. It was a long time ago.

(Note: This post contains some small images as inline-data URLs that some feed readers apparently don’t handle well. If you can’t see the images in your feed, click through to the original article to see them.)

Update 2013-12-16: There have been lots of great comments about this story on Hacker News and Proggit, as well as here on the blog. Thanks for sharing, everyone!

The set-up

A friend of mine, a gifted programmer, was nearly…

Technology