Author Topic: Sierra's Debug/Testing Version of AGI  (Read 1611 times)

0 Members and 1 Guest are viewing this topic.

Offline AGKorson

Sierra's Debug/Testing Version of AGI
« on: February 03, 2023, 03:16:24 PM »
I was looking at the source code for some of the AGI games found in the repository that EricOakford posted in this post.

The source for Black Cauldron includes a set of interpreter files (agi.exe, agidata.ovl, etc). The version for this set of files is 3.002.097, which is not one that I have ever seen before. So I disassembled it to see how it might differ from other versions. There is a publicly released version 3.002.098, so I expected it to be very similar to that.

It is not.

Instead, this appears to be a special version, presumably used by Sierra developers and testers during game development. It does not use VOL files or DIR files. Instead, it looks for a file named 'WHERE' in the game directory that has four directories which point to where individual resources are stored. The first points to compiled logics (which need to be in the form of 'RM.0, RM.1, etc.), the second points to picture resources (PIC.1, PIC.2, etc.), the third to view resources (VIEW.0, VIEW.1, etc.) and the fourth to sounds (SND.0, SND.1, etc.)

I imagine it was a lot easier to do testing with this interpreter, because you didn't have to rebuild the VOL and DIR files every time you made a change to a resource. You would only do that for the final release.

The source also includes volume definition files (BCVOL0.DRV, BCVOL1.DRV, etc) that I am guessing were used by their in-house tools to actually build the VOL and DIR files. Each definition file is a text file that lists the resources that would be included in each VOL file (same format for resources, RM.0, PIC.1, VIEW.2, SND.3, etc).

I'm still looking at the disassembled code to see if there are any other testing/debug features in this version that don't exist in the publicly released versions.




Offline lskovlun

Re: Sierra's Debug/Testing Version of AGI
« Reply #1 on: February 04, 2023, 05:15:37 AM »
Yeah, SCI has something similar. The release SCI0 interpreter is called SCIV.EXE (V for volumes). There are executables called SCI.EXE in that archive; they differ from the release interpreters in the same way. It seems the build processes usually generated one volume interpreter and one non-volume interpreter in one go, so in your example .097 and .098. Again SCI examples are similar.

Offline Collector

Re: Sierra's Debug/Testing Version of AGI
« Reply #2 on: February 04, 2023, 11:25:27 AM »
Yeah, SCI has something similar. The release SCI0 interpreter is called SCIV.EXE (V for volumes).

On a side note, I used to have a list of what the various interpreter naming conventions meant, but I cannot find it. What ones are you aware of?
KQII Remake Pic

Offline r1sc

Re: Sierra's Debug/Testing Version of AGI
« Reply #3 on: March 06, 2024, 02:55:29 PM »
Sorry for resurrecting an old thread, but I think the reason for the IO handling being different in this case is that they used a "debug"-build of the AGI interpreter.
If you look in the interpreter source code snippets found on various disks, you'll find the defined symbol "PRODUCTION". Open SEGPTR.C and you'll find a snippet like

Code: [Select]
#if PRODUCTION
/***************   Production i/o (using volumes)   ***********************/

void NotFound();


TEXT logDirName[] = "logdir";
TEXT viewDirName[] = "viewdir";
TEXT picDirName[] = "picdir";
TEXT sndDirName[] = "snddir";

....

#else

...
GetDirs()
{
STRPTR dp;
FILE_HANDLE fd;
COUNT len;

SetMark();
dp = GetMem(1000);
if ((fd = open("where", 0)) == NO_HANDLE) {
WindowPrint("No 'where' file.\nPress ESC to quit.");
Quit();
}
len = read(fd, dp, 1000);
*(dp+len) = 0;
close(fd);

GetStr(logDir, &dp);
GetStr(picDir, &dp);
GetStr(viewDir, &dp);
GetStr(sndDir, &dp);

GetStr(wordPath, &dp);
strcpy(objPath, wordPath);
strcat(wordPath, "words.tok");
strcat(objPath, "object");

wordFileName = wordPath;
objectFileName = objPath;

FreeMark();
}

That's probably all there is to it!

Offline MusicallyInspired

Re: Sierra's Debug/Testing Version of AGI
« Reply #4 on: March 06, 2024, 09:17:06 PM »
Yeah, SCI has something similar. The release SCI0 interpreter is called SCIV.EXE (V for volumes).

On a side note, I used to have a list of what the various interpreter naming conventions meant, but I cannot find it. What ones are you aware of?

This is what NewRisingSun posted on VOGONS somewhere. I found it a couple months ago and saved it.

Quote
Command-line parameters for 16-bit interpreters: (case-sensitive):

    -a: Do not use "extra memory" even if it was selected via the INSTALL program (i.e. ignore the "memoryDrv=ARM.DRV" setting in RESOURCE.CFG).
    -c [n]: Indicate the change of disks (i.e. changing from RESOURCE.00x to RESOURCE.00y) and the access of "extra memory" by changing the shape and/or position of the mouse cursor. "n" is a decimal representation of a bitfield. The bit values have the following meaning: 1: change cursor shape upon disk change, 2: change cursor position upon disk change, 4: change cursor shape upon "extra memory" access, 8: change cursor shape upon "extra memory" access. If "n" was not specified, value 5 is assumed (change shape but not position on both events).
    -m: The function of the middle mouse button changes from "switch between walk and selected icon" to "open debugger" (same as Shift-Shift-NumMinus)
    -u [filename]: Log use of game resources to filename, default is "resource.use"
    -U [filename]: Log use of far-pointer memory to filename, default is "hunk.use". ("Hunk" is what Sierra calls memory accessed via a far pointer, while "heap" is how Sierra calls memory accessed via a near pointer.)
    -w top left bottom right: Set the dimensions of the game screen. Default is 10 0 200 320, meaning that ten lines at the top are left blank for a status/icon/menu bar. Some games which do not use such must be run with -w 0 0 200 320, otherwise the picture will be drawn ten pixels too low.
    -X Store each handle to a game resource twice in memory so it is noticed when buggy script code overwrites the handle table. (Apparently, that was a problem?)

I have not followed which option was introduced with which interpreter version. The debug-related options will only work as intended, if at all, if the interpreter executable has the debugger included.

Not asked but since I am writing: the meaning of the letters of the interpreter name SCIxxx.EXE:

    V present: Load game data from RESOURCE.0xx/RESOURCE.MAP files, using individual files only as replacements, and use RESOURCE.CFG as a config file.
    V absent: Load game data from individual files only, and use a file named "WHERE" as a config file which, in addition to the usual hardware-config lines, must contain paths for each resource type.
    D present: Pull-down menus not available.
    D absent: Pull-down menus available.
    U present: Debugger not available.
    U absent: Debugger available (Shift-Shift-NumMinus to activate)
    H present: 256 colors
    H absent: 16 colors

SCIV.EXE therefore means 16 colors, with debugger, with pull-down menus, using RESOURCE.00x files. Interestingly, there never seems to have been a letter to indicate the presence or absence of a parser. Obviously, non-V versions were only used internally. Many games rename the interpreter executable to just SIERRA.EXE.
Brass Lantern Prop Competition


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

Page created in 0.036 seconds with 22 queries.