|
Please Note: The information in this document has just been translated over from the printed version (14-Aug-98) and is being reviewed. There are errors! This notice will go away once all the obvious errors are corrected. From there, this document will be upgraded over time.
SECTION I
Who has not mourned the loss of a precious document file; that for some reason (usually obscure) cannot be read back from the cassette tape? The following simple BASIC "salvage" program appeared anonymously in the newsletter of our Bay Area NEC/100 User's Group, and deserves wide circulation.
(I can now reveal that the authors were in fact Frank Oechsli and Bea Vandenberg.) This program will salvage many a defective .DO file recorded on cassette tape, provided that the Model 100 is able to recognize the opening of the file as it should, printing FOUND It is lines 10 and 100 that keep the Model 100 on the salvage job in spite of the damage. That's the main idea of the program; it's simple, but delightfully effective, and applicable to many computers. To test the program, you can artificially generate reading errors by slowly depressing and releasing the pause key during loading. Normal loading would then terminate with an IO (Input Output) error; but the program BEEPS and perseveres.
In the sidebar ... I offer an embellished version RESCUE.BA tailored for the Model 100. It is worth keeping on file for emergencies. But for the moment read on; we have more to learn.
SECTION II Here is the recipe in detail. With the cassette correctly connected, and volume around 5 or 6 (usually), move the tape to begin play just before any document file header that is undamaged; then start to run the above program listening attentively with your finger on the pause key of the cassette recorder. Depress this pause key as soon as a click is heard from within the Model 100 indicating that the header has been recognized. At this point relax and at your own pace move the tape to the beginning of the damaged file. In most cases this move can be made by depressing the rewind key or the fast-forward key even without releasing the play key. (In troublesome cases it may be necessary to detach temporarily the three leads from the cassette and play the tape to listen for the cacophonous screech that announces the file; one then depresses the pause key again, adjusts the volume to around 5 or 6 again, and reattaches the leads.) Next, one initiates the salvage of the file by releasing the pause key. When the computer stops, the file RESCUE.DO will contain the salvaged material with black blocks indicating spots where the Model 100 detected an error (delete the 1st command of line 100 if these are annoying).
SECTION III Perhaps other users will be able to tell us how to salvage .BA and .CO files; it is a more difficult task. Readers should be reminded that Tandy has, for reasons best understood by itself, reversed the usual roles of the two wires in the (grey) cassette recorder lead used in recording; that is why this lead must be plugged into the AUXiliary socket, rather than into the MICrophone socket as for the sister computers NEC 8201 and Olivetti M10. To forget this is one fine way to create defective cassette files that will be very hard to salvage.
SECTION IV Prevention is always better than cure! The old adages concerning tape storage should still be heeded: use tape you can trust (not necessarily expensive tape!), keep the recorder tape head area clean, keep the recorder batteries fresh (or use wall cur rent), and try several volume levels before concluding that a file on tape is defective. Noting the continuing high prices of disk drives, I am sure that a huge number of users must still rely on cassette tape storage. The above tricks do add a measure of safety, making use of the humble cassette recorder more acceptable.
For files of lesser importance, I now dare to make just one copy, not two or three, and thereby trade off some extra safety for a measure of efficiency.
Update #1 From: BILL TEMPLETON The program will run with "#" symbol in lines 20, 30 and 50, although it is not required on the M100. However, the program will not run with the default setting of MAXFILES=1, and with the filename "Salvage" in line 30!
Update #2 From: BILL TEMPLETON Update #3 From: BILL TEMPLETON RECOVER .DO FILES FROM BAD TAPE Try using the following short program to recover your .DO files from tape! You don't have to use `filename' after CAS: in line 1 if you just want to read the next text file on tape, and you can eliminate: PRINT#2,"***ERROR***"; if you don't want to have this inserted in the resulting SAVE.DO file every time an error occurs...
10 MAXFILES=2: ON ERROR GOTO 100
20 SOUND ON: OPEN"CAS:" FOR INPUT AS #1
30 OPEN"rescue" FOR OUTPUT AS #2
40 IF EOF(1) THEN END
50 A$=INPUT$(1,1): PRINT#2,A$;: PRINTA$;
60 GOTO 40
100 BEEP: RESUME
The above program will fail if the Model 100 cannot recognize the file header, and alas, the header is often the first thing to get damaged. But for such occasions I have been successfully using an other trick to save the day. One has only to make the Model 100 recognize any file header anywhere and then without letting its attention waver make it read the damaged file.
The program may still abort before the whole file is salvaged. In this case, I suggest removing from `RESCUE.DO' the material already salvaged, then repeating the process of the above paragraph with one difference: release the pause key to start the salvage just before the point on the tape where the last salvage operation aborted. It is safest to do this in the tiny space between two data blocks.
Incidentally NEC users rarely have to salvage cassette files as above, for the NEC is the proverbial tortoise using a slow but sure baud rate for cassette communication (600 baud compared to 1500 for the Model 100).
NOTE: In order for the program in Larry Siebenmann's recent message regarding the RESCUE.BA program, some minor changes must be made to make it run on a Model 100 as follows:
10 ON ERROR GOTO 100
15 MAXFILES=2:SOUNDON:CLS:PRINT
20 OPEN"CAS:" FOR INPUT AS #1
30 OPEN"salvge" FOR OUTPUT AS #2
40 IFEOF(1) THEN BEEP:BEEP:MAXFILES= 1:END
50 A$=INPUT$(1,#1):PRINT#2,A$;:PRINTA$;:GOTO40
100 PRINT#2,CHR$(239);:PRINT:PRINT"erl =";ERL;" ; err =";ERR:BEEP:RESUME
NOTE: Here's my final version of Larry's program (without REMS) that will recover .DO files from bad tape...
1 MAXFILES=2:ONERRORGOTO15:SOUNDON:CLS:PRINT:SCREEN0,0:E$=CHR$(27):CLS:PRINTE$;" p CASSETTE DOCUMENT FILE RESCUE PROGRAM ";E$"q
2 PRINT@49,"(heavy weather option)":PRINT" 1. Depress recorder's pause key as soon as click is heard from your"
3 PRINT" Model 100.":OPEN"CAS:"FORINPUTAS#1:PRINT" 2. Release pause key after moving to part of tape still to be salvaged.
4 IFINKEY$=""THEN4ELSECLS
5 OPEN"RESCUE"FORAPPENDAS#2
6 A$=INPUT$(1,#1):GOSUB7:GOSUB9:GOTO6
7 PRINT#2,A$;:PRINTA$;:IF(POS(0)MOD40)=0ANDASC(A$)<>13THENGOSUB14
8 RETURN
9 IFEOF(1)=0THENRETURN
10 BEEP:BEEP:CLS:PRINT@12,E$"p Rescue over! "E$"q
11 PRINT" Is tape at end of file? If not try again after inspecting and"
12 PRINT" evacuating RESCUE.DO. Do a string search there for blocks`";CHR$(239);"' showing"
13 PRINT" where errors were detected.";:END
14 PRINT@40*(CSRLINMOD7),SPACE$(40);:PRINT@40* (CSRLINMOD7),STRING$(40,255 );:PRINT@40*((CSRLIN+5)MOD7),"";:RETURN
15 PRINT#2,CHR$(239);:PRINT:GOSUB14:PRINT"erl =";ERL;";err=";ERR:BEEP:GOSUB14:RESUME
NOTE: Change `CPT:' in line 4 to read from one of your current filenames and try my version of Larry Siebenmann's latest RESCUE.BA program.
0 'RESCUE.BA, Bay area Nec/100 group, 1985
1 MAXFILES=2:ONERRORGOTO15:SOUNDON:CLS:PRINT:SCREEN0,0:E$=CHR$(27):CLS:PRINTE$;" p CASSETTE DOCUMENT FILE RESCUE PROGRAM ";E$"q
2 PRINT@49,"(heavy weather option)":PRINT" 1. Depress recorder's pause key as soon as click is heard from your
3 PRINT" Model 100.":PRINT" 2. Release pause key after moving to part of tape still to be salvaged.
4 OPEN"CPT:"FORINPUTAS#1:OPEN"RESCUE"FORAPPENDAS#2
5 IFINKEY$=""THEN5ELSECLS
6 A$=INPUT$(1,#1):GOSUB7:GOSUB9:GOTO6
7 PRINT#2,A$;:PRINTA$;:IF(POS(0)MOD40)=0ANDASC(A$)<>13THENGOSUB14
8 RETURN
9 IFEOF(1)=0THENRETURN
10 BEEP:BEEP:CLS:PRINT@12,E$"p Rescue over! "E$"q
11 PRINT" Is tape at end of file? If not try again after inspecting and
12 PRINT" evacuating RESCUE.DO. Do a string search there for blocks`";CHR$(239);"' showing
13 PRINT" where errors were detected.";:END
14 PRINT@40*(CSRLINMOD7),SPACE$(40);:PRINT@40*(CSRLINMOD7),STRING$(40,255 );:PRINT@40*((CSRLIN+5)MOD7),"";:RETURN
15 PRINT#2,CHR$(239);:PRINT:GOSUB14:PRINT"erl =";ERL;";err=";ERR:BEEP:GOSUB14:RESUME
by BILL TEMPLETON
1 CLS:MAXFILES=2:OPEN"CAS:filename"FORINPUTAS1:OPEN"save"FOROUTPUTAS2
2 ONERRORGOTO7:print@133,"Working...
3 A$=INPUT$(1,1)
4 IFEOF(1)THEN6
5 PRINT#2,A$;:GOTO3
6 CLOSE:MAXFILES=1:MENU
7 PRINT"Error ="ERR" On line"ERL:PRINT#2,"***ERROR***";:RESUMENEXT