Beginnings

Beginnings

Back in December Dos Game Club was playing Betrayal at Krondor. I had enjoyed the previous month's game Toonstruck tremendously and I had fond memories of reading the books back in high school and also playing (but never finishing) the game back when it was made free as a promotion for one of its sequels.

However as I started playing it I found myself not enjoying it terribly much. Part of the reason was the decidedly janky controls that the game is saddled with, which is definitely a product of its time. So soon I got distracted by a curiosity about whether the game had been remade or emulated.

It turns out a few attempts have been made, most notably xBaK, which however has not been updated since 2010. xBaK got me started looking at the game assets and I owe them a tremendous debt for having deconstructed and described the graphics assets and the sound assets and made a start on some of the data as well. I have dabbled in debugging and decompiling DOS games before, but never with much success, however I felt this one could be fun to dig into, so I started – first with Ghidra, however it soon became evident that it was not really up for the job; Betrayal at Krondor seems to be built using Borland's overlay system, which is a method to load large executables into memory. Ghidra had tremendous issues interpreting that.

I then started poking around using the DOSBox-X debugger.

DOSBox-X's debugger with Betrayal at Krondor

Using Claude Code to help me I started making real progress in decompiling and understanding the structure of the game. With my usual sense of direction I decided to start at the beginning and simply try to describe the game starting from the beginning. This page will chronicle my attempts (or as is much more likely, start out strong, but peter out over the coming months as I get distracted by other things).