Homebrew hacks

Galaga, Champ Games, and enhanced cartridges

Champ Games announced a new project, an Atari 2600 port of Galaga.

I have seen some of Champ’s other Atari 2600 homebrew projects, and they’re very impressive. They did a version of Scramble which is virtually indistinguisable from the arcade, which is an incredibly impressive accomplishment on hardware as limited as the Atari 2600.

Galaga is a classic arcade game, one of the most successful of its era, and can still be found in bars and arcades all over. It was one of my favorite arcade games as a kid, and I’ll still drop a quarter in one when I find one and have some time to kill.

I owned the Atari 7800 port of Galaga, and was glad I could play a version of it at home, even if it wasn’t quite exactly the same experience as playing the arcade version. What Champ has come up with, from what I can see in their video, it appears it feels closer to the arcade than the 7800 port, although the graphics are slightly inferior to the 7800 version.

Galaga (Champ Games, Atari 2600) title screen
Galaga (Champ Games) title screen
Galaga bugs flying in from the left at the start of a wave.
The motion of the incoming wave is stunning!
Galaga fighter capture
Fighter capture looks impressive!

Here’s a preview video showing the game in action and talking about some of the technical details:

As a Galaga fan, I really want a copy. As a game developer, I’m impressed with the effort and execution it takes to get a game looking and playing this good on such limited hardware. It simply shouldn’t be possible on an Atari VCS, which only has 5 hardware sprites plus backgrounds, and nowhere near enough CPU or memory to handle all the complex movement that is required to accurately re-create a Galaga experience.

How do they do it? Well, I asked them. And they were nice enough to answer: they build a cartridge with an ARM CPU in it, and it augments the Atari’s built-in hardware, and this is how they’re able to create games that are vastly superior to what should normally be possible with the 2600 console alone.

My response to this was disappointment, and I said as much. But I think it came off the wrong way and more than one person jumped on me for saying something negative about what is otherwise an exciting project for fans of the Atari and of Galaga. No one was particularly brutal toward me, but the creators behind the project were a bit nicer than their fans, and engaged with me and we had an interesting conversation on the philosophy of homebrew, and how their technology works. I want to thank them for that, and for creating such great games for the Atari 2600 in 2019, and keeping the system alive more than 40 years after it launched. I have a copy of Scramble and am really looking forward to playing Galaga and Zookeeper (another favorite classic arcade game) when they’re ready.

So, first things first, from a gamer’s standpoint, the only thing that truly matters is the game experience itself. It doesn’t matter what technology is inside of it, or how amazing, complicated, or messy the engineering is. The only thing that matters is the experience you have when you play the game. If it’s fun, if it’s polished, it’s a good game. End of story. And that’s exactly why I’m excited about buying a copy of this when it’s ready for release.

Now, as to my disappointment. At first I thought I was seeing something impossible, and I was really keen to hear how they had managed it. The solution of adding an ARM to the system architecture of the VCS is fine, nothing wrong with it. But it’s not amazing. My disappointment was from the vantage point of the programmer, who was mind-boggled at how this team had managed to get so much performance out of a 6507 CPU backed by 128 bytes of RAM. Well, they didn’t. They bolted on a 70 MHz ARM CPU, and got it to talk to the rest of the system, and while that also requires some neat engineering, it’s not magical in the way that somehow figuring out how to get 3x Zilog Z80’s worth of performance (which is what powered the original arcade Galaga machines) out of a MOS 6507.

That’s really all I meant by what I said. I don’t consider it “cheating” to augment the console hardware by packing in additional chips on the ROM cartridge circuit board. This was done back in the day, and was very necessary in order to extend the life of the Atari. All cartridge-based consoles that had a market life of more than a few years needed to use such tricks in order to keep their hardware competitive and relevant as computer technology doubled in speed every year.

The only real difference is that these augmentations were done using chips that were comparable (or at least within 1 generation) of the capability of the original hardware. They truly did augment the system. Whereas, with a 32-bit ARM CPU, you really could build a system around that chip alone, and do more than you could by interfacing it to a 40-year old Atari system architecture that forces it to slow down and work within the constraints of its design. I mean, with a 70MHz 32-bit ARM CPU, it should be possible to do an arcade-perfect emulation of the original arcade hardware, or if not then to certainly come much closer to that than what you can get by running the I/O and video drawing through an Atari VCS. So, rather than the ARM augmenting the Atari, the Atari is kindof bringing down the ARM. This doesn’t matter if you’re nostalgic for the Atari and like the feel of a CX40 joystick in your hands and the crude graphical style just barely possible with the 6507-driven TIA. If you don’t know or don’t care about the engineering, it just looks and feels like the best damn Galaga port you could imagine, running on an Atari 2600, and actually quite a bit better looking than anything you would have thought possible if you did know the system’s capabilities.

But really, it’s almost all due to the ARM chip’s capabilities, which are many times the power of the rest of the system.

I suppose one could take an Atari 2600 controller, put a wifi chip in it, and have it interface with Google’s Stadia console-in-the-cloud, and run Assassin’s Creed, downsampled and graphically degraded, through the Atari, as well. And… actually hell yes, that would be cool as fuck. I want to buy that too. But it’s a different kind of cool to hook an Atari up to a cloud supercomputer platform than it would be to somehow squeeze Assassin’s Creed into 4 KB of ROM, if that were even possible.

I thought about how to express this properly, and the best analogy I could come up with is the stage magician David Copperfield. In 1983, David Copperfield performed a magic act where he made the Statue of Liberty “disappear”. Of course, he didn’t really make it disappear. It was an optical illusion done with misdirection, a rotating stage, and some very bright lights.

If he had somehow teleported the Statue of Liberty, and then brought it back, or if he had somehow made the Statue of Liberty disappear, how awesome would that have been? Whether by real “magic” or by some super-advanced technology that no one else had yet heard of, that would have been beyond amazing. It would have changed the world we lived in, in untold ways. But it didn’t. He just set up some elaborate rotating stage, hid everything behind curtains for over an hour while everything was being moved into position.

Eight year old me was captivated by the idea of a giant statue disappearing and reappearing, whether through magical or advanced technological means. A couple years later, though, I was old enough to realize it wasn’t “real” magic, and that it was some kind of “cheap” trick (well, relative to the cost of really doing it, anyway), and wasn’t as impressive as I had thought, and as a kid you really hate being lied to, you hate being fooled. It makes you feel embarrassed and dumb, and you want to hide the fact that you ever thought it was cool.

So for a long time after that, I kindof had this grudge against David Copperfield, and stage magic, and whenever I’d see someone pulling off some sleight of hand or optical illusion trick, I’d get annoyed and impatiently insist that magic is bullshit, and refuse to be impressed by it, because I wasn’t some fool. For maybe a year or two, I had believed that we were on the cusp of a Star Trek-promised future, with instant teleportation, or at least invisibility shields. That would have been so cool. But no, we didn’t get that.

Well, now that I’m 43, I’m back to being impressed at how convincing an optical illusion David Copperfield could create with just some lights, scaffolding, cranes, and a rotating stage that moved slowly and gently enough that an entire audience didn’t notice they were moving. Even if the entire trick required the cameras filming it to be positioned just right. That still took some serious engineering effort, and even for as limited as the result was as compared to true invisibility or teleportation, when you realize all the work and planning that had to go into it, that’s still pretty damn impressive — just in a different direction completely than I had been (mis)lead in the first place.

So this is what I meant by “disappointed” when I found out that Champ Games puts an ARM CPU in a cartridge and through some impressive engineering hacks gets it to talk in sync with the console and run a game that blows most other Atari 2600 cartridges away. Sure, the game is impressive and it’s certainly going to be fun to play. On the other hand, a ARM CPU is in a different “weight class” from a typical ROM cartridge with perhaps a little extra RAM or a sound chip soldered onto the board. This isn’t to take anything away from the experience of the game, or the technical wizardry required to build it.

But it’s a bit like putting a 1000cc engine into a go kart and then winning a go kart race with it against a bunch of stock go karts. It’s still a pretty cool project to put a 1000cc engine in a go kart, but when you find out that’s why that kart was so much faster than the others, it’s hard not to be a little disappointed that the secret wasn’t some method of suping up a 50cc lawnmower engine to get the performance of the 1000cc engine. And then you realize that the chassis of the go kart really limits how much performance you can actually get out of that 1000cc engine, compared to something engineered to get the most out of it, like, say a state of the art motorcycle chassis, transmission, wheels, etc. And then the super kart seems, well, it seems pretty fun still, but kinda wasteful of the potential of that engine.

When it comes to chip enhanced ROM cartridges, I think it’s fair to say that, at least from an engineering standpoint, once you get to the point where the enhancement hardware is not only more capable than the console itself, but is actually held back by the restrictions imposed by having to interface with the console, such that you’re exceeding the console’s limits, but not able to push the expansion hardware anywhere close to its limits, you’re at a cutoff point. While it’s entirely possible to create an awesome game experience this way, you’re really at a point where you’re well beyond the capabilities of the console, and the console is holding you back. At that point, you might as well engineer a new system.

The only practical reason not to engineer a new system would be if the existing install base for the obsolete console is still a viable market; the work it takes to establish such an install base with a next-generation system is considerable. But this is a business consideration, not an engineering consideration. And business considerations aren’t less legitimate than engineering considerations, but obviously businesses do at some point make the decision to roll out a new generation of console hardware. Which is why we’ve had several of those in the intervening 40 years.

And of course, there’s nothing wrong with doing it “just to do it”, in the way mountaineers climb the tallest mountain they can find “because it’s there”.

Update: ROMs for Galaga are now available for download.

3 Comments

Add a Comment
  1. This was an excellent read Chris, thanks! A few of your analogies are a little off but you’re absolutely right in your conclusion: the quality of the games we program with the ARM is much higher than without, or at least the *potential* is much higher.

    The original inclusion of the ARM chip was not so that it could be used to run game logic; it was originally intended to just emulate the DPC chip used in Pitfall 2. More specifically, it was to emulate the 3-channel music chip and the ‘fast fetch’ mode that allowed you to update a TIA register in 7 cycles by pulling data off of a pre-loaded buffer (this typically would take 13 cycles give or take). The engineers behind the DPC implementation with the ARM (Chris Walton, Darrell Spice Jr. and Fred Quimby, the ‘CDF’ in the CDF bank switching driver used by the games) saw an opportunity to expand the original DPC chip using the ARM resources which brought about DPC+ (used by Scramble), CDF (used by Mappy & Super Cobra Arcade) and currently CDFJ (J is for me, John Champeau :)). Each revision adds a couple other tricks that allow the developers to squeeze a little more usable power from the ARM.

    From a technical standpoint, it should be noted that the 32-bit 70 Mhz ARM is, as you mentioned, ‘held back’ by the TIA in the sense that you still only have so many milliseconds before and after a frame is drawn to execute ARM code per frame. There is extra RAM: 4K that can be used by the data fetchers which load the TIA registers, and another 2K that can be used by the ARM. There is 32K of ROM, and 4K of that is mapped to the data fetcher RAM and another 2K is used by the CDF(J) driver, leaving 26K of ROM to share between ARM code and 6507 code. I may be off with some of these technical details, but this should be pretty close. :)

    The TIA still ‘runs the show’ as far as what can be displayed, controls, sound, etc., meaning that you are still limited to 2 sprites, 2 missiles, the ball and a low-res playfield for graphics. The ARM really helps out in that it can set up data for these TIA registers each frame which then can be read during 6507 execution (76 cycles per scan line). Note that ‘technically’, the 2600 isn’t displaying anything that isn’t possible without the ARM; however, the ARM makes it much more feasible and flexible *to* use these sprites to their fullest capability.

    To give some real world examples, take Galaga for example. The 6507 kernel that displays up to 8 enemies on 1 line using 1 sprite is the same trick that was used in Galaxian (multi-colored too, although Galaxian only has 7 enemies across). Galaxian also can draw a single flying enemy and the ball on the same line (for missiles). The DPC+ frees up more cycles per line so I am able to also use a missile which reduces flicker and frees up the ball to display the stars, but comparatively these are almost identical. Most of the extra ROM is used for the ‘eye candy’; e.g. the overlaid ‘text sprites’ which are nothing more than the very common 6 and 12 character interlaced kernels used in many games back in the day, the fancy scoring screen, title screen, etc. Note that the sounds are all pure TIA and would sound identical regardless if there was an ARM or not (all sounds are generated and played in pure 6507). The extra cycles in vertical blank (before drawing the screen) is used mostly for setting up the data to be drawn in that frame, and the extra time in overscan (after drawing the screen) allow for more precise collision detection, enemy movement, etc.

    Anyway, I hope you find this information useful and perhaps it clears up some of the misconceptions about what the ARM is doing. Champ Games did a port of Lady Bug back in 2006 that was nothing more than 16K of ROM and there is no doubt that for me, developing in ARM is not only more enjoyable and ‘easier’, but the capabilities afforded to me by the ARM allow for games that would have been ‘impossible’ back in the day or at least not viable commercial products due to the cost to make them.

    Thanks again for your article!

      

    1. Thanks again for providing all that information, John, and taking time to engage with me before. Champ Games is really pulling off the magic tricks with these latest projects, and even if it requires a little assistance back stage from a much more powerful processor, they look and play phenomenal. Keep up the awesome work!

        

      1. You’re welcome and thanks to you Chris! Up next, we’ll be finishing off Wizard of Wor Arcade and then it’s on to finishing Zoo Keeper. :) Stay tuned!

          

Leave a Reply