•  Back 
  •  The IKBD Controller 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File
                            IKBD  command codes


Cmd    Result
BYTE


0x07   Set mouse button action. This command BYTE should be followed by
       a BYTE which describes how the mouse buttons should be treated as
       follows:

            BYTE  Meaning
            0x00  Default mode.
            0x01  Mouse button press triggers an absolute position
                  report.
            0x02  Mouse button release triggers an absolute position
                  report.
            0x03  Mouse button press and release triggers absolute
                  position reports.
            0x04  Mouse buttons report key presses.

0x08   Enable relative mouse position reporting (default).

0x09   Enable absolute mouse position reporting. This command is followed
       by the MSB and LSB of the X and Y coordinate maximum values for the
       mouse.

0x0A   Enable mouse keycode mode. This command is followed by two BYTEs
       indicating the maximum number of mouse 'ticks' required to generate
       a keycode for the X and Y axis respectively.

0x0B   Set mouse threshold. This command is followed by two BYTEs which
       determine the number of mouse 'ticks' required to generate a mouse
       position report in relative positioning mode.

0x0C   Set mouse scale. This command is followed by two BYTEs which
       determine the number of mouse 'ticks' for each single coordinate on
       the X and Y axis respectively.

0x0D   Interrogate mouse position. This command generates an absolute mouse
       position report.

0x0E   Load mouse position. This command sets the mouse position based on
       the current coordinate system in absolute reporting mode. The
       command is followed by a filler BYTE of 0x00 and the MSB and LSB of
       the new X and Y axis for the mouse.

0x0F   Set Y=0 to the bottom. This command changes the origin of the mouse
       coordinate system to the upper left of the screen.

0x10   Set Y=0 to the top. This command changes the origin of the mouse
       coordinate system to the lower left of the screen.

0x11   Resume sending data. This command (or for that matter any command)
       will cause the IKBD to resume sending packet data to the host.

0x12   Disable all mouse packet reporting. Any valid mouse command resets
       this state. If the mouse buttons have been programmed to act like
       keyboard keys, this command will have no effect on them.

0x13   Pause output. All output from the IKBD controller is halted until
       a 'Resume' or other command is received.

0x14   Set joystick event reporting mode. This command causes a joystick
       report to be generated whenever the state of either joystick
       changes.

0x15   Set joystick interrogation mode. This command causes the IKBD to
       generate joystick packets only when requested by the host.

0x16   Joystick interrogation. This command causes a joystick packet
       indicating the status of both joysticks to be generated.

0x17   Enables joystick monitoring mode. Besides serial communication and
       the maintenance of the time-of-day clock, this command causes only
       special joystick reports to be generated.
       The command BYTE should be followed by a BYTE indicating how often
       the joystick should be polled in increments of 1/100ths of a second.

0x18   Enables fire button monitoring mode. As above, this mode limits the
       IKBD to serial communication, updating the time-of-day clock, and
       the reporting of the state of joystick button 1.

0x19   Set joystick keycode mode. This command is followed by six BYTEs as
       follows:

            BYTE  Meaning
              1   The length of time (in tenths of a second) before
                  the horizontal breakpoint is reached.
              2   Same as above for the vertical plane.
              3   The length of time (in tenths of a second) between
                  key repeats before the velocity breakpoint is reached.
              4   Same as above for the vertical plane.
              5   The length of time (in tenths of a second) between key
                  repeats after the velocity breakpoint is reached.
              6   Same as above for the vertical plane.

0x1A   Disable joystick event reporting.

0x1B   Set the time of day clock. This command is followed by six BYTEs
       used to set the IKBD clock. These BYTEs are in binary-coded decimal
       (BCD) format. Each BYTE contains two digits (0-9), one in each
       nibble. The format for these BYTEs is as follows:

            BYTE  Meaning
              1   Year (last two digits)
              2   Month
              3   Date
              4   Hours (0-23)
              5   Minutes (0-59)
              6   Seconds (0-59)

0x1C   Interrogate the time-of-day clock. This command returns a packet
       headed by the value 0xFC followed by six BYTEs as indicated above.

0x20   Load BYTEs into the IKBD memory. This command is followed by at
       least three BYTEs containing the MSB and LSB of the address into
       which to load the data, the number of BYTEs to load (0-127), and the
       data itself.

0x21   Read BYTEs from the IKBD controller. This command is followed by two
       BYTEs containing the MSB and LSB of the address to read from. This
       returns a packet headed by the BYTE values 0xF6 and 0x20 followed by
       the memory data.

0x22   Execute a subroutine on the IKBD controller. This command BYTE is
       followed by two BYTEs containing the MSB and LSB of the memory
       location of the subroutine to execute.

0x80   Reset the IKBD controller. This command is actually a two-BYTE
       command. The BYTE 0x80 must be followed by a BYTE of 0x01 or the
       command will be ignored.

0x87   Return a status message containing the current mouse action state.
       After receiving this command the IKBD will respond by sending
       a status packet (which may be intercepted at statvec) as follows:

            BYTE  Meaning
              1   0xF6
              2   0x07
              3   Current mouse action state (see command 0x07)
             4-8  0

0x88   Return a status message containing the current mouse mode. After
       receiving this command the IKBD will respond by sending a status
       packet (which may be intercepted at statvec) as follows:

            BYTE  Meaning
              1   0xF6
              2   Current mode as follows:
                      0x08 = Relative mode
                      0x09 = Absolute mode
                      0x0A = Keycode mode
              3   Absolute mode: MSB of maximum X
                  position (units to current scale).
                  Keycode mode: Horizontal distance
                  threshold that must be passed prior to
                  sending a keycode.
                  Relative mode: 0
              4   Absolute mode: LSB of maximum X position.
                  Keycode mode: Vertical distance
                  threshold that must be passed prior to
                  sending a keycode.
                  Relative mode: 0
              5   Absolute mode: MSB of maximum Y
                  position (units to current scale).
                  Keycode mode: 0
                  Relative mode: 0
              6   Absolute mode: LSB of maximum Y
                  position.
                  Keycode mode: 0
                  Relative mode: 0
             7-8  0

0x89   Same as 0x88.

0x8A   Same as 0x88.

0x8B   Return a status message containing the current mouse threshold state.
       After receiving this command the IKBD will respond by sending
       a status packet (which may be intercepted at statvec) as follows:

            BYTE  Meaning
              1   0xF6
              2   0x0B
              3   Number of horizontal mouse 'ticks' that must be
                  traveled prior to sending a mouse packet.
              4   Number of vertical mouse 'ticks' that must be
                  traveled prior to sending a mouse packet.
             5-8  0

0x8C   Return a status message containing the current mouse scaling factor.
       After receiving this command the IKBD will respond by sending
       a status packet (which may be intercepted at statvec) as follows:

            BYTE  Meaning
              1   0xF6
              2   0x0C
              3   Horizontal mouse 'ticks' between a change in mouse
                  position on the X axis.
              4   Vertical mouse 'ticks' between a change in mouse
                  position on the Y axis.
             5-8  0

0x8F   Return a status message containing the current origin point of the Y
       axis used for mouse position reporting. After receiving this command
       the IKBD will respond by sending a status packet (which may be
       intercepted at statvec) as follows:

            BYTE  Meaning
              1   0xF6
              2   0x0F = Bottom is (Y=0)
                  0x10 = Top is (Y=0)
             3-8  0

0x90   Same as 0x8F.

0x92   Return a status message containing the current state of mouse
       reporting. After receiving this command the IKBD will respond by
       sending a status packet (which may be intercepted at statvec) as
       follows:

            BYTE  Meaning
              1   0xF6
              2   0x00 = Mouse reporting enabled.
                  0x12 = Mouse reporting disabled.
             3-8  0

0x94   Return a status message containing the current joystick mode. After
       receiving this command the IKBD will respond by sending a status
       packet (which may be intercepted at statvec) as follows:

            BYTE  Meaning
              1   0xF6
              2   Current mode as follows:
                  0x14 = Event reporting mode
                  0x15 = Interrogation mode
                  0x19 = Keycode mode
              3   Keycode mode: This value represents the
                    amount of time (in tenths of a second)
                    that keycodes are returned to the host
                    for horizontal position events at the initial
                    velocity level (after this time expires, the
                    secondary velocity level is used).
                  Event recording mode: 0
                  Interrogation mode: 0
              4   Keycode mode: Same as BYTE 3 for vertical events.
                  Event recording mode: 0
                  Interrogation mode: 0
              5   Keycode mode: This value represents the
                    initial horizontal velocity level (in tenths of
                    a second). This is the initial rate at which
                    keycodes are generated.
                  Event recording mode: 0
                  Interrogation mode: 0
              6   Keycode mode: Same as byte 5 for vertical events.
                  Event recording mode: 0
                  Interrogation mode: 0
              7   Keycode mode: This value represents the
                    secondary horizontal velocity level (in
                    tenths of a second). This is the rate used
                    after the amount of time specified in bytes
                    3-4 expires.
                  Event recording mode: 0
                  Interrogation mode: 0
              8   Keycode mode: Same as byte 7 for vertical events.
                  Event recording mode: 0
                  Interrogation mode: 0

0x95   Same as 0x94.

0x99   Same as 0x94.

0x9A   Return a status message containing the current status of the
       joystick. After receiving this command the IKBD will respond by
       sending a status packet (which may be intercepted at statvec) as
       follows:

            BYTE  Meaning
              1   0xF6
              2   0x00 = Joystick enabled
                  0x1A = Joystick disabled
             3-8  0