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.
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.
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 ProcessorThe 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
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:
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.
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
How a palette number is built
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.
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.
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.
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
Mix a color
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
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
Right eye
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.
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
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
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.
More Characters
Twice as many 8×8 tiles can be ready at once, for richer backgrounds and more varied sprites.
More Work RAM
Four times the memory for game data, levels and buffers.
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.
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.
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.
How a VB Color game starts up
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.
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.