tschak909 Posted October 2, 2019 Share Posted October 2, 2019 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 Quote Link to comment Share on other sites More sharing options...
ivop Posted October 3, 2019 Share Posted October 3, 2019 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? Quote Link to comment Share on other sites More sharing options...
Fred_M Posted October 3, 2019 Share Posted October 3, 2019 (edited) 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 October 3, 2019 by Fred_M Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 3, 2019 Author Share Posted October 3, 2019 we'd basically be working with WAV files. -Thom Quote Link to comment Share on other sites More sharing options...
baktra Posted October 4, 2019 Share Posted October 4, 2019 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. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 4, 2019 Author Share Posted October 4, 2019 bad idea, now you have sync issues. -Thom Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 4, 2019 Author Share Posted October 4, 2019 besides, FSK decoding is NOT that hard. -Thom Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted October 4, 2019 Share Posted October 4, 2019 "Amateurish idea" which I have no idea if it actually could work: M4A with CAS-data in the subtitle track. Chapters could then be used to distinguish files on the virtual tape. Quote Link to comment Share on other sites More sharing options...
baktra Posted October 4, 2019 Share Posted October 4, 2019 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. Quote Link to comment Share on other sites More sharing options...
ivop Posted October 4, 2019 Share Posted October 4, 2019 (edited) 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 October 4, 2019 by ivop Quote Link to comment Share on other sites More sharing options...
ClausB Posted October 4, 2019 Share Posted October 4, 2019 If the AtMega can't, the Teensy ARM probably can. https://www.pjrc.com/teensy/ Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 4, 2019 Author Share Posted October 4, 2019 Teeny DEFINITELY can. -Thom Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 4, 2019 Author Share Posted October 4, 2019 @ivop - Mark/Space is 5327/3995Hz respectively. So given the 5327Hz frequency, that makes the minimum sample rate 2663Hz due to nyquist. -Thom Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 4, 2019 Author Share Posted October 4, 2019 you might even be able to get away with doing 8-bit sample resolution, maybe even 4 bit. -Thom Quote Link to comment Share on other sites More sharing options...
Chri O. Posted October 5, 2019 Share Posted October 5, 2019 (edited) 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 October 5, 2019 by Chri O. 2 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 5, 2019 Author Share Posted October 5, 2019 Yes! -Thom Quote Link to comment Share on other sites More sharing options...
phaeron Posted October 5, 2019 Share Posted October 5, 2019 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. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.