FLOPPYTYPE IDENTIFICATION ------------------------- by Karsten Schmidt (Chip Special) So many various types of floppydrives like for our hot loved XL/XE doesn't exist for every homecomputer. But ATARI was busy in the "good old time" and also other firms and persons have developed more or less well enhancements and absolute new types of floppies. So the most common drives are: * ATARI 1050 * ATARI 1050 + SPEEDY/HAPPY * ATARI 1050 + Turbo 1050 * ATARI 1050 + US Doubler * ATARI XF551 * F2000 (II) and * HDI (High Density Interface for 3.5" floppies by Erhard Puetz) During coding my diskeditor I had this stupid idea to show the name of the current diskdrive. Of course there're also more important things like that, where it's pretty nice to know the type of the connected floppy. But now the question was: How to realize it? 1. XF 551 --------- Well, fortunately the OS supports us with a very powerful SIO-command: GET STATUS ($53) Many of you probably don't know, how flexible this nice command is. Beside the current density of the disk, you can identify e.g. the XF551 too. After receiving the STATUS-command every floppy sends 4 Bytes back to the XL. But only the third byte is significiant for our purposes, it contains the timeout value for formatting a disk. If this value is $FE, then it's sure, that this drive is a ATARI XF551. A very positive effect would be, if we now activate the intern "speeder" of this drive by setting a higher datatransfer rate: INIT_HS LDA #IRQ STA $20A STX $20B RTS IRQ LDA #$10 STA $D204 JMP $EB2C 2. SPEEDY/HAPPY enhancement --------------------------- To realize a SPEEDY or HAPPY (it's nearly the same in this case) we use the commands GET SIO-LENGTH and SEND SIO ($68/$69). If there occurs an error, we know that there's no SPEEDY. Else we can load the High-Speed-SIO and work with this routine instead of $E459 (use this highspeed-sio only when transfering sector datas!): LDX #11 COPY LDA SIOTAB,X STA $0300,X DEX BPL COPY JSR $E459 BMI NOSPEEDY INC $0302 LDA #$40 STA $0303 LDA #HSSIO STA $0304 STX $0305 JSR $E459 BMI NOSPEEDY RTS SIOTAB DFB $31 FLOPPY ID. DFB 1 DRIVE # DFB $68 GET SIOLENGTH DFB $40 READ STATUS DFW $0308 BUFFERADDRESS DFB 7 TIMEOUT DFB 0 DUMMYBYTE DFW 2 DATALENGTH (1 WORD) DFW HSSIO NEW SIO ADDRESS ; HSSIO . FROM HERE THE . NEW SIO-ROUTINE . 3. Floppy 2000 II ----------------- Surely you think, this floppy is also a speedy drive, but we can specify it more exactly with the SIO-command GET SIOSPEED ($3F). A common SPEEDY drive uses the value $09 as timer for data transfers. However the F2000 works with the value $0A. But it doesn't mean, that the F2000 is slower than a normal SPEEDY, because the F2000 works with an higher system tactrate, namely exact 1.04 MHz. The value for a normal 1050 is $28 (in some literature it's said, this value is $10. But that's false!!!). 4. HDI 3.5" ----------- This floppy controller is very popular in Germany. It allows to connect up to 4 HD drives and furthermore it's compatible with the legendary HAPPY enhancement. To realize this type, we have to use the command GET DRIVECONFIGURATION ($4E). In that configuration table the 2nd byte (of 12) is interesting for us. It stands for the STEP RATE of the drive and is $02 if an HDI is connected (else $01). LDX #11 COPY LDA PERCOM,X STA $0300,X DEX BPL COPY JSR $E459 BMI NORM1050 LDA BUFFER+1 CMP #2 BNE NO_HDI . . . SIOTAB DFB $31 FLOPPY ID. DFB 1 DRIVE # DFB $4E GET PERCOM DFB $40 READ STATUS DFW BUFFER BUFFERADDRESS DFB 7 TIMEOUT DFB 0 DUMMYBYTE DFW 12 BLOCKLENGTH DFW 0 THING OF NO INTEREST BUFFER DFW 0,0,0,0,0,0 How you can realize the US Doubler and the Turbo 1050 I don't know, but if YOU know it, please write me a small letter (address at the end of this article)!!! Before I finish this text, I also want to add some info about the density inquiry with the command $53 (see also XF551). In the highest three bits of the first statusbyte we can read the density of the current disk in drive. Therefor we have to mask all other bits at first (AND #$E0). Now there're following possible combinations: value density $20 double $40 single $60 quad $80 medium (Some people say that bit 6 isn't used, but that's not true how I found out...) As you perhaps know the XF has big problems with realizing the density. It sends also $60 to the ATARI if the disk is only in double density. So you have to try to read a sector (e.g. $5A0) from the backside, to find out if it's double or quad! ATTENTION! You have to wait at least 5/50 seconds between executing GET STATUS and try to read this sector!!! So. All clearnesses removed? I hope so... :-) If questions or anything else,write to: Chip Special Software Karsten Schmidt Paul-Bertz-Str.107 O-9044 Chemnitz