changeset 613:16dc49e3a104

SuperIDE driver/descriptors added, removed dd_ide.asm and h0_ide.asm in favor of one file: idedesc.asm
author boisy
date Tue, 26 Nov 2002 19:17:18 +0000
parents 17b517997c7a
children 998bba700c40
files 3rdparty/drivers/ide/ccide.asm 3rdparty/drivers/ide/dd_ide.asm 3rdparty/drivers/ide/h0_ide.asm 3rdparty/drivers/ide/idedesc.asm 3rdparty/drivers/ide/makefile
diffstat 5 files changed, 160 insertions(+), 123 deletions(-) [+]
line wrap: on
line diff
--- a/3rdparty/drivers/ide/ccide.asm	Sat Nov 23 11:23:35 2002 +0000
+++ b/3rdparty/drivers/ide/ccide.asm	Tue Nov 26 19:17:18 2002 +0000
@@ -142,6 +142,18 @@
 
 * IDE hardware offsets
 DataReg  equ   0         Data (1st 8 bits, non-latched)
+         IFNE  SuperIDE
+Latch    equ   1         Latch (2nd 8 bits of 16 bit word)
+Error    equ   2         Error # when read
+Features equ   2         Features when write
+SectCnt  equ   3         Sector count
+SectNum  equ   4         Sector #
+CylLow   equ   5         Low byte of cylinder
+CylHigh  equ   6         High byte of cylinder
+DevHead  equ   7         Device/Head
+Status   equ   8         Status when read
+Command  equ   8         Command when write
+         ELSE
 Error    equ   1         Error # when read
 Features equ   1         Features when write
 SectCnt  equ   2         Sector count
@@ -152,6 +164,7 @@
 Status   equ   7         Status when read
 Command  equ   7         Command when write
 Latch    equ   8         Latch (2nd 8 bits of 16 bit word)
+         ENDC
 
 * Special flags (Mini extra drive table - 1 byte per drive) - starts at
 *    DriveFlg,u
@@ -226,7 +239,11 @@
 
          fcb   $FF         mode byte
 
+         IFNE  SuperIDE
+name     fcs   /SuperIDE/  module name
+         ELSE
 name     fcs   /CCIDE/     module name
+         ENDC
          fcb   edition     module edition
 
 * INIT - appears to only be called on 1ST try on ANY IDE device IF link counts
@@ -654,6 +671,16 @@
 Read256  lda   #$20           # of loops (of 8 bytes)
          pshs  y,a            Save y & counter
          ldy   V.PORT,u       Get ptr to IDE controller for this drive
+         IFNE  SuperIDE
+ReadLp   ldd   ,y             Get 16 bits of data, and save in buffer, 8 times
+         std   ,x
+         ldd   ,y
+         std   2,x
+         ldd   ,y
+         std   4,x
+         ldd   ,y
+         std   6,x
+         ELSE
 ReadLp   lda   ,y             Get 16 bits of data, and save in buffer, 8
          ldb   Latch,y          times
          std   ,x
@@ -666,6 +693,7 @@
          lda   ,y
          ldb   Latch,y
          std   6,x
+         ENDC
          leax  8,x            Bump ptr up
          dec   ,s             Done all bytes?
          bne   ReadLp         No, keep going
@@ -775,6 +803,16 @@
 Write256 lda   #$20         # of 8 byte loops
          pshs  y,a          Save Y & loop counter
          ldy   V.PORT,u     Get IDE base address
+         IFNE  SuperIDE
+WritLp   ldd   ,x           Copy 256 bytes from buffer to IDE
+         std   ,y
+         ldd   2,x
+         std   ,y
+         ldd   4,x
+         std   ,y
+         ldd   6,x
+         std   ,y
+         ELSE
 WritLp   ldd   ,x           Copy 256 bytes from buffer to IDE
          stb   Latch,y
          sta   ,y
@@ -787,6 +825,7 @@
          ldd   6,x
          stb   Latch,y
          sta   ,y
+         ENDC
          leax  8,x
          dec   ,s
          bne   WritLp
--- a/3rdparty/drivers/ide/dd_ide.asm	Sat Nov 23 11:23:35 2002 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-********************************************************************
-* H0 - CCIDE device descriptor
-*
-* $Id$
-*
-* Ed.    Comments                                       Who YY/MM/DD
-* ------------------------------------------------------------------
-
-         nam   H0
-         ttl   IDE device descriptor
-
-         ifp1  
-         use   defsfile
-         endc  
-
-dnum     equ   0
-
-tylg     set   Devic+Objct
-atrv     set   ReEnt+rev
-rev      set   $01
-
-         mod   eom,name,tylg,atrv,mgrnam,drvnam
-
-         fcb   DIR.!ISIZ.!SHARE.!PEXEC.!PWRIT.!PREAD.!EXEC.!UPDAT. mode byte
-         fcb   HW.Page    extended controller address
-         fdb   $FF70      physical controller address
-         fcb   initsize-*-1 initilization table size
-         fcb   DT.RBF     device type:0=scf,1=rbf,2=pipe,3=scf
-         fcb   dnum       drive number
-         fcb   $00        step rate
-         fcb   TYP.HARD   drive device type
-         fcb   DNS.FM     media density:0=single,1=double
-         fdb   306        number of cylinders (tracks)
-         fcb   6          number of sides
-         fcb   0          verify disk writes:0=on
-         fdb   32         # of sectors per track
-         fdb   32         # of sectors per track (track 0)
-         fcb   26         sector interleave factor
-         fcb   8          minimum size of sector allocation
-initsize equ   *
-* Additional space for Curtis' new driver
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-
-name     fcs   /DD/
-mgrnam   fcs   /RBF/
-drvnam   fcs   /CCIDE/
-
-         emod  
-eom      equ   *
-         end   
--- a/3rdparty/drivers/ide/h0_ide.asm	Sat Nov 23 11:23:35 2002 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-********************************************************************
-* H0 - CCIDE device descriptor
-*
-* $Id$
-*
-* Ed.    Comments                                       Who YY/MM/DD
-* ------------------------------------------------------------------
-
-         nam   H0
-         ttl   IDE device descriptor
-
-         ifp1  
-         use   defsfile
-         endc  
-
-dnum     equ   0
-
-tylg     set   Devic+Objct
-atrv     set   ReEnt+rev
-rev      set   $01
-
-         mod   eom,name,tylg,atrv,mgrnam,drvnam
-
-         fcb   DIR.!ISIZ.!SHARE.!PEXEC.!PWRIT.!PREAD.!EXEC.!UPDAT. mode byte
-         fcb   HW.Page    extended controller address
-         fdb   $FF70      physical controller address
-         fcb   initsize-*-1 initilization table size
-         fcb   DT.RBF     device type:0=scf,1=rbf,2=pipe,3=scf
-         fcb   dnum       drive number
-         fcb   $00        step rate
-         fcb   TYP.HARD   drive device type
-         fcb   DNS.FM     media density:0=single,1=double
-         fdb   306        number of cylinders (tracks)
-         fcb   6          number of sides
-         fcb   0          verify disk writes:0=on
-         fdb   32         # of sectors per track
-         fdb   32         # of sectors per track (track 0)
-         fcb   26         sector interleave factor
-         fcb   8          minimum size of sector allocation
-initsize equ   *
-* Additional space for Curtis' new driver
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-         fcb   0
-
-name     fcc   /H/
-         fcb   176+dnum
-mgrnam   fcs   /RBF/
-drvnam   fcs   /CCIDE/
-
-         emod  
-eom      equ   *
-         end   
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/3rdparty/drivers/ide/idedesc.asm	Tue Nov 26 19:17:18 2002 +0000
@@ -0,0 +1,95 @@
+         nam   H0        
+         ttl   IDE device descriptor
+
+* IDE Defined Offsets
+*
+* IT.STP (offset $14)
+*  Bit Meaning
+*  --- ---------------------------------------------------------------
+* 
+* IT.TYP (offset $15)
+*  Bit Meaning
+*  --- ---------------------------------------------------------------
+*  7   Hard Disk:  1 = hard disk, 0 = floppy disk
+*  6   Fudge LSN0: 0 = OS-9 disk, 1 = non-OS-9 disk
+* 
+* IT.DNS (offset $16)
+*  Bit Meaning
+*  --- ---------------------------------------------------------------
+
+
+* Interface Address
+         ifne  SuperSCSI 
+ADDR     equ   $FF50     
+         else            
+ADDR     equ   $FF74     
+         endc            
+
+* Driver specific fields
+ITDRV    set   $00       
+ITSTP    set   $00       
+ITTYP    set   $80       
+ITDNS    set   $00       
+
+ITSOFS1  set   $00       
+ITSOFS2  set   $00       
+ITSOFS3  set   $00       
+
+* Default Geometry
+Sides    set   $20       
+Cyls     set   $100      
+SectTrk  set   $0020     
+SectTrk0 set   $0020     
+Interlv  set   $01       
+SASiz    set   $08       
+
+         ifp1            
+         use   defsfile  
+         endc            
+
+tylg     set   Devic+Objct
+atrv     set   ReEnt+rev 
+rev      set   $0        
+
+         mod   eom,name,tylg,atrv,mgrnam,drvnam
+
+         fcb   $FF        mode byte
+         fcb   HW.Page    extended controller address
+         fdb   ADDR       physical controller address
+         fcb   initsize-*-1 initilization table size
+         fcb   DT.RBF     device type:0=scf,1=rbf,2=pipe,3=scf
+         fcb   ITDRV      drive number
+         fcb   ITSTP      step rate
+         fcb   ITTYP      drive device type
+         fcb   ITDNS      media density
+         fdb   Cyls       number of cylinders (tracks)
+         fcb   Sides      number of sides
+         fcb   $01        verify disk writes:0=on
+         fdb   SectTrk    # of sectors per track
+         fdb   SectTrk0   # of sectors per track (track 0)
+         fcb   Interlv    sector interleave factor
+         fcb   SASiz      minimum size of sector allocation
+initsize equ   *         
+*IDE Driver specific additions to the device descriptor go here
+* NOTE: These do NOT get copied into the path descriptor; they
+*       cannot due to the fact that there is simply NO ROOM in
+*       the path descriptor to do so.  The driver must access
+*       these values directly from the descriptor.
+         fcb   0,0,0,0,0,0,0,0,0
+
+         ifne  DD        
+name     fcs   /DD/      
+         else            
+name     fcc   /H/       
+         fcb   ITDRV+$B0 
+         endc            
+mgrnam   fcs   /RBF/     
+         ifne  SuperIDE  
+drvnam   fcs   /SuperIDE/
+         else            
+drvnam   fcs   /CCIDE/   
+         endc            
+
+         emod            
+eom      equ   *         
+         end             
--- a/3rdparty/drivers/ide/makefile	Sat Nov 23 11:23:35 2002 +0000
+++ b/3rdparty/drivers/ide/makefile	Tue Nov 26 19:17:18 2002 +0000
@@ -1,9 +1,11 @@
 include ../../../Makefile.rules
 
 DEPENDS		= ./Makefile
-DRVRS		= ccide_l1.dr ccide_l2.dr
+DRVRS		= ccide_l1.dr ccide_l2.dr superide_l1.dr superide_l2.dr
 DESCS		= h0_ide_l1.dd h0_ide_l2.dd dd_ide_l1.dd dd_ide_l2.dd
-ALLOBJS		= $(DRVRS) $(DESCS)
+SUPERDESCS	= h0_superide_l1.dd h0_superide_l2.dd dd_superide_l1.dd \
+		dd_superide_l2.dd
+ALLOBJS		= $(DRVRS) $(DESCS) $(SUPERDESCS)
 IDEL1FLAGS	= $(AFLAGS) -aLevel=1
 IDEL2FLAGS	= $(AFLAGS) -aLevel=2
 
@@ -15,18 +17,36 @@
 ccide_l2.dr: ccide.asm
 	$(AS) $(ASOUT)$@ $< $(IDEL2FLAGS)
 
-h0_ide_l1.dd: h0_ide.asm
+superide_l1.dr: ccide.asm
+	$(AS) $(ASOUT)$@ $< $(IDEL1FLAGS) -aSuperIDE=1
+
+superide_l2.dr: ccide.asm
+	$(AS) $(ASOUT)$@ $< $(IDEL2FLAGS) -aSuperIDE=1
+
+h0_ide_l1.dd: idedesc.asm
 	$(AS) $(ASOUT)$@ $< $(IDEL1FLAGS)
 
-h0_ide_l2.dd: h0_ide.asm
+h0_ide_l2.dd: idedesc.asm
 	$(AS) $(ASOUT)$@ $< $(IDEL2FLAGS)
 
-dd_ide_l1.dd: dd_ide.asm
+dd_ide_l1.dd: idedesc.asm
 	$(AS) $(ASOUT)$@ $< $(IDEL1FLAGS)
 
-dd_ide_l2.dd: dd_ide.asm
+dd_ide_l2.dd: idedesc.asm
 	$(AS) $(ASOUT)$@ $< $(IDEL2FLAGS)
 
+h0_superide_l1.dd: idedesc.asm
+	$(AS) $(ASOUT)$@ $< $(IDEL1FLAGS) -aSuperIDE=1
+
+h0_superide_l2.dd: idedesc.asm
+	$(AS) $(ASOUT)$@ $< $(IDEL2FLAGS) -aSuperIDE=1
+
+dd_superide_l1.dd: idedesc.asm
+	$(AS) $(ASOUT)$@ $< $(IDEL1FLAGS) -aSuperIDE=1
+
+dd_superide_l2.dd: idedesc.asm
+	$(AS) $(ASOUT)$@ $< $(IDEL2FLAGS) -aSuperIDE=1
+
 clean:
 	$(RM) $(ALLOBJS)