Atari800 source with A8CAS patch.
Version 1.2.0 - for use with liba8cas >= 1.3.0
Copyright (c) 2010-2011 Tomasz Krasuski (krotki (at) poczta.onet.pl)
A8CAS homepage: http://a8cas.sourceforge.net/

Here is the current (as of 2011-09-24) source of the Atari800
emulator, patched with new features related to cassette manipulation.

I. Installation

1. Have liba8cas binary and headers installed.

2. Compile the emulator using the following commands:

cd src
./autogen.sh
./configure --target=<choose target> <options as needed>
make

II. New features

The patch provides a new "Tape Management" menu in the emulator's Main Menu
(F1) instead of the old "Select Tape Image" option. Access to this menu is
also possible by the Alt+T shortcut.

The patch allows the user to load tape images from sound files (WAV/Ogg Vorbis
/FLAC/etc., but _not_ MP3), CAS, HEX, FSK files, and raw files (see the A8CAS
homepage for details on file formats). Writing to all of these formats is also
supported.

Emulation of "turbo" hardware modifications (currently AST and Blizzard) is
emulated - it is possible to load turbo tapes from CAS and HEX files, and,
experimentally, from sound files. Saving turbo is currently not supported.

It is possible to create a new tape - a CAS image, a WAV sound file, or a raw
file.

Is is also possible to rewind a tape loaded into the emulator (by giving a
block number). So tape reading/writing can start in an arbitrary point in a
tape file.

Support for audio playback while loading/saving tapes is given. Volume of the
audio is configurable. Stereo tapes with additional audio track are also
supported. (Audio playback is only available for targets that support
"synchronized sound" - currently that is only SDL.)

During loading/saving from tapes, a tape activity indicator is visible.
It can also display current block number (see Display Settings->Show sector
counter).

Fast tape loading/saving using SIO patch is supported - currently only for CAS
and HEX files. Beware however that tapes with custom loaders won't load
correctly with SIO patch active.

III. Usage

The new "Tape Management" menu holds the following options:

     C:<path to CAS file>

Press Enter to attach a tape image to the emulator. Supported formats are: CAS,
HEX, FSK, and various sound files (WAV, ...). Press Backspace to unload a file.
When a "*" appears on the left of "C:", that means the file is read-only
(examples are Ogg-Vorbis and FLAS sound files).

     Description:
     <tape description>

This displays a description of the loaded tape file.

     Position: xx/yy blocks/secs

This displays the tape's current position, counted in blocks (for CAS/HEX
files) or seconds (for sound files). The file's length is also displayed.
Press Enter and then give a block number, to rewind the tape to that block.
Press Enter and then type "end" to fast-forward the tape to its end (after the
last block). Press Backspace to rewind the tape to the beginning.

    Record: Yes/No

This is a virtual equivalent of a "Record" button in an Atari cassette
recorder. Set "Record" to No when you want to load from a tape, or to Yes
before saving. Beware however! that trying to load from tape with "Record" set
to Yes will cause deletion of data in the tape file! It's just like on a real
recorder.
For your convenience, "Record" is automatically set to "No" after rewinding.
Note: With SIO patch active, Record is activated automatically when a user
starts saving to tape.

    Make blank tape

Creates a new empty tape image. There is a choice of three formats: CAS image,
WAV sound file, or a raw file. The user has to give the filename, and the
tape's description (which may be left empty). The new file is automatically
attached as the current tape, and "Record" is set to Yes.

    Tape sound volume

Only in SDL target. Controls volume of playback of cassette's audio when
loading/saving a tape. Works for all formats. Use it to adjust volume of the
additinal audio track on stereo tapes.

    Mute: Yes/No

Mutes the tape sound completely.

    Crosstalk from data track

Only in SDL target. Controls amount of audible crosstalk from the data track.
Normally the data track is only slightly audible, or not at all. Setting this
option to a non-zero value helps in finding a beginning of a program stored on
a tape while rewinding. The default value is 5, which means that the data track
is slightly audible.

    Turbo system: None/Atari Super Turbo (XC12)/Blizzard/Manual/
                  Manual (reversed)

Switches the type of turbo hardware modification installed in the tape
recorder. This matters only when loading from sound files - when loading from
CAS/HEX, a turbo system is detected automatically.
For details on turbo modifications, see the A8CAS website at
http://a8cas.sourceforge.net/turbo.html

   Turbo active: Yes/No

Shows state of the cassette turbo system. if the "Turbo type" option is
set to "Manual", then the user must switch this option to "Yes" before
loading from a turbo tape (just like in reality, the user had to use a switch
installed in a tape recorder). For other turbo types, turbo switching occurs
automatically in software, so this option may be used only to check the
current state of the turbo system.
This option is ignored when loaded from CAS/HEX tapes.

   Turbo error tolerance

Adjusts "error tolerance" when loading from a turbo tape. Increase this if
your tape does not load properly; it might or might not help. However if you
set the tolerance too high, the emulated tape recorder may stop receiving
the tape's data at all.
This option is ignored when loading turbo tapes in CAS/HEX format. It also does
not affect loading tapes in non-turbo format.

You can go to the "Display Settings" menu and turn the "Show disk drive
activity" and "Show sector counter" options ON - that will cause Atari800 to
display the activity indicator with the current block number while loading/
saving a tape.

If a tape fails to load properly, try loading it again with SIO patch turned
off. Some programs use custom loaders as a form of copy prevention - with such
tapes loading with SIO patch will not work.

IV. Known bugs

POKEY serial input/output emulation is slightly broken - the changes related
to tape emulation have caused some disk images to stop functioning. The known
affected disks are all 4 Epyx releases of Lucasilm games. These disks work
correctly only in the stantard Atari800.
