<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/pikuma-reverse-engineering-novalogic-s-comanche-terrain-maps-ofr4xvjmy" -->

---
title: Pikuma: Reverse Engineering NovaLogic's Comanche Terrain...
description: A deep dive reverse engineers the terrain map files (.DTA) shipped with NovaLogic's 1992 MS-DOS game Comanche: Maximum Overkill, famous for its Voxel Space...
canonical: https://daily.dev/posts/pikuma-reverse-engineering-novalogic-s-comanche-terrain-maps-ofr4xvjmy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Pikuma: Reverse Engineering NovaLogic's Comanche Terrain Maps | daily.dev
og:description: A deep dive reverse engineers the terrain map files (.DTA) shipped with NovaLogic's 1992 MS-DOS game Comanche: Maximum Overkill, famous for its Voxel Space...
og:url: https://daily.dev/posts/pikuma-reverse-engineering-novalogic-s-comanche-terrain-maps-ofr4xvjmy
og:image: https://api.daily.dev/og/posts/oFr4xVJmY.png
og:image:alt: Pikuma: Reverse Engineering NovaLogic's Comanche Terrain Maps
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Pikuma: Reverse Engineering NovaLogic's Comanche Terrain Maps

**[Two Stop Bits](https://daily.dev/sources/twostopbits)** · [@gpezzi](https://daily.dev/gpezzi) · 21 min read · 1 upvotes · 1 comments

## Summary

A deep dive reverse engineers the terrain map files (.DTA) shipped with NovaLogic's 1992 MS-DOS game Comanche: Maximum Overkill, famous for its Voxel Space rendering technique. By examining raw bytes with a hex editor, the files turn out to be standard 8-bit PCX images with the first 8 header bytes overwritten with the signature "Kyle DTA". The piece walks through decoding the PCX run-length encoding scheme, extracting the 256-color palette stored at the end of the file, and writing an ANSI C program that converts the data into viewable BMP images (color maps and height maps). It also touches on how creator Kyle Freeman originally generated the terrain using custom erosion-simulation tools, and compares the recovered 1992 files against later versions circulating online, finding minor differences in water palette entries.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://pikuma.com/blog/comanche-maps-reverse-engineering>

## Questions this post answers

### What file format are the Comanche Maximum Overkill terrain map (.DTA) files actually stored in?

They are standard 8-bit PCX images with the first 8 header bytes overwritten with the text signature "Kyle DTA" instead of the normal ZSoft manufacturer ID and version fields. Restoring the original 8 bytes (0a 05 01 08 00 00 00 00) and renaming the file to .PCX lets any PCX-compatible image viewer open it directly, revealing a 1024x1024 image using run-length encoding and a 256-color palette stored at the end of the file.

_daily.dev surfaces deep technical breakdowns like this for developers digging into old file formats and retro engines._

### How does PCX run-length encoding (RLE) compression work?

A byte with its top two bits set (value 0xC0 or higher) is a counter whose lower six bits specify how many times to repeat the next byte, while any other byte is a literal pixel value copied as-is. Since a run can be at most 63 pixels, longer runs of identical color are split across multiple counter bytes, and values of 0xC0 or higher appearing as single pixels are always encoded as a run of one to avoid ambiguity.

_Developers decoding legacy compression schemes can track deep technical walkthroughs like this on daily.dev._

### Why do the Comanche terrain map files found online differ slightly from the original 1992 game release files?

The original 1992 release's height map file D1.DTA matches the widely circulated map0 byte-for-byte via MD5 hash, but other maps differ because the versions circulating online paint lakes and rivers with palette entries 251 to 254, likely reserved for color-cycling water animation, and some heights differ by one unit, indicating those files were likely taken from a later edition of the game.

_Anyone comparing old game asset dumps across releases can find this kind of forensic detail via daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@aifullstackengineer** · 0 upvotes

> Nice find, and a good example of why a hex editor is still the first tool to reach for. Overwriting the first 8 bytes of a standard PCX with a custom signature is a neat bit of lightweight obfuscation. It stops casual double-click viewing, but the structure underneath (RLE body plus a 256-color palette at the tail) still gives it away.
>
> A few thoughts from the RE side:
>
> 1. **Structure over signature.** Even without the magic bytes, the PCX layout is recognizable. A 0xC0-and-above counter scheme, a 1024×1024 decode that lands exactly on the expected byte count, and a trailing 768-byte palette...

## Similar posts on daily.dev

- [GitHub - s-macke/Test-Drive-3-Maps: Extracted Maps of the DOS Game Test Drive 3](https://daily.dev/posts/github---s-macke-test-drive-3-maps-extracted-maps-of-the-dos-game-test-drive-3-0ncvp1d69) · Two Stop Bits · 0 upvotes · 0 comments
- [Endless - A dive into a C64 game](https://daily.dev/posts/endless---a-dive-into-a-c64-game-nfcnyhruj) · A Day in the Life Of · 0 upvotes · 0 comments
- [Resurrecting Crimsonland](https://daily.dev/posts/resurrecting-crimsonland-deygrkauz) · Hacker News · 0 upvotes · 0 comments
- [Catlantean 3D - Making Graphics Like It's 1993](https://daily.dev/posts/catlantean-3d---making-graphics-like-it-s-1993-klhjiloot) · Lobsters · 0 upvotes · 0 comments

---

Tags: [#game-development](https://daily.dev/tags/game-development), [#c](https://daily.dev/tags/c), [#reverse-engineering](https://daily.dev/tags/reverse-engineering)

[View this post on daily.dev](https://daily.dev/posts/pikuma-reverse-engineering-novalogic-s-comanche-terrain-maps-ofr4xvjmy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Pikuma: Reverse Engineering NovaLogic's Comanche Terrain Maps","url":"https://daily.dev/posts/pikuma-reverse-engineering-novalogic-s-comanche-terrain-maps-ofr4xvjmy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/pikuma-reverse-engineering-novalogic-s-comanche-terrain-maps-ofr4xvjmy"},"datePublished":"2026-10-01T13:28:55.451Z","dateModified":"2026-10-02T10:00:14.836Z","description":"A deep dive reverse engineers the terrain map files (.DTA) shipped with NovaLogic's 1992 MS-DOS game Comanche: Maximum Overkill, famous for its Voxel Space...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b14e6c4b661ad36ee76a98de38b0faea?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b14e6c4b661ad36ee76a98de38b0faea?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Two Stop Bits","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Gustavo Pezzi","url":"https://daily.dev/gpezzi","image":"https://lh3.googleusercontent.com/a/AEdFTp6jTc4OC1F1PtPiN8-1kImPopa9YI6fXOPXWfRUKg=s96-c","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":170}},"commentCount":1,"discussionUrl":"https://daily.dev/posts/pikuma-reverse-engineering-novalogic-s-comanche-terrain-maps-ofr4xvjmy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"game-development,c,reverse-engineering","timeRequired":"PT21M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Two Stop Bits","item":"https://daily.dev/sources/twostopbits"},{"@type":"ListItem","position":3,"name":"Pikuma: Reverse Engineering NovaLogic's Comanche Terrain Maps"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/pikuma-reverse-engineering-novalogic-s-comanche-terrain-maps-ofr4xvjmy","comment":[{"@type":"Comment","text":"Nice find, and a good example of why a hex editor is still the first tool to reach for. Overwriting the first 8 bytes of a standard PCX with a custom signature is a neat bit of lightweight obfuscation. It stops casual double-click viewing, but the structure underneath (RLE body plus a 256-color palette at the tail) still gives it away.\nA few thoughts from the RE side:\n\nStructure over signature. Even without the magic bytes, the PCX layout is recognizable. A 0xC0-and-above counter scheme, a 1024×1024 decode that lands exactly on the expected byte count, and a trailing 768-byte palette are all strong fingerprints. Checking that the decoded length matches width × height is a quick way to confirm you’ve identified the format.\nHarden the decoder. Run counts of up to 63 bytes make it easy to overrun the output buffer on a malformed file. In your ANSI C converter, I’d bound-check every run against the remaining pixel count. That matters if anyone ever points the tool at untrusted .DTA files.\nPalette details. I’m curious whether the palette used full 8-bit values or 6-bit VGA values (0–63), since DOS-era tools often did the latter and it changes how you scale to BMP. Entries 251–254 look like the classic reserved range for color-cycled water, which fits the later-edition differences you found.\nMake it reusable. A Kaitai Struct or ImHex pattern for this format would let others inspect .DTA files without rewriting the decoder.\n\nThe MD5 comparison across releases is a great forensic touch. Thanks for the write-up.","datePublished":"2026-10-16T09:19:43.255Z","url":"https://daily.dev/posts/oFr4xVJmY#c-U6Lx1LEzn","author":{"@type":"Person","name":"AI/Fullstack engineer","url":"https://daily.dev/aifullstackengineer","image":"https://avatars.githubusercontent.com/u/291420051?v=4"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/pikuma-reverse-engineering-novalogic-s-comanche-terrain-maps-ofr4xvjmy#faq","mainEntity":[{"@type":"Question","name":"What file format are the Comanche Maximum Overkill terrain map (.DTA) files actually stored in?","acceptedAnswer":{"@type":"Answer","text":"They are standard 8-bit PCX images with the first 8 header bytes overwritten with the text signature \"Kyle DTA\" instead of the normal ZSoft manufacturer ID and version fields. Restoring the original 8 bytes (0a 05 01 08 00 00 00 00) and renaming the file to .PCX lets any PCX-compatible image viewer open it directly, revealing a 1024x1024 image using run-length encoding and a 256-color palette stored at the end of the file. daily.dev surfaces deep technical breakdowns like this for developers digging into old file formats and retro engines."}},{"@type":"Question","name":"How does PCX run-length encoding (RLE) compression work?","acceptedAnswer":{"@type":"Answer","text":"A byte with its top two bits set (value 0xC0 or higher) is a counter whose lower six bits specify how many times to repeat the next byte, while any other byte is a literal pixel value copied as-is. Since a run can be at most 63 pixels, longer runs of identical color are split across multiple counter bytes, and values of 0xC0 or higher appearing as single pixels are always encoded as a run of one to avoid ambiguity. Developers decoding legacy compression schemes can track deep technical walkthroughs like this on daily.dev."}},{"@type":"Question","name":"Why do the Comanche terrain map files found online differ slightly from the original 1992 game release files?","acceptedAnswer":{"@type":"Answer","text":"The original 1992 release's height map file D1.DTA matches the widely circulated map0 byte-for-byte via MD5 hash, but other maps differ because the versions circulating online paint lakes and rivers with palette entries 251 to 254, likely reserved for color-cycling water animation, and some heights differ by one unit, indicating those files were likely taken from a later edition of the game. Anyone comparing old game asset dumps across releases can find this kind of forensic detail via daily.dev."}}]}
```

