Thiemo Mättig

DOS file format converter

← Back to the index of my DOS archive

CARD/1 coordinates converter (1998)

The "CARD/1 coordinate converter" is one of the few utilities I wrote for my father. It's also one of the few things I did you could call finished: A straight, very simple but effective command line interface, effective use of colors and a clear focus on a single, simple but very flexible task. The tool converts geographical coordinates from any ASCII file format to one of two specific formats the CARD/1 software was capable of importing when my father had this problem back in 1998. What you had to do is to pick the columns where latitude, longitude, elevation and the number of that point start and end. The final step of the conversion even included a line-by-line diff between the old and the new file.

Download the »CARD/1« coordinates converter and source code (PowerBASIC)

Reverse engineering (1998)

Two German diskmags got my attention: Hot-Mag and Suicide. I wanted to print some of the articles from these magazines but could not find a supported way to do this. So I started reverse engineering the file formats the two executable magazines use internally, and had a lot of fun turning what I learned into these decoder utilities.

SWG to BMP (1998)

Download the »SWG to BMP« converter and source code (PowerBASIC) (1998)

»Fake it!« patch for Duke Nukem 3D (1999)

CCS2TXT (2000)

Issue 3 of the WildMag magazine we released in October 2000 contained two texts from the German C64 disk magazine Digital Talk, issue 43 and 44, released just two months earlier: a Mekka and Symposium 2000 party report and a short text listing hidden parts in C64 demos. Both are topics I was interested in, as well as German diskmags in general. I contacted the Digital Talk staff and asked for permission to re-release a few of the texts I found worth reading for PC users, and they said yes.

But all I had was the compiled version of the diskmag, running in the CCS64 C64 emulator. So I wrote a simple converter that was able to load BMP screenshots from that emulator, split them into 8-by-8 pixel chunks, turn each chunk into a monochrome bitmask and interactively build a lookup map to turn each bitmask into the character is represents. And so I wrote my first optical character recognition (OCR) algorithm in less than 100 lines of hacky BASIC, with no libraries other than what was build in PowerBASIC (reading and writing binary files, string and bit manipulation). I felt so cool, even if I used it for only two small texts in the end.

The download contains three files. CCS2TXT.BAS is the actual OCR tool. CCS2TXT.DAT is the bitmask-to-character map, which is interactively build and updated every time you run the tool. CHANGE.BAS is a separate tool to fix mistakes in the data file.

Download the »CCS2TXT« source codes (PowerBASIC)

Icon 256 (1999)

Windows 3.11 was running on my PC when I started designing my first icons for programs that did not had one, using an editor that only supported 16 colors. Some of my creations can still be seen in my icon archive on this website. Later I learned how the ICO format works – that it's basically just a few BMP files stuck together. It was the Hugi icon contest that made me want to use more than the 16 default colors, but I could not find a free editor I could use. So I ended sticking to my beloved Paint Shop Pro, and wrote a trivial converter that could transform a 32 × 32 pixels BMP image with 256 colors (and nothing else) into the ICO format. As with many of my tools I believe I only used it one or two times, and then found much more powerful icon editors.

Download the »Icon 256« converter and source code (PowerBASIC)

GIF image file optimizer (2002)

I love size coding competitions and even started my own, called 256b.htm. Whenever you want to include actual images into an entry for a competition like that, you quickly learn than neither JPEG nor PNG are the way to go. These formats are way to heavy. In contrast, GIF barely has any headers, and most of them are even optional, which is when my »GIFOpt« tool comes into play. It analyzes the internal structure of a GIF file and allows to remove or edit optional header information, transparency information, and even the palette of 2-color GIFs.

Download the »GIF optimizer« and source code (PowerBASIC)