Community

AGI Programming => AGI Development Tools => Topic started by: ZvikaZ on February 02, 2021, 04:13:26 AM

Title: Original AGI code?
Post by: ZvikaZ on February 02, 2021, 04:13:26 AM
@AGKorson,
You've mentioned in another thread the original Sierra AGI syntax.
How do we know what was the original Sierra syntax?
Is there original code, or maybe snippets, available?
Or some original docs?
Or something else?
Title: Re: Original AGI code?
Post by: lskovlun on February 02, 2021, 04:29:28 AM
First, there were snippets in books (even one that the author claimed to be SCI, which was really AGI).
Then, there was LSL1 on GitHub: https://github.com/historicalsource/leisuresuitlarry
Title: Re: Original AGI code?
Post by: AGKorson on February 02, 2021, 10:57:10 AM
I have also partially disassembled Sierra's original Logic compiler (cg.exe), which has helped me validate their syntax.
Title: Re: Original AGI code?
Post by: ZvikaZ on February 02, 2021, 01:21:55 PM
That's cool!
And very interesting.

Do we know how that LSL1 code got to GitHub?
Maybe there are more treasures, from where that came from...

You've reminded me that there was an AGI snippet in Ken Williams' recent book (I've just verified, it's at page 162).
Do you remember what other books have code snippets?
Title: Re: Original AGI code?
Post by: OmerMor on February 02, 2021, 02:49:39 PM
You also have these 2 original documents (which I leaked, and Kawa hosts):

As for AGI source:
I've got the source for the following AGI games:

Unfortunately I cannot share it.
If you're interested in a specific piece of code, I guess I can put it up here.
Title: Re: Original AGI code?
Post by: Kawa on February 02, 2021, 04:01:07 PM
Fun fact about those games that were just listed: the syntax is the same throughout, but the names and arguments of the commands can be adjusted (https://github.com/historicalsource/leisuresuitlarry/blob/master/SYSDEFS.H) to the programmer's wishes. Of course, the interpreter still expects them to be a certain way but the compiler doesn't come with any knowledge of the exact AGI instruction set. As such, LSL1 uses CamelCase commands while the others use dotted.names.

...It's actually not entirely unlike how Sierra's SCI scripts define their own kernel table in source, while SCI Companion uses the precompiled kernel vocab.
Title: Re: Original AGI code?
Post by: lskovlun on February 03, 2021, 08:42:01 AM
...It's actually not entirely unlike how Sierra's SCI scripts define their own kernel table in source, while SCI Companion uses the precompiled kernel vocab.
Except the AGI one has type definitions. This would be quite hard to do rigorously for some SCI kernel calls (and yes, we did it anyway in ScummVM  ;D).