Changes

Digital Joysticks

727 bytes added, 21:54, 5 February 2010
/* Developing programs that use joystick */
* '''Q,A,O,P,SPACE''' - (Q up, A down, O left, P right, SPACE fire) This is a good solution, and it's a sort of standard (used by many games). It is best for english QWERTY keyboards, on french AZERTY it'd be A-Q-O-P (but because the decoding of the keys is done in software, normally by the OS, the bits in the keyboard matrix are actually the same).
 
== Relevant locations in Keyboard Matrix ==
 
{|{{Prettytable|width: 700px; font-size: 2em;}}
|''Direction''||''Joystick 1''||''Joystick 2''||''Cursor,Space''||''Q,A,O,P,Space''
|-
|Up ||Row9.Bit0 ||Row6.Bit0 ||Row0.Bit0 ||Row8.Bit3 (Q)
|-
|Down ||Row9.Bit1 ||Row6.Bit1 ||Row0.Bit2 ||Row8.Bit5 (A)
|-
|Left ||Row9.Bit2 ||Row6.Bit2 ||Row1.Bit0 ||Row4.Bit2 (O)
|-
|Right ||Row9.Bit3 ||Row6.Bit3 ||Row0.Bit1 ||Row3.Bit3 (P)
|-
|Fire2 ||Row9.Bit4 ||Row6.Bit4 ||Row5.Bit7 ||Row5.Bit7 (Space)
|-
|Fire1 (*) ||Row9.Bit5 ||Row6.Bit5 ||(wherever) ||(wherever)
|-
|}
(*) Mind that Fire1 isn't supported on normal 1-button joysticks. When using it, also provide an alternate key on the keyboard.
== Other game controller inputs ==
6,388
edits