Jump to content
Savetz

help me convert a cassette WAV to CAS

Recommended Posts

So this random guy emailed me asking for help converting his old cassette tape of Adventure Creator games that he created. I can convert disk files all day, but have never tried converting files from cassette — it seemed like an interesting challenge so I said I'd try to help.

 

But now I'm stuck and need some help from someone who knows more about this.

 

He can't actually find the cassette - he sent me a WAV file that he made years ago from the cassette. I want to convert that to CAS format to use with Atari800MacX. I installed a8cas-tools and it failed on a ton of blocks. In audacity, I noticed the audio level looked really low. After I used the amplify effect to bump the levels, there were fewer a8cas convert errors, but still too many. I also tried playing with header-length and bit-deviation in a8cas-convert, that didn't help.

 

So - does someone with more experience care to give it a go? He'd like to re-play his games and I'd like to learn more about the process. The audio files are available here: https://dl.dropboxusercontent.com/u/2773071/AdventureCreator.zip (64MB ZIP file containing 4 WAV files.)

Share this post


Link to post
Share on other sites

Ugh: MacOS tells me: "To use java-jar tungen.jar, command-line tool you need to install a JDK." I'm not going to do that - that's a deep rabbit hole to go down just to see if Turgen can read files that a8cas couldn't. If someone else already has Turgen running and wants to give it a try on those files. . .

Share this post


Link to post
Share on other sites

Well I gave it a stab. I first tried turgen, but it seems that is mostly for dealing with turbo cassettes and generating wav files. I did some trial and error, but at the very least it was complaining about the wav file being too large. Then I tried wav2cas using dosbox and got a bit further but no dice. It was expecting the .wav files to be mono, so I used sox to convert them to mono. Then wav2cas was processing the files, but with a lot of errors, although some blocks seemed to be converted ok. I tried loading them for the hell of it on atari800, but it would crash. I tried converting the .wav files to various formats(unsigned, 8 bit, etc.) but nothing helped. The wav files sound ok but my ears are analog :)

Edited by invisible kid

Share this post


Link to post
Share on other sites

It looks like the audio has gone through severe attenuation at higher frequencies such that the lower frequency space tone is much stronger than the lower frequency mark tone. I had success reading some of the blocks by applying a high pass filter at 4.6KHz and then amplifying the result in Audacity.

adv.zip

  • Like 1

Share this post


Link to post
Share on other sites

Got them to load into Adventure Creator -- the leader was also too short and needed to be extended. Tape 2 unfortunately still had a checksum error near the end, but it might not have actually affected the adventure. For some reason I couldn't get a CAS image out of A8CAS that wouldn't crash Atari800WinPLus, so I loaded the raw WAV files into Altirra and resaved the games onto disk images.

adv.zip

  • Like 1

Share this post


Link to post
Share on other sites

@phaeron - wow, awesome. The games totally work. I'll send them on to Kirk immediately.

 

Did you do any other magic in Audacity besides the high-pass filter, amplification, and adding leader?

 

(The leader thing was my fault: Kirk originally sent a single long WAV with all four games. I split it into four pieces, and didn't know that space is needed beforehand.)

 

So it sounds like A8CAS couldn't do the job, so you switched to an emulator that can read WAV files directly, eliminating the need to convert to CAS at all. Is that right?

 

Thanks!

Share this post


Link to post
Share on other sites

High pass + amplify + add leader was all I did. Took me a moment to realize that just shifting the audio wasn't enough and that I also needed to do Generate Silence to get it to actually add blank leader. The 4.6KHz high pass cutoff is halfway between the two tones at 3.9KHz and 5.3KHz.

 

The reason the blank leader is needed is that the OS cassette handler skips the first ~10 seconds of the tape on open, so if the data starts too early it'll be missed. The conversion to CAS may or may not add in this leader, so adding it to the WAV file ensures that it won't be a problem.

 

From what I can tell, the CAS image that A8CAS was producing was fine, but A8WP4 just kept barfing on it. Tried tweaking the CAS image, but couldn't find out what the problem was, and I figured that having a CAS image that keeps crashing one of the most popular emulators wasn't going to be useful. Altirra is my emulator and can indeed read WAV files directly, but it doesn't have the ability to scan for and extract data blocks that's necessary to write out CAS files.

Share this post


Link to post
Share on other sites

Sir Phaeron!!

 

Mister Doctor Admiral Commander, to whom I BOW!!

 

I'm Kirk! This was AMAZING to me, that some retro computer users from the 1980s just tore into this and you actually PULLED it OFF!!

 

I FLIPPED when Savetz buzzed me and also included a still graphic of the title screen for part IV WITH the email!!!

 

Phaeron said:
"High pass + amplify + add leader was all I did."

 

DUDE! You might as well have lifted a FREAKING mountain with telekenesis OR your Sith Lightning and then said, "Aww, it was no big deal!!"

DAMN!

 

I have been OUT-GEEKED by a Computer Master far greater than I!!!

 

Everyone must know when to bow before the higher power!!

 

I am indebted to you, My Computer Lord!!!

 

Your phrase of "All I did was..." reminds me of the movie "Wag The Dog" where Dustin Hoffman plays a Hollywood producer that engineers the fake war to get media attention away from the President's sexual affair/assualt on some equivalent of a girl scout or something:

Every time there was a disaster or problem, he'd toss his hand in the guesture of citing something as trivial, and say, "This is NOTHING!" and then refer to some nightmare fiasco that he encountered during some Broadway or movie production. Scenarios kept getting worse and worse, while he'd repeatedly dismiss any worry. "This is NOTHING!" It was downright hilarious with knee-slapping tears at one point, where you'd think he'd FINALLY admit that he was licked!

 

It still kills me!!

 

Thanks, Phaeron!!!!

Edited by 8bitplayerswillriseagain

Share this post


Link to post
Share on other sites

So this random guy emailed me asking for help converting his old cassette tape of Adventure Creator games that he created. I can convert disk files all day, but have never tried converting files from cassette — it seemed like an interesting challenge so I said I'd try to help.

 

So - does someone with more experience care to give it a go? He'd like to re-play his games and I'd like to learn more about the process. The audio files are available here: https://dl.dropboxusercontent.com/u/2773071/AdventureCreator.zip (64MB ZIP file containing 4 WAV files.)

Sorry, missed that. Could you possibly make the files available once again? I would like to try this with my improved wav2cas - it should be quite a bit more robust than what you find on the web otherwise and uses a new/different design strategy that should hopefully work better than the mostly naive approaches I've seen so far.

Share this post


Link to post
Share on other sites

Sorry, missed that. Could you possibly make the files available once again? I would like to try this with my improved wav2cas - it should be quite a bit more robust than what you find on the web otherwise and uses a new/different design strategy that should hopefully work better than the mostly naive approaches I've seen so far.

 

Sure. It's still at https://dl.dropboxusercontent.com/u/2773071/AdventureCreator.zip

 

Kevin

Share this post


Link to post
Share on other sites

 

Thanks Kevin. This was helpful, as it is really a pretty extreme case. Here is a new version of wav2cas that handles your files (and the rest) fine.

 

distrib.zip

 

Files 1,2 and 4 decode correctly. Version 3 is just too much off so the sync marker in one of the records could not be found. There is no need for initial filtering or amplifying. just add "-s" to the command line to indicate that this file has an (incorrect) short header. The amplitude fixup and the filtering are all inclusive.

 

I could probably also make version 3 decode correctly with more additional work, but it's probably not worth it. What we have here is already pretty fine, I would say.

Share this post


Link to post
Share on other sites

 

Files 1,2 and 4 decode correctly. Version 3 is just too much off so the sync marker in one of the records could not be found. There is no need for initial filtering or amplifying. just add "-s" to the command line to indicate that this file has an (incorrect) short header. The amplitude fixup and the filtering are all inclusive.

 

 

Sweet! Nice job. I'll talk about this project and the new version of WAV2CAS in episode 7 of the podcast.

 

--Kevin

Share this post


Link to post
Share on other sites

Danger on that link above. There seems to be an audio file there, but first I was accosted by fake flash player upgrade message, and misleading download buttons, and autoplay music. . . . Three strikes, I gave up trying to get the Atari audio file.

Share this post


Link to post
Share on other sites

Because there is no win32 executable - is it possible to decode this file - download from http://www20.zippyshare.com/v/48029604/file.html

Sorry, but I don't seem to be able to download from this side. It doesn't give me anything when I click on the download page. From the file name, however, I assume that this is not a regular Atari tape file using frequency modulation. CAS2WAV only reads regular Atari tapes a standard tape recorder would be able to read.

Share this post


Link to post
Share on other sites

I was able to get the file last night.. tried it with the new wav2cas, but it complained about the input being too noisy. It did try to convert, I remember there being a note about baud rate being printed to the screen, but bombed off after the first block..

Share this post


Link to post
Share on other sites

I got it from thread on another forum. Just to see if it is possible and could be used to make this new wav2cas better.

I put both files on my site (about 29MB):

Original:

http://blanty.net/atari/k26/KopierTurbo2600Opis.wav

and corrected by Voy:

http://blanty.net/atari/k26/KopierTurbo2600Opis_v2.wav

 

 

Thank you, got them! I'll have a look-see this afternoon as soon as I have a chance to.

Share this post


Link to post
Share on other sites

Ok, had a look. There are a couple (not only one) problem with this file. First is, that it has a couple of drop-outs already in the header where the signal is gone completely. This alone does not cause a problem. However, the phase relation between the oscillations is also destroyed, disallowing a consisting demodulation or detection of the frequencies. This typically happens if the file had been coded by an audio compressor, such as mp3. It is not unlikely that this happened on the upload to the above web side which is optimized for music files, not data files. It would be better to get the original, not through a audio file serving web page.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...