CPC2TAPE version 1.1 1/6/99
--------------------------------------

Comments, requests, bug reports -> p-thev98@bat710.univ-lyon1.fr

A "new" way to transfer files PC -> CPC

    Many thanks to Pierre Guerrier for AIFFdec, without which I would
never have written this ...

    Disclaimer : this program comes as is, without warranty of any kind,
and I should not be held responsible for whatever happens to you or your
computer.

    Copying : You can copy and distribute this freely. If you really feel
a strong urge for distributing modified copies please contact me first.
         
    To use it, you need a very simple cable (jack 3.5 / DIN 5) from your
audio card output to your CPC input (I did succeed in building it, so you
must be able to do it too !!! :) ). You can also simply record CPC files
back to an audio tape !

    This program has been designed for a PC running Win95 and was compiled
using djgpp, but it should compile and run on any machine (well, I hope so :)
The only requirement is a .wav player & audio device (the program will run
even if you don't have this, but it wouldn't be of much use :)

    It was also compiled and tested under Linux (slackware I-cant-remember-
which-version and kernel 2.0.34). 

    The shell syntax is : cpc2tape FILE [-epv][-r <rate>][-w <player>]
    [-o <file.wav>][-s <length>][-b <length>]

    where FILE is the cpc file you want to send. FILE must be present as
a plain file on your hard disk - The program cannot read it from a .dsk image.
(this would be quite a lot of work to implement this, and utilities already
exist to do this kind of transfer: see CPCfs for example. I think most
emulators can do this too.)

    After generation of a .wav file, it automatically launches a wav player.
The default player is sndrec32.exe (Win95/98's one), but you can select the
one you want to run using -w option.

    The command line options are:

        -e : Tell the program not to generate an extension for the file.
That was implemented because often in basic loaders, there are commands
like load "foo" to load file "foo.bin". With a disk, this is not a problem.
But with tape, the file simply won't load.

        -v : Verbose mode. (not very useful actually, mainly for debugging)

        -p : Doesn't play the out.wav file.

        -r <rate> : let you specify which sample rate you want to use,
default is 11025 Hz. The higher the sample rate, the faster the transfer.
But too high values may give read errors. Also, if you record your programs
on poor quality tapes, you might have to use a lower rate.

        -o <file> : let you specify the name for produced .wav file. Default
is "out.wav".

        -s <silence> : Silence duration between two blocks. If this is too
short, AMSDOS will skip blocks, and give the well-known error message
"Rewind tape.". Leaving the default duration is a safe bet.

        -b <blank> : Silence between a header and the block following this
header. You can safely forget this option. I used it in testing phase, but
seemingly AMSDOS doesn't expect a silence period here.

        -w <program> : Sound player to be used. If it needs an option, don't
forget to quote the program name, for example -w "play -t wav". At least
it is the way it works under Unix, under DOS, I don't know.

---
NOTE: ASCII files are not handled. They are encoded very differently and
this is a quite uncommon way to transfer files (Personnally I never use
ASCII files with my CPC), therefore I didn't bother about it. If I receive
many (one ?) requests for this kind of support, maybe I'll try to implement
it ...

NOTE 2: If you want to know more about the internals of this program, or
if you want to improve it, don't hesitate to read the source code : it's
quite fully commented ...

NOTE 3: Cpc2tape DOES NOT delete wav files after execution. You should take
care of this, because these files can get quite big (several Mb)!

Useful annex: CPC 6128's tape socket pinout (rear view)

    v

             1: Remote control
3       1    2: Ground
             3: Remote control
 5     4     4: Data IN
    2        5: Data OUT
