📄 joystick-parport.txt
字号:
However, there is nothing for free. To allow more sticks to be used atonce, you need the sticks to be purely switch based (that is non-TTL), andnot to need power. Just a plain simple six switches inside. If yourjoystick can do more (eg. turbofire) you'll need to disable it totally firstif you want to use gamecon.c. Also, the connection is a bit more complex. You'll need a bunch of diodes,and one pullup resistor. First, you connect the Directions and the buttonthe same as for db9, however with the diodes inbetween. Diodes(pin 2) -----|<|----> Up(pin 3) -----|<|----> Down(pin 4) -----|<|----> Left(pin 5) -----|<|----> Right(pin 6) -----|<|----> Button 1 For two button sticks you also connect the other button.(pin 7) -----|<|----> Button 2 And finally, you connect the Ground wire of the joystick, like done inthis little schematic to Power and Data on the parallel port, as describedfor the NES / SNES pads in section 2.1 of this file - that is, one data pinfor each joystick. The power source is shared.Data ------------+-----> Ground Resistor |Power --[10kOhm]--+ And that's all, here we go!2.2.3 Multisystem joysticks using turbografx.c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The TurboGraFX interface, designed by Steffen Schwenke <schwenke@burg-halle.de> allows up to 7 Multisystem joysticks connected to the parallel port. InSteffen's version, there is support for up to 5 buttons per joystick. However,since this doesn't work reliably on all parallel ports, the turbografx.c driversupports only one button per joystick. For more information on how to build theinterface, see http://www2.burg-halle.de/~schwenke/parport.html2.3 Sony Playstation~~~~~~~~~~~~~~~~~~~~ The PSX controller is supported by the gamecon.c. Pinout of the PSXcontroller (compatible with DirectPadPro): +---------+---------+---------+9 | o o o | o o o | o o o | 1 parallel \________|_________|________/ port pins | | | | | | | | | | | +--------> Clock --- (4) | | | | +------------> Select --- (3) | | | +---------------> Power --- (5-9) | | +------------------> Ground --- (18-25) | +-------------------------> Command --- (2) +----------------------------> Data --- (one of 10,11,12,13,15) The driver supports these controllers: * Standard PSX Pad * NegCon PSX Pad * Analog PSX Pad (red mode) * Analog PSX Pad (green mode) * PSX Rumble Pad2.4 Sega~~~~~~~~ All the Sega controllers are more or less based on the standard 2-buttonMultisystem joystick. However, since they don't use switches and use TTLlogic, the only driver usable with them is the db9.c driver.2.4.1 Sega Master System~~~~~~~~~~~~~~~~~~~~~~~~ The SMS gamepads are almost exactly the same as normal 2-buttonMultisystem joysticks. Set the driver to Multi2 mode, use the correspondingparallel port pins, and the following schematic: +-----------> Power | +---------> Right | | +-------> Left | | | +-----> Down | | | | +---> Up | | | | | _____________5 \ o o o o o / 1 \ o o x o / 9 `~~~~~~~' 6 | | | | | +----> Button 1 | +--------> Ground +----------> Button 22.4.2 Sega Genesis aka MegaDrive~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Sega Genesis (in Europe sold as Sega MegaDrive) pads are an extensionto the Sega Master System pads. They use more buttons (3+1, 5+1, 6+1). Usethe following schematic: +-----------> Power | +---------> Right | | +-------> Left | | | +-----> Down | | | | +---> Up | | | | | _____________5 \ o o o o o / 1 \ o o o o / 9 `~~~~~~~' 6 | | | | | | | +----> Button 1 | | +------> Select | +--------> Ground +----------> Button 2 The Select pin goes to pin 14 on the parallel port.(pin 14) -----> Select The rest is the same as for Multi2 joysticks using db9.c2.4.3 Sega Saturn~~~~~~~~~~~~~~~~~ Sega Saturn has eight buttons, and to transfer that, without hacks likeGenesis 6 pads use, it needs one more select pin. Anyway, it is stillhandled by the db9.c driver. Its pinout is very different from anythingelse. Use this schematic: +-----------> Select 1 | +---------> Power | | +-------> Up | | | +-----> Down | | | | +---> Ground | | | | | _____________5 \ o o o o o / 1 \ o o o o / 9 `~~~~~~~' 6 | | | | | | | +----> Select 2 | | +------> Right | +--------> Left +----------> Power Select 1 is pin 14 on the parallel port, Select 2 is pin 16 on theparallel port.(pin 14) -----> Select 1(pin 16) -----> Select 2 The other pins (Up, Down, Right, Left, Power, Ground) are the same as forMulti joysticks using db9.c3. The drivers~~~~~~~~~~~~~~ There are three drivers for the parallel port interfaces. Each, asdescribed above, allows to connect a different group of joysticks and pads.Here are described their command lines:3.1 gamecon.c~~~~~~~~~~~~~ Using gamecon.c you can connect up to five devices to one parallel port. Ituses the following kernel/module command line: gc=port,pad1,pad2,pad3,pad4,pad5 Where 'port' the number of the parport interface (eg. 0 for parport0). And 'pad1' to 'pad5' are pad types connected to different data input pins(10,11,12,13,15), as described in section 2.1 of this file. The types are: Type | Joystick/Pad -------------------- 0 | None 1 | SNES pad 2 | NES pad 4 | Multisystem 1-button joystick 5 | Multisystem 2-button joystick 6 | N64 pad 7 | Sony PSX controller The exact type of the PSX controller type is autoprobed, so you must haveyour controller plugged in before initializing. Should you want to use more than one of parallel ports at once, you can usegc_2 and gc_3 as additional command line parameters for two more parallelports.3.2 db9.c~~~~~~~~~ Apart from making an interface, there is nothing difficult on using thedb9.c driver. It uses the following kernel/module command line: db9=port,type Where 'port' is the number of the parport interface (eg. 0 for parport0). Caveat here: This driver only works on bidirectional parallel ports. Ifyour parallel port is recent enough, you should have no trouble with this.Old parallel ports may not have this feature. 'Type' is the type of joystick or pad attached: Type | Joystick/Pad -------------------- 0 | None 1 | Multisystem 1-button joystick 2 | Multisystem 2-button joystick 3 | Genesis pad (3+1 buttons) 5 | Genesis pad (5+1 buttons) 6 | Genesis pad (6+2 buttons) 7 | Saturn pad (8 buttons) 8 | Multisystem 1-button joystick (v0.8.0.2 pin-out) 9 | Two Multisystem 1-button joysticks (v0.8.0.2 pin-out) 10 | Amiga CD32 pad Should you want to use more than one of these joysticks/pads at once, youcan use db9_2 and db9_3 as additional command line parameters for twomore joysticks/pads.3.3 turbografx.c~~~~~~~~~~~~~~~~ The turbografx.c driver uses a very simple kernel/module command line: tgfx=port,js1,js2,js3,js4,js5,js6,js7 Where 'port' is the number of the parport interface (eg. 0 for parport0). 'jsX' is the number of buttons the Multisystem joysticks connected to theinterface ports 1-7 have. For a standard multisystem joystick, this is 1. Should you want to use more than one of these interfaces at once, you canuse tgfx_2 and tgfx_3 as additional command line parameters for two moreinterfaces.3.4 PC parallel port pinout~~~~~~~~~~~~~~~~~~~~~~~~~~~ .----------------------------------------. At the PC: \ 13 12 11 10 9 8 7 6 5 4 3 2 1 / \ 25 24 23 22 21 20 19 18 17 16 15 14 / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pin | Name | Description ~~~~~~|~~~~~~~~~|~~~~~~~~~~ 1 | /STROBE | Strobe 2-9 | D0-D7 | Data Bit 0-7 10 | /ACK | Acknowledge 11 | BUSY | Busy 12 | PE | Paper End 13 | SELIN | Select In 14 | /AUTOFD | Autofeed 15 | /ERROR | Error 16 | /INIT | Initialize 17 | /SEL | Select 18-25 | GND | Signal Ground3.5 End~~~~~~~ That's all, folks! Have fun!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -