Installation of the Atari 800 Emulator
--------------------------------------

Irrespective of whether you are going to compile the emulator yourself
or install a pre-compiled binary version you must obtain a copy of the
Operating System ROMs.

The ROM images are distributed within the PC Xformer 2.5 package (other
versions of this program do not contain the ROMs in a suitable format)
which can be downloaded from:-

http://prdownloads.sf.net/atari800/xf25.zip

If you are creating the ROM images yourself they should be copied from
the following locations:-

1. Atari Basic (8192 bytes between $a000 and $bfff)
2. Atari OS/A (10240 bytes between $d800 and $ffff)
3. Atari OS/B (10240 bytes between $d800 and $ffff)
4. Atari XL/XE (16384 bytes between $c000 and $ffff)
5. Atari 5200 (2048 bytes between $f800 and $ffff)

Note: If you are extracting the atarixl.rom you will find that the
      ROM area under the custom chip ($d000 to $d7ff) are mapped
      between $5000 and $57ff when bit 7 of PORTB is set to 1.

      i.e. You should set bit 7 of PORTB and then dump the memory
           out in the following order:- $c000 to $cfff, $5000 to $57ff
           and finally $d800 to $ffff.

The first time you run the emulator you will be prompted for the
location of the ROMs and various other defaults. If you want to
change any of these in the future simply start the emulator with
the "-configure" command line option.

Compiling the Emulator
----------------------

The emulator can be compiled for the following systems (and probably
many others with a little work):-

1. X Window Version (Including SUN OpenWindows) on a Unix Platform
2. SVGALIB Version on Linux
3. CURSES version
4. Graphical Version for the Amiga
5. Graphical version for the Atari TT/Falcon and compatible computers
6. BASIC version (No Graphics). Should be straightforward to configure
   for any 32 bit environment supporting ANSI C.
7. VGA Version for DOS
8. DirectX Version for Microsoft Windows
9. SDL (Linux/Unix, Windows, BeOS)
10. WinCE

Installed zlib (compression library) enables building the emulator with
compressed statesave images support.

   Note: I don't say 32 bit computer because certain operating systems
   enforce a 16 bit memory model. No prizes are offered for correctly
   identifing the OS in question.

Building the Emulator on most platforms
---------------------------------------

1. Change your working dir to the atari800/src path
2. Check if "configure" script is there. If it is skip to step 4.
3. Run "./autogen.sh" (make sure you have autoconf >= 2.5x installed).
4. Type "./configure --target=" for a list of supported platforms.
5. Type "./configure --target=<YourTarget>" (choose from the list above)
6. Type "make"
7. Install the emulator by typing "make install".

Building the Emulator for Curses
--------------------------------

Follow the instruction for Unix but note that you must be using the
System V Curses Library. BSD Curses is lacking a few functions and
will not work (nodelay, attron, attroff, keypad and curs_set).

Building the Emulator for VAX/VMS
---------------------------------

This version only support the BASIC text only mode. You will be
able to run programs such as:- DOS 2.5, DOS XL, MAC65 (disk version),
Atari Basic and similar programs. I have had reports that you can
make the X11 version run under DEC-Windows with a little work.

Note: I have not built this version for a while. Modifications may be
      required to vmsbuild.

To build type @vmsbuild at the command line. I have compiled it with
GNU C 2.6.1 but I don't expect problems with other versions. It
will probably compile OK on VAX C but it will require the appropriate
compilation options to be inserted into vmsbuild.com

atari800 :== $DISK$xxxx:[yyyy]atari800.exe

	where xxxx is the disk the software is on.
	      yyyy is the directory the software is in.

Building the Emulator for the CBM Amiga
---------------------------------------

Compiler: GNU C + DICE C (Lattice C Untried)

There is a separate makefile provided for the Amiga - Makefile.amiga
By default it is setup for use with GCC. If you are using Dice C you
will need to comment out the GCC section and remove the comments from
the Dice section. Unfortunately I don't use DICE C very often so if
it no longer compiles please let me know.

GNU C is available on AMINET under dev/gcc but needs about 6MB to
compile the emulator.

For GCC be sure that the C_INCLUDE_PATH environment variable is
pointing to the location of the official Commodore include files
prior to compiling the emulator.

For example:
	setenv C_INCLUDE_PATH /path/of/cbm/includes

Building the Emulator for DOS
-----------------------------

To compile, use DJGPP the DOS port of gcc, which can be get from
http://www.delorie.com/djgpp/. You will need complete environment
in order to configure and build the executables.
You may need zlib (compression library) to use compressed statesave images.
To build curses (text mode) version install curses library (e.g. PDCurses).

Since the source code contains files with long file names, you must unpack
and compile the source on a filesystem supporting long file names (for example
VFAT of Windows95). An additional change of DJGPP setting is required:
open the DJGPP.ENV file in editor and change the LFN= line to LFN=y

1. Run "configure_dos.bat --target=vga".
2. Run "make" and "make joycfg".
3. If everything went good you should have atari800.exe and joycfg.exe -
   copy them to destination directory.
   
Building the Emulator for Windows
---------------------------------

Atari800 for Windows can be built using Cygwin environment:
http://cygwin.com/

1. Type "./configure --target=dx".
2. Type "make".
3. Copy atari800.exe to destination directory.

Building the Emulator for Falcon
--------------------------------

You need a recent GCC, for example 2.7.2, running on a filesystem with long
file names (either minix-fs of MiNT, or VFAT of MagiC).

1. Type "./configure --target=falcon".
2. Type "make".
3. Copy atari800 to destination directory or try "make install".

Building the Emulator for SDL
-----------------------------

0. Please install (and configure) SDL library (http://www.libsdl.org). 
1. Type "./configure --target=sdl".
2. Type "make".
3. Type "make install".
4. You can run atari800 anytime you want.
