Jump to content
IGNORED

CS1er / TAPE994a help


Fishsta

Recommended Posts

Well, last night I tried my new (old) cassette recorder in conjunction with both the tape to disk programmes CS1er and TAPE994a.

 

FINALLY, a modicum of success... but still a failure.

 

I managed to actually create some kind of disk image, unfortunately with several "bad" records. Listening to the sound from the tape, this one sounds good quality, no added hiss or tape stretch, so I felt hopeful.

 

Upon loading the disk image file into Classic99, I listed the programme. Line numbers 100-1960 were blank except for about 2 or 3 odd lines, from 1960 to the end (somewhere in the 4000's) the listing seems to have been successfully preserved.

 

The WAV file used was recorded in Audacity with the tape recorder on maximum volume, then, still in Audacity, I removed the silence from the beginning and end and amplified the sound (with no clipping).

 

Chris36's guide (from the www.fishsta.co.uk) thread was REALLY helpful, but I'm hoping someone would know what (hopefully minor) adjustment I need to make to the setup I've got to get it actually pull the programme through correctly. I feel like I'm ALMOST there!

 

Any advice folks?

 

If I can get this working, the proverbial floodgates could open...

Link to comment
Share on other sites

Have never used CS1er or TAPE994a.

If you can use a Peb or a CF7+ Card you can load from cassette and save on disk directly... with the bagnaresi's software and ti99dir you can import and organize the ti99 diskette on a pc.

i'm import in this mode all my collection on cassette ;)... maybe it's more easy.

Link to comment
Share on other sites

I concur with the advice to try a lower volume setting. I have been able to convert, now, about five programs from cassette. Three from old RadioShack C10 "computer" cassettes, and two from regular old K-Mart specials. Each one required a different volume and tone setting, and I use CS1er for some and Tape994a for others with varying noise settings.

 

A big thing I found to watch for is clipping. That happens when the volume is too high.

 

I have always had a kind-of ear for digital recordings, so I just "know" what sounds right and what sounds wrong, and the visual output (Monitor option) of CS1er helps augment this by showing how the computer "hears" the data. If listening through headphones or the wav playback, you want the sound to be crisp and sharp. but not distorted, and the volume should be piercing but not uncomfortable. When you listen you cannot really hear the breaks between marks, but you can feel them.

 

It can be a drawn out and frustrating experience, but rewarding when it finally works (I know for fact, and I even emailed Waalid in desperation at one point.) I will check back Friday after my exam and if you are still having problems, I will post up the wav of my "Tiles" program I have been re-writing. It decodes perfectly using Tape994a with noise level 40. That should help give you a reference point.

 

Another thing I just thought about is to create a wav using CS1er or Tape994a from a program you already have, then use that as a basis of comparison. For example, paste "Aperture" into Classic99, save it, then convert that file. I just did this using CS1er and the results were perfect.

Link to comment
Share on other sites

Total guess for noise level value: If you zoom in to a couple of cycles of the signal in Audacity, look at the signal characteristics about zero (which will not be exactly zero if there is any DC bias, otherwise called the average). See if there is a nice transition through zero (indicating low amount of noise), or if there is a lot of "lumpiness" causing the wave to bounce back and forth between positive and negative. My guess is that noise parameters in tape994a might allow you to define a "zone" around zero that is considered to always be zero instead of the actual signal level.

 

Some good advice in thread. Getting the signal sampled into Audacity should be considered an audio engineering problem. One measure of quality is the signal to noise ration (S/N). You want this to be as high as possible (high signal / low noise). Too high a volume and the good signal will be "clipped" causing the numerator (S) to get stuck at maximum value while the noise continues to get larger, leading to a smaller S/N. Decreasing the volume to low will cause the noise to hit some minimum value which tends to stay the same. So going lower volume decreases signal while the noise stays about the same, again leading to S/N being smaller. By trial and error you need to find the "sweet spot" that maximizes S/N. Also clipping causes distortion effect.

 

However, once you have it in a good quality WAVE file, don't be afraid to experiment with ideas in Audigy that go against conventional wisdom. Converting the audio file to bits is outside the realm of good audio practices. In my experiments, I have found that sometimes a little bit of clipping can be a good thing. Why? Well for one thing, the peak value of the signal may vary some over the length of the file. You may run into problem where no clipping will maximize one strong peak leaving the other peaks too low. Allowing Audigy to clip allows you to bring the other peaks up while a few strong peaks get clipped. The overall S/N may go down, but as look as it stays "good enough" your still ok. Another thing clipping can do is if some peaks are too narrow to be detected correctly. Clipping causes distortion, but in this case the distortion widens the peak which can be a good thing. Just make sure to keep your original sample in a safe place and write your experimental edits to temporary files to be used in the utilities.

 

Finally, if you hit a brick wall, you can consider posting the wave file (for ones you don't mind getting out into the wild) for others to download and experiment with.

 

Regards,

Chris

Link to comment
Share on other sites

  • 3 years later...

New member/poster, so forgive me for arriving late to this party.

 

I think Fishsta, that you are trying to do the same thing I am trying to do, and that is convert some of the vast array of available files on the internet into .WAV files, to load on to an actual hardware TI-99/4A through the cassette interface. Old school.

 

I share your frustration. I think everyone else in the world is converting their physical TI library to PC stored files, to run in an emulator. Bah. The old hardware is where it's at man! Heat up those vacuum tubes.

 

My opinion is this. Tape994a's facility to create a .WAV file from a FIAD file is broken. No one much uses that option, so it has gone unnoticed and unfixed, at least in version 3.1 which is the latest I've been able to locate.

 

Try the following experiment. Create a .WAV with Tape994a from any program you know to work in an emulator. Then rename the .WAV, and convert it back to a FAID. Compare the two listings. There will be errors, usually some of them apparent in the first few lines. I am assuming it is the .WAV "write" operation that is at fault, as no one seems to be complaining about the other functionality that 99% of folks are using.

 

Alas, so far those floodgates remain closed, at least to me. I haven't gotten CS1er to work at all either.

 

Ian

  • Like 1
Link to comment
Share on other sites

My opinion is this. Tape994a's facility to create a .WAV file from a FIAD file is broken. No one much uses that option, so it has gone unnoticed and unfixed, at least in version 3.1 which is the latest I've been able to locate.

 

Try the following experiment. Create a .WAV with Tape994a from any program you know to work in an emulator. Then rename the .WAV, and convert it back to a FAID. Compare the two listings. There will be errors, usually some of them apparent in the first few lines. I am assuming it is the .WAV "write" operation that is at fault, as no one seems to be complaining about the other functionality that 99% of folks are using.

 

Alas, so far those floodgates remain closed, at least to me. I haven't gotten CS1er to work at all either.

 

I dunno... I was VERY successful is sending a FIAD to a real TI via my cell phone. See here and here. While I was still working on Tiles I also played with FIAD-to-WAV-to-FIAD with perfect results. I am at a loss as to why you are having bad results...

 

Welcome aboard.

Edited by OLD CS1
Link to comment
Share on other sites

First of all, thank-you one and all for the warm welcome. :-)


Now I have some good news,...


Dick Selis, the author of Tape994a, has been wonderfully responsive to my little bug report, and has created version 4.0 of his utility with blinding alacrity. I have tried it on a couple of programs that version 3.1 would corrupt, and the .WAV's that the new version produces appear to be perfect! As a bonus, he has improved the speed of the .WAV write as well--it's now practically instantaneous.


Thank-you so much Dick.


I quickly asked him about posting the corrected version to this board; he has asked me to hold off a week or so because he has another improvement he wishes to make first.


Be assured I will post it here as soon as he's ready.


I don't know why FIAD-to-WAV seemed to work all along for you OLD CS1. Was that perhaps a different version before a bug was introduced?


At any rate, I hope Fishsta is still around to see this too. The floodgates will be open very soon. Retro geeks like me with minimal equipment will be able to feed their solid object TI-99/4A's, using the software available on the net, and good old Advanced Analog Linear Ribbon-Disk Technology. :-)


Cheers,

Ian
  • Like 1
Link to comment
Share on other sites

Good to hear. Yeah, I cannot explain my results. At the time I toyed around with both CS1er and Tape994a, working with WAVs, MP3s, and AACs, to see what would happen between conversions. Nonetheless, it is good to hear that the program is still being worked on. I am looking forward to an updated version.

Link to comment
Share on other sites

  • 7 months later...

 

Be assured I will post it here as soon as he's ready.

 

I coincidentally found myself in the same boat earlier this week. I had just received a working TI-99/4A, a cassette interface cable, and no software.

 

I had hoped that TMA-1 would have posted a working version that converted .bin -> .wav, but seeing as how it's been nearly a year since that, I decided to see if I could come up with something that would suffice.

 

Attached to this post is a quick python script that appears to work correctly. I used "decode" from Marc Rousseau's ti99sim as a protocol reference, and borrowed liberally from a sine wavefile generator found on the ActiveState web site. It was developed on MacOS, has been tested on FreeBSD, and will probably work on Windows.

 

Usage is "bin_to_wav -i <inputfile> -o <outputfile> [--tifiles]". Input and output files should be self-explanatory, and adding "--tifiles" will strip the first 128 bytes from the file to accomodate the TIFILES header.

 

The output is a mono 44.1kHz WAV file that uses clean sine waves at 689 Hz (for logic zero) and 1378 Hz (for logic one). The output can be run back through "decode" to produce an identical source .bin file. This works quite nicely with a Raspberry Pi / USB sound box to emulate an old tape deck.

 

I hope this helps someone else trying to do the same thing. Share and enjoy -- the code is under the MIT license.

bin_to_wav.gz

Edited by ckoba
Link to comment
Share on other sites

Nice work ckoba!

 

I tried this on my Raspberry Pi and it seems to work great. I haven't tried loading the output into a Ti-99/4A yet, but the .wav file looks and sounds perfect. The program can't run under windows, as the structure of an .exe there is different.

 

I'm sorry about the lack of a finished version of Tape994a. I have been in intermittent contact with Dick Selis, but he has had issues with illness, and I suppose life in general just getting in the way of him completing the program to his satisfaction. He had been working on improvements the last I heard, which was January. I don't want to post anything without his permission, but if anyone wants the bug-corrected version of Dick's original program, contact me offline. I hope Dick won't mind.

 

Meanwhile ckoba's program seems to be just the ticket if you're using a *nix system.

Link to comment
Share on other sites

Wow! I'm saying this with tongue in cheek... But... Why not just get a tape deck icon_winking.gif

 

*chuckle* Perhaps because a tape deck, without programs on tape, is useless. The wav files produced by this script can be recorded onto tape, and then played back into the TI ... but it makes more sense to just plug the TI into the sound card of whatever you're using to produce the wav files and skip the tape step entirely.

 

Nice work ckoba!

 

I tried this on my Raspberry Pi and it seems to work great. I haven't tried loading the output into a Ti-99/4A yet, but the .wav file looks and sounds perfect. The program can't run under windows, as the structure of an .exe there is different.

 

I'm sorry about the lack of a finished version of Tape994a. I have been in intermittent contact with Dick Selis, but he has had issues with illness, and I suppose life in general just getting in the way of him completing the program to his satisfaction. He had been working on improvements the last I heard, which was January. I don't want to post anything without his permission, but if anyone wants the bug-corrected version of Dick's original program, contact me offline. I hope Dick won't mind.

 

Meanwhile ckoba's program seems to be just the ticket if you're using a *nix system.

 

I suspect that it will run on Windows, as long as it's explicitly called with the python interpreter ("c:\path\to\python.exe bin_to_wav <arguments>"). I haven't tested it, as I find Windows to be unpleasant.

 

Although the wav output is extremely clean compared to cs1er and tape994a (it appears that the latter two are reproducing sampled output from a TI rather than building waveforms), the script is a bit more resource-hungry than it probably should be. The entire output file is held in memory until it's fully constructed, which is fast but RAM-intensive.

 

If Dick is in ill health, then you might want to ask him if he'd be willing to release the source code for his utility the next time you talk to him. I wrote my script because a) no released version of either cs1er or tape994a worked at all with any file I fed them, b) I needed to prove to my wife that the TI is more than a shiny doorstop, c) source for neither utility is available, and d) I have better things to do with my time than reverse-engineer win16 machine language (the python script took only a few hours, disassembling would have taken several days).

 

It would be a shame if useful utilities have to be reinvented over time to address bugs / support modern platforms because neither the source nor the author are available.

 

Just my two cents icon_smile.gif

Edited by ckoba
Link to comment
Share on other sites

I hear ya man. Your "two cents" are valuable.

 

Especially with regards to convincing the wife! lol.

 

I've queried Dick.

 

Thanks for that. I'd very much like to implement a crossplatform utility that converts text -> BASIC token .bin -> wav, so that I can play old type-in games from "Compute" that don't appear to be available as FIAD/TIFILES ... and I'd much rather work from known-good source code.

 

My wife was intrigued by the entire project. "Um, how much did a cassette player cost back then?" "About fifty bucks." "How much did the rPi cost?" "About fifty bucks." "How much more powerful is the rPi than the TI (paraphrased)?" "Several thousand percent. The rPi can emulate the TI faster than the TI runs in real life." "Huh. Well, loading the program *sounds* neat, anyway."

Link to comment
Share on other sites

According to our resident MESS developer, the Raspberry Pi will not be emulating the TI with any reasonable speed.

 

I am curious about your comparison of the "clean" output versus what you conclude is reproduction of sampled output from CS1er and Tape994a.

Link to comment
Share on other sites

According to our resident MESS developer, the Raspberry Pi will not be emulating the TI with any reasonable speed.

 

I am curious about your comparison of the "clean" output versus what you conclude is reproduction of sampled output from CS1er and Tape994a.

 

Attached is a chunk of the waveform from cs1er, and a chunk of the waveform from bin_to_wav, as viewed in Audacity. The former is very jaggy (like the output from a real TI, as captured by a sound card), and my TI has problems reading the data represented by this waveform. The latter is pure sine wave, and my TI appears to like it very much.

 

I'm not slagging off on either cs1er or tape994a; I'm just saying that their output isn't sinusoidal ("clean") and didn't work for me at any amplitude.

 

I could have been bit by the "DC drift problem" , described thus in decode.cpp from ti99sim:

//  To illustrate what is going on, the diagram below shows a sample sequence
//  of 0 0 0 1.  The first thing to notice is that each 'bit' does occupy the
//  same number of samples.  The third '0' bit shows the DC drift problem.  The
//  next zero crossing after 'C' should be at 'D', but there are two extra
//  crossings between them.
//
//  For a 3 MHz console:
//    frequency for '0' -  689.37 Hz (1450.6μs)
//    frequency for '1' - 1378.74 Hz ( 725.3μs)
//
//                 *                   *           *
//                 |                  * |          ||
//                * |                 | |         * |
//                | *                 | |       **  |
//                |  |                | *       |   *
//         * *** *   |               *   |     *     |
//        * *   *    |         * *** |   |     |     |
//    ---A-----------B---------C*---*----D-----E-----F----
//                   |        *          |    *      |
//                   * *   *  |          *   *       *
//                    * *** | |           |  |
//                          | |           |  |
//                          * |           *  |
//                           ||            |*
//                           *             *

... which, as you can see in the first screenshot, is a real possibility for the waveform representing logic 1 if the amplitude level is shifted up or down a bit. That can't happen when using a sine wave to represent bits; one is guaranteed exactly one possible zero crossing per.

 

(edit: add pasto from decode.cpp to explain why non-sine waves might cause problems)

post-42172-0-48186800-1429217221_thumb.png

post-42172-0-48843500-1429217232_thumb.png

Edited by ckoba
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...