johanberntsson / ozmoo

A Z-machine interpreter for the Commodore 64 and similar computers
GNU General Public License v2.0
117 stars 19 forks source link
c128 c64 commander-x16 commodore infocom interpreter mega65 plus4 ram-expansion-unit retrocomputing retrogaming reu terp text-adventure x16 zcode zmachine

Ozmoo

Ozmoo (spell): survive unnatural death

A Z-machine interpreter for the Commodore 64 and similar computers

Written by Johan Berntsson and Fredrik Ramsberg in 2018-2024

Mini-Zork I running on Ozmoo

Status

Update 2024-Mar-27: Release 14 with Commander X16 support.

Update 2023-Jul-18: Release 13 with support for undo on C64 with REU, C128 and MEGA65.

Update 2022-Dec-20: Release 12 with support for smooth scrolling on C64 and C128 in 40 column mode, player-selectable scroll speed and tear-free scrolling, plus optional scrollback buffer in RAM for all platforms.

Update 2022-Aug-09: Release 11 with support for a scrollback buffer on MEGA65, C64 with REU and C128 with REU. Ozmoo can also utilize smaller REUs now.

Update 2022-Jun-16: Release 10 with MEGA65 support for sound, unlimited dynamic memory and large stack (the stack mod makes it possible to play some lightweight Inform 7 games).

Update 2021-Nov-28: Release 9 with support for z1, z2 and z7 games.

Update 2021-Oct-03: Release 8 with MEGA65 speedups, plus optimizations and bugfixes for all platforms.

Update 2021-May-04: Release 7 with new MEGA65 target, improved z3 statusline on 80 column displays.

Update 2021-Mar-19: Release 6 with command history, input colours, a new font and bug fixes.

Update 2021-Mar-02: There is now an official port of Ozmoo for Acorn computers.

Update 2020-Dec-20: Release 5 with new C128 and Plus/4 targets, Beyond Zork mode, preload updates and bug fixes.

Update 2020-Sep-20: Release 4. Bugfixes, new cursor customization options, and a loader showing an image of your choice while the game loads.

Update 2020-Mar-04: Release 3 is here. Many bugfixes. Darkmode and splash screen added. Support for four new languages.

Update 2019-Jun-04: We have created release 2, with several new features, many bugfixes, better docs and other improvements.

Update 2018-Dec-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.

Hibernated 2 with a loader image

Motivation

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:

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:

Nice-to-have features

Ozmoo running a German game using a custom font with accented characters

Ozmoo supports:

Ozmoo running Hollywood Hijinx vs Infocom's interpreter running Hollywood Hijinx

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.

Other versions

There is a port of Ozmoo for Acorn computers.

Building and running

The simplest 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. It supports all of the most important features. If you want to be able to use all the features and have full control of the build process, this is not the option for you.

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:

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.

Windows

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

Linux

Acme is available on Debian/Ubuntu with:

> sudo apt install acme

If this doesn't work, then acme can also 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 install vice

Note that you have to supply the ROM images (kernal, basic, chargen, dos1541) under /usr/lib/vice to make x64 (the C64 emulator) run. See VICE instructions for more details.

Ruby is available on Debian/Ubuntu with:

> sudo apt install ruby

Thanks

Special thanks to: