In order to push sales of Amstrad's own joysticks, Amstrad designed the CPC with one joystick port only which had two common signal pins. The idea was to sell one joystick which forwarded the second common signal to a built-in joystick port, to which the second joystick could be connected.
As the quality of the Amstrad joysticks was lousy, using an Y-cable together with other joysticks was the preferred solution.
Basically, Pin8 needs to be swapped with Pin9 for the second joystick. However, the cable should also contain diodes in order to prevent conflicts between the two joysticks.
For example, if Player 1 moves UP-and-RIGHT then UP and RIGHT are shortcut with each other. In result, without the diodes, Player 2 would automatically move UP-and-RIGHT whenever trying to move UP-or-RIGHT.
Caution: The CPC+ has some kind of built-in Y-cable with only 8 diodes. But, for properly supporting the included 2-button joypads it would require 12 diodes.
Joystick Splitter (an article from an english magazine, describing how to make a Y-cable)