Login
Back to forumSee the full topicGo to last reply

Posted By

JamesC
on 2005-03-08
21:30:45
 Re: Drive model detecting

Yes.... in the DS$ returned on power-up or reset. wink

Type of disk drive?

You may want to know what type of disk drive you are interfacing with. In
some cases there may also be more than one disk drive ROM version that you
need to check for. To check what disk drive is being used you can reset
the drive then check the response message that you get back in the disk
status message. Use a reset command "UI" (warm start reset) then after a
short delay read the disk drive status. Here is a program fragment that
will do it (assuming device 9):

OPEN 1,9,15,"UI" : FOR I=1 TO 50 : NEXT
CLOSE 1 : OPEN 1,9,15
INPUT#1,S,M$
IF S=73 THEN PRINT M$


Here is a sampling of messages that you will get in M$

1571 old ROM : CBM DOS V3.0 1571 [ free standing 1571 ]
1571 new ROM : CBM DOS V3.1 1571 [ 128D-CR 1571 ]
1571 w/JiffyDOS : JIFFYDOS 5.0 1571
1541 : CBM DOS V2.6 1541
1581 w/JiffyDOS : COPYRIGHT CMD DOS 5.0 1581

The above information courtesy of Cameron Kaiser's Commodore Knowledge Database: http://www.floodgap.com/retrobits/ckb/display.cgi?85

From here, a simple RIGHT$(DS$,4) will return the Commodore disk drive used. You might have to force a "1541" if none of the above is found (I do not know what Csabo's Oceanic drive or an Excellerator drive will return).



Back to top


Copyright © Plus/4 World Team, 2001-2024