Login
Forum Help



Post Your Message
="hidden" name="cat" value="Programming">
Username: (Login)

Topic:
Message:
 


Previous Messages
Posted By

Csabo
on 2005-03-08
23:21:30
 Re: Drive model detecting

Detecting value changes on $FEF0 can tell you if a 1551 is connected. Credits go to Gaia. This works well for me:

LDA #$FF
STA $FEF2
;
LDA #$55
STA $FEF0
;
LDA $FEF0
CMP #$55
BNE no_1551
;
LDA #$AA
STA $FEF0
;
LDA $FEF0
CMP #$AA
BNE no_1551


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).

Posted By

SVS
on 2005-03-08
11:52:55
 Drive model detecting

Hello, does somebody of you know an easy way to detect the drive model (1541, 1551, etc.) without to study their RAMs. In other hand, is existing a byte in the drives's ROMs where this info is written?


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon