Articles posted December 2007


When I first started working on the Midway Zeus 3D hardware, I was hopeful that the so-called "Zeus 2" chip would follow logically from the original. So it was with heightened expectations that I started looking at Cruis'n Exotica and The Grid, during a couple of free days I had off.

Sadly, my wishes did not come true. While the second generation Zeus chip shares a few fundamental concepts with the original, there is quite a lot about it that is very different. For example, the Zeus 2 renders to a 32bpp framebuffer instead of 16bpp, and directly accepts some parameters in the wacky TMS3203x floating-point format rather than requiring the main CPU to convert everything to integers first. But even worse, all the registers and data formats are different, so it's like starting from scratch again.

It's been pretty frustrating making progress, but at least I have something to show. The game is "playable" as long as you don't mind not seeing large chunks of geometry and enjoy having your view blocked by the background. But at least textures and colors seem to be mostly right, and the geometry is fundamentally there, if a bit mis-sorted.

The Grid is proving even more problematic, demonstrating a fundamental flaw in the TMS3203x interrupt handling that is causing me to rework it in the core and then fix all the other games that use it.

Midway Zeus Progress

So I've been spending a good amount of time reverse engineering the Zeus chip's behavior. Thanks goes out to the folks who offered to loan me a Mortal Kombat 4 board. So far I haven't had to hack into it yet, but as I delve into some of the more esoteric behaviors of the chip, I suspect I will need to eventually. The board I've been loaned has at least been very helpful to understand what things are supposed to look like.

In the past few days I've finally figured a number of things out....

First off, textures now appear to be correct in most cases. It turns out there are a bunch of subtleties in the texture handling, including per-quad offsets, independent U and V coordinate scaling, ignoring the low address bit, determining when to make things transparent, etc. Getting these basics figured out means that the games are now respectable looking.

I knew Invasion ran on the same hardware as Mortal Kombat 4, but the way it handles models, textures, and interrupts was quite different. I think I've finally reconciled most of it, so the game boots, coins up, and plays, though there are still a bunch of models missing and glitches to figure out. I also need to hook up the light guns so you can actually try playing.

Even better, Mortal Kombat 4 is mostly playable, at slow speeds (no serious optimizations yet). Lots of glitches remain, but it fundamentally works, which is pretty thrilling given where I was a couple months ago.

As I've been figuring stuff out, I've been adding to the rapidly expanding Midway Zeus wiki page. This is pretty much a brain dump of how I understand the chip to work, and writing it down has helped me deduce a bunch of stuff.

Yet there are still a bunch more things to figure out, such as alpha blending effects, lighting, missing bits of models, extra vectors and matrices I don't understand, crashes, weird results, etc.

But in the meantime, enjoy some WIP screenshots of Mortal Kombat 4 and Invasion running in MAME.