aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/input
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-04-04 20:45:49 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-04-05 18:44:59 -0400
commitc8ae270e0eebe0030623ec671bb68358fc641ffc (patch)
tree02efadd61df45c139cd94a10dc863d17c91132b5 /Documentation/input
parent89237c427b8ba33ee5976b97debeefa2418f8fb7 (diff)
Input: joystick-parport - convert documentation into ReST format
This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'Documentation/input')
-rw-r--r--Documentation/input/joystick-parport.txt764
1 files changed, 398 insertions, 366 deletions
diff --git a/Documentation/input/joystick-parport.txt b/Documentation/input/joystick-parport.txt
index 56870c70a796..0aa0fb17bf48 100644
--- a/Documentation/input/joystick-parport.txt
+++ b/Documentation/input/joystick-parport.txt
@@ -1,333 +1,349 @@
1 Linux Joystick parport drivers v2.0 1.. include:: <isonum.txt>
2 (c) 1998-2000 Vojtech Pavlik <vojtech@ucw.cz> 2
3 (c) 1998 Andree Borrmann <a.borrmann@tu-bs.de> 3.. _joystick-parport:
4 Sponsored by SuSE 4
5---------------------------------------------------------------------------- 5===================================
6 6Linux Joystick parport drivers v2.0
70. Disclaimer 7===================================
8~~~~~~~~~~~~~ 8
9 Any information in this file is provided as-is, without any guarantee that 9:Copyright: |copy| 1998-2000 Vojtech Pavlik <vojtech@ucw.cz>
10:Copyright: |copy| 1998 Andree Borrmann <a.borrmann@tu-bs.de>
11
12
13Sponsored by SuSE
14
15Disclaimer
16==========
17
18Any information in this file is provided as-is, without any guarantee that
10it will be true. So, use it at your own risk. The possible damages that can 19it will be true. So, use it at your own risk. The possible damages that can
11happen include burning your parallel port, and/or the sticks and joystick 20happen include burning your parallel port, and/or the sticks and joystick
12and maybe even more. Like when a lightning kills you it is not our problem. 21and maybe even more. Like when a lightning kills you it is not our problem.
13 22
141. Intro 23Intro
15~~~~~~~~ 24=====
16 The joystick parport drivers are used for joysticks and gamepads not 25
26The joystick parport drivers are used for joysticks and gamepads not
17originally designed for PCs and other computers Linux runs on. Because of 27originally designed for PCs and other computers Linux runs on. Because of
18that, PCs usually lack the right ports to connect these devices to. Parallel 28that, PCs usually lack the right ports to connect these devices to. Parallel
19port, because of its ability to change single bits at will, and providing 29port, because of its ability to change single bits at will, and providing
20both output and input bits is the most suitable port on the PC for 30both output and input bits is the most suitable port on the PC for
21connecting such devices. 31connecting such devices.
22 32
232. Devices supported 33Devices supported
24~~~~~~~~~~~~~~~~~~~~ 34=================
25 Many console and 8-bit computer gamepads and joysticks are supported. The 35
36Many console and 8-bit computer gamepads and joysticks are supported. The
26following subsections discuss usage of each. 37following subsections discuss usage of each.
27 38
282.1 NES and SNES 39NES and SNES
29~~~~~~~~~~~~~~~~ 40------------
30 The Nintendo Entertainment System and Super Nintendo Entertainment System 41
42The Nintendo Entertainment System and Super Nintendo Entertainment System
31gamepads are widely available, and easy to get. Also, they are quite easy to 43gamepads are widely available, and easy to get. Also, they are quite easy to
32connect to a PC, and don't need much processing speed (108 us for NES and 44connect to a PC, and don't need much processing speed (108 us for NES and
33165 us for SNES, compared to about 1000 us for PC gamepads) to communicate 45165 us for SNES, compared to about 1000 us for PC gamepads) to communicate
34with them. 46with them.
35 47
36 All NES and SNES use the same synchronous serial protocol, clocked from 48All NES and SNES use the same synchronous serial protocol, clocked from
37the computer's side (and thus timing insensitive). To allow up to 5 NES 49the computer's side (and thus timing insensitive). To allow up to 5 NES
38and/or SNES gamepads and/or SNES mice connected to the parallel port at once, 50and/or SNES gamepads and/or SNES mice connected to the parallel port at once,
39the output lines of the parallel port are shared, while one of 5 available 51the output lines of the parallel port are shared, while one of 5 available
40input lines is assigned to each gamepad. 52input lines is assigned to each gamepad.
41 53
42 This protocol is handled by the gamecon.c driver, so that's the one 54This protocol is handled by the gamecon.c driver, so that's the one
43you'll use for NES, SNES gamepads and SNES mice. 55you'll use for NES, SNES gamepads and SNES mice.
44 56
45 The main problem with PC parallel ports is that they don't have +5V power 57The main problem with PC parallel ports is that they don't have +5V power
46source on any of their pins. So, if you want a reliable source of power 58source on any of their pins. So, if you want a reliable source of power
47for your pads, use either keyboard or joystick port, and make a pass-through 59for your pads, use either keyboard or joystick port, and make a pass-through
48cable. You can also pull the power directly from the power supply (the red 60cable. You can also pull the power directly from the power supply (the red
49wire is +5V). 61wire is +5V).
50 62
51 If you want to use the parallel port only, you can take the power is from 63If you want to use the parallel port only, you can take the power is from
52some data pin. For most gamepad and parport implementations only one pin is 64some data pin. For most gamepad and parport implementations only one pin is
53needed, and I'd recommend pin 9 for that, the highest data bit. On the other 65needed, and I'd recommend pin 9 for that, the highest data bit. On the other
54hand, if you are not planning to use anything else than NES / SNES on the 66hand, if you are not planning to use anything else than NES / SNES on the
55port, anything between and including pin 4 and pin 9 will work. 67port, anything between and including pin 4 and pin 9 will work::
56 68
57(pin 9) -----> Power 69 (pin 9) -----> Power
58 70
59 Unfortunately, there are pads that need a lot more of power, and parallel 71Unfortunately, there are pads that need a lot more of power, and parallel
60ports that can't give much current through the data pins. If this is your 72ports that can't give much current through the data pins. If this is your
61case, you'll need to use diodes (as a prevention of destroying your parallel 73case, you'll need to use diodes (as a prevention of destroying your parallel
62port), and combine the currents of two or more data bits together. 74port), and combine the currents of two or more data bits together::
63 75
64 Diodes 76 Diodes
65(pin 9) ----|>|-------+------> Power 77 (pin 9) ----|>|-------+------> Power
66 | 78 |
67(pin 8) ----|>|-------+ 79 (pin 8) ----|>|-------+
68 | 80 |
69(pin 7) ----|>|-------+ 81 (pin 7) ----|>|-------+
70 | 82 |
71 <and so on> : 83 <and so on> :
72 | 84 |
73(pin 4) ----|>|-------+ 85 (pin 4) ----|>|-------+
74 86
75 Ground is quite easy. On PC's parallel port the ground is on any of the 87Ground is quite easy. On PC's parallel port the ground is on any of the
76pins from pin 18 to pin 25. So use any pin of these you like for the ground. 88pins from pin 18 to pin 25. So use any pin of these you like for the ground::
77 89
78(pin 18) -----> Ground 90 (pin 18) -----> Ground
79 91
80 NES and SNES pads have two input bits, Clock and Latch, which drive the 92NES and SNES pads have two input bits, Clock and Latch, which drive the
81serial transfer. These are connected to pins 2 and 3 of the parallel port, 93serial transfer. These are connected to pins 2 and 3 of the parallel port,
82respectively. 94respectively::
83 95
84(pin 2) -----> Clock 96 (pin 2) -----> Clock
85(pin 3) -----> Latch 97 (pin 3) -----> Latch
86 98
87 And the last thing is the NES / SNES data wire. Only that isn't shared and 99And the last thing is the NES / SNES data wire. Only that isn't shared and
88each pad needs its own data pin. The parallel port pins are: 100each pad needs its own data pin. The parallel port pins are::
89 101
90(pin 10) -----> Pad 1 data 102 (pin 10) -----> Pad 1 data
91(pin 11) -----> Pad 2 data 103 (pin 11) -----> Pad 2 data
92(pin 12) -----> Pad 3 data 104 (pin 12) -----> Pad 3 data
93(pin 13) -----> Pad 4 data 105 (pin 13) -----> Pad 4 data
94(pin 15) -----> Pad 5 data 106 (pin 15) -----> Pad 5 data
95 107
96 Note that pin 14 is not used, since it is not an input pin on the parallel 108Note that pin 14 is not used, since it is not an input pin on the parallel
97port. 109port.
98 110
99 This is everything you need on the PC's side of the connection, now on to 111This is everything you need on the PC's side of the connection, now on to
100the gamepads side. The NES and SNES have different connectors. Also, there 112the gamepads side. The NES and SNES have different connectors. Also, there
101are quite a lot of NES clones, and because Nintendo used proprietary 113are quite a lot of NES clones, and because Nintendo used proprietary
102connectors for their machines, the cloners couldn't and used standard D-Cannon 114connectors for their machines, the cloners couldn't and used standard D-Cannon
103connectors. Anyway, if you've got a gamepad, and it has buttons A, B, Turbo 115connectors. Anyway, if you've got a gamepad, and it has buttons A, B, Turbo
104A, Turbo B, Select and Start, and is connected through 5 wires, then it is 116A, Turbo B, Select and Start, and is connected through 5 wires, then it is
105either a NES or NES clone and will work with this connection. SNES gamepads 117either a NES or NES clone and will work with this connection. SNES gamepads
106also use 5 wires, but have more buttons. They will work as well, of course. 118also use 5 wires, but have more buttons. They will work as well, of course::
107 119
108Pinout for NES gamepads Pinout for SNES gamepads and mice 120 Pinout for NES gamepads Pinout for SNES gamepads and mice
109 121
110 +----> Power +-----------------------\ 122 +----> Power +-----------------------\
111 | 7 | o o o o | x x o | 1 123 | 7 | o o o o | x x o | 1
112 5 +---------+ 7 +-----------------------/ 124 5 +---------+ 7 +-----------------------/
113 | x x o \ | | | | | 125 | x x o \ | | | | |
114 | o o o o | | | | | +-> Ground 126 | o o o o | | | | | +-> Ground
115 4 +------------+ 1 | | | +------------> Data 127 4 +------------+ 1 | | | +------------> Data
116 | | | | | | +---------------> Latch 128 | | | | | | +---------------> Latch
117 | | | +-> Ground | +------------------> Clock 129 | | | +-> Ground | +------------------> Clock
118 | | +----> Clock +---------------------> Power 130 | | +----> Clock +---------------------> Power
119 | +-------> Latch 131 | +-------> Latch
120 +----------> Data 132 +----------> Data
121 133
122Pinout for NES clone (db9) gamepads Pinout for NES clone (db15) gamepads 134 Pinout for NES clone (db9) gamepads Pinout for NES clone (db15) gamepads
123 135
124 +---------> Clock +-----------------> Data 136 +---------> Clock +-----------------> Data
125 | +-------> Latch | +---> Ground 137 | +-------> Latch | +---> Ground
126 | | +-----> Data | | 138 | | +-----> Data | |
127 | | | ___________________ 139 | | | ___________________
128 _____________ 8 \ o x x x x x x o / 1 140 _____________ 8 \ o x x x x x x o / 1
129 5 \ x o o o x / 1 \ o x x o x x o / 141 5 \ x o o o x / 1 \ o x x o x x o /
130 \ x o x o / 15 `~~~~~~~~~~~~~' 9 142 \ x o x o / 15 `~~~~~~~~~~~~~' 9
131 9 `~~~~~~~' 6 | | | 143 9 `~~~~~~~' 6 | | |
132 | | | | +----> Clock 144 | | | | +----> Clock
133 | +----> Power | +----------> Latch 145 | +----> Power | +----------> Latch
134 +--------> Ground +----------------> Power 146 +--------> Ground +----------------> Power
147
148Multisystem joysticks
149---------------------
135 150
1362.2 Multisystem joysticks 151In the era of 8-bit machines, there was something like de-facto standard
137~~~~~~~~~~~~~~~~~~~~~~~~~
138 In the era of 8-bit machines, there was something like de-facto standard
139for joystick ports. They were all digital, and all used D-Cannon 9 pin 152for joystick ports. They were all digital, and all used D-Cannon 9 pin
140connectors (db9). Because of that, a single joystick could be used without 153connectors (db9). Because of that, a single joystick could be used without
141hassle on Atari (130, 800XE, 800XL, 2600, 7200), Amiga, Commodore C64, 154hassle on Atari (130, 800XE, 800XL, 2600, 7200), Amiga, Commodore C64,
142Amstrad CPC, Sinclair ZX Spectrum and many other machines. That's why these 155Amstrad CPC, Sinclair ZX Spectrum and many other machines. That's why these
143joysticks are called "Multisystem". 156joysticks are called "Multisystem".
144 157
145 Now their pinout: 158Now their pinout::
146 159
147 +---------> Right 160 +---------> Right
148 | +-------> Left 161 | +-------> Left
149 | | +-----> Down 162 | | +-----> Down
150 | | | +---> Up 163 | | | +---> Up
151 | | | | 164 | | | |
152 _____________ 165 _____________
1535 \ x o o o o / 1 166 5 \ x o o o o / 1
154 \ x o x o / 167 \ x o x o /
155 9 `~~~~~~~' 6 168 9 `~~~~~~~' 6
156 | | 169 | |
157 | +----> Button 170 | +----> Button
158 +--------> Ground 171 +--------> Ground
159 172
160 However, as time passed, extensions to this standard developed, and these 173However, as time passed, extensions to this standard developed, and these
161were not compatible with each other: 174were not compatible with each other::
162 175
163 176
164 Atari 130, 800/XL/XE MSX 177 Atari 130, 800/XL/XE MSX
165 178
166 +-----------> Power 179 +-----------> Power
167 +---------> Right | +---------> Right 180 +---------> Right | +---------> Right
168 | +-------> Left | | +-------> Left 181 | +-------> Left | | +-------> Left
169 | | +-----> Down | | | +-----> Down 182 | | +-----> Down | | | +-----> Down
170 | | | +---> Up | | | | +---> Up 183 | | | +---> Up | | | | +---> Up
171 | | | | | | | | | 184 | | | | | | | | |
172 _____________ _____________ 185 _____________ _____________
1735 \ x o o o o / 1 5 \ o o o o o / 1 186 5 \ x o o o o / 1 5 \ o o o o o / 1
174 \ x o o o / \ o o o o / 187 \ x o o o / \ o o o o /
175 9 `~~~~~~~' 6 9 `~~~~~~~' 6 188 9 `~~~~~~~' 6 9 `~~~~~~~' 6
176 | | | | | | | 189 | | | | | | |
177 | | +----> Button | | | +----> Button 1 190 | | +----> Button | | | +----> Button 1
178 | +------> Power | | +------> Button 2 191 | +------> Power | | +------> Button 2
179 +--------> Ground | +--------> Output 3 192 +--------> Ground | +--------> Output 3
180 +----------> Ground 193 +----------> Ground
181 194
182 Amstrad CPC Commodore C64 195 Amstrad CPC Commodore C64
183 196
184 +-----------> Analog Y 197 +-----------> Analog Y
185 +---------> Right | +---------> Right 198 +---------> Right | +---------> Right
186 | +-------> Left | | +-------> Left 199 | +-------> Left | | +-------> Left
187 | | +-----> Down | | | +-----> Down 200 | | +-----> Down | | | +-----> Down
188 | | | +---> Up | | | | +---> Up 201 | | | +---> Up | | | | +---> Up
189 | | | | | | | | | 202 | | | | | | | | |
190 _____________ _____________ 203 _____________ _____________
1915 \ x o o o o / 1 5 \ o o o o o / 1 204 5 \ x o o o o / 1 5 \ o o o o o / 1
192 \ x o o o / \ o o o o / 205 \ x o o o / \ o o o o /
193 9 `~~~~~~~' 6 9 `~~~~~~~' 6 206 9 `~~~~~~~' 6 9 `~~~~~~~' 6
194 | | | | | | | 207 | | | | | | |
195 | | +----> Button 1 | | | +----> Button 208 | | +----> Button 1 | | | +----> Button
196 | +------> Button 2 | | +------> Power 209 | +------> Button 2 | | +------> Power
197 +--------> Ground | +--------> Ground 210 +--------> Ground | +--------> Ground
198 +----------> Analog X 211 +----------> Analog X
199 212
200 Sinclair Spectrum +2A/+3 Amiga 1200 213 Sinclair Spectrum +2A/+3 Amiga 1200
201 214
202 +-----------> Up +-----------> Button 3 215 +-----------> Up +-----------> Button 3
203 | +---------> Fire | +---------> Right 216 | +---------> Fire | +---------> Right
204 | | | | +-------> Left 217 | | | | +-------> Left
205 | | +-----> Ground | | | +-----> Down 218 | | +-----> Ground | | | +-----> Down
206 | | | | | | | +---> Up 219 | | | | | | | +---> Up
207 | | | | | | | | 220 | | | | | | | |
208 _____________ _____________ 221 _____________ _____________
2095 \ o o x o x / 1 5 \ o o o o o / 1 222 5 \ o o x o x / 1 5 \ o o o o o / 1
210 \ o o o o / \ o o o o / 223 \ o o o o / \ o o o o /
211 9 `~~~~~~~' 6 9 `~~~~~~~' 6 224 9 `~~~~~~~' 6 9 `~~~~~~~' 6
212 | | | | | | | | 225 | | | | | | | |
213 | | | +----> Right | | | +----> Button 1 226 | | | +----> Right | | | +----> Button 1
214 | | +------> Left | | +------> Power 227 | | +------> Left | | +------> Power
215 | +--------> Ground | +--------> Ground 228 | +--------> Ground | +--------> Ground
216 +----------> Down +----------> Button 2 229 +----------> Down +----------> Button 2
217 230
218 And there were many others. 231 And there were many others.
219 232
2202.2.1 Multisystem joysticks using db9.c 233Multisystem joysticks using db9.c
221~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 234~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
222 For the Multisystem joysticks, and their derivatives, the db9.c driver 235
236For the Multisystem joysticks, and their derivatives, the db9.c driver
223was written. It allows only one joystick / gamepad per parallel port, but 237was written. It allows only one joystick / gamepad per parallel port, but
224the interface is easy to build and works with almost anything. 238the interface is easy to build and works with almost anything.
225 239
226 For the basic 1-button Multisystem joystick you connect its wires to the 240For the basic 1-button Multisystem joystick you connect its wires to the
227parallel port like this: 241parallel port like this::
228 242
229(pin 1) -----> Power 243 (pin 1) -----> Power
230(pin 18) -----> Ground 244 (pin 18) -----> Ground
231 245
232(pin 2) -----> Up 246 (pin 2) -----> Up
233(pin 3) -----> Down 247 (pin 3) -----> Down
234(pin 4) -----> Left 248 (pin 4) -----> Left
235(pin 5) -----> Right 249 (pin 5) -----> Right
236(pin 6) -----> Button 1 250 (pin 6) -----> Button 1
237 251
238 However, if the joystick is switch based (eg. clicks when you move it), 252However, if the joystick is switch based (eg. clicks when you move it),
239you might or might not, depending on your parallel port, need 10 kOhm pullup 253you might or might not, depending on your parallel port, need 10 kOhm pullup
240resistors on each of the direction and button signals, like this: 254resistors on each of the direction and button signals, like this::
241 255
242(pin 2) ------------+------> Up 256 (pin 2) ------------+------> Up
243 Resistor | 257 Resistor |
244(pin 1) --[10kOhm]--+ 258 (pin 1) --[10kOhm]--+
245 259
246 Try without, and if it doesn't work, add them. For TTL based joysticks / 260Try without, and if it doesn't work, add them. For TTL based joysticks /
247gamepads the pullups are not needed. 261gamepads the pullups are not needed.
248 262
249 For joysticks with two buttons you connect the second button to pin 7 on 263For joysticks with two buttons you connect the second button to pin 7 on
250the parallel port. 264the parallel port::
251 265
252(pin 7) -----> Button 2 266 (pin 7) -----> Button 2
253 267
254 And that's it. 268And that's it.
255 269
256 On a side note, if you have already built a different adapter for use with 270On a side note, if you have already built a different adapter for use with
257the digital joystick driver 0.8.0.2, this is also supported by the db9.c 271the digital joystick driver 0.8.0.2, this is also supported by the db9.c
258driver, as device type 8. (See section 3.2) 272driver, as device type 8. (See section 3.2)
259 273
2602.2.2 Multisystem joysticks using gamecon.c 274Multisystem joysticks using gamecon.c
261~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 275~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262 For some people just one joystick per parallel port is not enough, and/or 276
277For some people just one joystick per parallel port is not enough, and/or
263want to use them on one parallel port together with NES/SNES/PSX pads. This is 278want to use them on one parallel port together with NES/SNES/PSX pads. This is
264possible using the gamecon.c. It supports up to 5 devices of the above types, 279possible using the gamecon.c. It supports up to 5 devices of the above types,
265including 1 and 2 buttons Multisystem joysticks. 280including 1 and 2 buttons Multisystem joysticks.
266 281
267 However, there is nothing for free. To allow more sticks to be used at 282However, there is nothing for free. To allow more sticks to be used at
268once, you need the sticks to be purely switch based (that is non-TTL), and 283once, you need the sticks to be purely switch based (that is non-TTL), and
269not to need power. Just a plain simple six switches inside. If your 284not to need power. Just a plain simple six switches inside. If your
270joystick can do more (eg. turbofire) you'll need to disable it totally first 285joystick can do more (eg. turbofire) you'll need to disable it totally first
271if you want to use gamecon.c. 286if you want to use gamecon.c.
272 287
273 Also, the connection is a bit more complex. You'll need a bunch of diodes, 288Also, the connection is a bit more complex. You'll need a bunch of diodes,
274and one pullup resistor. First, you connect the Directions and the button 289and one pullup resistor. First, you connect the Directions and the button
275the same as for db9, however with the diodes between. 290the same as for db9, however with the diodes between::
276 291
277 Diodes 292 Diodes
278(pin 2) -----|<|----> Up 293 (pin 2) -----|<|----> Up
279(pin 3) -----|<|----> Down 294 (pin 3) -----|<|----> Down
280(pin 4) -----|<|----> Left 295 (pin 4) -----|<|----> Left
281(pin 5) -----|<|----> Right 296 (pin 5) -----|<|----> Right
282(pin 6) -----|<|----> Button 1 297 (pin 6) -----|<|----> Button 1
283 298
284 For two button sticks you also connect the other button. 299For two button sticks you also connect the other button::
285 300
286(pin 7) -----|<|----> Button 2 301 (pin 7) -----|<|----> Button 2
287 302
288 And finally, you connect the Ground wire of the joystick, like done in 303And finally, you connect the Ground wire of the joystick, like done in
289this little schematic to Power and Data on the parallel port, as described 304this little schematic to Power and Data on the parallel port, as described
290for the NES / SNES pads in section 2.1 of this file - that is, one data pin 305for the NES / SNES pads in section 2.1 of this file - that is, one data pin
291for each joystick. The power source is shared. 306for each joystick. The power source is shared::
307
308 Data ------------+-----> Ground
309 Resistor |
310 Power --[10kOhm]--+
292 311
293Data ------------+-----> Ground 312And that's all, here we go!
294 Resistor |
295Power --[10kOhm]--+
296 313
297 And that's all, here we go! 314Multisystem joysticks using turbografx.c
315~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
298 316
2992.2.3 Multisystem joysticks using turbografx.c 317The TurboGraFX interface, designed by
300~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
301 The TurboGraFX interface, designed by
302 318
303 Steffen Schwenke <schwenke@burg-halle.de> 319 Steffen Schwenke <schwenke@burg-halle.de>
304 320
305 allows up to 7 Multisystem joysticks connected to the parallel port. In 321allows up to 7 Multisystem joysticks connected to the parallel port. In
306Steffen's version, there is support for up to 5 buttons per joystick. However, 322Steffen's version, there is support for up to 5 buttons per joystick. However,
307since this doesn't work reliably on all parallel ports, the turbografx.c driver 323since this doesn't work reliably on all parallel ports, the turbografx.c driver
308supports only one button per joystick. For more information on how to build the 324supports only one button per joystick. For more information on how to build the
309interface, see 325interface, see:
310 326
311 http://www2.burg-halle.de/~schwenke/parport.html 327 http://www2.burg-halle.de/~schwenke/parport.html
312 328
3132.3 Sony Playstation 329Sony Playstation
314~~~~~~~~~~~~~~~~~~~~ 330----------------
315 331
316 The PSX controller is supported by the gamecon.c. Pinout of the PSX 332The PSX controller is supported by the gamecon.c. Pinout of the PSX
317controller (compatible with DirectPadPro): 333controller (compatible with DirectPadPro)::
318 334
319 +---------+---------+---------+ 335 +---------+---------+---------+
3209 | o o o | o o o | o o o | 1 parallel 336 9 | o o o | o o o | o o o | 1 parallel
321 \________|_________|________/ port pins 337 \________|_________|________/ port pins
322 | | | | | | 338 | | | | | |
323 | | | | | +--------> Clock --- (4) 339 | | | | | +--------> Clock --- (4)
324 | | | | +------------> Select --- (3) 340 | | | | +------------> Select --- (3)
325 | | | +---------------> Power --- (5-9) 341 | | | +---------------> Power --- (5-9)
326 | | +------------------> Ground --- (18-25) 342 | | +------------------> Ground --- (18-25)
327 | +-------------------------> Command --- (2) 343 | +-------------------------> Command --- (2)
328 +----------------------------> Data --- (one of 10,11,12,13,15) 344 +----------------------------> Data --- (one of 10,11,12,13,15)
329 345
330 The driver supports these controllers: 346The driver supports these controllers:
331 347
332 * Standard PSX Pad 348 * Standard PSX Pad
333 * NegCon PSX Pad 349 * NegCon PSX Pad
@@ -336,207 +352,223 @@ controller (compatible with DirectPadPro):
336 * PSX Rumble Pad 352 * PSX Rumble Pad
337 * PSX DDR Pad 353 * PSX DDR Pad
338 354
3392.4 Sega 355Sega
340~~~~~~~~ 356----
341 All the Sega controllers are more or less based on the standard 2-button 357
358All the Sega controllers are more or less based on the standard 2-button
342Multisystem joystick. However, since they don't use switches and use TTL 359Multisystem joystick. However, since they don't use switches and use TTL
343logic, the only driver usable with them is the db9.c driver. 360logic, the only driver usable with them is the db9.c driver.
344 361
3452.4.1 Sega Master System 362Sega Master System
346~~~~~~~~~~~~~~~~~~~~~~~~ 363~~~~~~~~~~~~~~~~~~
347 The SMS gamepads are almost exactly the same as normal 2-button 364
365The SMS gamepads are almost exactly the same as normal 2-button
348Multisystem joysticks. Set the driver to Multi2 mode, use the corresponding 366Multisystem joysticks. Set the driver to Multi2 mode, use the corresponding
349parallel port pins, and the following schematic: 367parallel port pins, and the following schematic::
350 368
351 +-----------> Power 369 +-----------> Power
352 | +---------> Right 370 | +---------> Right
353 | | +-------> Left 371 | | +-------> Left
354 | | | +-----> Down 372 | | | +-----> Down
355 | | | | +---> Up 373 | | | | +---> Up
356 | | | | | 374 | | | | |
357 _____________ 375 _____________
3585 \ o o o o o / 1 376 5 \ o o o o o / 1
359 \ o o x o / 377 \ o o x o /
360 9 `~~~~~~~' 6 378 9 `~~~~~~~' 6
361 | | | 379 | | |
362 | | +----> Button 1 380 | | +----> Button 1
363 | +--------> Ground 381 | +--------> Ground
364 +----------> Button 2 382 +----------> Button 2
365 383
3662.4.2 Sega Genesis aka MegaDrive 384Sega Genesis aka MegaDrive
367~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 385~~~~~~~~~~~~~~~~~~~~~~~~~~
368 The Sega Genesis (in Europe sold as Sega MegaDrive) pads are an extension 386
387The Sega Genesis (in Europe sold as Sega MegaDrive) pads are an extension
369to the Sega Master System pads. They use more buttons (3+1, 5+1, 6+1). Use 388to the Sega Master System pads. They use more buttons (3+1, 5+1, 6+1). Use
370the following schematic: 389the following schematic::
371 390
372 +-----------> Power 391 +-----------> Power
373 | +---------> Right 392 | +---------> Right
374 | | +-------> Left 393 | | +-------> Left
375 | | | +-----> Down 394 | | | +-----> Down
376 | | | | +---> Up 395 | | | | +---> Up
377 | | | | | 396 | | | | |
378 _____________ 397 _____________
3795 \ o o o o o / 1 398 5 \ o o o o o / 1
380 \ o o o o / 399 \ o o o o /
381 9 `~~~~~~~' 6 400 9 `~~~~~~~' 6
382 | | | | 401 | | | |
383 | | | +----> Button 1 402 | | | +----> Button 1
384 | | +------> Select 403 | | +------> Select
385 | +--------> Ground 404 | +--------> Ground
386 +----------> Button 2 405 +----------> Button 2
387 406
388 The Select pin goes to pin 14 on the parallel port. 407The Select pin goes to pin 14 on the parallel port::
389 408
390(pin 14) -----> Select 409 (pin 14) -----> Select
391 410
392 The rest is the same as for Multi2 joysticks using db9.c 411The rest is the same as for Multi2 joysticks using db9.c
393 412
3942.4.3 Sega Saturn 413Sega Saturn
395~~~~~~~~~~~~~~~~~ 414~~~~~~~~~~~
396 Sega Saturn has eight buttons, and to transfer that, without hacks like 415
416Sega Saturn has eight buttons, and to transfer that, without hacks like
397Genesis 6 pads use, it needs one more select pin. Anyway, it is still 417Genesis 6 pads use, it needs one more select pin. Anyway, it is still
398handled by the db9.c driver. Its pinout is very different from anything 418handled by the db9.c driver. Its pinout is very different from anything
399else. Use this schematic: 419else. Use this schematic::
400 420
401 +-----------> Select 1 421 +-----------> Select 1
402 | +---------> Power 422 | +---------> Power
403 | | +-------> Up 423 | | +-------> Up
404 | | | +-----> Down 424 | | | +-----> Down
405 | | | | +---> Ground 425 | | | | +---> Ground
406 | | | | | 426 | | | | |
407 _____________ 427 _____________
4085 \ o o o o o / 1 428 5 \ o o o o o / 1
409 \ o o o o / 429 \ o o o o /
410 9 `~~~~~~~' 6 430 9 `~~~~~~~' 6
411 | | | | 431 | | | |
412 | | | +----> Select 2 432 | | | +----> Select 2
413 | | +------> Right 433 | | +------> Right
414 | +--------> Left 434 | +--------> Left
415 +----------> Power 435 +----------> Power
416 436
417 Select 1 is pin 14 on the parallel port, Select 2 is pin 16 on the 437Select 1 is pin 14 on the parallel port, Select 2 is pin 16 on the
418parallel port. 438parallel port::
419 439
420(pin 14) -----> Select 1 440 (pin 14) -----> Select 1
421(pin 16) -----> Select 2 441 (pin 16) -----> Select 2
422 442
423 The other pins (Up, Down, Right, Left, Power, Ground) are the same as for 443The other pins (Up, Down, Right, Left, Power, Ground) are the same as for
424Multi joysticks using db9.c 444Multi joysticks using db9.c
425 445
4263. The drivers 446The drivers
427~~~~~~~~~~~~~~ 447===========
428 There are three drivers for the parallel port interfaces. Each, as 448
449There are three drivers for the parallel port interfaces. Each, as
429described above, allows to connect a different group of joysticks and pads. 450described above, allows to connect a different group of joysticks and pads.
430Here are described their command lines: 451Here are described their command lines:
431 452
4323.1 gamecon.c 453gamecon.c
433~~~~~~~~~~~~~ 454---------
434 Using gamecon.c you can connect up to five devices to one parallel port. It 455
435uses the following kernel/module command line: 456Using gamecon.c you can connect up to five devices to one parallel port. It
457uses the following kernel/module command line::
436 458
437 gamecon.map=port,pad1,pad2,pad3,pad4,pad5 459 gamecon.map=port,pad1,pad2,pad3,pad4,pad5
438 460
439 Where 'port' the number of the parport interface (eg. 0 for parport0). 461Where ``port`` the number of the parport interface (eg. 0 for parport0).
440 462
441 And 'pad1' to 'pad5' are pad types connected to different data input pins 463And ``pad1`` to ``pad5`` are pad types connected to different data input pins
442(10,11,12,13,15), as described in section 2.1 of this file. 464(10,11,12,13,15), as described in section 2.1 of this file.
443 465
444 The types are: 466The types are:
445 467
446 Type | Joystick/Pad 468 ===== =============================
447 -------------------- 469 Type Joystick/Pad
448 0 | None 470 ===== =============================
449 1 | SNES pad 471 0 None
450 2 | NES pad 472 1 SNES pad
451 4 | Multisystem 1-button joystick 473 2 NES pad
452 5 | Multisystem 2-button joystick 474 4 Multisystem 1-button joystick
453 6 | N64 pad 475 5 Multisystem 2-button joystick
454 7 | Sony PSX controller 476 6 N64 pad
455 8 | Sony PSX DDR controller 477 7 Sony PSX controller
456 9 | SNES mouse 478 8 Sony PSX DDR controller
457 479 9 SNES mouse
458 The exact type of the PSX controller type is autoprobed when used, so 480 ===== =============================
481
482The exact type of the PSX controller type is autoprobed when used, so
459hot swapping should work (but is not recommended). 483hot swapping should work (but is not recommended).
460 484
461 Should you want to use more than one of parallel ports at once, you can use 485Should you want to use more than one of parallel ports at once, you can use
462gamecon.map2 and gamecon.map3 as additional command line parameters for two 486gamecon.map2 and gamecon.map3 as additional command line parameters for two
463more parallel ports. 487more parallel ports.
464 488
465 There are two options specific to PSX driver portion. gamecon.psx_delay sets 489There are two options specific to PSX driver portion. gamecon.psx_delay sets
466the command delay when talking to the controllers. The default of 25 should 490the command delay when talking to the controllers. The default of 25 should
467work but you can try lowering it for better performance. If your pads don't 491work but you can try lowering it for better performance. If your pads don't
468respond try raising it until they work. Setting the type to 8 allows the 492respond try raising it until they work. Setting the type to 8 allows the
469driver to be used with Dance Dance Revolution or similar games. Arrow keys are 493driver to be used with Dance Dance Revolution or similar games. Arrow keys are
470registered as key presses instead of X and Y axes. 494registered as key presses instead of X and Y axes.
471 495
4723.2 db9.c 496db9.c
473~~~~~~~~~ 497-----
474 Apart from making an interface, there is nothing difficult on using the 498
475db9.c driver. It uses the following kernel/module command line: 499Apart from making an interface, there is nothing difficult on using the
500db9.c driver. It uses the following kernel/module command line::
476 501
477 db9.dev=port,type 502 db9.dev=port,type
478 503
479 Where 'port' is the number of the parport interface (eg. 0 for parport0). 504Where ``port`` is the number of the parport interface (eg. 0 for parport0).
480 505
481 Caveat here: This driver only works on bidirectional parallel ports. If 506Caveat here: This driver only works on bidirectional parallel ports. If
482your parallel port is recent enough, you should have no trouble with this. 507your parallel port is recent enough, you should have no trouble with this.
483Old parallel ports may not have this feature. 508Old parallel ports may not have this feature.
484 509
485 'Type' is the type of joystick or pad attached: 510``Type`` is the type of joystick or pad attached:
486 511
487 Type | Joystick/Pad 512 ===== ======================================================
488 -------------------- 513 Type Joystick/Pad
489 0 | None 514 ===== ======================================================
490 1 | Multisystem 1-button joystick 515 0 None
491 2 | Multisystem 2-button joystick 516 1 Multisystem 1-button joystick
492 3 | Genesis pad (3+1 buttons) 517 2 Multisystem 2-button joystick
493 5 | Genesis pad (5+1 buttons) 518 3 Genesis pad (3+1 buttons)
494 6 | Genesis pad (6+2 buttons) 519 5 Genesis pad (5+1 buttons)
495 7 | Saturn pad (8 buttons) 520 6 Genesis pad (6+2 buttons)
496 8 | Multisystem 1-button joystick (v0.8.0.2 pin-out) 521 7 Saturn pad (8 buttons)
497 9 | Two Multisystem 1-button joysticks (v0.8.0.2 pin-out) 522 8 Multisystem 1-button joystick (v0.8.0.2 pin-out)
498 10 | Amiga CD32 pad 523 9 Two Multisystem 1-button joysticks (v0.8.0.2 pin-out)
499 524 10 Amiga CD32 pad
500 Should you want to use more than one of these joysticks/pads at once, you 525 ===== ======================================================
526
527Should you want to use more than one of these joysticks/pads at once, you
501can use db9.dev2 and db9.dev3 as additional command line parameters for two 528can use db9.dev2 and db9.dev3 as additional command line parameters for two
502more joysticks/pads. 529more joysticks/pads.
503 530
5043.3 turbografx.c 531turbografx.c
505~~~~~~~~~~~~~~~~ 532------------
506 The turbografx.c driver uses a very simple kernel/module command line: 533
534The turbografx.c driver uses a very simple kernel/module command line::
507 535
508 turbografx.map=port,js1,js2,js3,js4,js5,js6,js7 536 turbografx.map=port,js1,js2,js3,js4,js5,js6,js7
509 537
510 Where 'port' is the number of the parport interface (eg. 0 for parport0). 538Where ``port`` is the number of the parport interface (eg. 0 for parport0).
511 539
512 'jsX' is the number of buttons the Multisystem joysticks connected to the 540``jsX`` is the number of buttons the Multisystem joysticks connected to the
513interface ports 1-7 have. For a standard multisystem joystick, this is 1. 541interface ports 1-7 have. For a standard multisystem joystick, this is 1.
514 542
515 Should you want to use more than one of these interfaces at once, you can 543Should you want to use more than one of these interfaces at once, you can
516use turbografx.map2 and turbografx.map3 as additional command line parameters 544use turbografx.map2 and turbografx.map3 as additional command line parameters
517for two more interfaces. 545for two more interfaces.
518 546
5193.4 PC parallel port pinout 547PC parallel port pinout
520~~~~~~~~~~~~~~~~~~~~~~~~~~~ 548-----------------------
549
550::
551
521 .----------------------------------------. 552 .----------------------------------------.
522 At the PC: \ 13 12 11 10 9 8 7 6 5 4 3 2 1 / 553 At the PC: \ 13 12 11 10 9 8 7 6 5 4 3 2 1 /
523 \ 25 24 23 22 21 20 19 18 17 16 15 14 / 554 \ 25 24 23 22 21 20 19 18 17 16 15 14 /
524 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 555 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
525 556
526 Pin | Name | Description 557====== ======= =============
527 ~~~~~~|~~~~~~~~~|~~~~~~~~~~ 558 Pin Name Description
528 1 | /STROBE | Strobe 559====== ======= =============
529 2-9 | D0-D7 | Data Bit 0-7 560 1 /STROBE Strobe
530 10 | /ACK | Acknowledge 561 2-9 D0-D7 Data Bit 0-7
531 11 | BUSY | Busy 562 10 /ACK Acknowledge
532 12 | PE | Paper End 563 11 BUSY Busy
533 13 | SELIN | Select In 564 12 PE Paper End
534 14 | /AUTOFD | Autofeed 565 13 SELIN Select In
535 15 | /ERROR | Error 566 14 /AUTOFD Autofeed
536 16 | /INIT | Initialize 567 15 /ERROR Error
537 17 | /SEL | Select 568 16 /INIT Initialize
538 18-25 | GND | Signal Ground 569 17 /SEL Select
539 570 18-25 GND Signal Ground
5403.5 End 571====== ======= =============
541~~~~~~~ 572
542 That's all, folks! Have fun! 573
574That's all, folks! Have fun!