amijoy.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. ===============
  2. Amiga joysticks
  3. ===============
  4. Pinouts
  5. =======
  6. Amiga 4-joystick parallel port extension
  7. ----------------------------------------
  8. Parallel port pins:
  9. ===== ======== ==== ==========
  10. Pin Meaning Pin Meaning
  11. ===== ======== ==== ==========
  12. 2 Up1 6 Up2
  13. 3 Down1 7 Down2
  14. 4 Left1 8 Left2
  15. 5 Right1 9 Right2
  16. 13 Fire1 11 Fire2
  17. 19 Gnd1 18 Gnd2
  18. ===== ======== ==== ==========
  19. Amiga digital joystick
  20. ----------------------
  21. === ============
  22. Pin Meaning
  23. === ============
  24. 1 Up
  25. 2 Down
  26. 3 Left
  27. 4 Right
  28. 5 n/c
  29. 6 Fire button
  30. 7 +5V (50mA)
  31. 8 Gnd
  32. 9 Thumb button
  33. === ============
  34. Amiga mouse
  35. -----------
  36. === ============
  37. Pin Meaning
  38. === ============
  39. 1 V-pulse
  40. 2 H-pulse
  41. 3 VQ-pulse
  42. 4 HQ-pulse
  43. 5 Middle button
  44. 6 Left button
  45. 7 +5V (50mA)
  46. 8 Gnd
  47. 9 Right button
  48. === ============
  49. Amiga analog joystick
  50. ---------------------
  51. === ==============
  52. Pin Meaning
  53. === ==============
  54. 1 Top button
  55. 2 Top2 button
  56. 3 Trigger button
  57. 4 Thumb button
  58. 5 Analog X
  59. 6 n/c
  60. 7 +5V (50mA)
  61. 8 Gnd
  62. 9 Analog Y
  63. === ==============
  64. Amiga lightpen
  65. --------------
  66. === =============
  67. Pin Meaning
  68. === =============
  69. 1 n/c
  70. 2 n/c
  71. 3 n/c
  72. 4 n/c
  73. 5 Touch button
  74. 6 /Beamtrigger
  75. 7 +5V (50mA)
  76. 8 Gnd
  77. 9 Stylus button
  78. === =============
  79. Register addresses
  80. ==================
  81. JOY0DAT/JOY1DAT
  82. ---------------
  83. ======== === ==== ==== ====== ===========================================
  84. NAME rev ADDR type chip Description
  85. ======== === ==== ==== ====== ===========================================
  86. JOY0DAT 00A R Denise Joystick-mouse 0 data (left vert., horiz.)
  87. JOY1DAT 00C R Denise Joystick-mouse 1 data (right vert., horiz.)
  88. ======== === ==== ==== ====== ===========================================
  89. These addresses each read a 16 bit register. These in turn
  90. are loaded from the MDAT serial stream and are clocked in on
  91. the rising edge of SCLK. MLD output is used to parallel load
  92. the external parallel-to-serial converter. This in turn is
  93. loaded with the 4 quadrature inputs from each of two game
  94. controller ports (8 total) plus 8 miscellaneous control bits
  95. which are new for LISA and can be read in upper 8 bits of
  96. LISAID.
  97. Register bits are as follows:
  98. - Mouse counter usage (pins 1,3 =Yclock, pins 2,4 =Xclock)
  99. ======== === === === === === === === === ====== === === === === === === ===
  100. BIT# 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  101. ======== === === === === === === === === ====== === === === === === === ===
  102. JOY0DAT Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 X7 X6 X5 X4 X3 X2 X1 X0
  103. JOY1DAT Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 X7 X6 X5 X4 X3 X2 X1 X0
  104. ======== === === === === === === === === ====== === === === === === === ===
  105. 0=LEFT CONTROLLER PAIR, 1=RIGHT CONTROLLER PAIR.
  106. (4 counters total). The bit usage for both left and right
  107. addresses is shown below. Each 6 bit counter (Y7-Y2,X7-X2) is
  108. clocked by 2 of the signals input from the mouse serial
  109. stream. Starting with first bit received:
  110. +--------+----------+-----------------------------------------+
  111. | Serial | Bit Name | Description |
  112. +========+==========+=========================================+
  113. | 0 | M0H | JOY0DAT Horizontal Clock |
  114. +--------+----------+-----------------------------------------+
  115. | 1 | M0HQ | JOY0DAT Horizontal Clock (quadrature) |
  116. +--------+----------+-----------------------------------------+
  117. | 2 | M0V | JOY0DAT Vertical Clock |
  118. +--------+----------+-----------------------------------------+
  119. | 3 | M0VQ | JOY0DAT Vertical Clock (quadrature) |
  120. +--------+----------+-----------------------------------------+
  121. | 4 | M1V | JOY1DAT Horizontal Clock |
  122. +--------+----------+-----------------------------------------+
  123. | 5 | M1VQ | JOY1DAT Horizontal Clock (quadrature) |
  124. +--------+----------+-----------------------------------------+
  125. | 6 | M1V | JOY1DAT Vertical Clock |
  126. +--------+----------+-----------------------------------------+
  127. | 7 | M1VQ | JOY1DAT Vertical Clock (quadrature) |
  128. +--------+----------+-----------------------------------------+
  129. Bits 1 and 0 of each counter (Y1-Y0,X1-X0) may be
  130. read to determine the state of the related input signal pair.
  131. This allows these pins to double as joystick switch inputs.
  132. Joystick switch closures can be deciphered as follows:
  133. +------------+------+---------------------------------+
  134. | Directions | Pin# | Counter bits |
  135. +============+======+=================================+
  136. | Forward | 1 | Y1 xor Y0 (BIT#09 xor BIT#08) |
  137. +------------+------+---------------------------------+
  138. | Left | 3 | Y1 |
  139. +------------+------+---------------------------------+
  140. | Back | 2 | X1 xor X0 (BIT#01 xor BIT#00) |
  141. +------------+------+---------------------------------+
  142. | Right | 4 | X1 |
  143. +------------+------+---------------------------------+
  144. JOYTEST
  145. -------
  146. ======== === ==== ==== ====== =================================================
  147. NAME rev ADDR type chip Description
  148. ======== === ==== ==== ====== =================================================
  149. JOYTEST 036 W Denise Write to all 4 joystick-mouse counters at once.
  150. ======== === ==== ==== ====== =================================================
  151. Mouse counter write test data:
  152. ========= === === === === === === === === ====== === === === === === === ===
  153. BIT# 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  154. ========= === === === === === === === === ====== === === === === === === ===
  155. JOYxDAT Y7 Y6 Y5 Y4 Y3 Y2 xx xx X7 X6 X5 X4 X3 X2 xx xx
  156. JOYxDAT Y7 Y6 Y5 Y4 Y3 Y2 xx xx X7 X6 X5 X4 X3 X2 xx xx
  157. ========= === === === === === === === === ====== === === === === === === ===
  158. POT0DAT/POT1DAT
  159. ---------------
  160. ======= === ==== ==== ====== ===========================================
  161. NAME rev ADDR type chip Description
  162. ======= === ==== ==== ====== ===========================================
  163. POT0DAT h 012 R Paula Pot counter data left pair (vert., horiz.)
  164. POT1DAT h 014 R Paula Pot counter data right pair (vert., horiz.)
  165. ======= === ==== ==== ====== ===========================================
  166. These addresses each read a pair of 8 bit pot counters.
  167. (4 counters total). The bit assignment for both
  168. addresses is shown below. The counters are stopped by signals
  169. from 2 controller connectors (left-right) with 2 pins each.
  170. ====== === === === === === === === === ====== === === === === === === ===
  171. BIT# 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  172. ====== === === === === === === === === ====== === === === === === === ===
  173. RIGHT Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 X7 X6 X5 X4 X3 X2 X1 X0
  174. LEFT Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 X7 X6 X5 X4 X3 X2 X1 X0
  175. ====== === === === === === === === === ====== === === === === === === ===
  176. +--------------------------+-------+
  177. | CONNECTORS | PAULA |
  178. +-------+------+-----+-----+-------+
  179. | Loc. | Dir. | Sym | pin | pin |
  180. +=======+======+=====+=====+=======+
  181. | RIGHT | Y | RX | 9 | 33 |
  182. +-------+------+-----+-----+-------+
  183. | RIGHT | X | RX | 5 | 32 |
  184. +-------+------+-----+-----+-------+
  185. | LEFT | Y | LY | 9 | 36 |
  186. +-------+------+-----+-----+-------+
  187. | LEFT | X | LX | 5 | 35 |
  188. +-------+------+-----+-----+-------+
  189. With normal (NTSC or PAL) horiz. line rate, the pots will
  190. give a full scale (FF) reading with about 500k ohm in one
  191. frame time. With proportionally faster horiz. line times,
  192. the counters will count proportionally faster.
  193. This should be noted when doing variable beam displays.
  194. POTGO
  195. -----
  196. ====== === ==== ==== ====== ================================================
  197. NAME rev ADDR type chip Description
  198. ====== === ==== ==== ====== ================================================
  199. POTGO 034 W Paula Pot port (4 bit) bi-direction and data, and pot
  200. counter start.
  201. ====== === ==== ==== ====== ================================================
  202. POTINP
  203. ------
  204. ====== === ==== ==== ====== ================================================
  205. NAME rev ADDR type chip Description
  206. ====== === ==== ==== ====== ================================================
  207. POTINP 016 R Paula Pot pin data read
  208. ====== === ==== ==== ====== ================================================
  209. This register controls a 4 bit bi-direction I/O port
  210. that shares the same 4 pins as the 4 pot counters above.
  211. +-------+----------+----------------------------------------------+
  212. | BIT# | FUNCTION | DESCRIPTION |
  213. +=======+==========+==============================================+
  214. | 15 | OUTRY | Output enable for Paula pin 33 |
  215. +-------+----------+----------------------------------------------+
  216. | 14 | DATRY | I/O data Paula pin 33 |
  217. +-------+----------+----------------------------------------------+
  218. | 13 | OUTRX | Output enable for Paula pin 32 |
  219. +-------+----------+----------------------------------------------+
  220. | 12 | DATRX | I/O data Paula pin 32 |
  221. +-------+----------+----------------------------------------------+
  222. | 11 | OUTLY | Out put enable for Paula pin 36 |
  223. +-------+----------+----------------------------------------------+
  224. | 10 | DATLY | I/O data Paula pin 36 |
  225. +-------+----------+----------------------------------------------+
  226. | 09 | OUTLX | Output enable for Paula pin 35 |
  227. +-------+----------+----------------------------------------------+
  228. | 08 | DATLX | I/O data Paula pin 35 |
  229. +-------+----------+----------------------------------------------+
  230. | 07-01 | X | Not used |
  231. +-------+----------+----------------------------------------------+
  232. | 00 | START | Start pots (dump capacitors, start counters) |
  233. +-------+----------+----------------------------------------------+