Click here to Skip to main content
12,955,493 members (60,873 online)

Welcome to the Lounge


For discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
GeneralSuccess! Pin
CDP180213-Nov-12 12:15
memberCDP180213-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
GeekforChrist13-Nov-12 14:53
memberGeekforChrist13-Nov-12 14:53 
GeneralRe: Success! Pin
CDP180213-Nov-12 21:32
memberCDP180213-Nov-12 21:32 
GeneralRe: Success! Pin
Mike Hankey13-Nov-12 15:04
memberMike Hankey13-Nov-12 15:04 
GeneralRe: Success! Pin
CDP180213-Nov-12 21:21
memberCDP180213-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.

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 29 May 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid