                                                     QIC117 Rev. A  4/19/88


                              COMMON COMMAND SET
                            INTERFACE SPECIFICATION
                      FOR FLEXIBLE DISK CONTROLLER BASED
                        MINI DATA CARTRIDGE TAPE DRIVES

   This document is a development standard adopted by Quarter-Inch 
   Cartridge Drive Standards, Incorporated (QIC).  It is intended as a 
   guide for companies interested in developing products which will be 
   compatible.  This document may be revised several times during the 
   development cycle. 

   1.1 Physical/Electrical Interface 
   
   The physical and electrical interfaces for the drive are defined by 
   QIC107 and QIC115.  The specifics of connector pin assignments, signal 
   levels and terminations, etc., are related in the appropriate QIC 
   Document. 

   This document specifies the timing relationships between the STEP, 
   TRACK ZERO, and INDEX signals directly related to defining the logical 
   command interface.  All other electrical requirements for drive 
   selection and interface bus signal qualification will be specified 
   within QIC107 and QIC115 for the different physical configurations.


   1.2  Signal Vocabulary

   The following signals comprise the signal vocabulary of the logical 
   command interface.

   Signal Name   I/O     Function/Comments

   STEP          Input   Transmits command pulse trains to the drive.
                         The number of pulses received designates a
                         numeric command or argument.  Pulse train 
                         interpretation is controlled by timing.
                         This signal is edge sensitive.

   TRACK ZERO    Output  Transmits a response bit back to the host 
                         following the execution of a Report command.
                         This signal is level sensitive.

   INDEX         Output  Transmits pulses to the host to control
                         read/write operations and to cause timeout
                         interrupts with some of the host operations.
                         This signal is edge sensitive


   Commands and information are communicated between the drive and host by 
   the STEP and TRACK ZERO lines.  The host sends Commands as a various 
   number of STEP pulses grouped in time as with a floppy disk seek 
   operation.  For the host to obtain information from the drive, report 
   commands are issued whereby the drive returns a response bit on the 
   TRACK ZERO line.  This bit is identified by the location of the bit 
   within the sequence of report commands where the least significant bit 
   is always sent first.  The INDEX pulses, in addition to marking the 
   location of the data segment during the execution of the Logical 
   Forward command, are generated to cue the host that a command related 
   interval has elapsed and further host action is possible.


   1.3  Signal Sequencing and Timing

   Commands are sent to the drive by creating the STEP pulse trains of 
   width Tstepw and at intervals of Tstep via the host.  The command code 
   is determined by the number of pulses sent within the train.  A 
   retriggerable timer is set for Ttimeout and is used to detect the end of 
   a command pulse train.  This timer, which can be extended with the 
   alternate time-out command, elapses after subsequent pulses are not 
   received.  All commands must be separated by more than the maximum 
   command time-out.

   The TRACK ZERO line returns information to the host in response to 
   report commands and at all other times this line should be inactive.  
   The leading edge of the first STEP pulse of a pulse train, received by 
   the drive, causes the TRACK ZERO line to be cleared within Tclr to the 
   inactive state.  With the TRACK ZERO line only active after a report 
   command, the tape drive is prevented from being recognized as a diskette 
   drive by a host Diskette Attachment Test (DAT).  When the TRACK ZERO 
   line is required to be in a valid state following a report command, this 
   state shall be set within Tack from the nominal command time-out with 
   the exception of the Report Next Bit command.  The Report Next Bit 
   command will assert the TRACK ZERO lien within Tbit from the leading 
   edge of the second STEP pulse.

   While not in a Read/Write operation, the INDEX line provides timing cues 
   to the host to generate time-out interrupts.  For this purpose, the drive 
   may be in one of the following states:

     a) Ready or Idle:  the drive is not executing a command or in motion.
        The drive may have an error status or no cartridge and still be in
        the Ready state.

     b) Report in Progress:  the drive is responding to a report command by 
        asserting or clearing the TRACK ZERO line.

     c) Waiting For Argument:  the drive has received a command which 
        requires a numeric argument before execution can occur.

   The INDEX will remain inactive within Tinxoff from the leading edge of 
   the first STEP pulse and throughout the reception of a STEP pulse train, 
   otherwise, when the drive is in one of these states, INDEX pulses will 
   be generated within Tinxon with a width of Tinxw at intervals of Tinx.  
   These INDEX pulses can be used to inform the host of the following 
   events:

     a) The drive is Ready or Idle following a command execution.

     b) The drive has presented a bit on the TRACK ZERO line
        following a Report command.

     c) The drive is ready for a numeric argument if required
        by the preceding command.

   Aside from the states listed above, the drive will not issue INDEX 
   pulses, except as required during the execution of the Logical Forward 
   command.

   Note that the INDEX pulse cue mechanism should be supplemented by host 
   time-outs.  Some host hardware is know to ignore INDEX pulses in a few 
   modes of operation and not generate interrupts when needed.  If time-
   outs are used as a backup to INDEX pulses synchronization techniques, 
   then the host driver software will continue to function regardless of 
   the hardware limitations.


                    Table 1:  Summary of Timing Parameters

   Parameter   Description                 Min   Nom   Max   Unit

   Ttimeout    Command Time-out            2.2   2.5   2.9   mS
               Alt Command Time-out        6.2   6.5   6.9   mS

   Tstepw      STEP Pulse Width              1        1100   uS
   Tstep       STEP Pulse Interval          .4   2.0   2.1   mS
               Alt STEP Pulse Interval      .4   6.0   6.1   mS

   Tinxw       INDEX Pulse Width            20        1100   uS
   Tinx        Cue INDEX Pulse Interval      2     4    12   mS
   Tinxon      Time to Issue Cue Indexes               2.5   mS
   Tinxoff     Time to Clear Cue Indexes               2.5   mS

   Tack        Time to Report Ack                      2.5   mS
   Tbit        Time to Report Bit                      900   mS
   Tclr        Time to Clear TRACK ZERO                900   mS


   1.4  Command Types and Contexts

   The command set supports three basic types of commands: report, mode, 
   and motion control.  The report commands enable the use of the TRACK 
   ZERO line to report up to sixteen bits using a serial-output approach.  
   The mode commands can select Primary, Format, Verify, and two Diagnostic 
   modes.


   1.4.1  Mode Switching Commands

   The mode switching commands select a desired operating mode.  The drive 
   is initially in the Primary mode after a reset or no cartridge present.  
   Any mode can be entered directly from any other mode.  As a safe guard 
   the Diagnostic mode commands must be issued twice in succession or an 
   error will occur.  The Diagnostic modes are to be used by the 
   manufacturer only.


   1.4.2  Report Commands

   The report commands, once entered, must be completed with a series of 
   Report Next Bit commands.  Any other commands will cause an error and 
   terminate the report.  The report commands, when issued, enters the 
   report subcontext and presents the first bit of the sequence to the 
   TRACK ZERO line.

   Note that the first bit of all report commands is Acknowledge, which is 
   always TRUE, indication that the drive has accepted the report command 
   and assembled the remaining report bits.  The host should wait Tack + 
   Nominal Ttimeout from the last STEP pulse before reading the bit and 
   issuing the Report Next Bit command.  In the event that the drive does 
   not respond with TRUE TRACK ZERO, the host shall consider that a 
   hardware failure has occurred, or that a power-on or soft reset is 
   occurring.

   Note also that an added Final bit of all report commands is always TRUE.  
   Once a report command has been entered, any other command except Report 
   Next Bit and Reset will cause an "illegal command in report subcontext" 
   error.  The report subcontext will be exited and the Final report bit, 
   normally true, will be false to indicating to the host that an error has 
   occurred.  Note that upon presentation of the Final report bit, the 
   report subcontext is exited.  The cue indexes will continue and the 
   TRACK ZERO will remain asserted until another command is received by the 
   drive.  This command can be Report Next Bit which will be ignored 
   outside the report subcontext but will serve to clear INDEX and TRACK 
   ZERO.  This additional command is important for reports made during 
   Logical Forward motion and on host systems which use the TRACK ZERO line 
   to perform DAT.

   The report commands send their responses serially at a rate determined 
   by the host.  To avoid ambiguity in interpretation and the possibility 
   of a logical race condition, the data sent by a report command will 
   always represent the latched state of the drive at the time the report 
   command was received, no matter how much time the host consumes in the 
   process of the clocking the status data out of the drive via Report Next 
   Bit commands.


   1.4.3  Command Arguments

   Some commands require a 4 to 5 bit numeric argument which completes the 
   specification of the command action.  For example, the Seek Head to 
   Track command requires a send STEP pulse train to specify the track.  
   Other commands may take on or two values as their command arguments.   
   In these cases, the drive enters a command argument subcontext temporarily, 
   in which case STEP pulses are interpreted as a command argument rather 
   than as command. 

   The specifications for command arguments are described in table 2b. The 
   data to be sent as an argument must be converted to a form which avoids 
   issuing a Soft Reset command (a single pulse).  This is accomplished by 
   adding 2 to the value and sending the resulting number of pulses.  This 
   is called the N+2 form which also makes possible sending the value zero.


   1.4.4  Status Required

   All commands have a specification detailing the drive status and mode 
   required for their acceptance and execution by the drive.  Most 
   typically, the drive must present a Ready status before some commands 
   are accepted.  If such commands are issued when the drive is NOT Ready, 
   these commands will be discarded and a "command received when not ready" 
   error will result.  In those cases where the execution of a command could 
   otherwise be terminated using a STOP command, an error terminates the 
   command as if a Stop command had been sent: in other cases, the command 
   continues to execute to completion, but the Report Error Code will 
   reflect the illegally sent command.  (e.g.: Seek Head to Track).  With 
   the exception of the initialization errors, no error over-writes a 
   previous error code.  This ensures that initialization and process 
   errors will not be lost.

   Many commands will be rejected by the drive if an Error Detected or New 
   Cartridge status is active.  The only way to clear this status is to 
   issue a Report Error Code command after the drive indicates ready.  
   Failure to do so will result in a "command received while new cartridge 
   pending" error or if a previous error is detected then the previous 
   error code will not be overwritten.  Some commands can only be issued in 
   specific modes.  If there is a conflict between the required mode and 
   the mode in effect, a mode error will be generated and the command will 
   not be executed.


   2.0  Command List and Descriptions

   In the following table 2a, the numeric command codes are listed, along 
   with a descriptive command name, restricted modes, and required drive 
   status.  The basic function and name of the commands do not change in 
   the Primary, Format, and Verify modes; the Diagnostic mode commands are 
   completely manufacturer-dependent.  The execution of non-interruptable 
   or high speed commands also restrict the use of some commands until 
   completion and are shown as modes which are only temporary in effect.  
   The required status tabulation defines which Report Drive Status bits 
   determine whether a command will be executed or rejected based on 
   status.

   The time-outs listed in Table 2d start at the nominal end of a command 
   time-out except for the Report Next Bit which starts at the leading edge 
   of the second STEP pulse.  The expected event is limited by the listed 
   time per the tape type and tdata rate.  Timeouts which indicate a single 
   value apply for all tape and data rates.

                     Table 2a:  Command Restriction Table

   Code   Command Name          Illegal Modes   Required Status

                                                E B R N  W C E R
    1     Soft Reset                    -----   - - - -  - - - -
    2     Report Next Bit               -----   - - - -  - - - - 
    3     Pause (n)                     --FN-   - - 1 0  - - - -
    4     Micro Step Pause (n)          -----   - - 1 0  - - - - 
    5     Alternate Command Time-out    -----   - - - -  - - - -
    6     Report Drive Status           -----   - - - -  - - - -
    7     Report Error Code             -----   - - - -  - - - 1
    8     Report Drive Configuration    -----   - - - -  - - - -
    9     Report ROM Version            -----   - - - -  - - - -
   10     Logical Forward               -----   * * 1 0  * 1 0 1
   11     Physical Reverse (h)          -----   - - - 0  * 1 0 1
   12     Physical Forward (h)          -----   - - - 0  * 1 0 1
   13     Seek Head to Track            -----   - - 1 0  - 1 0 1
   14     Seek Load Point (n)           -----   - - - 0  - 1 0 1
   15     Enter Format Mode             -----   - - - 0  0 1 0 1
   16     Write Reference Burst (n)     PV---   - - - 0  0 1 0 1
   17     Enter Verify Mode             -----   - - 1 0  - 1 0 1
   18     Stop Tape (n)                 ---N-   - - - -  - - - -
   19     Reserved
   20     Reserved
   21     Micro Step Head Up            --FNH   - - - -  - - 0 -
   22     Micro Step Head Down          --FNH   - - - -  - - 0 -
   23     Reserved
   24     Reserved
   25     Skip N Segments Reverse (n)   --FN-   - - 1 0  - 1 0 -
   26     Skip N Segments Forward (n)   --FN-   - - 1 0  - 1 0 -
   27     Select Rate                   -----   - - - -  - - 0 1
   28     Enter Diag Mode 1
   29     Enter Diag Mode 2
   30     Enter Primary Mode            -----   - - - -  - - - -
   31     Reserved
   32     Report Vendor ID              -----   - - - -  - - - -

                P=Primary Mode   V=Verify Mode   F=Format Mode
                  N=Non-Interruptable Mode   H=High Speed Mode
            (n)=Non-Interruptable Command   (h)=High Speed Command
                           *=Checked in Format Mode


                       Table 2b:  Command Argument Table

   Code   Command Name              Argument(s)

   13     Seek Head to Track        Track+2
   25     Skip N Segments Reverse   (N&15)+2, (N/16)+2
   26     Skip N Segments Forward   (N&15)+2, (N/16)+2
   27     Select Rate               0+2=250 Kbps or 2+2=500 Kbps
   28     Enter Diag Mode 1         28  (command entered twice)
   29     Enter Diag Mode 2         29  (command entered twice)


                   Table 2c:  Report Command Response Table

   Code   Command Name               Response   Definition

    6     Report Drive Status           0       Drive Ready or Idle
                                        1       Error Detected
                                        2       Cartridge Present
                                        3       Cartridge Write Protected
                                        4       New Cartridge
                                        5       Cartridge Referenced
                                        6       At Physical BOT
                                        7       At Physical EOT

    7     Report Error Code            0-7      Error Code
                                       8-15     Associated Command

    8     Report Drive Configuration   0-2      Reserved (response = 0)
                                       3-4      Rate 4,3  = 00 250 Kbps
                                                            01 Reserved
                                                            10 500 Kbps
                                                            11 Reserved
                                        5       Reserved
                                        6       Extra Length Tape Detected
                                        7       QIC-80 Mode

    9     Report ROM Version           0-6      ROM Version
                                        7       ROM BETA indicator

   32     Report Vendor ID             0-15     Vendor Unique ID


                  Table 2d:  Command Execution Time-out Table

   Code   Command Name                250Kbps/XL   500Kbps/XL   Event

    1     Soft Reset                             1              Acknowledge
    1     Soft Reset                            460             Ready
    2     Report Next Bit  (from last step)    900uS            Data Assert
    3     Pause                           16           10       Ready
    4     Micro Step Pause                16           10       Ready
    5     Alternate Command Time-out             0              -----
    6     Report Drive Status                  2.5mS            Acknowledge
    7     Report Error Code                    2.5mS            Acknowledge
    8     Report Drive Configuration           2.5mS            Acknowledge
    9     Report ROM Version                   2.5mS            Acknowledge
   10     Logical Forward              180/260       90/130     Ready
   11     Physical Reverse              60/85        60/85      Ready
   12     Physical Forward              60/85        60/85      Ready
   13     Seek Head to Track                     5              Ready
   14     Seek Load Point               80/105       80/105     Ready
   15     Enter Format Mode                      0              -----
   16     Write Reference Burst                 460             Ready
   17     Enter Verify Mode                      0              -----
   18     Stop Tape                              5              Ready
   21     Micro Step Head Up                   200mS            Position
   21     Micro Step Head Up                   200mS            Ready
   22     Micro Step Head Down                 200mS            Position
   22     Micro Step Head Down                 200mS            Ready
   25     Skip N Segments Reverse       60/85        60/85      Ready
   26     Skip N Segments Forward       60/85        60/85      Ready
   27     Select Rate                            0              -----
   28     Enter Diag Mode 1                      -              -----
   29     Enter Diag Mode 2                      -              -----
   30     Enter Primary Mode                     0              -----
   32     Report Vendor ID                     2.5mS            Acknowledge
               All times are in seconds unless stated otherwise


   Command Descriptions

   (1)  Soft Reset.  A single command pulse in any mode, at any time, and 
        within any subcontext, has the same effect on the tape drive as a 
        power-up sequence; i.e.: 

           - The Primary mode is selected.

           - Any message is terminated.

           - The Reset error is set.

           - All defaults are restored.

           - A new cartridge status will be indicated if present.

           - If a cartridge is present, an automatic seek to load point can 
             be optionally held until the first Report Drive Status. 

        The purpose of this command is to reset the drive automatically 
        when the host is reset and the power-up boot procedure on the host 
        performs a Diskette Attachment Test.  This test uses 3 mS (or 
        longer) STEP pulses to obtain a possible response on the TRACK ZERO 
        line during a recalibration.  Since such a step rate will cause a 
        command recognition time-out to take place after each pulse, such a 
        test will cause the tape drive to reset itself and de-assert the 
        TRACK ZERO signal.  This command causes a "Software Initiated 
        Reset" error to be set in the drive. 

        Both the power-up and the software initiated reset cycles may 
        invoke initialization diagnostic sequences in the controlling 
        firmware of the drive.  These sequences, which will vary from on 
        make and model of drive to another, can consume up to 1 second 
        during which the drive will not respond to any command, even the 
        Report Drive Status command. 

   (2)  Report Next Bit.  Subsequent to any report command, this command 
        causes the next bit (if any) in sequence to be reported on the 
        TRACK ZERO line.  For most controllers, this bit will be asserted 
        before a seek complete interrupt is issued which allows the host to 
        read the bit within the interrupt service.  If not in a report 
        command subcontext, this command is treated as a no-op and 
        discarded and thus TRACK ZERO line will be inactive.

   (3)  Pause.  This command causes the tape to stop (if in motion), move 
        in the logical reverse direction over the preceding  data segments, 
        or until logical BOT is reached, or an error condition is detected, 
        and stop again.  Reading and writing are disabled.  The drive will 
        remain NOT Ready until all tape motion stops, at which time the 
        Error Detected status should be checked.  The host software should 
        ensure that no further motion commands are issued until the Ready 
        status becomes true or such commands will produce an error.  This 
        command is not legal in the Format mode.

        The number of segments which are backed over during Pause is 
        dependent upon several factors, mostly dealing with motor starting 
        and stopping characteristics, and may vary with different makes and 
        models.  Since this command is provided for implementing a retry 
        mechanism, when logical forward motion is resumed, reading will 
        start at least 3 Sector ID fields in the data segment two segments 
        before the location where this command was received.  This requires 
        a minimum of three erase gaps to be transversed during the Pause 
        command and is equal to Skip 2 Segments Reverse.

   (4)  Microstep Pause.  This command performs all of the operations of a 
        Pause command (above), and also implements a head micro-stepping 
        algorithm, for use in off-track recovery retry mechanisms in the 
        host driver software.  The drive firmware maintains a "Microstep 
        Pause Cycle Counter".  This counter is reset to zero every time the 
        drive performs an explicit or implicit seek to track operation.  
        Subsequent Microstep Pause commands increment the counter modulo 
        three and the head location is controlled by the resulting value, 
        per the following table:

                  Cycle Counter         Head Position

                        0               On Track Centerline
                        1               Track Centerline + 1/8 track
                        2               Track Centerline - 1/8 track

        The fractional track offsets is approximated as close as possible, 
        and without accumulation of approximation errors over multiple 
        executions of the command.

        If the Cycle Counter value (internal to the drive) is not zero 
        (i.e., the head is currently offset from the nominal track 
        centerline position), and a Seek Track command is received, the 
        drive will nullify the current microstep offset before seeking the 
        head to the new track position.  Writing will be disabled while the 
        head is offset from the track centerline.

   (5)  Alternate Command Time-out.  This command causes the command time-
        out interval to be set to the alternate command time-out of 6.5mS.  
        The new value set will be suitable for step intervals of up to 6mS 
        per step.  Once changed, the alternate command time-out remains in 
        effect until a soft reset or power cycle occurs.

        The purpose of this command is to allow the use of Western Digital 
        179X and 279X controllers.  The Alternate Command Time-out is 
        issued by repeatedly issuing Type I Step commands, prematurely 
        terminated by a Force Interrupt Type IV command (to circumvent the 
        minimum step rate), and repeating this at a 2mS or faster rate.  
        Subsequent commands can then make use of the normal step rate of 
        the controller.

   (6)  Report Drive Status.  This command reports eight bits of drive 
        status, as listed in the Report Command Response table 2c.  The 
        meaning of the bits are as follows:

        Drive Ready - the tape drive is not in motion or otherwise still in 
             the process of executing tape or head motion.  Most commands 
             which require head or tape motion may not be issued when this 
             bit is cleared.  If such commands are issued, their execution 
             shall be suppressed and an error will result. 

        Error Detected - the last command was in violation of the Command 
             Restriction table or was completed with an error condition 
             arising, or an asynchronous event led to an error condition 
             such as a power-up or soft reset.  This bit MUST be cleared by 
             issuing the Report Error Code after the drive is ready.  
             commands requiring the Error Detected bit to be cleared will 
             fail.  This bit is not valid unless the Drive Ready bit is 
             asserted. 

        Cartridge Present - this bit always represents the debounced, real 
             time status of the cartridge present microswitch.  Most 
             motion commands require cartridge present status before 
             commands can be executed. 

        Cartridge Write-protected - this bit, when set, indicates that the 
             write-protect feature of the cartridge is activated: and 
             attempt to enter format mode will fail due to "cartridge write 
             protected" error, and writing will be inhibited in all cases 
             while write protected.  This bit may be active without a 
             cartridge present. 

        New Cartridge - whenever the Cartridge Present status changes from 
             false to true, this bit is internally set.  This bit must be 
             cleared using the Report Error Code command, even if no error 
             status is otherwise indicated as pending.  Any command 
             requiring this bit to be cleared will fail due to "new 
             cartridge status pending" error if this bit is otherwise set.

        Referenced - cleared if no cartridge is present.  If since the 
             cartridge insertion, the seek load point algorithms were able 
             to accurately locate valid reference bursts in the load point 
             zone of the tape, this bit is set.  It is also set if the last 
             Write Reference Burst Command execution was able to complete 
             normally.  In all other cases, this bit is cleared.  This bit 
             is NOT valid unless Drive Ready is asserted.

        At BOT - cleared if no cartridge is present.  If the tape is 
             stopped at physical BOT, At Bot will be set, otherwise this 
             bit is cleared.  This bit is NOT valid unless Drive Ready is 
             asserted.

        At EOT - similar in every respect to At BOT, only this bit 
             indicates that the tape is stopped at physical EOT.

   (7)  Report Error Code.  This report shifts out two eight bit numbers; 
        first the error code (LSB first), then the command code associated 
        with the error (LSB first).  A process error returns a command code 
        of zero and an initialization error returns the command code of 
        one.  The error code is undefined unless Error Detected and Drive 
        Ready status was returned.  Issuing this command clears the Error 
        Detected and New Cartridge status allowing subsequent commands to 
        be initiated.

   (8)  Report Drive Configuration.  Returns information about the tape 
        drive hardware configuration.  See the bit encoding charts in the 
        Report Command Response table 2c.

        The Rate Bits indicate the data transfer rate that the drive will 
        operate at when given a Logical Forward command.  The rate can be 
        changed on those drives which support multiple rates bu using the 
        Select Rate command.  The coded Rate Bits reported by the drive 
        may change upon insertion of a cartridge or after a Select Rate 
        command.

        The Extra Length Tape Detected bit is set if the drive detects an 
        extra length DC2000 cartridge.  If this bit is set, then the 
        Logical Forward command in the Format Mode will create an 
        appropriate number of extra segments per track.

        The QIC-80/QIC-40 bit indicates the compatibility mode selected by 
        the drives auto-detect mechanism.  During Seek Load Point, the 
        drive will sense the reference bursts on the tape.  If the load 
        point zone is formatted per QIC-40, this bit will be cleared, and 
        the drive will emulate a QIC-40 drive for all subsequent operation 
        on that cartridge.  Otherwise, the bit is set, and the drive will 
        operate in QIC-80 mode for all subsequent operations.  Note: auto-
        detect of QIC-80/QIC-40 is open to discussion.

   (9)  Report ROM Version.  Reports the version of the ROM in the 
        manufacturer-dependent way.  The "beta" bit is the last of the 
        eight bits (LSB first) shifted out, and is used to distinguish test 
        versions of ROMs before being released.

   (10) Logical Forward.  A read or write PDC can be issued any time after 
        a logical forward and in Primary and Verify modes, the drive will 
        initiate forward tape motion if not at logical EOT, and will 
        generate an INDEX pulse for the beginning of the data segment after 
        an erase gap has been encountered on the tape.  As some makes and 
        models of drives start quickly, no Report Drive Status commands 
        should be issued after this command and prior to a read/write 
        operation to ensure a segment is not missed during the report.

        In Format mode, this command will be accepted by the drive only if 
        the tape is at logical BOT; otherwise, command execution is 
        suppressed and an error results.  Additionally, during Format mode, 
        the drive generates pairs of INDEX pulses, one to mark the 
        beginning of a segment, and one to mark the end, with erase gaps 
        automatically recorded before, between, and after segments.  The 
        last erase gap will be extended to the logical EOT.  Timings and 
        number of segments generated will be in accordance with the 
        appropriate cartridge format specification.

        The drive will remain NOT Ready until motion stops, and which time 
        the Error Detected status should be checked.  This command is 
        terminated when an error is detected, upon reaching logical EOT, or 
        receiving a Stop, Pause, or Skip command.

   (11) Physical Reverse.  If the tape is already at physical BOT, this 
        command is no-op.  Otherwise the tape is moved at the highest 
        available speed in the direction of physical BOT.  The drive will 
        remain NOT Ready until tape motion stops, at which time the Error 
        detected status should be checked.

        If command execution is not terminated by a Stop, Pause or Skip 
        command, the tape will auto stop upon reaching physical BOT or 
        detection of an error condition.

        In the Format Mode, the drive will write a pattern over the tape to 
        ensure proper over-write of the DC erase gaps during subsequent 
        formatting.  If this command is not supported by a particular drive 
        it will issue Error 15, Error in Format Mode.  The hose software 
        drivers will perform this operation only if the reference bursts 
        were detected before a Write Reference Burst operation.

   (12) Physical Forward.  This command is the same as physical reverse, 
        but operates with the motion toward physical EOT.

   (13) Seek Head to Track.  This command takes one argument in the N+2 
        form.  The argument is the track number to seek.  The track 
        position corresponding to a track number is determined according to 
        the tape format compatibility mode in effect (i.e. QIC-80 or QIC-
        40).  An error can occur if the track number sent is not valid for 
        the format in effect.  The seek may be buffered or performed 
        immediately.  If the seek is not buffered, the drive will remain 
        NOT Ready while the seek is being executed.  If the head is already 
        positioned to the desired track without any offsets, no head motion 
        takes place and the command is treated as a no-op otherwise all 
        offsets will be nullified before positioning.

   (14) Seek Load Point.  The tape is moved to the BOT area, the reference 
        bursts are scanned (if present) to calibrate the head position to 
        the reference bursts and determine the compatibility mode of the 
        format.  This command will not be stopped by any command or error 
        and will continue to completion.

        The drive will remain NOT Ready until tape motion stops, at which 
        time the Error Detected status should be checked.  The Referenced 
        status will be set if a valid reference burst was detected, the 
        Report Drive Configuration QIC-80/QIC-40 bit will be set or cleared 
        according tot he format detected and the head will be positioned 
        over track 0.

        A Seek Load Point operation will be automatically performed 
        following a cartridge insertion, or, if a cartridge is present, 
        following a power-on or soft reset.  The Seek Load Point operation 
        can optionally be delayed until the receipt of a Report Status 
        command which will initiate the operation and report NOT Ready 
        until completion.

   (15) Enter Format Mode.  This command causes the drive to interpret and 
        execute commands in the Format Mode context.  The major difference 
        between Format Mode and Primary Mode is the operation of Pause, 
        Skip, Logical Forward, Physical Forward, and Physical Reverse 
        commands.

   (16) Write Reference Burst Area.  This command, valid only in the format 
        mode, causes the drive to format the Load Point Zone of the tape in 
        accordance with he QIC-40 or QIC-80 specification, as appropriate 
        for the drive.  The Referenced status is set if the operation is 
        successful.  This command will not be stopped by any command or 
        error and will continue to completion.

   (17) Set Verify Mode.  This command puts the drive into Verify mode, in 
        which special circuitry reduces the read margins to a more 
        stringent value useful for detecting tape media defects.  This mode 
        affects only the data stream output from the Logical Forward 
        command, and is used when reading back a tape after a format 
        operation to  detect bad sectors.

   (18) Stop Tape.  This command causes tape motion to stop.  The drive 
        remains NOT Ready until tape motion comes to a stop.  The Stop 
        command is a no-op if there is no tape in the drive, or if the tape 
        is already stopped.  The host software should ensure that no 
        further motion commands are issued until the Ready status becomes 
        true or such a command will cause errors and not be executed.

   (21) Micro-Step Head Up
        and
   (22) Micro-Step Head Down
        This command may be issued with the tape either stopped, or in 
        Logical Forward motion.  These commands can be used by the host 
        driver software to attempt recovery from suspected off-track 
        conditions which may be inducing excessive read/write errors.  If 
        the tape is not moving when issued, the microstep seek may be 
        buffered.  The most accurate methods of issuing the Micro-Step 
        commands and the actual distance will vary between different models 
        and makes.  The host should wait at least 200mS after the command 
        time-out interval has elapsed to allow the drive to step the head, 
        and then let the head settle on the new position.  A subsequent 
        Seek Track command will return the head to the nominal track 
        position.

   (25) Skip N Segments Reverse.  This command requires two arguments 
        which define the relative number of segments to traverse in the 
        logical reverse direction.  The number of segments is divided into 
        two 4-bit nibbles.  The lower nibble is sent first in the form N+2, 
        followed by the upper nibble also sent in the form N+2.  This 
        command is a modified version of the Pause command and can be used 
        instead of a pause command to perform a retry in addition to random 
        data accesses.
                                                                           
        The drive, upon receipt of the arguments, initiates tape motion at 
        the highest possible speed in the reverse direction and continues 
        to move until the number of segments to move is satisfied, or 
        logical BOT is encountered.  The drive uses erase gaps to detect 
        and count the number of segments.  The number of gaps traversed 
        is one greater than the number of segments requested in the 
        arguments.  A request for 0 segments will cause the tape to 
        transverse a single erase gap.  As with the Pause command, the 
        actual number of erase gaps traversed may be greater due to slow 
        motor start and stop times and therefore requires that the Sector 
        ID be read after this command to determine the actual segment 
        location.  If the tape is already at the logical BOT the command 
        will treated as a no-op.
        
   (26) Skip N Segments Forward.  This command is the same as Skip N 
        Segments Reverse, but operates with the motion toward logical EOT.

   (27) Select Rate.  The command expects an argument in N+2 form.  The 
        argument selects the data transfer rate:

             0 = 250 Kbps   (all others are reserved)
             2 = 500 Kbps

        On drives which do not support selectable rates, this command will 
        set an error as undefined rate.  This command should be followed up 
        with Report Drive Configuration to confirm rate selection.

   (28) Enter Diagnostic Mode 1.
        and
   (29) Enter Diagnostic Mode 2.
        These commands are manufacturer dependent.  As a safety feature 
        this command must be issued twice in sequence to cause the mode to 
        switch, otherwise an error is set.  The diagnostic mode will be 
        exited by issuing an Enter Primary Mode command.

   (30) Enter Primary Mode.  This command is legal from every command mode 
        and status and always returns the drive to the Primary Mode 
        command context.

   (32) Report Vendor ID.  This command allows the software to restrict 
        operation or the use of certain commands based on the resulting 16 
        bit (LSB first) Vendor ID number.  This command can also be used by 
        the host to determine the presence of a tape drive during an Tape 
        Attachment Test without inducing tape motion from the auto seek 
        load point.  The bits 0-5 define the Model and bits 6-15 define the 
        Make.  The Make codes are assigned with the concurrence of the 
        participating standards committee members.  The Make code of 0 will 
        be used until the assignment.


   3.0  Error Conditions

   Any command or argument which is greater than 32 STEP pulses will be 
   ignored and, during the report subcontext, the data bit will be 
   repeated when a Report Next Bit command is subsequently received.  Only 
   undefined commands less than the Report Vendor ID will cause an 
   "undefined or reserved command code" error.  This limit is to allow the 
   recalibration of the host system without causing any reaction from the 
   drive with the exception of the Report Next Bit command which outputs a 
   1.  In this case, the recalibration will appear as a valid command and 
   the message will not be terminated with the TRUE final bit.

   There are two states the tape drive may enter which inhibit further 
   motion commands until the state is cleared:  the New Cartridge state and 
   the Error Detected state.


   3.1  New Cartridge Status Pending

   In the case of the New Cartridge state, any command requiring this 
   status to be cleared will set the "new cartridge status pending" error.  
   A previous error may still be latched which will not allow this error to 
   be indicated, however the New Cartridge bit will be set in the drive 
   status.  This status can be cleared by issuing the Report Drive Status 
   command followed by the Report Error Code command when the drive 
   indicates Ready.  This Report Error Code guarantees that the host will 
   recognize the New Cartridge status before continuing further.


   3.2  Power Up and Soft Resets

   As a safeguard against loss of context between the tape drive and the 
   host, a power-on or a software initiated reset will be considered an 
   error condition, and will over-write any error codes.  This error must 
   be cleared before proceeding which ensures that such occurrences are not 
   overlooked by the host.


   3.3  Tape Motion Errors

   When an error occurs during the execution of a command (typically a 
   motion command), the command is terminated and the tape is stopped.  The 
   Error Detected bit is set, and tan appropriate error code is set.  Until 
   the Report Error Code command is executed, further motion commands will 
   be inhibited in a fashion similar to that described for the New 
   Cartridge status.  Once the Report Error Command is executed after the 
   drive is Ready, however, the Error Detected status is cleared and motion 
   commands we be re-enabled.


   3.4  Report Subcontext Errors

   During a Report command, the command processor of the drive is in a 
   "report subcontext".  If any command other than Report Next Bit is 
   received, the report subcontext will be terminated with an "illegal 
   command during report subcontext" error, the Error Detected bit will be 
   set and the Final report bit, which is normally a "1" at the end of ta 
   report sequence, will instead be "0".  This will be the first 
   indication to the host that an error has occurred and the status just 
   received is invalid;  in any case, most commands will be rejected until 
   the Report Error Code is used to clear the Error Detected status.


   3.5  Error Code List

   The errors listed below are divided into three classes of errors.  Each 
   class associates error s which occur within three different phases of 
   the operation of the drive.  Within each class the highest remaining 
   errors will not be tested.  With the exception of the initialization 
   errors, the error status is never over-written.


   It should be noted that the list below should be supported by all host 
   software, however, it is not required that all drives detect all th 
   errors listed below.  Some of these error may not be appropriate to a 
   particular implementation.  Additionally, any manufacturer can "invent" 
   new error codes to be added to the list, with the concurrence of the 
   participating standards committee members.

                      Error Codes Class and Priority list

   Initialization errors:  (over-writes previous error)
        (20) Self-Diagnostic Failed  (can not be cleared)
        (21) Warning EEPROM Not Initialized, defaults set
        (22) EEPROM Corrupted or Hardware Failure
        (26) Power On Reset Occurred
        (27) Software Reset Occurred

   Pre-execution errors:
         (8) Illegal Command in Report Subcontext
        (13) Command Received while New Cartridge Pending
        (14) Command Illegal or Undefined in Primary Mode
        (15) Command Illegal or Undefined in Format Mode
        (16) Command Illegal or Undefined in Verify Mode
        (30) Command Received During Non-Interruptable Process
         (1) Command Received while Drive Not Ready
         (2) Cartridge Not Present or Removed
        (19) Command Illegal when Cartridge Not Referenced
         (5) Cartridge Write Protected
         (6) Undefined or Reserved Command Code
         (7) Illegal Track address specified for seek
         (9) Illegal Entry into a Diagnostic Mode
        (17) Logical Forward not at Logical BOT in Format Mode
        (31) Rate Selection error
        (32) Illegal command while in high speed mode
        (33) Illegal seek segment value

   Process errors:
         (3) Motor Speed Error  (not within 1%)
         (4) Motor Speed fault (jammed, or gross speed error)
        (10) Broken Tape Detected (based on hole sensor)
        (11) Warning -- Read Gain Setting Error
        (18) Logical EOT before all Segments generated
        (23) Motion Time-out error
        (24) Data Segment Too Long -- Logical Forward or Pause
        (28) Diagnostic Mode 1 Error
        (29) Diagnostic Mode 2 Error

   Obsolete errors:
        (12) Command Received while Error Status Pending
        (25) Transmit Overrun
   

                          Sequential Error Code List

         (1) Command Received while Drive Not Ready
         (2) Cartridge Not Present or Removed
         (3) Motor Speed Error  (not within 1%)
         (4) Motor Speed fault (jammed, or gross speed error)
         (5) Cartridge Write Protected
         (6) Undefined or Reserved Command Code
         (7) Illegal Track address specified for seek
         (8) Illegal Command in Report Subcontext
         (9) Illegal Entry into a Diagnostic Mode
        (10) Broken Tape Detected (based on hole sensor)
        (11) Warning -- Read Gain Setting Error
        (12) Command Received while Error Status Pending (obs)
        (13) Command Received while New Cartridge Pending
        (14) Command Illegal or Undefined in Primary Mode
        (15) Command Illegal or Undefined in Format Mode
        (16) Command Illegal or Undefined in Verify Mode
        (17) Logical Forward not at Logical BOT in Format Mode
        (18) Logical EOT before all Segments generated
        (19) Command Illegal when Cartridge Not Referenced
        (20) Self-Diagnostic Failed  (can not be cleared)
        (21) Warning EEPROM Not Initialized, defaults set
        (22) EEPROM Corrupted or Hardware Failure
        (23) Motion Time-out error
        (24) Data Segment Too Long -- Logical Forward or Pause
        (25) Transmit Overrun (obs)
        (26) Power On Reset Occurred
        (27) Software Reset Occurred
        (28) Diagnostic Mode 1 Error
        (29) Diagnostic Mode 2 Error
        (30) Command Received During Non-Interruptable Process
        (31) Rate Selection error
        (32) Illegal command while in high speed mode
        (33) Illegal seek segment value


                            Command Timing Diagrams
   
    
                 TstepĴ         TtimeoutĴ
               Ŀ  Ŀ  //Ŀ  
   STEP/                                    
                                      Tack
                   Tstepw                           
                  //Ŀ
   TRACK ZERO/                                       
                                                  
                 Tclr

                    Report Acknowledge TRACK ZERO Timing 3a


               Ŀ  Ŀ  
   STEP/                           
                               
                       Tclr      Tbit
                          
   TRACK ZERO/                         
                                     

                           Report Next Bit Timing 3b


                    Tinx
              ĿĿĿĿĿĿĿĿĿĿ
   INDEX/                                               
                                                        
          Tinxw                                    
                           Tinxoff                 Tinxon
              ĿĿĿĿĿĿ
   STEP/                                
                                        
                                                    
              Ŀ
   TRACK ZERO/                                      
                                                    

                      Report Acknowledge INDEX Timing 3c



             ĿĿĿĿ//ĿĿĿĿ
   INDEX/                                              
                                                       
                                                      Tinxon
                              Tinxoff      Ttimeout
             ĿĿ//ĿĿ
   STEP/                                
                                        

                 Waiting for Argument or Ready INDEX Timing 3d


              //
   INDEX/                             
              //
   STEP/                         
              Ŀ  ڿ ڿ ڿ //Ŀ 
   TRACK ZERO/                      
                    Data =  1   1  1  1  0 ... 0  1
                 Bit Def = Ack  0  1  2  3 ... 7 Final

                         Report Status while Ready 4a


              //
   INDEX/                                  
              //
   STEP/                         
              Ŀ  Ŀ ڿ //Ŀ 
   TRACK ZERO/                         
                    Data =  1   0  1  1  0 ... 0  1
                 Bit Def = Ack  0  1  2  3 ... 7 Final

                       Report Status while NOT Ready 4a
   

[keyed in 9/19/92]
