Atomia Akorny

by Magnus Olsson



This program is a C port of the first adventure game I wrote. It was
originally written in a combination of Basic and 6502 assembler for
the Acorn Atom, a small, British home computer. Since the entire
program had to fit into 5 K of memory, with an additional 5 K for data
(the memory of the Atom was divided into two non-contiguous blocks),
the adventure had to be very primitive. I had to do invent a rather
clever abbreviation handler to squeeze the whole text into the
available space (more about this later).


Files


The .c and .h files are the source of the C port (ANSI C, compilable
with Turbo C). atomia.dat is the database, while atomia.bas and
atomia.asm contain the original Basic source and a disassembly of the
assembler routines.



Copyright


This program and its source is copyright (c) 1984,1992 by Magnus
Olsson. All right reserved.


You may copy and distribute it freely, as long as this documentation
is included.


Commercial use without the author�s permission strictly prohibited
(not that any person in his or her right mind would want to pay
anything for this, but who knows)


Warning


If you're looking for a good game, this program is probably nothing
for you. In fact, the game is almost ridiculously primitive, and the
parser is so stupid and the messages so terse that some puzzles must
be almost unsolvable without reading the source.


If you are interested in retrocomputing (re-creating old hard- and
software on modern systems), or just in hacking for its own sake, then
you might find this program of interest. But I don't promise anything!


Continue reading at your own risk - you've been warned!


How to play


When you start the program, you'll get the Acorn Atom prompt. A real
Atom would accept any Basic command here, but you'll only get three
commands: RUN to run the game, DUMP to dump the data base in human-
readable form to text files, and BYE to exit (the last two commands
weren't there on the Atom). Any other command will result in the
Atom's "syntax error" response, viz. ERROR 94.

In an attempt to emulate the real Atom's 16 rows x 32 columns screen,
the output wraps around at 32 characters on output. There are still 25
screen lines, though, which is 9 lines more than in the original.

Once you've started the game, you play as in all other adventure
games, only the parser is unbelievably primitive. It knows very few
verbs (to find out which, I refer you to the sources), so many actions
have to be performed by typing e.g. USE AXE ON TREE to cut down a
tree. Primitive, isn't it?

To exit, type QUIT. Also note that you can't save your game, and that
you'll have to type WHERE (not LOOK) to have a look at your
surroundings.

The background story of the game is the following: The ancient crown of
the Akorny family of Transsylvanian feudal barons has been stolen, and
COunt Akorny has promised that whoever can return the crown to his
castle will get his daughter's hand in marriage. You've just left the
gates of Akorny castle behind you on your quest for the crown. Not
having the foggiest idea of where to find the crown, you feel
strangely reluctant to enter the woods, what with the howling wolves
or the rumours of man-eating trolls. However, there's no turning back;
count Akorny has no sympathy for cowards, and will throw you in jail
if you return empty-handed.


Some random notes


Back in 1984, when I was taking my first undergrad physics course, we
did some computer labs on the physics department's ND 100 minicomputer
(Caesar). I didn't need long to discover that I could read other
peoples' files as well as my own, and that one of the grad students
had this very interesting file called ADVENTURE:SYMB, which I couldn't
resist printing out. As you may have guessed, this was the original
Crowther/Woods Colossal Cave. I studied that listing with great
interest, but was somewhat daunted by the immense mass of Fortran
code. The messages were fun to read, though, and I dreamed of getting
my hands on an executable (the ND 100 was too small to compile it). I
didn't actually get to play Colossal Cave until two years later, but
had to contend myself with some "adventure" games for the Atom,
written by Acornsoft. These games weren't puzzle-oriented adventure
games: you walked around in an adventure-type world, picked up
ttreasures and fought monsters, but that was all there was to it.
Still, they generated quite a lot of sense of wonder.


During the summer vacation, a friend (hi, G�ran!) borrowed the
Colossal Cave source listing, and he got even more interested than I -
so interested, in fact, that he wrote a small adventure game called
Giant Cave for his Atom. Of course, he gave me a copy, and I was
enthusiastic - the title may not be too imaginative, but the game was
far more sophisticated than the Acornsoft ones. I immediately decided
to write one of my own, and an even better one at that. This kept me
busy for some weeks, and resulted in the crowning achievment of my
pre-CS-courses days., viz. Atomia Akorny (the name of the princess of
the game, and a word game on "Acorn Atom").


I remember being especially proud of the code to handle abbreviations.
As I've mentioned, the Atom had an upper-case-only screen, so I
decided to use all character codes above 'Z' for abbreviations. When
the printout routine (written in assembler for speed) would find such
a character, it would search the abbreviation database for its
expansion, and recursively call itself to print out that expansion
(which might of course contain other abbreviations). I was really
proud when I finally got his code to work (the machine did have a
symbolic assembler, but very limited debugging facilities).
Considering the hopelessly convoluted assembler code with the clean,
elegant C code of the present port, I'm not sure I'm that proud
anymore :-).


Then my Atom was replaced by a PC clone, and for a long time, the game
just sat on its old Atom cassette. I didn't even have a printout of
it, just some vague memories. About a year ago, I was thinking that
it would be really nice to examine that game again, and compare it to
my "real" adventure, Dunjin (available as shareware from the author).
I finally managed to get the Basic source transferred from the tape to
a PC disk (this was quite an adventure; first I had to build my own
serial interface between the two machines, and then I had to find a
tape recorder that could read the tape), I got another strange idea:
I'd like to port the game to my PC so I could actually run it at
leisure (without having to coax the old Atom into grudging service),
and even show it to my friends. After thinking about it, I realized
that it wouldn't be too hard to port it to C. The most difficult
thing was the deciphering of the assembly routines - anybody who
doubts that should just take a look at the file atomia.asm, which was
all I had. The Basic was quite straight-forward, once I had decided
how to emulate the storage of the Atom.



So, this is it: The Atomia Akorny application runs exactly as the
original program (but much faster) with three exceptions: one small
bug was fixed (but I left other misfeatures in just for fidelity), I
didn't have the energy to emulate the cute triangular frame drawn on
the opening screen of the original, and for convenience the input
routine accepts lower-case input (converting it into upper case).



I'm a bit surprised at how nice the world of this game is (though of
course the room descriptions are on the minimalistic side). The
rather nasty atmosphere of the dungeon was inspired by one of the
Acornsoft games, while the Troll who guards a bridge was taken from
Colossal Cave (but my problem has a totally different solution). The
troll problem makes a much more sophisticated reappearance in Dunjin.



Feel free to send me appreciating fan mail, comments, questions, etc,
to my email address:

[email protected]

Lund, November 1992


The Author