RX50 on RQDX3 on 2.11BSD

Tim Shoppa SHOPPA at trailing-edge.com
Wed Jun 7 05:38:29 AEST 2000

>Does anyone have experience using the RX50 floppy drive under 2.11BSD?

Yeah, sure.

> I
>patched my FreeBSD kernel to handle RX50-format (80 cyl / 1 hd / 10 sec)
>diskettes, and noticed what seemed to be some sort of logical sector
>interleave (I also have hardware that does physical diskette reads /
<dumps, which assured me that I was getting the physical data off the disk
>in the order prescribed by the sector ID address marks); so, back to the
>old '11 for another round of test-disk making. My test data was simple
>enough: 512 bytes of 16-bit unsigned integer one, followed by 512 bytes of
>UINT16 2, usw. to UINT16 800; the easier to figure out the interleave, my
>precious... But I didna even get that far: observe (testrx50.img is
>409,600 bytes):
>	$ dd if=testrx50.img of=/dev/ra12a
>	800+0 records in
>	800+0 records out
>	$ dd if=/dev/ra12a of=test
>	800+0 records in
>	800+0 records out
>	$ diff testrx50.img test
>	Binary files testrx50.img and test differ
>WHOA! This shouldn't happen, should it?

No, it shouldn't, but I'm confused as to where you're doing this at.
Is this on FreeBSD?

>  - The '11/2.11BSD never seem to write the first two sectors, although
>no error is returned to this effect; in fact, the data in sector three is
>from offset 1024 in the input data (0x0003 in the above example). Is this
>due to disk label support or something? The raw (character) device reports
>itself as read-only, even for root.

This must have something to do with the 2.11BSD disk label.  The raw
character device should be writable, can you try rm'ing the appropriate
entries and remaking them with /dev/MAKEDEV?

Also note that you may have to issue a disklabel command to make it
possible for you to clobber the sectors where the disk label would otherwise

>  - The remaining data sometimes (but not always; the specific
>circumstances involved I have not yet figured out conclusively -- physical
>interleave, preexisting data (!), or, something else?) carries an
>interleave, though I admit I haven't figured it out yet (meaning I haven't
>sat down and done it, not that I don't know how).

Yes, there is a physical<->logical block interleave on the RX50.  See, for
example, John Wilson's PUTR source code ( at ftp://ftp.dbit.com/pub/ibmpc/putr/
- assuming that ftp.dbit.com is back up by now!) for details and
example code.

>Finally, I noticed there is no floppy-specific code in the MSCP driver, so
>all the gory details of floppy control (along with the gory details of the
>above) must be dealt with by the RQDX3.

That's true, the RQDX3 takes care of all that.  If you look at any DEC
Professional RX50 driver source code, you'll see the interleave code in there.
For example, from RT-11's DZ.MAC sources:

; In standard RT-PC mode, a 2:1 interleave is used on a single track and
; a 2 sector skew is used across tracks.

("RT-PC" means "RT-11 on a DEC Professional", roughly!)

and later, in a breathtaking example of tight driver interleave code
(really, study it very closely, this is good stuff!):

; Normal I/O, convert block number to track and sector number and interleave
        ASL     R2              ;Make word count unsigned byte count
        MOV     (PC)+,R4        ;Loop count for 8 bit division
         .BYTE  -7.,-10.        ;Count becomes 0, -10 in high byte for later
50$:    CMP     #1280.,R5       ;Does 10 go into dividend (10.*200)?
        BHI     60$             ;Branch if not, C-bit clear
        ADD     #-1280.,R5      ;Subtract 10 from dividend, and set C-bit
60$:    ROL     R5              ;Shift dividend and quotient
        INCB    R4              ;Decrement loop count
        BLE     50$             ;Branch until divide done
        MOVB    R5,R1           ;Copy track number 0:79, zero extend
        ADD     R4,R5           ;Make sector < 0
        MOV     R1,R4           ;Copy track number
        ASL     R1              ;Multiply by 2 (skew)
70$:    SUB     #10.,R1         ;Reduce track number * 2 MOD 10
        BGT     70$             ; to find offset for this track, -10:0
        MOV     R1,TRKOFF       ;Save it
        BR      100$            ;Go save parameters and start

>And, er, _really_ finally, is it really true that I can put any HD AT
>drive (well, any one that sports DS jumpers) on the RQDX3 and it'll
>function as an RX33? Does this void my field service contract, as my field
>service engineer is growing bored with staying up all night trying to
>understand funky DEC floppy hardware, as Parts currently has Guinness on
>a 180-day lead and it is a neccessary part of such an operation?

The DEC RX33 floppy drive *is* a TEAC FD55GFR, also commonly found
on PC-clones.

Not just *any* HD AT floppy drive will work.  Not only does it need
to support the drive select jumpers, it also needs a bit more jumper
configurability.  The exact jumper settings vary depending on which
exact FD55 model and revision you're using.  As of a few months
ago many of the jumper setting legends were decoded on the spec sheets
you could get from TEAC's faxback service.

The standard reference on this subject for the past decade has been
Terry Kennedy's THIRD-PARTY-DISKS.TXT, available via anonymous FTP


Since this subject comes up several times a year, would it be possible
to link to the above document from somewhere in the PUPS archive, Warren?

 Tim Shoppa                        Email: shoppa at trailing-edge.com
 Trailing Edge Technology          WWW:   http://www.trailing-edge.com/
 7328 Bradley Blvd		   Voice: 301-767-5917
 Bethesda, MD, USA 20817           Fax:   301-767-5927

Received: (from major at localhost)
	by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id GAA16978
	for pups-liszt; Wed, 7 Jun 2000 06:01:47 +1000 (EST)
	(envelope-from owner-pups at minnie.cs.adfa.edu.au)

More information about the TUHS mailing list