Skip to content

Master System VDP

Tile attributes, scrolling and eight sprites per line

Sega’s Mode 4 display extends the TMS9918 lineage with per-tile flips, palette selection, priority and pixel scrolling. Sixty-four sprite entries still face an eight-sprites-per-line limit.

The Master System VDP gives each background tile more to say than its pattern number. In its main Mode 4 display, a two-byte map entry selects a pattern, horizontal and vertical flips, one of two palette banks, and priority relative to sprites. A repeated shape can face another direction or use another palette without storing another copy of its dots. (Sega, Software Reference Manual for the Sega Mark III Console, pp. 6–10.)

Sega developed the chip from the TMS9918 lineage. Its principal display rules are different enough to matter whenever code or artwork moves between the machines.

A map, a pattern pool and two palettes

The VDP has 16KB of video RAM. The Z80 reaches it through VDP ports; it is not ordinary RAM in the CPU’s memory map. An 8-by-8 pattern uses 32 bytes, with four bits of colour information per pixel. The pattern-number field can select among 512 patterns, but maps, sprite attributes and patterns have to share the actual RAM. A field’s range does not guarantee that all its possible patterns can be stored alongside every other table.

Colour RAM holds two banks of sixteen entries. Each entry selects a colour from the Master System’s 64-colour range. Background tiles can select either bank; sprites use the second. Transparency and priority rules then decide which visible pixel wins. A palette entry is therefore not the same thing as an extra independent layer.

Scrolling with fixed areas

Pixel scrolling moves the background without requiring the CPU to redraw it a pixel at a time. The hardware also allows horizontal scrolling to be inhibited at the top of the screen and vertical scrolling to be inhibited at the right edge. These fixed areas can keep scores or other information still while a playfield moves. (Sega, p. 7.)

The Master System article puts that display into the console’s wider design. Here, the important programming distinction is between moving the background’s viewing position and moving objects through the sprite table.

Sixty-four does not mean sixty-four together

The sprite table holds 64 entries. Only eight sprites can occupy one horizontal line. More objects at the same height exceed the evaluation limit, even when the scene uses fewer than 64 in total. Tile-map flip attributes also do not give sprites an equivalent per-object flip control; sprite artwork has to respect the sprite format.

Later revisions and the Game Gear introduce further differences. Charles MacDonald’s technical investigation distinguishes those versions explicitly. A Game Gear palette specification or a later VDP’s extra display modes should not silently become a feature of every original Master System chip.

Sources

  • Sega, Software Reference Manual for the Sega Mark III Console, VDP section, pp. 6–10. Preserved manufacturer manual.
  • Charles MacDonald, SMS VDP Documentation, 12 November 2002: independent technical investigation of Mode 4 and revisions. Original technical notes.

Checked. Verified against primary sources and signed off by a person.