===============================================================================

                      SSSS    tt          lll  lll
                     SS  SS   tt           ll   ll
                     SS     tttttt  eeee   ll   ll   aaaa
                      SSSS    tt   ee  ee  ll   ll      aa
                         SS   tt   eeeeee  ll   ll   aaaaa
                     SS  SS   tt   ee      ll   ll  aa  aa
                      SSSS     ttt  eeeee llll llll  aaaaa

===============================================================================
                          User Guide for Version 1.0b1
===============================================================================

This guide explains how to install and use Stella to play Atari 2600 VCS
games on your computer.  Please read this guide throughly before sending 
questions to anyone.  If you don't find the answers to your questions in 
this guide please see the FAQ found on the Stella homepage.  If you have
any suggestions for improvements to this document or to Stella please 
send them to bwmott@acm.org.

DO NOT SEND EMAIL ASKING FOR ROMS BECAUSE THEY ARE COPYRIGHTED.  DO NOT
SEND EMAIL ASKING FOR THE LOCATION OF ROMS ON THE INTERNET.  ANY MAIL 
RECEIVED OF THIS NATURE WILL BE DELETED AND NO RESPONSE GIVEN!


TiaSound Library Copyright Notice
==================================

(Stella uses the TiaSound library written by Ron Fries.  It can be be 
downloaded from the Stella home page.)

TiaSound is Copyright(c) 1996, 1997, 1998 by Ron Fries

This library is free software; you can redistribute it and/or modify it under 
the terms of version 2 of the GNU Library General Public License as published 
by the Free Software Foundation.

This library is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for more 
details.

To obtain a copy of the GNU Library General Public License, write to the Free 
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Any permitted reproduction of these routines, in whole or in part, must bear 
this legend.  


Table of Contents
=================

  1.0 Introduction

  2.0 Installation

    2.1 DOS Binary Distribution

    2.2 Unix and DOS Source Code Distribution

  3.0 ROM Images

    3.1 General
    3.2 Supercharger
  
  4.0 Playing Games

    4.1 DOS

    4.2 Unix

  5.0 Keyboard Layout

  6.0 Mailing List

  7.0 Known problems with Cartridges

  8.0 Adding Properties

  9.0 Property Autodetection

 10.0 Acknowledgements

 11.0 Revision History


1.0 Introduction
================

Stella is a portable emulator of the old Atari 2600 video-game console
written in C++.  You can play most Atari 2600 games with it.  The latest 
news, code and binaries for Stella can be found at:

  http://www.classicgaming.com/stella/

If you are having problems with Stella please visit the home page and
make sure you're running the lastest release before sending mail.  There
are versions of Stella for Linux, DOS, OS/2, Power Macs, Unix/X, and 
Windows.  The maintainers are:

  Aaron Giles (agiles@sirius.com)           Power Macs
  Jeff Miller (milnak@msn.com)              Windows 95 & NT
  Bradford W. Mott (bwmott@acm.org)         Linux, Unix/X and DOS
  Darrell Spice Jr. (spice@ibm.net)         OS/2

If you would like to port Stella to another platform or would like to
help with something please take a look at the Todo.txt file for a list
of things that need to be done.   Please note that although the source 
code for Stella is freely distributed the code is NOT public domain.


2.0 Installation
================

Once you've downloaded a Stella distribution you should follow the 
directions for the distribution you have.  

2.1 DOS Binary Distribution
---------------------------

This distribution contains the binaries for DOS.  To install the
distribution do the following:

  1) Change directories to the root directory: CD \

  2) Unzip the distribution: st10b1.zip
  
  3) Copy the stella.exe program to a directory in your path or
     add C:\STELLA to your path in the AUTOEXEC.BAT file

The DOS version of Stella supports sound using a Sound Blaster card.  For 
it to work correctly you MUST set the BLASTER environment variable in your 
AUTOEXEC.BAT file.  Sound cards with an IRQ setting greater than 7 should 
be working now.

If you have problems with the joysticks you may have to unplug them to 
use Stella.

You may find it easier to run Stella using an emulator front end than 
using the command line.  An emulator front end allows you to pick games 
without having to type everything at the command line.  One such front 
end is Jim Pragit's "Game Menu" which can be found at the following URL: 

  http://members.aol.com/jpsoftco/gamemenu.htm.

There are other emulator front ends available as well, however, you'll
have to search for them.

2.2 Unix and DOS Source Code Distribution
-----------------------------------------

This distribution contains the source code for Stella.  The source code
can be compiled under most Unix operating systems and DOS.  The Unix
code was developed with GCC 2.8.1, however, it should compile with other 
C++ compilers.  The DOS port was developed with DJGPP using version 2.8.1 
of GCC, however, it may compile with others.

  1) Change directories to the .../stella-1.0b1/src/build directory

  2) Edit the makefile to meet your needs

  3) Type 'make' and follow the on screen instructions to build Stella

  4) Install Stella in a directory that's in your path

  5) Change directories to the .../stella-1.0b1/src/ui/sound directory

  6) Type 'make' and follow the on screen instructions to build stella-sound

  7) Install stella-sound in a directory that's in your path

At this time sound is support using the Open Sound System for Unix.  The
sound has been tested under Linux and BSDI.  If you have some free time 
please try to port the stella-sound program to your favorite Unix.


3.0 ROM Images
==============

In order to play an Atari 2600 game you have to have a ROM image of the 
game.  A ROM image is a file that contains the data off the game cartridge 
or cassette.

3.1 General
-----------

Most games for the Atari 2600, like many game systems, were stored on 
cartridges.  These cartridges usually contained a single ROM chip (Read 
Only Memory) which had the program for the game stored on it.  When you 
plugged the cartridge into the 2600 it allowed the 2600's microprocessor, 
a 6507 which is very similar to a 6502, to execute the program stored
on the cartridge.

Just like a cartridge had to be plugged into the 2600 you also have to
supply Stella with a copy of the cartridge you want to play.  This is done
by having a ROM image (.BIN file) of the cartridge.  ROM images are files 
which contain the actual data off the cartridge (basically it contains 
6507 machine code).  There are several ways to get a ROM image:

  1) It's possible to build a device that plugs into the printer port
     of a PC and reads the data off the cartridge

  2) Purchase any of the Activision Atari 2600 Action Packs and use the
     ROM images (.BIN files) from it

  3) Search around the net and find some ROM images (.BIN files) to download

  WARNING: It is illegal to have ROM images of games that you do not
           actually own (i.e. you don't own the cartridge and you 
           didn't buy it from Activision)

In addition to the ROM image you may need to supply some properties for 
the game.  These properties inform Stella of the "best" settings for a 
game.  When Stella doesn't have properties for a game it tries to guess 
the settings and uses defaults for settings it can't guess.  For most 
games you will NOT need to add properties to Stella since it contains 
setting for a lot of games and can guess the settings for most of the 
others, however, for best results you may decide you want to specify the 
properties yourself.  If you do you should read the "Adding Properties" 
section of this guide.

3.1 Supercharger
----------------

Supercharger games were not stored on cartridges instead they were
stored on cassette tapes. The Supercharger, which plugged into the 
Atari 2600's cartridge slot, loaded games into it's 6K of RAM using 
a tape player.  The Supercharger also supported multiloading which 
allowed games to be broken into several 6K pieces and loaded at 
different times.  This was useful for long games that had distinct 
parts (i.e. role playing type games). 

Most Supercharger ROM images are stored as an 8448 byte file.  However, 
ROM images of multiload games are stored as a set of 8448 byte files.  
The names of these files have a two character sequence number in them 
which indicate what load they are (the sequence always starts at zero 
but then skips a few numbers and then increments by one).

Stella supports multiload games, however, the set of ROM image files
has to be combined into a single large ROM image file.  To create
a multiload ROM image file for Stella under Unix do the following:

  % cat survivl0.bin survivl6.bin survivl7.bin > survivl.bin

Then you can play the game with Stella using the survivl.bin file. 
Stella has properties builtin for most of the Supercharger games, 
however, if you're developing your own Supercharger game you might
need to add some properties to Stella. See the "Adding Properties" 
section of this guide for more information.

It is VERY important that the "Emulation.CPU" property be set to "High" 
for Supercharger games.  If it isn't the game will not run correctly.  
Stella automatically sets this property if it sees a ROM image who's 
size is a multiple of 8448.


4.0 Playing Games
=================

Once you've installed Stella and have some ROM images you can play 
a game by following the directions for your operating system.

4.1 DOS
-------

The DOS version of Stella expects you to pass the name of the ROM image 
as a command line argument.  For example:

  stella FILENAME.BIN 

This version also supports two command line options -fps and -paddle.
The -fps option can be used to set the number of frames to generate per 
second (defaults to 60).  The -paddle option can be used to specify which 
paddle (0, 1, 2, or 3) the mouse should be connected to (defaults to 0).

4.2 Unix
--------

The Unix version of Stella expects you to pass the name of the ROM image 
as a command line argument.  For example:

  xstella FILENAME.BIN 

This version also supports two command line options -fps and -paddle.
The -fps option can be used to set the number of frames to generate per 
second (defaults to 60).  The -paddle option can be used to specify which 
paddle (0, 1, 2, or 3) the mouse should be connected to (defaults to 0).


5.0 Keyboard Layout
===================

The following keys are used:

  Escape          Quit
  =               Change window size (X windows)

  F1              Select Game
  F2              Game Reset
  F3              Color television
  F4              Black and White television

  F5              Left player difficulty B
  F6              Left player difficulty A
  F7              Right player difficulty B
  F8              Right player difficulty A

Here are the keys to use for the various controllers:

               Left              Left (Alt)            Right
               ----              ----------            -----
  Joystick     w/a/s/d/tab       up/dn/lt/rt/spc       o/k/l/;/j

  BoosterGrip  w/a/s/d/tab/1/2   up/dn/lt/rt/spc/z/x   o/k/l/;/j/n/m

  Keypad       1 2 3                                   8 9 0
               q w e                                   i o p
               a s d                                   k l ;
               z x c                                   , . /

  Driver       a/d/tab           lt/rt/spc             k/;/j


6.0 Mailing List
================

There is a mailing list for Stella.  The mailing list is for discussions
concerning Stella including bug reports, enhancements reports, and general 
usage tips.  Anyone who uses Stella regularly should subscribe to the 
mailing list.

To subscribe to the list send the following message to majordomo@csc.ncsu.edu:

  subscribe stella
  end

Once you've subscribed you can send messages to everyone on the 
list by mailing them to stella@csc.ncsu.edu.  Anything you mail to 
stella@csc.ncsu.edu goes to everyone on the mailing list.  

Make sure you really mean to send your message to stella@csc.ncsu.edu and
NOT majordomo@csc.ncsu.edu (i.e. if it's a mailing list server command it
should be sent to majordomo@csc.ncsu.edu not stella@csc.ncsu.edu).

For more information on using the majordomo mailing list server send the
following message to majordomo@csc.ncsu.edu:

  help
  end


7.0 Known problems with Cartridges
==================================

This section contains information about problems I know about with 
some cartridges:

  * Defender II     - This cartridge is really an F8SC cartridge, 8K with
                      128 bytes of RAM, not an F6SC cartridge.  There is
                      a 16K image of this cartridge floating around that
                      has the right code in it, however, it's the second
                      8K that's needed.  If you're running Unix you can 
                      fix it with the command: 

                        tail --bytes=8192 DEFENDR2.BIN > tmp
                        mv tmp DEFENDR2.BIN

                      If you're running DOS you can fix it by
                      typing what's in <>s below:

                        <DEBUG DEFENDR2.BIN>
                        -<RCX>
                        CX 4000
                        : <2000>
                        -<W2100>
                        Writing 02000 bytes
                        -<Q>

                      (provided by plord@mail.pacificnet.net)
  
  * Stargate        - Same as Defender II above


8.0 Adding Properties
=====================

Properties inform Stella of the "best" settings for a game.  Stella has 
a set of builtin properties that supply default settings for all games 
as well as specific settings for many games.  New properties can be added 
to Stella by creating a '.stella.pro' file in your home directory.

More information to come...


9.0 Property Autodetection
==========================

When Stella loads a ROM image it does the following:

  1) Uses the following default values:

     Display.Format    = NTSC
     Display.YStart    = 38
     Display.Height    = 210
     Display.XStart    = 0
     Display.Width     = 160

     Console.LeftDifficulty  = B 
     Console.RightDifficulty = B
     Console.TelevisionType  = Color

     Controller.Left = Joystick
     Controller.Right = Joystick

     Emulation.CPU         = Auto-detect
     Emulation.HmoveBlanks = Yes
     
  2) Determines Cartridge.Type as follows:

     a) If the name of the file matches any of the known 8K Parker Brother
        games then set the type to E0

     b) Use the "real" size of the ROM image to set the type to either
        2K, 4K, AR, F8, F6 or F6SC

        NOTE: The type is set to F6SC if the size is 16K and the first
              256 bytes are all the same value

  3) Computes the Cartridge.MD5 from the ROM image data

You can see that the guessing isn't all that smart and we can hopefully 
make it better in later releases.  You should also noticed that it doesn't
guess if the cartridge uses joysticks or paddles (it assumes joysticks).


10.0 Acknowledgements
=====================

The following people have had a part in bringing Stella to you:

  Piero Cavina      - Allowed "Oystron" to be included in the Stella
                      distribution (p.cavina@mo.nettuno.it)

  Bob Colbert       - Allowed "Okie Dokie" to be included in the Stella
                      distribution (rcolbert@novia.net)

  Ron Fries         - Author of the TiaSound library

  Aaron Giles       - Maintained the Power Mac version

  Mark R. Hahn      - Allowed "Elk Attack" to be included in the Stella
                      distribution and described the TIA HMOVE blanks

  Kevin Horton      - Author of the 2600 bankswitching method paper

  Erik Kovach       - Maintained the stella game setting files

  Daniel Marks      - Provided code to improve the keyboard joystick support

  Jeff Miller       - Maintained the Windows version

  Bradford Mott     - Maintained the core code, Linux SVGA version and X version

  Jim Pragit        - Creator of "Game Menu" 

  Chris Salomon     - Provided information and code to implement Supercharger 
                      support

  Jason Scott       - Organizer of the property file archive 
                      (needed for versions before 0.7)

  Raul Silva        - Helped with the the design and graphics on the home page 

  Chris Snell       - Maintained a mirror of the Stella FTP site

  Darrell Spice Jr. - Maintained the OS/2 version

  Eckhard Stolberg  - Described TIA bug that produces stars in Cosmic Ark

  Greg Troutman     - Allowed "This Planet Sucks" to be included in the 
                      Stella distribution (mor@crl.com)

  Keith Wilkins     - Maintained the DOS version until version 0.7

  Jeff Wisnia       - Provided technical data sheet for the 6532

Thanks to all the 2600 fans who've kept encouraging us to continue.


11.0 Revision History
=====================

The following is a list of changes to Stella:

  0.7 to 1.0b1: (July 25, 1998)

    * Supports the following controllers:

        Joysticks, Paddles, Booster-Grip, Keyboard and Driving

    * Supports the following bank switching methods:

        2K, 3F, 4K, AR, E0, E7, F0, F4SC, F6, F8, F8SC, FASC, FE

    * Properties are associated with games using their MD5 checksum
      calculated on the entire ROM image

    * Uses the new 'stella.pro' file format for game properties

    * Includes Erik's latest stella.pro properties file

    * New frame rate throttle code for X windows GUI

    * Based on the new and improved M6502 CPU emulation

    * Improvements to TIA emulation

      - Support HMOVE blanks
 
      - Improved Cosmic Ark star field effect

      - Some support for the RESPx multiple sprite trick

      - Support NTSC and PAL palettes
 
    * Improvements to PIA emulation (timing)

    * Improved Supercharger emulation

  0.6 to 0.7: (June 7, 1997)

    * Improved emulation speed of TIA and 6507

    * Added Starpath Supercharger support

    * Added Tigervision bankswitching support (3F bankswitching)

    * Added pause game feature for Unix and DOS

    * VCS files combined into a single builtin property file

    * Added TIA HMOVE "feature" to support Cosmic Ark stars

    * Improved TIA VSYNC code so that it works more like the real 
      thing (0.6 VSYNC code caused the graphics of some games to 
      be off such as Alien and Battle Zone)
      
    * Added two 6507 emulators: one is designed to act more like 
      the real thing, while the other is designed to be as fast as 
      possible (required for Supercharger support)

    * Changed TIA peeking so lower nibble of byte read is the same 
      as the TIA address being accessed (Warlords now works)

  0.5 to 0.6: (January 18, 1997)

    * Fixed collision detection problem (Freeway works)

    * Changed PIA timing code to fix screen jitters

    * Added new bank switching methods: F4SC (Fatal Run), E7 (Burgertime)

    * Fixed some code in the TIA emulation that caused SEGFAULTS

    * Improved frame rate throttling code to work better on fast machines

    * Improved TIA emulation (missle graphics are fully emulated now)

    * Included Bob Colbert's "Okie Dokie" game

    * Uses version 1.1 of the TIA Sound library by Ron Fries

  0.4 to 0.5: (November 17, 1996)

    * Added sound support

    * Added new bank switching methods: F8SC (Defender II), FASC (CBS RAM+)

    * Changed TIA so peeking $E and $F return $F not $0 for Haunted House

    * Changed PIA timing code to fix screen jitters in Frogger

    * Addressing scheme rewritten

    * Optimized 6507 memory accesses

    * Randomized memory in PIA upon startup

    * Removed auto-disabling of objects at the start of a frame 
      so you can't walk through walls in Adventure

    * Changed the X windows terminal update method to make it faster and
      easier to understand

  0.3 to 0.4 (August 28, 1996):

    * TIA code has been optimized some

    * Some games can be played with just a ROM image

    * New search method for ROM images (no more STELLA_PATH)

    * Delta screen update supported

    * Better error handling added to the "core"

  0.2 to 0.3 (July 12, 1996):
  
    * Keyboard joystick support is much better (Daniel Marks)

    * Paddles are now supported via the mouse (Bradford Mott)

    * Many portability issues have been resolved (Keith Wilkins)

    * Fixed a problem with the 6507 ADC and SBC instructions that caused
      some games (Enduro) not to work correctly (Bradford Mott)

    * Power Macintosh port (Aaron Giles)

    * Windows 95 & NT port (Jeff Miller)

