Midway Zeus
Midway Zeus Hardware
This topic is primarily focused on the 3D graphics hardware of the Zeus. The Zeus chip is a Midway custom 3D controller that is capable of high polygon rates. Not much is yet known about the chip, but a number of details have been reverse engineered. This page describes what is currently known/understood.
Main CPU
The main CPU driving the Zeus is -- at least in the case of Mortal Kombat 4 -- a TMS32C032 DSP running at 60 MHz.
Zeus 3D Graphics
The Zeus chip is memory mapped into the main CPU's address space at addresses from $880000-$8803FF. Keep in mind that the TMS32C032 only accesses 32-bit memory, so each of the 1,024 addresses is 32 bits wide (i.e., address $880000 references one 32-bit word, and address $880001 references a completely independent 32-bit word).
As with most external chips, the memory map for the Zeus consists of a number of registers, in this case 512 registers. One interesting aspect is that the Zeus internally appears to be a 32-bit chip, but can be accessed in (and defaults to) a 16-bit mode. The way this is done is that in 16-bit mode, accesses to odd addresses reference the upper 16 bits of a register, while accesses to even addresses reference the lower 16 bits of a register. When the chip is switched to 32-bit mode, almost all accesses are to the even registers. It is not clear what happens if you read or write to an odd address when the chip is in 32-bit mode, though the games on the hardware occasionally do so.
The 512 registers on the chip are described by their addresses. So register 0 maps to address $000, while register 1 maps to address $002, etc. This helps keep things straight when referring back to the code.
Zeus Register Map
Address | R/W | Purpose |
---|---|---|
$006 | W | Low 16 bits specify texture mode |
$058 | W | Usually written after $05A; after writing, waits for read from $0F6 to return with bit 4 cleared |
$05A | W | Usually written immediately before writing $058 |
$068 | W | Written at startup:
|
$080 | W | Master control; configures some core chip behavior:
|
$084 | W | $00000080 = select render page? (generally set when $CC is set to $000000 and clear when $CC is set to $800000) |
$0B0 | R/W | Data port for direct RAM access |
$0B2 | R/W | Data port for direct RAM access |
$0B4 | W | Address for direct RAM access
|
$0B6 | W | Direct RAM access control
Examples:
|
$0C0 | W | Written at startup = $801F2500 |
$0C2 | W | Written at startup = $0015E591 |
$0C4 | W | Written at startup = $000C0042 (HSYNC start/HSYNC end?) |
$0C6 | W | Written at startup = $0211007F (HTOTAL/HBLANK end?) |
$0C8 | W | Written at startup = $010300FF (VSYNC start/VBLANK start?) |
$0CA | W | Written at startup = $01160107 (VTOTAL/VSYNC end?) |
$0CC | W | Written at startup = $00000000 (display start address? switches to $00800000) |
$0CE | W | Written at startup = $00C87620 |
$0E0 | W | Data FIFO (see FIFO commands, below) |
$0F2 | R | Looped on until it returns a stable value; must change frequently; PRNG? current video line? |
$0F4 | R | Status register
|
$0F6 | R | Status register 2
|
$200-$3FF | W | Unknown, but written in a loop with master control bit $00000008 cleared
Possible fast buffer clear? One set of writes stores $7F7F to all entries. A second set writes $E00,$25,$E01,$25,...,$E7F,$25. A third set writes $52,$A0000000,... |