Author Topic: Pre-AGI2 versions  (Read 2144 times)

0 Members and 1 Guest are viewing this topic.

Offline lance.ewing

Re: Pre-AGI2 versions
« Reply #15 on: October 24, 2016, 07:47:51 PM »
Ignoring the 5 byte header, the rest of the data in the four DIR "files" are of the same format as in AGIv2.

If a DIR entry points to VOL number 0, then that can be found on any one of the disks at offset 0x01A000. This means that every offset contained in a DIR entry that references VOL 0 needs to have 0x01A000 added to the offset before using the value to read the data from the disk image.

If a DIR entry points to VOL number 1, then that is on the first disk but at offset 0x012000. This means that every offset contained in a DIR entry that references VOL 1 needs to have 0x012000 added to the offset before using the value to read the data from the disk image.

If a DIR entry points to VOL 2, 3, 4, or 5, then those are on the disk image of the same number, and they all start at offset 0x000000. So nothing to add to the DIR entry offsets in this case.

Offline lance.ewing

Re: Pre-AGI2 versions
« Reply #16 on: October 26, 2016, 05:26:25 AM »
I've done something similar for the Apple II KQ2 game, but rather than rebuild a whole VOL, I instead extracted a couple of PICTURE and VIEW resources. These also loaded flawlessly in to AGI Studio.

So yes, the PICTURE resources do load in to AGI Studio flawlessly, and they have the right colours. The VIEWs do also load in without error, but I failed to notice that the colours are completely wrong. The splashing wave has the water in a green and brown colour, so the animation actually looks like the ground is exploding rather than a wave splashing. It might be that when I tried loading it in to AGI Studio, I didn't realise that it was a VIEW for a splashing wave. I probably thought it was meant to be a ground exploding animation.

I guess the VIEWs on the Apple II will be using the Apple II colour palette. Not sure why this is the case for the VIEWs when the PICTUREs are clearly using the correct colours.

Offline lance.ewing

Re: Pre-AGI2 versions
« Reply #17 on: October 26, 2016, 06:29:30 PM »
It would appear that test command 0x09 that I have identified as "said" in the Apple II KQ2 game does not have the variable number of words that the AGIv2 instruction has. It always requires two words; no more, no less. Well that's what I'm currently assuming based on the fact that the byte that specifies how many words the said has is not present in the LOGIC files.

Offline lance.ewing

Re: Pre-AGI2 versions
« Reply #18 on: October 26, 2016, 07:25:24 PM »
Actually, what appears to be going on is that they had two test commands for said, i.e. one that takes two words, and one that takes one word. The test command 0x0F is being used in a scenario where the AGiv2 version of KQ2 is using said with one word.

So this seems like a case of evolution. They originally built "said" to have two words, then somewhere along the line they must have needed to handle a single word, so they added another test command.

Then when they moved to AGIv2, they must have tidied things up a bit and consolidated the two test commands in to a single command that supports a variable number of words.

Offline Kawa

Re: Pre-AGI2 versions
« Reply #19 on: October 26, 2016, 08:10:58 PM »
Seems reasonable to me.

Offline NewRisingSun

Re: Pre-AGI2 versions
« Reply #20 on: October 27, 2016, 01:19:51 PM »
For what it's worth, GAL's said test always uses two words.

Offline lance.ewing

Re: Pre-AGI2 versions
« Reply #21 on: October 27, 2016, 04:39:37 PM »
I guess that adds more weight to the three step evolution. GAL supported only two words, AGI v1 having two said commands, and AGI v2 having a single variable word count said command.

Offline lance.ewing

Re: Pre-AGI2 versions
« Reply #22 on: October 27, 2016, 04:43:46 PM »
I'm beginning to doubt that AGI v1 (or at least the version used by the Apple II KQ2 game) supported the "call" command. In every example so far where I've compared a LOGIC script between the Apple II KQ2 and the PC AGI v2 KQ2, when the later has "call" commands, the former is lacking those call commands. The Apple II KQ2 does have the same load.logic calls (or at least I think that's what they are), but it is missing the calls to those logics. So there must be some sort of automatic calling of the logics taking place. Perhaps it calls the logics when they're loaded, or maybe it calls any loaded logics at the end of the current script. Don't know yet.

Offline lance.ewing

Re: Pre-AGI2 versions
« Reply #23 on: October 27, 2016, 06:16:28 PM »
Not 100% certain about this yet, but there is a possibility that AGI v1 had a third "said" test command, that supported three words.

Offline lance.ewing

Re: Pre-AGI2 versions
« Reply #24 on: October 27, 2016, 07:59:33 PM »
I'm also starting to realise that there is no "has" test command. Instead it appears to be using flags to keep track of whether an item is in the inventory or not.

Offline Kawa

Re: Pre-AGI2 versions
« Reply #25 on: October 27, 2016, 08:09:49 PM »
Now that deserves a "wow".

Wow.

Offline NewRisingSun

Re: Pre-AGI2 versions
« Reply #26 on: October 28, 2016, 01:39:13 AM »
Sierra's original CG does not seem to have action and test commands hard-coded into the compiler. Instead, they are defined in a text file called SYSDEFS, which looks like this:
Code: [Select]
%action increment(VAR) 1
%action decrement(VAR) 2
%action assignn(VAR, NUM) 3
%action assignv(VAR, VAR) 4
And how does one April 1987 time-stamped game source define "said" in that definition file??
Code: [Select]
%test said(WORDLIST) 14
%define said1 said
%define said3 said
Heh.
Quote from: lance.ewing
I'm also starting to realise that there is no "has" test command. Instead it appears to be using flags to keep track of whether an item is in the inventory or not.
GAL has a "get" action but apparently no "has" action either.
« Last Edit: October 28, 2016, 01:53:40 AM by NewRisingSun »

Offline lance.ewing

Re: Pre-AGI2 versions
« Reply #27 on: October 28, 2016, 05:20:05 AM »
And how does one April 1987 time-stamped game source define "said" in that definition file??
Code: [Select]
%test said(WORDLIST) 14
%define said1 said
%define said3 said

Well I guess that would seem to confirm it. It seems to suggest that they used three different names within their source code though (i.e. pre-AGIv2 source code). So I'd expect the original source for KQ2 to have something like:

Code: [Select]
if (said1("look")) {
}

...otherwise why would you need such a define? It suggests that at one point in time, they were compiling pre-AGIv2 scripts with an AGI v2 compiler, perhaps when converting a game released originally for AGIv1 to the AGIv2 version.

Quote from: lance.ewing
I'm also starting to realise that there is no "has" test command. Instead it appears to be using flags to keep track of whether an item is in the inventory or not.
GAL has a "get" action but apparently no "has" action either.

I'm planning to investigate this further today by finding more examples in KQ2 where "has" has not been used in places where it is used in the AGI v2 version.

Offline lskovlun

Re: Pre-AGI2 versions
« Reply #28 on: October 28, 2016, 06:27:51 AM »
GAL has a "get" action but apparently no "has" action either.
But "has" would  be a test, not an action right?

Offline NewRisingSun

Re: Pre-AGI2 versions
« Reply #29 on: October 28, 2016, 11:30:00 AM »
It would. But the only tests that GAL knows are equal, not equal, posn, and said with two words.


SMF 2.0.11 | SMF © 2015, Simple Machines
Simple Audio Video Embedder

Page created in 0.115 seconds with 21 queries.