home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / apple2 / 26253 < prev    next >
Encoding:
Text File  |  1993-01-02  |  6.7 KB  |  155 lines

  1. Newsgroups: comp.sys.apple2
  2. Path: sparky!uunet!wupost!udel!news.udel.edu!bach.udel.edu!lecates
  3. From: lecates@bach.udel.edu (Roy LeCates)
  4. Subject: Re: How does Eject work on an Apple 3.5 drive?
  5. Message-ID: <C08JqA.731@news.udel.edu>
  6. Sender: usenet@news.udel.edu
  7. Nntp-Posting-Host: bach.udel.edu
  8. Organization: University of Delaware
  9. References: <1993Jan2.061850.8141@cs.uow.edu.au>
  10. Date: Sat, 2 Jan 1993 16:42:10 GMT
  11. Lines: 142
  12.  
  13. In article <1993Jan2.061850.8141@cs.uow.edu.au> david@cs.uow.edu.au (David E A Wilson) writes:
  14. >I have looked at the IWM pinout description in tn-misc-006 and read
  15. >descriptions of the 5.25" disk drive, Unidisk 3.5 Smartport and everything
  16. >else I could find but have never been able to find out what the controller
  17. >does to cause an Apple 3.5 to eject. The only additional signal the 3.5
  18. >has over the 5.25 is the head select. How then can the drive be told to
  19. >eject the disk?
  20.  
  21. I believe that the info you're looking for is in tn-smpt-002.
  22. For you convenience, here it is (the specific info is in the
  23. CONTROL CODES section):
  24.  
  25. ------------------------------------------------------------
  26.  
  27. Apple II
  28. Technical Notes
  29. _____________________________________________________________________________
  30.                                                   Developer Technical Support
  31.  
  32.  
  33. SmartPort
  34. #2:    SmartPort Calls Updated
  35.  
  36. Revised by:    Llew Roberts                                    September 1989
  37. Written by:    Mike Askins                                           May 1985
  38.  
  39. This Technical Note documents SmartPort call information which is not found in 
  40. the descriptions of SmartPort in the Apple IIGS Firmware Reference and the 
  41. Apple IIc Technical Reference Manual, Second Edition.  The device-specific
  42. information which had been included in this Note is now found in these
  43. manuals.
  44. Changes since November 1988:  Added diagram and information on vendor ID 
  45. numbers.
  46. _____________________________________________________________________________
  47.  
  48.  
  49. STATUS Calls
  50.  
  51. A STATUS call with unit number = $00 and status code = $00 is a request to 
  52. return the status of the SmartPort host, as opposed to unit numbers greater 
  53. than zero which return the status of individual devices.  The number of 
  54. devices as well as the current interrupt status is returned.  The format of 
  55. the status list returned is illustrated in Figure 1.
  56.  
  57.            +------------------+
  58.     Byte 0 |   Device Count   |
  59.            +------------------+
  60.     Byte 1 | Interrupt Status |
  61.            +------------------+
  62.     Byte 2 |      Vendor      |   $0000          Vendor unknown
  63.            +                  +---$0001          Apple Computer, Inc.
  64.     Byte 3 |        ID        |   $0002-$FFFF    Third-Party Vendor
  65.            +------------------+
  66.     Byte 4 |    Interface     |   _____|___________________|_____
  67.            +                  +--|F|E|D|C|B|A|9|8|7|6|5|4|3|2|1|0|
  68.     Byte 5 |     Version      |  |_______|_______________|_______|
  69.            +------------------+  |       |               |
  70.     Byte 6 |    Reserved      |  |Major  |    Minor      |$A=Alpha
  71.            +------------------+  |Release|    Release    |$B=Beta
  72.     Byte 7 |    Reserved      |                          |$E=Experimental
  73.            +------------------+                          |$0=Final
  74.  
  75.                Figure 1-Host General Status Return Information
  76.  
  77. Stat_list    byte 0       Number of devices
  78.              byte 1       Interrupt Status (If bit 6 is set, then no interrupt)
  79.              bytes 2-3    Driver manufacturer (were Reserved prior to May
  80.                           1988):
  81.                           $0000          Undetermined
  82.                           $0001          Apple
  83.                           $0002-$FFFF    Third-party driver
  84.              bytes 4-5    Interface Version
  85.              bytes 6-7    Reserved (must be $0000)
  86.  
  87. The Number of devices byte tells the caller the total number of devices hooked 
  88. to this slot or port.
  89.  
  90. The Interrupt Status byte is used by programs which try to determine if the 
  91. SmartPort was the source of an interrupt.  If bit 6 of this byte is clear, 
  92. there is a device (or devices) in the chain that require interrupt service.  
  93. You cannot use this value to determine which device in the chain is actually 
  94. interrupting.  Your interrupt handler, having determined that a SmartPort 
  95. interrupt has occurred, must poll each device on the chain to find out which 
  96. device requires service.  The UniDisk 3.5 and Memory Expansion Card do not 
  97. generate interrupts, so in these cases, this byte has bit 6 set.
  98.  
  99. The vendor ID number may be used to determine the manufacturer of a specific 
  100. SmartPort peripheral interface card, a useful piece of information when 
  101. dealing with device-specific calls.  Contact Apple Developer Technical Support 
  102. if you require a specific vendor ID number.  The version word follows the 
  103. SmartPort Interface Version definition described later in this Note.
  104.  
  105.  
  106. CONTROL Codes
  107.  
  108. Before May 1988, control code $04 was defined as device-specific.  It is now 
  109. defined as EJECT, and all SmartPort devices which support removable media must 
  110. support this call.  If a device does not support removable media, it should 
  111. simply return from this call without an error.
  112.  
  113. Note that the Apple II SCSI card firmware was revised in early 1988 to support 
  114. this change.
  115.  
  116.  
  117. INIT
  118.  
  119. An application should never make an INIT call (SmartPort code $05), since 
  120. doing so is likely to destroy operating system integrity and may cause media 
  121. damage as well.
  122.  
  123. If you are writing your own operating system (not encouraged) and need to 
  124. reset all SmartPort devices, the INIT call with unit number = $00 will do just 
  125. that.  Note that SmartPort devices cannot be selectively reset, and INIT must 
  126. never be made at all with any unit number other than $00.
  127.  
  128.  
  129. SmartPort Interface Version Definition
  130.  
  131. The SmartPort Interface Version definition uses the most significant nibble of 
  132. the word as the major version number, the next two most significant nibbles as 
  133. the minor version number, and the least significant nibble as a release 
  134. indicator:
  135.  
  136.     $0 = Final    $A = Alpha    $B = Beta    $E = Experimental
  137.  
  138. Therefore, the interface version word for an experimental SmartPort interface 
  139. 1.15 would be $115E while the interface version word for SmartPort interface 
  140. 2.0 would be $2000.  GS/OS driver version numbers also follow this definition.
  141.  
  142.  
  143. Further Reference
  144. _____________________________________________________________________________
  145.   o  Apple IIGS Firmware Reference
  146.   o  Apple IIc Technical Reference Manual, Second Edition
  147.   o  Apple IIGS Technical Note #25, Apple IIGS Firmware Reference Updates
  148.  
  149.  
  150. -- 
  151. ------------------------------------------------------------------
  152. Roy M. LeCates       EE Undergraduate        lecates@bach.udel.edu
  153. University of Delaware Electrical Engineering and Computer Science
  154. ------------------------------------------------------------------
  155.