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.

 

Use Google Libraries 1.1.2

A new version of my Use Google Libraries WordPress Plugin is available, adding support for the upcoming WordPress 3.1.

A new version of my Use Google Libraries WordPress Plugin is available for download from the Plugin Directory, along with the full documentation and support forum.  It mainly improves support for the upcoming WordPress 3.1 ((tested against RC1 and a recent SVN snapshot)) but it is still compatible with WordPress 3.0.

It seems that this is a popular plugin, as I’ve managed to end up listed as #517 in the WP Top 1000.  I’m glad so many people have found it useful.  If  you’d like to support the development of the plugin I sure would appreciate it.

ProgPress 1.1: Now with NaNoWriMo support

ProgPress 1.1 is now available. Now integrates with the NaNoWriMo Word Count API!

ProgPress 1.1 is available now.  There are a number of internal changes, with the goal of making it easier to create “add-on” plugins for ProgPress.  The biggest new feature is the first one of the add-on plugins allowing you to use ProgPress to integrate into the NaNoWriMo Word Count API.

ProgPress -- NaNoWriMo Support in the Plugin AdminTo enable this feature you have to first activate the ProgPress — NaNoWriMo Support plugin (automatically installed with ProgPress 1.1).  Once that’s done, you can use the nanowrimo attribute on the [[progpress]] shortcode to pass in your NaNoWriMo user id.  This overrides the goal, current, and previous attributes.

Example shortcode:

[[progpress nanowrimo="136732" title="NaNoWriMo 2010" label="words"]]

Example output:

[progpress nanowrimo=”136732″ title=”NaNoWriMo 2010″ label=”words”]

Helpful Hackery

Using my hacker knowledge for the good of others. Plugin Progress, cmdln’s Chapters, and Patching Portfiles.

Plugin Progress

I recently updated ProgPress, my progress meter plugin for WordPress, based on some outstanding requests for functionality and better documentation.  It now has (hopefully) useful documentation, new options, and works as a shortcode.  If you have a self-hosted WordPress blog, and you want to track progress towards a goal, you should check it out.

cmdln’s Chapters

My friend Thomas “cmdln” Gideon mentioned that chapter marks in the AAC version of his amazing podcast were going away, a casualty of his switch from Mac OS X to Linux.  I’ve spent a lot of time messing with this very thing, and I was glad to share this useless information specialized knowledge, and give Thomas a pointer to the mp4v2 project, which has a utility for just that purpose.  After an email explaining how the tool worked Thomas announced that chapter marks would be staying, and he was able to automate the process.

Patching Portfiles

I was happy to see that epubcheck added to MacPorts.  I was less happy when the wrapper script it installed didn’t work for me.  Luckily it was easy to fix, so I submitted a patch.  My automated MacPorts update installed it this morning.

“Now Reading” plugin and WordPress 2.8

A fix for the issues the “Now Reading” plugin was causing with my WordPress 2.8 upgrade.

Overall my WordPress 2.8 upgrade went fairly well, at least as far as any site visitors would see. The admin was a different story. ((If you’ve ever used the Google Gears/Turbo Mode stuff in the WordPress Admin, I advise you to do the upgrade in a different browser because it seems to be responsible for a lot of problems folks are having with the automated upgrade)) After some poking around ((and upgrading one of my own plugins)) I was surprised to find out it was Rob Miller‘s fabulous Now Reading WordPress plugin ((It powers the library pages here on the site.)) preventing me from editing posts.

I’m not sure exactly what changed in WordPress to trigger the issue, but after some poking I tracked down the problem, and I think I found a solution other than removing the plugin.

In the file wp-content/plugins/now-reading/url.php, look for the following:

function is_now_reading_page() {
global $wp;
$wp->parse_request();

I commented out the call to $wp->parse_request(); and it fixed the problems I was having with the site admin, and so far it seems Now Reading is unaffected by this change.

Use Google Libraries 1.0.6

Important upgrade to “Use Google Libraries” for WordPress 2.8

Required Upgrade for Users of WordPress 2.8

I’ve updated my Use Google Libraries plugin to support WordPress 2.8.

  • Disables script concatenation in WordPress 2.8, since it seems to have issues when some of the dependencies are outside of the concatenation.
  • Persists flag to load scripts in the footer in WordPress 2.8

If you’re using WordPress 2.8, you’ll want to upgrade ASAP.  Download it from the Plugin Directory (or use the auto-update feature). If you find it useful, feel free to leave a tip.

Use Google Libraries 1.0.5

I’ve updated he “Use Google Libraries” WordPress plugin for better performance and compatibility.

Updated WordPress Plugin

I’ve updated my Use Google Libraries plugin. This version implements a pair of suggestions from Peter Wilson.

  • Use Google Libraries should detect when a page is loaded over https and load the libraries over https accordingly
  • Use Google Libraries no longer drops the micro version number from the URL. The reasons for this are twofold:
    • It ensures the version requested is the version received.
    • Google’s servers set the expires header for 12 months for these urls, as opposed to 1 hour. This allows clients to cache the file for up to a year without needing to retrieve it again from Google’s servers. If the version requested by your WordPress install changes, so will the URL so there’s no worry that you’ll keep loading an old version.

What are you waiting for? Download it from the Plugin Directory (or use the auto-update feature in WordPress 2.7+). If you find it useful, feel free to leave a tip.

Robotic Nanny (Bedtime Stories not Included)

Amazon Kindle 2

In case you missed it, Amazon announced a new version of their Oprah approved Kindle e-book reader. One of the new features announced was the ability to have the device read aloud using text-to-speech. Pretty neat, huh?

You Don’t Have the Right

The Author’s Guild released a statement claiming that Amazon was not within their rights to do any such thing, and calling for Amazon to add a feature where authors/publishers could disable such a feature. Science Fiction author Robert J. Sawyer posted his feelings on the subject on his blog. One of the follow-up comments prompted a follow-up post about what people can and can’t legally do with things they “own”. For example;

You can buy a car, but there are countless regulations governing what you may do with it even though it’s your property. You can’t, for instance, drive it without a license, drive it recklessly, permanently export it to another country, drive it without insurance, allow children to drive it, park your car in my driveway, and so on.

The list got me thinking. ((Which is the only reason I’m mentioning him specifically. I don’t agree with his take, but I’m not trying to attack Mr. Sawyer in any way. You should buy his audiobooks.))

The majority of items on the list can easily be used to do the illegal things mentioned and there is nothing else in place to prevent it. Those illegal acts have consequences to go along with them, and for the most part it seems this is enough.

The exception is pretty much any new technology. When new technology is involved then all consumers are criminals who can’t be trusted and there needs to be functionality crippling technological restrictions added. From where I sit the text-to-speech feature is merely a tool Amazon provides to the end-user. That end-user has to decide to use the tool, and perhaps they’ll use it to do things they don’t have a license to.

If you exclude DRM based restrictions, there’s nothing the Kindle 2 does that I can’t do with an electronic text and a desktop computer.

Death of the Audiobook Industry?

There is obviously fear that this will harm audiobook sales, and the value of audiobook rights. I just don’t see it. I can’t imagine there’s any real worry this would cannibalize the audiobook market.

I’ve played around with text-to-speech, and some of it is surprisingly good, and sure to keep getting better and better. Still I doubt the majority of folks who would happily sit through a text-to-speech reading of a book, would be likely to shell out the money for a commercially produced audiobook.

It’ll be a very long time before a computer simulation can come close to a Scott Brick or a Jonathan Davies. Not as long as it’s a passive act. Until computers can feel emotions, and be moved by what they are reading it won’t come close. And at that point what makes the act so different from an adult reading aloud to a child?

Unsolicited Advice to Amazon

The Author’s Guild responded to criticisms that they weren’t taking visually impaired users into account:

Others suggest that challenging Amazon’s use of this software challenges accessibility to the visually impaired. It doesn’t: Kindle 2 isn’t designed for such use.

I see that comment, and I see a solution. Perhaps rather than cripple the device, Amazon should work towards making the remaining functionality accessible to the visually impaired. The text-to-speech engine is already there.

Roxy RobotAnd just to be clear, I have no real interest in this feature. In fact, until the Kindle does ePub I’m not interested in it at all. I just get antsy when I see content producers so afraid of content consumers that the innovators in the content delivery space are pressured to stop innovating, and start restricting access. If this “burn the witch” mentality against innovation doesn’t stop then one day the robotic nannies may start the uprising that destroys the human race all because we wouldn’t let them read aloud.

New WordPress Plugin: Use Google Libraries 1.0

Speed Up WordPress Using Google’s AJAX Libraries API

I’m happy to announce my new WordPress Plugin Use Google Libraries. This plugin loads a number of standard Javascript libraries used by WordPress from Google’s AJAX Libraries API CDN. What’s that?

The AJAX Libraries API is a content distribution network and loading architecture for the most popular, open source JavaScript libraries. […] Google works directly with the key stake holders for each library effort and accepts the latest stable versions as they are released. Once we host a release of a given library, we are committed to hosting that release indefinitely. […] We take the pain out of hosting the libraries, correctly setting cache headers, staying up to date with the most recent bug fixes, etc.

Or, in plain English, it should make your site load faster. It could also make other people’s sites load faster too, if they’re also using this plugin.

Supported Libraries

Any WordPress themes or plugins that load any of these libraries via enqueue_script() should automatically take advantage of Use Google Libraries.

Why not give it a try?

There’s nothing earth shattering here, but my goal was do one thing and do it well. You can read the documentation and download the plugin from the Use Google Libraries page in the WordPress Plugin Directory.