A detailed specification of ScottAdams story files

I have created a detailed specification of the story files used by the original adventures by Scott Adams (and others), one which I hope would be useful to anybody wanting to write an interpreter for these games from scratch (as I did).

The document is here: https://andwj.gitlab.io/scott_specs

There is a PDF version in addition to the HTML pages.

I would like to get feedback on what could be improved, fix any mistakes or unclear aspects, add anything which is missing, etc…

I think these people might be interested: @Angstsmurf @ahope1 @auraes

Thanks to @pdxiv and @heasm66 for proof reading and providing lots of useful feedback.

12 Likes

Great work!

This is not meant as criticism, but although you mention the TI99/4A format, I think it might be worth pointing out that there are also plenty of UK cassette releases that use a slightly different binary format (created by Brian Howarth for his Mysterious Adventures, I think.)

By the way, Questprobe featuring The Hulk uses opcode 90 to draw fullscreen images.

EDIT: It might also be noted that the US releases for Apple II, Atari and Commodore 64 used their own binary format, usually credited to Mak Jukovic Jukić. This is closer to the original ASCII format than Brian Howarth’s, though.

EDIT 2: I would perhaps add to section 12.8, The Lamp Timer, that some games (at least the Mysterious Adventures) do not, in fact, replace the lamp item with its turned-off version, so if the interpreter does not handle this, the result will be a second lamp appearing while the player is still holding the lit lamp.

4 Likes

You probably mean Mak Jukić. He definitely wrote the drivers for the Apple II and C64 platforms, as well as the BBC Micro in the UK. I’m unsure about the 8-bit Ataris, but he’s at least credited in the Questprobe series, so probably that too.

Credits are not too reliable, though, especially where famous authors were involved; today we know that Scott Adams did not write either Pyramid of Doom or Golden Voyage, even if credited with these. Their authors were Alvin Files and William Demas respectively, who independently had reverse-engineered the game format and were cheeky enough to build their own games based on it and submit them to Adventure International for publication. Or Brian Howarth, who was credited with Seas of Blood but did not even go near it (it was Mike Woodroffe instead).

3 Likes

Thanks! I was copying from the readme of beeb2sf.zip, but I definitely should have googled the name. If you are reading this, Mak, sorry for mangling your name!

1 Like

Excellent!

One comment: it would be useful if, in the Messages section, you specified when a game should produce each of the built-in messages.

1 Like

if you have ti99 format questions i might be able to help. been a while since i worked on bunyon + scottcom compiler but i have notes and stuff laying around.i dont remember if i added it to the github repo or not.

2 Likes

I’m interested. A detailed spec would be invaluable, as it’s all binary.

Thanks, I did some work to reverse engineer the TI99 format (starting from a description of the header made by @pxdiv, and without looking at the Bunyon code) but my decompiler doesn’t handle certain things in actions.

So yeah, I would like to create an addendum spec for the TI99 games. I’m tending to think it should be semi-separate from this spec, but they share a lot of behavior so I’m not completely sure…

Do you mind if I come back to this later? I am currently working on some other things and I’m not very good at working on too many things at once.

The current ScottFree code used by Gargoyle also handles the TI-99/4A format, mostly by adapting the Bunyon code.

https://github.com/garglk/garglk/tree/master/terps/scott/ti994a

I have bunyon + scottcom up on my github.

GitHub - stu/scottcom: ScottCom - TI99 Scott Adams game compiler and GitHub - stu/bunyon: Bunyon, interpreter for TI99 format Scott Adams / TexComp games.

i think there are fixes in there that never made it to the ifarchive back in the day, but dont really remember what I changed, its been so long. bunyon builds against garglk as well.

there is one or two quirks about the ti99 format i didnt work out I think, maybe an opcode or two still. I didnt know they shoehorned the bunyon code into scottfree. seems weird as the ti99 format is far more expressive format than the old text one. but if it works, its fine.

The differences are pretty much a) the order of the opcodes, e.g. the “swap item locations” opcode is 0x48 in the original SACA format, 0xec in the TI-99/4A format, and so on, b) condition-action lines can be longer than in SACA, and c) the TRY command, which defines a code block of several lines which will be skipped if a condition fails, much like brackets after an if statement in C.

The current TI-99/4A code in ScottFree is tested with all of the original Scott Adams adventures available in the format, which should be completable, I’ve also checked that all the home-brew games I have been able to find at least start.