Ira Goldklang's TRS-80 Revived Site

TRS-80 Revived Site by Ira Goldklang's is an archive of everything related to the Tandy Radio Shack TRS-80 microcomputer lines. Site contains emulators, programs, manuals, books, patches, games, hints, discussions, questions, forums, and tons more.

June 2, 2011 – Any C++ Programmers Out There?

by @ 1:00 pm on June 2, 2011. Filed under Site Updates


June 2, 2011 – Any C++ Programmers Out There?


If you are good at C++ and good at modifying someone else’s source code and knowledgable about the Catweasel, please read on …

… as many of you know, TRS-80 disks were never meant to hold data for 30+ years, and one of the things I do for people is read their disks into DMK images. Much of the time, people are trying to get their old documents and records off the disks, so getting the best possible read off the disks can mean the difference between a corrupt file or a good one.

To do the disk reading I have a dedicated system set up with a Catweasel, a floppy drive, DOS boot, and Tim Mann’s wonderful Catweasel utilities.

As any of you who have a Catweasel may know, Tim’s utilities allow for a command line option to give a specific number of retries for any track which reads with errors BUT it outputs the track as read on the LAST read rather than the track as read on the BEST read. You could have 19 reads of “9 good sectors, 1 bad sector” but if the 20th retry is “6 good sectors, 4 bad sectors” that is what you get, and 3 otherwise good sectors are lost (you can restart the process again, but it is all going to be a roulette game). Those sectors being good could easily mean the difference between a good file and a corrupted one.

The reason for this, however (and as Tim has previously told me), is that the Catweasel works only on a Track level, which is the rub.

I am wondering if anyone out there has the C++ know how to modify Tim’s CW2DMK.c program so that when a track is read (as currently written in the program), an array is populated with the actual sectors (which I guess might be one entry for any DMK header, and the remaining array equal to the track length divided by the sector size; but what do I know), and then if a successive retry produces a good sector where there was previously a bad one, the (bad) sector in the array is replaced with the newly successfully read one; and once the retry count is done, the array is assembled into a track; at which point the track is written out (as currently written in the program).

Tim has been busy with other projects (he has been well aware of the request for quite some time), and the track vs. sector nature of the Catweasel probably makes this a project he does not wish to tackle, but a recent set of disks where the person was desperate for their data has just triggered me to see if anyone out there can do it. Modifying the source code appears, on my quick read, to be permitted under the license under which it was issued, provided certain obligations are met.

However, it is Tim’s project, Tim’s source, and whether this is actually made public should be entirely up to Tim in my book. Certainly anyone who writes in the functionality is encouraged to send it to Tim; perhaps he will integrate it.

Links:

     
  • Tim’s Catweasel Page (with links to v4.4; source code is included)
         
  • The DMK format is explained .
         
  • The FREE MSDOS C++ compiler which is used to compile the Catweasel utilities is the DJGPP Compiler. Tim’s makefile is makefile.dj for that reason.

    Update: One person has graciously already offered to take a look at the source code.

    One Response to “June 2, 2011 – Any C++ Programmers Out There?”

    1. Tim Mann says:

      Actually the Catweasel tools are written in plain C, not C++. So you don’t need C++ skills, just C.

    Leave a Reply

    [Ira Goldklang's TRS-80 Revived Site is proudly powered by WordPress.]