wav2cas utility

Help us complete the database with missing entries, dumps, ads, scans...

Moderator: Atari Frog

User avatar
Andre
Posts: 2233
Joined: Mon Mar 01, 2004 10:11 am
Location: Deutschland

wav2cas utility

Post by Andre » Wed Dec 15, 2004 10:12 am

Hi,

I have heard lately a lot about a tool called wav2cas. I was told this program succesfully converts "audio data" from Atari tape to "digital data" (cas-format) for use with emulators like Atari800Win. Anyone knows how this conversion is accomplished, technically speaking?

André
User avatar
Mike
Posts: 5
Joined: Sun Jan 09, 2005 4:30 pm
Location: Staffordshire, UK

Post by Mike » Mon Jan 10, 2005 2:01 am

I found the following info on the wav2cas program, whic is freeware, on a faq:

"Any PC equipped with a sound card and about 50 to 100 Megs of free
disk space to work with. The sound card should be able to sample sound
at a sample rate of 44.100 Hz mono. The sample must be recorded into
a .wav file.
You need the wav2cas program to convert the .wav file to a .cas file.
The .cas file is a digital cassette image file that only contains the
data that is on the cassette tape. Once you have that, you can throw
away the .wav file. The .cas files are typically 16 to 64K, so they
are relatively small.

To load cassette files into your Atari (i.e. boot a digital cassette
image) you do not need a sound card. You do need a SIO2PC cable or
similar device. You also need the cas2sio program.

The wav2cas and cas2sio programs should be available from the archives
of Umich by now. They have been put together in one zip file
wav2cas.zip, along with the documentation and the 'C' source code.
You can download it through the web interface at the URL
http://www.umich.edu/~archive/atari/8bi ... av2cas.zip
Note the capital in Emulators and in Peripherals."

The zip file has full documentation on how the program works. Hope this helps.
User avatar
Andre
Posts: 2233
Joined: Mon Mar 01, 2004 10:11 am
Location: Deutschland

Post by Andre » Tue Jan 11, 2005 11:36 am

Mike wrote:They have been put together in one zip file
wav2cas.zip, along with the documentation and the 'C' source code.
You can download it through the web interface at the URL
http://www.umich.edu/~archive/atari/8bi ... av2cas.zip
Note the capital in Emulators and in Peripherals."

The zip file has full documentation on how the program works. Hope this helps.
Wow! Exactly what I was looking for! :D
User avatar
deathtrappomegranate
Posts: 2248
Joined: Sat Jul 10, 2004 11:27 am

Post by deathtrappomegranate » Thu Feb 03, 2005 10:40 pm

I've been using this, but with mixed results.

Does anyone have good experiences with this utility?
ijor
Posts: 426
Joined: Thu Mar 10, 2005 3:48 am

Post by ijor » Fri Mar 11, 2005 3:15 am

The tape system is IMHO, the worst part of the A8. No surprise that you have troubles and mixed results. A few notes:

Some programs won't load correctly with a SIO2PC cable because the motor control signal is missing.

The documentation (at least as quoted above) is wrong. You should not sample in mono. You should sample in stereo and discard the appropiate channel using a Wav editor. In some cases, both channels should be preserved, but only one should be used for the conversion.

Instead of using a PC sound card, it might be better to use an Atari high quality tape recorder (1010 and XC11 were the best) and get the digital signal directly. The filters in those players were specifically designed for the Atari wave signal. But this will require special Atari software though. It might be done with PC software and a 1050-2PC cable modifed (again, no motor control signal).

I wrote all sort of custom software for reading/writing/converting Atari tapes including a turbo Os. But I'm a little rusty, haven't used Atari tapes for ages.
User avatar
deathtrappomegranate
Posts: 2248
Joined: Sat Jul 10, 2004 11:27 am

Post by deathtrappomegranate » Fri Mar 11, 2005 1:51 pm

Surprisingly, wav2cas actually works quite well.

I generally disconnect one lead from my tape deck and record in mono.

Cassettes are frustrating to deal with, especially at low baud rates.
Atari Frog
Posts: 2875
Joined: Sat Jan 31, 2004 9:08 pm

Post by Atari Frog » Fri Mar 11, 2005 2:28 pm

Frustrating but tape preservation is equally as important as archiving disks. There are still dozens and dozens of games that were on cassette only and have not been dumped yet.

--
Atari Frog
http://www.atarimania.com
ijor
Posts: 426
Joined: Thu Mar 10, 2005 3:48 am

Post by ijor » Fri Mar 11, 2005 2:55 pm

deathtrappomegranate wrote:I generally disconnect one lead from my tape deck and record in mono.
Yes, that usually should do the trick. But note that sometimes the audio data on the other channel should be preserved as well.

I don't recall if any game actually had audio. But certainly many educational titles had.
Atari Frog
Posts: 2875
Joined: Sat Jan 31, 2004 9:08 pm

Post by Atari Frog » Fri Mar 11, 2005 3:12 pm

Actually, I believe the original release of Dimension X has music... Some of the early Atari cassettes as well (Biorhythm, Hangman...). PDI titles also used this extensively.

One day or another, we'll try to archive those as well.

--
Atari Frog
http://www.atarimania.com
User avatar
deathtrappomegranate
Posts: 2248
Joined: Sat Jul 10, 2004 11:27 am

Post by deathtrappomegranate » Fri Mar 11, 2005 4:18 pm

Typical .cas files are <64K in length, but audio files would be much larger.

I don't think that emulation can cope with simultaneous audio tracks at present, either.

Some cassettes lack clear L/R channel separation, too, and the audio track interferes with the data. A band pass filter should help.

Must find my old audio tools...
phsstpok
Posts: 30
Joined: Tue Mar 15, 2005 7:29 pm
Location: Northeast USA

Post by phsstpok » Tue Mar 15, 2005 9:07 pm

deathtrappomegranate wrote:I've been using this, but with mixed results.

Does anyone have good experiences with this utility?
[edited for typos and content]

Some good experiences, more bad experiences, lots of frustration.

I went looking for a program like WAV2CAS when I decided I wanted to review my own programs which I had written 22-25 years ago. I needed such a utility because I no longer own an Atari tape player and frankly did not wish to own one once again.

Trying to make the story short, I have about a half dozen commercial tapes and 35-40 tapes with my own stuff, mainly multiple saves and revisions of just a mere dozen or so programs, combined with magazine programs.

I thought WAV2CAS would be perfect, just convert everything to WAV files and then I'd have everything. It didn't work out that way.

I converted two of the six commercial tape without much trouble. Two tapes were unusable. They had huge audio gaps and nothing could be done to save them. The other tapes clearly had data but I was unable to retrieve it. Since disk images of these programs were already available on the internet I didn't really make any more effort to retrieve the games.

I then moved on to my own tapes. I went thru 12 or so tapes but recovered only 2 program fragments. It took me hours and hours to get that much. At that point I reached out for help in the Atari 8-bit newsgroup. Ernest Schreurs, the author of WAV2CAS, replied.

He gave me a lot of assistance. Sent me a beta of his latest version of WAV2CAS, told me to try adjusting record levels (PC software record levels) , offered to help me with recovery. (I didn't want to send my tapes from here in the USA to New Zealand). Mentioned I should use 8-bit recording, because 16-bit doesn't help and it doubles the size of the WAV files. We discussed stereo vs mono. He explained that one channel has audio and the other has the data but blending both audio channel doesn't affect the algorithm. Though, recording in stereo also doubles the size of the WAV file. I told Ernest that I could hear audio spikes in the tapes and asked if that effects the data recovery. He said it's possible but generally not. The algorithm is only looking at two frequencies (not counting interprogram and interrecord gaps). Random noise should not affect the results. The only thing that would serious affect the results is dropouts, points of missing sound. There is not much redundancy if any (my speculation not Ernest's words) designed into tape files. Long dropouts means missing data, irrecoverable missing data.

Well, after 3 or 4 emails I didn't make much progress if any, then I received an email from Vladimir Tichy, designer of the ATART interface (like a 1050-2-PC interface and an SIO2PC rolled into one but for Atari tape drives instead of an Atari disk drive (see link at the end). Vladimir suggested I adjust my tape deck's perpendicularity. I decided this was impractical and probably unwarranted since my tape, though old, is virtually unused. Vladimir then suggested that I adjust my tape deck's play back levels. I explained to him that my deck's levels are fixed but his idea got me to thinking.

I contacted Ernest about this. He said his algorithm doesn't care about levels only frequencies and that I could simply adjust the record level at the PC end. I told him that I was at max record level but could barely hear anything. At this point I'm not sure Ernest gave me the advice or I just decided to go off on my own but I reconfigured my receiver to act as a preamp, so I could increase the effective levels that the PC receives.

Things improved, nothing miraculous, though. I went from near 0% data recovery to about 10% (a guess). With plenty of experimenting I learned that for any tape I owned that showed playback levels of -25 dB or lower (on my tape deck's meters) I would not recover anything. From -18 dB to say -8 dB I typically was able to recover one or two files from each tape (not each side but each tape) . Generally I recorded 4 or 5 files per side. No tapes that I created had playback levels higher than -8 dB. For comparision the commercial tapes typically played back at +8 dB (the max calibration on my deck's meters).

Things that hurt my recovery include using cheap department store tapes 25 years ago, not properly documenting what was on the tapes. For example, some tapes had CSAVEd files, binary load files, LISTed files, SAVEd files, in no particular order. Tape counter numbers did me no good having tossed out my Atari Tape player years ago.

I initially used MusicMatch Jukebox to do my PC recordings. This program only records in stereo and WAV2CAS generated an error to the effect, "you must use a mono recording". I ended up using the sofware that came with my sound card. I also ran a cable for single sound channel from my receiver, just in case.

It was still too much work for too little payoff. I gave up.

Well, that's my story. Your mileage may vary. Of course, for the purpose of preserving commercial tapes. The sooner the attempt is made the better. Tapes do degrade.

Vladimir Tichy's ATART looks interesting. Apparently it combines software, a custom interface, and an Atari tape player modification all to improve speed, reliability, and flexibility for both real tape and CAS files. The technicals are way over my head.

I said I would make my story short but I didn't promise to do it. :)


Regards to all

Phsstpok


Links

Ernest Schreurs homepage
http://home.planet.nl/~ernest/home.html

Vladimir Tichy's ATART page (English version)
http://sdq.czweb.org/atari/projects/atart/index.html
Life is a bowl of cherries but what does that mean?
Atari Frog
Posts: 2875
Joined: Sat Jan 31, 2004 9:08 pm

Post by Atari Frog » Tue Mar 15, 2005 9:27 pm

Thanks for the super detailed information!

BTW, if you have some standard BASIC files on tape and can't get anywhere with WAV2CAS, you can, of course, just save the files to disk, load them with Atari800WinPLus and create CAS files with the emulator.

To be honest, I'm not too familiar with WAV2CAS yet but that's how I dumped Hangman, SCRAM and some other ones. Yes, I cheated :oops:

--
Atari Frog
http://www.atarimania.com

PS: Got all the binaries, not sure we're missing any but I'll have a closer look. Thanks again :wink:
User avatar
deathtrappomegranate
Posts: 2248
Joined: Sat Jul 10, 2004 11:27 am

Post by deathtrappomegranate » Tue Mar 15, 2005 9:47 pm

phsstpok, welcome, and thanks for sharing your experiences. I can feel your frustration.

Many of my cassettes are useless now. This is why it is so urgent to preserve what exists, especially the rarities, RIGHT NOW. And also why we need help.

Cassettes are the least reliable of the media for A8 machines, and archiving what still exists is important.

My experience is similar to yours, although I have a good many more cassettes. Dropouts are a major problem, poor quality recordings ditto. Print-through and physical damage to the media are also common and difficult to deal with. As you say, there is little redundancy in Atari cassette files.

However, I have had more successes than failures.

There is a great deal of work to do. We're all in this together.
phsstpok
Posts: 30
Joined: Tue Mar 15, 2005 7:29 pm
Location: Northeast USA

Post by phsstpok » Tue Mar 15, 2005 9:51 pm

Atari Frog wrote:Thanks for the super detailed information!

BTW, if you have some standard BASIC files on tape and can't get anywhere with WAV2CAS, you can, of course, just save the files to disk, load them with Atari800WinPLus and create CAS files with the emulator.
That would be hard to do without an Atari tape recorder from which to start. No way to load the BASIC programs before saving them to disk..
To be honest, I'm not too familiar with WAV2CAS yet but that's how I dumped Hangman, SCRAM and some other ones. Yes, I cheated :oops:
You do what you gotta do!

I used WAV2CAS for SCRAM as well. The image was working but mysteriously it stopped working. I'll have to check my Atari800Win Plus configuration. I just switched to 4.0 beta 4 which just went up on the Atari800Win Plus page on March 8, 2005. Not sure that's the reason SCRAM failed. It's just when I noticed it.

Link
http://www.a800win.atari-area.prv.pl/

Atari Frog
http://www.atarimania.com

PS: Got all the binaries, not sure we're missing any but I'll have a closer look. Thanks again :wink:
Not sure if you are talking about my compilation ATR or the ZIP file with 15 or so files. 12 files or so from the latter I was unable to find at this site.


Phsstpok
Last edited by phsstpok on Tue Mar 15, 2005 9:58 pm, edited 1 time in total.
Life is a bowl of cherries but what does that mean?
Atari Frog
Posts: 2875
Joined: Sat Jan 31, 2004 9:08 pm

Post by Atari Frog » Tue Mar 15, 2005 9:56 pm

Did any of you notice some tape recorders were more reliable than others? I don't know if this has to do with the head alignment or something else but I found the 1010 would load some programs the XC12 just couldn't handle.

--
Atari Frog
http://www.atarimania.com
Post Reply