A board · sheets 5/8 to 8/8

How a frame is drawn

The same crystal, the same counters and the same 59.64 frames a second as its sister board - and then a completely different idea about colour.

Draft. The architecture below is established - it is read from the drawings and corroborated by MAME's driver. The pin-level netlist behind the schematic pages is still machine-extracted and has not been walked against a physical board, so treat specific chip-and-pin claims as provisional until they are confirmed.

Everything is one crystal

Sheet 5/8 is titled SYNCHRONOUS and, as on the sister board, it means it literally. One 12MHz crystal is divided down to every clock in the machine: 6MHz for the dot clock and for the 6809, 3MHz for the sound Z80, 1.5MHz for both YM2203s.

The counters produce 384 dots per line and 262 lines per frame, which gives a 15.625kHz line rate and 59.64 frames per second. Nobody chose that number; it falls out of the two counter lengths. MAME configures its screen with exactly the same pair of numbers and marks the clock "verified on PCB".

The 6809 is worth a note here. It is clocked at 6MHz but runs an internal divide-by-four, so its actual bus cycle - the E clock - is 1.5MHz. A 6809 at 1.5MHz is not obviously faster or slower than Commando's 3MHz Z80; it simply does more per instruction, which is rather the point of the part.

12 MHzone crystal6 MHzdot clock6 MHzto the 68093 MHzZ80 sound CPU1.5 MHzboth YM2203s/2/2/4/8384 dots per line262 lines per frame59.64 Hz6000000 / (384 x 262)the 6809's E clock runs at 1.5 MHz

One crystal, every clock a division of it - exactly the arrangement its sister board Commando uses, down to the same 384 by 262 raster and the same 59.64 Hz that falls out of it. MAME's driver marks these clocks "verified on PCB".

The character layer

Sheets 6/8 and 7/8 are the text layer: the score, HIGH SCORE, the status line, the words on the title screen. A fixed grid of 8 by 8 tiles, two bits per pixel with one pen reserved as transparent, that never scrolls.

Its memory is shared between the CPU and the display by time-slicing on H4, a single bit of the horizontal counter - the same bit the sister board uses. One inverter drives the select pin of all three address multiplexers: H4 low and the display owns the memory, H4 high and the CPU does.

But here the two machines part company, and it is worth being precise because the obvious assumption is wrong. On Commando that time-slice is the whole arbitration scheme - the CPU never waits, because its window comes round faster than it can use it. Ghosts'n Goblins adds a wait circuit on top: three gates combine H2, H4 and the character-RAM chip select, and if the 6809 reaches for this memory outside its allotted quarter of a character cell, /MRDY drops and the processor's clock is stretched until the window comes round.

So this board really can stall its CPU on video access, and the older one cannot. Which is a small thing on the drawing and a real difference in how the two machines behave when the game is writing heavily to the screen.

Sheet 7/8 turns the resulting tile number into pixels through a character ROM and a pair of '194 shift registers - load eight, clock them out one per dot, and pick which end to read from if the tile is mirrored.

Colour, and the big departure

Sheet 8/8 is where the three layers converge, and it is where this machine parts company with its predecessor entirely.

Commando's palette is three bipolar PROMs - one each for red, green and blue - burned at the factory. Fast, cheap, and completely fixed: the only way to change a colour is to burn new chips.

Ghosts'n Goblins puts the palette in static RAM instead, written by the CPU. MAME maps those writes to 3800-38FF and 3900-39FF, 256 entries of RGB 4-4-4 - and the three 2148H RAMs on this sheet are almost certainly where they live, one per colour channel.

That decision costs real money in 1985 and buys something the older board can never do: the program controls every colour on screen, frame by frame. Fades to black, lightning flashes, the same enemy sprite recoloured for a later level, the shift in palette as you move between areas. All of it is the CPU writing to RAM, and none of it is possible with PROMs.

If you want one fact that explains why Ghosts'n Goblins looks like a later game than Commando despite being a year apart on nearly the same hardware, this is it.

COMMANDO3 colour PROMsGHOSTS'N GOBLINSpalette in RAMfixed at the factorychange it = burn new chipswritten by the CPU at 3800-39FF256 entries, 4 bits each of R, G and Bthe game can change every colour on screen while it runsfades, flashes, palette-swapped enemies - none of it possible with PROMs

The single biggest architectural difference between the two boards. Commando's palette is three PROMs: fast, cheap, and frozen. Ghosts'n Goblins spends static RAM instead and hands the palette to the program, which is why this game can do things with colour that its predecessor simply cannot.

The drawings behind this story

Each one opens the interactive schematic for that sheet.

Every chip in this story

65 chips across 4 sheets. Click any to open the schematic with that chip selected.

SYNCHRONOUS — sheet 5/8
CHARACTER VIDEO RAM — sheet 6/8
CHARACTER GENERATOR ROM — sheet 7/8
COLOR MIXER — sheet 8/8
← back to the dashboard