Occasionally you might come across a disk that has become corrupted in its file storage pointer area (track zero) that will simply refuse to load any file at all. What will usually cause this is a glitch on power up of either the drive or computer, with the disk installed. Occasionally a bad WD1770 controller chip has also been found to cause this problem. ALWAYS remove your disk from your drive when powering up either your computer or the drive, unless the disk in the drive is something that you do not care if it is destroyed (or is one that you have a good back up for). It is best to simply get into the habit of doing this all of the time, regardless of the disk that you have installed. BUT EVERYONE can forget sometimes so I will present a small program that MIGHT bring your disk back to life, or may kill it completely. If it’s gone already, you have nothing to lose by trying it and you might be able to recover the corrupted disk.
The first thing to try if you have a corrupted disk is to re-save file zero. File zero uses sectors 1-3 of track zero, and when SAFE loads ANY file it ALWAYS loads all ten sectors of track zero. Because the glitch could have only corrupted one of the first three sectors, we have a 30% chance that simply re-saving file zero will fix the problem. Enter a single line program such as: 10 PRINT and save it to file zero with the command <SAVE / 0 ENTER>. Now try a CAT or try to load a regular file. Perhaps we have fixed the disk already! If not….
If not, then after the computer stops with its error T report, enter the command <PRINT IN 175>. The sector number that is causing the problem will be printed on the screen. Because the CATalog area starts with sector 4 and ends with sector 10, and re-saving file zero into sectors 1-3 did not fix the problem, you will find that the actual bad sector will usually be in the range of 4-10. If the sector giving the problem is NOT sector 4, then it is VERY likely that we can restore the catalog area by using a little utility program. If it IS sector 4, you can still try it and it may work. The utility program is given below. Key it in and do a CAT (even though it stops with a error), then RUN the program.
10 RESTORE 30: FOR N=32000 TO 32006: READ A: POKE N,A: NEXT N
20 RAND USR 32000
30 DATA 205,10,0,205,142,10,223
This little program re-saves the CATalog back onto the disk. If the error was actually in a later portion of the catalog area that was not being used (the CAT area can hold 177 file, and will not be full unless you have thai many files on disk!), then the data re-saved will be correct and the disk will be completely recovered. You will find that over 90% of the time this program will restore access to your disk. To those interested in what this program does at the MC level, I provide the following annoted assembly listing. It is a very simple little routine.
CALL 000A ;turn on Oliger Disk B bank
CALL 0A8E ;save the contents of the B bank buffer to track 0. Data will be
;put there by using CAT before runing this program
RST 18H ;turn off B bank, turn on interrupts & return to basic
John L. Oliger 8/87
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.