ATADemo - Macintosh ATA Manager Sample

Version: 1.0

Apple Macintosh Developer Technical Support
Written by: Vinne Moscaritolo

Copyright Apple Computer, Inc

You may incorporate this sample code into your applications without restriction, though the sample code has been provided "AS IS" and the responsibility for its operation is 100% yours. However, what you are not permitted to do is to redistribute the source as "DTS Sample Code" after having made changes. If you're going to re-distribute the source, we require that you make it clear in the source that the code was descended from Apple Sample Code, but that you've made changes.

ATADemo is a CodeWarrior 10 C sample that will call the ATA Manager and scan the ATA bus and list the various device configuration data. on my PB 1400 it produced the following results:


Macintosh ATA Manager Sample

ATA Manager inquiry:
    ATA Manager Version: 2.0.0.1 (hex 02006601)
    Busses:     5
    Devices:    2
    PIO Modes:  4
    DMA Modes:  0
    Multi DMA Modes:0
-----------------------------------------

Device 0 .ATADisk
Configuration: (ATA, Internal)
                 Configuration word 045a
                          Cylinders 1575
                              Heads 16
                        Bytes/Track 0
                       Bytes/Sector 0
                      Sectors/Track 0
          Vendor Unique (word 7..9) 0000 0000 0000
                      Serial Number "1R15R1Q2340"
                        Buffer Type 0003
 Buffer size in 512 byte increments 192
      Number of ECC bytes available 4
                  Firmware Revision "A91C54"
                       Model Number "IBM-DSOA-20810"
     Capability Flags (word 47..53) 0010 0000 0f00 0000 0200 0200 0003
           Cylinders (current mode) 1575
               Heads (current mode) 16
       Sectors/Track (current mode) 63
        Current Capacity in Sectors 965738520
    Multiple Sector Capability Flag 0108
   Current User-addressable Sectors 965738520
Single Word DMA Transfer Mode Flags 0007
  Multiword DMT Transfer Mode Flags 0407
-----------------------------------------

Device 4 .AppleCD
Configuration: (ATAPI, Media Bay)
                 Configuration word 85c0
                          Cylinders 0
                              Heads 0
                        Bytes/Track 0
                       Bytes/Sector 0
                      Sectors/Track 0
          Vendor Unique (word 7..9) 0000 0000 0000
                      Serial Number ""
                        Buffer Type 0003
 Buffer size in 512 byte increments 256
      Number of ECC bytes available 0
                  Firmware Revision "3.0B"
                       Model Number "CD-46E"
     Capability Flags (word 47..53) 0000 0000 2f00 0000 0200 0200 0002
           Cylinders (current mode) 0
               Heads (current mode) 0
       Sectors/Track (current mode) 0
        Current Capacity in Sectors 0
    Multiple Sector Capability Flag 0000
   Current User-addressable Sectors 0
Single Word DMA Transfer Mode Flags 0007
  Multiword DMT Transfer Mode Flags 0103
-----------------------------------------

Cool, download It.


Back to my homepage

Comments (vinnie@apple.com)