
  SpecAY Documentation

Return to the SpecAY Homepage <http://www.specay.co.uk/>


      0. Contents

1. Introduction
2. So what is it?
3. How do I use it?
4. Where do I get AY files from?
5. Notes for +2 (grey), +3 and +2A users
6. Some important notes
7. Acknowledgements - the people who made it possible.
9. Contact the Author


      1. Introduction

Welcome to SpecAY (formerly called Speccy-Player) - the AY Music File
Player for a Real Spectrum.

This program is designed to take a standard AY music file (which are
really intended for use with Emulators) and allow it to be played-back
on a genuine, physical Sinclair Spectrum machine. It's been tested on
the original Spectrum 128, +2 and +3, but should run on any 128k Spectrum.

This document refers to Version 0.3a and 0.3b of SpecAY.


      2. So what is it?

Basically, it consists of two programs - one for the Spectrum, and
another which runs on a PC under DOS (or in a command-prompt window in
MS Windows).

The PC-based program really just takes any old PC file, and converts it
into a Spectrum datablock to be loaded into a particular location in the
Spectrum's memory. That really is all it does, so the file need not be
an AY file at all - it can be used to load any type of file into the
Speccy (provided it will fit in RAM, of course!). The file is output as
a TAP file, for output using a utility such as Taper
<http://www.worldofspectrum.org/taper.html> or HypraLoader
<ftp://ftp.worldofspectrum.org/pub/sinclair/tools/pc/HypraLoader.zip>.

The Spectrum-based program loads the datablock into Spectrum memory, and
if it is a valid AY file, it will examine it, display the author, title
and other details, and let you choose a particular tune from the file to
listen to. It then loads the relevant datablocks from the AY file into
the right places in memory, and calls the Z80 code to play the tune.

There is also a BAT file "wrapper" which can be used to convert the AY
file, and add the player, and produce a TAP file containing both in one
operation.


      3. How is it used?

Really, really easy, but note that this is slightly different from
previous versions - you no-longer give the ".ay" extension on the
command-line.

1. Extract the contents of the ZIP file to a suitable directory on your
PC. (I suggest C:\AY2TAP)
2. Copy the AY file you wish to play into the same directory.
3. From a command-prompt window, cd to the directory.
4. Type the following command:
    AY2TAP <filetoplay>
this produces a file called "filetoplay.tap"
5. Start Taper <http://www.worldofspectrum.org/taper.html> or
HypraLoader
<ftp://ftp.worldofspectrum.org/pub/sinclair/tools/pc/HypraLoader.zip>,
and load the resulting TAP file, and play it out as normal!

Note that the following files must all be in the current directory for
the batch file to work properly:
    FILE2TAP.EXE    (this converts a PC file into a Spectrum-loadable
TAP file)
    LOADER.TAP    (this is the Spectrum-based loader and player program)
Also note that, in order to handle long filenames, the batch file
creates two temporary files in the current directory, which will
normally be deleted if the the operation is successful.
 
I plan to produce a native MS Windows version at some point which should
do away with all this mucking about, but that hasn't happened yet.


      4. Where to Get AY Files

There are many AY files on the WOS archive at
ftp://ftp.worldofspectrum.org/pub/sinclair/music/
Also check out the Project-AY
<http://www.worldofspectrum.org/projectay/> pages for both files and
further details of the format.


      5. Notes for +2 (grey), +3 and +2A users

If you have any of these machines, then you'll notice that the sound
output quality is not very good. The +2 is generally OK but very noisy,
while the +3 and +2A sound awful due to a well-known design flaw.

The fix for the grey +2 <http://www.specay.co.uk/hqsound.html> is very
straightforward, does not even require any soldering to the main circuit
board, and gives beautiful noise-free sound output.

The fix for the +2A and +3
<http://www.secarica.ro/html/plus3_hardware.html#sound> is not quite so
simple, but anyone with basic soldering skills should be able to tackle it.


      6. Some Important Notes

(i)    I should point out that I am a cr@p programmer. This program may
not be particularly well-written, but it just about works, and as far as
I know it is unique.
(ii)    This software is provided strictly "as-is", with no warranty,
expressed or implied, as to its suitability for any particular purpose.
The Author cannot be held responsible for any consequences, howsoever
caused, that may result from using this software. In English - "Don't
blame me if you blow up your computer!".
(iii)    Please don't laugh at my programming, er... (ahem) "style". If
you have any comments (preferably constructive ones), drop me a mail!
(iv)    With the exception of some of the machine code routines (see
below), the code is Copyright of Tim Fardell. Feel free to do with it as
you will, but an acknowledgement would be nice if you decide to use any
part of it for any other project.


      7. Acknowledgements

The following people have made this project a reality.

Sergey Bulba
<http://www.thunderstats.com/clickout.cgi?http://bulba.at.kz/> - for
producing the best PC-based AY player there is, and also for his
documentation on the AY file format. This has been the single most
useful reference work throughout the project!

The many good folks on the WOS Forums
<http://www.worldofspectrum.org/forums/> and c.s.s
<http://groups.google.co.uk/group/comp.sys.sinclair>, who have assisted
with machine-code problems - there are now too many to list, and
attempting to list everyone who's helped would risk leaving someone out,
so I won't list you all. You know who you are, and I am very grateful to
all of you!

Some of the machine code routines are lifted (but slightly modified)
from the z88dk source tree
<http://z88dk.cvs.sourceforge.net/z88dk/z88dk/libsrc/spectrum/>:
specifically this project makes use of  the zx_setstr
<http://z88dk.cvs.sourceforge.net/z88dk/z88dk/libsrc/spectrum/zx_setstr.asm?view=log>
routine by Stefano Bodrato.

And, of course, not forgetting Patrik Rak, who came up with the AY file
format in the first place :-)


      8. Contact

Contact the Author - Tim Fardell - tim.fardell@virgin.net
<mailto:tim.fardell@virgin.net>

If you have any comments, or feature requests for future versions, don't
hesitate to drop me a mail! I can't promise to reply to every single
e-mail, but I will read them all and make an effort to respond to
specific queries. Before mailing with questions, check the Release Notes
<http://www.specay.co.uk/download/issues.txt> to see if your problem is
a known issue.

This page was last updated on 30th August 2006.
Copyright Tim Fardell.
<http://www.crumblenet.co.uk/>

