^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) ====================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Intelligent Keyboard (ikbd) Protocol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ====================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) Introduction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) The Atari Corp. Intelligent Keyboard (ikbd) is a general purpose keyboard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) controller that is flexible enough that it can be used in a variety of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) products without modification. The keyboard, with its microcontroller,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) provides a convenient connection point for a mouse and switch-type joysticks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) The ikbd processor also maintains a time-of-day clock with one second
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) resolution.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) The ikbd has been designed to be general enough that it can be used with a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) variety of new computer products. Product variations in a number of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) keyswitches, mouse resolution, etc. can be accommodated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) The ikbd communicates with the main processor over a high speed bi-directional
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) serial interface. It can function in a variety of modes to facilitate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) different applications of the keyboard, joysticks, or mouse. Limited use of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) the controller is possible in applications in which only a unidirectional
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) communications medium is available by carefully designing the default modes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) Keyboard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) The keyboard always returns key make/break scan codes. The ikbd generates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) keyboard scan codes for each key press and release. The key scan make (key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) closure) codes start at 1, and are defined in Appendix A. For example, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) ISO key position in the scan code table should exist even if no keyswitch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) exists in that position on a particular keyboard. The break code for each key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) is obtained by ORing 0x80 with the make code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) The special codes 0xF6 through 0xFF are reserved for use as follows:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) =================== ====================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) Code Command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) =================== ====================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 0xF6 status report
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 0xF7 absolute mouse position record
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 0xF8-0xFB relative mouse position records (lsbs determined by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) mouse button states)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 0xFC time-of-day
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 0xFD joystick report (both sticks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 0xFE joystick 0 event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 0xFF joystick 1 event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) =================== ====================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) The two shift keys return different scan codes in this mode. The ENTER key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) and the RETurn key are also distinct.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) Mouse
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) =====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) The mouse port should be capable of supporting a mouse with resolution of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) approximately 200 counts (phase changes or 'clicks') per inch of travel. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) mouse should be scanned at a rate that will permit accurate tracking at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) velocities up to 10 inches per second.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) The ikbd can report mouse motion in three distinctly different ways. It can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) report relative motion, absolute motion in a coordinate system maintained
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) within the ikbd, or by converting mouse motion into keyboard cursor control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) key equivalents.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) The mouse buttons can be treated as part of the mouse or as additional
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) keyboard keys.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) Relative Position Reporting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) ---------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) In relative position mode, the ikbd will return relative mouse position
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) records whenever a mouse event occurs. A mouse event consists of a mouse
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) button being pressed or released, or motion in either axis exceeding a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) settable threshold of motion. Regardless of the threshold, all bits of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) resolution are returned to the host computer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) Note that the ikbd may return mouse relative position reports with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) significantly more than the threshold delta x or y. This may happen since no
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) relative mouse motion events will be generated: (a) while the keyboard has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) been 'paused' ( the event will be stored until keyboard communications is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) resumed) (b) while any event is being transmitted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) The relative mouse position record is a three byte record of the form
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) (regardless of keyboard mode)::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) %111110xy ; mouse position record flag
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) ; where y is the right button state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) ; and x is the left button state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) X ; delta x as twos complement integer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) Y ; delta y as twos complement integer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) Note that the value of the button state bits should be valid even if the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) MOUSE BUTTON ACTION has set the buttons to act like part of the keyboard.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) If the accumulated motion before the report packet is generated exceeds the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) +127...-128 range, the motion is broken into multiple packets.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) Note that the sign of the delta y reported is a function of the Y origin
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) selected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) Absolute Position reporting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) ---------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) The ikbd can also maintain absolute mouse position. Commands exist for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) resetting the mouse position, setting X/Y scaling, and interrogating the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) current mouse position.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) Mouse Cursor Key Mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) ---------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) The ikbd can translate mouse motion into the equivalent cursor keystrokes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) The number of mouse clicks per keystroke is independently programmable in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) each axis. The ikbd internally maintains mouse motion information to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) highest resolution available, and merely generates a pair of cursor key events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) for each multiple of the scale factor.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) Mouse motion produces the cursor key make code immediately followed by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) break code for the appropriate cursor key. The mouse buttons produce scan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) codes above those normally assigned for the largest envisioned keyboard (i.e.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) LEFT=0x74 & RIGHT=0x75).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) Joystick
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) Joystick Event Reporting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) ------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) In this mode, the ikbd generates a record whenever the joystick position is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) changed (i.e. for each opening or closing of a joystick switch or trigger).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) The joystick event record is two bytes of the form::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) %1111111x ; Joystick event marker
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) ; where x is Joystick 0 or 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) %x000yyyy ; where yyyy is the stick position
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) ; and x is the trigger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) Joystick Interrogation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) The current state of the joystick ports may be interrogated at any time in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) this mode by sending an 'Interrogate Joystick' command to the ikbd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) The ikbd response to joystick interrogation is a three byte report of the form::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 0xFD ; joystick report header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) %x000yyyy ; Joystick 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) %x000yyyy ; Joystick 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) ; where x is the trigger
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) ; and yyy is the stick position
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) Joystick Monitoring
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) -------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) A mode is available that devotes nearly all of the keyboard communications
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) time to reporting the state of the joystick ports at a user specifiable rate.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) It remains in this mode until reset or commanded into another mode. The PAUSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) command in this mode not only stop the output but also temporarily stops
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) scanning the joysticks (samples are not queued).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) Fire Button Monitoring
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) A mode is provided to permit monitoring a single input bit at a high rate. In
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) this mode the ikbd monitors the state of the Joystick 1 fire button at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) maximum rate permitted by the serial communication channel. The data is packed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 8 bits per byte for transmission to the host. The ikbd remains in this mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) until reset or commanded into another mode. The PAUSE command in this mode not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) only stops the output but also temporarily stops scanning the button (samples
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) are not queued).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) Joystick Key Code Mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) The ikbd may be commanded to translate the use of either joystick into the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) equivalent cursor control keystroke(s). The ikbd provides a single breakpoint
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) velocity joystick cursor.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) Joystick events produce the make code, immediately followed by the break code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) for the appropriate cursor motion keys. The trigger or fire buttons of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) joysticks produce pseudo key scan codes above those used by the largest key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) matrix envisioned (i.e. JOYSTICK0=0x74, JOYSTICK1=0x75).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) Time-of-Day Clock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) =================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) The ikbd also maintains a time-of-day clock for the system. Commands are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) available to set and interrogate the timer-of-day clock. Time-keeping is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) maintained down to a resolution of one second.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) Status Inquiries
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) ================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) The current state of ikbd modes and parameters may be found by sending status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) inquiry commands that correspond to the ikbd set commands.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) Power-Up Mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) =============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) The keyboard controller will perform a simple self-test on power-up to detect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) major controller faults (ROM checksum and RAM test) and such things as stuck
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) keys. Any keys down at power-up are presumed to be stuck, and their BREAK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) (sic) code is returned (which without the preceding MAKE code is a flag for a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) keyboard error). If the controller self-test completes without error, the code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 0xF0 is returned. (This code will be used to indicate the version/release of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) the ikbd controller. The first release of the ikbd is version 0xF0, should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) there be a second release it will be 0xF1, and so on.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) The ikbd defaults to a mouse position reporting with threshold of 1 unit in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) either axis and the Y=0 origin at the top of the screen, and joystick event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) reporting mode for joystick 1, with both buttons being logically assigned to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) the mouse. After any joystick command, the ikbd assumes that joysticks are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) connected to both Joystick0 and Joystick1. Any mouse command (except MOUSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) DISABLE) then causes port 0 to again be scanned as if it were a mouse, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) both buttons are logically connected to it. If a mouse disable command is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) received while port 0 is presumed to be a mouse, the button is logically
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) assigned to Joystick1 (until the mouse is reenabled by another mouse command).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) ikbd Command Set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) ================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) This section contains a list of commands that can be sent to the ikbd. Command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) codes (such as 0x00) which are not specified should perform no operation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) (NOPs).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) RESET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) -----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) N.B. The RESET command is the only two byte command understood by the ikbd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) Any byte following an 0x80 command byte other than 0x01 is ignored (and causes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) the 0x80 to be ignored).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) A reset may also be caused by sending a break lasting at least 200mS to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) ikbd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) Executing the RESET command returns the keyboard to its default (power-up)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) mode and parameter settings. It does not affect the time-of-day clock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) The RESET command or function causes the ikbd to perform a simple self-test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) If the test is successful, the ikbd will send the code of 0xF0 within 300mS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) of receipt of the RESET command (or the end of the break, or power-up). The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) ikbd will then scan the key matrix for any stuck (closed) keys. Any keys found
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) closed will cause the break scan code to be generated (the break code arriving
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) without being preceded by the make code is a flag for a key matrix error).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) SET MOUSE BUTTON ACTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) -----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 0x07
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) %00000mss ; mouse button action
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) ; (m is presumed = 1 when in MOUSE KEYCODE mode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) ; mss=0xy, mouse button press or release causes mouse
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) ; position report
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) ; where y=1, mouse key press causes absolute report
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) ; and x=1, mouse key release causes absolute report
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) ; mss=100, mouse buttons act like keys
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) This command sets how the ikbd should treat the buttons on the mouse. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) default mouse button action mode is %00000000, the buttons are treated as part
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) of the mouse logically.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) When buttons act like keys, LEFT=0x74 & RIGHT=0x75.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) SET RELATIVE MOUSE POSITION REPORTING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) -------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) Set relative mouse position reporting. (DEFAULT) Mouse position packets are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) generated asynchronously by the ikbd whenever motion exceeds the setable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) threshold in either axis (see SET MOUSE THRESHOLD). Depending upon the mouse
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) key mode, mouse position reports may also be generated when either mouse
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) button is pressed or released. Otherwise the mouse buttons behave as if they
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) were keyboard keys.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) SET ABSOLUTE MOUSE POSITIONING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) ------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 0x09
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) XMSB ; X maximum (in scaled mouse clicks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) XLSB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) YMSB ; Y maximum (in scaled mouse clicks)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) YLSB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) Set absolute mouse position maintenance. Resets the ikbd maintained X and Y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) coordinates.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) In this mode, the value of the internally maintained coordinates does NOT wrap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) between 0 and large positive numbers. Excess motion below 0 is ignored. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) command sets the maximum positive value that can be attained in the scaled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) coordinate system. Motion beyond that value is also ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) SET MOUSE KEYCODE MOSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 0x0A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) deltax ; distance in X clicks to return (LEFT) or (RIGHT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) deltay ; distance in Y clicks to return (UP) or (DOWN)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) Set mouse monitoring routines to return cursor motion keycodes instead of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) either RELATIVE or ABSOLUTE motion records. The ikbd returns the appropriate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) cursor keycode after mouse travel exceeding the user specified deltas in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) either axis. When the keyboard is in key scan code mode, mouse motion will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) cause the make code immediately followed by the break code. Note that this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) command is not affected by the mouse motion origin.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) SET MOUSE THRESHOLD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) -------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 0x0B
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) X ; x threshold in mouse ticks (positive integers)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) Y ; y threshold in mouse ticks (positive integers)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) This command sets the threshold before a mouse event is generated. Note that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) it does NOT affect the resolution of the data returned to the host. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) command is valid only in RELATIVE MOUSE POSITIONING mode. The thresholds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) default to 1 at RESET (or power-up).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) SET MOUSE SCALE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) ---------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 0x0C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) X ; horizontal mouse ticks per internal X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) Y ; vertical mouse ticks per internal Y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) This command sets the scale factor for the ABSOLUTE MOUSE POSITIONING mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) In this mode, the specified number of mouse phase changes ('clicks') must
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) occur before the internally maintained coordinate is changed by one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) (independently scaled for each axis). Remember that the mouse position
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) information is available only by interrogating the ikbd in the ABSOLUTE MOUSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) POSITIONING mode unless the ikbd has been commanded to report on button press
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) or release (see SET MOSE BUTTON ACTION).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) INTERROGATE MOUSE POSITION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) --------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 0x0D
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) Returns:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 0xF7 ; absolute mouse position header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) BUTTONS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 0000dcba ; where a is right button down since last interrogation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) ; b is right button up since last
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) ; c is left button down since last
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) ; d is left button up since last
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) XMSB ; X coordinate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) XLSB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) YMSB ; Y coordinate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) YLSB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) The INTERROGATE MOUSE POSITION command is valid when in the ABSOLUTE MOUSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) POSITIONING mode, regardless of the setting of the MOUSE BUTTON ACTION.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) LOAD MOUSE POSITION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) -------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) 0x0E
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 0x00 ; filler
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) XMSB ; X coordinate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) XLSB ; (in scaled coordinate system)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) YMSB ; Y coordinate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) YLSB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) This command allows the user to preset the internally maintained absolute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) mouse position.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) SET Y=0 AT BOTTOM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) -----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) 0x0F
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) This command makes the origin of the Y axis to be at the bottom of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) logical coordinate system internal to the ikbd for all relative or absolute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) mouse motion. This causes mouse motion toward the user to be negative in sign
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) and away from the user to be positive.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) SET Y=0 AT TOP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) --------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) Makes the origin of the Y axis to be at the top of the logical coordinate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) system within the ikbd for all relative or absolute mouse motion. (DEFAULT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) This causes mouse motion toward the user to be positive in sign and away from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) the user to be negative.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) RESUME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) ------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) 0x11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) Resume sending data to the host. Since any command received by the ikbd after
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) its output has been paused also causes an implicit RESUME this command can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) thought of as a NO OPERATION command. If this command is received by the ikbd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) and it is not PAUSED, it is simply ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) DISABLE MOUSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) 0x12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) All mouse event reporting is disabled (and scanning may be internally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) disabled). Any valid mouse mode command resumes mouse motion monitoring. (The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) valid mouse mode commands are SET RELATIVE MOUSE POSITION REPORTING, SET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) ABSOLUTE MOUSE POSITIONING, and SET MOUSE KEYCODE MODE. )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) N.B. If the mouse buttons have been commanded to act like keyboard keys, this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) command DOES affect their actions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) PAUSE OUTPUT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) ------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) 0x13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) Stop sending data to the host until another valid command is received. Key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) matrix activity is still monitored and scan codes or ASCII characters enqueued
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) (up to the maximum supported by the microcontroller) to be sent when the host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) allows the output to be resumed. If in the JOYSTICK EVENT REPORTING mode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) joystick events are also queued.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) Mouse motion should be accumulated while the output is paused. If the ikbd is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) in RELATIVE MOUSE POSITIONING REPORTING mode, motion is accumulated beyond the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) normal threshold limits to produce the minimum number of packets necessary for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) transmission when output is resumed. Pressing or releasing either mouse button
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) causes any accumulated motion to be immediately queued as packets, if the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) mouse is in RELATIVE MOUSE POSITION REPORTING mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) Because of the limitations of the microcontroller memory this command should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) be used sparingly, and the output should not be shut of for more than <tbd>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) milliseconds at a time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) The output is stopped only at the end of the current 'even'. If the PAUSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) OUTPUT command is received in the middle of a multiple byte report, the packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) will still be transmitted to conclusion and then the PAUSE will take effect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) When the ikbd is in either the JOYSTICK MONITORING mode or the FIRE BUTTON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) MONITORING mode, the PAUSE OUTPUT command also temporarily stops the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) monitoring process (i.e. the samples are not enqueued for transmission).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) SET JOYSTICK EVENT REPORTING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) ----------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) 0x14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) Enter JOYSTICK EVENT REPORTING mode (DEFAULT). Each opening or closure of a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) joystick switch or trigger causes a joystick event record to be generated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) SET JOYSTICK INTERROGATION MODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) -------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) 0x15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) Disables JOYSTICK EVENT REPORTING. Host must send individual JOYSTICK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) INTERROGATE commands to sense joystick state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) JOYSTICK INTERROGATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) --------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) 0x16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) Return a record indicating the current state of the joysticks. This command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) is valid in either the JOYSTICK EVENT REPORTING mode or the JOYSTICK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) INTERROGATION MODE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) SET JOYSTICK MONITORING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) -----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) 0x17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) rate ; time between samples in hundredths of a second
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) Returns: (in packets of two as long as in mode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) %000000xy ; where y is JOYSTICK1 Fire button
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) ; and x is JOYSTICK0 Fire button
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) %nnnnmmmm ; where m is JOYSTICK1 state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) ; and n is JOYSTICK0 state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) Sets the ikbd to do nothing but monitor the serial command line, maintain the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) time-of-day clock, and monitor the joystick. The rate sets the interval
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) between joystick samples.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) N.B. The user should not set the rate higher than the serial communications
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) channel will allow the 2 bytes packets to be transmitted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) SET FIRE BUTTON MONITORING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) --------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) 0x18
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) Returns: (as long as in mode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) %bbbbbbbb ; state of the JOYSTICK1 fire button packed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) ; 8 bits per byte, the first sample if the MSB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) Set the ikbd to do nothing but monitor the serial command line, maintain the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) time-of-day clock, and monitor the fire button on Joystick 1. The fire button
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) is scanned at a rate that causes 8 samples to be made in the time it takes for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) the previous byte to be sent to the host (i.e. scan rate = 8/10 * baud rate).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) The sample interval should be as constant as possible.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) SET JOYSTICK KEYCODE MODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) -------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) 0x19
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) RX ; length of time (in tenths of seconds) until
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) ; horizontal velocity breakpoint is reached
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) RY ; length of time (in tenths of seconds) until
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) ; vertical velocity breakpoint is reached
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) TX ; length (in tenths of seconds) of joystick closure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) ; until horizontal cursor key is generated before RX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530) ; has elapsed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) TY ; length (in tenths of seconds) of joystick closure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532) ; until vertical cursor key is generated before RY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) ; has elapsed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) VX ; length (in tenths of seconds) of joystick closure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) ; until horizontal cursor keystrokes are generated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) ; after RX has elapsed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) VY ; length (in tenths of seconds) of joystick closure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) ; until vertical cursor keystrokes are generated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) ; after RY has elapsed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) In this mode, joystick 0 is scanned in a way that simulates cursor keystrokes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) On initial closure, a keystroke pair (make/break) is generated. Then up to Rn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) tenths of seconds later, keystroke pairs are generated every Tn tenths of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) seconds. After the Rn breakpoint is reached, keystroke pairs are generated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) every Vn tenths of seconds. This provides a velocity (auto-repeat) breakpoint
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546) feature.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) Note that by setting RX and/or Ry to zero, the velocity feature can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) disabled. The values of TX and TY then become meaningless, and the generation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) of cursor 'keystrokes' is set by VX and VY.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) DISABLE JOYSTICKS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552) -----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) 0x1A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) Disable the generation of any joystick events (and scanning may be internally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559) disabled). Any valid joystick mode command resumes joystick monitoring. (The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) joystick mode commands are SET JOYSTICK EVENT REPORTING, SET JOYSTICK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) INTERROGATION MODE, SET JOYSTICK MONITORING, SET FIRE BUTTON MONITORING, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) SET JOYSTICK KEYCODE MODE.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) TIME-OF-DAY CLOCK SET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) ---------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) 0x1B
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) YY ; year (2 least significant digits)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) MM ; month
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) DD ; day
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) hh ; hour
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) mm ; minute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) ss ; second
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) All time-of-day data should be sent to the ikbd in packed BCD format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) Any digit that is not a valid BCD digit should be treated as a 'don't care'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) and not alter that particular field of the date or time. This permits setting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580) only some subfields of the time-of-day clock.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) INTERROGATE TIME-OF-DAT CLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) -----------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587) 0x1C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) Returns:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589) 0xFC ; time-of-day event header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) YY ; year (2 least significant digits)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) MM ; month
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) DD ; day
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593) hh ; hour
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) mm ; minute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) ss ; second
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) All time-of-day is sent in packed BCD format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) MEMORY LOAD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) 0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) ADRMSB ; address in controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) ADRLSB ; memory to be loaded
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) NUM ; number of bytes (0-128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) { data }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610) This command permits the host to load arbitrary values into the ikbd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) controller memory. The time between data bytes must be less than 20ms.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) MEMORY READ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) 0x21
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) ADRMSB ; address in controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) ADRLSB ; memory to be read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) Returns:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622) 0xF6 ; status header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) 0x20 ; memory access
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) { data } ; 6 data bytes starting at ADR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) This command permits the host to read from the ikbd controller memory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) CONTROLLER EXECUTE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) 0x22
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) ADRMSB ; address of subroutine in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) ADRLSB ; controller memory to be called
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) This command allows the host to command the execution of a subroutine in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) ikbd controller memory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) STATUS INQUIRIES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641) ----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) Status commands are formed by inclusively ORing 0x80 with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646) relevant SET command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) 0x88 (or 0x89 or 0x8A) ; request mouse mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) Returns:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) 0xF6 ; status response header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652) mode ; 0x08 is RELATIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653) ; 0x09 is ABSOLUTE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) ; 0x0A is KEYCODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) param1 ; 0 is RELATIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) ; XMSB maximum if ABSOLUTE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657) ; DELTA X is KEYCODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658) param2 ; 0 is RELATIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) ; YMSB maximum if ABSOLUTE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660) ; DELTA Y is KEYCODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) param3 ; 0 if RELATIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662) ; or KEYCODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663) ; YMSB is ABSOLUTE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664) param4 ; 0 if RELATIVE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665) ; or KEYCODE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666) ; YLSB is ABSOLUTE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667) 0 ; pad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) The STATUS INQUIRY commands request the ikbd to return either the current mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) or the parameters associated with a given command. All status reports are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672) padded to form 8 byte long return packets. The responses to the status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) requests are designed so that the host may store them away (after stripping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) off the status report header byte) and later send them back as commands to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) ikbd to restore its state. The 0 pad bytes will be treated as NOPs by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676) ikbd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) Valid STATUS INQUIRY commands are::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) 0x87 mouse button action
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) 0x88 mouse mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) 0x89
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) 0x8A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) 0x8B mnouse threshold
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685) 0x8C mouse scale
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686) 0x8F mouse vertical coordinates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687) 0x90 ( returns 0x0F Y=0 at bottom
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688) 0x10 Y=0 at top )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) 0x92 mouse enable/disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690) ( returns 0x00 enabled)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691) 0x12 disabled )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692) 0x94 joystick mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) 0x95
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694) 0x96
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) 0x9A joystick enable/disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696) ( returns 0x00 enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697) 0x1A disabled )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699) It is the (host) programmer's responsibility to have only one unanswered
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) inquiry in process at a time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701) STATUS INQUIRY commands are not valid if the ikbd is in JOYSTICK MONITORING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702) mode or FIRE BUTTON MONITORING mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705) SCAN CODES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706) ==========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) The key scan codes returned by the ikbd are chosen to simplify the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709) implementation of GSX.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) GSX Standard Keyboard Mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713) ======= ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) Hex Keytop
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715) ======= ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716) 01 Esc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717) 02 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) 03 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719) 04 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720) 05 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721) 06 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722) 07 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723) 08 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724) 09 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725) 0A 9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726) 0B 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727) 0C \-
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728) 0D \=
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729) 0E BS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730) 0F TAB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731) 10 Q
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732) 11 W
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733) 12 E
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734) 13 R
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 735) 14 T
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 736) 15 Y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 737) 16 U
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 738) 17 I
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 739) 18 O
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 740) 19 P
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 741) 1A [
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 742) 1B ]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 743) 1C RET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 744) 1D CTRL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 745) 1E A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 746) 1F S
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 747) 20 D
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 748) 21 F
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 749) 22 G
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 750) 23 H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 751) 24 J
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 752) 25 K
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 753) 26 L
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 754) 27 ;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 755) 28 '
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 756) 29 \`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 757) 2A (LEFT) SHIFT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 758) 2B \\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 759) 2C Z
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 760) 2D X
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 761) 2E C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 762) 2F V
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 763) 30 B
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 764) 31 N
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 765) 32 M
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 766) 33 ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 767) 34 .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 768) 35 /
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 769) 36 (RIGHT) SHIFT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 770) 37 { NOT USED }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 771) 38 ALT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 772) 39 SPACE BAR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 773) 3A CAPS LOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 774) 3B F1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 775) 3C F2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 776) 3D F3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 777) 3E F4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 778) 3F F5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 779) 40 F6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 780) 41 F7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 781) 42 F8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 782) 43 F9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 783) 44 F10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 784) 45 { NOT USED }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 785) 46 { NOT USED }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 786) 47 HOME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 787) 48 UP ARROW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 788) 49 { NOT USED }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 789) 4A KEYPAD -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 790) 4B LEFT ARROW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 791) 4C { NOT USED }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 792) 4D RIGHT ARROW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 793) 4E KEYPAD +
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 794) 4F { NOT USED }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 795) 50 DOWN ARROW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 796) 51 { NOT USED }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 797) 52 INSERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 798) 53 DEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 799) 54 { NOT USED }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 800) 5F { NOT USED }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 801) 60 ISO KEY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 802) 61 UNDO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 803) 62 HELP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 804) 63 KEYPAD (
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 805) 64 KEYPAD /
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 806) 65 KEYPAD *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 807) 66 KEYPAD *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 808) 67 KEYPAD 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 809) 68 KEYPAD 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 810) 69 KEYPAD 9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 811) 6A KEYPAD 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 812) 6B KEYPAD 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 813) 6C KEYPAD 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 814) 6D KEYPAD 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 815) 6E KEYPAD 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 816) 6F KEYPAD 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 817) 70 KEYPAD 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 818) 71 KEYPAD .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 819) 72 KEYPAD ENTER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 820) ======= ============