Every Game Has a New Feature

Developing software like Camoto often takes a long time and can be extremely involved and complex, yet it's not always apparent why. One of the big reasons is that so many games do things in completely unique ways, and trying to represent this in a general manner (that is not specific to any one game) can be a fiendishly complicated task. Perhaps then, it is no surprise that there are very few programs around that even attempt this. Those that do, often work in a very limited manner. For example, only working with games that have very similar engines, or working with archive formats only and ignoring graphics and music, or only allowing files to be read but not modified.

Since Camoto works the same with vastly different games, and allows editing of different classes of data (graphics, levels, music, etc.) it is one of a tiny number of programs that encounter the issues below. These issues have proved many assumptions false, causing rewrites of large parts of the Camoto codebase, as they have typically required a complete rethink about how the data should be stored internally.

For example, when you have written your archive code to work like .zip files do, what do you do when you come across your first archive format that does not use any filenames? How do you handle that? In this case, all the filename code had to be rewritten so that files could be specified by index as well as by name. Then as soon as you have done that, the next format comes along which uses hash values to encode the filenames, but these cannot be reversed to produce the original filenames, as each hash matches a million or so possible strings. What then?

The following list details a few of these stumbling blocks that were encountered during Camoto development.

Explanations

This section provides a bit of background on various file formats. You can skip this section if you're willing to be confused when you get to the games below :-)

Planar graphics

This explains how the EGA stores graphics in video memory.

Most EGA graphics are stored in "planes", which is a little different to how most people are used to thinking of graphics. Most people imagine 24-bit true colour storage, which arranged as a list of bytes, looks like this:

Byte 0 1 2 3 4 5
Value 0x11 0x11 0x11 0x22 0x22 0x22
Purpose Red Green Blue Red Green Blue

Which is 24-bit RGB data for two pixels. Planar graphics store all the red values first, then the green, and then the blue, like this:

Byte 0 1 2 3 4 5
Value 0x11 0x22 0x11 0x22 0x11 0x22
Purpose Red Red Green Green Blue Blue

On an EGA there are only 16 colours, so you end up with four planes, which are one bit-per-pixel each (1bpp - meaning each byte contains data for eight pixels, because there are eight bits in a byte.) If a bit is set to one in the red plane, then that pixel will show up red on the screen. If the first bit is set to one in both the red and blue planes, it will show up as magenta on the screen.

I have drawn a diagram on the right which will hopefully explain it a little better. There might also be more detail in the Wikipedia Planar article.

The Games

Blood

Commander Keen

Duke Nukem II

Halloween Harry

Hugo's House of Horrors series

Incredible Machine, The

Kiloblaster

Lion King, The

Monster Bash

Stellar 7

Word Rescue

Vinyl Goddess From Mars

Zone 66