←back to thread

156 points ChristopherDrum | 1 comments | | HN request time: 0s | source

I recently brought Infocom's original UNIX z-machine source code back to life on modern systems. The modified source code, instructions on usage, a build of the z-machine, and examples of embedded game executables are available.

There is also a detailed write-up about the state of the original source code, the porting process, and the invaluable role Justine Tunney's Cosmpolitan project played in bringing the Zork trilogy (and more) to Windows/Mac/Linux/bsd for arm/x86 machines over the course of a lazy Sunday.

Show context
hans_0l0 ◴[] No.43680032[source]
What is going on here?

[~/Downloads] $ chmod +x zork*

[~/Downloads] $ ./zork1

Cannot open assembly './zork1': File does not contain a valid CIL image.

replies(3): >>43680082 #>>43680218 #>>43682889 #
jart ◴[] No.43682889[source]
You probably have WINE or something installed. We have a workaround:

    sudo wget -O /usr/bin/ape https://cosmo.zip/pub/cosmos/bin/ape-$(uname -m).elf
    sudo chmod +x /usr/bin/ape
    sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
    sudo sh -c "echo ':APE-jart:M::jartsr::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
For more help/information on the various gotchas and things that can go wrong running Actually Portable Executable (APE) binaries, please see this reference Mozilla put together: https://github.com/Mozilla-Ocho/llamafile/?tab=readme-ov-fil...
replies(1): >>43686521 #
hans_0l0 ◴[] No.43686521[source]
No wine... but something something .NET : mono
replies(1): >>43686757 #
1. jart ◴[] No.43686757[source]
Oh. Then the workaround should still work I think. Did it help you?