A board · sheets 1/8 to 3/8

How the 6809 runs the game

Capcom changed processor between these two boards, and the memory map shows exactly why that mattered.

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.

A different processor

Commando runs a Z80. Ghosts'n Goblins runs a Motorola 6809, and it is the more capable part: two 8-bit accumulators that pair into a 16-bit one, two index registers, two stack pointers, proper position-independent addressing and hardware multiply.

It is clocked from the same 12MHz crystal, divided by two, and then divides internally by four again - so the bus runs at a 1.5MHz E clock. Comparing that with a 3MHz Z80 by the numbers is misleading: the 6809 does considerably more per instruction and per memory cycle.

For anyone reading the code rather than the board, this is the single most consequential difference between the two machines.

Running out of address space

A 6809 addresses 64K. Ghosts'n Goblins does not fit in 64K.

So the board banks it. A window at 4000-5FFF is switched between ROM pages by a register the CPU writes at 3E00, while everything from 6000 upward stays fixed. The bank latch and the decoder that turns it into ROM chip selects are on sheet 1/8, and this is machinery Commando simply does not have - it fitted in a flat 64K and never needed to page anything.

Look at the map as a whole and the shape of a 1985 arcade machine is obvious: about 7.5K of RAM in total, a screenful of registers, and the rest ROM. The 512 bytes at 1E00 are the sprite table the video board comes to fetch, and the block at 3000 is the entire outside world - controls, DIP switches, palette, scroll, sound and the DMA trigger.

WHAT THE 6809 SEES0000 - 1DFFwork RAMthe game's own scratch1E00 - 1FFFsprite table512 bytes the video board comes to fetch2000 - 27FFcharacter RAMthe text layer2800 - 2FFFbackground RAMthe scrolling map3000 - 3FFFI/O and registerscontrols, palette, scroll, sound, bank4000 - 5FFFBANKED ROMone of several 8K pages6000 - FFFFfixed ROMthe code that is always there

A 6809 can address 64K and the game is bigger than that, so an 8K window at 4000 is switched between ROM pages by a register at 3E00. Commando never needed this. Note also how little of the map is RAM: the machine is mostly ROM and hardware registers.

Sharing the bus, and the outside world

The video hardware reads memory on a schedule the beam sets and cannot be asked to wait, so the CPU fits around it. Sheet 2/8 carries the memory decode and the work RAM; the character and background memories are time-sliced with the display on the sheets that own them.

Once a frame the CPU gives up the bus entirely. A write to 3C00 triggers the DMA that lets the video board read the sprite table straight out of the processor's own RAM - no copying, no duplicate memory on the video board. MAME notes that trigger and does not emulate it, because an emulator can simply read the array.

Sheet 3/8 is the machine's senses: the coin slots, both joysticks and two banks of eight DIP switches, read through plain buffers at 3000 to 3004. There is nothing clever here, and that is worth saying - the inputs on these boards are about as simple as hardware gets. The control register on sheet 2/8 handles the coin counters and the screen flip for a cocktail cabinet.

The drawings behind this story

Each one opens the interactive schematic for that sheet.

Every chip in this story

54 chips across 3 sheets. Click any to open the schematic with that chip selected.

CPU (68B09) — sheet 1/8
MEMORY MAP / OUTPUT — sheet 2/8
I/O PORT — sheet 3/8
← back to the dashboard