Difference between revisions of "Digital Joysticks"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
(Is this true?)
(Relevant locations in Keyboard Matrix)
 
(38 intermediate revisions by 4 users not shown)
Line 13: Line 13:
 
* [[Amstrad JY-1/JY-2 joysticks]]
 
* [[Amstrad JY-1/JY-2 joysticks]]
  
For the CPC+/GX4000, Amstrad seems to have also made Joypads (which work identically as joysticks).
+
Amstrad's two-button joysticks. The quality isn't spectacular, so most CPC users tended to use third-party sticks, with only 1-button, but better quality. The JY-2 version contains a connector for a second joystick (equivalent to a built-in Y-cable).
 +
 
 +
== Official CPC+/GX4000 Joypads ==
 +
 
 +
[[Image:Gx4000.jpg|50px|right]]
 +
The CPC+ and GX4000 were shipped with one or two digital joypads included. Technically, they work same as normal joysticks. But, they have two buttons. And, the GX4000 doesn't have a keyboard which could be used instead of a second fire button. In result, some CPC+/GX4000 games may rely on 2-button hardware, making them incompatible with regular 1-button joysticks.
  
 
== Compatible Standard Joysticks ==
 
== Compatible Standard Joysticks ==
Line 19: Line 24:
 
[[Image:Joystick Competition PRO 5000 box front.jpg|50px|right]]
 
[[Image:Joystick Competition PRO 5000 box front.jpg|50px|right]]
  
All Atari-compatible digital joysticks with ''Single Fire Button and Four Direction switches'' should be usually working with the CPC. For example, classic Competition Pro joysticks.
+
All Atari-compatible digital joysticks with ''Single Fire Button and Four Direction switches'' should be usually working with the CPC. For example, classic Competition Pro joysticks or the [[Konix Speedking]].
  
 
== Incompatible Standard Joysticks ==
 
== Incompatible Standard Joysticks ==
Line 29: Line 34:
  
 
== Y-Cable ==
 
== Y-Cable ==
 +
 +
[[Image:CPC Plus Joystick Port.gif|50px|right]]
  
 
The original CPC models have only one joystick port, but can be used with 2 joysticks when using a Y-cable:
 
The original CPC models have only one joystick port, but can be used with 2 joysticks when using a Y-cable:
Line 34: Line 41:
 
* [[Joystick Y-cables]]
 
* [[Joystick Y-cables]]
  
The CPC+/GX4000 have two digital joystick ports (which work equivalent to the Y-cable).
+
The CPC+/GX4000 have two digital joystick ports (which work equivalent to an incompletely implemented Y-cable with only 8 diodes - there are no diodes in the fire button lines, so fire buttons '''do not work properly''' with two players).
  
== Is this true? ==
+
== Joystick Related stuff... Sega Controllers... ==
  
Some modification occured in the Amstrad "Atari" standard, especially for the PLUS range as Amstrad aimed the console market (GX4000) and used a politic of "Exclusive Hardware" like all console manufacturers of the time.
+
* [[Digital Joystick Related]]
  
Not that it was changed compaired to Old CPC generation (yet few CPC games actually supported the 2 button feature, despite available.
+
== Developing programs that use joystick ==
  
Of course the Atari standard was originally a 1 button solution (Atari 8 bit consoles) but cxould easily be improuved to more buttons.
+
In the CPC world it is more common that a game supports both digital joystick and keyboard for those users who don't own joysticks.
  
Sega Megadrives managed easily 6-8 button (Street Fighter 2 standard).
+
There are some common keyboard configurations used:
  
The most notable differences with other consoles using the Atari spec is with Sega systems (Master System and Megadrive).
+
* '''Cursor keys & SPACE'''
Yet simple re-cabling can be achieved thanks to proper adapter made simply :
+
** This configuration is often used and is great for the CPC6128 and Plus and playing using emulators.  
* a pair of "Atari  / 9 pin serial" connectors (one male and one female)
+
** This is '''not good''' for CPC 464 and 664 (which have uncomfortably arranged cursor keys)
*and simply rewire between both as fit.
+
  
This allows to keep the original configuration of Sega compatible Pads/joysticks and benefit from the higher quality level from them.
+
* '''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).
 +
** Note: On french keyboards it'd be A,Q,O,P - anyways, the "UP" key is always Row8.Bit3, no matter if it's locally called "Q" (english QWERTY keyboard), or "A" (french AZERTY keyboard).
  
A clever move may be to put such converter as a box with wires easily removable/changeable (not soldered, but inserted thank to proper solutions).
+
Best would be to support joysticks, plus the above two keyboard mappings. Best to support them all at once (without needing the user select which one to use). In addition, it is also nice if the keys could be redefined but that is not necessary.
  
This would allows to configure more easily different configuration
+
== Relevant locations in Keyboard Matrix ==
*Sega Master system or MegaDrive/Genesis
+
*Mais even be suitable with Seag LightGuns if you can find a proper Power source.
+
  
As a result is may be a problem to find proper Joysticks for your PLUS/GX4000 with benefit from 2nd button, as Sega models won' t often fit and are often of a better quality/availability.
+
{|{{Prettytable|width: 700px; font-size: 2em;}}
 +
|''Direction''||''Joystick 1''||''Joystick 2''||''Cursor,Space''||''Q,A,O,P,Space''
 +
|-
 +
|Up        ||Row9.Bit0  ||Row6.Bit0 (6)  ||Row0.Bit0  ||Row8.Bit3 (Q)
 +
|-
 +
|Down      ||Row9.Bit1  ||Row6.Bit1 (5)  ||Row0.Bit2  ||Row8.Bit5 (A)
 +
|-
 +
|Left      ||Row9.Bit2  ||Row6.Bit2 (R)  ||Row1.Bit0  ||Row4.Bit2 (O)
 +
|-
 +
|Right    ||Row9.Bit3  ||Row6.Bit3 (T)  ||Row0.Bit1  ||Row3.Bit3 (P)
 +
|-
 +
|Fire1    ||Row9.Bit4  ||Row6.Bit4 (G)  ||Row5.Bit7  ||Row5.Bit7 (Space)
 +
|-
 +
|Fire2 (*) ||Row9.Bit5  ||Row6.Bit5 (F)  ||(wherever) ||(wherever)
 +
|-
 +
|Fire3 (**) ||Row9.Bit6  ||Row6.Bit6 (B) ||(wherever) ||(wherever)
 +
|-
 +
|}
 +
(*) Most CPC joysticks only support 1 fire button. When using Fire2 or Fire3, also provide an alternate key on the keyboard.
  
Other noable differences are compaired to Atari ST as the mouse can't fit unless powered.
+
(**) Fire3 is only supported on CPC hardware, not on Amstrad Plus and GX4000 hardware.
As a result, different Mouse standards appeared on Amstrad, using Joystick port Or Extension port.
+
The same goes with lightphaser solutions.
+
  
Both could use Joystick port (added power suplly) or Extension port, or even the special LightGun port on Plus range (Is it powered ?).
+
== Other game controller inputs ==
  
by adding a power derivation on their Joystick port, Amstrad could have standardised it's technology and ease the CPC community.
+
The CPC+/GX4000 additionaly have an [[Analog Joysticks|15pin Analog Joystick]] Port, and a [[Connector:Aux socket (CPC Plus only)|6pin Lightgun socket]] (AUX).
  
== Joystick Related stuff... Sega Controllers... ==
+
== Other hardware that can be connected to the CPC joystick port ==
 
+
* [[Digital Joystick Related]]
+
  
== Analog Joysticks ==
+
The CPCs digital joystick port is occasionally also misused to connect other hardware, known examples are:
 +
Some Lightguns: ([[Gunstick]], [[Loriciel Phaser (West Phaser)|West Phaser]]).
 +
Amstrad's Lightpen ([[Amstrad LP-1 light pen]]).
 +
A rather crappy 8bit printer port extension ([[CPCI 8bit Printer Mod]]).
 +
And, various mouse interfaces ([[AMX Mouse]], [[Atari-ST mouse adapter]], [[dk'tronics Mouse Interface|Dk'tronics Mouse Interface]], [[CPC-Mousepack 2.0]], [[GEOS mouse|GEOS mouse]]).
 +
Plus exotic things like the [[Ambug|Ambug Robot]] and [[Codemasters CD]].
  
The CPC+/GX4000 additionaly have an [[Analog Joysticks|Analog Joystick]] Port.
+
On the original CPCs, the direction/button inputs can be reprogrammed as outputs (via PSG/PPI config). However, this will NOT work on the CPC+/GX4000's dual joystick ports - which include diodes (like normal joystick Y-cables).
  
[[Category:Hardware]][[Category:Peripherals]][[Category:Stub]]
+
[[Category:Input Device]][[Category:Peripherals]]

Latest revision as of 19:25, 5 June 2024

Technical

The CPC joystick port is (more or less) based on the Atari-standard, for details on the pin-outs (and differences between Amstrad CPC and normal Atari/Commodore ports), see:

At software side, the joystick port is part of the keyboard matrix, accessed via the general purpose I/O port in the PSG chip, which is itself accessed indirectly via the 8255 chip.

Official Amstrad Joysticks

Jy2.jpg

Amstrad's two-button joysticks. The quality isn't spectacular, so most CPC users tended to use third-party sticks, with only 1-button, but better quality. The JY-2 version contains a connector for a second joystick (equivalent to a built-in Y-cable).

Official CPC+/GX4000 Joypads

Gx4000.jpg

The CPC+ and GX4000 were shipped with one or two digital joypads included. Technically, they work same as normal joysticks. But, they have two buttons. And, the GX4000 doesn't have a keyboard which could be used instead of a second fire button. In result, some CPC+/GX4000 games may rely on 2-button hardware, making them incompatible with regular 1-button joysticks.

Compatible Standard Joysticks

Joystick Competition PRO 5000 box front.jpg

All Atari-compatible digital joysticks with Single Fire Button and Four Direction switches should be usually working with the CPC. For example, classic Competition Pro joysticks or the Konix Speedking.

Incompatible Standard Joysticks

  • Joysticks that do require 5V/GND supply (eg. for built-in auto-fire circuits) won't work on the CPC.
  • Joysticks with 2-3 buttons may also be problematic (in the Atari standard, 2nd/3rd button are wired between POT0/POT1 and 5V).
  • And, in lack of the POT inputs, any kind of analog devices (like Atari paddles) won't work on the CPC.
  • Newer joysticks with PC-style 15pin or USB connector obviously won't fit to the CPCs 9pin port (unless one eliminates the electronics inside of those joysticks, and re-wires their botton/dirction switches directly to the CPCs joystick port).

Y-Cable

CPC Plus Joystick Port.gif

The original CPC models have only one joystick port, but can be used with 2 joysticks when using a Y-cable:

The CPC+/GX4000 have two digital joystick ports (which work equivalent to an incompletely implemented Y-cable with only 8 diodes - there are no diodes in the fire button lines, so fire buttons do not work properly with two players).

Joystick Related stuff... Sega Controllers...

Developing programs that use joystick

In the CPC world it is more common that a game supports both digital joystick and keyboard for those users who don't own joysticks.

There are some common keyboard configurations used:

  • Cursor keys & SPACE
    • This configuration is often used and is great for the CPC6128 and Plus and playing using emulators.
    • This is not good for CPC 464 and 664 (which have uncomfortably arranged cursor keys)
  • 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).
    • Note: On french keyboards it'd be A,Q,O,P - anyways, the "UP" key is always Row8.Bit3, no matter if it's locally called "Q" (english QWERTY keyboard), or "A" (french AZERTY keyboard).

Best would be to support joysticks, plus the above two keyboard mappings. Best to support them all at once (without needing the user select which one to use). In addition, it is also nice if the keys could be redefined but that is not necessary.

Relevant locations in Keyboard Matrix

Direction Joystick 1 Joystick 2 Cursor,Space Q,A,O,P,Space
Up Row9.Bit0 Row6.Bit0 (6) Row0.Bit0 Row8.Bit3 (Q)
Down Row9.Bit1 Row6.Bit1 (5) Row0.Bit2 Row8.Bit5 (A)
Left Row9.Bit2 Row6.Bit2 (R) Row1.Bit0 Row4.Bit2 (O)
Right Row9.Bit3 Row6.Bit3 (T) Row0.Bit1 Row3.Bit3 (P)
Fire1 Row9.Bit4 Row6.Bit4 (G) Row5.Bit7 Row5.Bit7 (Space)
Fire2 (*) Row9.Bit5 Row6.Bit5 (F) (wherever) (wherever)
Fire3 (**) Row9.Bit6 Row6.Bit6 (B) (wherever) (wherever)

(*) Most CPC joysticks only support 1 fire button. When using Fire2 or Fire3, also provide an alternate key on the keyboard.

(**) Fire3 is only supported on CPC hardware, not on Amstrad Plus and GX4000 hardware.

Other game controller inputs

The CPC+/GX4000 additionaly have an 15pin Analog Joystick Port, and a 6pin Lightgun socket (AUX).

Other hardware that can be connected to the CPC joystick port

The CPCs digital joystick port is occasionally also misused to connect other hardware, known examples are: Some Lightguns: (Gunstick, West Phaser). Amstrad's Lightpen (Amstrad LP-1 light pen). A rather crappy 8bit printer port extension (CPCI 8bit Printer Mod). And, various mouse interfaces (AMX Mouse, Atari-ST mouse adapter, Dk'tronics Mouse Interface, CPC-Mousepack 2.0, GEOS mouse). Plus exotic things like the Ambug Robot and Codemasters CD.

On the original CPCs, the direction/button inputs can be reprogrammed as outputs (via PSG/PPI config). However, this will NOT work on the CPC+/GX4000's dual joystick ports - which include diodes (like normal joystick Y-cables).