4x4 Off-Road Racing Graphic Format

From ModdingWiki
Jump to navigation Jump to search
4x4 Off-Road Racing Graphic Format
4x4 Off-Road Racing Graphic Format.png
Format typeImage
HardwareCGA, EGA
Colour depth2-bit (CGA)
Minimum size (pixels)1
Maximum size (pixels)64,000
PaletteExternal
Plane count1
Transparent pixels?No
Hitmap pixels?No
Games

This format is used by 4x4 Off-Road Racing to store background graphics. The extension is *.pck, however the game has different graphic formats that use the same extension. The following files are in this format: "MAPS.PCK", "BAJABCK.PCK", "DVALBCK.PCK", "GEORBCK.PCK", "MICHBCK.PCK". Maps.pck is 320 pixels wide and the backgrounds are each 576 pixels wide. Maps.pck has multiple images in the file.

Image

The format has no header. The size of the image and color palette are stored in the EXE, so modification is limited. The format is encoded with a basic run-length encoding. Since the format only supports 2-bit color, each byte of graphic data accounts for 4 pixels. Unlike the 4x4 Off-Road Racing Full Screen Graphic Format, the background graphic format is not interlaced so you can read directly from top to bottom.

When decoding the graphic, read from the beginning of the file, load one byte for pixel data, and another for the length of the run. Each pixel byte is 4 pixels of data, 2-bits per pixel.

Data type Description
BYTE 4 pixels Binary representation of 4 pixels (2 bits per pixel)
UINT8 length Number of times to repeat this pixel pattern.

Source Code

The viewer program in the 4x4 Off-Road Racing Full Screen Graphic Format page can also view these background images.

Credits

This graphic format was reverse engineered by TheAlmightyGuru. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)