Jump to content
IGNORED

Atari Cassette emulator (with audio tracks) in Arduino form?


tschak909

Recommended Posts

Thus far, the Atari community has done a bang-up job providing analogs for all sorts of mass storage.

 

And for the most part, most everything can successfully loaded from these devices.

 

There are, however, a class of programs that explicitly could only run from cassette, and these utilized the audio track to provide educational content. These can not be accurately simulated at the moment.

 

What I'm curious about, is, has anyone done any digging into making a 410/1010/XC12 simulator, so that these tapes can be accurately reproduced?

 

It wouldn't need much...

 

From my own experience, it may be possible to do it with an 8-bit DAC, and utilizing the remaining io pins to provide the data channel and motor line.

 

Thoughts?

-Thom

Link to comment
Share on other sites

2 hours ago, ivop said:

I have looked into playing audio with an Arduino Nano using PWM.

 

https://github.com/ivop/sio2world/blob/master/main.c

 

I'm fairly sure it could do low baudrate SIO at the same time. Is there a file format that mixes audio with .CAS files?

 

 

 

Not that I know of, but emulators can load the WAV-file of a tape to load the software and play the audio track.

 

Edited by Fred_M
Link to comment
Share on other sites

WAV is good for the audio track, but not that good for the data track, as the hypothetical device would have to perform fsk decoding.

 

I am thinking of just two files with the same name, but different extensions. If there is alpha.cas and alpha.wav on the SD card, then use them in pair.

Link to comment
Share on other sites

2 hours ago, tschak909 said:

besides, FSK decoding is NOT that hard.

 

-Thom

I am sure it is not. One can get inspired by the A8CAS project, for example.

Well, stereo WAVE files will definitely work without sync issues. FLAC support would be something.

Link to comment
Share on other sites

8 hours ago, baktra said:

I am sure it is not. One can get inspired by the A8CAS project, for example.

Well, stereo WAVE files will definitely work without sync issues. FLAC support would be something.

I think tschak909 means it would be difficult to synchronize replaying a .CAS file and replaying a .WAV file through PWM (or a DAC or whatever) at the same time. You probably have to manually edit the WAV file to keep in sync, especially if the "tape" stops and starts several times and lead-ins etc are of different lengths or at least longer than .CAS tape emulation does.

 

So, I agree that doing FSK decoding on one channel and replay the other channel as audio would be the way to go. Not sure if an ATMega328 is good enough for that, though.


Edit: what would be the minimum sample frequency needed to be able to decode the signal?

Edited by ivop
Link to comment
Share on other sites

On 10/2/2019 at 4:25 PM, tschak909 said:

What I'm curious about, is, has anyone done any digging into making a 410/1010/XC12 simulator, so that these tapes can be accurately reproduced?

I actually did on Teensy 3.5 its in very early alpha stage and currently trying to figure out a easy way of connecting micro sd card to Teensy 4.0 MCU, and yes I am doing this with frequency shift keying (FSK) decoding in software loading the sectors in 64k buffer.

It's more or less proof-of-concept for now perhaps I should upload video on my YouTube channel?

Edited by Chri O.
  • Like 2
Link to comment
Share on other sites

6 hours ago, tschak909 said:

@ivop - Mark/Space is 5327/3995Hz respectively. So given the 5327Hz frequency, that makes the minimum sample rate 2663Hz due to nyquist.

Unless you have a clean signal and intend to intentionally lower the tones via aliasing, I believe it'd be the other way, you'd need at least 10.6KHz to capture both tones. 11.025KHz will work with a clean tape as long as you have good decoding filters.

 

6 hours ago, tschak909 said:

you might even be able to get away with doing 8-bit sample resolution, maybe even 4 bit.

4 bit is going to be marginal for real-world tapes, as volume levels vary and it is possible to recover FSK data from a near dropout. You could go all the way down to 1-bit with prefiltering, but at that point you might as well predecode the FSK as well.

 

image.thumb.png.69d0aa9317a9cef800fc23e79ef03a47.png

  • Like 2
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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