Debian Codegraph @

terps/level9/level9.txt

raw
1
2 Level 9 Interpreter v5.2
3 An interpreter for Level 9 games in any format,
4 including Spectrum snapshots.
5
6 Copyright (c) 1996-2025 Glen Summers and contributors.
7 Contributions from David Kinder, Alan Staniforth,
8 Simon Baldwin, Dieter Baron and Andreas Scherrer.
9
10 Level9 is released under the terms of the GNU General
11 Public License. See the file COPYING that is included
12 with this program for details.
13
14
15 Introduction
16 ------------
17
18 During the 1980s a small British company called Level 9, run by two brothers
19 (Mike and Pete Austin), produced a series of text adventure games for a
20 variety of computers. These games received considerable critical acclaim and
21 are probably the best text adventures written for the small cassette based 8
22 bit computers common in Britain in the 80s.
23
24 Level 9 wrote their games using a custom designed system known as "A-Code",
25 which evolved from games on the 8 bit computers such as the Acorn BBC Model
26 B, the Sinclair Spectrum and the Commodore 64 to the (then new) 16 bit
27 machines such as the Amiga and the Atari ST.
28
29 From disassembly of Level 9 games there are thought to be four variants of
30 A-Code, which are detailed below, and all of which are supported by this
31 interpreter. Thanks go to Paul David Doherty for analysing the games and
32 producing the table which follows.
33
34 v1 This was used for the earliest games. Spectrum v1 games had
35 black text on a grey background. Games known to be released in
36 this format:
37
38 Colossal Adventure
39 Adventure Quest
40 Dungeon Adventure
41 Snowball
42 Lords of Time
43
44 v2 These releases were made between 1984 and 1985 (and usually say
45 so in the initial copyright message). This version introduced
46 the yellow text on a black background which became standard.
47 Games in this format were:
48
49 Adventure Quest
50 Dungeon Adventure
51 Lords of Time
52 Snowball
53 Return to Eden
54 Erik the Viking
55 Emerald Isle
56 Red Moon
57
58 v3 This format, dated 1986, was used by the largest number of
59 releases. These were:
60
61 Worm in Paradise
62 The Price of Magick
63 The Secret Diary of Adrian Mole
64 The Growing Pains of Adrian Mole
65 The Archers
66 The Jewels of Darkness Trilogy (Colossal Adventure,
67 Adventure Quest and Dungeon Adventure released as
68 one package)
69 The Silicon Dreams Trilogy
70 (Snowball, Return to Eden and Worm in Paradise)
71
72 v4 This was used for the Time and Magick Trilogy (Lords of Time,
73 Red Moon and The Price of Magick), and all Level 9's new games
74 from 1987 onwards:
75
76 Knight Orc
77 Gnome Ranger
78 Ingrid's Back
79 Lancelot
80 Scapeghost
81
82
83 Supported Formats
84 -----------------
85
86 On several machines (such as the Amiga) Level 9 games were distributed as
87 an interpreter plus a data file, usually called "gamedata.dat" or something
88 similar. These games can be played with this interpreter simply by loading
89 the "gamedata.dat" file.
90
91 For the Amiga (and some other formats) the v4 games were released in three
92 parts, each in a separate data file:
93
94 gamedat1.dat
95 gamedat2.dat
96 gamedat3.dat
97
98 Starting the first game gives a menu from which you can choose which part or
99 game to play. For this to work the files must have the same basic structure
100 with a number in it somewhere, e.g. file names
101
102 TimeAndMagick1.dat
103 TimeAndMagick2.dat
104 TimeAndMagick3.dat
105
106 will work.
107
108 On other (especially older and smaller) computers the games were distributed
109 as a single file containing both an interpreter and the game data. Level9
110 can cope with these files as well, as it automatically searches files for
111 valid Level 9 games. This however requires that the file not be compressed
112 in any way. For example, there are several Spectrum snapshots of Level 9
113 games available which this interpreter can play, but these snapshots must
114 be in an uncompressed format (e.g. SNA). Commonly snapshots are available in
115 the compressed Z80 format, but these files can be converted to SNA using the
116 widely available conversion program "SPConv". Version 1.06 or higher of
117 "SPConv" is recommended.
118
119 Paul David Doherty has written "L9Cut", which can extract Level 9 games from
120 many different formats. L9Cut can also remove copy protection from Level 9
121 games. L9Cut can be downloaded from
122
123 https://www.ifarchive.org/indexes/if-archive/level9/tools/
124
125 This program has been tested on files obtained from releases for the Amiga,
126 Atari ST, IBM PC, C-64, Spectrum, Atari 800, BBC, Amstrad CPC, Apple 2,
127 Apple Mac and MSX computers.
128
129
130 Graphics
131 --------
132
133 The first games from Level 9 were text only, but later games included line-
134 drawn graphics, and then bitmap graphics for the last games. These graphics
135 are supported by some versions of the interpreter (The 32-bit DOS version
136 does support graphics, while the 16-bit DOS version does not.).
137
138 On some platforms the line-drawn graphics were placed into separate files
139 (For example, in the Amiga release of "Jewels of Darkness" the game is in
140 "gamedata.dat" and the graphics in "picture.dat".). In order to show these
141 pictures the graphics file can be passed as a second command line argument
142 when starting the interpreter. If no graphics file is specified in this
143 way, the interpreter will look for a file with the same name as the game
144 data, but with a file extension of ".pic", ".cga" or ".hrc" (the latter
145 two being used for graphics files in MS-DOS Level 9 releases).
146
147 If no line-drawn graphics file is specified, Level 9 will search the given
148 game data file for graphics data. This is useful when the game data is a
149 Spectrum SNA snapshot or a similar memory dump of an emulator.
150
151 The last Level 9 games use bitmap graphics. The interpreter can display the
152 bitmap graphics from C64, Amiga, Atari ST, MS-DOS, Apple Macintosh, BBC B,
153 Amstrad CPC and Spectrum +3 versions of the games (though for the last three,
154 there is currently no way to extract the A-code game data in a usable form).
155
156 The graphics files contain a number somewhere in the file name, and there
157 may also be a title picture with a different file name. The interpreter
158 searches for suitably named graphics files using the following rules. In
159 all cases copy the graphics and title files to the same directory as the
160 game.
161
162 Amiga, Macintosh and some Atari ST
163 The graphics file name is just the number (e.g. "1", "2", etc.).
164 The title file is called "title".
165
166 Later Atari ST
167 The graphics file name is the number with a "squ" file extension
168 (e.g. "1.squ", "2.squ", etc.). The title file is just one of the
169 normal graphics files.
170
171 MS-DOS
172 The graphics file name is the number with a "pic" file extension
173 (e.g. "1.pic", "2.pic", etc.). The title file is just one of the
174 normal graphics files.
175
176 C64
177 The graphics file name is "pic" followed by the number (e.g.
178 "pic1", "pic2", etc.). The title file is called "title mpic".
179
180 BBC B "Lancelot"
181 As for C64, except that the title file is called "title".
182
183 BBC B except "Lancelot"
184 The graphics file name is "P.Pic" followed by the number (e.g.
185 "P.Pic1", "P.Pic2", etc.). The title file is called "P.Title".
186
187 Amstrad CPC and Spectrum +3
188 All but the first graphic are contained in a single file called
189 "allpics.pic". The first graphics file is "1.pic" and the title
190 file is "title.pic".
191
192
193 Meta Commands
194 -------------
195
196 Level9 supports several meta commands, which can be entered on the input
197 line. These commands are handled by the interpreter rather than being passed
198 to the game. They are:
199
200 #save Saves out a game position directly, bypassing any
201 prompting (such as for disk changes).
202
203 #restore Loads in a saved position directly, bypassing any
204 protection code within the game.
205
206 #quit Quits the current game.
207
208 #cheat Tries to bypass the copy protection code which asks for
209 a specific word. This is done by trying every word in
210 the game's dictionary. On a slow machine, this can take
211 a long time.
212
213 #dictionary Lists the game dictionary. Press a key to stop the
214 listing and return to the input line.
215
216 #picture If graphics are available, shows the picture specified
217 as a number after the picture command, e.g. "#picture 520".
218
219 #seed Sets the seed of the random number generator to the value
220 given, e.g. "#seed 42". This will make randomness within
221 the game predictable, which is useful for testing.
222
223 #play Prompts the user for a text file from which to read
224 further input from. Input lines are read from the file
225 until the end is reached, at which point the game reverts
226 to asking the user for input.
227
228 The 32-bit DOS version of Level 9 also supports several hotkeys. Press
229 Alt-H when playing a game to view a list of the available hotkeys.
230
231
232 History
233 -------
234
235 v5.2 An array overrun when handling the commands "forwards",
236 "backwards", "left" or "right" has been fixed.
237 Bitmap files will be found even if the name is not exactly
238 the same case as expected on case sensitive file systems, e.g.
239 "1.PIC" will be found on Unix, when before "1.pic" was
240 required.
241 The GTK front-end has been updated to GTK3.
242 The Glk front-end has improved detection for MSX releases of
243 the games.
244
245 v5.1 The bitmap graphics from the US Macintosh release of Lancelot
246 now display correctly.
247
248 v5.0 V1 games are also now supported.
249 The input logic now correctly handles commas and full stops
250 in the user's input for v3 or later games.
251 The input logic now allows hyphens and apostrophes to be
252 input, which is needed for some v2 games.
253 The dictionary listing for v2 games no longer has junk on the
254 end.
255 The graphics detection algorithm has been improved, so that it
256 now correctly finds graphics in all known games.
257 A difference in the logic between the v2 and v3 line-drawn
258 graphics has been implemented, which corrects the scaling for
259 some v2 graphics.
260 Added #seed and #play meta commands.
261
262 v4.1 Corrected a bug that made Lancelot unplayable.
263 BBC B bitmaps are now shown as they appeared on the original
264 computer.
265
266 v4.0 Implemented support for bitmap graphics.
267
268 v3.0 Implemented support for line-drawn graphics.
269 Fixed a problem with v4 detection that stopped some versions of
270 Scapeghost running correctly.
271 Implemented an opcode used by the disk based versions of
272 Time and Magick, which now means that saving from these games
273 works.
274 The interpreter now gives you a reasonable amount of time to
275 enter the Lenslok code in protected games, and also tells you
276 what the code should be.
277
278 v2.0 Revised the description of v4 games to include all the post-1987
279 games, which are now supported.
280 V2 games are also now supported.
281 Added meta commands.
282
283 v1.0 First release.
284
285
286 Credits
287 -------
288
289 The Level9 interpreter was originally written by Glen Summers. The changes for
290 version 3.0 were made by David Kinder with additional code from Alan Staniforth
291 and Simon Baldwin.
292
293 For version 4.0, David Kinder integrated the various bitmap decoders, but all
294 the difficult work was done by Alan Staniforth and Dieter Baron. Alan also
295 supplied the BBC B bitmap changes for version 4.1.
296
297 David and Andreas Scherrer worked on version 5.0 to integrate script playback
298 from Andreas' .NET port of the interpreter. Andreas created a test harness to
299 play through all the games, and David and Andreas then worked through the
300 problems this showed up. Andreas also put much effort into painstakingly
301 checking all the graphics in the games, which revealed several issues.
302
303 Help, testing and information on the various Level 9 formats was provided by
304 Paul David Doherty. Testing of the fix for Lancelot in version 4.1 was
305 performed by Guido Mureddu.
306
307 If you have any comments or queries, contact David Kinder.
308 Web: https://www.davidkinder.co.uk/
309 Email: [email protected]
310
311
312 The Interactive Fiction Archive
313 -------------------------------
314
315 If you have access to the Internet and are interested in text adventures,
316 then you can find all sorts of programs and information at The Interactive
317 Fiction Archive:
318
319 https://www.ifarchive.org/
320
321 The latest version of this program can always be found on this site, in
322
323 https://www.ifarchive.org/indexes/if-archive/level9/interpreters/level9/
324