<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 27 Apr 2009 00:55:49 +0100
From   : jgh@... (Jonathan Graham Harston)
Subject: ADFS Drive Numbers

"Ian Wolstenholme" wrote:
> Is there a version of ADFS which can access drives numbered 2&3 or
> 6&7, or is there a hardware limitation preventing this?
> 
> I tried a few weeks ago setting a set of floppy drives to ID 2 & 3
> but ADFS gave "Not found" if I tried to mount 2, 3, 6 or 7.
 
ADFS 1.50 passes the drive number directly to the SCSI hardware for
drives 0-3 when the hard drive hardware is present, as the first
byte of the command block. All hard drive access is via the ports
at &FC4x, so there's nothing in ADFS to select more than one host
interface, and multiple drive support is done via a single host
interface.
 
The floppy access code checks the drive number and for drive 0,1
(if no hard drive) and 4,5 accesses physical floppy drive 0 by
selecting DS0 for logical drives 0 and 4, or physical drive 1 by
selecting DS1 for logical drives 1 and 5.
 
When accessing drive 2,3 (no hard drive) 6,7 the code doesn't
access any hardware at all, it just updates various settings as
though the operation has been performed, and returns.
 
With the IDE patch I deliberately allowed all four hard drive
numbers usable, 0,1 to IDE device 0 and 2,3 to IDE device 1. I
still have it in mind to be able to do something with drives 6 and
7.
 
It's not a simple patch to access a third floppy drive by
asserting DS3 as the ADFS internal variables only have settings for
two floppy drives, eg there are some bytes where b7=DS1, b6=DS0,
b5-b0=something else, or &C2E4=drive 0 settings, &C2E5=drive 1
settings, &C2E6=something else; and there are many points where the
code does things like LDA drive:AND #1:BEQ drive0:BNE drive1
 
-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
There are three food groups: brown, green and ice cream.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>