fred@cbmvax.UUCP (Fred Bowen) (09/16/87)
Several people have asked how to tell whether their disk drive has the
latest ROM in 'em, without having to open the case and look. The
following program is a modified version of something I posted many
moons ago which does just this. It is also useful for determining the
disk type without sending a drive a "UJ" (soft reset) and reading the
power-up message (possibly screwing up the soft-set unit number, etc.).
It runs on both C64 and C128 systems. Please note that future ROM
releases (gawd- I hope not!) may cause this code to be inaccurate.
10 REM CHECK DISK TYPE F.BOWEN 09/15/87
20 REM
30 REM THIS PROGRAM WILL IDENTIFY THE
40 REM CBM DISK TYPE BY CHECKING THE
50 REM DRIVE'S CHECKSUM BYTE.
70 REM
100 INPUT"CHECK WHICH UNIT";U: OPEN8,U,15
110 PRINT#8,"M-R"CHR$(00)CHR$(192)CHR$(2): GET#8,A$,B$
120 PRINT#8,"M-R"CHR$(47)CHR$(255)CHR$(1): GET#8,C$
130 CLOSE8
140 :
150 A=ASC(A$):B=ASC(B$):C=ASC(C$): REM ADD +CHR$(0) IF C64
160 :
170 IF A<>151 THEN 230
180 IF C<>169 THEN PRINT"1541" : END
190 IF B= 70 THEN PRINT"1541B- WITH UPDATE" : END
200 IF B= 170 THEN PRINT"1541B- NEEDS UPDATE": END
210 IF B= 224 THEN PRINT"1541-II": END
220 :
230 IF A=56 THEN PRINT"1571- WITH UPDATE": END
240 IF A=66 THEN PRINT"1571- NEEDS UPDATE": END
250 IF A=132 THEN PRINT"1571CR": END
260 :
270 IF A=192 THEN PRINT"1581": END
280 :
290 PRINT"UNRECOGNIZED DRIVE"
--
--
Fred Bowen uucp: {ihnp4|rutgers|caip}!cbmvax!fred
arpa: beats me
tele: 215 431-9100
Commodore Electronics, Ltd., 1200 Wilson Drive, West Chester, PA, 19380