Various programs relating to Doomdark's Revenge
===============================================

All the following files are in xzx tape-save format, which means that
they are arranged as follows:

bytes 0-3   the characters "ZXF1"
bytes 4-20  a spectrum tape header
bytes 21-   the actual file

A microdrive cartridge file in MDR format containing all the following
files is also supplied.

correct, correct.1
------------------
"correct" is code created from the assembler source "correct.1" which
corrects an error in the game.  The time taken for a person to travel
through his or her favourite terrain should be shorter than for other
people, however a missing instruction in the game prevented this.

map2.prg, MAP2.BIN, MAPCHRS, map.2
----------------------------------
This is a program for printing out a map of the playing area, including the
underground tunnels and with the name of any area which is large enough to
have a name printed on it.  The program map2.prg is a simple loader program
which loads the code (MAP2.BIN) and the graphics (MAPCHRS), invokes the
map printing code, and then prints out a short key at the end.  map.2 is
the assembler source.  It makes use of the non-standard command ".u"
from my customised interface-1 ROM (called imc.i1rom and available from
ftp.nvg.unit.no), but this is not necessary as long as you have some other
utility which allows the printing out of user-defined graphics using an "ESC
K+8" control sequence.

When the program is run, it calls the tape loader to load a saved position,
which contains the map.  If you use xzx then you should use my tape loading
hack (that is, LOAD_SAVE_2) so that the load works.  Alternatively, if you
can get the map into memory then call the machine code at 60013 instead of
60000.

The program prints out co-ordinates at the left and right as ASCII, the
various terrain types in the map and the lines for the tunnels as UDGs,
and the coordinates at the top and bottom and the names of places as "ESC K"
graphic controls.  It prints out the ASCII and UDG sequences through #3, and
the control characters through #4.  The command ".u" establishes this by
opening #4 to a binary channel and #3 to a channel which expands UDGs.

The 4x8 characters for the names are generated by omitting every other
column of dots from the ROM character set (or actually, the one pointed
to by (23606)).  This may not be terribly satisfactory (well I might have
used double-density graphics if I had a printer which did them - this was
written in 1985), but it gives acceptable results if you use the characters
from my customised spectrum ROM (called imc.rom).

The printer you use must be capable of understanding "ESC K" for bit-image
graphics and "CR" for a carriage return without linefeed.  It should have
enough room for 512 columns of dots and also 4 condensed characters on
each line.  The printer I used was a 72dpi printer with which the map
just fits on one sheet of paper, but with a more modern 60dpi printer
you may need to do some re-assigning of graphics modes.

Finally, note that if you use xzx with the RS232 output hack and my
interface 1 ROM to produce a map, then be prepared to wait a *long time* for
the result.  Use "crlf false" since the output should be printed verbatim
on an Epson 9-pin printer.  It is much more interesting if you can get the
program to print the map out directly.

where
-----
This program prints out the location of every person's object.  You need
to start the program with the game data already loaded.  One way to do
this is to load the game with my customised spectrum ROM, then generate a
non-maskable interrupt and press N.  After that, type CLEAR 29999 and load
the program.

who
---
This program prints out the details of every person in the game.  You
need to start the program with the game data already loaded.  Here is
an example of the information given:

>Loyal to the Moonprince
>
>2: Tarithel the Fey at (26,77), carrying nothing, commanding no army.
>She is good, forceful, generous, stubborn, brave, swift, loyal, not (220)
>reckless, not at all (250) despondent and not at all (250) tired.  Her
>liege is Luxor the Moonprince.  Her foe is Shareth the Heartstealer.
>   Movement flag 3. Fortress of Thigrorn at (59,78), owned by Lorangriel the
>Fey, holds 1000.
>   The Spell of Thigrorn can be found at (50,38).

name
----
This short program demonstrates the method by which Doomdark's Revenge
calculates the name of a place by its co-ordinates on the map.  It
generates a name for each pair of co-ordinates you enter.

DRG1, DRG2
----------
These programs demonstrate the method by which Doomdark's Revenge draws the
landscape.  DRG2 uses screen pokes and is slower, whereas DRG1 translates
the screen pokes into DRAW commands and is faster.  You need to start these
programs with the game data already loaded.  The co-ordinates which the
program asks for are PLOT co-ordinates.

rprint
------
This program demonstrates the method by which Doomdark's Revenge draws
the people.  You need to start the program with the game data already
loaded.  The co-ordinates which the program asks for are reversed PRINT-AT
co-ordinates.

tunnel,tunnel.chr
-----------------
The program tunnel demonstrates the method by which Doomdark's Revenge
draws the inside of a tunnel.  The UDG file tunnel.chr should be loaded
before running the program.  It is not necessary to have the game in
memory for this program.

Ian Collier
imc@comlab.ox.ac.uk
