B board · sheet 7/9 · manual page 17

The horizontal scroll sheet

Scrolling a map larger than the screen without moving a single byte of it.

Draft. This sheet was read from the original 1985 drawing and cross-checked against MAME, but it has not yet been walked pin by pin against a physical board. The logic described here is what the drawing shows.
This sheet is part ofHow the background scrolls

The subsystem followed end to end, across every sheet that builds it.

What this sheet is for

The scroll position registers at 12A, and the adders at 12B, 12C, 13B that combine that position with the raw screen counter.

The CPU writes a scroll value. This sheet turns it into a different answer to the question “which tile is at this screen position?”

Scrolling is addition

Nothing in memory moves when the background scrolls. The hardware adds the scroll offset to the beam position before looking up which tile to fetch, so the whole map appears to slide for the cost of one adder chain.

The alternative, copying the map every frame, would need memory bandwidth this machine does not have. Once you see that scrolling is arithmetic rather than movement, the whole background subsystem falls into place.

scrolling without moving anythingscreen counterwhere the beam is+ scroll offsetan adder, not a copymap addresswhich tile to fetchtile ROMthe pixels

Nothing in memory moves when the background scrolls. The hardware simply adds a scroll offset to the raw screen position before looking up the tile, so a map far larger than the screen slides past for the cost of one adder chain.

Fine and coarse

The scroll value splits. Its top bits choose which tile to fetch, and its bottom bits delay the pixels within that tile. Coarse scrolling is an address change; fine scrolling is a timing change. Both are needed, because tiles are 16 pixels wide and the screen has to be able to move by one.

Every chip on this sheet

Click any of them to open the schematic with that chip selected in both panels.

← open the schematic for this sheet