Ultima V Map

By Endy Tjahjono. Last update 12 May 2013.

When I was in elementary school, I used to play Ultima V Warrior of Destiny a LOT. I couldn’t read English back then and I didn’t understand the story or what I was supposed to do, but I was so fascinated by the graphics (4 color CGA FTW!), the sound (PC speaker bleeps), and how the game would react to my commands.

Time passed. I grew up. The internet happened. When idly searching the web on AltaVista (!) I found an article on someone’s homepage describing the way the world map is saved in Ultima program files. The author has also successfully rendered some maps directly from the game files. This had me intrigued.

I knew some BASIC from my tinkering with Sinclair ZX Spectrum and QBASIC so I proceeded to spend quite significant amount of time trying to create bitmap files from the game map files, and then tinkering with bitmap palettes in Paint Shop Pro to give the images false color.

And here are the images:

Britannia Underworld

The QBASIC script that I used to extract the images:

OPEN "UNDER.DAT" FOR BINARY AS #1
OPEN "UNDER.RAW" FOR BINARY AS #2

blockRow = 16
blockCol = 16
row = 16
col = 16
writeLocation = 0
var$ = " "
SEEK #1, 1

FOR b = 0 TO blockRow - 1
  FOR a = 0 TO blockCol - 1
    FOR y = 0 TO row - 1
      FOR x = 0 TO col - 1
        GET #1, , var$
        writeLocation = col * row * blockCol * b + col * a + col * blockCol * y + x + 1
        SEEK #2, writeLocation
        PUT #2, , var$
      NEXT
    NEXT
  NEXT
NEXT

END

I can read the script and kinda understand the logic. Not too bad, I’d say.


comments powered by Disqus