1000REM++ 1010REM *HDVERIFY--Hard Disk Verifier (for the DTC-510A controller) 1020REM 1030REM Created: 12-DEC-1986 Author: Michael J Tubby Version: 1.00 1035REM Modified 31-DEC-1989 ADSB For Xebec controller sec/track unknown! 1040REM 1050REM This program verifies a hard disk (Winchester) running on a Beeb 1060REM with the DTC-510A/B controller. The program checks that the track 1070REM has a valid format on it (number of sectors, skew, id field crc etc.) 1080REM with the "check valid track" command, and then checks the data within 1090REM the track by reading it into a track buffer. Unfortunately this has 1100REM to be done as the old DTC controller does not have the advanced op- 1110REM codes of the newer ADAPTEC/XEBEC controllers. 1120REM 1130REM As the controller also does not support the "sense mode" command, the 1140REM size attributes of the drive cannot be obtained from the comtroller, 1150REM so they have to be 'hard coded' into the program. 1160REM 1170REM cyl% is the number of cylinders on the drive 1180REM head% is the number of heads on the drive 1190REM interleave% is the sector skew (interleave) value 1200REM 1210REM NOTE: This program may be copied/distributed as long as it is not 1220REM sold or used for commercial gain. 1230REM 1240REM-- 1245sectorspertrack%=33 1250 1260 DIM block% 16 1270 DIM error% 16 1280 DIM buffer% sectorspertrack%*256 1290 1300cyl%=612 1310head%=4 1320interleave%=9 1330 1340hs%=sectorspertrack%*head% 1350la%=(cyl%-1)*head%*sectorspertrack% + (head%-1)*sectorspertrack% + sectorspertrack%-1 1360PRINT'"HDVERIFY - Hard Disk Verifier - Version 1.10" 1370PRINT"Copyright (C) 1986 by Michael J Tubby G8TIC."' 1380INPUT"Verify: Data/Track format/Both ? (D/T/B) :"A$ 1390IFA$>"Z"THENA$=CHR$(ASC(A$)-32) 1400IFA$<>"D"ANDA$<>"T"ANDA$<>"B"THEN1380 1410@%=1:PRINT 1420ONERRORGOTO1540 1430 1440da%=0 1450cy%=da%DIVhs% 1460hd%=(da%MODhs%)DIVsectorspertrack% 1470PRINTCHR$13;"Cylinder "RIGHT$(" "+STR$cy%,3)", Head "hd%; 1480IF(A$="T" OR A$="B") THEN IFNOTFNverify(da%,interleave%) THEN z$="Format error &":GOTO1560 1490IF(A$="D" OR A$="B") THEN IFNOTFNread(da%) THEN z$="Data error &":GOTO1560 1500da%=da%+sectorspertrack%:IFda%