Skip to Content
PresetsMaster System

Sega Master System

SpecValue
Resolution256×192
Total colors64 (6-bit RGB)
Simultaneous32
ConstraintPer-tile palette
DisplayCRT composite / RGB
Year1985
MakerSega

Color palette

The Master System VDP uses 6-bit RGB (2 bits per channel), producing a palette of 64 possible colors. Each channel has 4 intensity levels (0, 85, 170, 255), yielding a 4×4×4 color cube. Colors are written to the VDP’s color RAM as a single byte with the format --BBGGRR.

The 64 colors are selected into two independent 16-color palettes: one for background tiles and one for sprites. This gives up to 32 simultaneous colors on screen.

Because the SMS uses an RGB bit-depth color space rather than a fixed lookup table, bitmapped generates the full 64-color palette at runtime with enumerateColorSpace(). The preset’s colorSpace field describes the 2-bit-per-channel format.

The key constraint: per-tile palette

All background tiles share a single 16-color palette. Unlike the Genesis with its 4 selectable background palettes, the Master System has just one — every 8×8 background tile draws from the same 16 colors. Sprites use a separate 16-color palette.

This is a significant limitation that gives SMS games their characteristic look. Developers had to carefully choose a single set of 16 background colors that worked for the entire screen. Techniques like palette swaps between frames or mid-screen palette changes (raster effects) were used to work around this constraint, but the hardware itself enforces a single background palette per frame.

bitmapped’s per-tile-palette constraint solver selects the optimal 16-color subpalette from the full 64-color space, then maps every background tile to that palette. Because there is only one subpalette for all tiles, the solver effectively performs global palette optimization — choosing the 16 colors that minimize total error across the entire image.

Interactive demo

Original
Sega Master System

Code example

import { process } from 'bitmapped'; import { getPreset, enumerateColorSpace } from 'bitmapped/presets'; const preset = getPreset('master-system'); const palette = enumerateColorSpace(preset.colorSpace) .map((c) => ({ color: c })); const result = process(imageData, { blockSize: Math.floor(imageData.width / 256), palette, dithering: 'floyd-steinberg', distanceAlgorithm: 'redmean', constraintType: 'per-tile-palette', tilePaletteConfig: { tileWidth: 8, tileHeight: 8, colorsPerSubpalette: 16, sharedTransparent: false, }, });

Presets

bitmapped includes one Master System preset:

  • master-system — 256×192 resolution, 6-bit RGB color space (64 colors), 32 simultaneous

Hardware notes

The Master System’s VDP is a direct descendant of the Texas Instruments TMS9918A, the same video chip used in the ColecoVision, MSX, and SG-1000. The SMS VDP extends the TMS9918A with a new display mode (Mode 4), which is the standard mode used by all SMS games. Mode 4 replaces the TMS9918A’s pattern/color table scheme with a more flexible tile-based system featuring per-tile palette selection and hardware scrolling.

The legacy TMS9918A modes (Modes 0-3) remain available for backward compatibility with SG-1000 software. This is why the ColecoVision preset in bitmapped shares the same TMS9918 heritage.

The SMS2 revision (released 1990) simplified the internal hardware — integrating the VDP, CPU I/O, and memory mapper into fewer chips — but kept the same display capabilities. Games see no difference between the original SMS and SMS2 VDP.

The Master System was more popular in Europe and Brazil than in Japan or the United States, where it competed against the dominant NES/Famicom. In Brazil, Tec Toy continued manufacturing and selling the SMS well into the 2000s, making it one of the longest-lived console platforms in any market.

Last updated on