home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PCGPEV10.ZIP / GAMEPAD.TXT < prev    next >
Text File  |  1994-05-10  |  5KB  |  118 lines

  1.              ┌───────────────────────────────────────────────┐
  2.              │ Programming the Gravis GamePad and Analog Pro │
  3.              └───────────────────────────────────────────────┘
  4.  
  5.                  Written for the PC-GPE by Mark Feldman
  6.               e-mail address : u914097@student.canberra.edu.au
  7.                                myndale@cairo.anu.edu.au
  8.  
  9.                ┌───────────────────────────────────────────┐
  10.                │      THIS FILE MAY NOT BE DISTRIBUTED     │
  11.                │ SEPARATE TO THE ENTIRE PC-GPE COLLECTION. │
  12.                └───────────────────────────────────────────┘
  13.  
  14.  
  15. ┌────────────┬───────────────────────────────────────────────────────────────
  16. │ Disclaimer │
  17. └────────────┘
  18.  
  19. I assume no responsibility whatsoever for any effect that this file, the
  20. information contained therein or the use thereof has on you, your sanity,
  21. computer, spouse, children, pets or anything else related to you or your
  22. existance. No warranty is provided nor implied with this information.
  23.  
  24. ┌────────────────────────────────┬───────────────────────────────────────────
  25. │ Programming the Gravis GamePad │
  26. └────────────────────────────────┘
  27.  
  28. The Gravis GamePad plugs into the standard joystick connector. It is
  29. a pad with a 9 direction controller (including center) and four buttons.
  30. Two of the buttons can be selected as "autofire" by a switch on the
  31. GamePad.
  32.  
  33.                        _____     ||
  34.                       |     \____||________
  35.                       |  __    GRAVIS      \
  36.                       | /  \  GamePad   B  |
  37.                       | \__/          A   C|
  38.                       |______________   D  |
  39.                                      \_____|
  40.  
  41. The chief difference between the GamePad and a regular joystick is that
  42. the GamePad uses fixed resistances of about 0Ω, 50kΩ and 100kΩ. The
  43. resistances for each controller position are as follows:
  44.  
  45.         ┌──────────┬───────────┬───────────┐
  46.         │ x = 0Ω   │  x = 50Ω  │  x = 100Ω │
  47.         │ y = 0Ω   │  y = 0Ω   │  y = 0Ω   │
  48.         ├──────────┼───────────┼───────────┤
  49.         │ x = 0Ω   │  x = 50Ω  │  x = 100Ω │
  50.         │ y = 50kΩ │  y = 50Ω  │  y = 50Ω  │
  51.         ├──────────┼───────────┼───────────┤
  52.         │ x = 0Ω   │  x = 50Ω  │  x = 100Ω │
  53.         │ y = 100Ω │  y = 100Ω │  y = 100Ω │
  54.         └──────────┴───────────┴───────────┘
  55.  
  56. The x axis is read via the regular Joystick A X Axis, the y axis is read
  57. via the Joystick A Y Axis.
  58.  
  59. The GamePad buttons are accessed the same way that the normal joystick
  60. buttons are accessed:
  61.  
  62. ┌────────────────────────────────────────────────────────┐
  63. │ GamePad Button A               =  Joystick A, Button 1 │
  64. │ GamePad Button B               =  Joystick A, Button 2 │
  65. │ GamePad Button C (autofire A)  =  Joystick B, Button 2 │
  66. │ GamePad Button D (autofire B)  =  Joystick B, Button 1 │
  67. └────────────────────────────────────────────────────────┘
  68.  
  69.  
  70. ┌───────────────────────────────────┬────────────────────────────────────────
  71. │ Programming the Gravis Analog Pro │
  72. └───────────────────────────────────┘
  73.  
  74. The Analog Pro is very similar to a regular joystick, except it has 5
  75. buttons and a dial on the joystick, originally intended for use as a
  76. throttle for flight simulators.
  77.  
  78.  
  79.  
  80.                       -- B & A
  81.                      ___
  82.                 C -> \ |
  83.                       ||
  84.                  D - || - E
  85.                    _▄_||_▄_
  86.                    |______|
  87.  
  88.                    Left Side
  89.  
  90.  
  91.  
  92. The Analog Pro joystick position is read the same as the regular Joystick A.
  93. The throttle value is read the same as for the regular Joystick B X Axis
  94. value.
  95.  
  96.            ┌─────────────────────────────────────────────┐
  97.            │ Analog Pro Button A =  Joystick A, Button 1 │
  98.            │ Analog Pro Button B =  Joystick A, Button 2 │
  99.            │ Analog Pro Button C =  Joystick B, Button 1 │
  100.            │ Analog Pro Button D =  Joystick B, Button 2 │
  101.            └─────────────────────────────────────────────┘
  102.  
  103. The SDK is a bit vague as to how button E is read. It mentions that the
  104. buttons D and E can be set as any of the joystick buttons, but I believe
  105. this is done via switches on the joystick itself (not sure, I don't actually
  106. own one).
  107.  
  108. ┌────────────┬───────────────────────────────────────────────────────────────
  109. │ References │
  110. └────────────┘
  111.  
  112. All the information in this file was obtained from the PC GamePad and Analog
  113. Pro SDK V1.1 which can be obtained via anonymous ftp:
  114.  
  115. site: wasp.eng.ufl.edu
  116. directory: /pub/msdos/demos/programming/source
  117. filename: joysdk11.lzh
  118.