(hide navigation)
  • Swedish content
Fund my projects
Patreon
Steady
Don't miss
Page thumbnail
UMLseq
Forum
Register
Log in
Latest comments
Syndication
RSS feed
Feedback
Games

C64 Å-machine interpreter

My two text games Tethered and Pas De Deux are now available for the Commodore 64.

Both of these games were implemented in Dialog. For some time, the Dialog compiler has been able to produce bytecode for the Å-machine, which was designed from the outset with 8-bit systems in mind. But I had only released an interpreter written in Javascript, so the games could only be played from within a web browser. Now I have finally released an Å-machine interpreter for the C64.

Download

Read the instruction sheet (inlined to the right).

Read more about each game on its respective page: Tethered and Pas De Deux.

About the 6502 engine

The new interpreter pairs an engine, written in generic 6502 assembly language, with a system-specific frontend for the Commodore 64 (equipped with a 1541-compatible floppy drive). A RAM Expansion Unit (REU) is required for the UNDO command, but is otherwise optional. The presence of a large (at least 256 kB) REU will also improve performance dramatically.

Creating a Commodore 64 version of an Å-machine game is easy. As before, the Å-machine toolkit contains a command-line tool called aambundle, that can read an .aastory file and create a directory with a self-contained web player. With the option -t c64, it will create a disk image for the C64 instead.

The performance on a stock system (C64 + 1541) is competitive. The first few commands tend to be slow (about 10–15 seconds), as the engine retrieves data on demand from disk. Once the system is warmed up, the typical response time before output starts to appear is about 1–3 seconds. Of course, printing a large chunk of text also takes time, especially if new content has to be loaded from disk. But that is all happening while you read, so it is not as frustrating as the initial wait.

With a REU, response times are typically less than a second.

When the same two games are compiled for the Z-machine, and played on a C64 with a REU (using Zeugma), they respond to commands in about 3–7 seconds. Without a REU (using Ozmoo), the response time is 1–3 minutes (!) because of the increased disk access. (I would have used the same interpreter for the benchmark, but Zeugma needs a REU by design, and Ozmoo crashed on these games in REU mode.) Part of the reason for the speed boost is that Å-machine storyfiles are only about half the size of their Z-machine counterparts. Each of these games now fits comfortably on a single disk side, along with the interpreter.

To put this in context, the original Hitchhiker's Guide for the C64 (using Infocom's own interpreter, and paging from disk) has response times of around 1–5 seconds. With a modern interpreter (e.g. Ozmoo with a REU), this can be reduced to half a second. So Dialog games are now on par with classic Infocom games in terms of performance, despite the fact that Dialog is a high-level, rule-based language with a complex in-game parser and standard library, more in the spirit of Inform 7 than ZIL.

In the long run, I hope this will open the gates for lots of modern, narrative-driven text games for the Commodore 64!

Posted Monday 25-Nov-2019 20:57

Discuss this page

Disclaimer: I am not responsible for what people (other than myself) write in the forums. Please report any abuse, such as insults, slander, spam and illegal material, and I will take appropriate actions. Don't feed the trolls.

Jag tar inget ansvar för det som skrivs i forumet, förutom mina egna inlägg. Vänligen rapportera alla inlägg som bryter mot reglerna, så ska jag se vad jag kan göra. Som regelbrott räknas till exempel förolämpningar, förtal, spam och olagligt material. Mata inte trålarna.

Anonymous
Tue 8-Dec-2020 00:07
Hey Linus. Just experimenting with the C64 maxi, but Tethered won't run. Any clues why? It stucks with the loading interpreter screen.
lft
Linus Åkesson
Wed 9-Dec-2020 21:30
Hi! I don't know much about the C64 Maxi, but this sounds like a problem with the fastloader. Does the Maxi provide true/accurate emulation of a 1541 disk drive? Perhaps this is something that has to be enabled explicitly?
Anonymous
Thu 10-Dec-2020 14:36
Hi! This was indeed the problem!
You have to add "_AD" (for Accurate Disk) to the filename, then everything works fine. You can also load an image with REU into RAM before loading the Âmachine disk file to get support of REU. Fine, thanks for this great feature!!!