RE-vigorate

2010/12/23

Text encoding

Filed under: Crusaders of Khazan, Tunnels & Trolls — denormative @ 14:25

Text encoding in the game is considerably perplexing. There are three different methods used in different places for no discernible reason.

Normal 7/8-bit ASCII is used primarily within the text stored within the executable, but of note spell names are also used in normal encoding.

High-bit set where the highest bit of a 7-bit ASCII character if flipped to on. City/Map names are encoded this way, as are equipment item names, and the intro text.

Swapped nibbles where for each 8-bit ASCII character, the lowest 4-bits are swapped with the highest 4-bits in each byte. This encoding seems to be used solely for character names.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: