Patching Ultima: Introducing PDAR

How the classic Ultima games led to the creation of PDAR: a new patch distribution format.

Classic Games Live Again

Ultima 4

A few weeks ago, Good Old Games ((A great place to buy older PC games and run them on modern systems (DRMfree). )) added the first six games in the Ultima series in a two bundles. ((Ultima 1+2+3, and Ultima 4+5+6 (Ultima 4 is also available for free).)) These are some of my all time favorites, and while I already own them all at least twice over, I was glad to see them available once more.

These games are old, and they look it, which may or may not be a problem for you. ((1-5 are also fully keyboard driven, and make good use of the old PC’s 83 button controller.)) Over the years there have been a number of patches and upgrades to these games, fixing bugs, solving issues with faster systems, adding improved graphics, and adding the music that was originally only available on the C64 and Apple II versions. Unlike the games themselves, these patches have remained readily available thanks to sites like the wonderful Ultima Aiera.

Modern Gamers

Ultima 4 after Upgrade Patch

I don’t doubt most people are going to look a these games and pass them by.  They are old. But those who do want to try them, and want the best experience will want the patches.  Unfortunately there’s a common problem with all of these patches.  The assume you know DOS, and in many cases, that you are running DOS under Windows 9x.  Here’s a typical example from the excellent Ultima 5 Upgrade:

  1. Unpack the U5 Upgrade zip file into your Ultima 5 directory on your hard drive. This will not affect your current saved games.
  2. Run “setm.exe” from the Ultima 5 directory to configure your sound card, if you will be playing music.
  3. Run “u5cfg.exe” to configure the game options.
  4. Run “u5data.exe” to patch DATA.OVL.
  5. Run “ultima5.com” from the Ultima 5 directory to start the game.

Ugh. And that’s one of the more straightforward ones. If you weren’t playing these games back in the day, it’s probably not obvious that “Run” did not mean “double click the icon” at the time. It refers to doing these things from DOS, and in many cases a DOS with certain memory features that really only existed when run under Windows.

PDAR: Repackaging Patches

With this in mind, I started looking for a way to repackage these patches in a better way.  I wanted:

  • A single file archive that contained the rules to modify the files, instead of the modified files themselves.
  • A simple command line to create and apply patches.
  • Something that didn’t require the end user to run a bunch of extra binary tools.
  • Something portable, so it would continue to work when today’s platforms are no longer viable.

I found a number of things for single file binary deltas, but didn’t really find anything that met my needs. ((I should mention that while I was thinking this over an excellent Windows GUI based installer for these patches was also released (but I’m on a Mac, so I kept at it).))  So I decided I’d have to do it myself.  After some thought, and some Python ((while my reference implementation is written in Python, the file format is not tied to Python in any way, so alternative tools are welcome)), the Portable Delta Archive, or  PDAR was born.

With PDAR, applying the above patch is reduced to: ((I guess I should mention that this will modify your files. As always you should back them up first.))

pdar apply Ultima5.Exodus_Upgrade-1.0.pdar "C:\Program Files\GOG.com\Ultima Second Trilogy\ULTIMA5\"

A set of PDAR files for Ultimas 1-6 are now available on Ultima Aiera.  I had hoped that each PDAR patch would be posted along side the original patches, rather than as a single bundle, but if need be I can host them here as separate files ((PDAR files are also usually much smaller than the original patch distributions)).   You can grab PDAR itself from github. ((For Windows users there is a standalone pdar.exe available))

I hope PDAR is useful beyond patching old PC games, and welcome any feedback.

 

Links of Interest (March 5th 2009 through August 13th 2009)

Audible.com to sell 2 DRM-FREE titles
It appears Audible.com is going to try releasing Cory Doctorow's next two audiobooks without DRM (a first for Audible.com as far as I know).

Skulpt
"Skulpt is an entirely in-browser implementation of Python."

Modernizr
Modernizr is a Javascript library that allows client side detection of CSS3 and HTML5 browser features. It allows you to write CSS with conditionals through one of my personal favorite bits of CSS magic: classes on the body tag. It also gives you the ability to do the same in our Javascript.

epub-tools
A collection of open source (BSD) tools for generating and managing ePub documents. Adobe's Java based EPUBGen was just added. Tools now exist for conversion to ePub from Word, RTF, DocBook, TEI, and FictionBook.

Doozers Get "Fraggle Rock" Spin-Off
It's animated, and aimed at ages four to seven, but I'll probably check it out with the kids.

The Zelazny Project
"We plan to print a complete collection of Roger Zelazny's short fiction and poetry, in (most likely) six hardcover volumes. We expect to include all published fiction and poetry we can find, however obscurely published, and a number of unpublished works retrieved from Zelazny's archived papers. We also expect to include the shorter early versions of several novels, several novel excerpts that were published independently as short works and a few of Zelazny's articles on topics of interest to him."

Unspecified Error: Learn by Doing

The ever prolific Chris Miller ((Seriously, Chris is everywhere. He’s just stealthy about it. If he were ninja we’d all be dead by now. I could easily see him becoming some kind of evil genius.)) started a new site dedicated to learning by doing. That initial post resonated with me. I’ve felt that rush he’s talking about, and I’m thankful to Chris for allowing me to contribute.

My first contribution covers one of the many ways I use Python to bend iTunes to my will. Check it out ((My posts should also show up in my LifeStream if you’re into that kinda thing.)) .