Jump to content
RobS

The Mystery of Ultima V for the Atari 8-Bit

Recommended Posts

The Mystery of Ultima V for the Atari

 

Hello everyone, I am the (infamous) Rob that worked on the Atari 8-bit port of Ultima 5...sort of. For the sake of history, allow me to tell you a story to help clarify what the disk images you all have for Ultima 5 represent. It's quite a long story, so bear with me.

 

First of all, I have no idea how these ever got out. They were my own personal copies that I made images from. Must have included them on some disk images I converted for some people somewhere along the way. Just for the record, they were never intended to be released or seen in this form.

 

I should also clarify that I am NOT the "official" programmer hired for the project. I don't even know that there ever was an official version in the works (more on this later) but I have seen some posts to that effect. If so, thats not me, thats some other guy, and I hope someday maybe he would release whatever he had gotten done as well.

 

So lets case out minds back to 1988, and see if we can reconstruct how these disks came to be.

 

Origins, as it were

 

So it's 1988, I'm all of 22 years old, and I have started my own first neo-company, Creative Software Systems. I didn't really know what I was doing, or what I wanted to do, except that I wanted to have my own software company and I wanted to write programs for the Atari. I was working on a couple of utility programs for the Atari that I thought the world could use. My work system consisted of a 130XE that I bought when they came out in 1985, a 1050 drive and a recently acquired Indus GT.

 

The main program I had been working on was a disk utility program called Sleuth, which was a heavily modded and expanded version of one of the type in programs from an issue of Analog. I added full menu-driven support for it, and a bunch of other features for managing disks. The sector editor portion took a great deal of time to get it to do what I wanted, and is one of the more full-featured ones I think was ever done for the Atari. It supported full text/hex/asc searches, as well as allowing you to edit the data in a variety of ways, like being able to type text directly into the sector. It was pretty slick, and I tried very hard to make it a user-friendly and advanced program or the 8-bit world. This would come in very handy when trying to put together Ultima 5 on the Atari.

 

One of the other utilites was a program I called Ultimapper, which was a program that allowed you to load and print maps from the Ultima 4 disks. Nowadays, you can just look all this stuff up on the net, but back then there was very little way for someone to get access to maps like this. Maybe you could buy a book, but that was about it.

 

These two utilities, and what I learned from programming them and how the Ultima games were laid out, would lead me to try my hand at doing a port of Ultima 5.

 

Inspiration

 

I had played Ultima 4 back in 1985 on a friend's Apple II. I couldn't wait to play and finish it on my Atari, but it took a while for it to come out on that platform and before I was able to get it. When I was finally able to get it for my Atari, I spent weeks playing it, and loved it. What a great game! I was excited about the prospects for an Ultima 5. Ironically, I actually called the main story line for Ultima 5 about a year before they even announced it. After finishing U4, I thought what could they do for an encore? You can't got back to the "attain perfection" well again, so I came up with, "well, you need a big story and a big quest. What if someone kidnapped Lord British and you had to spend the game trying to find him?" Seemed to be a good idea, and it really was just a variation on the old RPG trope of rescuing the princess, but with larger implications.

 

So it's about 1988 now and I'm looking for Ultima 5. I played it a bit on my friend's Apple II's, but I really wanted it for the Atari. I read somewhere that an Atari version was in doubt, and no one had any info about it, so I had an inspiration: I would see if I could work on port of it for the Atari, then contact Origin, show them the work so far, and they would naturally go "oh, well, if you've already gotten that much done, by all means finish it!" Right? Either way, it would be a proof-of-concept and it would let me see if I could hack it (hah!) as a programmer. A part of me also just wanted to see how it would look on the Atari.

 

Given that I had no official access or support from Origin, the natural question is: how the hell did you get the graphics and all that for the Atari? Now that is quite a fun hackish-type story. I had a friend, John Hendrickson, who had one of those nifty Commodore 64's that was the portable (the SX-64) with the 5" built-in color screen (an actual 5" CRT no less!). Ultima 5 was out for the C64 and he also had a cartridge that could basically dump the memory of the machine and make a copy. Then you could reboot and scan/copy the data from the memory on the cart. This was going to be my secret weapon.

 

Hacking Ultima

 

Starting on the Apple II that I used from friends and school, I had already spent some time learning how to sector edit various attributes of my characters and even a little map hacking here and there on all the Ultima games.

 

I had already done a lot of hacking on U4 on the Atari (and the whole Ultimapper utility) and had, of course, hacked the characters stats. I also had researched and figured out how the tiling system of the graphics worked, and how the main map was stored. This was WAY before the internet, and there was almost no information on this stuff. All we knew then was the map was 256x256 in size and each element on that map was 1 tile. The rest we had to figure out on our own. For instance, we had to calculate and measure the actual tile size. We figured it had to be 16x16 pixels, and the onscreen area of the map you see was 11 x 11 tiles. This would leave 8 pixels above and below the map area (for the border) on an Atari, which had a screen height of 192 pixels.

 

I went in and sector edited some of the sectors using Seluth to put a string of tiles in the map sequentially from 0 to 255 (there were 255 graphics tiles as well. Some were blank, but they used most of them) and this showed what tile was tied to what number. As an aside, doing this created a permanent chest in the map (as you have probably seen in other screenshots of U4 in various places) that you could mine infinitely. Hacking is fun!

 

Anyway, having messed around with this to create Ultimapper, I knew the basic methodology for extracting the map and tile sets for Ultima 5. John helped me on his 64 to sector hack the map with the sequential numbers, then I walked to that part of the map and hit the "capture" button on the cartridge. This had to be done a few times to get all the tiles, since they obviously wouldn't all fit onscreen at once. This process was used to get all the rest of the graphic screens, like the title screen. The flames were fun to try to capture, as its an animation and I had to keep doing captures to try to get the each of the 4 frames of animation for it.

 

The font was similarily copied from the captures, but I used a mixed method to display them on the Atari. The Atari's supported the ability to user-deifine the character sets. Since the U4/U5 character sets used the same size (8x8) for their graphic characters as the regular set, it was just a matter of redefining them with the new bitmaps and pointing the Atari to use the copy. Displaying the text to the screen was one of the assembly language routines, which we'll get into in the next post.

 

I can't recall if the memory was just in memory on the cart, or already in files on the cart. Whichever way that worked, eventually we got them into files on C64 disks and I was ready to transfer them! How the hell do I get this onto an Atari? We didn't have any drives that could read or write the other's format. But we did both have modems. 300 baud modems. As in, 300 BITS per SECOND modems. Slow? Yeah. It took forever to organize and transfer the data, sometimes several hours per disk, if the transfer didn't fail and you had to start over. It took a long time, but it DID work!

 

So now I was set. I had the basic graphic tiles, font, most of the main title screens, and some other info from the C64 version. All I needed was to program it to life.

  • Like 10

Share this post


Link to post
Share on other sites

Interesting, I agree. For those out there that have never seen the Ultima V disks that Rob is referring to....what state are they in? Is it only maps and straight data?

Waiting to hear more of this story.....

Hitchcock

Share this post


Link to post
Share on other sites

Interesting, I agree. For those out there that have never seen the Ultima V disks that Rob is referring to....what state are they in? Is it only maps and straight data?

Waiting to hear more of this story.....

Hitchcock

 

Oh there is....there is. I will be detailing this in the next parts of the story.

Share this post


Link to post
Share on other sites

Great reading. I hadn't heard about this before. Ultima IV is shoulder to shoulder with Alternate Reality and Star Raiders as among the greatest Atari 8bit games ever.

 

Of course the obvious questions are 1) is it playable, and 2) can you finish it, or release the code to someone who can, but never mind that; please continue the story in your own way.

Share this post


Link to post
Share on other sites

yes, please, continue. I love reading these kind of stories from 'back in the day'.

Share this post


Link to post
Share on other sites

This story makes me happy and sad - happy cause its a cool story and cant wait to hear more, sad cause there really wasnt an official start to a port that we know of :(. LB on a Genie chat to the Atari community that the Atari 8bit U5 version was being worked on and would be released but no other details provided.

Share this post


Link to post
Share on other sites

So I guess the mystery of who was actually doing the official U5 8-bit port is still out there.

Share this post


Link to post
Share on other sites

So I guess the mystery of who was actually doing the official U5 8-bit port is still out there.

 

Very true. I am very interested myself, as at the time back around 1989/1990, it was my understanding that there was going to be no port of U5 for the Atari.

 

Also another question for all of you or the moderator: This story will be about 3 or 4 parts. Should I continue it here, or do a new post for each part? I can see arguments either way, but with all the replies, it might be better to do a post-per-part. Also, I will be adding a few images to this post (as those images pertain to this part of the story) soon.

Share this post


Link to post
Share on other sites

I'd say just keep it all in one thread. Maybe Al (the site owner) can give you permanent edit privileges on the first post so you can keep adding to it. Send a note to Al (Albert) about that.

Share this post


Link to post
Share on other sites

So here are screen caps (from Altirra, with the wonderful mode 8 artifiacting set) of my original C64 screen dumps. These are stored directly on the atari disk, and then just loaded right into the screen memory. As you can see, some colors are fine and match up with the artifacting, like the U5 logo, and others needed correction.

 

These "intro" screens are all I can find, but they come out perfect for the images. Again, these are straight from the c64 memory dump and havent been altered.

post-33002-0-80689700-1338836082_thumb.jpg

post-33002-0-33103300-1338836089_thumb.jpg

post-33002-0-55500700-1338836094_thumb.jpg

post-33002-0-40914500-1338836096_thumb.jpg

post-33002-0-74961500-1338836099_thumb.jpg

Edited by RobS
  • Like 2

Share this post


Link to post
Share on other sites

Here are some shots of the WOD flames caps. The second image is a raw dump from the C64. The last image is with the text inside the flames like I wanted (and how it was on the Apple and some others).

 

Note that the flames are kind of cut off. This was where I had to do some major editing with an atari pad, due to the capture coming out white and I needed red. The edges were not right, so I just manually redid all the flame edges and tops using the source as a guide. They arent exact as a result compared to other versions, I just did what would look close and animate decently.

 

I basically put them all onto 1 page/screen, and then blitted it over to the main display memory to animate them. The "WOD" letters were XOR'd via ML calls looping until it filled in. The first image is the resulting file that is used to do the animation. (I tried to attach these in a different order, but it posted them this way, hence the non-sqeuence of the images here.)

post-33002-0-31788500-1338836370_thumb.jpg

post-33002-0-90158200-1338836410_thumb.jpg

post-33002-0-76244500-1338836413_thumb.jpg

Edited by RobS
  • Like 1

Share this post


Link to post
Share on other sites

So here is the fun one. These are raw caps/dumps of the tile sets, where I filled a sector with values from 1-255 to get the main tiles onscreen. Note again how most are just white, necessitating a lot of modding to get them right for artifacting.

post-33002-0-68450600-1338836860_thumb.jpg

post-33002-0-74310600-1338836906_thumb.jpg

post-33002-0-99914000-1338836910_thumb.jpg

post-33002-0-15594400-1338836916_thumb.jpg

Edited by RobS
  • Like 2

Share this post


Link to post
Share on other sites

And finally, a dump screen of the C64 main screen. I used this mostly to get the main screen ('natch) and capture most of the letters for the character set. So far, this is all I have found of my original C64 dumps. I know there were some more, but not too much. I know I didn't get around to dumping all the stuff in the game, I just did this much to get started and to work out the main world maps, character and tile sets, and movement.

post-33002-0-42819700-1338837045_thumb.jpg

Edited by RobS
  • Like 1

Share this post


Link to post
Share on other sites

I hate artifacting on PAL machines but on NTSC it definitely kicks ass!!!

 

Quite interesting, though on the Atari you only really get 2 colors (besides white, which takes 2 pixels anyway): blue or red, and even that depends on the TV. Altirra has a wonderful artifact adjustment tool. I used that to get my screen cap colors posted here to be the correct blue/red. That was always one of the weird things about Ultimas on the Atari: the water was blue, but the grass and trees were red! Anyway, thats the adjustment people would need to do with Altirra to get my U5 to look right.

  • Like 1

Share this post


Link to post
Share on other sites

My First Attempts At Writing A Role Playing Game

 

After playing the earlier Ultimas, and some other games, and having just graduated high school in the mid-80s, I decided to try my hand at making a role playing game. I was only a so-good programmer at this point, but I was eager to learn and had a knack for figuring things out. To this day, my greatest strength is not coding or anything like that, but in being able to boil down a system or process, refine it, explain it, improve it.

 

I had done a little 6502 programming on the Apple II, and a smattering of small programs on my Atari. After I got my 130XE, I began messing around with MyRPG (which I will henceforth call it in these articles.) MyRPG started out as a character mode game, with redefined character sets. This allowed me to get the basics down quicker, and when it came to map display, a lot faster than a full graphics mode screen. It had limits of course, the big one being you only have 255 characters to do your letters, numbers, and all graphics. But it was fast, easy, and quick to write. I started college shortly after and my time was more constricted for a while, so I only worked on it here and there.

 

After getting U4 for my Atari, I started back up with it. I wrote some utilites to rip and convert the tiles and character set (the same basic method I would use with the C64 dumps) and make a quick and crude "walk around" map viewer and editor for U4. This lead to Ultimapper, and was all in basic so it was real slow to move, but it worked and helped me work out methods. MyRPG was transformed into a Graphics 8 mode program a'la U4, with my own take on the tiles. The grass in particular took me many many tries to get it so the repeating pattern of tiles didn't look too regular. By the time I got to U5, I had a whole slew of custom editors for editing the maps, tiles, character sets, etc. I would mod or use the same ideas for the U5 editors I would later make. I had quite a lot done on MyRPG, including several town maps, world map, animations, and a rudimentary 3d dungeon maze setup. It was around this time that I discovered the MMG compiler and it made the programs fly.

 

I explain all of this to give you an idea that I didnt just jump right to trying to code U5, but had built a lot of stuff around these ideas, and things like mappers and character editors. During this time, I was getting fairly good at understanding how to optimize code, and how to tweak Atari basic for memory and performance. I was never an ace coder, but with my skill set, I was good at improving and enhancing stuff. I just kept at it. After a couple of years, getting to about 1988, I was also getting better with assembly, and how I might be able to use it to speed up parts of MyRPG. This is when I hit upon what would become one of my greatest feats of programming.

  • Like 3

Share this post


Link to post
Share on other sites

Programming

 

My recollections on the programming and features are a bit fuzzy as we look at this from 22+ years later. I know I started this all in the Summer of 1988, becuase John was living with us and it was that super-hot summer due to Mount Pinatubo blowing up the year before. It was routinely 100-110 during the day, and 80+ at night. With no air. I did most of the C64 rips at nights. The programming started around early 1989. At the end of 1988, I was essentially homeless and staying with a friend in their dorm room over christmas while I worked a new job to save enough for an apartment. During this dorm stay I worked primarily on the flame drawings and animations, and some of the intro screen work. In Jan. 1989, I had moved into an apartment and began work on the main program.

 

Working from the C64 dumps, I was able to edit up the game tiles by modding one of my earlier MyRPG editors, and ditto for a font editor. At this time, I tended to code things up in as straightforward and fast a way as possible, to get the basic method down, and then go back after letting it percolate in my brain and turning some ideas over for a while and optimize or even sometimes rewrite it better. I usually wanted to get something working first. This may not have been the most efficient method of programming, but its just how my brain worked. Took a bit longer though.

 

I recall that I had at least the entire Britannia disk (main map) set up and the Underworld disk as well. If you wanted to, you could switch out the Underworld disk mid-stream and continue walking around that way.

 

You could move freely, peer (view) a gem, and look at any object and get its description. I think thats about the extent of what was functioning. Maybe Zstats. You could walk over any area (no "slow progress" or blocked areas) for testing. Thats really about it for how far I had gotten in terms of what it could do.

 

How it worked is interesting as well. I was only a so-so assembly programmer, and had just gotten hold of the assembler editor cart, so I didn't feel confident I could tackle the thing 100% machine code right out of the gate. I did implement some routines that way, most notably the screen redraw, which to this day ranks as my most clever feat of programming.

 

The rest was in basic, so it would be faster to get things up to speed, peppered with some other maching language routines to speed up some of the parts. Since basic was obviously too slow for real work, I used a compiler for the basic code, MMG Basic Compiler. This was a great program as it made fairly small files and didnt require a run-time or other extras (or if it did, it was easy to stick on the disk and it took care of loading, can't recall exactly.)

 

How do you paint a hi-res screen fast?

 

The Ultima's were essentially turn-based, and it would just sit there until the user gave it a command. But the water and some other graphic tiles were animated, and this would require animating them and then redrawing the screen, independent of the user commands. So using basic, even compiled basic, was going to be far too slow to do a full hi-res screen redraw fast enough to not look like crap. I knew it would have to be in assembly, and having messed with the U4 hacks and MyRPG, I had a basic way to do it, which was a simple index-and-display method. But as a called routine from basic, I really didn't want to (or even know how to) effectively interleave the screen display with the rest of the game. As there were animations involved as well, that made it doubly difficult to figure out how I was going to have all that run together smoothly.

 

I wanted something that would run basically automatically, so I wouldnt have to try some funky interleaving or checking user input constantly. After doing some cacluations on how much time this would take in assembly, I decided to try to implement a Vertical Blank Interrupt to handle this.

 

The Great Hack

 

The method I would develop would be one of the best programming feats I had ever pulled off with my meager skills. My friend John helped a little bit with some suggestions and checking my method, but after a point I had to finish it up and optimize it myself. Essentially, I used the main VBI that occurs during screen refresh, when the CRT beam (which doesnt exist today in this sense) would get shut off, and repositioned to the top of the screen. This code occured in this interval, NOT in the longer VBI that can occur over the course of the whole display list timeframe. It literally just fit within the available cycles, with something like 90-95% of that time used to do this routine. It essentially did a full screen redraw of the tiles from the 11x11 grid that represented your view of the map. Because it occured in between screen redraws, I didn't have to implement screen flipping and saved a ton of memory and time. It was fast and flicker-free. It also had the added benefit of being essentially automatic. The main display would update continuously, so all you had to do to make the screen move was update the 11x11 grid of the map section you are currently in.

 

I'm sure the method I came up with is essentially the same as whatever anyone else programming Ultima did, as there are only so many ways to do it, but I wrote it all myself and it made me pretty proud to pull it off.

 

Animating the Tiles

 

The animations took 2 basic forms. The first was the water tiles. These were very fast and simple memory moves, where you move 1 byte to the end of the tile-chunk, and move the rest up 1. In some parts of the map table, they were contiguous, so you could move a whole range. Other parts of the water tiles, like the tapered ends of the rivers, used a mask tile and you just XOR'd a water tile with the mask together into the correct place. The other kind was a 4 frame animation where you still did a memory move, just on whole tiles instead of shifting 1 tile.

 

I never got all the animations working, so it was mostly all the main water tiles, the lava tile, and the fountain. This routine was called from basic. I basically polled the keyboard buffer (peek 764) and if it was empty/no key, call the animation. The "free" VBI screen update did the rest for making it all work. When I compiled the whole thing, I added a delay so it would flow better. In basic, no delay was needed and the animations are about the right speed. Just worked out that way.

 

There was also a quick animation for the cursor, which is the smaller flowing-water look. This was a simple adjustment to 1 character in the character set and then resend it out to the screen. I basically modded the main character set for not only the letters, but also the border graphics. So, essentially, I had 2 types of "screens" overlaid each other: the map screen area which was just bitmapped straight out with the VBI, and all the borders and text which was just basically the same as a Gr.0 40x24 text screen grid painted out with an assembly routine from the modded character set. This allowed me to "print" text on the graphics screen.

 

I was all set to work on the next phase, which would have been towns, getting other commands working, and combat, when I decided to put in a call to Origin first.

  • Like 2

Share this post


Link to post
Share on other sites

Calling Origin

 

I had already sent off a demo of what I had to that piont to Origin offering to do the port for the Atari, as it didn't seem at the time they were working on it. I offered to do it basically cheap, but I needed access to the rest of the game information as I only had what I had by just copying and observing other versions. I got no reply for a while, so after a couple of months I put in a call to Origin to see if they had received it. I believe I talked to Robert directly at this point, and he informed me that they had seen what I had sent, and it looked nice and all, but they had decided to officially not do a port of U5 for the Atari at all. Not even for cheap. I guess they felt piracy would be too high to justify it, and I tried to convince him to reconsider, but that was the last I ever heard of anything about it.

 

At this point, there didn't seem to be any reason to continue working on a U5 port. I did continue with some of it, and used the basic engine to work a bit on MyRPG, but eventually life and other interests pulled me away, and by 1990 or so the 8-bit scene was dead and the PC was ascendant. Soon Ultima 6 would come out, for the PC only (or at least, not for the Atari) and that was that for my Atari years.

 

So I got a PC, as almost all of us did, and moved on. I still have very fond memories of my time with my 130xe, which I still believe to be the best of the 8-bit machines of that era.

 

SIO2PC

 

Around 1994 I got wind of these devices that would let you copy your Atari disks over to the PC. Along with some decent emulators that had started to come out, it seemed like a fun idea to get my old 8-bit software running on the PC. I settled on SIO2PC and ordered it. It worked quite well, and I was able to copy all my disks. Well, not quite all it appears. Here is the great loss as regards the U5 project. For whatever reason, I do not seem to have a copy of the U5 Britannia disk I had set up and been working with. I seem to have most of the rest of the source disks, but my "working" copy of the Brit disk appears to never have been scanned. And at this point, after moving so much over the years, I don't even think I have my original Atari disks. If I ever turn them up, I will be sure to go through them and see if it's there and attempt a new copy of it.

 

But that is not quite the end of the U5 story.

  • Like 3

Share this post


Link to post
Share on other sites

The State of U5 Now

 

I have since been able to review the disks that were ripped and found out that while I dont have my U5 Britannia work disk that was all set up for testing, I did manage to get a copy of the map disk in a sort of raw format. The disk only contains the map, and they are in the wrong place on the disk (which tells me this was my first dump of the data to try to make a Brit disk) but a simple transpose of the sectors fixed that. Some of the commands still don't work, and I don't seem to have the correct versions of those to put on the Brit disk, but the map works fine. Using this new information, I was able to grab the Underworld disk as well from the PC version and format it the same way, so now that map works as well.

 

The (Hopefully Near) Future

 

I am going to attempt to find the newest version of the software that I have images of, and see if I can get it working to at least the state it was in when I left off back in 1990. I have done some preliminary looking at some of the earlier versions, and I think I can figure out enough at this point 22+ years later to get at least those basics working again. If and when I get this working, I will post updated disks for everything so people can take a look and wander around in Ultima 5 on an Atari 8-bit computer.

  • Like 6

Share this post


Link to post
Share on other sites

I am going to attempt to find the newest version of the software that I have images of, and see if I can get it working to at least the state it was in when I left off back in 1990. I have done some preliminary looking at some of the earlier versions, and I think I can figure out enough at this point 22+ years later to get at least those basics working again. If and when I get this working, I will post updated disks for everything so people can take a look and wander around in Ultima 5 on an Atari 8-bit computer.

 

Good luck, RobS!! You devoted a lot of hours and this is something worth sharing. It's been stored away for 22 years like you said, at risk like it or not of vanishing or being lost or being damaged or being thrown out. Put it on the Internet, the more user-friendly the better, and archivists will do the rest. People will perhaps be able to enjoy it 222 years from now.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...