

Drawing raw sprites is simple:ĭst = pixel Raw sprites can have any width and height that is divisible by four.

The first sprite format used by the games is just raw encoded planar data. I have a very rudimentary understanding of DOS and VGA programming and rendering code for old games tends use every optimization trick in the book and clever handcoded assembler, which is difficult (for me) to understand.

I did most of the reverse engineering of the sprite formats by looking at the data in the pack file chunks rather than looking at the rendering code in IDA. The first plane stores pixels 0, 4, 8, etc. This article gives a good explanation of how planar graphics work. Planar graphics were originally developed to boost graphics throughput by allowing multiple memory chips to store independent planes and deliver them in parallel. Planar graphics means that, rather than pixels being arranged linearly as they are in the 320×200 VGA Mode 13h they are divided into a set of planes. Mode X is a 256 colour, 320×240 planar graphics mode. level_view -blackthorne DATA.DAT 1 -h0圆eīoth games use the popular “Mode X” VGA mode. All of the screenshots in this post were captured using these tools. I’ve included the command invocations to view the various examples throughout this blog post. I’ve developed a set of basic tools which can be used to view sprites, levels, etc from The Lost Vikings and Blackthorne. Most of the chunks in the pack file are compressed using a variant of the LZSS compression algorithm. The pack file is an archive which contains chunks for sprites, levels, sounds etc. The games store all of their data in a single pack file called DATA.DAT. I’ll refer to the game engine for both games as the “Blizzard engine”. The two games use very similar engines, with Blackthorne having a few improvements over The Lost Vikings. This post is about how the sprite formats and tile engine are implemented for the games. Blackthorne was the first game released under the Blizzard brand. Note that Blizzard went by the name Silicon and Synapse for their early games including The Lost Vikings. Blizzard has now made both The Lost Vikings and Blackthorne freely available on. I’ve previously written about the virtual machine that The Lost Vikings uses for implementing game objects here and here. I’ve been reverse engineering two of Blizzard’s early DOS games, The Lost Vikings and Blackthorne.
