Author Topic: "Sierra Gets Creative" by Jimmy Maher  (Read 37728 times)

0 Members and 1 Guest are viewing this topic.

Offline lance.ewing

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #30 on: October 15, 2016, 05:53:27 PM »
I've currently got the Apple II King's Quest disks open in a hex editor and there seems to have been no attempt to hide anything in this case. Despite the fact that the Apple II version was apparently written/ported by Jeff Stephenson, not even the text has been XORed with Avis Durgan.
« Last Edit: October 15, 2016, 05:59:16 PM by lance.ewing »

Offline NewRisingSun

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #31 on: October 15, 2016, 06:00:45 PM »
There's no "Avis Durgan" in the 128K version of KQ1. All text is in the clear on the disk. I have also never seen "Avis Durgan" being used in a copy-protection scheme. Sierra did use encryption as part of three of its copy protection schemes on the PC, but I have never seen "Avis Durgan" as a decryption key for code. So I would dispute that (unsourced) claim from Wikipedia.

There are five different on-disk copy protection schemes on Sierra's PC releases:
  • Sector sizes of 1024 bytes (standard is 512), used on Adventure in Serenia and the IBM release of King's Quest (128K). Apparently, IBM's duplication equipment could not handle the more advanced protection schemes.
  • "ON-LINE PROT01", used on Ulysses and the Golden Fleece, Frogger and Crossfire (PC version)
  • Unnamed protection type, basically a variation of "ON-LINE PROT01", used on the Radio Shack releases of B.C.'s Quest for Tires and King's Quest (128K) as well as the "PCjr" disk of Sierra On-Line's release of King's Quest (128K)
  • Formaster Copylock, used on Ultima II (1983 and 1984 releases), Troll's Tale, the Sierra release of B.C.'s Quest for Tires, Mr. Cool, Crossfire (PCjr floppy version), The Wizard and the Princess (PCjr version), King's Quest (128K Sierra On-Line release's "PC disk"), Sierra Championship Boxing (1984 version), Oil's Well (1984 version)
  • Softguard SuperLoK, used on Ultima II (1985 version), Space Quest, Space Quest II, King's Quest (256K version), King's Quest II, King's Quest III, The Black Cauldron (all versions excluding 2.10), Leisure Suit Larry in the Land of the Lounge Lizards, Thexder, Sierra Championship Boxing (1985 version), Donald Duck's Playground, Mickey's Space Adventure (720K disk only), Winnie the Pooh in the Hundred Acre Wood
Only the code of methods 1., 2. and 5. involves any encryption, and all use more complex keys and schemes than "Avis Durgan". The string does appear in the code of the two Hi-Res Adventures for the PC, but not as part of any copy-protection code.

Online Collector

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #32 on: October 15, 2016, 09:13:42 PM »
Found this on Ken Williams' site:

Quote
I don't recall AGI being developed as part of the Kings Quest 1 IBM project, but suspect you are right. We wanted to take a major jump forward, and the language we were using for the adventure games was too confining. It had almost no "procedural code" capability. AGI added variables, looping, branching and animation, and the simulated 3-D effect. My recollection is that most of the code was written by Jeff Stephenson. I don't think any of the code in AGI is mine. I was involved, but more on the design than the coding side.

-Ken W

http://www.sierragamers.com/Forum/bbs/Topic.7567.530202
KQII Remake Pic

Offline lance.ewing

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #33 on: October 18, 2016, 12:52:38 PM »
It was certainly a long time ago for these guys, about 33 years ago in the case of the original KQ1. They struggle to remember it now. When I think about 1983, I certainly can't remember anything, but I was only 8.

I'm certainly interested in exporing the possibility that the original KQ1 wasn't really AGI as such. If Ken can't remember it, then there is the possibility that it wasn't developed for KQ1.

I'm continuing my investigations in to the Apple II versions of KQ1 and KQ2, and from only having had a fairly quick skim over the disk sectors of both games, I can tell you that the data in KQ2 looks like an AGI game, e.g. I can recognise the structure of the LOGIC format, which is probably the key one. I'm going to continue that investigation to hopefully confirm the format of the other resources, e.g. I might see if I can rip out a PICTURE and load it in to PICEDIT.  :)   But we're not really expecting KQ2 to be anything other than an AGI game I guess, in fact it clearly says on the title screen of the Apple II version "Adventure Game Interpreter v1.10".

Interesting. Just spotted the text "Avis Durgan" in one of the disk sectors of KQ1. Well I guess something must be encoded with Avis Durgan, but it isn't the room messages, object list, or word list. I can see all of those in plain text. What I don't recognise is anything other than that plain text. Yes, I can see the plain text room messages for the LOGIC resources, and in most cases the text exactly matches the AGI DOS version of KQ1, and they're even in the same order a lot of the time. But the LOGIC format itself looks quite different. I'm going to spend some time over the next couple of weeks trying to work it out. - The thought just occurred to be that perhaps it's the core data of the resources that is encoded. My eyes are wandering back up to the earlier post where something like this was suggested. If not that, then maybe the interpreter code. Something is encoded with Avis Durgan, otherwise why is it there.

Eventually I'll get on to disassembling the 6502 code for each game. Will need to learn a bit about the Apple II architecture in the process though. Seems like it was quite powerful for the day. Steve Wozniak was amazing really. I know 6502 quite well, but nothing else at all about the Apple II hardware.

Offline lskovlun

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #34 on: October 18, 2016, 01:45:47 PM »
Code: [Select]
caller:
    (... caller doing something)
    PUSH BP
    MOV BP, SP
    MOV AX, 5678
    PUSH AX
    MOV AX, 1234
    PUSH AX
    CALL someProc
    MOV SP, BP
    POP BP
    (... caller doing something else)
someProc:
    MOV AX, [BP-2]
    MOV DX, [BP-4]
    (... someProc doing something with the args)
    RET
What that looks like to me, is a routine coded in assembly being wrapped to make it callable from a HLL. There are a few examples of it in SCI as well.

Offline OmerMor

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #35 on: October 19, 2016, 09:27:21 AM »
Regarding the whole AGI/AGDS/GAL/KQ1 history reconstruction:

In 2005, someone added the following paragraph to the AGI wikipedia article:
The original King's Quest engine and language (named Game Assembly Language or *.gal by its designer, Arthur Abraham) was developed by Sierra to to showcase the technology of the PCjr.
AGI, originally developed by IBM, was donated to Sierra when it was unable to finish the project due to the dismissal of its main designer.

Interesting...

So who was this Arthur Abraham?

Mobygames has a rather empty developer page for him, and he's only credited in Apple II and Mac versions, under "Original Version":



I found other variations of this story:
The first King's Quest game originally used a language named Game Assembly Language, or *.gal, by its designer, Arthur Abraham, but when he left, Sierra was unable to complete the game. Since King's Quest was intended to showcase the technology of the IBM PCjr, IBM "donated" its product, AGI, to Sierra to allow development of King's Quest to continue

In 1983, IBM commissioned Sierra On-Line to develop a game that would showcase the technical capabilities of the IBM PCjr, a home computer which IBM planned to release the following year. To meet the challenge, game designer Roberta Williams scripted a game that was to become King's Quest: Quest for the Crown, and lead developer Arthur Abraham developed a custom programming language called Game Assembly Language. After Sierra dismissed Abraham, IBM contributed to the development of King's Quest's game engine in order to help ensure the project's success.

I also found the following tweet from Laine Nooney (who's researching Sierra's history):
Desperately trying to get to the bottom of the Arthur Abraham-*.gal-language/IBM-invented-AGI internet rumor. #sierraonline

This is Jimmy Maher's take on this GAL language:
What with Ken having a company to run, the heavy lifting of turning the proposal into a game engine largely fell to Jeff Stephenson. Just like the Hi-Res Adventure engine, this one was designed to be reusable and extendible from the start. It was initially known as the Game Adaptation Language, or GAL. Ken, however, loathed the cutsiness of that acronym, and it was eventually renamed to the Adventure Game Interpreter, or AGI.

Any ideas what we can make of this mess?

Offline lance.ewing

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #36 on: October 19, 2016, 10:15:34 AM »
Wow! Some amazing research work there Omer! As a consequence of my comment regarding Al Lowe's memory on the other thread, it is not surprising that Al can't remember GAL. He couldn't remember AGDS until shown some of the evidence. I might send him some of what you've found and see if it triggers any memories.

I was talking to Jeff Stephenson a few years back, via the scummvm forums private messaging system, but that was about SCI and the naming of that language. He said he was struggling to remember things about SCI, so I'd imagine that AGI, GAL and AGDS might be even more of a struggle. Might be worth following up on though. I'm sure he would remember something like the rumours you've mentioned above. Jeff appears to have been the primary developer of AGI for most of its life.

IBM inventing AGI would be a bomb shell if that is true. Would definitely be worthwhile tracking down Arthur Abraham to see what his account of that story is.

I found Charles Tingley on LinkedIn by the way. Looks like Jeff Stephenson and a lot of the other ex-Sierra employees are on LinkedIn as well. There is an Arthur Abraham working in IT in the San Francisco area that might be a match. Charles Tingley was obviously involved with KQ1, so he might have a story as well. And the MacNeills, if anyone has their contact details.

https://www.linkedin.com/in/chuck-tingley-7314b713  (Definitely the right Charles Tingley)
https://www.linkedin.com/in/arthur-abraham-197779b  (a possible candidate for Arthur Abraham)

Online Collector

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #37 on: October 19, 2016, 11:56:37 AM »
The MacNeills should not be that hard to contact. They still sell Gold Rush! on their site.

http://www.softwarefarm.com/

If you have trouble with that Marco Sowa from Sunlight Games was in contact with them when preparing the original Gold Rush! for re-release.
KQII Remake Pic

Offline NewRisingSun

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #38 on: October 20, 2016, 01:55:41 PM »
What is strange is that no PC version ever mentions Arthur Abraham.

Offline lance.ewing

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #39 on: October 20, 2016, 02:28:23 PM »
That is strange actually, because what I've learnt over the past day is that Arthur probably was the one that created AGI.

I put a few questions to Jeff Stephenson overnight. Jeff denies that he himself had anything to do with creating the original AGI engine (as he was working on a different project at the time), but instead confirms that it was Arthur Abraham and Charles (Chuck) Tingley. He believes that Arthur worked on the language part of the engine and Charles on the graphics part of the engine (although he implies that he can't be 100% certain of his memory). Arthur did indeed leave the project before the original version of KQ shipped, and so Charles apparently finished off the bits that needed finishing. He can't specifically remember the events around Arthur leaving but doesn't believe that it had any major impact on the KQ project (as some sites would have us believe). And he said that there were never two different systems and that King's Quest was only ever built on AGI. He doesn't rule out the possibility that it may have been known by another name early on. He doesn't specifically remember it being called GAL however,  but said that if it was called that in the early stages, then it was almost certainly another name for the same thing, i.e. AGI.  I'll post a fuller version of what I've learnt later on...

I for one place a lot of weight on the Donald Trivette article from 1985. It was published shortly after KQ1 came out and shortly before KQ2 was released. He mentions talking directly to Sierra, so they presumably told him that the name of the language was GAL. Trivette went on to write books about the King's Quest series, which often included photos of their internal editors and code snippets that Sierra had shared with him. So I believe it is very likely that it was originally called GAL; it's just that most of them can't remember it any more.
« Last Edit: October 20, 2016, 03:21:14 PM by lance.ewing »

Offline lskovlun

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #40 on: October 20, 2016, 02:38:59 PM »
That is strange actually, because what I've learnt over the past day is that Arthur probably was the one that created AGI.
I've read somewhere (Jimmy Maher's site?) that Ken Williams had a policy of only crediting people who were still employed when the project shipped/was done. Perhaps they simply managed to sneak a credit in on the less scrutinized ports.
EDIT: Less platform-centricity.
« Last Edit: October 20, 2016, 02:56:18 PM by lskovlun »

Offline NewRisingSun

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #41 on: October 20, 2016, 03:20:05 PM »
From what I can make out from KQ1's disassembly so far, is that the virtual machine has 67 opcodes, and ADD is 20 (dec), while SUB is 21 (dec).
Code: [Select]
KQ1CODE:2FCE op20_add:                               ; ...
KQ1CODE:2FCE                 mov     si, [bp+VM_PC]
KQ1CODE:2FD1                 inc     [bp+VM_PC]
KQ1CODE:2FD4                 mov     al, VM_acc
KQ1CODE:2FD7                 xor     ah, ah
KQ1CODE:2FD9                 mov     bl, [si]
KQ1CODE:2FDB                 xor     bh, bh
KQ1CODE:2FDD                 add     ax, bx
KQ1CODE:2FDF                 mov     VM_acc, al
KQ1CODE:2FE2                 jmp     getNextOpcode
KQ1CODE:2FE5 ; ---------------------------------------------------------------------------
KQ1CODE:2FE5
KQ1CODE:2FE5 op21_sub:                               ; ...
KQ1CODE:2FE5                 mov     si, [bp+VM_PC]
KQ1CODE:2FE8                 inc     [bp+VM_PC]
KQ1CODE:2FEB                 mov     al, VM_acc
KQ1CODE:2FEE                 xor     ah, ah
KQ1CODE:2FF0                 mov     bl, [si]
KQ1CODE:2FF2                 xor     bh, bh
KQ1CODE:2FF4                 sub     ax, bx
KQ1CODE:2FF6                 mov     VM_acc, al
KQ1CODE:2FF9                 jmp     getNextOpcode
Most of the other commands seem to manipulate on-screen objects. And yes, the goat is indeed object number 14 and starts in room 10: :)
Code: [Select]
KQ1DATA:16D6 ; Item: ObjNum, name, room, ?, ?, ?, ?
KQ1DATA:16D6 objInfo         SObj <0, offset sItemUnnamed, 0, 0, 0, 91h, 87h> ; ...
KQ1DATA:16DE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 41h, 53h>
KQ1DATA:16E6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Eh, 2Bh>
KQ1DATA:16EE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 78h, 9Ch>
KQ1DATA:16F6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 58h, 2Bh>
KQ1DATA:16FE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 50h, 50h>
KQ1DATA:1706                 SObj <0, offset sItemUnnamed, 0, 0, 0, 12h, 5Ch>
KQ1DATA:170E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 2Ch, 2Bh>
KQ1DATA:1716                 SObj <0, offset sItemUnnamed, 2, 0, 0, 67h, 77h>
KQ1DATA:171E                 SObj <0, offset sItemUnnamed, 3, 0, 0, 71h, 7Ch>
KQ1DATA:1726                 SObj <0, offset sItemDagger, 3, 0, 0, 0, 0>
KQ1DATA:172E                 SObj <0, offset sItemPouch, 6, 0, 0, 0, 0>
KQ1DATA:1736                 SObj <0, offset sItemDiamonds, 6, 0, 0, 0, 0>
KQ1DATA:173E                 SObj <0, offset sItemGoat, 10, 0, 0, 4Bh, 69h>
KQ1DATA:1746                 SObj <0, offset sItemUnnamed, 11, 0, 0, 11h, 98h>
KQ1DATA:174E                 SObj <0, offset sItemBucket, 12, 0, 0, 26h, 78h>
KQ1DATA:1756                 SObj <0, offset sItemUnnamed, 12, 0, 0, 0, 0>
KQ1DATA:175E                 SObj <0, offset sItemUnnamed, 12, 0, 0, 0, 0>
KQ1DATA:1766                 SObj <0, offset sItemCarrot, 15, 0, 0, 0, 0>
KQ1DATA:176E                 SObj <0, offset sItemUnnamed, 19, 0, 0, 64h, 5Dh>
KQ1DATA:1776                 SObj <0, offset sItemClover, 24, 0, 0, 3Dh, 7Bh>
KQ1DATA:177E                 SObj <0, offset sItemUnnamed, 25, 0, 0, 21h, 35h>
KQ1DATA:1786                 SObj <0, offset sItemUnnamed, 28, 0, 0, 2Dh, 80h>
KQ1DATA:178E                 SObj <0, offset sItemWalnut, 30, 0, 0, 0, 0>
KQ1DATA:1796                 SObj <0, offset sItemBowl, 31, 0, 0, 7Eh, 8Ah>
KQ1DATA:179E                 SObj <0, offset sItemPebbles, 34, 0, 0, 50h, 68h>
KQ1DATA:17A6                 SObj <0, offset sItemUnnamed, 40, 0, 0, 1Eh, 6Ch>
KQ1DATA:17AE                 SObj <0, offset sItemGoldKey, 40, 0, 0, 1Eh, 6Ch>
KQ1DATA:17B6                 SObj <0, offset sItemBeans, 40, 0, 0, 1Eh, 6Ch>
KQ1DATA:17BE                 SObj <0, offset sItemUnnamed, 47, 0, 0, 54h, 50h>
KQ1DATA:17C6                 SObj <0, offset sItemUnnamed, 51, 0, 0, 2Ch, 98h>
KQ1DATA:17CE                 SObj <0, offset sItemUnnamed, 48, 0, 0, 7Ch, 6Eh>
KQ1DATA:17D6                 SObj <0, offset sItemUnnamed, 51, 0, 0, 28h, 78h>
KQ1DATA:17DE                 SObj <0, offset sItemMirror, 51, 0, 0, 26h, 6Ch>
KQ1DATA:17E6                 SObj <0, offset sItemUnnamed, 57, 0, 0, 3, 7Dh>
KQ1DATA:17EE                 SObj <0, offset sItemUnnamed, 65, 0, 0, 55h, 52h>
KQ1DATA:17F6                 SObj <0, offset sItemChest, 57, 0, 0, 47h, 57h>
KQ1DATA:17FE                 SObj <0, offset sItemSling, 62, 0, 0, 4Bh, 4Bh>
KQ1DATA:1806                 SObj <0, offset sItemEgg, 63, 0, 0, 47h, 50h>
KQ1DATA:180E                 SObj <0, offset sItemUnnamed, 65, 0, 0, 21h, 4Ch>
KQ1DATA:1816                 SObj <0, offset sItemCheese, 65, 0, 0, 76h, 8Ch>
KQ1DATA:181E                 SObj <0, offset sItemNote, 65, 0, 0, 76h, 8Ch>
KQ1DATA:1826                 SObj <0, offset sItemUnnamed, 0, 0, 0, 31h, 0A3h>
KQ1DATA:182E                 SObj <0, offset sItemUnnamed, 75, 0, 0, 0, 0>
KQ1DATA:1836                 SObj <0, offset sItemUnnamed, 75, 0, 0, 3Eh, 82h>
KQ1DATA:183E                 SObj <0, offset sItemUnnamed, 75, 0, 0, 19h, 76h>
KQ1DATA:1846                 SObj <0, offset sItemUnnamed, 79, 0, 0, 84h, 84h>
KQ1DATA:184E                 SObj <0, offset sItemSceptre, 77, 0, 0, 75h, 6Ah>
KQ1DATA:1856                 SObj <0, offset sItemShield, 77, 0, 0, 83h, 80h>
KQ1DATA:185E                 SObj <0, offset sItemFiddle, 79, 0, 0, 80h, 9Ah>
KQ1DATA:1866                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:186E                 SObj <0, offset sItemUnnamed, 53, 0, 0, 20h, 58h>
KQ1DATA:1876                 SObj <0, offset sItemUnnamed, 77, 0, 0, 1Eh, 58h>
KQ1DATA:187E                 SObj <0, offset sItemUnnamed, 79, 0, 0, 7Fh, 60h>
KQ1DATA:1886                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:188E                 SObj <0, offset sItemRing, 18, 0, 0, 4Bh, 4Bh>
KQ1DATA:1896                 SObj <0, offset sItemUnnamed, 79, 0, 0, 2Dh, 74h>
KQ1DATA:189E                 SObj <0, offset sItemUnnamed, 79, 0, 0, 5Ch, 73h>
KQ1DATA:18A6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:18AE                 SObj <0, offset sItemUnnamed, 51, 0, 0, 4Bh, 4Bh>
KQ1DATA:18B6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 28h, 78h>
KQ1DATA:18BE                 SObj <0, offset sItemUnnamed, 50, 0, 0, 4Bh, 4Bh>
KQ1DATA:18C6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 8Eh, 80h>
KQ1DATA:18CE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4, 45h>
KQ1DATA:18D6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 61h, 0A0h>
KQ1DATA:18DE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 55h, 52h>
KQ1DATA:18E6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:18EE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 20h, 58h>
KQ1DATA:18F6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:18FE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:1906                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:190E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:1916                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:191E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:1926                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:192E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 50h, 64h>
KQ1DATA:1936                 SObj <0, offset sItemUnnamed, 0, 0, 0, 55h, 52h>
KQ1DATA:193E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Fh, 88h>
KQ1DATA:1946                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Fh, 88h>
KQ1DATA:194E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Fh, 88h>
KQ1DATA:1956                 SObj <0, offset sItemUnnamed, 0, 0, 0, 7Fh, 60h>
KQ1DATA:195E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:1966                 SObj <0, offset sItemUnnamed, 0, 0, 0, 44h, 6Ch>
KQ1DATA:196E                 SObj <0, offset sItemMushroom, 0, 0, 0, 54h, 50h>
KQ1DATA:1976                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:197E                 SObj <0, offset sItemGoldWalnut, 30, 0, 0, 4Bh, 4Bh>
KQ1DATA:1986                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:198E                 SObj <0, offset sItemUnnamed, 65, 0, 0, 21h, 4Ch>
KQ1DATA:1996                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:199E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:19A6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:19AE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:19B6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:19BE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:19C6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:19CE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:19D6                 SObj <0, offset sItemUnnamed, 1, 0, 0, 5, 12h>
KQ1DATA:19DE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 4Bh, 4Bh>
KQ1DATA:19E6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 54h, 77h>
KQ1DATA:19EE                 SObj <0, offset wItemWater, 0, 0, 0, 54h, 5Bh>
KQ1DATA:19F6                 SObj <0, offset sItemUnnamed, 0, 0, 0, 0, 0>
KQ1DATA:19FE                 SObj <0, offset sItemUnnamed, 0, 0, 0, 0, 0>
KQ1DATA:1A06                 SObj <0, offset sItemUnnamed, 0, 0, 0, 0, 0>
KQ1DATA:1A0E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 0, 0>
KQ1DATA:1A16                 SObj <0, offset sItemUnnamed, 0, 0, 0, 0, 0>
KQ1DATA:1A1E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 0, 0>
KQ1DATA:1A26                 SObj <0, offset sItemUnnamed, 0, 0, 0, 46h, 0A5h>
KQ1DATA:1A2E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 0, 0>
KQ1DATA:1A36                 SObj <0, offset sItemUnnamed, 0, 0, 0, 0, 0>
KQ1DATA:1A3E                 SObj <0, offset sItemUnnamed, 0, 0, 0, 0, 0>
KQ1DATA:1A46                 db    0
KQ1DATA:1A47                 db 0FFh


« Last Edit: October 20, 2016, 04:34:51 PM by NewRisingSun »

Offline NewRisingSun

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #42 on: October 20, 2016, 03:54:48 PM »
Quote from: lskovlun
What that looks like to me, is a routine coded in assembly being wrapped to make it callable from a HLL.
That's what I thought too, but consider the following:
Code: [Select]
KQ1CODE:2F95 op19:                                   ; ...
KQ1CODE:2F95                 mov     si, [bp+VM_PC]
KQ1CODE:2F98                 inc     [bp+VM_PC]
KQ1CODE:2F9B                 mov     al, [si]
KQ1CODE:2F9D                 xor     ah, ah
KQ1CODE:2F9F                 push    ax
KQ1CODE:2FA0                 call    obj2ani
KQ1CODE:2FA3                 mov     sp, bp
(...)
KQ1CODE:3718 obj2ani         proc near               ; ...
KQ1CODE:3718                 push    bp              ; STACKFRAME_CREATE, 2
KQ1CODE:3719                 sub     sp, 2
KQ1CODE:371C                 mov     bp, sp
KQ1CODE:371E                 mov     cl, 3
KQ1CODE:3720                 mov     ax, [bp+6]
KQ1CODE:3723                 shl     ax, cl          ; multiply by 8, the size of an SObj struct
KQ1CODE:3725                 mov     si, ax
KQ1CODE:3727                 mov     al, byte ptr objInfo.aniNum[si]
KQ1CODE:372B                 xor     ah, ah
KQ1CODE:372D                 mov     VM_currentAniNum, al
KQ1CODE:3730                 mov     bx, size SAni
KQ1CODE:3733                 imul    bx
KQ1CODE:3735                 add     ax, offset bAnis
KQ1CODE:3738                 mov     VM_currentAniPtr, ax
KQ1CODE:373B                 add     sp, 2           ; STACKFRAME_LEAVE, 2
KQ1CODE:373E                 pop     bp
KQ1CODE:373F                 ret
KQ1CODE:373F obj2ani         endp
Why the hell does obj2ani first subtract 2 from SP if it doesn't use any local variables? Without that, it could access the argument with BP+4 instead of BP+6. The whole code is full of such red herrings.

Offline OmerMor

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #43 on: October 20, 2016, 04:14:11 PM »
That is strange actually, because what I've learnt over the past day is that Arthur probably was the one that created AGI.

I put a few questions to Jeff Stephenson overnight. Jeff denies that he himself had anything to do with creating the original AGI engine (as he was working on a different project at the time), but instead confirms that it was Arthur Abraham and Charles (Chuck) Tingley. He believes that Arthur worked on the language part of the engine and Charles on the graphics part of the engine (although he implies that he can't be 100% certain of his memory). Arthur did indeed leave the project before the original version of KQ shipped, and so Charles apparently finished off the bits that needed finishing. He can't specifically remember the events around Arthur leaving but doesn't believe that it had any major impact on the KQ project (as some sites would have us believe). And he said that there were never two different systems and that King's Quest was only ever built on AGI. He doesn't rule out the possibility that it may have been known by another name early on. He doesn't specifically remember it being called GAL however,  but said that if it was called that in the early stages, then it was almost certainly another name for the same thing, i.e. AGI.  I'll post a fuller version of what I've learnt later on...

I for one place a lot of weight on the Donald Trivette article from 1985. It was published shortly after KQ1 came out and shortly before KQ2 was released. He mentions talking directly to Sierra, so they presumably told him that the name of the language was GAL. Trivette went on to write books about the King's Quest series, which often included photos of their internal editors and code snippets that Sierra had shared with him. So I believe it is very likely that it was originally called GAL; it's just that most of them can't remember it any more.

Fascinating stuff!
This thread is getting better and better!  :D

Offline lskovlun

Re: "Sierra Gets Creative" by Jimmy Maher
« Reply #44 on: October 21, 2016, 06:03:54 AM »
Why the hell does obj2ani first subtract 2 from SP if it doesn't use any local variables? Without that, it could access the argument with BP+4 instead of BP+6. The whole code is full of such red herrings.
That's just an unused local variable. Compilers back then weren't so clever. And clock-cycle wise, only the subtraction counts, apart from that it doesn't matter. From what I've seen there is no oddness here, only a mixture of C and ASM, and the necessary machinations to support that.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.06 seconds with 22 queries.