Click here to Skip to main content
15,881,803 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralSuccess! Pin
CDP180213-Nov-12 12:15
CDP180213-Nov-12 12:15 
10 years ago I wrote a C++ program to convert programs from my old computer to binary files on the PC. There were several old computers of that kind, so it came down to supporting three different kinds of formats. Unfortunately I had only information on two of them at the time. It did its job, but finding the correct settings turned out to be very hard for users who did not know all details of the tape format. Now it has been high time to keep my promise to write a better and more intelligent program.

Getting the data off the tapes is the easiest part: Hook up the tape recorder to the PC's sound card and sample them as WAV files. The raw samples usually don't look very good. They come from more than 30 year old tapes and analog tape recorders. This is why some filtering was in order. Even the old program did a good job at reconstructing the original digital signal with the help of some mathmatical magic.

Now the buffer should contain a sequence of longer or shorter high/low sequences, representing bits. Plus static at the beginning and the end and possible errors in the data. Simply counting the samples would not have worked.

In the old program the user had to figure out the minimum and maximum sampling settings for both ones and zeros. That involved a lot of trial and error until reliable settings were found, but then it usually worked for all tapes from that computer.

It was not easy and involved something resembling fuzzy logic, but the new program has just successfully converted a WAV recording from my old computer correctly at just the second try. It figured out the correct timing, automatically corrected the inverted signal and then correctly generated a 4096 byte binary file of the program. The second try was only needed to (still manually) set the filtering to a stronger setting. There was a small glitch in the middle of the data.

Now I must wait fot WAVs from other computers to test the other formats, but I think the concept works. Getting the binary files onto the old computers actually is very easy. The program can generate a new WAV file from the binaries, in any of the three formats of course. Save them to tape or play them directly to the computer and they will load.

This way we can even program conveniently on the PC. I Use Visual Studio, a special little C compiler and an emulator for testing. When I'm finished, I just create a WAV from the binary file and then can import and run it on the real thing.
GeneralRe: Success! Pin
Casey Sheridan13-Nov-12 14:53
professionalCasey Sheridan13-Nov-12 14:53 
GeneralRe: Success! Pin
CDP180213-Nov-12 21:32
CDP180213-Nov-12 21:32 
GeneralRe: Success! Pin
Mike Hankey13-Nov-12 15:04
mveMike Hankey13-Nov-12 15:04 
GeneralRe: Success! Pin
CDP180213-Nov-12 21:21
CDP180213-Nov-12 21:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.