We talk a lot about “scanlines” here, but a lot of memorable arcade games of the 1970’s and early 1980’s like Asteroids, Battlezone, Star Wars, and Tempest didn’t have scanlines at all: they were vector games, where the crisp sharp lines drawn by the electron beam formed the picture directly. But only one game console ever brought the vector gaming experience home: the Vectrex, released by GCE and Milton Bradley in 1982. Here’s a quick overview and a look at some cool stuff the enthusiast community is doing with it today.
Take a look
The Vectrex has a prominent vertically-oriented monitor. While it’s small and very lightweight for a CRT thanks to its plastic construction, it’s not exactly portable, as it runs off of wall power. The screen is the whole point here, and what makes the Vectrex unique, though with 1.5MHz Motorola 6809 CPU, it’s no slouch for the time. (The contemporaneous Tandy Color Computer, a home computer and not just a game console, ran at 895kHz– that’s kilo, with a k)
Unfortunately, even on a good day a monochrome CRT is very hard to photograph because of reflections. Not that this screen is the best to show off the system; when showing text like this, the Vectrex is just drawing it using lines; so as you can see, it’s not quite right to say the Vectrex has no scanlines. This game, Mine Storm, is actually built into the console.
Where the Vectrex gets interesting is when it starts drawing things that aren’t horizontal lines.
These are perfect lines. Now, this blog is displaying on a computer screen, and the photo is an image of discrete pixels. If you zoom in, you’ll see rows of dots. But on the Vectrex, you don’t. No matter how close to the screen you look, you’ll see a diagonal line. This is very cool; it’s a level of crispness that honestly we’re only starting to reach with high-density displays in the raster world. Gameplay-wise, though, Mine Storm is a fairly straightforward clone of Atari’s Asteroids.
A Vectrex game
Here’s a boxed Vectrex game: Star Trek: The Motion Picture. You might wonder what a game based on the first Star Trek movie might look like. Long, lingering vector images of the U.S.S. Enterprise? A space shooter where you face absolutely zero enemies while playing a thirty-minute trudge to V’ger? A transporter-accident minigame where you try to put Commander Sonak back together?
Well, no.
The game comes with a colored overlay to add some color to the monochrome screen; this is pretty common, possibly universal for Vectrex games. (Mine Storm did have an overlay originally but I don’t have it, though Asteroids was a monochrome game originally anyways so it’s not a huge loss) They also have the controls listed at the bottom, which is convenient.
In this case, the yellow square shows your targeting area. In a twist Gene Roddenberry may not have approved of, Star Trek: The Motion Picture is a combat game; you fly through an area, shooting Klingons, and docking at starbases. It’s actually kind of like a real-time action version of the old BASIC unlicensed Star Trek game that came to pretty much every computer in the 1970’s.
Sadly, they couldn’t spare a button for self-destruct. The game runs at 50Hz, which is typical of Vectrex games; as we’ll see, this is a console where every nanosecond matters. And of course, since this is a Vectrex game, those Klingon Birds of Prey you’re fighting are nice and crisp. Just look at those lines.
So I think now we’re getting some understanding of the Vectrex’s capabilities. It can draw crisp lines, but not too many of them; therefore, it’s no surprise that a lot of Vectrex games take place in outer space. Even moreso than the PC Engine, this was a console made for shooters. For pre-Space Invaders shooters especially.
How does it work?
RGB is the best quality video for a raster image because it has three continuous signals. For a one-dimension raster image, we only need one continuous signal. But vectors force us to recognize reality: the raster itself is a signal, just one being generated inside the monitor. So for just our simple monochrome image, we need three continuous signals. Two for the position (X and Y, in cartesian coordinates) and we also still need the intensity. And remember, these are analog signals.
So let’s take a look at how the Vectrex works. It’s worth noting that this is compiled from a few sources, most notably Keith Wilkins’ “INTERNAL.TXT”. I haven’t coded for the Vectrex myself, so I’m likely going to get some things wrong; please send me an email or message if I do and I’ll try to correct it.
So with that caveat, here’s my best understanding in a diagram. Note that I’ve left off things like the sound or controller reading (the Vectrex does have analog controls! and its controller is still nice to use, you hear that Atari 5200?).
The whole Vectrex is basically controlled using a 6522 PIA. Well, it’s actually a VIA, or so I called it in when I wrote a blog post about the Mockingboard; whether it’s a Peripheral Interface Adapter or a Versatile Interface Adapter seems to not matter. (The PIA acronym seems to come from the Motorola side while the MOS side usually calls it a VIA, but PIA is what I see in most Vectrex documentation despite the 6522 being a MOS chip)
The first signal the PIA controls is BLANK'
. This signal is very simple; when it is low (remember '
means active-low) the CRT will not display a signal, regardless of what the intensity is. This signal is hooked up in such a way that it can be hooked up to a timer on the PIA as well; this allows for nice things like dotted lines by turning it off and on in succession.
The main functions, though, are the DAC (digital-to-analog converter) and the Integrator. The DAC is straightforward; one 8-bit port on the 6522 is attached to its input, which it converts to an analog voltage. (And that voltage can go negative) That voltage can be sent to different places depending on the output (and is always sent to the X input on the Integrator, which I’ve called “dx”.) The DAC can be used to control the intensity signal directly.
The Integrator is in some sense the heart of the Vectrex. And yes, this an integral in the mathematical concept; but don’t worry, as this is simply a linear output with constant inputs: that is to say, it draws straight lines. Let’s step through a typical use case to understand how this works.
- The
ZERO'
bit is set low. This causes the integrator to enter zero-ing mode. - The
RAMP'
bit is set low. This causes the integrator to become active. Since the zero pin is active, this will reset to the default position. (0,0) is the center of the screen. - The
RAMP'
andZERO'
pins are set high. This disables their functions. - Write an “integrator offset” value using the multiplexer and the DAC. You can think of this as a scale factor on both
dx
anddy
. - Write
dy
using the multiplexer and the DAC. This value will be retained when the multiplexer is redirected. - Write
dx
. This must be done last because it’s hooked directly to the DAC output. - Set
RAMP'
low. This will cause the integrator to change itsX
andY
outputs based ondx
anddy
. The larger thedx
, the fasterX
grows, and vice-versa. - Wait. The longer you wait with
RAMP'
low, the more theX
andY
will keep moving. - When you’ve gone on long enough, set
RAMP'
high.
Step 8 is the one that you might find particularly interesting. The length of the vector is a function of time. So there’s no way to just set the position of the beam (except for the special case of 0,0); you need to move it at a speed, and keep track of where you’re going. But this makes sense when you think about how a vector must move throughout the screen. The Vectrex system does contain a ROM that, in addition to the built-in game, contains some drawing routines that are frequently used to cut some boilerplate for the game developer.
Assuming direct control
You might notice something; everything the Vectrex uses to control its screen hardware is connected to the 6522 PIA rather than to the CPU directly. This makes sense, as the 6809 has no IO of its own. This includes sound and controller reading, which we left off of the above diagram. And now let’s take a look at the cartridge pinout, taken from Ombertech.
The cartridge port exposes the full 16-bit address bus, the 8-bit data bus, and all of the control signals. It even exposes HALT
`, an important signal that allows the cartridge to disable the CPU entirely. Now, why would you want to do that? Because the Vectrex gives the cartridge all the tools to control the console itself, making it incredibly upgradable. And what small, affordable computer has a large number of general-purpose IO lines? The Raspberry Pi, of course.
The PiTrex is an open-source project that features a board designed to interface a Raspberry Pi Zero’s GPIO lines directly to the Vectrex’s cartridge port. This means that the 6522 is no longer being controlled by a 1.5MHz 8-bit 6809, it’s being controlled by a 1GHz 32-bit ARM CPU. As you’d expect, this opens a lot of doors. One thing that really impressed me about the PiTrex project is that despite it being a bare-metal project, it’s really easy to get started with. You just need to add the files in a folder.
Of course, a 1GHz CPU doesn’t necessarily mean the PiTrex can do everything a thousand times as fast as a regular Vectrex. After all, the 6522 isn’t designed to run that fast, and neither is the CRT. Moving the beam can therefore take the same amount of time it would on the 6809. Still, everything that doesn’t touch the hardware can benefit.
A quick look at PiTrex
This won’t really do PiTrex much credit, as it’s more of a quick overview of some things that are currently integrated into the bare-metal distribution. I recommend you check out the wiki linked above for more details, and on implementing things yourself. This is still some of the most easily obtainable ready-to-use vector gaming available, which is part of what makes the Vectrex so interesting.
Vectrex emulation
One thing you might expect from such a device is a flash cart. But that’s not actually what PiTrex offers; instead, it offers a full emulation of the 6809 CPU, based off of the VecX emulator. Why emulate a console on the console itself? Because it offers the ability to run in a “Speedy” mode, allowing you to run the code as fast as it’ll go. Though I have to admit, when trying it in Berzerk, while the emulation felt quite accurate, it did not feel noticeably faster.
This environment is also a good place to try out games like Malban’s Vectorblade. Also, it turns out that the GCE rights-holders allow the Vectrex games to be freely-distributed by enthusiasts. That’s an amazing move, one I wish was more common.
Arcade emulation
Another cool feature this opens up is the use of emulation of vector-based games, using a real vector monitor. This is not quite “real hardware”, but it’s also more realistic than running these games on a vector-based emulator. In this case I’ve chose Atari’s Tempest; of course, this was a color game, and the color information is lost running it here.
You might notice that the text doesn’t seem to quite line up, it’s sloping somewhat down and to the right. Because this controls the vector monitor at a low level, it has a wide array of calibration options, and when I took this photo, my calibration wasn’t quite perfect. Additionally, the emulation I tried is definitely still in a developing stage, without features like sound. Still, this is very cool stuff.
Custom programs
The PiTrex is at your control, and is quite well documented. The bare-metal interface used here has a detailed library available and documented for running software a low-level. It goes without saying that a modern ARM processor is more suited to a modern development environment than a time-limited 8-bit processor, though the “VIDE” Vectrex IDE also supports C development on the 6809 if that’s your fancy.
One example game is Kevin Koster’s Hyperoids, included in the bare-metal PiTrex distribution. You can see that it has a bit more complexity than GCE’s vintage Mine Storm. Also, I am not sure if the failure of these hearts to form a complete shape is a sign I still don’t have the calibration down pat.
Other games to look out for for the PiTrex as a platform is Malban’s upcoming port of Elite, a beta version of which is available in the current distribution at the time of this writing.
Vectors so sharp you’ll poke your eye out
The Vectrex seems to be the classic video game industry example of poor timing; while it is very cool, and offered a number of innovations, it came out at a time just as the North American video game crash seemed to render the industry dead. And a better time for it never really existed, as the home video game market moved away from the simpler arcade-style games, and vectors disappeared from the arcade as well. We’re lucky to have gotten the Vectrex at all.
And so I’m really excited to see that the Vectrex is still alive and kicking as a homebrew platform, both with or without the PiTrex. I’m not sure I’ll try something for it myself, as I’m not sure my game development style fits well; the Vectrex isn’t as good at the long dialogue scenes I like to use to pad out the game. Still, I’ll definitely keep an eye there, and I recommend you do as well.
If you can’t get ahold of a Vectrex, but like soldering, the ScopeTrex open-source project exists that translates Vectrex games’ output into X and Y signals for a typical analog oscilloscope.