Cornerstone's VM (was: Cornerstone for Atari)

Last week, I was searching through my parents’ garage, looking for some old gray box Infocom games. I didn’t find them, but I might have found something better.

My dad did some work for Atari back in the day, which must’ve been how he ended up with these:

“ZORK” seems obvious enough, but what does “CS for Atari” mean?

Well, if you’ve read the thread title, you can probably guess. This magazine ad was clipped out in the same box as the disks:

Conventional wisdom has it that building Cornerstone on top of a brand new VM was a massive blunder, since it was only ever released for the PC, and the VM was never used for any other products. And yet, this claims to be Cornerstone for Atari.

Even stranger:

Zork for Cornerstone? I’m as shocked as you are.

I’ve never owned an Atari computer myself, but the local vintage computer club was kind enough to help me make images of the disks. Hopefully someone here knows what to do with them!

“CS for Atari” disk image
“ZORK” disk image

[Edit: There’s even more! See below.]

20 Likes

Brilliantly done! This is what today should be about.

5 Likes

I mean, I initially thought the same but now I opened the files in a hex editor and they have actual game data inside. I think…

Either way, nice!

2 Likes

I completely fell for this one, unlike the other thread which was a bit over the top and was pretty obvious. But now I need to ask … did your dad really used to work for Atari, and that website is correct, or did you one day happen to notice somebody with the same surname as you and thought it could be used today?

2 Likes

I’m not exactly sure what’s going on here (judging by the speed, I’m guessing x86 emulation of the original PC binaries?) Haven’t figured out how to import the Zork database yet.

2 Likes

OK, neat. Is this Zork I running in Cornerstone somehow?

For those who are Atari-illiterate, this is what it took:

  1. install hatari
  2. download EmuTOS
  3. hatari --cpuclock 32 --memsize 4 --fastfdc true -t etos512us.img --disk-a zork.st --disk-b corner.st --vdi true
  4. copy files CORNER.MME and CORNER.OBJ from A:\ to B:\AUTO\ (allowing overwrites)
  5. close hatari
  6. hatari --cpuclock 32 --memsize 4 --fastfdc true -t etos512us.img --disk-a corner.st --disk-b zork.st --vdi true

Bravo, @vaporware! I do hope you’ll share something about how it all works.

EDIT: FYI, I think maybe you’re supposed to be able to restore from backup on drive B: (the “ZORK” disk) within Cornerstone, but when I tried it the instance of Cornerstone seemed to crash (Atari call trace output?). That may be due to version issues with hatari and/or using EmuTOS instead of a copy of the real binary.

2 Likes

I have a real Atari 800XL to try these out on, but do we think the .st extension means they are meant for an Atari ST?

Except for prototypes, I don’t think the 800XL had 3.5" floppy drives, just the 5.25".

Funny thing, the sort of consistency with Infocom by the presence of feelies. (Sorry, I can’t explain well the lateral thinking in action…)

Well done !

Best regards from Italy,
dott. Piergiorgio.

Turns out there was even more in that crate! I found another magazine ad:

Incredible.

There was also this disk:

It’s unlabeled, but I recognized the Amiga logo and asked the local vintage computer club for help once again:

Amiga logo disk image

8 Likes

That’s really him. I don’t know if he literally worked for Atari, but he did work with them on that project. He was a pretty big deal in the world of commercial holography.

4 Likes

Friends, I have a confession to make.

I did not, in fact, find these disks in a box in my parents’ garage. This isn’t really a lost Infocom port of Cornerstone to Atari ST or Amiga.

But it is Cornerstone, running on the Atari ST and Amiga. Not the original binaries running in an emulator; not some kind of intricate, fake Cornerstone simulation.

I did it the easy way: by reverse-engineering the VM and building a new tool ecosystem from scratch.

This is Linchpin, an implementation of Cornerstone’s VM, serving the same purpose as MME.EXE in the original Cornerstone for DOS. It comes in three flavors:

  • Linchpin, written in C# for Windows/Mac/Linux. Includes a disassembler.
  • LinchpinST, a C port using m68k-*-gcc for the Atari ST and Amiga.
  • Linchpin128, another C port using llvm-mos for the Commodore 128. Requires an REU and only implements enough to run Zork.

Speaking of which, another confession: as far as I know, Infocom never made a “Zork for Cornerstone”, either.

I did that using Chisel, an assembler for Cornerstone’s VM, together with a new ZILF backend that produces Chisel assembly. It uses an approach similar to the existing “Glulx16” mode to compile unmodified ZIL code, at the cost of some performance.

Source code and VM documentation will be forthcoming over the next few days. For now, here are .NET binaries of Linchpin and Chisel, along with some example code:

linchpin+chisel-20260402.zip


26 Likes

All right!

8 Likes

Actually I toyed in past with the idea of abusing programs NOT intended for IF (ex. indeed, database programs), the general idea being along the lines of Activision’s Portal (https://www.mobygames.com/game/2164/portal/)

Luckily, Cornerstone’s documentation floats in the IF Archive:

so, an interactive “explore the database” style IF is not only feasible, (oh, what about implementing Enciclopedia Frobozzica with Cornerstone ?), but at least two Infocom-era IF is amenable to database-style follow up in the style of the above-mentioned Portal: Bureaucracy (the namesake, by definition, (mis)handles databases…) and Border Zone (espionage involves intelligence collection and handling, the ideal hacker narrative…)

so, why not abuse Cornerstone ? :wink:

Best regards from Italy,
dott. Piergiorgio.

2 Likes

The source code is now up on GitHub:

6 Likes

Here’s a tidbit. I dug through my backlog of Infocom data, trying to find anything more about Cornerstone. All I could find was this quote:

Currently, we have three types of interpreters: ZIP (for Zork Interpretive Program) which runs the games, MME (for Mu Machine Emulator) which runs Cornerstone, and DIP (for Display Interpretive Program) which runs Fooblitzky.

I think the term “Mu Machine” has gone unnoticed until now. (“DIP” is mentioned here.)

5 Likes

Huh. It rings a bell, but I don’t remember where I’ve seen it before.

I was thinking Muddle Machine, since the VM seems designed to run MDL - it has a sentinel “false” value, and a version of setjmp/longjmp that lines up perfectly with PROG/AGAIN/RETURN.

One fun thing about the μ-Machine is its ability to carry megabytes of data, paving the way for abuses like this:

One thing it lacks, however, is sub-second timing. This demo runs fast enough to do 20 fps, but the animation is meant for 15 fps, so hitting that target takes some fancy delay looping.

6 Likes

The Linchpin distro says “Cornerstone must be installed here” (in the Cornerstone directory), but it doesn’t include Cornerstone, so I went looking.

Then I went looking for software that reads PC floppy disk images, because man, people package that stuff in formats I’ve never heard of.

Anyway, long story short, I have located two versions of Cornerstone.

  • 5.1 from the Internet Archive.
  • 5.20 from a shady abandonware site that you can probably find but I won’t link to it.

I have added these to my Infocom catalog site:

https://eblong.com/infocom/#cornerstone

I never intended to collect Cornerstone files, only games. But now people will go looking, and my page is an obvious place to look. So I might as well. I’m already ignoring Infocom Microsoft copyrights, right?

Are those the same versions that everybody else has? This is the first time I’ve tried to find Cornerstone.

4 Likes

To run Cornerstone with Linchpin:

  • Compile Linchpin (either the POSIX or .NET version)
  • Unzip either version of Cornerstone
  • Copy the two files Cornerstone/CORNER.MME and Cornerstone/CORNER.OBJ to the Cornerstone directory in Linchpin;
  • Create a Sample directory in Linchpin, and copy all files from Sample to it.

Then, to run it:

# For the .NET interpreter:
./src/Linchpin/bin/Debug/net10.0/Linchpin run --mme Cornerstone/CORNER.MME

# For the native interpreter:
./src/LinchpinST/bin/linchpin_st run Cornerstone/CORNER.MME
5 Likes