Austin - a Level 9 a-code interpreter written in Swift for MacOS

I just got basic functionality working on a new interpreter. Working title is Austin in tribute to the brothers that created this platform and the games. For the moment it only works with Colossal Adventure. But I’ll hopefully add the other games too.
I’m not sure whether it’ll progress to a released interpreter. At the moment it’s one of the tools I’ve been using to understand the a-code format, given that there isn’t a full written spec as yet. I’m creating an a-code disassembler too in parallel. Switching between the two to establish how acode works. I’m going to help update the in-progress spec as I become confident and work out what’s changed between versions.

12 Likes

Well I can say for sure that my interpreter works 100% for v1 of the Level 9 format.

To do this, I set up a script system and put a walkthrough from the internet in it. Unfortunately the random elements in Colossal Adventure get in the way of doing just this. So I also implemented some cheats - basically I’m generating the random numbers, so I can fix what they are.

I finally got to see what the master game is like. It was far too hard to ever do it manually back in the 80s.

2 Likes

You might want to see if you can adjust your interpreter to handle the test scripts from the Level9 interpreter (at Level9/Data/L9TestSuite/scripts at master · DavidKinder/Level9 · GitHub). These fix the seed on the random number generator to make the tests reproducible.

1 Like

That’s great David! I’ll do that. Presumably your seed relies on implementing the exact same random number generator as Level 9 did. On mine it relies on the OS supplied RNG. I guess I could reproduce their algorithm too.

It’s been so long now that I can’t remember if the Level9 code uses the same algorithm for random numbers as an actual Level 9 interpreter, or just uses a simple algorithm that Glen wrote. Anyway, for testing I always try to avoid relying on a random number generator provided by the compiler or OS, there’s always too much variability. And for something like this, it doesn’t matter if you use a simple algorithm that doesn’t provide much in the way of mathematically acceptable randomness.

1 Like

My current solution. :rofl:

(location is the aCode address of the FUNCTION RANDOM instruction, not a room in the cave.)
Screenshot 2022-05-25 at 07.11.22

Here’s my work in progress. It’s looking a bit prettier on the text side. With a Infocom style short room description at the top. But the main work in progress at the moment is an attempt at automapping. This needs lot more work, but not too bad for the moment. The Colossal Adventure topology is complex, so very hard to represent on a 2D map in a reasonable way.

For now it draws just the two-way paths. Where that means going south from one room to another has a return trip going north. However all the compass direction exits are drawn in green. Or in red for an exit that brings you back to the same room.

It just draws one level on a map. Going up/down in/out etc goes to another map.

I’d be interested in seeing any other attempts at automapping. I’ve seen the Infocom Automap extension, and Parchmap. Anything else I should be looking at?

1 Like