How To See the Source Code of the Original Ultima 1
I will admit, freely, that I’ve been debating how to approach this subject for some time. It has been a few months since Odkin initially made the discovery that the source code for the original, Apple II version of Ultima 1 has been (in his words) “right under everyone’s collective nose the whole time”. This is because (and I am paraphrasing here, so forgive me for the use of lay-language) the actual game data files are, in essence, wrappers around the game’s BASIC and machine language code. With the right combination of commands, it is actually possible to list and, subsequently, read the game’s code on any Apple II.
Here’s how Odkin explains it:
I have studied Ultima literally from when it first came out. I loved it! I went as far as to subscribe to a magazine called Hardcore Computing (which had “cracking” secrets”) just so I could unlock and backup my precious disks! Of course, once I had an unlocked copy, I was able to look at the files and list the programs. Hardcore published several Ultima-related utilities. Fortunately, all the issues are scanned and online. Here’s an example of a map generator article (pg 13).
The first commercial issue of Ultima (no “1” yet) was indeed written and published in Applesoft BASIC.
Now, to use the instructions that follow, you’ll need either an actual Apple II or a good emulator, plus a copy of Ultima. I can point you to two emulators — VirtualApple and AppleWin. I can’t and won’t post the game data files for download; you’ll need to locate those on your own.
Odkin again:
When you see the “]” prompt appear duting bootup, hold CTRL-C, then use “FP” to clear memory and you can LOAD, LIST, and HGR/BLOAD all the files. Note that the second side of the disk has program files too. It’s kind of funny that the oddly named copyright notice files are actually the Demo Mode graphics files. I’m not sure the later rewrite version had the Demo. It was a great sales tool for stores to leave running. What teen could resist the cool graphic of the face morphing into a skull with the caption “SOME FIND FORTUNE…SOME FIND DEATH !!” ?
So, there’s the gist of it, Dragons and Dragonettes. If you’re one of those fortunate people who still have a copy of the original Ultima and and Apple II (or a good emulator), why not take a stab at peeking at the code? You’re welcome to discuss your findings here, although I’ll ask you to refrain from actually posting game code.
Great to see this! If you ever turn this into a large article detailing the structure of the original sourcecode, feel free to submit it to http://codex.ultimaaiera.com
We already have fairly detailed tech documents on several of the Ultima games, and we’d love one more!
http://codex.ultimaaiera.com/wiki/Template:Internal
It probably won’t be me, because in all honesty this is about as much as I am willing to stick my neck out with source code. Posting that stuff is, for me, a one-way ticket into EA’s bad books (best case) and a legal nightmare ending in the death of the site (worse case) and significant damage to the remake community (worst case). Plus, commenting on the guts of a program I didn’t write is…er…not something I would be any kind of good at.
But if Kingspud or Odkin wants to contribute information to the Codex matching extant technical information for other games, that would (I should say) certainly be a welcome thing.
Thanks for the credit… I’m glad to see this posted at last! Still think it’s unlikely though that the Cal Pacific Applesoft source code ever had renewed copyright. It’s been 30 years, and this version was abandoned and completely rewritten in machine code within a couple of years.
Anyway, I want to clarify three things: 1) the Apple DSK image of the cracked Cal Pacific Ultima disk that’s floating around the web is NOT from me, 2) I still actually possess my original Cal Pacific Ultima disk, so I’m entitled to have my copy of the DSK image, and 3) believe it or not, I only used the “cracking” info in Hardcore to make legitimate backups, and for utilities they published like the Map Maker article you linked to.
One interesting artifact from the disk image: the original boot screen showed a simple line drawing of a Griffin wearing a crown. The file is called PIC.ULTIMATUM. “Ultimatum” was LB’s original name for the game before from trademark issue came up,.
Man I need to crack this game in order to steal trade secrets of coding. Once I do that, I can lead my multimillion dollar developement team in creating a triple a rpg to directly compete with ea… muahahahahaha!
Kidding kidding. I know, ea and publishers can be unreasonably heavy handed about things.
I played the ultima collection version of ultima 1. Was the space flight part the same in the old original u1? How did he do the psuedo 3d in space. I’m aware the dungeon 3d wasn’t so complex but the space part was pretty cool 1980.com
For anyone hunting for the right Apple DSK image, you’ll know you have it when it boots with just the word “–ULTIMA–“, followed by a screen showing a Griffin line drawing and the words “THE COMPLETE ROLE-PLAYING FANTASY GAME FOR THE APPLE II COMPUTER”.
Reboot the emulator and hit Ctrl-C as soon as a “]” symbol appears.
Then you can CATALOG the disk, LOAD and LIST all the Applesoft Basic files, and HGR/BLOAD the graphic files.
I’m hosting a pure version on bittorrent, minus the customized player disk (no names). The README is stripped of names as well. Use conventional means to locate.
FYI, if you create a disk image of the Apple II Ultima, you can view the basic source code, no emulator or machine required. This is how BASIC applications always work. Basic is interpreted, not compiled, hence the text is in the clear.
I made this discovery a few years ago when I was trying to patch Ultima2 PC using the Apple II data files (since the pc versions released on CD-ROM are broken.) I thought “I wonder what’s on Ultima’s disk”
So there you go. It’s rather trivial, but there’s not a whole lot to be learned from the basic source if you don’t know BASIC.