INSTALLATION INSTRUCTIONS
=========================

In order to compile STonX, you will need the following:

 * A C compiler, preferably GNU C (but some ANSI C compilers, like DEC's
   will do).
   If you're using GNU C, please note that you need at least version 2.5,
   older versions will not work. The GNU C version 2.96 is said to be
   instable, too. If you have problems with 2.96, please downgrade to 2.95
   again or use the new GCC 3.x instead.

 * The M4 macro processor.

 * X11R5 or R6 libraries.
 
These will suffice to get you started (unless I've forgotten something). 

If you want to recompile the m68k part of STonX (normally not needed), you
will need a m68k cross compiler, too!


CONFIGURATION
=============

STonX uses a "configure" script generated by Cygnus' Autoconf program in order
to determine system-dependent configuration parameters. Invoke the script
by typing

	./configure

or, alternatively, 

	sh configure

if the former doesn't work.

This will create a `Makefile', a `config.h' and some more files. It will also
generate dependencies for the Makefile.

If the `configure' script fails, please contact the STonX mailing list at
 stonx-development@lists.sourceforge.net
and send the output the script generated. 

The configure script now accepts a couple of extra options which are:

--enable-monitor

This allows the MONITOR code to be compiled and linked in. The monitor
functionality is useful if you are trying to work problems with the code
running on the emulator, either to work out what the emualtor needs to provide
or to debug the program running on STonX. This option will slow down the
emulation and you probably don't want it unless you want to have a go at
reading 68000 assembly.

--enable-svga (untested)

This enables the SVGA option of stonx.

--enable-debug

This defangs the compiler options to provide an executable that gdb can
actually read and understand. Again you probably don't want this unless you
want to debug STonX behaviour with gdb.


ADDITIONAL CONFIGURATION OPTIONS
================================

After generating the Makefile, look at the file 'options.h' and 'config.h'
and see if there is anything you want to change. The only option that you might
need to change is SMALL (defined in the file 'config.h'), which should be
set to 1 if your system has less than 16MB physical memory or if linking
fails otherwise (it will result in an emulator which emulates 4MB RAM instead
of 14MB, and takes up approximately 9MB swap space instead of 17MB).


COMPILING
=========

To compile, simply type 
	
	make

at the shell prompt.

There are some know problems with the MiNT part of STonX in the mint/ sub-
directory when compiling on a non-i86 architecture. If your compiler stops
there, you should disable all MiNT related options in the file options.h!

If you want to use the build in accelerated VDI driver of STonX, you probably
want to build the fonts for it, too. You can do it with:
	make fnttobdf
	make tosfonts
	make fonts
Before, you need to copy a TOS image to the directory containing the sources
and rename it to `tos.img'. The TOS image is needed at this point in order 
to generate the Atari system fonts in .pcf format. The fonts will be extracted
from the TOS image and installed temporarily in the `data' subdirectory.
See the `INSTALLING' section for how to install them permanently.

After STonX has been compiled and linked successfully, you can start it
by typing

	./stonx
	(or ./stonvga if you use the SVGA version)

The command-line options can be listed with the `-h' option (`./stonx -h').


INSTALLING
==========

At the moment, there are three possibilities to install STonX:
1) Copy the executable to a place you like and run it with the command line
   options "-tos", "-cartridge" and "-kmap" to tell STonX where to find
   the TOS ROM image, the cartridge.img and the keysyms file.
2) You can copy the keysyms file to your home directory and rename it to
   .stonx.keysyms and then create a config file for STonX, rename it to
   ~/.stonxrc and write something like:
	tos /path/to/tos.img
	cartridge /path/to/cartridge.img
   in it.
3) Make a system-wide installation by typing "make install" - but you might
   need to be root for this. This will create the files /etc/stonx/stonxrc and
   /etc/stonx/keysyms (or in the folder you specified when running the
   configure script). You probably need to adapt these files to your system.

The system fonts should be installed in a place where the X server can find
them. Examine your default font path with the `xset' command:

	xset q

This will print (among other things) the current font path. If you copy
the files ending in `.pcf' from the `data' subdirectory to one of the
directories in the font path, go to that directory and do a 

	mkfontdir .; xset fp rehash

the fonts will be installed permanently. Note that if you run STonX on a 
different computer than the one handling your X display, you will have to
install the fonts on the latter or you'll have to put them in a directory in
the tftp hierarchy if you use tftp. Also make sure that the directory and the
fonts are world readable. 
If you installed the fonts in a separate path (i.e. none of the ones in the
Font Path shown by "xset q") you need to put something like
xset fp+ <new path> 
into your $HOME/.xinitrc or $HOME/.xsession so that the new path is added to
the system font path every time you start an X session.
In the newest version of STonX, it will also automatically search in its data
directory (e.g. /usr/local/share/stonx/).


Okay, that's all. Have fun with STonX!
