Level9.Net Help

Level 9 Interpreter v5.1

An interpreter for Level 9 games in any format, including Spectrum snapshots.

Copyright (c) 1996-2011 Glen Summers and contributors.
Contributions from David Kinder, Alan Staniforth, Simon Baldwin, Dieter Baron and Andreas Scherrer.

Level 9 is released under the terms of the GNU General Public License. See the file COPYING that is included with this program for details.

Level9.Net 0.9.6

A port of the Level 9 interpreter to Microsoft's .NET framework.

Copyright (c) 2004 - 2011 Andreas Scherrer

Features

Level9.Net is released under the terms of the GNU General Public License. See the file COPYING that is included with this program for details.

Table of Contents

Introduction

During the 1980s a small British company called Level 9, run by two brothers (Mike and Pete Austin), produced a series of text adventure games for a variety of computers. These games received considerable critical acclaim and are probably the best text adventures written for the small cassette based 8 bit computers common in Britain in the 80s.

Level 9 wrote their games using a custom designed system known as "A-Code", which evolved from games on the 8 bit computers such as the Acorn BBC Model B, the Sinclair Spectrum and the Commodore 64 to the (then new) 16 bit machines such as the Amiga and the Atari ST.

From disassembly of Level 9 games there are thought to be four variants of A-Code, which are detailed below, and all of which are supported by this interpreter. Thanks go to Paul David Doherty for analysing the games and producing the table which follows.

v1

This was used for the earliest games. Spectrum v1 games had black text on a grey background. Games known to be released in this format:

Colossal Adventure
Adventure Quest
Dungeon Adventure
Snowball
Lords of Time

v2

These releases were made between 1984 and 1985 (and usually say so in the initial copyright message). This version introduced the yellow text on a black background which became standard. Games in this format were:

Adventure Quest
Dungeon Adventure
Lords of Time
Snowball
Return to Eden
Erik the Viking
Emerald Isle
Red Moon

v3

This format, dated 1986, was used by the largest number of releases. These were:

Worm in Paradise
The Price of Magick
The Secret Diary of Adrian Mole
The Growing Pains of Adrian Mole
The Archers
The Jewels of Darkness Trilogy (Colossal Adventure, Adventure Quest and Dungeon Adventure released as one package)
The Silicon Dreams Trilogy (Snowball, Return to Eden and Worm in Paradise)

v4

This was used for the Time and Magick Trilogy (Lords of Time, Red Moon and The Price of Magick), and all Level 9's new games from 1987 onwards:

Knight Orc
Gnome Ranger
Ingrid's Back
Lancelot
Scapeghost

Supported Formats

On several machines (such as the Amiga) Level 9 games were distributed as an interpreter plus a data file, usually called "gamedata.dat" or something similar. These games can be played with this interpreter simply by loading the "gamedata.dat" file. For the Amiga (and some other formats) the v4 games were released in three parts, each in a separate data file:

gamedat1.dat
gamedat2.dat
gamedat3.dat

Starting the first game gives a menu from which you can choose which part or game to play. For this to work the files must have the same basic structure with a number in it somewhere, e.g. file names

TimeAndMagick1.dat 
TimeAndMagick2.dat 
TimeAndMagick3.dat 

will work.

On other (especially older and smaller) computers the games were distributed as a single file containing both an interpreter and the game data. Level9 can cope with these files as well, as it automatically searches files for valid Level 9 games. This however requires that the file not be compressed in any way. For example, there are several Spectrum snapshots of Level 9 games available which this interpreter can play, but these snapshots must be in an uncompressed format (e.g. SNA). Commonly snapshots are available in the compressed Z80 format, but these files can be converted to SNA using the widely available conversion program SPConv, version 1.06 or higher.

Graphics

The first games from Level 9 were text only, but later games included line-drawn graphics, and then bitmap graphics for the last games.
On some platforms the line-drawn graphics were placed into separate files (For example, in the Amiga release of "Jewels of Darkness" the game is in "gamedata.dat" and the graphics in "picture.dat".). In order to show the pictures the graphics file should be given the same name as the game data file, but with an extension of ".pic", ".cga" or ".hrc" (the latter two being used for graphics files in MS-DOS Level 9 releases).

If no line-drawn graphics file is specified, Level 9 will search the given game data file for graphics data. This is useful when the game data is a Spectrum SNA snapshot or a similar memory dump of an emulator.

The last Level 9 games use bitmap graphics. The interpreter can display the bitmap graphics from C64, Amiga, Atari ST, MS-DOS, Apple Macintosh, BBC B, Amstrad CPC and Spectrum +3 versions of the games (though for the last three, there is currently no way to extract the A-code game data in a usable form).

The graphics files contain a number somewhere in the file name, and there may also be a title picture with a different file name. The interpreter searches for suitably named graphics files using the following rules. In all cases copy the graphics and title files to the same directory as the game.

Amiga, Macintosh and earlier Atari ST

The graphics file name is just the number (e.g. "1", "2", etc.). The title file is called "title".

Later Atari ST

The graphics file name is the number with a "squ" file extension (e.g. "1.squ", "2.squ", etc.). The title file is just one of the normal graphics files.

MS-DOS

The graphics file name is the number with a "pic" file extension (e.g. "1.pic", "2.pic", etc.). The title file is just one of the normal graphics files.

C64

The graphics file name is "pic" followed by the number (e.g. "pic1", "pic2", etc.). The title file is called "title mpic".

BBC B "Lancelot"

As for C64, except that the title file is called "title".

BBC B except "Lancelot"

The graphics file name is "P.Pic" followed by the number (e.g. "P.Pic1", "P.Pic2", etc.). The title file is called "P.Title".

Amstrad CPC and Spectrum +3

All but the first graphic are contained in a single file called "allpics.pic". The first graphics file is "1.pic" and the title file is "title.pic".

The Main Window

Main window

The main window of Level9.Net

File Options

Menu item Toolbar button Hotkey Action
Load game menu item Load game toolbar button Ctrl + L Starts playing the specified Level 9 game.
Reload current game menu item -- Ctrl + C Reloads the current game.
Save position menu item Save position toolbar button Ctrl + S Saves the current game position.
Restore position menu item Restore position toolbar button Ctrl + R Restores a previously saved position.
Save screenshot menu item -- Ctrl + T Saves a screenshot to the specified file.
Recent files menu item -- -- Shows a list of Level 9 games recently opened.
Exit menu item -- Alt + F4 Closes the application.

The File options

View Options

Menu item Toolbar button Hotkey Action
Fullscreen menu item Fullscreen toolbar button F11 Activates the fullscreen mode. Press F11 again to go back to normal screen.
Toolbar menu item -- -- Displays or hides the toolbar when checked or unchecked.
Title bar menu item -- -- Displays or hides the title bar when checked or unchecked.
Timer menu item -- -- Displays or hides the timer when checked or unchecked.
Status bar menu item -- -- Displays or hides the status bar when checked or unchecked.
Script playback menu item -- -- Displays or hides the script playback bar when checked or unchecked.

The View options

Extras

Menu item Toolbar button Hotkey Action
Scrollback menu item Scrollback toolbar button F2 Displays the Scrollback of a running game.
Dictionary menu item Dictionary toolbar button F3 Displays the Dictionary of a Level 9 game.
L9Cut menu item L9Cut toolbar button F4 Displays the L9Cut dialog.
Script editor menu item Script editor toolbar button F5 Displays the Script Editor dialog.
Settings menu item Settings toolbar button F6 Displays the Settings dialog.

The Extras

Scrollback and Dictionary View

Dictionary/Scrollback view

The Scrollback view

The Dictionary and Scrollback views are both based on the same dialog. In Scrollback mode it displays all lines and user input after a game was started. In Dictionary mode it lists the game dictionary sorted by alphabet.

If a search term has been entered in the Find field the first occurrence of the term will be highlighted. The Find next and Find previous buttons allow browsing through the text to find further occurrences (Hotkeys: F3, Shift + F3.)

Menu item Hotkey Action
Save as menu item Ctrl + S Saves the displayed text to the specified file.
Copy to clipboard menu item -- Copies the displayed text to the system clipboard.
Close menu item Alt + F4 Closes the Scrollback or Dictionary view.

File options

The L9Cut Frontend

The L9Cut frontend

The L9Cut frontend

L9Cut is a command line tool for extracting Level 9 datafiles from emulator snaphots and other types of sequential input data. The dialog displayed above allows control of the program with a graphical user interface.

The List all detected datafiles, List (known) missing datafiles and List missing patches options are self-explanatory.
Input file and Output file provide the file paths for extracting a Level 9 datafile and Remove protection indicates if L9Cut should try to remove the copy protection of a game.

Level9.Net checks the plausibility of the program options and activates the Execute button if execution of L9Cut is possible.

Script Recording and Playback

Level9.Net allows recording and playback of user input during gameplay. Those recordings can be stored and loaded as so-called script files.
A script file consists of an optional header with title and comment information followed by a list of script entries that may contain additional comments. The following excerpt of a solution script clarifies this:

#title: Adventure Quest solution script;
#comment: Sinclair ZX Spectrum version;

IN; GET TABLE; OUT; S; S; S; W; S; S; DROP TABLE; U; GET BALL; D; GET TABLE; N;
N; E; S; S; DROP TABLE; GET ORCHID [by standing on the table]; U; GET ONION; EAT
IT [it's garlic - later it'll protect you against the vampire!]; E; U; U [you
get a scroll]; READ SCROLL [a hint reg. the four elemental stones];

Title, comment and user input can be spread over multiple lines and are separated with semicolons. Comments of user input are enclosed within square brackets.
Script recording is controlled by the Script Editor dialog that's accessible via main menu, toolbar or hotkey:

Script editor dialog

The Script Editor dialog

Menu item Hotkey Action
Load script menu item Ctrl + L Loads a specified script file.
Save script menu item Ctrl + S Saves the specified script file.
Copy to clipboard menu item -- Copies a text representation of the current script to the system clipboard.
Close menu item Alt + F4 Closes the Script Editor dialog.

File options

Menu item Hotkey Action
Clear menu item -- Deletes all script entries.
One entry per line menu item -- Produces a script that has only one entry (and optionally a comment) per line.
Include comments menu item -- Toggles whether comments are included in a script or not.

Script options

By pressing the Start recording button the button's text changes to Stop recording immediately and a blinking icon indicates the recording process.
During script recording all user input will be captured as script entries and comments can be entered for each entry in the list. A context menu appears by clicking with the right mouse button on a script entry.

Menu item Hotkey Action
Insert row menu item INS Inserts a new script entry before the selected line.
Insert row (after) menu item -- Inserts a new script entry after the selected line.
Delete row menu item DEL Deletes the selected script entry.
Control: Play menu item -- Sets the beginning entry for script playback.
Control: Pause menu item -- Sets a marker to interrupt script playback.
Control: Stop menu item -- Sets the ending entry for script playback.
Remove control mark menu item -- Removes Play, Pause or Stop control marks.

Context menu

If a search term has been entered in the Find field the first occurrence of the term will be highlighted. The Find next and Find previous buttons allow browsing through the script to find further occurrences (Hotkeys: F3, Shift + F3.)
The Preview tab displays the text representation of a Level9.Net script.

The script playback is controlled with an additional bar that's placed at the bottom of the Level9.Net application window. Beside starting, pausing and stopping of scripts it allows definition of the delay (in seconds) between two simulated input commands in the Input delay field:

Script playback bar

The script playback bar

Notes

Settings

Settings dialog

The Settings dialog

The Settings dialog provides options to change the appearance of Level 9 games in Level9.Net.

The Colors option sets the colors for background, text output and user input. These colors are used in the main window of Level9.Net.

The font type, font scaling and line spacing used for text output can be configured in the Font section. The fonts are imitations of system fonts from well-known 8-bit and 16-bit computers:

The Graphics section allows the choice of a color palette for line drawn graphics. The Amiga and Spectrum options are an approximation of the original palettes on those machines. With the User palette it is possible to create an individual palette if none of the offered palettes are sufficient.
The Scale pictures factor affects the size of pictures shown within Level 9 games.

Help Options

Menu item Hotkey Action
Help menu item F1 Displays the Level9.Net application help.
About menu item -- Displays an About dialog with credits and version information.

The Help options

Meta Commands

The Level 9 interpreter supports several meta commands, which can be entered on the input line. These commands are handled by the interpreter rather than being passed to the game. They are:

#save

Saves out a game position directly, bypassing any prompting (such as for disk changes).

#restore

Loads in a saved position directly, bypassing any protection code within the game.

#quit

Quits the current game.

#cheat

Tries to bypass the copy protection code which asks for a specific word. This is done by trying every word in the game's dictionary. On a slow machine, this can take a long time.

#dictionary

Lists the game dictionary. Press a key to stop the listing and return to the input line.

#picture

If graphics are available, shows the picture specified as a number after the picture command, e.g. "#picture 520".

#seed

Sets the seed of the random number generator to the value given, e.g. "#seed 42". This will make randomness within the game predictable, which is useful for testing.

#play

Prompts the user for a text file from which to read further input from. Input lines are read from the file until the end is reached, at which point the game reverts to asking the user for input.