		Snes97: Linux 0.0.15 Released 30th April 1997
		---------------------------------------------

Gary Henderson (gary@daniver.demon.co.uk)

This is a port to Linux and Sun Solaris of Snes97, the Super Nintendo
Entertainment System (SNES) emulator for Windows 95, originally written by
Jerremy Koot but now including lots of code and features from Snes96.

About 60% of the ROMs that people have tested so far seem to work OK.

It terms of what SNES hardware is actually emulated, most graphics registers
are emulated. There is no sound emulation at all and the lack of this is the
major cause of ROM failures.  The background colour addition and subtraction
are also not implemented. A few other odd features that no ROMs seem to use
are also not emulated: direct colour output, interlaced display, pseudo
horizontal 512 pixel mode.

Snes97 currently is slightly slower and runs less ROMs images than Snes96:
Linux, so it recommended you use Snes96 for the moment.  Also, I'm developing
on Snes96 and then eventually moving the code to Snes97, so new features that
I develop will appear in Snes96 first.  Features like mode 7, clip windows,
H-DMA, mosaic effect, game snapshots all appeared on Snes96 first. However,
having said all that, Snes97 uses different APU skip algorithms, so it is
possible that some games which fail on Snes96 might work with Snes97.

Snes97 snapshot save games files are not compatible with Snes96 snapshot files
and are also not be compatible between different Snes97 versions - unlike
Snes96.

What you will need
------------------

The Linux port requires a Pentium-class PC running Linux with at least 16Mb of
RAM and a stable, recent kernel version. The Sun Solaris Sparc port requires a
fast Sun Sparc workstation running Solaris 5.x.  Both the UNIX ports are
dynamically linked and will require access to various shared libraries. Use
ldd snes97 to make sure you have all the required libraries on your system.
 
The Solaris port and the Linux X11 version will also need an X server running.

Access to SNES ROM images in *.smc or *.sfc format will also help otherwise
you will have nothing to run! Several public domain images are available from:
http://www.rollanet.org/~khigh/emulator.htm

Some commercial ROM images are available via the Internet, try following links
from:
http://members.aol.com/zorkwiz/snesrom.htm

Please note it is illegal in most countries to have commercial ROM images
without also owning the actual SNES ROM cartridge.

PLEASE DO NOT ASK JERREMY OR MYSELF FOR ROM IMAGES OR FOR INFORMATION ON WHERE
TO GET MORE, WE DO NOT KNOW AND WILL IGNORE ALL SUCH E-MAILS OR, IF WE ARE
HAVING A PARTICULARLY BAD DAY, FORWARD THE E-MAIL TO THE EMULATOR ABUSE
DATABASE.

Starting the emulator
---------------------

From a shell just type:
snes97 <ROM filename>

Some command line flags are available:

-i Inform emulator ROM image is in interleaved format.
-f <frame skip count> (1)		See "Speeding up the Emulation" below
-m <0-4> (Linux S-VGA) Select screen mode (0), try -m 2
   to see if its compatible with your system, it gives a slight emulator
   speed increase.
-ss <0-3> SPC-700 skip wait method (0)
-s Swap emulated joy-pad 1 and 2 around.
-F Force Hi-ROM memory map for ROMs where the Hi-ROM header test fails.
-o Enable old-style joy-pad emulation (required by a few ROMs)
-p Fool ROM into thinking this is a PAL SNES system.  (not usually
-H Turn off the H-DMA emulation (on)

Linux port only:
-4 Joystick connected to computer has 4 buttons.
-6 Joystick connected to computer has 6 buttons.

While the emulator is running:
'Escape'                quit the emulator

Joy-pad 1:
'up' or 'u'             Up direction
'down', 'j' or 'n'      Down direction
'left' or 'h'           Left direction
'right' or 'k'          Right direction
'a'                     TL button
'z'                     TR button
's'                     X button
'x'                     Y button
'd'                     A button
'c'                     B button
'Left Control' or 'Left Meta' Start button
'Left Shift'            Select button

Joy-pad 2:
'Keypad 8'              Up direction
'Keypad 2'              Down direction
'Keypad 6'              Left direction
'Keypad 4'              Right direction
'Insert'                TL button
'Delete'                TR button
'Home'                  X button
'End'                   Y button
'Page Up'               A button
'Page Down'             B button
'Right Control' or 'Right Meta'	Start button
'Right Shift'           Select button

'0'                     Toggle H-DMA emulation on/off.
'1'                     Toggle background 1 on/off (useful for debugging and
'2'                     Toggle background 2 on/off  speeding up the emulation)
'3'                     Toggle background 3 on/off
'4'                     Toggle background 4 on/off
'5'                     Toggle sprites (OBJs) on/off
'6'                     Toggle swapping of joy-pad one and two around

'F1'-'F10'		Load snapshot #n of game in progress
Shift 'F1-F10'		Save snapshot in slot #n of a game in progress.

Joystick Support
----------------

The Linux port of Snes97 supports one or two 2-button joysticks, or one
4-button or 6-button joystick - this limitation is imposed by PC hardware.
Also required is the kernel to have the joystick driver compiled in or loaded
as a module to enable Snes97 to access the joystick(s).  The driver source
code is available from:
http://sunsite.unc.edu/pub/Linux/kernel/patches/console/joystick-0.8.0.tar.gz
Don't forget to also make the two devices in /dev - /dev/js0 and /dev/js1 and
make them readable by everyone; documentation supplied with the driver gives
details of this.

On a 2-button joystick only the A and B SNES buttons are available, the
remaining 4 can still be accessed via the keyboard.

The following diagram showing you the button layout for 6-button PC joy-pads
that look similar to real SNES joy-pads:

     ---TL---           ---TR---

        ^                  X
        |
     <-   ->            Y     A
        |       /  /
        v                  B


Make sure the joystick is centred or no buttons pressed for joy-pads when
the emulator is first started to enable auto-calibration to work.

S-VGA Full-Screen Mode
----------------------

The Linux port of Snes97 is supplied as two binaries: snes97 for the
X Window System version and ssnes97 for the S-VGA 256x256 full-screen version.

The S-VGA version needs root permissions so it can write to the PC video
registers to change screen modes (the X server has the same problem). You can
either run as root (not recommended) or set the binary to run set-uid root as
follows:

Log on as root or su to root.
Change to the directory where the ssnes97 binary is stored.
Type:
chown root ssnes97
chmod 4555 ssnes97

Now the binary can be run by an ordinary user in much the same way the
X server can. The default VGA screen mode is 320x240x256 mode-X, which should
work on any system. However, mode-X slows down the emulator a little so you
might what to try using the -m 2 command line flag to see if the slightly
faster 256x256x256 screen mode is compatible with your system.

Speeding up the Emulation
-------------------------

Try the following command line flags:
-f <frame skip count> (default 1: only every other frame is rendered and
		       displayed)
	Increasing this value will speed up the emulator but make screen
	updates more jerky.

-m <screen mode> Some screen modes allow faster screen update than others,
        try -m 2 to see if the faster, non-mode X VGA mode is compatible with
        your system.

Turning off some of the background layers by pressing '1' to '4' also speeds
up the emulator.  As always, you could try running the emulator on a faster
machine!

Credits
-------

Many thanks must go to Jerremy Koot (jkoot@euronet.nl) because without all his
hard work on the original Snes96 Windows 95 version and continuing hard work
on the Snes97 version the Linux and Solaris ports would not exist.

Thanks also to Lord ESNES for his many discoveries and for a person who
shall remain nameless, for his continuing quest for SNES information on my
behalf.

SNES is a trademark of Nintendo. 
Sun, Solaris and Sparc are trademarks of Sun Microsystems, Inc.  

------------------------------------------------------------------------------
Gary Henderson (gary@daniver.demon.co.uk)
