Skip to content

Request: Compile to strict TRS-80 compatibility #40

@jpcompton

Description

@jpcompton

auraes has put some time into trying to get Ghost King running on the original Scott Adams interpreter (v8.5) for TRS-80 and has highlighted some areas where SK's output is not compliant. Perhaps there can be a command-line switch to tell SK to prepare object code that is strictly compliant?

A lot of the information comes from Bruce Hansen's Advedit for TRS-80, and the documentation helps explain some of the missing pieces (this issue will probably need to be a work-in-progress):

  1. Header should begin with "the number of bytes required to hold all of the text descriptions such as verbs, nouns, messages, room descriptions and object descriptions." (Advedit docs p5-6.) You can see this figure at the top of most SA games. SK's decompiler seems to treat this as "unknown1", but I would say it is now known. (On the other hand it looks like Howarth's interpreter just takes the zero that I think SK is putting in this position, his games tend to start with 0.)

  2. occur and action must not be intermingled, all non-0% occurs must appear before all actions. It looks like SK already pre-sorts rooms and items per the SA spec, but then just lets the chips fall where we left them when it comes to blending occur and action. You can see in a decompiled SA game that they do rigidly follow the room-item-nonzero occur-action flow.

  3. Checksum! Unknown2 can now be known. See page 17 of the Advedit docs: "the security checksum is 2 * #actions + #objects + version" and the SA interpreter demands this number be correct. (SK seems to just output a 0?)

bonus - (And this isn't a bug but a documentation note: SA interpreter displays a game's version number 123 as "1.23", which may help explain the very high version number mentioned in the SK docs! GK's version 7 is shown on-screen as 0.07, for example.)

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