Skip to content

Bug makes the game unwinnable? #5

@ahope1

Description

@ahope1

[Update: I've just realised that this bug report is flawed. See comment below.]

I'm fairly sure there's a bug in the listing of the game as published in issue 22 of SoftSide magazine in 1980.

However, the bug doesn't seem to be present in the MESS savestate that Jimmy Maher provided on his Digital Antiquarian blog:

https://www.filfre.net/2011/06/adventureland-part-1/

I downloaded Jimmy's savestate and his "TRS-80 add-on kit" and, after a lot of fiddling about trying to get a historical version of MESS running in a Windows VM on my Mac, I was finally able to load his savestate into MESS and play his copy of the game — and, sure enough, it didn't seem to have the bug.

I've asked Jimmy where he got his particular copy of the BASIC version of Adventureland. [Update: see comment, below.]

I originally got my copy of the TRS-80 BASIC version of Adventureland from the blog of the Data Driven Gamer, who has provided the game datafile as a .wav tape-image (which takes twenty mins to load in MAME!):

http://datadrivengamer.blogspot.com/2018/11/adventureland-introduction-to-trs-80.html

I hacked the TRS-80 BASIC interpreter program in MAME so that it loaded the game datafile and printed the data items out to a virtual printer, and I was then able to compare the data items with the ones published in SoftSide: I believe that the two datasets are identical, which means that the SoftSide listing and Data Driven Gamer's copy of the game both have the bug.

The bug in question manifests when you start the game and then do this: GO EAS, GO EAS, GET AXE, GO EAS, BUNYON. At that point, in Jimmy Maher's copy of the game, both the AXE and the OX statue (a treasure) are magically transported to the grove. But in the SoftSide/DataDrivenGamer copy, the OX remains stuck in the bog, and I don't think there's any way to get it out! [Update: Actually there is a workaround, but the more obvious way to get the OX out of the bog (probably the way Scott Adams intended) is to use the magic word BUNYON — but the bug prevents that.]

I've wrestled my copy of the TRS-80 data into a format that can be "decompiled" with the ScottKit utility, and I think that that's helped me to identify the bug in the data values. In fact, ScottKit will complain if you don't use the "-b" (ignore bugs) flag because the game is trying to move an object (the wrong object!) to a non-existent room (room 47)! If you compare the decompiled SoftSide code with a decompilation of a widely available later version of Adventureland, the error becomes obvious.

Here's the erroneous sequence of eight data values. My suggested correction is in square brackets:

DATA Meaning
100 Always trigger this action (i.e. with 100% probability)
148 Is flag 7 set?
140 Parameter: 7
940 Parameter: 47
500 Parameter: 25
0 Parameter: 0
10262 Clear flag 0. Move 7 to 47. [Change 10262 to 9062.]
9900 Inventory

What the erroneous action above does is clear flag zero; move object 7 (the MUD) to room 47 (non-existent!); and ignore the parameter 25.

But if you replace "10262" with "9062", thereby changing the first command-code (which is embedded in the value 10262) from 68 ("clear flag zero") to 60 ("clear the flag indicated by the relevant parameter", which in this case is 7), then the correct behaviour is implemented: flag 7 is cleared, and object 47 (the OX statue) is moved to room 25 (the grove) — and now none of the non-zero parameters are ignored.

See comment, below, for implementation of fix.

[Update: I've just realised that this bug report is flawed. See comment below.]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions