
z26 -- An Atari 2600 Emulator (1.35) -- Sep. 08, 1999
-----------------------------------------------------

Home Page:  http://www.whimsey.com/z26
Contact:    z26@whimsey.com


Copyright/License
-----------------

z26 is Copyright 1997-1999 by John Saeger and is a derived work with many
contributors.  z26 is released subject to the terms and conditions of the 
GNU General Public License Version 2 (GPL).  z26 comes with no warranty.
Please see the included COPYING.TXT for details.  Source code for the 
current release is available at the home page listed above.


What's New in this version?
---------------------------

Some very minor changes to video mode code, but the main purpose of this
release is to bring z26 into conformance with the terms and conditions of
the GNU Public License (GPL).  I should probably have done this back around
version 0.88 when I included Ron Fries' TIAsound code, but unfortunately I 
didn't actually read the license until a couple of days ago.  Sorry.


Introduction
------------

z26 is a small, fast, easy to use Atari 2600 emulator that runs on a DOS
platform, including Windows 95 and Windows 98 DOS boxes. z26 supports 
full Atari 2600 sound emulation using a Sound Blaster, including the
2600 digital voice.


System Requirements
-------------------

z26 will run at full speed on virtually any Pentium class platform with
a reasonable (PCI or better) video subsystem. It also runs fine on most
AMD 5x86 or Cyrix 5x86 machines (with VLB video), and even on some fast
486's.

z26 supports the use of a Sound Blaster card. It requires a Sound
Blaster with at least version 2.00 DSP. This includes SB 2.0, SB-PRO,
SB-16, and some older Sound Blasters. It should also run on more recent
models of Sound Blaster, and many clones as well. I've heard it works on
an Ensoniq PCI sound card.

If you don't have a Sound Blaster or a compatible sound card, z26 will
make an attempt to use the PC speaker to generate sounds. Try not to
expect too much from the speaker though.


Newbies
-------

Now that you have z26, the next thing you need to do is find the ROM images.
These are the actual games.  z26 is not a game, z26 just lets you play them.
So go to my links page:

http://www.whimsey.com/z26/z26Links.html 

and follow some of the links that have (ROMS) next to them.  I can't say
exactly where on these sites you'll find them but I've found them 
on these sites in the past.  After you get them you'll need to unzip them.
They'll be in a file with a .ZIP extension.  So you'll need PKUNZIP or some
other unzipping utility to extract the ROM images from the .ZIP file.  The
actual ROM images have a .bin extension.  So after you get the .bin files
into the same directory as z26, open a DOS box (if you're not already
in one or running DOS) and follow the next step... Startup.


Startup
-------

At the command line prompt type:

>z26

You'll be presented with a list of ROMs that you can run.  You can navigate
the list with the arrow keys or Home/End to get to the beginning/end of the
list.  You can also type the first few characters of a ROM name and the cursor
will position itself on the first ROM image that matches the characters that
you've typed.  The currently matched character will be highlighted.  Or if you
want to run a random ROM, hit the backslash key and the cursor will be
positioned randomly.

You can also run z26 from the command line prompt.  Type

>z26 filename

where filename is the name of a "standard" Atari 2600 .bin file. For
example: 

>z26 demonatk.bin

will run Demon Attack.  If you don't include the .bin extension, z26
will automatically append one for you.  So you can also type:

>z26 demonatk

to run Demon Attack.

You're on your own finding the .bin files. But if
you follow the links on the z26 links page, eventually you may get lucky.


Getting Help
------------

After typing z26 without any parameters, type F1 to get more help.

You get some help screens describing the available controls and some
command line options.  Press PgUp and PgDn to scroll through the screens,
and Esc to quit.


Configuring z26
---------------

If you type z26 with some command line switches (described below) and don't
include a filename, the command line switches are remembered as emulator
defaults.  That way you don't have to keep typing in your favorite command
line options.  These defaults can still be overridden with command line
switches that you include on command lines that include a filename.


Joystick
--------

z26 automatically detects a PC joystick and uses it to emulate an Atari
joystick if one is present. Calibration is not required. Just make sure
the joystick is centered when the emulator is started. Button 1 is the
fire button. The keyboard controls still work even if a joystick is
present. To force keyboard only mode use the -j0 command line switch.
Some games like raiders.bin use the "wrong" joystick.  To reverse the
joysticks use the -j2 command line switch.


Paddles
-------

z26 uses the keyboard or the PC joystick to emulate the Atari game paddles.
They function in parallel as with Atari joystick emulation.  z26 automatically
supports the following games as paddle games: actionmn, bachelor, bachlrtt,
blakjack, breakout, bugs, casino, circatri, dem2dmds, eggomana, encontl5,
gijoe, guardian, kaboom, muscmach, nightdrv, picnic, piececke, solrstrm,
stplchse, strtracr, superbrk, tacscan, vidolymp, warlords and warplock.  
You can adjust the sensitivity of the emulation with the -p<n> switch.  
The default value is three.  Larger values (up to 15) make the paddle move 
faster.  You can also control which paddle is emulated with the -k<n> switch.  
Values range from 0-3.  Note that if z26 doesn't automatically support a game
as a paddle game, you must specify both -p<n> and -k<n> to get paddle support.


Video Modes (correct play speed)
--------------------------------

In order to provide good emulation of some of the Atari's more subtle
graphics effects, z26 synchronizes game play with the refresh of the VGA
screen. The original VGA video mode refreshes at 70Hz which makes game
play slightly faster than a real Atari. By default, z26 uses a video
mode that refreshes at 60Hz (Video Mode 3) to provide correct play
speed. If you have a problem with this mode you may select the original
70Hz mode or one of the other modes with the -v<n> command line switch.

To provide accurate emulation of PAL games, z26 also supports a number
of 50Hz video modes.  You may select them manually with the -v<n> command
line switch, or you may have them used automatically whenever z26 is running
a recognized PAL game by specifying the -5 command line switch.  The -5 switch
is required since the 50Hz modes are not universal.  If you have problems
with PAL games, don't specify -5.


Video Mode 0
------------

This is the original 70Hz mode 13 VGA mode.


Video Mode 1
------------

This mode is full size on older fixed-frequency monitors but is usually
somewhat shorter than normal on modern multi-frequency monitors.
However, you may be able to adjust the controls of the monitor to get
the correct height.


Video Mode 2
------------

This mode is shorter and narrower than normal. If you can't, or don't
wish to make an adjustment to your monitor to get Mode 1 looking right,
or if you just like the smaller size better, you can use this mode to
get the correct aspect ratio.


Video Mode 3 (default)
----------------------

This mode is just like mode 2 except it has 4 additional scan lines for 
a total of 204.  PCX screen capture will still only capture the first
200 scan lines.


Tall Video Modes
----------------

Tall modes are supplied for playing games taller than 204 scan lines.  They
are slower then the previous modes so there may be some degradation of
performance or graphics may appear less smooth in the following modes if
you have a slower computer.  PCX file capture doesn't work with these modes
and they won't run in windowed mode under Windows 95.  They run great
full-screen under Windows 95 though.


Video Mode 4 (Mode-X)
---------------------

This is the "standard" 320x240 Mode-X with square pixels.  It's included as
a backup just in case the other video modes for tall games (described below)
don't work.  It will display up to 240 scan lines of a game.


Video Mode 5 (default for tall games)
-------------------------------------

This is the default video mode for tall games.  It's 320x240 with the aspect
ratio adjusted to match video mode 3.  Thus games have the same "look" in
either mode 3 or mode 5.  Around 50 - 60 games start up in this mode by 
default.  It displays up to 240 scan lines and runs at 60 Hz.


Video Mode 6 (scanline mode)
----------------------------

This 320x240 mode actually has a resolution of 320x480 but only every other
line is used to create the effect of scanlines on a TV set.  The aspect ratio
matches mode 3, it can display up to 240 scan lines and it runs at 60 Hz.


Video Mode 7
------------

This mode is 320x480 and can display up to 480 game scan lines.  The lines
are shown half-width so the aspect ratio matches mode 3, but the image
is half-size.  All the pixels are there though.  All scan lines generated
by the game are displayed without cutting the top or the bottom of the
game off, so you can see absolutely everything, but this mode requires the
most CPU horsepower of all of the video modes.  This mode runs at 60 Hz.


Video Mode 8 (intense scanline mode)
------------------------------------

This mode is not universal.  You need a good quality, multi-frequency monitor
that can refresh at 120Hz, and even then your results may vary.  It's a real
320x240 mode that uses the VGA hardware to get the monitor to display the
scanlines.  It refreshes at twice the normal rate and therefore (at least on 
my monitor) produces a brighter image.  Games run at the normal 60Hz however.

On my monitor (ADI-5G), this mode displays full-size by default, but I like
to adjust it so that the image is smaller and the scan lines are closer
together.  When I do that, I get a bright and realistic simulation of a
TV screen.


Video Mode 9
------------

Another tiny mode like mode 7 but with the image on left side of screen.


50Hz Video Modes for PAL games
------------------------------

z26 supports an assortment of 50Hz video modes for use with PAL games.  These 
modes are all 256 scanlines tall so even the tallest PAL games like aciddrop
and seamnstr can be seen completely in a more or less normal size video
mode.  Unfortunately not all monitors can be used with these modes.  Old
fixed-frequency monitors have problems with them, but modern multi-frequency
monitors that are capable of syncing at 50Hz are pretty common so I expect
most people won't have problems with them.  

To enable these video modes to be used automatically whenever z26 is running
a recognized PAL game, you must specify the -5 command line switch.  z26 will
then choose a 50Hz video mode that most closely approximates the 60Hz mode 
that you've selected with the -v<n> command line switch.


Video Mode 10 (50Hz)
---------------------

320x256 50Hz mode for PAL games.


Video mode 11 (50Hz narrow)
---------------------------

Like video mode 10 but a little narrower.


Video mode 12 (50Hz scanline)
-----------------------------

320x256 scanline mode similar to 60Hz mode 6.


Video mode 13 (50Hz tiny)
-------------------------

A tiny 50Hz mode similar to 60Hz mode 7.


Video mode 14 (50Hz intense scanline)
-------------------------------------

320x256 intense scanline mode similar to 60Hz mode 8.  Monitor refresh rate is
100Hz but games run at 50Hz.



Switching Video Modes on the Fly
--------------------------------

You may change video modes while playing a game by pressing one of the
number keys on the keyboard (not the keypad).  Pressing numbers 0 through
9 are supported.  If you're running an NTSC game (60 Hz) the number of the key
corresponds to the video mode number.  If you're running a PAL game, the
numbers are remapped to the 50Hz mode that is closest in appearance to the
corresponding 60Hz mode.


Are these video modes safe?
---------------------------

Of course I make no guarantees. But as far as I know, with the exception of
mode 8, the 60Hz modes work almost everywhere that the original 70Hz mode 13
video mode works. They all run on old fixed-frequency monitors as well as on 
modern multi-frequency monitors.  If you find an exception please let me know.

The 50Hz modes are less universal.  They require a modern multi-frequency monitor
capable of syncing at 50 Hz.  They typically don't work on old fixed-frequency
monitors.

In any case, monitor damage seems unlikely. If you suspect a problem, 
press <esc> to restore your monitor to text mode, or just turn the monitor
off.


Adjusting Your Monitor
----------------------

If you have a modern multi-frequency monitor, one or more of these modes
may require some adjustment to achieve a good appearance. Modern
monitors often have the ability to save multiple settings for multiple
video modes. So it may be possible to adjust these modes without
disturbing the adjustments for your other display modes.


Adjusting Vertical Position
---------------------------

You can scroll games up and down on the display with the <PgUp> and <PgDn>
keys.  You can return to the default display position by pressing the
<Home> key.  You can force the game to start displaying from a particular
scan line from the command line with the -u<n> command line option.
The default starting line is typically near 39.  So adjust from there.

Note that the <PgUp> and <PgDn> scrolling doesn't work for frogpond.bin
or pharhcrs.bin.


Forcing Black and White mode
----------------------------

You can force a game to start in black and white mode with the -b command
line switch.


Colors
------

z26 supports two different sets of colors.  The most common games shipped
in North America use the so called NTSC colors.  Games shipped in other parts
of the world use the so called PAL colors.  z26 typically detects the correct
colors to use based on which scan line a game starts displaying at.  If the
display starts at scan line 54 or higher, z26 uses PAL colors, otherwise NTSC
colors are used.  There are some exceptions, but I'm not an expert on which
games are PAL and which ones are NTSC so you can override the colors chosen
by z26 with the -c<n> command line switch.  -c0 forces NTSC, and -c1 forces
PAL.  Feel free to let me know if you find a game that z26 picks the wrong
colors for.

If you specify -c1 to force PAL colors, and you've specified the -5 switch
to enable 50Hz video modes, z26 will use a 50Hz mode to play the game.


Adjusting Game Speed
--------------------

By default, games run at monitor speed.  If for some reason this doesn't
work, or you want to try other speeds you can use the -r<n> command
line switch.

If you don't specify a number <n> (-r) the game runs as fast as possible.
Otherwise, it runs at <n> frames per second.  Normal speed is 60 frames
per second.  Note that <n> must be between 1 and 254 inclusive.


Measuring Emulator Performance
------------------------------

With the -f<n> option, you can run the emulator for <n> frames and the number
of frames per second that the emulator ran at is printed out.  If you also
specify the -r option to run at maximum speed you can see the maximum frame
rate that the emulator can run a particular game at.  You can also do things
like turning off joystick support and sound for maximum performance.


Troubleshooting Sound Setup
---------------------------

If you run z26 and don't hear sound when you think you should, the first
thing to check is to make sure the volume is turned up. If you're
running under Windows 95, use the system volume control and make sure
the Mute box is not checked. Also make sure the Wave Balance volume is
turned up and that its Mute box is not checked. If you're running under
DOS, use the volume control (mixer) program that came with your sound
card.

Failing that, try running z26 with the -s0 (show sound diagnostic messages) 
command line option.  Note that you must specify a filename with this option.

If you get the message "Sound Blaster too old!", maybe it's too old. You
need a Sound Blaster with at least version 2.00 DSP to run z26.

If you get the message "Sound Blaster not found." then either you don't
have a Sound Blaster, or there's a problem with the environment string.
z26 expects you to have an environment string set with the configuration
of your Sound Blaster. If you're running under Windows 95, this usually
is not a problem because Windows 95 seems to set up the environment
string automatically. If you're running under DOS, the environment
string is usually set up during the Sound Blaster installation
procedure.

To find out if your environment string has been set, type

>set

at the command line prompt.  Or type

>set | more

if there's too much information to display on a single screen.

You should see an entry something like this somewhere in the output:

BLASTER=A220 I10 D1 H7 P330 T6

If you don't, that's the problem. Otherwise the information in the
environment string may not match the actual settings on your Sound
Blaster. In either case, re-do the installation procedure for your sound
card to correct the problem, or set up the environment string manually.


More About Sound
----------------

z26 sound generation is based on the TIASound library by Ron Fries. 
According to Ron, the optimum playback sample rate is 31400 samples per 
second. This is the "natural frequency" of the Atari, the frequency at 
which the sound generator in the Atari originally ran. So if your 
Sound Blaster is capable of playing sound at this rate (and most modern
Sound Blasters are), we use this rate. There are a few older Sound 
Blasters that z26 supports that won't run at this rate. These Sound 
Blasters are run at a rate of 15700 samples per second. This causes 
only a small degradation in the quality of the sound.

We also generate sound in real time. This means we can use very small 
sound buffers. This allows z26 to be more responsive to rapid changes 
in the sound that some games call for. z26 currently uses a sound buffer
of 256 bytes divided into two parts, giving it an effective buffer size 
of 128 bytes.


Forcing Sound Options
---------------------

To force z26 to use the PC speaker to generate use the -s1 option.
To force z26 to run sound at 15700 samples per second (needed for some
clone cards) use the -s2 option.


Digital Signal Processing
-------------------------

z26 supports digital signal processing (DSP) on the sound. This is to
reduce distortion on some clone sound cards, but also causes the sound
to more closely approximate the sound of an old TV set for those users
that prefer a more "classic" sound. To turn on DSP use the -d<n> command
line switch. If n=1 the setting is low, if n=2 the setting is high.


Offbeat Cartridge Formats (Bank Switching)
------------------------------------------

z26 currently supports the following schemes:

1.  Standard 8K bank switching.
2.  Standard 16K bank switching.
3.  Atari Super-Chip.
4.  CBS Ram Plus.
5.  Parker Brothers 8K.
6.  TigerVision 8K.
7.  Activision FE 8K.
8.  Atari 32K.
9.  M-Network 16K.
10. Pitfall II.
11. Starpath (limited).

Support is automatic.  z26 knows how to recognize cartridges.

For Starpath games, we only support single-load games and the .bin
file must be 8448 bytes big.


PCX Screen Capture
------------------

Pressing the = key during game play causes a .pcx file with a screen
image to be placed in your directory. Filenames are z26p0000.pcx,
z26p0001.pcx etc. The filename restarts at z26p0000.pcx causing old
versions to be replaced each time you restart the emulator.

PCX screen capture only works in video modes 0-3, and it only captures
the first 200 lines of the game.


Warranty
--------

BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.


Credits
-------

z26 is based on A26 version 0.15 (C) 1996 by Paul Robson (autismuk@aol.com).

Credits for other people who have supplied technical help or contributed 
code may be found by running z26, pressing F1 and scrolling down to the 
Credits section.

Thanks to everyone else who has helped with comments, suggestions, bug
reports, information, supplies and testing: 

Junky, Kevin White, The Boatwrights, Miguel Guzman Centeno, 
Peter, Jay C. Heil, Zoop, Rob Anderson, Zophar, Peter Vogels, 
Stephan, Xahji, Ricardo Martinez Garza, Stephano Camarri, 
Peter Betz, Piero Cavina (Oystron! Helped find multiple missile bug.),
Nick S. Bensema, Erik Mooney, Glenn Saunders, Abraham Velazquez, 
Christian Schaefers (Z-Type), Freirias, Brian Deuel, Chris Platt,
Israel Geron T., jose roberto rodrigues, Dan Meyer, Martin Schaefer,
Ummagumma, Digitoxin, Michael Walden Jr. (The most elaborate suggestion 
list!), Gilamonster, Gerald Gorman, Francisco Athens, Lex Nesta, Ben,
Gerald Gray, Jose Pedro, Tadd Underhill, Ejber Ozkan, Lord Mhath,
Larry Scott, Brad Komgenick, Michael J. Mika, Ettore Perazzoli (VICE), 
Stephan Eder, Andreas Boose (VICE), David Gray, jimnav, 
Dr. Simone Zanella, Brad Thomas, Jeff Cockayne, Sam Miller, EmrldSword,
justin martin, Justin Scott, Jason Berk, Luis Graterol, Ricardo Soto,
Brian Smith, Sam Hard, Keith Merizalde, Nate Marigoni, Kurt Woloch,
GreenImp, M. C. Silvius, Matthew Conte (Nofrendo), Jason Barisoff, 
Rick Vasquez, Marco Turconi, Kalik, Christopher Warren, Curt Vendel, 
Roberto Sidney Teixeira, raverpup, iCeFiRe, Chism, Sascha Reuter,
Craig Tildesley, Michael Prentler, Cody B, Thom Rechak, Cam, Jason,
Keith Weisshar, Robin Gravel, Thom Bone, Mrfriend, Edwin Helsloot,
C J Biro, Michael Monson, Justin Rodriguez, Francesco Azzurri,
Greg Bendokus, Bruce Clarke, John Dullea (PCAE), Tim Boston,
Chris Ainsley, Ricardo Henrique Tabone, and Seth Kintigh.

And thanks to Len Shikowitz for *complaining* well beyond the call of duty.
Definitely "the most obstinate, yet sincere, tester." :)

At some point I stopped keeping the list of everyone who have sent me
suggestions up to date.  I apologize for that.  But thanks to the folks
who have continued to send in suggestions, even though they didn't make
the list.

Thanks!!!
