Ultima 3 for the Gameboy Color - History


I, like so many others, grew up from a video-game child into a video-game adult. I have many fond memories of playing games like Adventure, Pitfall, and Space Invaders on my Atari 2600. One of my biggest childhood fantasies at the time was to win one of those Toys R Us contests. The grand prize was a mad dash through their store where you could keep all of the goodies that you could stuff into shopping carts in 5 minutes. Yeah, you wanted it too...

Later, of course, I had my Commodore 64....and I never slept again. It was around that time that I also seemed to stop playing with all of my other toys. This was even when I only had the lame tape drive and no disk drive. I spent countless hours typing in machine language code from magazines like "Run"...and countless more cursing myself for the one typo that prevented the game/program from working. Once I convinced my parents that I could not live without a disk drive any longer, I finally ensconced myself into the Matrix. If there ever was a Golden Age of gaming, I'm sure we'd all agree it was during the Commodore 64 era. During this time, I played the most enjoyable game of my life : Ultima 3. From that point on I was hooked on RPGs. Ultima 4 and 5 are also on my all time list of favorites, and while they were technically superior to Ultima 3, there was no way that any game could top it because it was the first one that truly drew me into it. Thus the seed was planted...

The Project

So why did I take the time to do it? Various reasons. Mainly I had been meaning to make a game for a while. The notion just seemed like it would be fun. Also, I missed the attention to gameplay that is generally lacking nowadays. Back in the days of blocky graphics and pinging sound, developers had to focus on gameplay to make a game that people would buy. I suppose making this game was my way of palpably expressing the dislike I have for "pretty" games that you get bored with in about 5 minutes.

The Gameboy Color was the natural choice for such a project. Firstly, Ultima 3 had already been ported to just about every other system. Second, the Gameboy Color was similar to the Commodore 64 in that it was restrictive in its graphical and musical capabilities. (Well, I shouldn't insinuate that the C64 was restrictive in the sound department.....please no flames about how I'm SID-bashing....I think you understand what I mean...) Personally, I cannot draw a picture or compose a tune - so programming in the Gameboy environment was ideal - it allowed me to not worry so much about "what I could be doing" simply because the system wouldn't permit it anyway. Lastly, I had already been tinkering around with Gameboy programming - so I was in the right mindset.

The Process

So now I had a clear idea of what I wanted to do....and that idea stayed in the back of my mind for quite a while before I actually sat down and did something about it. It all started in a very subtle manner. I decided I would start looking into the feasibility of it by ripping out the tile graphics from the C64 version of Ultima 3. To do this, I played the game in an emulator, took screenshots of the game in action, and pasted them into a PBRUSH window. To facilitate this process, I modified the Ultima 3 map of Sosaria so that there would be a cluster of every single tile in a 16x16 grid. Then I simply needed to walk over to that section in the game and take a couple of screenshots to get all of the tile graphics used in the game.

When I had obtained the graphics, it was time to scrunch them from 16x16 tiles down to 8x8 tiles. Why? For the following reasons: the graphics window in Ultima measures 11x11 tiles. Each of those tiles measures 16x16 pixels so the graphics window size is 176x176. The entire screen on the Gameboy, however, is only 160x144 pixels. There's simply no way that it would fit. I could have made the graphics screen size 9x9 tiles and had it take up the entire Gameboy screen, but that would mean modifying the logic of the game itself, and I wanted to stay as dedicated to the original as possible. So I had to mangle the graphics. This was a big task for someone who has little artistic ability, but I'm satisfied with the results. Thus the tileset for the Gameboy was created - but I wanted to see how it would look on the Gameboy itself....so I needed an interface through which I could view the tiles. It was a relatively simple matter to decipher the Sosaria map file in the game (since I had already done so when I originally played the game) so I quickly programmed in the map of Sosaria. After playing around with the color palettes a little bit, I had a working scrolling window of the map of Sosaria using my converted tiles. I thought to myself "neato."

Apparently, that was all the momentum that I needed. From that point on, everything just kind of started falling into place. I programmed in tile characteristics to determine if you could walk on them or not. Then I programmed in the visibility factor - where tiles are blacked-out if they are obscured by mountains, etc. Converting the other town maps was no problem since I had already done so with the Sosaria map. The only added layer of complexity was deciphering the NPC data. That was pretty straight forward also, however....once you've been reading hexadecimal displays for 20 years, it's fairly easy to recognize patterns. So things continued in this way where I could take the data files from the Ultima game, decipher them, and convert them to the Gameboy. After a while, I was at the point where I had an interactive world going with just about everything done except for 3 things : dungeons, music, and game logic specifics.

The dungeons were a bit of a hassle...and I knew they were going to be so I put them off for a long time. It was necessary to have a way to automatically generate 3D wall maps based on the dungeon layout. This was the one time that I wished I had a more powerful system with better graphical capabilities. It would have made things so much easier. The dungeon drawing system is essentially a bunch of lookup tables into predefined arrays of tilemaps. This is covered by a logic system that determines which of the dungeon tiles in front of you should be displayed and which are obscured by walls. There was also the issue of ladders and chests. The one compromise that I had to make that I'm still not happy with is changing the ladders into arrows. This is something that I might readdress in the future. I was so happy to finish the dungeon system, though, that I didn't look back.

The music system was what I thought was going to be the most time-intensive and difficult for me. Strangely enough, though, after I got by the first big hurdles, it was a rather simple process. I took the SIDs of Ultima 3 and used a program called SID2MIDI to convert the SIDs into text files containing the note information for the 3 SID channels. Then I wrote some programs to convert these musical notes into their Gameboy equivalents. Finally I had to write the Gameboy music system for my game. This took a while because it was the first time I had done any music programming and notions of envelopes, attenuation, etc were foreign to me. Eventually that too fell into place, though, and I had in my hands a nearly fully functioning version of Ultima 3.....nearly...

The Process Part 2 : The Cry For Help

As I previously mentioned, some of the things preventing my port from being complete were game logic specifics. By this I mean there were things that I couldn't figure out just from playing the game. For instance, how often is a random monster generated and under what conditions? How much damage does a bow-toting character with 75 strength do to an orc? What are the factors in determining if a player will be poisoned when they are hit by a pincer? Exactly in what manner does the whirlpool move? There were literally dozens of these types of questions for which I had no answer. The only way to obtain these answers was to look at the actual game logic. I grabbed the IBM-PC version of Ultima 3 and ran the program files through a disassembler. I tried mucking though the source, but it was quite a daunting task and I decided to take an alternate route. I thought to myself, "Who would have the answers to these questions?" Well, the answer was obvious - pretty much 1 person - Richard Garriott - Lord British himself. "Right" I thought to myself...how the heck was I supposed to get in contact with him? Even if I did, why would he take the time to help me out? However, perhaps other people had access to the commented source code and would be able to get the answers I needed from it - so I had to at least try. I wandered through the Ultima Online site looking for emails of people who seemed to be involved in the development department. I also emailed some similar people at Electronic Arts who I thought might have answers or at least know how to redirect my query. Here is the email that I sent out:

Firstly, I was somewhat at a loss as to obtaining an email address that I thought could specifically address my issues. I've sent this email to a few other @uo.com addresses, so if you receive this more than once I truly do apologize. My intent is not to SPAM but rather to reach someone who can help me.

That being said, I am in the progress of coding a port of Ultima 3 for the Gameboy Color and I am about 95% done. I expect to have all the loose ends tied up in the next couple of weeks (depending on what my "real work" schedule and my family allow.) Ever since I started the project I have wished the port to be as accurate as possible. To this end, I have reverse engineered much of the Ultima 3 information from the PC and C64 versions. However, there are certain parts of the gameplay that would take a significant amount of disassembly/investigation to yield the desired results. I was hoping that perhaps someone at Origin/EA could assist me in this area. I have a number of technical questions that I would like to ask of someone, but I do not know who, if anyone, can provide the information.

If you could direct me to someone who might be able to help, I would very much appreciate it.

Thanks so much for your time and any assistance you can offer.

And here is the reply that I got back (with a lengthy history of "forwarded by")


What fun!

I would love to play that some time. I am the only one who could possibly help you as I am pretty much the only person who worked on it ever. However, that was so long ago, I doubt I will be able to help on any technical questions. However, ask away, perhaps I can help.

- Richard Garriott


I couldn't believe it. I had actually made contact and he was offering to help. What a great guy. I sent him back an email with a ton of questions...but then the strangest thing happened....

I figured it all out.

I just sat down one day and started commenting the disassembled code and naming various procedures...before I knew it I had something that was understandable. I literally answered all of my questions in a couple of days of tedious work. Needless to say, I immediately sent an email to Mr. Garriott stating that I was an idiot and that I jumped the gun a little bit. I told him that it was nearly done and asked if he wanted to try it. Indeed he did, so I mailed him a physical copy of the game. After a few days, he sent the following email:


I got it on Thursday.

Brought in a color Game Boy on Friday.
Everyone on the team is thrilled!
We are having a blast checking it out.
We have yet to get very far into it yet.
I'm sure we'll be playing it more this week.

- Richard

These were very encouraging words and I was quite pleased with myself. Accolades from the man himself. As it turns out though, this email dialogue took place very shortly before he left Origin/EA, so he couldn't assist me in the possibility of publishing it. The people he directed me towards ultimately stated that the commercial viability was not promising enough to go forward. Shrug. It would have been nice to see it on a shelf, but oh well, that's the way it goes. I finished up debugging the game and gave a copy of the final version to my brother because he too is an Ultima fan. Something was missing though. I had made a 100% port of Ultima 3 but I hadn't really implemented any creativity in the project. It was mostly just making as accurate of a copy as possible. So that's when I decided to expand upon the game....

The Extra Game

I thought to myself - I have a complete game engine here and it's pretty modular...I could easily lift out the maps, put in my own, and just expand upon the entire thing. I wanted to continue the story of Ultima, but it had to be within the realm of what might happen between Ultima 3 and Ultima 4. So I came up with a story and slowly built upon that. I didn't want to just add new maps and NPC dialogue to the game, though, because that wouldn't be particularly interesting. So I also added new abilities, new puzzles, and new "O"ther commands. When all is said and done, the new game is about as large and involved as Ultima 3 itself - and I think that there will be more than enough new gameplay to prevent anyone from thinking "this is just Ultima 3 with new maps..." You'll have to play it yourself to find out though.

I hope lots of people will get a kick out of playing Ultima 3 on their GBC's.

Please send me some email and let me know what you think!