VB Color

Explained

A friendly tour of what VB Color adds to the Virtual Boy and how it works, with diagrams and a few small demos to play with.

16.7 Mcolors to choose from
256palettes
4,096characters
256 KiBwork RAM
40 MHzCPU speed
200 kHzlink cable
1

Where we start: the Virtual Boy

The Virtual Boy shows its games on two screens, one for each eye, with 384×224 pixels each. Because each eye sees a slightly different picture, the game appears in stereoscopic 3D.

Every pixel can show one of only four shades: black and three brightnesses of red. Graphics are built from 8×8 pixel tiles called characters. Each character pixel stores a number from 0 to 3, where 0 means "see-through".

VB Color keeps all of this exactly as it is and builds color on top.

A 16×16 sprite made of four 8×8 characters
2

The big idea: a second layer for color

VB Color does not replace the red picture. The Virtual Boy's graphics chip, the VIP, draws it exactly as before. At the same moment, VB Color writes a second, invisible layer that remembers for every pixel which color palette it was drawn with.

When the picture is sent to the screen, both layers are combined: the palette says which set of colors, the shade says which color inside that set.

Shade layer
The classic Virtual Boy picture
Color layer
Palette 5 Palette 9
What you see
Shade picks a color from the palette

The color layer needs a new home. VB Color adds a new part to the system, the VCU (Virtual Color Unit). The VCU does not draw anything itself. It holds all the new memory and switches, and the VIP fills it while drawing.

VIP

Virtual Image Processor

The original Virtual Boy graphics chip. It draws every picture, exactly as on a Virtual Boy.

Virtual Boy memory

  • Characters, backgrounds and objects
  • The red shade pictures

VCU

Virtual Color Unit {new}
  • The color pictures
  • Color tags for cells and objects
  • Pixel maps for chosen cells and objects
  • Color RAM with all palettes
  • Extra characters
  • A copy engine for fast uploads
  • The VB Color switches
The VIP writes the classic picture and its color partner in the same step
3

Color Palettes: four colors at a time

A color palette is a set of four colors, one for each of the four Virtual Boy shades. The graphics themselves stay the same; only the palette decides how they look. Try it:

Virtual Boy
VB Color

VB Color has 256 palettes, shared by backgrounds and objects (the moving sprites, like the player character). Any of them can use any palette. That is 1,024 colors that can be used at the same time.

4

Who gets which palette?

Virtual Boy backgrounds are grids of characters. Every spot in that grid is called a cell. VB Color gives every cell and every object its own small color tag, so neighbouring tiles can have completely different colors.

A background with palette tags

Each number is the palette of that cell. The framed tile labelled OBJ is an object: one 8×8 character, just like a cell, but free to sit anywhere on screen, with its own tag.

How a palette number is built

New VB Color tag0 – 63 Original0 – 3

The original Virtual Boy already picks one of 4 palettes. VB Color adds a tag from 0 to 63 in new memory next to it.
64×4 = 256 palettes.

Example: tag 3 and original 1 → 3 × 4 + 1 = palette 13

The tags live in separate memory, so nothing in the original background or object data has to change. That is what makes it possible to color existing games. The backdrop, the color behind everything, picks one of the 256 palettes, too.

A tag can also say "ask the character". Every one of the 4,096 characters can carry a palette of its own (one for cells, one for objects), and a cell or object tagged that way simply uses the palette of the character it shows. A game that colors by tile sets the palette once per character instead of once per cell, however often the tile is repeated.

5

Pixel by pixel

A color tag colors a whole cell or object with one palette, and for most tiles that is all it takes. Sometimes a few pixels want something else: a glass cockpit on a red racer, a white glint, the yellow core of a fireball. For those, VB Color lets a cell or object point at a pixel map: an 8×8 grid with one palette number per pixel.

Most entries in a pixel map are 0, which means "keep the tag's palette". Any other number picks that palette for just this pixel. One special value, 255, cuts the pixel out entirely. Pixel maps live in the VCU, and any number of cells and objects can share the same one.

Shade layer
Tagged with palette 5
Pixel map
0: keep the tag Palette 10: glass Palette 11: glint 255: cut out
What you see
With pixel colors

Transparency, redefined. On a Virtual Boy, black and see-through look the same, so old artwork often mixes them up. Over a colored backdrop those black pixels would show as boxes; a pixel map cuts them out. The other way round works too: a cell or object can declare its see-through value solid, which gives a tile four colors instead of three.

6

Color RAM: the paint box

All palettes live in the VCU's Color RAM: 1,024 color slots, four for each of the 256 palettes. Each slot can hold any of 16.7 million colors, mixed from 256 levels of red, green and blue.

Color RAM: 256 palettes × 4 colors

Point at a color to see its slot
Backgrounds, objects and the backdrop can all use any palette. Often, the top half is used for background palettes, while object palettes go in the bottom half.

Mix a color

255
164
32

256 × 256 × 256 = 16,777,216 possible colors

The neat trick: colors are looked up only at the very last moment, when the picture is sent to the screen. If a game changes a color in Color RAM, everything that uses it changes instantly, without drawing anything again. That makes effects like flashing enemies, shimmering water or a sunset almost free.

Color RAM

The water picture is never redrawn. Only its three colors swap places.
7

Color Framebuffers

The Virtual Boy keeps two pictures per eye: while one is shown, the next one is drawn. VB Color gives each of these four pictures a color partner, so left and right eye can have their own colors and the 3D effect stays fully intact.

Left eye

Picture 0shades
Picture 0colors
Picture 1shades
Picture 1colors

Right eye

Picture 0shades
Picture 0colors
Picture 1shades
Picture 1colors
8

Fades and brightness

Virtual Boy games fade in and out, flash the screen and let you adjust brightness by changing the brightness of the red shades. VB Color makes these effects work in color, too.

The game tells VB Color what its normal brightness is. At that brightness, the colors look exactly as chosen. Lower brightness darkens them down to black; higher brightness makes them brighter until each color channel reaches its maximum.

100 % normal brightness
9

Whole layers and the sky

Say you have a day and night cycle, so a level should slowly turn from day to dusk. Or the whole background should flash white when the player is hit. A Virtual Boy picture is stacked from up to 32 worlds, the layers that hold backgrounds and objects, so either effect means recoloring an entire layer. Since every cell and object carries its own color tag, doing that the usual way means rewriting thousands of tags, and writing them all back afterwards.

A palette shift avoids that. Every world gets one number that is added to the palette of everything it draws. With a shift of 32, a sky cell on palette 2 is shown with palette 34, grass on palette 6 with palette 38. The tags themselves never change: a single write moves the whole layer to another set of palettes, and a shift of 0 brings the original colors back.

For this to work, the palettes are laid out in matching blocks: palette 34 holds the dusk version of palette 2, palette 66 its night version, and so on. The shift knows nothing about dusk or night, it only picks the block. The same trick works for fog or underwater scenes. Because the shift belongs to one world, the background can darken while the player in another layer stays bright, and the same background map can appear in two layers with two different color sets.

One background, four shifts

World palette shift

Each number is the palette a cell ends up drawn with. The tags in the map never change; only the world's shift does, and with it the block of palettes the colors come from.

The backdrop, the color behind everything, no longer has to be one flat palette either. A small row table gives each of the 224 screen rows its own backdrop colors, one for each of the four original shades. That allows, for example, for a sky that fades smoothly from night blue into sunset orange, while costing no background layer at all.

Backdrop row table

10

Extra power, when needed

Besides color, VB Color offers five optional upgrades. A game switches on only those it really needs.

Double Speed

The processor can run twice as fast. Sound, graphics timing and everything else keep their original pace, so games simply get more time to think.

VB
20 MHz
VB Color
40 MHz

More Characters

Twice as many 8×8 tiles can be ready at once, for richer backgrounds and more varied sprites.

VB
2,048
VB Color
4,096

More Work RAM

Four times the memory for game data, levels and buffers.

VB
64 KiB
VB Color
256 KiB

Fast Link

The link cable between two systems transfers data four times as fast. Games switch it on only after both sides confirm they support it.

VB
50 kHz
VB Color
200 kHz

Fast Copies

A copy engine moves palettes, color tags and pixel maps into the VCU while the processor waits: more than twice as fast as a copy loop, measured in bytes per 1,000 clock ticks.

VB
400 bytes
VB Color
1,000 bytes
11

Off by default: how compatibility works

When you switch on a VB Color, it behaves exactly like a Virtual Boy. Every new feature is off. That is why every existing Virtual Boy game runs unmodified. A game that wants more first has to unlock VB Color through a special header byte. Even then, nothing changes yet: unlocking only gives access to the switches in the VCU. The game then flips exactly the switches it needs.

VB Color unlockMaster switch, stays on until the system is reset
Color displayShow the color picture instead of the red one
Pixel colorsPixel maps for chosen characters, map cells and objects
Layer tints & sky rowsPalette shift per world, backdrop color per row
Double SpeedRun processor at 40 MHz instead of 20 MHz
More Work RAM256 KiB instead of 64 KiB
More Characters4,096 instead of 2,048
Fast Link200 kHz link cable

How a VB Color game starts up

Power onThe system behaves exactly like a Virtual Boy.
"Are you a VB Color?" The game looks for the VB Color signature.
NoPlay the Virtual Boy way…or show a friendly notice if the game requires VB Color to run.
YesUnlock with the keyStill nothing has changed. Everything behaves like before.
Switch on what's neededMore memory, double speed, more characters: only if the game really uses them.
Fill the paint boxLoad the palettes into Color RAM, give every cell and object its color tag, add pixel maps where they are needed and draw a first picture. The copy engine makes this quick.
Switch the display to colorFrom now on, the player sees the color picture.
12

Three kinds of games

Every game says in its header which kind it is. This is only a label for players and tools: it never switches anything on by itself.

On Virtual Boy On VB Color
Virtual Boy gameevery existing game Plays as always Plays exactly like on a Virtual Boy
VB Color Enhancedworks everywhere Fully playable in red Plays in color, with extras
VB Color Onlyrequires VB Color Starts safely and shows a notice Plays in color, with extras

Bringing old games to color. A color patch for an existing Virtual Boy game switches on the color display and adds the palettes and color tags. It also tells VB Color the game's normal brightness so fades keep working. VUEPort ships color patches like this for many games.

13

Glossary

Character
An 8×8 pixel tile. Each pixel holds a value from 0 to 3; 0 is see-through.
Cell
One spot in a background map. It says which character to show there.
Object
A freely movable character (8×8 pixel), also called a sprite. The Virtual Boy can show up to 1,024 of them.
Shade
One of the four Virtual Boy brightness levels: black and three reds.
Color palette
A set of four colors, one for each shade. VB Color has 256 of them.
Color tag
The small number stored for each cell and object that selects its VB Color palette.
Color RAM
The memory holding all 1,024 palette colors. Changes show up immediately.
VIP
Virtual Image Processor, the original Virtual Boy graphics chip. It draws both the red and the color picture.
VCU
Virtual Color Unit, the new part VB Color adds. It holds the color pictures, color tags, pixel maps, Color RAM, extra characters, the copy engine and the VB Color switches.
Frame buffer
The memory holding a finished picture for one eye. VB Color pairs each one with a color partner.
Pixel map
An 8×8 grid of palette numbers a cell or object can point at. 0 keeps the color tag's palette, 255 cuts the pixel out. VB Color has 1,024 of them, shared freely.
World
One of the 32 layers a Virtual Boy picture is stacked from. VB Color can shift all palettes of a world at once.
Backdrop
The color behind everything. VB Color can give every screen row its own backdrop colors.
Copy engine
The VCU's helper for moving data into VB Color memory while the processor waits. Faster than a copy loop, and no loop to write.

Ready for the details?

Every register, memory region and timing rule behind these pictures is documented in the VB Color Sacred Tech Scroll.

Coming soon