XEX2CAS 2.0 - PREVIEW

Unfinished features:
- Modern binary loader is missing.
  Options -l0 and -l1 result in usage of the ! loader updated for XL/XE computers
- n option is ignored as there is no loader that can use it



1. Text from original version of XEX2CAS
========================================

Why did I build this?

The other day, when I was surfing the net, I found the new version (3.1) of
Atari800Win Plus.  This emulator can read cas files.  But the problem is that
writing to this file is not implemented yet.  In the help file there is a note
what a cas file is and of course a link to the wav2cas page. When I saw the
wav2cas program I did not believe that it would work.  So I got my old Atari
and I connected my XC12 and tried it.
First, I wrote a simple program in Basic :) and ... It Works !!!

So, next I decided to convert some old application on my very old cassette to
cas file.  A few errors, but I sampled my program three times, and I compared
the hex file, next I corrected it.  (I wrote my own simple application to
change a hex file to cas).  It Works too !!!

I decided to test cas2wav.  I thought, on the net are more old games for Atari,
so why can't I use it to test on my real Atari?  Now this is the problem.
All games or almost all games are in DOS format, and additionally the emulator
can't write them to cas files.  Another problem is that for all DOS files we
must add some cassette boot loader (you know !-file).
Hmm...  I found that amongst my old cassettes some game had it.  I sampled
this and changed it to cas.  On the emulator I converted it to a clear file. 

At the end of my crazy work I wrote a program in C++ which converts xex files
to cas and adds a boot loader.

How it works?

Let us assume I have a file "seawolf2.xex". :)

I write:
xex2cas seawolf2.xex seawolf2.cas

And now in my directory I have seawolf as a cas file. Next of course use
cas2wav and write the file to tape. 

Finally, Start + Option and I have my new (old) game on my Atari.

I know that is crazy but I love Atari :)

I think my program is a nice supplement to the cassette utilities. 

For all questions my e-mail is always ready,

Regards, Gienek.
plug@poczta.fm

2. Addendum for version 2.0
===========================

Dear users,

It would appear that the data recorders are not dead enough in 2014...

Being encouraged by reading one of the threads at Forum Atarum (atarionline.pl),
I have decided to rewrite the program in order to fix major defects and add
some new features.

The bugs I've fixed
- Poor processing of the command line arguments
- Inadvertent prolongation of the converted binary files by up to 127 bytes

Notable new features
- New binary loaders
- Binary file checking (corrupt and non-binary files are detected)
- Ability to elongate IRGs after records that hold INIT segments

Processing of binary files
The structure of the input binary files is checked.
If the input file is not a binary file or its structure is corrupt or problematic,
a warning message is displayed. The conversion continues, because despite bad structure,
many binary files can be successfully loaded and executed.

Command line arguments
The command line arguments have been changed completely; the newly added
options are marked with asterisk (*).

Usage:
xex2cas [option1] [option2] ... infile.xex [outfile.cas]

Options: 
-b          Do not prepend any binary loader. Use this option when you plan to
            use your own binary loader

-s          Use a shorter leader (12 s) *
            Use this option to reduce loading time

-f          Faster transfer speed (720 bd) *
            Use this option to reduce loading time

-g          Generate longer (350 ms) inter-record-gaps (IRGs) *

-i<n>       Elongate IRGs after INIT segments to n seconds (0 to 99) *
            Use this option when you are using a cassette adapter instead of
            a compact cassette. 
            
-r          Overwrite output file *

-n'Name'    Set name displayed by the binary loader (modern binary loader only)
            The name can be up to 32 characters long *
            If this option is not specified, the name of the input file is used.

-l<n>       Binary loader selection *
            n=0 Use modern XL/XE only binary loader (default)
                This loader is based on the ! loader that has been fixed for
                XL/XE computers. The loader is slightly shorter and can
                display a file name.
            n=1 Use ! loader updated for XL/XE computers
            n=2 Use original ! loader

-h,-help,-? Display usage instructions *

Usage notes:
- If you do not specify output file, then infile.cas is implied.
- There is no support for wildcarding.


Michael Kalou (BAKTRA Software)