AYPLAY V0.1 by James McKay (C) 1997
===================================
Date : 05/08/1997


V0.1 Features:
==============
* Some SB bugfixes for Ensoniq, PAS and other soundcards.

* That's it.


This software allows you to play AY-3-8912 Spectrum tunes through the SB,
output can be up to 44Khz, you can also output the sound to a VOC file.
It's a bit like SIDPlay (or PlaySID) in operation.  This program is for DOS,
uses non-portable assembly code (for some parts) and is proud of it!

This is basically a snippet of the current version of x128, which features
the same sound routines.

Also features:

* No scrolly.

* No background processing, multitasking or anything like that.

* No nothing!


Requirements
============

A SB 2.0 or above, although an SB 2.0 may not be able to go above 22Khz.
A 486 can handle up to 44Khz, maybe a 386?  If the PC is too slow, then fuzz
and crackle will creep into the tune, try using a lower sampling rate.

NOTE: Depending on your soundcard, you might find the occasional time
where you start it up and the tunes sound fuzzy, even if you have a fast
enough machine. This is an as yet undiscovered DMA initialisation bug, so
just try quitting and restarting AYPlay again.

MAKE SURE THAT YOU HAVE DOS4GW.EXE IN THE PATH OR IN THE DIRECTORY.

What files can it play?
=======================

The tunes that this can play are those that are used on the Amiga's DeliAY,
part of the DELI-Tracker.  On the Amiga they would be called something like:

AY.NeverEndingStory

but for this you'll just have to rename it to:

NEVEREND.AY

Only files with a .AY extension will be accepted, also only files of the type
ZXAYEMUL will work.  Note, "ZXAYEMUL" are the first 8 bytes of the file.


Controls
========

F1 - Help.
F5 - Load.
F10- Quit.
F11- Sound Options.
Cursor Left - Play the previous tune.
Cursor Right - Play the next tune.


F1 - Help.
* You can select all the options from here, but it serves the additional
  purpose of allowing you to start the VOC file output exactly from the start
  of a tune.  So F1, load tune, select tune, sound options, open VOC, type
  name, Esc, Esc.  You'll see what I mean!  Selecting a tune is done by going
  to "Tune :" and pressing left or right.

F5 - Load.
* Just select the file.

F10- Quit.
* An immediate quit without prompting for confirmation.

F11- Sound Options.
* Open/Close VOC file.
* Open/Close PSG file.

When opening a file the extension is automatically added, so you don't need
to type it.  You may be prompted if you want to overwrite an existing file,
can you figure out what to do?  If you quit the emulator then all files will
be closed even if you had forgotten to do it yourself.

The VOC file is saved at the same sampling rate as is being played, it is
also mono, unpacked and 8-bit.  Technically, it consists of one big block.

A PSG file is an old file format which just takes the register outputs of the
AY chip and notes interrupt positions, the PSG file format went through many
changes in it's tiny lifespan, and this is a really old one - there is no
info in the header.  The only purpose it serves is to be used with PSG2YM
(available separately) which allows you to play the tunes on the STSound
program.

There are also PSG players written by some people, but some of them don't
actually play PSG files anymore!


Command Line
============

If you enter no parameters then the loading menu pops up automatically.

/?  - Lists available options.
/hz - Select sampling rate, anything from 4000 to 45454 is accepted.
      The default sampling rate is 22050.
/sbclone - If you are trying to go above 22050hz and you do not have a 100%
      SB or compatible, then it may not recognise the Auto-Init High Speed
      DMA command (0x90), if you find that your PC completely locks up when
      you try to go above 22050hz then use the /sbclone option as well.

You can also do:

AYPLAY tune.ay

And it will load and play without going to any menus.


AY File Format
==============

I'll leave this for some other time....


Credits
=======

James McKay (me).

Duncan McKay (web page designer).

SB playing library generously donated from Tomaz Kac's PlayTZX utility.

The square wave generator, random number generator and method of counting are
from Ville Halik's AY emulation for fMSX Unix, although I have modified the
rest fairly substantially.

Ulrich Doewich for his Ensoniq soundcard testing.

