B board · 85606-B-2 · three sheets

How the background scrolls

The graveyard, the village, the caves. A tile map far bigger than the screen - and, unlike its sister board, one that can draw itself in front of the sprites.

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.

Scrolling by asking a different question

The trick is the same one every Capcom board of this era uses, because it is the only one that costs nothing per pixel: do not move the picture, move the address.

The CPU writes a scroll position to a pair of registers - MAME puts the horizontal one at 3B08 and 3B09, two bytes because the world is wider than 256 pixels, and the vertical at 3B0A and 3B0B. That number is added by '283 adders to the raw beam position before the sum ever reaches the map memory. The beam has not moved; the hardware is simply looking somewhere else than it was last frame, so the ground appears to slide.

Nothing is copied, no CPU time is spent, and the cost is a handful of adders on sheet 7/9.

Bigger tiles than Commando

Here is the first real difference. Commando's background was built from 8 by 8 tiles. Ghosts'n Goblins uses 16 by 16.

That is a straightforward trade. Four times the area per map entry means a quarter of the map memory for the same world, and far less work for the hardware per screenful - but it also means the artwork repeats in bigger, more visible blocks. Look at the graveyard wall or the cave floor and you can see the 16-pixel grid once you know it is there.

The map itself lives on sheet 8/9, shared between the CPU and the display in alternating access windows so the game can rewrite the world while it is being drawn. Sheet 9/9 holds six EPROMs of tile artwork and the shift-register pipeline that turns a tile number into three bits of colour per dot.

The layer that can get in front

And here is the difference that actually changes how the game looks.

On Commando the running order is fixed: characters over sprites over background, decided by a few gates and never varying. Ghosts'n Goblins draws the background twice - MAME's screen update renders one layer of it, then the sprites, then a second layer of it on top - and which pass a given tile belongs to is set by that tile's own attribute bits.

So the artist can mark a gravestone, a pillar or a tuft of foreground grass as "in front", and Arthur will walk behind it. One tile layer, doing the work of two, controlled per tile at no extra hardware cost beyond the second pass.

It is a small thing on a schematic and a large thing on screen: it is most of why this game reads as having depth where its predecessor reads as flat.

CHARACTER8x8, 2 bits, pen 3 clearSPRITES16x16, 4 bits, pen 15 clearBACKGROUND16x16 tiles, 3 bitsPRIORITYper-tile, not fixedPALETTE RAM256 entriesRGB 4-4-4to the monitora background tile can be marked to draw IN FRONT of sprites

Three layers again, but with a twist Commando does not have: the background is drawn in two passes, and a tile's own attribute decides whether it sits behind the sprites or in front of them. That is how a knight walks BEHIND a gravestone and in front of the ground, using one tile layer.

The drawings behind this story

Each one opens the interactive schematic for that sheet.

Every chip in this story

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

SCROLL H POSITION — sheet 7/9
SCROLL VIDEO RAM — sheet 8/9
SCROLL ROM — sheet 9/9
← back to the dashboard