Click here to Skip to main content

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy.
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 and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.


 
GeneralSuccess! PinmemberCDP180213-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! PinmemberGeekforChrist13-Nov-12 14:53 
GeneralRe: Success! PinmemberCDP180213-Nov-12 21:32 
GeneralRe: Success! PinmemberMike Hankey13-Nov-12 15:04 
GeneralRe: Success! PinmemberCDP180213-Nov-12 21:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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.140827.1 | Last Updated 28 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid