From: kegs@provalid.com   
      
   In article <3d788c73-abbf-40a4-930d-1a2e0830ef38n@googlegroups.com>,   
   I am Rob wrote:   
   >> That's the only Slot/Drive to SmartPort device number mapping I'm aware o=   
   >f, but I'm still a n00b. Apologies if this is off topic.   
   >   
   >That is incorrect. Prodos does not know anything about SmartPort and vice =   
   >versa. When you do a status call with SmartPort, there is no interaction w=   
   >ith Prodos and there are no calls made by Prodos to the SmartPort. The cal=   
   >l to the SmartPort uses the same logic as Prodos, but they are not connecte=   
   >d.   
   >   
   >The only device numbers that are used in the Smartport are for slots 5 and =   
   >7 (device numbers being 50 and 70). But these device numbers are for findi=   
   >ng the built-in SmartPort whereas the device number for Prodos are for the =   
   >external slots. Eventually though, the SmartPort has to access the externa=   
   >l slots where the SCSI/SD/CFFA card is with the hard drive connected. Ther=   
   >efore a device number assigned by the SmartPort needs to be mapped to a slo=   
   >t where a compatible SmartPort device is found. You can have a SCSI card i=   
   >n slot 7 and slot 2, skipping slots 4, 5 and 6, but the SmartPort assigns d=   
   >evice number of 1 and 2 for those two used slots. Therefore a table has to=   
   > be saved somewhere in memory to match a device number with the slot so the=   
   > correct softswitches can be accessed for that device.   
   >   
   >I am trying to locate that table in memory.   
      
   Devices which support Smartport need to support a ProDOS entry point as   
   well, where the ProDOS entry point is $Cx0A and Smartport is at $Cx0D.   
      
   The table you are interested in is handled by ProDOS 8 in the System Global   
   Page at $BF10-$BF2F. It contains the ProDOS entry points for each device,   
   indexed for slot 1...7 and Drive 1...2 (so 14 total devices supported).   
   For a IIgs, slot 5 goes to $C50A. Slot 6 (for a Disk II) goes to $D000.   
   When $D000 is called, code there interprets the ProDOS values in ZP and   
   effectively calls RWTS and reads the block indicated.   
   And for KEGS with 7 devices in slot 7, slot 7 drives 1 and 2 point to   
   $C70A, but the remapped devices are in other slots and go to $FD08.   
   The ProDOS driver at $FD08 converts the ProDOS call (cmd at $42, unit at   
   $43, buffer at $44,45 and block at $46,$47) into a Smartport compatible   
   format and jumps to the address it pulls from $FD6E,X and $FD7D,X where   
   X = Unit >> 4. So ProDOS will make Smartport calls, and this is how it   
   handles more than 2 devices per slot. This is internal to ProDOS 8.   
   The addresses I gave are for ProDOS 2.0.3 which is what I run usually.   
      
   Kent   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|