Ultima Underworld color palettes
Technical Details Warning |
While the encyclopedic nature of the codex means that many articles will have information that could spoil some minor aspects of the game for newer players, this article is known to contain technical information about the game, game engine, data files, logic, etc. This information is not generally useful to the typical game players.
Continue reading at your own discretion. |
This document describes the colors palettes used in Ultima Underworld. This is highly technical behind-the-scenes info that is not useful to the typical game player.
Description[edit]
Ultima Underworld renders it's game screens in VGA (hardware mode 13h) that draws 320x200 pixels is an 8-bit paletted (256 unique colors per screen) mode. It's palette pulls from RGB colors at 6 bits per channel (18-bit true color) for a total of 262,144 unique colors. Compare that with more modern 8 bits per channel (24-bit true color) systems that have 16,777,216 colors to pick from.
Ultima Underworld has several different palettes, stored in several files. It has 8 main palettes (8-bit index, 256 colors) several 4- and 5-bit to 8-bit lookup palettes, shader lookup palettes, tranlucency lookup palettes, and palette animations/rotations. All of these things will be discussed below.
Main Palettes[edit]
The main palettes are stored in FILEData\Pals.Dat.
Each palette is 256 colors, and each color is 3 bytes, one for each channel of red, green, and blue. Though each channel only uses 6 bits, so the top 2 bits of each 8-bit byte go unused. Each palette is 768 bytes, and the file size is 6,144 bytes, so it hold exactly 8 palettes and no header or any other kind of data.
In all palettes color #0 is always the transparent color.
# | Image | Where used |
---|---|---|
0 | ![]() |
Used in the main game screen
Not all colors are available in game, some are place holders for translucency look-ups Color #0 is transparent, color #1 is true black, colors #2-15 are mostly full-bright non-animated colors used for spell effects. Several rotations run at 5 per second:
|
1 | ![]() |
Used in the map screen |
2 | ![]() |
Used in the title screen
Rotation of 4 blocks of 16 colors, #64-127, each at 10 per second |
3 | ![]() |
Used in the character creation screen |
4 | ![]() |
Joke palette, used in the main game screen
Fire and water are blacked out, all other colors are mapped to simulate the Apple II color palette |
5 | ![]() |
Used in the splash screen |
6 | ![]() |
Unknown usage, duplicate of #5 |
7 | ![]() |
Used in the game win screen |
All Palettes[edit]
Aside from the 8 main palettes, the game has several other palettes. These are all main screen palettes, so really they just lookup into palete #0 (and technically, palette #5)
Consider this image:
All this color data is stored in different places in the game, it is just gathered here in one image for convenient demonstration.
There are 4 blocks of colors:
- The first block is the 8 palettes from FILEdata\pals.dat, details of those are coverd in the section above.
- The second block has 3 sub-blocks:
- The first is the shades, it tells the game which color to shade a pixel when an object of the color has a certain light level on it. Notice that the fire/lava colors stay full bright all the time and that the water stays nearly full bright until the very end. This comes from FILEdata\light.dat
- The second is the same as the first, but it is used when the player is using a night vision spell. Notice that fire and water aren't affect by night vision's black and white palette. Notice that the fire and water aren't in grayscale and behave the same as the full color shading. This comes from FILEdata\mono.dat
- The third shows the palette rotations for the fire and water colors.
- The third block has two small columns:
- On the left are the 4-bit palettes used to draw item sprites and other 4-bit graphics. They are found in the file FILEdata\allpals.dat.
- On the right are the palettes used to draw the weapon POV overlay sprites. There are only two of these, one used to draw weapons wielded by players with light colored skin and the other for dark colored skin. This comes from the file FILEdata\weapons.cm
- The forth block has 6 color strips, mappings for 6 translucent colors: This comes from FILEdata\xfer.dat
- Black
- White
- Brown
- Green
- Blue
- Red
Not included here are the 5-bit Critter palettes. Since each critter has it's own set of palettes and they aren't used anywhere else in the game except for that one set of sprites, they weren't deemed important enough to include here.
PSX Version[edit]
The PSX-port of Ultima Underworld uses an entirely different engine. It is not limited to 256 colors on-screen and as such it doesn't use any of the same palette techinques that the PC version does that are described here. The PSX version stores it's graphics files in 8-bit paletted format, but each graphic can have it's own 256 color palette and the PSX hardward can display tens or hundreds of thousands of colors on the screen at once.
For all it's advantages, the PSX version does seem to have some missing features:
- It doesn't emulate the PC's palette rotation feature, so water and fire graphics are static and unanimated
- The shader doesn't seem to be programmed to make the fire/lava graphics full bright, so you can see dark fire and lava which seems odd.
For more details on the differences of the PSX version, see the article Technical Differences in Ultima Underworld on the PSX
Technical Details | |
---|---|
Game | Ultima III ☥ Ultima IV ☥ Ultima V ☥ Ultima VI ☥ Ultima VII ☥ Ultima VIII ☥ Ultima IX ☥ Ultima Underworld |