Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Mauro Carvalho Chehab and committed by
Dmitry Torokhov
c8ae270e 89237c42

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