home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
misc
/
a154_1
/
!Tierra
/
!Help
next >
Wrap
Text File
|
1992-09-14
|
8KB
|
194 lines
Tierra Simulator V3.13: Copyright (c) 1990, 1991, 1992 Thomas S. Ray
by Tom Ray, ray@brahms.udel.edu ray@santafe.edu (the bulk of the code)
Dan Pirone, cocteau@life.slhs.udel.edu (frontend, overhaul, sex)
Tom Uffner, tom@genie.slhs.udel.edu (rework of genebanker & assembler)
Conversion to RISC OS (including WIMP interface)
by Paul Field (paulf@dcs.qmw.ac.uk)
Please read the license agreement for tierra ('licence.h' in the source -
also included in tierra_doc)
Note especially that the executables may NOT be distibuted (Nothing to do
with me !).
Please note :
The files Dir.h, Stat.h, Time.h, Dir.c, Stat.c and Time.c are NOT
part of Tierra. They are PD routines written by
Gustav (pmoore@cix.compulink.co.uk).
For full details of how to run tierra in general see 'tierra_doc'. For RISC OS
specific stuff see this file.
------------------------------------------------------------------------------
Running Tierra on a RISC OS machine
-----------------------------------
Firstly you will have to compile the sources. You need Acorn C Release 4 and
all you have to do is edit 'source.Makefile' so that the references to
the libraries 'Stubs' and 'RiscOS_Lib' point to the relevent place on
your system. Load up !Make and double-click on the Makefile so that
the Tierra project window opens up. Then select 'Tool Options -> CC'
from the menu and the CC options window will open. Open the menu and
move over 'Predefine' so that a writable 'menu box' appears.
Type in 'RISC_OS' (don't type the single quotes :-) ) and press RETURN.
Next click on 'OK' in the CC options window.
You can then use !Make to compile '!Runimage' and 'arg'.
The tierra sources generate a lot of warnings and errors - just ignore them.
You'll probably find it easiest to set the 'continue after errors' option
of make. Just keep 'making' until you end up with a linked file.
If you have any problems with this contact me and I'll try to help.
Once you have done this :
Double click on the application and it will install itself on the icon bar.
If you have previously saved a run it will load this and continue otherwise
it will start a new run.
The application icon has a menu attached with the following options :
Info -> Displays information about the program
Histograms -> Log If ticked will output any histograms (or size queries)
to the 'tierra_log' file
Histograms -> Size }
Histograms -> Genotype } Opens a window with the appopriate histogram in it
Histograms -> Memory } (See tierra_doc for details)
Size Query -> _____ Fill in the size class you would like to examine in
the writable icon and press RETURN.
Var -> _____ Change a 'Soup in' variable by entering something
like 'alive = 500' in the writable icon.
(see tierra_doc for details of variables)
Misc->Inject Gene->____ Fill in the name of the genotype to be added to the
soup.
Misc->Micro->Off } One of these three options will be ticked and determine
Misc->Micro->Delay } the state of the micro debugger. In 'click' mode
Misc->Micro->Click } each click in the debugger window will execute one
instruction of the current organism.
Save Saves the run to disc.
Quit Quits the application (but gives you the opportunity
to save first).
Other notes
-----------
The message window can be closed - it will pop up if a new message occurs.
Clicking on iconbar opens the statistics window.
Changes to files in the RISC OS version of Tierra
-------------------------------------------------
'*.gen' files are now '*' in directory 'gen'
'*.tie' files are now '*' in directory 'tie'
'*.tmp' files are now '*' in directory 'tmp'
File 'opcode.map' is now 'opcode_map'
File 'tierra.run' is now 'tierra_run'
File 'tierra.log' is now 'tierra_log'
File 'break.#' is now 'break_#'
Technical changes to Tierra under RISC OS
-----------------------------------------
FEStats is called every 'multi_inst' instructions as well as on cell division
so that the desktop is still reasonably responsive.
Since Tierra is not run from the command line, 'tierra soup_out' cannot be
used to continue a run. Currently, if 'soup_out' is found then it is assumed
that the user wishes to continue the run, otherwise a new run is started.
If anyone finds this offensive or can suggest something better then please
let me know.
The histogram structure has a 'genotype' field under RISC OS because the
histogram window may need to be redrawn and so we need to keep track of the
number of genotypes in each size class when the histogram was created.
Under RISC OS there is no restriction on the number of items in the histogram
since the data appears in a window which is resized to fit the histogram.
Known problems
--------------
Error messages may sometimes complain using non-RISC OS filenames.
It seems a bit pedantic to change them since the filename changes
are fairly trivial.
You might have trouble with non-default inst maps -
if so see line 336 of 'tsetup.c'
Tierra's files are looked for in the current directory. This is highly
naughty and problems may occur if the current directory is changed while
Tierra is running. In a later version I will probably change this.
Some bits of redundant code have been left in. Noticeably the histogram
printing code (for text terminals) still runs - it just calls dummy print
routines that do nothing. This is not really a problem but might slow things
down very slightly.
Histograms have no limit on the number of items in them. I don't think this will
cause any problems - but I've mentioned it just in case.
The mutitasking is a bit dodgy. The application polls every 500 virtual
instructions but this can take a long time especially when the Tierra
'watch' routines are in action. I will probabily sort this out in a later
release. Possibilities include :
1) Poll every x vitual instructions (x is user-defined from the menu).
2) Poll every x centiseconds (x is user-defined)
The latter is preferable for the user but may be more difficult to acheive
reliably.
Other programs
--------------
In the 'results' directory are the files :
'clearrun' - clears away all the files from a run
'cumclear' - clears away all the files from a run but leaves the
genebank intact
In the 'results.gb' directory :
'arg' - allows you to assemble/disassemble genotypes (see tierra_doc)
(N.B. because of the filename changes a command such as :
arg c 0080.gen 80 0080aaa.tie
should be
arg c gen.0080 80 tie.0080aaa
under RISC OS)
(For this to work 'results.gb' should be the current directory)
------------------------------------------------------------------------------
Note:
This is the first release of the RISC OS version of Tierra. There is still
a lot I could do. For example, a dynamic graphical display of the soup (with
colour coding for different types of organisms), porting various utilities
that are available for examining the genebank amongst others.
Hopefully, I'll get round to doing some of this eventually.
If you like the program then let me know. It is terribly demoralising to
spend days working on a program, release it and then watch it apparently
vanish into obscurity. Naturally, any suggestions and bug reports will be
gladly received.
Paul Field
(paulf@dcs.qmw.ac.uk)
also (long term address)
3, Little Heath
Chadwell Heath
Romford
Essex
RM6 4XX
England
------------------------------------------------------------------------------