Ozmoo (spell): survive unnatural death
A Z-machine interpreter for the Commodore 64
Written by Johan Berntsson and Fredrik Ramsberg in 2018
Update 2019-06-04: We have created a new release, with several new features, many bugfixes, better docs and other improvements.
Update 2018-12-27: We now consider Ozmoo ready for production use. A few minor features are missing, like output to printer and the ability to save and restore arbitrary parts of memory, and chances are they won't be added.
There are probably still some bugs, and we will work to fix them as soon as we hear of them or notice them. We expect almost all games to run just fine.
Known bugs: See todo.txt.
If you want to follow what's happening with Ozmoo, we recommend you to star the project.
We were looking for a redistributable interpreter of Infocom and Inform games that could be used for new interactive fiction works on the C64.
While the old Infocom interpreters are still available, the license situation is not clear so it is risky to use in new work, especially commercial. Furthermore, some of the newer Inform-based games use features which the old Infocom interpreters on the C64 can't handle.
There are some other implementations, but they have their limitations:
- Infocom64 is based on assembly code of the original Infocom interpreter so it has the same license issues. Also, it only works with certain setups of hardware or emulation.
- Zeugma requires an REU (Ram Expansion Unit) and doesn't support save and restore.
- Z is an interpreter for Z-code version 3 only.
What games can Ozmoo run?
The simple answer: Ozmoo should be able to run most Z-code games, regardless of size (A Z-code game can be up to 512 KB in size).
The longer answer:
- Ozmoo only supports version 3, 4, 5 and 8 of Z-code. This means you can't run the very first versions of Zork I and II, or the Infocom games with graphics.
- A Z-code file always starts with a section called dynamic memory. Ozmoo will not be able to handle games with more than roughly 35 KB of dynamic memory.
- If you want to run Ozmoo on a system with a single 1541 drive (or an emulation of one), the part of the game file that is not dynamic memory can be no larger than 191.5 KB. This typically means the game file can be about 210 KB in size.
- Some Inform 6 games and pretty much all Inform 7 games will never be fast enough to be any fun on Ozmoo. In general, Infocom games are faster than Inform games.
- Uses all 40 columns, has smart wordwrap and has a MORE prompt which uses a single character - this allows for much more text to be fitted on screen than with Infocom's interpreters.
- Supports embedding a custom font. Currently two fonts are included in the distribution, plus some versions for Swedish, German and Italian. And you can supply your own font.
- Supports custom alphabets in Z-machine version 5 and 8.
- Supports custom character mappings, allowing for games using accented characters. Comes with predefined mappings for Swedis, German and Italian.
- Supports custom colour schemes.
- Supports up to ten save slots on a save disk (and most games will get the full ten slots).
- Supports writing a name for each save.
- Supports building a Z-code game without virtual memory. This means the whole game must fit in RAM at once, imposing a size restriction of about 50-52 KB. A game built this way can then be played on a C64 without a diskdrive. This far, save/restore does require a diskdrive, but there may be a version with save/restore to tape in the future. Also, a game built in this mode doesn't support RESTART.
- Supports building a game as a d81 disk image. This means there is room for any size of game on a single disk. A d81 disk image can be used to create a disk for a 1581 drive or it can be used with an SD2IEC device or, of course, an emulator.
- Supports using an REU (Ram Expansion Unit) for caching. The REU can also be used to play a game built for a dual disk drive system with just one drive.
The differences in screen handling are evident in this comparison between Infocom's interpreter (left) and Ozmoo, both showing the first screenful of text in Hollywood Hijinx. Ozmoo manages to squeeze in 872 characters of text, which is 34% more than Infocom's interpreter (650 characters). Both interpreters have reserved the top line for the statusline, but Ozmoo doesn't actually print the statusline until the first prompt.
Building and running
The simplest but also somewhat limited option, is to use Ozmoo Online, a web page we have setup where you can build games with Ozmoo without installing anything on your computer.
The other option is to install Ozmoo on your computer. This can be done on Windows, Linux and Mac OS X.
You need to install:
- Acme cross-assembler
- Exomizer file compression program (tested with 3.0.0, 3.0.1 and 3.0.2)
- Vice C64 emulator
- Ruby (Tested with 2.4.2, but any 2.4 version should work fine)
Edit the file make.rb. At the top of the file, you need to specify paths to the Acme assembler, Exomizer, the Vice C64 emulator, and the program "c1541" which is also included in the Vice distribution.
To build a game, you run something like "ruby make.rb game.z5" Add -s to make the game start in Vice when it has been built. Run make.rb without arguments to view all options.
Acme can be downloaded from SourceForge
Exomizer can be downloaded from Bitbucket. The download includes binaries for Windows.
Get WinVice from SourceForge
You can get Ruby from RubyInstaller
Acme can be downloaded from Github and compiled:
>cd src >make
Exomizer can be downloaded from Bitbucket and compiled:
>cd src >make
Vice is available on Debian/Ubuntu with:
> sudo apt-get install vice
Ruby is available on Debian/Ubuntu with:
> sudo apt-get install ruby
Special thanks to:
- howtophil, for Linux-related make.rb suggestions
- Retrofan and Paul van der Laan for font support
- lft for good advice and support
- Jason Compton, for great help in testing
- Alessandro Morgantini for adding support for Italian