Jump to content

Photo

help me convert a cassette WAV to CAS


28 replies to this topic

#1 Savetz OFFLINE  

Savetz

    Dragonstomper

  • 759 posts
  • Location:Portland OR

Posted Sat Dec 14, 2013 2:22 PM

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.dropboxus...g 4 WAV files.)



#2 Magic Knight OFFLINE  

Magic Knight

    Moonsweeper

  • 446 posts
  • The Great Escape on ATARI!
  • Location:Outpost 31..

Posted Sat Dec 14, 2013 2:50 PM

Hi kevin

 

Try this site - i use this versatile program on it often ands its fairly reliable

 

http://a8cas.sourceforge.net/



#3 Savetz OFFLINE  

Savetz

    Dragonstomper

  • Topic Starter
  • 759 posts
  • Location:Portland OR

Posted Sat Dec 14, 2013 3:12 PM

that's the tool I've been using.



#4 Magic Knight OFFLINE  

Magic Knight

    Moonsweeper

  • 446 posts
  • The Great Escape on ATARI!
  • Location:Outpost 31..

Posted Sat Dec 14, 2013 3:17 PM

Oops - i should have looked before leaped.

This link comes up with a 404 page not found...

#5 w1k OFFLINE  

w1k

    Stargunner

  • 1,626 posts
  • Location:martin, slovakia

Posted Sat Dec 14, 2013 3:20 PM

extracting datas from tape to CAS is prehistoric.. but.. try this:

 

http://turgen.sourceforge.net/

 

everything can be saved to OBJ, XEX, COM files.. no converting



#6 Savetz OFFLINE  

Savetz

    Dragonstomper

  • Topic Starter
  • 759 posts
  • Location:Portland OR

Posted Sat Dec 14, 2013 3:35 PM

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. . .



#7 w1k OFFLINE  

w1k

    Stargunner

  • 1,626 posts
  • Location:martin, slovakia

Posted Sat Dec 14, 2013 3:56 PM

use normal OS - windows..



#8 invisible kid OFFLINE  

invisible kid

    Star Raider

  • 97 posts
  • Location:New Jersey, U.S.A.

Posted Sat Dec 14, 2013 5:42 PM

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, Sat Dec 14, 2013 5:58 PM.


#9 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,135 posts
  • Location:USA

Posted Sun Dec 15, 2013 1:07 AM

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.

Attached Files

  • Attached File  adv.zip   6.31KB   0 downloads


#10 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,135 posts
  • Location:USA

Posted Sun Dec 15, 2013 2:21 AM

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.

Attached Files

  • Attached File  adv.zip   6.31KB   139 downloads


#11 Savetz OFFLINE  

Savetz

    Dragonstomper

  • Topic Starter
  • 759 posts
  • Location:Portland OR

Posted Sun Dec 15, 2013 10:24 AM

@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!



#12 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,135 posts
  • Location:USA

Posted Sun Dec 15, 2013 3:41 PM

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.



#13 8bitplayerswillriseagain OFFLINE  

8bitplayerswillriseagain

    Combat Commando

  • 3 posts

Posted Mon Dec 16, 2013 7:33 PM

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, Mon Dec 16, 2013 7:34 PM.


#14 thorfdbg OFFLINE  

thorfdbg

    Dragonstomper

  • 720 posts

Posted Sun Dec 29, 2013 4:17 AM

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.dropboxus...g 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.



#15 Savetz OFFLINE  

Savetz

    Dragonstomper

  • Topic Starter
  • 759 posts
  • Location:Portland OR

Posted Sun Dec 29, 2013 11:08 PM

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.dropboxus...tureCreator.zip

 

Kevin



#16 thorfdbg OFFLINE  

thorfdbg

    Dragonstomper

  • 720 posts

Posted Mon Dec 30, 2013 5:16 PM

 

Sure. It's still at https://dl.dropboxus...tureCreator.zip

 

Kevin

 

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.

 

Attached File  distrib.zip   17.21KB   196 downloads

 

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.



#17 Savetz OFFLINE  

Savetz

    Dragonstomper

  • Topic Starter
  • 759 posts
  • Location:Portland OR

Posted Sun Jan 5, 2014 3:03 PM

 

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



#18 lemiel OFFLINE  

lemiel

    Chopper Commander

  • 213 posts
  • Location:Tychy, Poland

Posted Mon Mar 3, 2014 4:27 PM

Because there is no win32 executable - is it possible to decode this file - download from http://www20.zippysh...29604/file.html


Edited by lemiel, Mon Mar 3, 2014 4:34 PM.


#19 Savetz OFFLINE  

Savetz

    Dragonstomper

  • Topic Starter
  • 759 posts
  • Location:Portland OR

Posted Mon Mar 3, 2014 11:10 PM

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.



#20 voy OFFLINE  

voy

    Chopper Commander

  • 170 posts
  • admin of ftp.pigwa.net, ASMA Team member
  • Location:Zawiszˇw, Poland

Posted Tue Mar 4, 2014 2:49 AM

I had no problems with downloading. I use an Adblock Plus, NoScript and Ghostery addons for Firefox. Here is a slightly cleaned file:

 

http://www76.zippysh...17891/file.html



#21 thorfdbg OFFLINE  

thorfdbg

    Dragonstomper

  • 720 posts

Posted Tue Mar 4, 2014 2:57 PM

Because there is no win32 executable - is it possible to decode this file - download from http://www20.zippysh...29604/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.



#22 charliecron OFFLINE  

charliecron

    Moonsweeper

  • 411 posts

Posted Tue Mar 4, 2014 3:27 PM

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..



#23 lemiel OFFLINE  

lemiel

    Chopper Commander

  • 213 posts
  • Location:Tychy, Poland

Posted Wed Mar 5, 2014 3:40 PM

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/at...rbo2600Opis.wav

and corrected by Voy:

http://blanty.net/at...2600Opis_v2.wav



#24 thorfdbg OFFLINE  

thorfdbg

    Dragonstomper

  • 720 posts

Posted Thu Mar 6, 2014 2:47 AM

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/at...rbo2600Opis.wav

and corrected by Voy:

http://blanty.net/at...2600Opis_v2.wav
 

 

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



#25 thorfdbg OFFLINE  

thorfdbg

    Dragonstomper

  • 720 posts

Posted Thu Mar 6, 2014 2:25 PM

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.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users